[checkstyle] 01/01: Imported Upstream version 5.9

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Oct 20 22:58:10 BST 2014


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to annotated tag upstream/5.9
in repository checkstyle.

commit f6b9d55c4ba7e1874645ea182d5049f4aeed84dc
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Mon Oct 20 22:21:28 2014 +0200

    Imported Upstream version 5.9
---
 .gitignore                                         |   18 +
 .travis.yml                                        |   13 +
 LICENSE                                            |  504 +++
 LICENSE.apache20                                   |  202 ++
 README-Eclipse.txt                                 |    8 +
 README.md                                          |   63 +
 RIGHTS.antlr                                       |   32 +
 ant-phase-compile.xml                              |   27 +
 ant-phase-verify.xml                               |   37 +
 build.xml                                          |  184 +
 checkstyle_checks.xml                              |  220 ++
 config/assembly-bin.xml                            |   41 +
 config/assembly-src.xml                            |   23 +
 contrib/JavadocCheckDefault.java                   |   62 +
 contrib/bcel/docs/BCELConfig.xml                   |   15 +
 .../checkstyle/bcel/AbstractCheckVisitor.java      |  157 +
 .../tools/checkstyle/bcel/ClassFileSetCheck.java   |  317 ++
 .../checkstyle/bcel/EmptyClassFileVisitor.java     |   17 +
 .../tools/checkstyle/bcel/EmptyDeepVisitor.java    |   86 +
 .../tools/checkstyle/bcel/EmptyGenericVisitor.java |   18 +
 .../tools/checkstyle/bcel/IDeepVisitor.java        |   25 +
 .../tools/checkstyle/bcel/IObjectSetVisitor.java   |   37 +
 .../tools/checkstyle/bcel/JavaClassWalker.java     |   40 +
 .../tools/checkstyle/bcel/ReferenceVisitor.java    |  194 ++
 .../tools/checkstyle/bcel/VisitorSet.java          |  149 +
 .../bcel/checks/AbstractReferenceCheck.java        |  150 +
 .../bcel/checks/HiddenInheritedFieldCheck.java     |   64 +
 .../bcel/checks/HiddenStaticMethodCheck.java       |   88 +
 .../checkstyle/bcel/checks/UnreadFieldCheck.java   |   58 +
 .../bcel/checks/UnreadVariableCheck.java           |  130 +
 .../checkstyle/bcel/checks/UnusedMethodCheck.java  |   64 +
 .../checkstyle/bcel/checks/messages.properties     |    5 +
 .../checkstyle/bcel/classfile/FieldDefinition.java |   89 +
 .../bcel/classfile/FieldOrMethodDefinition.java    |   50 +
 .../bcel/classfile/JavaClassDefinition.java        |  188 ++
 .../bcel/classfile/MethodDefinition.java           |  175 +
 .../checkstyle/bcel/classfile/ReferenceDAO.java    |  140 +
 .../tools/checkstyle/bcel/classfile/Utils.java     |   39 +
 .../bcel/generic/FieldOrMethodReference.java       |   61 +
 .../checkstyle/bcel/generic/FieldReference.java    |   22 +
 .../checkstyle/bcel/generic/GETFIELDReference.java |   28 +
 .../bcel/generic/GETSTATICReference.java           |   28 +
 .../checkstyle/bcel/generic/InvokeReference.java   |   38 +
 .../checkstyle/bcel/generic/PUTFIELDReference.java |   28 +
 .../bcel/generic/PUTSTATICReference.java           |   28 +
 .../tools/checkstyle/bcel/generic/Utils.java       |   71 +
 .../checkstyle/bcel/checks/InheritLibrary.java     |   11 +
 .../tools/checkstyle/bcel/checks/SubClass.java     |   54 +
 .../tools/checkstyle/bcel/checks/SuperClass.java   |   46 +
 .../tools/checkstyle/bcel/BcelCheckTestCase.java   |  127 +
 .../bcel/checks/HiddenInheritedFieldTest.java      |   22 +
 .../bcel/checks/HiddenStaticMethodTest.java        |   22 +
 contrib/checkstyle-author.xsl                      |  230 ++
 contrib/checkstyle-csv.xsl                         |   11 +
 contrib/checkstyle-frames-errors.xsl               |  394 +++
 contrib/checkstyle-frames.xsl                      |  382 +++
 contrib/checkstyle-noframes-severity-sorted.xsl    |  210 ++
 contrib/checkstyle-noframes-sorted.xsl             |  179 +
 contrib/checkstyle-noframes.xsl                    |  179 +
 contrib/checkstyle-simple.xsl                      |   71 +
 contrib/checkstyle-text.xsl                        |   26 +
 .../XInclude/NamespacesSAXParserFactoryImpl.java   |   21 +
 contrib/examples/XInclude/config.xml               |   26 +
 contrib/examples/XInclude/index.html               |  142 +
 contrib/examples/XInclude/treewalker.xml           |    7 +
 contrib/examples/checks/all-checkstyle-checks.xml  | 1122 +++++++
 .../mycompany/checks/LimitImplementationFiles.java |   69 +
 .../com/mycompany/checks/MethodLimitCheck.java     |   63 +
 .../com/mycompany/checks/messages.properties       |    2 +
 .../tools/checkstyle/checks/xpath/Attribute.java   |  107 +
 .../checks/xpath/AttributeAxisIterator.java        |   98 +
 .../checkstyle/checks/xpath/DocumentNavigator.java |  437 +++
 .../checkstyle/checks/xpath/NodeIterator.java      |  122 +
 .../tools/checkstyle/checks/xpath/XPathCheck.java  |  103 +
 .../checkstyle/checks/xpath/jaxen_LICENSE.txt      |   56 +
 .../checkstyle/checks/xpath/messages.properties    |    6 +
 .../tools/checkstyle/checks/xpath/package.html     |   10 +
 .../checkstyle/checks/xpath/saxpath_LICENSE.txt    |   60 +
 .../tools/checkstyle/checks/xpath/xpath_config.xml |   44 +
 contrib/examples/checks/mycompany_conf.xml         |   44 +
 contrib/examples/conf/BlochEffectiveJava.xml       |  113 +
 contrib/examples/conf/openorb.xml                  |  139 +
 contrib/examples/conf/template_config.xml          |  782 +++++
 .../filters/com/mycompany/filters/FilesFilter.java |   34 +
 contrib/examples/linkErrors2Source/build.xml       |   70 +
 .../linkErrors2Source/checkstyle-noframes.xsl      |  190 ++
 contrib/examples/linkErrors2Source/readme.txt      |    6 +
 .../listeners/CommonsLoggingListener.java          |  127 +
 .../com/mycompany/listeners/MailLogger.java        |  241 ++
 .../com/mycompany/listeners/VerboseListener.java   |  111 +
 contrib/hooks/git-pre-commit-hook.pl               |   72 +
 .../checks/usage/AbstractUsageCheck.java           |  200 ++
 .../checks/usage/OneMethodPrivateFieldCheck.java   |  139 +
 .../checks/usage/UnusedLocalVariableCheck.java     |   59 +
 .../checks/usage/UnusedParameterCheck.java         |  132 +
 .../checks/usage/UnusedPrivateFieldCheck.java      |   63 +
 .../checks/usage/UnusedPrivateMethodCheck.java     |  244 ++
 .../checkstyle/checks/usage/messages.properties    |    5 +
 .../checkstyle/checks/usage/messages_fi.properties |    5 +
 .../checkstyle/checks/usage/messages_fr.properties |    5 +
 .../tools/checkstyle/checks/usage/package.html     |   10 +
 .../checks/usage/transmogrify/ASTManager.java      |  228 ++
 .../checks/usage/transmogrify/ASTUtil.java         |  220 ++
 .../usage/transmogrify/AnonymousInnerClass.java    |   62 +
 .../checks/usage/transmogrify/ArrayDef.java        |  154 +
 .../usage/transmogrify/ArrayLengthMember.java      |   48 +
 .../checks/usage/transmogrify/BaseScope.java       |  100 +
 .../checks/usage/transmogrify/BlockDef.java        |   53 +
 .../checks/usage/transmogrify/ClassDef.java        |  362 ++
 .../usage/transmogrify/ClassImportException.java   |   35 +
 .../checks/usage/transmogrify/ClassManager.java    |   41 +
 .../usage/transmogrify/DefaultConstructor.java     |   65 +
 .../checks/usage/transmogrify/DefaultScope.java    |   82 +
 .../checks/usage/transmogrify/Definition.java      |  203 ++
 .../usage/transmogrify/DefinitionTraverser.java    |  139 +
 .../checks/usage/transmogrify/DotIterator.java     |  108 +
 .../checks/usage/transmogrify/ExternalClass.java   |  373 +++
 .../usage/transmogrify/ExternalConstructor.java    |  101 +
 .../usage/transmogrify/ExternalDefinition.java     |   50 +
 .../checks/usage/transmogrify/ExternalMethod.java  |  128 +
 .../checks/usage/transmogrify/ExternalPackage.java |   95 +
 .../usage/transmogrify/ExternalSignature.java      |   97 +
 .../usage/transmogrify/ExternalVariable.java       |   76 +
 .../checks/usage/transmogrify/IClass.java          |  142 +
 .../checks/usage/transmogrify/IDefinition.java     |   84 +
 .../checks/usage/transmogrify/IMethod.java         |   67 +
 .../checks/usage/transmogrify/IPackage.java        |   63 +
 .../checks/usage/transmogrify/ISignature.java      |   58 +
 .../checks/usage/transmogrify/IVariable.java       |   39 +
 .../usage/transmogrify/InterfaceConstructor.java   |   90 +
 .../checks/usage/transmogrify/LabelDef.java        |   48 +
 .../checks/usage/transmogrify/LiteralResolver.java |  157 +
 .../checks/usage/transmogrify/MethodDef.java       |  157 +
 .../checks/usage/transmogrify/MethodSignature.java |  138 +
 .../transmogrify/MethodSpecificityComparator.java  |   59 +
 .../checks/usage/transmogrify/NullClass.java       |  107 +
 .../checks/usage/transmogrify/Occurrence.java      |  131 +
 .../checks/usage/transmogrify/PackageDef.java      |   66 +
 .../usage/transmogrify/PrimitiveClasses.java       |  107 +
 .../checks/usage/transmogrify/QueryEngine.java     |  185 +
 .../checks/usage/transmogrify/Reference.java       |  141 +
 .../usage/transmogrify/ReferenceCounter.java       |   88 +
 .../usage/transmogrify/ReferenceThreshold.java     |   78 +
 .../checks/usage/transmogrify/ReferenceTool.java   |   55 +
 .../checks/usage/transmogrify/Resolver.java        | 1893 +++++++++++
 .../checks/usage/transmogrify/Scope.java           |  124 +
 .../checks/usage/transmogrify/ScopeIndex.java      |  140 +
 .../checkstyle/checks/usage/transmogrify/Span.java |  153 +
 .../checks/usage/transmogrify/SymTabAST.java       |  554 +++
 .../usage/transmogrify/SymTabASTFactory.java       |   76 +
 .../usage/transmogrify/SymTabASTIterator.java      |   95 +
 .../checks/usage/transmogrify/SymbolTable.java     |  274 ++
 .../usage/transmogrify/SymbolTableException.java   |   35 +
 .../checks/usage/transmogrify/TableMaker.java      | 1460 ++++++++
 .../checks/usage/transmogrify/Typed.java           |   45 +
 .../checks/usage/transmogrify/UnknownClass.java    |  174 +
 .../checks/usage/transmogrify/VariableDef.java     |  132 +
 .../tools/checkstyle/usage/InputEmptyFile.java     |    2 +
 .../checkstyle/usage/InputInnerUsedMethod.java     |   23 +
 .../usage/InputOneMethodPrivateField.java          |  114 +
 .../tools/checkstyle/usage/InputUnusedField.java   |   97 +
 .../tools/checkstyle/usage/InputUnusedLocal.java   |   60 +
 .../tools/checkstyle/usage/InputUnusedMethod.java  |  155 +
 .../checkstyle/usage/InputUnusedParameter.java     |   50 +
 .../tools/checkstyle/checks/usage/AllTests.java    |   23 +
 .../usage/OneMethodPrivateFieldCheckTest.java      |   46 +
 .../checks/usage/UnusedLocalVariableCheckTest.java |   34 +
 .../checks/usage/UnusedParameterCheckTest.java     |   58 +
 .../checks/usage/UnusedPrivateFieldCheckTest.java  |   36 +
 .../checks/usage/UnusedPrivateMethodCheckTest.java |   78 +
 contrib/usage/src/xdocs/config_usage.xml           |  359 ++
 fast-forward-merge.sh                              |   37 +
 google_checks.xml                                  |  168 +
 import-control.xml                                 |   62 +
 java.header                                        |   18 +
 pom.xml                                            |  829 +++++
 .../tools/checkstyle/CheckStyleTask.java           |  666 ++++
 .../com/puppycrawl/tools/checkstyle/Checker.java   |  592 ++++
 .../tools/checkstyle/ConfigurationLoader.java      |  565 ++++
 .../tools/checkstyle/DefaultConfiguration.java     |  146 +
 .../tools/checkstyle/DefaultContext.java           |   59 +
 .../puppycrawl/tools/checkstyle/DefaultLogger.java |  167 +
 .../java/com/puppycrawl/tools/checkstyle/Defn.java |   39 +
 .../java/com/puppycrawl/tools/checkstyle/Main.java |  295 ++
 .../puppycrawl/tools/checkstyle/ModuleFactory.java |   46 +
 .../tools/checkstyle/PackageNamesLoader.java       |  224 ++
 .../tools/checkstyle/PackageObjectFactory.java     |  160 +
 .../tools/checkstyle/PropertiesExpander.java       |   54 +
 .../tools/checkstyle/PropertyCacheFile.java        |  231 ++
 .../tools/checkstyle/PropertyResolver.java         |   43 +
 .../puppycrawl/tools/checkstyle/TreeWalker.java    |  491 +++
 .../com/puppycrawl/tools/checkstyle/XMLLogger.java |  237 ++
 .../tools/checkstyle/api/AbstractFileSetCheck.java |  206 ++
 .../tools/checkstyle/api/AbstractLoader.java       |  139 +
 .../checkstyle/api/AbstractViolationReporter.java  |  175 +
 .../tools/checkstyle/api/AnnotationUtility.java    |  208 ++
 .../tools/checkstyle/api/AuditEvent.java           |  146 +
 .../tools/checkstyle/api/AuditListener.java        |   75 +
 .../tools/checkstyle/api/AutomaticBean.java        |  296 ++
 .../com/puppycrawl/tools/checkstyle/api/Check.java |  261 ++
 .../tools/checkstyle/api/CheckstyleException.java  |   53 +
 .../puppycrawl/tools/checkstyle/api/Comment.java   |  112 +
 .../tools/checkstyle/api/Configurable.java         |   35 +
 .../tools/checkstyle/api/Configuration.java        |   66 +
 .../puppycrawl/tools/checkstyle/api/Context.java   |   44 +
 .../tools/checkstyle/api/Contextualizable.java     |   38 +
 .../puppycrawl/tools/checkstyle/api/DetailAST.java |  311 ++
 .../puppycrawl/tools/checkstyle/api/FastStack.java |  140 +
 .../tools/checkstyle/api/FileContents.java         |  326 ++
 .../tools/checkstyle/api/FileSetCheck.java         |   82 +
 .../puppycrawl/tools/checkstyle/api/FileText.java  |  359 ++
 .../puppycrawl/tools/checkstyle/api/Filter.java    |   34 +
 .../puppycrawl/tools/checkstyle/api/FilterSet.java |  101 +
 .../puppycrawl/tools/checkstyle/api/FullIdent.java |  151 +
 .../tools/checkstyle/api/JavadocTagInfo.java       |  644 ++++
 .../tools/checkstyle/api/LineColumn.java           |   65 +
 .../tools/checkstyle/api/LocalizedMessage.java     |  383 +++
 .../tools/checkstyle/api/LocalizedMessages.java    |   64 +
 .../tools/checkstyle/api/MessageDispatcher.java    |   47 +
 .../com/puppycrawl/tools/checkstyle/api/Scope.java |   78 +
 .../tools/checkstyle/api/ScopeUtils.java           |  303 ++
 .../tools/checkstyle/api/SeverityLevel.java        |   70 +
 .../tools/checkstyle/api/SeverityLevelCounter.java |   92 +
 .../puppycrawl/tools/checkstyle/api/TextBlock.java |   78 +
 .../tools/checkstyle/api/TokenTypes.java           | 3533 ++++++++++++++++++++
 .../com/puppycrawl/tools/checkstyle/api/Utils.java |  293 ++
 .../tools/checkstyle/api/package-info.java         |   24 +
 .../checkstyle/checks/AbstractFormatCheck.java     |  122 +
 .../checkstyle/checks/AbstractOptionCheck.java     |   79 +
 .../checkstyle/checks/AbstractTypeAwareCheck.java  |  603 ++++
 .../checkstyle/checks/ArrayTypeStyleCheck.java     |   78 +
 .../checks/AvoidEscapedUnicodeCharactersCheck.java |  346 ++
 .../tools/checkstyle/checks/CheckUtils.java        |  329 ++
 .../tools/checkstyle/checks/ClassResolver.java     |  185 +
 .../checkstyle/checks/DeclarationCollector.java    |  384 +++
 .../checkstyle/checks/DescendantTokenCheck.java    |  389 +++
 .../checkstyle/checks/FileContentsHolder.java      |   65 +
 .../checkstyle/checks/FinalParametersCheck.java    |  140 +
 .../checkstyle/checks/LineSeparatorOption.java     |   72 +
 .../checkstyle/checks/NewlineAtEndOfFileCheck.java |  127 +
 .../checkstyle/checks/OuterTypeFilenameCheck.java  |  110 +
 .../tools/checkstyle/checks/RegexpCheck.java       |  256 ++
 .../checkstyle/checks/SuppressWarningsHolder.java  |  436 +++
 .../tools/checkstyle/checks/TodoCommentCheck.java  |  113 +
 .../checkstyle/checks/TrailingCommentCheck.java    |  211 ++
 .../tools/checkstyle/checks/TranslationCheck.java  |  264 ++
 .../checkstyle/checks/UncommentedMainCheck.java    |  255 ++
 .../checkstyle/checks/UniquePropertiesCheck.java   |  150 +
 .../tools/checkstyle/checks/UpperEllCheck.java     |   67 +
 .../checks/annotation/AnnotationUseStyleCheck.java |  515 +++
 .../checks/annotation/MissingDeprecatedCheck.java  |  215 ++
 .../checks/annotation/MissingOverrideCheck.java    |  193 ++
 .../checks/annotation/PackageAnnotationCheck.java  |   85 +
 .../checks/annotation/SuppressWarningsCheck.java   |  315 ++
 .../checkstyle/checks/annotation/package-info.java |   24 +
 .../checks/blocks/AvoidNestedBlocksCheck.java      |  125 +
 .../checkstyle/checks/blocks/BlockOption.java      |   50 +
 .../checkstyle/checks/blocks/EmptyBlockCheck.java  |  171 +
 .../checkstyle/checks/blocks/LeftCurlyCheck.java   |  338 ++
 .../checkstyle/checks/blocks/LeftCurlyOption.java  |   74 +
 .../checkstyle/checks/blocks/NeedBracesCheck.java  |   84 +
 .../checkstyle/checks/blocks/RightCurlyCheck.java  |  296 ++
 .../checkstyle/checks/blocks/RightCurlyOption.java |   53 +
 .../checkstyle/checks/blocks/package-info.java     |   24 +
 .../checks/coding/AbstractIllegalCheck.java        |   76 +
 .../checks/coding/AbstractIllegalMethodCheck.java  |   71 +
 .../checks/coding/AbstractNestedDepthCheck.java    |   93 +
 .../checks/coding/AbstractSuperCheck.java          |  223 ++
 .../checks/coding/ArrayTrailingCommaCheck.java     |   67 +
 .../coding/AvoidInlineConditionalsCheck.java       |   61 +
 .../checks/coding/CovariantEqualsCheck.java        |  120 +
 .../checks/coding/DeclarationOrderCheck.java       |  234 ++
 .../checks/coding/DefaultComesLastCheck.java       |   86 +
 .../checks/coding/EmptyStatementCheck.java         |   59 +
 .../checks/coding/EqualsAvoidNullCheck.java        |  244 ++
 .../checks/coding/EqualsHashCodeCheck.java         |  139 +
 .../checks/coding/ExplicitInitializationCheck.java |  164 +
 .../checkstyle/checks/coding/FallThroughCheck.java |  390 +++
 .../checks/coding/FinalLocalVariableCheck.java     |  219 ++
 .../checkstyle/checks/coding/HiddenFieldCheck.java |  490 +++
 .../checks/coding/IllegalCatchCheck.java           |  103 +
 .../checks/coding/IllegalInstantiationCheck.java   |  330 ++
 .../checks/coding/IllegalThrowsCheck.java          |  108 +
 .../checks/coding/IllegalTokenCheck.java           |   95 +
 .../checks/coding/IllegalTokenTextCheck.java       |  141 +
 .../checkstyle/checks/coding/IllegalTypeCheck.java |  269 ++
 .../checks/coding/InnerAssignmentCheck.java        |  238 ++
 .../checks/coding/JUnitTestCaseCheck.java          |  224 ++
 .../checkstyle/checks/coding/MagicNumberCheck.java |  302 ++
 .../checkstyle/checks/coding/MissingCtorCheck.java |   78 +
 .../checks/coding/MissingSwitchDefaultCheck.java   |   69 +
 .../coding/ModifiedControlVariableCheck.java       |  247 ++
 .../checks/coding/MultipleStringLiteralsCheck.java |  223 ++
 .../coding/MultipleVariableDeclarationsCheck.java  |  125 +
 .../checks/coding/NestedForDepthCheck.java         |   75 +
 .../checks/coding/NestedIfDepthCheck.java          |   92 +
 .../checks/coding/NestedTryDepthCheck.java         |   83 +
 .../checkstyle/checks/coding/NoCloneCheck.java     |  138 +
 .../checkstyle/checks/coding/NoFinalizerCheck.java |   38 +
 .../checks/coding/OneStatementPerLineCheck.java    |  121 +
 .../OverloadMethodsDeclarationOrderCheck.java      |  106 +
 .../checks/coding/PackageDeclarationCheck.java     |  104 +
 .../checks/coding/ParameterAssignmentCheck.java    |  227 ++
 .../checks/coding/RedundantThrowsCheck.java        |  175 +
 .../checkstyle/checks/coding/RequireThisCheck.java |  200 ++
 .../checkstyle/checks/coding/ReturnCountCheck.java |  197 ++
 .../coding/SimplifyBooleanExpressionCheck.java     |   82 +
 .../checks/coding/SimplifyBooleanReturnCheck.java  |  149 +
 .../checks/coding/StringLiteralEqualityCheck.java  |   60 +
 .../checkstyle/checks/coding/SuperCloneCheck.java  |   47 +
 .../checks/coding/SuperFinalizeCheck.java          |   47 +
 .../checks/coding/UnnecessaryParenthesesCheck.java |  292 ++
 .../VariableDeclarationUsageDistanceCheck.java     |  903 +++++
 .../checkstyle/checks/coding/package-info.java     |   24 +
 .../checks/design/DesignForExtensionCheck.java     |  157 +
 .../checkstyle/checks/design/FinalClassCheck.java  |  184 +
 .../design/HideUtilityClassConstructorCheck.java   |  132 +
 .../checks/design/InnerTypeLastCheck.java          |   76 +
 .../checks/design/InterfaceIsTypeCheck.java        |   87 +
 .../checks/design/MutableExceptionCheck.java       |  135 +
 .../checks/design/OneTopLevelClassCheck.java       |  151 +
 .../checkstyle/checks/design/ThrowsCountCheck.java |  114 +
 .../checks/design/VisibilityModifierCheck.java     |  216 ++
 .../checkstyle/checks/design/package-info.java     |   24 +
 .../checkstyle/checks/duplicates/ChecksumInfo.java |  178 +
 .../duplicates/StrictDuplicateCodeCheck.java       |  542 +++
 .../checkstyle/checks/duplicates/package-info.java |   24 +
 .../checks/header/AbstractHeaderCheck.java         |  245 ++
 .../checkstyle/checks/header/HeaderCheck.java      |   91 +
 .../checks/header/RegexpHeaderCheck.java           |  150 +
 .../checkstyle/checks/header/package-info.java     |   23 +
 .../checkstyle/checks/imports/AccessResult.java    |   33 +
 .../checks/imports/AvoidStarImportCheck.java       |  153 +
 .../checks/imports/AvoidStaticImportCheck.java     |  131 +
 .../checks/imports/CustomImportOrderCheck.java     |  800 +++++
 .../tools/checkstyle/checks/imports/Guard.java     |  144 +
 .../checks/imports/IllegalImportCheck.java         |  123 +
 .../checks/imports/ImportControlCheck.java         |  152 +
 .../checks/imports/ImportControlLoader.java        |  208 ++
 .../checks/imports/ImportOrderCheck.java           |  404 +++
 .../checks/imports/ImportOrderOption.java          |  106 +
 .../checkstyle/checks/imports/PkgControl.java      |  157 +
 .../checks/imports/RedundantImportCheck.java       |  147 +
 .../checks/imports/UnusedImportsCheck.java         |  288 ++
 .../checkstyle/checks/imports/package-info.java    |   24 +
 .../checks/indentation/ArrayInitHandler.java       |  157 +
 .../checks/indentation/BlockParentHandler.java     |  356 ++
 .../checkstyle/checks/indentation/CaseHandler.java |   79 +
 .../checks/indentation/CatchHandler.java           |   67 +
 .../checks/indentation/ClassDefHandler.java        |  118 +
 .../checks/indentation/DoWhileHandler.java         |   61 +
 .../checkstyle/checks/indentation/ElseHandler.java |   73 +
 .../checks/indentation/ExpressionHandler.java      |  622 ++++
 .../checks/indentation/FinallyHandler.java         |   49 +
 .../checkstyle/checks/indentation/ForHandler.java  |   91 +
 .../checks/indentation/HandlerFactory.java         |  228 ++
 .../checkstyle/checks/indentation/IfHandler.java   |  114 +
 .../checks/indentation/ImportHandler.java          |   56 +
 .../checkstyle/checks/indentation/IndentLevel.java |  131 +
 .../checks/indentation/IndentationCheck.java       |  330 ++
 .../checks/indentation/IndexHandler.java           |   58 +
 .../checks/indentation/LabelHandler.java           |   80 +
 .../checkstyle/checks/indentation/LineSet.java     |  105 +
 .../checks/indentation/LineWrappingHandler.java    |  334 ++
 .../checks/indentation/MemberDefHandler.java       |  112 +
 .../checks/indentation/MethodCallHandler.java      |  209 ++
 .../checks/indentation/MethodDefHandler.java       |   85 +
 .../checkstyle/checks/indentation/NewHandler.java  |  102 +
 .../checks/indentation/ObjectBlockHandler.java     |  130 +
 .../checks/indentation/PackageDefHandler.java      |   57 +
 .../checks/indentation/PrimordialHandler.java      |   55 +
 .../checks/indentation/SlistHandler.java           |  133 +
 .../checks/indentation/StaticInitHandler.java      |   49 +
 .../checks/indentation/SwitchHandler.java          |   92 +
 .../checkstyle/checks/indentation/TryHandler.java  |   54 +
 .../checks/indentation/WhileHandler.java           |   62 +
 .../checks/indentation/package-info.java           |   24 +
 .../tools/checkstyle/checks/javadoc/HtmlTag.java   |  137 +
 .../checks/javadoc/InvalidJavadocTag.java          |   61 +
 .../checks/javadoc/JavadocMethodCheck.java         |  967 ++++++
 .../checks/javadoc/JavadocPackageCheck.java        |   89 +
 .../checks/javadoc/JavadocStyleCheck.java          |  547 +++
 .../checkstyle/checks/javadoc/JavadocTag.java      |  142 +
 .../checkstyle/checks/javadoc/JavadocTags.java     |   56 +
 .../checks/javadoc/JavadocTypeCheck.java           |  320 ++
 .../checkstyle/checks/javadoc/JavadocUtils.java    |  141 +
 .../checks/javadoc/JavadocVariableCheck.java       |  159 +
 .../tools/checkstyle/checks/javadoc/TagParser.java |  316 ++
 .../checkstyle/checks/javadoc/WriteTagCheck.java   |  232 ++
 .../checkstyle/checks/javadoc/package-info.java    |   23 +
 .../checks/metrics/AbstractClassCouplingCheck.java |  312 ++
 .../checks/metrics/AbstractComplexityCheck.java    |  201 ++
 .../metrics/BooleanExpressionComplexityCheck.java  |  222 ++
 .../metrics/ClassDataAbstractionCouplingCheck.java |   60 +
 .../checks/metrics/ClassFanOutComplexityCheck.java |   62 +
 .../checks/metrics/CyclomaticComplexityCheck.java  |   80 +
 .../checkstyle/checks/metrics/JavaNCSSCheck.java   |  356 ++
 .../checks/metrics/NPathComplexityCheck.java       |  147 +
 .../checkstyle/checks/metrics/package-info.java    |   24 +
 .../checks/modifier/ModifierOrderCheck.java        |  169 +
 .../checks/modifier/RedundantModifierCheck.java    |  130 +
 .../checkstyle/checks/modifier/package-info.java   |   23 +
 .../naming/AbbreviationAsWordInNameCheck.java      |  349 ++
 .../naming/AbstractAccessControlNameCheck.java     |  173 +
 .../checks/naming/AbstractClassNameCheck.java      |  137 +
 .../checks/naming/AbstractNameCheck.java           |   75 +
 .../naming/AbstractTypeParameterNameCheck.java     |   89 +
 .../checks/naming/ClassTypeParameterNameCheck.java |   63 +
 .../checks/naming/ConstantNameCheck.java           |  102 +
 .../naming/InterfaceTypeParameterNameCheck.java    |   62 +
 .../checks/naming/LocalFinalVariableNameCheck.java |   79 +
 .../checks/naming/LocalVariableNameCheck.java      |  132 +
 .../checkstyle/checks/naming/MemberNameCheck.java  |   79 +
 .../checkstyle/checks/naming/MethodNameCheck.java  |  125 +
 .../naming/MethodTypeParameterNameCheck.java       |   63 +
 .../checkstyle/checks/naming/PackageNameCheck.java |   96 +
 .../checks/naming/ParameterNameCheck.java          |   74 +
 .../checks/naming/StaticVariableNameCheck.java     |   80 +
 .../checkstyle/checks/naming/TypeNameCheck.java    |   74 +
 .../checkstyle/checks/naming/package-info.java     |   24 +
 .../tools/checkstyle/checks/package-info.java      |   23 +
 .../checks/regexp/CommentSuppressor.java           |   50 +
 .../checkstyle/checks/regexp/DetectorOptions.java  |  202 ++
 .../checkstyle/checks/regexp/MatchSuppressor.java  |   37 +
 .../checks/regexp/MultilineDetector.java           |  111 +
 .../checkstyle/checks/regexp/NeverSuppress.java    |   42 +
 .../checks/regexp/RegexpMultilineCheck.java        |   98 +
 .../checks/regexp/RegexpSinglelineCheck.java       |   93 +
 .../checks/regexp/RegexpSinglelineJavaCheck.java   |  117 +
 .../checks/regexp/SinglelineDetector.java          |  124 +
 .../checkstyle/checks/regexp/package-info.java     |   24 +
 .../checks/sizes/AnonInnerLengthCheck.java         |   96 +
 .../sizes/ExecutableStatementCountCheck.java       |  233 ++
 .../checkstyle/checks/sizes/FileLengthCheck.java   |   79 +
 .../checkstyle/checks/sizes/LineLengthCheck.java   |  144 +
 .../checkstyle/checks/sizes/MethodCountCheck.java  |  240 ++
 .../checkstyle/checks/sizes/MethodLengthCheck.java |  115 +
 .../checks/sizes/OuterTypeNumberCheck.java         |   83 +
 .../checks/sizes/ParameterNumberCheck.java         |   84 +
 .../checkstyle/checks/sizes/package-info.java      |   24 +
 .../checks/whitespace/AbstractParenPadCheck.java   |   91 +
 .../whitespace/EmptyForInitializerPadCheck.java    |   93 +
 .../whitespace/EmptyForIteratorPadCheck.java       |   91 +
 .../checks/whitespace/EmptyLineSeparatorCheck.java |  221 ++
 .../checks/whitespace/FileTabCharacterCheck.java   |   61 +
 .../checks/whitespace/GenericWhitespaceCheck.java  |  237 ++
 .../checks/whitespace/MethodParamPadCheck.java     |  137 +
 .../checks/whitespace/NoLineWrapCheck.java         |   96 +
 .../checks/whitespace/NoWhitespaceAfterCheck.java  |  136 +
 .../checks/whitespace/NoWhitespaceBeforeCheck.java |  130 +
 .../checks/whitespace/OperatorWrapCheck.java       |  210 ++
 .../checkstyle/checks/whitespace/PadOption.java    |   42 +
 .../checks/whitespace/ParenPadCheck.java           |  145 +
 .../checks/whitespace/SeparatorWrapCheck.java      |  142 +
 .../checks/whitespace/TypecastParenPadCheck.java   |   81 +
 .../checks/whitespace/WhitespaceAfterCheck.java    |  113 +
 .../checks/whitespace/WhitespaceAroundCheck.java   |  467 +++
 .../checkstyle/checks/whitespace/WrapOption.java   |   33 +
 .../checkstyle/checks/whitespace/package-info.java |   24 +
 .../tools/checkstyle/doclets/CheckDocsDoclet.java  |  256 ++
 .../tools/checkstyle/doclets/TokenTypesDoclet.java |  150 +
 .../tools/checkstyle/doclets/package-info.java     |   26 +
 .../tools/checkstyle/filters/CSVFilter.java        |  122 +
 .../tools/checkstyle/filters/IntFilter.java        |   34 +
 .../tools/checkstyle/filters/IntMatchFilter.java   |   66 +
 .../tools/checkstyle/filters/IntRangeFilter.java   |   78 +
 .../checkstyle/filters/SeverityMatchFilter.java    |   73 +
 .../tools/checkstyle/filters/SuppressElement.java  |  250 ++
 .../checkstyle/filters/SuppressWarningsFilter.java |   41 +
 .../filters/SuppressWithNearbyCommentFilter.java   |  518 +++
 .../filters/SuppressionCommentFilter.java          |  530 +++
 .../checkstyle/filters/SuppressionFilter.java      |   79 +
 .../checkstyle/filters/SuppressionsLoader.java     |  229 ++
 .../tools/checkstyle/filters/package-info.java     |   23 +
 .../tools/checkstyle/grammars/CommentListener.java |   57 +
 .../tools/checkstyle/grammars/package-info.java    |   26 +
 .../tools/checkstyle/gui/AbstractCellEditor.java   |  158 +
 .../checkstyle/gui/AbstractTreeTableModel.java     |  268 ++
 .../tools/checkstyle/gui/CodeSelector.java         |   45 +
 .../puppycrawl/tools/checkstyle/gui/FileDrop.java  |  342 ++
 .../tools/checkstyle/gui/JTreeTable.java           |  504 +++
 .../com/puppycrawl/tools/checkstyle/gui/Main.java  |   46 +
 .../tools/checkstyle/gui/ParseTreeInfoPanel.java   |  308 ++
 .../tools/checkstyle/gui/ParseTreeModel.java       |  131 +
 .../tools/checkstyle/gui/TreeTableModel.java       |  104 +
 .../checkstyle/gui/TreeTableModelAdapter.java      |  211 ++
 .../tools/checkstyle/gui/package-info.java         |   50 +
 .../puppycrawl/tools/checkstyle/package-info.java  |   29 +
 src/main/resources/checkstyle_packages.xml         |   28 +
 src/main/resources/checkstyletask.properties       |    1 +
 .../com/puppycrawl/tools/checkstyle/antlib.xml     |    6 +
 .../checks/annotation/messages.properties          |   14 +
 .../checks/annotation/messages_de.properties       |   13 +
 .../checks/annotation/messages_es.properties       |    2 +
 .../checks/annotation/messages_tr.properties       |   18 +
 .../checkstyle/checks/blocks/messages.properties   |   13 +
 .../checks/blocks/messages_de.properties           |   10 +
 .../checks/blocks/messages_es.properties           |   11 +
 .../checks/blocks/messages_fi.properties           |   10 +
 .../checks/blocks/messages_fr.properties           |   10 +
 .../checks/blocks/messages_ja.properties           |   11 +
 .../checks/blocks/messages_pt.properties           |   10 +
 .../checks/blocks/messages_tr.properties           |   12 +
 .../checkstyle/checks/coding/messages.properties   |   68 +
 .../checks/coding/messages_de.properties           |   67 +
 .../checks/coding/messages_es.properties           |   82 +
 .../checks/coding/messages_fi.properties           |   26 +
 .../checks/coding/messages_fr.properties           |   83 +
 .../checks/coding/messages_ja.properties           |   62 +
 .../checks/coding/messages_pt.properties           |   39 +
 .../checks/coding/messages_tr.properties           |   98 +
 .../checkstyle/checks/design/messages.properties   |    9 +
 .../checks/design/messages_de.properties           |    9 +
 .../checks/design/messages_es.properties           |    6 +
 .../checks/design/messages_fi.properties           |    5 +
 .../checks/design/messages_fr.properties           |    9 +
 .../checks/design/messages_ja.properties           |    7 +
 .../checks/design/messages_pt.properties           |    6 +
 .../checks/design/messages_tr.properties           |   17 +
 .../checks/duplicates/messages.properties          |    1 +
 .../checks/duplicates/messages_de.properties       |    1 +
 .../checks/duplicates/messages_es.properties       |    1 +
 .../checks/duplicates/messages_fr.properties       |    1 +
 .../checks/duplicates/messages_tr.properties       |    3 +
 .../checkstyle/checks/header/messages.properties   |    2 +
 .../checks/header/messages_de.properties           |    2 +
 .../checks/header/messages_es.properties           |    2 +
 .../checks/header/messages_fi.properties           |    2 +
 .../checks/header/messages_fr.properties           |    2 +
 .../checks/header/messages_ja.properties           |    2 +
 .../checks/header/messages_pt.properties           |    2 +
 .../checks/header/messages_tr.properties           |    4 +
 .../checks/imports/import_control_1_0.dtd          |   72 +
 .../checks/imports/import_control_1_1.dtd          |   75 +
 .../checkstyle/checks/imports/messages.properties  |   16 +
 .../checks/imports/messages_de.properties          |   12 +
 .../checks/imports/messages_es.properties          |    8 +
 .../checks/imports/messages_fi.properties          |    6 +
 .../checks/imports/messages_fr.properties          |    8 +
 .../checks/imports/messages_ja.properties          |    8 +
 .../checks/imports/messages_pt.properties          |    8 +
 .../checks/imports/messages_tr.properties          |   14 +
 .../checks/indentation/messages.properties         |    4 +
 .../checks/indentation/messages_de.properties      |    3 +
 .../checks/indentation/messages_es.properties      |    2 +
 .../checks/indentation/messages_fi.properties      |    1 +
 .../checks/indentation/messages_fr.properties      |    2 +
 .../checks/indentation/messages_ja.properties      |    4 +
 .../checks/indentation/messages_pt.properties      |    2 +
 .../checks/indentation/messages_tr.properties      |    4 +
 .../checkstyle/checks/javadoc/messages.properties  |   21 +
 .../checks/javadoc/messages_de.properties          |   21 +
 .../checks/javadoc/messages_es.properties          |   16 +
 .../checks/javadoc/messages_fi.properties          |   11 +
 .../checks/javadoc/messages_fr.properties          |   16 +
 .../checks/javadoc/messages_ja.properties          |   17 +
 .../checks/javadoc/messages_pt.properties          |   14 +
 .../checks/javadoc/messages_tr.properties          |   23 +
 .../tools/checkstyle/checks/messages.properties    |   34 +
 .../tools/checkstyle/checks/messages_de.properties |   34 +
 .../tools/checkstyle/checks/messages_es.properties |   23 +
 .../tools/checkstyle/checks/messages_fi.properties |   11 +
 .../tools/checkstyle/checks/messages_fr.properties |   22 +
 .../tools/checkstyle/checks/messages_ja.properties |   17 +
 .../tools/checkstyle/checks/messages_pt.properties |    9 +
 .../tools/checkstyle/checks/messages_tr.properties |   34 +
 .../checkstyle/checks/metrics/messages.properties  |   30 +
 .../checks/metrics/messages_de.properties          |   30 +
 .../checks/metrics/messages_es.properties          |   30 +
 .../checks/metrics/messages_fr.properties          |   30 +
 .../checks/metrics/messages_tr.properties          |   55 +
 .../checkstyle/checks/modifier/messages.properties |    4 +
 .../checks/modifier/messages_de.properties         |    4 +
 .../checks/modifier/messages_es.properties         |    4 +
 .../checks/modifier/messages_fi.properties         |    2 +
 .../checks/modifier/messages_fr.properties         |    5 +
 .../checks/modifier/messages_ja.properties         |    4 +
 .../checks/modifier/messages_pt.properties         |    4 +
 .../checks/modifier/messages_tr.properties         |    7 +
 .../checkstyle/checks/naming/messages.properties   |    6 +
 .../checks/naming/messages_de.properties           |    6 +
 .../checks/naming/messages_es.properties           |    2 +
 .../checks/naming/messages_fi.properties           |    2 +
 .../checks/naming/messages_fr.properties           |    2 +
 .../checks/naming/messages_ja.properties           |    2 +
 .../checks/naming/messages_pt.properties           |    2 +
 .../checks/naming/messages_tr.properties           |    9 +
 .../checkstyle/checks/regexp/messages.properties   |    2 +
 .../checks/regexp/messages_de.properties           |    2 +
 .../checks/regexp/messages_tr.properties           |    4 +
 .../checkstyle/checks/sizes/messages.properties    |   12 +
 .../checkstyle/checks/sizes/messages_de.properties |   12 +
 .../checkstyle/checks/sizes/messages_es.properties |    7 +
 .../checkstyle/checks/sizes/messages_fi.properties |    4 +
 .../checkstyle/checks/sizes/messages_fr.properties |    7 +
 .../checkstyle/checks/sizes/messages_ja.properties |    8 +
 .../checkstyle/checks/sizes/messages_pt.properties |    6 +
 .../checkstyle/checks/sizes/messages_tr.properties |   19 +
 .../checks/whitespace/messages.properties          |   17 +
 .../checks/whitespace/messages_de.properties       |   17 +
 .../checks/whitespace/messages_es.properties       |   11 +
 .../checks/whitespace/messages_fi.properties       |   11 +
 .../checks/whitespace/messages_fr.properties       |   11 +
 .../checks/whitespace/messages_ja.properties       |   11 +
 .../checks/whitespace/messages_pt.properties       |   11 +
 .../checks/whitespace/messages_tr.properties       |   16 +
 .../tools/checkstyle/configuration_1_0.dtd         |   18 +
 .../tools/checkstyle/configuration_1_1.dtd         |   37 +
 .../tools/checkstyle/configuration_1_2.dtd         |   38 +
 .../tools/checkstyle/configuration_1_3.dtd         |   56 +
 .../puppycrawl/tools/checkstyle/grammars/java.g    | 2018 +++++++++++
 .../tools/checkstyle/messages.properties           |    9 +
 .../tools/checkstyle/messages_de.properties        |    9 +
 .../tools/checkstyle/messages_es.properties        |    9 +
 .../tools/checkstyle/messages_fi.properties        |    9 +
 .../tools/checkstyle/messages_fr.properties        |    9 +
 .../tools/checkstyle/messages_pt.properties        |    9 +
 .../tools/checkstyle/messages_tr.properties        |    8 +
 .../puppycrawl/tools/checkstyle/packages_1_0.dtd   |    6 +
 .../tools/checkstyle/suppressions_1_0.dtd          |   16 +
 .../tools/checkstyle/suppressions_1_1.dtd          |   17 +
 src/site/resources/css/site.css                    |   25 +
 src/site/resources/files/suppressions_none.xml     |    6 +
 src/site/resources/images/AuditListener.gif        |  Bin 0 -> 6138 bytes
 src/site/resources/images/Filter.gif               |  Bin 0 -> 2658 bytes
 src/site/resources/images/ban_red.png              |  Bin 0 -> 3658 bytes
 src/site/resources/images/gui_screenshot.png       |  Bin 0 -> 15089 bytes
 src/site/resources/images/logo.png                 |  Bin 0 -> 3090 bytes
 src/site/resources/images/ok_blue.png              |  Bin 0 -> 3614 bytes
 src/site/resources/images/ok_green.png             |  Bin 0 -> 3603 bytes
 src/site/resources/images/twitter_button.png       |  Bin 0 -> 3105 bytes
 src/site/site.xml                                  |   86 +
 .../tools/checkstyle/BaseCheckTestSupport.java     |  160 +
 .../checkstyle/BaseFileSetCheckTestSupport.java    |   15 +
 .../puppycrawl/tools/checkstyle/CheckerTest.java   |  236 ++
 .../tools/checkstyle/ConfigurationLoaderTest.java  |  352 ++
 .../tools/checkstyle/DebugAuditAdapter.java        |   61 +
 .../puppycrawl/tools/checkstyle/DebugChecker.java  |   27 +
 .../puppycrawl/tools/checkstyle/DebugFilter.java   |   30 +
 .../tools/checkstyle/PackageNamesLoaderTest.java   |   75 +
 .../tools/checkstyle/PackageObjectFactoryTest.java |   85 +
 .../com/puppycrawl/tools/checkstyle/UtilsTest.java |   64 +
 .../puppycrawl/tools/checkstyle/XMLLoggerTest.java |  237 ++
 .../api/AbstractViolationReporterTest.java         |  116 +
 .../tools/checkstyle/api/AutomaticBeanTest.java    |   44 +
 .../tools/checkstyle/api/DetailASTTest.java        |  127 +
 .../tools/checkstyle/api/FastStackTest.java        |   75 +
 .../puppycrawl/tools/checkstyle/api/ScopeTest.java |  115 +
 .../tools/checkstyle/api/SeverityLevelTest.java    |   46 +
 .../tools/checkstyle/api/TokenTypesTest.java       |   34 +
 .../checkstyle/checks/ArrayTypeStyleCheckTest.java |   56 +
 .../AvoidEscapedUnicodeCharactersCheckTest.java    |  172 +
 .../tools/checkstyle/checks/ClassResolverTest.java |   69 +
 .../checks/DescendantTokenCheckTest.java           |  321 ++
 .../checks/FileSetCheckLifecycleTest.java          |   75 +
 .../checks/FinalParametersCheckTest.java           |  107 +
 .../checks/NewlineAtEndOfFileCheckTest.java        |   91 +
 .../checks/OuterTypeFilenameCheckTest.java         |   44 +
 .../tools/checkstyle/checks/RegexpCheckTest.java   |  345 ++
 .../checkstyle/checks/TodoCommentCheckTest.java    |   42 +
 .../checks/TrailingCommentCheckTest.java           |   63 +
 .../checkstyle/checks/TranslationCheckTest.java    |   64 +
 .../checks/UncommentedMainCheckTest.java           |   55 +
 .../checks/UniquePropertiesCheckTest.java          |  158 +
 .../tools/checkstyle/checks/UpperEllCheckTest.java |   39 +
 .../checks/annotation/AnnotationUseStyleTest.java  |  206 ++
 .../checks/annotation/MissingDeprecatedTest.java   |  119 +
 .../annotation/MissingOverrideCheckTest.java       |  260 ++
 .../checks/annotation/PackageAnnotationTest.java   |   77 +
 .../checks/annotation/SuppressWarningsTest.java    |  825 +++++
 .../checks/blocks/AvoidNestedBlocksCheckTest.java  |   58 +
 .../checks/blocks/EmptyBlockCheckTest.java         |  125 +
 .../checks/blocks/LeftCurlyCheckTest.java          |  226 ++
 .../checks/blocks/NeedBracesCheckTest.java         |   53 +
 .../checks/blocks/RightCurlyCheckTest.java         |  150 +
 .../checks/coding/ArrayTrailingCommaCheckTest.java |   41 +
 .../coding/AvoidInlineConditionalsCheckTest.java   |   41 +
 .../checks/coding/CovariantEqualsCheckTest.java    |   43 +
 .../checks/coding/DeclarationOrderCheckTest.java   |  123 +
 .../checks/coding/DefaultComesLastCheckTest.java   |   56 +
 .../checks/coding/EmptyStatementCheckTest.java     |   56 +
 .../checks/coding/EqualsAvoidNullTest.java         |   86 +
 .../checks/coding/EqualsHashCodeCheckTest.java     |   40 +
 .../coding/ExplicitInitializationCheckTest.java    |   58 +
 .../checks/coding/FallThroughCheckTest.java        |  117 +
 .../checks/coding/FinalLocalVariableCheckTest.java |   72 +
 .../checks/coding/HiddenFieldCheckTest.java        |  294 ++
 .../checks/coding/IllegalCatchCheckTest.java       |   78 +
 .../coding/IllegalInstantiationCheckTest.java      |   66 +
 .../checks/coding/IllegalThrowsCheckTest.java      |   95 +
 .../checks/coding/IllegalTokenCheckTest.java       |   55 +
 .../checks/coding/IllegalTokenTextCheckTest.java   |   58 +
 .../checks/coding/IllegalTypeCheckTest.java        |   96 +
 .../checks/coding/InnerAssignmentCheckTest.java    |   55 +
 .../checks/coding/JUnitTestCaseCheckTest.java      |   47 +
 .../checks/coding/MagicNumberCheckTest.java        |  334 ++
 .../checks/coding/MissingCtorCheckTest.java        |   42 +
 .../coding/MissingSwitchDefaultCheckTest.java      |   48 +
 .../coding/ModifiedControlVariableCheckTest.java   |   43 +
 .../coding/MultipleStringLiteralsCheckTest.java    |   98 +
 .../MultipleVariableDeclarationsCheckTest.java     |   48 +
 .../checks/coding/NestedForDepthCheckTest.java     |   79 +
 .../checks/coding/NestedIfDepthCheckTest.java      |   54 +
 .../checks/coding/NestedTryDepthCheckTest.java     |   55 +
 .../checkstyle/checks/coding/NoCloneCheckTest.java |   48 +
 .../checks/coding/NoFinalizerCheckTest.java        |   55 +
 .../coding/OneStatementPerLineCheckInput.java      |  149 +
 .../coding/OneStatementPerLineCheckTest.java       |   40 +
 .../OverloadMethodsDeclarationOrderCheckTest.java  |   42 +
 .../checks/coding/PackageDeclarationCheckTest.java |   65 +
 .../coding/ParameterAssignmentCheckTest.java       |   43 +
 .../checks/coding/RedundantThrowsCheckTest.java    |  140 +
 .../checks/coding/RequireThisCheckTest.java        |  100 +
 .../checks/coding/ReturnCountCheckTest.java        |   53 +
 .../coding/SimplifyBooleanExpressionCheckTest.java |   42 +
 .../coding/SimplifyBooleanReturnCheckTest.java     |   39 +
 .../coding/StringLiteralEqualityCheckTest.java     |   42 +
 .../checks/coding/SuperCloneCheckTest.java         |   40 +
 .../checks/coding/SuperFinalizeCheckTest.java      |   39 +
 .../coding/UnnecessaryParenthesesCheckTest.java    |   99 +
 .../VariableDeclarationUsageDistanceCheckTest.java |  217 ++
 .../checks/design/DesignForExtensionCheckTest.java |   41 +
 .../checks/design/FinalClassCheckTest.java         |   40 +
 .../HideUtilityClassConstructorCheckTest.java      |  102 +
 .../checks/design/InnerTypeLastCheckTest.java      |   49 +
 .../checks/design/InterfaceIsTypeCheckTest.java    |   54 +
 .../checks/design/MutableExceptionCheckTest.java   |   40 +
 .../checks/design/OneTopLevelClassCheckTest.java   |   66 +
 .../checks/design/ThrowsCountCheckTest.java        |   54 +
 .../checks/design/VisibilityModifierCheckTest.java |   92 +
 .../duplicates/StrictDuplicateCodeCheckTest.java   |  106 +
 .../checkstyle/checks/header/HeaderCheckTest.java  |  244 ++
 .../checks/imports/AvoidStarImportTest.java        |   76 +
 .../checks/imports/AvoidStaticImportTest.java      |   98 +
 .../checks/imports/CustomImportOrderCheckTest.java |  234 ++
 .../tools/checkstyle/checks/imports/GuardTest.java |  149 +
 .../checks/imports/IllegalImportCheckTest.java     |   55 +
 .../imports/ImportControlCheckRegExTest.java       |   55 +
 .../checks/imports/ImportControlCheckTest.java     |  120 +
 .../checks/imports/ImportControlLoaderTest.java    |   37 +
 .../checks/imports/ImportOrderCheckTest.java       |  226 ++
 .../checks/imports/PkgControlRegExpTest.java       |   97 +
 .../checkstyle/checks/imports/PkgControlTest.java  |   83 +
 .../checks/imports/RedundantImportCheckTest.java   |   45 +
 .../checks/imports/UnusedImportsCheckTest.java     |  101 +
 .../checks/indentation/IndentationCheckTest.java   |  869 +++++
 .../checks/indentation/NewHandlerTest.java         |   42 +
 .../tools/checkstyle/checks/javadoc/BadCls.java    |    6 +
 .../tools/checkstyle/checks/javadoc/InputTags.java |  368 ++
 .../tools/checkstyle/checks/javadoc/Input_01.java  |   43 +
 .../tools/checkstyle/checks/javadoc/Input_02.java  |   40 +
 .../tools/checkstyle/checks/javadoc/Input_03.java  |   41 +
 .../checkstyle/checks/javadoc/Input_1379666.java   |   40 +
 .../checks/javadoc/JavadocMethodCheckTest.java     |  464 +++
 .../checks/javadoc/JavadocPackageCheckTest.java    |   97 +
 .../checks/javadoc/JavadocStyleCheckTest.java      |  353 ++
 .../checks/javadoc/JavadocTypeCheckTest.java       |  363 ++
 .../checks/javadoc/JavadocUtilsTest.java           |  129 +
 .../checks/javadoc/JavadocVariableCheckTest.java   |  264 ++
 .../checks/javadoc/WriteTagCheckTest.java          |  240 ++
 .../BooleanExpressionComplexityCheckTest.java      |   55 +
 .../ClassDataAbstractionCouplingCheckTest.java     |   47 +
 .../metrics/ClassFanOutComplexityCheckTest.java    |   56 +
 .../metrics/CyclomaticComplexityCheckTest.java     |   51 +
 .../checks/metrics/JavaNCSSCheckTest.java          |   58 +
 .../checks/metrics/NPathComplexityCheckTest.java   |   69 +
 .../checks/modifier/ModifierOrderCheckTest.java    |   56 +
 .../checks/modifier/RedundantModifierTest.java     |   65 +
 .../naming/AbbreviationAsWordInNameCheckTest.java  |  327 ++
 .../checks/naming/AbstractClassNameCheckTest.java  |   83 +
 .../checks/naming/ConstantNameCheckTest.java       |  129 +
 .../naming/LocalFinalVariableNameCheckTest.java    |   63 +
 .../checks/naming/LocalVariableNameCheckTest.java  |   82 +
 .../checks/naming/MemberNameCheckTest.java         |  217 ++
 .../checks/naming/MethodNameCheckTest.java         |  114 +
 .../checks/naming/PackageNameCheckTest.java        |   51 +
 .../checks/naming/ParameterNameCheckTest.java      |   65 +
 .../checks/naming/StaticVariableNameCheckTest.java |   54 +
 .../checks/naming/TypeNameCheckTest.java           |  142 +
 .../checks/naming/TypeParameterNameTest.java       |  122 +
 .../checks/regexp/RegexpMultilineCheckTest.java    |  112 +
 .../checks/regexp/RegexpSinglelineCheckTest.java   |   82 +
 .../regexp/RegexpSinglelineJavaCheckTest.java      |  250 ++
 .../checks/sizes/AnonInnerLengthCheckTest.java     |   55 +
 .../sizes/ExecutableStatementCountCheckTest.java   |  121 +
 .../checks/sizes/FileLengthCheckTest.java          |   84 +
 .../checks/sizes/LineLengthCheckTest.java          |   57 +
 .../checks/sizes/MethodCountCheckInput.java        |  191 ++
 .../checks/sizes/MethodCountCheckInput2.java       |   18 +
 .../checks/sizes/MethodCountCheckTest.java         |   84 +
 .../checks/sizes/MethodLengthCheckTest.java        |   60 +
 .../checks/sizes/OuterTypeNumberCheckTest.java     |   48 +
 .../checks/sizes/ParameterNumberCheckTest.java     |   66 +
 .../EmptyForInitializerPadCheckTest.java           |   55 +
 .../whitespace/EmptyForIteratorPadCheckTest.java   |   56 +
 .../whitespace/EmptyLineSeparatorCheckTest.java    |   69 +
 .../whitespace/FileTabCharacterCheckTest.java      |   99 +
 .../whitespace/GenericWhitespaceCheckTest.java     |   86 +
 .../checks/whitespace/MethodParamPadCheckTest.java |  117 +
 .../checks/whitespace/NoLineWrapCheckTest.java     |   61 +
 .../whitespace/NoWhitespaceAfterCheckTest.java     |   81 +
 .../whitespace/NoWhitespaceBeforeCheckTest.java    |   79 +
 .../checks/whitespace/OperatorWrapCheckTest.java   |   75 +
 .../checks/whitespace/ParenPadCheckTest.java       |  133 +
 .../checks/whitespace/SeparatorWrapCheckTest.java  |   59 +
 .../whitespace/TypecastParenPadCheckTest.java      |   72 +
 .../whitespace/WhitespaceAfterCheckTest.java       |   96 +
 .../checks/whitespace/WhitespaceAroundTest.java    |  224 ++
 .../tools/checkstyle/filters/CSVFilterTest.java    |   80 +
 .../tools/checkstyle/filters/FilterSetTest.java    |   62 +
 .../checkstyle/filters/IntMatchFilterTest.java     |   49 +
 .../checkstyle/filters/IntRangeFilterTest.java     |   73 +
 .../filters/SeverityMatchFilterTest.java           |   92 +
 .../checkstyle/filters/SuppressElementTest.java    |  112 +
 .../filters/SuppressWarningsFilterTest.java        |  133 +
 .../SuppressWithNearbyCommentFilterTest.java       |  228 ++
 .../filters/SuppressionCommentFilterTest.java      |  234 ++
 .../checkstyle/filters/SuppressionsLoaderTest.java |  174 +
 .../checkstyle/grammars/EmbeddedNullCharTest.java  |   42 +
 .../grammars/GeneratedJava14LexerTest.java         |   26 +
 .../tools/checkstyle/grammars/HexFloatsTest.java   |   43 +
 .../checkstyle/grammars/Java7DiamondTest.java      |   43 +
 .../checkstyle/grammars/Java7MultiCatchTest.java   |   43 +
 .../grammars/Java7NumericalLiteralsTest.java       |   42 +
 .../checkstyle/grammars/Java7StringSwitchTest.java |   42 +
 .../grammars/Java7TryWithResourcesTest.java        |   43 +
 .../grammars/LineCommentAtTheEndOfFileTest.java    |   45 +
 .../checkstyle/grammars/UnicodeEscapeTest.java     |   43 +
 .../tools/checkstyle/grammars/VarargTest.java      |   42 +
 .../checkstyle/grammars/java8/AnnotationTest.java  |  150 +
 .../grammars/java8/DefaulMethodsTest.java          |   56 +
 .../checkstyle/grammars/java8/LambdaTest.java      |  246 ++
 .../grammars/java8/MethodReferencesTest.java       |   51 +
 .../resources/checkstyle/checkstyle_checks.xml     |   28 +
 src/test/resources/checkstyle/suppressions.xml     |    6 +
 .../tools/checkstyle/ComplexityCheckTestInput.java |   86 +
 .../tools/checkstyle/ComplexityOverflow.java       |  172 +
 .../tools/checkstyle/Input15Extensions.java        |   38 +
 .../tools/checkstyle/InputAnonInnerLength.java     |  123 +
 .../tools/checkstyle/InputArrayTrailingComma.java  |   41 +
 .../tools/checkstyle/InputArrayTypeStyle.java      |   44 +
 .../InputAvoidEscapedUnicodeCharactersCheck.java   |   81 +
 .../puppycrawl/tools/checkstyle/InputBraces.java   |  119 +
 .../tools/checkstyle/InputCovariant.java           |  129 +
 .../tools/checkstyle/InputDesignForExtension.java  |   84 +
 .../puppycrawl/tools/checkstyle/InputEmptyFile.txt |    0
 .../tools/checkstyle/InputEmptyStatement.java      |   83 +
 .../tools/checkstyle/InputFinalClass.java          |  113 +
 .../tools/checkstyle/InputFinalParameters.java     |  175 +
 .../tools/checkstyle/InputForWhitespace.java       |   54 +
 .../puppycrawl/tools/checkstyle/InputGenerics.java |   30 +
 .../tools/checkstyle/InputHiddenField.java         |  239 ++
 .../tools/checkstyle/InputHiddenFieldReorder.java  |  136 +
 .../tools/checkstyle/InputIllegalTokens.java       |   27 +
 .../puppycrawl/tools/checkstyle/InputInner.java    |   79 +
 .../tools/checkstyle/InputInterfaceIsType.java     |   30 +
 .../puppycrawl/tools/checkstyle/InputJavadoc.java  |  114 +
 .../tools/checkstyle/InputJavadocStyleCheck.java   |  341 ++
 .../InputJavadocStyleCheckHtmlComment.java         |   77 +
 .../checkstyle/InputLeftCurlyAnnotations.java      |   59 +
 .../checkstyle/InputLeftCurlyLineBreakAfter.java   |   72 +
 .../tools/checkstyle/InputLeftCurlyMethod.java     |   90 +
 .../tools/checkstyle/InputLeftCurlyOther.java      |  154 +
 .../tools/checkstyle/InputLineBreaks.java          |   35 +
 .../tools/checkstyle/InputMagicNumber.java         |  189 ++
 .../checkstyle/InputMethNameEqualClsName.java      |   56 +
 .../checkstyle/InputMissingSwitchDefault.java      |   20 +
 .../puppycrawl/tools/checkstyle/InputModifier.java |  128 +
 .../tools/checkstyle/InputModifier2.java           |    8 +
 .../tools/checkstyle/InputNestedBlocks.java        |   63 +
 .../tools/checkstyle/InputNewlineAtEndOfFile.java  |   14 +
 .../checkstyle/InputNoNewlineAtEndOfFile.java      |   14 +
 .../tools/checkstyle/InputOneCharInintVarName.java |   45 +
 .../puppycrawl/tools/checkstyle/InputOpWrap.java   |   57 +
 .../tools/checkstyle/InputPublicOnly.java          |  117 +
 .../tools/checkstyle/InputRedundantThrows.java     |   44 +
 .../tools/checkstyle/InputRegexpHeader1.java       |   11 +
 .../tools/checkstyle/InputRegexpHeader2.java       |   14 +
 .../tools/checkstyle/InputRegexpHeader3.java       |    7 +
 .../tools/checkstyle/InputRegexpHeader4.java       |    6 +
 .../tools/checkstyle/InputRegexpSmallHeader.java   |    6 +
 .../InputRightCurlyEmptyAbstractMethod.java        |    8 +
 .../checkstyle/InputRightCurlyLineBreakBefore.java |   66 +
 .../tools/checkstyle/InputScopeAnonInner.java      |   59 +
 .../tools/checkstyle/InputScopeInnerClasses.java   |   42 +
 .../checkstyle/InputScopeInnerInterfaces.java      |   74 +
 .../puppycrawl/tools/checkstyle/InputSemantic.java |  197 ++
 .../tools/checkstyle/InputSemantic2.java           |   38 +
 .../puppycrawl/tools/checkstyle/InputSimple.java   |  225 ++
 .../tools/checkstyle/InputSimplifyBoolean.java     |   68 +
 .../checkstyle/InputStaticModifierInInterface.java |    8 +
 .../tools/checkstyle/InputTrailingComment.java     |   30 +
 .../tools/checkstyle/InputTypeParamsTags.java      |   40 +
 .../tools/checkstyle/InputUncommentedMain.java     |   91 +
 .../InputUniquePropertiesCheck.properties          |   51 +
 .../tools/checkstyle/InputWhitespace.java          |  251 ++
 .../puppycrawl/tools/checkstyle/InputWriteTag.java |   35 +
 .../tools/checkstyle/InputWriteTag2.java           |   26 +
 .../tools/checkstyle/IntMethodAnnotation.java      |   12 +
 .../puppycrawl/tools/checkstyle/MyAnnotation.java  |   17 +
 .../annotation/AnnotationUseNoTrailingComma.java   |   47 +
 .../annotation/AnnotationUseWithTrailingComma.java |   57 +
 .../checkstyle/annotation/BadAnnonOverride.java    |   42 +
 .../annotation/BadDeprecatedAnnotation.java        |   58 +
 .../annotation/BadDeprecatedJavadoc.java           |   57 +
 .../annotation/BadOverrideFromObject.java          |   53 +
 .../annotation/BadOverrideFromOther.java           |   68 +
 .../annotation/BadPackageAnnotation1.java          |   12 +
 .../annotation/BadPackageAnnotation2.java          |   16 +
 .../checkstyle/annotation/DifferentUseStyles.java  |   60 +
 .../checkstyle/annotation/GoodAnnonOverride.java   |   56 +
 .../checkstyle/annotation/GoodDeprecated.java      |   80 +
 .../annotation/GoodOverrideFromObject.java         |   70 +
 .../annotation/GoodOverrideFromOther.java          |   78 +
 .../tools/checkstyle/annotation/NotOverride.java   |   25 +
 .../annotation/SpecialCaseDeprecated.java          |   88 +
 .../annotation/SuppressWarningsCompact.java        |   87 +
 .../annotation/SuppressWarningsExpanded.java       |   87 +
 .../annotation/SuppressWarningsSingle.java         |   87 +
 .../tools/checkstyle/annotation/package-info.java  |    3 +
 .../tools/checkstyle/coding/InputClone.java        |   95 +
 .../checkstyle/coding/InputDeclarationOrder.java   |  179 +
 .../checkstyle/coding/InputDefaultComesLast.java   |   35 +
 .../checkstyle/coding/InputDefaultComesLast2.java  |   16 +
 .../checkstyle/coding/InputEqualsAvoidNull.java    |  202 ++
 .../tools/checkstyle/coding/InputExplicitInit.java |   75 +
 .../tools/checkstyle/coding/InputFallThrough.java  |  409 +++
 .../checkstyle/coding/InputFinalLocalVariable.java |  158 +
 .../tools/checkstyle/coding/InputFinalize.java     |   53 +
 .../tools/checkstyle/coding/InputHasFinalizer.java |   27 +
 .../checkstyle/coding/InputIllegalCatchCheck.java  |   19 +
 .../checkstyle/coding/InputIllegalCatchCheck2.java |   17 +
 .../InputIllegalInstantiationCheckTest2.java       |   22 +
 .../checkstyle/coding/InputIllegalThrowsCheck.java |   21 +
 .../tools/checkstyle/coding/InputIllegalType.java  |   18 +
 .../checkstyle/coding/InputInnerAssignment.java    |  102 +
 .../tools/checkstyle/coding/InputJUnitTest.java    |   32 +
 .../tools/checkstyle/coding/InputMissingCtor.java  |   14 +
 .../checkstyle/coding/InputModifiedControl.java    |   52 +
 .../coding/InputMultipleStringLiterals.java        |   30 +
 .../coding/InputMultipleVariableDeclarations.java  |   27 +
 .../checkstyle/coding/InputNestedForDepth.java     |   52 +
 .../checkstyle/coding/InputNestedIfDepth.java      |   63 +
 .../checkstyle/coding/InputNestedTryDepth.java     |   44 +
 .../tools/checkstyle/coding/InputNoPackage.java    |    5 +
 .../InputOverloadMethodsDeclarationOrder.java      |  116 +
 .../coding/InputParameterAssignment.java           |   22 +
 .../tools/checkstyle/coding/InputRequireThis.java  |   94 +
 .../tools/checkstyle/coding/InputRequireThis2.java |   15 +
 .../tools/checkstyle/coding/InputReturnCount.java  |   53 +
 .../coding/InputReturnFromCatchCheck.java          |   21 +
 .../coding/InputReturnFromFinallyCheck.java        |   26 +
 .../coding/InputStringLiteralEquality.java         |   47 +
 .../coding/InputUnnecessaryParentheses.java        |   93 +
 ...InputVariableDeclarationUsageDistanceCheck.java |  567 ++++
 .../tools/checkstyle/configs/checkstyle_checks.xml |   30 +
 .../tools/checkstyle/configs/custom_messages.xml   |   18 +
 .../checkstyle/configs/empty_configuration.xml     |    8 +
 .../tools/checkstyle/configs/included.xml          |    5 +
 .../tools/checkstyle/configs/including.xml         |   12 +
 .../checkstyle/configs/missing_config_name.xml     |    9 +
 .../checkstyle/configs/missing_config_parent.xml   |    8 +
 .../checkstyle/configs/missing_property_name.xml   |    9 +
 .../checkstyle/configs/missing_property_value.xml  |    9 +
 .../tools/checkstyle/configs/subdir/including.xml  |   12 +
 .../HideUtilityClassContructor3041574_1.java       |    8 +
 .../HideUtilityClassContructor3041574_2.java       |    8 +
 .../HideUtilityClassContructor3041574_3.java       |   48 +
 .../checkstyle/design/InputInnerClassCheck.java    |   82 +
 .../checkstyle/design/InputMutableException.java   |   25 +
 .../checkstyle/design/InputNonUtilityClass.java    |   21 +
 .../checkstyle/design/InputOneTopLevelClass.java   |   81 +
 .../checkstyle/design/InputRegression1762702.java  |   16 +
 .../tools/checkstyle/design/InputThrowsCount.java  |   28 +
 .../puppycrawl/tools/checkstyle/duplicates/A.java  |   10 +
 .../puppycrawl/tools/checkstyle/duplicates/B.java  |   10 +
 .../tools/checkstyle/duplicates/InnerDup.java      |   53 +
 .../checkstyle/duplicates/LotsOfEmptyLines.java    |   36 +
 .../tools/checkstyle/duplicates/Overlapping.java   |   30 +
 .../tools/checkstyle/duplicates/Shorty.java        |    4 +
 .../filters/InputSuppressWarningsFilter.java       |   60 +
 .../InputSuppressWithNearbyCommentFilter.java      |   77 +
 .../filters/InputSuppressionCommentFilter.java     |   83 +
 .../tools/checkstyle/grammars/Bug3553541.java      |   17 +
 .../tools/checkstyle/grammars/EofBug1667137.java   |   14 +
 .../checkstyle/grammars/InputEmbeddedNullChar.java |  Bin 0 -> 351 bytes
 .../tools/checkstyle/grammars/InputGrammar.java    |    9 +
 .../tools/checkstyle/grammars/InputHexFloat.java   |   16 +
 .../checkstyle/grammars/InputJava7Diamond.java     |   10 +
 .../checkstyle/grammars/InputJava7MultiCatch.java  |   30 +
 .../grammars/InputJava7NumericalLiterals.java      |   84 +
 .../grammars/InputJava7StringSwitch.java           |   20 +
 .../grammars/InputJava7TryWithResources.java       |   39 +
 .../tools/checkstyle/grammars/InputVararg.java     |   11 +
 .../grammars/LineCommentAtTheEndOfFile.java        |    5 +
 .../grammars/SemicolonBetweenImports.java          |    9 +
 .../tools/checkstyle/grammars/UnicodeEscape.java   |   32 +
 .../grammars/java8/InputAnnotationsTest1.java      |   14 +
 .../grammars/java8/InputAnnotationsTest10.java     |   23 +
 .../grammars/java8/InputAnnotationsTest2.java      |   15 +
 .../grammars/java8/InputAnnotationsTest3.java      |   18 +
 .../grammars/java8/InputAnnotationsTest4.java      |   17 +
 .../grammars/java8/InputAnnotationsTest5.java      |   16 +
 .../grammars/java8/InputAnnotationsTest6.java      |   17 +
 .../grammars/java8/InputAnnotationsTest7.java      |   19 +
 .../grammars/java8/InputAnnotationsTest8.java      |   34 +
 .../grammars/java8/InputAnnotationsTest9.java      |   15 +
 .../grammars/java8/InputDefaultMethodsTest.java    |   11 +
 .../grammars/java8/InputDefaultMethodsTest2.java   |   19 +
 .../grammars/java8/InputLambdaTest1.java           |   12 +
 .../grammars/java8/InputLambdaTest10.java          |   20 +
 .../grammars/java8/InputLambdaTest11.java          |   20 +
 .../grammars/java8/InputLambdaTest12.java          |   20 +
 .../grammars/java8/InputLambdaTest13.java          |   22 +
 .../grammars/java8/InputLambdaTest14.java          |   18 +
 .../grammars/java8/InputLambdaTest15.java          |   50 +
 .../grammars/java8/InputLambdaTest16.java          |   22 +
 .../grammars/java8/InputLambdaTest17.java          |   28 +
 .../grammars/java8/InputLambdaTest18.java          |   10 +
 .../grammars/java8/InputLambdaTest2.java           |   19 +
 .../grammars/java8/InputLambdaTest3.java           |   21 +
 .../grammars/java8/InputLambdaTest4.java           |   13 +
 .../grammars/java8/InputLambdaTest5.java           |   14 +
 .../grammars/java8/InputLambdaTest6.java           |   13 +
 .../grammars/java8/InputLambdaTest7.java           |   15 +
 .../grammars/java8/InputLambdaTest8.java           |   19 +
 .../grammars/java8/InputLambdaTest9.java           |   19 +
 .../grammars/java8/InputMethodReferencesTest.java  |   39 +
 .../grammars/java8/InputMethodReferencesTest2.java |   23 +
 .../com/puppycrawl/tools/checkstyle/header/H1.java |    9 +
 .../tools/checkstyle/header/H1.properties          |    4 +
 .../com/puppycrawl/tools/checkstyle/header/H1.xml  |    7 +
 .../com/puppycrawl/tools/checkstyle/header/H2.java |    9 +
 .../tools/checkstyle/header/H2.properties          |    1 +
 .../com/puppycrawl/tools/checkstyle/header/H2.xml  |    5 +
 .../tools/checkstyle/import-control_broken.xml     |    7 +
 .../tools/checkstyle/import-control_complete.xml   |   16 +
 .../tools/checkstyle/import-control_one-re.xml     |   13 +
 .../tools/checkstyle/import-control_one.xml        |   13 +
 .../tools/checkstyle/import-control_two-re.xml     |   14 +
 .../tools/checkstyle/import-control_two.xml        |   14 +
 .../tools/checkstyle/import-control_wrong.xml      |    7 +
 .../tools/checkstyle/imports/DOMSource.java        |    7 +
 .../checkstyle/imports/InputCustomImportOrder.java |   24 +
 .../imports/InputCustomImportOrder2.java           |   20 +
 .../imports/InputCustomImportOrder3.java           |   20 +
 .../imports/InputCustomImportOrderNoValid.java     |    8 +
 .../imports/InputCustomImportOrderSamePackage.java |   16 +
 .../InputCustomImportOrderSamePackage2.java        |   12 +
 .../imports/InputCustomImportOrderTemp.java        |   18 +
 .../checkstyle/imports/InputDefaultPackage.java    |   25 +
 .../tools/checkstyle/imports/InputImport.java      |  110 +
 .../tools/checkstyle/imports/InputImportBug.java   |   12 +
 .../checkstyle/imports/InputImportControl.java     |   11 +
 .../tools/checkstyle/imports/InputImportOrder.java |   19 +
 .../imports/InputImportOrderCaseInsensitive.java   |   11 +
 .../checkstyle/imports/InputImportOrder_Above.java |   20 +
 .../imports/InputImportOrder_Bottom.java           |   24 +
 .../InputImportOrder_HonorsTokensProperty.java     |    9 +
 .../imports/InputImportOrder_InFlow.java           |   22 +
 ...utImportOrder_NoFailureForRedundantImports.java |    8 +
 .../checkstyle/imports/InputImportOrder_Top.java   |   23 +
 .../checkstyle/imports/InputImportOrder_Under.java |   20 +
 .../imports/InputImportOrder_Wildcard.java         |   12 +
 .../InputImportOrder_WildcardUnspecified.java      |   14 +
 .../tools/checkstyle/imports/package-info.java     |    8 +
 .../tools/checkstyle/indentation/FromGuava.java    |  183 +
 .../tools/checkstyle/indentation/FromGuava2.java   |   55 +
 .../IndentationCorrectIfAndParameterInput.java     |  143 +
 ...tationCorrectWhileDoWhileAndParameterInput.java |  220 ++
 .../indentation/InputAnonymousClasses.java         |   46 +
 .../tools/checkstyle/indentation/InputArrays.java  |   57 +
 .../indentation/InputBraceAdjustment.java          |   27 +
 .../checkstyle/indentation/InputCaseLevel.java     |   30 +
 .../indentation/InputClassesMethods.java           |   60 +
 .../indentation/InputInvalidArrayInitIndent.java   |  112 +
 .../indentation/InputInvalidAssignIndent.java      |   29 +
 .../indentation/InputInvalidBlockIndent.java       |  149 +
 .../indentation/InputInvalidClassDefIndent.java    |  192 ++
 .../indentation/InputInvalidForIndent.java         |   82 +
 .../indentation/InputInvalidIfIndent.java          |  254 ++
 .../indentation/InputInvalidLabelIndent.java       |   42 +
 .../indentation/InputInvalidMethodIndent.java      |  186 ++
 .../indentation/InputInvalidSwitchIndent.java      |   96 +
 .../indentation/InputInvalidTryIndent.java         |   84 +
 .../indentation/InputInvalidWhileIndent.java       |   99 +
 .../tools/checkstyle/indentation/InputLabels.java  |  151 +
 .../tools/checkstyle/indentation/InputMembers.java |  100 +
 .../tools/checkstyle/indentation/InputUseTabs.java |   28 +
 .../checkstyle/indentation/InputUseTwoSpaces.java  |   46 +
 .../InputValidArrayInitDefaultIndent.java          |  105 +
 .../indentation/InputValidArrayInitIndent.java     |  113 +
 .../indentation/InputValidAssignIndent.java        |   62 +
 .../indentation/InputValidBinaryOpIndent.java      |   83 +
 .../indentation/InputValidBlockIndent.java         |  165 +
 .../indentation/InputValidClassDefIndent.java      |  162 +
 .../indentation/InputValidCommaIndent.java         |   42 +
 .../indentation/InputValidDoWhileIndent.java       |   85 +
 .../indentation/InputValidDotIndent.java           |   96 +
 .../indentation/InputValidForIndent.java           |   85 +
 .../checkstyle/indentation/InputValidIfIndent.java |  257 ++
 .../indentation/InputValidInterfaceDefIndent.java  |   30 +
 .../indentation/InputValidLabelIndent.java         |   33 +
 .../indentation/InputValidMethodIndent.java        |  193 ++
 .../indentation/InputValidSwitchIndent.java        |  104 +
 .../indentation/InputValidTryIndent.java           |   84 +
 .../indentation/InputValidTryResourcesIndent.java  |   23 +
 .../indentation/InputValidWhileIndent.java         |   77 +
 .../indentation/InvalidInputThrowsIndent.java      |   21 +
 .../indentation/NewHandlerTestInput.java           |   14 +
 .../puppycrawl/tools/checkstyle/inputHeader.java   |    1 +
 .../com/puppycrawl/tools/checkstyle/java.header    |    4 +
 .../tools/checkstyle/javadoc/InputBadTag.java      |    9 +
 .../tools/checkstyle/javadoc/InputInheritDoc.java  |   49 +
 .../tools/checkstyle/javadoc/InputNoJavadoc.java   |  115 +
 .../checkstyle/javadoc/InputSetterGetter.java      |   54 +
 .../tools/checkstyle/javadoc/TestGenerics.java     |   63 +
 .../checkstyle/javadoc/bothfiles/Ignored.java      |    5 +
 .../checkstyle/javadoc/bothfiles/package-info.java |    1 +
 .../checkstyle/javadoc/bothfiles/package.html      |    1 +
 .../tools/checkstyle/javadoc/pkghtml/Ignored.java  |    5 +
 .../tools/checkstyle/javadoc/pkghtml/package.html  |    1 +
 .../javadoc/pkginfo/annotation/package-info.java   |   12 +
 .../pkginfo/invalidformat/package-info.java        |    4 +
 .../pkginfo/invalidinherit/package-info.java       |    4 +
 .../javadoc/pkginfo/valid/package-info.java        |   11 +
 .../tools/checkstyle/messages_test.properties      |   12 +
 .../tools/checkstyle/messages_test_de.properties   |   12 +
 .../BooleanExpressionComplexityCheckTestInput.java |   34 +
 .../metrics/ClassCouplingCheckTestInput.java       |   36 +
 .../checkstyle/metrics/JavaNCSSCheckTestInput.java |   78 +
 .../naming/AbstractMultisetSetCountTester.java     |   16 +
 .../InputAbbreviationAsWordInTypeNameCheck.java    |  105 +
 ...tionAsWordInTypeNameCheckOverridableMethod.java |   39 +
 .../checkstyle/naming/InputAbstractClassName.java  |   40 +
 .../checkstyle/naming/InputConstantNames.java      |    9 +
 .../tools/checkstyle/naming/InputMemberName.java   |   14 +
 .../checkstyle/naming/InputMemberNameExtended.java |   84 +
 .../checkstyle/naming/InputMethodNameExtra.java    |   16 +
 .../tools/checkstyle/naming/InputTypeName.java     |   11 +
 .../checkstyle/naming/InputTypeParameterName.java  |   62 +
 .../com/puppycrawl/tools/checkstyle/regexp.header  |    5 +
 .../com/puppycrawl/tools/checkstyle/regexp.header1 |    5 +
 .../com/puppycrawl/tools/checkstyle/regexp.header2 |    7 +
 .../tools/checkstyle/suppressions_bad_int.xml      |    7 +
 .../tools/checkstyle/suppressions_multiple.xml     |   10 +
 .../tools/checkstyle/suppressions_no_check.xml     |    7 +
 .../tools/checkstyle/suppressions_no_file.xml      |    7 +
 .../tools/checkstyle/suppressions_none.xml         |    6 +
 .../tools/checkstyle/whitespace/Gh47.java          |    9 +
 .../whitespace/InputDoWhileWhitespaceAround.java   |   11 +
 .../whitespace/InputEmptyLineSeparatorCheck.java   |   93 +
 .../InputEmptyLineSeparatorCheckHeader.java        |   21 +
 .../whitespace/InputEmptyTypesAndCycles.java       |   44 +
 .../whitespace/InputGenericWhitespaceCheck.java    |   65 +
 .../checkstyle/whitespace/InputMethodParamPad.java |   72 +
 .../checkstyle/whitespace/InputSeparatorWrap.java  |   49 +
 .../whitespace/InputSwitchWhitespaceAround.java    |   11 +
 .../whitespace/InputWhitespaceAround.java          |   31 +
 .../checkstyle/whitespace/NoLineWrapBadInput.java  |   27 +
 .../checkstyle/whitespace/NoLineWrapGoodInput.java |   13 +
 .../checkstyle/whitespace/ParenPadWithSpace.java   |   22 +
 src/xdocs/anttask.xml.vm                           |  399 +++
 src/xdocs/availablechecks.xml                      |  750 +++++
 src/xdocs/checks.xml                               |   25 +
 src/xdocs/cmdline.xml.vm                           |  197 ++
 src/xdocs/config.xml                               | 1355 ++++++++
 src/xdocs/config_annotation.xml                    |  420 +++
 src/xdocs/config_blocks.xml                        |  457 +++
 src/xdocs/config_coding.xml                        | 2719 +++++++++++++++
 src/xdocs/config_design.xml                        |  541 +++
 src/xdocs/config_duplicates.xml                    |  143 +
 src/xdocs/config_header.xml                        |  306 ++
 src/xdocs/config_imports.xml                       |  716 ++++
 src/xdocs/config_javadoc.xml                       |  833 +++++
 src/xdocs/config_metrics.xml                       |  498 +++
 src/xdocs/config_misc.xml                          | 1695 ++++++++++
 src/xdocs/config_modifier.xml                      |  183 +
 src/xdocs/config_naming.xml                        |  436 +++
 src/xdocs/config_regexp.xml                        |  311 ++
 src/xdocs/config_reporting.xml                     |   61 +
 src/xdocs/config_sizes.xml                         |  612 ++++
 src/xdocs/config_whitespace.xml                    | 1535 +++++++++
 src/xdocs/contributing.xml                         |  130 +
 src/xdocs/extending.xml                            |   25 +
 src/xdocs/google_style.xml                         | 1301 +++++++
 src/xdocs/index.xml.vm                             |  305 ++
 src/xdocs/property_types.xml                       |  535 +++
 src/xdocs/releasenotes.xml                         | 2697 +++++++++++++++
 src/xdocs/running.xml                              |   30 +
 src/xdocs/style_configs.xml                        |   24 +
 src/xdocs/sun_style.xml                            |   38 +
 src/xdocs/writingchecks.xml.vm                     |  560 ++++
 src/xdocs/writingfilters.xml                       |  133 +
 src/xdocs/writinglisteners.xml.vm                  |  373 +++
 sun_checks.xml                                     |  177 +
 suppressions.xml                                   |   53 +
 1197 files changed, 141645 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6609025
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,18 @@
+#Eclipse project files
+.classpath
+.project
+.settings
+
+#Netbeans project files
+nbactions.xml
+nb-configuration.xml
+
+#Maven build folder
+target
+
+#Idea project files
+checkstyle.iml
+.idea
+
+#Temp files
+*~
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..39409fe
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,13 @@
+language: java
+
+jdk:
+  - openjdk6
+  - openjdk7
+  - oraclejdk7  
+  - oraclejdk8
+  
+install: mvn clean verify site
+
+after_success:
+  - mvn -Ptravis surefire-report:report jacoco:report coveralls:jacoco
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..b1e3f5a
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,504 @@
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+

+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+

+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+

+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+

+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+

+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+

+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+

+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+

+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+

+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/LICENSE.apache20 b/LICENSE.apache20
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/LICENSE.apache20
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/README-Eclipse.txt b/README-Eclipse.txt
new file mode 100644
index 0000000..abda033
--- /dev/null
+++ b/README-Eclipse.txt
@@ -0,0 +1,8 @@
+*How to create Eclispe project for Checkstyle and run Unit Tests:
+
+Note: make sure that "M2E - Maven Integration for Eclipse" plugin is installed in your Eclipse.
+
+1) In Eclipse, do "Import ..." > "Maven / Existing Maven Project".
+If some additional plugins needto be installed , please install them.
+
+2) In "checkstyle" project, select folder "src/test/java" do right mouse click, select "Run As" > "JUnit Test".
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..91fd97a
--- /dev/null
+++ b/README.md
@@ -0,0 +1,63 @@
+[![][travis img]][travis]
+[![][coverage img]][coverage]
+[![][sonar img]][sonar]
+
+
+CHECKSTYLE 
+==========
+
+This directory contains the distribution for checkstyle. It is a tool for
+checking Java source code for adherence to a set of rules.
+
+The latest version can be found at http://checkstyle.sourceforge.net, see "Download" section.
+
+Documentation is available in HTML format, see sub items of "Standard Checks".
+
+Licensing
+=========
+
+This software is licensed under the terms in the file named "LICENSE" in this
+directory.
+
+The software uses the ANTLR package (http://www.antlr.org). Its license terms
+are in the file named "RIGHTS.antlr" in this directory.
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+The software uses the Cli, Logging and Beanutils packages from the
+Apache Commons project (http://commons.apache.org/). The license terms
+of these packages are in the file named "LICENSE.apache20" in this
+directory.
+
+The software uses the Google Guava Libraries
+(https://code.google.com/p/guava-libraries/). The license terms of
+these packages are in the file named "LICENSE.apache20" in this
+directory.
+
+
+Continuous integration
+======================
+Travis: [![][travis img]][travis]
+
+
+Feedback
+========
+
+Please send any feedback to https://groups.google.com/forum/?hl=en#!forum/checkstyle.
+
+Bugs should be reported to the checkstyle bugtracker at
+https://github.com/checkstyle/checkstyle/issues
+
+[travis]:http://travis-ci.org/checkstyle/checkstyle
+[travis img]:https://secure.travis-ci.org/checkstyle/checkstyle.png
+
+[sonar]:http://nemo.sonarqube.org/dashboard/index/com.puppycrawl.tools:checkstyle
+[sonar img]:https://dev.eclipse.org/sonar/images/sonarqube-24x100.png
+
+[coverage]:https://coveralls.io/r/checkstyle/checkstyle
+[coverage img]:https://coveralls.io/repos/checkstyle/checkstyle/badge.png
+
+Thanks for trying out checkstyle!
+
+Oliver Burn
diff --git a/RIGHTS.antlr b/RIGHTS.antlr
new file mode 100644
index 0000000..0fc5570
--- /dev/null
+++ b/RIGHTS.antlr
@@ -0,0 +1,32 @@
+
+SOFTWARE RIGHTS
+$Id: RIGHTS.antlr,v 1.1 2001-06-22 13:11:01 oburn Exp $
+
+ANTLR 1989-2000 Developed by jGuru.com (MageLang Institute), 
+http://www.ANTLR.org  and http://www.jGuru.com
+
+We reserve no legal rights to the ANTLR--it is fully in the
+public domain. An individual or company may do whatever
+they wish with source code distributed with ANTLR or the
+code generated by ANTLR, including the incorporation of
+ANTLR, or its output, into commerical software.
+
+We encourage users to develop software with ANTLR. However,
+we do ask that credit is given to us for developing
+ANTLR. By "credit", we mean that if you use ANTLR or
+incorporate any source code into one of your programs
+(commercial product, research project, or otherwise) that
+you acknowledge this fact somewhere in the documentation,
+research report, etc... If you like ANTLR and have
+developed a nice tool with the output, please mention that
+you developed it using ANTLR. In addition, we ask that the
+headers remain intact in our source code. As long as these
+guidelines are kept, we expect to continue enhancing this
+system and expect to make other tools available as they are
+completed.
+
+The primary ANTLR guy:
+
+Terence Parr
+http://www.jGuru.com
+parrt at jguru.com
diff --git a/ant-phase-compile.xml b/ant-phase-compile.xml
new file mode 100644
index 0000000..1de76f7
--- /dev/null
+++ b/ant-phase-compile.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="phase-compile" default="execute">
+
+  <target name="execute">
+    <propertyfile file="${mvn.project.build.outputDirectory}/checkstylecompilation.properties">
+      <entry key="checkstyle.compile.version" value="${mvn.project.version}"/>
+      <entry key="checkstyle.compile.timestamp" type="date" value="now" pattern="E MMMM dd yyyy, HH:mm z"/>
+    </propertyfile>
+
+    <javadoc sourcefiles="src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java"
+             encoding="iso-8859-1"
+             source="1.5"
+             failonerror="yes">
+      <classpath>
+        <pathelement location="${mvn.project.build.outputDirectory}"/>
+        <pathelement path="${mvn.compile_classpath}"/>
+      </classpath>
+      <doclet name="com.puppycrawl.tools.checkstyle.doclets.TokenTypesDoclet"
+              path="${mvn.project.build.outputDirectory}">
+        <param name="-destfile"
+               value="${mvn.project.build.outputDirectory}/com/puppycrawl/tools/checkstyle/api/tokentypes.properties"
+               />
+      </doclet>
+    </javadoc>
+  </target>
+</project>
diff --git a/ant-phase-verify.xml b/ant-phase-verify.xml
new file mode 100644
index 0000000..fd88be7
--- /dev/null
+++ b/ant-phase-verify.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="phase-package" default="execute">
+
+  <target name="execute">
+    <taskdef name="checkstyle"
+             classname="com.puppycrawl.tools.checkstyle.CheckStyleTask"
+             classpath="${mvn.runtime_classpath}"
+             />
+
+    <delete file="${mvn.project.build.directory}/cachefile" />
+
+    <property name="checkstyle.pattern.todo" value="NOTHingWillMatCH_-"/>
+    <property name="check.config" location="checkstyle_checks.xml"/>
+
+    <checkstyle config="${check.config}"
+                failOnViolation="false"
+                failureProperty="checkstyle.failure.property"
+                >
+      <fileset dir="src"
+               includes="main/**/*.java,main/**/*.properties,xdocs/**/*.xml,test/java/**/*Test.java"
+               excludes="**/Generated*.java,**/gui/*"/>
+      <formatter type="plain"/>
+      <formatter type="xml" toFile="${mvn.project.build.directory}/cs_errors.xml"/>
+      <classpath path="${mvn.runtime_classpath}"/>
+      <property key="checkstyle.cache.file" file="${mvn.project.build.directory}/cachefile"/>
+      <property key="checkstyle.header.file" file="java.header"/>
+      <property key="checkstyle.importcontrol.file" file="import-control.xml"/>
+      <property key="checkstyle.suppressions.file"
+                file="suppressions.xml"/>
+    </checkstyle>
+
+    <fail if="checkstyle.failure.property"
+          message="Checkstyle failed: ${checkstyle.failure.property}"
+          />
+  </target>
+</project>
diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..b43e6f9
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,184 @@
+<project name="checkstyle" default="checkstyle.checkstyle" basedir=".">
+  <!-- Building by ANT is no longer formerly supported. Use Maven instead!! ->
+
+  <!-- set global properties for this build -->
+  <property name="target.dir" value="${basedir}/target" />
+  <property name="version" value="5.4-SNAPSHOT" />
+  <property name="checkstyle.dir"
+            value="src/checkstyle/com/puppycrawl/tools/checkstyle" />
+
+  <!-- override using -Dgui.target= if you wish to load a source file from startup -->
+  <property name="gui.target" value=""/>
+
+  <path id="run.classpath">
+    <pathelement location="${target.dir}/checkstyle-${version}-all.jar"/>
+  </path>
+
+  <target name="checkstyle.checkstyle"
+          description="Runs checkstyle against it's own sources">
+    <taskdef name="checkstyle"
+             classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
+      <classpath refid="run.classpath"/>
+    </taskdef>
+    <delete file="${target.dir}/cachefile" />
+
+    <property name="checkstyle.pattern.todo" value="NOTHingWillMatCH_-"/>
+    <property name="check.config" location="checkstyle_checks.xml"/>
+    <checkstyle config="${check.config}"
+                failOnViolation="false"
+                failureProperty="checkstyle.failure.property"
+                >
+      <fileset dir="src"
+               includes="checkstyle/**/*.java,checkstyle/**/*.properties,xdocs/**/*.xml,tests/**/*Test.java"
+               excludes="**/Generated*.java,**/gui/*"/>
+      <formatter type="plain"/>
+      <formatter type="xml" toFile="${target.dir}/cs_errors.xml"/>
+      <classpath refid="run.classpath"/>
+      <property key="checkstyle.cache.file" file="${target.dir}/cachefile"/>
+      <property key="checkstyle.header.file" file="java.header"/>
+      <property key="checkstyle.importcontrol.file" file="import-control.xml"/>
+      <property key="checkstyle.suppressions.file"
+                file="suppressions.xml"/>
+    </checkstyle>
+
+    <fail if="checkstyle.failure.property"
+          message="Checkstyle failed: ${checkstyle.failure.property}"
+          />
+  </target>
+
+  <!-- Run the GUI -->
+  <target name="run.gui"
+          description="Run the GUI for displaying a tree">
+    <java classname="com.puppycrawl.tools.checkstyle.gui.Main"
+          fork="yes" classpathref="run.classpath">
+          <arg line="${gui.target}"/>
+    </java>
+  </target>
+
+  <target name="validate.xml"
+          description="Validates checkstyle XML file">
+    <xmlvalidate file="checkstyle_checks.xml">
+      <xmlcatalog>
+        <dtd
+          publicId="-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+          location="${checkstyle.dir}/configuration_1_1.dtd"/>
+      </xmlcatalog>
+    </xmlvalidate>
+  </target>
+
+  <target name="checkstyle.sun_checks"
+          description="Runs checkstyle using sun_checks.xml">
+    <taskdef name="checkstyle"
+             classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
+      <classpath refid="run.classpath"/>
+    </taskdef>
+
+    <property name="check.config" location="sun_checks.xml"/>
+    <checkstyle config="${check.config}"
+                failOnViolation="true"
+                >
+      <fileset dir="src/checkstyle"
+               includes="**/*.java,**/*.properties"
+               excludes="**/Generated*.java,**/gui/*"/>
+      <formatter type="plain"/>
+      <classpath refid="run.classpath"/>
+    </checkstyle>
+  </target>
+
+  <target name="checkstyle.style"
+          description="Runs checkstyle against it's own sources to test generation of error reports">
+    <taskdef name="checkstyle"
+             classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
+      <classpath refid="run.classpath"/>
+    </taskdef>
+    <delete file="${target.dir}/cachefile" />
+
+    <property name="checkstyle.pattern.todo" value="NOTHingWillMatCH_-"/>
+    <property name="check.config" location="checkstyle_checks.xml"/>
+    <checkstyle failonviolation="false" config="${check.config}">
+      <fileset dir="src/checkstyle"
+               includes="**/*.java,**/*.properties"
+               excludes="**/Generated*.java,**/gui/*"/>
+      <formatter type="xml" toFile="${target.dir}/cs_errors.xml"/>
+      <classpath refid="run.classpath"/>
+      <property key="checkstyle.cache.file" file="${target.dir}/cachefile"/>
+      <property key="checkstyle.header.file" file="java.header"/>
+      <property key="checkstyle.importcontrol.file" file="import-control.xml"/>
+      <property key="checkstyle.suppressions.file"
+                file="suppressions.xml"/>
+    </checkstyle>
+    <mkdir dir="${target.dir}/style/frames"/>
+    <mkdir dir="${target.dir}/style/noframes"/>
+    <mkdir dir="${target.dir}/style/noframes-sorted"/>
+    <mkdir dir="${target.dir}/style/simple"/>
+    <mkdir dir="${target.dir}/style/csv"/>
+    <mkdir dir="target/style/author"/>
+    <style basedir="${target.dir}"
+           destdir="${target.dir}/style/noframes"
+           includes="cs_errors.xml"
+           style="contrib/checkstyle-noframes.xsl"/>
+    <style basedir="${target.dir}"
+           destdir="${target.dir}/style/noframes-sorted"
+           includes="cs_errors.xml"
+           style="contrib/checkstyle-noframes-sorted.xsl"/>
+    <style basedir="${target.dir}"
+           destdir="${target.dir}/style/frames"
+           includes="cs_errors.xml"
+           style="contrib/checkstyle-frames.xsl"/>
+    <style basedir="${target.dir}"
+           destdir="${target.dir}/style/simple"
+           includes="cs_errors.xml"
+           style="contrib/checkstyle-simple.xsl"/>
+    <style out="${target.dir}/style/csv/report-csv.txt"
+           in="${target.dir}/cs_errors.xml"
+           style="contrib/checkstyle-csv.xsl"/>
+    <style basedir="target"
+           destdir="target/style/author"
+           includes="cs_errors.xml"
+           style="contrib/checkstyle-author.xsl"/>
+  </target>
+
+  <?ignore
+  <!-- A GRAVEYARD OF IDEAS BELOW -->
+
+  <!-- runs the command line version on a file -->
+  <target name="run.checkstyle"
+          description="Runs the command line version on a file">
+    <java classname="com.puppycrawl.tools.checkstyle.Main"
+          fork="yes"
+          dir="."
+          classpathref="run.classpath">
+      <sysproperty key="checkstyle.allow.tabs" value="yes"/>
+      <arg value="-c"/>
+      <arg file="checkstyle_checks.xml"/>
+      <arg value="src/testinputs/com/puppycrawl/tools/checkstyle/InputSimple.java"/>
+    </java>
+    <java classname="com.puppycrawl.tools.checkstyle.Main"
+          fork="yes"
+          dir="."
+          classpathref="run.classpath">
+      <arg value="-c"/>
+      <arg file="checkstyle_checks.xml"/>
+      <arg value="-r"/>
+      <arg file="src/checkstyle/com/puppycrawl/tools/checkstyle/api"/>
+    </java>
+  </target>
+
+  <target name="checkstyle.run" depends="compile.checkstyle"
+          description="Runs checkstyle.">
+    <taskdef name="checkstyle"
+             classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
+      <classpath refid="run.classpath"/>
+    </taskdef>
+    <delete file="${target.dir}/cachefile" />
+
+    <property name="checkstyle.pattern.todo" value="NOTHingWillMatCH_-"/>
+    <property name="check.config" location="checkstyle_checks.xml"/>
+    <checkstyle config="${custom.config}" file="${file.to.check}">
+      <formatter type="plain"/>
+      <formatter type="xml" toFile="${target.dir}/cs_errors.xml"/>
+      <classpath refid="run.classpath"/>
+    </checkstyle>
+  </target>
+  ?>
+</project>
diff --git a/checkstyle_checks.xml b/checkstyle_checks.xml
new file mode 100644
index 0000000..614277f
--- /dev/null
+++ b/checkstyle_checks.xml
@@ -0,0 +1,220 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+          "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
+          "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+
+<module name="Checker">
+  <!--
+      If you set the basedir property below, then all reported file
+      names will be relative to the specified directory. See
+      http://checkstyle.sourceforge.net/5.x/config.html#Checker
+
+      <property name="basedir" value="${basedir}"/>
+  -->
+
+  <metadata name="com.atlas-sw.eclipse" value="I like Sydney"/>
+
+  <property name="severity" value="error"/>
+
+  <module name="SuppressionFilter">
+    <property name="file" value="${checkstyle.suppressions.file}"/>
+  </module>
+
+  <module name="JavadocPackage">
+    <property name="allowLegacy" value="false"/>
+  </module>
+
+  <module name="Translation">
+    <property name="severity" value="ignore"/>
+  </module>
+
+  <module name="FileTabCharacter">
+    <property name="eachLine" value="false"/>
+  </module>
+
+  <module name="FileLength">
+    <property name="fileExtensions" value="java"/>
+  </module>
+
+  <module name="NewlineAtEndOfFile"/>
+
+  <module name="Header">
+    <property name="headerFile" value="${checkstyle.header.file}"/>
+    <property name="fileExtensions" value="java"/>
+    <property name="id" value="header"/>
+  </module>
+
+  <module name="RegexpSingleline">
+    <property name="format" value="\s+$"/>
+    <property name="minimum" value="0"/>
+    <property name="maximum" value="0"/>
+  </module>
+
+  <module name="TreeWalker">
+    <property name="tabWidth" value="4"/>
+
+    <module name="AvoidStarImport"/>
+    <module name="ConstantName"/>
+    <module name="EmptyBlock"/>
+    <module name="EmptyForIteratorPad"/>
+    <module name="EqualsHashCode"/>
+    <module name="OneStatementPerLine"/>
+
+    <!-- module name="IllegalCatch"/ -->
+    <module name="ImportControl">
+      <property name="file" value="${checkstyle.importcontrol.file}"/>
+    </module>
+    <module name="IllegalImport"/>
+    <module name="IllegalInstantiation"/>
+    <module name="IllegalThrows"/>
+    <module name="InnerAssignment"/>
+    <module name="JavadocType">
+      <property name="authorFormat" value="\S"/>
+    </module>
+    <module name="JavadocMethod">
+      <property name="allowUndeclaredRTE" value="true"/>
+      <property name="allowThrowsTagsForSubclasses" value="true"/>
+      <property name="allowMissingPropertyJavadoc" value="true"/>
+    </module>
+    <module name="JavadocVariable"/>
+    <module name="JavadocStyle">
+      <property name="scope" value="public"/>
+    </module>
+
+    <module name="LeftCurly">
+      <property name="option" value="nl"/>
+      <property name="tokens" value="CLASS_DEF"/>
+      <property name="tokens" value="CTOR_DEF"/>
+      <property name="tokens" value="INTERFACE_DEF"/>
+      <property name="tokens" value="METHOD_DEF"/>
+    </module>
+    <module name="LeftCurly">
+      <property name="option" value="nlow"/>
+      <property name="tokens" value="LITERAL_CATCH"/>
+      <property name="tokens" value="LITERAL_DO"/>
+      <property name="tokens" value="LITERAL_ELSE"/>
+      <property name="tokens" value="LITERAL_FINALLY"/>
+      <property name="tokens" value="LITERAL_FOR"/>
+      <property name="tokens" value="LITERAL_IF"/>
+      <property name="tokens" value="LITERAL_SWITCH"/>
+      <property name="tokens" value="LITERAL_SYNCHRONIZED"/>
+      <property name="tokens" value="LITERAL_TRY"/>
+      <property name="tokens" value="LITERAL_WHILE"/>
+    </module>
+
+    <module name="OuterTypeNumber"/>
+    <module name="LineLength">
+      <property name="max" value="100"/>
+      <property name="ignorePattern" value="^ *\* *[^ ]+$"/>
+    </module>
+    <module name="MethodCount">
+      <property name="maxTotal" value="30"/>
+    </module>
+
+    <module name="LocalFinalVariableName"/>
+    <module name="LocalVariableName"/>
+    <module name="MemberName">
+      <property name="format" value="^m[A-Z][a-zA-Z0-9]*$"/>
+    </module>
+    <module name="MethodLength"/>
+    <module name="MethodName"/>
+    <module name="MethodParamPad"/>
+    <module name="ModifierOrder"/>
+    <module name="NeedBraces"/>
+    <module name="NoWhitespaceAfter">
+      <property name="tokens" value="ARRAY_INIT"/>
+      <property name="tokens" value="BNOT"/>
+      <property name="tokens" value="DEC"/>
+      <property name="tokens" value="DOT"/>
+      <property name="tokens" value="INC"/>
+      <property name="tokens" value="LNOT"/>
+      <property name="tokens" value="UNARY_MINUS"/>
+      <property name="tokens" value="UNARY_PLUS"/>
+    </module>
+
+    <module name="NoWhitespaceBefore"/>
+    <module name="NoWhitespaceBefore">
+      <property name="tokens" value="DOT"/>
+      <property name="allowLineBreaks" value="true"/>
+    </module>
+
+    <module name="OperatorWrap"/>
+    <module name="OperatorWrap">
+      <property name="tokens" value="ASSIGN"/>
+      <property name="tokens" value="DIV_ASSIGN"/>
+      <property name="tokens" value="PLUS_ASSIGN"/>
+      <property name="tokens" value="MINUS_ASSIGN"/>
+      <property name="tokens" value="STAR_ASSIGN"/>
+      <property name="tokens" value="MOD_ASSIGN"/>
+      <property name="tokens" value="SR_ASSIGN"/>
+      <property name="tokens" value="BSR_ASSIGN"/>
+      <property name="tokens" value="SL_ASSIGN"/>
+      <property name="tokens" value="BXOR_ASSIGN"/>
+      <property name="tokens" value="BOR_ASSIGN"/>
+      <property name="tokens" value="BAND_ASSIGN"/>
+      <property name="option" value="eol"/>
+    </module>
+    <module name="PackageName"/>
+    <module name="ParameterName">
+      <property name="format" value="^a[A-Z][a-zA-Z0-9]*$"/>
+    </module>
+    <module name="ParameterNumber">
+      <property name="max" value="9"/>
+      <property name="id" value="paramNum"/>
+    </module>
+    <module name="ParenPad"/>
+    <module name="TypecastParenPad"/>
+    <module name="RedundantImport"/>
+    <module name="RedundantModifier"/>
+    <module name="RightCurly">
+      <property name="option" value="alone"/>
+    </module>
+    <module name="SimplifyBooleanExpression"/>
+    <module name="SimplifyBooleanReturn"/>
+    <module name="StaticVariableName">
+      <property name="format" value="^s[A-Z][a-zA-Z0-9]*$"/>
+    </module>
+    <module name="TypeName"/>
+    <module name="UnusedImports"/>
+    <module name="UpperEll"/>
+    <module name="VisibilityModifier"/>
+    <module name="WhitespaceAfter"/>
+    <module name="WhitespaceAround"/>
+    <module name="GenericWhitespace"/>
+    <module name="FinalClass"/>
+    <module name="MissingSwitchDefault"/>
+    <module name="MagicNumber"/>
+    <module name="Indentation">
+      <property name="basicOffset" value="4"/>
+      <property name="braceAdjustment" value="0"/>
+      <property name="caseIndent" value="0"/>
+    </module>
+    <module name="ArrayTrailingComma"/>
+    <module name="FinalLocalVariable"/>
+    <module name="EqualsAvoidNull"/>
+    <module name="ParameterAssignment"/>
+
+    <!-- Generates quite a few errors -->
+    <module name="CyclomaticComplexity">
+      <property name="severity" value="ignore"/>
+    </module>
+
+    <module name="NestedForDepth">
+      <property name="max" value="2"/>
+    </module>
+    <module name="NestedIfDepth">
+      <property name="max" value="3"/>
+    </module>
+    <module name="NestedTryDepth"/>
+    <module name="ExplicitInitialization"/>
+    <module name="AnnotationUseStyle"/>
+    <module name="MissingDeprecated"/>
+    <module name="MissingOverride">
+      <property name="javaFiveCompatibility" value="true"/>
+    </module>
+    <module name="PackageAnnotation"/>
+    <module name="SuppressWarnings"/>
+    <module name="OuterTypeFilename"/>
+    <module name="HideUtilityClassConstructor"/>
+  </module>
+</module>
diff --git a/config/assembly-bin.xml b/config/assembly-bin.xml
new file mode 100644
index 0000000..dea5d57
--- /dev/null
+++ b/config/assembly-bin.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd"
+          >
+  <id>bin</id>
+  <formats>
+    <format>tar.gz</format>
+    <format>zip</format>
+  </formats>
+
+  <includeSiteDirectory>true</includeSiteDirectory>
+
+  <files>
+    <file>
+      <source>${project.build.directory}/${project.name}-${project.version}-all.jar</source>
+    </file>
+  </files>
+  <fileSets>
+    <fileSet>
+      <useDefaultExcludes>true</useDefaultExcludes>
+      <includes>
+        <include>checkstyle_checks.xml</include>
+        <include>import-control.xml</include>
+        <include>sun_checks.xml</include>
+        <include>suppressions.xml</include>
+        <include>contrib/**</include>
+        <include>java.header</include>
+        <include>LICENSE*</include>
+        <include>README</include>
+        <include>RIGHTS.antlr</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+  
+  <dependencySets>
+    <dependencySet>
+      <useProjectArtifact>true</useProjectArtifact>
+    </dependencySet>
+  </dependencySets>
+</assembly>
diff --git a/config/assembly-src.xml b/config/assembly-src.xml
new file mode 100644
index 0000000..9bedfff
--- /dev/null
+++ b/config/assembly-src.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd"
+          >
+  <id>src</id>
+  <formats>
+    <format>tar.gz</format>
+    <format>zip</format>
+  </formats>
+
+  <fileSets>
+    <fileSet>
+      <useDefaultExcludes>true</useDefaultExcludes>
+      <excludes>
+        <exclude>target/**</exclude>
+        <exclude>*.launch</exclude>
+        <exclude>nbactions.xml</exclude>
+        <exclude>lib/**</exclude>
+      </excludes>
+    </fileSet>
+  </fileSets>
+</assembly>
diff --git a/contrib/JavadocCheckDefault.java b/contrib/JavadocCheckDefault.java
new file mode 100644
index 0000000..c96a9a2
--- /dev/null
+++ b/contrib/JavadocCheckDefault.java
@@ -0,0 +1,62 @@
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Tool that generates Javadoc description of the default tokens for a Check.
+ * @author Rick Giles
+ * @version 27-Nov-2002
+ */
+public class JavadocCheckDefault
+{
+
+    private static void usage()
+    {
+        System.out.println("Usage: java JavadocCheckDefault check element");
+        System.exit(0);
+    }
+    
+    public static void main(String[] args)
+    {        
+        if (args.length < 2) {
+            usage();
+        }
+        final String header =
+            " * <p> By default the check will check the following "
+                + args[1] + ":\n";
+        final String footer = ".\n * </p>\n";
+        final String prefix = " *  {@link TokenTypes#";
+
+        try {
+            final Class clazz = Class.forName(args[0]);
+            final Check check = (Check) clazz.newInstance();            
+            final int[] defaultTokens = check.getDefaultTokens();
+            if (defaultTokens.length > 0) {
+                final StringBuffer buf = new StringBuffer();
+                buf.append(header);
+                final ArrayList tokenNames = new ArrayList();
+                for (int i = 0; i < defaultTokens.length; i++) {
+                    tokenNames.add(TokenTypes.getTokenName(defaultTokens[i]));
+                }
+                Collections.sort(tokenNames);
+                final Iterator it = tokenNames.iterator();
+                String token = (String) it.next();
+                buf.append(prefix + token + " " + token + "}");
+                while (it.hasNext()) {
+                    token = (String) it.next();
+                    buf.append(",\n" + prefix + token + " " + token + "}");
+                }
+                buf.append(footer);
+                System.out.println(buf);
+            }
+        }
+        catch (Exception ex) {
+            ex.printStackTrace();
+            System.exit(0);
+        }
+    }
+}
diff --git a/contrib/bcel/docs/BCELConfig.xml b/contrib/bcel/docs/BCELConfig.xml
new file mode 100644
index 0000000..14c0345
--- /dev/null
+++ b/contrib/bcel/docs/BCELConfig.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+<module name="Checker">
+    <metadata name="com.atlas-sw.eclipse" value="I like Sydney"/>
+    <property name="severity" value="error"/>
+    
+    <module name="bcel.ClassFileSet">
+        <module name="bcel.checks.UnusedMethod">
+        </module> 
+        <module name="bcel.checks.UnreadPrivateField">
+        </module>
+    </module>
+</module>
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/AbstractCheckVisitor.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/AbstractCheckVisitor.java
new file mode 100644
index 0000000..ab059d7
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/AbstractCheckVisitor.java
@@ -0,0 +1,157 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel;
+
+import java.util.Set;
+
+import com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter;
+import com.puppycrawl.tools.checkstyle.api.LocalizedMessage;
+import com.puppycrawl.tools.checkstyle.api.LocalizedMessages;
+import java.util.HashMap;
+import org.apache.bcel.classfile.JavaClass;
+
+/**
+ * Abstract class for checks with visitors.
+ * @author Rick Giles
+ */
+//TODO: Refactor with class Check
+public abstract class AbstractCheckVisitor
+    extends AbstractViolationReporter
+    implements IObjectSetVisitor,
+    IDeepVisitor
+{
+    /** the object for collecting messages. */
+    private HashMap mMessageMap; // <String fileName, LocalizedMessages msg>
+    /** Filename for when no file can be found */
+    private String NO_FILE = "File not available";
+
+    /** @see com.puppycrawl.tools.checkstyle.bcel.IDeepVisitor */
+    public org.apache.bcel.classfile.Visitor getClassFileVisitor()
+    {
+        return new EmptyClassFileVisitor();
+    }
+
+    /**
+     * @see com.puppycrawl.tools.checkstyle.bcel.IDeepVisitor
+     */
+    public org.apache.bcel.generic.Visitor getGenericVisitor()
+    {
+        return new EmptyGenericVisitor();
+    }
+
+     /**
+     * Initialse the check. This is the time to verify that the check has
+     * everything required to perform it job.
+     */
+    public void init()
+    {
+    }
+
+    /**
+     * Destroy the check. It is being retired from service.
+     */
+    public void destroy()
+    {
+    }
+
+    /**
+     * Set the global object used to collect messages.
+     * @param aMessages the messages to log with
+     */
+    public final void setMessageMap(HashMap aMessageMap)
+    {
+        mMessageMap = aMessageMap;
+    }
+
+    /**
+     * Log an error message.
+     *
+     * @param aLine the line number where the error was found
+     * @param aKey the message that describes the error
+     * @param aArgs the details of the message
+     *
+     * @see java.text.MessageFormat
+     */
+    protected final void log(JavaClass javaClass, int aLine, String aKey, Object aArgs[])
+    {
+        // Should this be on the .java file instead of the .class file?
+        final String file = javaClass.getFileName();
+        log(file, aLine, aKey, aArgs);
+    }
+
+    /**
+     * Log an error message.
+     *
+     * @param aLine the line number where the error was found
+     * @param aKey the message that describes the error
+     * @param aArgs the details of the message
+     *
+     * @see java.text.MessageFormat
+     */
+    private final void log(String fileName, int aLine, String aKey, Object aArgs[])
+    {
+        LocalizedMessages localizedMessages = (LocalizedMessages) mMessageMap.get(fileName);
+        if (localizedMessages == null) {
+            localizedMessages = new LocalizedMessages();
+            mMessageMap.put(fileName, localizedMessages);
+        }
+        localizedMessages.add(
+            new LocalizedMessage(
+                aLine,
+                getMessageBundle(),
+                aKey,
+                aArgs,
+                getSeverityLevel(),
+                this.getClass()));
+    }
+
+    /**
+     * Log an error message.
+     *
+     * @param aLine the line number where the error was found
+     * @param aKey the message that describes the error
+     * @param aArgs the details of the message
+     *
+     * @see java.text.MessageFormat
+     */
+    protected final void log(int aLine, String aKey, Object aArgs[])
+    {
+        log(NO_FILE, aLine, aKey, aArgs);
+    }
+
+    /**
+     * @see com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
+     */
+    protected void log(int aLine, int aCol, String aKey, Object[] aArgs)
+    {
+          // Ignore the column, it is not relevant for .class files
+          log(aLine, aKey, aArgs);
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor */
+    public void visitObject(Object aObject)
+    {
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor */
+    public void leaveObject(Object aObject)
+    {
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor */
+    public void visitSet(Set aJavaClassDefs)
+    {
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor */
+    public void leaveSet(Set aJavaClassDefs)
+    {
+    }
+
+    /**
+     * Gets the deep BCEL visitor.
+     * @return the deep BCEL visitor for this check.
+     */
+    public abstract IDeepVisitor getVisitor();
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/ClassFileSetCheck.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/ClassFileSetCheck.java
new file mode 100644
index 0000000..1ff005a
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/ClassFileSetCheck.java
@@ -0,0 +1,317 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+import org.apache.bcel.Repository;
+import org.apache.bcel.classfile.ClassParser;
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.classfile.Visitor;
+import org.apache.bcel.util.ClassLoaderRepository;
+import com.puppycrawl.tools.checkstyle.DefaultContext;
+import com.puppycrawl.tools.checkstyle.ModuleFactory;
+import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import com.puppycrawl.tools.checkstyle.api.Context;
+import com.puppycrawl.tools.checkstyle.api.LocalizedMessage;
+import com.puppycrawl.tools.checkstyle.api.LocalizedMessages;
+
+/**
+ * Checks a set of class files using BCEL
+ * @author Rick Giles
+ */
+//TODO: Refactor with AbstractFileSetCheck and TreeWalker
+public class ClassFileSetCheck
+    extends AbstractFileSetCheck
+    implements IObjectSetVisitor
+{
+    /** visitors for BCEL parse tree walk */
+    private final Set mTreeVisitors = new HashSet();
+
+    /** all the registered checks */
+    private final Set mAllChecks = new HashSet();
+
+    /** all visitors for IObjectSetVisitor visits */
+    private final Set mObjectSetVisitors = new HashSet();
+
+    /** class loader to resolve classes with. **/
+    private ClassLoader mClassLoader;
+
+    /** context of child components */
+    private Context mChildContext;
+
+    /** a factory for creating submodules (i.e. the Checks) */
+    private ModuleFactory mModuleFactory;
+
+    /** Error messages */
+    HashMap mMessageMap = new HashMap();
+
+    /**
+     * Creates a new <code>ClassFileSetCheck</code> instance.
+     * Initializes the acceptable file extensions.
+     */
+    public ClassFileSetCheck()
+    {
+        setFileExtensions(new String[]{"class", "jar", "zip"});
+    }
+
+    /**
+     * Stores the class loader and makes it the Repository's class loader.
+     * @param aClassLoader class loader to resolve classes with.
+     */
+    public void setClassLoader(ClassLoader aClassLoader)
+    {
+        Repository.setRepository(new ClassLoaderRepository(aClassLoader));
+        mClassLoader = aClassLoader;
+    }
+
+    /**
+     * Sets the module factory for creating child modules (Checks).
+     * @param aModuleFactory the factory
+     */
+    public void setModuleFactory(ModuleFactory aModuleFactory)
+    {
+        mModuleFactory = aModuleFactory;
+    }
+
+    /**
+     * Instantiates, configures and registers a Check that is specified
+     * in the provided configuration.
+     * @see com.puppycrawl.tools.checkstyle.api.AutomaticBean
+     */
+    public void setupChild(Configuration aChildConf)
+        throws CheckstyleException
+    {
+        // TODO: improve the error handing
+        final String name = aChildConf.getName();
+        final Object module = mModuleFactory.createModule(name);
+        if (!(module instanceof AbstractCheckVisitor)) {
+            throw new CheckstyleException(
+                "ClassFileSet is not allowed as a parent of " + name);
+        }
+        final AbstractCheckVisitor c = (AbstractCheckVisitor) module;
+        c.contextualize(mChildContext);
+        c.configure(aChildConf);
+        c.init();
+
+        registerCheck(c);
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.Configurable */
+    public void finishLocalSetup()
+    {
+        DefaultContext checkContext = new DefaultContext();
+        checkContext.add("classLoader", mClassLoader);
+        checkContext.add("messageMap", mMessageMap);
+        checkContext.add("severity", getSeverity());
+
+        mChildContext = checkContext;
+    }
+
+    /**
+     * Register a check.
+     * @param aCheck the check to register
+     */
+    private void registerCheck(AbstractCheckVisitor aCheck)
+    {
+        mAllChecks.add(aCheck);
+    }
+
+    /**
+     * @see com.puppycrawl.tools.checkstyle.api.FileSetCheck
+     */
+    public void process(File[] aFiles)
+    {
+        registerVisitors();
+
+        // get all the JavaClasses in the files
+        final Set javaClasses = extractJavaClasses(aFiles);
+
+        visitSet(javaClasses);
+
+        // walk each Java class parse tree
+        final JavaClassWalker walker = new JavaClassWalker();
+        walker.setVisitor(getTreeVisitor());
+        final Iterator it = javaClasses.iterator();
+        while (it.hasNext()) {
+            final JavaClass clazz = (JavaClass) it.next();
+            visitObject(clazz);
+            walker.walk(clazz);
+            leaveObject(clazz);
+        }
+
+        leaveSet(javaClasses);
+        fireErrors();
+    }
+
+    /**
+     * Gets the visitor for a parse tree walk.
+     * @return the visitor for a parse tree walk.
+     */
+    private Visitor getTreeVisitor()
+    {
+        return new VisitorSet(mTreeVisitors);
+    }
+
+    /**
+     * Registers all the visitors for IObjectSetVisitor visits, and for
+     * tree walk visits.
+     */
+    private void registerVisitors()
+    {
+        mObjectSetVisitors.addAll(mAllChecks);
+        final Iterator it = mAllChecks.iterator();
+        while (it.hasNext()) {
+            final AbstractCheckVisitor check = (AbstractCheckVisitor) it.next();
+            final IDeepVisitor visitor = check.getVisitor();
+            mObjectSetVisitors.add(visitor);
+            mTreeVisitors.add(visitor);
+        }
+    }
+
+    /**
+     * Gets the set of all visitors for all the checks.
+     * @return the set of all visitors for all the checks.
+     */
+    private Set getObjectSetVisitors()
+    {
+        return mObjectSetVisitors;
+    }
+
+    /**
+     * Gets the set of all JavaClasses within a set of Files.
+     * @param aFiles the set of files to extract from.
+     * @return the set of all JavaClasses within aFiles.
+     */
+    private Set extractJavaClasses(File[] aFiles)
+    {
+        final Set result = new HashSet();
+        final File[] classFiles = filter(aFiles);
+        // get Java classes from each filtered file
+        for (int i = 0; i < classFiles.length; i++) {
+            try {
+                final Set extracted = extractJavaClasses(classFiles[i]);
+                result.addAll(extracted);
+            }
+            catch (IOException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+        }
+        return result;
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor */
+    public void visitSet(Set aSet)
+    {
+        // register the JavaClasses in the Repository
+        Repository.clearCache();
+        Iterator it = aSet.iterator();
+        while (it.hasNext()) {
+            final JavaClass javaClass = (JavaClass) it.next();
+            Repository.addClass(javaClass);
+        }
+
+        // visit the visitors
+        it = getObjectSetVisitors().iterator();
+        while (it.hasNext()) {
+            final IObjectSetVisitor visitor = (IObjectSetVisitor) it.next();
+            visitor.visitSet(aSet);
+        }
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor */
+    public void visitObject(Object aObject)
+    {
+        final Iterator it = getObjectSetVisitors().iterator();
+        while (it.hasNext()) {
+            final IObjectSetVisitor visitor = (IObjectSetVisitor) it.next();
+            visitor.visitObject(aObject);
+        }
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor */
+    public void leaveObject(Object aObject)
+    {
+        final Iterator it = getObjectSetVisitors().iterator();
+        while (it.hasNext()) {
+            final IObjectSetVisitor visitor = (IObjectSetVisitor) it.next();
+            visitor.leaveObject(aObject);
+        }
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor */
+    public void leaveSet(Set aSet)
+    {
+        final Iterator it = getObjectSetVisitors().iterator();
+        while (it.hasNext()) {
+            final IObjectSetVisitor visitor = (IObjectSetVisitor) it.next();
+            visitor.leaveSet(aSet);
+        }
+    }
+
+    /**
+     * Extracts the JavaClasses from .class, .zip, and .jar files.
+     * @param aFile the file to extract from.
+     * @return the set of JavaClasses from aFile.
+     * @throws IOException if there is an error.
+     */
+    private Set extractJavaClasses(File aFile)
+        throws IOException
+    {
+        final Set result = new HashSet();
+        final String fileName = aFile.getPath();
+        if (fileName.endsWith(".jar") || fileName.endsWith(".zip")) {
+            final ZipFile zipFile = new ZipFile(fileName);
+            final Enumeration entries = zipFile.entries();
+            while (entries.hasMoreElements()) {
+                final ZipEntry entry = (ZipEntry) entries.nextElement();
+                final String entryName = entry.getName();
+                if (entryName.endsWith(".class")) {
+                    final InputStream in = zipFile.getInputStream(entry);
+                    final JavaClass javaClass =
+                        new ClassParser(in, entryName).parse();
+                    result.add(javaClass);
+                }
+            }
+        }
+        else {
+            final JavaClass javaClass = new ClassParser(fileName).parse();
+            result.add(javaClass);
+        }
+        return result;
+    }
+
+    /**
+     * Notify all listeners about the errors in a file.
+     * Calls <code>MessageDispatcher.fireErrors()</code> with
+     * all logged errors and than clears errors' list.
+     */
+    private void fireErrors()
+    {
+        Set keys = mMessageMap.keySet();
+        Iterator iter = keys.iterator();
+        while (iter.hasNext()) {
+            String key = (String) iter.next();
+            getMessageDispatcher().fireFileStarted(key);
+            LocalizedMessages localizedMessages = (LocalizedMessages) mMessageMap.get(key);
+            final LocalizedMessage[] errors = localizedMessages.getMessages();
+            localizedMessages.reset();
+            getMessageDispatcher().fireErrors(key, errors);
+            getMessageDispatcher().fireFileFinished(key);
+        }
+    }
+
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/EmptyClassFileVisitor.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/EmptyClassFileVisitor.java
new file mode 100644
index 0000000..8a89c5d
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/EmptyClassFileVisitor.java
@@ -0,0 +1,17 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel;
+
+/**
+ * Default classfile visitor.
+ * @author Rick Giles
+ */
+public class EmptyClassFileVisitor
+    extends org.apache.bcel.classfile.EmptyVisitor
+{
+    /** restrict client creation */
+    protected EmptyClassFileVisitor()
+    {
+    }
+}
\ No newline at end of file
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/EmptyDeepVisitor.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/EmptyDeepVisitor.java
new file mode 100644
index 0000000..cbb7121
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/EmptyDeepVisitor.java
@@ -0,0 +1,86 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel;
+
+import java.util.Set;
+
+
+/**
+ * Default deep visitor
+ * @author Rick Giles
+ * @version 17-Jun-2003
+ */
+public class EmptyDeepVisitor
+    implements IDeepVisitor
+{
+    /** the classfile visitor */
+    private org.apache.bcel.classfile.Visitor mClassFileVisitor =
+        new EmptyClassFileVisitor();
+
+    /** the generic visitor */
+    private org.apache.bcel.generic.Visitor mGenericVisitor =
+        new EmptyGenericVisitor();
+
+    /**
+     * @see com.puppycrawl.tools.checkstyle.bcel.IDeepVisitor
+     */
+    public org.apache.bcel.classfile.Visitor getClassFileVisitor()
+    {
+        return mClassFileVisitor;
+    }
+
+    /**
+     * @see com.puppycrawl.tools.checkstyle.bcel.IDeepVisitor
+     */
+    public org.apache.bcel.generic.Visitor getGenericVisitor()
+    {
+        return mGenericVisitor;
+    }
+
+    /**
+     * Sets the classfile visitor.
+     * @param aVisitor the classfile visitor.
+     */
+    public void setClassFileVisitor(org.apache.bcel.classfile.Visitor aVisitor)
+    {
+        mClassFileVisitor = aVisitor;
+    }
+
+    /**
+     * Sets the generic visitor.
+     * @param aVisitor the generic visitor.
+     */
+    public void setGenericVisitor(org.apache.bcel.generic.Visitor aVisitor)
+    {
+        mGenericVisitor = aVisitor;
+    }
+
+    /**
+     * @see com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor
+     */
+    public void visitObject(Object aObject)
+    {
+    }
+
+    /**
+     * @see com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor
+     */
+    public void leaveObject(Object aObject)
+    {
+    }
+
+    /**
+     * @see com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor
+     */
+    public void visitSet(Set aSet)
+    {
+    }
+
+    /**
+     * @see com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor
+     */
+    public void leaveSet(Set aSet)
+    {
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/EmptyGenericVisitor.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/EmptyGenericVisitor.java
new file mode 100644
index 0000000..71be8c6
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/EmptyGenericVisitor.java
@@ -0,0 +1,18 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel;
+
+/**
+ * Default generic visitor
+ * @author Rick Giles
+ */
+public class EmptyGenericVisitor
+    extends org.apache.bcel.generic.EmptyVisitor
+{
+    /** Restrict client creation */
+    protected EmptyGenericVisitor()
+    {
+    }
+}
+
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/IDeepVisitor.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/IDeepVisitor.java
new file mode 100644
index 0000000..71c7251
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/IDeepVisitor.java
@@ -0,0 +1,25 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel;
+
+/**
+ * Deep visitor for classfile and generic traversals. A ClassFile traversal
+ * visits all classfile and all generic nodes.
+ * @author Rick Giles
+ */
+public interface IDeepVisitor
+    extends IObjectSetVisitor
+{
+    /**
+     * Returns the classfile visitor.
+     * @return the classfile visitor.
+     */
+    org.apache.bcel.classfile.Visitor getClassFileVisitor();
+
+    /**
+     * Returns the generic visitor.
+     * @return the generic visitor.
+     */
+    org.apache.bcel.generic.Visitor getGenericVisitor();
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/IObjectSetVisitor.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/IObjectSetVisitor.java
new file mode 100644
index 0000000..1e492ef
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/IObjectSetVisitor.java
@@ -0,0 +1,37 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel;
+
+import java.util.Set;
+
+/**
+ * Object set visitor for a general set.
+ * @author Rick Giles
+ */
+public interface IObjectSetVisitor
+{
+    /**
+     * Visit a set itself.
+     * @param aSet the set.
+     */
+    void visitSet(Set aSet);
+
+    /**
+     * Finish the visit of a set.
+     * @param aSet the set.
+     */
+    void leaveSet(Set aSet);
+
+    /**
+     * Visit an object. Normally this is an object of the set.
+     * @param aObject the object.
+     */
+    void visitObject(Object aObject);
+
+    /**
+     * Finish the visit an object. Normally this is an object of the set.
+     * @param aObject the object.
+     */
+    void leaveObject(Object aObject);
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/JavaClassWalker.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/JavaClassWalker.java
new file mode 100644
index 0000000..24666ad
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/JavaClassWalker.java
@@ -0,0 +1,40 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel;
+
+import org.apache.bcel.classfile.DescendingVisitor;
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.classfile.Visitor;
+
+/**
+ * Walks a JavaClass parse tree.
+ * @author Rick Giles
+ * @version 15-Jun-2003
+ */
+public final class JavaClassWalker
+{
+    /** visitor to be accepted during a traversal */
+    private Visitor mVisitor = new EmptyClassFileVisitor();
+
+    /**
+     * Sets a visitor to be accepted during a traversal.
+     * @param aVisitor the visitor to be accepted during a traversal.
+     */
+    public void setVisitor(Visitor aVisitor)
+    {
+        mVisitor = aVisitor;
+    }
+
+    /**
+     * Traverses a JavaClass parse tree and accepts all registered
+     * visitors.
+     * @param aJavaClass the root of the tree.
+     */
+    public void walk(JavaClass aJavaClass)
+    {
+        DescendingVisitor visitor =
+            new DescendingVisitor(aJavaClass, mVisitor);
+        aJavaClass.accept(visitor);
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/ReferenceVisitor.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/ReferenceVisitor.java
new file mode 100644
index 0000000..f2e9b7f
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/ReferenceVisitor.java
@@ -0,0 +1,194 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.bcel.classfile.ConstantPool;
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.generic.ConstantPoolGen;
+import org.apache.bcel.generic.GETFIELD;
+import org.apache.bcel.generic.GETSTATIC;
+import org.apache.bcel.generic.INVOKESPECIAL;
+import org.apache.bcel.generic.INVOKESTATIC;
+import org.apache.bcel.generic.INVOKEVIRTUAL;
+import org.apache.bcel.generic.PUTFIELD;
+import org.apache.bcel.generic.PUTSTATIC;
+
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import com.puppycrawl.tools.checkstyle.bcel.classfile.JavaClassDefinition;
+import com.puppycrawl.tools.checkstyle.bcel.classfile.ReferenceDAO;
+import com.puppycrawl.tools.checkstyle.bcel.generic.FieldReference;
+import com.puppycrawl.tools.checkstyle.bcel.generic.GETFIELDReference;
+import com.puppycrawl.tools.checkstyle.bcel.generic.GETSTATICReference;
+import com.puppycrawl.tools.checkstyle.bcel.generic.InvokeReference;
+import com.puppycrawl.tools.checkstyle.bcel.generic.PUTFIELDReference;
+import com.puppycrawl.tools.checkstyle.bcel.generic.PUTSTATICReference;
+
+/**
+ * Records references during a deep parse tree traversal.
+ * @author Rick Giles
+ */
+public final class ReferenceVisitor extends EmptyDeepVisitor
+{
+    /** singleton */
+    private static ReferenceVisitor sInstance = new ReferenceVisitor();
+
+    /** scope for checking field references */
+    private Set mFieldScopes = new HashSet();
+
+    /** scope for checking method references */
+    private Set mMethodScopes = new HashSet();
+
+    /** maps a JavaClass to a JavaClassDefinition */
+    private ReferenceDAO mReferenceDAO;
+
+    /** access to current constant pool */
+    private ConstantPoolGen mCurrentPoolGen;
+
+    /**
+     * Adds a reference when it visits an instruction that invokes
+     * a method or references a field.
+     * @author Rick Giles
+     * @version 18-Jun-2003
+     */
+    private class GenericVisitor extends org.apache.bcel.generic.EmptyVisitor
+    {
+        /** @see org.apache.bcel.generic.Visitor */
+        public void visitINVOKESPECIAL(INVOKESPECIAL aINVOKESPECIAL)
+        {
+            addInvokeReference(
+                new InvokeReference(aINVOKESPECIAL, mCurrentPoolGen));
+        }
+
+        /** @see org.apache.bcel.generic.Visitor */
+        public void visitINVOKESTATIC(INVOKESTATIC aINVOKESTATIC)
+        {
+            addInvokeReference(
+                new InvokeReference(aINVOKESTATIC, mCurrentPoolGen));
+        }
+
+        /** @see org.apache.bcel.generic.Visitor */
+        public void visitINVOKEVIRTUAL(INVOKEVIRTUAL aINVOKEVIRTUAL)
+        {
+            addInvokeReference(
+                new InvokeReference(aINVOKEVIRTUAL, mCurrentPoolGen));
+        }
+
+        /** @see org.apache.bcel.generic.Visitor */
+        public void visitGETSTATIC(GETSTATIC aGETSTATIC)
+        {
+            addFieldReference(
+                new GETSTATICReference(aGETSTATIC, mCurrentPoolGen));
+        }
+
+        /** @see org.apache.bcel.generic.Visitor */
+        public void visitGETFIELD(GETFIELD aGETFIELD)
+        {
+            addFieldReference(
+                new GETFIELDReference(aGETFIELD, mCurrentPoolGen));
+        }
+
+        /** @see org.apache.bcel.generic.Visitor */
+        public void visitPUTSTATIC(PUTSTATIC aPUTSTATIC)
+        {
+            addFieldReference(
+                new PUTSTATICReference(aPUTSTATIC, mCurrentPoolGen));
+        }
+
+        /** @see org.apache.bcel.generic.Visitor */
+        public void visitPUTFIELD(PUTFIELD aPUTFIELD)
+        {
+            addFieldReference(
+                new PUTFIELDReference(aPUTFIELD, mCurrentPoolGen));
+        }
+    }
+
+    /** prevent client construction */
+    private ReferenceVisitor()
+    {
+        setGenericVisitor(new GenericVisitor());
+        addFieldScope(Scope.PRIVATE);
+    }
+
+    /**
+     * Returns the singleton ReferencesVisitor
+     * @return the singleton
+     */
+    public static ReferenceVisitor getInstance()
+    {
+        return sInstance;
+    }
+
+    /**
+     * Adds an invoke reference to the reference DAO.
+     * @param aReference the reference.
+     */
+    private void addInvokeReference(InvokeReference aReference)
+    {
+        getReferenceDAO().addInvokeReference(aReference);
+    }
+
+    /**
+     * Adds an field reference to the reference DAO.
+     * @param aReference the reference.
+     */
+    private void addFieldReference(FieldReference aReference)
+    {
+        getReferenceDAO().addFieldReference(aReference);
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.bcel.IDeepVisitor */
+    public void visitSet(Set aJavaClasses)
+    {
+        mReferenceDAO =
+            new ReferenceDAO(aJavaClasses, mFieldScopes, mMethodScopes);
+    }
+
+    /**
+     * Gets the reference DAO.
+     * @return the reference DAO.
+     */
+    public ReferenceDAO getReferenceDAO()
+    {
+        return mReferenceDAO;
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.bcel.IDeepVisitor */
+    public void visitObject(Object aObject)
+    {
+        final JavaClass javaClass = (JavaClass) aObject;
+        final ConstantPool pool = javaClass.getConstantPool();
+        mCurrentPoolGen = new ConstantPoolGen(pool);
+    }
+
+    /**
+     * Finds the JavaClassDefinition for a given JavaClass.
+     * @param aJavaClass the JavaClass.
+     * @return the JavaClassDefinition for aJavaClass.
+     */
+    public JavaClassDefinition findJavaClassDef(JavaClass aJavaClass)
+    {
+        return getReferenceDAO().findJavaClassDef(aJavaClass);
+    }
+
+    /**
+     * Includes a scope in the scope for checking field references.
+     * @param aScope the scope to include.
+     */
+    public void addFieldScope(Scope aScope)
+    {
+        mFieldScopes.add(aScope);
+    }
+
+    /**
+     * Includes a scope in the scope for checking method references.
+     * @param aScope the scope to include.
+     */
+    public void addMethodScope(Scope aScope)
+    {
+        mMethodScopes.add(aScope);
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/VisitorSet.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/VisitorSet.java
new file mode 100644
index 0000000..fd37129
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/VisitorSet.java
@@ -0,0 +1,149 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.bcel.classfile.Code;
+import org.apache.bcel.classfile.ConstantPool;
+import org.apache.bcel.classfile.EmptyVisitor;
+import org.apache.bcel.classfile.Field;
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.classfile.LocalVariable;
+import org.apache.bcel.classfile.LocalVariableTable;
+import org.apache.bcel.classfile.Method;
+import org.apache.bcel.classfile.Visitor;
+import org.apache.bcel.generic.InstructionHandle;
+import org.apache.bcel.generic.InstructionList;
+
+/**
+ * Manages a set of visitors that are accepted by nodes visited by
+ * a VisitorSet. Any visit to this object is passed on to its managed
+ * visitors.
+ * @author Rick Giles
+ */
+// TODO: review visitXXX
+public class VisitorSet
+    extends EmptyVisitor
+{
+    /** the managed visitors */
+    private Set mVisitors = new HashSet();
+
+    /** Creates a <code>VisitorSet</code> for a set of visitors.
+     * @param aVisitors the set of managed visitors.
+     */
+    public VisitorSet(Set aVisitors)
+    {
+        mVisitors = aVisitors;
+    }
+
+   /**
+     * @see org.apache.bcel.classfile.Visitor#visitCode
+     */
+    public void visitCode(Code aCode)
+    {   
+        for (Iterator iter = mVisitors.iterator(); iter.hasNext();) {
+            IDeepVisitor visitor = (IDeepVisitor) iter.next();
+            Visitor v = visitor.getClassFileVisitor();
+            aCode.accept(v);
+        }
+        
+        // perform a deep visit
+        final byte[] code = aCode.getCode();
+        final InstructionList list = new InstructionList(code);
+        final Iterator it = list.iterator();
+        for (Iterator iter = list.iterator(); iter.hasNext();) {
+            InstructionHandle instruction = (InstructionHandle) iter.next();
+            visitInstructionHandle(instruction);
+        }
+    }
+
+    /**
+     * Deep visit of an InstructionHandle
+     * @param aInstruction the InstructionHandle
+     */
+    private void visitInstructionHandle(InstructionHandle aInstruction)
+    {
+        for (Iterator iter = mVisitors.iterator(); iter.hasNext();) {
+            final IDeepVisitor visitor = (IDeepVisitor) iter.next();
+            org.apache.bcel.generic.Visitor v =
+                visitor.getGenericVisitor();
+            aInstruction.accept(v);
+        }
+    }
+
+    /**
+     * @see org.apache.bcel.classfile.Visitor
+     */
+    public void visitConstantPool(ConstantPool aConstantPool)
+    {
+        for (Iterator iter = mVisitors.iterator(); iter.hasNext();) {
+            IDeepVisitor visitor = (IDeepVisitor) iter.next();
+            Visitor v = visitor.getClassFileVisitor();
+            aConstantPool.accept(v);
+        }
+    }
+
+    /**
+     * @see org.apache.bcel.classfile.Visitor
+     */
+    public void visitField(Field aField)
+    {
+        for (Iterator iter = mVisitors.iterator(); iter.hasNext();) {
+            IDeepVisitor visitor = (IDeepVisitor) iter.next();
+            Visitor v = visitor.getClassFileVisitor();
+            aField.accept(v);
+        }
+    }
+
+    /**
+     * @see org.apache.bcel.classfile.Visitor
+     */
+    public void visitJavaClass(JavaClass aJavaClass)
+    {
+        for (Iterator iter = mVisitors.iterator(); iter.hasNext();) {
+            IDeepVisitor visitor = (IDeepVisitor) iter.next();
+            Visitor v = visitor.getClassFileVisitor();
+            aJavaClass.accept(v);
+        }
+    }
+
+//    /**
+//     * @see org.apache.bcel.classfile.Visitor
+//     */
+//    public void visitLocalVariable(LocalVariable aLocalVariable)
+//    {
+//        for (Iterator iter = mVisitors.iterator(); iter.hasNext();) {
+//            IDeepVisitor visitor = (IDeepVisitor) iter.next();
+//            Visitor v = visitor.getClassFileVisitor();
+//            aLocalVariable.accept(v);
+//        }
+//    }
+//
+    /**
+     * @see org.apache.bcel.classfile.Visitor
+     */
+    public void visitLocalVariableTable(LocalVariableTable aTable)
+    {
+        for (Iterator iter = mVisitors.iterator(); iter.hasNext();) {
+            IDeepVisitor visitor = (IDeepVisitor) iter.next();
+            Visitor v = visitor.getClassFileVisitor();
+            aTable.accept(v);
+        }
+    }
+
+    /**
+     * @see org.apache.bcel.classfile.Visitor
+     */
+    public void visitMethod(Method aMethod)
+    {
+        for (Iterator iter = mVisitors.iterator(); iter.hasNext();) {
+            IDeepVisitor visitor = (IDeepVisitor) iter.next();
+            Visitor v = visitor.getClassFileVisitor();
+            aMethod.accept(v);
+        }
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/AbstractReferenceCheck.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/AbstractReferenceCheck.java
new file mode 100644
index 0000000..eb6f97e
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/AbstractReferenceCheck.java
@@ -0,0 +1,150 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.checks;
+
+import org.apache.bcel.classfile.FieldOrMethod;
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.commons.beanutils.ConversionException;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import com.puppycrawl.tools.checkstyle.bcel.AbstractCheckVisitor;
+import com.puppycrawl.tools.checkstyle.bcel.IDeepVisitor;
+import com.puppycrawl.tools.checkstyle.bcel.ReferenceVisitor;
+import com.puppycrawl.tools.checkstyle.bcel.classfile.JavaClassDefinition;
+import com.puppycrawl.tools.checkstyle.bcel.classfile.ReferenceDAO;
+
+/**
+ * Abstract class for checks that require reference information.
+ * @author Rick Giles
+ */
+public abstract class AbstractReferenceCheck
+    extends AbstractCheckVisitor
+{
+    /** the scope for recorded references */
+    private Scope mScope = Scope.PRIVATE;
+
+    /** the regexp to match class names against */
+    private Pattern mIgnoreClassNameRegexp;
+
+    /** the regexp to match names against */
+    private Pattern mIgnoreNameRegexp;
+
+    /**
+     * Creates a <code>AbstractReferenceCheck</code>.
+     *
+     */
+    public AbstractReferenceCheck()
+    {
+        setIgnoreClassName("^$");
+        setIgnoreName("^$");
+    }
+
+    /**
+     * Sets the scope for recorded references.
+     * @param aScopeName the scope for recorded references.
+     */
+    public void setScope(String aScopeName)
+    {
+        mScope = Scope.getInstance(aScopeName);
+    }
+
+    /**
+     * Determines whether a class name, and field or method should be ignored.
+     * @param aClassName the class name to consider.
+     * @param aFieldOrMethod  the field or method to consider.
+     * @return true if aClassName, and field or method should be ignored.
+     */
+    protected boolean ignore(String aClassName, FieldOrMethod aFieldOrMethod)
+    {
+        final String fieldOrMethodName = aFieldOrMethod.getName();
+        return (!equalScope(aFieldOrMethod)
+                || mIgnoreClassNameRegexp.matcher(aClassName).matches()
+            || mIgnoreNameRegexp.matcher(fieldOrMethodName).matches());
+    }
+
+    /**
+     * Tests whether the scope of a field or method is compatible
+     * with the scope of this check. References for compatible
+     * fields or methods should be checked.
+     * @param aFieldOrMethod the field or method to check.
+     * @return true if the scope of aFieldOrMethod is compatible
+     * with the scope of this check.
+     */
+    private boolean equalScope(FieldOrMethod aFieldOrMethod)
+    {
+        if (aFieldOrMethod.isPrivate()) {
+            return (mScope == Scope.PRIVATE);
+        }
+        else if (aFieldOrMethod.isProtected()) {
+            return (mScope == Scope.PROTECTED);
+        }
+        else if (aFieldOrMethod.isPublic()) {
+            return (mScope == Scope.PUBLIC);
+        }
+        else {
+            return (mScope == Scope.PACKAGE);
+        }
+    }
+
+
+    /**
+     * Set the ignore class name to the specified regular expression.
+     * @param aFormat a <code>String</code> value
+     * @throws ConversionException unable to parse aFormat
+     */
+    public void setIgnoreClassName(String aFormat)
+        throws ConversionException
+    {
+        try {
+            mIgnoreClassNameRegexp = Utils.getPattern(aFormat);
+        }
+        catch (PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+    }
+
+    /**
+     * Set the ignore name format to the specified regular expression.
+     * @param aFormat a <code>String</code> value
+     * @throws ConversionException unable to parse aFormat
+     */
+    public void setIgnoreName(String aFormat)
+        throws ConversionException
+    {
+        try {
+            mIgnoreNameRegexp = Utils.getPattern(aFormat);
+        }
+        catch (PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.bcel.AbstractCheckVisitor */
+    public IDeepVisitor getVisitor()
+    {
+        return ReferenceVisitor.getInstance();
+    }
+
+    /**
+     * Gets the DAO that manages references for this check.
+     * @return the the DAO that manages references for this check.
+     */
+    public ReferenceDAO getReferenceDAO()
+    {
+        return ((ReferenceVisitor) getVisitor()).getReferenceDAO();
+    }
+
+    /**
+     * Finds a JavaClassDefinition for a JavaClass.
+     * @param aJavaClass the JavaClass.
+     * @return the JavaClassDefinition for aJavaClass.
+     */
+    protected JavaClassDefinition findJavaClassDef(JavaClass aJavaClass)
+    {
+        return getReferenceDAO().findJavaClassDef(aJavaClass);
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/HiddenInheritedFieldCheck.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/HiddenInheritedFieldCheck.java
new file mode 100644
index 0000000..b134d47
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/HiddenInheritedFieldCheck.java
@@ -0,0 +1,64 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.checks;
+
+import org.apache.bcel.classfile.Field;
+import org.apache.bcel.classfile.JavaClass;
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import com.puppycrawl.tools.checkstyle.bcel.ReferenceVisitor;
+
+/**
+ * Checks for fields that hide fields in superclasses
+ * @author Daniel Grenner
+ */
+public class HiddenInheritedFieldCheck
+    extends AbstractReferenceCheck
+{
+    /** @see AbstractReferenceCheck */
+    public void setScope(String aFrom)
+    {
+        super.setScope(aFrom);
+        ((ReferenceVisitor) getVisitor()).addFieldScope(
+            Scope.getInstance(aFrom));
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor */
+    public void visitObject(Object aJavaClass)
+    {
+        final JavaClass javaClass = (JavaClass) aJavaClass;
+        final String className = javaClass.getClassName();
+        final JavaClass[] superClasses = javaClass.getSuperClasses();
+        final Field[] fields = javaClass.getFields();
+        // Check all fields
+        for (int i = 0; i < fields.length; i++) {
+            final Field field = fields[i];
+            // Go through all superclasses
+            for (int j = 0; j < superClasses.length; j++) {
+                final JavaClass superClass = superClasses[j];
+                final String superClassName = superClass.getClassName();
+                final Field[] superClassFields = superClass.getFields();
+                // Go through the filds of the superclasses
+                for (int k = 0; k < superClassFields.length; k++) {
+                    final Field superClassField = superClassFields[k];
+                    if (!superClassField.isPrivate() &&
+                        superClassField.getName().equals(field.getName()) &&
+                        !ignore(className, field)) {
+                        log(
+                            javaClass,
+                            0,
+                            "hidden.inherited.field",
+                            new Object[] {fields[i], superClassName});
+                    }
+                }
+            }
+        }
+    }
+
+    /** @see AbstractReferenceCheck */
+    public boolean ignore(String aClassName, Field aField) {
+        final String fieldName = aField.toString();
+        return (/*super.ignore(aClassName, aField)
+                || */fieldName.indexOf("[Synthetic]") > -1);
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/HiddenStaticMethodCheck.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/HiddenStaticMethodCheck.java
new file mode 100644
index 0000000..5655624
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/HiddenStaticMethodCheck.java
@@ -0,0 +1,88 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.checks;
+
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.classfile.Method;
+import org.apache.bcel.generic.Type;
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import com.puppycrawl.tools.checkstyle.bcel.ReferenceVisitor;
+
+/**
+ * Checks for fields that hide fields in superclasses
+ * @author Daniel Grenner
+ */
+public class HiddenStaticMethodCheck
+    extends AbstractReferenceCheck
+{
+    /** @see AbstractReferenceCheck */
+    public void setScope(String aFrom)
+    {
+        super.setScope(aFrom);
+        ((ReferenceVisitor) getVisitor()).addFieldScope(
+            Scope.getInstance(aFrom));
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor */
+    public void visitObject(Object aJavaClass)
+    {
+        final JavaClass javaClass = (JavaClass) aJavaClass;
+        final String className = javaClass.getClassName();
+        final JavaClass[] superClasses = javaClass.getSuperClasses();
+        final Method[] methods = javaClass.getMethods();
+        // Check all methods
+        for (int i = 0; i < methods.length; i++) {
+            final Method method = methods[i];
+            // Check that the method is a possible match
+            if (!method.isPrivate() && method.isStatic())  {
+                // Go through all their superclasses
+                for (int j = 0; j < superClasses.length; j++) {
+                    final JavaClass superClass = superClasses[j];
+                    final String superClassName = superClass.getClassName();
+                    final Method[] superClassMethods = superClass.getMethods();
+                    // Go through the methods of the superclasses
+                    for (int k = 0; k < superClassMethods.length; k++) {
+                        final Method superClassMethod = superClassMethods[k];
+                        if (superClassMethod.getName().equals(method.getName()) &&
+                            !ignore(className, method)) {
+                            Type[] methodTypes = method.getArgumentTypes();
+                            Type[] superTypes = superClassMethod.
+                                getArgumentTypes();
+                            if (methodTypes.length == superTypes.length) {
+                                boolean match = true;
+                                for (int arg = 0; arg < methodTypes.length; arg++) {
+                                    if (!methodTypes[arg].equals(superTypes[arg])) {
+                                        match = false;
+                                    }
+                                }
+                                // Same method parameters
+                                if (match) {
+                                    log(
+                                        javaClass,
+                                        0,
+                                        "hidden.static.method",
+                                        new Object[] {method, superClassName});
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    /** @see AbstractReferenceCheck */
+    public boolean ignore(String aClassName, Method aMethod) {
+        final String methodName = aMethod.getName();
+        return (/*super.ignore(aClassName, aMethod)
+                || */methodName.equals("<init>")
+                || methodName.equals("<clinit>")
+                || methodName.equals("class$")
+                || aMethod.toString().indexOf("[Synthetic]") > -1);
+    }
+
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/UnreadFieldCheck.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/UnreadFieldCheck.java
new file mode 100644
index 0000000..cb2c4e0
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/UnreadFieldCheck.java
@@ -0,0 +1,58 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.checks;
+
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.bcel.classfile.Field;
+import org.apache.bcel.classfile.JavaClass;
+
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import com.puppycrawl.tools.checkstyle.bcel.ReferenceVisitor;
+import com.puppycrawl.tools.checkstyle.bcel.classfile.FieldDefinition;
+import com.puppycrawl.tools.checkstyle.bcel.classfile.JavaClassDefinition;
+
+/**
+ * Checks for unread, non-final fields
+ * @author Rick Giles
+ */
+public class UnreadFieldCheck
+    extends AbstractReferenceCheck
+{
+    /** @see AbstractReferenceCheck */
+    public void setScope(String aFrom)
+    {
+        super.setScope(aFrom);
+        ((ReferenceVisitor) getVisitor()).addFieldScope(
+            Scope.getInstance(aFrom));
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor */
+    public void leaveSet(Set aJavaClasses)
+    {
+        final Iterator it = aJavaClasses.iterator();
+        while (it.hasNext()) {
+            final JavaClass javaClass = (JavaClass) it.next();
+            final String className = javaClass.getClassName();
+            final JavaClassDefinition classDef = findJavaClassDef(javaClass);
+            final FieldDefinition[] fieldDefs = classDef.getFieldDefs();
+            for (int i = 0; i < fieldDefs.length; i++) {
+                if (fieldDefs[i].getReadReferenceCount() == 0) {
+                    final Field field = fieldDefs[i].getField();
+                    if (!field.isFinal()
+                        && (!ignore(className, field))
+                        )
+                    {
+                        log(
+                            javaClass,
+                            0,
+                            "unread.field",
+                            new Object[] {fieldDefs[i]});
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/UnreadVariableCheck.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/UnreadVariableCheck.java
new file mode 100644
index 0000000..e5679a8
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/UnreadVariableCheck.java
@@ -0,0 +1,130 @@
+package com.puppycrawl.tools.checkstyle.bcel.checks;
+
+import java.io.File;
+import java.util.BitSet;
+import java.util.Set;
+
+import org.apache.bcel.classfile.Code;
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.classfile.LocalVariable;
+import org.apache.bcel.classfile.LocalVariableTable;
+import org.apache.bcel.classfile.Method;
+import org.apache.bcel.generic.LoadInstruction;
+
+import com.puppycrawl.tools.checkstyle.bcel.AbstractCheckVisitor;
+import com.puppycrawl.tools.checkstyle.bcel.EmptyClassFileVisitor;
+import com.puppycrawl.tools.checkstyle.bcel.EmptyDeepVisitor;
+import com.puppycrawl.tools.checkstyle.bcel.EmptyGenericVisitor;
+import com.puppycrawl.tools.checkstyle.bcel.IDeepVisitor;
+
+/**
+ * Checks for unread variables, i.e. unread formal parameters and local
+ * variables.
+ * Each class file must have a LocalVariableTable.
+ * To generate a LocalVariableTable, compile with debug information,
+ * as with option -g.
+ * @author Rick Giles
+ */
+public class UnreadVariableCheck
+    extends AbstractCheckVisitor
+{
+    private final DeepVisitor mDeepVisitor = new DeepVisitor();
+    
+    private final org.apache.bcel.classfile.Visitor mClassFileVisitor =
+        new ClassFileVisitor();
+    
+    private final org.apache.bcel.generic.Visitor mGenericVisitor =
+        new GenericVisitor();
+
+    private JavaClass mCurrentJavaClass = null;
+       
+    private Method mCurrentMethod = null;
+        
+    private LocalVariableTable mLocalVariableTable = null;
+    
+    private final BitSet mLocalVariableBitSet = new BitSet();
+    
+    private class DeepVisitor
+        extends EmptyDeepVisitor
+    {
+        public org.apache.bcel.classfile.Visitor getClassFileVisitor()
+        {
+            return mClassFileVisitor;
+        }
+        
+        public org.apache.bcel.generic.Visitor getGenericVisitor()
+        {
+            return mGenericVisitor;
+        }
+
+        public void visitObject(Object aObj)
+        {
+            mCurrentJavaClass = (JavaClass) aObj;      
+        }
+         
+        public void leaveSet(Set aSet)
+        {
+            checkReferences();   
+        }
+    }
+    
+    private class GenericVisitor
+        extends EmptyGenericVisitor
+    {
+        public void visitLoadInstruction(LoadInstruction aInstruction)
+        {
+            mLocalVariableBitSet.set(aInstruction.getIndex());
+        }
+    }
+    
+    private class ClassFileVisitor
+        extends EmptyClassFileVisitor
+    {
+        public void visitMethod(Method aMethod)
+        {
+            
+//          check references from previous method
+                     checkReferences();
+            mCurrentMethod = aMethod;
+                     // update reference recording
+                     
+                     mLocalVariableTable = aMethod.getLocalVariableTable();
+                     mLocalVariableBitSet.clear();
+        }
+
+        public void visitLocalVariableTable(LocalVariableTable aTable)
+        {
+
+  
+        }
+    }
+    
+     private void checkReferences()
+     {
+        if (mLocalVariableTable != null) {
+           for (int i = 0; i < mLocalVariableTable.getLength(); i++) {
+                if (!mLocalVariableBitSet.get(i)) {
+                    final LocalVariable localVariable =
+                        mLocalVariableTable.getLocalVariable(i);
+                    if (localVariable != null
+                        && !localVariable.getName().equals("this"))
+                    {
+                        log(0,
+                            "unread.variable",
+                            new Object[] {
+                                mCurrentJavaClass.getClassName(),
+                                mCurrentMethod.getName(),
+                                localVariable.getName(),});
+                    }
+                }
+            }
+        }
+     }
+
+    
+    /** @see com.puppycrawl.tools.checkstyle.bcel.AbstractCheckVisitor */
+    public IDeepVisitor getVisitor()
+    {
+        return mDeepVisitor;
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/UnusedMethodCheck.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/UnusedMethodCheck.java
new file mode 100644
index 0000000..7e8c43f
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/UnusedMethodCheck.java
@@ -0,0 +1,64 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.checks;
+
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.classfile.Method;
+
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import com.puppycrawl.tools.checkstyle.bcel.ReferenceVisitor;
+import com.puppycrawl.tools.checkstyle.bcel.classfile.JavaClassDefinition;
+import com.puppycrawl.tools.checkstyle.bcel.classfile.MethodDefinition;
+
+/**
+ * Checks for unused methods
+ * @author Rick Giles
+ */
+public class UnusedMethodCheck
+    extends AbstractReferenceCheck
+{
+    /** @see AbstractReferenceCheck */
+    public void setScope(String aScopeName)
+    {
+        super.setScope(aScopeName);
+        ((ReferenceVisitor) getVisitor()).addMethodScope(
+            Scope.getInstance(aScopeName));
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor */
+    public void leaveSet(Set aJavaClasses)
+    {
+        final Iterator it = aJavaClasses.iterator();
+        while (it.hasNext()) {
+            final JavaClass javaClass = (JavaClass) it.next();
+            final String className = javaClass.getClassName();
+            final JavaClassDefinition classDef = findJavaClassDef(javaClass);
+            final MethodDefinition[] methodDefs = classDef.getMethodDefs();
+            for (int i = 0; i < methodDefs.length; i++) {
+                if (!classDef.hasReference(methodDefs[i], getReferenceDAO())) {
+                    final Method method = methodDefs[i].getMethod();
+                    if (!ignore(className, method)) {
+                        log(
+                            javaClass,
+                            0,
+                            "unused.method",
+                            new Object[] {methodDefs[i]});
+                    }
+                }
+            }
+        }
+    }
+
+    /** @see AbstractReferenceCheck */
+    public boolean ignore(String aClassName, Method aMethod)
+    {
+        final String methodName = aMethod.getName();
+        return (super.ignore(aClassName, aMethod)
+            || methodName.equals("<init>")
+            || methodName.equals("<clinit>"));
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/messages.properties b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/messages.properties
new file mode 100644
index 0000000..e601a52
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/checks/messages.properties
@@ -0,0 +1,5 @@
+unread.field=Unread field ''{0}''.
+unused.method=Unused method ''{0}''.
+hidden.inherited.field=Field ''{0}'' hides field in class ''{1}''.
+hidden.static.method=Static method ''{0}'' hides method in class ''{1}''.
+unread.variable=Class ''{0}'', method ''{1}'', unread variable ''{2}''.
\ No newline at end of file
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/FieldDefinition.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/FieldDefinition.java
new file mode 100644
index 0000000..bf102a8
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/FieldDefinition.java
@@ -0,0 +1,89 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.classfile;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.bcel.classfile.Field;
+
+import com.puppycrawl.tools.checkstyle.bcel.generic.FieldReference;
+import com.puppycrawl.tools.checkstyle.bcel.generic.PUTFIELDReference;
+import com.puppycrawl.tools.checkstyle.bcel.generic.PUTSTATICReference;
+
+/**
+ * Contains the definition of a Field and its references.
+ * @author Rick Giles
+ */
+public class FieldDefinition
+    extends FieldOrMethodDefinition
+{
+    /** the GET references for the Field */
+    private final Set mGetReferences = new HashSet();
+
+    /** the PUT references for the FSield */
+    private final Set mPutReferences = new HashSet();
+
+    /**
+     * Creates a <code>FieldDefinition</code> for a Field.
+     * @param aField the Field.
+     */
+    public FieldDefinition(Field aField)
+    {
+        super(aField);
+    }
+
+    /**
+     * Returns the Field for this definition.
+     * @return the Field for this definition.
+     */
+    public Field getField()
+    {
+        return (Field) getFieldOrMethod();
+    }
+
+    /**
+     * Determines the number of read, or GET, references to the Field.
+     * @return the number of read references to the Field.
+     */
+    public int getReadReferenceCount()
+    {
+        return mGetReferences.size();
+    }
+
+    /**
+     * Determines the number of write, or PUT, references to the Field.
+     * @return the number of write references to the Field.
+     */
+    public int getWriteReferenceCount()
+    {
+        return mPutReferences.size();
+    }
+
+    /**
+     * Determines the total number of references to the Field.
+     * @return the number of references to the Field.
+     */
+    public int getReferenceCount()
+    {
+        return getReadReferenceCount() + getWriteReferenceCount();
+    }
+
+    /**
+     * Adds a reference to the Field.
+     * @param aFieldRef the reference.
+     */
+    public void addReference(FieldReference aFieldRef)
+    {
+        // TODO Polymorphize
+        if ((aFieldRef instanceof PUTFIELDReference)
+            || (aFieldRef instanceof PUTSTATICReference))
+        {
+            mPutReferences.add(aFieldRef);
+        }
+        else {
+            mGetReferences.add(aFieldRef);
+        }
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/FieldOrMethodDefinition.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/FieldOrMethodDefinition.java
new file mode 100644
index 0000000..68e538d
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/FieldOrMethodDefinition.java
@@ -0,0 +1,50 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.classfile;
+
+import org.apache.bcel.classfile.FieldOrMethod;
+
+/**
+ * Contains the definition of a Field or a Method.
+ * @author Rick Giles
+ */
+public class FieldOrMethodDefinition
+{
+    /** the Field or Method */
+    private FieldOrMethod mFieldOrMethod;
+
+    /**
+     * Constructs a <code>FieldOrMethodDefinition</code> for a Field
+     * or a Method.
+     * @param aFieldOrMethod the Field or Method
+     */
+    protected FieldOrMethodDefinition(FieldOrMethod aFieldOrMethod)
+    {
+        mFieldOrMethod = aFieldOrMethod;
+    }
+
+    /**
+     * Returns the FieldOrMethod.
+     * @return the FieldOrMethod.
+     */
+    protected FieldOrMethod getFieldOrMethod()
+    {
+        return mFieldOrMethod;
+    }
+
+    /**
+     * Returns the name of the Field or Method.
+     * @return the name of the Field or Method.
+     */
+    public String getName()
+    {
+        return mFieldOrMethod.getName();
+    }
+
+    /** @see java.lang.Object#toString() */
+    public String toString()
+    {
+        return mFieldOrMethod.toString();
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/JavaClassDefinition.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/JavaClassDefinition.java
new file mode 100644
index 0000000..dc018bc
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/JavaClassDefinition.java
@@ -0,0 +1,188 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.classfile;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.bcel.Repository;
+import org.apache.bcel.classfile.Field;
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.classfile.Method;
+import org.apache.bcel.generic.Type;
+
+
+/**
+ * Contains the definition of a org.apache.bcel.classfile.JavaClass and
+ * the definitions of Methods and Fields of the JavaClass
+ * @author Rick Giles
+ */
+public class JavaClassDefinition
+{
+    /** the JavaClass */
+    private JavaClass mJavaClass;
+
+    /** the method definitions */
+    private MethodDefinition[] mMethodDefs;
+
+    /** field definitions, keyed on field name */
+    private Map mFieldDefs;
+
+    /**
+     * Creates a JavaClassDefinition from a JavaClass. The fields and
+     * methods of the JavaClassDefinition are those whose scopes are
+     * in restricted sets of Scopes.
+     * @param aJavaClass the JavaClass for the definition.
+     * @param aFieldScopes the restricted set of field scopes.
+     * @param aMethodScopes the restriced set of method scopes.
+     */
+    public JavaClassDefinition(
+        JavaClass aJavaClass,
+        Set aFieldScopes,
+        Set aMethodScopes)
+    {
+        mJavaClass = aJavaClass;
+
+        // create method definitions, restricted by scope
+        final Method[] methods = aJavaClass.getMethods();
+        final Set methodSet = new HashSet();
+        mMethodDefs = new MethodDefinition[methods.length];
+        for (int i = 0; i < methods.length; i++) {
+            if (Utils.inScope(methods[i], aMethodScopes)) {
+                methodSet.add(new MethodDefinition(methods[i]));
+            }
+        }
+        mMethodDefs =
+            (MethodDefinition[]) methodSet.toArray(
+                new MethodDefinition[methodSet.size()]);
+
+        // create field definitions, restricted by scope
+        final Field[] fields = aJavaClass.getFields();
+        mFieldDefs = new HashMap(fields.length);
+        for (int i = 0; i < fields.length; i++) {
+            if (Utils.inScope(fields[i], aFieldScopes)) {
+                mFieldDefs.put(
+                    fields[i].getName(),
+                    new FieldDefinition(fields[i]));
+            }
+        }
+    }
+
+   /**
+     * Gets the JavaClass for this definition.
+     * @return the JavaClass
+     */
+    public JavaClass getJavaClass()
+    {
+        return mJavaClass;
+    }
+
+    /**
+     * Gets the method definitions for Methods of the JavaClass.
+     * @return the method definitions for Methods of the JavaClass.
+     */
+    public MethodDefinition[] getMethodDefs()
+    {
+        return mMethodDefs;
+    }
+
+    /**
+     * Gets the field definitions for Fields of the JavaClass.
+     * @return the method definitions for Fields of the JavaClass.
+     */
+    public FieldDefinition[] getFieldDefs()
+    {
+        return (FieldDefinition[]) mFieldDefs.values().toArray(
+            new FieldDefinition[mFieldDefs.size()]);
+    }
+
+    /**
+     * Finds the narrowest method that is compatible with a method.
+     * An invocation of the given method can be resolved as an invocation
+     * of the narrowest method.
+     * @param aClassName the class for the method.
+     * @param aMethodName the name of the method.
+     * @param aArgTypes the types for the method.
+     * @return the narrowest compatible method.
+     */
+    public MethodDefinition findNarrowestMethod(
+        String aClassName,
+        String aMethodName,
+        Type[] aArgTypes)
+    {
+        MethodDefinition result = null;
+        final String javaClassName = mJavaClass.getClassName();
+        if (Repository.instanceOf(aClassName, javaClassName)) {
+            // check all
+            for (int i = 0; i < mMethodDefs.length; i++) {
+                // TODO: check access privileges
+                if (mMethodDefs[i].isCompatible(aMethodName, aArgTypes)) {
+                    if (result == null) {
+                        result = mMethodDefs[i];
+                    }
+                    //else if (mMethodDefs[i].isAsNarrow(result)) {
+                    else if (result.isCompatible(mMethodDefs[i])) {
+                        result = mMethodDefs[i];
+                    }
+                }
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Finds a field definition.
+     * @param aFieldName the name of the field.
+     * @return the field definition named aFieldName.
+     */
+    public FieldDefinition findFieldDef(String aFieldName)
+    {
+        return (FieldDefinition) mFieldDefs.get(aFieldName);
+    }
+
+    /**
+     * Determines whether there is reference to a given Method in this JavaClass
+     * definition or a definition in a superclass.
+     * @param aMethodDef the Method to check.
+     * @param aReferenceDAO reference DAO.
+     * @return true if there is a reference to the method of aMethodDef in
+     * this JavaClass or a superclass.
+     */
+    public boolean hasReference(
+        MethodDefinition aMethodDef,
+        ReferenceDAO aReferenceDAO)
+    {
+        final String methodName = aMethodDef.getName();
+        final Type[] argTypes = aMethodDef.getArgumentTypes();
+
+        // search the inheritance hierarchy
+        JavaClass currentJavaClass = getJavaClass();
+        while (currentJavaClass != null) {
+            final JavaClassDefinition javaClassDef =
+                aReferenceDAO.findJavaClassDef(currentJavaClass);
+            if (javaClassDef != null) {
+                final MethodDefinition methodDef =
+                    javaClassDef.findNarrowestMethod(
+                        getJavaClass().getClassName(),
+                        methodName,
+                        argTypes);
+                if ((methodDef != null)
+                    && (methodDef.hasReference(getJavaClass())))
+                {
+                    return true;
+                }
+            }
+            currentJavaClass = currentJavaClass.getSuperClass();
+        }
+        return false;
+    }
+
+    /** @see java.lang.Object#toString() */
+    public String toString()
+    {
+        return getJavaClass().toString();
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/MethodDefinition.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/MethodDefinition.java
new file mode 100644
index 0000000..3bf99a8
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/MethodDefinition.java
@@ -0,0 +1,175 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.classfile;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.bcel.Repository;
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.classfile.Method;
+import org.apache.bcel.generic.Type;
+
+import com.puppycrawl.tools.checkstyle.bcel.generic.InvokeReference;
+import com.puppycrawl.tools.checkstyle.bcel.generic.Utils;
+
+/**
+ * Contains the definition of a Method and its references.
+ * @author Rick Giles
+ */
+public class MethodDefinition
+    extends FieldOrMethodDefinition
+{
+    /** the references to the Method */
+    private Set mReferences = new HashSet();
+
+    /**
+     * Creates a <code>MethodDefinition</code> for a Method.
+     * @param aMethod the Method.
+     */
+    public MethodDefinition(Method aMethod)
+    {
+        super(aMethod);
+    }
+
+    /**
+     * Gets the references to the Method.
+     * @return the references to the Method.
+     */
+    public Set getReferences()
+    {
+        return mReferences;
+    }
+
+    /**
+     * Determines the number of references to the Method.
+     * @return the number of references to the Method.
+     */
+    public int getReferenceCount()
+    {
+        return mReferences.size();
+    }
+
+    /**
+     * Returns the Method for this definition.
+     * @return the Method for this definition.
+     */
+    public Method getMethod()
+    {
+        return (Method) getFieldOrMethod();
+    }
+
+    /**
+     * Adds a reference to the Method.
+     * @param aRef the reference.
+     */
+
+    public void addReference(InvokeReference aRef)
+    {
+        mReferences.add(aRef);
+    }
+
+    /**
+     * Gets the Types of the Method's arguments.
+     * @return the argument Types.
+     */
+    public Type[] getArgumentTypes()
+    {
+        return getMethod().getArgumentTypes();
+    }
+
+    /**
+     * Determines whether a Method is compatible with the
+     * Method of this definition.
+     * @param aMethod the Method to check.
+     * @return true if aMethod is compatible with the Method
+     * of this definition.
+     */
+    public boolean isCompatible(Method aMethod)
+    {
+        return isCompatible(aMethod.getName(), aMethod.getArgumentTypes());
+    }
+
+    /**
+     * Determines whether a MethodDefinition is compatible with the
+     * Method of this definition.
+     * @param aMethodDef the Method definition to check.
+     * @return true if aMethod is compatible with the Method
+     * of this definition.
+     */
+    public boolean isCompatible(MethodDefinition aMethodDef)
+    {
+        return isCompatible(aMethodDef.getMethod());
+    }
+
+    /**
+     * Determines whether the Method of a MethodDefinition is as narrow
+     * as the method for this definition.
+     * Precondition: the method for this has the same name and the same
+     * number of arguments as the Method for the given MethodDefinition.
+     * @param aMethodDef the MethodDefinition to check.
+     * @return true if the Method of aMethodDef is as narrow
+     * as the method for this definition.
+     */
+    public boolean isAsNarrow(MethodDefinition aMethodDef)
+    {
+        return aMethodDef.isCompatible(this);
+//        final Type[] types1 = getArgumentTypes();
+//        final Type[] types2 = aMethodDef.getArgumentTypes();
+//        for (int i = 0; i < types2.length; i++) {
+//            if (!Utils.isCompatible(types1[i], types2[i])) {
+//                return false;
+//            }
+//        }
+//        return true;
+    }
+
+    /**
+     * Determines whether a method is compatible with the Method of
+     * this definition.
+     * @param aMethodName the name of the method to check.
+     * @param aArgTypes the method argument types.
+     * @return true if the method is compatible with the Method of
+     * this definition.
+     */
+    public boolean isCompatible(String aMethodName, Type[] aArgTypes)
+    {
+        // same name?
+        if (!getName().equals(aMethodName)) {
+            return false;
+        }
+        // compatible argument types?
+        final Type[] methodTypes = getArgumentTypes();
+        if (methodTypes.length != aArgTypes.length) {
+            return false;
+        }
+        for (int i = 0; i < aArgTypes.length; i++) {
+            if (!Utils.isCompatible(aArgTypes[i], methodTypes[i])) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Determine whether this method definition has a reference from a class or
+     * a superclass.
+     * @param aJavaClass the JavaClass to check against.
+     * @return true if there is a reference to this method definition from a
+     * aJavaClass or a superclass of aJavaClass.
+     */
+    public boolean hasReference(JavaClass aJavaClass)
+    {
+        final Iterator it = getReferences().iterator();
+        while (it.hasNext()) {
+            final InvokeReference invokeRef = (InvokeReference) it.next();
+            final String invokeClassName = invokeRef.getClassName();
+            if (Repository.instanceOf(aJavaClass, invokeClassName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/ReferenceDAO.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/ReferenceDAO.java
new file mode 100644
index 0000000..f889c86
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/ReferenceDAO.java
@@ -0,0 +1,140 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.classfile;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.bcel.Repository;
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.generic.Type;
+
+import com.puppycrawl.tools.checkstyle.bcel.generic.FieldReference;
+import com.puppycrawl.tools.checkstyle.bcel.generic.InvokeReference;
+
+/**
+ * Accesses Method and Field references for a set of JavaClasses.
+ * @author Rick Giles
+ */
+public class ReferenceDAO
+{
+    /**
+     * Creates a <code>ReferenceDAO</code> from a set of JavaClasses.
+     * @param aJavaClasses the set of JavaClasses for this DAO.
+     * @param aFieldScopes the scopes for field references.
+     * @param aMethodScopes the scopes for method references.
+     */
+    public ReferenceDAO(Set aJavaClasses, Set aFieldScopes, Set aMethodScopes)
+    {
+        mJavaClasses = new HashMap(aJavaClasses.size());
+        final Iterator it = aJavaClasses.iterator();
+        while (it.hasNext()) {
+            final JavaClass javaClass = (JavaClass) it.next();
+            final JavaClassDefinition javaClassDef =
+                new JavaClassDefinition(javaClass, aFieldScopes, aMethodScopes);
+            mJavaClasses.put(javaClass, javaClassDef);
+        }
+    }
+
+    /** maps a JavaClass to a JavaClassDefinition */
+    private Map mJavaClasses = null;
+
+    /**
+     * Finds the JavaClassDefinition for a given JavaClass.
+     * @param aJavaClass the JavaClass.
+     * @return the JavaClassDefinition keyed on aJavaClass.
+     */
+    public JavaClassDefinition findJavaClassDef(JavaClass aJavaClass)
+    {
+        return (JavaClassDefinition) mJavaClasses.get(aJavaClass);
+    }
+
+    /**
+     * Adds a reference for an invocation in the invoked method definition.
+     * The invocation is of the form class.method(args).
+     * @param aInvokeRef the invocation reference.
+     */
+    public void addInvokeReference(InvokeReference aInvokeRef)
+    {
+        // find the class for the instruction
+        final String className = aInvokeRef.getClassName();
+        JavaClass javaClass = Repository.lookupClass(className);
+        final String methodName = aInvokeRef.getName();
+        final Type[] argTypes = aInvokeRef.getArgTypes();
+
+        // search up the class hierarchy for the class containing the
+        // method definition.
+        MethodDefinition narrowest = null;
+        while ((javaClass != null) && (narrowest == null)) {
+            final JavaClassDefinition javaClassDef =
+                (JavaClassDefinition) mJavaClasses.get(javaClass);
+            if (javaClassDef != null) {
+                // find narrowest compatible in the current class
+                narrowest =
+                    javaClassDef.findNarrowestMethod(
+                        className,
+                        methodName,
+                        argTypes);
+                if (narrowest != null) {
+                    narrowest.addReference(aInvokeRef);
+                }
+            }
+            // search the parent
+            javaClass = javaClass.getSuperClass();
+        }
+    }
+
+    /**
+     * Adds a reference to a field.
+     * @param aFieldRef the field reference.
+     */
+    public void addFieldReference(FieldReference aFieldRef)
+    {
+        final String className = aFieldRef.getClassName();
+        JavaClass javaClass = Repository.lookupClass(className);
+        final String fieldName = aFieldRef.getName();
+        // search up the class hierarchy for the class containing the
+        // method definition.
+        FieldDefinition fieldDef = null;
+        while ((javaClass != null) && (fieldDef == null)) {
+            final JavaClassDefinition javaClassDef =
+                (JavaClassDefinition) mJavaClasses.get(javaClass);
+            if (javaClassDef != null) {
+                fieldDef = javaClassDef.findFieldDef(fieldName);
+                if (fieldDef != null) {
+                    fieldDef.addReference(aFieldRef);
+                }
+            }
+            //search the parent
+            javaClass = javaClass.getSuperClass();
+        }
+    }
+
+    /**
+     * Finds the definition of the field of a field reference.
+     * @param aFieldRef the reference to a field.
+     * @return the definition of the field for aFieldRef.
+     */
+    public FieldDefinition findFieldDef(FieldReference aFieldRef)
+    {
+        final String className = aFieldRef.getClassName();
+        JavaClass javaClass = Repository.lookupClass(className);
+        final String fieldName = aFieldRef.getName();
+        // search up the class hierarchy for the class containing the
+        // method definition.
+        FieldDefinition result = null;
+        while ((javaClass != null) && (result == null)) {
+            final JavaClassDefinition javaClassDef =
+                (JavaClassDefinition) mJavaClasses.get(javaClass);
+            if (javaClassDef != null) {
+                result = javaClassDef.findFieldDef(fieldName);
+            }
+            //search the parent
+            javaClass = javaClass.getSuperClass();
+        }
+        return result;
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/Utils.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/Utils.java
new file mode 100644
index 0000000..9d61f06
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/Utils.java
@@ -0,0 +1,39 @@
+package com.puppycrawl.tools.checkstyle.bcel.classfile;
+
+import java.util.Set;
+
+import org.apache.bcel.classfile.FieldOrMethod;
+
+import com.puppycrawl.tools.checkstyle.api.Scope;
+
+/**
+ * Utility methods for BCEL classfile package
+ * @author Rick Giles
+ */
+public class Utils
+{
+    /**
+     * Determines whether the declared scope of a field or method is in
+     * a set of scopes.
+     * @param aFieldOrMethod the field or method to test.
+     * @param aScopes the set of scopes to test against.
+     * @return true if the declared scope of aFieldOrMethod is in aScopes.
+     */
+    public static boolean inScope(FieldOrMethod aFieldOrMethod, Set aScopes)
+    {
+        if (aFieldOrMethod.isPrivate()) {
+            return (aScopes.contains(Scope.PRIVATE));
+        }
+        else if (aFieldOrMethod.isProtected()) {
+            return (aScopes.contains(Scope.PROTECTED));
+        }
+        else if (aFieldOrMethod.isPublic()) {
+            return (aScopes.contains(Scope.PUBLIC));
+        }
+        else {
+            return (aScopes.contains(Scope.PACKAGE));
+        }
+    }
+
+
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/FieldOrMethodReference.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/FieldOrMethodReference.java
new file mode 100644
index 0000000..7aa0e4b
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/FieldOrMethodReference.java
@@ -0,0 +1,61 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.generic;
+
+import org.apache.bcel.generic.ConstantPoolGen;
+import org.apache.bcel.generic.FieldOrMethod;
+import org.apache.bcel.generic.ObjectType;
+
+/**
+ * Describe class InstructionReference
+ * @author Rick Giles
+ * @version 18-Jun-2003
+ */
+public class FieldOrMethodReference
+{
+    protected FieldOrMethod mInstruction;
+    
+    protected ConstantPoolGen mPoolGen;
+    
+    protected FieldOrMethodReference(
+        FieldOrMethod aInstruction,
+        ConstantPoolGen aPoolGen)
+    {
+        mInstruction = aInstruction;
+        mPoolGen = aPoolGen;   
+    }
+
+    /**
+     * @return
+     */
+    public FieldOrMethod getInstruction()
+    {
+        return mInstruction;
+    }
+    
+    public String getClassName()
+    {
+        return mInstruction.getClassName(mPoolGen);
+    }
+    
+    public ObjectType getClassType()
+    {
+        return mInstruction.getClassType(mPoolGen);
+    }
+    
+    public ObjectType getLoadClassType()
+    {
+        return mInstruction.getLoadClassType(mPoolGen);
+    }
+    
+    public String getName()
+    {
+        return mInstruction.getName(mPoolGen);
+    }
+    
+    public String toString()
+    {
+        return mInstruction.toString(mPoolGen.getConstantPool());
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/FieldReference.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/FieldReference.java
new file mode 100644
index 0000000..cda5f90
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/FieldReference.java
@@ -0,0 +1,22 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.generic;
+
+import org.apache.bcel.generic.ConstantPoolGen;
+import org.apache.bcel.generic.FieldInstruction;
+
+/**
+ * Describe class FieldReference
+ * @author Rick Giles
+ * @version 18-Jun-2003
+ */
+public class FieldReference extends FieldOrMethodReference
+{
+    protected FieldReference(
+        FieldInstruction aInstruction,
+        ConstantPoolGen aPoolGen)
+    {
+        super(aInstruction, aPoolGen);
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/GETFIELDReference.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/GETFIELDReference.java
new file mode 100644
index 0000000..b0cd399
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/GETFIELDReference.java
@@ -0,0 +1,28 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.generic;
+
+import org.apache.bcel.generic.ConstantPoolGen;
+import org.apache.bcel.generic.GETFIELD;
+
+/**
+ * Describe class GETFIELDReference
+ * @author Rick Giles
+ * @version 18-Jun-2003
+ */
+public class GETFIELDReference
+    extends FieldReference
+{
+
+    /**
+     * @param aInstruction
+     * @param aPoolGen
+     */
+    public GETFIELDReference(
+        GETFIELD aInstruction,
+        ConstantPoolGen aPoolGen)
+    {
+        super(aInstruction, aPoolGen);
+    }    
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/GETSTATICReference.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/GETSTATICReference.java
new file mode 100644
index 0000000..a3e46de
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/GETSTATICReference.java
@@ -0,0 +1,28 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.generic;
+
+import org.apache.bcel.generic.ConstantPoolGen;
+import org.apache.bcel.generic.GETSTATIC;
+
+/**
+ * Describe class GETSTATICReference
+ * @author Rick Giles
+ * @version 18-Jun-2003
+ */
+public class GETSTATICReference
+    extends FieldReference
+{
+
+    /**
+     * @param aInstruction
+     * @param aPoolGen
+     */
+    public GETSTATICReference(
+        GETSTATIC aInstruction,
+        ConstantPoolGen aPoolGen)
+    {
+        super(aInstruction, aPoolGen);
+    }    
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/InvokeReference.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/InvokeReference.java
new file mode 100644
index 0000000..6eb5e68
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/InvokeReference.java
@@ -0,0 +1,38 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.generic;
+
+import org.apache.bcel.generic.ConstantPoolGen;
+import org.apache.bcel.generic.InvokeInstruction;
+import org.apache.bcel.generic.Type;
+
+
+/**
+ * Describe class MethodReference
+ * @author Rick Giles
+ * @version 18-Jun-2003
+ */
+public class InvokeReference
+    extends FieldOrMethodReference
+{
+
+    /**
+     * @param aInstruction
+     * @param aPoolGen
+     */
+    public InvokeReference(
+        InvokeInstruction aInstruction,
+        ConstantPoolGen aPoolGen)
+    {
+        super(aInstruction, aPoolGen);
+    }
+
+    /**
+     * @return
+     */
+    public Type[] getArgTypes()
+    {
+        return ((InvokeInstruction) mInstruction).getArgumentTypes(mPoolGen);
+    }
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/PUTFIELDReference.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/PUTFIELDReference.java
new file mode 100644
index 0000000..81dcdb8
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/PUTFIELDReference.java
@@ -0,0 +1,28 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.generic;
+
+import org.apache.bcel.generic.ConstantPoolGen;
+import org.apache.bcel.generic.PUTFIELD;
+
+/**
+ * Describe class GETFIELDReference
+ * @author Rick Giles
+ * @version 18-Jun-2003
+ */
+public class PUTFIELDReference
+    extends FieldReference
+{
+
+    /**
+     * @param aInstruction
+     * @param aPoolGen
+     */
+    public PUTFIELDReference(
+        PUTFIELD aInstruction,
+        ConstantPoolGen aPoolGen)
+    {
+        super(aInstruction, aPoolGen);
+    }    
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/PUTSTATICReference.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/PUTSTATICReference.java
new file mode 100644
index 0000000..bda78fb
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/PUTSTATICReference.java
@@ -0,0 +1,28 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.generic;
+
+import org.apache.bcel.generic.ConstantPoolGen;
+import org.apache.bcel.generic.PUTSTATIC;
+
+/**
+ * Describe class GETSTATICReference
+ * @author Rick Giles
+ * @version 18-Jun-2003
+ */
+public class PUTSTATICReference
+    extends FieldReference
+{
+
+    /**
+     * @param aInstruction
+     * @param aPoolGen
+     */
+    public PUTSTATICReference(
+        PUTSTATIC aInstruction,
+        ConstantPoolGen aPoolGen)
+    {
+        super(aInstruction, aPoolGen);
+    }    
+}
diff --git a/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/Utils.java b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/Utils.java
new file mode 100644
index 0000000..4e0a108
--- /dev/null
+++ b/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/generic/Utils.java
@@ -0,0 +1,71 @@
+//Tested with BCEL-5.1
+//http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/
+
+package com.puppycrawl.tools.checkstyle.bcel.generic;
+
+import org.apache.bcel.generic.ReferenceType;
+import org.apache.bcel.generic.Type;
+
+/**
+ * Utility methods.
+ * @author Rick Giles
+ * @version 17-Jun-2003
+ */
+public class Utils
+{
+    /**
+     * Tests whether one type is compatible with another for method
+     * invocation conversion. This includes assignment conversion,
+     * except the implicit narrowing of integer constants.
+     * JLS Section 5.2
+     * @param aSubType the type to be converted.
+     * @param aSuperType the converted type.
+     * @return true if aSubType can be converted to aSuperType.
+     */
+    public static boolean isCompatible(Type aSubType, Type aSuperType)
+    {
+        boolean result = false;
+
+        if (aSubType.equals(aSuperType)) {
+            // identity conversion
+            result = true;
+        }
+        else if ((aSubType instanceof ReferenceType)
+            && (aSuperType instanceof ReferenceType))
+        {
+            // widening reference conversion?
+            final ReferenceType aSubRefType = (ReferenceType) aSubType;
+            result = aSubRefType.isAssignmentCompatibleWith(aSuperType);
+        }
+        // widening primitive conversion?
+        else if (aSubType.equals(Type.BYTE)) {
+            result =
+                aSuperType.equals(Type.SHORT)
+                    || aSuperType.equals(Type.INT)
+                    || aSuperType.equals(Type.LONG)
+                    || aSuperType.equals(Type.FLOAT)
+                    || aSuperType.equals(Type.DOUBLE);
+        }
+        else if (aSubType.equals(Type.SHORT)) {
+            result =
+                aSuperType.equals(Type.INT)
+                    || aSuperType.equals(Type.LONG)
+                    || aSuperType.equals(Type.FLOAT)
+                    || aSuperType.equals(Type.DOUBLE);
+        }
+        else if (aSubType.equals(Type.INT)) {
+            result =
+                aSuperType.equals(Type.LONG)
+                    || aSuperType.equals(Type.FLOAT)
+                    || aSuperType.equals(Type.DOUBLE);
+        }
+        else if (aSubType.equals(Type.LONG)) {
+            result =
+                aSuperType.equals(Type.FLOAT) || aSuperType.equals(Type.DOUBLE);
+        }
+        else if (aSubType.equals(Type.DOUBLE)) {
+            result = aSuperType.equals(Type.DOUBLE);
+        }
+        return result;
+    }
+}
diff --git a/contrib/bcel/src/testinputs/com/puppycrawl/tools/checkstyle/bcel/checks/InheritLibrary.java b/contrib/bcel/src/testinputs/com/puppycrawl/tools/checkstyle/bcel/checks/InheritLibrary.java
new file mode 100644
index 0000000..dade3df
--- /dev/null
+++ b/contrib/bcel/src/testinputs/com/puppycrawl/tools/checkstyle/bcel/checks/InheritLibrary.java
@@ -0,0 +1,11 @@
+package com.puppycrawl.tools.checkstyle.bcel.checks;
+
+import org.apache.bcel.classfile.AccessFlags ;
+/**
+ * Test data for checking that fields with the same name as fields in
+ * superclasses work, when the superclass is inside an external library.
+ */
+public abstract class InheritLibrary extends AccessFlags
+{
+    protected int access_flags;
+}
diff --git a/contrib/bcel/src/testinputs/com/puppycrawl/tools/checkstyle/bcel/checks/SubClass.java b/contrib/bcel/src/testinputs/com/puppycrawl/tools/checkstyle/bcel/checks/SubClass.java
new file mode 100644
index 0000000..f564c9a
--- /dev/null
+++ b/contrib/bcel/src/testinputs/com/puppycrawl/tools/checkstyle/bcel/checks/SubClass.java
@@ -0,0 +1,54 @@
+package com.puppycrawl.tools.checkstyle.bcel.checks;
+
+public class SubClass extends SuperClass
+{
+    protected int reusedName;
+    private int subClassPrivate;
+    protected int superClassPrivate;
+    protected int differentType;
+    public static String S="S";
+    public static int staticMethod() {
+        return 1;
+    }
+    public int nonStaticMethod() {
+        return 1;
+    }
+    public static int staticMethodSameParamName(int i) {
+        return 1;
+    }
+    public static int staticMethodSameParamType(int x) {
+        return 1;
+    }
+    public static int staticMethodDifferentParamNum(int i) {
+        return 1;
+    }
+    public static int staticMethodDifferentParamType(String i) {
+        return 1;
+    }
+    public static int staticMethodDifferentObjectType(String i) {
+        return 1;
+    }
+    public static int staticMethodSuperParamType(String i) {
+        return 1;
+    }
+    public void callStaticMethodWithObject() {
+        SubClass s = new SubClass();
+        s.staticMethod();
+    }
+    public void callStaticMethodWithClass() {
+        SubClass.staticMethod();
+    }
+    public void callStaticMethodWithThis() {
+        this.staticMethod();
+    }
+    public String callStaticFieldWithObject() {
+        SubClass s = new SubClass();
+        return s.S;
+    }
+    public String callStaticFieldWithClass() {
+        return SubClass.S;
+    }
+    public String callStaticFieldWithThis() {
+        return this.S;
+    }
+}
diff --git a/contrib/bcel/src/testinputs/com/puppycrawl/tools/checkstyle/bcel/checks/SuperClass.java b/contrib/bcel/src/testinputs/com/puppycrawl/tools/checkstyle/bcel/checks/SuperClass.java
new file mode 100644
index 0000000..6e9fdd7
--- /dev/null
+++ b/contrib/bcel/src/testinputs/com/puppycrawl/tools/checkstyle/bcel/checks/SuperClass.java
@@ -0,0 +1,46 @@
+package com.puppycrawl.tools.checkstyle.bcel.checks;
+
+public class SuperClass
+{
+    // Name reused in subclass
+    protected int reusedName;
+    // Subclass uses private name, still conflict
+    protected int subClassPrivate;
+    // This is a private field, subclass does not shadow
+    private int superClassPrivate;
+    // Test for different data types
+    protected String differentType;
+
+    // Hidden
+    public static int staticMethod() {
+        return 0;
+    }
+    // Not hidden
+    public int nonStaticMethod() {
+        return 0;
+    }
+    // Hidden
+    public static int staticMethodSameParamName(int i) {
+        return 0;
+    }
+    // Hidden
+    public static int staticMethodSameParamType(int i) {
+        return 0;
+    }
+    // Not hidden
+    public static int staticMethodDifferentParamNum(int i, int j) {
+        return 0;
+    }
+    // Not hidden
+    public static int staticMethodDifferentParamType(int i) {
+        return 0;
+    }
+    // Not hidden
+    public static int staticMethodDifferentObjectType(Integer i) {
+        return 0;
+    }
+    // Not hidden (?)
+    public static int staticMethodSuperParamType(Object i) {
+        return 0;
+    }
+}
diff --git a/contrib/bcel/src/tests/com/puppycrawl/tools/checkstyle/bcel/BcelCheckTestCase.java b/contrib/bcel/src/tests/com/puppycrawl/tools/checkstyle/bcel/BcelCheckTestCase.java
new file mode 100644
index 0000000..ffb63b4
--- /dev/null
+++ b/contrib/bcel/src/tests/com/puppycrawl/tools/checkstyle/bcel/BcelCheckTestCase.java
@@ -0,0 +1,127 @@
+package com.puppycrawl.tools.checkstyle.bcel;
+
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import com.puppycrawl.tools.checkstyle.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.util.Locale;
+import java.util.Properties;
+
+import junit.framework.TestCase;
+
+public abstract class BcelCheckTestCase
+    extends TestCase
+{
+    /** a brief logger that only display info about errors */
+    protected static class BriefLogger
+        extends DefaultLogger
+    {
+        public BriefLogger(OutputStream out)
+        {
+            super(out, true);
+        }
+        public void auditStarted(AuditEvent evt) {}
+        public void fileFinished(AuditEvent evt) {}
+        public void fileStarted(AuditEvent evt) {}
+    }
+
+    private final ByteArrayOutputStream mBAOS = new ByteArrayOutputStream();
+    protected final PrintStream mStream = new PrintStream(mBAOS);
+    protected final Properties mProps = new Properties();
+
+    public static DefaultConfiguration createCheckConfig(Class aClazz)
+    {
+        final DefaultConfiguration checkConfig =
+            new DefaultConfiguration(aClazz.getName());
+        return checkConfig;
+    }
+
+    protected Checker createChecker(Configuration aCheckConfig)
+        throws Exception
+    {
+        final DefaultConfiguration dc = createCheckerConfig(aCheckConfig);
+        final Checker c = new Checker();
+        // make sure the tests always run with english error messages
+        // so the tests don't fail in supported locales like german
+        final Locale locale = Locale.ENGLISH;
+        c.setLocaleCountry(locale.getCountry());
+        c.setLocaleLanguage(locale.getLanguage());
+        c.configure(dc);
+        c.addListener(new BriefLogger(mStream));
+        return c;
+    }
+
+    protected DefaultConfiguration createCheckerConfig(Configuration aConfig)
+    {
+        final DefaultConfiguration dc =
+            new DefaultConfiguration("configuration");
+        final DefaultConfiguration twConf = createCheckConfig(ClassFileSetCheck.class);
+        dc.addChild(twConf);
+        twConf.addChild(aConfig);
+        return dc;
+    }
+
+    protected static String getPath(String aFilename)
+        throws IOException
+    {
+        final File f = new File(System.getProperty("testinputs.compiled.dir"),
+                                aFilename);
+        return f.getCanonicalPath();
+    }
+
+    protected void verify(Configuration aConfig, String aFileName, String[] aExpected)
+            throws Exception
+    {
+        verify(createChecker(aConfig), aFileName, aFileName, aExpected);
+    }
+
+    protected void verify(Checker aC, String aFileName, String[] aExpected)
+            throws Exception
+    {
+        verify(aC, aFileName, aFileName, aExpected);
+    }
+
+    protected void verify(Checker aC,
+                          String aProcessedFilename,
+                          String aMessageFileName,
+                          String[] aExpected)
+        throws Exception
+    {
+        verify(aC,
+            new File[] {new File(aProcessedFilename)},
+            aMessageFileName, aExpected);
+    }
+
+    protected void verify(Checker aC,
+                          File[] aProcessedFiles,
+                          String aMessageFileName,
+                          String[] aExpected)
+        throws Exception
+    {
+        mStream.flush();
+        final int errs = aC.process(aProcessedFiles);
+
+        // process each of the lines
+        final ByteArrayInputStream bais =
+            new ByteArrayInputStream(mBAOS.toByteArray());
+        final LineNumberReader lnr =
+            new LineNumberReader(new InputStreamReader(bais));
+
+        for (int i = 0; i < aExpected.length; i++) {
+            final String expected = aMessageFileName + ":" + aExpected[i];
+            final String actual = lnr.readLine();
+            assertEquals("error message " + i, expected, actual);
+        }
+
+        assertEquals("unexpected output: " + lnr.readLine(),
+                aExpected.length, errs);
+        aC.destroy();
+    }
+}
diff --git a/contrib/bcel/src/tests/com/puppycrawl/tools/checkstyle/bcel/checks/HiddenInheritedFieldTest.java b/contrib/bcel/src/tests/com/puppycrawl/tools/checkstyle/bcel/checks/HiddenInheritedFieldTest.java
new file mode 100644
index 0000000..f0f71f8
--- /dev/null
+++ b/contrib/bcel/src/tests/com/puppycrawl/tools/checkstyle/bcel/checks/HiddenInheritedFieldTest.java
@@ -0,0 +1,22 @@
+package com.puppycrawl.tools.checkstyle.bcel.checks;
+
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.bcel.BcelCheckTestCase;
+
+public class HiddenInheritedFieldTest
+    extends BcelCheckTestCase
+{
+    public void testIt()
+            throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HiddenInheritedFieldCheck.class);
+
+        final String[] expected = {
+            "0: Field 'private int subClassPrivate' hides field in class 'com.puppycrawl.tools.checkstyle.bcel.checks.SuperClass'.",
+            "0: Field 'protected int differentType' hides field in class 'com.puppycrawl.tools.checkstyle.bcel.checks.SuperClass'.",
+            "0: Field 'protected int reusedName' hides field in class 'com.puppycrawl.tools.checkstyle.bcel.checks.SuperClass'.",
+        };
+        verify(checkConfig, getPath("com\\puppycrawl\\tools\\checkstyle\\bcel\\checks\\SubClass.class"), expected);
+    }
+}
diff --git a/contrib/bcel/src/tests/com/puppycrawl/tools/checkstyle/bcel/checks/HiddenStaticMethodTest.java b/contrib/bcel/src/tests/com/puppycrawl/tools/checkstyle/bcel/checks/HiddenStaticMethodTest.java
new file mode 100644
index 0000000..6d4227a
--- /dev/null
+++ b/contrib/bcel/src/tests/com/puppycrawl/tools/checkstyle/bcel/checks/HiddenStaticMethodTest.java
@@ -0,0 +1,22 @@
+package com.puppycrawl.tools.checkstyle.bcel.checks;
+
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.bcel.BcelCheckTestCase;
+
+public class HiddenStaticMethodTest
+    extends BcelCheckTestCase
+{
+    public void testIt()
+            throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HiddenStaticMethodCheck.class);
+
+        final String[] expected = {
+            "0: Static method 'public static int staticMethod()' hides method in class 'com.puppycrawl.tools.checkstyle.bcel.checks.SuperClass'.",
+            "0: Static method 'public static int staticMethodSameParamName(int i)' hides method in class 'com.puppycrawl.tools.checkstyle.bcel.checks.SuperClass'.",
+            "0: Static method 'public static int staticMethodSameParamType(int x)' hides method in class 'com.puppycrawl.tools.checkstyle.bcel.checks.SuperClass'.",
+        };
+        verify(checkConfig, getPath("com\\puppycrawl\\tools\\checkstyle\\bcel\\checks\\SubClass.class"), expected);
+    }
+}
diff --git a/contrib/checkstyle-author.xsl b/contrib/checkstyle-author.xsl
new file mode 100644
index 0000000..5bb93ec
--- /dev/null
+++ b/contrib/checkstyle-author.xsl
@@ -0,0 +1,230 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+    <xsl:output method="html" indent="yes"/>
+    <xsl:decimal-format decimal-separator="." grouping-separator=","/>
+    <!-- 
+    Checkstyle XML Style Sheet by Daniel Grenner 
+    <daniel DOT grenner AT enea DOT se> 
+    This stylesheet groups the errors by author name, if used  in combination
+    with the WriteTag check:
+
+        <module name="WriteTag">
+            <property name="tag" value="@author"/>
+            <property name="tagFormat" value="\S"/>
+            <property name="severity" value="ignore"/>
+        </module>
+
+    The output contains both error and warning messages.
+    Files without errors or warnings are not included.
+    This stylesheet is based on checkstyle-noframes.xsl.
+    -->
+
+    <xsl:key name="keyAuthorID" match="//file/error[contains(@message,'@author')]" use="@message" />
+    <xsl:key name="keySeverityID" match="//file/error" use="@severity" />
+    <xsl:template match="checkstyle">
+        <html>
+            <head>
+                <style type="text/css">
+    .bannercell {
+      border: 0px;
+      padding: 0px;
+    }
+    body {
+      margin-left: 10;
+      margin-right: 10;
+      font:normal 68% verdana,arial,helvetica;
+      background-color:#FFFFFF;
+      color:#000000;
+    }
+    .a td {
+      background: #efefef;
+    }
+    .b td {
+      background: #fff;
+    }
+    th, td {
+      text-align: left;
+      vertical-align: top;
+    }
+    th {
+      font-weight:bold;
+      background: #ccc;
+      color: black;
+    }
+    table, th, td {
+      font-size:100%;
+      border: none
+    }
+    table.log tr td, tr th {
+
+    }
+    h2 {
+      font-weight:bold;
+      font-size:140%;
+      margin-bottom: 5;
+    }
+    h3 {
+      font-size:100%;
+      font-weight:bold;
+      background: #525D76;
+      color: white;
+      text-decoration: none;
+      padding: 5px;
+      margin-right: 2px;
+      margin-left: 2px;
+      margin-bottom: 0;
+    }
+        </style>
+            </head>
+            <body>
+                <a name="#top"/>
+                <!-- jakarta logo -->
+                <table border="0" cellpadding="0" cellspacing="0" width="100%">
+                    <tr>
+                        <td class="bannercell" rowspan="2">
+                            <!--a href="http://jakarta.apache.org/">
+          <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
+          </a-->
+                        </td>
+                        <td class="text-align:right">
+                            <h2>CheckStyle Audit</h2>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="text-align:right">Designed for use with <a href="http://checkstyle.sourceforge.net/">CheckStyle</a> and <a href="http://jakarta.apache.org">Ant</a>.</td>
+                    </tr>
+                </table>
+                <hr size="1"/>
+
+                <!-- Summary part -->
+                <xsl:apply-templates select="." mode="summary"/>
+                <hr size="1" width="100%" align="left"/>
+
+                <!-- Author List part -->
+                <xsl:apply-templates select="." mode="authorlist"/>
+                <hr size="1" width="100%" align="left"/>
+
+                <!-- For each package create its part -->
+                <xsl:for-each select="file">
+                    <xsl:sort select="./error[contains(@message,'@author=')]/@message"/>
+                    <xsl:apply-templates select="."/>
+                    <p/>
+                    <p/>
+                </xsl:for-each>
+                <hr size="1" width="100%" align="left"/>
+            </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="checkstyle" mode="summary">
+        <h3>Summary</h3>
+        <xsl:variable name="fileCount" select="count(file)"/>
+        <xsl:variable name="errorCount" select="count(key('keySeverityID', 'error'))"/>
+        <xsl:variable name="warningCount" select="count(key('keySeverityID', 'warning'))"/>
+        <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+            <tr>
+                <th>Files</th>
+                <th>Errors</th>
+                <th>Warnings</th>
+            </tr>
+            <tr>
+                <xsl:call-template name="alternated-row"/>
+                <td>
+                    <xsl:value-of select="$fileCount"/>
+                </td>
+                <td>
+                    <xsl:value-of select="$errorCount"/>
+                </td>
+                <td>
+                    <xsl:value-of select="$warningCount"/>
+                </td>
+            </tr>
+        </table>
+    </xsl:template>
+    <xsl:template match="checkstyle" mode="authorlist">
+        <h3>Authors</h3>
+
+        <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+            <tr>
+                <th>Name</th>
+                <th>Errors</th>
+                <th>Warnings</th>
+            </tr>
+
+        <!-- Process each Author -->
+        <xsl:for-each select="file/error[generate-id(.) = generate-id(key('keyAuthorID', @message)[1])]">
+            <xsl:sort select="@message" />
+
+                <xsl:variable name="authorFull" select="@message"/>
+                <xsl:variable name="author" select="substring-after($authorFull,'@author=')"/>
+                <xsl:variable name="errors" select="count(key('keyAuthorID', @message)/../error[@severity='error'])"/>
+                <xsl:variable name="warnings" select="count(key('keyAuthorID', @message)/../error[@severity='warning'])"/>
+                <xsl:if test = "not ($author='' or ($errors + $warnings = 0))">
+                    <tr>
+                    <xsl:call-template name="alternated-row"/>
+                    <td>
+                        <a href="#{$author}">
+                            <xsl:value-of select="$author"/>
+                        </a>
+                    </td>
+                        <td><xsl:value-of select="$errors"/></td>
+                        <td><xsl:value-of select="$warnings"/></td>
+                    </tr>
+                </xsl:if>
+        </xsl:for-each>
+
+    </table>
+    </xsl:template>
+
+    <xsl:template match="file">
+        <xsl:variable name="errorCount" select="count(error[@severity='error']) + count(error[@severity='warning'])"/>
+        <xsl:if test="not ($errorCount=0)">
+
+            <xsl:variable name="author" select="substring-after(./error[contains(@message,'@author')]/@message,'@author=')"/>
+
+            <a name="#{$author}"/>
+            <h3>File <xsl:value-of select="@name"/>
+                <br/>
+            Author <xsl:value-of select="$author"/>
+            </h3>
+            <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+                <tr>
+                    <th>Error Description</th>
+                    <th>Line</th>
+                </tr>
+                <xsl:for-each select="error[not(@severity='info')]">
+                <xsl:sort select="@line" data-type="number"/>
+                    <tr>
+                        <xsl:call-template name="alternated-row"/>
+                        <td>
+                            <xsl:value-of select="@message"/>
+                        </td>
+                        <td>
+                            <xsl:value-of select="@line"/>
+                        </td>
+                    </tr>
+                </xsl:for-each>
+            </table>
+            <a href="#top">Back to top</a>
+        </xsl:if>
+    </xsl:template>
+
+
+<xsl:template name="basename">
+  <xsl:param name="path"/>
+  <xsl:choose>
+     <xsl:when test="contains($path, '\')">
+        <xsl:call-template name="basename">
+           <xsl:with-param name="path">substring-after($path, '\')</xsl:with-param>
+        </xsl:call-template>
+     </xsl:when>
+     <xsl:otherwise>
+        <xsl:value-of select="$path"/>
+     </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+    <xsl:template name="alternated-row">
+        <xsl:attribute name="class"><xsl:if test="position() mod 2 = 1">a</xsl:if><xsl:if test="position() mod 2 = 0">b</xsl:if></xsl:attribute>
+    </xsl:template>
+
+</xsl:stylesheet>
diff --git a/contrib/checkstyle-csv.xsl b/contrib/checkstyle-csv.xsl
new file mode 100644
index 0000000..f7b6bc7
--- /dev/null
+++ b/contrib/checkstyle-csv.xsl
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="text" />
+<xsl:strip-space elements="*"/>
+<xsl:template match="error"> 
+<xsl:value-of select="../@name"/>, <xsl:value-of select="@line"/>, <xsl:value-of select="@column"/>, <xsl:value-of select="@severity"/>, <xsl:value-of select="@message"/>, <xsl:value-of select="@source"/>
+<xsl:text>
+</xsl:text>
+</xsl:template>
+</xsl:stylesheet>
+
diff --git a/contrib/checkstyle-frames-errors.xsl b/contrib/checkstyle-frames-errors.xsl
new file mode 100644
index 0000000..2430f08
--- /dev/null
+++ b/contrib/checkstyle-frames-errors.xsl
@@ -0,0 +1,394 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:lxslt="http://xml.apache.org/xslt"
+    xmlns:redirect="http://xml.apache.org/xalan/redirect"
+    extension-element-prefixes="redirect">
+
+<!--
+ The Apache Software License, Version 1.1
+
+ Copyright (c) 2002 The Apache Software Foundation.  All rights
+ reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ 3. The end-user documentation included with the redistribution, if
+    any, must include the following acknowlegement:
+       "This product includes software developed by the
+        Apache Software Foundation (http://www.apache.org/)."
+    Alternately, this acknowlegement may appear in the software itself,
+    if and wherever such third-party acknowlegements normally appear.
+
+ 4. The names "The Jakarta Project", "Ant", and "Apache Software
+    Foundation" must not be used to endorse or promote products derived
+    from this software without prior written permission. For written
+    permission, please contact apache at apache.org.
+
+ 5. Products derived from this software may not be called "Apache"
+    nor may "Apache" appear in their names without prior written
+    permission of the Apache Group.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+ ====================================================================
+
+ This software consists of voluntary contributions made by many
+ individuals on behalf of the Apache Software Foundation.  For more
+ information on the Apache Software Foundation, please see
+ <http://www.apache.org/>.
+ -->
+
+    <xsl:output method="html" indent="yes" encoding="US-ASCII"/>
+    <xsl:decimal-format decimal-separator="." grouping-separator="," />
+
+    <xsl:key name="files" match="file" use="@name"/>
+    <xsl:key name="errorfiles" match="file[count(error)>0]" use="@name"/>
+    <xsl:key name="violations" match="file/error" use="@source"/>
+
+    <xsl:param name="output.dir" select="'.'"/>
+
+	<xsl:variable name="allFiles" select="/checkstyle/file[@name and generate-id(.) = generate-id(key('files', @name))]"/>
+	<xsl:variable name="allFilesWithError" select="/checkstyle/file[@name and generate-id(.) = generate-id(key('errorfiles', @name))]"/>
+
+    <xsl:template match="checkstyle">
+        <!-- create the index.html -->
+        <redirect:write file="{$output.dir}/index.html">
+            <xsl:call-template name="index.html"/>
+        </redirect:write>
+
+        <!-- create the stylesheet.css -->
+        <redirect:write file="{$output.dir}/stylesheet.css">
+            <xsl:call-template name="stylesheet.css"/>
+        </redirect:write>
+
+        <!-- create the overview-summary.html at the root -->
+        <redirect:write file="{$output.dir}/overview-frame.html">
+            <xsl:apply-templates select="." mode="overview"/>
+        </redirect:write>
+
+        <!-- create the all-classes.html at the root -->
+        <redirect:write file="{$output.dir}/allclasses-frame.html">
+            <xsl:apply-templates select="." mode="all.classes"/>
+        </redirect:write>
+
+        <!-- process all files -->
+        <xsl:apply-templates select="$allFilesWithError"/>
+    </xsl:template>
+
+    <xsl:template name="index.html">
+        <html>
+            <head>
+                <title>CheckStyle Audit</title>
+            </head>
+            <frameset cols="20%,80%">
+                <frame src="allclasses-frame.html" name="fileListFrame"/>
+                <frame src="overview-frame.html" name="fileFrame"/>
+            </frameset>
+            <noframes>
+                <h2>Frame Alert</h2>
+                <p>
+                    This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
+                </p>
+            </noframes>
+        </html>
+    </xsl:template>
+
+    <xsl:template name="pageHeader">
+        <table border="0" cellpadding="0" cellspacing="0" width="100%">
+            <tr>
+                <td class="text-align:right"><h2>CheckStyle Audit</h2></td>
+            </tr>
+            <tr>
+                <td class="text-align:right">Designed for use with <a href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
+            </tr>
+        </table>
+        <hr size="1"/>
+    </xsl:template>
+
+    <xsl:template match="checkstyle" mode="overview">
+        <html>
+            <head>
+                <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
+            </head>
+            <body>
+                <!-- page header -->
+                <xsl:call-template name="pageHeader"/>
+
+                <!-- Summary part -->
+                <xsl:apply-templates select="." mode="summary"/>
+                <hr size="1" width="100%" align="left"/>
+
+                <!-- File list part -->
+                <xsl:apply-templates select="." mode="filelist"/>
+            </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template name="stylesheet.css">
+        .bannercell {
+        border: 0px;
+        padding: 0px;
+        }
+        body {
+        margin-left: 10;
+        margin-right: 10;
+        font:normal 80% arial,helvetica,sanserif;
+        background-color:#FFFFFF;
+        color:#000000;
+        }
+        .a td {
+        background: #efefef;
+        }
+        .b td {
+        background: #fff;
+        }
+        th, td {
+        text-align: left;
+        vertical-align: top;
+        }
+        th {
+        font-weight:bold;
+        background: #ccc;
+        color: black;
+        }
+        table, th, td {
+        font-size:100%;
+        border: none
+        }
+        table.log tr td, tr th {
+
+        }
+        h2 {
+        font-weight:bold;
+        font-size:140%;
+        margin-bottom: 5;
+        }
+        h3 {
+        font-size:100%;
+        font-weight:bold;
+        background: #525D76;
+        color: white;
+        text-decoration: none;
+        padding: 5px;
+        margin-right: 2px;
+        margin-left: 2px;
+        margin-bottom: 0;
+        }
+    </xsl:template>
+
+    <!--
+    Replace DOS characters in a path.
+    Replace '\' with '/', ':' with '_'.
+    -->
+    <xsl:template name="from-dos">
+        <xsl:param name="path"/>
+        <xsl:value-of select="translate($path, '\:', '/_')"/>
+    </xsl:template>
+
+    <!--
+    Creates an all-classes.html file that contains a link to all files.
+    -->
+    <xsl:template match="checkstyle" mode="all.classes">
+        <html>
+            <head>
+                <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
+            </head>
+            <body>
+                <h2>Files</h2>
+                <p><a href="overview-frame.html" target="fileFrame">Summary</a></p>
+                <p>
+                    <table width="100%">
+                        <!-- For each file create its part -->
+                        <xsl:apply-templates select="$allFilesWithError" mode="all.classes">
+                            <xsl:sort select="@name"/>
+                        </xsl:apply-templates>
+                    </table>
+                </p>
+            </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="checkstyle" mode="filelist">
+        <h3>Files</h3>
+        <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+            <tr>
+                <th>Name</th>
+                <th>Errors</th>
+            </tr>
+            <xsl:apply-templates select="$allFilesWithError" mode="filelist">
+                <xsl:sort select="@name"/>
+            </xsl:apply-templates>
+        </table>
+    </xsl:template>
+
+    <xsl:template match="file" mode="filelist">
+        <xsl:variable name="name" select="@name" />
+
+        <!--<xsl:if test="$first = 'true'">-->
+            <xsl:variable name="new-name">
+                <xsl:call-template name="from-dos">
+                    <xsl:with-param name="path" select="@name"/>
+                </xsl:call-template>
+            </xsl:variable>
+            <tr>
+                <xsl:call-template name="alternated-row" />
+                <td nowrap="nowrap">
+                    <a>
+                        <xsl:attribute name="href">
+                            <xsl:text>files/</xsl:text><xsl:value-of select="$new-name"/><xsl:text>.html</xsl:text>
+                        </xsl:attribute>
+                        <xsl:value-of select="@name"/>
+                    </a>
+                </td>
+                <td><xsl:value-of select="count(../file[@name = $name]/error)"/></td>
+            </tr>
+        <!--</xsl:if>-->
+    </xsl:template>
+
+    <xsl:template match="file" mode="all.classes">
+
+        <xsl:variable name="new-name">
+            <xsl:call-template name="from-dos">
+                <xsl:with-param name="path" select="@name"/>
+            </xsl:call-template>
+        </xsl:variable>
+        <tr>
+            <td nowrap="nowrap">
+                <a target="fileFrame">
+                    <xsl:attribute name="href">
+                        <xsl:text>files/</xsl:text>
+                        <xsl:value-of select="$new-name"/>
+                        <xsl:text>.html</xsl:text>
+                    </xsl:attribute>
+                    <xsl:value-of select="@name"/>
+                </a>
+            </td>
+        </tr>
+    </xsl:template>
+
+    <!--
+    transform string like a/b/c to ../../../
+    @param path the path to transform into a descending directory path
+    -->
+    <xsl:template name="path">
+        <xsl:param name="path"/>
+        <xsl:if test="contains($path,'/')">
+            <xsl:text>../</xsl:text>
+            <xsl:call-template name="path">
+                <xsl:with-param name="path"><xsl:value-of select="substring-after($path,'/')"/></xsl:with-param>
+            </xsl:call-template>
+        </xsl:if>
+        <xsl:if test="not(contains($path,'/')) and not($path = '')">
+            <xsl:text>../</xsl:text>
+        </xsl:if>
+    </xsl:template>
+
+    <xsl:template match="file">
+        <xsl:variable name="name" select="@name"/>
+
+        <xsl:variable name="new-name">
+            <xsl:call-template name="from-dos">
+                <xsl:with-param name="path" select="@name"/>
+            </xsl:call-template>
+        </xsl:variable>
+        <redirect:write file="{$output.dir}/files/{$new-name}.html">
+            <html>
+                <head>
+                    <link rel="stylesheet" type="text/css">
+                        <xsl:attribute name="href">
+                            <xsl:call-template name="path">
+                                <xsl:with-param name="path" select="$new-name"/>
+                            </xsl:call-template>
+                            <xsl:text>stylesheet.css</xsl:text>
+                        </xsl:attribute>
+                    </link>
+                </head>
+                <body>
+                    <xsl:call-template name="pageHeader"/>
+                    <h3>File <xsl:value-of select="@name"/> </h3>
+                    <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+                        <tr>
+                            <th>Error Description</th>
+                            <th>Line</th>
+                        </tr>
+                        <xsl:for-each select="../file[@name = $name]/error">
+                            <tr>
+                                <xsl:call-template name="alternated-row"/>
+                                <td>
+                                    <xsl:value-of select="@message"/>
+                                </td>
+                                <td>
+                                    <xsl:value-of select="@line"/>
+                                </td>
+                            </tr>
+                        </xsl:for-each>
+                    </table>
+                </body>
+            </html>
+        </redirect:write>
+    </xsl:template>
+
+    <xsl:template match="checkstyle" mode="summary">
+        <h3>Summary</h3>
+        <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+            <tr>
+                <th>Files</th>
+                <th>Files with Errors</th>
+                <th>Errors</th>
+            </tr>
+            <tr>
+                <xsl:call-template name="alternated-row"/>
+                <td><xsl:value-of select="count($allFiles)"/></td>
+                <td><xsl:value-of select="count($allFilesWithError)"/></td>
+                <td><xsl:value-of select="count(file/error)"/></td>
+            </tr>
+        </table>
+        <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+            <tr>
+                <th>Check</th>
+                <th>Number of Violations</th>
+            </tr>
+            <xsl:for-each select="file/error[@source and generate-id(.) = generate-id(key('violations', @source))]">
+                <xsl:sort select="@source"/>
+                <xsl:variable name="source" select="@source"/>
+                <tr>
+                    <xsl:call-template name="alternated-row"/>
+                    <td>
+                        <xsl:value-of select="$source"/>
+                    </td>
+                    <td>
+                        <xsl:value-of select="count(/checkstyle/file/error[@source=$source])"/>
+                    </td>
+                </tr>
+            </xsl:for-each>
+        </table>
+    </xsl:template>
+
+    <xsl:template name="alternated-row">
+        <xsl:attribute name="class">
+            <xsl:if test="position() mod 2 = 1">a</xsl:if>
+            <xsl:if test="position() mod 2 = 0">b</xsl:if>
+        </xsl:attribute>
+    </xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/contrib/checkstyle-frames.xsl b/contrib/checkstyle-frames.xsl
new file mode 100644
index 0000000..31b0a93
--- /dev/null
+++ b/contrib/checkstyle-frames.xsl
@@ -0,0 +1,382 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:lxslt="http://xml.apache.org/xslt"
+    xmlns:redirect="http://xml.apache.org/xalan/redirect"
+    extension-element-prefixes="redirect">
+
+<!--
+ The Apache Software License, Version 1.1
+
+ Copyright (c) 2002 The Apache Software Foundation.  All rights
+ reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ 3. The end-user documentation included with the redistribution, if
+    any, must include the following acknowlegement:
+       "This product includes software developed by the
+        Apache Software Foundation (http://www.apache.org/)."
+    Alternately, this acknowlegement may appear in the software itself,
+    if and wherever such third-party acknowlegements normally appear.
+
+ 4. The names "The Jakarta Project", "Ant", and "Apache Software
+    Foundation" must not be used to endorse or promote products derived
+    from this software without prior written permission. For written
+    permission, please contact apache at apache.org.
+
+ 5. Products derived from this software may not be called "Apache"
+    nor may "Apache" appear in their names without prior written
+    permission of the Apache Group.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+ ====================================================================
+
+ This software consists of voluntary contributions made by many
+ individuals on behalf of the Apache Software Foundation.  For more
+ information on the Apache Software Foundation, please see
+ <http://www.apache.org/>.
+ -->
+
+    <xsl:output method="html" indent="yes" encoding="US-ASCII"/>
+    <xsl:decimal-format decimal-separator="." grouping-separator="," />
+
+    <xsl:param name="output.dir" select="'.'"/>
+
+    <xsl:template match="checkstyle">
+        <!-- create the index.html -->
+        <redirect:write file="{$output.dir}/index.html">
+            <xsl:call-template name="index.html"/>
+        </redirect:write>
+
+        <!-- create the stylesheet.css -->
+        <redirect:write file="{$output.dir}/stylesheet.css">
+            <xsl:call-template name="stylesheet.css"/>
+        </redirect:write>
+
+        <!-- create the overview-summary.html at the root -->
+        <redirect:write file="{$output.dir}/overview-frame.html">
+            <xsl:apply-templates select="." mode="overview"/>
+        </redirect:write>
+
+        <!-- create the all-classes.html at the root -->
+        <redirect:write file="{$output.dir}/allclasses-frame.html">
+            <xsl:apply-templates select="." mode="all.classes"/>
+        </redirect:write>
+
+        <!-- process all files -->
+        <xsl:apply-templates select="file"/>
+    </xsl:template>
+
+    <xsl:template name="index.html">
+        <html>
+            <head>
+                <title>CheckStyle Audit</title>
+            </head>
+            <frameset cols="20%,80%">
+                <frame src="allclasses-frame.html" name="fileListFrame"/>
+                <frame src="overview-frame.html" name="fileFrame"/>
+            </frameset>
+            <noframes>
+                <h2>Frame Alert</h2>
+                <p>
+                    This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
+                </p>
+            </noframes>
+        </html>
+    </xsl:template>
+
+    <xsl:template name="pageHeader">
+        <table border="0" cellpadding="0" cellspacing="0" width="100%">
+            <tr>
+                <td class="text-align:right"><h2>CheckStyle Audit</h2></td>
+            </tr>
+            <tr>
+                <td class="text-align:right">Designed for use with <a href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
+            </tr>
+        </table>
+        <hr size="1"/>
+    </xsl:template>
+
+    <xsl:template match="checkstyle" mode="overview">
+        <html>
+            <head>
+                <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
+            </head>
+            <body>
+                <!-- page header -->
+                <xsl:call-template name="pageHeader"/>
+
+                <!-- Summary part -->
+                <xsl:apply-templates select="." mode="summary"/>
+                <hr size="1" width="100%" align="left"/>
+
+                <!-- File list part -->
+                <xsl:apply-templates select="." mode="filelist"/>
+            </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template name="stylesheet.css">
+        .bannercell {
+        border: 0px;
+        padding: 0px;
+        }
+        body {
+        margin-left: 10;
+        margin-right: 10;
+        font:normal 80% arial,helvetica,sanserif;
+        background-color:#FFFFFF;
+        color:#000000;
+        }
+        .a td {
+        background: #efefef;
+        }
+        .b td {
+        background: #fff;
+        }
+        th, td {
+        text-align: left;
+        vertical-align: top;
+        }
+        th {
+        font-weight:bold;
+        background: #ccc;
+        color: black;
+        }
+        table, th, td {
+        font-size:100%;
+        border: none
+        }
+        table.log tr td, tr th {
+
+        }
+        h2 {
+        font-weight:bold;
+        font-size:140%;
+        margin-bottom: 5;
+        }
+        h3 {
+        font-size:100%;
+        font-weight:bold;
+        background: #525D76;
+        color: white;
+        text-decoration: none;
+        padding: 5px;
+        margin-right: 2px;
+        margin-left: 2px;
+        margin-bottom: 0;
+        }
+    </xsl:template>
+
+    <!--
+    Replace DOS characters in a path.
+    Replace '\' with '/', ':' with '_'.
+    -->
+    <xsl:template name="from-dos">
+        <xsl:param name="path"/>
+        <xsl:value-of select="translate($path, '\:', '/_')"/>
+    </xsl:template>
+    
+    <!--
+    Creates an all-classes.html file that contains a link to all files.
+    -->
+    <xsl:template match="checkstyle" mode="all.classes">
+        <html>
+            <head>
+                <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
+            </head>
+            <body>
+                <h2>Files</h2>
+                <p><a href="overview-frame.html" target="fileFrame">Summary</a></p>
+                <p>
+                    <table width="100%">
+                        <!-- For each file create its part -->
+                        <xsl:apply-templates select="file" mode="all.classes">
+                            <xsl:sort select="@name"/>
+                        </xsl:apply-templates>
+                    </table>
+                </p>
+            </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="checkstyle" mode="filelist">
+        <h3>Files</h3>
+        <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+            <tr>
+                <th>Name</th>
+                <th>Errors</th>
+            </tr>
+            <xsl:apply-templates select="file" mode="filelist">
+                <xsl:sort select="@name"/>
+            </xsl:apply-templates>
+        </table>
+    </xsl:template>
+
+    <xsl:template match="file" mode="filelist">
+        <xsl:variable name="first">
+            <xsl:call-template name="isfirst">
+                <xsl:with-param name="name" select="@name"/>
+            </xsl:call-template>
+        </xsl:variable>
+        <xsl:variable name="name" select="@name" />
+
+        <xsl:if test="$first = 'true'">
+            <xsl:variable name="new-name">
+                <xsl:call-template name="from-dos">
+                    <xsl:with-param name="path" select="@name"/>
+                </xsl:call-template>
+            </xsl:variable>
+            <tr>
+                <xsl:call-template name="alternated-row" />
+                <td nowrap="nowrap">
+                    <a>
+                        <xsl:attribute name="href">
+                            <xsl:text>files/</xsl:text><xsl:value-of select="$new-name"/><xsl:text>.html</xsl:text>
+                        </xsl:attribute>
+                        <xsl:value-of select="@name"/>
+                    </a>
+                </td>
+                <td><xsl:value-of select="count(../file[@name = $name]/error)"/></td>
+            </tr>
+        </xsl:if>
+    </xsl:template>
+
+    <xsl:template match="file" mode="all.classes">
+        <xsl:variable name="first">
+            <xsl:call-template name="isfirst">
+                <xsl:with-param name="name" select="@name"/>
+            </xsl:call-template>
+        </xsl:variable>
+
+        <xsl:if test="$first = 'true'">
+            <xsl:variable name="new-name">
+                <xsl:call-template name="from-dos">
+                    <xsl:with-param name="path" select="@name"/>
+                </xsl:call-template>
+            </xsl:variable>
+            <tr>
+                <td nowrap="nowrap">
+                    <a target="fileFrame">
+                        <xsl:attribute name="href">
+                            <xsl:text>files/</xsl:text><xsl:value-of select="$new-name"/><xsl:text>.html</xsl:text>
+                        </xsl:attribute>
+                        <xsl:value-of select="@name"/>
+                    </a>
+                </td>
+            </tr>
+        </xsl:if>
+    </xsl:template>
+
+    <!--
+    transform string like a/b/c to ../../../
+    @param path the path to transform into a descending directory path
+    -->
+    <xsl:template name="path">
+        <xsl:param name="path"/>
+        <xsl:if test="contains($path,'/')">
+            <xsl:text>../</xsl:text>
+            <xsl:call-template name="path">
+                <xsl:with-param name="path"><xsl:value-of select="substring-after($path,'/')"/></xsl:with-param>
+            </xsl:call-template>
+        </xsl:if>
+        <xsl:if test="not(contains($path,'/')) and not($path = '')">
+            <xsl:text>../</xsl:text>
+        </xsl:if>
+    </xsl:template>
+
+    <xsl:template match="file">
+        <xsl:variable name="first">
+            <xsl:call-template name="isfirst">
+                <xsl:with-param name="name" select="@name"/>
+            </xsl:call-template>
+        </xsl:variable>
+        <xsl:variable name="name" select="@name" />
+
+        <xsl:if test="$first = 'true'">
+            <xsl:variable name="new-name">
+                <xsl:call-template name="from-dos">
+                    <xsl:with-param name="path" select="@name"/>
+                </xsl:call-template>
+            </xsl:variable>
+            <redirect:write file="{$output.dir}/files/{$new-name}.html">
+                <html>
+                    <head>
+                        <link rel="stylesheet" type="text/css">
+                            <xsl:attribute name="href"><xsl:call-template name="path"><xsl:with-param name="path" select="$new-name"/></xsl:call-template><xsl:text>stylesheet.css</xsl:text></xsl:attribute>
+                        </link>
+                    </head>
+                    <body>
+                        <xsl:call-template name="pageHeader"/>
+                        <h3>File <xsl:value-of select="@name"/></h3>
+                        <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+                            <tr>
+                                <th>Error Description</th>
+                                <th>Line</th>
+                            </tr>
+                            <xsl:for-each select="../file[@name = $name]/error">
+                                <tr>
+                                    <xsl:call-template name="alternated-row"/>
+                                    <td><xsl:value-of select="@message"/></td>
+                                    <td><xsl:value-of select="@line"/></td>
+                                </tr>
+                            </xsl:for-each>
+                        </table>
+                    </body>
+                </html>
+            </redirect:write>
+        </xsl:if>
+    </xsl:template>
+
+    <xsl:template match="checkstyle" mode="summary">
+        <h3>Summary</h3>
+        <xsl:variable name="fileCount" select="count(file)"/>
+        <xsl:variable name="errorCount" select="count(file/error)"/>
+        <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+            <tr>
+                <th>Files</th>
+                <th>Errors</th>
+            </tr>
+            <tr>
+                <xsl:call-template name="alternated-row"/>
+                <td><xsl:value-of select="$fileCount"/></td>
+                <td><xsl:value-of select="$errorCount"/></td>
+            </tr>
+        </table>
+    </xsl:template>
+
+    <xsl:template name="alternated-row">
+        <xsl:attribute name="class">
+            <xsl:if test="position() mod 2 = 1">a</xsl:if>
+            <xsl:if test="position() mod 2 = 0">b</xsl:if>
+        </xsl:attribute>
+    </xsl:template>
+
+    <!-- determine if this is the first occurance of the given name in the input -->
+    <xsl:template name="isfirst">
+        <xsl:param name="name"/>
+        <xsl:value-of select="count(preceding-sibling::file[@name=$name]) = 0"/>
+    </xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/contrib/checkstyle-noframes-severity-sorted.xsl b/contrib/checkstyle-noframes-severity-sorted.xsl
new file mode 100644
index 0000000..1dd8778
--- /dev/null
+++ b/contrib/checkstyle-noframes-severity-sorted.xsl
@@ -0,0 +1,210 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html" indent="yes"/>
+<xsl:decimal-format decimal-separator="." grouping-separator="," />
+
+<xsl:key name="files" match="file" use="@name" />
+
+<!-- Checkstyle XML Style Sheet by Rolf Wojtech <rolf at wojtech.de>                   -->
+<!-- (based on checkstyle-noframe-sorted.xsl by Stephane Bailliez                   -->
+<!--  <sbailliez at apache.org> and sf-patch 1721291 by Leo Liang)                     -->
+<!-- Changes: 																								                      -->
+<!--  * Outputs seperate columns for error/warning/info                             -->
+<!--  * Sorts primarily by #error, secondarily by #warning, tertiary by #info       -->
+<!--  * Compatible with windows path names (converts '\' to '/' for html anchor)    -->
+<!--                                                                                -->
+<!-- Part of the Checkstyle distribution found at http://checkstyle.sourceforge.net -->
+<!-- Usage (generates checkstyle_report.html):                                      -->
+<!--    <checkstyle failonviolation="false" config="${check.config}">               -->
+<!--      <fileset dir="${src.dir}" includes="**/*.java"/>                          -->
+<!--      <formatter type="xml" toFile="${doc.dir}/checkstyle_report.xml"/>         -->
+<!--    </checkstyle>                                                               -->
+<!--    <style basedir="${doc.dir}" destdir="${doc.dir}"                            -->
+<!--            includes="checkstyle_report.xml"                                    -->
+<!--            style="${doc.dir}/checkstyle-noframes-severity-sorted.xsl"/>        -->
+
+<xsl:template match="checkstyle">
+  <html>
+    <head>
+    <style type="text/css">
+    .bannercell {
+      border: 0px;
+      padding: 0px;
+    }
+    body {
+      margin-left: 10;
+      margin-right: 10;
+      font:normal 80% arial,helvetica,sanserif;
+      background-color:#FFFFFF;
+      color:#000000;
+    }
+    .a td {
+      background: #efefef;
+    }
+    .b td {
+      background: #fff;
+    }
+    th, td {
+      text-align: left;
+      vertical-align: top;
+    }
+    th {
+      font-weight:bold;
+      background: #ccc;
+      color: black;
+    }
+    table, th, td {
+      font-size:100%;
+      border: none
+    }
+    table.log tr td, tr th {
+
+    }
+    h2 {
+      font-weight:bold;
+      font-size:140%;
+      margin-bottom: 5;
+    }
+    h3 {
+      font-size:100%;
+      font-weight:bold;
+      background: #525D76;
+      color: white;
+      text-decoration: none;
+      padding: 5px;
+      margin-right: 2px;
+      margin-left: 2px;
+      margin-bottom: 0;
+    }
+    </style>
+    </head>
+    <body>
+      <a name="top"></a>
+      <!-- jakarta logo -->
+      <table border="0" cellpadding="0" cellspacing="0" width="100%">
+      <tr>
+        <td class="bannercell" rowspan="2">
+          <!--a href="http://jakarta.apache.org/">
+          <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
+          </a-->
+        </td>
+        <td class="text-align:right"><h2>CheckStyle Audit</h2></td>
+        </tr>
+        <tr>
+        <td class="text-align:right">Designed for use with <a href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
+        </tr>
+      </table>
+      <hr size="1"/>
+
+      <!-- Summary part -->
+      <xsl:apply-templates select="." mode="summary"/>
+      <hr size="1" width="100%" align="left"/>
+
+      <!-- Package List part -->
+      <xsl:apply-templates select="." mode="filelist"/>
+      <hr size="1" width="100%" align="left"/>
+
+      <!-- For each package create its part -->
+            <xsl:apply-templates select="file[@name and generate-id(.) = generate-id(key('files', @name))]" />
+
+      <hr size="1" width="100%" align="left"/>
+
+
+    </body>
+  </html>
+</xsl:template>
+
+
+
+  <xsl:template match="checkstyle" mode="filelist">
+    <h3>Files</h3>
+    <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+      <tr>
+        <th>Name</th>
+        <th>Errors</th>
+        <th>Warnings</th>
+        <th>Infos</th>
+      </tr>
+      <xsl:for-each select="file[@name and generate-id(.) = generate-id(key('files', @name))]">
+
+        <!-- Sort method 1: Primary by #error, secondary by #warning, tertiary by #info -->
+        <xsl:sort data-type="number" order="descending" select="count(key('files', @name)/error[@severity='error'])"/>
+        <xsl:sort data-type="number" order="descending" select="count(key('files', @name)/error[@severity='warning'])"/>
+        <xsl:sort data-type="number" order="descending" select="count(key('files', @name)/error[@severity='info'])"/>
+        
+        <!-- Sort method 1: Sum(#error+#info+#warning) (uncomment to use, comment method 1)  -->
+        <!--
+        <xsl:sort data-type="number" order="descending" select="count(key('files', @name)/error)"/>
+        -->
+
+        <xsl:variable name="errorCount" select="count(key('files', @name)/error[@severity='error'])"/>
+        <xsl:variable name="warningCount" select="count(key('files', @name)/error[@severity='warning'])"/>
+        <xsl:variable name="infoCount" select="count(key('files', @name)/error[@severity='info'])"/>
+
+        <tr>
+          <xsl:call-template name="alternated-row"/>
+          <td><a href="#f-{translate(@name,'\','/')}"><xsl:value-of select="@name"/></a></td>
+          <td><xsl:value-of select="$errorCount"/></td>
+          <td><xsl:value-of select="$warningCount"/></td>
+          <td><xsl:value-of select="$infoCount"/></td>
+        </tr>
+      </xsl:for-each>
+    </table>
+  </xsl:template>
+
+
+  <xsl:template match="file">
+    <a name="f-{translate(@name,'\','/')}"></a>
+    <h3>File <xsl:value-of select="@name"/></h3>
+
+    <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+      <tr>
+        <th>Severity</th>
+        <th>Error Description</th>
+        <th>Line</th>
+      </tr>
+        <xsl:for-each select="key('files', @name)/error">
+          <xsl:sort data-type="number" order="ascending" select="@line"/>
+      <tr>
+        <xsl:call-template name="alternated-row"/>
+        <td><xsl:value-of select="@severity"/></td>
+        <td><xsl:value-of select="@message"/></td>
+        <td><xsl:value-of select="@line"/></td>
+      </tr>
+      </xsl:for-each>
+    </table>
+    <a href="#top">Back to top</a>
+  </xsl:template>
+
+
+  <xsl:template match="checkstyle" mode="summary">
+    <h3>Summary</h3>
+        <xsl:variable name="fileCount" select="count(file[@name and generate-id(.) = generate-id(key('files', @name))])"/>
+    <xsl:variable name="errorCount" select="count(file/error[@severity='error'])"/>
+    <xsl:variable name="warningCount" select="count(file/error[@severity='warning'])"/>
+    <xsl:variable name="infoCount" select="count(file/error[@severity='info'])"/>
+    <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+    <tr>
+      <th>Files</th>
+      <th>Errors</th>
+      <th>Warnings</th>
+      <th>Infos</th>
+    </tr>
+    <tr>
+      <xsl:call-template name="alternated-row"/>
+      <td><xsl:value-of select="$fileCount"/></td>
+      <td><xsl:value-of select="$errorCount"/></td>
+      <td><xsl:value-of select="$warningCount"/></td>
+      <td><xsl:value-of select="$infoCount"/></td>
+    </tr>
+    </table>
+  </xsl:template>
+
+  <xsl:template name="alternated-row">
+    <xsl:attribute name="class">
+      <xsl:if test="position() mod 2 = 1">a</xsl:if>
+      <xsl:if test="position() mod 2 = 0">b</xsl:if>
+    </xsl:attribute>
+  </xsl:template>
+</xsl:stylesheet>
+
+
diff --git a/contrib/checkstyle-noframes-sorted.xsl b/contrib/checkstyle-noframes-sorted.xsl
new file mode 100644
index 0000000..da6a651
--- /dev/null
+++ b/contrib/checkstyle-noframes-sorted.xsl
@@ -0,0 +1,179 @@
+<xsl:stylesheet	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html" indent="yes"/>
+<xsl:decimal-format decimal-separator="." grouping-separator="," />
+
+<xsl:key name="files" match="file" use="@name" />
+
+<!-- Checkstyle XML Style Sheet by Stephane Bailliez <sbailliez at apache.org>         -->
+<!-- Part of the Checkstyle distribution found at http://checkstyle.sourceforge.net -->
+<!-- Usage (generates checkstyle_report.html):                                      -->
+<!--    <checkstyle failonviolation="false" config="${check.config}">               -->
+<!--      <fileset dir="${src.dir}" includes="**/*.java"/>                          -->
+<!--      <formatter type="xml" toFile="${doc.dir}/checkstyle_report.xml"/>         -->
+<!--    </checkstyle>                                                               -->
+<!--    <style basedir="${doc.dir}" destdir="${doc.dir}"                            -->
+<!--            includes="checkstyle_report.xml"                                    -->
+<!--            style="${doc.dir}/checkstyle-noframes-sorted.xsl"/>                 -->
+
+<xsl:template match="checkstyle">
+	<html>
+		<head>
+		<style type="text/css">
+    .bannercell {
+      border: 0px;
+      padding: 0px;
+    }
+    body {
+      margin-left: 10;
+      margin-right: 10;
+      font:normal 80% arial,helvetica,sanserif;
+      background-color:#FFFFFF;
+      color:#000000;
+    }
+    .a td {
+      background: #efefef;
+    }
+    .b td {
+      background: #fff;
+    }
+    th, td {
+      text-align: left;
+      vertical-align: top;
+    }
+    th {
+      font-weight:bold;
+      background: #ccc;
+      color: black;
+    }
+    table, th, td {
+      font-size:100%;
+      border: none
+    }
+    table.log tr td, tr th {
+
+    }
+    h2 {
+      font-weight:bold;
+      font-size:140%;
+      margin-bottom: 5;
+    }
+    h3 {
+      font-size:100%;
+      font-weight:bold;
+      background: #525D76;
+      color: white;
+      text-decoration: none;
+      padding: 5px;
+      margin-right: 2px;
+      margin-left: 2px;
+      margin-bottom: 0;
+    }
+		</style>
+		</head>
+		<body>
+			<a name="top"></a>
+      <!-- jakarta logo -->
+      <table border="0" cellpadding="0" cellspacing="0" width="100%">
+      <tr>
+        <td class="bannercell" rowspan="2">
+          <!--a href="http://jakarta.apache.org/">
+          <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
+          </a-->
+        </td>
+    		<td class="text-align:right"><h2>CheckStyle Audit</h2></td>
+    		</tr>
+    		<tr>
+    		<td class="text-align:right">Designed for use with <a href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
+    		</tr>
+      </table>
+    	<hr size="1"/>
+
+			<!-- Summary part -->
+			<xsl:apply-templates select="." mode="summary"/>
+			<hr size="1" width="100%" align="left"/>
+
+			<!-- Package List part -->
+			<xsl:apply-templates select="." mode="filelist"/>
+			<hr size="1" width="100%" align="left"/>
+
+			<!-- For each package create its part -->
+            <xsl:apply-templates select="file[@name and generate-id(.) = generate-id(key('files', @name))]" />
+
+			<hr size="1" width="100%" align="left"/>
+
+
+		</body>
+	</html>
+</xsl:template>
+
+
+
+	<xsl:template match="checkstyle" mode="filelist">
+		<h3>Files</h3>
+		<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+      <tr>
+        <th>Name</th>
+        <th>Errors</th>
+      </tr>
+          <xsl:for-each select="file[@name and generate-id(.) = generate-id(key('files', @name))]">
+                <xsl:sort data-type="number" order="descending" select="count(key('files', @name)/error)"/>
+                <xsl:variable name="currentName" select="@name" />
+                <xsl:variable name="errorCount" select="count(key('files', @name)/error)"/>
+                <tr>
+          <xsl:call-template name="alternated-row"/>
+					<td><a href="#f-{@name}"><xsl:value-of select="@name"/></a></td>
+					<td><xsl:value-of select="$errorCount"/></td>
+				</tr>
+			</xsl:for-each>
+		</table>
+	</xsl:template>
+
+
+	<xsl:template match="file">
+    <a name="f-{@name}"></a>
+    <h3>File <xsl:value-of select="@name"/></h3>
+
+    <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+    	<tr>
+    	  <th>Error Description</th>
+    	  <th>Line</th>
+      </tr>
+        <xsl:for-each select="key('files', @name)/error">
+          <xsl:sort data-type="number" order="ascending" select="@line"/>
+    	<tr>
+        <xsl:call-template name="alternated-row"/>
+    	  <td><xsl:value-of select="@message"/></td>
+    	  <td><xsl:value-of select="@line"/></td>
+    	</tr>
+    	</xsl:for-each>
+    </table>
+    <a href="#top">Back to top</a>
+	</xsl:template>
+
+
+	<xsl:template match="checkstyle" mode="summary">
+		<h3>Summary</h3>
+        <xsl:variable name="fileCount" select="count(file[@name and generate-id(.) = generate-id(key('files', @name))])"/>
+		<xsl:variable name="errorCount" select="count(file/error)"/>
+		<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+		<tr>
+			<th>Files</th>
+			<th>Errors</th>
+		</tr>
+		<tr>
+		  <xsl:call-template name="alternated-row"/>
+			<td><xsl:value-of select="$fileCount"/></td>
+			<td><xsl:value-of select="$errorCount"/></td>
+		</tr>
+		</table>
+	</xsl:template>
+
+  <xsl:template name="alternated-row">
+    <xsl:attribute name="class">
+      <xsl:if test="position() mod 2 = 1">a</xsl:if>
+      <xsl:if test="position() mod 2 = 0">b</xsl:if>
+    </xsl:attribute>
+  </xsl:template>
+</xsl:stylesheet>
+
+
diff --git a/contrib/checkstyle-noframes.xsl b/contrib/checkstyle-noframes.xsl
new file mode 100644
index 0000000..393a01b
--- /dev/null
+++ b/contrib/checkstyle-noframes.xsl
@@ -0,0 +1,179 @@
+<xsl:stylesheet	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html" indent="yes"/>
+<xsl:decimal-format decimal-separator="." grouping-separator="," />
+
+<!-- Checkstyle XML Style Sheet by Stephane Bailliez <sbailliez at apache.org>         -->
+<!-- Part of the Checkstyle distribution found at http://checkstyle.sourceforge.net -->
+<!-- Usage (generates checkstyle_report.html):                                      -->
+<!--    <checkstyle failonviolation="false" config="${check.config}">               -->
+<!--      <fileset dir="${src.dir}" includes="**/*.java"/>                          -->
+<!--      <formatter type="xml" toFile="${doc.dir}/checkstyle_report.xml"/>         -->
+<!--    </checkstyle>                                                               -->
+<!--    <style basedir="${doc.dir}" destdir="${doc.dir}"                            -->
+<!--            includes="checkstyle_report.xml"                                    -->
+<!--            style="${doc.dir}/checkstyle-noframes.xsl"/>                        -->
+
+<xsl:template match="checkstyle">
+	<html>
+		<head>
+		<style type="text/css">
+    .bannercell {
+      border: 0px;
+      padding: 0px;
+    }
+    body {
+      margin-left: 10;
+      margin-right: 10;
+      font:normal 80% arial,helvetica,sanserif;
+      background-color:#FFFFFF;
+      color:#000000;
+    }
+    .a td { 
+      background: #efefef;
+    }
+    .b td { 
+      background: #fff;
+    }
+    th, td {
+      text-align: left;
+      vertical-align: top;
+    }
+    th {
+      font-weight:bold;
+      background: #ccc;
+      color: black;
+    }
+    table, th, td {
+      font-size:100%;
+      border: none
+    }
+    table.log tr td, tr th {
+      
+    }
+    h2 {
+      font-weight:bold;
+      font-size:140%;
+      margin-bottom: 5;
+    }
+    h3 {
+      font-size:100%;
+      font-weight:bold;
+      background: #525D76;
+      color: white;
+      text-decoration: none;
+      padding: 5px;
+      margin-right: 2px;
+      margin-left: 2px;
+      margin-bottom: 0;
+    }
+		</style>
+		</head>
+		<body>
+			<a name="top"></a>
+      <!-- jakarta logo -->
+      <table border="0" cellpadding="0" cellspacing="0" width="100%">
+      <tr>
+        <td class="bannercell" rowspan="2">
+          <!--a href="http://jakarta.apache.org/">
+          <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
+          </a-->
+        </td>
+    		<td class="text-align:right"><h2>CheckStyle Audit</h2></td>
+    		</tr>
+    		<tr>
+    		<td class="text-align:right">Designed for use with <a href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
+    		</tr>
+      </table>
+    	<hr size="1"/>
+			
+			<!-- Summary part -->
+			<xsl:apply-templates select="." mode="summary"/>
+			<hr size="1" width="100%" align="left"/>
+			
+			<!-- Package List part -->
+			<xsl:apply-templates select="." mode="filelist"/>
+			<hr size="1" width="100%" align="left"/>
+			
+			<!-- For each package create its part -->
+			<xsl:for-each select="file">
+			  <xsl:sort select="@name"/>
+			  <xsl:apply-templates select="."/>
+			  <p/>
+			  <p/>
+			</xsl:for-each>
+			<hr size="1" width="100%" align="left"/>
+			
+			
+		</body>
+	</html>
+</xsl:template>
+	
+	
+	
+	<xsl:template match="checkstyle" mode="filelist">	
+		<h3>Files</h3>
+		<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+      <tr>
+        <th>Name</th>
+        <th>Errors</th>
+      </tr>
+			<xsl:for-each select="file">
+				<xsl:sort select="@name"/>
+				<xsl:variable name="errorCount" select="count(error)"/>				
+				<tr>
+          <xsl:call-template name="alternated-row"/>
+					<td><a href="#f-{@name}"><xsl:value-of select="@name"/></a></td>
+					<td><xsl:value-of select="$errorCount"/></td>
+				</tr>
+			</xsl:for-each>
+		</table>		
+	</xsl:template>
+	
+	
+	<xsl:template match="file">
+    <a name="f-{@name}"></a>
+    <h3>File <xsl:value-of select="@name"/></h3>
+    
+    <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+    	<tr>
+    	  <th>Error Description</th>
+    	  <th>Line</th>
+      </tr>
+      <xsl:for-each select="error">
+    	<tr>
+        <xsl:call-template name="alternated-row"/>
+    	  <td><xsl:value-of select="@message"/></td>
+    	  <td><xsl:value-of select="@line"/></td>
+    	</tr>
+    	</xsl:for-each>
+    </table>
+    <a href="#top">Back to top</a>
+	</xsl:template>
+	
+	
+	<xsl:template match="checkstyle" mode="summary">
+		<h3>Summary</h3>
+		<xsl:variable name="fileCount" select="count(file)"/>
+		<xsl:variable name="errorCount" select="count(file/error)"/>
+		<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+		<tr>
+			<th>Files</th>
+			<th>Errors</th>
+		</tr>
+		<tr>
+		  <xsl:call-template name="alternated-row"/>
+			<td><xsl:value-of select="$fileCount"/></td>
+			<td><xsl:value-of select="$errorCount"/></td>
+		</tr>
+		</table>
+	</xsl:template>
+	
+  <xsl:template name="alternated-row">
+    <xsl:attribute name="class">
+      <xsl:if test="position() mod 2 = 1">a</xsl:if>
+      <xsl:if test="position() mod 2 = 0">b</xsl:if>
+    </xsl:attribute>  
+  </xsl:template>	
+</xsl:stylesheet>
+
+
diff --git a/contrib/checkstyle-simple.xsl b/contrib/checkstyle-simple.xsl
new file mode 100644
index 0000000..0bcf5a8
--- /dev/null
+++ b/contrib/checkstyle-simple.xsl
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:template match="/">
+  <html>
+    <head>
+    <title>Sun Coding Style Violations</title>
+    </head>
+    <body bgcolor="#FFFFEF">
+    <p><b>Coding Style Check Results</b></p>
+    <table border="1" cellspacing="0" cellpadding="2">
+	<tr bgcolor="#CC9966">
+	    <th colspan="2"><b>Summary</b></th>
+	</tr>
+	<tr bgcolor="#CCF3D0">
+	    <td>Total files checked</td>
+	    <td><xsl:number level="any" value="count(descendant::file)"/></td>
+	</tr>
+	<tr bgcolor="#F3F3E1">
+	    <td>Files with errors</td>
+	    <td><xsl:number level="any" value="count(descendant::file[error])"/></td>
+	</tr>
+	<tr bgcolor="#CCF3D0">
+	    <td>Total errors</td>
+	    <td><xsl:number level="any" value="count(descendant::error)"/></td>
+	</tr>
+	<tr bgcolor="#F3F3E1">
+	    <td>Errors per file</td>
+	    <td><xsl:number level="any" value="count(descendant::error) div count(descendant::file)"/></td>
+	</tr>
+    </table>
+    <hr align="left" width="95%" size="1"/>
+    <p>The following are violations of the Sun Coding-Style Standards:</p>
+    <p/>
+	<xsl:apply-templates/>
+    </body>
+  </html>
+</xsl:template>
+
+<xsl:template match="file[error]">
+    <table bgcolor="#AFFFFF" width="95%" border="1" cellspacing="0" cellpadding="2">
+	<tr>
+	    <th> File: </th>
+	    <td>
+		<xsl:value-of select="@name"/>
+	    </td>
+	</tr>
+    </table>
+    <table bgcolor="#DFFFFF" width="95%" border="1" cellspacing="0" cellpadding="2">
+	<tr>
+	    <th> Line Number </th>
+	    <th> Error Message </th>
+	</tr>
+	<xsl:apply-templates select="error"/>
+    </table>
+    <p/>
+</xsl:template>
+
+<xsl:template match="error">
+    <tr>
+	<td>
+	    <xsl:value-of select="@line"/>
+	</td>
+	<td>
+	    <xsl:value-of select="@message"/>
+	</td>
+    </tr>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/contrib/checkstyle-text.xsl b/contrib/checkstyle-text.xsl
new file mode 100644
index 0000000..a0ed65f
--- /dev/null
+++ b/contrib/checkstyle-text.xsl
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="text" omit-xml-declaration="yes"/>
+
+<xsl:template match="/">
+Coding Style Check Results
+--------------------------
+Total files checked: <xsl:number level="any" value="count(descendant::file)"/>
+  Files with errors: <xsl:number level="any" value="count(descendant::file[error])"/>
+       Total errors: <xsl:number level="any" value="count(descendant::error)"/>
+    Errors per file: <xsl:number level="any" value="count(descendant::error) div count(descendant::file)"/>
+<xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="file[error]">
+File: <xsl:value-of select="@name"/><xsl:text>
+</xsl:text>
+<xsl:apply-templates select="error"/>
+</xsl:template>
+
+<xsl:template match="error">
+<xsl:value-of select="@line"/>:<xsl:value-of select="@column"/><xsl:text> - </xsl:text><xsl:value-of select="@message"/><xsl:text>
+</xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/contrib/examples/XInclude/NamespacesSAXParserFactoryImpl.java b/contrib/examples/XInclude/NamespacesSAXParserFactoryImpl.java
new file mode 100644
index 0000000..6a62577
--- /dev/null
+++ b/contrib/examples/XInclude/NamespacesSAXParserFactoryImpl.java
@@ -0,0 +1,21 @@
+package com.puppycrawl.tools.checkstyle;
+
+import org.apache.xerces.jaxp.SAXParserFactoryImpl;
+
+/**
+ * A parser factory that produces parsers that support XML namespaces. 
+ * @author Rick Giles
+ * @version May 28, 2004
+ */
+public class NamespacesSAXParserFactoryImpl extends SAXParserFactoryImpl
+{
+    /**
+     * Constructs a NamespacesSAXParserFactoryImpl. Initializes
+     * it to produce parsers that support XML namespaces. 
+     */
+    public NamespacesSAXParserFactoryImpl()
+    {
+        super();
+        setNamespaceAware(true);
+    }
+}
diff --git a/contrib/examples/XInclude/config.xml b/contrib/examples/XInclude/config.xml
new file mode 100644
index 0000000..06f65e3
--- /dev/null
+++ b/contrib/examples/XInclude/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!DOCTYPE module [
+<!ELEMENT module (module|property|xi:include)*>
+<!ATTLIST module name NMTOKEN #REQUIRED>
+
+<!ELEMENT xi:include EMPTY>
+<!ATTLIST xi:include
+    href CDATA #REQUIRED
+    xmlns:xi CDATA #REQUIRED
+>
+
+<!ELEMENT property EMPTY>
+<!ATTLIST property
+    name NMTOKEN #REQUIRED
+    value CDATA #REQUIRED
+    default CDATA #IMPLIED
+>
+
+]>
+<module name="Checker">
+    <module name="TreeWalker">
+        <xi:include
+            href="T:/checkstyle/test/xiinclude/treewalker.xml"
+            xmlns:xi="http://www.w3.org/2003/XInclude"/>
+    </module>
+</module>
diff --git a/contrib/examples/XInclude/index.html b/contrib/examples/XInclude/index.html
new file mode 100644
index 0000000..581f5c5
--- /dev/null
+++ b/contrib/examples/XInclude/index.html
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <title>XInclude Processing</title>
+  <link rel="stylesheet" type="text/css" href="../../../docs/mystyle.css"/>
+</head>
+
+<body>
+<h1>XInclude Processing</h1>
+<h3>Description</h3>
+<p>This is an example of how you can separate a Checkstyle configuration file
+into several files and process the configuration using
+<a href="http://www.w3.org/TR/2003/WD-xinclude-20031110/">XInclude processing</a>.
+This requires a SAX parser that supports XML namespaces.
+First we give an example a SAX parser factory that produces parsers supporting XML namespaces
+and indicate how to configure your system to use this factory.
+Then we give an example XML configuration files with XInclude processing and
+an ant target that uses the <a href="../../../docs/anttask.html">Checkstyle ant task</a>
+to check a Java source file with the configuration files. 
+</p>
+<h3>Parsers</h3>
+<p>SAX parser factory <a href="NamespacesSAXParserFactoryImpl.java"><span class="code">NamespacesSAXParserFactoryImpl</span></a>
+is an example of a factory that produces parsers
+supporting XML namespaces:
+<pre>
+package com.puppycrawl.tools.checkstyle;
+
+import org.apache.xerces.jaxp.SAXParserFactoryImpl;
+
+/**
+ * A parser factory that produces parsers that support XML namespaces. 
+ * @author Rick Giles
+ * @version May 28, 2004
+ */
+public class NamespacesSAXParserFactoryImpl extends SAXParserFactoryImpl
+{
+    /**
+     * Constructs a NamespacesSAXParserFactoryImpl. Initializes
+     * it to produce parsers that support XML namespaces. 
+     */
+    public NamespacesSAXParserFactoryImpl()
+    {
+        super();
+        setNamespaceAware(true);
+    }
+}
+</pre>
+</p>
+<p>
+In order to use <span class="code">NamespacesSAXParserFactoryImpl</span> as the
+SAX parser factory, place <span class="code">NamespacesSAXParserFactoryImpl</span>
+in the classpath and
+<a href="http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/SAXParserFactory.html#newInstance()">configure your system</a>
+to load
+<span class="code">NamespacesSAXParserFactoryImpl</span>
+as the <span class="code">SAXParserFactory</span>.
+For example, you can create a file called <span class="code">jaxp.properties</span> 
+in the lib subdirectory of the JRE installation with contents
+<pre>
+javax.xml.parsers.SAXParserFactory=com.puppycrawl.tools.checkstyle.NamespacesSAXParserFactoryImpl
+</pre> 
+</p>  
+<p>
+XInclude processing requires an XML parser that implements XML inclusions.
+Here we use the <a href="http://xml.apache.org/xerces2-j/index.html">Xerces parser</a>
+that is in the ant distribution. In order
+to <a href="http://xml.apache.org/xerces2-j/faq-xinclude.html">enable Xinclude processing</a>,
+you can change the parser configuration by creating a file called <span class="code">xerces.properties</span> 
+in the lib subdirectory of the JRE installation with contents
+<pre>
+org.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration
+</pre>
+<h3>Checkstyle Configuration</h3>
+</p> 
+<p>The Checkstyle configuration of this example is in two files.
+File <a href="config.xml"><span class="code">config.xml</span></a> has an internal DTD that supports
+<span class="code">xi:include</span> elements: 
+<pre>
+<?xml version="1.0"?>
+<!DOCTYPE module [
+<!ELEMENT module (module|property|xi:include)*>
+<!ATTLIST module name NMTOKEN #REQUIRED>
+
+<!ELEMENT xi:include EMPTY>
+<!ATTLIST xi:include
+    href CDATA #REQUIRED
+    xmlns:xi CDATA #REQUIRED
+>
+
+<!ELEMENT property EMPTY>
+<!ATTLIST property
+    name NMTOKEN #REQUIRED
+    value CDATA #REQUIRED
+    default CDATA #IMPLIED
+>
+]>
+<module name="Checker">
+    <module name="TreeWalker">
+        <xi:include
+            href="treewalker.xml"
+            xmlns:xi="http://www.w3.org/2003/XInclude"/>
+    </module>
+</module>
+</pre>
+</p>
+<p>
+The configuration in <span class="code">config.xml</span> includes a second
+configuration file, <a href="treewalker.xml"><span class="code">treewalker.xml</span></a>, that applies
+the <span class="code">TypeName</span> module:
+<pre>
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+<module name="TypeName">
+    <property name="format" value="${typename.format}"/>
+</module>
+</pre>
+</p>
+<p>
+Notice that the configuration of <span class="code">treewalker.xml</span>
+applies property <span class="code">${typename.format}</span>.
+That propery is set in the following segment of an ant build file that uses the
+Checkstyle ant task to check file <span class="code">InputHeader.java</span>
+with the configuration of <span class="code">config.xml</span>:
+<pre>
+    <taskdef
+        resource="checkstyletask.properties"
+        classpath="/path/to/checkstyle-all- at CHECKSTYLE_VERSION@.jar" />
+    <target name="checkstyle" description="run checkstyle">
+        <checkstyle file="InputHeader.java" config="config.xml">
+            <property key="typename.format" value="xyz" />
+        </checkstyle>
+    </target>
+</pre>
+</p>
+</body>
+</html>
\ No newline at end of file
diff --git a/contrib/examples/XInclude/treewalker.xml b/contrib/examples/XInclude/treewalker.xml
new file mode 100644
index 0000000..70b1796
--- /dev/null
+++ b/contrib/examples/XInclude/treewalker.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+<module name="TypeName">
+    <property name="format" value="${typename.format}"/>
+</module>
diff --git a/contrib/examples/checks/all-checkstyle-checks.xml b/contrib/examples/checks/all-checkstyle-checks.xml
new file mode 100644
index 0000000..7b0082b
--- /dev/null
+++ b/contrib/examples/checks/all-checkstyle-checks.xml
@@ -0,0 +1,1122 @@
+<?xml version="1.0"?>
+<!--
+ !_____________________________________________________________________________
+ !
+ !   All CheckStyle checks, with defaults explicitly stated.
+ !
+ !   Can be used as a starting point for custom rule sets.
+ !_____________________________________________________________________________
+ !-->
+<!DOCTYPE module PUBLIC
+          "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+          "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<module name="Checker">
+    <!--
+    <property name="basedir"        value=""/>
+    <property name="localeCountry"  value=""/> JVM locale country
+    <property name="localeLanguage" value=""/> JVM locale language
+    <property name="charset"        value=""/> JVM file.encoding property
+    !-->
+
+
+    <!--
+     !________________________________________________________________________________________
+     !
+     !     D U P L I C A T E S
+     !________________________________________________________________________________________
+     !-->
+    <!-- Performs a line-by-line comparison of all code lines and reports duplicate code. !-->
+    <!-- See http://checkstyle.sf.net/config_duplicates.html !-->
+    <module name="StrictDuplicateCode">
+        <property name="min"            value="12"/>
+        <property name="fileExtensions" value=""/>
+    </module>
+
+
+    <!--
+     !________________________________________________________________________________________
+     !
+     !     H E A D E R S
+     !________________________________________________________________________________________
+     !-->
+    <!-- NOTE:  You may enable zero or one of these header checks, but not both. !-->
+
+    <!-- Checks that a source file begins with a specified header. !-->
+    <!-- See http://checkstyle.sf.net/config_header.html   !-->
+    <!-- Default: OFF
+    <module name="Header">
+        <property name="headerFile"     value=""/>
+        <property name="charset"        value=""/>
+        <property name="header"         value=""/>
+        <property name="ignoreLines"    value=""/>
+        <property name="fileExtensions" value=""/>
+    </module>
+    !-->
+
+    <!-- Checks the header of a source file against a header file that contains a regular expression !-->
+    <!-- for each line of the source header. !-->
+    <!-- See http://checkstyle.sf.net/config_header.html   !-->
+    <!-- Default: OFF
+    <module name="RegexpHeader">
+        <property name="headerFile"     value=""/>
+        <property name="charset"        value=""/>
+        <property name="header"         value=""/>
+        <property name="multiLines"     value=""/>
+        <property name="fileExtensions" value=""/>
+    </module>
+    !-->
+
+    <!--
+     !________________________________________________________________________________________
+     !
+     !     J A V A D O C S
+     !________________________________________________________________________________________
+     !-->
+    <!-- Checks that each Java package has a Javadoc file used for commenting. !-->
+    <!-- See http://checkstyle.sourceforge.net/config_javadoc.html#JavadocPackage !-->
+    <module name="JavadocPackage">
+        <property name="allowLegacy" value="false"/>
+    </module>
+
+
+    <!--
+     !________________________________________________________________________________________
+     !
+     !     R E G E X P
+     !________________________________________________________________________________________
+     !-->
+    <!-- A check for detecting that matches across multiple lines. Works with any file type. !-->
+    <!-- See http://checkstyle.sourceforge.net/config_regexp.html#RegexpMultiline !-->
+    <!-- Default: OFF
+    <module name="RegexpMultiline">
+        <property name="format"         value=""/>
+        <property name="message"        value=""/>
+        <property name="ignoreCase"     value="false"/>
+        <property name="minimum"        value="0"/>
+        <property name="maximum"        value="0"/>
+        <property name="fileExtensions" value=""/>
+    </module>
+    !-->
+
+    <!-- A check for detecting single lines that match a supplied regular expression. Works with any file type. !-->
+    <!-- See http://checkstyle.sourceforge.net/config_regexp.html#RegexpSingleline !-->
+    <!-- Default: OFF
+    <module name="RegexpSingleline">
+        <property name="format"         value=""/>
+        <property name="message"        value=""/>
+        <property name="ignoreCase"     value="false"/>
+        <property name="minimum"        value="0"/>
+        <property name="maximum"        value="0"/>
+        <property name="fileExtensions" value=""/>
+    </module>
+    !-->
+
+    <!--
+     !________________________________________________________________________________________
+     !
+     !     M I S C E L L A N E O U S
+     !________________________________________________________________________________________
+     !-->
+    <!-- Checks whether files end with a new line.                        !-->
+    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile !-->
+    <module name="NewlineAtEndOfFile">
+        <property name="lineSeparator"  value="system"/>
+        <property name="fileExtensions" value="*.*"/>
+    </module>
+
+    <!-- Checks that property files contain the same keys.         !-->
+    <!-- See http://checkstyle.sf.net/config_misc.html#Translation !-->
+    <module name="Translation">
+        <property name="fileExtensions" value="properties"/>
+    </module>
+
+
+    <!--
+     !________________________________________________________________________________________
+     !
+     !     S I Z E   V I O L A T I O N S
+     !________________________________________________________________________________________
+     !-->
+    <!-- Checks for long source files. !-->
+    <!-- See http://checkstyle.sf.net/config_sizes.html !-->
+    <module name="FileLength">
+        <property name="max"            value="2000"/>
+        <property name="fileExtensions" value=""/>
+    </module>
+
+
+    <!--
+     !________________________________________________________________________________________
+     !
+     !     W H I T E S P A C E
+     !________________________________________________________________________________________
+     !-->
+    <!-- Checks that there are no tab characters ('\t') in the source code. !-->
+    <!-- See http://checkstyle.sourceforge.net/config_whitespace.html#FileTabCharacter !-->
+    <module name="FileTabCharacter">
+        <property name="eachLine"       value="false"/>
+        <property name="fileExtensions" value=""/>
+    </module>
+
+
+    <module name="TreeWalker">
+
+        <!--
+         !________________________________________________________________________________________
+         !
+         !     A N N O T A T I O N S
+         !________________________________________________________________________________________
+         !-->
+        <!-- This check controls the usage style of annotations. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_annotation.html#AnnotationUseStyle !-->
+        <module name ="AnnotationUseStyle">
+            <property name="elementStyle"       value="compact_no_array"/>
+            <property name="closingParens"      value="never"/>
+            <property name="trailingArrayComma" value="never"/>
+        </module>
+
+        <!-- Verifies that both the java.lang.Deprecated import is present and the @deprecated Javadoc tag is present when either is present. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_annotation.html#MissingDeprecated !-->
+        <module name="MissingDeprecated"/>
+
+        <!-- Verifies that the java.lang.Override annotation is present when the {@inheritDoc} javadoc tag is present. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_annotation.html#MissingOverride !-->
+        <!-- Default: OFF
+        <module name="MissingOverride">
+            <property name="javaFiveCompatibility" value="false"/>
+        </module>
+        !-->
+
+        <!-- This check makes sure that all package annotations are in the package-info.java file. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_annotation.html#PackageAnnotation !-->
+        <module name="PackageAnnotation"/>
+
+        <!-- This check allows you to specify what warnings that SuppressWarnings is not allowed to suppress. !-->
+        <!-- You can also specify a list of TokenTypes that the configured warning(s) cannot be suppressed on. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_annotation.html#SuppressWarnings !-->
+        <module name="SuppressWarnings">
+            <property name="format" value="^$|^\s+$"/>
+            <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, ANNOTATION_DEF,
+                                           ANNOTATION_FIELD_DEF, ENUM_CONSTANT_DEF, PARAMETER_DEF,
+                                           VARIABLE_DEF, METHOD_DEF, CTOR_DEF"/>
+        </module>
+
+
+        <!--
+         !________________________________________________________________________________________
+         !
+         !     B L O C K S
+         !________________________________________________________________________________________
+         !-->
+        <!-- Finds nested blocks, i.e. blocks that are used freely in the code. !-->
+        <!-- See http://checkstyle.sf.net/config_blocks.html !-->
+        <module name="AvoidNestedBlocks">
+            <property name="allowInSwitchCase" value="false"/>
+        </module>
+
+        <!-- Checks for empty blocks. !-->
+        <!-- See http://checkstyle.sf.net/config_blocks.html !-->
+        <module name="EmptyBlock">
+            <property name="option" value="stmt"/>
+            <property name="tokens" value="LITERAL_CATCH, LITERAL_DO,
+                                           LITERAL_ELSE, LITERAL_FINALLY, LITERAL_IF, LITERAL_FOR,
+                                           LITERAL_TRY, LITERAL_WHILE, INSTANCE_INIT, STATIC_INIT"/>
+        </module>
+
+        <!-- Checks for the placement of left curly braces ('{') for code blocks. !-->
+        <!-- See http://checkstyle.sf.net/config_blocks.html !-->
+        <module name="LeftCurly">
+            <property name="option"        value="eol"/>
+            <property name="maxLineLength" value="80"/>
+            <property name="tokens"        value="CLASS_DEF, CTOR_DEF,
+                                                  INTERFACE_DEF, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE,
+                                                  LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_SWITCH,
+                                                  LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE,
+                                                  METHOD_DEF"/>
+        </module>
+
+        <!-- Checks for braces around code blocks. !-->
+        <!-- See http://checkstyle.sf.net/config_blocks.html !-->
+        <module name="NeedBraces">
+            <property name="tokens" value="LITERAL_DO, LITERAL_ELSE, LITERAL_IF, LITERAL_FOR, LITERAL_WHILE"/>
+        </module>
+
+        <!-- Checks the placement of right curly braces ('}') for else, try, and catch tokens. !-->
+        <!-- See http://checkstyle.sf.net/config_blocks.html !-->
+        <module name="RightCurly">
+            <property name="option"          value="same"/>
+            <property name="tokens"          value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE"/>
+            <property name="shouldStartLine" value="true"/>
+        </module>
+
+
+        <!--
+         !________________________________________________________________________________________
+         !
+         !     C L A S S   D E S I G N
+         !________________________________________________________________________________________
+         !-->
+        <!-- Checks that classes are designed for extension. !-->
+        <!-- See http://checkstyle.sf.net/config_design.html !-->
+        <!-- Default: OFF
+        <module name="DesignForExtension"/>
+        !-->
+
+        <!-- Checks that a class which has only private constructors is declared as final. !-->
+        <!-- See http://checkstyle.sf.net/config_design.html !-->
+        <module name="FinalClass"/>
+
+        <!-- Make sure that utility classes (classes that contain only static methods) do not have a public constructor. !-->
+        <!-- See http://checkstyle.sf.net/config_design.html !-->
+        <module name="HideUtilityClassConstructor"/>
+
+        <!-- Check nested (internal) classes/interfaces are declared at the bottom of the class after all method and field declarations. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_design.html#InnerTypeLast !-->
+        <module name="InnerTypeLast"/>
+
+        <!-- Implements Bloch, Effective Java, Item 17 - Use Interfaces only to define types. !-->
+        <!-- See http://checkstyle.sf.net/config_design.html !-->
+        <module name="InterfaceIsType">
+            <property name="allowMarkerInterfaces" value="true"/>
+        </module>
+
+        <!-- Ensures that exceptions (defined as any class name conforming to some regular expression) are immutable. !-->
+        <!-- That is, have only final fields. !-->
+        <!-- See http://checkstyle.sf.net/config_design.html !-->
+        <module name="MutableException">
+            <property name="format" value="^.*Exception$|^.*Error$"/>
+        </module>
+
+        <!-- Restricts throws statements to a specified count. !-->
+        <!-- See http://checkstyle.sf.net/config_design.html !-->
+        <module name="ThrowsCount">
+            <property name="max" value="1"/>
+        </module>
+
+        <!-- Checks visibility of class members. !-->
+        <!-- See http://checkstyle.sf.net/config_design.html !-->
+        <module name="VisibilityModifier">
+            <property name="packageAllowed"      value="false"/>
+            <property name="protectedAllowed"    value="false"/>
+            <property name="publicMemberPattern" value="^serialVersionUID$"/>
+        </module>
+
+
+        <!--
+         !________________________________________________________________________________________
+         !
+         !     C O D I N G
+         !________________________________________________________________________________________
+         !-->
+        <!-- Checks that array initialization contains a trailing comma. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="ArrayTrailingComma"/>
+
+        <!-- Detects inline conditionals. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="AvoidInlineConditionals"/>
+
+        <!-- Checks that classes that define a covariant equals() method also override method equals(java.lang.Object). !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="CovariantEquals"/>
+
+        <!-- Checks declaration order according to Code Conventions for the Java Programming Language. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="DeclarationOrder">
+            <property name="ignoreConstructors" value="false"/>
+            <property name="ignoreMethods"      value="false"/>
+            <property name="ignoreModifiers"    value="false"/>
+        </module>
+
+        <!-- Check that the default is after all the cases in a switch statement. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="DefaultComesLast"/>
+
+        <!-- Detects empty statements (standalone ;). !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="EmptyStatement"/>
+
+        <!-- Checks that any combination of String literals with optional assignment is on the left side of an equals() comparison. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_coding.html#EqualsAvoidNull !-->
+        <module name="EqualsAvoidNull"/>
+
+        <!-- Checks that classes that override equals() also override hashCode(). !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="EqualsHashCode"/>
+
+        <!-- Checks if any class or object member explicitly initialized to default for its type value. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="ExplicitInitialization"/>
+
+        <!-- Checks for fall through in switch statements Finds locations where a case contains Java code ... !-->
+        <!-- but lacks a break, return, throw or continue statement. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="FallThrough">
+            <property name="checkLastCaseGroup" value="false"/>
+            <property name="reliefPattern"      value="fallthru|falls??through"/>
+        </module>
+
+        <!-- Checks that local variables that never have their values changed are declared final. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="FinalLocalVariable">
+            <property name="tokens" value="VARIABLE_DEF"/>
+        </module>
+
+        <!-- Checks that a local variable or a parameter does not shadow a field that is defined in the same class. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="HiddenField">
+            <property name="tokens"                     value="PARAMETER_DEF, VARIABLE_DEF"/>
+            <!--
+            <property name="ignoreFormat"               value=""/>
+            !-->
+            <property name="ignoreConstructorParameter" value="false"/>
+            <property name="ignoreSetter"               value="false"/>
+            <property name="ignoreAbstractMethods"      value="false"/>
+        </module>
+
+        <!-- Catching java.lang.Exception, java.lang.Error or java.lang.RuntimeException is almost never acceptable. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="IllegalCatch">
+            <property name="illegalClassNames" value="java.lang.Exception, java.lang.Throwable, java.lang.RuntimeException"/>
+        </module>
+
+        <!-- Checks for illegal instantiations where a factory method is preferred. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <!-- Default: OFF
+        <module name="IllegalInstantiation">
+            <property name="classes" value=""/>
+        </module>
+        !-->
+
+        <!-- This check can be used to ensure that types are not declared to be thrown. !-->
+        <!-- Declaring to throw java.lang.Error or java.lang.RuntimeException is almost never acceptable. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_coding.html#IllegalThrows !-->
+        <module name="IllegalThrows">
+            <property name="illegalClassNames" value="java.lang.Throwable, java.lang.Error, java.lang.RuntimeException"/>
+        </module>
+
+        <!-- Checks for illegal tokens. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="IllegalToken">
+            <property name="tokens" value="LITERAL_SWITCH, POST_INC, POST_DEC"/>
+        </module>
+
+        <!-- Checks for illegal token text. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <!-- Default: OFF
+        <module name="IllegalTokenText">
+            <property name="tokens"     value=""/>
+            <property name="format"     value=""/>
+            <property name="ignoreCase" value="false"/>
+            <property name="message"    value=""/>
+        </module>
+        !-->
+
+        <!-- Checks that particular classes are never used as types in variable declarations, return values or parameters. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="IllegalType">
+             <property name="tokens"                 value="PARAMETER_DEF, VARIABLE_DEF, METHOD_DEF"/>
+             <property name="illegalClassNames"      value="java.util.GregorianCalendar, java.util.Hashtable,
+                                                            java.util.HashSet, java.util.HashMap, java.util.ArrayList,
+                                                            java.util.LinkedList, java.util.LinkedHashMap,
+                                                            java.util.LinkedHashSet, java.util.TreeSet,
+                                                            java.util.TreeMap, java.util.Vector"/>
+            <property name="legalAbstractClassNames" value=""/>
+            <property name="ignoredMethodNames"      value="getInitialContext, getEnvironment"/>
+            <property name="format"                  value="^(.*[\\.])?Abstract.*$"/>
+
+        </module>
+
+        <!-- Checks for assignments in subexpressions, such as in String s = Integer.toString(i = 2);. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="InnerAssignment">
+            <property name="tokens" value="ASSIGN, BAND_ASSIGN, BOR_ASSIGN, BSR_ASSIGN, BXOR_ASSIGN,
+                                           DIV_ASSIGN, MINUS_ASSIGN, MOD_ASSIGN, PLUS_ASSIGN, SL_ASSIGN,
+                                           SR_ASSIGN, STAR_ASSIGN"/>
+        </module>
+
+        <!-- Ensures that the setUp(), tearDown()methods are named correctly, have no arguments, !-->
+        <!-- return void and are either public or protected. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="JUnitTestCase"/>
+
+        <!-- Checks that there are no "magic numbers", where a magic number is a numeric literal !-->
+        <!-- that is not defined as a constant. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="MagicNumber">
+            <property name="tokens"               value="NUM_DOUBLE, NUM_FLOAT, NUM_INT, NUM_LONG"/>
+            <property name="ignoreNumbers"        value="-1, 0, 1, 2"/>
+            <property name="ignoreHashCodeMethod" value="false"/>
+        </module>
+
+        <!-- Checks that classes (except abstract one) define a ctor and don't rely on the default one. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="MissingCtor"/>
+
+        <!-- Checks that switch statement has "default" clause. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="MissingSwitchDefault"/>
+
+        <!-- Check for ensuring that for loop control variables are not modified inside the for block. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_coding.html#ModifiedControlVariable !-->
+        <module name="ModifiedControlVariable"/>
+
+        <!-- Checks for multiple occurrences of the same string literal within a single file. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_coding.html#MultipleStringLiterals !-->
+        <module name="MultipleStringLiterals">
+            <property name="allowedDuplicates"       value="1"/>
+            <property name="ignoreStringsRegexp"     value='^""$'/>
+            <property name="ignoreOccurrenceContext" value="ANNOTATION"/>
+        </module>
+
+        <!-- Checks that each variable declaration is in its own statement and on its own line. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="MultipleVariableDeclarations"/>
+
+        <!-- Restricts nested for blocks to a specified depth. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_coding.html#NestedForDepth !-->
+        <module name="NestedForDepth">
+            <property name="max" value="1"/>
+        </module>
+
+        <!-- Restricts nested if-else blocks to a specified depth. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="NestedIfDepth">
+            <property name="max" value="1"/>
+        </module>
+
+        <!-- Restricts nested try-catch blocks to a specified depth. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="NestedTryDepth">
+            <property name="max" value="1"/>
+        </module>
+
+        <!-- Checks that the clone method is not overridden from the Object class. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_coding.html#NoClone !-->
+        <module name="NoClone"/>
+
+        <!-- Verifies there are no finalize() methods defined in a class. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_coding.html#NoFinalizer !-->
+        <module name="NoFinalizer"/>
+
+        <!-- Checks there is only one statement per line. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_coding.html#OneStatementPerLine !-->
+        <module name="OneStatementPerLine"/>
+
+        <!-- Ensure a class has a package declaration. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="PackageDeclaration">
+            <property name="ignoreDirectoryName" value="false"/>
+        </module>
+
+        <!-- Disallow assignment of parameters. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="ParameterAssignment"/>
+
+        <!-- Checks for redundant exceptions declared in throws clause such as duplicates, !-->
+        <!-- unchecked exceptions or subclasses of another declared exception. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="RedundantThrows">
+            <property name="allowUnchecked"     value="false"/>
+            <property name="allowSubclasses"    value="false"/>
+            <property name="logLoadErrors"      value="true"/>
+            <property name="suppressLoadErrors" value="false"/>
+        </module>
+
+        <!-- Checks that code doesn't rely on the "this." default. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="RequireThis">
+            <property name="checkFields"  value="true"/>
+            <property name="checkMethods" value="true"/>
+        </module>
+
+        <!-- Restrict the number of return statements. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="ReturnCount">
+            <property name="max"    value="2"/>
+            <property name="format" value=""/>
+        </module>
+
+        <!-- Checks for overly complicated boolean expressions. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="SimplifyBooleanExpression"/>
+
+        <!-- Checks for overly complicated boolean return statements. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="SimplifyBooleanReturn"/>
+
+        <!-- Checks that string literals are not used with == or !=. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="StringLiteralEquality"/>
+
+        <!-- Checks that an overriding clone() method invokes super.clone(). !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="SuperClone"/>
+
+        <!-- Checks that an overriding finalize() method invokes super.finalize(). !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="SuperFinalize"/>
+
+        <!-- Checks for the use of unnecessary parentheses. !-->
+        <!-- See http://checkstyle.sf.net/config_coding.html !-->
+        <module name="UnnecessaryParentheses"/>
+
+
+        <!--
+         !________________________________________________________________________________________
+         !
+         !     I M P O R T S
+         !________________________________________________________________________________________
+         !-->
+        <!-- Checks that there are no import statements that use the * notation. !-->
+        <!-- See http://checkstyle.sf.net/config_import.html !-->
+        <module name="AvoidStarImport">
+            <property name="excludes"                 value=""/>
+            <property name="allowClassImports"        value="false"/>
+            <property name="allowStaticMemberImports" value="false"/>
+        </module>
+
+        <!-- Checks that there are no static import statements. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_imports.html#AvoidStaticImport !-->
+        <module name="AvoidStaticImport">
+            <property name="excludes" value=""/>
+        </module>
+
+        <!-- Checks for imports from a set of illegal packages. !-->
+        <!-- See http://checkstyle.sf.net/config_import.html !-->
+        <module name="IllegalImport">
+            <property name="illegalPkgs" value="sun"/>
+        </module>
+
+        <!-- Controls what can be imported in each package. Useful for ensuring that application layering rules !-->
+        <!-- are not violated, especially on large projects. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_imports.html#ImportControl !-->
+        <!-- Default: OFF
+        <module name="ImportControl">
+            <property name="file" value=""/>
+            <property name="url"  value=""/>
+        </module>
+        !-->
+
+        <!-- Checks the ordering/grouping of imports. !-->
+        <!-- See http://checkstyle.sf.net/config_import.html !-->
+        <module name="ImportOrder">
+            <property name="option"        value="under"/>
+            <property name="groups"        value=""/>
+            <property name="ordered"       value="true"/>
+            <property name="separated"     value="false"/>
+            <property name="caseSensitive" value="true"/>
+        </module>
+
+        <!-- Checks for redundant import statements. !-->
+        <!-- See http://checkstyle.sf.net/config_import.html !-->
+        <module name="RedundantImport"/>
+
+        <!-- Checks for unused import statements. !-->
+        <!-- See http://checkstyle.sf.net/config_import.html !-->
+        <module name="UnusedImports"/>
+
+
+        <!--
+         !________________________________________________________________________________________
+         !
+         !     J A V A D O C S
+         !________________________________________________________________________________________
+         !-->
+        <!-- Checks to ensure that the javadoc tags exist (if required) !-->
+        <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocMethod !-->
+        <module name="JavadocMethod">
+            <property name="scope"                        value="private"/>
+            <!--
+            <property name="excludeScope"                 value=""/>
+            !-->
+            <property name="allowUndeclaredRTE"           value="false"/>
+            <property name="allowThrowsTagsForSubclasses" value="false"/>
+            <property name="allowMissingParamTags"        value="false"/>
+            <property name="allowMissingThrowsTags"       value="false"/>
+            <property name="allowMissingReturnTag"        value="false"/>
+            <property name="allowMissingJavadoc"          value="false"/>
+            <property name="allowMissingPropertyJavadoc"  value="false"/>
+            <property name="logLoadErrors"                value="true"/>
+            <property name="suppressLoadErrors"           value="false"/>
+            <property name="tokens"                       value="METHOD_DEF, CTOR_DEF"/>
+        </module>
+
+        <!-- Validates Javadoc comments to help ensure they are well formed. !-->
+        <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocStyle !-->
+        <module name="JavadocStyle">
+            <property name="scope"               value="private"/>
+            <!--
+            <property name="excludeScope"        value=""/>
+            !-->
+            <property name="checkFirstSentence"  value="true"/>
+<!--TODO:            <property name="endOfSentenceFormat" value="([.?!][ \t\n\r\f<])|([.?!]$)"/> !-->
+            <property name="checkEmptyJavadoc"   value="false"/>
+            <property name="checkHtml"           value="true"/>
+            <property name="tokens"              value="INTERFACE_DEF, CLASS_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
+        </module>
+
+        <!-- Checks Javadoc comments for class and interface definitions. !-->
+        <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocType !-->
+        <module name="JavadocType">
+            <property name="scope"                 value="private"/>
+            <!--
+            <property name="excludeScope"          value=""/>
+            !-->
+            <property name="authorFormat"          value=""/>
+            <property name="versionFormat"         value=""/>
+            <property name="allowMissingParamTags" value="false"/>
+            <property name="allowUnknownTags"      value="false"/>
+            <property name="tokens"                value="INTERFACE_DEF, CLASS_DEF"/>
+        </module>
+
+        <!-- Checks that variables have Javadoc comments. !-->
+        <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocVariable !-->
+        <module name="JavadocVariable">
+            <property name="scope"        value="private"/>
+            <!--
+            <property name="excludeScope" value=""/>
+            !-->
+        </module>
+
+        <!-- Outputs a JavaDoc tag as information. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_javadoc.html#WriteTag !-->
+        <module name="WriteTag">
+            <property name="tag"         value=""/>
+            <property name="tagFormat"   value=""/>
+            <property name="tagSeverity" value="info"/>
+        </module>
+
+
+        <!--
+         !________________________________________________________________________________________
+         !
+         !     M E T R I C S
+         !________________________________________________________________________________________
+         !-->
+        <!-- Restrict the number of number of &&, || and ^ in an expression. !-->
+        <!-- See http://checkstyle.sf.net/config_metrics.html !-->
+        <module name="BooleanExpressionComplexity">
+            <property name="max"    value="3"/>
+            <property name="tokens" value="LAND, BAND, LOR, BOR, BXOR"/>
+        </module>
+
+        <!-- This metric measures the number of instantiations of other classes within the given class. !-->
+        <!-- See http://checkstyle.sf.net/config_metrics.html !-->
+        <module name="ClassDataAbstractionCoupling">
+            <property name="max" value="7"/>
+        </module>
+
+        <!-- The number of other classes a given class relies on. !-->
+        <!-- See http://checkstyle.sf.net/config_metrics.html !-->
+        <module name="ClassFanOutComplexity">
+            <property name="max" value="20"/>
+        </module>
+
+        <!-- Checks cyclomatic complexity against a specified limit. !-->
+        <!-- See http://checkstyle.sf.net/config_metrics.html !-->
+        <module name="CyclomaticComplexity">
+            <property name="max" value="10"/>
+        </module>
+
+        <!-- Determines complexity of methods, classes and files by counting the Non Commenting Source Statements (NCSS). !-->
+        <!-- See http://checkstyle.sourceforge.net/config_metrics.html#JavaNCSS !-->
+        <module name="JavaNCSS">
+            <property name="methodMaximum" value="50"/>
+            <property name="classMaximum"  value="1500"/>
+            <property name="fileMaximum"   value="2000"/>
+        </module>
+
+        <!-- The NPATH metric computes the number of possible execution paths through a function. !-->
+        <!-- See http://checkstyle.sf.net/config_metrics.html !-->
+        <module name="NPathComplexity">
+            <property name="max" value="200"/>
+        </module>
+
+
+        <!--
+         !________________________________________________________________________________________
+         !
+         !     M I S C E L L A N E O U S
+         !________________________________________________________________________________________
+         !-->
+        <!-- Checks the style of array type definitions. !-->
+        <!-- See http://checkstyle.sf.net/config_misc.html !-->
+        <module name="ArrayTypeStyle">
+            <property name="javaStyle" value="true"/>
+        </module>
+
+        <!-- Checks for restricted tokens beneath other tokens. !-->
+        <!-- See http://checkstyle.sf.net/config_misc.html !-->
+        <!-- Default: OFF
+        <module name="DescendantToken">
+            <property name="tokens"         value=""/>
+            <property name="limitedTokens"  value=""/>
+            <property name="minimumDepth"   value="0"/>
+            <property name="maximumDepth"   value="java.lang.Integer.MAX_VALUE"/>
+            <property name="minimumNumber"  value="0"/>
+            <property name="maximumNumber"  value="java.lang.Integer.MAX_VALUE"/>
+            <property name="sumTokenCounts" value="false"/>
+            <property name="minimumMessage" value="descendant.token.min"/>
+            <property name="maximumMessage" value="descendant.token.max"/>
+        </module>
+        !-->
+
+        <!-- Check that method/constructor parameters are final. !-->
+        <!-- See http://checkstyle.sf.net/config_misc.html !-->
+        <module name="FinalParameters">
+            <property name="tokens" value="METHOD_DEF, CTOR_DEF"/>
+        </module>
+
+        <!-- A generic check for code problems - the user can search for any pattern. !-->
+        <!-- See http://checkstyle.sf.net/config_misc.html !-->
+        <!-- Default: OFF
+        <module name="GenericIllegalRegexp">
+            <property name="format"         value="\S\s+$"/>
+            <property name="message"        value="Line has trailing spaces."/>
+            <property name="ignoreCase"     value="false"/>
+            <property name="ignoreComments" value="false"/>
+        </module>
+        !-->
+
+        <!-- Checks correct indentation of Java Code. !-->
+        <!-- See http://checkstyle.sf.net/config_misc.html !-->
+        <module name="Indentation">
+            <property name="basicOffset"     value="4"/>
+            <property name="braceAdjustment" value="0"/>
+            <property name="caseIndent"      value="4"/>
+        </module>
+
+        <!-- Checks that the outer type name and the file name match. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_misc.html#OuterTypeFilename !-->
+        <module name="OuterTypeFilename"/>
+
+        <!-- A check for TODO: comments. Actually it is a generic regular expression matcher on Java comments. !-->
+        <!-- See http://checkstyle.sf.net/config_misc.html !-->
+        <module name="TodoComment">
+            <property name="format" value="TODO:"/>
+        </module>
+
+        <!-- The check to ensure that requires that comments be the only thing on a line. !-->
+        <!-- See http://checkstyle.sf.net/config_misc.html !-->
+        <module name="TrailingComment">
+            <property name="format"       value="^[\\s\\}\\);]*$"/>
+            <!--
+            <property name="legalComment" value=""/>
+            !-->
+        </module>
+
+        <!-- Checks for uncommented main() methods (debugging leftovers). !-->
+        <!-- See http://checkstyle.sf.net/config_misc.html !-->
+        <module name="UncommentedMain">
+            <property name="excludedClasses" value="Main$"/>
+        </module>
+
+        <!-- Checks that long constants are defined with an upper ell. That is 'L' and not 'l'. !-->
+        <!-- See http://checkstyle.sf.net/config_misc.html !-->
+        <module name="UpperEll"/>
+
+
+        <!--
+         !________________________________________________________________________________________
+         !
+         !     M O D I F I E R S
+         !________________________________________________________________________________________
+         !-->
+        <!-- Checks that the order of modifiers conforms to the suggestions in the Java Language specification, !-->
+        <!-- sections 8.1.1, 8.3.1 and 8.4.3. !-->
+        <!-- See http://checkstyle.sf.net/config_modifiers.html !-->
+        <module name="ModifierOrder"/>
+
+        <!-- Checks that there are no redundant modifiers. !-->
+        <!-- See http://checkstyle.sf.net/config_modifiers.html !-->
+        <module name="RedundantModifier">
+            <property name="tokens" value="METHOD_DEF, VARIABLE_DEF, ANNOTATION_FIELD_DEF"/>
+        </module>
+
+
+        <!--
+         !________________________________________________________________________________________
+         !
+         !     N A M I N G   C O N V E N T I O N S
+         !________________________________________________________________________________________
+         !-->
+        <!-- Checks for abstract class name naming conventions. !-->
+        <!-- See http://checkstyle.sf.net/config_naming.html !-->
+        <module name="AbstractClassName">
+            <property name="format"         value="^Abstract.*$|^.*Factory$"/>
+            <property name="ignoreModifier" value="false"/>
+            <property name="ignoreName"     value="false"/>
+        </module>
+
+        <!-- Checks for class type parameter name naming conventions. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_naming.html#ClassTypeParameterName !-->
+        <module name="ClassTypeParameterName">
+            <property name="format" value="^[A-Z]$"/>
+        </module>
+
+        <!-- Checks for constant name naming conventions. !-->
+        <!-- See http://checkstyle.sf.net/config_naming.html !-->
+        <module name="ConstantName">
+            <property name="format"           value="^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"/>
+            <property name="applyToPublic"    value="true"/>
+            <property name="applyToProtected" value="true"/>
+            <property name="applyToPackage"   value="true"/>
+            <property name="applyToPrivate"   value="true"/>
+        </module>
+
+        <!-- Checks for local final variable name naming conventions. !-->
+        <!-- See http://checkstyle.sf.net/config_naming.html !-->
+        <module name="LocalFinalVariableName">
+            <property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
+            <property name="tokens" value="VARIABLE_DEF, PARAMETER_DEF"/>
+        </module>
+
+        <!-- Checks for local variable name naming conventions. !-->
+        <!-- See http://checkstyle.sf.net/config_naming.html !-->
+        <module name="LocalVariableName">
+            <property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
+            <property name="tokens" value="PARAMETER_DEF"/>
+        </module>
+
+        <!-- Checks for member variable name naming conventions. !-->
+        <!-- See http://checkstyle.sf.net/config_naming.html !-->
+        <module name="MemberName">
+            <property name="format"           value="^[a-z][a-zA-Z0-9]*$"/>
+            <property name="applyToPublic"    value="true"/>
+            <property name="applyToProtected" value="true"/>
+            <property name="applyToPackage"   value="true"/>
+            <property name="applyToPrivate"   value="true"/>
+        </module>
+
+        <!-- Checks for method name naming conventions. !-->
+        <!-- See http://checkstyle.sf.net/config_naming.html !-->
+        <module name="MethodName">
+            <property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
+        </module>
+
+        <!-- Checks for method type parameter name naming conventions. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_naming.html#MethodTypeParameterName !-->
+        <module name="MethodTypeParameterName">
+            <property name="format" value="^[A-Z]$"/>
+        </module>
+
+        <!-- Checks for package name naming conventions. !-->
+        <!-- See http://checkstyle.sf.net/config_naming.html !-->
+        <module name="PackageName">
+            <property name="format" value="^[a-z]+(\.[a-zA-Z_][a-zA-Z0-9_]*)*$"/>
+        </module>
+
+        <!-- Checks for parameter name naming conventions. !-->
+        <!-- See http://checkstyle.sf.net/config_naming.html !-->
+        <module name="ParameterName">
+            <property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
+        </module>
+
+        <!-- Checks for static variable name naming conventions. !-->
+        <!-- See http://checkstyle.sf.net/config_naming.html !-->
+        <module name="StaticVariableName">
+            <property name="format"           value="^[a-z][a-zA-Z0-9]*$"/>
+            <property name="applyToPublic"    value="true"/>
+            <property name="applyToProtected" value="true"/>
+            <property name="applyToPackage"   value="true"/>
+            <property name="applyToPrivate"   value="true"/>
+        </module>
+
+        <!-- Checks for type name naming conventions. !-->
+        <!-- See http://checkstyle.sf.net/config_naming.html !-->
+        <module name="TypeName">
+            <property name="format"           value="^[a-z][a-zA-Z0-9]*$"/>
+            <property name="tokens"           value="CLASS_DEF, INTERFACE_DEF"/>
+            <property name="applyToPublic"    value="true"/>
+            <property name="applyToProtected" value="true"/>
+            <property name="applyToPackage"   value="true"/>
+            <property name="applyToPrivate"   value="true"/>
+        </module>
+
+
+        <!--
+         !________________________________________________________________________________________
+         !
+         !     R E G E X P
+         !________________________________________________________________________________________
+         !-->
+        <!-- A check that makes sure that a specified pattern exists, exists less than a set number of times, !-->
+        <!-- or does not exist in the file. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_misc.html#Regexp !-->
+        <!-- Default: OFF
+        <module name="Regexp">
+            <property name="format"         value=""/>
+            <property name="message"        value=""/>
+            <property name="illegalPattern" value="false"/>
+            <property name="duplicateLimit" value="-1"/>
+            <property name="errorLimit"     value="100"/>
+            <property name="ignoreComments" value="false"/>
+        </module>
+        !-->
+
+        <!-- This class is variation on RegexpSingleline for detecting single lines that match a !-->
+        <!-- supplied regular expression in Java files. It supports suppressing matches in Java comments. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_regexp.html#RegexpSinglelineJava !-->
+        <!-- Default: OFF
+        <module name="RegexpSinglelineJava">
+            <property name="format"         value=""/>
+            <property name="message"        value=""/>
+            <property name="ignoreCase"     value="false"/>
+            <property name="minimum"        value="0"/>
+            <property name="maximum"        value="0"/>
+            <property name="ignoreComments" value="false"/>
+        </module>
+        !-->
+
+        <!--
+         !________________________________________________________________________________________
+         !
+         !     S I Z E   V I O L A T I O N S
+         !________________________________________________________________________________________
+         !-->
+        <!-- Checks for long anonymous inner classes. !-->
+        <!-- See http://checkstyle.sf.net/config_sizes.html !-->
+        <module name="AnonInnerLength">
+            <property name="max" value="20"/>
+        </module>
+
+        <!-- Restricts the number of executable statements to a specified limit. !-->
+        <!-- See http://checkstyle.sf.net/config_sizes.html !-->
+        <module name="ExecutableStatementCount">
+            <property name="max"    value="30"/>
+            <property name="tokens" value="CTOR_DEF, METHOD_DEF, INSTANCE_INIT, STATIC_INIT"/>
+        </module>
+
+        <!-- See http://checkstyle.sf.net/config_sizes.html !-->
+        <!-- Checks for long lines. !-->
+        <module name="LineLength">
+            <property name="ignorePattern" value="^$"/>
+            <property name="max"           value="80"/>
+        </module>
+
+        <!-- Checks the number of methods declared in each type. This includes the number of each scope !-->
+        <!-- (private, package, protected and public) as well as an overall total. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_sizes.html#MethodCount !-->
+        <module name="MethodCount">
+            <property name="maxTotal"     value="100"/>
+            <property name="maxPrivate"   value="100"/>
+            <property name="maxPackage"   value="100"/>
+            <property name="maxProtected" value="100"/>
+            <property name="maxPublic"    value="100"/>
+        </module>
+
+        <!-- Checks for long methods and constructors. !-->
+        <!-- See http://checkstyle.sf.net/config_sizes.html !-->
+        <module name="MethodLength">
+            <property name="max"        value="150"/>
+            <property name="countEmpty" value="true"/>
+            <property name="tokens"     value="METHOD_DEF, CTOR_DEF"/>
+        </module>
+
+        <!-- Checks for the number of types declared at the outer (or root) level in a file. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_sizes.html#OuterTypeNumber !-->
+        <module name="OuterTypeNumber">
+            <property name="max" value="1"/>
+        </module>
+
+        <!-- Checks the number of parameters of a method or constructor. !-->
+        <!-- See http://checkstyle.sf.net/config_sizes.html !-->
+        <module name="ParameterNumber">
+            <property name="max"    value="7"/>
+            <property name="tokens" value="METHOD_DEF, CTOR_DEF"/>
+        </module>
+
+        <!--
+         !________________________________________________________________________________________
+         !
+         !     W H I T E S P A C E
+         !________________________________________________________________________________________
+         !-->
+        <!-- Checks the padding of an empty for initializer. !-->
+        <!-- See http://checkstyle.sf.net/config_whitespace.html !-->
+        <module name="EmptyForInitializerPad">
+            <property name="option" value="nospace"/>
+        </module>
+
+        <!-- Checks the padding of an empty for iterator. !-->
+        <!-- See http://checkstyle.sf.net/config_whitespace.html !-->
+        <module name="EmptyForIteratorPad">
+            <property name="option" value="nospace"/>
+        </module>
+
+        <!-- Checks that the whitespace around the Generic tokens < and > is correct to the typical convention. !-->
+        <!-- See http://checkstyle.sourceforge.net/config_whitespace.html#GenericWhitespace !-->
+        <module name="GenericWhitespace"/>
+
+        <!-- Checks the padding between the identifier of a method definition, !-->
+        <!-- constructor definition, method call, or constructor invocation; and the left parenthesis of the parameter list. !-->
+        <!-- See http://checkstyle.sf.net/config_whitespace.html !-->
+        <module name="MethodParamPad">
+            <property name="allowLineBreaks" value="false"/>
+            <property name="option"          value="nospace"/>
+            <property name="tokens"          value="CTOR_DEF, LITERAL_NEW, METHOD_CALL, METHOD_DEF, SUPER_CTOR_CALL "/>
+        </module>
+
+        <!-- Checks that there is no whitespace after a token. !-->
+        <!-- See http://checkstyle.sf.net/config_whitespace.html !-->
+        <module name="NoWhitespaceAfter">
+            <property name="allowLineBreaks" value="true"/>
+            <property name="tokens"          value="ARRAY_INIT, BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS"/>
+        </module>
+
+        <!-- Checks that there is no whitespace before a token. !-->
+        <!-- See http://checkstyle.sf.net/config_whitespace.html !-->
+        <module name="NoWhitespaceBefore">
+            <property name="allowLineBreaks" value="false"/>
+            <property name="tokens"          value="SEMI, POST_DEC, POST_INC"/>
+        </module>
+
+        <!-- Checks the policy on how to wrap lines on operators. !-->
+        <!-- See http://checkstyle.sf.net/config_whitespace.html !-->
+        <module name="OperatorWrap">
+            <property name="option" value="nl"/>
+            <property name="tokens" value="ASSIGN, BAND, BOR, BSR, BXOR, COLON, DIV,
+                                           EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF,
+                                           LOR, LT, MINUS, MOD, NOT_EQUAL,
+                                           PLUS, QUESTION, SL, SR, STAR"/>
+        </module>
+
+        <!-- Checks the policy on the padding of parentheses. !-->
+        <!-- See http://checkstyle.sf.net/config_whitespace.html !-->
+        <module name="ParenPad">
+            <property name="option" value="nospace"/>
+            <property name="tokens" value="CTOR_CALL, LPAREN, METHOD_CALL, RPAREN, SUPER_CTOR_CALL"/>
+        </module>
+
+        <!-- Checks the policy on the padding of parentheses for typecasts. !-->
+        <!-- See http://checkstyle.sf.net/config_whitespace.html !-->
+        <module name="TypecastParenPad">
+            <property name="option" value="nospace"/>
+            <property name="tokens" value="TYPECAST, RPAREN"/>
+        </module>
+
+        <!-- Checks that a token is followed by whitespace. !-->
+        <!-- See http://checkstyle.sf.net/config_whitespace.html !-->
+        <module name="WhitespaceAfter">
+            <property name="tokens" value="COMMA, SEMI, TYPECAST"/>
+        </module>
+
+        <!-- Checks that a token is surrounded by whitespace. !-->
+        <!-- See http://checkstyle.sf.net/config_whitespace.html !-->
+        <module name="WhitespaceAround">
+            <property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN,
+                                           BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND,
+                                           LCURLY, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE,
+                                           LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN,
+                                           LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT,
+                                           MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN,
+                                           QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN"/>
+            <property name="allowEmptyConstructors" value="false"/>
+            <property name="allowEmptyMethods"      value="false"/>
+        </module>
+
+    </module>
+
+</module>
diff --git a/contrib/examples/checks/com/mycompany/checks/LimitImplementationFiles.java b/contrib/examples/checks/com/mycompany/checks/LimitImplementationFiles.java
new file mode 100644
index 0000000..b10086b
--- /dev/null
+++ b/contrib/examples/checks/com/mycompany/checks/LimitImplementationFiles.java
@@ -0,0 +1,69 @@
+package com.mycompany.checks;
+
+import java.io.File;
+import com.puppycrawl.tools.checkstyle.api.*;
+
+/**
+ * An example for a user provided FileSetCheck,
+ * checks that the number of files does not excced a certain limit.
+ *
+ * This Class is provided for educational purposes only, we do not
+ * consider it useful to check your production code.
+ *
+ * @author lkuehne
+ */
+public class LimitImplementationFiles
+    extends AbstractFileSetCheck
+{
+    /**
+     * the maximium number of implementation files,
+     * default is 100.
+     */
+    private int max = 100;
+
+    /**
+     * Give user a chance to configure max in the
+     * config file.
+     *
+     * @param aMax the user specified maximum.
+     */
+    public void setMax(int aMax)
+    {
+        max = aMax;
+    }
+
+    /**
+     * @see FileSetCheck
+     */
+    public void process(File[] files)
+    {
+        if (files != null && files.length > max) {
+
+            // figure out the file that contains the error
+            final String path = files[max].getPath();
+
+            // message collector is used to collect error messages,
+            // needs to be reset before starting to collect error messages
+            // for a file.
+            getMessageCollector().reset();
+
+            // message dispatcher is used to fire AuditEvents
+            MessageDispatcher dispatcher = getMessageDispatcher();
+
+            // signal start of file to AuditListeners
+            dispatcher.fireFileStarted(path);
+
+            // log the message
+            log(0, "max.files.exceeded", new Integer(max));
+
+            // you can call log() multiple times to flag multiple
+            // errors in the same file
+
+            // fire the errors for this file to the AuditListeners
+            fireErrors(path);
+
+            // signal end of file to AuditListeners
+            dispatcher.fireFileFinished(path);
+        }
+    }
+}
diff --git a/contrib/examples/checks/com/mycompany/checks/MethodLimitCheck.java b/contrib/examples/checks/com/mycompany/checks/MethodLimitCheck.java
new file mode 100644
index 0000000..812950d
--- /dev/null
+++ b/contrib/examples/checks/com/mycompany/checks/MethodLimitCheck.java
@@ -0,0 +1,63 @@
+package com.mycompany.checks;
+
+import com.puppycrawl.tools.checkstyle.api.*;
+
+public class MethodLimitCheck extends Check
+{
+    /** the maximum number of methods per class/interface */
+    private int max = 30;
+
+    /**
+     * Give user a chance to configure max in the config file.
+     * @param aMax the user specified maximum parsed from configuration property.
+     */
+    public void setMax(int aMax)
+    {
+        max = aMax;
+    }
+
+    /**
+     * We are interested in CLASS_DEF and INTERFACE_DEF Tokens.
+     * @see Check
+     */
+    public int[] getDefaultTokens()
+    {
+        return new int[]{TokenTypes.CLASS_DEF, TokenTypes.INTERFACE_DEF};
+    }
+
+    /**
+     * @see Check
+     */
+    public void visitToken(DetailAST ast)
+    {
+        // the tree below a CLASS_DEF/INTERFACE_DEF looks like this:
+
+        // CLASS_DEF
+        //   MODIFIERS
+        //   class name (IDENT token type)
+        //   EXTENDS_CLAUSE
+        //   IMPLEMENTS_CLAUSE
+        //   OBJBLOCK
+        //     {
+        //     some other stuff like variable declarations etc.
+        //     METHOD_DEF
+        //     more stuff, the users might mix methods, variables, etc.
+        //     METHOD_DEF
+        //     ...and so on
+        //     }
+
+        // We use helper methods to navigate in the syntax tree
+
+        // find the OBJBLOCK node below the CLASS_DEF/INTERFACE_DEF
+        DetailAST objBlock = ast.findFirstToken(TokenTypes.OBJBLOCK);
+
+        // count the number of direct children of the OBJBLOCK
+        // that are METHOD_DEFS
+        int methodDefs = objBlock.getChildCount(TokenTypes.METHOD_DEF);
+
+        // report error if limit is reached
+        if (methodDefs > max) {
+            log(ast.getLineNo(), "too.many.methods", new Integer(max));
+        }
+    }
+}
diff --git a/contrib/examples/checks/com/mycompany/checks/messages.properties b/contrib/examples/checks/com/mycompany/checks/messages.properties
new file mode 100644
index 0000000..0fe42c5
--- /dev/null
+++ b/contrib/examples/checks/com/mycompany/checks/messages.properties
@@ -0,0 +1,2 @@
+max.files.exceeded=Too many implementation files, only {0} are allowed
+too.many.methods=Too many methods, only {0} are allowed
diff --git a/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/Attribute.java b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/Attribute.java
new file mode 100644
index 0000000..449e515
--- /dev/null
+++ b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/Attribute.java
@@ -0,0 +1,107 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2003  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.xpath;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+
+/**
+ * Data holder for an XPath attribute of an element. The parent
+ * element of an Attribute is a DetailAST. The name and value
+ * of an Attribute are Strings.
+ * @author Rick Giles
+ */
+public class Attribute
+{
+    /** element owning this attribute */
+    private DetailAST mParent;
+
+    /** name */
+    private String mName;
+
+    /** value */
+    private String mValue;
+
+    /**
+     * Constructs an <code>Attribute</code>.
+     * @param aParent the parent element.
+     * @param aName the name.
+     * @param aValue the value.
+     */
+    public Attribute(DetailAST aParent, String aName, String aValue)
+    {
+        mParent = aParent;
+        mName = aName;
+        mValue = aValue;
+    }
+
+    /** Returns the name of the attribute.
+     * @return the name of the attribute.
+     */
+    public String getName()
+    {
+        return mName;
+    }
+
+    /**
+     * Returns the value of the attribute.
+     * @return the value of the attribute.
+     */
+    public String getValue()
+    {
+        return mValue;
+    }
+
+    /**
+     * Sets the name of the attribute.
+     * @param aName The name to set.
+     */
+    public void setName(String aName)
+    {
+        mName = aName;
+    }
+
+    /**
+     * Sets the value of the attribute.
+     * @param aValue The value to set.
+     */
+    public void setValue(String aValue)
+    {
+        mValue = aValue;
+    }
+
+    /**
+     * Returns the parent of the attribute.
+     * @return the parent of the attribute.
+     */
+    public DetailAST getParent()
+    {
+        return mParent;
+    }
+
+    /**
+     * Sets the parent of the attribute.
+     * @param aParent the parent of the attribute.
+     */
+    public void setParent(DetailAST aParent)
+    {
+        mParent = aParent;
+    }
+
+}
diff --git a/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/AttributeAxisIterator.java b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/AttributeAxisIterator.java
new file mode 100644
index 0000000..cd5e6b8
--- /dev/null
+++ b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/AttributeAxisIterator.java
@@ -0,0 +1,98 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2003  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.xpath;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.beanutils.BeanUtils;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * Iterator for an attribute axis of an XPath element. The XPath
+ * element is a DetailAST. Attributes correspond to bean
+ * properties of the DetailAST.
+ * @author Rick Giles
+ */
+public class AttributeAxisIterator
+    implements Iterator
+{
+    /** actual iterator */
+    private Iterator mIter = (new ArrayList()).iterator();
+
+    /**
+     * Constructs a <code>AttributeAxisIterator</code> for a
+     * DetailAST element.
+     * @param aAST the DetailAST element
+     */
+    public AttributeAxisIterator(DetailAST aAST)
+    {
+        Map props = new HashMap();
+        //use BeanUtils to get the properties
+        try {
+            props = BeanUtils.describe(aAST);
+        }
+        catch (IllegalAccessException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        catch (InvocationTargetException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        catch (NoSuchMethodException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        // add attributes for the properties to a list and
+        // set the iterator to an iterator over that list.
+        final List attributes = new ArrayList(props.size());
+        final Set values = props.keySet();
+        for (Iterator iter = values.iterator(); iter.hasNext();) {
+            final String name = (String) iter.next();
+            final String value = (String) props.get(name);
+            attributes.add(new Attribute(aAST, name, value));
+        }
+        mIter = attributes.iterator();
+    }
+
+    /**@see java.util.Iterator#next() */
+    public Object next()
+    {
+        return mIter.next();
+    }
+
+    /** @see java.util.Iterator#hasNext() */
+    public boolean hasNext()
+    {
+        return mIter.hasNext();
+    }
+
+    /** @see java.util.Iterator#remove() */
+    public void remove()
+    {
+        mIter.remove();
+    }
+}
\ No newline at end of file
diff --git a/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/DocumentNavigator.java b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/DocumentNavigator.java
new file mode 100644
index 0000000..d8e697d
--- /dev/null
+++ b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/DocumentNavigator.java
@@ -0,0 +1,437 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2003  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.xpath;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.jaxen.DefaultNavigator;
+import org.jaxen.XPath;
+import org.jaxen.util.SingleObjectIterator;
+import org.saxpath.SAXPathException;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Navigates around a DetailAST, using XPath semantics.
+ * Requires jaxen, http://jaxen.sourceforge.net and
+ * saxpath, http://sourceforge.net/projects/saxpath/.
+ * Idea shamelessly stolen from the equivalent PMD code (pmd.sourceforge.net).
+ * @author Rick Giles
+ */
+public class DocumentNavigator
+    extends DefaultNavigator
+{
+    /** Iterator for an empty sequence */
+    private static final Iterator EMPTY_ITERATOR = new ArrayList().iterator();
+
+    /**
+     * @see org.jaxen.DefaultNavigator#getAttributeName(java.lang.Object)
+     */
+    public String getAttributeName(Object aObject)
+    {
+        return ((Attribute) aObject).getName();
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#getAttributeNamespaceUri
+     */
+    public String getAttributeNamespaceUri(Object aObject)
+    {
+        return null;
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#getAttributeQName(java.lang.Object)
+     */
+    public String getAttributeQName(Object aObject)
+    {
+        return ((Attribute) aObject).getName();
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#getAttributeStringValue(java.lang.Object)
+     */
+    public String getAttributeStringValue(Object aObject)
+    {
+        return ((Attribute) aObject).getValue();
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#getCommentStringValue(java.lang.Object)
+     */
+    public String getCommentStringValue(Object aObject)
+    {
+        return null;
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#getElementName(java.lang.Object)
+     */
+    public String getElementName(Object aObject)
+    {
+        final int type = ((DetailAST) aObject).getType();
+        return TokenTypes.getTokenName(type);
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#getElementNamespaceUri(java.lang.Object)
+     */
+    public String getElementNamespaceUri(Object aObject)
+    {
+        return null;
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#getElementQName(java.lang.Object)
+     */
+    public String getElementQName(Object aObject)
+    {
+        return getElementName(aObject);
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#getElementStringValue(java.lang.Object)
+     */
+    public String getElementStringValue(Object aObject)
+    {
+        return null;
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#getNamespacePrefix(java.lang.Object)
+     */
+    public String getNamespacePrefix(Object aObject)
+    {
+        return null;
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#getNamespaceStringValue(java.lang.Object)
+     */
+    public String getNamespaceStringValue(Object aObject)
+    {
+        return null;
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#getTextStringValue(java.lang.Object)
+     */
+    public String getTextStringValue(Object aObject)
+    {
+        return null;
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#isAttribute(java.lang.Object)
+     */
+    public boolean isAttribute(Object aObject)
+    {
+        return aObject instanceof Attribute;
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#isComment(java.lang.Object)
+     */
+    public boolean isComment(Object aObject)
+    {
+        return false;
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#isDocument(java.lang.Object)
+     */
+    public boolean isDocument(Object aObject)
+    {
+        if (aObject instanceof DetailAST) {
+            final DetailAST node = (DetailAST) aObject;
+            return (node.getType() == TokenTypes.EOF);
+        }
+        else {
+            return false;
+        }
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#isElement(java.lang.Object)
+     */
+    public boolean isElement(Object aObject)
+    {
+        return aObject instanceof DetailAST;
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#isNamespace(java.lang.Object)
+     */
+    public boolean isNamespace(Object aObject)
+    {
+        return false;
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#isProcessingInstruction(java.lang.Object)
+     */
+    public boolean isProcessingInstruction(Object aObject)
+    {
+        return false;
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#isText(java.lang.Object)
+     */
+    public boolean isText(Object aObject)
+    {
+        return false;
+    }
+
+    /**
+     * @see org.jaxen.DefaultNavigator#parseXPath(java.lang.String)
+     */
+    public XPath parseXPath(String aObject)
+        throws SAXPathException
+    {
+        return null;
+    }
+
+    /**
+     * @see org.jaxen.Navigator#getParentNode(java.lang.Object)
+     */
+    public Object getParentNode(Object aObject)
+    {
+        if (aObject instanceof DetailAST) {
+            return ((DetailAST) aObject).getParent();
+        }
+        else {
+            return ((Attribute) aObject).getParent();
+        }
+    }
+
+    /**
+     * @see org.jaxen.Navigator#getAttributeAxisIterator(java.lang.Object)
+     */
+    public Iterator getAttributeAxisIterator(Object aObject)
+    {
+        final DetailAST contextNode = (DetailAST) aObject;
+        return new AttributeAxisIterator(contextNode);
+    }
+
+    /**
+     * Get an iterator over all of this node's children.
+     *
+     * @param aObject The context node for the child axis.
+     * @return A possibly-empty iterator (not null).
+     */
+    public Iterator getChildAxisIterator(Object aObject)
+    {
+        return new NodeIterator((DetailAST) aObject)
+        {
+            /** @see NodeIterator */
+            protected DetailAST getFirstNode(DetailAST aAST)
+            {
+                return getFirstChild(aAST);
+            }
+
+            /** @see NodeIterator */
+            protected DetailAST getNextNode(DetailAST aAST)
+            {
+                return getNextSibling(aAST);
+            }
+        };
+    }
+
+    /**
+     * Get a (single-member) iterator over this node's parent.
+     *
+     * @param aObject the context node for the parent axis.
+     * @return A possibly-empty iterator (not null).
+     */
+    public Iterator getParentAxisIterator(Object aObject)
+    {
+        if (isAttribute(aObject)) {
+            return new SingleObjectIterator(((Attribute) aObject).getParent());
+        }
+        else {
+            DetailAST parent = ((DetailAST) aObject).getParent();
+            if (parent != null) {
+                return new SingleObjectIterator(parent);
+            }
+            else {
+                return EMPTY_ITERATOR;
+            }
+        }
+    }
+
+    /**
+     * Get an iterator over all following siblings.
+     *
+     * @param aObject the context node for the sibling iterator.
+     * @return A possibly-empty iterator (not null).
+     */
+    public Iterator getFollowingSiblingAxisIterator(Object aObject)
+    {
+        return new NodeIterator((DetailAST) aObject)
+        {
+            /** @see NodeIterator */
+            protected DetailAST getFirstNode(DetailAST aAST)
+            {
+                return getNextNode(aAST);
+            }
+
+            /** @see NodeIterator */
+            protected DetailAST getNextNode(DetailAST aAST)
+            {
+                return getNextSibling(aAST);
+            }
+        };
+    }
+
+    /**
+     * Get an iterator over all preceding siblings.
+     *
+     * @param aObject The context node for the preceding sibling axis.
+     * @return A possibly-empty iterator (not null).
+     */
+    public Iterator getPrecedingSiblingAxisIterator(Object aObject)
+    {
+        return new NodeIterator((DetailAST) aObject)
+        {
+            /** @see NodeIterator */
+            protected DetailAST getFirstNode(DetailAST aAST)
+            {
+                return getNextNode(aAST);
+            }
+
+            /** @see NodeIterator */
+            protected DetailAST getNextNode(DetailAST aAST)
+            {
+                return getPreviousSibling(aAST);
+            }
+        };
+    }
+
+    /**
+     * Get an iterator over all following nodes, depth-first.
+     *
+     * @param aObject The context node for the following axis.
+     * @return A possibly-empty iterator (not null).
+     */
+    public Iterator getFollowingAxisIterator(Object aObject)
+    {
+        return new NodeIterator((DetailAST) aObject)
+        {
+            /** @see NodeIterator */
+            protected DetailAST getFirstNode(DetailAST aAST)
+            {
+                if (aAST == null) {
+                    return null;
+                }
+                else {
+                    final DetailAST sibling = getNextSibling(aAST);
+                    if (sibling == null) {
+                        return getFirstNode(aAST.getParent());
+                    }
+                    else {
+                        return sibling;
+                    }
+                }
+            }
+
+            /** @see NodeIterator */
+            protected DetailAST getNextNode(DetailAST aAST)
+            {
+                if (aAST == null) {
+                    return null;
+                }
+                else {
+                    DetailAST n = getFirstChild(aAST);
+                    if (n == null) {
+                        n = getNextSibling(aAST);
+                    }
+                    if (n == null) {
+                        return getFirstNode(aAST.getParent());
+                    }
+                    else {
+                        return n;
+                    }
+                }
+            }
+        };
+    }
+
+    /**
+     * Get an iterator over all preceding nodes, depth-first.
+     *
+     * @param aObject The context node for the preceding axis.
+     * @return A possibly-empty iterator (not null).
+     */
+    public Iterator getPrecedingAxisIterator(Object aObject)
+    {
+        return new NodeIterator((DetailAST) aObject)
+        {
+            /** @see NodeIterator */
+            protected DetailAST getFirstNode(DetailAST aAST)
+            {
+                if (aAST == null) {
+                    return null;
+                }
+                else {
+                    final DetailAST sibling = getPreviousSibling(aAST);
+                    if (sibling == null) {
+                        return getFirstNode(aAST.getParent());
+                    }
+                    else {
+                        return sibling;
+                    }
+                }
+            }
+
+            /** @see NodeIterator */
+            protected DetailAST getNextNode(DetailAST aAST)
+            {
+                if (aAST == null) {
+                    return null;
+                }
+                else {
+                    DetailAST n = getLastChild(aAST);
+                    if (n == null) {
+                        n = getPreviousSibling(aAST);
+                    }
+                    if (n == null) {
+                        return getFirstNode(aAST.getParent());
+                    }
+                    else {
+                        return n;
+                    }
+                }
+            }
+        };
+    }
+
+    /** @see org.jaxen.Navigator#getDocumentNode(java.lang.Object) */
+    public Object getDocumentNode(Object aObject)
+    {
+        if (isDocument(aObject)) {
+            return aObject;
+        }
+        else {
+            return getDocumentNode(getParentNode(aObject));
+        }
+    }
+}
diff --git a/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/NodeIterator.java b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/NodeIterator.java
new file mode 100644
index 0000000..138edcb
--- /dev/null
+++ b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/NodeIterator.java
@@ -0,0 +1,122 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2003  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.xpath;
+
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * Iterator for DetailAST nodes in a syntax tree.
+ * @author Rick Giles
+ */
+public abstract class NodeIterator
+    implements Iterator
+{
+
+    /** The DetailAST for this iterator */
+    private DetailAST mNode;
+
+    /**
+     * Constructs a <code>NodeIterator</code> for a DetailAST.
+     * @param aAST the DetailAST.
+     */
+    public NodeIterator(DetailAST aAST)
+    {
+        this.mNode = getFirstNode(aAST);
+    }
+
+    /** @see java.util.Iterator#hasNext() */
+    public boolean hasNext()
+    {
+        return mNode != null;
+    }
+
+    /** @see java.util.Iterator#next() */
+    public Object next()
+    {
+        if (mNode == null) {
+            throw new NoSuchElementException();
+        }
+        final DetailAST ret = mNode;
+        mNode = getNextNode(mNode);
+        return ret;
+    }
+
+    /** @see java.util.Iterator#remove() */
+    public void remove()
+    {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * Gets the first node of an iterator over a DetailAST.
+     * @param aAST the DetailAST.
+     * @return the first node of an iterator over aAST.
+     */
+    protected abstract DetailAST getFirstNode(DetailAST aAST);
+
+    /**
+     * Gets the next node for an iterator over a DetailAST.
+     * @param aAST the DetailAST.
+     * @return the next node of aAST.
+     */
+    protected abstract DetailAST getNextNode(DetailAST aAST);
+
+    /**
+     * Gets the previous sibling of a DetailAST.
+     * @param aAST the DetailAST.
+     * @return the previous sibling of aAST.
+     */
+    protected DetailAST getPreviousSibling(DetailAST aAST)
+    {
+        return aAST.getPreviousSibling();
+    }
+
+    /**
+     * Get the next sibling of a DetailAST.
+     * @param aAST the DetailAST.
+     * @return the next sibling of aAST.
+     */
+    protected DetailAST getNextSibling(DetailAST aAST)
+    {
+        return (DetailAST) aAST.getNextSibling();
+    }
+
+    /**
+     * Get the first child of a DetailAST.
+     * @param aAST the DetailAST.
+     * @return the first child of aAST.
+     */
+    protected DetailAST getFirstChild(DetailAST aAST)
+    {
+        return (DetailAST) aAST.getFirstChild();
+    }
+
+    /**
+     * Get the last child of a DetailAST.
+     * @param aAST the DetailAST.
+     * @return the last child of aAST.
+     */
+    protected DetailAST getLastChild(DetailAST aAST)
+    {
+        return aAST.getLastChild();
+    }
+}
\ No newline at end of file
diff --git a/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/XPathCheck.java b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/XPathCheck.java
new file mode 100644
index 0000000..a5e27ed
--- /dev/null
+++ b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/XPathCheck.java
@@ -0,0 +1,103 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2003  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.xpath;
+
+import java.util.Iterator;
+
+import org.jaxen.BaseXPath;
+import org.jaxen.JaxenException;
+import org.jaxen.XPath;
+
+import antlr.ASTFactory;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Checks for an XPath in the root AST. Path elements are named
+ * according to token types. Attributes of an element are bean
+ * properties.
+ * Requires jaxen, http://jaxen.sourceforge.net and
+ * saxpath, http://sourceforge.net/projects/saxpath/.
+ * Idea shamelessly stolen from the equivalent PMD rule (pmd.sourceforge.net).
+ * @author Rick Giles
+ */
+public class XPathCheck extends Check
+{
+    /** XPath for this check */
+    private XPath mXPath;
+
+    /** error message */
+    private String mMessage = "illegal.xpath";
+
+    /** @see com.puppycrawl.tools.checkstyle.api.Check#getDefaultTokens() */
+    public int[] getDefaultTokens()
+    {
+        return new int[0];
+    }
+
+    /**  @see com.puppycrawl.tools.checkstyle.api.Check */
+    public void beginTree(DetailAST aAST)
+    {
+        if (mXPath != null) {
+            final ASTFactory factory = new ASTFactory();
+            factory.setASTNodeType(DetailAST.class.getName());
+            // TODO: Need to resolve if need a fake root node....
+            final DetailAST root =
+                (DetailAST) factory.create(TokenTypes.EOF, "ROOT");
+            root.setFirstChild(aAST);
+            try {
+                final Iterator it = mXPath.selectNodes(aAST).iterator();
+                while (it.hasNext()) {
+                    final DetailAST node = (DetailAST) it.next();
+                    log(
+                        node.getLineNo(),
+                        node.getColumnNo(),
+                        mMessage,
+                        new String[] {node.getText()});
+                }
+            }
+            catch (JaxenException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+        }
+    }
+
+    /**
+     * Sets the error message for this check.
+     * @param aMessage error message for this check.
+     */
+    public void setMessage(String aMessage)
+    {
+        mMessage = aMessage;
+    }
+
+    /**
+     * Sets the XPath for this check.
+     * @param aXPath the XPath for this check.
+     * @throws JaxenException if there is an error.
+     */
+    public void setXPath(String aXPath)
+        throws JaxenException
+    {
+        mXPath = new BaseXPath(aXPath, new DocumentNavigator());
+    }
+}
diff --git a/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/jaxen_LICENSE.txt b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/jaxen_LICENSE.txt
new file mode 100644
index 0000000..fbd3c6f
--- /dev/null
+++ b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/jaxen_LICENSE.txt
@@ -0,0 +1,56 @@
+/*-- 
+
+ $Id: jaxen_LICENSE.txt,v 1.1 2003-07-23 14:22:41 rickgiles Exp $
+
+ Copyright (C) 2000-2002 bob mcwhirter & James Strachan.
+ All rights reserved.
+ 
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions, and the following disclaimer.
+ 
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions, and the disclaimer that follows 
+    these conditions in the documentation and/or other materials 
+    provided with the distribution.
+
+ 3. The name "Jaxen" must not be used to endorse or promote products
+    derived from this software without prior written permission.  For
+    written permission, please contact license at jaxen.org.
+ 
+ 4. Products derived from this software may not be called "Jaxen", nor
+    may "Jaxen" appear in their name, without prior written permission
+    from the Jaxen Project Management (pm at jaxen.org).
+ 
+ In addition, we request (but do not require) that you include in the 
+ end-user documentation provided with the redistribution and/or in the 
+ software itself an acknowledgement equivalent to the following:
+     "This product includes software developed by the
+      Jaxen Project (http://www.jaxen.org/)."
+ Alternatively, the acknowledgment may be graphical using the logos 
+ available at http://www.jaxen.org/
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED.  IN NO EVENT SHALL THE Jaxen AUTHORS OR THE PROJECT
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many 
+ individuals on behalf of the Jaxen Project and was originally 
+ created by bob mcwhirter <bob at werken.com> and 
+ James Strachan <jstrachan at apache.org>.  For more information on the 
+ Jaxen Project, please see <http://www.jaxen.org/>.
+ 
+ */
+
diff --git a/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/messages.properties b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/messages.properties
new file mode 100644
index 0000000..1dc580f
--- /dev/null
+++ b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/messages.properties
@@ -0,0 +1,6 @@
+block.empty=Empty {0} block.
+hex.case.constant="Case constant ''{0}'' must not start with ''0x'' or ''0X''.
+needBraces=''{0}'' construct must use '''{}'''s.
+short.variable.name=Short variable name ''{0}''.
+string.conditional=String literal {0} must not be an operand.
+
diff --git a/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/package.html b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/package.html
new file mode 100644
index 0000000..25e71d7
--- /dev/null
+++ b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/package.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head></head>
+
+<body>
+
+<p>Contains a Check for XPath semantics in a syntac tree.</p>
+
+</body>
+</html>
diff --git a/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/saxpath_LICENSE.txt b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/saxpath_LICENSE.txt
new file mode 100644
index 0000000..b92261a
--- /dev/null
+++ b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/saxpath_LICENSE.txt
@@ -0,0 +1,60 @@
+/*
+ * $Header: /opt/shared/tmp/checkstyle-cvsbackup/checkstyle/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/saxpath_LICENSE.txt,v 1.1 2003-07-23 14:22:41 rickgiles Exp $
+ * $Revision: 1.1 $
+ * $Date: 2003-07-23 14:22:41 $
+ *
+ * ====================================================================
+ *
+ * Copyright (C) 2000-2002 werken digital.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions, and the disclaimer that follows 
+ *    these conditions in the documentation and/or other materials 
+ *    provided with the distribution.
+ *
+ * 3. The name "SAXPath" must not be used to endorse or promote products
+ *    derived from this software without prior written permission.  For
+ *    written permission, please contact license at saxpath.org.
+ * 
+ * 4. Products derived from this software may not be called "SAXPath", nor
+ *    may "SAXPath" appear in their name, without prior written permission
+ *    from the SAXPath Project Management (pm at saxpath.org).
+ * 
+ * In addition, we request (but do not require) that you include in the 
+ * end-user documentation provided with the redistribution and/or in the 
+ * software itself an acknowledgement equivalent to the following:
+ *     "This product includes software developed by the
+ *      SAXPath Project (http://www.saxpath.org/)."
+ * Alternatively, the acknowledgment may be graphical using the logos 
+ * available at http://www.saxpath.org/
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE SAXPath AUTHORS OR THE PROJECT
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * ====================================================================
+ * This software consists of voluntary contributions made by many 
+ * individuals on behalf of the SAXPath Project and was originally 
+ * created by bob mcwhirter <bob at werken.com> and 
+ * James Strachan <jstrachan at apache.org>.  For more information on the 
+ * SAXPath Project, please see <http://www.saxpath.org/>.
+ * 
+ * $Id: saxpath_LICENSE.txt,v 1.1 2003-07-23 14:22:41 rickgiles Exp $
+ */
diff --git a/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/xpath_config.xml b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/xpath_config.xml
new file mode 100644
index 0000000..7e4d7f0
--- /dev/null
+++ b/contrib/examples/checks/com/puppycrawl/tools/checkstyle/checks/xpath/xpath_config.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+<module name="Checker">
+    <metadata name="com.atlas-sw.eclipse" value="I like Sydney"/>
+    <property name="severity" value="error"/>
+    <module name="TreeWalker">
+        <!-- empty if statement -->
+        <module name="xpath.XPath">
+            <property name="XPath" value="//LITERAL_IF/SLIST[count(*) = 1]"/>
+            <property name="message" value="block.empty"/>
+         </module>
+
+        <!-- if statement must use braces-->
+        <module name="xpath.XPath">
+            <property name="XPath" value="//LITERAL_IF[not(SLIST)]"/>
+            <property name="message" value="needBraces"/>
+         </module>
+
+        <!-- String conditional -->
+        <module name="xpath.XPath">
+            <property name="XPath" value="//EQUAL/STRING_LITERAL"/>
+            <property name="message" value="string.conditional"/>
+         </module>
+        <module name="xpath.XPath">
+            <property name="XPath" value="//NOT_EQUAL/STRING_LITERAL"/>
+            <property name="message" value="string.conditional"/>
+         </module>
+
+        <!-- Short variable name -->
+        <module name="xpath.XPath">
+            <property name="XPath" value="//VARIABLE_DEF/IDENT[string-length(@text) < 3][not(ancestor::FOR_INIT)]"/>
+            <property name="message" value="short.variable.name"/>
+        </module>
+
+        <!-- Hex case constant -->
+        <module name="xpath.XPath">
+            <property name="XPath" value="//LITERAL_CASE/EXPR/*[starts-with(@text,"0x") or starts-with(@text,"0X")]"/>
+            <property name="message" value="hex.case.constant"/>
+        </module>
+     </module>
+</module>
+
diff --git a/contrib/examples/checks/mycompany_conf.xml b/contrib/examples/checks/mycompany_conf.xml
new file mode 100644
index 0000000..dbbcccb
--- /dev/null
+++ b/contrib/examples/checks/mycompany_conf.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<!--
+
+  A Checkstyle configuration that demonstrates the integration
+  of user checks.
+
+-->
+
+<module name="Checker">
+
+  <!-- Add the TreeWalker that is required as a container for Checks -->
+  <module name="TreeWalker">
+
+    <!--
+      register our Check class twice with different
+      configurations for different tokens
+    -->
+
+    <!-- interfaces are limited to 10 methods -->
+    <module name="com.mycompany.checks.MethodLimitCheck">
+      <property name="tokens" value="INTERFACE_DEF"/>
+      <property name="max" value="10"/>
+    </module>
+
+    <!-- classes are limited to 25 methods -->
+    <module name="com.mycompany.checks.MethodLimitCheck">
+      <property name="tokens" value="CLASS_DEF"/>
+      <property name="max" value="25"/>
+    </module>
+
+  </module>
+
+
+  <!-- register our FileSetCheck -->
+  <module name="com.mycompany.checks.LimitImplementationFiles">
+    <!-- here you could also set the "max" property, just like in the examples above  -->
+  </module>
+
+
+</module>
diff --git a/contrib/examples/conf/BlochEffectiveJava.xml b/contrib/examples/conf/BlochEffectiveJava.xml
new file mode 100644
index 0000000..a35630e
--- /dev/null
+++ b/contrib/examples/conf/BlochEffectiveJava.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<!--
+
+  A Checkstyle configuration that checks against the recommendations
+  in Joshua Bloch, Effective Java (highly recommended read!)
+
+  This file does NOT duplicate the checks for whitespace settings,
+  placement of curly braces, etc.  Only the rules that are explicitly
+  mentioned in the book are enforced.
+
+  Currently the amount of rules that can be automatically checked by
+  Checkstyle is not very large, but adding more checks of this quality
+  is a high priority goal for the development team.
+
+-->
+
+<module name="Checker">
+
+  <module name="TreeWalker">
+
+    <!-- Item 4 - Avoid creating duplicate objects -->
+    <module name="IllegalInstantiation">
+      <property name="classes" value="java.lang.Boolean, java.lang.String"/>
+    </module>
+
+    <!-- Item 6 - Avoid finalizers -->
+    <!-- this will not find violations that contain linebreaks -->
+    <module name="GenericIllegalRegexp">
+      <property name="format"
+                value="((public)|(protected))\s+void\s+finalize\(\s*\)"/>
+    </module>
+
+    <!-- Item 8 - Always override hashCode when you override equals -->
+    <module name="EqualsHashCode"/>
+
+    <!-- Item 12 - Make all fields private -->
+    <module name="VisibilityModifier"/>
+
+    <!-- Item 15 - Design and document for inheritance or else prohibit it -->
+    <!-- the module actually implements a very strict rule, it would be
+         interesting to know whether Joshua meant what checkstyle implements.
+         We feel this implementation is well suited as a warning,
+         i.e. if you get error messages from this check you should be
+         able to name a good reason to implement your code the way you do it,
+         especially if you are designing a library and not an application. -->
+    <module name="DesignForExtension">
+      <property name="severity" value="warning"/>
+    </module>
+
+    <!-- Item 17 - Use interfaces only to define types -->
+    <module name="InterfaceIsType"/>
+
+    <!-- Item 25 - Design method signatures carefully -->
+    <!-- Avoid long parameter lists -->
+    <module name="ParameterNumber">
+      <property name="max" value="3"/>
+    </module>
+
+    <!-- Item 26 - Use overloading judiciously -->
+    <!-- rfe #659735 -->
+
+    <!-- Item 27 - Return zero-length array, not nulls -->
+    <!-- no rfe yet -->
+
+    <!-- Item 28 - Write doc comments for all exposed API elements -->
+    <module name="JavadocType">
+      <property name="scope" value="protected"/>
+    </module>
+    <module name="JavadocMethod"> <!-- also covers Item 44 -->
+      <property name="scope" value="protected"/>
+    </module>
+    <module name="JavadocVariable">
+      <property name="scope" value="protected"/>
+    </module>
+
+    <!-- Item 29 - Minimize the scope of local variables -->
+    <!-- no rfe yet -->
+
+
+    <!-- Item 38 - Adhere to generally accepted naming conventions -->
+    <module name="PackageName">
+      <!-- no uppercase letters, between 2 and 8 characters -->
+      <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]{1,7})*$"/>
+    </module>
+    <module name="TypeName"/>
+    <module name="ConstantName"/>
+    <module name="LocalFinalVariableName"/>
+    <module name="LocalVariableName"/>
+    <module name="MemberName"/>
+    <module name="MethodName"/>
+    <module name="ParameterName"/>
+    <module name="StaticVariableName"/>
+
+    <!-- Item 47 - Don't ignore exceptions -->
+    <module name="EmptyBlock">
+      <property name="tokens" value="LITERAL_CATCH"/>
+      <!-- require a comment, change to stmt to require a statement -->
+      <property name="option" value="text"/>
+    </module>
+
+    <!-- Item 50 - Never invoke wait outside a loop -->
+    <!-- rfe #712798 -->
+
+    <!-- Item 57 - Provide a readResolve method when necessary -->
+    <!-- no rfe yet -->
+
+  </module>
+
+</module>
diff --git a/contrib/examples/conf/openorb.xml b/contrib/examples/conf/openorb.xml
new file mode 100644
index 0000000..6ddd782
--- /dev/null
+++ b/contrib/examples/conf/openorb.xml
@@ -0,0 +1,139 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<!--
+
+  A Checkstyle configuration that checks the coding conventions of
+  the Community OpenORB project (openorb.sourceforge.net)
+
+  Many Apache Jakarta projects like
+  Avalon or Turbine use very similar conventions.
+
+  Interesting techniques in this configuration:
+  - use property expansion to find the header file
+  - multiple instantiation of the MethodLengthCheck for different Token types
+
+  This configuration includes rules taken from
+
+  the Java Language Specification at
+  http://java.sun.com/docs/books/jls/second_edition/html/index.html
+
+  the Sun Code Conventions at
+  http://java.sun.com/docs/codeconv/
+
+  the Javadoc guidelines at
+  http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
+
+  the JDK Api documentation
+  http://java.sun.com/j2se/docs/api/index.html
+
+  the OpenORB coding conventions at
+  http://jakarta.apache.org/turbine/common/code-standards.html
+
+  some best practices
+
+-->
+
+<module name="Checker">
+
+  <property name="basedir" value="${basedir}"/>
+
+  <module name="TreeWalker">
+
+    <!-- naming conventions, the CORBA spec includes method names with underscores so we allow them here -->
+    <module name="ConstantName">           <property name="format" value="^[A-Z](_?[A-Z0-9]+)*$"/></module>
+    <module name="MethodName">             <property name="format" value="^[a-z](_?[a-zA-Z0-9]+)*$"/></module>
+    <module name="LocalFinalVariableName"> <property name="format" value="^[a-z](_?[a-zA-Z0-9]+)*$"/></module>
+    <module name="LocalVariableName">      <property name="format" value="^[a-z](_?[a-zA-Z0-9]+)*$"/></module>
+    <module name="MemberName">             <property name="format" value="^m_[a-z](_?[a-zA-Z0-9])*$"/></module>
+    <module name="ParameterName">          <property name="format" value="^[a-z](_?[a-zA-Z0-9]+)*$"/></module>
+    <module name="TypeName">               <property name="format" value="^[A-Z][a-zA-Z0-9]*$"/></module>
+    <module name="StaticVariableName">     <property name="format" value="^s_[a-z](_?[a-zA-Z0-9])*$"/></module>
+    <module name="PackageName">            <property name="format" value="^[a-z]+(\.[a-zA-Z_][a-zA-Z_0-9]*)*$"/></module>
+
+    <!-- code layout -->
+    <module name="LeftCurly">              <property name="option" value="nl"/></module>
+    <module name="RightCurly">             <property name="option" value="alone"/></module>
+    <module name="NeedBraces"/>
+    <module name="OperatorWrap"/>
+
+    <!-- whitespace settings -->
+    <module name="NoWhitespaceAfter"/>
+    <module name="NoWhitespaceBefore"/>
+    <module name="WhitespaceAfter"/>
+    <module name="WhitespaceAround"/>
+
+
+
+    <!-- JavaDoc guidelines -->
+    <!-- <module name="JavadocMethod"><property name="scope" value="protected"/></module> -->
+    <!-- <module name="JavadocVariable"><property name="scope" value="protected"/></module> -->
+    <module name="JavadocType">
+      <property name="scope" value="protected"/>
+      <property name="authorFormat" value="^.+$"/> <!-- don't require email to avoid spam -->
+      <property name="versionFormat" value="^\$Revision.*\$$"/> <!-- CVS Keyword -->
+    </module>
+
+
+
+    <!-- JLS -->
+    <module name="RedundantModifier"/>
+    <module name="ModifierOrder"/>
+    <module name="UpperEll"/>
+
+
+
+    <!-- Api Doc -->
+
+    <!-- override hashCode whenever you override equals() -->
+    <module name="EqualsHashCode"/>
+
+    <!-- don't create new instances of Boolean, use Boolean.TRUE/FALSE or Boolean.valueOf() instead -->
+    <module name="IllegalInstantiation"><property name="classes" value="java.lang.Boolean"/></module>
+
+
+
+    <!-- best practices -->
+
+    <!-- don't allow empty blocks (in particular catch blocks) -->
+    <module name="EmptyBlock"><property name="option" value="text"/></module>
+
+    <!-- avoid inner assignments -->
+    <module name="InnerAssignment"/>
+
+    <!-- don't allow imports from the sun.* package hierarchy -->
+    <module name="IllegalImport"/>
+
+    <!-- don't allow public members except in private record like classes,
+         the members have special names there -->
+    <module name="VisibilityModifier"><property name="publicMemberPattern" value ="^f[a-zA-Z0-9]*$"/></module>
+
+    <!-- simplify your code -->
+    <module name="RedundantImport"/>
+    <module name="UnusedImports"/>
+    <module name="SimplifyBooleanExpression"/>
+    <module name="SimplifyBooleanReturn"/>
+
+    <!-- flag reminder comments -->
+    <module name="TodoComment"/>
+
+    <!-- enforce length limits, different settings for method and ctor length -->
+    <module name="LineLength"><property name="max" value="100"/></module>
+    <module name="MethodLength"><property name="tokens" value="METHOD_DEF"/><property name="max" value="300"/></module>
+    <module name="MethodLength"><property name="tokens" value="CTOR_DEF"/><property name="max" value="500"/></module>
+    <module name="FileLength"><property name="max" value="2800"/></module>
+
+    <!-- don't allow tabs -->
+    <module name="TabCharacter"/>
+
+    <!-- enforce License Header -->
+    <module name="Header"><property name="headerFile" value="${basedir}/../../tools/etc/LICENSE.txt"/></module>
+
+  </module>
+
+  <!-- enforce package documentation -->
+  <module name="PackageHtml"/>
+
+</module>
diff --git a/contrib/examples/conf/template_config.xml b/contrib/examples/conf/template_config.xml
new file mode 100644
index 0000000..c8fcd7c
--- /dev/null
+++ b/contrib/examples/conf/template_config.xml
@@ -0,0 +1,782 @@
+<?xml version="1.0"?>
+<!--
+    CheckStyle 3.4 template configuration file
+    @author Oleg Estehin
+-->
+
+<!DOCTYPE module PUBLIC
+        "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+        "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<module name="Checker">
+
+    <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
+    <!-- Checks that a package.html file exists for each package.     -->
+        <!-- <property name="fileExtensions" value="java"/> -->
+    <module name="PackageHtml">
+    </module>
+
+    <module name="TreeWalker">
+
+        <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocType -->
+        <!-- Checks Javadoc comments for class and interface definitions. -->
+            <!-- <property name="scope" value="private"/> -->
+            <!-- <property name="excludeScope" value=""/> -->
+            <!-- <property name="authorFormat" value=""/> -->
+            <!-- <property name="versionFormat" value=""/> -->
+            <!-- <property name="tokens" value="INTERFACE_DEF, CLASS_DEF"/> -->
+        <module name="JavadocType">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocMethod -->
+        <!-- Checks to ensure that the javadoc tags exist (if required) -->
+            <!-- <property name="scope" value="private"/> -->
+            <!-- <property name="excludeScope" value=""/> -->
+            <!-- <property name="allowUndeclaredRTE" value="false"/> -->
+            <!-- <property name="allowThrowsTagsForSubclasses" value="false"/> -->
+            <!-- <property name="allowMissingParamTags" value="false"/> -->
+            <!-- <property name="allowMissingThrowsTags" value="false"/> -->
+            <!-- <property name="allowMissingReturnTag" value="false"/> -->
+            <!-- <property name="tokens" value="METHOD_DEF, CTOR_DEF"/> -->
+        <module name="JavadocMethod">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocVariable -->
+        <!-- Checks that variables have Javadoc comments. -->
+            <!-- <property name="scope" value="private"/> -->
+            <!-- <property name="excludeScope" value=""/> -->
+        <module name="JavadocVariable">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocStyle -->
+        <!-- Validates Javadoc comments to help ensure they are well formed. -->
+            <!-- <property name="scope" value="private"/> -->
+            <!-- <property name="excludeScope" value=""/> -->
+            <!-- <property name="checkFirstSentence" value="true"/> -->
+            <!-- <property name="checkEmptyJavadoc" value="false"/> -->
+            <!-- <property name="checkHtml" value="true"/> -->
+            <!-- <property name="tokens" value="INTERFACE_DEF, CLASS_DEF,
+                    METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/> -->
+        <module name="JavadocStyle">
+        </module>
+
+
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <!-- Checks for Naming Conventions.                  -->
+            <!-- <property name="format" value="^Abstract.*$|^.*Factory$"/> -->
+        <module name="AbstractClassName">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <!-- Checks for Naming Conventions.                  -->
+            <!-- <property name="format" value="^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"/> -->
+        <module name="ConstantName">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <!-- Checks for Naming Conventions.                  -->
+            <!-- <property name="format" value="^[a-z][a-zA-Z0-9]*$"/> -->
+            <!-- <property name="tokens" value="VARIABLE_DEF, PARAMETER_DEF"/> -->
+        <module name="LocalFinalVariableName">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <!-- Checks for Naming Conventions.                  -->
+            <!-- <property name="format" value="^[a-z][a-zA-Z0-9]*$"/> -->
+        <module name="LocalVariableName">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <!-- Checks for Naming Conventions.                  -->
+        <module name="MemberName">
+            <!-- <property name="format" value="^[a-z][a-zA-Z0-9]*$"/> -->
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <!-- Checks for Naming Conventions.                  -->
+            <!-- <property name="format" value="^[a-z][a-zA-Z0-9]*$"/> -->
+        <module name="MethodName">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <!-- Checks for Naming Conventions.                  -->
+            <!-- <property name="format" value="^[a-z]+(\.[a-zA-Z_][a-zA-Z0-9_]*)*$"/> -->
+        <module name="PackageName">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <!-- Checks for Naming Conventions.                  -->
+            <!-- <property name="format" value="^[a-z][a-zA-Z0-9]*$"/> -->
+        <module name="ParameterName">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <!-- Checks for Naming Conventions.                  -->
+            <!-- <property name="format" value="^[a-z][a-zA-Z0-9]*$"/> -->
+        <module name="StaticVariableName">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <!-- Checks for Naming Conventions.                  -->
+            <!-- <property name="format" value="^[a-z][a-zA-Z0-9]*$"/> -->
+            <!-- <property name="tokens" value="CLASS_DEF, INTERFACE_DEF"/> -->
+            <!-- <property name="applyToPublic" value="true"/> -->
+            <!-- <property name="applyToProtected" value="true"/> -->
+            <!-- <property name="applyToPackage" value="true"/> -->
+            <!-- <property name="applyToPrivate" value="true"/> -->
+        <module name="TypeName">
+        </module>
+        
+        
+        <!-- See http://checkstyle.sf.net/config_header.html   -->
+        <!-- Checks that a source file begins with a specified header. -->
+            <!-- <property name="headerFile" value=""/> -->
+            <!-- <property name="ignoreLines" value=""/> -->
+<!--
+        <module name="Header">
+        </module>
+-->
+        
+        <!-- See http://checkstyle.sf.net/config_header.html   -->
+        <!-- Checks the header of a source file against a header file that 
+            contains a regular expression for each line of the source header. -->
+            <!-- <property name="headerFile" value=""/> -->
+            <!-- <property name="multiLines" value=""/> -->
+<!--
+        <module name="RegexpHeader">
+        </module>
+-->
+        
+        
+        <!-- See http://checkstyle.sf.net/config_import.html -->
+        <!-- Checks that there are no import statements that use the * notation. -->
+            <!-- <property name="excludes" value=""/> -->
+        <module name="AvoidStarImport">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_import.html -->
+        <!-- Checks for imports from a set of illegal packages. -->
+            <!-- <property name="illegalPkgs" value="sun"/> -->
+        <module name="IllegalImport">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_import.html -->
+        <!-- Checks for redundant import statements. -->
+        <module name="RedundantImport">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_import.html -->
+        <!-- Checks for unused import statements. -->
+        <module name="UnusedImports">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_import.html -->
+        <!-- Checks the ordering/grouping of imports. -->
+            <!-- <property name="groups" value=""/> -->
+            <!-- <property name="ordered" value="true"/> -->
+            <!-- <property name="separated" value="false"/> -->
+            <!-- <property name="caseSensitive" value="true"/> -->
+        <module name="ImportOrder">
+        </module>
+
+
+        <!-- See http://checkstyle.sf.net/config_sizes.html -->
+        <!-- Restricts the number of executable statements to a specified 
+            limit. -->
+            <!-- <property name="max" value="30"/> -->
+            <!-- <property name="tokens" value="CTOR_DEF, METHOD_DEF, INSTANCE_INIT, STATIC_INIT"/> -->
+        <module name="ExecutableStatementCount">
+        </module>
+
+        <!-- See http://checkstyle.sf.net/config_sizes.html -->
+        <!-- Checks for long source files. -->
+            <!-- <property name="max" value="2000"/> -->
+        <module name="FileLength">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_sizes.html -->
+        <!-- Checks for long lines. -->
+            <!-- <property name="ignorePattern" value="^$"/> -->
+            <!-- <property name="max" value="80"/> -->
+        <module name="LineLength">
+        </module>
+
+        <!-- See http://checkstyle.sf.net/config_sizes.html -->
+        <!-- Checks for long methods and constructors. -->
+            <!-- <property name="max" value="150"/> -->
+            <!-- <property name="countEmpty" value="true"/> -->
+            <!-- <property name="tokens" value="METHOD_DEF, CTOR_DEF"/> -->
+        <module name="MethodLength">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_sizes.html -->
+        <!-- Checks for long anonymous inner classes. -->
+            <!-- <property name="max" value="20"/> -->
+        <module name="AnonInnerLength">
+        </module>
+
+        <!-- See http://checkstyle.sf.net/config_sizes.html -->
+        <!-- Checks the number of parameters of a method or constructor. -->
+            <!-- <property name="max" value="7"/> -->
+            <!-- <property name="tokens" value="METHOD_DEF, CTOR_DEF"/> -->
+        <module name="ParameterNumber">
+        </module>
+
+
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <!-- Checks the padding of an empty for initializer. -->
+            <!-- <property name="option" value="nospace"/> -->
+        <module name="EmptyForInitializerPad">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <!-- Checks the padding of an empty for iterator. -->
+            <!-- <property name="option" value="nospace"/> -->
+        <module name="EmptyForIteratorPad">
+        </module>
+
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <!-- Checks the padding between the identifier of a method definition,
+            constructor definition, method call, or constructor invocation; and
+            the left parenthesis of the parameter list. -->
+            <!-- <property name="allowLineBreaks" value="true"/> -->
+            <!-- <property name="tokens" value="CTOR_DEF, LITERAL_NEW,
+                    METHOD_CALL, METHOD_DEF, SUPER_CTOR_CALL "/> -->
+        <module name="MethodParamPad">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <!-- Checks that there is no whitespace after a token. -->
+            <!-- <property name="allowLineBreaks" value="true"/> -->
+            <!-- <property name="tokens" value="ARRAY_INIT, BNOT, DEC, DOT, INC,
+                    LNOT, UNARY_MINUS, UNARY_PLUS"/> -->
+        <module name="NoWhitespaceAfter">
+        </module>
+                
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <!-- Checks that there is no whitespace before a token. -->
+            <!-- <property name="allowLineBreaks" value="false"/> -->
+            <!-- <property name="tokens" value="SEMI, DOT, POST_DEC, POST_INC"/> -->
+        <module name="NoWhitespaceBefore">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <!-- Checks the policy on how to wrap lines on operators. -->
+            <!-- <property name="option" value="nl"/> -->
+            <!-- <property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR,
+                    BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV,
+                    DIV_ASSIGN, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF,
+                    LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL,
+                    PLUS, PLUS_ASSIGN, QUESTION, SL, SL_ASSIGN, SR, SR_ASSIGN,
+                    STAR, STAR_ASSIGN"/> -->
+        <module name="OperatorWrap">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <!-- Checks the policy on the padding of parentheses. -->
+            <!-- <property name="option" value="nospace"/> -->
+            <!-- <property name="tokens" value="CTOR_CALL, LPAREN, METHOD_CALL,
+                    RPAREN, SUPER_CTOR_CALL"/> -->
+        <module name="ParenPad">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <!-- Checks the policy on the padding of parentheses for typecasts. -->
+            <!-- <property name="option" value="nospace"/> -->
+            <!-- <property name="tokens" value="TYPECAST, RPAREN"/> -->
+        <module name="TypecastParenPad">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <!-- Checks that there are no tab characters ('\t') in the source 
+            code. -->
+        <module name="TabCharacter">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <!-- Checks that a token is followed by whitespace. -->
+            <!-- <property name="tokens" value="COMMA, SEMI, TYPECAST"/> -->
+        <module name="WhitespaceAfter">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <!-- Checks that a token is surrounded by whitespace. -->
+            <!-- <property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR,
+                    BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV,
+                    DIV_ASSIGN, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_ASSERT,
+                    LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY,
+                    LITERAL_FOR, LITERAL_IF, LITERAL_RETURN,
+                    LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT,
+                    MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS,
+                    PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR,
+                    SR_ASSIGN, STAR, STAR_ASSIGN"/> -->
+        <module name="WhitespaceAround">
+        </module>
+
+
+        <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+        <!-- Checks that the order of modifiers conforms to the suggestions 
+            in the Java Language specification, sections 8.1.1, 8.3.1 and 8.4.3. -->
+        <module name="ModifierOrder">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+        <!-- Checks that there is no redundant modifiers. -->
+            <!-- <property name="tokens" value="METHOD_DEF, VARIABLE_DEF"/> -->
+        <module name="RedundantModifier">
+        </module>
+
+
+        <!-- See http://checkstyle.sf.net/config_blocks.html -->
+        <!-- Checks for empty blocks. -->
+            <!-- <property name="option" value="stmt"/> -->
+            <!-- <property name="tokens" value="LITERAL_CATCH, LITERAL_DO,
+                    LITERAL_ELSE, LITERAL_FINALLY, LITERAL_IF, LITERAL_FOR,
+                    LITERAL_TRY, LITERAL_WHILE, INSTANCE_INIT STATIC_INIT"/> -->
+        <module name="EmptyBlock">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_blocks.html -->
+        <!-- Checks for the placement of left curly braces ('{') for code 
+            blocks. -->
+            <!-- <property name="option" value="eol"/> -->
+            <!-- <property name="maxLineLength" value="80"/> -->
+            <!-- <property name="tokens" value="CLASS_DEF, CTOR_DEF,
+                    INTERFACE_DEF, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE,
+                    LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_SWITCH,
+                    LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE,
+                    METHOD_DEF"/> -->
+        <module name="LeftCurly">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_blocks.html -->
+        <!-- Checks for braces around code blocks. -->
+            <!-- <property name="tokens" value="LITERAL_DO, LITERAL_ELSE,
+                    LITERAL_IF, LITERAL_FOR, LITERAL_WHILE"/> -->
+        <module name="NeedBraces">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_blocks.html -->
+        <!-- Checks the placement of right curly braces ('}') for else, 
+            try, and catch tokens. -->
+            <!-- <property name="option" value="same"/> -->
+            <!-- <property name="tokens" value="LITERAL_CATCH, LITERAL_ELSE,
+                    LITERAL_TRY"/> -->
+        <module name="RightCurly">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_blocks.html -->
+        <!-- Finds nested blocks, i.e. blocks that are used freely in the 
+            code. -->
+            <!-- <property name="allowInSwitchCase" value="false"/> -->
+        <module name="AvoidNestedBlocks">
+        </module>
+        
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks that array initialization contains a trailing comma. -->
+        <module name="ArrayTrailingComma">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Detects inline conditionals. -->
+        <module name="AvoidInlineConditionals">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks that classes that define a covariant equals() method 
+            also override method equals(java.lang.Object). -->
+        <module name="CovariantEquals">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Detects empty statements (standalone ;). -->
+        <module name="EmptyStatement">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks that classes that override equals() also override 
+            hashCode(). -->
+        <module name="EqualsHashCode">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks that local variables that never have their values 
+            changed are declared final. -->
+            <!-- <property name="tokens" value="PARAMETER_DEF, VARIABLE_DEF"/> -->
+        <module name="FinalLocalVariable">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks that a local variable or a parameter does not shadow a field
+            that is defined in the same class. -->
+            <!-- <property name="tokens" value="PARAMETER_DEF, VARIABLE_DEF"/> -->
+            <!-- <property name="ignoreFormat" value=""/> -->
+            <!-- <property name="ignoreConstructorParameter" value="false"/> -->
+            <!-- <property name="ignoreSetter" value="false"/> -->
+        <module name="HiddenField">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks for illegal instantiations where a factory method is 
+            preferred. -->
+            <!-- <property name="classes" value="java.lang.Boolean"/> -->
+        <module name="IllegalInstantiation">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks for illegal tokens. -->
+            <!-- <property name="tokens" value="LITERAL_SWITCH, POST_INC, POST_DEC"/> -->
+        <module name="IllegalToken">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks for illegal token text. -->
+            <!-- <property name="tokens" value=""/> -->
+            <!-- <property name="format" value=""/> -->
+            <!-- <property name="ignoreCase" value="false"/> -->
+            <!-- <property name="message" value=""/> -->
+<!--    
+        <module name="IllegalTokenText">
+        </module>
+-->
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks for assignments in subexpressions, such as in 
+            String s = Integer.toString(i = 2);. -->
+            <!-- <property name="tokens" value="ASSIGN, BAND_ASSIGN, BOR_ASSIGN,
+                    BSR_ASSIGN, BXOR_ASSIGN, DIV_ASSIGN, MINUS_ASSIGN,
+                    MOD_ASSIGN, PLUS_ASSIGN, SL_ASSIGN, SR_ASSIGN,
+                    STAR_ASSIGN"/> -->
+        <module name="InnerAssignment">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks that there are no "magic numbers", where a magic number 
+            is a numeric literal that is not defined as a constant. -->
+            <!-- <property name="tokens" value="NUM_DOUBLE, NUM_FLOAT, NUM_INT,
+                    NUM_LONG"/> -->
+            <!-- <property name="ignoreNumbers" value="-1, 0, 1, 2"/> -->
+        <module name="MagicNumber">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks that switch statement has "default" clause. -->
+        <module name="MissingSwitchDefault">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks for redundant exceptions declared in throws clause such 
+            as duplicates, unchecked exceptions or subclasses of another declared exception. -->
+            <!-- <property name="allowUnchecked" value="false"/> -->
+            <!-- <property name="allowSubclasses" value="false"/> -->
+        <module name="RedundantThrows">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks for overly complicated boolean expressions. -->
+        <module name="SimplifyBooleanExpression">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks for overly complicated boolean return statements. -->
+        <module name="SimplifyBooleanReturn">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks that string literals are not used with == or !=. -->
+        <module name="StringLiteralEquality">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Restricts nested if-else blocks to a specified depth (default = 1). -->
+            <!-- <property name="max" value="1"/> -->
+        <module name="NestedIfDepth">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Restricts nested try-catch blocks to a specified depth (default = 1). -->
+            <!-- <property name="max" value="1"/> -->
+        <module name="NestedTryDepth">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks that an overriding clone() method invokes super.clone(). -->
+        <module name="SuperClone">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks that an overriding finalize() method invokes super.finalize(). -->
+        <module name="SuperFinalize">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Catching java.lang.Exception, java.lang.Error or 
+            java.lang.RuntimeException is almost never acceptable. -->
+            <!-- <property name="illegalClassNames" value="java.lang.Exception,
+                    java.lang.Throwable, java.lang.RuntimeException"/> -->
+        <module name="IllegalCatch">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Ensure a class is has a package declaration. -->
+        <module name="PackageDeclaration">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Ensures that the setUp(), tearDown()methods are named correctly, 
+            have no arguments, return void and are either public or protected. -->
+        <module name="JUnitTestCase">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Restrict the number of return statements. Default = 2. -->
+            <!-- <property name="max" value="2"/> -->
+        <module name="ReturnCount">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks that particular class are never used as types in variable 
+            declarations, return values or parameters. -->
+            <!-- <property name="tokens" value="PARAMETER_DEF,
+                    VARIABLE_DEF METHOD_DEF"/> -->
+            <!-- <property name="illegalClassNames" value="
+                    java.util.GregorianCalendar, java.util.Hashtable,
+                    java.util.HashSet, java.util.HashMap, java.util.ArrayList,
+                    java.util.LinkedList, java.util.LinkedHashMap,
+                    java.util.LinkedHashSet, java.util.TreeSet,
+                    java.util.TreeMap, java.util.Vector"/> -->
+            <!-- <property name="ignoredMethodNames" value="getInitialContext,
+                    getEnvironment"/> -->
+        <module name="IllegalType">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks declaration order according to Code Conventions for 
+            the Java Programming Language. -->
+        <module name="DeclarationOrder">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Disallow assignment of parameters. -->
+        <module name="ParameterAssignment">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks if any class or object member explicitly initialized to 
+            default for its type value. -->
+        <module name="ExplicitInitialization">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Check that the default is after all the cases in a switch statement. -->
+        <module name="DefaultComesLast">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks that classes (except abstract one) define a ctor and don't
+            rely on the default one. -->
+        <module name="MissingCtor">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks for fall through in switch statements Finds locations where
+            a case contains Java code - but lacks a break, return, throw or
+            continue statement. -->
+        <module name="FallThrough">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks that each variable declaration is in its own statement and
+            on its own line. -->
+        <module name="MultipleVariableDeclarations">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks that code doesn't rely on the "this." default. -->
+            <!-- <property name="checkFields" value="true"/> -->
+            <!-- <property name="checkMethods" value="true"/> -->
+        <module name="RequireThis">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <!-- Checks for the use of unnecessary parentheses. -->
+        <module name="UnnecessaryParentheses">
+        </module>
+        
+        
+        <!-- See http://checkstyle.sf.net/config_design.html -->
+        <!-- Checks visibility of class members. -->
+            <!-- <property name="packageAllowed" value="false"/> -->
+            <!-- <property name="protectedAllowed" value="false"/> -->
+            <!-- <property name="publicMemberPattern" value="^serialVersionUID"/> -->
+        <module name="VisibilityModifier">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_design.html -->
+        <!-- Checks that a class which has only private constructors is 
+            declared as final. -->
+        <module name="FinalClass">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_design.html -->
+        <!-- Implements Bloch, Effective Java, Item 17 - Use Interfaces only to define types. -->
+            <!-- <property name="allowMarkerInterfaces" value="true"/> -->
+        <module name="InterfaceIsType">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_design.html -->
+        <!-- Make sure that utility classes (classes that contain only 
+            static methods) do not have a public constructor. -->
+        <module name="HideUtilityClassConstructor">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_design.html -->
+        <!-- Checks that classes are designed for extension. -->
+        <module name="DesignForExtension">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_design.html -->
+        <!-- Ensures that exceptions (defined as any class name conforming 
+            to some regular expression) are immutable. That is, have only final fields. -->
+            <!-- <property name="format" value="^.*Exception$|^.*Error$"/> -->
+        <module name="MutableException">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_design.html -->
+        <!-- Restricts throws statements to a specified count (default = 1). -->
+            <!-- <property name="max" value="1"/> -->
+        <module name="ThrowsCount">
+        </module>
+        
+        
+        <!-- See http://checkstyle.sf.net/config_metrics.html -->
+        <!-- Restrict the number of number of &&, || and ^ in an expression. -->
+            <!-- <property name="max" value="3"/> -->
+        <module name="BooleanExpressionComplexity">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_metrics.html -->
+        <!-- This metric measures the number of instantiations of other
+            classes within the given class. -->
+            <!-- <property name="max" value="7"/> -->
+        <module name="ClassDataAbstractionCoupling">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_metrics.html -->
+        <!-- The number of other classes a given class relies on. -->
+            <!-- <property name="max" value="20"/> -->
+        <module name="ClassFanOutComplexity">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_metrics.html -->
+        <!-- Checks cyclomatic complexity against a specified limit. -->
+            <!-- <property name="max" value="10"/> -->
+        <module name="CyclomaticComplexity">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_metrics.html -->
+        <!-- The NPATH metric computes the number of possible execution paths
+            through a function. -->
+            <!-- <property name="max" value="200"/> -->
+        <module name="NPathComplexity">
+        </module>
+        
+        
+        <!-- See http://checkstyle.sf.net/config_misc.html -->
+        <!-- A generic check for code problems - the user can search for any pattern. -->
+            <!-- <property name="format" value="^$"/> -->
+            <!-- <property name="ignoreCase" value="false"/> -->
+            <!-- <property name="ignoreComments" value="false"/> -->
+            <!-- <property name="message" value=""/> -->
+        <module name="GenericIllegalRegexp">
+            <property name="format" value="\S\s+$"/>
+            <property name="message" value="Line has trailing spaces."/>
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_misc.html -->
+        <!-- A check for TODO: comments. Actually it is a generic regular 
+            expression matcher on Java comments. To check for other patterns in 
+            Java comments, set property format. -->
+            <!-- <property name="format" value="TODO:"/> -->
+        <module name="TodoComment">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_misc.html -->
+        <!-- Checks for uncommented main() methods (debugging leftovers). -->
+            <!-- <property name="excludedClasses" value=""/> -->
+        <module name="UncommentedMain">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_misc.html -->
+        <!-- Checks that long constants are defined with an upper ell.
+            That is 'L' and not 'l'. -->
+        <module name="UpperEll">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_misc.html -->
+        <!-- Checks the style of array type definitions. -->
+            <!-- <property name="javaStyle" value="true"/> -->
+        <module name="ArrayTypeStyle">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_misc.html -->
+        <!-- Check that method/constructor parameters are final. -->
+            <!-- <property name="tokens" value="METHOD_DEF, CTOR_DEF"/> -->
+        <module name="FinalParameters">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_misc.html -->
+        <!-- Checks for restricted tokens beneath other tokens. -->
+            <!-- <property name="tokens" value=""/> -->
+            <!-- <property name="limitedTokens" value=""/> -->
+            <!-- <property name="minimumDepth" value="0"/> -->
+            <!-- <property name="maximumDepth" value="java.lang.Integer.MAX_VALUE"/> -->
+            <!-- <property name="minimumNumber" value="0"/> -->
+            <!-- <property name="maximumNumber" value="java.lang.Integer.MAX_VALUE"/> -->
+            <!-- <property name="minimumMessage" value="descendant.token.min"/> -->
+            <!-- <property name="maximumMessage" value="descendant.token.max"/> -->
+<!--
+        <module name="DescendantToken">
+        </module>
+-->
+        
+        <!-- See http://checkstyle.sf.net/config_misc.html -->
+        <!-- Checks correct indentation of Java Code. -->
+            <!-- <property name="basicOffset" value="4"/> -->
+            <!-- <property name="braceAdjustment" value="0"/> -->
+            <!-- <property name="caseIndent" value="4"/> -->
+        <module name="Indentation">
+        </module>
+        
+        <!-- See http://checkstyle.sf.net/config_misc.html -->
+        <!-- The check to ensure that requires that comments be the only thing
+            on a line. -->
+            <!-- <property name="format" value="^[\\s\\}\\);]*$"/> -->
+        <module name="TrailingComment">
+        </module>
+        
+    </module>
+    
+    
+    <!-- See http://checkstyle.sf.net/config_duplicates.html -->
+    <!-- Performs a line-by-line comparison of all code lines and 
+        reports duplicate code. -->
+        <!-- <property name="min" value="12"/> -->
+    <module name="StrictDuplicateCode">
+    </module>
+    
+    
+    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+    <!-- Checks whether files end with a new line.                        -->
+        <!-- <property name="lineSeparator" value="system"/> -->
+    <module name="NewlineAtEndOfFile">
+    </module>
+
+    <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
+    <!-- Checks that property files contain the same keys.         -->
+        <!-- <property name="fileExtensions" value="properties"/> -->
+    <module name="Translation">
+    </module>
+    
+</module>
diff --git a/contrib/examples/filters/com/mycompany/filters/FilesFilter.java b/contrib/examples/filters/com/mycompany/filters/FilesFilter.java
new file mode 100644
index 0000000..556f5ac
--- /dev/null
+++ b/contrib/examples/filters/com/mycompany/filters/FilesFilter.java
@@ -0,0 +1,34 @@
+package com.mycompany.filters;
+
+import org.apache.regexp.RE;
+import org.apache.regexp.RESyntaxException;
+
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.AutomaticBean;
+import com.puppycrawl.tools.checkstyle.api.Filter;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+public class FilesFilter
+    extends AutomaticBean
+    implements Filter
+{
+    private RE mFileRegexp;
+
+    public FilesFilter()
+        throws RESyntaxException
+    {
+        setFiles("^$");
+    }
+    
+    public boolean accept(AuditEvent aEvent)
+    {
+        final String fileName = aEvent.getFileName();
+        return ((fileName == null) || !mFileRegexp.match(fileName));
+    }
+
+    public void setFiles(String aFilesPattern)
+        throws RESyntaxException
+    {
+        mFileRegexp = Utils.getRE(aFilesPattern);
+    }
+}
diff --git a/contrib/examples/linkErrors2Source/build.xml b/contrib/examples/linkErrors2Source/build.xml
new file mode 100644
index 0000000..6162cf3
--- /dev/null
+++ b/contrib/examples/linkErrors2Source/build.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<project name="style" default="checkstyle.style" basedir=".">
+
+  <property name="checkstyle-all.jar" value="C:/javautil/checkstyle-3.4/checkstyle-all-3.4.jar" />
+  <property name="java2html.jar" value="C:/javautil/java2html/java2html.jar" />
+  <property name="src.dir" value="T:\2004\eclipse\workspace\checkstyle\src\checkstyle\com\puppycrawl\tools\checkstyle\checks" />
+  <property name="check.config" value="T:/2004/eclipse/workspace/checkstyle/docs/sun_checks.xml" />
+  <property name="dest.dir" value="target/cs-errors"/>
+  <property name="html.dir" value="src_html"/>
+
+  <!-- -->
+  <!-- Cleanup targets -->
+  <!-- -->
+  <target name="clean" description="Cleans any directories and generated files">
+      <delete dir="target" />
+  </target>
+
+  <!-- -->
+  <!-- Create syntax-highlighted HTML files from Java source files. -->
+  <!-- Requires java2html, http://www.java2html.de/                 -->
+  <!-- -->
+  <target name="java.to.html"
+          description="Creates HTML files with syntax highlighting from Java source files">
+
+    <taskdef name="java2html"
+             classname="de.java2html.anttasks.Java2HtmlTask"
+             classpath="${java2html.jar}"   
+    />
+    <java2html srcdir="${src.dir}"
+               destdir="target/${html.dir}"
+               includes="**/*.java"
+               outputFormat="html"
+               tabs="4"
+               style="eclipse"
+               showLineNumbers="true"
+               addLineAnchors="true"
+               showFileName="true"
+               includeDocumentHeader="true"
+               includeDocumentFooter="true"
+    />
+  </target>
+    
+  <taskdef resource="checkstyletask.properties"
+           classpath="${checkstyle-all.jar}"/>
+
+  <!-- -->
+  <!-- Run checkstyle and generate error report with links to source code -->
+  <!-- -->
+  <target name="checkstyle.style"
+          depends="java.to.html"
+          description="Runs checkstyle and generates an error report with links to source code">
+    
+    <mkdir dir="target"/>
+    <checkstyle failonviolation="false" config="${check.config}">
+      <fileset dir="${src.dir}"
+               includes="**/*.java,**/*.properties"
+               excludes="**/Generated*.java,**/gui/*,,**/transmogrify/*"/>
+      <formatter type="xml" toFile="target/cs_errors.xml"/>
+    </checkstyle>
+    <mkdir dir="target/cs-errors"/>
+    <style basedir="target"
+           destdir="target/cs-errors"
+           includes="cs_errors.xml"
+           style="checkstyle-noframes.xsl">
+       <param name="src.dir" expression="${src.dir}"/>
+       <param name="html.dir" expression="../${html.dir}"/>
+     </style>
+  </target>
+  
+</project>
\ No newline at end of file
diff --git a/contrib/examples/linkErrors2Source/checkstyle-noframes.xsl b/contrib/examples/linkErrors2Source/checkstyle-noframes.xsl
new file mode 100644
index 0000000..83862cc
--- /dev/null
+++ b/contrib/examples/linkErrors2Source/checkstyle-noframes.xsl
@@ -0,0 +1,190 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html" indent="yes"/>
+<xsl:decimal-format decimal-separator="." grouping-separator="," />
+
+<!-- Checkstyle XML Style Sheet by Stephane Bailliez <sbailliez at apache.org>         -->
+<!-- Links errors to lines in HTML version of source code.                                          -->
+<!-- Part of the Checkstyle distribution found at http://checkstyle.sourceforge.net -->
+<!-- Usage (generates checkstyle_report.html):                                      -->
+<!--    <checkstyle failonviolation="false" config="${check.config}">               -->
+<!--      <fileset dir="${src.dir}" includes="**/*.java"/>                          -->
+<!--      <formatter type="xml" toFile="${doc.dir}/checkstyle_report.xml"/>         -->
+<!--    </checkstyle>                                                               -->
+<!--    <style basedir="${doc.dir}" destdir="${doc.dir}"                            -->
+<!--            includes="checkstyle_report.xml"                                    -->
+<!--            style="${doc.dir}/checkstyle-noframes.xsl">                         -->
+<!--       <param name="src.dir" expression="${src.dir}"/>                          -->
+<!--       <param name="html.dir" expression="${html.dir}"/>                        -->
+<!--    </style>                                                                    -->
+
+<!-- source directory name for stripping off link href attribute value -->
+<xsl:param name="src.dir"/>
+<!-- directory containing syntax-highlighted HTML files for java source files -->
+<xsl:param name="html.dir"/>
+
+<xsl:template match="checkstyle">
+    <html>
+        <head>
+        <style type="text/css">
+    .bannercell {
+      border: 0px;
+      padding: 0px;
+    }
+    body {
+      margin-left: 10;
+      margin-right: 10;
+      font:normal 80% arial,helvetica,sanserif;
+      background-color:#FFFFFF;
+      color:#000000;
+    }
+    .a td { 
+      background: #efefef;
+    }
+    .b td { 
+      background: #fff;
+    }
+    th, td {
+      text-align: left;
+      vertical-align: top;
+    }
+    th {
+      font-weight:bold;
+      background: #ccc;
+      color: black;
+    }
+    table, th, td {
+      font-size:100%;
+      border: none
+    }
+    table.log tr td, tr th {
+      
+    }
+    h2 {
+      font-weight:bold;
+      font-size:140%;
+      margin-bottom: 5;
+    }
+    h3 {
+      font-size:100%;
+      font-weight:bold;
+      background: #525D76;
+      color: white;
+      text-decoration: none;
+      padding: 5px;
+      margin-right: 2px;
+      margin-left: 2px;
+      margin-bottom: 0;
+    }
+        </style>
+        </head>
+        <body>
+            <a name="top"></a>
+      <!-- jakarta logo -->
+      <table border="0" cellpadding="0" cellspacing="0" width="100%">
+      <tr>
+        <td class="bannercell" rowspan="2">
+          <!--a href="http://jakarta.apache.org/">
+          <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
+          </a-->
+        </td>
+            <td class="text-align:right"><h2>CheckStyle Audit</h2></td>
+            </tr>
+            <tr>
+            <td class="text-align:right">Designed for use with <a href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
+            </tr>
+      </table>
+        <hr size="1"/>
+            
+            <!-- Summary part -->
+            <xsl:apply-templates select="." mode="summary"/>
+            <hr size="1" width="100%" align="left"/>
+            
+            <!-- Package List part -->
+            <xsl:apply-templates select="." mode="filelist"/>
+            <hr size="1" width="100%" align="left"/>
+            
+            <!-- For each package create its part -->
+            <xsl:for-each select="file">
+              <xsl:sort select="@name"/>
+              <xsl:apply-templates select="."/>
+              <p/>
+              <p/>
+            </xsl:for-each>
+            <hr size="1" width="100%" align="left"/>
+            
+            
+        </body>
+    </html>
+</xsl:template>
+    
+    
+    
+    <xsl:template match="checkstyle" mode="filelist">   
+        <h3>Files</h3>
+        <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+      <tr>
+        <th>Name</th>
+        <th>Errors</th>
+      </tr>
+            <xsl:for-each select="file">
+                <xsl:sort select="@name"/>
+                <xsl:variable name="errorCount" select="count(error)"/>             
+                <tr>
+          <xsl:call-template name="alternated-row"/>
+                    <td><a href="#f-{@name}"><xsl:value-of select="@name"/></a></td>
+                    <td><xsl:value-of select="$errorCount"/></td>
+                </tr>
+            </xsl:for-each>
+        </table>        
+    </xsl:template>
+    
+    
+    <xsl:template match="file">
+    <a name="f-{@name}"></a>
+    <h3>File <xsl:value-of select="@name"/></h3>
+    
+    <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+        <tr>
+          <th>Error Description</th>
+          <th>Line</th>
+      </tr>
+      <xsl:for-each select="error">
+        <tr>
+        <xsl:call-template name="alternated-row"/>
+          <td><xsl:value-of select="@message"/></td>
+          <td><a>
+                <xsl:attribute name="href"><xsl:value-of select="$html.dir"/>/<xsl:value-of select="substring-after(../@name, $src.dir)"/>.html#<xsl:value-of select="@line"/></xsl:attribute>
+              <xsl:value-of select="@line"/></a></td>
+        </tr>
+        </xsl:for-each>
+    </table>
+    <a href="#top">Back to top</a>
+    </xsl:template>
+    
+    
+    <xsl:template match="checkstyle" mode="summary">
+        <h3>Summary</h3>
+        <xsl:variable name="fileCount" select="count(file)"/>
+        <xsl:variable name="errorCount" select="count(file/error)"/>
+        <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+        <tr>
+            <th>Files</th>
+            <th>Errors</th>
+        </tr>
+        <tr>
+          <xsl:call-template name="alternated-row"/>
+            <td><xsl:value-of select="$fileCount"/></td>
+            <td><xsl:value-of select="$errorCount"/></td>
+        </tr>
+        </table>
+    </xsl:template>
+    
+  <xsl:template name="alternated-row">
+    <xsl:attribute name="class">
+      <xsl:if test="position() mod 2 = 1">a</xsl:if>
+      <xsl:if test="position() mod 2 = 0">b</xsl:if>
+    </xsl:attribute>  
+  </xsl:template>   
+</xsl:stylesheet>
+
+
diff --git a/contrib/examples/linkErrors2Source/readme.txt b/contrib/examples/linkErrors2Source/readme.txt
new file mode 100644
index 0000000..b581e75
--- /dev/null
+++ b/contrib/examples/linkErrors2Source/readme.txt
@@ -0,0 +1,6 @@
+Example of an ant build file and stylesheet for generation of an HTML error
+report with links to source code, as discussed on sourceforge.net:
+checkstyle-user,
+http://sourceforge.net/mailarchive/forum.php?thread_id=4891991&forum_id=8139.
+
+Requires: java2html, http://www.java2html.de/
\ No newline at end of file
diff --git a/contrib/examples/listeners/com/mycompany/listeners/CommonsLoggingListener.java b/contrib/examples/listeners/com/mycompany/listeners/CommonsLoggingListener.java
new file mode 100644
index 0000000..4d13128
--- /dev/null
+++ b/contrib/examples/listeners/com/mycompany/listeners/CommonsLoggingListener.java
@@ -0,0 +1,127 @@
+package com.mycompany.listeners;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogConfigurationException;
+import org.apache.commons.logging.LogFactory;
+
+import com.puppycrawl.tools.checkstyle.Checker;
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.AuditListener;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+
+/**
+ * Jakarta Commons Logging listener.
+ * Note: With Ant, do not use the SimpleLog as your logger implementation as it
+ * causes an infinite loop since it writes to System.err, which Ant traps
+ * and reroutes to the logger/listener layer.
+ * Based on
+ * <a href="http://ant.apache.org/index.html">org.apache.tools.ant.listener.CommonsLoggingListener>org.apache.tools.ant.listener.CommonsLoggingListener</a>
+ * @author Rick Giles
+ */
+public class CommonsLoggingListener
+    implements AuditListener
+{
+    /** cushion for avoiding StringBuffer.expandCapacity */
+    private static final int BUFFER_CUSHION = 30;
+
+    /** true if the log factory has been initialized */
+    private boolean mInitialized = false;
+
+    /** Factory for creating org.apache.commons.logging.Log instances */
+    private LogFactory mLogFactory;
+
+    /**
+     * Creates a <code>CommonsLoggingListener. Initializes its log factory.
+     * @throws CheckstyleException if  if the implementation class is not
+     * available or cannot be instantiated.
+     */
+    public CommonsLoggingListener() throws CheckstyleException
+    {
+        try {
+            mLogFactory = LogFactory.getFactory();
+        }
+        catch (LogConfigurationException e) {
+            throw new CheckstyleException("log configuration exception", e);
+        }
+        mInitialized = true;
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void auditStarted(AuditEvent aEvt)
+    {
+        if (mInitialized) {
+            final Log log = mLogFactory.getInstance(Checker.class);
+            log.info("Audit started.");
+        }
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void auditFinished(AuditEvent aEvt)
+    {
+        if (mInitialized) {
+            final Log log = mLogFactory.getInstance(Checker.class);
+            log.info("Audit finished.");
+        }
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void fileStarted(AuditEvent aEvt)
+    {
+        if (mInitialized) {
+            final Log log = mLogFactory.getInstance(Checker.class);
+            log.info("File \"" + aEvt.getFileName() + "\" started.");
+        }
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void fileFinished(AuditEvent aEvt)
+    {
+        if (mInitialized) {
+            final Log log = mLogFactory.getInstance(Checker.class);
+            log.info("File \"" + aEvt.getFileName() + "\" finished.");
+        }
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void addError(AuditEvent aEvt)
+    {
+        final SeverityLevel severityLevel = aEvt.getSeverityLevel();
+        if (mInitialized && !SeverityLevel.IGNORE.equals(severityLevel)) {
+            final Log log = mLogFactory.getInstance(aEvt.getSourceName());
+
+            final String fileName = aEvt.getFileName();
+            final String message = aEvt.getMessage();
+
+            // avoid StringBuffer.expandCapacity
+            final int bufLen = message.length() + BUFFER_CUSHION;
+            final StringBuffer sb = new StringBuffer(bufLen);
+
+            sb.append("Line: ").append(aEvt.getLine());
+            if (aEvt.getColumn() > 0) {
+                sb.append(" Column: ").append(aEvt.getColumn());
+            }
+            sb.append(" Message: ").append(message);
+
+            if (aEvt.getSeverityLevel().equals(SeverityLevel.WARNING)) {
+                log.warn(sb.toString());
+            }
+            else if (aEvt.getSeverityLevel().equals(SeverityLevel.INFO)) {
+                log.info(sb.toString());
+            }
+            else {
+                log.error(sb.toString());
+            }
+        }
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void addException(AuditEvent aEvt, Throwable aThrowable)
+    {
+        if (mInitialized) {
+            final Log log = mLogFactory.getInstance(aEvt.getSourceName());
+            log.error("Error auditing " + aEvt.getFileName(), aThrowable);
+        }
+    }
+
+}
diff --git a/contrib/examples/listeners/com/mycompany/listeners/MailLogger.java b/contrib/examples/listeners/com/mycompany/listeners/MailLogger.java
new file mode 100644
index 0000000..d2d4514
--- /dev/null
+++ b/contrib/examples/listeners/com/mycompany/listeners/MailLogger.java
@@ -0,0 +1,241 @@
+package com.mycompany.listeners;
+
+import java.io.ByteArrayOutputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+import javax.mail.Session;
+import javax.mail.Transport;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeMessage;
+
+import com.puppycrawl.tools.checkstyle.DefaultLogger;
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.AuditListener;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+
+/**
+ *  Buffers log messages from DefaultLogger, and sends an e-mail with the
+ *  results. The following Project properties are used to send the mail.
+ *  <ul>
+ *    <li> MailLogger.mailhost [default: localhost] - Mail server to use</li>
+ *
+ *    <li> MailLogger.from [required] - Mail "from" address</li>
+ *    <li> MailLlistener.failure.notify [default: true] - Send build failure
+ *    e-mails?</li>
+ *    <li> MailLogger.success.notify [default: true] - Send build success
+ *    e-mails?</li>
+ *    <li> MailLogger.failure.to [required if failure mail to be sent] - Address
+ *    to send failure messages to</li>
+ *    <li> MailLogger.success.to [required if success mail to be sent] - Address
+ *    to send success messages to</li>
+ *    <li> MailLogger.failure.subject [default: "Build Failure"] - Subject of
+ *    failed build</li>
+ *    <li> MailLlistener.success.subject [default: "Build Success"] - Subject of
+ *    successful build</li>
+ *  </ul>
+ *  These properties are set using standard property setting mechanisms
+ *  (command-line -D, ant <property>, etc).Properties can be overridden
+ *  by specifying the filename of a properties file in the <i>
+ *  MailLogger.properties.file property</i> . Any properties defined in that
+ *  file will override properties.
+ * Based on
+ * <a href="http://ant.apache.org/index.html">org.apache.tools.ant.listener.MailLogger>org.apache.tools.ant.listener.MailLogger</a>
+ * @author Erik Hatcher
+ *         <a href="mailto:ehatcher at apache.org">ehatcher at apache.org</a>
+ * @author Rick Giles
+ */
+public class MailLogger
+    implements AuditListener
+{
+    /** output stream for logger */
+    private ByteArrayOutputStream mOutputStream;
+
+    /** adapted listener */
+    private DefaultLogger mLogger;
+
+    /** count of the number of errors and exceptions */
+    private int mErrors;
+
+    /**
+     * Constructs a <code>MailLogger</code>
+     */
+    public MailLogger()
+    {
+        mOutputStream = new ByteArrayOutputStream();
+        mLogger = new DefaultLogger(mOutputStream, false);
+        mErrors = 0;
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void auditStarted(AuditEvent aEvt)
+    {
+        mLogger.auditStarted(aEvt);
+    }
+
+    /**
+     * Sends an e-mail with the log results.
+     * @see com.puppycrawl.tools.checkstyle.api.AuditListener
+     */
+    public void auditFinished(AuditEvent aEvt)
+    {
+        mLogger.auditFinished(aEvt);
+
+        final Properties properties = System.getProperties();
+
+        // overlay specified properties file (if any), which overrides project
+        // settings
+        final Properties fileProperties = new Properties();
+        final String filename =
+            (String) properties.get("MailLogger.properties.file");
+        if (filename != null) {
+            InputStream is = null;
+            try {
+                is = new FileInputStream(filename);
+                fileProperties.load(is);
+            }
+            catch (IOException ioe) {
+                // ignore because properties file is not required
+                ;
+            }
+            finally {
+                if (is != null) {
+                    try {
+                        is.close();
+                    }
+                    catch (IOException e) {
+                        ;
+                    }
+                }
+            }
+        }
+
+        for (Enumeration e = fileProperties.keys(); e.hasMoreElements();) {
+            final String key = (String) e.nextElement();
+            final String value = fileProperties.getProperty(key);
+            properties.put(key, value);
+        }
+
+        final boolean success = (mErrors == 0);
+        final String prefix = success ? "success" : "failure";
+
+        try {
+            final String mailhost =
+                getValue(properties, "mailhost", "localhost");
+            final String from = getValue(properties, "from", null);
+
+            final String toList = getValue(properties, prefix + ".to", null);
+            final String subject = getValue(properties, prefix + ".subject",
+                    (success)
+                        ? "Checkstyle Audit Success"
+                        : "Checkstyle Audit Failure");
+
+            sendMail(mailhost, from, toList, subject, mOutputStream.toString());
+        }
+        catch (Exception e) {
+            System.out.println("MailLogger failed to send e-mail!");
+            e.printStackTrace(System.err);
+        }
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void fileStarted(AuditEvent aEvt)
+    {
+        mLogger.fileStarted(aEvt);
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void fileFinished(AuditEvent aEvt)
+    {
+        mLogger.fileFinished(aEvt);
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void addError(AuditEvent aEvt)
+    {
+        if (SeverityLevel.ERROR.equals(aEvt.getSeverityLevel())) {
+            mLogger.addError(aEvt);
+            mErrors++;
+        }
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void addException(AuditEvent aEvt, Throwable aThrowable)
+    {
+        mLogger.addException(aEvt, aThrowable);
+        mErrors++;
+    }
+
+    /**
+     *  Gets the value of a property.
+     *
+     * @param  aProperties Properties to obtain value from.
+     * @param  aName suffix of property name. "MailLogger." will be
+     * prepended internally.
+     * @param  aDefaultValue value returned if not present in the properties.
+     * Set to null to make required.
+     * @return The value of the property, or default value.
+     * @throws CheckstyleException if no default value is specified and the
+     *  property is not present in properties.
+     */
+    private String getValue(Properties aProperties, String aName,
+                            String aDefaultValue) throws CheckstyleException
+    {
+        final String propertyName = "MailLogger." + aName;
+        String value = (String) aProperties.get(propertyName);
+
+        if (value == null) {
+            value = aDefaultValue;
+        }
+
+        if (value == null) {
+            throw new CheckstyleException(
+                "Missing required parameter: " + propertyName);
+        }
+
+        return value;
+    }
+    /**
+     *  Send the mail
+     *
+     * @param  aMailhost mail server
+     * @param  aFrom from address
+     * @param  aToList comma-separated recipient list
+     * @param  aSubject mail subject
+     * @param  aText mail body
+     * @throws Exception if sending message fails
+     */
+    private void sendMail(String aMailhost, String aFrom, String aToList,
+            String aSubject, String aText)
+        throws Exception
+    {
+        // Get system properties
+        final Properties props = System.getProperties();
+
+        // Setup mail server
+        props.put("mail.smtp.host", aMailhost);
+
+        // Get session
+        final Session session = Session.getDefaultInstance(props, null);
+
+        // Define message
+        final MimeMessage message = new MimeMessage(session);
+
+        message.setFrom(new InternetAddress(aFrom));
+        final StringTokenizer t = new StringTokenizer(aToList, ", ", false);
+        while (t.hasMoreTokens()) {
+            message.addRecipient(
+                MimeMessage.RecipientType.TO,
+                new InternetAddress(t.nextToken()));
+        }
+        message.setSubject(aSubject);
+        message.setText(aText);
+
+        Transport.send(message);
+    }
+}
diff --git a/contrib/examples/listeners/com/mycompany/listeners/VerboseListener.java b/contrib/examples/listeners/com/mycompany/listeners/VerboseListener.java
new file mode 100644
index 0000000..2cd5c65
--- /dev/null
+++ b/contrib/examples/listeners/com/mycompany/listeners/VerboseListener.java
@@ -0,0 +1,111 @@
+package com.mycompany.listeners;
+
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.AuditListener;
+import com.puppycrawl.tools.checkstyle.api.AutomaticBean;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+
+/**
+ * An AuditListener that reports every event to an output stream.
+ * @author Rick Giles
+ */
+public class VerboseListener
+    extends AutomaticBean
+    implements AuditListener
+{
+    /** where to write messages */
+    private PrintWriter mWriter = new PrintWriter(System.out);
+
+    /** close output stream */   
+    private boolean mCloseOut = false;
+    
+    /** total number of errors and exceptions */
+    private int mTotalErrors;
+
+    /** number of errors and exceptions in the audit of one file */
+    private int mErrors;
+
+    /**
+     * Sets the output stream to a file.
+     * @param aFileName name of the output file.
+     * @throws FileNotFoundException if an error occurs.
+     */
+    public void setFile(String aFileName)
+        throws FileNotFoundException
+    {
+        final OutputStream out = new FileOutputStream(aFileName);
+        mWriter = new PrintWriter(out);
+        mCloseOut = true;
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void auditStarted(AuditEvent aEvt)
+    {
+        mTotalErrors = 0;
+        mWriter.println("Audit started.");
+    }
+    
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void auditFinished(AuditEvent aEvt)
+    {
+        mWriter.println("Audit finished. Total errors: " + mTotalErrors);
+        mWriter.flush();
+        if (mCloseOut) {
+            mWriter.close();
+        }
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void fileStarted(AuditEvent aEvt)
+    {
+        mErrors = 0;
+        mWriter.println(
+            "Started checking file '" + aEvt.getFileName() + "'.");
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void fileFinished(AuditEvent aEvt)
+    {
+        mWriter.println("Finished checking file '" + aEvt.getFileName()
+            + "'. Errors: " + mErrors);
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void addError(AuditEvent aEvt)
+    {
+        printEvent(aEvt);
+        if (SeverityLevel.ERROR.equals(aEvt.getSeverityLevel())) {
+            mErrors++;
+            mTotalErrors++;
+        }
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.AuditListener */
+    public void addException(AuditEvent aEvt, Throwable aThrowable)
+    {
+        printEvent(aEvt);
+        aThrowable.printStackTrace(System.out);
+        mErrors++;
+        mTotalErrors++;
+    }
+
+    /**
+     * Prints event information to standard output.
+     * @param aEvt the event to print.
+     */
+    private void printEvent(AuditEvent aEvt)
+    {
+        mWriter.println("Logging error -"
+            + " file: '" + aEvt.getFileName() + "'"
+            + " line: " + aEvt.getLine()
+            + " column: " + aEvt.getColumn()
+            + " severity: " + aEvt.getSeverityLevel()
+            + " message: " + aEvt.getMessage()
+            + " source: " + aEvt.getSourceName());
+    }
+}
diff --git a/contrib/hooks/git-pre-commit-hook.pl b/contrib/hooks/git-pre-commit-hook.pl
new file mode 100644
index 0000000..7e4419c
--- /dev/null
+++ b/contrib/hooks/git-pre-commit-hook.pl
@@ -0,0 +1,72 @@
+#!/usr/bin/perl
+#
+# Pre-commit hook for running checkstyle on changed Java sources
+#
+# To use this you need:
+# 1. checkstyle's jar file somewhere
+# 2. a checkstyle XML check file somewhere
+# 3. To configure git:
+#   * git config --add checkstyle.jar <location of jar>
+#   * git config --add checkstyle.checkfile <location of checkfile>
+#   * git config --add java.command <path to java executale> [optional
+#     defaults to assuming it's in your path]
+# 4. Put this in your .git/hooks directory as pre-commit
+#
+# Now, when you commit, you will be disallowed from doing so
+# until you pass your checkstyle checks.
+
+$command = "git-diff-index --cached HEAD 2>&1 | sed 's/^:.*     //' | uniq";
+open (FILES,$command . "|") || die "Cannot run '$command': $!\n";
+
+$CONFIG_CHECK_FILE = "checkstyle.checkfile";
+$CONFIG_JAR = "checkstyle.jar";
+$CONFIG_JAVA = "java.command";
+
+$check_file = `git config --get $CONFIG_CHECK_FILE`;
+$checkstyle_jar = `git config --get $CONFIG_JAR`;
+$java_command = `git config --get $CONFIG_JAVA`;
+
+if (!$check_file || !$checkstyle_jar)
+{
+   die "You must configure checkstyle in your git config:\n"
+   . "\t$CONFIG_CHECK_FILE - path to your checkstyle.xml file\n"
+   . "\t$CONFIG_JAR - path to your checkstyle jar file\n"
+   . "\t$CONFIG_JAVA - path to your java executable (optional)\n"
+   ;
+}
+
+$java_command = "java" if (!$java_command);
+
+chomp $check_file;
+chomp $checkstyle_jar;
+chomp $java_command;
+
+$command = "$java_command -jar $checkstyle_jar -c $check_file";
+
+ at java_files = ();
+
+foreach (<FILES>)
+{
+   chomp;
+   next if (!(/\.java$/));
+   push @java_files,$_;
+   $command .= " ";
+   $command .= $_;
+}
+if ($#java_files >= 0)
+{
+   if (&run_and_log_system ($command))
+   {
+       print STDERR "Commit aborted.\n";
+       exit -1;
+   }
+}
+
+exit 0;
+
+sub run_and_log_system
+{
+   ($cmd) = @_;
+
+   system $cmd;
+}
\ No newline at end of file
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/AbstractUsageCheck.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/AbstractUsageCheck.java
new file mode 100644
index 0000000..67fd244
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/AbstractUsageCheck.java
@@ -0,0 +1,200 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2005  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.usage;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import com.puppycrawl.tools.checkstyle.checks.usage.transmogrify.ASTManager;
+import com.puppycrawl.tools.checkstyle.checks.usage.transmogrify.ClassManager;
+import com.puppycrawl.tools.checkstyle.checks.usage.transmogrify.Definition;
+import com.puppycrawl.tools.checkstyle.checks.usage.transmogrify.SymTabAST;
+import com.puppycrawl.tools.checkstyle.checks.usage.transmogrify.
+    SymbolTableException;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import org.apache.commons.beanutils.ConversionException;
+
+/**
+ * Performs a usage check for fields, methods, parameters, variables.
+ * @author Rick Giles
+ */
+public abstract class AbstractUsageCheck
+    extends Check
+{
+    /** the regexp to match against */
+    private Pattern mRegexp;
+    /** the format string of the regexp */
+    private String mIgnoreFormat;
+
+    /**
+     * Constructs an <code>AbstractUsageCheck</code>.
+     */
+    public AbstractUsageCheck()
+    {
+        setIgnoreFormat("^$");
+    }
+
+    /**
+     * Set the ignore format to the specified regular expression.
+     * @param aFormat a <code>String</code> value
+     * @throws ConversionException unable to parse aFormat
+     */
+    public void setIgnoreFormat(String aFormat)
+        throws ConversionException
+    {
+        try {
+            mRegexp = Utils.getPattern(aFormat);
+            mIgnoreFormat = aFormat;
+        }
+        catch (PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+    }
+
+    /** @return the regexp to match against */
+    public Pattern getRegexp()
+    {
+        return mRegexp;
+    }
+
+    /** @return the regexp format */
+    public String getIgnoreFormat()
+    {
+        return mIgnoreFormat;
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.Check */
+    public void beginTree(DetailAST aRootAST)
+    {
+        // use my class loader
+        ClassManager.setClassLoader(getClassLoader());
+
+        final String fileName = getFileContents().getFilename();
+        getASTManager().addTree(fileName, aRootAST);
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.Check */
+    public void visitToken(DetailAST aAST)
+    {
+        if (mustCheckReferenceCount(aAST)) {
+            final DetailAST nameAST = aAST.findFirstToken(TokenTypes.IDENT);
+            Pattern regexp = getRegexp();
+            if ((regexp == null)
+                || !regexp.matcher(nameAST.getText()).find())
+            {
+                getASTManager().registerCheckNode(this, nameAST);
+            }
+        }
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.api.Check */
+    public void finishTree(DetailAST aAST)
+    {
+        if (aAST == null) {
+            // we have nothing to check
+            return;
+        }
+        try {
+            final Set nodes = getASTManager().getCheckNodes(this);
+            if (nodes != null) {
+                applyTo(nodes);
+            }
+        }
+        catch (SymbolTableException ste) {
+            logError(ste);
+        }
+        getASTManager().removeCheck(this);
+    }
+
+    /**
+     * Logs an exception.
+     * @param aException the exception to log.
+     */
+    public void logError(Exception aException)
+    {
+        log(0, "general.exception", new String[] {aException.getMessage()});
+        Utils.getExceptionLogger().debug("An exception occured.", aException);
+    }
+
+    /**
+     * Determines the reference count for a DetailAST.
+     * @param aAST the DetailAST to count.
+     * @return the number of references to aAST.
+     */
+    private int getReferenceCount(DetailAST aAST)
+    {
+        final SymTabAST ident = getASTManager().get(aAST);
+        if (ident == null) {
+            return 0;
+        }
+        final Definition definition =
+            (Definition) ident.getDefinition();
+        if (definition != null) {
+            return definition.getNumReferences();
+        }
+
+        return 0;
+    }
+
+    /**
+     * Returns the key for the Checkstyle error message.
+     * @return the key for the Checkstyle error message.
+     */
+    public abstract String getErrorKey();
+
+    /**
+     * Determines whether the reference count of an aAST is required.
+     * @param aAST the node to check.
+     * @return true if the reference count of aAST is required.
+     */
+    public abstract boolean mustCheckReferenceCount(DetailAST aAST);
+
+    /**
+     * Applies this check to a set of nodes.
+     * @param aNodes the nodes to check.
+     */
+    public void applyTo(Set aNodes)
+    {
+        final Iterator it = aNodes.iterator();
+        while (it.hasNext()) {
+            final DetailAST nameAST = (DetailAST) it.next();
+            if (getReferenceCount(nameAST) == 1) {
+                log(
+                    nameAST.getLineNo(),
+                    nameAST.getColumnNo(),
+                    getErrorKey(),
+                    nameAST.getText());
+            }
+        }
+    }
+
+    /**
+     * Gets the manager for AST nodes.
+     *  @return the AST manager.
+     */
+    protected ASTManager getASTManager()
+    {
+        return ASTManager.getInstance();
+    }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/OneMethodPrivateFieldCheck.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/OneMethodPrivateFieldCheck.java
new file mode 100644
index 0000000..1095661
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/OneMethodPrivateFieldCheck.java
@@ -0,0 +1,139 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2005  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.usage;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.usage.transmogrify.Definition;
+import com.puppycrawl.tools.checkstyle.checks.usage.transmogrify.Reference;
+import com.puppycrawl.tools.checkstyle.checks.usage.transmogrify.SymTabAST;
+
+
+/**
+ * <p>Checks that a private field is used in more than one method,
+ * constructor, or initializer.
+ * </p>
+ * <p>
+ * Rationale: a private field used in only one method, constructor, or
+ * initializer should be replaced by a local variable.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="usage.OneMethodPrivateField"/>
+ * </pre>
+ *
+ * @author Rick Giles
+ */
+public class OneMethodPrivateFieldCheck
+    extends AbstractUsageCheck
+{
+    /** @see com.puppycrawl.tools.checkstyle.api.Check */
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.VARIABLE_DEF,
+        };
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.checks.usage.AbstractUsageCheck */
+    public String getErrorKey()
+    {
+        return "one.method.private.field";
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.checks.usage.AbstractUsageCheck */
+    public boolean mustCheckReferenceCount(DetailAST aAST)
+    {
+        final DetailAST mods = aAST.findFirstToken(TokenTypes.MODIFIERS);
+        return ((mods != null)
+            && (ScopeUtils.getScopeFromMods(mods) == Scope.PRIVATE));
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.checks.usage.AbstractUsageCheck */
+    public void applyTo(Set aNodes)
+    {
+        // apply the check to each private field
+        final Set methods = new HashSet();
+        final Iterator it = aNodes.iterator();
+        while (it.hasNext()) {
+            methods.clear();
+            final DetailAST nameAST = (DetailAST) it.next();
+            // find methods using the field
+            final Iterator refIt = getReferences(nameAST);
+            while (refIt.hasNext()) {
+                final Reference ref = (Reference) refIt.next();
+                final SymTabAST refNode = ref.getTreeNode();
+                final DetailAST refDetail = refNode.getDetailNode();
+                // don't need to check a self-reference
+                if (refDetail == nameAST) {
+                    continue;
+                }
+                DetailAST parent = refDetail.getParent();
+                while (parent != null) {
+                    final int type = parent.getType();
+                    if ((type == TokenTypes.METHOD_DEF)
+                        || (type == TokenTypes.CTOR_DEF)
+                        || (type == TokenTypes.INSTANCE_INIT)
+                        || (type == TokenTypes.STATIC_INIT))
+                    {
+                        methods.add(parent);
+                        break;
+                    }
+                    // initializer for inner class?
+                    else if (type == TokenTypes.CLASS_DEF) {
+                        break;
+                    }
+                    parent = parent.getParent();
+                }
+            }
+            if (methods.size() == 1) {
+                log(
+                    nameAST.getLineNo(),
+                    nameAST.getColumnNo(),
+                    getErrorKey(),
+                    nameAST.getText());
+            }
+        }
+    }
+
+    /**
+     * Returns the references to an AST.
+     * @param aAST the AST for the references.
+     * @return an iterator for the references to aAST.
+     */
+    private Iterator getReferences(DetailAST aAST)
+    {
+        final SymTabAST ident = getASTManager().get(aAST);
+        final Definition definition =
+            (Definition) ident.getDefinition();
+        if (definition != null) {
+            return definition.getReferences();
+        }
+        final Set dummy = new HashSet();
+        return dummy.iterator();
+    }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/UnusedLocalVariableCheck.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/UnusedLocalVariableCheck.java
new file mode 100644
index 0000000..bc1a89f
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/UnusedLocalVariableCheck.java
@@ -0,0 +1,59 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2005  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.usage;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+
+/**
+ * <p>Checks that a local variable is read.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="usage.UnusedLocalVariable"/>
+ * </pre>
+ *
+ * @author Rick Giles
+ */
+public class UnusedLocalVariableCheck extends AbstractUsageCheck
+{
+    /** @see com.puppycrawl.tools.checkstyle.api.Check */
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.VARIABLE_DEF,
+        };
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.checks.usage.AbstractUsageCheck */
+    public String getErrorKey()
+    {
+        return "unused.local";
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.checks.usage.AbstractUsageCheck */
+    public boolean mustCheckReferenceCount(DetailAST aAST)
+    {
+        return ScopeUtils.isLocalVariableDef(aAST);
+    }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/UnusedParameterCheck.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/UnusedParameterCheck.java
new file mode 100644
index 0000000..1f8b418
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/UnusedParameterCheck.java
@@ -0,0 +1,132 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2005  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.usage;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+
+/**
+ * <p>Checks that a parameter is used.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="usage.UnusedParameter"/>
+ * </pre>
+ *
+ * @author Rick Giles
+ */
+public class UnusedParameterCheck extends AbstractUsageCheck
+{
+    /** controls checking of catch clause parameter */
+    private boolean mIgnoreCatch = true;
+    /** controls checking of public/protected/package methods */
+    private boolean mIgnoreNonLocal;
+
+    /** @see com.puppycrawl.tools.checkstyle.api.Check */
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.PARAMETER_DEF,
+        };
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.checks.usage.AbstractUsageCheck */
+    public String getErrorKey()
+    {
+        return "unused.parameter";
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.checks.usage.AbstractUsageCheck */
+    public boolean mustCheckReferenceCount(DetailAST aAST)
+    {
+        boolean result = false;
+        final DetailAST parent = aAST.getParent();
+        if (parent != null) {
+            if (parent.getType() == TokenTypes.PARAMETERS) {
+                final DetailAST grandparent = parent.getParent();
+                if (grandparent != null) {
+                    result = hasBody(grandparent)
+                        && (!mIgnoreNonLocal || isLocal(grandparent));
+                }
+            }
+            else if (parent.getType() == TokenTypes.LITERAL_CATCH) {
+                result = !mIgnoreCatch;
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Determines whether an AST is a method definition with a body, or is
+     * a constructor definition.
+     * @param aAST the AST to check.
+     * @return if AST has a body.
+     */
+    private boolean hasBody(DetailAST aAST)
+    {
+        if (aAST.getType() == TokenTypes.METHOD_DEF) {
+            return aAST.branchContains(TokenTypes.SLIST);
+        }
+        else if (aAST.getType() == TokenTypes.CTOR_DEF) {
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * Checks if a given method is local, i.e. either static or private.
+     * @param aAST method def for check
+     * @return true if a given method is iether static or private.
+     */
+    private boolean isLocal(DetailAST aAST)
+    {
+        if (aAST.getType() == TokenTypes.METHOD_DEF) {
+            final DetailAST modifiers =
+                aAST.findFirstToken(TokenTypes.MODIFIERS);
+            return (modifiers == null)
+                || modifiers.branchContains(TokenTypes.LITERAL_STATIC)
+                || modifiers.branchContains(TokenTypes.LITERAL_PRIVATE);
+        }
+        return true;
+    }
+
+    /**
+     * Control whether unused catch clause parameters are flagged.
+     * @param aIgnoreCatch whether unused catch clause parameters
+     * should be flagged.
+     */
+    public void setIgnoreCatch(boolean aIgnoreCatch)
+    {
+        mIgnoreCatch = aIgnoreCatch;
+    }
+
+    /**
+     * Controls whether public/protected/paskage methods shouldn't be checked.
+     * @param aIgnoreNonLocal whether we should check any other methods
+     * except static and private should be checked.
+     */
+    public void setIgnoreNonLocal(boolean aIgnoreNonLocal)
+    {
+        mIgnoreNonLocal = aIgnoreNonLocal;
+    }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/UnusedPrivateFieldCheck.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/UnusedPrivateFieldCheck.java
new file mode 100644
index 0000000..b1ea2a8
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/UnusedPrivateFieldCheck.java
@@ -0,0 +1,63 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2005  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.usage;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+
+/**
+ * <p>Checks that a private field is used.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="usage.UnusedPrivateField"/>
+ * </pre>
+ *
+ * @author Rick Giles
+ */
+public class UnusedPrivateFieldCheck
+    extends AbstractUsageCheck
+{
+    /** @see com.puppycrawl.tools.checkstyle.api.Check */
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.VARIABLE_DEF,
+        };
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.checks.usage.AbstractUsageCheck */
+    public String getErrorKey()
+    {
+        return "unused.field";
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.checks.usage.AbstractUsageCheck */
+    public boolean mustCheckReferenceCount(DetailAST aAST)
+    {
+        final DetailAST mods = aAST.findFirstToken(TokenTypes.MODIFIERS);
+        return ((mods != null)
+            && (ScopeUtils.getScopeFromMods(mods) == Scope.PRIVATE));
+    }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/UnusedPrivateMethodCheck.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/UnusedPrivateMethodCheck.java
new file mode 100644
index 0000000..f7b4fbf
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/UnusedPrivateMethodCheck.java
@@ -0,0 +1,244 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2005  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.usage;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>Checks that a private method is used.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="usage.UnusedPrivateMethod"/>
+ * </pre>
+ *
+ * @author Rick Giles
+ */
+public class UnusedPrivateMethodCheck
+    extends AbstractUsageCheck
+
+{
+    /** Controls if checks skips serialization methods.*/
+    private boolean mAllowSerializationMethods;
+    /** @see com.puppycrawl.tools.checkstyle.api.Check */
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.METHOD_DEF,
+        };
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.checks.usage.AbstractUsageCheck */
+    public String getErrorKey()
+    {
+        return "unused.method";
+    }
+
+    /**
+     * Configure the check to allow (or not) serialization-related methods.
+     * @param aFlag new value for allowSerializationMethods value.
+     */
+    public void setAllowSerializationMethods(boolean aFlag)
+    {
+        mAllowSerializationMethods = aFlag;
+    }
+
+    /** @see com.puppycrawl.tools.checkstyle.checks.usage.AbstractUsageCheck */
+    public boolean mustCheckReferenceCount(DetailAST aAST)
+    {
+        final DetailAST mods = aAST.findFirstToken(TokenTypes.MODIFIERS);
+        if ((mods == null)
+            || (ScopeUtils.getScopeFromMods(mods) != Scope.PRIVATE))
+        {
+            return false;
+        }
+
+        return !mAllowSerializationMethods
+               || !(isWriteObject(aAST) || isReadObject(aAST)
+                    || isWriteReplaceOrReadResolve(aAST));
+    }
+
+    /**
+     * Checks if a given method is writeObject().
+     * @param aAST method def to check
+     * @return true if this is a writeObject() definition
+     */
+    private boolean isWriteObject(DetailAST aAST)
+    {
+        // name is writeObject...
+        final DetailAST ident = aAST.findFirstToken(TokenTypes.IDENT);
+        if (!"writeObject".equals(ident.getText())) {
+            return false;
+        }
+
+        // returns void...
+        final DetailAST typeAST =
+            (DetailAST) aAST.findFirstToken(TokenTypes.TYPE).getFirstChild();
+        if (typeAST.getType() != TokenTypes.LITERAL_VOID) {
+            return false;
+        }
+
+        // should have one parameter...
+        final DetailAST params = aAST.findFirstToken(TokenTypes.PARAMETERS);
+        if (params == null || params.getChildCount() != 1) {
+            return false;
+        }
+        // and paramter's type should be java.io.ObjectOutputStream
+        final DetailAST type =
+            (DetailAST) ((DetailAST) params.getFirstChild())
+                .findFirstToken(TokenTypes.TYPE).getFirstChild();
+        final String typeName = FullIdent.createFullIdent(type).getText();
+        if (!"java.io.ObjectOutputStream".equals(typeName)
+            && !"ObjectOutputStream".equals(typeName))
+        {
+            return false;
+        }
+
+        // and, finally, it should throws java.io.IOException
+        final DetailAST throwsAST =
+            aAST.findFirstToken(TokenTypes.LITERAL_THROWS);
+        if (throwsAST == null || throwsAST.getChildCount() != 1) {
+            return false;
+        }
+        final DetailAST expt = (DetailAST) throwsAST.getFirstChild();
+        final String exceptionName = FullIdent.createFullIdent(expt).getText();
+        if (!"java.io.IOException".equals(exceptionName)
+            && !"IOException".equals(exceptionName))
+        {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Checks if a given method is readObject().
+     * @param aAST method def to check
+     * @return true if this is a readObject() definition
+     */
+    private boolean isReadObject(DetailAST aAST)
+    {
+        // name is readObject...
+        final DetailAST ident = aAST.findFirstToken(TokenTypes.IDENT);
+        if (!"readObject".equals(ident.getText())) {
+            return false;
+        }
+
+        // returns void...
+        final DetailAST typeAST =
+            (DetailAST) aAST.findFirstToken(TokenTypes.TYPE).getFirstChild();
+        if (typeAST.getType() != TokenTypes.LITERAL_VOID) {
+            return false;
+        }
+
+        // should have one parameter...
+        final DetailAST params = aAST.findFirstToken(TokenTypes.PARAMETERS);
+        if (params == null || params.getChildCount() != 1) {
+            return false;
+        }
+        // and paramter's type should be java.io.ObjectInputStream
+        final DetailAST type =
+            (DetailAST) ((DetailAST) params.getFirstChild())
+                .findFirstToken(TokenTypes.TYPE).getFirstChild();
+        final String typeName = FullIdent.createFullIdent(type).getText();
+        if (!"java.io.ObjectInputStream".equals(typeName)
+            && !"ObjectInputStream".equals(typeName))
+        {
+            return false;
+        }
+
+        // and, finally, it should throws java.io.IOException
+        // and java.lang.ClassNotFoundException
+        final DetailAST throwsAST =
+            aAST.findFirstToken(TokenTypes.LITERAL_THROWS);
+        if (throwsAST == null || throwsAST.getChildCount() != 3) {
+            return false;
+        }
+        final DetailAST excpt1 = (DetailAST) throwsAST.getFirstChild();
+        final String exception1 = FullIdent.createFullIdent(excpt1).getText();
+        final String exception2 =
+            FullIdent.createFullIdent(throwsAST.getLastChild()).getText();
+        if (!"java.io.IOException".equals(exception1)
+            && !"IOException".equals(exception1)
+            && !"java.io.IOException".equals(exception2)
+            && !"IOException".equals(exception2)
+            || !"java.lang.ClassNotFoundException".equals(exception1)
+            && !"ClassNotFoundException".equals(exception1)
+            && !"java.lang.ClassNotFoundException".equals(exception2)
+            && !"ClassNotFoundException".equals(exception2))
+        {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Checks if a given method is writeReplace() or readResolve().
+     * @param aAST method def to check
+     * @return true if this is a writeReplace() definition
+     */
+    private boolean isWriteReplaceOrReadResolve(DetailAST aAST)
+    {
+        // name is writeReplace or readResolve...
+        final DetailAST ident = aAST.findFirstToken(TokenTypes.IDENT);
+        if (!"writeReplace".equals(ident.getText())
+            && !"readResolve".equals(ident.getText()))
+        {
+            return false;
+        }
+
+        // returns Object...
+        final DetailAST typeAST =
+            (DetailAST) aAST.findFirstToken(TokenTypes.TYPE).getFirstChild();
+        if (typeAST.getType() != TokenTypes.DOT
+            && typeAST.getType() != TokenTypes.IDENT)
+        {
+            return false;
+        }
+
+        // should have no parameters...
+        final DetailAST params = aAST.findFirstToken(TokenTypes.PARAMETERS);
+        if (params != null && params.getChildCount() != 0) {
+            return false;
+        }
+
+        // and, finally, it should throws java.io.ObjectStreamException
+        final DetailAST throwsAST =
+            aAST.findFirstToken(TokenTypes.LITERAL_THROWS);
+        if (throwsAST == null || throwsAST.getChildCount() != 1) {
+            return false;
+        }
+        final DetailAST excpt = (DetailAST) throwsAST.getFirstChild();
+        final String exception = FullIdent.createFullIdent(excpt).getText();
+        if (!"java.io.ObjectStreamException".equals(exception)
+            && !"ObjectStreamException".equals(exception))
+        {
+            return false;
+        }
+
+        return true;
+    }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/messages.properties b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/messages.properties
new file mode 100644
index 0000000..e5a80c5
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/messages.properties
@@ -0,0 +1,5 @@
+one.method.private.field=Field ''{0}'' is used in only one method.
+unused.local=Unused local variable ''{0}''.
+unused.parameter=Unused parameter ''{0}''.
+unused.field=Unused private field ''{0}''.
+unused.method=Unused private method ''{0}''.
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/messages_fi.properties b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/messages_fi.properties
new file mode 100644
index 0000000..c6db20b
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/messages_fi.properties
@@ -0,0 +1,5 @@
+one.method.private.field=Muuttujaa ''{0}'' käytetään vain yhdessä metodissa.
+unused.local=Käyttämäton paikallinen muuttuja ''{0}''.
+unused.parameter=Käyttämätön parameteri ''{0}''.
+unused.field=Käyttämätön private muuttuja ''{0}''.
+unused.method=Käyttämätön private metodi ''{0}''.
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/messages_fr.properties b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/messages_fr.properties
new file mode 100644
index 0000000..4b0efd3
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/messages_fr.properties
@@ -0,0 +1,5 @@
+one.method.private.field=L''attribut priv� ''{0}'' est utilis� dans une seule m�thode.
+unused.local=Variable locale non utilis�e ''{0}''.
+unused.parameter=Param�tre ''{0}'' inutilis�.
+unused.field=Attribut priv� ''{0}'' inutilis�.
+unused.method=M�thode priv�e ''{0}'' inutilis�e.
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/package.html b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/package.html
new file mode 100644
index 0000000..0da03e3
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/package.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head></head>
+
+<body>
+
+<p>Contains the Usage checks that are bundled with the main distribution.</p>
+
+</body>
+</html>
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ASTManager.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ASTManager.java
new file mode 100644
index 0000000..30af037
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ASTManager.java
@@ -0,0 +1,228 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2003  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import antlr.collections.AST;
+
+import com.puppycrawl.tools.checkstyle.checks.usage.AbstractUsageCheck;
+
+/**
+ * Manages AST trees and nodes. Capable of managing multiple parse trees, which
+ * is useful for inter-file checks.
+ * @author Rick Giles
+ */
+public final class ASTManager
+{
+    /** singleton */
+    private static final ASTManager INSTANCE = new ASTManager();
+
+    /**
+     * Maps DetailASTs to SymTabASTs.
+     * A HashMap is acceptable provided DetailAST method hashCode() returns
+     * distinct integers for distinct objects.
+     * If not, a structure such as IdentityHashMap must be employed.
+     */
+    private Map mMap = new HashMap();
+
+    /** root with subtrees for a set of files */
+    private SymTabAST mCompleteTree = null;
+
+    /** Map for parse trees, keyed on File name */
+    private Map mTrees = new HashMap();
+
+    /** Set of checks and their nodes to check */
+    private Map mCheckNodes = new HashMap();
+
+    /** prevent client creation */
+    private ASTManager()
+    {
+    }
+
+    /**
+     * Returns the singleon ASTManager.
+     * @return the singleon ASTManager.
+     */
+    public static ASTManager getInstance()
+    {
+        return INSTANCE;
+    }
+
+    /**
+     * Add the parse tree for a file to the set of parse trees.
+     * Postcondition: since all checks are local to one source file,
+     * all managed elements are cleared.
+     * @param aFileName the name of the file.
+     * @param aRoot the root of the AST.
+     */
+    public void addTree(String aFileName, AST aRoot)
+    {
+        clear();
+        mTrees.put(aFileName, aRoot);
+    }
+
+    /**
+     * Clears all managed elements.
+     */
+    private void clear() {
+        mCheckNodes.clear();
+        mTrees.clear();
+        mMap.clear();
+        mCompleteTree = null;        
+    }
+
+    /**
+     * Builds the complete tree for all added parse trees.
+     * @throws SymbolTableException if there is an error.
+     */
+    private void buildTree()
+        throws SymbolTableException
+    {
+        mCompleteTree = SymTabASTFactory.create(0, "AST Root");
+        final Set keys = mTrees.keySet();
+        final Iterator it = keys.iterator();
+        while (it.hasNext()) {
+            final String fileName = (String) it.next();
+            final File file = new File(fileName);
+            final AST rootAST = (AST) mTrees.get(fileName);
+            addToCompleteTree(file, rootAST);
+        }
+
+        // Walk of the complete tree.
+        // TODO: This is a hack. Find a better way.
+        new TableMaker(mCompleteTree).getTable();
+    }
+
+    /**
+     * Adds a file and a DetailAST to the root SymTabAST tree. Normally, the
+     * DetailAST will be the parse tree for the file.
+     * @param aFile the file to add.
+     * @param aAST the DetailAST to add.
+    */
+    private void addToCompleteTree(File aFile, AST aAST)
+    {
+        // add aFile to the root
+        final SymTabAST fileNode =
+            SymTabASTFactory.create(0, aFile.getAbsolutePath());
+        fileNode.setFile(aFile);
+        mCompleteTree.addChild(fileNode);
+        fileNode.setParent(mCompleteTree);
+
+        // add aAST to aFile
+        final SymTabAST child = SymTabASTFactory.create(aAST);
+        child.setFile(aFile);
+        fileNode.addChild(child);
+        child.setParent(fileNode);
+        fileNode.finishDefinition(aFile, mCompleteTree);
+    }
+
+    /**
+     * Registers a node for checking.
+     * @param aCheck the check to apply.
+     * @param aNode the node to check.
+     */
+    public void registerCheckNode(AbstractUsageCheck aCheck, AST aNode)
+    {
+        Set nodeSet = (Set) mCheckNodes.get(aCheck);
+        if (nodeSet == null) {
+            nodeSet = new HashSet();
+            nodeSet.add(aNode);
+            mCheckNodes.put(aCheck, nodeSet);
+        }
+        else {
+            nodeSet.add(aNode);
+        }
+    }
+
+    /**
+     * Gets the nodes to check with a usage check.
+     * @param aCheck the usage check.
+     * @return the nodes to check with aCheck.
+     * @throws SymbolTableException if there is an error.
+     */
+    public Set getCheckNodes(AbstractUsageCheck aCheck)
+        throws SymbolTableException
+    {
+        // lazy initialization
+        if (mCompleteTree == null) {
+            buildTree();
+        }
+        Set result = (Set) mCheckNodes.get(aCheck);
+        if (result == null) {
+            result = new HashSet();
+        }
+        return result;
+    }
+
+    /**
+     * Maps a AST to its associated SymTabAST.
+     * @param aAST the AST.
+     * @param aSymTabAST the SymTabAST associated with aAST.
+     */
+    public void put(AST aAST, SymTabAST aSymTabAST)
+    {
+        mMap.put(aAST, aSymTabAST);
+    }
+
+    /**
+     * Gets the SymTabAST associated with a AST.
+     * @param aAST the AST.
+     * @return the the SymTabAST associated with aAST.
+     */
+    public SymTabAST get(AST aAST)
+    {
+        return (SymTabAST) mMap.get(aAST);
+    }
+
+    /**
+     * Clears all associations from DetailsASTs to SymTabASTs.
+     */
+    public void clearDetailsMap()
+    {
+        mMap.clear();
+    }
+
+    /**
+     * Determines whether the map from DetailsASTs to SymTabASTs is empty.
+     * @return true if the map is empty.
+     */
+    public boolean isEmptyDetailsMap()
+    {
+        return mMap.isEmpty();
+    }
+
+    /**
+     * Removes a check and its check nodes. Clears all managed elements if
+     * last check removed.
+     * @param aCheck the check to remove.
+     */
+    public void removeCheck(AbstractUsageCheck aCheck)
+    {
+        mCheckNodes.remove(aCheck);
+        if (mCheckNodes.isEmpty()) {
+            clear();
+        }
+    }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ASTUtil.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ASTUtil.java
new file mode 100644
index 0000000..9e7136a
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ASTUtil.java
@@ -0,0 +1,220 @@
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.io.File;
+
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+
+
+/**
+ * <code>ASTUtil</code> is a <code>Utility Class</code> that contains utility code
+ * for managing our SymTabAST.
+ *
+ * @see Definition
+ * @see TypedDef
+ */
+
+public class ASTUtil {
+
+    /**
+     * gets a line number for the tree;  if the current SymTabAST node does not have one associated
+     * with it, traverse its children until a line number is found.  Failure results in line
+     * number value of 0.
+     *
+     * @param tree the SymTabAST to process
+     *
+     * @return int the resulting line number (0 if none is found)
+     */
+    public static int getLine(SymTabAST tree) {
+        SymTabAST indexedNode = tree;
+
+        // find a node that actually has line number info
+        if (indexedNode.getLineNo() == 0) {
+            indexedNode = (SymTabAST) indexedNode.getFirstChild();
+
+            while (indexedNode != null && indexedNode.getLineNo() == 0) {
+                indexedNode = (SymTabAST) indexedNode.getNextSibling();
+            }
+
+            if (indexedNode == null) {
+                // we're screwed
+                indexedNode = tree;
+            }
+        }
+
+        return indexedNode.getLineNo();
+    }
+
+    /**
+     * gets a column number for the tree;  if the current SymTabAST node does not have one associated
+     * with it, traverse its children until a column number is found.  Failure results in column
+     * number value of 0.
+     *
+     * @param tree the SymTabAST to process
+     *
+     * @return int the resulting line number (0 if none is found)
+     */
+    public static int getColumn(SymTabAST tree) {
+        SymTabAST indexedNode = tree;
+
+        // find a node that actually has line number info
+        // REDTAG -- a label's ':' is a real token and has (the wrong) column info
+        // because it is the parent of the ident node that people will want
+        if (indexedNode.getColumnNo() == 0
+            || indexedNode.getType() == TokenTypes.LABELED_STAT) {
+            indexedNode = (SymTabAST) indexedNode.getFirstChild();
+
+            while (indexedNode != null && indexedNode.getColumnNo() == 0) {
+                indexedNode = (SymTabAST) indexedNode.getNextSibling();
+            }
+
+            if (indexedNode == null) {
+                // we're screwed
+                indexedNode = tree;
+            }
+        }
+
+        return indexedNode.getColumnNo();
+    }
+
+    /**
+     * Builds the dotted name String representation of the object contained within
+     * the SymTabAST.
+     *
+     * @return String
+     * @param tree the SymTabAST contaning the entire hierarcy of the object
+     */
+    public static String constructDottedName(SymTabAST tree) {
+        String result;
+
+        if (tree.getType() == TokenTypes.DOT) {
+            SymTabAST left = (SymTabAST) tree.getFirstChild();
+            SymTabAST right = (SymTabAST) left.getNextSibling();
+
+            result =
+                constructDottedName(left) + "." + constructDottedName(right);
+        }
+        else if (tree.getType() == TokenTypes.ARRAY_DECLARATOR) {
+            StringBuffer buf = new StringBuffer();
+            SymTabAST left = (SymTabAST) tree.getFirstChild();
+            SymTabAST right = (SymTabAST) left.getNextSibling();
+
+            buf.append(constructDottedName(left));
+
+            if (right != null) {
+                buf.append(".");
+                buf.append(constructDottedName(right));
+            }
+
+            buf.append(" []");
+
+            result = buf.toString();
+        }
+        else if (tree.getType() == TokenTypes.METHOD_CALL) {
+            result =
+                constructDottedName((SymTabAST) tree.getFirstChild()) + "()";
+        }
+        else {
+            result = tree.getText();
+        }
+
+        return result;
+    }
+
+    /**
+     * Returns the Package name in the hierarchy represented by the SymTabAST.
+     *
+     * @return String
+     * @param tree the SymTabAST contaning the entire hierarcy of the object
+     */
+    public static String constructPackage(SymTabAST tree) {
+        String fullName = constructDottedName(tree);
+
+        return fullName.substring(0, fullName.lastIndexOf("."));
+    }
+
+    /**
+    * Returns the top Class name in the hierarchy represented by the SymTabAST.
+    *
+    * @return String
+    * @param tree the SymTabAST contaning the entire hierarcy of the object
+    */
+    public static String constructClass(SymTabAST tree) {
+        String fullName = constructDottedName(tree);
+
+        return fullName.substring(
+            fullName.lastIndexOf(".") + 1,
+            fullName.length());
+    }
+
+    public static boolean treesBelowFilesAreEqual(
+        SymTabAST firstRoot,
+        File[] firstFiles,
+        SymTabAST secondRoot,
+        File[] secondFiles) {
+        boolean result = true;
+
+        if (firstFiles.length == secondFiles.length) {
+            for (int i = 0; i < firstFiles.length; i++) {
+                SymTabAST firstTree =
+                    (SymTabAST) getFileNode(firstRoot, firstFiles[i])
+                        .getFirstChild();
+                SymTabAST secondTree =
+                    (SymTabAST) getFileNode(secondRoot, secondFiles[i])
+                        .getFirstChild();
+
+                if (!firstTree.equalsList(secondTree)) {
+                    result = false;
+                    break;
+                }
+            }
+        }
+        else {
+            result = false;
+        }
+
+        return result;
+    }
+
+    public static SymTabAST getFileNode(SymTabAST root, File file)
+    {
+        SymTabAST result = null;
+
+        SymTabAST fileNode = (SymTabAST) root.getFirstChild();
+        while (fileNode != null && result == null) {
+            if (file.equals(fileNode.getFile())) {
+                result = fileNode;
+            }
+            fileNode = (SymTabAST) fileNode.getNextSibling();
+        }
+
+        return result;
+    }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/AnonymousInnerClass.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/AnonymousInnerClass.java
new file mode 100644
index 0000000..f5b120e
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/AnonymousInnerClass.java
@@ -0,0 +1,62 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+
+public class AnonymousInnerClass extends ClassDef {
+
+  protected SymTabAST _objblock;
+  protected SymTabAST _classExtended;
+
+  public AnonymousInnerClass(SymTabAST objblock,
+                             SymTabAST classExtended,
+                             Scope parentScope) {
+    super(parentScope.getName() + "$" + parentScope.getEnclosingClass().getNextAnonymousId(),
+          parentScope,
+          objblock);
+
+    _objblock = objblock;
+    _classExtended = classExtended;
+  }
+
+  public void finishMakingDefinition() {
+    if (_classExtended != null) {
+        String extendedClassName = ASTUtil.constructDottedName(_classExtended);
+        IClass superclass = getClassDefinition(extendedClassName);
+    
+        if (superclass != null) {
+          setSuperclass(superclass);
+          superclass.addSubclass(this);
+        }
+    }
+  }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ArrayDef.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ArrayDef.java
new file mode 100644
index 0000000..de9ac1a
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ArrayDef.java
@@ -0,0 +1,154 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+//import com.puppycrawl.tools.checkstyle.checks.lint.parser.JavaTokenTypes;
+
+public class ArrayDef implements IClass {
+
+  private final static IVariable LENGTH_MEMBER = new ArrayLengthMember();
+
+  private IClass _type;
+
+  public ArrayDef(IClass type){
+    _type = type;
+  }
+
+  public IClass getType(){
+    return _type;
+  }
+
+  public IClass getSuperclass() {
+    return new ArrayDef(getType().getSuperclass());
+  }
+
+  public IClass[] getInterfaces() {
+    return new IClass[0];
+  }
+
+  public IClass[] getInnerClasses() {
+    return new IClass[0];
+  }
+
+  public IClass getClassDefinition(String name) {
+    return null;
+  }
+
+  public IMethod getMethodDefinition(String name,
+                                     ISignature signature) {
+      return new ExternalClass(Object.class).getMethodDefinition(name,
+                                                                 signature);
+  }
+
+  public IVariable getVariableDefinition(String name) {
+    IVariable result = null;
+    
+    if (name.equals("length")) {
+      result = LENGTH_MEMBER;
+    }
+
+    return result;
+  }
+
+  public void addSubclass(ClassDef subclass) {}
+
+  public void addReference(Reference reference) {}
+
+  public Iterator getReferences() {
+    return new Vector().iterator();
+  }
+
+  public int getNumReferences() {
+    return 0;
+  }
+
+  public List getSubclasses() {
+    return new ArrayList();
+  }
+
+  public void addImplementor(ClassDef implementor) {}
+
+  public List getImplementors() {
+    return new ArrayList();
+  }
+
+  public boolean isCompatibleWith(IClass type) {
+    boolean result = false;
+    if (type.equals(new ExternalClass(Object.class))) {
+      result = true;
+    }
+    else if (type instanceof ArrayDef) {
+      result = getType().isCompatibleWith(((ArrayDef)type).getType());
+    }
+
+    return result;
+  }
+
+  public boolean isSourced() {
+    return getType().isSourced();
+  }
+
+  public String getName() {
+    return getType().getName() + "[]";
+  }
+
+  public String getQualifiedName() {
+    return getType().getQualifiedName() + "[]";
+  }
+
+  public boolean isPrimitive() {
+    return false;
+  }
+
+  public boolean equals(Object obj) {
+    boolean result = false;
+
+    if (obj instanceof ArrayDef) {
+      ArrayDef compared = (ArrayDef)obj;
+      result = (getType().equals(compared.getType()));
+    }
+
+    return result;
+  }
+
+  public int hashCode() {
+    return getType().hashCode();
+  }
+
+  public String toString() {
+    return getQualifiedName() + "[]";
+  }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ArrayLengthMember.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ArrayLengthMember.java
new file mode 100644
index 0000000..d8072f9
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ArrayLengthMember.java
@@ -0,0 +1,48 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+public class ArrayLengthMember extends ExternalVariable {
+
+  public ArrayLengthMember() {
+    super(null);
+  }
+
+  public String getName() {
+    return "length";
+  }
+
+  public String getQualifiedName() {
+    return getName();
+  }
+
+  public IClass getType() {
+    return LiteralResolver.getDefinition("int");
+  }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/BaseScope.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/BaseScope.java
new file mode 100644
index 0000000..ea03bf6
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/BaseScope.java
@@ -0,0 +1,100 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+/**
+ * the bottom scope of the scope stack, contains some extra information
+ * to make resolution easier.
+ */
+
+
+
+public class BaseScope extends DefaultScope {
+  private SymbolTable table;
+
+  public BaseScope( SymbolTable symbolTable ) {
+    super("~BASE~", null, null);
+    this.table = symbolTable;
+  }
+
+  public boolean isBaseScope() {
+    return true;
+  }
+
+  public void addDefinition(IPackage def) {
+    elements.put(def.getName(), def);
+  }
+
+  /**
+   * gets the package associated with a fully qualified name
+   *
+   * @param fullyQualifiedName the name of the package
+   *
+   * @return the package that was gotten
+   */
+  public IPackage getPackageDefinition(String fullyQualifiedName) {
+    return (IPackage)(table.getPackages().get(fullyQualifiedName));
+  }
+
+  public IClass getClassDefinition(String name) {
+    IClass result = null;
+
+    result = LiteralResolver.getDefinition(name);
+
+    if (result == null) {
+      int lastDot = name.lastIndexOf(".");
+      if (lastDot > 0) {
+        String packageName = name.substring(0, lastDot);
+        String className = name.substring(lastDot + 1);
+
+        IPackage pkg = getPackageDefinition(packageName);
+        if (pkg != null) {
+          result = pkg.getClass(className);
+        }
+      }
+    }
+
+    if (result == null) {
+      Class theClass = null;
+      try {
+        theClass = ClassManager.getClassLoader().loadClass(name);
+        result = new ExternalClass(theClass);
+      }
+      catch (ClassNotFoundException e) {
+        // no-op
+      }
+      catch (NoClassDefFoundError e) {
+        // no-op, checkstyle bug 842781
+      }
+    }
+
+    return result;
+  }
+}
+
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/BlockDef.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/BlockDef.java
new file mode 100644
index 0000000..9e13fef
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/BlockDef.java
@@ -0,0 +1,53 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+
+/**
+ * <code>BlockDef</code> is a <code>Scope</code> which contains
+ * information about everything that defines a nameless block of java code.
+ * There are provisions for keeping the name of several anonymous
+ * blocks of java code within the same parent scope to have unique names.
+ *
+ * @see Scope
+ * @see Resolvable
+ */
+
+public class BlockDef extends DefaultScope
+{
+    private static long id = 0;
+
+    public BlockDef(Scope parentScope, SymTabAST node)
+    {
+        super("~Anonymous~" + id++, parentScope, node);
+    }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ClassDef.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ClassDef.java
new file mode 100644
index 0000000..2b82284
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ClassDef.java
@@ -0,0 +1,362 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.Vector;
+
+
+
+/**
+ * <code>ClassDef</code> contains all the information needed to
+ * represent a java class or interface.  This includes the superclass,
+ * whether it's a class or an interface, the interfaces it implements,
+ * a list of its (direct?) subclasses, and the classes that implement
+ * it if it is an interface
+ *
+ * @see Scope
+ */
+public class ClassDef extends DefaultScope implements IClass {
+    private long id = 0;
+
+    private IClass superclass = null;
+    private List interfaces = new Vector();
+
+    private List subclasses = new Vector();
+    private List implementors = new Vector();
+
+    private Set importedPackages = new HashSet();
+
+    // variable definitions will use elements from parent
+    private Set methods = new HashSet();
+
+    private Hashtable imports = new Hashtable();
+    private Vector unprocessedImports = null;
+
+    protected MethodDef _defaultConstructor;
+
+    public ClassDef(String name, Scope parentScope, SymTabAST node) {
+        super(name, parentScope, node);
+        _defaultConstructor = new DefaultConstructor(this);
+        addDefinition(_defaultConstructor);
+    }
+
+    public long getNextAnonymousId() {
+        return ++id;
+    }
+
+    public void setSuperclass(IClass newSuperclass) {
+        this.superclass = newSuperclass;
+    }
+
+    public IClass getSuperclass() {
+        return superclass;
+    }
+
+    public void addUnprocessedImports(Vector aImports) {
+        unprocessedImports = (Vector) (aImports.clone());
+    }
+
+    public Vector getUnprocessedImports() {
+        return unprocessedImports;
+    }
+
+    public void importPackage(IPackage pkg) {
+        importedPackages.add(pkg);
+    }
+
+    public void importClass(IClass imported) {
+        imports.put(imported.getName(), imported);
+    }
+
+    // begin definitions interface
+
+    public void addDefinition(MethodDef method) {
+        if (method.getName().equals(getName())) {
+            methods.remove(_defaultConstructor);
+        }
+        methods.add(method);
+    }
+
+    protected Enumeration getDefinitions() {
+        Vector allElements = new Vector();
+
+        allElements.addAll(elements.values());
+        allElements.addAll(methods);
+        allElements.addAll(labels.values());
+        allElements.addAll(classes.values());
+
+        return allElements.elements();
+    }
+
+    public IClass getClassDefinition(String name) {
+        IClass result = null;
+
+        result = (ClassDef) (classes.get(name));
+
+        if (result == null) {
+            result = (IClass) (imports.get(name));
+        }
+
+        if (result == null) {
+            Iterator it = importedPackages.iterator();
+            while (it.hasNext() && result == null) {
+                IPackage pkg = (IPackage) it.next();
+                result = pkg.getClass(name);
+            }
+        }
+
+        if (result == null) {
+            result = getParentScope().getClassDefinition(name);
+        }
+        
+        //TODO: check for a class in the same package?
+        if (result == null) {
+            final String packageName = getParentScope().getQualifiedName();
+            final String fullName = packageName + "." + name;
+            Class theClass = null;
+            try {
+                theClass = ClassManager.getClassLoader().loadClass(fullName);
+                result = new ExternalClass(theClass);
+            }
+            catch (ClassNotFoundException e) {
+                // no-op
+            }
+        }
+         
+        return result;
+    }
+
+    public IMethod getMethodDefinition(String name, ISignature signature) {
+        IMethod result = null;
+
+        result = getDeclaredMethod(name, signature);
+
+        if (result == null) {
+            result = getMostCompatibleMethod(name, signature);
+        }
+
+        if (result == null) {
+            if (superclass != null) {
+                result = superclass.getMethodDefinition(name, signature);
+            }
+        }
+
+        if (result == null) {
+            IClass[] myInterfaces = getInterfaces();
+            for (int index = 0;
+                index < myInterfaces.length && result == null;
+                index++) {
+                result = myInterfaces[index].getMethodDefinition(name, signature);
+            }
+        }
+
+        // not sure why this is here -- inner classes, maybe?
+        // regardless, write better
+        if (result == null) {
+            if (getParentScope() != null) {
+                result = getParentScope().getMethodDefinition(name, signature);
+            }
+        }
+
+        return result;
+    }
+
+    public IMethod getMostCompatibleMethod(String name, ISignature signature) {
+        IMethod result = null;
+
+        SortedSet compatibleMethods =
+            new TreeSet(new MethodSpecificityComparator());
+
+        Iterator it = methods.iterator();
+        while (it.hasNext()) {
+            MethodDef method = (MethodDef) it.next();
+            if (name.equals(method.getName())) {
+                if (method.hasCompatibleSignature(signature)) {
+                    compatibleMethods.add(method);
+                }
+            }
+        }
+
+        if (!compatibleMethods.isEmpty()) {
+            result = (IMethod) compatibleMethods.first();
+        }
+
+        return result;
+    }
+
+    public IMethod getDeclaredMethod(String name, ISignature signature) {
+        // finds methods declared by this class with the given signature
+
+        IMethod result = null;
+
+        Iterator it = methods.iterator();
+        while (it.hasNext()) {
+            MethodDef method = (MethodDef) it.next();
+            if (name.equals(method.getName())) {
+                if (method.hasSameSignature(signature)) {
+                    result = method;
+                    break;
+                }
+            }
+        }
+
+        return result;
+    }
+
+    public IVariable getVariableDefinition(String name) {
+        IVariable result = null;
+
+        // in keeping with getField in java.lang.Class
+        // 1) current class
+        // 2) direct superinterfaces
+        // 3) superclass
+        // then we do the parent scope in case its an inner class
+
+        result = (VariableDef) (elements.get(name));
+
+        if (result == null) {
+            IClass[] superinterfaces = getInterfaces();
+            for (int i = 0;
+                i < superinterfaces.length && result == null;
+                i++) {
+                result = superinterfaces[i].getVariableDefinition(name);
+            }
+        }
+
+        if (result == null) {
+            if (superclass != null) {
+                result = superclass.getVariableDefinition(name);
+            }
+        }
+
+        if (result == null) {
+            if (getParentScope() != null) {
+                result = getParentScope().getVariableDefinition(name);
+            }
+        }
+
+        return result;
+    }
+
+    // end definitions interface
+
+    public void addInterface(IClass implemented) {
+        interfaces.add(implemented);
+    }
+
+    public IClass[] getInterfaces() {
+        IClass[] type = new IClass[0];
+        return (IClass[]) interfaces.toArray(type);
+    }
+
+    public ClassDef getEnclosingClass() {
+        return this;
+    }
+
+    public void addSubclass(ClassDef subclass) {
+        subclasses.add(subclass);
+    }
+
+    public List getSubclasses() {
+        return subclasses;
+    }
+
+    public void addImplementor(ClassDef implementor) {
+        implementors.add(implementor);
+    }
+
+    public List getImplementors() {
+        return implementors;
+    }
+
+    public IClass[] getInnerClasses() {
+        Iterator it = getClasses();
+        List result = new ArrayList();
+
+        while (it.hasNext()) {
+            result.add(it.next());
+        }
+
+        return (IClass[]) result.toArray(new IClass[0]);
+    }
+
+    public boolean isSuperclassOf(IClass possibleChild) {
+        // justify my existence
+        boolean result = subclasses.contains(possibleChild);
+
+        /*
+        Iterator it = subclasses.iterator();
+        while (it.hasNext() && !result) {
+          IClass child = (IClass)it.next();
+          result = child.isSuperclassOf(possibleChild);
+        }
+        */
+        return result;
+    }
+
+    public boolean isCompatibleWith(IClass type) {
+        boolean result = false;
+
+        // check myself
+        if (type.equals(this)) {
+            result = true;
+        }
+        // check my superclass
+        else if (superclass != null && superclass.isCompatibleWith(type)) {
+            result = true;
+        }
+        // check my interfaces
+        else if (!interfaces.isEmpty()) {
+            Iterator it = interfaces.iterator();
+
+            while (it.hasNext() && !result) {
+                IClass current = (IClass) it.next();
+
+                if (current.isCompatibleWith(type)) {
+                    result = true;
+                }
+            }
+        }
+
+        return result;
+    }
+
+    public boolean isPrimitive() {
+        return false;
+    }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ClassImportException.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ClassImportException.java
new file mode 100644
index 0000000..d511e75
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ClassImportException.java
@@ -0,0 +1,35 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+public class ClassImportException extends SymbolTableException {
+  public ClassImportException(String name) {
+    super(name);
+  }
+}
\ No newline at end of file
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ClassManager.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ClassManager.java
new file mode 100644
index 0000000..8b950fa
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ClassManager.java
@@ -0,0 +1,41 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+public class ClassManager {
+  private static ClassLoader _classLoader = ClassLoader.getSystemClassLoader();
+
+  public static void setClassLoader(ClassLoader classLoader) {
+    _classLoader = classLoader;
+  }
+
+  public static ClassLoader getClassLoader() {
+    return _classLoader;
+  }
+}
\ No newline at end of file
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/DefaultConstructor.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/DefaultConstructor.java
new file mode 100644
index 0000000..c4e0585
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/DefaultConstructor.java
@@ -0,0 +1,65 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.util.Vector;
+
+public class DefaultConstructor extends MethodDef {
+
+  protected ClassDef _classConstructed;
+
+  public DefaultConstructor(ClassDef classConstructed) {
+    super(classConstructed.getName(), classConstructed, null);
+    _classConstructed = classConstructed;
+  }
+
+  public IClass getType() {
+    return _classConstructed;
+  }
+
+  public ISignature getSignature() {
+    return new MethodSignature(new Vector());
+  }
+
+  public boolean equals(Object o) {
+    boolean result = false;
+
+    if (o instanceof DefaultConstructor) {
+      DefaultConstructor constructor = (DefaultConstructor)o;
+      result = getType().equals(constructor.getType());
+    }
+
+    return result;
+  }
+
+  public void setType() {}
+  public void addParameter() {}
+  public void addException() {}
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/DefaultScope.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/DefaultScope.java
new file mode 100644
index 0000000..b91dd2e
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/DefaultScope.java
@@ -0,0 +1,82 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+
+public class DefaultScope extends Scope {
+  public DefaultScope(String name, Scope parentScope, SymTabAST node) {
+    super(name, parentScope, node);
+  }
+
+  public void addDefinition(IPackage def) {
+    throw new UnsupportedOperationException(getClass().getName());
+  }
+
+  public IClass getClassDefinition( String name ) {
+    IClass result = (ClassDef)classes.get(name);
+
+    if ( result == null && getParentScope() != null ) {
+      result = getParentScope().getClassDefinition( name );
+    }
+
+    return result;
+  }
+
+  public IMethod getMethodDefinition(String name,
+                                     ISignature signature) {
+    IMethod result = null;
+    if (getParentScope() != null) {
+      result = getParentScope().getMethodDefinition(name, signature);
+    }
+
+    return result;
+  }
+
+  public IVariable getVariableDefinition( String name ) {
+    IVariable result = (VariableDef)elements.get(name);
+
+    if ( result == null && getParentScope() != null ) {
+      result = getParentScope().getVariableDefinition( name );
+    }
+
+    return result;
+  }
+
+  public LabelDef getLabelDefinition(String name) {
+    LabelDef result = (LabelDef)labels.get(name);
+
+    if (result == null && getParentScope() != null) {
+      result = getParentScope().getLabelDefinition(name);
+    }
+
+    return result;
+  }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Definition.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Definition.java
new file mode 100644
index 0000000..cdb4ab8
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Definition.java
@@ -0,0 +1,203 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.util.Iterator;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+
+
+
+/**
+ * <code>Definition</code> contains basic information for everything
+ * that is defined in a java source file.  A definition has a list
+ * of <code>Reference</code>s, an <code>Occurrence</code>, a name, and
+ * a parent <code>Scope</code>.
+ *
+ * @see Occurrence
+ * @see Scope
+ * @see Reference
+ */
+
+public abstract class Definition implements IDefinition, Comparable {
+  private String _name = null;
+  private Scope _parentScope = null;
+  private SymTabAST _node = null;
+  private SortedSet _references;
+
+  private Occurrence _occurrence = null;
+
+  public Definition(String name, Scope parentScope, SymTabAST node) {
+    _name = name;
+    _parentScope = parentScope;
+    _node = node;
+    _references = new TreeSet();
+
+    if ( node != null ) {
+      _occurrence = new Occurrence( _node.getFile(),
+                                    ASTUtil.getLine( _node ),
+                                    ASTUtil.getColumn( _node ));
+    }
+  }
+
+  public boolean isSourced() {
+    return true;
+  }
+
+  /**
+   * returns the name of the definition
+   *
+   * @return String
+   */
+
+  public String getName() {
+    return _name;
+  }
+
+  /**
+   * returns the node in the AST that represents this definition
+   *
+   * @return the node in the AST that represents this definition
+   */
+  public SymTabAST getTreeNode() {
+    return _node;
+  }
+
+  /**
+   * Adds a <code>Reference</code> to the collection of <code>Reference</code>s
+   *
+   * @param reference the <code>Reference</code> to add
+   */
+  public void addReference( Reference reference ) {
+    _references.add( reference );
+  }
+
+  /**
+   * Returns the <code>Reference</code>s to this definition
+   *
+   * @return the <code>Reference</code>s to this definition
+   */
+  public Iterator getReferences() {
+    return _references.iterator();
+  }
+
+  public int getNumReferences() {
+    return _references.size();
+  }
+
+  /**
+   * Returns the scope in which this definition is defined
+   *
+   * @return the scope in which this definition is defined
+   */
+  public Scope getParentScope() {
+    return _parentScope;
+  }
+
+  /**
+   * returns the fully qualifed name of this defintion.  The name of
+   * the parentScope and all of its parents are considered when constructing
+   * this name.
+   *
+   * @return the fully qualified name of this definition
+   */
+  public String getQualifiedName() {
+    String nameToUse = _name;
+    String result;
+
+    if (_name == null) {
+      nameToUse = "~NO NAME~";
+    }
+
+    if (getParentScope() != null &&
+         !(getParentScope() instanceof BaseScope)) {
+      result = getParentScope().getQualifiedName() + "." + nameToUse;
+    }
+    else {
+      result = nameToUse;
+    }
+    return result;
+  }
+
+  /**
+   * Returns the <code>Occurrence</code> for the location of this definition
+   *
+   * @return the <code>Occurrence</code> for the location of this definition
+   */
+  public Occurrence getOccurrence() {
+    return _occurrence;
+  }
+
+  /**
+   * Returns the <code>ClassDef</code> that this scope is contained in.
+   *
+   * @return the <code>ClassDef</code> this definition is contained in
+   */
+  public ClassDef getEnclosingClass() {
+    ClassDef result = null;
+
+    if ( getParentScope() != null ) {
+      result = getParentScope().getEnclosingClass();
+    }
+
+    return result;
+  }
+
+  public IPackage getEnclosingPackage() {
+    IPackage result = null;
+    if (getParentScope() != null) {
+      result = getParentScope().getEnclosingPackage();
+    }
+
+    return result;
+  }
+
+  /**
+   * returns a String representation of the definition. This string includes
+   * the class of the defintion and its qualified name
+   *
+   * @return String
+   */
+  public String toString() {
+    return getClass().getName() + "[" + getQualifiedName() + "]";
+  }
+
+  public int compareTo(Object o) {
+    int result = 0;
+
+    if (!(o instanceof Definition)) {
+      throw new ClassCastException(o.getClass().getName());
+    }
+	result = getQualifiedName().compareTo(((Definition)o).getQualifiedName());
+
+    return result;
+  }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/DefinitionTraverser.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/DefinitionTraverser.java
new file mode 100644
index 0000000..bae2414
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/DefinitionTraverser.java
@@ -0,0 +1,139 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+import java.util.Enumeration;
+import java.util.Iterator;
+
+public class DefinitionTraverser {
+
+  protected SymbolTable _symbolTable;
+
+  public DefinitionTraverser( SymbolTable symbolTable ) {
+    _symbolTable = symbolTable;
+  }
+
+  public void traverse() {
+    Enumeration packages = _symbolTable.getPackages().elements();
+    while ( packages.hasMoreElements() ) {
+      traverse( (PackageDef)(packages.nextElement()) );
+    }
+  }
+
+  private void traverse( Definition def ) {
+    if ( def instanceof PackageDef ) {
+      traverse( (PackageDef)def );
+    }
+    else if (def instanceof AnonymousInnerClass) {
+      traverse((AnonymousInnerClass)def);
+    }
+    else if ( def instanceof ClassDef ) {
+      traverse( (ClassDef)def );
+    }
+    else if (def instanceof DefaultConstructor) {
+      traverse((DefaultConstructor)def);
+    }
+    else if ( def instanceof MethodDef ) {
+      traverse( (MethodDef)def );
+    }
+    else if ( def instanceof BlockDef ) {
+      traverse( (BlockDef)def );
+    }
+    else if ( def instanceof VariableDef ) {
+      traverse( (VariableDef)def );
+    }
+    else if ( def instanceof LabelDef ) {
+      traverse( (LabelDef)def );
+    }
+  }
+
+  private void traverse(PackageDef pkg) {
+    handlePackage(pkg);
+    traversePackage(pkg);
+  }
+
+  private void traverse(AnonymousInnerClass innerClass) {
+    handleAnonymousInnerClass(innerClass);
+    traverseChildren(innerClass);
+  }
+
+  private void traverse( ClassDef classDef ) {
+    handleClass( classDef );
+    traverseChildren( classDef );
+  }
+
+  private void traverse(DefaultConstructor constructor) {
+    handleDefaultConstructor(constructor);
+  }
+
+  private void traverse( MethodDef method ) {
+    handleMethod( method );
+    traverseChildren( method );
+  }
+
+  private void traverse( BlockDef block ) {
+    handleBlock( block );
+    traverseChildren( block );
+  }
+
+  private void traverse( VariableDef variable ) {
+    handleVariable( variable );
+  }
+
+  private void traverse( LabelDef label ) {
+    handleLabel( label );
+  }
+
+  private void traversePackage(PackageDef pkg) {
+    Iterator definitions = pkg.getClasses();
+    while (definitions.hasNext()) {
+      ClassDef classDef = (ClassDef)definitions.next();
+      traverse(classDef);
+    }
+  }
+
+  private void traverseChildren(Scope scope) {
+    Enumeration definitions = scope.getDefinitions();
+    while ( definitions.hasMoreElements() ) {
+      Definition def = (Definition)(definitions.nextElement());
+      traverse(def);
+    }
+  }
+
+  protected void handlePackage( PackageDef pkg ) {}
+  protected void handleAnonymousInnerClass(AnonymousInnerClass innerClass) {}
+  protected void handleClass( ClassDef classDef ) {}
+  protected void handleDefaultConstructor(DefaultConstructor constructor) {}
+  protected void handleMethod( MethodDef method ) {}
+  protected void handleBlock( BlockDef block ) {}
+  protected void handleVariable( VariableDef variable ) {}
+  protected void handleLabel( LabelDef label ) {}
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/DotIterator.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/DotIterator.java
new file mode 100644
index 0000000..9a00ac6
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/DotIterator.java
@@ -0,0 +1,108 @@
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * An iterator for dot ('.') delimited tokens.
+ *
+ * @version 1.0
+ * @since 1.0
+ * @see Iterator
+ */
+public class DotIterator implements Iterator {
+    Iterator _nodesIter;
+    List _nodes;
+
+    public DotIterator(SymTabAST topNode)
+    {
+        _nodes = new ArrayList();
+        makeNodes(topNode);
+        _nodesIter = _nodes.iterator();
+    }
+
+    private void makeNodes(SymTabAST node)
+    {
+        if (node.getType() == TokenTypes.DOT) {
+            SymTabAST left = (SymTabAST) node.getFirstChild();
+            SymTabAST right = (SymTabAST) left.getNextSibling();
+
+            makeNodes(left);
+            makeNodes(right);
+        }
+        else {
+            _nodes.add(node);
+        }
+    }
+
+    /**
+     * Returns true if the iteration has more elements. (In other words,
+     * returns true if next would return an element rather than throwing an
+     * exception.)
+     *
+     * @return <tt>true</tt> if the iterator has more elements.
+     */
+    public boolean hasNext()
+    {
+        return _nodesIter.hasNext();
+    }
+
+    /**
+     * Returns the next portion of the dotted name.
+     *
+     * @return the next node in the dotted name.
+     */
+    public Object next()
+    {
+        return _nodesIter.next();
+    }
+
+    /**
+     * Returns the next portion of the dotted name.
+     *
+     * @return the next node in the dotted name.
+     */
+    public SymTabAST nextNode()
+    {
+        return (SymTabAST) _nodesIter.next();
+    }
+
+    /**
+     * Unsupported operation.
+     *
+     */
+    public void remove()
+    {
+        throw new UnsupportedOperationException();
+    }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalClass.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalClass.java
new file mode 100644
index 0000000..3717c79
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalClass.java
@@ -0,0 +1,373 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+//import com.puppycrawl.tools.checkstyle.checks.lint.parser.DotUtils;
+
+public class ExternalClass extends ExternalDefinition implements IClass {
+  private Class _javaClass;
+
+  private List _subclasses;
+  private List _implementors;
+
+  private Set _methods;
+
+  public ExternalClass(Class javaClass) {
+    _javaClass = javaClass;
+    _subclasses = new ArrayList();
+    _implementors = new ArrayList();
+  }
+
+  public Class getJavaClass() {
+    return _javaClass;
+  }
+
+  public String getName() {
+    return getLocalName();
+  }
+
+  private String getLocalName() {
+    String fullName = _javaClass.getName();
+    return fullName.substring(fullName.lastIndexOf(".") + 1);
+  }
+
+  public IClass getSuperclass() {
+    IClass result = null;
+    Class javaSuperclass = _javaClass.getSuperclass();
+
+    if (javaSuperclass != null) {
+      result = new ExternalClass(javaSuperclass);
+    }
+    else {
+      if (_javaClass.isInterface()) {
+        // according to Java, java.lang.Object is not the superclass of
+        // interfaces, which makes sense.  However, we need Object to be
+        // the superclass of everything to make type compatibility work.
+        result = new ExternalClass(Object.class);
+      }
+    }
+
+    return result;
+  }
+
+  public IClass[] getInterfaces() {
+    Class[] javaInterfaces = _javaClass.getInterfaces();
+
+    IClass[] result = new IClass[javaInterfaces.length];
+
+    // should we cache this?
+    for (int i = 0; i < javaInterfaces.length; i++) {
+      result[i] = new ExternalClass(javaInterfaces[i]);
+    }
+
+    return result;
+  }
+
+  public IClass getClassDefinition(String name) {
+    IClass result = null;
+
+    String qualifiedName = getQualifiedName() + "$" + name;
+
+    Class[] classes = getJavaClass().getClasses();
+    for (int i = 0; i < classes.length; i++) {
+      String candidateQualifiedName = classes[i].getName();
+
+      if (qualifiedName.equals(candidateQualifiedName)) {
+        result = new ExternalClass(classes[i]);
+        break;
+      }
+    }
+
+    return result;
+  }
+
+  // REDTAG -- this should be a template method!
+  public IVariable getVariableDefinition(String name) {
+    IVariable result = null;
+    Field javaField = null;
+
+    try {
+      javaField = _javaClass.getDeclaredField(name);
+    }
+    catch (NoSuchFieldException ignoreMe) {}
+
+    if (javaField == null) {
+      Class[] interfaces = _javaClass.getInterfaces();
+      for (int i = 0; i < interfaces.length && javaField == null; i++) {
+        try {
+          javaField = interfaces[i].getDeclaredField(name);
+        }
+        catch (NoSuchFieldException ignoreMe) {}
+      }
+    }
+
+    if (javaField != null) {
+      result = new ExternalVariable(javaField);
+    }
+    else {
+      if (getSuperclass() != null) {
+        result = getSuperclass().getVariableDefinition(name);
+      }
+    }
+
+    return result;
+  }
+
+  public IMethod getMethodDefinition(String name,
+                                     ISignature signature) {
+    IMethod result = null;
+
+    if (name.equals(getName())) {
+      result = getConstructorDefinition(signature);
+    }
+    else {
+      Method[] methods = _javaClass.getDeclaredMethods();
+
+      for (int i = 0; i < methods.length; i++) {
+        if (name.equals(methods[i].getName())) {
+          IMethod method = new ExternalMethod(methods[i]);
+          if (method.hasSameSignature(signature)) {
+            result = method;
+            break;
+          }
+        }
+      }
+
+      if (result == null) {
+        result = getMostCompatibleMethod(name, signature);
+      }
+
+      if (result == null) {
+        if (getSuperclass() != null) {
+          result = getSuperclass().getMethodDefinition(name, signature);
+        }
+      }
+
+      if (result == null) {
+        IClass[] interfaces = getInterfaces();
+        for (int i = 0; i < interfaces.length; i++) {
+          result = interfaces[i].getMethodDefinition(name, signature);
+
+          if (result != null) {
+            break;
+          }
+
+        }
+      }
+    }
+
+    return result;
+  }
+
+  public IMethod getMostCompatibleMethod(String name, ISignature signature) {
+    IMethod result = null;
+
+    SortedSet compatibleMethods
+      = new TreeSet(new MethodSpecificityComparator());
+
+    Iterator it = getMethods().iterator();
+    while (it.hasNext()) {
+      IMethod method = (IMethod)it.next();
+      if ( name.equals( method.getName() ) ) {
+        if ( method.hasCompatibleSignature( signature ) ) {
+          compatibleMethods.add(method);
+        }
+      }
+    }
+
+    if (!compatibleMethods.isEmpty()) {
+      result = (IMethod)compatibleMethods.first();
+    }
+
+    return result;
+  }
+
+  private Collection getMethods() {
+    if (_methods == null) {
+      _methods = new HashSet();
+
+      Method[] methods = _javaClass.getDeclaredMethods();
+      for (int i = 0; i < methods.length; i++) {
+        _methods.add(new ExternalMethod(methods[i]));
+      }
+
+    }
+
+    return _methods;
+  }
+
+  public IMethod getConstructorDefinition(ISignature signature) {
+    IMethod result = null;
+
+    if (_javaClass.isInterface()) {
+      result = getInterfaceConstructor(signature);
+    }
+    else {
+      result = getClassConstructor(signature);
+    }
+
+    return result;
+  }
+
+  private IMethod getInterfaceConstructor(ISignature signature) {
+    IMethod result = null;
+
+    if (signature.getParameters().length == 0) {
+      result = new InterfaceConstructor(_javaClass);
+    }
+
+    return result;
+  }
+
+  private IMethod getClassConstructor(ISignature signature) {
+    IMethod result = null;
+
+    Constructor[] constructors = _javaClass.getConstructors();
+
+    for (int i = 0; i < constructors.length; i++) {
+      IMethod constructor = new ExternalConstructor(constructors[i]);
+      if (constructor.hasSameSignature(signature)) {
+        result = constructor;
+        break;
+      }
+    }
+
+    if (result == null) {
+      for (int i = 0; i < constructors.length; i++) {
+        IMethod constructor = new ExternalConstructor(constructors[i]);
+        if (constructor.hasCompatibleSignature(signature)) {
+          result = constructor;
+          break;
+        }
+      }
+    }
+
+    return result;
+  }
+
+  public boolean isCompatibleWith(IClass type) {
+    boolean result = false;
+
+    if (isPrimitive() && type.isPrimitive()) {
+      result = PrimitiveClasses.typesAreCompatible((ExternalClass)type,
+                                                     this);
+    }
+    else {
+      // check myself
+      if (type.equals(this)) {
+        result = true;
+      }
+      // check my superclass
+      else if (getSuperclass() != null && getSuperclass().isCompatibleWith(type)) {
+        result = true;
+      }
+      // check my interfaces
+      else if (_javaClass.getInterfaces().length > 0) {
+        Class[] interfaces = _javaClass.getInterfaces();
+        for (int i = 0; i < interfaces.length; i++) {
+          if (new ExternalClass(interfaces[i]).isCompatibleWith(type)) {
+            result = true;
+            break;
+          }
+        }
+      }
+    }
+
+    return result;
+  }
+
+  public void addImplementor(ClassDef implementor) {
+    _implementors.add(implementor);
+  }
+
+  public List getImplementors() {
+    return _implementors;
+  }
+
+  public void addSubclass(ClassDef subclass) {
+    _subclasses.add(subclass);
+  }
+
+  public List getSubclasses() {
+    return _subclasses;
+  }
+
+  public String getQualifiedName() {
+    return _javaClass.getName();
+  }
+
+  public boolean isPrimitive() {
+    return getJavaClass().isPrimitive();
+  }
+
+  public IClass[] getInnerClasses() {
+    Class[] innerJavaClasses = getJavaClass().getDeclaredClasses();
+    IClass[] result = new IClass[innerJavaClasses.length];
+
+    for (int i = 0; i < result.length; i++) {
+      result[i] = new ExternalClass(innerJavaClasses[i]);
+    }
+
+    return result;
+  }
+
+  public String toString() {
+     return getClass() + "[" + getQualifiedName() + "]";
+   }
+
+  public boolean equals(Object o) {
+    boolean result = false;
+
+    if (o instanceof ExternalClass) {
+      ExternalClass compared = (ExternalClass)o;
+      result = (getJavaClass().equals(compared.getJavaClass()));
+    }
+
+    return result;
+  }
+
+  public int hashCode() {
+    return getJavaClass().hashCode();
+  }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalConstructor.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalConstructor.java
new file mode 100644
index 0000000..35ace2c
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalConstructor.java
@@ -0,0 +1,101 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.lang.reflect.Constructor;
+
+public class ExternalConstructor extends ExternalDefinition implements IMethod {
+
+  private Constructor _javaConstructor;
+  private ISignature _signature;
+
+  public ExternalConstructor(Constructor javaConstructor) {
+    _javaConstructor = javaConstructor;
+    _signature = new ExternalSignature(_javaConstructor.getParameterTypes());
+  }
+
+  public String getName() {
+    return _javaConstructor.getDeclaringClass().getName();
+  }
+
+  public IClass getType() {
+    return new ExternalClass(_javaConstructor.getDeclaringClass());
+  }
+
+  public ISignature getSignature() {
+    return _signature;
+  }
+
+  public boolean hasSameSignature(ISignature signature) {
+    return getSignature().isSame(signature);
+  }
+
+  public boolean hasCompatibleSignature(ISignature signature) {
+    return signature.isCompatibleWith(getSignature());
+  }
+
+  public String getQualifiedName() {
+    return getName() + getSignature();
+  }
+
+  public Constructor getJavaConstructor() {
+    return _javaConstructor;
+  }
+
+  public IClass[] getExceptions() {
+    Class[] javaExceptions = getJavaConstructor().getExceptionTypes();
+    IClass[] result = new IClass[javaExceptions.length];
+
+    for (int i = 0; i < result.length; i++) {
+      result[i] = new ExternalClass(javaExceptions[i]);
+    }
+
+    return result;
+  }
+
+  public String toString() {
+    return getQualifiedName();
+  }
+
+  public boolean equals(Object o) {
+    boolean result = false;
+
+    if (o instanceof ExternalConstructor) {
+      ExternalConstructor constructor = (ExternalConstructor)o;
+      result = getJavaConstructor().equals(constructor.getJavaConstructor());
+    }
+
+    return result;
+  }
+
+  public int hashCode() {
+    return getJavaConstructor().hashCode();
+  }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalDefinition.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalDefinition.java
new file mode 100644
index 0000000..9d5c9ef
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalDefinition.java
@@ -0,0 +1,50 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+import java.util.Iterator;
+import java.util.Vector;
+
+public abstract class ExternalDefinition implements IDefinition {
+
+  public boolean isSourced() {
+    return false;
+  }
+
+  public void addReference(Reference reference) {}
+  public Iterator getReferences() {
+    return new Vector().iterator();
+  }
+
+  public int getNumReferences() {
+    return 0;
+  }
+}
\ No newline at end of file
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalMethod.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalMethod.java
new file mode 100644
index 0000000..0cc448b
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalMethod.java
@@ -0,0 +1,128 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+
+import java.lang.reflect.Method;
+
+/**
+ * <code>MethodDef</code> contains all the pertinent information for
+ * a method, including return type, formal parameters, and exceptions
+ * thrown
+ *
+ * @see ClassDef
+ * @see MethodSignature
+ */
+public class ExternalMethod extends ExternalDefinition implements IMethod {
+  private Method _javaMethod;
+  private ISignature _signature;
+
+  public ExternalMethod(Method javaMethod) {
+    _javaMethod = javaMethod;
+    _signature = new ExternalSignature(_javaMethod.getParameterTypes());
+  }
+
+  public String getName() {
+    return _javaMethod.getName();
+  }
+
+  /**
+   * Returns the <code>ClassDef</code> for the return type of this method.
+   *
+   * @return the <code>ClassDef</code> for the return type of this method
+   */
+  public IClass getType() {
+    IClass result = null;
+    if (_javaMethod.getReturnType().isArray()) {
+      result = new ArrayDef(new ExternalClass(_javaMethod.getReturnType().getComponentType()));
+    }
+    else {
+      result = new ExternalClass(_javaMethod.getReturnType());
+    }
+
+    return result;
+  }
+
+  /**
+   * Returns the signature of this method.
+   *
+   * @return the signature of this method
+   */
+  public ISignature getSignature() {
+    return _signature;
+  }
+
+  public boolean hasSameSignature(ISignature signature) {
+    return _signature.isSame(signature);
+  }
+
+  public boolean hasCompatibleSignature(ISignature signature) {
+    return signature.isCompatibleWith(getSignature());
+  }
+
+  public String getQualifiedName() {
+    return getName() + getSignature();
+  }
+
+  public Method getJavaMethod() {
+    return _javaMethod;
+  }
+
+  public IClass[] getExceptions() {
+    Class[] javaExceptions = getJavaMethod().getExceptionTypes();
+    IClass[] result = new IClass[javaExceptions.length];
+
+    for (int i = 0; i < result.length; i++) {
+      result[i] = new ExternalClass(javaExceptions[i]);
+    }
+
+    return result;
+  }
+
+  public String toString() {
+    return getQualifiedName();
+  }
+
+  public boolean equals(Object o) {
+    boolean result = false;
+
+    if (o instanceof ExternalMethod) {
+      ExternalMethod compared = (ExternalMethod)o;
+      result = getJavaMethod().equals(compared.getJavaMethod());
+    }
+
+    return result;
+  }
+
+  public int hashCode() {
+    return getJavaMethod().hashCode();
+  }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalPackage.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalPackage.java
new file mode 100644
index 0000000..3e0d4e1
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalPackage.java
@@ -0,0 +1,95 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+
+/**
+ * <code>PackageDef</code> contains all pertinent information about a
+ * package.
+ */
+public class ExternalPackage extends ExternalDefinition implements IPackage {
+
+  String _name;
+  IPackage _parent;
+
+  Map _packages;
+
+  public ExternalPackage(String name, IPackage parent) {
+    _name = name;
+    _parent = parent;
+
+    _packages = new HashMap();
+  }
+
+  public IClass getClass(String name) {
+    IClass result = null;
+
+    try {
+      Class theClass
+        = ClassManager.getClassLoader().loadClass(getQualifiedName()
+                                                  + "."
+                                                  + name);
+      result = new ExternalClass(theClass);
+    }
+    catch (ClassNotFoundException e) {
+      // look elsewhere for the class
+    }
+
+    return result;
+  }
+
+  public void addDefinition(IPackage pkg) {
+    _packages.put(pkg.getName(), pkg);
+  }
+
+  public IPackage getEnclosingPackage() {
+    return _parent;
+  }
+
+  public String getName() {
+    return _name;
+  }
+
+  public String getQualifiedName() {
+    StringBuffer result = new StringBuffer();
+
+    if (_parent != null) {
+      result.append(_parent.getQualifiedName());
+      result.append(".");
+    }
+
+    result.append(getName());
+
+    return result.toString();
+  }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalSignature.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalSignature.java
new file mode 100644
index 0000000..ebe886a
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalSignature.java
@@ -0,0 +1,97 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+public class ExternalSignature implements ISignature {
+
+  private IClass[] _parameters;
+
+  public ExternalSignature(Class[] parameters) {
+    _parameters = new IClass[parameters.length];
+    for (int i = 0; i < parameters.length; i++) {
+      if (parameters[i].isArray()) {
+        _parameters[i] =
+          new ArrayDef(new ExternalClass(parameters[i].getComponentType()));
+      }
+      else {
+        _parameters[i] = new ExternalClass(parameters[i]);
+      }
+    }
+  }
+
+  /**
+   * Whether this method signature is compatible with the signature of the
+   * argument.  That is to say, each type for this signature are subclasses,
+   * subinterfaces, or implement the interface for each corresponding type
+   * in the argument signature.
+   *
+   * @param signature the signature of the method definition being compared
+   * @return whether the signatures are compatible
+   */
+  public boolean isCompatibleWith(ISignature signature) {
+    boolean result = true;
+
+    if (_parameters.length == signature.getParameters().length) {
+      for (int i = 0; i < _parameters.length; i++) {
+        if (!getParameters()[i].isCompatibleWith(signature.getParameters()[i])) {
+          result = false;
+          break;
+        }
+      }
+    }
+    else {
+      result = false;
+    }
+
+    return result;
+  }
+
+  public boolean isSame(ISignature signature) {
+    return java.util.Arrays.equals(_parameters, signature.getParameters());
+  }
+
+  public IClass[] getParameters() {
+    return _parameters;
+  }
+
+  public String toString() {
+    StringBuffer result = new StringBuffer();
+    result.append("(");
+    for (int i = 0; i < _parameters.length; i++) {
+      result.append(_parameters[i]);
+      if (i < _parameters.length - 1) {
+        result.append(", ");
+      }
+    }
+    result.append(")");
+
+    return result.toString();
+  }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalVariable.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalVariable.java
new file mode 100644
index 0000000..c63fd10
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ExternalVariable.java
@@ -0,0 +1,76 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.lang.reflect.Field;
+
+
+
+/**
+ * <code>VariableDef</code> is a <code>Definition</code> that contains
+ * information about the definition of a variable.
+ *
+ * @see Definition
+ * @see TypedDef
+ */
+public class ExternalVariable extends ExternalDefinition implements IVariable {
+  Field _javaField;
+
+  public ExternalVariable(Field javaField) {
+    _javaField = javaField;
+  }
+
+  public String getName() {
+    return _javaField.getName();
+  }
+
+  public String getQualifiedName() {
+    return new ExternalClass(_javaField.getDeclaringClass()).getQualifiedName() + "." + getName();
+  }
+
+  /**
+   * Returns the <code>Type</code> of the variable.
+   *
+   * @see TypedDef
+   *
+   * @return the <code>Type</code> of the variable
+   */
+  public IClass getType() {
+    IClass result = null;
+
+    if (_javaField.getType().isArray()) {
+      result = new ArrayDef(new ExternalClass(_javaField.getType().getComponentType()));
+    }
+    else {
+      result = new ExternalClass(_javaField.getType());
+    }
+
+    return result;
+  }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/IClass.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/IClass.java
new file mode 100644
index 0000000..7acee34
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/IClass.java
@@ -0,0 +1,142 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+import java.util.List;
+
+/**
+ * interface implemented by classes/interfaces definition, for source or
+ * non-sourced classes and interfaces
+ * The implementor of this class have all information about its inner classes,
+ * methods, variables, subclasses, etc.
+ * @see net.sourceforge.transmogrify.symtab.ClassDef
+ * @see net.sourceforge.transmogrify.symtab.ExternalClass
+ */
+public interface IClass extends IDefinition {
+
+  /**
+   * gets superclass definition of this class
+   * @return superclass of this class definition
+   */
+  public IClass getSuperclass();
+
+  /**
+   * gets interfaces definition implemented by this class definition
+   * @return interfaces implemented
+   */
+  public IClass[] getInterfaces();
+
+  /**
+   * gets subclasses definition of this class definition
+   * @return list of subclasses definition
+   */
+  public List getSubclasses();
+
+  /**
+   * gets class definition referenced by this class, including its inner classes,
+   * imported classes, packages, and its parent scope referenced class definitions
+   * @param name name of the class definition to be searched
+   * @return class definition that matches the input name
+   */
+  public IClass getClassDefinition(String name);
+
+  /**
+   * gets the method associated with the given name and signature
+   *
+   * @param name the name of the method
+   * @param signature the signature (formal parameter types) of the method
+   *
+   * @return <code>MethodDef</code>
+   *
+   * @see MethodSignature
+   */
+  public IMethod getMethodDefinition(String name,
+                                     ISignature signature);
+
+  /**
+   * gets the <code>VariableDef</code> associated with the given name
+   *
+   * @param name the name of the variable
+   *
+   * @return <code>VariableDef</code>
+   */
+  public IVariable getVariableDefinition(String name);
+
+  // end definitions interface
+
+  /**
+   * adds <code>ClassDef</code> to the collection of (direct?) subclasses of
+   * this class
+   *
+   * @param subclass the class to add
+   * @return <code>void</code>
+   */
+  public void addSubclass(ClassDef subclass);
+
+  /**
+   * adds <code>ClassDef</code> to the collection of implemented interfaces
+   * of this class
+   *
+   * @param implementor the interface to add
+   * @return <code>void</code>
+   */
+  public void addImplementor(ClassDef implementor);
+
+  /**
+   * gets the list of <code>ClassDefs</code> that implmement this interface
+   *
+   * @return Vector the list of implementors
+   */
+  public List getImplementors();
+
+  /**
+   * verifies if the input type is equal to this class or its superclass or
+   * its interfaces
+   * @param type class to be compared with
+   * @return <code>true</code> if the input type is equals
+   *         <code>false</code> otherwise
+   */
+  public boolean isCompatibleWith(IClass type);
+
+  /**
+   * verifies if this class is of primitive Java type
+   * @return <code>true</code> if the class is a primitive type
+   *         <code>false</code> otherwise
+   */
+  public boolean isPrimitive();
+
+  /**
+   * gets inner classes definition associated with this class
+   * @return array of inner classes
+   */
+  public IClass[] getInnerClasses();
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/IDefinition.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/IDefinition.java
new file mode 100644
index 0000000..e4d9f0a
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/IDefinition.java
@@ -0,0 +1,84 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+import java.util.Iterator;
+
+/**
+ * implemented by all definitions of the <code>SymTabAST</code> tree, including
+ * source/non-sourced node
+ * @see net.sourceforge.transmogrify.symtab.Definition
+ * @see net.sourceforge.transmogrify.symtab.ExternalDefinition
+ */
+public interface IDefinition {
+
+  /**
+   * verifies if this definition node is source/non-sourced(with no source-code)
+   * @return <code>true</code> if the node is parsed from a source code
+   *         <code>false</code> otherwise
+   */
+  public boolean isSourced();
+
+  /**
+   * gets the name that identified this particular definition/node
+   * @return name for this definition
+   */
+  public String getName();
+
+  /**
+   * gets the fully qualified name of the definition, ie. dotted name for classes,
+   * or method name with its signature for methods, etc
+   * @return qualified name for this node
+   */
+  public String getQualifiedName();
+
+  /**
+   * adds any reference that this definition have to its collection of
+   * <code>_references</code>
+   * @param reference reference to be added which has <code>SymTabAST</code> node
+   * @return <code>void</code>
+   * @see net.sourceforge.transmogrify.symtab.antlr.SymTabAST
+   */
+  public void addReference(Reference reference);
+
+  /**
+   * gets the collection of references refer to by this definition
+   * @return iterator of the references
+   */
+  public Iterator getReferences();
+
+  /**
+   * gets the number of references refer to by this definition
+   * @return number of references
+   */
+  public int getNumReferences();
+  
+}
\ No newline at end of file
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/IMethod.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/IMethod.java
new file mode 100644
index 0000000..7548b67
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/IMethod.java
@@ -0,0 +1,67 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+/**
+ * <code>MethodDef</code> contains all the pertinent information for
+ * a method, including return type, formal parameters, and exceptions
+ * thrown
+ *
+ * @see ClassDef
+ * @see MethodSignature
+ * @see net.sourceforge.transmogrify.symtab.ExternalMethod
+ * @see net.sourceforge.transmogrify.symtab.MethodDef
+ */
+public interface IMethod extends Typed {
+
+  /**
+   * Returns the signature of this method.
+   *
+   * @return the signature of this method
+   */
+  public ISignature getSignature();
+
+  /**
+   * verifies if the input signature is the same with signatures of this method
+   * @return <code>true</code> if the two set signatures are equal
+   *         <code>false</code> otherwise
+   */
+  public boolean hasSameSignature(ISignature signature);
+
+  /**
+   * verifies if the input signature type is compatible with this method signature
+   * @return <code>true</code> if the two set of signatures are compatible
+   *         <code>false</code> otherwise
+   */
+  public boolean hasCompatibleSignature(ISignature signature);
+
+  public IClass[] getExceptions();
+}
\ No newline at end of file
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/IPackage.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/IPackage.java
new file mode 100644
index 0000000..1b381ce
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/IPackage.java
@@ -0,0 +1,63 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+
+
+
+/**
+ * <code>PackageDef</code> contains all pertinent information about a
+ * package.
+ * @see net.sourceforge.transmogrify.symtab.ExternalPackage
+ * @see net.sourceforge.transmogrify.symtab.PackageDef
+ */
+public interface IPackage extends IDefinition {
+
+  /**
+   * return class definition associated with this package
+   * @param name of the class to be returned
+   * @return the class definition
+   */
+  public IClass getClass(String name);
+
+  /**
+   * gets the Package definition of itself
+   * @return Package definition
+   */
+  public IPackage getEnclosingPackage();
+
+  /**
+   * adds a package definition to its parent's list of package definitions
+   * @param def package definition
+   * @return <code>void</code>
+   */
+  public void addDefinition(IPackage def);
+}
\ No newline at end of file
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ISignature.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ISignature.java
new file mode 100644
index 0000000..7b2f0a6
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ISignature.java
@@ -0,0 +1,58 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+/**
+ * implemented by signatures of methods
+ * @see net.sourceforge.transmogrify.symtab.MethodSignature
+ * @see net.sourceforge.transmogrify.symtab.ExternalSignature
+ */
+public interface ISignature {
+
+  public IClass[] getParameters();
+
+  /**
+   * Whether this method signature is compatible with the signature of the
+   * argument.  That is to say, each type for this signature are subclasses,
+   * subinterfaces, or implement the interface for each corresponding type
+   * in the argument signature.
+   *
+   * @param signature the signature of the method definition being compared
+   * @return whether the signatures are compatible
+   */
+  public boolean isCompatibleWith(ISignature signature);
+
+  /**
+   * if both signature has the same set of parameters
+   * @param signature signature to be compared
+   * @return <code>true</code> if the two set of parameters are equal
+   *         <code>false</code> otherwise
+   */
+  public boolean isSame(ISignature signature);
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/IVariable.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/IVariable.java
new file mode 100644
index 0000000..190f2ab
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/IVariable.java
@@ -0,0 +1,39 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+/**
+ * contains information about type of a variable or its <code>Field</code>,
+ * in case of non-source variable
+ * @see net.sourceforge.transmogrify.symtab.VariableDef
+ * @see net.sourceforge.transmogrify.symtab.ExternalVariable
+ */
+public interface IVariable extends Typed {}
\ No newline at end of file
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/InterfaceConstructor.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/InterfaceConstructor.java
new file mode 100644
index 0000000..e533ec1
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/InterfaceConstructor.java
@@ -0,0 +1,90 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.lang.reflect.Constructor;
+import java.util.Vector;
+
+public class InterfaceConstructor extends ExternalDefinition implements IMethod {
+
+  protected Class _classConstructed;
+
+  public InterfaceConstructor(Class classConstructed) {
+    _classConstructed = classConstructed;
+  }
+
+  public String getName() {
+    return _classConstructed.getName();
+  }
+
+  public IClass getType() {
+    return new ExternalClass(_classConstructed);
+  }
+
+  public ISignature getSignature() {
+    return new MethodSignature(new Vector());
+  }
+
+  public boolean hasSameSignature(ISignature signature) {
+    return getSignature().isSame(signature);
+  }
+
+  public boolean hasCompatibleSignature(ISignature signature) {
+    return signature.isCompatibleWith(getSignature());
+  }
+
+  public Constructor getJavaConstructor() {
+    return null;
+  }
+
+  public IClass[] getExceptions() {
+    return new IClass[0];
+  }
+
+
+  public String getQualifiedName() {
+    return getName() + getSignature();
+  }
+
+  public boolean equals(Object o) {
+    boolean result = false;
+
+    if (o instanceof InterfaceConstructor) {
+      InterfaceConstructor constructor = (InterfaceConstructor)o;
+      result = getType().equals(constructor.getType());
+    }
+
+    return result;
+  }
+
+  public int hashCode() {
+    return getType().hashCode();
+  }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/LabelDef.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/LabelDef.java
new file mode 100644
index 0000000..ffea1a0
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/LabelDef.java
@@ -0,0 +1,48 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+
+
+/**
+ * <code>LabelDef</code> is a <code>Definition</code> that contains information
+ * about the definition of a Label.
+ *
+ * @see Definition
+ */
+
+public class LabelDef extends Definition {
+
+  public LabelDef( String name, Scope parentScope, SymTabAST node ) {
+    super( name, parentScope, node );
+  }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/LiteralResolver.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/LiteralResolver.java
new file mode 100644
index 0000000..8c74e82
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/LiteralResolver.java
@@ -0,0 +1,157 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Resolves primitive identifiers (int, double) to their corresponding
+ * <code>ClassDef</code>.  This class uses the Singleton pattern.
+ *
+ * @author <a href="mailto:smileyy at thoughtworks.com">andrew</a>
+ * @version 1.0
+ * @since 1.0
+ */
+
+public class LiteralResolver {
+
+    private static Map intMap;
+    private static Map nameMap;
+    private static Map classMap;
+
+    static {
+        nameMap = new HashMap();
+
+        nameMap.put("boolean", new ExternalClass(Boolean.TYPE));
+        nameMap.put("byte", new ExternalClass(Byte.TYPE));
+        nameMap.put("char", new ExternalClass(Character.TYPE));
+        nameMap.put("short", new ExternalClass(Short.TYPE));
+        nameMap.put("int", new ExternalClass(Integer.TYPE));
+        nameMap.put("float", new ExternalClass(Float.TYPE));
+        nameMap.put("long", new ExternalClass(Long.TYPE));
+        nameMap.put("double", new ExternalClass(Double.TYPE));
+
+        intMap = new HashMap();
+
+        intMap.put(
+            new Integer(TokenTypes.LITERAL_BOOLEAN),
+            new ExternalClass(Boolean.TYPE));
+        intMap.put(
+            new Integer(TokenTypes.LITERAL_BYTE),
+            new ExternalClass(Byte.TYPE));
+        intMap.put(
+            new Integer(TokenTypes.LITERAL_CHAR),
+            new ExternalClass(Character.TYPE));
+        intMap.put(
+            new Integer(TokenTypes.LITERAL_SHORT),
+            new ExternalClass(Short.TYPE));
+        intMap.put(
+            new Integer(TokenTypes.LITERAL_INT),
+            new ExternalClass(Integer.TYPE));
+        intMap.put(
+            new Integer(TokenTypes.LITERAL_FLOAT),
+            new ExternalClass(Float.TYPE));
+        intMap.put(
+            new Integer(TokenTypes.LITERAL_LONG),
+            new ExternalClass(Long.TYPE));
+        intMap.put(
+            new Integer(TokenTypes.LITERAL_DOUBLE),
+            new ExternalClass(Double.TYPE));
+        intMap.put(
+            new Integer(TokenTypes.STRING_LITERAL),
+            new ExternalClass("".getClass()));
+
+        classMap = new HashMap();
+        classMap.put(
+            new ExternalClass(Boolean.TYPE),
+            SymTabASTFactory.create(TokenTypes.LITERAL_BOOLEAN, "boolean"));
+        classMap.put(
+            new ExternalClass(Byte.TYPE),
+            SymTabASTFactory.create(TokenTypes.LITERAL_BYTE, "byte"));
+        classMap.put(
+            new ExternalClass(Character.TYPE),
+            SymTabASTFactory.create(TokenTypes.LITERAL_CHAR, "char"));
+        classMap.put(
+            new ExternalClass(Short.TYPE),
+            SymTabASTFactory.create(TokenTypes.LITERAL_SHORT, "short"));
+        classMap.put(
+            new ExternalClass(Integer.TYPE),
+            SymTabASTFactory.create(TokenTypes.LITERAL_INT, "int"));
+        classMap.put(
+            new ExternalClass(Float.TYPE),
+            SymTabASTFactory.create(TokenTypes.LITERAL_FLOAT, "float"));
+        classMap.put(
+            new ExternalClass(Long.TYPE),
+            SymTabASTFactory.create(TokenTypes.LITERAL_LONG, "long"));
+        classMap.put(
+            new ExternalClass(Double.TYPE),
+            SymTabASTFactory.create(TokenTypes.LITERAL_DOUBLE, "double"));
+
+    }
+
+    /**
+     * Returns a <code>LiteralResolver</code>
+     *
+     * @return a <code>LiteralResolver</code>
+     */
+
+    public static LiteralResolver getResolver() {
+        return new LiteralResolver();
+    }
+
+    /**
+     * Returns the <code>ClassDef</code> for a primitive type reference.
+     *
+     * <p>
+     * We could probably do without passing in the context, if we could figure
+     * out a way to access the base scope.
+     * </p>
+     *
+     * @param literalType the JavaTokenType for the literal type
+     * @param context the scope in which the search performed
+     * @return returns the <code>ClassDef</code>corresponding to the primitive
+     *         type
+     */
+
+    public static IClass getDefinition(int literalType) {
+        Integer key = new Integer(literalType);
+        return (IClass) intMap.get(key);
+    }
+
+    public static IClass getDefinition(String name) {
+        return (IClass) nameMap.get(name);
+    }
+
+    public static SymTabAST getASTNode(IClass primitive) {
+        return (SymTabAST) classMap.get(primitive);
+    }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/MethodDef.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/MethodDef.java
new file mode 100644
index 0000000..33bb1da
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/MethodDef.java
@@ -0,0 +1,157 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+import java.util.List;
+import java.util.Vector;
+
+
+/**
+ * <code>MethodDef</code> contains all the pertinent information for
+ * a method, including return type, formal parameters, and exceptions
+ * thrown
+ *
+ * @see ClassDef
+ * @see MethodSignature
+ */
+public class MethodDef extends DefaultScope implements IMethod {
+
+  private IClass returnType;
+  private List exceptions;
+
+  private List parameters;
+
+  public MethodDef(String name, Scope parentScope, SymTabAST node) {
+    super(name, parentScope, node);
+    parameters = new Vector();
+  }
+
+  /**
+   * Returns the <code>ClassDef</code> for the return type of this method.
+   *
+   * @return the <code>ClassDef</code> for the return type of this method
+   */
+  public IClass getType() {
+    return returnType;
+  }
+
+  /**
+   * Sets the return type of this method.
+   *
+   * @param type the <code>ClassDef</code> for the return type
+   */
+  public void setType(IClass type) {
+    returnType = type;
+  }
+
+  /**
+   * Adds a parameter to the collection of formal parameters
+   *
+   * @param parameter the <code>VariableDef</code> to add
+   */
+  public void addParameter(VariableDef parameter) {
+    parameters.add( parameter );
+    addDefinition(parameter);
+  }
+
+  /**
+   * Whether this method has the same signature as the given signature.
+   *
+   * @param signature the <code>MethodSignature</code> to compare
+   *
+   * @return whether the signatures are equal
+   */
+  public boolean hasSameSignature(ISignature signature) {
+    return getSignature().equals(signature);
+  }
+
+  /**
+   * Whether this method has a signature compatible with the given signature.
+   *
+   * @param signature the signature being compared
+   * @return whether the signatures are compatible
+   */
+  public boolean hasCompatibleSignature(ISignature signature) {
+    return signature.isCompatibleWith(getSignature());
+  }
+
+  /**
+   * Returns the signature of this method.
+   *
+   * @return the signature of this method
+   */
+  public ISignature getSignature() {
+    Vector argTypes = new Vector();
+
+    for (int i = 0; i < parameters.size(); i++) {
+      argTypes.add(getParameterAt(i).getType());
+    }
+
+    return new MethodSignature(argTypes);
+  }
+
+  /**
+   * Gets the <i>i</i>th parameter of this method
+   *
+   * @param i the index of the parameter
+   *
+   * @return the <code>VariableDef</code> of the <i>i</i>th parameter
+   */
+  private VariableDef getParameterAt( int i ) {
+    return (VariableDef)(parameters.get( i ));
+  }
+
+  /**
+   * Adds an exception that this method throws.
+   *
+   * @param exception the exception to add
+   */
+  public void addException(IClass exception) {
+    if (exceptions == null) {
+      exceptions = new Vector();
+    }
+
+    exceptions.add(exception);
+  }
+
+  /**
+   * Returns the exceptions this method throws
+   *
+   * @return the exceptions this method throws
+   */
+  public IClass[] getExceptions() {
+    return (IClass[])exceptions.toArray(new IClass[0]);
+  }
+
+  public String getQualifiedName() {
+    return super.getQualifiedName() + getSignature();
+  }
+}
\ No newline at end of file
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/MethodSignature.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/MethodSignature.java
new file mode 100644
index 0000000..53c4ea4
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/MethodSignature.java
@@ -0,0 +1,138 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.util.Vector;
+
+
+
+/**
+ * <code>MethodSignature</code> is used to resolve various methods
+ * in the same scope of the same name based on formal parameter lists
+ *
+ * @see MethodDef
+ */
+
+public class MethodSignature implements ISignature{
+
+  private IClass[] _argTypes = null;
+
+  public MethodSignature(IClass[] argTypes) {
+    _argTypes = argTypes;
+  }
+
+  public MethodSignature(Vector argTypes) {
+    _argTypes = new IClass[argTypes.size()];
+    argTypes.toArray(_argTypes);
+  }
+
+  /**
+   * returns an array of the types of the arguments in the signature
+   *
+   * @return ClassDef[]
+   */
+  public IClass[] getParameters() {
+    return _argTypes;
+  }
+
+  /**
+   * Whether this method signature is compatible with the signature of the
+   * argument.  That is to say, each type for this signature are subclasses,
+   * subinterfaces, or implement the interface for each corresponding type
+   * in the argument signature.
+   *
+   * @param signature the signature of the method definition being compared
+   * @return whether the signatures are compatible
+   */
+  public boolean isCompatibleWith(ISignature signature) {
+    boolean result = true;
+
+    IClass[] comparedArgTypes = signature.getParameters();
+    if (_argTypes.length != comparedArgTypes.length) {
+      result = false;
+    }
+    else {
+      for (int i = 0; i < _argTypes.length; i++) {
+        // TODO: Checkstyle modification. Why can _argTypes[i] be null?
+        // if (!_argTypes[i].isCompatibleWith(comparedArgTypes[i])) {
+        if ((_argTypes[i] != null)
+            && !_argTypes[i].isCompatibleWith(comparedArgTypes[i]))
+        {
+          result = false;
+          break;
+        }
+      }
+    }
+
+    return result;
+  }
+
+  public boolean isSame(ISignature signature) {
+    return equals(signature);
+  }
+
+  /**
+   * compares two objects for equality.  If the compared object is a
+   * <code>MethodSignature</code> and the argTypes match, they are the
+   * same
+   *
+   * @return boolean
+   */
+  public boolean equals(Object o) {
+    boolean result = false;
+
+    if (o instanceof MethodSignature) {
+      MethodSignature signature = (MethodSignature)o;
+      result = java.util.Arrays.equals(getParameters(), signature.getParameters());
+    }
+
+    return result;
+  }
+
+  /**
+   * returns a String representation of this object.  Includes information
+   * about the types of the arguments in the signature
+   *
+   * @return String
+   */
+  public String toString() {
+    StringBuffer result = new StringBuffer( "(" );
+
+    for ( int i = 0; i < _argTypes.length; i++ ) {
+      result.append( _argTypes[i] != null ? _argTypes[i].getName() : "[null]" );
+      if ( i < (_argTypes.length - 1) ) {
+        result.append( ", " );
+      }
+    }
+    result.append( ")" );
+
+    return result.toString();
+  }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/MethodSpecificityComparator.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/MethodSpecificityComparator.java
new file mode 100644
index 0000000..0d3278b
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/MethodSpecificityComparator.java
@@ -0,0 +1,59 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.util.Comparator;
+
+public class MethodSpecificityComparator implements Comparator {
+
+  public int compare(Object o1, Object o2) {
+    int result = 0;
+
+    IMethod method1 = (IMethod)o1;
+    IMethod method2 = (IMethod)o2;
+
+    if (method1.equals(method2)) {
+      result = 0;
+    }
+    else {
+      ISignature sig1 = method1.getSignature();
+      ISignature sig2 = method2.getSignature();
+
+      if (sig1.isCompatibleWith(sig2)) {
+        result = -1;
+      }
+      else {
+        result = 1;
+      }
+    }
+
+    return result;
+  }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/NullClass.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/NullClass.java
new file mode 100644
index 0000000..fedaf45
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/NullClass.java
@@ -0,0 +1,107 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+public class NullClass implements IClass {
+
+  public Iterator getReferences() {
+    return new ArrayList().iterator();
+  }
+
+  public int getNumReferences() {
+    return 0;
+  }
+
+  public void addReference(Reference ref) {}
+
+  public String getName() {
+    return "null";
+  }
+
+  public String getQualifiedName() {
+    return getName();
+  }
+
+  public boolean isSourced() {
+    return false;
+  }
+
+  public IClass getSuperclass() {
+    return null;
+  }
+
+  public IClass[] getInterfaces() {
+    return new IClass[0];
+  }
+
+  public IClass[] getInnerClasses() {
+    return new IClass[0];
+  }
+
+  public List getSubclasses() {
+    return new ArrayList();
+  }
+
+  public IClass getClassDefinition(String name) {
+    return null;
+  }
+
+  public IMethod getMethodDefinition(String name,
+                                     ISignature signature) {
+    return null;
+  }
+
+  public IVariable getVariableDefinition(String name) {
+    return null;
+  }
+
+  public void addSubclass(ClassDef subclass) {}
+  public void addImplementor(ClassDef implementor) {}
+
+  public List getImplementors() {
+    return new ArrayList();
+  }
+
+  public boolean isCompatibleWith(IClass type) {
+    return true;
+  }
+
+  public boolean isPrimitive() {
+    return false;
+  }
+
+}
+
+
+
+
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Occurrence.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Occurrence.java
new file mode 100644
index 0000000..c75d1dd
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Occurrence.java
@@ -0,0 +1,131 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.io.File;
+
+
+
+
+/**
+ * <code>Occurrence</code> contains file and line number information.
+ * It is used to denote the location of various <code>Definintion</code>s
+ * and <code>Reference</code>s
+ *
+ * @see Reference
+ * @see Definition
+ */
+
+public class Occurrence implements Comparable {
+  private File _file;
+  private int _line;
+  private int _column;
+
+  public Occurrence(File file, int line, int column) {
+    _file = file;
+    _line = line;
+    _column = column;
+  }
+
+  public Occurrence(SymTabAST node) {
+    _file = node.getFile();
+    _line = node.getLineNo();
+    _column = node.getColumnNo();
+  }
+
+  /**
+   * returns the File of this <code>Occurrence</code>
+   *
+   * @return File
+   */
+  public File getFile() {
+    return _file;
+  }
+
+  /**
+   * returns the line number of this <code>Occurrence</code>
+   *
+   * @return the line number of this <code>Occurrence</code>
+   */
+  public int getLine() {
+    return _line;
+  }
+
+  /**
+   * returns the column that this token starts at
+   *
+   * @return the column that this token starts at
+   */
+  public int getColumn() {
+    return _column;
+  }
+
+  public int compareTo(Object o) {
+    if (!(o instanceof Occurrence)) {
+      throw new ClassCastException(getClass().getName());
+    }
+
+    Occurrence other = (Occurrence)o;
+
+    int result = 0;
+
+    result = getFile().compareTo(other.getFile());
+
+    if (result == 0) {
+      result = getLine() - other.getLine();
+    }
+    if (result == 0) {
+      result = getColumn() - other.getColumn();
+    }
+
+    return result;
+  }
+
+  public boolean equals(Object o) {
+    boolean result = false;
+    
+    if (o instanceof Occurrence) {
+      Occurrence occ = (Occurrence)o;
+      result = (getFile().equals(occ.getFile())
+                && getLine() == occ.getLine()
+                && getColumn() == occ.getColumn());
+    }
+
+    return result;
+  }
+
+  public int hashCode() {
+    return getFile().hashCode();
+  }
+
+  public String toString() {
+    return "[" + getFile() + ":" + getLine() + "," + getColumn() + "]";
+  }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/PackageDef.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/PackageDef.java
new file mode 100644
index 0000000..020e9d6
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/PackageDef.java
@@ -0,0 +1,66 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+
+/**
+ * <code>PackageDef</code> contains all pertinent information about a
+ * package.
+ */
+public class PackageDef extends DefaultScope implements IPackage {
+
+  public PackageDef(String name, Scope parentScope, SymTabAST node) {
+    super(name, parentScope, node);
+  }
+
+  public LabelDef getLabelDefinition(String name) {
+    throw new UnsupportedOperationException(getClass().getName());
+  }
+
+  public IClass getClass(String name) {
+    return (IClass)classes.get(name);
+  }
+
+  public IPackage getEnclosingPackage() {
+    return this;
+  }
+
+  public IVariable getVariableDefinition(String name) {
+    return null;
+  }
+
+  public void addDefinition(IPackage def) {
+    if (elements.get(def.getName()) == null) {
+      elements.put(def.getName(), def);
+    }
+  }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/PrimitiveClasses.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/PrimitiveClasses.java
new file mode 100644
index 0000000..0a12f31
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/PrimitiveClasses.java
@@ -0,0 +1,107 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class PrimitiveClasses {
+
+  public static final ExternalClass BOOLEAN = new ExternalClass(Boolean.TYPE);
+  public static final ExternalClass CHAR = new ExternalClass(Character.TYPE);
+  public static final ExternalClass BYTE = new ExternalClass(Byte.TYPE);
+  public static final ExternalClass SHORT = new ExternalClass(Short.TYPE);
+  public static final ExternalClass INT = new ExternalClass(Integer.TYPE);
+  public static final ExternalClass LONG = new ExternalClass(Long.TYPE);
+  public static final ExternalClass FLOAT = new ExternalClass(Float.TYPE);
+  public static final ExternalClass DOUBLE = new ExternalClass(Double.TYPE);
+
+  private static List order;
+
+  static {
+    order = new ArrayList();
+    order.add(DOUBLE);
+    order.add(FLOAT);
+    order.add(LONG);
+    order.add(INT);
+    order.add(SHORT);
+    order.add(BYTE);
+  }
+
+  public static boolean typesAreCompatible(ExternalClass hole,
+                                           ExternalClass peg) {
+    boolean result = false;
+
+    if (hole.equals(BOOLEAN)) {
+      result = peg.equals(BOOLEAN);
+    }
+    else if (hole.equals(CHAR)) {
+      result = peg.equals(CHAR);
+    }
+    else if (peg.equals(CHAR)) {
+      result = (hole.equals(CHAR) ||
+                order.indexOf(hole) <= order.indexOf(INT));
+    }
+    else {
+      result = (order.indexOf(hole) <= order.indexOf(peg));
+    }
+
+    return result;
+  }
+
+  public static IClass unaryPromote(IClass type) {
+    IClass result = type;
+
+    if (type.equals(BYTE) || type.equals(SHORT) || type.equals(CHAR)) {
+      result = INT;
+    }
+
+    return result;
+  }
+
+  public static IClass binaryPromote(IClass a, IClass b) {
+    IClass result = null;
+
+    if (a.equals(DOUBLE) || b.equals(DOUBLE)) {
+      result = DOUBLE;
+    }
+    else if (a.equals(FLOAT) || b.equals(FLOAT)) {
+      result = FLOAT;
+    }
+    else if (a.equals(LONG) || b.equals(LONG)) {
+      result = LONG;
+    }
+    else {
+      result = INT;
+    }
+
+    return result;
+  }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/QueryEngine.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/QueryEngine.java
new file mode 100644
index 0000000..49ccb2b
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/QueryEngine.java
@@ -0,0 +1,185 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.io.File;
+import java.util.Iterator;
+
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+
+
+/**
+ * a wrapper around a <code>SymbolTable</code> that makes Definition and
+ * reference lookup easier
+ */
+public class QueryEngine {
+  private SymbolTable symbolTable;
+  private ScopeIndex index;
+
+  public QueryEngine(SymbolTable aSymbolTable) {
+    this.symbolTable = aSymbolTable;
+    setIndex();
+  }
+
+  /**
+   * sets the scope index that this <code>QueryEngine</code> uses
+   */
+  private void setIndex() {
+    index = symbolTable.getScopeIndex();
+  }
+
+  /**
+   * gets a symbol from the associated symbol table
+   *
+   * @param name the name of the symbol to get
+   * @param location the location of that symbol
+   *
+   * @return Object the (possibly null) result of the lookup
+   */
+  public Reference getSymbol(String name, Occurrence location) {
+    Scope enclosingScope = index.lookup(location);
+    Reference result = enclosingScope.getSymbol(name, location);
+
+    // REDTAG -- for cases like a label on the same line as the
+    //           block it names, e.g. 'bar: for(int i = 0; ...'
+    if (result == null) {
+      result = enclosingScope.getParentScope().getSymbol(name, location);
+    }
+
+    return result;
+  }
+
+  /**
+   * gets the definition of the given symbol
+   *
+   * @param name the name of the symbol to consider
+   * @param location the <code>Occurrence</code> that represents the
+   *                 location of the symbol
+   *
+   * @return Definition the (possibly null) result of the lookup
+   */
+  public IDefinition getDefinition(String name, Occurrence location) {
+    Reference symbol = getSymbol(name, location);
+
+    //if (symbol != null) {
+    //  System.out.println("  found " + name);
+    //}
+    //else {
+    //  System.out.println("  !could not find " + name);
+    //}
+
+    return resolveDefinition(symbol);
+  }
+
+  public IDefinition getDefinition(Occurrence location) {
+    IDefinition result = null;
+
+    SymTabAST node = getWordNodeAtOccurrence(location);
+    if ( node != null ) {
+      result = node.getDefinition();
+    }
+
+    return result;
+  }
+
+  private IDefinition resolveDefinition(Reference reference) {
+    IDefinition result = null;
+
+    if ( reference != null ) {
+      result = reference.getDefinition();
+    }
+
+    return result;
+  }
+
+  /**
+   * gets a collection of references determined by a symbol and location
+   *
+   * @param name the name of the symbol to consider
+   * @param location the <code>Occurrence</code> that represents its location
+   *
+   * @return
+   */
+  public Iterator getReferences(String name, Occurrence location) {
+    Reference symbol = getSymbol(name, location);
+    return resolveReferences(symbol);
+  }
+
+  public Iterator getReferences(Occurrence location) {
+    Iterator result = null;
+
+    SymTabAST node = getWordNodeAtOccurrence(location);
+    if ( node != null && node.getDefinition() != null ) {
+      result = node.getDefinition().getReferences();
+    }
+
+    return result;
+  }
+
+  private Iterator resolveReferences(Reference reference) {
+    return reference.getDefinition().getReferences();
+  }
+
+  public SymTabAST getFileNode(File file) {
+    return ASTUtil.getFileNode(symbolTable.getTree(), file);
+  }
+
+  private SymTabAST getWordNodeAtOccurrence(Occurrence location) {
+    SymTabAST result = null;
+
+    SymTabAST fileNode = getFileNode(location.getFile());
+    if ( fileNode != null ) {
+      SymTabAST node = fileNode.getEnclosingNode(location.getLine(),
+                                                 location.getColumn());
+
+      if ( (node != null) && (node.getType() == TokenTypes.IDENT) ) {
+        result = node;
+      }
+    }
+
+    return result;
+  }
+
+  public String getWordAtOccurrence(Occurrence location ) {
+    String result = null;
+
+    SymTabAST node = getWordNodeAtOccurrence(location);
+    if ( node != null ) {
+      result = node.getText();
+    }
+
+    return result;
+  }
+
+}
+
+
+
+
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Reference.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Reference.java
new file mode 100644
index 0000000..0157dc3
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Reference.java
@@ -0,0 +1,141 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.io.File;
+
+
+
+
+/**
+ * represents a place where a definition is used.  There are two flavors
+ * of references -- resolved (those that have a definition associated with
+ * them) and unresolved (those that don't have a definition associated).
+ * The goal of the resolution step is to get all of the references in the
+ * symbol table to fall into the resolved category.
+ */
+
+public class Reference implements Comparable {
+
+  private SymTabAST _node;
+  private Occurrence _occurrence;
+
+  public Reference( SymTabAST node ) {
+    _node = node;
+    _occurrence = new Occurrence( _node.getFile(), ASTUtil.getLine(_node), ASTUtil.getColumn(_node) );
+  }
+
+  /**
+   * gets the definition associated with this reference
+   *
+   * @return Definition the (possibly null) definition associated with
+   *                    this reference
+   */
+  public IDefinition getDefinition() {
+    return _node.getDefinition();
+  }
+
+  /**
+   * return the node that was passed in during ctor
+   */
+  public SymTabAST getTreeNode() {
+    return _node;
+  }
+
+  /**
+   * gets the occurrence of this reference
+   *
+   * @return Occurrence
+   */
+  public Occurrence getOccurrence() {
+    return _occurrence;
+  }
+
+  /**
+   * gets the line where the node resides
+   */
+  public int getLine() {
+    return getOccurrence().getLine();
+  }
+
+  /**
+   * gets the column for where the node resides
+   */
+  public int getColumn() {
+    return getOccurrence().getColumn();
+  }
+
+  /**
+   * gets the enclosing file for the node
+   */
+  public File getFile() {
+    return getOccurrence().getFile();
+  }
+
+  /**
+   * gets the name of the reference
+   *
+   * @return String the name of the definition associated with this reference
+   *                if this reference is resolved, else null
+   */
+  public String getName() {
+    return _node.getName();
+  }
+
+  /**
+   * returns a string representation of the reference.
+   *
+   * @return String
+   */
+  public String toString() {
+    return getOccurrence().toString();
+  }
+
+  /**
+   * returns whether the <code>Reference</code>s are equal
+   *
+   * @return whether the <code>Reference</code>s are equal
+   */
+   // REDTAG -- not finished
+  public boolean equals(Object obj){
+    boolean result = false;
+    if (obj instanceof Reference) {
+      result = getOccurrence().equals(((Reference)obj).getOccurrence());
+    }
+    return result;
+  }
+
+  public int compareTo(Object o) {
+    if (!(o instanceof Reference)) {
+      throw new ClassCastException(getClass().getName());
+    }
+
+    return getOccurrence().compareTo(((Reference)o).getOccurrence());
+  }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ReferenceCounter.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ReferenceCounter.java
new file mode 100644
index 0000000..c245c1b
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ReferenceCounter.java
@@ -0,0 +1,88 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ListIterator;
+
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * This class is for counting the reference
+ */
+public class ReferenceCounter extends ReferenceTool {
+  private List _references = new ArrayList();
+  private List _resolvedReferences = new ArrayList();
+  private List _unresolvedReferences = new ArrayList();
+
+  public ReferenceCounter(SymbolTable table) {
+    super(table.getTree());
+    countReferences();
+  }
+
+  /**
+   * Return the number of references
+   */
+  public int numberOfReferences() {
+    return _references.size();
+  }
+
+  /**
+   * Return the number of resolved references
+   */
+  public int numberOfResolvedReferences() {
+    return _resolvedReferences.size();
+  }
+
+  public int numberOfUnresolvedReferences() {
+    return _unresolvedReferences.size();
+  }
+
+  public ListIterator getUnresolvedReferences() {
+    return _unresolvedReferences.listIterator();
+  }
+
+  private void countReferences() {
+    handleNode( _tree );
+  }
+
+  protected void handleNode( SymTabAST node ) {
+    if (node.getType() == TokenTypes.IDENT && node.isMeaningful()) {
+      _references.add( node );
+      if (node.getDefinition() != null && !(node.getDefinition() instanceof UnknownClass)) {
+            _resolvedReferences.add( node );
+      }
+      else {
+            _unresolvedReferences.add( node );
+      }
+    }
+    walkChildren( node );
+  }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ReferenceThreshold.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ReferenceThreshold.java
new file mode 100644
index 0000000..9a966f9
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ReferenceThreshold.java
@@ -0,0 +1,78 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+import java.util.Set;
+import java.util.TreeSet;
+
+
+
+public class ReferenceThreshold extends ReferenceTool {
+  private Set _underreferencedDefinitions;
+  private int _threshold;
+
+  public ReferenceThreshold(SymbolTable table, int threshold) {
+    super(table.getTree());
+    _threshold = threshold;
+    _underreferencedDefinitions = new TreeSet();
+    go();
+  }
+
+  private void go() {
+    collectUnderreferencedDefinitions();
+  }
+
+  private void collectUnderreferencedDefinitions() {
+    handleNode(_tree);
+  }
+
+  protected void handleNode(SymTabAST node) {
+    if (node.isMeaningful()) {
+      IDefinition def = node.getDefinition();
+      if (def != null &&
+          def.getNumReferences() <= _threshold &&
+          def instanceof Definition) {
+        // this is inheritently hackish
+        // basically we want to ignore
+        // all test cases and main() methods
+        if (def.getQualifiedName().indexOf("test") < 0 &&
+            def.getQualifiedName().indexOf("main") < 0) {
+          _underreferencedDefinitions.add(def);
+        }
+      }
+    }
+
+    walkChildren(node);
+  }
+
+  public Set getUnderreferencedDefinitions() {
+    return _underreferencedDefinitions;
+  }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ReferenceTool.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ReferenceTool.java
new file mode 100644
index 0000000..c735e2e
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ReferenceTool.java
@@ -0,0 +1,55 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+public abstract class ReferenceTool {
+  protected SymTabAST _tree = null;
+
+  public ReferenceTool(SymTabAST tree) {
+    _tree = tree;
+  }
+
+  protected void walkChildren( SymTabAST node ) {
+    if ( node.getFirstChild() != null ) {
+      walkSelfAndSiblings( (SymTabAST)node.getFirstChild() );
+    }
+  }
+
+  private void walkSelfAndSiblings( SymTabAST node ) {
+    handleNode( node );
+    SymTabAST sibling = (SymTabAST)node.getNextSibling();
+    while ( sibling != null ) {
+      handleNode( sibling );
+      sibling = (SymTabAST)sibling.getNextSibling();
+    }
+  }
+
+  protected abstract void handleNode(SymTabAST node);
+}
\ No newline at end of file
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Resolver.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Resolver.java
new file mode 100644
index 0000000..7b0029b
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Resolver.java
@@ -0,0 +1,1893 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+import java.util.Vector;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogConfigurationException;
+import org.apache.commons.logging.LogFactory;
+
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * The resolver is responsible for traversing all the various
+ * definitions in a symbol table and resolving references in them.
+ *
+ * @see SymbolTable
+ */
+
+public class Resolver extends DefinitionTraverser {
+
+    /** true if the log factory has been initialized */
+    private boolean mInitialized = false;
+
+    /** Factory for creating org.apache.commons.logging.Log instances */
+    private LogFactory mLogFactory;
+
+    /**
+     * constructor with <code>SymbolTable</code> to be resolved
+     */
+    public Resolver(SymbolTable symbolTable) {
+        super(symbolTable);
+
+        try {
+            mLogFactory = LogFactory.getFactory();
+        }
+        catch (LogConfigurationException e) {
+            System.out.println("log configuration exception" + e);
+        }
+        mInitialized = true;
+
+    }
+
+    /**
+     * resolves the symbol table
+     * @return <code>void</code>
+     * @see #traverse()
+     */
+    public void resolve() {
+        traverse();
+    }
+
+    protected void handleSList(SymTabAST node, Scope scope) {
+        SymTabASTIterator iterator = node.getChildren();
+        while (iterator.hasNext()) {
+            SymTabAST current = iterator.nextChild();
+            resolveExpression(current, scope, null, true);
+        }
+    }
+
+    protected void handleAnonymousInnerClass(AnonymousInnerClass innerClass) {
+        SymTabAST objblock = innerClass.getTreeNode();
+        SymTabAST expression = (SymTabAST) objblock.getFirstChild();
+        while (expression != null) {
+            resolveExpression(expression, innerClass, null, true);
+            expression = (SymTabAST) expression.getNextSibling();
+        }
+    }
+
+    /**
+     * processes a <code>ClassDef</code> and resolves references in it
+     *
+     * @param classDef the <code>ClassDef</code> to process
+     */
+    protected void handleClass(ClassDef classDef) {
+        SymTabAST node = classDef.getTreeNode();
+
+        if (node != null) {
+            SymTabAST nameNode = node.findFirstToken(TokenTypes.IDENT);
+            nameNode.setDefinition(classDef, classDef, true);
+
+            SymTabAST extendsClause =
+                node.findFirstToken(TokenTypes.EXTENDS_CLAUSE);
+
+            if(extendsClause != null) {
+                SymTabAST extendedClassNode =
+                    (SymTabAST) extendsClause.getFirstChild();
+
+                while (extendedClassNode != null) {
+                    IClass superClass =
+                        resolveClass(extendedClassNode, classDef, null, true);
+                    extendedClassNode.setDefinition(superClass, classDef, true);
+                    extendedClassNode =
+                        (SymTabAST) extendedClassNode.getNextSibling();
+                }
+            }
+
+            SymTabAST implementsNode =
+                node.findFirstToken(TokenTypes.IMPLEMENTS_CLAUSE);
+
+            if (implementsNode != null) {
+                SymTabAST interfaceNode =
+                    (SymTabAST) (implementsNode.getFirstChild());
+                while (interfaceNode != null) {
+                    resolveClass(interfaceNode, classDef, null, true);
+                    interfaceNode =
+                        (SymTabAST) (interfaceNode.getNextSibling());
+                }
+            }
+        }
+    }
+
+    /**
+     * processes a <code>MethodDef</code> and resolves references in it
+     *
+     * @param method the <code>MethodDef</code> to process
+     */
+    protected void handleMethod(MethodDef method) {
+        SymTabAST node = method.getTreeNode();
+
+        SymTabAST nameNode = node.findFirstToken(TokenTypes.IDENT);
+        nameNode.setDefinition(method, method, true);
+
+        // references to classes in return type
+        SymTabAST returnTypeNode = node.findFirstToken(TokenTypes.TYPE);
+
+        if (returnTypeNode != null) {
+            // this is not a constructor
+            resolveExpression(returnTypeNode, method, null, true);
+        }
+
+        SymTabAST throwsNode =
+            node.findFirstToken(TokenTypes.LITERAL_THROWS);
+        if (throwsNode != null) {
+            SymTabAST exception = (SymTabAST) throwsNode.getFirstChild();
+            while (exception != null) {
+                // handle Checkstyle grammar
+                if (exception.getType() != TokenTypes.COMMA) {
+                    resolveClass(exception, method, null, true);
+                }
+                exception = (SymTabAST) exception.getNextSibling();
+            }
+        }
+
+        // references to classes in parameters
+
+        // the body -- this would be better its own function
+        SymTabAST slist = node.findFirstToken(TokenTypes.SLIST);
+
+        if (slist != null) {
+            handleSList(slist, method);
+        }
+    }
+
+    /**
+     * processes a <code>BlockDef</code> and resolves references in it
+     *
+     * @param block the <code>BlockDef</code> to process
+     */
+    protected void handleBlock(BlockDef block) {
+        SymTabAST node = block.getTreeNode();
+
+        switch (node.getType()) {
+
+            case TokenTypes.LITERAL_FOR :
+                handleFor(block);
+                break;
+
+            case TokenTypes.LITERAL_IF :
+                handleIf(block);
+                break;
+
+            case TokenTypes.LITERAL_WHILE :
+                handleWhileAndSynchronized(block);
+                break;
+
+            case TokenTypes.LITERAL_DO :
+                handleDoWhile(block);
+                break;
+
+            case TokenTypes.LITERAL_TRY :
+            case TokenTypes.LITERAL_FINALLY :
+                SymTabAST slist = node.findFirstToken(TokenTypes.SLIST);
+
+                handleSList(slist, block);
+                break;
+
+            case TokenTypes.LITERAL_CATCH :
+                handleCatch(block);
+                break;
+
+            case TokenTypes.LITERAL_SWITCH :
+                handleSwitch(block);
+                break;
+
+            case TokenTypes.SLIST :
+                handleSList(node, block);
+                break;
+
+            case TokenTypes.EXPR :
+                resolveExpression(node, block, null, true);
+                break;
+
+            case TokenTypes.INSTANCE_INIT :
+            case TokenTypes.STATIC_INIT :
+                handleSList((SymTabAST) node.getFirstChild(), block);
+                break;
+
+            case TokenTypes.LITERAL_SYNCHRONIZED :
+                handleWhileAndSynchronized(block);
+                break;
+
+            case TokenTypes.LITERAL_ASSERT :
+                handleAssert(block);
+                break;
+
+            default :
+                if (mInitialized) {
+                    final Log log = mLogFactory.getInstance(this.getClass());
+                    log.error(
+                        "Unhandled block "
+                            + block
+                            + " of type "
+                            + node.getType());
+                }
+        }
+    }
+
+    /**
+     * @param block
+     */
+    private void handleAssert(BlockDef block) {
+        SymTabAST node = block.getTreeNode();
+
+        SymTabAST conditional =
+            (node.findFirstToken(TokenTypes.EXPR));
+        resolveExpression(conditional, block, null, true);
+
+        SymTabAST message = (SymTabAST) conditional.getNextSibling();
+        while ((message != null) && (message.getType() != TokenTypes.EXPR)) {
+            message = (SymTabAST) message.getNextSibling();
+        }
+        if (message != null) {
+            resolveExpression(message, block, null, true);
+        }
+    }
+
+    /**
+     * processes a switch statement and resolves references in it
+     *
+     * @param block the <code>BlockDef</code> to process
+     */
+    private void handleSwitch(BlockDef block) {
+        SymTabAST node = block.getTreeNode();
+
+        SymTabAST expr = node.findFirstToken(TokenTypes.EXPR);
+        resolveExpression(expr, block, null, true);
+
+        SymTabAST caseGroup = (SymTabAST) (expr.getNextSibling());
+        while (caseGroup != null
+            && (caseGroup.getType() != TokenTypes.CASE_GROUP)) {
+            caseGroup = (SymTabAST) caseGroup.getNextSibling();
+        }
+        if (caseGroup != null) {
+            while (caseGroup.getType() == TokenTypes.CASE_GROUP) {
+                SymTabAST caseNode =
+                    caseGroup.findFirstToken(TokenTypes.LITERAL_CASE);
+                while (caseNode != null
+                    && caseNode.getType() == TokenTypes.LITERAL_CASE) {
+                    resolveExpression(
+                        (SymTabAST) caseNode.getFirstChild(),
+                        block,
+                        null,
+                        true);
+                    caseNode = (SymTabAST) caseNode.getNextSibling();
+                }
+
+                SymTabAST caseSlist =
+                    caseGroup.findFirstToken(TokenTypes.SLIST);
+                handleSList(caseSlist, block);
+
+                caseGroup = (SymTabAST) (caseGroup.getNextSibling());
+            }
+        }
+    }
+
+    /**
+     * processes a catch block and resolves references in it
+     *
+     * @param block the <code>BlockDef</code> to process
+     */
+    private void handleCatch(BlockDef block) {
+        SymTabAST node = block.getTreeNode();
+
+        SymTabAST slist = node.findFirstToken(TokenTypes.SLIST);
+        handleSList(slist, block);
+    }
+
+    /**
+     * processes a for loop and resolves references in it
+     *
+     * @param block the <code>BlockDef</code> to process
+     */
+    private void handleFor(BlockDef block) {
+        SymTabAST node = block.getTreeNode();
+
+        SymTabAST body;
+        SymTabAST forEach = node.findFirstToken(TokenTypes.FOR_EACH_CLAUSE);
+        if (forEach == null) {
+            SymTabAST init = node.findFirstToken(TokenTypes.FOR_INIT);
+            // only need to handle the elist case.  if the init node is a variable
+            // definition, the variable def will be handled later on in the resolution
+            if (init.getFirstChild() != null) {
+                if (init.getFirstChild().getType() == TokenTypes.ELIST) {
+                    resolveExpression(
+                        (SymTabAST) (init.getFirstChild()),
+                        block,
+                        null,
+                        true);
+                }
+            }
+
+            SymTabAST cond = node.findFirstToken(TokenTypes.FOR_CONDITION);
+            if (cond.getFirstChild() != null) {
+                resolveExpression(
+                    (SymTabAST) (cond.getFirstChild()),
+                    block,
+                    null,
+                    true);
+            }
+
+            SymTabAST iterator = node.findFirstToken(TokenTypes.FOR_ITERATOR);
+            if (iterator.getFirstChild() != null) {
+                resolveExpression(
+                    (SymTabAST) (iterator.getFirstChild()),
+                    block,
+                    null,
+                    true);
+            }
+            body = (SymTabAST) (iterator.getNextSibling());
+        }
+        else {
+            resolveExpression(
+                (forEach.findFirstToken(TokenTypes.EXPR)),
+                block,
+                null,
+                true);
+            body = (SymTabAST) (forEach.getNextSibling());
+        }
+        //could be an SLIST, EXPR or an EMPTY_STAT
+        if (body.getType() == TokenTypes.RPAREN) {
+            body = (SymTabAST) body.getNextSibling();
+        }
+        if (body.getType() == TokenTypes.SLIST) {
+            handleSList(body, block);
+        }
+        else {
+            resolveExpression(body, block, null, true);
+        }
+
+    }
+
+    /**
+     * processes an if statement and resolves references in it
+     *
+     * @param block the <code>BlockDef</code> to process
+     */
+    private void handleIf(BlockDef block) {
+        SymTabAST node = block.getTreeNode();
+
+        SymTabAST conditional =
+            (node.findFirstToken(TokenTypes.EXPR));
+        resolveExpression(conditional, block, null, true);
+
+        SymTabAST body = (SymTabAST) conditional.getNextSibling();
+        // Handle Checkstyle grammar
+        if (body.getType() == TokenTypes.RPAREN) {
+            body = (SymTabAST) body.getNextSibling();
+        }
+        if (body != null) {
+        	if (body.getType() == TokenTypes.SLIST) {
+            	handleSList(body, block);
+        	}
+        	else {
+            	resolveExpression(body, block, null, true);
+        	}
+
+	        SymTabAST elseBody = (SymTabAST) body.getNextSibling();
+	        //handle Checkstyle grammar
+	        while ((elseBody != null)
+	            && (elseBody.getType() != TokenTypes.LITERAL_ELSE)) {
+	            elseBody = (SymTabAST) elseBody.getNextSibling();
+	        }
+	        /*
+	         if (elseBody != null && elseBody.getType() == TokenTypes.SLIST) {
+	             handleSList(elseBody, block);
+	         }else{
+	             resolveExpression(elseBody, block, null, true);
+	         }
+	         */
+	        if (elseBody != null) {
+	            elseBody = (SymTabAST) elseBody.getFirstChild();
+	        }
+	        if (elseBody != null) {
+	            resolveExpression(elseBody, block.getParentScope(), null, true);
+	        }
+	    }
+    }
+
+    /**
+     * processes a while loop and resolves references in it
+     *
+     * @param block the <code>BlockDef</code> to process
+     */
+    private void handleWhileAndSynchronized(BlockDef block) {
+        SymTabAST node = block.getTreeNode();
+
+        SymTabAST condition =
+            (node.findFirstToken(TokenTypes.EXPR));
+        SymTabAST slist = (SymTabAST) (condition.getNextSibling());
+        // handle Checkstyle grammar
+        if (slist.getType() == TokenTypes.RPAREN) {
+            slist = (SymTabAST) slist.getNextSibling();
+        }
+
+        resolveExpression(condition, block, null, true);
+        handleSList(slist, block);
+    }
+
+    private void handleDoWhile(BlockDef block) {
+        SymTabAST node = block.getTreeNode();
+
+        SymTabAST slist = (SymTabAST) node.getFirstChild();
+        SymTabAST condition =
+            node.findFirstToken(TokenTypes.EXPR);
+
+        handleSList(slist, block);
+        resolveExpression(condition, block, null, true);
+    }
+
+    /**
+     * processes a variable definition and resolves references in it
+     *
+     * @param variable the <code>VariableDef</code> to process
+     */
+    protected void handleVariable(VariableDef variable) {
+        SymTabAST node = variable.getTreeNode();
+        Scope location = variable.getParentScope();
+
+        SymTabAST nameNode = node.findFirstToken(TokenTypes.IDENT);
+        nameNode.setDefinition(variable, location, true);
+
+        SymTabAST typeNode = node.findFirstToken(TokenTypes.TYPE);
+        resolveType(typeNode, location, null, true);
+
+        SymTabAST assignmentNode = node.findFirstToken(TokenTypes.ASSIGN);
+        if (assignmentNode != null) {
+            resolveExpression(
+                (SymTabAST) (assignmentNode.getFirstChild()),
+                variable.getParentScope(),
+                null,
+                true);
+        }
+    }
+
+    /**
+     * processes a label and resolves references in it
+     *
+     * @param label the <code>LabelDef</code> to process
+     */
+    protected void handleLabel(LabelDef label) {
+        SymTabAST node = label.getTreeNode();
+        ((SymTabAST) node.getFirstChild()).setDefinition(
+            label,
+            label.getParentScope(),
+            true);
+    }
+
+    /**
+     * Resolves Java expressions, returning the type to which the expression
+     * evalutes.  If this is the reference creation phase, any references found during resolution are created and
+     * resolved.
+     *
+     * @param expression the <code>SymTabAST</code> representing the expression
+     * @param location the <code>Scope</code> in which the expression occours.
+     * @param context the <code>Scope</code> in which the search for the
+     *                definition will start
+     * @param referencePhase whether or not this is the reference phase of
+     *                       table construction
+     *
+     * @return the <code>ClassDef</code> representing the type to which the
+     *         expression evalutes.
+     */
+    public IClass resolveExpression(
+        SymTabAST expression,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        IClass result = null;
+
+        try {
+
+            switch (expression.getType()) {
+
+                case TokenTypes.TYPECAST :
+                    result =
+                        resolveTypecast(
+                            expression,
+                            location,
+                            context,
+                            referencePhase);
+                    break;
+                case TokenTypes.EXPR :
+                case TokenTypes.LITERAL_RETURN :
+                    if (expression.getFirstChild() != null) {
+                        result =
+                            resolveExpression(
+                                (SymTabAST) expression.getFirstChild(),
+                                location,
+                                context,
+                                referencePhase);
+                    }
+                    else {
+                        // YOU WRITE BAD CODE!
+                    }
+                    break;
+
+                case TokenTypes.ELIST :
+
+                    SymTabAST child = (SymTabAST) (expression.getFirstChild());
+                    while (child != null) {
+                        if (child.getType() != TokenTypes.COMMA) {
+                            resolveExpression(
+                                child,
+                                location,
+                                context,
+                                referencePhase);
+                        }
+                        child = (SymTabAST) (child.getNextSibling());
+                    }
+                    break;
+
+                case TokenTypes.IDENT :
+                    result =
+                        resolveIdent(
+                            expression,
+                            location,
+                            context,
+                            referencePhase);
+                    break;
+
+                case TokenTypes.TYPE :
+                    result =
+                        resolveType(
+                            expression,
+                            location,
+                            context,
+                            referencePhase);
+                    break;
+
+                case TokenTypes.METHOD_CALL :
+                //case TokenTypes.SUPER_CTOR_CALL :
+                    result =
+                        resolveMethod(
+                            expression,
+                            location,
+                            context,
+                            referencePhase);
+                    break;
+
+                case TokenTypes.LITERAL_THIS :
+                    result = resolveLiteralThis(expression, location, context);
+                    break;
+
+                case TokenTypes.LITERAL_SUPER :
+                    result = resolveLiteralSuper(expression, location, context);
+                    break;
+
+                case TokenTypes.DOT :
+                    result =
+                        resolveDottedName(
+                            expression,
+                            location,
+                            context,
+                            referencePhase);
+                    break;
+
+                case TokenTypes.LITERAL_NEW :
+                case TokenTypes.CTOR_CALL :
+                case TokenTypes.SUPER_CTOR_CALL :
+                    result =
+                        resolveNew(
+                            expression,
+                            location,
+                            context,
+                            referencePhase);
+                    break;
+
+                case TokenTypes.LITERAL_BOOLEAN :
+                case TokenTypes.LITERAL_DOUBLE :
+                case TokenTypes.LITERAL_FLOAT :
+                case TokenTypes.LITERAL_LONG :
+                case TokenTypes.LITERAL_INT :
+                case TokenTypes.LITERAL_SHORT :
+                case TokenTypes.LITERAL_BYTE :
+                case TokenTypes.LITERAL_CHAR :
+                    result =
+                        resolvePrimitiveType(
+                            expression,
+                            location,
+                            context,
+                            referencePhase);
+                    break;
+
+                case TokenTypes.NUM_INT :
+                case TokenTypes.NUM_LONG :
+                    result = resolveNumInt(expression, location, context);
+                    break;
+
+                case TokenTypes.NUM_FLOAT :
+                case TokenTypes.NUM_DOUBLE :
+                    result = resolveNumFloat(expression, location, context);
+                    break;
+
+                case TokenTypes.STRING_LITERAL :
+                    result =
+                        resolveStringLiteral(expression, location, context);
+                    break;
+
+                case TokenTypes.CHAR_LITERAL :
+                    result = resolveCharLiteral(expression, location, context);
+                    break;
+
+                case TokenTypes.ASSIGN :
+                case TokenTypes.PLUS_ASSIGN :
+                case TokenTypes.MINUS_ASSIGN :
+                case TokenTypes.STAR_ASSIGN :
+                case TokenTypes.DIV_ASSIGN :
+                case TokenTypes.MOD_ASSIGN :
+                case TokenTypes.SR_ASSIGN :
+                case TokenTypes.BSR_ASSIGN :
+                case TokenTypes.SL_ASSIGN :
+                case TokenTypes.BAND_ASSIGN :
+                case TokenTypes.BXOR_ASSIGN :
+                case TokenTypes.BOR_ASSIGN :
+                    resolveAssignment(
+                        expression,
+                        location,
+                        context,
+                        referencePhase);
+                    break;
+
+                case TokenTypes.LOR :
+                case TokenTypes.LAND :
+                case TokenTypes.NOT_EQUAL :
+                case TokenTypes.EQUAL :
+                case TokenTypes.LT :
+                case TokenTypes.GT :
+                case TokenTypes.LE :
+                case TokenTypes.GE :
+                    result =
+                        resolveBooleanExpression(
+                            expression,
+                            location,
+                            context,
+                            referencePhase);
+                    break;
+
+                case TokenTypes.LITERAL_INSTANCEOF :
+                    result =
+                        resolveInstanceOf(
+                            expression,
+                            location,
+                            context,
+                            referencePhase);
+                    break;
+
+                case TokenTypes.LITERAL_TRUE :
+                case TokenTypes.LITERAL_FALSE :
+                    result =
+                        resolveBooleanLiteral(expression, location, context);
+                    break;
+
+                case TokenTypes.LNOT :
+                    result =
+                        resolveBooleanUnary(
+                            expression,
+                            location,
+                            context,
+                            referencePhase);
+                    break;
+
+                case TokenTypes.INC :
+                case TokenTypes.POST_INC :
+                case TokenTypes.DEC :
+                case TokenTypes.POST_DEC :
+                case TokenTypes.UNARY_PLUS :
+                case TokenTypes.UNARY_MINUS :
+                    result =
+                        resolveUnaryExpression(
+                            expression,
+                            location,
+                            context,
+                            referencePhase);
+                    break;
+
+                case TokenTypes.PLUS :
+                case TokenTypes.MINUS :
+                case TokenTypes.DIV :
+                case TokenTypes.STAR :
+                case TokenTypes.BAND :
+                case TokenTypes.BOR :
+                case TokenTypes.BXOR :
+                case TokenTypes.MOD :
+                    result =
+                        resolveArithmeticExpression(
+                            expression,
+                            location,
+                            context,
+                            referencePhase);
+                    break;
+
+                case TokenTypes.LITERAL_BREAK :
+                case TokenTypes.LITERAL_CONTINUE :
+                    resolveGoto(expression, location, context, referencePhase);
+                    break;
+
+                case TokenTypes.LPAREN :
+                    result = resolveExpression(
+                        //TODO: child || sibling?
+     (SymTabAST) (expression.getNextSibling()),
+                        //(SymTabAST) (expression.getFirstChild()),
+    location, context, referencePhase);
+                    break;
+
+                case TokenTypes.INDEX_OP :
+                    result =
+                        resolveArrayAccess(
+                            expression,
+                            location,
+                            context,
+                            referencePhase);
+                    break;
+
+                case TokenTypes.LITERAL_NULL :
+                    result = new NullClass();
+                    break;
+
+                case TokenTypes.QUESTION :
+                    result =
+                        resolveQuestion(
+                            expression,
+                            location,
+                            context,
+                            referencePhase);
+                    break;
+
+                case TokenTypes.LITERAL_CLASS :
+                    result = resolveLiteralClass();
+                    break;
+
+                case TokenTypes.ARRAY_INIT :
+                    resolveArrayInitializer(
+                        expression,
+                        location,
+                        context,
+                        referencePhase);
+                    break;
+
+                case TokenTypes.LITERAL_THROW :
+                    resolveThrowExpression(
+                        expression,
+                        location,
+                        context,
+                        referencePhase);
+                    break;
+
+                case TokenTypes.SL :
+                case TokenTypes.SR :
+                case TokenTypes.BSR :
+                    result =
+                        resolveShiftOperator(
+                            expression,
+                            location,
+                            context,
+                            referencePhase);
+                    break;
+
+                case TokenTypes.BNOT :
+                    resolveBitwiseNot(
+                        expression,
+                        location,
+                        context,
+                        referencePhase);
+                    break;
+
+                case TokenTypes.LITERAL_ASSERT :
+//                                        resolveAssert(
+//                                            expression,
+//                                            location,
+//                                            context,
+//                                            referencePhase);
+                    break;
+
+                case TokenTypes.RPAREN :
+                case TokenTypes.EMPTY_STAT :
+                    //    case TokenTypes.ML_COMMENT:
+                    //    case TokenTypes.SL_COMMENT:
+                case TokenTypes.VARIABLE_DEF :
+                case TokenTypes.METHOD_DEF :
+                case TokenTypes.CLASS_DEF :
+                case TokenTypes.LITERAL_FOR :
+                case TokenTypes.LITERAL_WHILE :
+                case TokenTypes.LITERAL_IF :
+                case TokenTypes.LITERAL_VOID :
+                    //    case TokenTypes.LITERAL_INTERFACE:
+                case TokenTypes.LITERAL_DO :
+                case TokenTypes.LITERAL_SWITCH :
+                case TokenTypes.LITERAL_STATIC :
+                case TokenTypes.LITERAL_TRANSIENT :
+                case TokenTypes.LITERAL_NATIVE :
+                    //    case TokenTypes.LITERAL_threadsafe:
+                case TokenTypes.LITERAL_SYNCHRONIZED :
+                case TokenTypes.LITERAL_VOLATILE :
+                case TokenTypes.LITERAL_TRY :
+                case TokenTypes.LITERAL_CATCH :
+                case TokenTypes.LITERAL_FINALLY :
+                case TokenTypes.LABELED_STAT :
+                case TokenTypes.LCURLY :
+                case TokenTypes.RCURLY :
+                case TokenTypes.SLIST :
+                case TokenTypes.SEMI :
+                case TokenTypes.COMMA :
+                case TokenTypes.ARRAY_DECLARATOR :
+                    break;
+
+                default :
+                //TODO: throw exception
+                    if (mInitialized) {
+                        final Log log =
+                            mLogFactory.getInstance(this.getClass());
+                        log.error(
+                            "Unhandled expression type: "
+                                + expression.getType());
+                    }
+                    break;
+            }
+        }
+        catch (Exception e) {
+            
+            result = new UnknownClass(expression.getText(), expression);
+//          TODO: This really should be logged
+//            if (mInitialized) {
+//                final Log log = mLogFactory.getInstance(this.getClass());
+//                log.error("Error resolving near " + expression);
+//            }
+        }
+
+        return result;
+    }
+
+    private IClass resolveTypecast(
+        SymTabAST node,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        SymTabAST typeNode = (SymTabAST) node.getFirstChild();
+        SymTabAST exprNode = (SymTabAST) typeNode.getNextSibling();
+        //handle Checkstyle grammar
+        if (exprNode.getType() == TokenTypes.RPAREN) {
+            exprNode = (SymTabAST) exprNode.getNextSibling();
+        }
+
+        IClass type = null;
+
+        final SymTabAST child = (SymTabAST) typeNode.getFirstChild();
+        // TODO: Checkstyle change.
+        // Do not create references from typecast.
+        // Original transmogrify code is equivalent to
+        // final boolean createReference = referencePhase;
+        // which creates non-existant references for variables.
+        final boolean createReference = false;
+        if (child.getType()
+            == TokenTypes.ARRAY_DECLARATOR) {
+            type =
+                new ArrayDef(
+                    resolveType(
+                        (SymTabAST) typeNode.getFirstChild(),
+                        location,
+                        context,
+                        createReference));
+        }
+        else {
+            type = resolveType(typeNode, location, context, createReference);
+        }
+
+        resolveExpression(exprNode, location, context, referencePhase);
+        //TODO: Checkstyle change. Can this be ignored?
+        if (type != null) {
+            ((SymTabAST) typeNode.getFirstChild()).setDefinition(
+                type,
+                location,
+                referencePhase);
+        }
+
+        return type;
+    }
+
+    private IClass resolveArrayAccess(
+        SymTabAST node,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+
+        SymTabAST arrayNode = (SymTabAST) (node.getFirstChild());
+        SymTabAST exprNode = (SymTabAST) (arrayNode.getNextSibling());
+
+        //resolve index expressions
+        while (arrayNode.getType() == TokenTypes.INDEX_OP) {
+            resolveExpression(exprNode, location, context, referencePhase);
+            arrayNode = (SymTabAST) (arrayNode.getFirstChild());
+            exprNode = (SymTabAST) (arrayNode.getNextSibling()); 
+        }
+        
+        ArrayDef array =
+            (ArrayDef) resolveExpression(arrayNode,
+                location,
+                context,
+                referencePhase);
+
+        resolveExpression(exprNode, location, context, referencePhase);
+
+        return array.getType();
+    }
+
+    private IClass resolveLiteralClass() {
+        return new ExternalClass(Class.class);
+    }
+
+    /**
+     * Resolves any dotted reference, returning the <code>Scope</code>
+     * identified by the reference.
+     *
+     * @param tree the root node of the dotted reference
+     * @param location the <code>Scope</code> in which the expression occours.
+     * @param context the <code>Scope</code> in which the search for the
+     *                definition will start
+     * @return the <code>Scope</code> indentified by the reference
+     */
+    private IClass resolveDottedName(
+        SymTabAST tree,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        IClass result = null;
+
+        IClass localContext = context;
+        String name = null;
+
+        DotIterator it = new DotIterator(tree);
+        while (it.hasNext()) {
+            SymTabAST node = it.nextNode();
+            if (node.getType() != TokenTypes.COMMA) {
+                localContext =
+                    resolveExpression(
+                        node,
+                        location,
+                        localContext,
+                        referencePhase);
+                if (localContext == null) {
+                    node.setMeaningfulness(false);
+                    name = node.getText();
+                    while (localContext == null && it.hasNext()) {
+                        SymTabAST next = it.nextNode();
+                        name = name + "." + next.getText();
+                        localContext = location.getClassDefinition(name);
+                        if (localContext != null && referencePhase) {
+                            next.setDefinition(
+                                localContext,
+                                location,
+                                referencePhase);
+                        }
+                        else {
+                            next.setMeaningfulness(false);
+                        }
+                    }
+                }
+            }
+        }
+
+        if (localContext != null) {
+            result = localContext;
+        }
+        else {
+            result = new UnknownClass(name, tree);
+        }
+
+        return result;
+    }
+
+    /**
+     * Resolves a method call.
+     *
+     * @param methodNode the <code>SymTabAST</code> for the METHOD_CALL node
+     * @param location the <code>Scope</code> where the expression occurs
+     * @param context the <code>Scope</code> in which the expression occurs
+     *                (where the search for a defintion begins)
+     * @param referencePhase whether or not this is the reference phase of
+     *                       table construction
+     *
+     * @return the <code>ClassDef</code> for the type returned by the method
+     */
+    private IClass resolveMethod(
+        SymTabAST methodNode,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        IClass result = new UnknownClass(methodNode.getText(), methodNode);
+        IClass newContext = null;
+
+        if (context == null) {
+            newContext = location.getEnclosingClass();
+        }
+        else {
+            newContext = context;
+        }
+
+        String name = null;
+        boolean createReference = true;
+
+        SymTabAST nameNode = (SymTabAST) (methodNode.getFirstChild());
+        SymTabAST parametersNode = (SymTabAST) (nameNode.getNextSibling());
+
+        ISignature signature =
+            resolveParameters(
+                parametersNode,
+                location,
+                context,
+                referencePhase);
+
+        if (nameNode.getType() == TokenTypes.IDENT) {
+            name = nameNode.getText();
+        }
+        else if (
+            nameNode.getType() == TokenTypes.LITERAL_SUPER
+                || (nameNode.getType() == TokenTypes.SUPER_CTOR_CALL)) {
+            IClass superclass = location.getEnclosingClass().getSuperclass();
+            newContext = superclass;
+            name = superclass.getName();
+            createReference = false;
+        }
+        else if (nameNode.getType() == TokenTypes.LITERAL_THIS) {
+            newContext = location.getEnclosingClass();
+            name = newContext.getName();
+            createReference = false;
+        }
+        else {
+            // REDTAG -- doing dotted name resolution on its own
+            SymTabAST contextNode = (SymTabAST) (nameNode.getFirstChild());
+            //TODO: handle Checkstyle grammar
+            nameNode = (SymTabAST) contextNode.getNextSibling();
+            //skip to IDENT
+            while (nameNode.getType() != TokenTypes.IDENT) {
+                nameNode = (SymTabAST) nameNode.getNextSibling();
+            }
+            
+            name = nameNode.getText();
+            newContext =
+                resolveExpression(
+                    contextNode,
+                    location,
+                    context,
+                    referencePhase);
+        }
+
+        if (newContext != null) {
+            IMethod method = newContext.getMethodDefinition(name, signature);
+
+            if (method != null) {
+                if (createReference && referencePhase) {
+                    nameNode.setDefinition(method, location, referencePhase);
+                }
+                result = method.getType();
+            }
+        }
+
+        if (result == null) {
+            result = new UnknownClass(methodNode.getText(), methodNode);
+        }
+
+        return result;
+    }
+
+    /**
+     * resolves a literal "this"
+     *
+     * @param expression the <code>SymTabAST</code> of the expression
+     * @param location the <code>Scope</code> where the expression occurs
+     * @param context the <code>Scope</code> in which the expression occurs
+     *                (where the search for a defintion begins)
+     *
+     * @return the resulting scope of the expression (the type to which it evaluates)
+     */
+    private IClass resolveLiteralThis(
+        SymTabAST thisNode,
+        Scope location,
+        IClass context) {
+        return location.getEnclosingClass();
+    }
+
+    /**
+     * resolves a literal "super"
+     *
+     * @param expression the <code>SymTabAST</code> of the expression
+     * @param location the <code>Scope</code> where the expression occurs
+     * @param context the <code>Scope</code> in which the expression occurs
+     *                (where the search for a defintion begins)
+     *
+     * @return the resulting scope of the expression (the type to which it evaluates)
+     */
+    private IClass resolveLiteralSuper(
+        SymTabAST superNode,
+        Scope location,
+        IClass context) {
+        return location.getEnclosingClass().getSuperclass();
+    }
+
+    private boolean newIsConstructor(SymTabAST newNode) {
+        boolean result = false;
+
+        SymTabAST typeNode =
+            (SymTabAST) (newNode.getFirstChild().getNextSibling());
+        //handle Checkstyle grammar
+        if (typeNode.getType() == TokenTypes.LPAREN) {
+            typeNode = (SymTabAST) typeNode.getNextSibling();
+        }
+        if (typeNode.getType() == TokenTypes.ELIST) {
+            result = true;
+        }
+        return result;
+
+    }
+
+    /**
+     * resolves and expression of type TokenTypes.TYPE
+     *
+     * @param expression the <code>SymTabAST</code> of the expression
+     * @param location the <code>Scope</code> where the expression occurs
+     * @param context the <code>Scope</code> in which the expression occurs
+     *                (where the search for a defintion begins)
+     * @param referencePhase whether or not this is the reference phase of
+     *                       table construction
+     * @return the resulting scope of the expression (the type to which it evaluates)
+     * @see #resolveDottedName(SymTabAST, Scope, IClass, boolean)
+     * @see #resolveClassIdent(SymTabAST, Scope, IClass, boolean)
+     */
+    public IClass resolveType(
+        SymTabAST expr,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        IClass result = null;
+        SymTabAST nameNode = (SymTabAST) expr.getFirstChild();
+
+        // TODO: Checkstyle change.
+        // Do not create references from typecast.
+        // Original transmogrify code is equivalent to
+        // final boolean createReference = referencePhase;
+        // which creates non-existant references for variables.
+        final boolean createReference = false;
+        if (nameNode.getType() == TokenTypes.DOT) {
+            result =
+                resolveDottedName(nameNode, location, context, createReference);
+        }
+        else {
+            result =
+                resolveClassIdent(nameNode, location, context, createReference);
+        }
+
+        return result;
+    }
+
+    /**
+     * resolves Class type expression
+     * @param expr node to be resolved
+     * @param location scope of the <code>expr</code>
+     * @param context context of the <code>expr</code> if exists
+     * @param referencePhase <code>true</code> if this method is used to during
+     *                                         finding reference phase
+     *                       <code>false</code> otherwise
+     * @return <code>IClass</code> representing the type to which the
+     *         expression evalutes.
+     * @see #resolveDottedName(SymTabAST, Scope, IClass, boolean)
+     */
+    public IClass resolveClass(
+        SymTabAST expr,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+
+        IClass result =
+            resolveDottedName(expr, location, context, referencePhase);
+        if (result != null && referencePhase) {
+            expr.setDefinition(result, location, referencePhase);
+        }
+
+        return result;
+    }
+
+    /**
+     * resolves expression with <code>JavaTokenTypes<code> other than <code>DOT</code>
+     * @param expr expression to be resolved
+     * @param location scope of the expression
+     * @param context context of the expression if any
+     * @param referencePhase <code>true</code> if this method is used to during
+     *                                         finding reference phase
+     *                       <code>false</code> otherwise
+     * @return <code>IClass</code> representing the type to which the
+     *         expression evalutes.
+     */
+    public IClass resolveClassIdent(
+        SymTabAST expr,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+
+        IClass result = location.getClassDefinition(expr.getText());
+        if (result != null) {
+            expr.setDefinition(result, location, referencePhase);
+        }
+
+        return result;
+    }
+
+    private IClass resolveNew(
+        SymTabAST newNode,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+
+        IClass result;
+
+        if (newIsConstructor(newNode)) {
+            result =
+                resolveConstructor(newNode, location, context, referencePhase);
+        }
+        else {
+            result =
+                resolveNewArray(newNode, location, context, referencePhase);
+        }
+
+        return result;
+    }
+
+    private IClass resolveNewArray(
+        SymTabAST newNode,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        IClass arrayType;
+
+        SymTabAST typeNode = (SymTabAST) (newNode.getFirstChild());
+        SymTabAST declaratorNode = (SymTabAST) (typeNode.getNextSibling());
+        SymTabAST initializerNode =
+            (SymTabAST) (declaratorNode.getNextSibling());
+
+        arrayType = resolveClass(typeNode, location, context, referencePhase);
+
+        if (declaratorNode.getFirstChild() != null) {
+            resolveExpression(
+                ((SymTabAST) declaratorNode.getFirstChild()),
+                location,
+                context,
+                referencePhase);
+        }
+
+        if (initializerNode != null) {
+            resolveArrayInitializer(
+                initializerNode,
+                location,
+                context,
+                referencePhase);
+        }
+
+        return new ArrayDef(arrayType);
+    }
+
+    private IClass resolveQuestion(
+        SymTabAST question,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        SymTabAST test = (SymTabAST) question.getFirstChild();
+        while (test.getType() == TokenTypes.LPAREN) {
+            test = (SymTabAST) test.getNextSibling();
+        }
+        SymTabAST leftBranch = (SymTabAST) test.getNextSibling();
+        while (leftBranch.getType() == TokenTypes.RPAREN) {
+            leftBranch = (SymTabAST) leftBranch.getNextSibling();
+        }
+        SymTabAST rightBranch = (SymTabAST) leftBranch.getNextSibling();
+        while (rightBranch.getType() != TokenTypes.COLON) {
+            rightBranch = (SymTabAST) rightBranch.getNextSibling();
+        }
+        rightBranch = (SymTabAST) rightBranch.getNextSibling();
+
+        resolveExpression(test, location, context, referencePhase);
+        IClass leftClass =
+            resolveExpression(leftBranch, location, context, referencePhase);
+        IClass rightClass =
+            resolveExpression(rightBranch, location, context, referencePhase);
+
+        return moreGeneral(leftClass, rightClass);
+    }
+
+    private IClass moreGeneral(IClass a, IClass b) {
+        return (a.isCompatibleWith(b)) ? b : a;
+    }
+
+    /**
+     * Resolves a constructor call.
+     *
+     * @param tree the root node of the constructor call
+     * @return the <code>ClassDef</code> for the class instantiated by the
+     *         constructor
+     */
+    private IClass resolveConstructor(
+        SymTabAST constructor,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+
+        IClass classConstructed = null;
+
+        SymTabAST nameNode = (SymTabAST) (constructor.getFirstChild());
+        //SymTabAST parametersNode = (SymTabAST) (nameNode.getNextSibling());
+        SymTabAST parametersNode =
+            constructor.findFirstToken(TokenTypes.ELIST);
+        SymTabAST nameIdent = null;
+        if (nameNode.getType() == TokenTypes.IDENT) {
+            nameIdent = nameNode;
+        }
+        else {
+            nameIdent = (SymTabAST) nameNode.getFirstChild().getNextSibling();
+        }
+
+        classConstructed = resolveClass(nameNode, location, context, false);
+        if (classConstructed != null) {
+            MethodSignature signature =
+                resolveParameters(
+                    parametersNode,
+                    location,
+                    context,
+                    referencePhase);
+
+            IMethod constructorDef =
+                classConstructed.getMethodDefinition(
+                    nameIdent.getText(),
+                    signature);
+
+            if (constructorDef != null && referencePhase) {
+                nameIdent.setDefinition(
+                    constructorDef,
+                    location,
+                    referencePhase);
+            }
+        }
+
+        return classConstructed;
+    }
+
+    /**
+     * Resolves the types found in a method call. Any references found
+     * in the process are created.  Returns a <code>MethodSignature</code> for
+     * the types of the parameters.
+     *
+     * @param elist The <code>SymTabAST</code> for the list of parameters
+     * @return the signature of the parameters
+     */
+    private MethodSignature resolveParameters(
+        SymTabAST elist,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        Vector parameters = new Vector();
+
+        SymTabAST expr = (SymTabAST) (elist.getFirstChild());
+        while (expr != null) {
+            if (expr.getType() != TokenTypes.COMMA) {
+                IClass parameter =
+                    resolveExpression((SymTabAST) (expr
+				    .getFirstChild()),
+				    location,
+				    context,
+				    referencePhase);
+                parameters.add(parameter);
+            }
+
+            expr = (SymTabAST) (expr.getNextSibling());
+        }
+
+        return new MethodSignature(parameters);
+    }
+
+    /**
+     * Resolves an IDENT node of an AST, creating the appropriate reference and
+     * returning the scope of the identifer.
+     *
+     * @param ident the IDENT node
+     * @param location the <code>Scope</code> in which the IDENT is found
+     * @return the <code>Scope</code> the identifier identifies
+     */
+    private IClass resolveIdent(
+        SymTabAST ident,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+
+        IClass result = null;
+        IDefinition def = null;
+        String name = ident.getText();
+
+        // look for var
+        if (context != null) {
+            def = context.getVariableDefinition(name);
+        }
+        else {
+            def = location.getVariableDefinition(name);
+        }
+
+        if (def != null) {
+            result = ((IVariable) def).getType();
+        }
+        else {
+            // look for class
+            if (context != null) {
+                result = context.getClassDefinition(name);
+            }
+            else {
+                result = location.getClassDefinition(name);
+            }
+            def = result;
+        }
+
+        if (def != null) {
+            ident.setDefinition(def, location, referencePhase);
+        }
+
+        return result;
+    }
+
+    /**
+     * Resolves a (binary) boolean expression.  The left and right sides of the
+     * expression
+     * are resolved in the process.
+     *
+     * @param expression the <code>SymTabAST</code> representing the boolean
+     *                   expression.
+     * @return the <code>Scope</code> for the boolean primitive type.
+     */
+    private IClass resolveBooleanExpression(
+        SymTabAST expression,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        IClass result = null;
+
+        SymTabAST leftChild = findLeftChild(expression);
+        resolveExpression(leftChild, location, context, referencePhase);
+        SymTabAST rightChild = findRightSibling(leftChild);
+
+        resolveExpression(rightChild, location, context, referencePhase);
+
+        result = LiteralResolver.getDefinition(TokenTypes.LITERAL_BOOLEAN);
+
+        return result;
+    }
+
+    /**
+     * resolves references in an assignment expression
+     *
+     * @param expression the <code>SymTabAST</code> of the expression
+     * @param location the <code>Scope</code> where the expression occurs
+     * @param context the <code>Scope</code> in which the expression occurs
+     *                (where the search for a defintion begins)
+     *
+     * @return the resulting scope of the expression (the type to which it evaluates)
+     */
+    private IClass resolveAssignment(
+        SymTabAST expression,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        IClass result = null;
+
+        SymTabAST leftNode = (SymTabAST) (expression.getFirstChild());
+        SymTabAST rightNode = (SymTabAST) (leftNode.getNextSibling());
+
+        result = resolveExpression(leftNode, location, context, referencePhase);
+        resolveExpression(rightNode, location, context, referencePhase);
+
+        return result;
+    }
+
+    /**
+     * Resolves a unary expression.  Returns the type of the expression,
+     * creating any references found along the way.  Unary expressions are
+     * increment (x++), decrement (x--), unary plus (+x), and unary minus (-x)
+     *
+     * @param expression the <code>SymTabAST</code> of the unary expression.
+     * @return the <code>Scope</code> for the type to which the expression
+     * evalutes.
+     */
+    private IClass resolveUnaryExpression(
+        SymTabAST expression,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        SymTabAST operatee = (SymTabAST) (expression.getFirstChild());
+        return resolveExpression(operatee, location, context, referencePhase);
+    }
+
+    /**
+     * Resolves an arithmetic expression.  Returns the <code>Scope</code> for
+     * the type to which the expression resolves.  Any references found during
+     * resolution are created and resolved.
+     *
+     * @param expression the <code>SymTabAST</code> representing the arithmetic
+     *                   expression.
+     *
+     * @return the <code>Scope</code> for the type to which the expression
+     *         evaluates.
+     */
+    private IClass resolveArithmeticExpression(
+        SymTabAST expression,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        IClass result = null;
+
+        SymTabAST leftChild = findLeftChild(expression);
+        
+        IClass leftType =
+            (resolveExpression(leftChild,
+		    location,
+		    context,
+		    referencePhase));
+                
+        SymTabAST rightChild = findRightSibling(leftChild);
+
+        IClass rightType =
+                    (resolveExpression(rightChild,
+		    location,
+		    context,
+		    referencePhase));
+
+        result = binaryResultType(leftType, rightType);
+
+        return result;
+    }
+
+    /**
+     * Finds the left child of a binary operator, skipping parentheses.
+     * @param aExpression the node for the binary operator.
+     * @return the node for the left child.
+     */  
+    private SymTabAST findLeftChild(SymTabAST aExpression) {
+        SymTabAST leftChild = (SymTabAST) (aExpression.getFirstChild());
+        // handle Checkstyle grammar
+        while (leftChild.getType() == TokenTypes.LPAREN) {
+            leftChild = (SymTabAST) leftChild.getNextSibling();
+        }
+        return leftChild;
+    }
+
+    /**
+     * Finds the right sibling of the left child of a binary operator,
+     * skipping parentheses.
+     * @param aLeftChild the left child of a binary operator.
+     * @return the node of the right sibling.
+     */   
+    private SymTabAST findRightSibling(SymTabAST aLeftChild) {
+        SymTabAST rightChild = (SymTabAST) (aLeftChild.getNextSibling());
+        // handle Checkstyle grammar
+        while ((rightChild != null)
+            && (rightChild.getType() == TokenTypes.RPAREN))
+        {
+            rightChild = (SymTabAST) rightChild.getNextSibling();
+        }
+        return rightChild;
+    }
+
+    /**
+     * Returns the <code>ClassDef</code> for the type to which arithmetic
+     * expressions evaluate.
+     *
+     * @param a the <code>ClassDef</code> of the first operand.
+     * @param b the <code>ClassDef</code> of the second operand.
+     *
+     * @return the <code>ClassDef</code> to which the expression evaluates.
+     */
+    private IClass binaryResultType(IClass a, IClass b) {
+
+        IClass result = null;
+
+        // These may or may not be in line with the rules set forth in the java
+        // language specification.  Not being in line would be a BadThing(r).
+
+        IClass string = new ExternalClass(java.lang.String.class);
+
+        if (a.equals(string) || b.equals(string)) {
+            result = string;
+        }
+        else if (a.equals(PrimitiveClasses.BOOLEAN)) {
+            result = PrimitiveClasses.BOOLEAN;
+        }
+        else {
+            result =
+                PrimitiveClasses.binaryPromote(
+                    a,
+                    b);
+        }
+
+        return result;
+    }
+
+    /**
+     * resolves references in an instanceof expression
+     *
+     * @param expression the <code>SymTabAST</code> of the expression
+     * @param location the <code>Scope</code> where the expression occurs
+     * @param context the <code>Scope</code> in which the expression occurs
+     *                (where the search for a defintion begins)
+     *
+     * @return the resulting scope of the expression (the type to which it evaluates)
+     */
+    private IClass resolveInstanceOf(
+        SymTabAST expression,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        SymTabAST leftNode = (SymTabAST) (expression.getFirstChild());
+        SymTabAST rightNode = (SymTabAST) (leftNode.getNextSibling());
+
+        resolveExpression(leftNode, location, context, referencePhase);
+
+        SymTabAST classNameNode = (SymTabAST) (rightNode.getFirstChild());
+        resolveClass(classNameNode, location, context, referencePhase);
+
+        return LiteralResolver.getDefinition(TokenTypes.LITERAL_BOOLEAN);
+    }
+
+    /**
+     * resolves references in a a break statement
+     *
+     * @param expression the <code>SymTabAST</code> for the expression
+     * @param location the <code>Scope</code> where the expression occurs
+     * @param context the <code>Scope</code> in which the expression occurs
+     *                (where the search for a defintion begins)
+     *
+     * @return the <code>Scope</code> for the int primitive type
+     */
+    private IClass resolveGoto(
+        SymTabAST expression,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        SymTabAST label = (SymTabAST) (expression.getFirstChild());
+        // handle Checkstyle grammar
+        if (label != null && (label.getType() != TokenTypes.SEMI)) {
+            LabelDef def = location.getLabelDefinition(label.getText());
+            if (def != null) {
+                label.setDefinition(def, location, referencePhase);
+            }
+        }
+
+        return null;
+    }
+
+    private IClass resolvePrimitiveType(
+        SymTabAST primitive,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        IClass result =
+            LiteralResolver.getDefinition(primitive.getType());
+
+        primitive.setDefinition(result, location, referencePhase);
+        return result;
+    }
+
+    /**
+     * Returns the <code>ClassDef</code> of the int primitive type.  This may
+     * need to be amended, based on the Java Language spec, to return a long
+     * if the literal is larger than an int can hold.
+     *
+     * @param expression the <code>SymTabAST</code> for the integer literal
+     * @param location the <code>Scope</code> where the expression occurs
+     * @param context the <code>Scope</code> in which the expression occurs
+     *                (where the search for a defintion begins)
+     *
+     * @return the <code>Scope</code> for the int primitive type
+     */
+    private IClass resolveNumInt(
+        SymTabAST expression,
+        Scope location,
+        IClass context) {
+        return PrimitiveClasses.INT;
+    }
+
+    /**
+     * Returns the <code>ClassDef</code> type of the float primitive type.
+     * This may need to be amended, based on the Java Language spec, to return
+     * a double if the literal is larger than a float can hold.
+     *
+     * @param expression the <code>SymTabAST</code> for the floating point
+      literal
+     * @param location the <code>Scope</code> where the expression occurs
+     * @param context the <code>Scope</code> in which the expression occurs
+     *                (where the search for a defintion begins)
+     *
+     * @return the <code>Scope</code> for the float primitive type
+     */
+    private IClass resolveNumFloat(
+        SymTabAST expression,
+        Scope location,
+        IClass context) {
+        return PrimitiveClasses.DOUBLE;
+    }
+
+    /**
+     * Returns the <code>ClassDef</code> type of a string literal
+     *
+     * @param expression the <code>SymTabAST</code> for a string literal
+     * @param location the <code>Scope</code> where the expression occurs
+     * @param context the <code>Scope</code> in which the expression occurs
+     *                (where the search for a defintion begins)
+     *
+     * @return the <code>Scope</code> type of a string literal
+     */
+    private IClass resolveStringLiteral(
+        SymTabAST expression,
+        Scope location,
+        IClass context) {
+        return LiteralResolver.getDefinition(
+            TokenTypes.STRING_LITERAL);
+    }
+
+    /**
+     * Returns the <code>ClassDef</code> type of a character literal
+     *
+     * @param expression the <code>SymTabAST</code> for a string literal
+     * @param location the <code>Scope</code> where the expression occurs
+     * @param context the <code>Scope</code> in which the expression occurs
+     *                (where the search for a defintion begins)
+     *
+     * @return the <code>Scope</code> type of a character literal
+     */
+    private IClass resolveCharLiteral(
+        SymTabAST expression,
+        Scope location,
+        IClass context) {
+        return LiteralResolver.getDefinition(
+            TokenTypes.LITERAL_CHAR);
+    }
+
+    /**
+     * Describe <code>resolveBooleanLiteral</code> method here.
+     *
+     * @param expression the <code>SymTabAST</code> of the expression
+     * @param location the <code>Scope</code> where the expression occurs
+     * @param context the <code>Scope</code> in which the expression occurs
+     *                (where the search for a defintion begins)
+     *
+     * @return the <code>Scope</code> for the boolean primitive.
+     */
+    private IClass resolveBooleanLiteral(
+        SymTabAST expression,
+        Scope location,
+        IClass context) {
+        return LiteralResolver.getDefinition(TokenTypes.LITERAL_BOOLEAN);
+    }
+
+    private IClass resolveBooleanUnary(
+        SymTabAST expression,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        SymTabAST child = (SymTabAST) expression.getFirstChild();
+        resolveExpression(child, location, context, referencePhase);
+
+        return LiteralResolver.getDefinition(TokenTypes.LITERAL_BOOLEAN);
+    }
+
+    /**
+     * Resolves a constructor call.
+     *
+     * @param tree the root node of the constructor call
+     * @return the <code>ClassDef</code> for the class instantiated by the
+     *         constructor
+     */
+    private void resolveArrayInitializer(
+        SymTabAST initializerNode,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        SymTabAST child = (SymTabAST) (initializerNode.getFirstChild());
+        while (child != null) {
+            if (child.getType() != TokenTypes.COMMA) {
+                resolveExpression(child, location, context, referencePhase);
+            }
+            child = (SymTabAST) (child.getNextSibling());
+        }
+    }
+
+    /**
+     * Resolves a constructor call.
+     *
+     * @param tree the root node of the constructor call
+     * @return the <code>ClassDef</code> for the class instantiated by the
+     *         constructor
+     */
+    private void resolveThrowExpression(
+        SymTabAST throwNode,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+
+        SymTabAST nameNode = (SymTabAST) (throwNode.getFirstChild());
+        resolveExpression(nameNode, location, context, referencePhase);
+    }
+
+    private IClass resolveShiftOperator(
+        SymTabAST expression,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        IClass result = null;
+
+        SymTabAST leftChild = findLeftChild(expression);
+        SymTabAST rightChild = findRightSibling(leftChild);
+
+        result =
+            resolveExpression(leftChild, location, context, referencePhase);
+        resolveExpression(rightChild, location, context, referencePhase);
+
+        result = PrimitiveClasses.unaryPromote(result);
+
+        return result;
+    }
+
+    private IClass resolveBitwiseNot(
+        SymTabAST expression,
+        Scope location,
+        IClass context,
+        boolean referencePhase) {
+        IClass result = null;
+        SymTabAST child = (SymTabAST) expression.getFirstChild();
+        result = resolveExpression(child, location, context, referencePhase);
+
+        result = PrimitiveClasses.unaryPromote(result);
+
+        return result;
+    }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Scope.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Scope.java
new file mode 100644
index 0000000..cd4475e
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Scope.java
@@ -0,0 +1,124 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.Vector;
+
+
+/**
+ * Represents a scope of Java code.
+ *
+ * @author andrew mccormick, dave wood
+ * @version 1.0
+ * @since 1.0
+ * @see Definition
+ * @see Resolvable
+ */
+public abstract class Scope extends Definition {
+
+  // rename to references?
+  protected SortedSet referencesInScope = new TreeSet();
+
+  protected Hashtable elements = new Hashtable();
+  protected Hashtable labels = new Hashtable();
+  protected Hashtable classes = new Hashtable();
+
+  public Scope( String name, Scope parentScope, SymTabAST node ) {
+    super( name, parentScope, node );
+  }
+
+  public void addDefinition(VariableDef def) {
+    elements.put(def.getName(), def);
+  }
+
+  public void addDefinition(BlockDef def) {
+    elements.put(def.getName(), def);
+  }
+
+  public void addDefinition(ClassDef def) {
+    classes.put(def.getName(), def);
+  }
+
+  public void addDefinition(LabelDef def) {
+    labels.put(def.getName(), def);
+  }
+
+  public abstract void addDefinition(IPackage def);
+
+  protected Enumeration getDefinitions() {
+    Vector allElements = new Vector();
+
+    allElements.addAll(elements.values());
+    allElements.addAll(labels.values());
+    allElements.addAll(classes.values());
+
+    return allElements.elements();
+  }
+
+  protected Iterator getClasses() {
+    return classes.values().iterator();
+  }
+
+  public abstract IMethod getMethodDefinition(String name, ISignature signature);
+  public abstract IVariable getVariableDefinition(String name);
+  public abstract LabelDef getLabelDefinition(String name);
+  public abstract IClass getClassDefinition(String name);
+
+  public Iterator getReferencesIn() {
+    return referencesInScope.iterator();
+  }
+
+  public Reference getSymbol(String name, Occurrence location) {
+    Reference result = null;
+
+    for (Iterator it = getReferencesIn(); it.hasNext(); ) {
+      Reference reference = (Reference)it.next();
+//      if (name.equals(reference.getName())) {
+        if (reference.getLine() == location.getLine() &&
+            reference.getColumn() == location.getColumn()) {
+          result = reference;
+          break;
+        }
+//      }
+    }
+    return result;
+  }
+
+  public void addReferenceInScope( Reference reference ) {
+    referencesInScope.add( reference );
+  }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ScopeIndex.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ScopeIndex.java
new file mode 100644
index 0000000..50a10f2
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ScopeIndex.java
@@ -0,0 +1,140 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.util.Hashtable;
+import java.util.Vector;
+
+
+
+
+/**
+ * <code>ScopeIndex</code> provides methods for finding <code>Scope</code>s
+ * related to a known <code>Occurrence</code>
+ */
+public class ScopeIndex {
+
+    //This is a Hashtable full of Vectors.  The keys to this hashtable are filenames.
+    //Each vector contains all of the scope objects from the specific file.
+    private Hashtable indexOfFiles = new Hashtable();
+
+    public Hashtable getIndex() {
+        return indexOfFiles;
+    }
+
+    /**
+     * returns the most specific <code>Scope</code> to which the specified
+     * <code>Occurence</code> belongs.
+     *
+     * @param occ the <code>Occurrence</code> whose <code>Scope</code> we're interested in.
+     * @return Scope
+     */
+    public Scope lookup(Occurrence occ) {
+        String key = occ.getFile().getAbsolutePath();
+        Vector scopeList = getFileVector(key);
+
+        Scope result = findScope(scopeList, occ);
+
+        return result;
+    }
+
+    /**
+     * returns the most specific <code>Scope</code> to which the specified
+     * <code>Occurence</code> belongs from the specified <code>Vector</code>
+     * of <code>Scope</code>s.
+     *
+     * @param occ the <code>Occurrence</code> whose <code>Scope</code> we're interested in.
+     * @param scopeList the <code>Vector</code> of <code>Scope</code>s to chose from.
+     * @return Scope
+     */
+    public Scope findScope(Vector scopeList, Occurrence occ) {
+        int i = 0;
+
+        Scope bestSoFar = (Scope) scopeList.elementAt(i);
+
+        while (!bestSoFar
+            .getTreeNode()
+            .getSpan()
+            .contains(occ.getLine(), occ.getColumn())) {
+            i++;
+            bestSoFar = (Scope) scopeList.elementAt(i);
+        }
+
+        for (; i < scopeList.size(); i++) {
+            Scope currentScope = (Scope) scopeList.elementAt(i);
+
+            if (currentScope
+                .getTreeNode()
+                .getSpan()
+                .contains(occ.getLine(), occ.getColumn())) {
+                if (bestSoFar
+                    .getTreeNode()
+                    .getSpan()
+                    .contains(currentScope.getTreeNode().getSpan())) {
+                    bestSoFar = currentScope;
+                }
+            }
+        }
+
+        return bestSoFar;
+    }
+
+    /**
+     * adds a <code>Scope</code> to the <code>ScopeIndex</code> for searching.
+     *
+     * @param scope the <code>Scope</code> to add.
+     */
+    public void addScope(Scope scope) {
+
+        final SymTabAST SymTabAST = scope.getTreeNode();
+        SymTabAST.getFile();
+        Vector fileVector =
+            getFileVector(scope.getTreeNode().getFile().getAbsolutePath());
+
+        fileVector.addElement(scope);
+    }
+
+    /**
+     * returns the <code>Vector</code> containing the <code>Scope</code>s related
+     * to the specified filename.
+     *
+     * @param fileName the fileName to find scopes for.
+     * @return Vector
+     */
+    private Vector getFileVector(String fileName) {
+        Vector result = (Vector) indexOfFiles.get(fileName);
+
+        if (result == null) {
+            result = new Vector();
+            indexOfFiles.put(fileName, result);
+        }
+
+        return result;
+    }
+}
\ No newline at end of file
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Span.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Span.java
new file mode 100644
index 0000000..346e6b3
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Span.java
@@ -0,0 +1,153 @@
+//Transmogrify License
+// 
+//Copyright (c) 2001, ThoughtWorks, Inc.
+//All rights reserved.
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//- Redistributions of source code must retain the above copyright notice,
+//this list of conditions and the following disclaimer.
+//- Redistributions in binary form must reproduce the above copyright
+//notice, this list of conditions and the following disclaimer in the
+//documentation and/or other materials provided with the distribution.
+//Neither the name of the ThoughtWorks, Inc. nor the names of its
+//contributors may be used to endorse or promote products derived from this
+//software without specific prior written permission.
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+//TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+//PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+//CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+//EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+//OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+//WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+//OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+//ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+public class Span {
+
+  private int _startLine;
+  private int _startColumn;
+  private int _endLine;
+  private int _endColumn;
+
+  public Span() {}
+
+  public Span(int startLine, int startColumn, int endLine, int endColumn) {
+    setStart(startLine, startColumn);
+    setEnd(endLine, endColumn);
+  }
+
+  public Span( Span span ) {
+    this( span.getStartLine(), span.getStartColumn(),
+          span.getEndLine(), span.getEndColumn() );
+  }
+
+  public void setStart(int startLine, int startColumn) {
+    _startLine = startLine;
+    _startColumn = startColumn;
+  }
+
+  public void setEnd(int endLine, int endColumn) {
+    _endLine = endLine;
+    _endColumn = endColumn;
+  }
+
+  public int getStartLine() {
+    return _startLine;
+  }
+
+  public int getStartColumn() {
+    return _startColumn;
+  }
+
+  public int getEndLine() {
+    return _endLine;
+  }
+
+  public int getEndColumn() {
+    return _endColumn;
+  }
+
+  public boolean contains( Span span ) {
+    return ( contains(span.getStartLine(), span.getStartColumn())
+             && contains( span.getEndLine(), span.getEndColumn()) );
+  }
+
+  public boolean contains(int line, int column) {
+    boolean afterStart = false;
+    boolean beforeEnd = false;
+
+    if ( getStartLine() < line ) {
+      afterStart = true;
+    }
+    else if ( getStartLine() == line && getStartColumn() <= column ) {
+      afterStart = true;
+    }
+
+    if ( getEndLine() > line ) {
+      beforeEnd = true;
+    }
+    else if ( getEndLine() == line && getEndColumn() >= column ) {
+      beforeEnd = true;
+    }
+
+    return ( afterStart && beforeEnd );
+  }
+
+  protected boolean startsBefore( Span span ) {
+    boolean result = false;
+    if ( getStartLine() < span.getStartLine() ) {
+      result = true;
+    }
+    else if ( getStartLine() == span.getStartLine()
+              && getStartColumn() <= span.getStartColumn() ) {
+      result = true;
+    }
+
+    return result;
+  }
+
+  protected boolean endsAfter( Span span ) {
+    boolean result = false;
+    if ( getEndLine() > span.getEndLine() ) {
+      result = true;
+    }
+    else if ( getEndLine() == span.getEndLine()
+              && getEndColumn() >= span.getEndColumn() ) {
+      result = true;
+    }
+
+    return result;
+  }
+
+  public void compose( Span span ) {
+    if ( span.startsBefore( this ) ) {
+      setStart( span.getStartLine(), span.getStartColumn() );
+    }
+    if ( span.endsAfter( this ) ) {
+      setEnd( span.getEndLine(), span.getEndColumn() );
+    }
+  }
+
+  public boolean equals(Object o) {
+    boolean result = false;
+    if ( o instanceof Span ) {
+      Span span = (Span)o;
+      result = ( span.getStartLine() == getStartLine()
+                 && span.getStartColumn() == getStartColumn()
+                 && span.getEndLine() == getEndLine()
+                 && span.getEndColumn() == getEndColumn() );
+    }
+    return result;
+  }
+
+  public String toString() {
+    return "[" + getStartLine() + "," + getStartColumn()
+      + ":" + getEndLine() + "," + getEndColumn() + "]";
+  }
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/SymTabAST.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/SymTabAST.java
new file mode 100644
index 0000000..9111b59
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/SymTabAST.java
@@ -0,0 +1,554 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.io.File;
+
+import antlr.collections.AST;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+
+
+/**
+ * an extension of <code>antlr.CommonAST</code> that includes
+ * extra information about the AST's location.  This information
+ * is the file and line number where the AST was created.
+ *
+ * To use this AST node in your tree structure, assuming your
+ * antlr.TreeParser is called parser, use
+ *
+ * parser.setASTNOdeCLass(SymTabAST.class.getName());
+ *
+ * make sure you also call setTokenObjectClass for the lexer as well
+ *
+ *
+ * @see SymTabToken
+ */
+//TODO: Should be an adapter of DetailAST
+
+public class SymTabAST
+    extends antlr.CommonASTWithHiddenTokens
+{
+    private Scope _scope;
+    private IDefinition _definition = null;
+    private boolean _isMeaningful = true;
+
+    private File _file;
+    private int _line;
+    private int _column;
+
+//  parent is not used by Checkstyle
+//    private SymTabAST parent;
+
+    private Span _span;
+
+    /** original syntax tree node */
+    private DetailAST detailNode;
+    
+//    /**
+//     * gets parent of this node
+//     * @return <code>SymTabAST</code>
+//     */
+//    public SymTabAST getParent() {
+//        return parent;
+//    }
+
+//    /**
+//     * gets previous sibling of this node
+//     * @return <code>SymTabAST</code>
+//     */
+//    public SymTabAST getPreviousSibling() {
+//        return prevSibling;
+//    }
+
+    /**
+     * sets parent of this node
+     * @param parent
+     * @return <code>void</code>
+     */
+    public void setParent(SymTabAST parent) {
+//parent is not used by Checkstyle
+//        this.parent = parent;
+    }
+
+    /**
+     * gets the scope of this node
+     * @return <code>Scope</code>
+     */
+    public Scope getScope() {
+        return _scope;
+    }
+
+    /**
+     * sets the scope of this node
+     * @param scope
+     * @return <code>void</code>
+     */
+    public void setScope(Scope scope) {
+        _scope = scope;
+    }
+
+    /**
+     * sets <code>Definition</code> for this node
+     * @param definition
+     * @param scope
+     * @return <code>void</code>
+     * @see #setDefinition(IDefinition, Scope, boolean)
+     */
+    public void setDefinition(IDefinition definition, Scope scope) {
+        setDefinition(definition, scope, true);
+    }
+
+    /**
+     * sets <code>Definition</code> for this node and adds <code>Reference</code>
+     * to the <code>_definition</code> and <code>scope</code>
+     * @param definition
+     * @param scope
+     * @param createReference
+     * @return <code>void</code>
+     * @see net.sourceforge.transmogrify.symtab.Reference
+     */
+    public void setDefinition(
+        IDefinition definition,
+        Scope scope,
+        boolean createReference) {
+        _definition = definition;
+        Reference reference = new Reference(this);
+        if (scope != null) {
+            scope.addReferenceInScope(reference);
+        }
+
+        if (definition.isSourced() && createReference) {
+            _definition.addReference(reference);
+        }
+    }
+
+    /**
+     * gets <code>_definitin</code>
+     * @return <code>IDefinition</code>
+     */
+    public IDefinition getDefinition() {
+        return _definition;
+    }
+
+    /**
+     * tests if this node is meaningful or should be ignored
+     * @return <code>boolean</code>
+     */
+    public boolean isMeaningful() {
+        return _isMeaningful;
+    }
+
+    /**
+     * sets <code>_isMeaningful</code> member
+     * @param isMeaningful
+     * @return <code>void</code>
+     */
+    public void setMeaningfulness(boolean isMeaningful) {
+        _isMeaningful = isMeaningful;
+    }
+
+    /**
+     * sets meaningfulness for this node and its children
+     * @return <code>void</code>
+     * @see #setMeaningfulness(boolean)
+     */
+    public void ignoreChildren() {
+        if (getType() == TokenTypes.IDENT) {
+            setMeaningfulness(false);
+        }
+        SymTabAST child = (SymTabAST) getFirstChild();
+        while (child != null) {
+            child.ignoreChildren();
+            child = (SymTabAST) child.getNextSibling();
+        }
+    }
+
+    /**
+     * sets file where this node belong to
+     * @param file
+     * @return <code>void</code>
+     */
+    public void setFile(File file) {
+        _file = file;
+    }
+
+    /**
+     * finishes process for adding node to its parent
+     * @param file file where this node belongs to
+     * @param parent parent of this node
+     * @param previousSibling previous sibling of this node
+     * @return <code>Span</code> the span of this node
+     * @see #setFile(File)
+     * @see #setParent(SymTabAST)
+     * @see #setPreviousSibling(SymTabAST)
+     * @see #finishChildren(File)
+     * @see #setSpan(Span)
+     */
+    public Span finishDefinition(
+        File file,
+        SymTabAST parent) {
+        setFile(file);
+        setParent(parent);
+
+        Span result = finishChildren(file);
+
+        if (getLineNo() != 0) {
+            result.compose(
+                new Span(
+                    getLineNo(),
+                    getColumnNo(),
+                    getLineNo(),
+                    getColumnNo()
+                        + ((getText() == null) ? 0 : getText().length() - 1)));
+        }
+
+        setSpan(result);
+        return result;
+    }
+
+    /**
+     * finishes children of this node definition process
+     * @param file file where this node belongs to
+     * @return <code>Span</code>
+     * @see #finishDefinition(File, SymTabAST, SymTabAST)
+     */
+    public Span finishChildren(File file) {
+        Span result = null;
+        SymTabAST current = (SymTabAST) getFirstChild();
+
+        if (current == null) {
+            result = getSpan();
+        }
+        else {
+            while (current != null) {
+                Span childSpan =
+                    current.finishDefinition(file, this);
+
+                if (childSpan != null) {
+                    if (result == null) {
+                        result = new Span(childSpan);
+                    }
+                    else {
+                        result.compose(childSpan);
+                    }
+                }
+
+                current = (SymTabAST) current.getNextSibling();
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * gets file where this node belongs to
+     * @return <code>File</code>
+     */
+    public File getFile() {
+        return _file;
+    }
+
+    /**
+     * sets the line where this node reside
+     * @return <code>void</code>
+     */
+    public void setLine(int line) {
+        _line = line;
+    }
+
+    /**
+     * gets the line where this node reside
+     * @return <code>int</code>
+     */
+    public int getLineNo() {
+        return _line;
+    }
+
+    /**
+     * sets the column where this node reside
+     * @param column
+     */
+    public void setColumn(int column) {
+        _column = column;
+    }
+
+    /**
+     * gets the column where this node reside
+     * @return <code>int</code>
+     */
+    public int getColumnNo() {
+        return _column;
+    }
+
+    /**
+     * gets the definition name of this node
+     * @return <code>String</code>
+     * @see net.sourceforge.transmogrify.symtab.IDefinition
+     */
+    public String getName() {
+        String result = null;
+        if (_definition != null) {
+            result = _definition.getName();
+        }
+
+        return result;
+    }
+
+    /**
+     * prints the line, column and file for this node for debugging purpose
+     * @return <code>String</code>
+     */
+    public String toString() {
+        //StringBuffer resultBuffer = new StringBuffer(super.toString());
+        StringBuffer resultBuffer = new StringBuffer(prefixString(true));
+        resultBuffer.append("[" + getLineNo() + "," + getColumnNo() + "]");
+        //if ( getSpan() != null ) {
+        //  resultBuffer.append( " spans " + getSpan() );
+        //}
+        resultBuffer.append(" in " + getFile());
+        //resultBuffer.append(" type: " + getType());
+        return resultBuffer.toString();
+    }
+
+    public String prefixString(boolean verboseStringConversion) {
+        StringBuffer b = new StringBuffer();
+
+        try {
+            final String name = TokenTypes.getTokenName(getType());
+            // if verbose and type name not same as text (keyword probably)
+            if (verboseStringConversion && !getText().equalsIgnoreCase(name)) {
+                b.append('[');
+                b.append(getText());
+                b.append(",<");
+                b.append(name);
+                b.append(">]");
+                return b.toString();
+            }
+        }
+        catch (Exception ex) {
+            ;
+        }
+        return getText();
+    }
+
+    /**
+     * gets <code>Span</code> of this node
+     * @return <code>Span</code>
+     */
+    public Span getSpan() {
+        if ((_span == null)) {
+            int endColumn = getColumnNo() + 1;
+            final String text = getText();
+            if (text != null) {
+                endColumn += text.length() - 1;
+            }
+            _span = new Span(getLineNo(), getColumnNo() + 1, getLineNo(), endColumn);
+        }
+        return _span;
+    }
+
+    /**
+     * sets <code>Span</code> for this node
+     * @param span
+     * @return <code>void</code>
+     */
+    public void setSpan(Span span) {
+        _span = span;
+    }
+
+// not used by Checkstyle
+//    /**
+//     * tests if this node is inside the span
+//     * @param line
+//     * @param column
+//     * @return <code>boolean</code> <code>true</code> if this node is within the span
+//     *                              <code>false</code> otherwise
+//     */
+//    public boolean contains(int line, int column) {
+//        return getSpan().contains(line, column);
+//    }
+
+    /**
+     * gets enclosing node for this node based on line and column
+     * @param line
+     * @param column
+     * @return <code>SymTabAST</code>
+     * @see #getSpan()
+     */
+    public SymTabAST getEnclosingNode(int line, int column) {
+        SymTabAST result = null;
+
+        if ((getSpan() != null) && (getSpan().contains(line, column))) {
+            SymTabAST child = (SymTabAST) getFirstChild();
+            while (child != null && result == null) {
+                result = child.getEnclosingNode(line, column);
+                child = (SymTabAST) child.getNextSibling();
+            }
+
+            // if none of the children contain it, I'm the best node
+            if (result == null) {
+                result = this;
+            }
+
+        }
+        return result;
+    }
+
+    public AST getFirstChild()
+    {
+        if (super.getFirstChild() == null) {
+            DetailAST childDetailAST = null;
+            final DetailAST detailAST = getDetailNode();
+            if (detailAST != null) {
+                childDetailAST = (DetailAST) detailAST.getFirstChild();
+                if (childDetailAST != null) {
+                    final SymTabAST child =
+                        SymTabASTFactory.create(childDetailAST);
+                    setFirstChild(child);
+                    child.setParent(this);
+                    child.setFile(getFile());
+                }
+            }
+        }
+        return super.getFirstChild(); 
+    }
+    
+    public AST getNextSibling()
+    {
+        if (super.getNextSibling() == null) {
+            DetailAST siblingDetailAST = null;
+            final DetailAST detailAST = getDetailNode();           
+            if (detailAST != null) {
+                siblingDetailAST = (DetailAST) detailAST.getNextSibling();
+                if (siblingDetailAST != null) {
+                    final SymTabAST sibling =
+                    SymTabASTFactory.create(siblingDetailAST);
+                    setNextSibling(sibling);
+//                    sibling.setParent(this.getParent());
+                    sibling.setFile(getFile());
+                }
+            }
+        }
+        return super.getNextSibling(); 
+    }
+
+    
+    /**
+     * initialized this node with input node
+     * @param aAST the node to initialize from. Must be a
+     * <code>DetailAST</code> object.
+     */
+    public void initialize(AST aAST)
+    {
+        if (aAST != null) {
+            super.initialize(aAST);
+            final DetailAST detailAST = (DetailAST) aAST;
+            setDetailNode(detailAST);
+            _column = detailAST.getColumnNo() + 1;
+            _line = detailAST.getLineNo();
+        } 
+    }
+        
+    /**
+     * Gets first occurence of the child node with a certain type
+     * @param type
+     * @return <code>SymTabAST</code>
+     * @see #getType()
+     */
+    public SymTabAST findFirstToken(int type) {
+        SymTabAST result = null;
+
+        AST sibling = getFirstChild();
+        while (sibling != null) {
+            if (sibling.getType() == type) {
+                result = (SymTabAST) sibling;
+                break;
+            }
+            sibling = sibling.getNextSibling();
+        }
+
+        return result;
+    }
+
+//  not used by Checkstyle
+//    /**
+//     * adds a node to the last position of this node children
+//     * @param child
+//     * @return <code>void</code>
+//     */
+//    public void addChild(SymTabAST child)
+//    {
+//        SymTabAST lastChild = (SymTabAST) getFirstChild();
+//        if (lastChild == null) {
+//            setFirstChild(child);
+//            child.setParent(this);
+//            child.setNextSibling(null);
+//        }
+//        else {
+//            while (lastChild.getNextSibling() != null) {
+//                lastChild = (SymTabAST) lastChild.getNextSibling();
+//            }
+//            lastChild.setNextSibling(child);
+//            child.setNextSibling(null);
+//            child.setParent(this);
+//        }
+//    }
+
+    /**
+     * Gets Iterator for this node
+     * @return <code>SymTabASTIterator</code>
+     */
+    public SymTabASTIterator getChildren()
+    {
+        return new SymTabASTIterator(this);
+    }
+
+    /**
+     * Returns the DetailAST associated with this node.
+     * @return the DetailAST associated with this node.
+     */
+    public DetailAST getDetailNode()
+    {
+        return detailNode;
+    }
+
+    /**
+     * Sets the DetailAST associated with this node.
+     * @param aDetailAST the DetailAST associated with this node.
+     */
+    public void setDetailNode(DetailAST aDetailAST)
+    {
+        detailNode = aDetailAST;
+        ASTManager.getInstance().put(aDetailAST, this);
+    }
+
+}
\ No newline at end of file
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/SymTabASTFactory.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/SymTabASTFactory.java
new file mode 100644
index 0000000..bc12758
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/SymTabASTFactory.java
@@ -0,0 +1,76 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import antlr.ASTFactory;
+import antlr.collections.AST;
+
+/**
+ * Factory for <code>SymTabAST</code> objects.
+ * @author Rick Giles
+ */
+public class SymTabASTFactory
+{
+    /** singleton factory */
+    private static ASTFactory factory;
+    
+    static
+    {
+        factory = new ASTFactory();
+        factory.setASTNodeClass(SymTabAST.class.getName());
+    }
+    
+    /**
+     * Creates a <code>SymTabAST</code> with a given type and text.
+     * @param aType the type for the new <code>SymTabAST</code>.
+     * @param aText the text for the new <code>SymTabAST</code>.
+     * @return the new <code>SymTabAST</code>.
+     */
+    public static SymTabAST create(int aType, String aText)
+    {
+        return (SymTabAST) factory.create(aType, aText);
+    }
+
+    /**
+     * Creates an <code>SymTabAST</code> from a given <code>AST</code>.
+     * @param aAST the <code>AST</code> for the new <code>SymTabAST</code>.
+     * @return the new <code>SymTabAST</code>.
+     */    
+    public static SymTabAST create(AST aAST)
+    {
+        return (SymTabAST) factory.create(aAST);
+    }
+    
+    ///CLOVER:OFF
+    /** prevent instantiation */
+    private SymTabASTFactory()
+    {
+    }
+    ///CLOVER:ON
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/SymTabASTIterator.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/SymTabASTIterator.java
new file mode 100644
index 0000000..b86351a
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/SymTabASTIterator.java
@@ -0,0 +1,95 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+/**
+ * An iterator for the children of a tree node.
+ *
+ * @version 1.0
+ * @since 1.0
+ * @see Iterator
+ */
+public class SymTabASTIterator implements Iterator {
+  private SymTabAST _current;
+
+  /**
+   * Creates a new <tt>SymTabASTIterator</tt>.
+   *
+   * @param parent the node whose children will be iterated over.
+   */
+  public SymTabASTIterator(SymTabAST parent) {
+    _current = (SymTabAST)parent.getFirstChild();
+  }
+
+  /**
+   * Whether the node has another child.  (In other words, returns
+   * <tt>true</tt> if <tt>next</tt> would return an element rather than
+   * throwing an exception.)
+   *
+   * @return the next child node.
+   */
+  public boolean hasNext() {
+    return (_current != null);
+  }
+
+  /**
+   * The next child node.
+   *
+   * @return the next child node.
+   */
+  public Object next() {
+    if (!hasNext()) {
+      throw new NoSuchElementException();
+    }
+
+    Object result = _current;
+    _current = (SymTabAST)_current.getNextSibling();
+
+    return result;
+  }
+
+  /**
+   * The next child node.
+   *
+   * @return the next child node.
+   */
+  public SymTabAST nextChild() {
+    return (SymTabAST)next();
+  }
+
+  /**
+   * Unsupported operation
+   */
+  public void remove() {
+    throw new UnsupportedOperationException();
+  }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/SymbolTable.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/SymbolTable.java
new file mode 100644
index 0000000..72cdcf9
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/SymbolTable.java
@@ -0,0 +1,274 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.io.File;
+import java.util.Hashtable;
+import java.util.Stack;
+
+
+
+
+/**
+ * this class contains all of the definitions, references, and scopes
+ * created by the system.
+ *
+ * Other stuff this class does:
+ * <ul>
+ * <li> holds the "base" scope containing primitive definitions
+ * <li> holds the java.lang package
+ * <li> holds the definition of java.lang.Object, which is the base class
+ *      of all class hierarchies
+ * <li> kicks off the resolve step
+ * <li> does some of the work of constructing object definitions
+ * </ul>
+ */
+
+public class SymbolTable {
+
+  private Hashtable packages = new Hashtable();
+  private Stack scopes = new Stack();
+  private ScopeIndex index = new ScopeIndex();
+
+  private File currentFile;
+  private BaseScope baseScope;
+
+  private SymTabAST root;
+
+//  private boolean outOfDate;
+
+  /**
+   * constructor takes <code>SymTabAST</code>
+   * @param aRoot root of the <code>SymTabAST</code> tree
+   */
+  public SymbolTable(SymTabAST aRoot) {
+    scopes = new Stack();
+    this.root = aRoot;
+
+    baseScope = new BaseScope( this );
+    pushScope(baseScope);
+  }
+
+  /**
+   * gets the root node
+   * @return <code>SymTabAST</code>
+   */
+  public SymTabAST getTree() {
+    return root;
+  }
+
+//  /**
+//   * sets the <code>outOfDate</code> data member to <code>true</code>
+//   * @return <code>void</code>
+//   */
+//  public void expire() {
+//    outOfDate = true;
+//  }
+//
+//  /**
+//   * sets <code>outOfDate</code> member to <code>false</code>
+//   * @param lastUpdated
+//   * @return <code>void</code>
+//   */
+//  public void update(long lastUpdated) {
+//    outOfDate = false;
+//  }
+
+  /**
+   * returns the "base" scope
+   *
+   * @return Scope the base scope
+   */
+  // REDTAG -- this should eventually be replaced by a call
+  //  to the lookup method that traverses scopes
+  public BaseScope getBaseScope() {
+    return baseScope;
+  }
+
+  /**
+   * returns the current scope.  Scopes are nested in a stack (FIFO queue)
+   * and pushed/popped based on the structure of the AST
+   * @return <code>Scope</code>
+   */
+  public Scope getCurrentScope() {
+    return (Scope)scopes.peek();
+  }
+
+  /**
+   * pushes a new scope onto the stack
+   *
+   * @param scope the <code>Scope</code> to push
+   * @return <code>void</code>
+   */
+  public void pushScope(Scope scope) {
+    scopes.push(scope);
+  }
+
+  /**
+   * pops a scope from the stack.
+   *
+   * @return <code>Scope</code>
+   *
+   */
+  public Scope popScope() {
+    Scope scope = (Scope)(scopes.pop());
+    return scope;
+  }
+
+  /**
+   * gets all packages stored in this symbol table
+   * @return <code>Hashtable</code>
+   */
+  public Hashtable getPackages() {
+    // REDTAG -- think about making this available as something simpler,
+    //           perhaps an enumeration
+    return packages;
+  }
+
+  /**
+   * gets package by its name
+   * @param name
+   * @return <code>PackageDef</code>
+   */
+  public PackageDef getPackage( String name ) {
+    return (PackageDef)(packages.get( name ));
+  }
+
+  /**
+   * adds <code>PackageDef</code> to its parent scope and stores the
+   * <code>PackageDef</code> in <code>packages</code>
+   * @param pkg
+   * @param parent
+   * @return <code>void</code>
+   */
+  public void definePackage( PackageDef pkg, Scope parent ) {
+    parent.addDefinition(pkg);
+    packages.put(pkg.getQualifiedName(), pkg);
+  }
+
+  /**
+   * defines a class in the symbol table.
+   *
+   * @param def the class to define
+   * @return <code>void</code>
+   * @see #indexScope(Scope)
+   * @see #getCurrentScope()
+   */
+  public void defineClass(ClassDef def) {
+    indexScope(def);
+    getCurrentScope().addDefinition(def);
+  }
+
+  /**
+   * defines a method in the symbol table
+   *
+   * @param method the method to be defined
+   * @return <code>void</code>
+   * @see #indexScope(Scope)
+   * @see #getCurrentScope()
+   */
+  public void defineMethod(MethodDef method) {
+    indexScope(method);
+    ((ClassDef)getCurrentScope()).addDefinition(method);
+  }
+
+  /**
+   * defines a variable in the symbol table
+   *
+   * @param v the variable to define
+   * @return <code>void</code>
+   * @see #getCurrentScope()
+   */
+  public void defineVariable(VariableDef v) {
+    getCurrentScope().addDefinition(v);
+  }
+
+  /**
+   * defines a block within the symbol table
+   *
+   * @param blockDef the block to define
+   * @return <code>void</code>
+   * @see #indexScope(Scope)
+   * @see #getCurrentScope()
+   */
+  public void defineBlock(BlockDef blockDef) {
+    indexScope(blockDef);
+    getCurrentScope().addDefinition(blockDef);
+  }
+
+  /**
+   * defines a label within the symbol table
+   *
+   * @param labelDef the label to define
+   * @return <code>void</code>
+   * @see #getCurrentScope()
+   */
+  // REDTAG -- label does not define a new scope
+  public void defineLabel(LabelDef labelDef) {
+    getCurrentScope().addDefinition(labelDef);
+  }
+
+  /**
+   * places a scope in the symbol table's index
+   *
+   * @param scope the scope to index
+   * @return <code>void</code>
+   */
+  public void indexScope(Scope scope) {
+    index.addScope(scope);
+  }
+
+  /**
+   * gets the symbol table's scope index
+   *
+   * @return ScopeIndex
+   */
+  public ScopeIndex getScopeIndex() {
+    return index;
+  }
+
+  /**
+   * sets the current file that the symbol table is processing
+   *
+   * @param file the <code>File</code> to use
+   * @return <code>void</code>
+   */
+  public void setCurrentFile(File file) {
+    currentFile = file;
+  }
+
+  /**
+   * gets the file that the symbol table is currently processing
+   *
+   * @return <code>File</code>
+   */
+  public File getCurrentFile() {
+    return currentFile;
+  }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/SymbolTableException.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/SymbolTableException.java
new file mode 100644
index 0000000..7035e79
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/SymbolTableException.java
@@ -0,0 +1,35 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+public class SymbolTableException extends Exception {
+  public SymbolTableException(String message) {
+    super(message);
+  }
+}
\ No newline at end of file
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/TableMaker.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/TableMaker.java
new file mode 100644
index 0000000..f91124b
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/TableMaker.java
@@ -0,0 +1,1460 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import java.io.File;
+import java.util.Enumeration;
+import java.util.Vector;
+
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+
+
+
+/**
+ * this is the class that does the work of the "walking" step --
+ * going through the SymTabAST and constructing the definitions and
+ * references.  The SymTabAST is constructed in a DOMish fashion, i.e.
+ * each node knows about its first child and its next sibling.  The
+ * DFS search is carried out by two functions -- walkTree, which
+ * deals with a single SymTabAST node, and walkSibilngs, which deals with
+ * all the siblings of an SymTabAST node.
+ */
+
+public class TableMaker {
+  private SymbolTable symbolTable;
+  private SymTabAST _tree;
+  private File currentFile;
+  private Vector imports = new Vector();
+
+  /**
+   * Constructor for the TableMaker class
+   *
+   * @param tree is the<code>SymTabAST</code> from which to
+   * build the <code>TableMaker</code>. It is the tree which wil be walked
+   * in order to build definitions and references.
+   */
+  public TableMaker(SymTabAST tree)
+  {
+    _tree = tree;
+  }
+
+  /**
+   * returns the <code> SymTabAST </code> which is the
+   * SymTabAST generated from the parsed Java Source files.
+   *
+   * @return <code>SymTabAST</code>
+   */
+  public SymTabAST getTree() {
+    return _tree;
+  }
+
+  /**
+   * returns the <code>SymbolTable</code> that has been constructed by
+   * this <code>TableMaker</code>
+   *
+   * @return <code>SymbolTable</code>
+   * @throws <code>SymbolTableException</code>
+   */
+  public SymbolTable getTable() throws SymbolTableException {
+    if (symbolTable == null) {
+      symbolTable = new SymbolTable( _tree );
+
+      createDefinitions();
+
+      resolveReferences();
+    }
+
+    return symbolTable;
+  }
+
+  /**
+   * walks the tree and finishes creating definitions.
+   *
+   * @return <code>void</code>
+   * @throws <code>SymbolTableException</code>
+   * @see #walkTree()
+   * @see #finishCreatingDefinitions()
+   */
+  private void createDefinitions() throws SymbolTableException {
+    walkTree();
+    finishCreatingDefinitions();
+  }
+
+  /**
+   * finishes up creating definitions process
+   * starts at the base of the Table
+   *
+   * @return <code>void</code>
+   * @throws <code>SymbolTableException</code>
+   * @see net.sourceforge.transmogrify.symtab.SymbolTable
+   * @see #finishCreatingDefinition(Definition)
+   */
+  private void finishCreatingDefinitions() throws SymbolTableException {
+    finishCreatingDefinition(symbolTable.getBaseScope());
+  }
+
+  /**
+   * begins at the base of the Table and starts finishing definition creation.
+   *
+   * @param def <code>Definition</code> needs to be completed
+   * @return <code>void</code>
+   * @throws <code>SymbolTableException</code>
+   * @see ClassFinisher
+   * @see VariableFinisher
+   * @see MethodFinisher
+   * @see CatchFinisher
+   */
+  private void finishCreatingDefinition(Definition def) throws SymbolTableException {
+
+    if (def instanceof AnonymousInnerClass) {
+      AnonymousInnerClass innerClass = (AnonymousInnerClass)def;
+      innerClass.finishMakingDefinition();
+    }
+    else if (def instanceof ClassDef) {
+      new ClassFinisher(def).finish();
+    }
+    else if ( def instanceof VariableDef ) {
+      new VariableFinisher( def ).finish();
+    }
+    else if (def instanceof DefaultConstructor) {}
+    else if ( def instanceof MethodDef ) {
+      new MethodFinisher( def ).finish();
+    }
+    else if (def instanceof BlockDef) {
+      SymTabAST firstChild = (SymTabAST)def.getTreeNode().getFirstChild();
+      //handle Checkstyle grammar
+      if (firstChild.getType() == TokenTypes.LPAREN) {
+          firstChild = (SymTabAST) firstChild.getNextSibling();
+      }
+      if (firstChild.getType() == TokenTypes.PARAMETER_DEF) {
+        // this is a catch block
+        new CatchFinisher((BlockDef)def).finish();
+      }
+    }
+
+    if ( def instanceof Scope ) {
+      finishCreatingChildren((Scope)def);
+    }
+  }
+
+
+  /**
+   * iterates through all the definitions in the <code> Scope </code>
+   * finishes creating each <code>Scope</code>.
+   *
+   * @param scope <code> Scope </code> where defininitions will be finished.
+   * @return <code>void</code>
+   * @throws <code>SymbolTableException</code>
+   * @see net.sourceforge.transmogrify.symtab.Scope
+   * @see #finishCreatingDefinition(Definition)
+   */
+  private void finishCreatingChildren( Scope scope ) throws SymbolTableException {
+    Enumeration definitions = scope.getDefinitions();
+    while ( definitions.hasMoreElements() ) {
+      Definition child = (Definition)(definitions.nextElement());
+      finishCreatingDefinition(child);
+    }
+  }
+
+  /**
+   * resolves <code>SymbolTable</code> using <code>Resolver</code>
+   *
+   * @return <code>void</code>
+   * @see net.sourceforge.transmogrify.symtab.Resolver
+   * @see net.sourceforge.transmogrify.symtab.SymbolTable
+   */
+  private void resolveReferences() {
+    new Resolver( symbolTable ).resolve();
+  }
+
+  /**
+   * starts walking the <code> SymTabAST </code>
+   *
+   * @return <code>void</code>
+   * @see #walkSiblings(SymTabAST,boolean)
+   * @see net.sourceforge.transmogrify.symtab.antlr.SymTabAST
+   */
+  public void walkTree() {
+    walkSiblings((SymTabAST)_tree.getFirstChild(), false);
+  }
+
+  /**
+   * processes a single SymTabAST node based on its type and passes of its
+   * children for further processing where appropriate.
+   *
+   * @param tree the <code>SymTabAST</code> node to process
+   * @param makeAnonymousScopes sets to <code>false</code> after walking Class,
+   *                            Methods and Try otherwise sets to <code>true</code>
+   * @return <code>void</code>
+   * @see #walkSiblings(SymTabAST, boolean)
+   * @see #processAnonymousInnerClass(SymTabAST, SymTabAST)
+   * @see #processBlock(SymTabAST, boolean)
+   * @see #processClass(SymTabAST)
+   * @see #processConstructorDef(SymTabAST)
+   * @see #processElse(SymTabAST)
+   * @see #processFile(SymTabAST)
+   * @see #processFinally(SymTabAST)
+   * @see #processFor(SymTabAST)
+   * @see #processImplicitPackage(SymTabAST)
+   * @see #processImport(SymTabAST)
+   * @see #processLabel(SymTabAST)
+   * @see #processMethodDef(SymTabAST)
+   * @see #processPackage(SymTabAST)
+   * @see #processTry(SymTabAST)
+   * @see net.sourceforge.transmogrify.symtab.antlr.SymTabAST
+   * @see net.sourceforge.transmogrify.symtab.antlr.JavaTokenTypes
+   */
+  public void walkTree(SymTabAST tree, boolean makeAnonymousScopes) {
+
+    if (tree != null) {
+
+      tree.setScope( symbolTable.getCurrentScope() );
+
+      switch(tree.getType()) {
+      case 0:
+        processFile(tree);
+        if ( tree.getFirstChild().getType() != TokenTypes.PACKAGE_DEF ) {
+          processImplicitPackage( tree.getFile() );
+        }
+
+        walkSiblings((SymTabAST)tree.getFirstChild(), false);
+
+        // pop package scope
+        symbolTable.popScope();
+        clearImports();
+        break;
+
+      case TokenTypes.LITERAL_NEW:
+        SymTabAST symtabTree = tree;
+        //walk parameters, in case of anonymous inner class
+        walkTree(symtabTree.findFirstToken(TokenTypes.ELIST),
+          makeAnonymousScopes);
+        SymTabAST objblock
+          = symtabTree.findFirstToken(TokenTypes.OBJBLOCK);
+        if (objblock != null) {
+          SymTabAST classExtended
+            = symtabTree.findFirstToken(TokenTypes.IDENT);
+
+          processAnonymousInnerClass(objblock, classExtended);
+        }
+        break;
+
+      case TokenTypes.SLIST:
+        if (makeAnonymousScopes) {
+          processBlock(tree, true);
+        }
+        else {
+          walkSiblings((SymTabAST)tree.getFirstChild(), true);
+        }
+        break;
+
+      case TokenTypes.CTOR_DEF:
+        processConstructorDef(tree);
+        break;
+
+      case TokenTypes.METHOD_DEF:
+        processMethodDef(tree);
+        break;
+
+      case TokenTypes.LITERAL_FINALLY:
+        processFinally(tree);
+        break;
+
+      case TokenTypes.LITERAL_TRY:
+        processTry(tree);
+        break;
+
+      case TokenTypes.VARIABLE_DEF:
+        processVariableDef(tree);
+        break;
+
+      case TokenTypes.PACKAGE_DEF:
+        processPackage(tree);
+        break;
+
+      case TokenTypes.LABELED_STAT:
+        processLabel(tree);
+        break;
+
+      case TokenTypes.IMPORT:
+        processImport(tree);
+        break;
+
+      case TokenTypes.CLASS_DEF:
+      case TokenTypes.INTERFACE_DEF:
+        processClass(tree);
+        break;
+
+      case TokenTypes.LITERAL_FOR:
+        processFor(tree);
+        break;
+
+      case TokenTypes.LITERAL_IF:
+        processIf(tree);
+        break;
+      
+      case TokenTypes.LITERAL_ASSERT:
+        processAssert(tree);
+        break;
+
+      case TokenTypes.LITERAL_CATCH:
+      case TokenTypes.LITERAL_WHILE:
+      case TokenTypes.LITERAL_SWITCH:
+      case TokenTypes.LITERAL_DO:
+      case TokenTypes.LITERAL_SYNCHRONIZED:
+      case TokenTypes.STATIC_INIT:
+      case TokenTypes.INSTANCE_INIT:
+        processBlock(tree, false);
+        break;
+
+      default:
+        walkSiblings((SymTabAST)tree.getFirstChild(), false);
+      }
+    }
+  }
+
+  /**
+ * @param tree
+ */
+public void processAssert(SymTabAST tree) {
+    BlockDef block = makeBlock(tree);
+
+    SymTabAST expr = tree.findFirstToken(TokenTypes.EXPR);
+    SymTabAST message = (SymTabAST)expr.getNextSibling();
+    while ((message != null) && (message.getType() != TokenTypes.EXPR)) {
+        message = (SymTabAST) message.getNextSibling();
+    }
+
+
+    symbolTable.pushScope( block );
+    walkTree(expr, false);
+    if (message != null) {  
+        walkTree(message, false);
+    }
+    symbolTable.popScope();   
+}
+
+/**
+   * processes the given <code>SymTabAST</code> and each of its siblings
+   *
+   * @param tree <code>SymTabAST</code> node to process
+   * @param makeAnonymousScopes
+   *
+   * @return <code>void</code>
+   * @see #walkTree(SymTabAST, boolean)
+   * @see net.sourceforge.transmogrify.symtab.antlr.SymTabAST
+   */
+  public void walkSiblings(SymTabAST tree, boolean makeAnonymousScopes) {
+    while(tree != null) {
+      walkTree(tree, makeAnonymousScopes);
+      tree = (SymTabAST)tree.getNextSibling();
+    }
+  }
+
+  /**
+   * processes the given <code>SymTabAST</code> as a package defintion
+   *
+   * @param tree the <code>SymTabAST</code> to process
+   * @return <code>void</code>
+   * @see net.sourceforge.transmogrify.symtab.antlr.SymTabAST
+   * @see net.sourceforge.transmogrify.symtab.PackageDef
+   * @see net.sourceforge.transmogrify.symtab.SymbolTable
+   */
+  public void processPackage(SymTabAST tree) {
+    SymTabAST firstChild = (SymTabAST)tree.getFirstChild();
+
+    String name = ASTUtil.constructDottedName(firstChild);
+    firstChild.ignoreChildren();
+
+    PackageDef pkg = symbolTable.getPackage(name);
+
+    if (pkg == null) {
+      pkg = createPackage( (SymTabAST)(tree.getFirstChild()) );
+    }
+
+    symbolTable.pushScope(pkg);
+  }
+
+  /**
+   * processes a java class that use default no package
+   *
+   * @param file <code>File</code> object of the java class
+   * @return <code>void</code>
+   * @see net.sourceforge.transmogrify.symtab.PackageDef
+   * @see net.sourceforge.transmogrify.symtab.SymbolTable
+   */
+  public void processImplicitPackage( File file ) {
+    String name = file.getParent();
+    if (name == null) {
+        name = "";
+    }
+    PackageDef pkg = symbolTable.getPackage( name );
+
+    if ( pkg == null ) {
+      pkg = new PackageDef( name, symbolTable.getBaseScope(), null );
+      symbolTable.definePackage( pkg, symbolTable.getBaseScope() );
+    }
+
+    symbolTable.pushScope( pkg );
+  }
+
+  /**
+   * gets the package represented by the tree.  The method
+   * analyzes the tree, constructs an appropriate package name
+   * and fetches it from the internal package list. If the package does not
+   * exist it is created.
+   *
+   * @param tree <code>SymTabAST</code> to consider
+   *
+   * @return <code>PackageDef</code> the resulting package definition
+   * @see #getPackage(Scope, SymTabAST)
+   */
+  private PackageDef createPackage( SymTabAST tree ) {
+    PackageDef result = null;
+
+    if (tree.getType() == TokenTypes.DOT) {
+      // find the package result of left child
+      SymTabAST leftChild = (SymTabAST)tree.getFirstChild();
+      SymTabAST rightChild = (SymTabAST)leftChild.getNextSibling();
+
+      PackageDef context = createPackage(leftChild);
+      result = getPackage( context, rightChild );
+    }
+    else {
+      result = getPackage(symbolTable.getBaseScope(), tree);
+    }
+
+    return result;
+  }
+
+  /**
+   * gets the package determined by the tree and parent package def.
+   * The method analyzes the tree and parent scope and retrieves the
+   * appropriate package definition from the internal package list.
+   * If the package does not exist it is created.
+   *
+   * @param tree <code>SymTabAST</code> to consider
+   * @param parent the parent package definition
+   *
+   * @return PackageDef the resulting package definition
+   * @see net.sourceforge.transmogrify.symtab.PackageDef
+   * @see net.sourceforge.transmogrify.symtab.SymbolTable
+   * @see net.sourceforge.transmogrify.symtab.antlr.SymTabAST
+   */
+  private PackageDef getPackage(Scope parent, SymTabAST tree ) {
+    String name = tree.getText();
+    PackageDef result = null;
+    if (!(parent instanceof BaseScope)) {
+      result = symbolTable.getPackage(parent.getQualifiedName() + "." + name);
+    }
+    else {
+      result = symbolTable.getPackage(name);
+    }
+
+    if (result == null) {
+      result = new PackageDef(tree.getText(), parent, tree);
+      symbolTable.definePackage(result, parent);
+    }
+
+    return result;
+  }
+
+  /**
+   * process the given <code>SymTabAST</code> as a file definition
+   *
+   * @param tree the <code>SymTabAST</code> to process
+   * @return <code>void</code>
+   * @see #setCurrentFile(String)
+   */
+  public void processFile(SymTabAST tree) {
+    setCurrentFile(tree.getText());
+  }
+
+  /**
+   * adds the given <code>SymTabAST</code> to <code>imports</code> member
+   *
+   * @param tree the <code>SymTabAST</code> to process
+   * @return <code>void</code>
+   */
+  public void processImport(SymTabAST tree) {
+    imports.add( tree );
+  }
+
+  /**
+   * clears the <code>imports</code> member
+   * @return <code>void</code>
+   */
+  private void clearImports() {
+    imports.clear();
+  }
+
+  /**
+   * process the given SymTabAST as a label definition
+   *
+   * @param tree the SymTabAST to process
+   * @return <code>void</code>
+   * @see com.trwx.symtab.antlr.SymTabAST
+   * @see net.sourceforge.transmogrify.symtab.LabelDef
+   * @see #walkTree(SymTabAST, boolean)
+   */
+  public void processLabel(SymTabAST tree) {
+    String name = tree.findFirstToken(TokenTypes.IDENT).getText();
+    LabelDef label = new LabelDef( name, symbolTable.getCurrentScope(),
+           tree );
+    symbolTable.defineLabel( label );
+
+    walkTree((SymTabAST)tree.getFirstChild().getNextSibling(), false);
+  }
+
+  /**
+   * process the given <code>SymTabAST</code> as a class definition
+   *
+   * @param tree the <code>SymTabAST</code> to process
+   * @return <code>void</code>
+   * @see #makeClass(String, SymTabAST)
+   * @see #walkSiblings(SymTabAST, boolean)
+   * @see net.sourceforge.transmogrify.symtab.antlr.SymTabAST
+   */
+  public void processClass(SymTabAST tree) {
+    String name = tree.findFirstToken(TokenTypes.IDENT).getText();
+
+    makeClass(name, tree);
+    final SymTabAST objblock =
+        tree.findFirstToken(TokenTypes.OBJBLOCK);
+    SymTabAST start = (SymTabAST)objblock.getFirstChild();
+    if (start != null) {
+        //skip LPAREN
+        if (start.getType() == TokenTypes.LPAREN) {
+            start = (SymTabAST)start.getNextSibling();
+        }
+        walkSiblings(start, false);
+    }
+    
+    symbolTable.popScope();
+  }
+
+  /**
+   * creates <code>ClassDef</code> for the current class node and add it to the
+   * symbol table
+   * @param name name of the class
+   * @param tree current node to be processed
+   * @return <code>void</code>
+   * @see net.sourceforge.transmogrify.symtab.ClassDef
+   * @see net.sourceforge.transmogrify.symtab.SymbolTable
+   */
+  public void makeClass(String name, SymTabAST tree) {
+    ClassDef def = new ClassDef(name, symbolTable.getCurrentScope(), tree);
+    def.addUnprocessedImports(imports);
+    symbolTable.defineClass(def);
+    symbolTable.pushScope(def);
+  }
+
+  /**
+   * processes anonymous inner class encountered in the tree
+   * @param objblock the anonymous block
+   * @param classExtended
+   * @return <code>void</code>
+   * @see net.sourceforge.transmogrify.symtab.AnonymousInnerClass
+   * @see net.sourceforge.transmogrify.symtab.SymbolTable
+   */
+  public void processAnonymousInnerClass(SymTabAST objblock,
+                                         SymTabAST classExtended) {
+    ClassDef def = new AnonymousInnerClass(objblock,
+                                           classExtended,
+                                           symbolTable.getCurrentScope());
+    symbolTable.defineClass(def);
+    symbolTable.pushScope(def);
+    walkSiblings((SymTabAST)objblock.getFirstChild(), false);
+    symbolTable.popScope();
+  }
+
+  /**
+   * process the given SymTabAST as a variable definition
+   *
+   * @param tree the SymTabAST to process
+   * @return <code>void</code>
+   * @see net.sourceforge.transmogrify.symtab.VariableDef
+   * @see net.sourceforge.transmogrify.symtab.SymbolTable
+   * @see net.sourceforge.transmogrify.symtab.antlr.SymTabAST
+   * @see #makeVariableDef(SymTabAST, Scope)
+   * @see #walkTree(SymTabAST, boolean)
+   */
+  private void processVariableDef(SymTabAST tree) {
+    VariableDef def = makeVariableDef( tree, symbolTable.getCurrentScope() );
+    symbolTable.defineVariable(def);
+    SymTabAST assignmentNode
+      = tree.findFirstToken(TokenTypes.ASSIGN);
+    if (assignmentNode != null) {
+      walkTree((SymTabAST)assignmentNode.getFirstChild(), false);
+    }
+  }
+
+  /**
+   * creates <code>VariableDef</code> based on the current tree node and scope
+   * @param tree the current tree node
+   * @param scope the current scope
+   * @return <code>VariableDef</code>
+   * @see net.sourceforge.transmogrify.symtab.VariableDef
+   */
+  public VariableDef makeVariableDef(SymTabAST tree, Scope scope) {
+    String name = tree.findFirstToken(TokenTypes.IDENT).getText();
+    VariableDef result = new VariableDef(name, scope, tree);
+
+    return result;
+  }
+
+  /**
+   * process the given SymTabAST as a try block
+   *
+   * @param tree the SymTabAST to process
+   * @return <code>void</code>
+   * @see #makeBlock(SymTabAST)
+   * @see net.sourceforge.transmogrify.symtab.antlr.SymTabAST
+   * @see #walkTree(SymTabAST, boolean)
+   * @see #walkSiblings(SymTabAST, boolean)
+   */
+  public void processTry(SymTabAST tree){
+    BlockDef block = makeBlock(tree);
+
+    SymTabAST slist = tree.findFirstToken(TokenTypes.SLIST);
+    SymTabAST everythingElse = (SymTabAST)slist.getNextSibling();
+
+    symbolTable.pushScope( block );
+    walkTree( slist, false );
+    symbolTable.popScope();
+
+    walkSiblings( everythingElse, false );
+  }
+
+  /**
+   * process the given SymTabAST as a finally block
+   *
+   * @param tree the SymTabAST to process
+   * @return <code>void</code>
+   * @see #makeBlock(SymTabAST)
+   * @see #walkTree(SymTabAST, boolean)
+   */
+  public void processFinally(SymTabAST tree){
+    BlockDef block = makeBlock(tree);
+
+    SymTabAST slist = tree.findFirstToken(TokenTypes.SLIST);
+    SymTabAST tryBlock = tree.findFirstToken(TokenTypes.LITERAL_TRY);
+
+    symbolTable.pushScope( block );
+    walkTree( slist, false );
+    symbolTable.popScope();
+
+    walkTree( tryBlock, false );
+  }
+
+
+  /**
+   * process the given SymTabAST as a method definition
+   *
+   * @param tree the SymTabAST to process
+   * @return <code>void</code>
+   * @see net.sourceforge.transmogrify.symtab.MethodDef
+   * @see net.sourceforge.transmogrify.symtab.SymbolTable
+   * @see #walkTree(SymTabAST, boolean)
+   */
+  public void processMethodDef(SymTabAST tree) {
+    String name = tree.findFirstToken(TokenTypes.IDENT).getText();
+    MethodDef method = new MethodDef(name, symbolTable.getCurrentScope(),
+                                     tree);
+    symbolTable.defineMethod( method );
+
+    symbolTable.pushScope( method );
+    walkTree(tree.findFirstToken(TokenTypes.SLIST), false);
+    symbolTable.popScope();
+  }
+
+  /**
+   * process the given SymTabAST as a constructor definition
+   *
+   * @param tree the SymTabAST to process
+   * @return <code>void</code>
+   * @see net.sourceforge.transmogrify.symtab.MethodDef
+   * @see net.sourceforge.transmogrify.symtab.SymbolTable
+   * @see #walkTree(SymTabAST, boolean)
+   */
+  public void processConstructorDef(SymTabAST tree) {
+    processMethodDef(tree);
+  }
+
+  /**
+   * process the given SymTabAST as a for block
+   *
+   * @param tree the SymTabAST to process
+   * @return <code>void</code>
+   * @see #makeBlock(SymTabAST)
+   * @see #walkTree(SymTabAST, boolean)
+   */
+  public void processFor(SymTabAST tree) {
+    BlockDef block = makeBlock(tree);
+
+    symbolTable.pushScope( block );
+    SymTabAST body;
+    SymTabAST forEach = tree.findFirstToken(TokenTypes.FOR_EACH_CLAUSE);
+    if (forEach != null) {
+        walkTree(forEach, false);
+        body = (SymTabAST)forEach.getNextSibling();
+    }
+    else {
+        walkTree(tree.findFirstToken(TokenTypes.FOR_INIT), false);
+        walkTree(tree.findFirstToken(TokenTypes.FOR_CONDITION), false);
+
+        SymTabAST forIter = tree.findFirstToken(TokenTypes.FOR_ITERATOR);
+        walkTree(forIter, false);
+        body = (SymTabAST)forIter.getNextSibling();
+    }
+
+    //handle Checkstyle grammar
+    if (body.getType() == TokenTypes.RPAREN) {
+        body = (SymTabAST) body.getNextSibling();
+    }
+    walkTree(body, false);
+    symbolTable.popScope();
+  }
+
+  /**
+   * process the given SymTabAST as an if block
+   *
+   * @param tree the SymTabAST to process
+   * @return <code>void</code>
+   * @see #makeBlock(SymTabAST)
+   * @see #walkTree(SymTabAST, boolean)
+   * @see #processElse(SymTabAST)
+   */
+  public void processIf(SymTabAST tree) {
+    BlockDef block = makeBlock(tree);
+
+    SymTabAST expr = tree.findFirstToken(TokenTypes.EXPR);
+    SymTabAST ifBranch = (SymTabAST)expr.getNextSibling();
+    // handle Checkstyle grammar
+    if (ifBranch.getType() == TokenTypes.RPAREN) {
+        ifBranch = (SymTabAST) ifBranch.getNextSibling();
+    }
+    SymTabAST elseBranch = (SymTabAST)ifBranch.getNextSibling();
+    // handle Checkstyle grammar
+    if ((elseBranch != null) && (elseBranch.getType() == TokenTypes.SEMI)) {
+            elseBranch = (SymTabAST) elseBranch.getNextSibling();
+    }
+    if ((elseBranch != null) && (elseBranch.getType() == TokenTypes.LITERAL_ELSE)) {
+        elseBranch = (SymTabAST) elseBranch.getFirstChild();
+    }
+
+    symbolTable.pushScope( block );
+    walkTree(expr, false);
+    walkTree(ifBranch, false);
+    symbolTable.popScope();
+
+    processElse(elseBranch);
+  }
+
+  /**
+   * process the given SymTabAST as an else block
+   *
+   * @param tree the SymTabAST to process
+   * @return <code>void</code>
+   * @see #processIf(SymTabAST)
+   * @see #makeElseBlock(SymTabAST)
+   */
+  public void processElse(SymTabAST tree) {
+    if (tree != null) {
+      if (tree.getType() == TokenTypes.LITERAL_IF) {
+        processIf(tree);
+      }
+      else {
+        makeElseBlock(tree);
+      }
+    }
+  }
+
+  /**
+   * defines an anonymous block to enclose the scope of an else block
+   *
+   * @param tree the SymTabAST to process
+   * @return <code>void</code>
+   * @see #makeBlock(SymTabAST)
+   * @see #walkTree(SymTabAST, boolean)
+   */
+  public void makeElseBlock(SymTabAST tree) {
+    if (tree.getType() == TokenTypes.SLIST) {
+      BlockDef block = makeBlock(tree);
+      symbolTable.pushScope( block );
+      walkTree(tree, false);
+      symbolTable.popScope();
+    }
+    else {
+      walkTree(tree, false);
+    }
+  }
+
+  /**
+   * processes the current tree node as BlockDef
+   * @param tree current tree node
+   * @param makeAnonymousScopes
+   * @return <code>void</code>
+   */
+  public void processBlock(SymTabAST tree, boolean makeAnonymousScopes) {
+    BlockDef block = makeBlock(tree);
+    symbolTable.pushScope(block);
+    //handle Checkstyle grammar
+    SymTabAST child = (SymTabAST)tree.getFirstChild();
+    if ((child != null) && (child.getType() == TokenTypes.LPAREN)) {
+        child = (SymTabAST) child.getNextSibling();
+    }
+    walkSiblings(child, makeAnonymousScopes);
+    symbolTable.popScope();
+  }
+
+  /**
+   * set the current file to the named file
+   *
+   * @param fileName the name of the file
+   * @return <code>void</code>
+   */
+  public void setCurrentFile(String fileName) {
+    currentFile = new File(fileName);
+    symbolTable.setCurrentFile(currentFile);
+  }
+
+
+  /**
+   * creates a new <code> BlockDef </code> in the SymbolTable
+   *
+   * @param tree is a <code> SymTabAST </code> whose root begins the new block
+   * @return <code> BlockDef </code>
+   * @see net.sourceforge.transmogrify.symtab.BlockDef
+   * @see net.sourceforge.transmogrify.symtab.SymbolTable
+   */
+  private BlockDef makeBlock( SymTabAST tree ) {
+    BlockDef block = new BlockDef( symbolTable.getCurrentScope(), tree );
+    symbolTable.defineBlock( block );
+    return block;
+  }
+
+  /**
+   * returns the <code>SymTabAST</code> that contains the parameter classDef's
+   * extends nodes
+   *
+   * @param classDef is a <code> ClassDef </code> whose extends nodes we want
+   * @return <code> SymTabAST </code>
+   */
+  public static SymTabAST getExtendsNode(ClassDef classDef) {
+    SymTabAST result = null;
+    SymTabAST extendsClause = null;
+
+    SymTabAST classDefTreeNode = classDef.getTreeNode();
+    extendsClause =
+      classDefTreeNode.findFirstToken(TokenTypes.EXTENDS_CLAUSE);
+
+    if (extendsClause != null) {
+      result = (SymTabAST)(extendsClause.getFirstChild());
+    }
+
+    return result;
+  }
+
+  /**
+   * Superclass for different kind of XXXFinisher subclass
+   * @see CatchFinisher
+   * @see ClassFinisher
+   * @see DefinitionFinisher
+   * @see MethodFinisher
+   * @see VariableFinisher
+   */
+  class DefinitionFinisher {
+
+    protected SymTabAST _node = null;
+
+    /**
+    * Constructor. It finishes the definition passed to it
+    *
+    */
+    public DefinitionFinisher( Definition def ) {
+      _node = def.getTreeNode();
+    }
+
+    public void finish() throws SymbolTableException {}
+
+    /**
+     * gets the classDef that represents the type of the given definition
+     *
+     *
+     * @param def the definition whose type to find
+     * @param typeNode the TokenTypes.TYPE node associated with the def
+     *
+     * @return the resulting class definition
+     */
+    protected IClass getType( Definition def, SymTabAST typeNode ) {
+      IClass result = null;
+
+      SymTabAST typeClassNode = null;
+      boolean isArray = false;
+
+      if ( typeNode.getFirstChild().getType()
+           == TokenTypes.ARRAY_DECLARATOR ) {
+        isArray = true;
+        typeClassNode = (SymTabAST)typeNode.getFirstChild().getFirstChild();
+      }
+      else {
+        typeClassNode = (SymTabAST)typeNode.getFirstChild();
+      }
+
+      Scope lookupScope = null;
+
+      if (def instanceof Scope) {
+         lookupScope = (Scope)def;
+      }
+      else {
+         lookupScope = def.getParentScope();
+      }
+
+      Resolver resolver = new Resolver(symbolTable);
+      IClass typeClass = resolver.resolveClass(typeClassNode, lookupScope, null, false);
+
+      if ( isArray ) {
+        result = new ArrayDef( typeClass );
+      }
+      else {
+        result = typeClass;
+      }
+
+      return result;
+    }
+
+  }
+
+  class ClassFinisher extends DefinitionFinisher {
+
+    private ClassDef _def = null;
+
+    /**
+    * Constructor. Creates a ClassFinisher from a <code> Definition </code>
+    *
+    * @param def is a <code> Definition </code>
+    */
+    public ClassFinisher( Definition def ) {
+      super( def );
+      _def = (ClassDef)def;
+    }
+
+    /**
+    * Completes all tasks required for finishing a ClassDef
+    * Including adding imports, setting super classes and adding
+    * interfaces.
+    * @return <code>void</code>
+    * @throws <code>SymbolTableException</code>
+    * @see #addImports()
+    * @see #setSuperclass()
+    * @see #addInterfaces()
+    */
+    public void finish() throws SymbolTableException {
+      if ( _node != null ) {
+        addImports();
+        setSuperclass();
+        addInterfaces();
+      }
+    }
+
+    /**
+    * Adds all packages and classes that are imported by this class
+    * to the class for later reference
+    */
+    private void addImports() throws ClassImportException {
+      IPackage java = new ExternalPackage("java", null);
+      IPackage lang = new ExternalPackage("lang", java);
+      java.addDefinition(lang);
+      _def.importPackage(lang);
+
+      Vector unprocessedImports = _def.getUnprocessedImports();
+      for ( int i = 0; i < unprocessedImports.size(); i++ ) {
+        SymTabAST importNode = (SymTabAST)unprocessedImports.get(i);
+        SymTabAST imported = (SymTabAST)importNode.getFirstChild();
+        SymTabAST lastPart = (SymTabAST)imported.getFirstChild().getNextSibling();
+
+        DotIterator it = new DotIterator(imported);
+        SymTabAST current = null;
+        String className = null;
+        IClass importedClass = null;
+
+        // attempt at each token to find the class
+        //   first in source
+        //   then on classpath
+        //
+        // if there are more tokens left
+        //   continue until you hit the last token
+        //   if it's a star
+        //     import all inner classes
+        //   else
+        //     import the explicitly named inner class
+        // else import the class
+        //
+        // if no classes were found, import the package
+
+        while(it.hasNext()) {
+          current = it.nextNode();
+          if (className == null) {
+            className = current.getText();
+          }
+          else {
+            if (!current.getText().equals("*")) {
+              className += "." + current.getText();
+            }
+            else {
+              break;
+            }
+          }
+          importedClass = findOrLoadClass(className, importedClass);
+
+          if (importedClass != null) {
+            break;
+          }
+        }
+
+        if (it.hasNext()) {
+          boolean isImported = false;
+          while(it.hasNext()) {
+            current = it.nextNode();
+            if (current.getText().equals("*")) {
+              importInnerClasses(importedClass);
+              isImported = true;
+            }
+            else {
+              className += "$" + current.getText();
+              importedClass = findOrLoadClass(className, importedClass);
+            }
+          }
+          if (!isImported) {
+            _def.importClass(importedClass);
+          }
+        }
+        else {
+          if (importedClass != null) {
+            _def.importClass(importedClass);
+          }
+          else {
+            if (current != null && current.getText().equals("*")) {
+              IPackage pkg = symbolTable.getPackage(className);
+              if (pkg == null) {
+                pkg = getPackage(className);
+              }
+              _def.importPackage(pkg);
+            }
+            else {
+              //TODO: can we safely ignore this?
+              //throw new ClassImportException(className);
+              ;
+            }
+          }
+        }
+
+        // now set definitions where appropriate
+        imported.ignoreChildren();
+        if ((lastPart.getType() == TokenTypes.IDENT)
+            //TODO: guard added for class not loaded
+            //This is OK for single file processing, but not
+            //multiple files.
+            && (importedClass != null)
+            )
+        {
+          lastPart.setDefinition(importedClass, null, true);
+          lastPart.setMeaningfulness(true);
+        }
+      }
+    }
+
+    /**
+     * creates <code>ExternalPackage</code>
+     * @param packageName name of the package
+     * @return <code>ExternalPackage</code>
+     * @see net.sourceforge.transmogrify.symtab.ExternalPackage
+     */
+    private ExternalPackage getPackage(String packageName) {
+      return new ExternalPackage(packageName, null);
+    }
+
+    /**
+     * stores the inner classes in the approriate ClassDef
+     * @param outerClass
+     * @return <code>void</code>
+     */
+    private void importInnerClasses(IClass outerClass) {
+      IClass[] innerClasses = outerClass.getInnerClasses();
+
+      for (int i = 0; i < innerClasses.length; i++) {
+        _def.importClass(innerClasses[i]);
+      }
+    }
+
+    /**
+     * creates <code>ExternalClass</code> based on a java class
+     * @param className class to be loaded
+     * @return <code>IClass</code>
+     * @see net.sourceforge.transmogrify.symtab.ExternalClass
+     */
+    private IClass loadClass(String className) {
+      IClass result = null;
+
+      try {
+        Class javaClass
+          = ClassManager.getClassLoader().loadClass(className);
+
+        result = new ExternalClass(javaClass);
+      }
+      catch (ClassNotFoundException ignoreMe) {}
+
+      return result;
+    }
+
+    /**
+     * find a class from <code>BaseCode</code> or its parent
+     * @param className name of the class to be load or found
+     * @param parentClass its parent class
+     * @return <code>IClass</code>
+     * @see net.sourceforge.transmogrify.symtab.SymbolTable
+     * @see net.sourceforge.transmogrify.symtab.IClass
+     * @see #loadClass(String)
+     */
+    private IClass findOrLoadClass(String className, IClass parentClass) {
+      IClass result = null;
+
+      if (parentClass == null) {
+        result = symbolTable.getBaseScope().getClassDefinition(className);
+      }
+      else {
+        int index = className.lastIndexOf("$");
+        if (index < 0) {
+          index = className.lastIndexOf(".");
+        }
+
+        result = parentClass.getClassDefinition(className.substring(index + 1));
+      }
+
+      if (result == null) {
+        result = loadClass(className);
+      }
+
+      return result;
+    }
+
+    /**
+    *
+    * If the class has a super class a reference to this super class
+    * is added to this class.
+    * @return <code>void</code>
+    * @see net.sourceforge.transmogrify.symtab.ClassDef
+    */
+    private void setSuperclass() {
+      if (_def.getTreeNode().getType() == TokenTypes.CLASS_DEF) {
+        SymTabAST extendsNode = getExtendsNode(_def);
+        if ( extendsNode != null ) {
+          String superclassName = ASTUtil.constructDottedName(extendsNode);
+          IClass superclass = _def.getClassDefinition(superclassName);
+          if ( superclass != null ) {
+            _def.setSuperclass( superclass );
+            superclass.addSubclass( _def );
+          }
+        }
+        else {
+          _def.setSuperclass(new ExternalClass(Object.class));
+        }
+      }
+      else {
+        _def.setSuperclass(new ExternalClass(Object.class));
+      }
+    }
+
+    /**
+    *
+    * If the class implements an interface a reference to this interface
+    * is added to this class.
+    * @return <code>void</code>
+    * @see net.sourceforge.transmogrify.symtab.ClassDef
+    */
+    private void addInterfaces() {
+      SymTabAST implementsClause = null;
+
+      if (_def.getTreeNode().getType() == TokenTypes.CLASS_DEF) {
+        implementsClause
+          = _node.findFirstToken(TokenTypes.IMPLEMENTS_CLAUSE);
+      }
+      else {
+        implementsClause
+          = _node.findFirstToken(TokenTypes.EXTENDS_CLAUSE);
+      }
+
+      if ( implementsClause != null ) {
+        SymTabAST interfaceNode = (SymTabAST)implementsClause.getFirstChild();
+        while ( interfaceNode != null ) {
+          IClass implemented =
+            _def.getClassDefinition(interfaceNode.getText());
+          if ( implemented != null ) {
+            _def.addInterface( implemented );
+            implemented.addImplementor( _def );
+          }
+        interfaceNode = (SymTabAST)(interfaceNode.getNextSibling());
+        }
+      }
+    }
+  }
+
+  /**
+   *
+   * Completes a Variable by setting all required references
+   *
+   */
+  class VariableFinisher extends DefinitionFinisher {
+    VariableDef _def = null;
+
+
+    /**
+    *
+    * Constructor. Creates a VariableFinishes from the <code>Definition</code>
+    * @param def VariableDef to be finished
+    * @see net.sourceforge.transmogrify.symtab.VariableDef
+    */
+    public VariableFinisher( Definition def ) {
+      super( def );
+      _def = (VariableDef)def;
+    }
+
+
+    /**
+    *
+    * Finishes the variable by setting the Type
+    * @return <code>void</code>
+    * @see #getType(Definition, SymTabAST)
+    * @see net.sourceforge.transmogrify.symtab.VariableDef
+    */
+    public void finish() {
+
+      SymTabAST typeNode = _node.findFirstToken(TokenTypes.TYPE);
+
+      SymTabAST typeTextNode = (SymTabAST)(typeNode.getFirstChild());
+      if ( typeTextNode.getType() == TokenTypes.ARRAY_DECLARATOR ) {
+        typeTextNode = (SymTabAST)(typeTextNode.getFirstChild());
+      }
+      typeTextNode.setLine(ASTUtil.getLine( _def.getTreeNode() ));
+
+      IClass varType = getType(_def, typeNode);
+      _def.setType( varType );
+
+    }
+  }
+
+  /**
+   *
+   * Completes a Variable by setting all required references
+   *
+   */
+  class MethodFinisher extends DefinitionFinisher {
+    MethodDef _def = null;
+
+
+    /**
+    *
+    * Creates a MethodFinisher from a <code> Definition <code>
+    * @param def MethodDef to be finished
+    * @see net.sourceforge.transmogrify.symtab.MethodDef
+    */
+    public MethodFinisher( Definition def ) {
+      super( def );
+      _def = (MethodDef)def;
+    }
+
+    /**
+    *
+    * Completes a method by setting all references to return types,
+    * signatures and exceptions.
+    * @return <code>void</code>
+    * @see #setReturnType()
+    * @see #setSignature()
+    * @see #setExceptionsThrown()
+    */
+    public void finish() {
+      setReturnType();
+      setSignature();
+      setExceptionsThrown();
+    }
+
+    /**
+    *
+    * setReturnType adds a reference to the methods return type
+    * to the method definition
+    * @return <code>void</code>
+    * @see net.sourceforge.transmogrify.symtab.MethodDef
+    * @see #getType(Definition, SymTabAST)
+    * @see #getTypeNode()
+    */
+    private void setReturnType() {
+      IClass type = null;
+
+      if ( isConstructor() ) {
+        type = _def.getEnclosingClass();
+      }
+      else {
+        type = getType(_def, getTypeNode());
+      }
+
+      _def.setType(type);
+    }
+
+    /**
+    *
+    * setSignature adds a reference to the methods paramaters
+    * to the method definition
+    * @return <code>void</code>
+    * @see #makeVariableDef(SymTabAST, Definition)
+    * @see VariableFinisher
+    * @see net.sourceforge.transmogrify.symtab.MethodDef
+    */
+    private void setSignature() {
+      SymTabAST parametersNode
+        = _node.findFirstToken(TokenTypes.PARAMETERS);
+
+      SymTabAST parameterNode = (SymTabAST)(parametersNode.getFirstChild());
+      while ( parameterNode != null ) {
+        if (parameterNode.getType() == TokenTypes.PARAMETER_DEF) {
+            VariableDef parameter = makeVariableDef( parameterNode, _def );
+            new VariableFinisher( parameter ).finish();
+            _def.addParameter( parameter );
+        }
+        parameterNode = (SymTabAST)(parameterNode.getNextSibling());
+      }
+
+    }
+
+    /**
+    *
+    * setExceptionsThrown adds a reference to the methods Exceptions
+    * to the method definition
+    * @return <code>void</code>
+    * @see net.sourceforge.transmogrify.symtab.SymbolTable
+    * @see net.sourceforge.transmogrify.symtab.PackageDef
+    * @see net.sourceforge.transmogrify.symtab.MethodDef
+    */
+    private void setExceptionsThrown() {
+      IClass exception = null;
+      SymTabAST throwsNode
+        = _node.findFirstToken(TokenTypes.LITERAL_THROWS);
+
+      if ( throwsNode != null ) {
+        SymTabAST exceptionNode = (SymTabAST)(throwsNode.getFirstChild());
+        while (exceptionNode != null ) {
+          if (exceptionNode.getType() == TokenTypes.DOT) {
+            PackageDef pkg = symbolTable.getPackage(ASTUtil.constructPackage(exceptionNode));
+            if ( pkg != null ) {
+              exception = pkg.getClassDefinition(ASTUtil.constructClass(exceptionNode));
+            }
+          }
+          else {
+            exception = _def.getClassDefinition(exceptionNode.getText());
+          }
+          _def.addException(exception);
+          exceptionNode = (SymTabAST)(exceptionNode.getNextSibling());
+        }
+      }
+
+    }
+
+    /**
+    *
+    * isConstructor sets the flag in the method definition to indicate
+    * whether it is a constructor or not
+    * @return <code>boolean</code> <code>true</code> if a node has no return type
+    *                              <code>false</code> if a node has a return type
+    * @see #getTypeNode()
+    */
+    private boolean isConstructor() {
+      boolean result = false;
+
+      if ( getTypeNode() == null ) {
+        result = true;
+      }
+
+      return result;
+    }
+
+    /**
+    *
+    * getTypeNode returnss the <code> SymTabAST</code> node that is the
+    * return type of this method
+    *
+    * @return <code>SymTabAST</code>
+    */
+    private SymTabAST getTypeNode() {
+      return _node.findFirstToken(TokenTypes.TYPE);
+    }
+  }
+
+  class CatchFinisher extends DefinitionFinisher {
+    BlockDef _def = null;
+
+    /**
+     * constructor that takes a <code>BlockDef</code>
+     * @param def <code>BlockDef</code> for the catch block
+     */
+    public CatchFinisher(BlockDef def) {
+      super(def);
+      _def = def;
+    }
+
+    /**
+     * finishes definition creation
+     * @return <code>void</code>
+     * @see #createExceptionVariable()
+     */
+    public void finish() {
+      createExceptionVariable();
+    }
+
+    /**
+     * creates <code>VariableDef<code> and finishes creation definition for
+     * arguments in the catch clause
+     * @return <code>void</code>
+     * @see net.sourceforge.transmogrify.symtab.VariableDef
+     * @see #makeVariableDef(SymTabAST, Definition)
+     * @see VariableFinisher
+     */
+    private void createExceptionVariable() {
+      SymTabAST exceptionNode
+        = _def.getTreeNode().findFirstToken(TokenTypes.PARAMETER_DEF);
+
+      VariableDef exception = makeVariableDef(exceptionNode, _def);
+      new VariableFinisher(exception).finish();
+      _def.addDefinition(exception);
+    }
+  }
+
+}
+
+
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Typed.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Typed.java
new file mode 100644
index 0000000..474f906
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/Typed.java
@@ -0,0 +1,45 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+/**
+ * classes that implement this interface have a notion
+ * of "type" like int, String, GerblinkenLight, etc.
+ */
+
+public interface Typed extends IDefinition {
+
+  /**
+   * gets the type of this definition
+   */
+  public IClass getType();
+
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/UnknownClass.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/UnknownClass.java
new file mode 100644
index 0000000..6f59fc1
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/UnknownClass.java
@@ -0,0 +1,174 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+
+
+public class UnknownClass implements IClass {
+
+  String _name;
+  SymTabAST _node;
+
+  public UnknownClass(String name, SymTabAST node) {
+    _name = name;
+    _node = node;
+    //System.out.println("Creating unknown class [" + name + " : " + node + "]");
+  }
+
+  /**
+   * returns the <code>ClassDef</code> that for the superclass
+   *
+   * @return the <code>ClassDef</code> for the superclass
+   */
+  public IClass getSuperclass() {
+    return null;
+  }
+
+  public IClass[] getInterfaces() {
+    return new IClass[0];
+  }
+
+  /**
+   * returns a collection of the direct subclasses of this class
+   *
+   * @return a collection of the direct subclasses of this class
+   */
+  public List getSubclasses() {
+    return new Vector();
+  }
+
+  public IClass getClassDefinition(String name) {
+    return null;
+  }
+
+  /**
+   * gets the method associated with the given name and signature
+   *
+   * @param name the name of the method
+   * @param signature the signature (formal parameter types) of the method
+   *
+   * @return MethodDef
+   *
+   * @see MethodSignature
+   */
+  public IMethod getMethodDefinition(String name,
+                                     ISignature signature) {
+    return null;
+  }
+
+  /**
+   * gets the <code>VariableDef</code> associated with the given name
+   *
+   * @param name the name of the variable
+   *
+   * @return VariableDef
+   */
+  public IVariable getVariableDefinition(String name) {
+    return null;
+  }
+
+  // end definitions interface
+
+  /**
+   * adds <code>ClassDef</code> to the collection of (direct?) subclasses of
+   * this class
+   *
+   * @param subclass the class to add
+   */
+  public void addSubclass(ClassDef subclass) {}
+
+  /**
+   * adds <code>ClassDef</code> to the collection of implemented interfaces
+   * of this class
+   *
+   * @param implementor the interface to add
+   */
+  public void addImplementor(ClassDef implementor) {}
+
+  /**
+   * gets the list of <code>ClassDefs</code> that implmement this interface
+   *
+   * @return Vector the list of implementors
+   */
+  public List getImplementors() {
+    return new Vector();
+  }
+
+  public boolean isCompatibleWith(IClass type) {
+    return false;
+  }
+
+  public void addReference(Reference reference) {}
+  public Iterator getReferences() {
+    return new Vector().iterator();
+  }
+
+  public int getNumReferences() {
+    return 0;
+  }
+
+  public boolean isPrimitive() {
+    return false;
+  }
+
+  public boolean isSourced() {
+    return false;
+  }
+
+  public IClass[] getInnerClasses() {
+    return new IClass[0];
+  }
+
+  public String getName() {
+    return _name;
+  }
+
+  public String getQualifiedName() {
+    return _name;
+  }
+
+  public boolean equals(Object o) {
+    //TODO: handle Checkstyle condition for two unknown classes
+    if (o instanceof UnknownClass) {
+        final UnknownClass other = (UnknownClass) o;
+        return other.getName().equals(getName());
+    }
+    return false;
+  }
+
+  public String toString() {
+    return UnknownClass.class + "[" + getName() + "]";
+  }
+}
diff --git a/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/VariableDef.java b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/VariableDef.java
new file mode 100644
index 0000000..b63ce20
--- /dev/null
+++ b/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/VariableDef.java
@@ -0,0 +1,132 @@
+
+// Transmogrify License
+// 
+// Copyright (c) 2001, ThoughtWorks, Inc.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// - Redistributions of source code must retain the above copyright notice,
+//   this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// Neither the name of the ThoughtWorks, Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify;
+
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+
+
+/**
+ * <code>VariableDef</code> is a <code>Definition</code> that contains
+ * information about the definition of a variable.
+ *
+ * @see Definition
+ * @see TypedDef
+ */
+public class VariableDef extends Definition implements IVariable {
+
+    public static final int PRIVATE_VISIBILITY = 0;
+    public static final int PROTECTED_VISIBILITY = 1;
+    public static final int PUBLIC_VISIBILITY = 2;
+    public static final int DEFAULT_VISIBILITY = 3;
+
+    private IClass _type = null;
+
+    public VariableDef(String name, Scope parentScope, SymTabAST node) {
+        super(name, parentScope, node);
+    }
+
+    /**
+     * Returns the <code>Type</code> of the variable.
+     *
+     * @see TypedDef
+     *
+     * @return the <code>Type</code> of the variable
+     */
+    public IClass getType() {
+        return _type;
+    }
+
+    /**
+     * Sets the type of the variable.
+     *
+     * @see TypedDef
+     *
+     * @param def the <code>Type</code> object that represents the type of the
+     *            variable.
+     */
+    public void setType(IClass type) {
+        _type = type;
+    }
+
+    public int getVisibility() {
+        int result = DEFAULT_VISIBILITY;
+
+        SymTabAST visibilityNode = getVisibilityNode();
+        if (visibilityNode != null) {
+            if (visibilityNode.getType() == TokenTypes.LITERAL_PRIVATE) {
+                result = PRIVATE_VISIBILITY;
+            }
+            else if (
+                visibilityNode.getType() == TokenTypes.LITERAL_PROTECTED) {
+                result = PROTECTED_VISIBILITY;
+            }
+            else if (visibilityNode.getType() == TokenTypes.LITERAL_PUBLIC) {
+                result = PUBLIC_VISIBILITY;
+            }
+        }
+
+        return result;
+    }
+
+    private SymTabAST getVisibilityNode() {
+        SymTabAST result = null;
+
+        SymTabAST modifiersNode =
+            getTreeNode().findFirstToken(TokenTypes.MODIFIERS);
+        SymTabAST modifier = (SymTabAST) modifiersNode.getFirstChild();
+        while (modifier != null) {
+            if (isVisibilityNode(modifier)) {
+                result = modifier;
+                break;
+            }
+            modifier = (SymTabAST) modifier.getNextSibling();
+        }
+
+        return result;
+    }
+
+    private boolean isVisibilityNode(SymTabAST node) {
+        return (
+            node.getType() == TokenTypes.LITERAL_PUBLIC
+                || node.getType() == TokenTypes.LITERAL_PROTECTED
+                || node.getType() == TokenTypes.LITERAL_PRIVATE);
+    }
+
+    public boolean isAssignedAtDeclaration() {
+        boolean result = false;
+
+        if (getTreeNode().findFirstToken(TokenTypes.ASSIGN) != null) {
+            result = true;
+        }
+
+        return result;
+    }
+
+}
diff --git a/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputEmptyFile.java b/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputEmptyFile.java
new file mode 100644
index 0000000..bb7db0e
--- /dev/null
+++ b/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputEmptyFile.java
@@ -0,0 +1,2 @@
+// this is an empty file
+// it's a test for 1165855
diff --git a/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputInnerUsedMethod.java b/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputInnerUsedMethod.java
new file mode 100644
index 0000000..ee6af90
--- /dev/null
+++ b/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputInnerUsedMethod.java
@@ -0,0 +1,23 @@
+package com.puppycrawl.tools.checkstyle.usage;
+
+import java.awt.event.ActionEvent;
+import javax.swing.AbstractAction;
+import javax.swing.JButton;
+
+public final class InputInnerUsedMethod
+{
+   public static void show()
+   {
+      JButton b = new JButton(new AbstractAction()
+      {
+         public void actionPerformed(ActionEvent e)
+         {
+               doSomething();
+         }
+      });
+   }
+
+   private static void doSomething()
+   {
+   }
+}
diff --git a/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputOneMethodPrivateField.java b/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputOneMethodPrivateField.java
new file mode 100644
index 0000000..51ed32c
--- /dev/null
+++ b/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputOneMethodPrivateField.java
@@ -0,0 +1,114 @@
+package com.puppycrawl.tools.checkstyle.usage;
+
+/** Test input for one method private field check */
+public class InputOneMethodPrivateField
+{
+    private static int SFIELD0;
+    private static int SFIELD1;
+    private static int SFIELD2;
+    private static int SFIELD3;
+    
+    private int mField0;
+    private int mField1;
+    private int mField2;
+    private int mField3;
+    private int mField4;
+    private int mIgnore;
+     
+    public InputOneMethodPrivateField()
+    {
+        SFIELD0 = 0;
+        mField0 = 0;
+        mField3 = 0;
+    }
+
+    private void method()
+    {
+        SFIELD1 = 0;
+        mField1 = 0;
+        mField3++;
+        mField4 = 0;
+    }
+    
+    {
+        SFIELD2 = 0;
+        mField2 = 0;
+        mField4 = 1;
+    }
+    
+    static
+    {
+        SFIELD3 = 0;
+    }
+}
+
+class Outer2
+{
+    private int mField0;
+    private int mField1;
+    private int mField2;
+    private int mField3;
+    
+    private class Inner
+    {
+        public Inner()
+        {
+            int i  = mField0;
+        }
+        
+        public void method()
+        {
+            mField1 = 0;
+            mField3++;
+        }
+        
+        {
+            mField2 = 0;
+        }
+    }
+    
+    private void method()
+    {
+        mField3 = 0;
+    }
+}
+
+class Outer3
+{
+    private int mField0;
+    private int mField1;
+    
+    private void method()
+    {
+        final class Inner
+        {
+            public int mInner = mField0;
+        }
+    }
+    
+    /** tests NPE with dotted class name (bug 842781) */
+     public void dotted()
+     {
+         java.lang.Thread th
+             = new java.lang.Thread() {
+                 public void run() {
+                     ;
+                 }
+             };
+         th.start();
+     }
+}
+
+/** Tests NPE with foreach statements (bug 1109222) */
+class Outer4
+{
+    private int[] mField;
+
+    private void method()
+    {
+        for (int someInt : mField)
+        {
+            someInt = someInt ^ 2;
+        }
+    }
+}
\ No newline at end of file
diff --git a/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputUnusedField.java b/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputUnusedField.java
new file mode 100644
index 0000000..99afaa7
--- /dev/null
+++ b/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputUnusedField.java
@@ -0,0 +1,97 @@
+package com.puppycrawl.tools.checkstyle.usage;
+
+import java.awt.Rectangle;
+
+/** Test input for unused field check */
+public class InputUnusedField
+{
+    private int mReadPrimitive;
+    private int mPrimitive;
+    private int mUnreadPrimitive;
+    private String mReadString;
+    private String mReadString2;
+    private Rectangle mRectangle;
+    private int[] mArray;
+    private int[] mArray2;
+    private int[] mUnreadArray;
+    private int mThisPrimitive;
+    
+    private int mInitializer = 0;
+    private int mUnused2 = mInitializer;
+    
+    private static final int SUNUSED = 0;
+    private static int USED;
+
+    static
+    {
+        USED = 0;    
+    }
+    
+    public InputUnusedField()
+    {
+        int i = mReadPrimitive;
+    }
+
+    private void method()
+    {
+        int i = mReadString.length();
+        "".equals(mReadString2);       
+        int j = mRectangle.x;
+        i = mArray[0];
+        mArray2[0] = 0;
+        this.mThisPrimitive = 1;
+    }
+    
+    private void shadow()
+    {
+        int mUnreadPrimitive = 0;
+        mUnreadPrimitive++;
+        
+        int[] mUnreadArray = {0};
+        int i = mUnreadArray[0];
+    }
+    
+    {
+        mPrimitive = 0;
+    }
+}
+
+class Outer
+{
+    private int mUsed1;
+    private int mUsed2;
+    private int mUsed3;
+    private int mUnused;
+    
+    private class Inner
+    {
+        public Inner()
+        {
+            int i  = mUsed1;
+        }
+        
+        public void method()
+        {
+            mUsed2 = 0;
+        }
+        
+        {
+            mUsed3 = 0;
+        }
+    }
+}
+
+class ParenthesizedExpression
+{
+    private int mUsed1 = 1;
+    private int mUsed2 = 1;
+    private boolean mUsed3 = true;
+    
+    public void testParentheses()
+    {
+        int x = 0;
+        int a = (x++) / mUsed1;
+        int b = (a - 1) << mUsed2;
+        boolean c = (a == b) || mUsed3;
+    }
+}
diff --git a/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputUnusedLocal.java b/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputUnusedLocal.java
new file mode 100644
index 0000000..e96b052
--- /dev/null
+++ b/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputUnusedLocal.java
@@ -0,0 +1,60 @@
+package com.puppycrawl.tools.checkstyle.usage;
+
+import java.awt.Rectangle;
+
+/** Test input for unused local variable check */
+public class InputUnusedLocal
+{
+    private int mUnreadPrimitive = 0;
+    
+    public InputUnusedLocal()
+    {
+        int readPrimitive = 0;
+        int mUnreadPrimitive = 0;
+        int i = readPrimitive;
+        i++;
+       
+       this.mUnreadPrimitive++; 
+    }
+
+    private void method()
+    {
+        String readObject = "";
+        Rectangle rectangle = null;
+        Object unreadObject;
+        int i = readObject.length();
+        
+        int j = rectangle.x;
+        
+        i += j;
+        }
+
+    private void methodArrays()
+    {
+        int[] array = {};
+        int[] array2 = {};
+        int[] unreadArray;
+        int i = array[0];
+        array2[0] = 0;
+        i++;
+    }
+    
+    /** tests that neither type nor typecast are considered to be a reference */
+    public void method2()
+    {
+        int java;
+        java.io.File file = (java.io.File) null;
+        if (file != null) {
+        }       
+    }
+    
+    /** tests array index references */
+    public void testArrayIndex()
+    {
+        int [][][] a = new int[1][1][1];
+        int i = 0;
+        int j = 0;
+        int k = 0;
+        a[i][j][k]++;
+    }
+}
diff --git a/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputUnusedMethod.java b/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputUnusedMethod.java
new file mode 100644
index 0000000..6aa8b6b
--- /dev/null
+++ b/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputUnusedMethod.java
@@ -0,0 +1,155 @@
+package com.puppycrawl.tools.checkstyle.usage;
+
+/** Test input for unread method check */
+public class InputUnusedMethod
+{
+
+    private void methodUnused0()
+    {
+    }
+
+    private void methodUsed0()
+    {
+    }
+    
+    private void methodUsed1(int aParam)
+    {
+    }
+    
+    private void methodUsed1(double aParam)
+    {
+    }
+    
+    private void methodUsed1(String aParam)
+    {
+    }
+    
+    public static void main(String[] args)
+    {
+        InputUnusedMethod method = new InputUnusedMethod();
+        method.methodUsed0();
+        method.methodUsed1(0 + 4);
+        method.methodUsed1(Math.sqrt(2.0));
+        method.methodUsed1("" + "a");
+    }
+}
+
+interface InterfaceMethod
+{
+    public void method(int aParam);
+}
+
+abstract class AbstractClassMethod
+{
+    public abstract void method(int aParam);
+}
+
+/** Test for bug 880954: false positive when parentheses around second term
+ * of ternary operator.
+ */
+class Ternary
+{
+    private int m()
+    {
+        return 1;
+    }
+    
+    public void m1()
+    {
+        int i = 0;
+        int j = (i == 0) ? (i) : m();
+    }
+}
+
+class SerializableTest implements java.io.Serializable
+{
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
+    {
+        // it's ok to have this method in serializable class
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
+    {
+        // it's ok to have this method in serializable class
+    }
+
+    private Object writeReplace() throws java.io.ObjectStreamException
+    {
+        // it's ok to have this method in serializable class
+        return new SerializableTest();
+    }
+
+    private Object readResolve() throws java.io.ObjectStreamException
+    {
+        // it's ok to have this method in serializable class
+        return new SerializableTest();
+    }
+}
+
+class BadSerializableTest1 implements java.io.Serializable
+{
+    private void writeObject(Object out) throws java.io.IOException
+    {
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out, int i) throws java.io.IOException
+    {
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out)
+    {
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
+    {
+    }
+
+    private void readObject(Object in) throws java.io.IOException, ClassNotFoundException
+    {
+    }
+
+    private int writeReplace() throws java.io.ObjectStreamException
+    {
+        return 1;
+    }
+
+    private Object writeReplace(int i) throws java.io.ObjectStreamException
+    {
+        return new SerializableTest();
+    }
+
+    private int readResolve() throws java.io.ObjectStreamException
+    {
+        return 1;
+    }
+
+    private Object readResolve(int i) throws java.io.ObjectStreamException
+    {
+        return new SerializableTest();
+    }
+}
+
+class BadSerializableTest2 implements java.io.Serializable
+{
+    private int writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
+    {
+        return 1;
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws ClassNotFoundException
+    {
+    }
+
+    private Object readResolve()
+    {
+        return new SerializableTest();
+    }
+}
+
+class BadSerializableTest3 implements java.io.Serializable
+{
+    private int readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
+    {
+        return 1;
+    }
+}
diff --git a/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputUnusedParameter.java b/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputUnusedParameter.java
new file mode 100644
index 0000000..ab54eaa
--- /dev/null
+++ b/contrib/usage/src/testinputs/com/puppycrawl/tools/checkstyle/usage/InputUnusedParameter.java
@@ -0,0 +1,50 @@
+package com.puppycrawl.tools.checkstyle.usage;
+
+import java.awt.Rectangle;
+
+/** Test input for unread parameter check */
+public class InputUnusedParameter
+{
+    public InputUnusedParameter(int aReadPrimitive, int aUnreadPrimitive)
+    {
+        int i = aReadPrimitive;
+    }
+
+    public void method(
+        String aReadObject,
+        Rectangle aRectangle,
+        Object aUnreadObject)
+    {
+        int i = aReadObject.length();
+
+        int j = aRectangle.x;
+
+        try {
+            i++;
+        }
+        catch (Exception unreadException) {
+        }
+    }
+
+    private void methodArrays(int[] aArray, int[] aArray2, int[] aUnreadArray)
+    {
+        int i = aArray[0];
+        aArray2[0] = 0;
+    }
+
+    private int member = 1;
+    private void methodSameLocalVariable(int member)
+    {
+        int x = member; // refers to the param, not the member
+    }
+}
+
+interface Interface
+{
+    public void method(int aParam);
+}
+
+abstract class AbstractClass
+{
+    public abstract void method(int aParam);
+}
diff --git a/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/AllTests.java b/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/AllTests.java
new file mode 100644
index 0000000..5faf538
--- /dev/null
+++ b/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/AllTests.java
@@ -0,0 +1,23 @@
+package com.puppycrawl.tools.checkstyle.checks.usage;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTests {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(AllTests.suite());
+    }
+
+    public static Test suite() {
+        TestSuite suite =
+            new TestSuite("Test for com.puppycrawl.tools.checkstyle.checks.usage");
+        suite.addTest(new TestSuite(OneMethodPrivateFieldCheckTest.class));
+        suite.addTest(new TestSuite(UnusedLocalVariableCheckTest.class));
+        suite.addTest(new TestSuite(UnusedParameterCheckTest.class));
+        suite.addTest(new TestSuite(UnusedPrivateFieldCheckTest.class));
+        suite.addTest(new TestSuite(UnusedPrivateMethodCheckTest.class));
+
+        return suite;
+    }
+}
diff --git a/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/OneMethodPrivateFieldCheckTest.java b/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/OneMethodPrivateFieldCheckTest.java
new file mode 100644
index 0000000..34f4b5a
--- /dev/null
+++ b/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/OneMethodPrivateFieldCheckTest.java
@@ -0,0 +1,46 @@
+package com.puppycrawl.tools.checkstyle.checks.usage;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class OneMethodPrivateFieldCheckTest
+    extends BaseCheckTestCase
+{
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(OneMethodPrivateFieldCheck.class);
+        final String[] expected = {
+            "6:24: Field 'SFIELD0' is used in only one method.",
+            "7:24: Field 'SFIELD1' is used in only one method.",
+            "8:24: Field 'SFIELD2' is used in only one method.",
+            "9:24: Field 'SFIELD3' is used in only one method.",
+            "11:17: Field 'mField0' is used in only one method.",
+            "12:17: Field 'mField1' is used in only one method.",
+            "13:17: Field 'mField2' is used in only one method.",
+            "47:17: Field 'mField0' is used in only one method.",
+            "48:17: Field 'mField1' is used in only one method.",
+            "49:17: Field 'mField2' is used in only one method.",
+            "105:19: Field 'mField' is used in only one method.",
+        };
+        verify(checkConfig, getPath("usage/InputOneMethodPrivateField.java"), expected);
+    }
+    
+    public void testIgnoreFormat() throws Exception
+        {
+            final DefaultConfiguration checkConfig =
+                createCheckConfig(OneMethodPrivateFieldCheck.class);
+            checkConfig.addAttribute("ignoreFormat", "2$");
+            final String[] expected = {
+                "6:24: Field 'SFIELD0' is used in only one method.",
+                "7:24: Field 'SFIELD1' is used in only one method.",
+                "9:24: Field 'SFIELD3' is used in only one method.",
+                "11:17: Field 'mField0' is used in only one method.",
+                "12:17: Field 'mField1' is used in only one method.",
+                "47:17: Field 'mField0' is used in only one method.",
+                "48:17: Field 'mField1' is used in only one method.",
+                "105:19: Field 'mField' is used in only one method.",
+             };
+            verify(checkConfig, getPath("usage/InputOneMethodPrivateField.java"), expected);
+        }
+}
diff --git a/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/UnusedLocalVariableCheckTest.java b/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/UnusedLocalVariableCheckTest.java
new file mode 100644
index 0000000..ec10e0a
--- /dev/null
+++ b/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/UnusedLocalVariableCheckTest.java
@@ -0,0 +1,34 @@
+package com.puppycrawl.tools.checkstyle.checks.usage;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class UnusedLocalVariableCheckTest
+    extends BaseCheckTestCase
+{
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(UnusedLocalVariableCheck.class);
+        final String[] expected = {
+            "13:13: Unused local variable 'mUnreadPrimitive'.",
+            "24:16: Unused local variable 'unreadObject'.",
+            "36:15: Unused local variable 'unreadArray'.",
+            "45:13: Unused local variable 'java'.",
+        };
+        verify(checkConfig, getPath("usage/InputUnusedLocal.java"), expected);
+    }
+    
+    public void testIgnoreFormat() throws Exception
+        {
+            final DefaultConfiguration checkConfig =
+                createCheckConfig(UnusedLocalVariableCheck.class);
+            checkConfig.addAttribute("ignoreFormat", "Array$");
+            final String[] expected = {
+                "13:13: Unused local variable 'mUnreadPrimitive'.",
+                "24:16: Unused local variable 'unreadObject'.",
+                "45:13: Unused local variable 'java'.",
+            };
+            verify(checkConfig, getPath("usage/InputUnusedLocal.java"), expected);
+        }
+}
diff --git a/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/UnusedParameterCheckTest.java b/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/UnusedParameterCheckTest.java
new file mode 100644
index 0000000..69effb5
--- /dev/null
+++ b/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/UnusedParameterCheckTest.java
@@ -0,0 +1,58 @@
+package com.puppycrawl.tools.checkstyle.checks.usage;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class UnusedParameterCheckTest
+    extends BaseCheckTestCase
+{
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(UnusedParameterCheck.class);
+        final String[] expected = {
+            "8:57: Unused parameter 'aUnreadPrimitive'.",
+            "16:16: Unused parameter 'aUnreadObject'.",
+            "29:66: Unused parameter 'aUnreadArray'.",            
+        };
+        verify(checkConfig, getPath("usage/InputUnusedParameter.java"), expected);
+    }
+    
+    public void testException() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(UnusedParameterCheck.class);
+        checkConfig.addAttribute("ignoreCatch", Boolean.FALSE.toString());
+        final String[] expected = {
+            "8:57: Unused parameter 'aUnreadPrimitive'.",
+            "16:16: Unused parameter 'aUnreadObject'.",
+            "25:26: Unused parameter 'unreadException'.",
+            "29:66: Unused parameter 'aUnreadArray'.",            
+        };
+        verify(checkConfig, getPath("usage/InputUnusedParameter.java"), expected);
+    }
+    
+    public void testIgnoreFormat() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(UnusedParameterCheck.class);
+        checkConfig.addAttribute("ignoreFormat", "Array$");
+        final String[] expected = {
+            "8:57: Unused parameter 'aUnreadPrimitive'.",
+            "16:16: Unused parameter 'aUnreadObject'.",
+        };
+        verify(checkConfig, getPath("usage/InputUnusedParameter.java"), expected);
+    }
+
+    public void testIgnoreNonLocal() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(UnusedParameterCheck.class);
+        checkConfig.addAttribute("ignoreNonLocal", "true");
+        final String[] expected = {
+            "8:57: Unused parameter 'aUnreadPrimitive'.",
+            "29:66: Unused parameter 'aUnreadArray'.",            
+        };
+        verify(checkConfig, getPath("usage/InputUnusedParameter.java"), expected);
+    }
+}
diff --git a/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/UnusedPrivateFieldCheckTest.java b/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/UnusedPrivateFieldCheckTest.java
new file mode 100644
index 0000000..a996a79
--- /dev/null
+++ b/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/UnusedPrivateFieldCheckTest.java
@@ -0,0 +1,36 @@
+package com.puppycrawl.tools.checkstyle.checks.usage;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class UnusedPrivateFieldCheckTest
+    extends BaseCheckTestCase
+{
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(UnusedPrivateFieldCheck.class);
+        final String[] expected = {
+            "10:17: Unused private field 'mUnreadPrimitive'.",
+            "16:19: Unused private field 'mUnreadArray'.",
+            "20:17: Unused private field 'mUnused2'.",
+            "22:30: Unused private field 'SUNUSED'.",
+            "64:17: Unused private field 'mUnused'.",           
+        };
+        verify(checkConfig, getPath("usage/InputUnusedField.java"), expected);
+    }
+    
+    public void testIgnoreFormat() throws Exception
+        {
+            final DefaultConfiguration checkConfig =
+                createCheckConfig(UnusedPrivateFieldCheck.class);
+            checkConfig.addAttribute("ignoreFormat", "Array$");
+            final String[] expected = {
+                "10:17: Unused private field 'mUnreadPrimitive'.",
+                "20:17: Unused private field 'mUnused2'.",
+                "22:30: Unused private field 'SUNUSED'.",
+                "64:17: Unused private field 'mUnused'.",
+            };
+            verify(checkConfig, getPath("usage/InputUnusedField.java"), expected);
+        }
+}
diff --git a/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/UnusedPrivateMethodCheckTest.java b/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/UnusedPrivateMethodCheckTest.java
new file mode 100644
index 0000000..d37077b
--- /dev/null
+++ b/contrib/usage/src/tests/com/puppycrawl/tools/checkstyle/checks/usage/UnusedPrivateMethodCheckTest.java
@@ -0,0 +1,78 @@
+package com.puppycrawl.tools.checkstyle.checks.usage;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class UnusedPrivateMethodCheckTest
+    extends BaseCheckTestCase
+{
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(UnusedPrivateMethodCheck.class);
+        final String[] expected = {
+            "7:18: Unused private method 'methodUnused0'.",
+            "66:18: Unused private method 'writeObject'.",
+            "71:18: Unused private method 'readObject'.",
+            "76:20: Unused private method 'writeReplace'.",
+            "82:20: Unused private method 'readResolve'.",
+            "91:18: Unused private method 'writeObject'.",
+            "95:18: Unused private method 'writeObject'.",
+            "99:18: Unused private method 'writeObject'.",
+            "103:18: Unused private method 'readObject'.",
+            "107:18: Unused private method 'readObject'.",
+            "111:17: Unused private method 'writeReplace'.",
+            "116:20: Unused private method 'writeReplace'.",
+            "121:17: Unused private method 'readResolve'.",
+            "126:20: Unused private method 'readResolve'.",
+            "134:17: Unused private method 'writeObject'.",
+            "139:18: Unused private method 'readObject'.",
+            "143:20: Unused private method 'readResolve'.",
+            "151:17: Unused private method 'readObject'.",
+        };
+        verify(checkConfig, getPath("usage/InputUnusedMethod.java"), expected);
+    }
+
+    public void testAllowSerializationMethods() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(UnusedPrivateMethodCheck.class);
+        checkConfig.addAttribute("allowSerializationMethods", "true");
+
+        final String[] expected = {
+            "7:18: Unused private method 'methodUnused0'.",
+            "91:18: Unused private method 'writeObject'.",
+            "95:18: Unused private method 'writeObject'.",
+            "99:18: Unused private method 'writeObject'.",
+            "103:18: Unused private method 'readObject'.",
+            "107:18: Unused private method 'readObject'.",
+            "111:17: Unused private method 'writeReplace'.",
+            "116:20: Unused private method 'writeReplace'.",
+            "121:17: Unused private method 'readResolve'.",
+            "126:20: Unused private method 'readResolve'.",
+            "134:17: Unused private method 'writeObject'.",
+            "139:18: Unused private method 'readObject'.",
+            "143:20: Unused private method 'readResolve'.",
+            "151:17: Unused private method 'readObject'.",
+        };
+        verify(checkConfig, getPath("usage/InputUnusedMethod.java"), expected);
+    }
+
+   public void testInner() throws Exception
+   {
+       final DefaultConfiguration checkConfig =
+           createCheckConfig(UnusedPrivateMethodCheck.class);
+       final String[] expected = {
+       };
+       verify(checkConfig, getPath("usage/InputInnerUsedMethod.java"), expected);
+   }
+
+   public void testEmptyFile() throws Exception
+   {
+       final DefaultConfiguration checkConfig =
+           createCheckConfig(UnusedPrivateMethodCheck.class);
+       final String[] expected = {
+       };
+       verify(checkConfig, getPath("usage/InputEmptyFile.java"), expected);
+   }
+}
diff --git a/contrib/usage/src/xdocs/config_usage.xml b/contrib/usage/src/xdocs/config_usage.xml
new file mode 100644
index 0000000..fafc9ee
--- /dev/null
+++ b/contrib/usage/src/xdocs/config_usage.xml
@@ -0,0 +1,359 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document>
+
+  <properties>
+    <title>Usage Checks</title>
+    <author email="checkstyle-devel at lists.sourceforge.net">Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+      <section name="OneMethodPrivateField">
+        <subsection name="Description">
+          <p>
+            Checks that a private field is used in more than one method,
+            constructor, or initializer.
+          </p>
+
+          <p>
+            Rationale: a private field used in only one method,
+            constructor, or initializer should be replaced by a local
+            variable.
+          </p>
+        </subsection>
+
+        <subsection name="Properties">
+          <table>
+            <tr>
+              <th>name</th>
+              <th>description</th>
+              <th>type</th>
+              <th>default value</th>
+            </tr>
+            <tr>
+              <td>ignoreFormat</td>
+              <td>pattern for field names that should be ignored</td>
+              <td>
+                <a href="property_types.html#regexp">regular expression</a>
+              </td>
+              <td><span class="default">^$</span> (empty)</td>
+            </tr>
+          </table>
+        </subsection>
+
+        <subsection name="Examples">
+          <p>
+            To configure the check:
+          </p>
+          <source>
+<module name="usage.OneMethodPrivateField"/>
+          </source>
+
+          <p>
+            To configure the check to ignore fields whose name ends in
+            <span class="code">Temp</span>:
+          </p>
+          <source>
+<module name="usage.OneMethodPrivateField">
+    <property name="ignoreFormat" value="Temp$"/>
+</module>
+          </source>
+        </subsection>
+
+        <subsection name="Package">
+          <p>
+            com.puppycrawl.tools.checkstyle.checks.usage
+          </p>
+        </subsection>
+
+        <subsection name="Parent Module">
+          <p>
+            <a href="config.html#treewalker">TreeWalker</a>
+          </p>
+        </subsection>
+      </section>
+
+      <section name="UnusedLocalVariable">
+        <subsection name="Description">
+          <p>
+            Checks that a local variable is used after its declaration.
+          </p>
+        </subsection>
+
+        <subsection name="Properties">
+          <table>
+            <tr>
+              <th>name</th>
+              <th>description</th>
+              <th>type</th>
+              <th>default value</th>
+            </tr>
+            <tr>
+              <td>ignoreFormat</td>
+              <td>pattern for variable names that should be ignored</td>
+              <td>
+                <a href="property_types.html#regexp">regular expression</a>
+              </td>
+              <td><span class="default">^$</span> (empty)</td>
+            </tr>
+          </table>
+        </subsection>
+
+        <subsection name="Examples">
+          <p>
+            To configure the check:
+          </p>
+          <source>
+<module name="usage.UnusedLocalVariable"/>
+          </source>
+
+          <p>
+            To configure the check to ignore variables whose name ends
+            in <span class="code">Temp</span>:
+          </p>
+          <source>
+<module name="usage.UnusedLocalVariable">
+    <property name="ignoreFormat" value="Temp$"/>
+</module>
+          </source>
+        </subsection>
+
+        <subsection name="Package">
+          <p>
+            com.puppycrawl.tools.checkstyle.checks.usage
+          </p>
+        </subsection>
+
+        <subsection name="Parent Module">
+          <p>
+            <a href="config.html#treewalker">TreeWalker</a>
+          </p>
+        </subsection>
+      </section>
+
+      <section name="UnusedParameter">
+        <subsection name="Description">
+          <p>
+            Checks that a parameter is used.
+          </p>
+        </subsection>
+
+        <subsection name="Properties">
+          <table>
+            <tr>
+              <th>name</th>
+              <th>description</th>
+              <th>type</th>
+              <th>default value</th>
+            </tr>
+            <tr>
+              <td>ignoreFormat</td>
+              <td>pattern for parameter names that should be ignored</td>
+              <td>
+                <a href="property_types.html#regexp">regular expression</a>
+              </td>
+              <td><span class="default">^$</span> (empty)</td>
+            </tr>
+            <tr>
+              <td>ignoreCatch</td>
+              <td>
+                controls whether <span class="code">catch</span>
+                parameters should be ignored
+              </td>
+              <td><a href="property_types.html#boolean">boolean</a></td>
+              <td><span class="default">true</span></td>
+            </tr>
+            <tr>
+              <td>ignoreNonLocal</td>
+              <td>
+                controls whether parameters of non local (<span
+                class="code">public, protected or package</span>)
+                methods should be ignored
+              </td>
+              <td><a href="property_types.html#boolean">boolean</a></td>
+              <td><span class="default">false</span></td>
+            </tr>
+          </table>
+        </subsection>
+
+        <subsection name="Examples">
+          <p>
+            To configure the check:
+          </p>
+          <source>
+<module name="usage.UnusedParameter"/>
+          </source>
+
+          <p>
+            To configure the check to ignore parameters whose name ends
+            in <span class="code">Temp</span>:
+          </p>
+          <source>
+<module name="usage.UnusedParameter">
+    <property name="ignoreFormat" value="Temp$"/>
+</module>
+          </source>
+
+          <p>
+            To configure the check to report unused <span
+            class="code">catch</span> parameters:
+          </p>
+          <source>
+<module name="usage.UnusedParameter">
+    <property name="ignoreCatch" value="false"/>
+</module>
+          </source>
+        </subsection>
+
+        <subsection name="Package">
+          <p>
+            com.puppycrawl.tools.checkstyle.checks.usage
+          </p>
+        </subsection>
+
+        <subsection name="Parent Module">
+          <p>
+            <a href="config.html#treewalker">TreeWalker</a>
+          </p>
+        </subsection>
+      </section>
+
+      <section name="UnusedPrivateField">
+        <subsection name="Description">
+          <p>
+            Checks that a private field is used.
+          </p>
+        </subsection>
+
+        <subsection name="Properties">
+          <table>
+            <tr>
+              <th>name</th>
+              <th>description</th>
+              <th>type</th>
+              <th>default value</th>
+            </tr>
+            <tr>
+              <td>ignoreFormat</td>
+              <td>pattern for field names that should be ignored</td>
+              <td>
+                <a href="property_types.html#regexp">regular expression</a>
+              </td>
+              <td><span class="default">^$</span> (empty)</td>
+            </tr>
+          </table>
+        </subsection>
+
+        <subsection name="Examples">
+          <p>
+            To configure the check:
+          </p>
+          <source>
+<module name="usage.UnusedPrivateField"/>
+          </source>
+
+          <p>
+            To configure the check to ignore fields whose name ends in
+            <span class="code">Temp</span>:
+          </p>
+          <source>
+<module name="usage.UnusedPrivateField">
+    <property name="ignoreFormat" value="Temp$"/>
+</module>
+          </source>
+        </subsection>
+
+        <subsection name="Package">
+          <p>
+            com.puppycrawl.tools.checkstyle.checks.usage
+          </p>
+        </subsection>
+
+        <subsection name="Parent Module">
+          <p>
+            <a href="config.html#treewalker">TreeWalker</a>
+          </p>
+        </subsection>
+      </section>
+
+      <section name="UnusedPrivateMethod">
+        <subsection name="Description">
+          <p>
+            Checks that a private method is used.
+          </p>
+        </subsection>
+
+        <subsection name="Properties">
+          <table>
+            <tr>
+              <th>name</th>
+              <th>description</th>
+              <th>type</th>
+              <th>default value</th>
+            </tr>
+            <tr>
+              <td>ignoreFormat</td>
+              <td>pattern for method names that should be ignored</td>
+              <td>
+                <a href="property_types.html#regexp">regular expression</a>
+              </td>
+              <td><span class="default">^$</span> (empty)</td>
+            </tr>
+            <tr>
+              <td>allowSerializationMethods</td>
+              <td>whether the check should allow serialization-related methods
+              (<span class="code">readObject()</span>, <span
+              class="code">writeObject()</span>, <span
+              class="code">readResolve()</span> and <span
+              class="code">writeReplace()</span></td>
+              <td>
+                <a href="property_types.html#boolean">boolean</a>
+              </td>
+              <td><span class="default">false</span></td>
+            </tr>
+          </table>
+        </subsection>
+
+        <subsection name="Examples">
+          <p>
+            To configure the check:
+          </p>
+          <source>
+<module name="usage.UnusedPrivateMethod"/>
+          </source>
+
+          <p>
+            To configure the check to ignore methods whose name ends in
+            <span class="code">Temp</span>:
+          </p>
+          <source>
+<module name="usage.UnusedPrivateMethod">
+    <property name="ignoreFormat" value="Temp$"/>
+</module>
+          </source>
+        </subsection>
+
+        <subsection name="Notes">
+          <ul>
+            <li>
+              The classpath may need to be configured to locate
+              parameter type information. The classpath configuration is
+              dependent on the mechanism used to invoke Checkstyle.
+            </li>
+          </ul>
+        </subsection>
+
+        <subsection name="Package">
+          <p>
+            com.puppycrawl.tools.checkstyle.checks.usage
+          </p>
+        </subsection>
+
+        <subsection name="Parent Module">
+          <p>
+            <a href="config.html#treewalker">TreeWalker</a>
+          </p>
+        </subsection>
+      </section>
+  </body>
+</document>
diff --git a/fast-forward-merge.sh b/fast-forward-merge.sh
new file mode 100755
index 0000000..c6983d0
--- /dev/null
+++ b/fast-forward-merge.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash 
+
+if [ $# -eq 0 ]
+  then
+    echo "$(basename "$0") GIT_REPO FORK_USER_NAME USER_BRANCH
+example:
+
+    ./$(basename "$0") checkstyle konstantinos issue73
+"
+	exit 0;
+fi
+
+GIT_REPO=$1
+FORK_USER_NAME=$2
+USER_BRANCH=$3
+REPO=$FORK_USER_NAME-fork
+LOCAL_USER_BRANCH=$FORK_USER_NAME-$USER_BRANCH
+
+echo "adding remote ..."
+git remote add $REPO https://github.com/$FORK_USER_NAME/$GIT_REPO.git
+git fetch $REPO
+
+echo "creating local branch ..."
+git checkout -b $LOCAL_USER_BRANCH $REPO/$USER_BRANCH
+
+echo "rebasing over master ..."
+git rebase master
+
+echo "merge to master ..."
+git checkout master
+git merge $LOCAL_USER_BRANCH
+
+echo "removing local branch ..."
+git branch -D $LOCAL_USER_BRANCH
+
+echo "removing remote ..."
+git remote rm $REPO
diff --git a/google_checks.xml b/google_checks.xml
new file mode 100644
index 0000000..19bca6f
--- /dev/null
+++ b/google_checks.xml
@@ -0,0 +1,168 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+          "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
+          "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+
+<!--
+
+    Checkstyle configurartion that checks the Google coding conventions from:
+    
+    -  Google Java Style
+       https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html
+       
+    Checkstyle is very configurable. Be sure to read the documentation at
+    http://checkstyle.sf.net (or in your downloaded distribution).
+
+    Most Checks are configurable, be sure to consult the documentation.
+
+    To completely disable a check, just comment it out or delete it from the file.
+
+    Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
+    
+ -->
+ 
+<module name = "Checker">
+    <property name="charset" value="UTF-8"/>
+    
+    <property name="severity" value="warning"/>
+    
+    <!-- Checks for whitespace                               -->
+    <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <module name="FileTabCharacter">
+            <property name="eachLine" value="true"/>
+        </module>
+    
+    <module name="TreeWalker">
+        <module name="OuterTypeFilename"/>
+        <module name="IllegalTokenText">
+            <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
+            <property name="format" value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
+            <property name="message" value="Avoid using corresponding octal or Unicode escape."/>
+        </module>
+        <module name="AvoidEscapedUnicodeCharacters">
+            <property name="allowEscapesForControlCharacters" value="true"/>
+            <property name="allowByTailComment" value="true"/>
+            <property name="allowNonPrintableEscapes" value="true"/>
+        </module>
+        <module name="LineLength">
+            <property name="max" value="100"/>
+            <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
+        </module>
+        <module name="AvoidStarImport"/>
+        <module name="OneTopLevelClass"/>
+        <module name="NoLineWrap"/>
+        <module name="EmptyBlock">
+            <property name="option" value="TEXT"/>
+            <property name="tokens" value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
+        </module>
+        <module name="NeedBraces"/>
+        <module name="LeftCurly">
+            <property name="maxLineLength" value="100"/>
+        </module>
+        <module name="RightCurly"/>
+        <module name="RightCurly">
+            <property name="option" value="alone"/>
+            <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
+        </module>
+        <module name="WhitespaceAround">
+            <property name="allowEmptyConstructors" value="true"/>
+            <property name="allowEmptyMethods" value="true"/>
+            <property name="allowEmptyTypes" value="true"/>
+            <property name="allowEmptyLoops" value="true"/>
+            <message key="ws.notFollowed"
+             value="WhitespaceAround: ''{0}'' is not followed by whitespace."/>
+             <message key="ws.notPreceded"
+             value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
+        </module>
+        <module name="OneStatementPerLine"/>
+        <module name="MultipleVariableDeclarations"/>
+        <module name="ArrayTypeStyle"/>
+        <module name="MissingSwitchDefault"/>
+        <module name="FallThrough"/>
+        <module name="UpperEll"/>
+        <module name="ModifierOrder"/>
+        <module name="EmptyLineSeparator">
+            <property name="allowNoEmptyLineBetweenFields" value="true"/>
+        </module>
+        <module name="SeparatorWrap">
+            <property name="tokens" value="DOT"/>
+            <property name="option" value="nl"/>
+        </module>
+        <module name="SeparatorWrap">
+            <property name="tokens" value="COMMA"/>
+            <property name="option" value="EOL"/>
+        </module>
+        <module name="PackageName">
+            <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
+            <message key="name.invalidPattern"
+             value="Package name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="TypeName">
+            <message key="name.invalidPattern"
+             value="Type name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="MemberName">
+            <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
+            <message key="name.invalidPattern"
+             value="Member name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="ParameterName">
+            <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
+            <message key="name.invalidPattern"
+             value="Parameter name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="LocalVariableName">
+            <property name="tokens" value="VARIABLE_DEF"/>
+            <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
+            <property name="allowOneCharVarInForLoop" value="true"/>
+            <message key="name.invalidPattern"
+             value="Local variable name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="ClassTypeParameterName">
+            <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
+            <message key="name.invalidPattern"
+             value="Class type name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="MethodTypeParameterName">
+            <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
+            <message key="name.invalidPattern"
+             value="Method type name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="NoFinalizer"/>
+        <module name="GenericWhitespace">
+            <message key="ws.followed"
+             value="GenericWhitespace ''{0}'' is followed by whitespace."/>
+             <message key="ws.preceded"
+             value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
+             <message key="ws.illegalFollow"
+             value="GenericWhitespace ''{0}'' should followed by whitespace."/>
+             <message key="ws.notPreceded"
+             value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
+        </module>
+        <module name="Indentation">
+            <property name="basicOffset" value="2"/>
+            <property name="braceAdjustment" value="0"/>
+            <property name="caseIndent" value="2"/>
+            <property name="throwsIndent" value="4"/>
+            <property name="lineWrappingIndentation" value="4"/>
+            <property name="arrayInitIndent" value="2"/>
+        </module>
+        <module name="AbbreviationAsWordInName">
+            <property name="ignoreFinal" value="false"/>
+            <property name="allowedAbbreviationLength" value="1"/>
+        </module>
+        <module name="OverloadMethodsDeclarationOrder"/>
+        <module name="VariableDeclarationUsageDistance"/>
+        <module name="CustomImportOrder">
+            <property name="thirdPartyPackageRegExp" value=".*"/>
+            <property name="specialImportsRegExp" value="com.google"/>
+            <property name="sortImportsInGroupAlphabetically" value="true"/>
+            <property name="customImportOrderRules" value="STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
+        </module>
+        <module name="MethodParamPad"/>
+        <module name="OperatorWrap">
+            <property name="option" value="NL"/>
+            <property name="tokens" value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR "/>
+        </module>
+    </module>
+</module>
diff --git a/import-control.xml b/import-control.xml
new file mode 100644
index 0000000..c06279f
--- /dev/null
+++ b/import-control.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<!DOCTYPE import-control PUBLIC
+    "-//Puppy Crawl//DTD Import Control 1.1//EN"
+    "http://www.puppycrawl.com/dtds/import_control_1_1.dtd">
+
+<import-control pkg="com.puppycrawl.tools.checkstyle">
+
+  <allow pkg="antlr"/>
+  <allow pkg="com.google.common.base"/>
+  <allow pkg="com.google.common.collect"/>
+  <allow pkg="com.puppycrawl.tools.checkstyle.api"/>
+  <allow pkg="java.io"/>
+  <allow pkg="java.net"/>
+  <allow pkg="java.nio"/>
+  <allow pkg="java.util"/>
+  <allow pkg="javax.xml.parsers"/>
+  <allow pkg="org.apache.commons.beanutils"/>
+  <allow pkg="org.apache.commons.logging"/>
+  <allow pkg="org.xml.sax"/>
+
+  <!-- The local ones -->
+  <allow class="java.security.MessageDigest" local-only="true"/>
+  <allow pkg="com.puppycrawl.tools.checkstyle.grammars" local-only="true"/>
+  <allow pkg="org.apache.commons.cli" local-only="true"/>
+  <allow pkg="org.apache.tools.ant" local-only="true"/>
+
+  <subpackage name="api">
+    <allow pkg="java.beans"/>
+    <allow pkg="java.lang.reflect"/>
+    <allow pkg="java.text"/>
+    <allow class="com.puppycrawl.tools.checkstyle.grammars.CommentListener"
+           local-only="true"/>
+    <allow class="com.puppycrawl.tools.checkstyle.grammars.GeneratedJavaTokenTypes"
+           local-only="true"/>
+  </subpackage>
+
+  <subpackage name="checks">
+    <allow pkg="com.puppycrawl.tools.checkstyle.checks"/>
+    <allow class="com.puppycrawl.tools.checkstyle.Defn"/>
+    <allow pkg="java.math"/>
+
+    <subpackage name="indentation">
+      <allow pkg="java.lang.reflect"/>
+    </subpackage>
+    <subpackage name="header">
+      <allow class="java.nio.charset.Charset" local-only="true"/>
+    </subpackage>
+  </subpackage>
+
+  <subpackage name="doclets">
+    <allow pkg="com.sun.javadoc"/>
+  </subpackage>
+
+  <subpackage name="filters">
+    <allow pkg="java.lang.ref"/>
+  </subpackage>
+
+  <subpackage name="gui">
+    <allow pkg="java.awt"/>
+    <allow pkg="javax.swing"/>
+  </subpackage>
+</import-control>
diff --git a/java.header b/java.header
new file mode 100644
index 0000000..0efd4ce
--- /dev/null
+++ b/java.header
@@ -0,0 +1,18 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..55afea1
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,829 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <!--
+      TIPS:
+
+      - use "mvn versions:display-dependency-updates" to see what dependencies
+        have updates available.
+
+      - use "mvn versions:display-plugin-updates" to see whan plugins have
+        updates available.
+  -->
+
+  <!-- Used for making releases. -->
+  <parent>
+    <artifactId>oss-parent</artifactId>
+    <groupId>org.sonatype.oss</groupId>
+    <version>7</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>com.puppycrawl.tools</groupId>
+  <artifactId>checkstyle</artifactId>
+  <version>5.9</version>
+  <packaging>jar</packaging>
+  <name>checkstyle</name>
+  <url>http://checkstyle.sourceforge.net/</url>
+  <issueManagement>
+    <system>GitHub Issues</system>
+    <url>https://github.com/checkstyle/checkstyle/issues</url>
+  </issueManagement>
+  <ciManagement>
+    <system>travis</system>
+    <url>https://travis-ci.org/checkstyle/checkstyle</url>
+  </ciManagement>
+  <inceptionYear>2001</inceptionYear>
+
+  <description>Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard</description>
+
+  <licenses>
+    <license>
+      <name>GNU Lesser General Public License</name>
+      <url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt</url>
+    </license>
+  </licenses>
+
+  <scm>
+    <connection>scm:git:git at github.com:checkstyle/checkstyle.git</connection>
+    <developerConnection>scm:git:git at github.com:checkstyle/checkstyle.git</developerConnection>
+    <url>https://github.com/checkstyle/checkstyle</url>
+  </scm>
+
+  <distributionManagement>
+    <site>
+      <id>sourceforge-snapshot-site</id>
+      <name>Snapshot Site</name>
+      <url>scp://shell.sourceforge.net/home/project-web/checkstyle/htdocs/snapshot</url>
+    </site>
+  </distributionManagement>
+
+  <developers>
+    <developer>
+      <id>oburn</id>
+      <name>Oliver Burn</name>
+      <roles>
+        <role>founder</role>
+      </roles>
+    </developer>
+    <developer>
+      <id>romanivanov</id>
+      <name>Roman Ivanov</name>
+      <roles>
+        <role>lead developer</role>
+      </roles>
+    </developer>
+    <developer>
+      <id>daniilyar</id>
+      <name>Daniil Yaroslavtsev</name>
+      <roles>
+        <role>developer</role>
+      </roles>
+    </developer>
+    <developer>
+      <id>moradan</id>
+      <name>Ivan Sopov</name>
+      <roles>
+        <role>developer</role>
+      </roles>
+    </developer>
+    <developer>
+      <id>lkuehne</id>
+      <name>Lars Kühne</name>
+      <roles>
+        <role>former developer</role>
+      </roles>
+    </developer>
+    <developer>
+      <id>rickgiles</id>
+      <name>Rick Giles</name>
+      <roles>
+        <role>former developer</role>
+      </roles>
+    </developer>
+    <developer>
+      <id>o_sukhodolsky</id>
+      <name>Oleg Sukhodolsky</name>
+      <roles>
+        <role>former developer</role>
+      </roles>
+    </developer>
+    <developer>
+      <id>mstudman</id>
+      <name>Michael Studman</name>
+      <roles>
+        <role>former developer</role>
+      </roles>
+    </developer>
+    <developer>
+      <id>tschneeberger</id>
+      <name>Travis Schneeberger</name>
+      <roles>
+        <role>former developer</role>
+      </roles>
+    </developer>
+  </developers>
+
+  <mailingLists>
+    <mailingList>
+      <name>checkstyle-announce</name>
+      <archive>https://groups.google.com/forum/#!forum/checkstyle-announce</archive>
+      <subscribe>mailto:checkstyle-announce%2Bsubscribe at googlegroups.com</subscribe>
+      <unsubscribe>mailto:checkstyle-announce%2Bunsubscribe at googlegroups.com</unsubscribe>
+    </mailingList>
+    <mailingList>
+      <name>checkstyle</name>
+      <archive>https://groups.google.com/forum/#!forum/checkstyle</archive>
+      <subscribe>mailto:checkstyle%2Bsubscribe at googlegroups.com</subscribe>
+      <unsubscribe>mailto:checkstyle%2Bunsubscribe at googlegroups.com</unsubscribe>
+    </mailingList>
+    <mailingList>
+      <name>checkstyle-devel</name>
+      <archive>https://groups.google.com/forum/#!forum/checkstyle-devel</archive>
+      <subscribe>mailto:checkstyle-devel%2Bsubscribe at googlegroups.com</subscribe>
+      <unsubscribe>mailto:checkstyle-devel%2Bunsubscribe at googlegroups.com</unsubscribe>
+    </mailingList>
+  </mailingLists>
+
+  <properties>
+    <project.build.sourceEncoding>iso-8859-1</project.build.sourceEncoding>
+    <projectVersion>${project.version}</projectVersion>
+    <tools.jar.version>1.5.0</tools.jar.version>
+    <tools.jar.path>${java.home}/../lib/tools.jar</tools.jar.path>
+    <maven.site.plugin.version>3.4</maven.site.plugin.version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>antlr</groupId>
+      <artifactId>antlr</artifactId>
+      <version>2.7.7</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-beanutils</groupId>
+      <artifactId>commons-beanutils-core</artifactId>
+      <version>1.8.3</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-cli</groupId>
+      <artifactId>commons-cli</artifactId>
+      <version>1.2</version>
+    </dependency>
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava-jdk5</artifactId>
+      <version>14.0.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.ant</groupId>
+      <artifactId>ant</artifactId>
+      <!-- Do not upgrade as this is the earliest version of ANT supported -->
+      <version>1.7.0</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <!-- test scope stuff -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.11</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <!-- This plugin's configuration is used to store Eclipse 
+             m2e settings only. It has no influence on the Maven build itself.
+        -->
+        <plugin>
+          <groupId>org.eclipse.m2e</groupId>
+          <artifactId>lifecycle-mapping</artifactId>
+          <version>1.0.0</version>
+          <configuration>
+            <lifecycleMappingMetadata>
+              <pluginExecutions>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-antrun-plugin</artifactId>
+                    <versionRange>[1.0,)</versionRange>
+                    <goals>
+                      <goal>run</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <execute />
+                  </action>
+                </pluginExecution>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>antlr-maven-plugin</artifactId>
+                    <versionRange>[1.0,)</versionRange>
+                    <goals>
+                      <goal>generate</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <execute />
+                  </action>
+                </pluginExecution>
+              </pluginExecutions>
+            </lifecycleMappingMetadata>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.3.2</version>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-site-plugin</artifactId>
+        <version>${maven.site.plugin.version}</version>
+        <configuration>
+          <xdocDirectory>${basedir}/src/xdocs</xdocDirectory>
+          <validate>true</validate>
+        </configuration>
+        <dependencies>
+          <dependency><!-- add support for ssh/scp -->
+            <groupId>org.apache.maven.wagon</groupId>
+            <artifactId>wagon-ssh</artifactId>
+            <version>1.0</version>
+          </dependency>
+        </dependencies>        
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-enforcer-plugin</artifactId>
+        <version>1.0.1</version>
+        <executions>
+          <execution>
+            <id>enforce-versions</id>
+            <goals>
+              <goal>enforce</goal>
+            </goals>
+            <configuration>
+              <rules>
+                <requireJavaVersion>
+                  <version>1.5</version>
+                </requireJavaVersion>
+              </rules>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- Generate the grammar -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>antlr-maven-plugin</artifactId>
+        <version>2.2</version>
+        <configuration>
+          <sourceDirectory>${basedir}/src/main/resources/com/puppycrawl/tools/checkstyle/grammars</sourceDirectory>
+          <grammars>java.g</grammars>
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>add-source</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
+            <configuration>
+              <sources>
+                <source>${project.build.directory}/generated-sources/antlr/</source>
+              </sources>
+            </configuration>
+          </execution>
+        </executions>
+       </plugin>
+      
+
+      <!-- Generate checkstylecompilation.properties -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <version>1.7</version>
+        <executions>
+          <execution>
+            <id>ant-phase-compile</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <property name="mvn.project.build.outputDirectory" value="${project.build.outputDirectory}" />
+                <property name="mvn.project.version" value="${project.version}" />
+                <property name="mvn.compile_classpath" refid="maven.compile.classpath" />
+                <ant antfile="ant-phase-compile.xml" />
+              </target>
+            </configuration>
+          </execution>
+          <execution>
+            <id>ant-phase-verify</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <property name="mvn.project.build.directory" value="${project.build.directory}" />
+                <property name="mvn.project.version" value="${project.version}" />
+                <property name="mvn.runtime_classpath" refid="maven.runtime.classpath" />
+                <ant antfile="ant-phase-verify.xml" />
+              </target>
+            </configuration>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.ant</groupId>
+            <artifactId>ant-nodeps</artifactId>
+            <version>1.7.1</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+
+      <!-- Used to set custom properties -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.9</version>
+        <configuration>
+          <argLine> -Duser.language=en -Duser.country=US</argLine>
+        </configuration>
+      </plugin>
+
+      <!-- Ensure the manifest has all the gory details -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <version>2.3.1</version>
+        <configuration>
+          <archive>
+            <manifest>
+              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>cobertura-maven-plugin</artifactId>
+        <version>2.5.1</version>
+        <configuration>
+          <instrumentation>
+            <excludes>
+              <exclude>com/puppycrawl/tools/checkstyle/CheckStyleTask*.class</exclude>
+              <exclude>com/puppycrawl/tools/checkstyle/doclets/*.class</exclude>
+              <exclude>com/puppycrawl/tools/checkstyle/grammars/*.class</exclude>
+              <exclude>com/puppycrawl/tools/checkstyle/gui/*.class</exclude>
+            </excludes>
+          </instrumentation>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-linkcheck-plugin</artifactId>
+        <version>1.1</version>
+        <configuration>
+          <excludedLinks>**/apidocs/*</excludedLinks>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-eclipse-plugin</artifactId>
+        <version>2.8</version>
+        <configuration>
+          <downloadSources>true</downloadSources>
+          <downloadJavadocs>true</downloadJavadocs>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>2.10</version>
+        <configuration>
+          <source>1.5</source>
+	  <failOnError>false</failOnError>
+	  <linksource>true</linksource>
+        </configuration>
+        <reportSets>
+          <reportSet>
+            <id>default</id>
+            <reports>
+              <report>javadoc</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+
+      <plugin>
+        <groupId>com.github.sevntu-checkstyle</groupId>
+        <artifactId>dsm-maven-plugin</artifactId>
+        <version>2.1.3</version>
+        <configuration>
+          <obfuscatePackageNames>true</obfuscatePackageNames>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-linkcheck-plugin</artifactId>
+<!--
+        <configuration>
+          <excludedLinks>**/apidocs/*</excludedLinks>
+        </configuration>
+-->
+      </plugin>
+
+    </plugins>
+  </reporting>
+
+  <profiles>
+    <profile>
+      <!-- To be used when making distributions. Run the command-->
+      <!-- mvn -Pdistro package -->
+      <id>distro</id>
+
+      <build>
+      	<plugins>
+
+	        <plugin>
+	          <groupId>org.apache.maven.plugins</groupId>
+	          <artifactId>maven-checkstyle-plugin</artifactId>
+	          <executions>
+	            <execution>
+	              <id>verify_checkstyle</id>
+	              <phase>verify</phase>
+	              <goals>
+	                <goal>checkstyle</goal>
+	              </goals>
+	            </execution>
+	          </executions>
+	        </plugin>
+
+	        <plugin>
+	          <groupId>org.codehaus.mojo</groupId>
+	          <artifactId>cobertura-maven-plugin</artifactId>
+	          <executions>
+	            <execution>
+	              <id>verify_cobertura</id>
+	              <phase>verify</phase>
+	              <goals>
+	                <goal>cobertura</goal>
+	              </goals>
+	              <configuration>
+	                <formats>
+	                  <format>xml</format>
+	                  <format>html</format>
+	                </formats>
+	              </configuration>
+	            </execution>
+	          </executions>
+	        </plugin>
+
+			 <plugin>
+	          <groupId>org.apache.maven.plugins</groupId>
+	          <artifactId>maven-pmd-plugin</artifactId>
+	          <executions>
+	            <execution>
+	              <id>verify_pmd</id>
+	              <phase>verify</phase>
+	              <goals>
+	                <goal>pmd</goal>
+	              </goals>
+	              <configuration>
+	                <targetJdk>1.5</targetJdk>
+	                <minimumTokens>20</minimumTokens>
+	              </configuration>
+	            </execution>
+	          </executions>
+	        </plugin>
+
+	        <plugin>
+	          <groupId>org.codehaus.mojo</groupId>
+	          <artifactId>findbugs-maven-plugin</artifactId>
+	          <version>3.0.0</version>
+	          <executions>
+	            <execution>
+	              <id>verify_findbugs</id>
+	              <phase>verify</phase>
+	              <goals>
+	                <goal>findbugs</goal>
+	              </goals>
+	              <configuration>
+	                <reportFormat>xml</reportFormat>
+	              </configuration>
+	            </execution>
+	          </executions>
+	        </plugin>
+
+          <!-- Generates the site, which is required for assembly -->
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-site-plugin</artifactId>
+            <version>${maven.site.plugin.version}</version>
+            <executions>
+              <execution>
+                <id>gen-site</id>
+                <phase>prepare-package</phase>
+                <goals>
+                  <goal>site</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+
+          <!-- Creates the all inclusive uber jar -->
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-shade-plugin</artifactId>
+            <version>1.4</version>
+            <executions>
+              <execution>
+                <phase>package</phase>
+                <goals>
+                  <goal>shade</goal>
+                </goals>
+                <configuration>
+                  <shadedArtifactAttached>true</shadedArtifactAttached>
+                  <shadedClassifierName>all</shadedClassifierName>
+                  <transformers>
+                    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                      <mainClass>com.puppycrawl.tools.checkstyle.Main</mainClass>
+                    </transformer>
+                  </transformers>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+
+          <!-- Creates the binary and source distributions -->
+          <plugin>
+            <artifactId>maven-assembly-plugin</artifactId>
+            <version>2.2.1</version>
+            <configuration>
+              <descriptors>
+                <descriptor>config/assembly-bin.xml</descriptor>
+                <descriptor>config/assembly-src.xml</descriptor>
+              </descriptors>
+            </configuration>
+            <executions>
+              <execution>
+                <id>make-bundle</id>
+                <phase>package</phase>
+                <goals>
+                  <goal>single</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+
+      <!-- Reports -->
+      <reporting>
+	      <plugins>
+
+	        <plugin>
+	          <groupId>org.apache.maven.plugins</groupId>
+	          <artifactId>maven-checkstyle-plugin</artifactId>
+	          <configuration>
+	            <configLocation>checkstyle_checks.xml</configLocation>
+	            <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
+	            <suppressionsLocation>suppressions.xml</suppressionsLocation>
+	            <headerLocation>java.header</headerLocation>
+	            <!-- this does not work
+	            <propertyExpansion>translation.severity=ignore</propertyExpansion>
+	        	-->
+	            <propertyExpansion>checkstyle.importcontrol.file=import-control.xml</propertyExpansion>          
+	        
+	          </configuration>
+	        </plugin>
+
+	        <plugin>
+	          <groupId>org.apache.maven.plugins</groupId>
+	          <artifactId>maven-surefire-report-plugin</artifactId>
+	        </plugin>
+	        
+	        <plugin>
+	          <groupId>org.codehaus.mojo</groupId>
+	          <artifactId>cobertura-maven-plugin</artifactId>
+	          <configuration>
+	            <formats>
+	              <format>xml</format>
+	              <format>html</format>
+	            </formats>
+	          </configuration>
+	        </plugin>
+
+	        <plugin>
+	          <groupId>org.codehaus.mojo</groupId>
+	          <artifactId>taglist-maven-plugin</artifactId>
+	          <version>2.4</version>
+	          <configuration>
+	            <tags>
+	              <tag>TODO</tag>
+	              <tag>@todo</tag>
+	              <tag>FIXME</tag>
+	            </tags>
+	          </configuration>
+	        </plugin>
+	       
+	        <plugin>
+	          <groupId>org.apache.maven.plugins</groupId>
+	          <artifactId>maven-pmd-plugin</artifactId>
+	          <configuration>
+	            <targetJdk>1.5</targetJdk>
+	            <minimumTokens>20</minimumTokens>
+	          </configuration>
+		      <reportSets>
+		          <reportSet>
+		            <reports>
+		              <report>pmd</report>
+		            </reports>
+		          </reportSet>
+		      </reportSets>	          
+	        </plugin>
+
+	        <plugin>
+	          <groupId>org.codehaus.mojo</groupId>
+	          <artifactId>findbugs-maven-plugin</artifactId>
+	          <version>3.0.0</version>
+	        </plugin> 
+	       
+	       </plugins>     	
+      </reporting>
+    </profile>
+
+    <profile>
+      <id>release</id>
+      <distributionManagement>
+        <site>
+          <id>sourceforge-site</id>
+          <name>Default Site</name>
+          <url>scp://shell.sourceforge.net/home/project-web/checkstyle/htdocs</url>
+        </site>
+      </distributionManagement>
+    </profile>
+
+    <profile>
+      <id>release-sign-artifacts</id>
+      <activation>
+        <property>
+          <name>performRelease</name>
+          <value>true</value>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-gpg-plugin</artifactId>
+            <version>1.4</version>
+            <executions>
+              <execution>
+                <id>sign-artifacts</id>
+                <phase>verify</phase>
+                <goals>
+                  <goal>sign</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
+    <!-- Bring in tools.jar for platforms which provide it -->
+    <profile>
+      <id>tools.jar-sun</id>
+      <activation>
+        <property>
+          <name>java.vendor</name>
+          <value>Sun Microsystems Inc.</value>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>com.sun</groupId>
+          <artifactId>tools</artifactId>
+          <version>${tools.jar.version}</version>
+          <scope>system</scope>
+          <systemPath>${tools.jar.path}</systemPath>
+        </dependency>
+      </dependencies>
+    </profile>
+    <profile>
+      <id>default-tools.jar-oracle</id>
+      <activation>
+        <property>
+          <name>java.vendor</name>
+          <value>Oracle Corporation</value>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>com.sun</groupId>
+          <artifactId>tools</artifactId>
+          <version>${tools.jar.version}</version>
+          <scope>system</scope>
+          <systemPath>${tools.jar.path}</systemPath>
+        </dependency>
+      </dependencies>
+    </profile>
+    
+    <profile>
+    <!-- that profile is used only for coveralls.io banner that show coverage at ReadMe.md  -->
+      <id>travis</id>
+      <build>
+      <plugins>
+        
+      <!-- Used to set custom properties by means of ${argLine}, that is required for jacoco -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.9</version>
+        <configuration>
+          <argLine>${argLine} -Duser.language=en -Duser.country=US</argLine>
+        </configuration>
+      </plugin>
+
+          <plugin>
+            <groupId>org.jacoco</groupId>
+            <artifactId>jacoco-maven-plugin</artifactId>
+            <version>0.7.1.201405082137</version>
+	        <configuration>
+	            <excludes>
+	              <exclude>com/puppycrawl/tools/checkstyle/CheckStyleTask*.class</exclude>
+	              <exclude>com/puppycrawl/tools/checkstyle/doclets/*.class</exclude>
+	              <exclude>com/puppycrawl/tools/checkstyle/grammars/*.class</exclude>
+	              <exclude>com/puppycrawl/tools/checkstyle/gui/*.class</exclude>
+	            </excludes>
+	        </configuration>               
+		<executions>
+			<execution>
+				<id>prepare-agent</id>
+				<goals>
+					<goal>prepare-agent</goal>
+				</goals>
+			</execution>
+			<execution>
+				<id>report</id>
+				<goals>
+					<goal>report</goal>
+				</goals>
+				<phase>prepare-package</phase>
+			</execution>
+		</executions>            
+          </plugin>
+
+          <plugin>
+            <groupId>org.eluder.coveralls</groupId>
+            <artifactId>coveralls-maven-plugin</artifactId>
+            <version>2.2.0</version>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
+    
+  </profiles>
+</project>
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/CheckStyleTask.java b/src/main/java/com/puppycrawl/tools/checkstyle/CheckStyleTask.java
new file mode 100644
index 0000000..10eb77a
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/CheckStyleTask.java
@@ -0,0 +1,666 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.api.AuditListener;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevelCounter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.URL;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Properties;
+import java.util.ResourceBundle;
+import org.apache.tools.ant.AntClassLoader;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.LogOutputStream;
+import org.apache.tools.ant.types.EnumeratedAttribute;
+import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.types.Path;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ * An implementation of a ANT task for calling checkstyle. See the documentation
+ * of the task for usage.
+ * @author Oliver Burn
+ */
+public class CheckStyleTask extends Task
+{
+    /** poor man's enum for an xml formatter */
+    private static final String E_XML = "xml";
+    /** poor man's enum for an plain formatter */
+    private static final String E_PLAIN = "plain";
+
+    /** class path to locate class files */
+    private Path mClasspath;
+
+    /** name of file to check */
+    private String mFileName;
+
+    /** config file containing configuration */
+    private String mConfigLocation;
+
+    /** whether to fail build on violations */
+    private boolean mFailOnViolation = true;
+
+    /** property to set on violations */
+    private String mFailureProperty;
+
+    /** contains the filesets to process */
+    private final List<FileSet> mFileSets = Lists.newArrayList();
+
+    /** contains the formatters to log to */
+    private final List<Formatter> mFormatters = Lists.newArrayList();
+
+    /** contains the Properties to override */
+    private final List<Property> mOverrideProps = Lists.newArrayList();
+
+    /** the name of the properties file */
+    private File mPropertiesFile;
+
+    /** the maximum number of errors that are tolerated. */
+    private int mMaxErrors;
+
+    /** the maximum number of warnings that are tolerated. */
+    private int mMaxWarnings = Integer.MAX_VALUE;
+
+    /**
+     * whether to omit ignored modules - some modules may log above
+     * their severity depending on their configuration (e.g. WriteTag) so
+     * need to be included
+     */
+    private boolean mOmitIgnoredModules = true;
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Setters for ANT specific attributes
+    ////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * Tells this task to set the named property to "true" when there
+     * is a violation.
+     * @param aPropertyName the name of the property to set
+     *                      in the event of an failure.
+     */
+    public void setFailureProperty(String aPropertyName)
+    {
+        mFailureProperty = aPropertyName;
+    }
+
+    /** @param aFail whether to fail if a violation is found */
+    public void setFailOnViolation(boolean aFail)
+    {
+        mFailOnViolation = aFail;
+    }
+
+    /**
+     * Sets the maximum number of errors allowed. Default is 0.
+     * @param aMaxErrors the maximum number of errors allowed.
+     */
+    public void setMaxErrors(int aMaxErrors)
+    {
+        mMaxErrors = aMaxErrors;
+    }
+
+    /**
+     * Sets the maximum number of warings allowed. Default is
+     * {@link Integer#MAX_VALUE}.
+     * @param aMaxWarnings the maximum number of warnings allowed.
+     */
+    public void setMaxWarnings(int aMaxWarnings)
+    {
+        mMaxWarnings = aMaxWarnings;
+    }
+
+    /**
+     * Adds a set of files (nested fileset attribute).
+     * @param aFS the file set to add
+     */
+    public void addFileset(FileSet aFS)
+    {
+        mFileSets.add(aFS);
+    }
+
+    /**
+     * Add a formatter.
+     * @param aFormatter the formatter to add for logging.
+     */
+    public void addFormatter(Formatter aFormatter)
+    {
+        mFormatters.add(aFormatter);
+    }
+
+    /**
+     * Add an override property.
+     * @param aProperty the property to add
+     */
+    public void addProperty(Property aProperty)
+    {
+        mOverrideProps.add(aProperty);
+    }
+
+    /**
+     * Set the class path.
+     * @param aClasspath the path to locate classes
+     */
+    public void setClasspath(Path aClasspath)
+    {
+        if (mClasspath == null) {
+            mClasspath = aClasspath;
+        }
+        else {
+            mClasspath.append(aClasspath);
+        }
+    }
+
+    /**
+     * Set the class path from a reference defined elsewhere.
+     * @param aClasspathRef the reference to an instance defining the classpath
+     */
+    public void setClasspathRef(Reference aClasspathRef)
+    {
+        createClasspath().setRefid(aClasspathRef);
+    }
+
+    /** @return a created path for locating classes */
+    public Path createClasspath()
+    {
+        if (mClasspath == null) {
+            mClasspath = new Path(getProject());
+        }
+        return mClasspath.createPath();
+    }
+
+    /** @param aFile the file to be checked */
+    public void setFile(File aFile)
+    {
+        mFileName = aFile.getAbsolutePath();
+    }
+
+    /** @param aFile the configuration file to use */
+    public void setConfig(File aFile)
+    {
+        setConfigLocation(aFile.getAbsolutePath());
+    }
+
+    /** @param aURL the URL of the configuration to use */
+    public void setConfigURL(URL aURL)
+    {
+        setConfigLocation(aURL.toExternalForm());
+    }
+
+    /**
+     * Sets the location of the configuration.
+     * @param aLocation the location, which is either a
+     */
+    private void setConfigLocation(String aLocation)
+    {
+        if (mConfigLocation != null) {
+            throw new BuildException("Attributes 'config' and 'configURL' "
+                    + "must not be set at the same time");
+        }
+        mConfigLocation = aLocation;
+    }
+
+    /** @param aOmit whether to omit ignored modules */
+    public void setOmitIgnoredModules(boolean aOmit)
+    {
+        mOmitIgnoredModules = aOmit;
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Setters for Checker configuration attributes
+    ////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * Sets a properties file for use instead
+     * of individually setting them.
+     * @param aProps the properties File to use
+     */
+    public void setProperties(File aProps)
+    {
+        mPropertiesFile = aProps;
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // The doers
+    ////////////////////////////////////////////////////////////////////////////
+
+    @Override
+    public void execute() throws BuildException
+    {
+        final long startTime = System.currentTimeMillis();
+
+        try {
+            realExecute();
+        }
+        finally {
+            final long endTime = System.currentTimeMillis();
+            log("Total execution took " + (endTime - startTime) + " ms.",
+                Project.MSG_VERBOSE);
+        }
+    }
+
+    /**
+     * Helper implementation to perform execution.
+     */
+    private void realExecute()
+    {
+        // output version info in debug mode
+        final ResourceBundle compilationProperties = ResourceBundle
+                .getBundle("checkstylecompilation");
+        final String version = compilationProperties
+                .getString("checkstyle.compile.version");
+        final String compileTimestamp = compilationProperties
+                .getString("checkstyle.compile.timestamp");
+        log("checkstyle version " + version, Project.MSG_VERBOSE);
+        log("compiled on " + compileTimestamp, Project.MSG_VERBOSE);
+
+        // Check for no arguments
+        if ((mFileName == null) && mFileSets.isEmpty()) {
+            throw new BuildException(
+                    "Must specify at least one of 'file' or nested 'fileset'.",
+                    getLocation());
+        }
+
+        if (mConfigLocation == null) {
+            throw new BuildException("Must specify 'config'.", getLocation());
+        }
+
+        // Create the checker
+        Checker c = null;
+        try {
+            c = createChecker();
+
+            final SeverityLevelCounter warningCounter =
+                new SeverityLevelCounter(SeverityLevel.WARNING);
+            c.addListener(warningCounter);
+
+            // Process the files
+            long startTime = System.currentTimeMillis();
+            final List<File> files = scanFileSets();
+            long endTime = System.currentTimeMillis();
+            log("To locate the files took " + (endTime - startTime) + " ms.",
+                Project.MSG_VERBOSE);
+
+            log("Running Checkstyle " + version + " on " + files.size()
+                    + " files", Project.MSG_INFO);
+            log("Using configuration " + mConfigLocation, Project.MSG_VERBOSE);
+
+            startTime = System.currentTimeMillis();
+            final int numErrs = c.process(files);
+            endTime = System.currentTimeMillis();
+            log("To process the files took " + (endTime - startTime) + " ms.",
+                Project.MSG_VERBOSE);
+            final int numWarnings = warningCounter.getCount();
+            final boolean ok = (numErrs <= mMaxErrors)
+                    && (numWarnings <= mMaxWarnings);
+
+            // Handle the return status
+            if (!ok) {
+                final String failureMsg =
+                        "Got " + numErrs + " errors and " + numWarnings
+                                + " warnings.";
+                if (mFailureProperty != null) {
+                    getProject().setProperty(mFailureProperty, failureMsg);
+                }
+
+                if (mFailOnViolation) {
+                    throw new BuildException(failureMsg, getLocation());
+                }
+            }
+        }
+        finally {
+            if (c != null) {
+                c.destroy();
+            }
+        }
+    }
+
+    /**
+     * Creates new instance of <code>Checker</code>.
+     * @return new instance of <code>Checker</code>
+     */
+    private Checker createChecker()
+    {
+        Checker c = null;
+        try {
+            final Properties props = createOverridingProperties();
+            final Configuration config =
+                ConfigurationLoader.loadConfiguration(
+                    mConfigLocation,
+                    new PropertiesExpander(props),
+                    mOmitIgnoredModules);
+
+            final DefaultContext context = new DefaultContext();
+            final ClassLoader loader = new AntClassLoader(getProject(),
+                    mClasspath);
+            context.add("classloader", loader);
+
+            final ClassLoader moduleClassLoader =
+                Checker.class.getClassLoader();
+            context.add("moduleClassLoader", moduleClassLoader);
+
+            c = new Checker();
+
+            c.contextualize(context);
+            c.configure(config);
+
+            // setup the listeners
+            final AuditListener[] listeners = getListeners();
+            for (AuditListener element : listeners) {
+                c.addListener(element);
+            }
+        }
+        catch (final Exception e) {
+            throw new BuildException("Unable to create a Checker: "
+                    + e.getMessage(), e);
+        }
+
+        return c;
+    }
+
+    /**
+     * Create the Properties object based on the arguments specified
+     * to the ANT task.
+     * @return the properties for property expansion expansion
+     * @throws BuildException if an error occurs
+     */
+    private Properties createOverridingProperties()
+    {
+        final Properties retVal = new Properties();
+
+        // Load the properties file if specified
+        if (mPropertiesFile != null) {
+            FileInputStream inStream = null;
+            try {
+                inStream = new FileInputStream(mPropertiesFile);
+                retVal.load(inStream);
+            }
+            catch (final FileNotFoundException e) {
+                throw new BuildException("Could not find Properties file '"
+                        + mPropertiesFile + "'", e, getLocation());
+            }
+            catch (final IOException e) {
+                throw new BuildException("Error loading Properties file '"
+                        + mPropertiesFile + "'", e, getLocation());
+            }
+            finally {
+                Utils.closeQuietly(inStream);
+            }
+        }
+
+        // override with Ant properties like ${basedir}
+        final Hashtable<?, ?> antProps = this.getProject().getProperties();
+        for (Object name : antProps.keySet()) {
+            final String key = (String) name;
+            final String value = String.valueOf(antProps.get(key));
+            retVal.put(key, value);
+        }
+
+        // override with properties specified in subelements
+        for (Property p : mOverrideProps) {
+            retVal.put(p.getKey(), p.getValue());
+        }
+
+        return retVal;
+    }
+
+    /**
+     * Return the list of listeners set in this task.
+     * @return the list of listeners.
+     * @throws ClassNotFoundException if an error occurs
+     * @throws InstantiationException if an error occurs
+     * @throws IllegalAccessException if an error occurs
+     * @throws IOException if an error occurs
+     */
+    protected AuditListener[] getListeners() throws ClassNotFoundException,
+            InstantiationException, IllegalAccessException, IOException
+    {
+        final int formatterCount = Math.max(1, mFormatters.size());
+
+        final AuditListener[] listeners = new AuditListener[formatterCount];
+
+        // formatters
+        if (mFormatters.isEmpty()) {
+            final OutputStream debug = new LogOutputStream(this,
+                    Project.MSG_DEBUG);
+            final OutputStream err = new LogOutputStream(this, Project.MSG_ERR);
+            listeners[0] = new DefaultLogger(debug, true, err, true);
+        }
+        else {
+            for (int i = 0; i < formatterCount; i++) {
+                final Formatter f = mFormatters.get(i);
+                listeners[i] = f.createListener(this);
+            }
+        }
+        return listeners;
+    }
+
+    /**
+     * returns the list of files (full path name) to process.
+     * @return the list of files included via the filesets.
+     */
+    protected List<File> scanFileSets()
+    {
+        final List<File> list = Lists.newArrayList();
+        if (mFileName != null) {
+            // oops we've got an additional one to process, don't
+            // forget it. No sweat, it's fully resolved via the setter.
+            log("Adding standalone file for audit", Project.MSG_VERBOSE);
+            list.add(new File(mFileName));
+        }
+        for (int i = 0; i < mFileSets.size(); i++) {
+            final FileSet fs = mFileSets.get(i);
+            final DirectoryScanner ds = fs.getDirectoryScanner(getProject());
+            ds.scan();
+
+            final String[] names = ds.getIncludedFiles();
+            log(i + ") Adding " + names.length + " files from directory "
+                    + ds.getBasedir(), Project.MSG_VERBOSE);
+
+            for (String element : names) {
+                final String pathname = ds.getBasedir() + File.separator
+                        + element;
+                list.add(new File(pathname));
+            }
+        }
+
+        return list;
+    }
+
+    /**
+     * Poor mans enumeration for the formatter types.
+     * @author Oliver Burn
+     */
+    public static class FormatterType extends EnumeratedAttribute
+    {
+        /** my possible values */
+        private static final String[] VALUES = {E_XML, E_PLAIN};
+
+        @Override
+        public String[] getValues()
+        {
+            return VALUES.clone();
+        }
+    }
+
+    /**
+     * Details about a formatter to be used.
+     * @author Oliver Burn
+     */
+    public static class Formatter
+    {
+        /** the formatter type */
+        private FormatterType mFormatterType;
+        /** the file to output to */
+        private File mToFile;
+        /** Whether or not the write to the named file. */
+        private boolean mUseFile = true;
+
+        /**
+         * Set the type of the formatter.
+         * @param aType the type
+         */
+        public void setType(FormatterType aType)
+        {
+            final String val = aType.getValue();
+            if (!E_XML.equals(val) && !E_PLAIN.equals(val)) {
+                throw new BuildException("Invalid formatter type: " + val);
+            }
+
+            mFormatterType = aType;
+        }
+
+        /**
+         * Set the file to output to.
+         * @param aTo the file to output to
+         */
+        public void setTofile(File aTo)
+        {
+            mToFile = aTo;
+        }
+
+        /**
+         * Sets whether or not we write to a file if it is provided.
+         * @param aUse whether not not to use provided file.
+         */
+        public void setUseFile(boolean aUse)
+        {
+            mUseFile = aUse;
+        }
+
+        /**
+         * Creates a listener for the formatter.
+         * @param aTask the task running
+         * @return a listener
+         * @throws IOException if an error occurs
+         */
+        public AuditListener createListener(Task aTask) throws IOException
+        {
+            if ((mFormatterType != null)
+                    && E_XML.equals(mFormatterType.getValue()))
+            {
+                return createXMLLogger(aTask);
+            }
+            return createDefaultLogger(aTask);
+        }
+
+        /**
+         * @return a DefaultLogger instance
+         * @param aTask the task to possibly log to
+         * @throws IOException if an error occurs
+         */
+        private AuditListener createDefaultLogger(Task aTask)
+            throws IOException
+        {
+            if ((mToFile == null) || !mUseFile) {
+                return new DefaultLogger(
+                    new LogOutputStream(aTask, Project.MSG_DEBUG),
+                    true, new LogOutputStream(aTask, Project.MSG_ERR), true);
+            }
+            return new DefaultLogger(new FileOutputStream(mToFile), true);
+        }
+
+        /**
+         * @return an XMLLogger instance
+         * @param aTask the task to possibly log to
+         * @throws IOException if an error occurs
+         */
+        private AuditListener createXMLLogger(Task aTask) throws IOException
+        {
+            if ((mToFile == null) || !mUseFile) {
+                return new XMLLogger(new LogOutputStream(aTask,
+                        Project.MSG_INFO), true);
+            }
+            return new XMLLogger(new FileOutputStream(mToFile), true);
+        }
+    }
+
+    /**
+     * Represents a property that consists of a key and value.
+     */
+    public static class Property
+    {
+        /** the property key */
+        private String mKey;
+        /** the property value */
+        private String mValue;
+
+        /** @return the property key */
+        public String getKey()
+        {
+            return mKey;
+        }
+
+        /** @param aKey sets the property key */
+        public void setKey(String aKey)
+        {
+            mKey = aKey;
+        }
+
+        /** @return the property value */
+        public String getValue()
+        {
+            return mValue;
+        }
+
+        /** @param aValue set the property value */
+        public void setValue(String aValue)
+        {
+            mValue = aValue;
+        }
+
+        /** @param aValue set the property value from a File */
+        public void setFile(File aValue)
+        {
+            setValue(aValue.getAbsolutePath());
+        }
+    }
+
+    /** Represents a custom listener. */
+    public static class Listener
+    {
+        /** classname of the listener class */
+        private String mClassname;
+
+        /** @return the classname */
+        public String getClassname()
+        {
+            return mClassname;
+        }
+
+        /** @param aClassname set the classname */
+        public void setClassname(String aClassname)
+        {
+            mClassname = aClassname;
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java b/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java
new file mode 100644
index 0000000..90d1523
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java
@@ -0,0 +1,592 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.AuditListener;
+import com.puppycrawl.tools.checkstyle.api.AutomaticBean;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import com.puppycrawl.tools.checkstyle.api.Context;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.FileSetCheck;
+import com.puppycrawl.tools.checkstyle.api.FileText;
+import com.puppycrawl.tools.checkstyle.api.Filter;
+import com.puppycrawl.tools.checkstyle.api.FilterSet;
+import com.puppycrawl.tools.checkstyle.api.LocalizedMessage;
+import com.puppycrawl.tools.checkstyle.api.MessageDispatcher;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevelCounter;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.nio.charset.Charset;
+import java.util.List;
+import java.util.Locale;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.StringTokenizer;
+
+/**
+ * This class provides the functionality to check a set of files.
+ * @author Oliver Burn
+ * @author <a href="mailto:stephane.bailliez at wanadoo.fr">Stephane Bailliez</a>
+ * @author lkuehne
+ */
+public class Checker extends AutomaticBean implements MessageDispatcher
+{
+    /** maintains error count */
+    private final SeverityLevelCounter mCounter = new SeverityLevelCounter(
+            SeverityLevel.ERROR);
+
+    /** vector of listeners */
+    private final List<AuditListener> mListeners = Lists.newArrayList();
+
+    /** vector of fileset checks */
+    private final List<FileSetCheck> mFileSetChecks = Lists.newArrayList();
+
+    /** class loader to resolve classes with. **/
+    private ClassLoader mLoader = Thread.currentThread()
+            .getContextClassLoader();
+
+    /** the basedir to strip off in filenames */
+    private String mBasedir;
+
+    /** locale country to report messages  **/
+    private String mLocaleCountry = Locale.getDefault().getCountry();
+    /** locale language to report messages  **/
+    private String mLocaleLanguage = Locale.getDefault().getLanguage();
+
+    /** The factory for instantiating submodules */
+    private ModuleFactory mModuleFactory;
+
+    /** The classloader used for loading Checkstyle module classes. */
+    private ClassLoader mModuleClassLoader;
+
+    /** the context of all child components */
+    private Context mChildContext;
+
+    /** The audit event filters */
+    private final FilterSet mFilters = new FilterSet();
+
+    /**
+     * The severity level of any violations found by submodules.
+     * The value of this property is passed to submodules via
+     * contextualize().
+     *
+     * Note: Since the Checker is merely a container for modules
+     * it does not make sense to implement logging functionality
+     * here. Consequently Checker does not extend AbstractViolationReporter,
+     * leading to a bit of duplicated code for severity level setting.
+     */
+    private SeverityLevel mSeverityLevel = SeverityLevel.ERROR;
+
+    /** Name of a charset */
+    private String mCharset = System.getProperty("file.encoding", "UTF-8");
+
+    /**
+     * Creates a new <code>Checker</code> instance.
+     * The instance needs to be contextualized and configured.
+     *
+     * @throws CheckstyleException if an error occurs
+     */
+    public Checker() throws CheckstyleException
+    {
+        addListener(mCounter);
+    }
+
+    @Override
+    public void finishLocalSetup() throws CheckstyleException
+    {
+        final Locale locale = new Locale(mLocaleLanguage, mLocaleCountry);
+        LocalizedMessage.setLocale(locale);
+
+        if (mModuleFactory == null) {
+
+            if (mModuleClassLoader == null) {
+                throw new CheckstyleException(
+                        "if no custom moduleFactory is set, "
+                                + "moduleClassLoader must be specified");
+            }
+
+            final Set<String> packageNames = PackageNamesLoader
+                    .getPackageNames(mModuleClassLoader);
+            mModuleFactory = new PackageObjectFactory(packageNames,
+                    mModuleClassLoader);
+        }
+
+        final DefaultContext context = new DefaultContext();
+        context.add("charset", mCharset);
+        context.add("classLoader", mLoader);
+        context.add("moduleFactory", mModuleFactory);
+        context.add("severity", mSeverityLevel.getName());
+        context.add("basedir", mBasedir);
+        mChildContext = context;
+    }
+
+    @Override
+    protected void setupChild(Configuration aChildConf)
+        throws CheckstyleException
+    {
+        final String name = aChildConf.getName();
+        try {
+            final Object child = mModuleFactory.createModule(name);
+            if (child instanceof AutomaticBean) {
+                final AutomaticBean bean = (AutomaticBean) child;
+                bean.contextualize(mChildContext);
+                bean.configure(aChildConf);
+            }
+            if (child instanceof FileSetCheck) {
+                final FileSetCheck fsc = (FileSetCheck) child;
+                addFileSetCheck(fsc);
+            }
+            else if (child instanceof Filter) {
+                final Filter filter = (Filter) child;
+                addFilter(filter);
+            }
+            else if (child instanceof AuditListener) {
+                final AuditListener listener = (AuditListener) child;
+                addListener(listener);
+            }
+            else {
+                throw new CheckstyleException(name
+                        + " is not allowed as a child in Checker");
+            }
+        }
+        catch (final Exception ex) {
+            // TODO i18n
+            throw new CheckstyleException("cannot initialize module " + name
+                    + " - " + ex.getMessage(), ex);
+        }
+    }
+
+    /**
+     * Adds a FileSetCheck to the list of FileSetChecks
+     * that is executed in process().
+     * @param aFileSetCheck the additional FileSetCheck
+     */
+    public void addFileSetCheck(FileSetCheck aFileSetCheck)
+    {
+        aFileSetCheck.setMessageDispatcher(this);
+        mFileSetChecks.add(aFileSetCheck);
+    }
+
+    /**
+     * Adds a filter to the end of the audit event filter chain.
+     * @param aFilter the additional filter
+     */
+    public void addFilter(Filter aFilter)
+    {
+        mFilters.addFilter(aFilter);
+    }
+
+    /**
+     * Removes filter.
+     * @param aFilter filter to remove.
+     */
+    public void removeFilter(Filter aFilter)
+    {
+        mFilters.removeFilter(aFilter);
+    }
+
+    /** Cleans up the object. **/
+    public void destroy()
+    {
+        mListeners.clear();
+        mFilters.clear();
+    }
+
+    /**
+     * Add the listener that will be used to receive events from the audit.
+     * @param aListener the nosy thing
+     */
+    public final void addListener(AuditListener aListener)
+    {
+        mListeners.add(aListener);
+    }
+
+    /**
+     * Removes a given listener.
+     * @param aListener a listener to remove
+     */
+    public void removeListener(AuditListener aListener)
+    {
+        mListeners.remove(aListener);
+    }
+
+    /**
+     * Processes a set of files with all FileSetChecks.
+     * Once this is done, it is highly recommended to call for
+     * the destroy method to close and remove the listeners.
+     * @param aFiles the list of files to be audited.
+     * @return the total number of errors found
+     * @see #destroy()
+     */
+    public int process(List<File> aFiles)
+    {
+        // Prepare to start
+        fireAuditStarted();
+        for (final FileSetCheck fsc : mFileSetChecks) {
+            fsc.beginProcessing(mCharset);
+        }
+
+        // Process each file
+        for (final File f : aFiles) {
+            final String fileName = f.getAbsolutePath();
+            fireFileStarted(fileName);
+            final SortedSet<LocalizedMessage> fileMessages = Sets.newTreeSet();
+            try {
+                final FileText theText = new FileText(f.getAbsoluteFile(),
+                        mCharset);
+                for (final FileSetCheck fsc : mFileSetChecks) {
+                    fileMessages.addAll(fsc.process(f, theText));
+                }
+            }
+            catch (final FileNotFoundException fnfe) {
+                Utils.getExceptionLogger().debug(
+                        "FileNotFoundException occured.", fnfe);
+                fileMessages.add(new LocalizedMessage(0,
+                        Defn.CHECKSTYLE_BUNDLE, "general.fileNotFound", null,
+                        null, this.getClass(), null));
+            }
+            catch (final IOException ioe) {
+                Utils.getExceptionLogger().debug("IOException occured.", ioe);
+                fileMessages.add(new LocalizedMessage(0,
+                        Defn.CHECKSTYLE_BUNDLE, "general.exception",
+                        new String[] {ioe.getMessage()}, null, this.getClass(),
+                        null));
+            }
+            fireErrors(fileName, fileMessages);
+            fireFileFinished(fileName);
+        }
+
+        // Finish up
+        for (final FileSetCheck fsc : mFileSetChecks) {
+            // They may also log!!!
+            fsc.finishProcessing();
+            fsc.destroy();
+        }
+
+        final int errorCount = mCounter.getCount();
+        fireAuditFinished();
+        return errorCount;
+    }
+
+    /**
+     * Create a stripped down version of a filename.
+     * @param aFileName the original filename
+     * @return the filename where an initial prefix of basedir is stripped
+     */
+    private String getStrippedFileName(final String aFileName)
+    {
+        return Utils.getStrippedFileName(mBasedir, aFileName);
+    }
+
+    /** @param aBasedir the base directory to strip off in filenames */
+    public void setBasedir(String aBasedir)
+    {
+        // we use getAbsolutePath() instead of getCanonicalPath()
+        // because normalize() removes all . and .. so path
+        // will be canonical by default.
+        mBasedir = normalize(aBasedir);
+    }
+
+    /**
+     * "normalize" the given absolute path.
+     *
+     * <p>This includes:
+     * <ul>
+     *   <li>Uppercase the drive letter if there is one.</li>
+     *   <li>Remove redundant slashes after the drive spec.</li>
+     *   <li>resolve all ./, .\, ../ and ..\ sequences.</li>
+     *   <li>DOS style paths that start with a drive letter will have
+     *     \ as the separator.</li>
+     * </ul>
+     * <p>
+     *
+     * @param aPath a path for "normalizing"
+     * @return "normalized" file name
+     * @throws java.lang.NullPointerException if the file path is
+     * equal to null.
+     */
+    public String normalize(String aPath)
+    {
+        final String osName = System.getProperty("os.name").toLowerCase(
+                Locale.US);
+        final boolean onNetWare = (osName.indexOf("netware") > -1);
+
+        String path = aPath.replace('/', File.separatorChar).replace('\\',
+            File.separatorChar);
+
+        // make sure we are dealing with an absolute path
+        final int colon = path.indexOf(":");
+
+        if (!onNetWare) {
+            if (!path.startsWith(File.separator)
+                && !((path.length() >= 2)
+                     && Character.isLetter(path.charAt(0)) && (colon == 1)))
+            {
+                final String msg = path + " is not an absolute path";
+                throw new IllegalArgumentException(msg);
+            }
+        }
+        else {
+            if (!path.startsWith(File.separator) && (colon == -1)) {
+                final String msg = path + " is not an absolute path";
+                throw new IllegalArgumentException(msg);
+            }
+        }
+
+        boolean dosWithDrive = false;
+        String root = null;
+        // Eliminate consecutive slashes after the drive spec
+        if ((!onNetWare && (path.length() >= 2)
+             && Character.isLetter(path.charAt(0)) && (path.charAt(1) == ':'))
+            || (onNetWare && (colon > -1)))
+        {
+
+            dosWithDrive = true;
+
+            final char[] ca = path.replace('/', '\\').toCharArray();
+            final StringBuffer sbRoot = new StringBuffer();
+            for (int i = 0; i < colon; i++) {
+                sbRoot.append(Character.toUpperCase(ca[i]));
+            }
+            sbRoot.append(':');
+            if (colon + 1 < path.length()) {
+                sbRoot.append(File.separatorChar);
+            }
+            root = sbRoot.toString();
+
+            // Eliminate consecutive slashes after the drive spec
+            final StringBuffer sbPath = new StringBuffer();
+            for (int i = colon + 1; i < ca.length; i++) {
+                if ((ca[i] != '\\') || ((ca[i] == '\\') && (ca[i - 1] != '\\')))
+                {
+                    sbPath.append(ca[i]);
+                }
+            }
+            path = sbPath.toString().replace('\\', File.separatorChar);
+
+        }
+        else {
+            if (path.length() == 1) {
+                root = File.separator;
+                path = "";
+            }
+            else if (path.charAt(1) == File.separatorChar) {
+                // UNC drive
+                root = File.separator + File.separator;
+                path = path.substring(2);
+            }
+            else {
+                root = File.separator;
+                path = path.substring(1);
+            }
+        }
+
+        final FastStack<String> s = FastStack.newInstance();
+        s.push(root);
+        final StringTokenizer tok = new StringTokenizer(path, File.separator);
+        while (tok.hasMoreTokens()) {
+            final String thisToken = tok.nextToken();
+            if (".".equals(thisToken)) {
+                continue;
+            }
+            else if ("..".equals(thisToken)) {
+                if (s.size() < 2) {
+                    throw new IllegalArgumentException("Cannot resolve path "
+                            + aPath);
+                }
+                s.pop();
+            }
+            else { // plain component
+                s.push(thisToken);
+            }
+        }
+
+        final StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < s.size(); i++) {
+            if (i > 1) {
+                // not before the filesystem root and not after it, since root
+                // already contains one
+                sb.append(File.separatorChar);
+            }
+            sb.append(s.peek(i));
+        }
+
+        path = sb.toString();
+        if (dosWithDrive) {
+            path = path.replace('/', '\\');
+        }
+        return path;
+    }
+
+    /** @return the base directory property used in unit-test. */
+    public final String getBasedir()
+    {
+        return mBasedir;
+    }
+
+    /** notify all listeners about the audit start */
+    protected void fireAuditStarted()
+    {
+        final AuditEvent evt = new AuditEvent(this);
+        for (final AuditListener listener : mListeners) {
+            listener.auditStarted(evt);
+        }
+    }
+
+    /** notify all listeners about the audit end */
+    protected void fireAuditFinished()
+    {
+        final AuditEvent evt = new AuditEvent(this);
+        for (final AuditListener listener : mListeners) {
+            listener.auditFinished(evt);
+        }
+    }
+
+    /**
+     * Notify all listeners about the beginning of a file audit.
+     *
+     * @param aFileName
+     *            the file to be audited
+     */
+    public void fireFileStarted(String aFileName)
+    {
+        final String stripped = getStrippedFileName(aFileName);
+        final AuditEvent evt = new AuditEvent(this, stripped);
+        for (final AuditListener listener : mListeners) {
+            listener.fileStarted(evt);
+        }
+    }
+
+    /**
+     * Notify all listeners about the end of a file audit.
+     *
+     * @param aFileName
+     *            the audited file
+     */
+    public void fireFileFinished(String aFileName)
+    {
+        final String stripped = getStrippedFileName(aFileName);
+        final AuditEvent evt = new AuditEvent(this, stripped);
+        for (final AuditListener listener : mListeners) {
+            listener.fileFinished(evt);
+        }
+    }
+
+    /**
+     * notify all listeners about the errors in a file.
+     *
+     * @param aFileName the audited file
+     * @param aErrors the audit errors from the file
+     */
+    public void fireErrors(String aFileName,
+        SortedSet<LocalizedMessage> aErrors)
+    {
+        final String stripped = getStrippedFileName(aFileName);
+        for (final LocalizedMessage element : aErrors) {
+            final AuditEvent evt = new AuditEvent(this, stripped, element);
+            if (mFilters.accept(evt)) {
+                for (final AuditListener listener : mListeners) {
+                    listener.addError(evt);
+                }
+            }
+        }
+    }
+
+    /**
+     * Sets the factory for creating submodules.
+     *
+     * @param aModuleFactory the factory for creating FileSetChecks
+     */
+    public void setModuleFactory(ModuleFactory aModuleFactory)
+    {
+        mModuleFactory = aModuleFactory;
+    }
+
+    /** @param aLocaleCountry the country to report messages  **/
+    public void setLocaleCountry(String aLocaleCountry)
+    {
+        mLocaleCountry = aLocaleCountry;
+    }
+
+    /** @param aLocaleLanguage the language to report messages  **/
+    public void setLocaleLanguage(String aLocaleLanguage)
+    {
+        mLocaleLanguage = aLocaleLanguage;
+    }
+
+    /**
+     * Sets the severity level.  The string should be one of the names
+     * defined in the <code>SeverityLevel</code> class.
+     *
+     * @param aSeverity  The new severity level
+     * @see SeverityLevel
+     */
+    public final void setSeverity(String aSeverity)
+    {
+        mSeverityLevel = SeverityLevel.getInstance(aSeverity);
+    }
+
+    /**
+     * Sets the classloader that is used to contextualize filesetchecks.
+     * Some Check implementations will use that classloader to improve the
+     * quality of their reports, e.g. to load a class and then analyze it via
+     * reflection.
+     * @param aLoader the new classloader
+     */
+    public final void setClassloader(ClassLoader aLoader)
+    {
+        mLoader = aLoader;
+    }
+
+    /**
+     * Sets the classloader used to load Checkstyle core and custom module
+     * classes when the module tree is being built up.
+     * If no custom ModuleFactory is being set for the Checker module then
+     * this module classloader must be specified.
+     * @param aModuleClassLoader the classloader used to load module classes
+     */
+    public final void setModuleClassLoader(ClassLoader aModuleClassLoader)
+    {
+        mModuleClassLoader = aModuleClassLoader;
+    }
+
+    /**
+     * Sets a named charset.
+     * @param aCharset the name of a charset
+     * @throws UnsupportedEncodingException if aCharset is unsupported.
+     */
+    public void setCharset(String aCharset)
+        throws UnsupportedEncodingException
+    {
+        if (!Charset.isSupported(aCharset)) {
+            final String message = "unsupported charset: '" + aCharset + "'";
+            throw new UnsupportedEncodingException(message);
+        }
+        mCharset = aCharset;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java b/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java
new file mode 100644
index 0000000..9b025e3
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java
@@ -0,0 +1,565 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.puppycrawl.tools.checkstyle.api.AbstractLoader;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Loads a configuration from a standard configuration XML file.
+ *
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public final class ConfigurationLoader
+{
+    /** the public ID for version 1_0 of the configuration dtd */
+    private static final String DTD_PUBLIC_ID_1_0 =
+        "-//Puppy Crawl//DTD Check Configuration 1.0//EN";
+
+    /** the resource for version 1_0 of the configuration dtd */
+    private static final String DTD_RESOURCE_NAME_1_0 =
+        "com/puppycrawl/tools/checkstyle/configuration_1_0.dtd";
+
+    /** the public ID for version 1_1 of the configuration dtd */
+    private static final String DTD_PUBLIC_ID_1_1 =
+        "-//Puppy Crawl//DTD Check Configuration 1.1//EN";
+
+    /** the resource for version 1_1 of the configuration dtd */
+    private static final String DTD_RESOURCE_NAME_1_1 =
+        "com/puppycrawl/tools/checkstyle/configuration_1_1.dtd";
+
+    /** the public ID for version 1_2 of the configuration dtd */
+    private static final String DTD_PUBLIC_ID_1_2 =
+        "-//Puppy Crawl//DTD Check Configuration 1.2//EN";
+
+    /** the resource for version 1_2 of the configuration dtd */
+    private static final String DTD_RESOURCE_NAME_1_2 =
+        "com/puppycrawl/tools/checkstyle/configuration_1_2.dtd";
+
+    /** the public ID for version 1_3 of the configuration dtd */
+    private static final String DTD_PUBLIC_ID_1_3 =
+        "-//Puppy Crawl//DTD Check Configuration 1.3//EN";
+
+    /** the resource for version 1_3 of the configuration dtd */
+    private static final String DTD_RESOURCE_NAME_1_3 =
+        "com/puppycrawl/tools/checkstyle/configuration_1_3.dtd";
+
+    /**
+     * Implements the SAX document handler interfaces, so they do not
+     * appear in the public API of the ConfigurationLoader.
+     */
+    private final class InternalLoader
+        extends AbstractLoader
+    {
+        /** module elements */
+        private static final String MODULE = "module";
+        /** name attribute */
+        private static final String NAME = "name";
+        /** property element */
+        private static final String PROPERTY = "property";
+        /** value attribute */
+        private static final String VALUE = "value";
+        /** default attribute */
+        private static final String DEFAULT = "default";
+        /** name of the severity property */
+        private static final String SEVERITY = "severity";
+        /** name of the message element */
+        private static final String MESSAGE = "message";
+        /** name of the key attribute */
+        private static final String KEY = "key";
+
+        /**
+         * Creates a new InternalLoader.
+         * @throws SAXException if an error occurs
+         * @throws ParserConfigurationException if an error occurs
+         */
+        private InternalLoader()
+            throws SAXException, ParserConfigurationException
+        {
+            // super(DTD_PUBLIC_ID_1_1, DTD_RESOURCE_NAME_1_1);
+            super(createIdToResourceNameMap());
+        }
+
+        @Override
+        public void startElement(String aNamespaceURI,
+                                 String aLocalName,
+                                 String aQName,
+                                 Attributes aAtts)
+            throws SAXException
+        {
+            // TODO: debug logging for support purposes
+            if (aQName.equals(MODULE)) {
+                //create configuration
+                final String name = aAtts.getValue(NAME);
+                final DefaultConfiguration conf =
+                    new DefaultConfiguration(name);
+
+                if (mConfiguration == null) {
+                    mConfiguration = conf;
+                }
+
+                //add configuration to it's parent
+                if (!mConfigStack.isEmpty()) {
+                    final DefaultConfiguration top =
+                        mConfigStack.peek();
+                    top.addChild(conf);
+                }
+
+                mConfigStack.push(conf);
+            }
+            else if (aQName.equals(PROPERTY)) {
+                //extract name and value
+                final String name = aAtts.getValue(NAME);
+                final String value;
+                try {
+                    value = replaceProperties(aAtts.getValue(VALUE),
+                        mOverridePropsResolver, aAtts.getValue(DEFAULT));
+                }
+                catch (final CheckstyleException ex) {
+                    throw new SAXException(ex.getMessage());
+                }
+
+                //add to attributes of configuration
+                final DefaultConfiguration top =
+                    mConfigStack.peek();
+                top.addAttribute(name, value);
+            }
+            else if (aQName.equals(MESSAGE)) {
+                //extract key and value
+                final String key = aAtts.getValue(KEY);
+                final String value = aAtts.getValue(VALUE);
+
+                //add to messages of configuration
+                final DefaultConfiguration top = mConfigStack.peek();
+                top.addMessage(key, value);
+            }
+        }
+
+        @Override
+        public void endElement(String aNamespaceURI,
+                               String aLocalName,
+                               String aQName)
+            throws SAXException
+        {
+            if (aQName.equals(MODULE)) {
+
+                final Configuration recentModule =
+                    mConfigStack.pop();
+
+                // remove modules with severity ignore if these modules should
+                // be omitted
+                SeverityLevel level = null;
+                try {
+                    final String severity = recentModule.getAttribute(SEVERITY);
+                    level = SeverityLevel.getInstance(severity);
+                }
+                catch (final CheckstyleException e) {
+                    //severity not set -> ignore
+                    ;
+                }
+
+                // omit this module if these should be omitted and the module
+                // has the severity 'ignore'
+                final boolean omitModule = mOmitIgnoredModules
+                    && SeverityLevel.IGNORE.equals(level);
+
+                if (omitModule && !mConfigStack.isEmpty()) {
+                    final DefaultConfiguration parentModule =
+                        mConfigStack.peek();
+                    parentModule.removeChild(recentModule);
+                }
+            }
+        }
+
+    }
+
+    /** the SAX document handler */
+    private final InternalLoader mSaxHandler;
+
+    /** property resolver **/
+    private final PropertyResolver mOverridePropsResolver;
+    /** the loaded configurations **/
+    private final FastStack<DefaultConfiguration> mConfigStack =
+        FastStack.newInstance();
+    /** the Configuration that is being built */
+    private Configuration mConfiguration;
+
+    /** flags if modules with the severity 'ignore' should be omitted. */
+    private final boolean mOmitIgnoredModules;
+
+    /**
+     * Creates mapping between local resources and dtd ids.
+     * @return map between local resources and dtd ids.
+     */
+    private static Map<String, String> createIdToResourceNameMap()
+    {
+        final Map<String, String> map = Maps.newHashMap();
+        map.put(DTD_PUBLIC_ID_1_0, DTD_RESOURCE_NAME_1_0);
+        map.put(DTD_PUBLIC_ID_1_1, DTD_RESOURCE_NAME_1_1);
+        map.put(DTD_PUBLIC_ID_1_2, DTD_RESOURCE_NAME_1_2);
+        map.put(DTD_PUBLIC_ID_1_3, DTD_RESOURCE_NAME_1_3);
+        return map;
+    }
+
+    /**
+     * Creates a new <code>ConfigurationLoader</code> instance.
+     * @param aOverrideProps resolver for overriding properties
+     * @param aOmitIgnoredModules <code>true</code> if ignored modules should be
+     *         omitted
+     * @throws ParserConfigurationException if an error occurs
+     * @throws SAXException if an error occurs
+     */
+    private ConfigurationLoader(final PropertyResolver aOverrideProps,
+                                final boolean aOmitIgnoredModules)
+        throws ParserConfigurationException, SAXException
+    {
+        mSaxHandler = new InternalLoader();
+        mOverridePropsResolver = aOverrideProps;
+        mOmitIgnoredModules = aOmitIgnoredModules;
+    }
+
+    /**
+     * Parses the specified input source loading the configuration information.
+     * The stream wrapped inside the source, if any, is NOT
+     * explicitely closed after parsing, it is the responsibility of
+     * the caller to close the stream.
+     *
+     * @param aSource the source that contains the configuration data
+     * @throws IOException if an error occurs
+     * @throws SAXException if an error occurs
+     */
+    private void parseInputSource(InputSource aSource)
+        throws IOException, SAXException
+    {
+        mSaxHandler.parseInputSource(aSource);
+    }
+
+    /**
+     * Returns the module configurations in a specified file.
+     * @param aConfig location of config file, can be either a URL or a filename
+     * @param aOverridePropsResolver overriding properties
+     * @return the check configurations
+     * @throws CheckstyleException if an error occurs
+     */
+    public static Configuration loadConfiguration(String aConfig,
+            PropertyResolver aOverridePropsResolver) throws CheckstyleException
+    {
+        return loadConfiguration(aConfig, aOverridePropsResolver, false);
+    }
+
+    /**
+     * Returns the module configurations in a specified file.
+     *
+     * @param aConfig location of config file, can be either a URL or a filename
+     * @param aOverridePropsResolver overriding properties
+     * @param aOmitIgnoredModules <code>true</code> if modules with severity
+     *            'ignore' should be omitted, <code>false</code> otherwise
+     * @return the check configurations
+     * @throws CheckstyleException if an error occurs
+     */
+    public static Configuration loadConfiguration(String aConfig,
+        PropertyResolver aOverridePropsResolver, boolean aOmitIgnoredModules)
+        throws CheckstyleException
+    {
+        try {
+            // figure out if this is a File or a URL
+            URI uri;
+            try {
+                final URL url = new URL(aConfig);
+                uri = url.toURI();
+            }
+            catch (final MalformedURLException ex) {
+                uri = null;
+            }
+            catch (final URISyntaxException ex) {
+                // URL violating RFC 2396
+                uri = null;
+            }
+            if (uri == null) {
+                final File file = new File(aConfig);
+                if (file.exists()) {
+                    uri = file.toURI();
+                }
+                else {
+                    // check to see if the file is in the classpath
+                    try {
+                        final URL configUrl = ConfigurationLoader.class
+                                .getResource(aConfig);
+                        if (configUrl == null) {
+                            throw new FileNotFoundException(aConfig);
+                        }
+                        uri = configUrl.toURI();
+                    }
+                    catch (final URISyntaxException e) {
+                        throw new FileNotFoundException(aConfig);
+                    }
+                }
+            }
+            final InputSource source = new InputSource(uri.toString());
+            return loadConfiguration(source, aOverridePropsResolver,
+                    aOmitIgnoredModules);
+        }
+        catch (final FileNotFoundException e) {
+            throw new CheckstyleException("unable to find " + aConfig, e);
+        }
+        catch (final CheckstyleException e) {
+                //wrap again to add file name info
+            throw new CheckstyleException("unable to read " + aConfig + " - "
+                    + e.getMessage(), e);
+        }
+    }
+
+    /**
+     * Returns the module configurations from a specified input stream.
+     * Note that clients are required to close the given stream by themselves
+     *
+     * @param aConfigStream the input stream to the Checkstyle configuration
+     * @param aOverridePropsResolver overriding properties
+     * @param aOmitIgnoredModules <code>true</code> if modules with severity
+     *            'ignore' should be omitted, <code>false</code> otherwise
+     * @return the check configurations
+     * @throws CheckstyleException if an error occurs
+     *
+     * @deprecated As this method does not provide a valid system ID,
+     *   preventing resolution of external entities, a
+     *   {@link #loadConfiguration(InputSource,PropertyResolver,boolean)
+     *          version using an InputSource}
+     *   should be used instead
+     */
+    @Deprecated
+    public static Configuration loadConfiguration(InputStream aConfigStream,
+        PropertyResolver aOverridePropsResolver, boolean aOmitIgnoredModules)
+        throws CheckstyleException
+    {
+        return loadConfiguration(new InputSource(aConfigStream),
+                                 aOverridePropsResolver, aOmitIgnoredModules);
+    }
+
+    /**
+     * Returns the module configurations from a specified input source.
+     * Note that if the source does wrap an open byte or character
+     * stream, clients are required to close that stream by themselves
+     *
+     * @param aConfigSource the input stream to the Checkstyle configuration
+     * @param aOverridePropsResolver overriding properties
+     * @param aOmitIgnoredModules <code>true</code> if modules with severity
+     *            'ignore' should be omitted, <code>false</code> otherwise
+     * @return the check configurations
+     * @throws CheckstyleException if an error occurs
+     */
+    public static Configuration loadConfiguration(InputSource aConfigSource,
+        PropertyResolver aOverridePropsResolver, boolean aOmitIgnoredModules)
+        throws CheckstyleException
+    {
+        try {
+            final ConfigurationLoader loader =
+                new ConfigurationLoader(aOverridePropsResolver,
+                                        aOmitIgnoredModules);
+            loader.parseInputSource(aConfigSource);
+            return loader.getConfiguration();
+        }
+        catch (final ParserConfigurationException e) {
+            throw new CheckstyleException(
+                "unable to parse configuration stream", e);
+        }
+        catch (final SAXParseException e) {
+            throw new CheckstyleException("unable to parse configuration stream"
+                    + " - " + e.getMessage() + ":" + e.getLineNumber()
+                    + ":" + e.getColumnNumber(), e);
+        }
+        catch (final SAXException e) {
+            throw new CheckstyleException("unable to parse configuration stream"
+                    + " - " + e.getMessage(), e);
+        }
+        catch (final IOException e) {
+            throw new CheckstyleException("unable to read from stream", e);
+        }
+    }
+
+    /**
+     * Returns the configuration in the last file parsed.
+     * @return Configuration object
+     */
+    private Configuration getConfiguration()
+    {
+        return mConfiguration;
+    }
+
+    /**
+     * Replaces <code>${xxx}</code> style constructions in the given value
+     * with the string value of the corresponding data types.
+     *
+     * The method is package visible to facilitate testing.
+     *
+     * @param aValue The string to be scanned for property references.
+     *              May be <code>null</code>, in which case this
+     *              method returns immediately with no effect.
+     * @param aProps  Mapping (String to String) of property names to their
+     *              values. Must not be <code>null</code>.
+     * @param aDefaultValue default to use if one of the properties in aValue
+     *              cannot be resolved from aProps.
+     *
+     * @throws CheckstyleException if the string contains an opening
+     *                           <code>${</code> without a closing
+     *                           <code>}</code>
+     * @return the original string with the properties replaced, or
+     *         <code>null</code> if the original string is <code>null</code>.
+     *
+     * Code copied from ant -
+     * http://cvs.apache.org/viewcvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java
+     */
+    // Package visible for testing purposes
+    static String replaceProperties(
+            String aValue, PropertyResolver aProps, String aDefaultValue)
+        throws CheckstyleException
+    {
+        if (aValue == null) {
+            return null;
+        }
+
+        final List<String> fragments = Lists.newArrayList();
+        final List<String> propertyRefs = Lists.newArrayList();
+        parsePropertyString(aValue, fragments, propertyRefs);
+
+        final StringBuffer sb = new StringBuffer();
+        final Iterator<String> i = fragments.iterator();
+        final Iterator<String> j = propertyRefs.iterator();
+        while (i.hasNext()) {
+            String fragment = i.next();
+            if (fragment == null) {
+                final String propertyName = j.next();
+                fragment = aProps.resolve(propertyName);
+                if (fragment == null) {
+                    if (aDefaultValue != null) {
+                        return aDefaultValue;
+                    }
+                    throw new CheckstyleException(
+                        "Property ${" + propertyName + "} has not been set");
+                }
+            }
+            sb.append(fragment);
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     * Parses a string containing <code>${xxx}</code> style property
+     * references into two lists. The first list is a collection
+     * of text fragments, while the other is a set of string property names.
+     * <code>null</code> entries in the first list indicate a property
+     * reference from the second list.
+     *
+     * @param aValue     Text to parse. Must not be <code>null</code>.
+     * @param aFragments List to add text fragments to.
+     *                  Must not be <code>null</code>.
+     * @param aPropertyRefs List to add property names to.
+     *                     Must not be <code>null</code>.
+     *
+     * @throws CheckstyleException if the string contains an opening
+     *                           <code>${</code> without a closing
+     *                           <code>}</code>
+     * Code copied from ant -
+     * http://cvs.apache.org/viewcvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java
+     */
+    private static void parsePropertyString(String aValue,
+                                           List<String> aFragments,
+                                           List<String> aPropertyRefs)
+        throws CheckstyleException
+    {
+        int prev = 0;
+        int pos;
+        //search for the next instance of $ from the 'prev' position
+        while ((pos = aValue.indexOf("$", prev)) >= 0) {
+
+            //if there was any text before this, add it as a fragment
+            //TODO, this check could be modified to go if pos>prev;
+            //seems like this current version could stick empty strings
+            //into the list
+            if (pos > 0) {
+                aFragments.add(aValue.substring(prev, pos));
+            }
+            //if we are at the end of the string, we tack on a $
+            //then move past it
+            if (pos == (aValue.length() - 1)) {
+                aFragments.add("$");
+                prev = pos + 1;
+            }
+            else if (aValue.charAt(pos + 1) != '{') {
+                //peek ahead to see if the next char is a property or not
+                //not a property: insert the char as a literal
+                /*
+                fragments.addElement(value.substring(pos + 1, pos + 2));
+                prev = pos + 2;
+                */
+                if (aValue.charAt(pos + 1) == '$') {
+                    //backwards compatibility two $ map to one mode
+                    aFragments.add("$");
+                    prev = pos + 2;
+                }
+                else {
+                    //new behaviour: $X maps to $X for all values of X!='$'
+                    aFragments.add(aValue.substring(pos, pos + 2));
+                    prev = pos + 2;
+                }
+
+            }
+            else {
+                //property found, extract its name or bail on a typo
+                final int endName = aValue.indexOf('}', pos);
+                if (endName < 0) {
+                    throw new CheckstyleException("Syntax error in property: "
+                                                    + aValue);
+                }
+                final String propertyName = aValue.substring(pos + 2, endName);
+                aFragments.add(null);
+                aPropertyRefs.add(propertyName);
+                prev = endName + 1;
+            }
+        }
+        //no more $ signs found
+        //if there is any tail to the file, append it
+        if (prev < aValue.length()) {
+            aFragments.add(aValue.substring(prev));
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/DefaultConfiguration.java b/src/main/java/com/puppycrawl/tools/checkstyle/DefaultConfiguration.java
new file mode 100644
index 0000000..ae48f21
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/DefaultConfiguration.java
@@ -0,0 +1,146 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import com.google.common.collect.ImmutableMap;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Default implementation of the Configuration interface.
+ * @author lkuehne
+ */
+public final class DefaultConfiguration implements Configuration
+{
+    /** Required for serialization. */
+    private static final long serialVersionUID = 1157875385356127169L;
+
+    /** The name of this configuration */
+    private final String mName;
+
+    /** the list of child Configurations */
+    private final List<Configuration> mChildren = Lists.newArrayList();
+
+    /** the map from attribute names to attribute values */
+    private final Map<String, String> mAttributeMap = Maps.newHashMap();
+
+    /** the map containing custom messages. */
+    private final Map<String, String> mMessages = Maps.newHashMap();
+
+    /**
+     * Instantiates a DefaultConfiguration.
+     * @param aName the name for this DefaultConfiguration.
+     */
+    public DefaultConfiguration(String aName)
+    {
+        mName = aName;
+    }
+
+    /** {@inheritDoc} */
+    public String[] getAttributeNames()
+    {
+        final Set<String> keySet = mAttributeMap.keySet();
+        return keySet.toArray(new String[keySet.size()]);
+    }
+
+    /** {@inheritDoc} */
+    public String getAttribute(String aName) throws CheckstyleException
+    {
+        if (!mAttributeMap.containsKey(aName)) {
+            // TODO: i18n
+            throw new CheckstyleException(
+                    "missing key '" + aName + "' in " + getName());
+        }
+        return mAttributeMap.get(aName);
+    }
+
+    /** {@inheritDoc} */
+    public Configuration[] getChildren()
+    {
+        return mChildren.toArray(
+            new Configuration[mChildren.size()]);
+    }
+
+    /** {@inheritDoc} */
+    public String getName()
+    {
+        return mName;
+    }
+
+    /**
+     * Makes a configuration a child of this configuration.
+     * @param aConfiguration the child configuration.
+     */
+    public void addChild(Configuration aConfiguration)
+    {
+        mChildren.add(aConfiguration);
+    }
+
+    /**
+     * Removes a child of this configuration.
+     * @param aConfiguration the child configuration to remove.
+     */
+    public void removeChild(final Configuration aConfiguration)
+    {
+        mChildren.remove(aConfiguration);
+    }
+
+    /**
+     * Adds an attribute to this configuration.
+     * @param aName the name of the attribute.
+     * @param aValue the value of the attribute.
+     */
+    public void addAttribute(String aName, String aValue)
+    {
+        final String current = mAttributeMap.put(aName, aValue);
+        if (null == current) {
+            mAttributeMap.put(aName, aValue);
+        }
+        else {
+            mAttributeMap.put(aName, current + "," + aValue);
+        }
+    }
+
+    /**
+     * Adds a custom message to this configuration.
+     * @param aKey the message key
+     * @param aValue the custom message pattern
+     */
+    public void addMessage(String aKey, String aValue)
+    {
+        mMessages.put(aKey, aValue);
+    }
+
+    /**
+     * Returns an unmodifiable map instance containing the custom messages
+     * for this configuration.
+     * @return unmodifiable map containing custom messages
+     */
+    public ImmutableMap<String, String> getMessages()
+    {
+        return ImmutableMap.copyOf(mMessages);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/DefaultContext.java b/src/main/java/com/puppycrawl/tools/checkstyle/DefaultContext.java
new file mode 100644
index 0000000..2fee817
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/DefaultContext.java
@@ -0,0 +1,59 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import com.google.common.collect.ImmutableList;
+
+import com.google.common.collect.ImmutableCollection;
+
+import com.google.common.collect.Maps;
+import com.puppycrawl.tools.checkstyle.api.Context;
+import java.util.Map;
+
+/**
+ * A default implementation of the Context interface.
+ * @author lkuehne
+ */
+public final class DefaultContext implements Context
+{
+    /** stores the context entries */
+    private final Map<String, Object> mEntries = Maps.newHashMap();
+
+    /** {@inheritDoc} */
+    public Object get(String aKey)
+    {
+        return mEntries.get(aKey);
+    }
+
+    /** {@inheritDoc} */
+    public ImmutableCollection<String> getAttributeNames()
+    {
+        return ImmutableList.copyOf(mEntries.keySet());
+    }
+
+    /**
+     * Adds a context entry.
+     * @param aKey the context key
+     * @param aValue the value for aKey
+     */
+    public void add(String aKey, Object aValue)
+    {
+        mEntries.put(aKey, aValue);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/DefaultLogger.java b/src/main/java/com/puppycrawl/tools/checkstyle/DefaultLogger.java
new file mode 100644
index 0000000..d6e302e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/DefaultLogger.java
@@ -0,0 +1,167 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import java.io.OutputStream;
+import java.io.PrintWriter;
+
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.AuditListener;
+import com.puppycrawl.tools.checkstyle.api.AutomaticBean;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+
+/**
+ * Simple plain logger for text output.
+ * This is maybe not very suitable for a text output into a file since it
+ * does not need all 'audit finished' and so on stuff, but it looks good on
+ * stdout anyway. If there is really a problem this is what XMLLogger is for.
+ * It gives structure.
+ *
+ * @author <a href="mailto:stephane.bailliez at wanadoo.fr">Stephane Bailliez</a>
+ * @see XMLLogger
+ */
+public class DefaultLogger
+    extends AutomaticBean
+    implements AuditListener
+{
+    /** cushion for avoiding StringBuffer.expandCapacity */
+    private static final int BUFFER_CUSHION = 12;
+
+    /** where to write info messages **/
+    private final PrintWriter mInfoWriter;
+    /** close info stream after use */
+    private final boolean mCloseInfo;
+
+    /** where to write error messages **/
+    private final PrintWriter mErrorWriter;
+    /** close error stream after use */
+    private final boolean mCloseError;
+
+    /**
+     * Creates a new <code>DefaultLogger</code> instance.
+     * @param aOS where to log infos and errors
+     * @param aCloseStreamsAfterUse if aOS should be closed in auditFinished()
+     */
+    public DefaultLogger(OutputStream aOS, boolean aCloseStreamsAfterUse)
+    {
+        // no need to close aOS twice
+        this(aOS, aCloseStreamsAfterUse, aOS, false);
+    }
+
+    /**
+     * Creates a new <code>DefaultLogger</code> instance.
+     *
+     * @param aInfoStream the <code>OutputStream</code> for info messages
+     * @param aCloseInfoAfterUse auditFinished should close aInfoStream
+     * @param aErrorStream the <code>OutputStream</code> for error messages
+     * @param aCloseErrorAfterUse auditFinished should close aErrorStream
+     */
+    public DefaultLogger(OutputStream aInfoStream,
+                         boolean aCloseInfoAfterUse,
+                         OutputStream aErrorStream,
+                         boolean aCloseErrorAfterUse)
+    {
+        mCloseInfo = aCloseInfoAfterUse;
+        mCloseError = aCloseErrorAfterUse;
+        mInfoWriter = new PrintWriter(aInfoStream);
+        mErrorWriter = (aInfoStream == aErrorStream)
+            ? mInfoWriter
+            : new PrintWriter(aErrorStream);
+    }
+
+    /**
+     * Print an Emacs compliant line on the error stream.
+     * If the column number is non zero, then also display it.
+     * @param aEvt {@inheritDoc}
+     * @see AuditListener
+     **/
+    public void addError(AuditEvent aEvt)
+    {
+        final SeverityLevel severityLevel = aEvt.getSeverityLevel();
+        if (!SeverityLevel.IGNORE.equals(severityLevel)) {
+
+            final String fileName = aEvt.getFileName();
+            final String message = aEvt.getMessage();
+
+            // avoid StringBuffer.expandCapacity
+            final int bufLen = fileName.length() + message.length()
+                + BUFFER_CUSHION;
+            final StringBuffer sb = new StringBuffer(bufLen);
+
+            sb.append(fileName);
+            sb.append(':').append(aEvt.getLine());
+            if (aEvt.getColumn() > 0) {
+                sb.append(':').append(aEvt.getColumn());
+            }
+            if (SeverityLevel.WARNING.equals(severityLevel)) {
+                sb.append(": warning");
+            }
+            sb.append(": ").append(message);
+            mErrorWriter.println(sb.toString());
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void addException(AuditEvent aEvt, Throwable aThrowable)
+    {
+        synchronized (mErrorWriter) {
+            mErrorWriter.println("Error auditing " + aEvt.getFileName());
+            aThrowable.printStackTrace(mErrorWriter);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void auditStarted(AuditEvent aEvt)
+    {
+        mInfoWriter.println("Starting audit...");
+    }
+
+    /** {@inheritDoc} */
+    public void fileFinished(AuditEvent aEvt)
+    {
+    }
+
+    /** {@inheritDoc} */
+    public void fileStarted(AuditEvent aEvt)
+    {
+    }
+
+    /** {@inheritDoc} */
+    public void auditFinished(AuditEvent aEvt)
+    {
+        mInfoWriter.println("Audit done.");
+        closeStreams();
+    }
+
+    /**
+     * Flushes the output streams and closes them if needed.
+     */
+    protected void closeStreams()
+    {
+        mInfoWriter.flush();
+        if (mCloseInfo) {
+            mInfoWriter.close();
+        }
+
+        mErrorWriter.flush();
+        if (mCloseError) {
+            mErrorWriter.close();
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/Defn.java b/src/main/java/com/puppycrawl/tools/checkstyle/Defn.java
new file mode 100644
index 0000000..d18ecb4
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/Defn.java
@@ -0,0 +1,39 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Contains constant definitions common to the package.
+ * @author Oliver Burn
+ **/
+public final class Defn
+{
+    ///CLOVER:OFF
+    /**
+     * Do no allow <code>Defn</code> instances to be created.
+     **/
+    private Defn()
+    {
+    }
+    ///CLOVER:ON
+
+    /** Name of resource bundle for Checkstyle. */
+    public static final String CHECKSTYLE_BUNDLE =
+            "com.puppycrawl.tools.checkstyle.messages";
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/Main.java b/src/main/java/com/puppycrawl/tools/checkstyle/Main.java
new file mode 100644
index 0000000..cff5712
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/Main.java
@@ -0,0 +1,295 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.api.AuditListener;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.List;
+import java.util.Properties;
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.CommandLineParser;
+import org.apache.commons.cli.HelpFormatter;
+import org.apache.commons.cli.Options;
+import org.apache.commons.cli.ParseException;
+import org.apache.commons.cli.PosixParser;
+
+/**
+ * Wrapper command line program for the Checker.
+ * @author Oliver Burn
+ **/
+public final class Main
+{
+    /** the options to the command line */
+    private static final Options OPTS = new Options();
+    static {
+        OPTS.addOption("c", true, "The check configuration file to use.");
+        OPTS.addOption("r", true, "Traverse the directory for source files");
+        OPTS.addOption("o", true, "Sets the output file. Defaults to stdout");
+        OPTS.addOption("p", true, "Loads the properties file");
+        OPTS.addOption(
+            "f",
+            true,
+            "Sets the output format. (plain|xml). Defaults to plain");
+    }
+
+    /** Stop instances being created. */
+    private Main()
+    {
+    }
+
+    /**
+     * Loops over the files specified checking them for errors. The exit code
+     * is the number of errors found in all the files.
+     * @param aArgs the command line arguments
+     **/
+    public static void main(String[] aArgs)
+    {
+        // parse the parameters
+        final CommandLineParser clp = new PosixParser();
+        CommandLine line = null;
+        try {
+            line = clp.parse(OPTS, aArgs);
+        }
+        catch (final ParseException e) {
+            e.printStackTrace();
+            usage();
+        }
+        assert line != null;
+
+        // setup the properties
+        final Properties props =
+            line.hasOption("p")
+                ? loadProperties(new File(line.getOptionValue("p")))
+                : System.getProperties();
+
+        // ensure a config file is specified
+        if (!line.hasOption("c")) {
+            System.out.println("Must specify a config XML file.");
+            usage();
+        }
+
+        final Configuration config = loadConfig(line, props);
+
+        // setup the output stream
+        OutputStream out = null;
+        boolean closeOut = false;
+        if (line.hasOption("o")) {
+            final String fname = line.getOptionValue("o");
+            try {
+                out = new FileOutputStream(fname);
+                closeOut = true;
+            }
+            catch (final FileNotFoundException e) {
+                System.out.println("Could not find file: '" + fname + "'");
+                System.exit(1);
+            }
+        }
+        else {
+            out = System.out;
+            closeOut = false;
+        }
+
+        final AuditListener listener = createListener(line, out, closeOut);
+        final List<File> files = getFilesToProcess(line);
+        final Checker c = createChecker(config, listener);
+        final int numErrs = c.process(files);
+        c.destroy();
+        System.exit(numErrs);
+    }
+
+    /**
+     * Creates the Checker object.
+     *
+     * @param aConfig the configuration to use
+     * @param aNosy the sticky beak to track what happens
+     * @return a nice new fresh Checker
+     */
+    private static Checker createChecker(Configuration aConfig,
+                                         AuditListener aNosy)
+    {
+        Checker c = null;
+        try {
+            c = new Checker();
+
+            final ClassLoader moduleClassLoader =
+                Checker.class.getClassLoader();
+            c.setModuleClassLoader(moduleClassLoader);
+            c.configure(aConfig);
+            c.addListener(aNosy);
+        }
+        catch (final Exception e) {
+            System.out.println("Unable to create Checker: "
+                               + e.getMessage());
+            e.printStackTrace(System.out);
+            System.exit(1);
+        }
+        return c;
+    }
+
+    /**
+     * Determines the files to process.
+     *
+     * @param aLine the command line options specifying what files to process
+     * @return list of files to process
+     */
+    private static List<File> getFilesToProcess(CommandLine aLine)
+    {
+        final List<File> files = Lists.newLinkedList();
+        if (aLine.hasOption("r")) {
+            final String[] values = aLine.getOptionValues("r");
+            for (String element : values) {
+                traverse(new File(element), files);
+            }
+        }
+
+        final String[] remainingArgs = aLine.getArgs();
+        for (String element : remainingArgs) {
+            files.add(new File(element));
+        }
+
+        if (files.isEmpty() && !aLine.hasOption("r")) {
+            System.out.println("Must specify files to process");
+            usage();
+        }
+        return files;
+    }
+
+    /**
+     * Create the audit listener
+     *
+     * @param aLine command line options supplied
+     * @param aOut the stream to log to
+     * @param aCloseOut whether the stream should be closed
+     * @return a fresh new <code>AuditListener</code>
+     */
+    private static AuditListener createListener(CommandLine aLine,
+                                                OutputStream aOut,
+                                                boolean aCloseOut)
+    {
+        final String format =
+            aLine.hasOption("f") ? aLine.getOptionValue("f") : "plain";
+
+        AuditListener listener = null;
+        if ("xml".equals(format)) {
+            listener = new XMLLogger(aOut, aCloseOut);
+        }
+        else if ("plain".equals(format)) {
+            listener = new DefaultLogger(aOut, aCloseOut);
+        }
+        else {
+            System.out.println("Invalid format: (" + format
+                               + "). Must be 'plain' or 'xml'.");
+            usage();
+        }
+        return listener;
+    }
+
+    /**
+     * Loads the configuration file. Will exit if unable to load.
+     *
+     * @param aLine specifies the location of the configuration
+     * @param aProps the properties to resolve with the configuration
+     * @return a fresh new configuration
+     */
+    private static Configuration loadConfig(CommandLine aLine,
+                                            Properties aProps)
+    {
+        try {
+            return ConfigurationLoader.loadConfiguration(
+                    aLine.getOptionValue("c"), new PropertiesExpander(aProps));
+        }
+        catch (final CheckstyleException e) {
+            System.out.println("Error loading configuration file");
+            e.printStackTrace(System.out);
+            System.exit(1);
+            return null; // can never get here
+        }
+    }
+
+    /** Prints the usage information. **/
+    private static void usage()
+    {
+        final HelpFormatter hf = new HelpFormatter();
+        hf.printHelp(
+            "java "
+                + Main.class.getName()
+                + " [options] -c <config.xml> file...",
+            OPTS);
+        System.exit(1);
+    }
+
+    /**
+     * Traverses a specified node looking for files to check. Found
+     * files are added to a specified list. Subdirectories are also
+     * traversed.
+     *
+     * @param aNode the node to process
+     * @param aFiles list to add found files to
+     */
+    private static void traverse(File aNode, List<File> aFiles)
+    {
+        if (aNode.canRead()) {
+            if (aNode.isDirectory()) {
+                final File[] nodes = aNode.listFiles();
+                for (File element : nodes) {
+                    traverse(element, aFiles);
+                }
+            }
+            else if (aNode.isFile()) {
+                aFiles.add(aNode);
+            }
+        }
+    }
+
+    /**
+     * Loads properties from a File.
+     * @param aFile the properties file
+     * @return the properties in aFile
+     */
+    private static Properties loadProperties(File aFile)
+    {
+        final Properties properties = new Properties();
+        FileInputStream fis = null;
+        try {
+            fis = new FileInputStream(aFile);
+            properties.load(fis);
+        }
+        catch (final IOException ex) {
+            System.out.println("Unable to load properties from file: "
+                + aFile.getAbsolutePath());
+            ex.printStackTrace(System.out);
+            System.exit(1);
+        }
+        finally {
+            Utils.closeQuietly(fis);
+        }
+
+        return properties;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/ModuleFactory.java b/src/main/java/com/puppycrawl/tools/checkstyle/ModuleFactory.java
new file mode 100644
index 0000000..0f38613
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/ModuleFactory.java
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+
+/**
+ * A module factory creates Objects from a given name.
+ * It's purpose is to map the shortnames like
+ * <code>AvoidStarImport</code> to full classnames like
+ * <code>com.puppycrawl.tools.checkstyle.checks.AvoidStarImportCheck</code>.
+ * A ModuleFactory can implement this name resolution by using naming
+ * conventions, fallback strategies, etc.
+ *
+ * @author lkuehne
+ */
+public interface ModuleFactory
+{
+    /**
+     * Creates a new instance of a class from a given name.
+     * If the provided module name is a class name an instance of that class
+     * is returned. If the name is not a class name the ModuleFactory uses
+     * heuristics to find the corresponding class.
+     *
+     * @param aName the name of the module, might be a shortname
+     * @return the created module
+     * @throws CheckstyleException if no module can be instantiated from aName
+     */
+    Object createModule(String aName) throws CheckstyleException;
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/PackageNamesLoader.java b/src/main/java/com/puppycrawl/tools/checkstyle/PackageNamesLoader.java
new file mode 100644
index 0000000..b3f8002
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/PackageNamesLoader.java
@@ -0,0 +1,224 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.AbstractLoader;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Set;
+import javax.xml.parsers.ParserConfigurationException;
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * Loads a list of package names from a package name XML file.
+ * @author Rick Giles
+ * @version 4-Dec-2002
+ */
+public final class PackageNamesLoader
+    extends AbstractLoader
+{
+    /** the public ID for the configuration dtd */
+    private static final String DTD_PUBLIC_ID =
+        "-//Puppy Crawl//DTD Package Names 1.0//EN";
+
+    /** the resource for the configuration dtd */
+    private static final String DTD_RESOURCE_NAME =
+        "com/puppycrawl/tools/checkstyle/packages_1_0.dtd";
+
+    /** Name of default checkstyle package names resource file.
+     * The file must be in the classpath.
+     */
+    private static final String CHECKSTYLE_PACKAGES =
+        "checkstyle_packages.xml";
+
+    /** The temporary stack of package name parts */
+    private final FastStack<String> mPackageStack = FastStack.newInstance();
+
+    /** The fully qualified package names. */
+    private final Set<String> mPackageNames = Sets.newLinkedHashSet();
+
+    /**
+     * Creates a new <code>PackageNamesLoader</code> instance.
+     * @throws ParserConfigurationException if an error occurs
+     * @throws SAXException if an error occurs
+     */
+    private PackageNamesLoader()
+        throws ParserConfigurationException, SAXException
+    {
+        super(DTD_PUBLIC_ID, DTD_RESOURCE_NAME);
+    }
+
+    /**
+     * Returns the set of fully qualified package names this
+     * this loader processed.
+     * @return the set of package names
+     */
+    private Set<String> getPackageNames()
+    {
+        return mPackageNames;
+    }
+
+    @Override
+    public void startElement(String aNamespaceURI,
+                             String aLocalName,
+                             String aQName,
+                             Attributes aAtts)
+        throws SAXException
+    {
+        if ("package".equals(aQName)) {
+            //push package name
+            final String name = aAtts.getValue("name");
+            if (name == null) {
+                throw new SAXException("missing package name");
+            }
+            mPackageStack.push(name);
+        }
+    }
+
+    /**
+     * Creates a full package name from the package names on the stack.
+     * @return the full name of the current package.
+     */
+    private String getPackageName()
+    {
+        final StringBuffer buf = new StringBuffer();
+        for (String subPackage : mPackageStack) {
+            buf.append(subPackage);
+            if (!subPackage.endsWith(".")) {
+                buf.append(".");
+            }
+        }
+        return buf.toString();
+    }
+
+    @Override
+    public void endElement(String aNamespaceURI,
+                           String aLocalName,
+                           String aQName)
+    {
+        if ("package".equals(aQName)) {
+
+            mPackageNames.add(getPackageName());
+            mPackageStack.pop();
+        }
+    }
+
+    /**
+     * Returns the set of package names, compiled from all
+     * checkstyle_packages.xml files found on the given classloaders
+     * classpath.
+     * @param aClassLoader the class loader for loading the
+     *          checkstyle_packages.xml files.
+     * @return the set of package names.
+     * @throws CheckstyleException if an error occurs.
+     */
+    public static Set<String> getPackageNames(ClassLoader aClassLoader)
+        throws CheckstyleException
+    {
+
+        Enumeration<URL> packageFiles = null;
+        try {
+            packageFiles = aClassLoader.getResources(CHECKSTYLE_PACKAGES);
+        }
+        catch (IOException e) {
+            throw new CheckstyleException(
+                    "unable to get package file resources", e);
+        }
+
+        //create the loader outside the loop to prevent PackageObjectFactory
+        //being created anew for each file
+        final PackageNamesLoader namesLoader = newPackageNamesLoader();
+
+        while ((null != packageFiles) && packageFiles.hasMoreElements()) {
+            final URL aPackageFile = packageFiles.nextElement();
+            InputStream stream = null;
+
+            try {
+                stream = new BufferedInputStream(aPackageFile.openStream());
+                final InputSource source = new InputSource(stream);
+                loadPackageNamesSource(source, "default package names",
+                    namesLoader);
+            }
+            catch (IOException e) {
+                throw new CheckstyleException(
+                        "unable to open " + aPackageFile, e);
+            }
+            finally {
+                Utils.closeQuietly(stream);
+            }
+        }
+        return namesLoader.getPackageNames();
+    }
+
+    /**
+     * Creates a PackageNamesLoader instance.
+     * @return the PackageNamesLoader
+     * @throws CheckstyleException if the creation failed
+     */
+    private static PackageNamesLoader newPackageNamesLoader()
+        throws CheckstyleException
+    {
+        try {
+            return new PackageNamesLoader();
+        }
+        catch (final ParserConfigurationException e) {
+            throw new CheckstyleException(
+                    "unable to create PackageNamesLoader ", e);
+        }
+        catch (final SAXException e) {
+            throw new CheckstyleException(
+                    "unable to create PackageNamesLoader - "
+                    + e.getMessage(), e);
+        }
+    }
+
+    /**
+     * Returns the list of package names in a specified source.
+     * @param aSource the source for the list.
+     * @param aSourceName the name of the source.
+     * @param aNameLoader the PackageNamesLoader instance
+     * @throws CheckstyleException if an error occurs.
+     */
+    private static void loadPackageNamesSource(
+            InputSource aSource, String aSourceName,
+            PackageNamesLoader aNameLoader)
+        throws CheckstyleException
+    {
+        try {
+            aNameLoader.parseInputSource(aSource);
+        }
+        catch (final SAXException e) {
+            throw new CheckstyleException("unable to parse "
+                    + aSourceName + " - " + e.getMessage(), e);
+        }
+        catch (final IOException e) {
+            throw new CheckstyleException("unable to read " + aSourceName, e);
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java b/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java
new file mode 100644
index 0000000..dac0827
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java
@@ -0,0 +1,160 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import java.util.Set;
+
+/**
+ * A factory for creating objects from package names and names.
+ * @author Rick Giles
+ * @author lkuehne
+ */
+class PackageObjectFactory implements ModuleFactory
+{
+    /** a list of package names to prepend to class names */
+    private final Set<String> mPackages;
+
+    /** the class loader used to load Checkstyle core and custom modules. */
+    private final ClassLoader mModuleClassLoader;
+
+    /**
+     * Creates a new <code>PackageObjectFactory</code> instance.
+     * @param aPackageNames the list of package names to use
+     * @param aModuleClassLoader class loader used to load Checkstyle
+     *          core and custom modules
+     */
+    public PackageObjectFactory(Set<String> aPackageNames,
+            ClassLoader aModuleClassLoader)
+    {
+        if (aModuleClassLoader == null) {
+            throw new IllegalArgumentException(
+                    "aModuleClassLoader must not be null");
+        }
+
+        //create a copy of the given set, but retain ordering
+        mPackages = Sets.newLinkedHashSet(aPackageNames);
+        mModuleClassLoader = aModuleClassLoader;
+    }
+
+    /**
+     * Registers a package name to use for shortName resolution.
+     * @param aPackageName the package name
+     */
+    void addPackage(String aPackageName)
+    {
+        mPackages.add(aPackageName);
+    }
+
+    /**
+     * Creates a new instance of a class from a given name. If the name is
+     * a classname, creates an instance of the named class. Otherwise, creates
+     * an instance of a classname obtained by concatenating the given
+     * to a package name from a given list of package names.
+     * @param aName the name of a class.
+     * @return the <code>Object</code>
+     * @throws CheckstyleException if an error occurs.
+     */
+    private Object doMakeObject(String aName)
+        throws CheckstyleException
+    {
+        //try aName first
+        try {
+            return createObject(aName);
+        }
+        catch (final CheckstyleException ex) {
+            ; // keep looking
+        }
+
+        //now try packages
+        for (String packageName : mPackages) {
+
+            final String className = packageName + aName;
+            try {
+                return createObject(className);
+            }
+            catch (final CheckstyleException ex) {
+                ; // keep looking
+            }
+        }
+
+        throw new CheckstyleException("Unable to instantiate " + aName);
+    }
+
+    /**
+     * Creates a new instance of a named class.
+     * @param aClassName the name of the class to instantiate.
+     * @return the <code>Object</code> created by mLoader.
+     * @throws CheckstyleException if an error occurs.
+     */
+    private Object createObject(String aClassName)
+        throws CheckstyleException
+    {
+        try {
+            final Class<?> clazz = Class.forName(aClassName, true,
+                    mModuleClassLoader);
+            return clazz.newInstance();
+        }
+        catch (final ClassNotFoundException e) {
+            throw new CheckstyleException(
+                "Unable to find class for " + aClassName, e);
+        }
+        catch (final InstantiationException e) {
+            ///CLOVER:OFF
+            throw new CheckstyleException(
+                "Unable to instantiate " + aClassName, e);
+            ///CLOVER:ON
+        }
+        catch (final IllegalAccessException e) {
+            ///CLOVER:OFF
+            throw new CheckstyleException(
+                "Unable to instantiate " + aClassName, e);
+            ///CLOVER:ON
+        }
+    }
+
+    /**
+     * Creates a new instance of a class from a given name, or that name
+     * concatenated with "Check". If the name is
+     * a classname, creates an instance of the named class. Otherwise, creates
+     * an instance of a classname obtained by concatenating the given name
+     * to a package name from a given list of package names.
+     * @param aName the name of a class.
+     * @return the <code>Object</code> created by aLoader.
+     * @throws CheckstyleException if an error occurs.
+     */
+    public Object createModule(String aName)
+        throws CheckstyleException
+    {
+        try {
+            return doMakeObject(aName);
+        }
+        catch (final CheckstyleException ex) {
+            //try again with suffix "Check"
+            try {
+                return doMakeObject(aName + "Check");
+            }
+            catch (final CheckstyleException ex2) {
+                throw new CheckstyleException(
+                    "Unable to instantiate " + aName, ex2);
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/PropertiesExpander.java b/src/main/java/com/puppycrawl/tools/checkstyle/PropertiesExpander.java
new file mode 100644
index 0000000..4c856d7
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/PropertiesExpander.java
@@ -0,0 +1,54 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import java.util.Properties;
+
+/**
+ * Resolves external properties from an
+ * underlying <code>Properties</code> object.
+ *
+ * @author lkuehne
+ */
+public final class PropertiesExpander
+    implements PropertyResolver
+{
+    /** the underlying Properties object. */
+    private final Properties mProperties;
+
+    /**
+     * Creates a new PropertiesExpander.
+     * @param aProperties the underlying properties to use for
+     * property resolution.
+     * @throws IllegalArgumentException indicates null was passed
+     */
+    public PropertiesExpander(Properties aProperties)
+    {
+        if (aProperties == null) {
+            throw new IllegalArgumentException("cannot pass null");
+        }
+        mProperties = aProperties;
+    }
+
+    /** {@inheritDoc} */
+    public String resolve(String aPropertyName)
+    {
+        return mProperties.getProperty(aPropertyName);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java b/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java
new file mode 100644
index 0000000..79b1e37
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java
@@ -0,0 +1,231 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectOutputStream;
+import java.io.OutputStream;
+import java.io.Serializable;
+import java.util.Properties;
+import java.security.MessageDigest;
+
+
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+/**
+ * This class maintains a persistent store of the files that have
+ * checked ok and their associated timestamp. It uses a property file
+ * for storage.  A hashcode of the Configuration is stored in the
+ * cache file to ensure the cache is invalidated when the
+ * configuration has changed.
+ *
+ * @author Oliver Burn
+ */
+final class PropertyCacheFile
+{
+    /**
+     * The property key to use for storing the hashcode of the
+     * configuration. To avoid nameclashes with the files that are
+     * checked the key is chosen in such a way that it cannot be a
+     * valid file name.
+     */
+    private static final String CONFIG_HASH_KEY = "configuration*?";
+
+    /** name of file to store details **/
+    private final String mDetailsFile;
+    /** the details on files **/
+    private final Properties mDetails = new Properties();
+
+    /**
+     * Creates a new <code>PropertyCacheFile</code> instance.
+     *
+     * @param aCurrentConfig the current configuration, not null
+     * @param aFileName the cache file
+     */
+    PropertyCacheFile(Configuration aCurrentConfig, String aFileName)
+    {
+        boolean setInActive = true;
+        if (aFileName != null) {
+            FileInputStream inStream = null;
+            // get the current config so if the file isn't found
+            // the first time the hash will be added to output file
+            final String currentConfigHash = getConfigHashCode(aCurrentConfig);
+            try {
+                inStream = new FileInputStream(aFileName);
+                mDetails.load(inStream);
+                final String cachedConfigHash =
+                    mDetails.getProperty(CONFIG_HASH_KEY);
+                setInActive = false;
+                if ((cachedConfigHash == null)
+                    || !cachedConfigHash.equals(currentConfigHash))
+                {
+                    // Detected configuration change - clear cache
+                    mDetails.clear();
+                    mDetails.put(CONFIG_HASH_KEY, currentConfigHash);
+                }
+            }
+            catch (final FileNotFoundException e) {
+                // Ignore, the cache does not exist
+                setInActive = false;
+                // put the hash in the file if the file is going to be created
+                mDetails.put(CONFIG_HASH_KEY, currentConfigHash);
+            }
+            catch (final IOException e) {
+                Utils.getExceptionLogger()
+                    .debug("Unable to open cache file, ignoring.", e);
+            }
+            finally {
+                Utils.closeQuietly(inStream);
+            }
+        }
+        mDetailsFile = (setInActive) ? null : aFileName;
+    }
+
+    /** Cleans up the object and updates the cache file. **/
+    void destroy()
+    {
+        if (mDetailsFile != null) {
+            FileOutputStream out = null;
+            try {
+                out = new FileOutputStream(mDetailsFile);
+                mDetails.store(out, null);
+            }
+            catch (final IOException e) {
+                Utils.getExceptionLogger()
+                    .debug("Unable to save cache file.", e);
+            }
+            finally {
+                this.flushAndCloseOutStream(out);
+            }
+        }
+    }
+
+    /**
+     * Flushes and closes output stream.
+     * @param aStream the output stream
+     */
+    private void flushAndCloseOutStream(OutputStream aStream)
+    {
+        if (aStream != null) {
+            try {
+                aStream.flush();
+            }
+            catch (final IOException ex) {
+                Utils.getExceptionLogger()
+                    .debug("Unable to flush output stream.", ex);
+            }
+            finally {
+                Utils.closeQuietly(aStream);
+            }
+        }
+    }
+
+    /**
+     * @return whether the specified file has already been checked ok
+     * @param aFileName the file to check
+     * @param aTimestamp the timestamp of the file to check
+     */
+    boolean alreadyChecked(String aFileName, long aTimestamp)
+    {
+        final String lastChecked = mDetails.getProperty(aFileName);
+        return (lastChecked != null)
+            && (lastChecked.equals(Long.toString(aTimestamp)));
+    }
+
+    /**
+     * Records that a file checked ok.
+     * @param aFileName name of the file that checked ok
+     * @param aTimestamp the timestamp of the file
+     */
+    void checkedOk(String aFileName, long aTimestamp)
+    {
+        mDetails.put(aFileName, Long.toString(aTimestamp));
+    }
+
+    /**
+     * Calculates the hashcode for a GlobalProperties.
+     *
+     * @param aConfiguration the GlobalProperties
+     * @return the hashcode for <code>aConfiguration</code>
+     */
+    private String getConfigHashCode(Serializable aConfiguration)
+    {
+        try {
+            // im-memory serialization of Configuration
+
+            final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            ObjectOutputStream oos = null;
+            try {
+                oos = new ObjectOutputStream(baos);
+                oos.writeObject(aConfiguration);
+            }
+            finally {
+                this.flushAndCloseOutStream(oos);
+            }
+
+            // Instead of hexEncoding baos.toByteArray() directly we
+            // use a message digest here to keep the length of the
+            // hashcode reasonable
+
+            final MessageDigest md = MessageDigest.getInstance("SHA");
+            md.update(baos.toByteArray());
+
+            return hexEncode(md.digest());
+        }
+        catch (final Exception ex) { // IO, NoSuchAlgorithm
+            Utils.getExceptionLogger()
+                .debug("Unable to calculate hashcode.", ex);
+            return "ALWAYS FRESH: " + System.currentTimeMillis();
+        }
+    }
+
+    /** hex digits */
+    private static final char[] HEX_CHARS = {
+        '0', '1', '2', '3', '4', '5', '6', '7',
+        '8', '9', 'A', 'B', 'C', 'D', 'E', 'F',
+    };
+
+    /** mask for last byte */
+    private static final int MASK_0X0F = 0x0F;
+
+    /** bit shift */
+    private static final int SHIFT_4 = 4;
+
+    /**
+     * Hex-encodes a byte array.
+     * @param aByteArray the byte array
+     * @return hex encoding of <code>aByteArray</code>
+     */
+    private static String hexEncode(byte[] aByteArray)
+    {
+        final StringBuffer buf = new StringBuffer(2 * aByteArray.length);
+        for (final byte b : aByteArray) {
+            final int low = b & MASK_0X0F;
+            final int high = (b >> SHIFT_4) & MASK_0X0F;
+            buf.append(HEX_CHARS[high]);
+            buf.append(HEX_CHARS[low]);
+        }
+        return buf.toString();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/PropertyResolver.java b/src/main/java/com/puppycrawl/tools/checkstyle/PropertyResolver.java
new file mode 100644
index 0000000..334df85
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/PropertyResolver.java
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+
+/**
+ * Resolves properties in module configurations.
+ *
+ * The {@link ConfigurationLoader} uses a PropertyResolver to
+ * resolve the values of external properties like <code>${basename}</code>
+ * that occur in the configuration file.
+ *
+ * @see ConfigurationLoader
+ * @author lkuehne
+ */
+public interface PropertyResolver
+{
+    /**
+     * Resolves a property name to it's value.
+     * @param aName the name of the property.
+     * @return the value that is associated with <code>propertyName</code>.
+     * @throws CheckstyleException if the propertyName cannot be reolved
+     */
+    String resolve(String aName)
+        throws CheckstyleException;
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java b/src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java
new file mode 100644
index 0000000..b6b3938
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java
@@ -0,0 +1,491 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import antlr.RecognitionException;
+import antlr.TokenStreamException;
+import antlr.TokenStreamRecognitionException;
+
+import com.google.common.collect.HashMultimap;
+import com.google.common.collect.Multimap;
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import com.puppycrawl.tools.checkstyle.api.Context;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FileContents;
+import com.puppycrawl.tools.checkstyle.api.FileText;
+import com.puppycrawl.tools.checkstyle.api.LocalizedMessage;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import com.puppycrawl.tools.checkstyle.grammars.GeneratedJavaLexer;
+import com.puppycrawl.tools.checkstyle.grammars.GeneratedJavaRecognizer;
+import java.io.File;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Responsible for walking an abstract syntax tree and notifying interested
+ * checks at each each node.
+ *
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public final class TreeWalker
+    extends AbstractFileSetCheck
+{
+    /** default distance between tab stops */
+    private static final int DEFAULT_TAB_WIDTH = 8;
+
+    /** maps from token name to checks */
+    private final Multimap<String, Check> mTokenToChecks =
+        HashMultimap.create();
+    /** all the registered checks */
+    private final Set<Check> mAllChecks = Sets.newHashSet();
+    /** the distance between tab stops */
+    private int mTabWidth = DEFAULT_TAB_WIDTH;
+    /** cache file **/
+    private PropertyCacheFile mCache = new PropertyCacheFile(null, null);
+
+    /** class loader to resolve classes with. **/
+    private ClassLoader mClassLoader;
+
+    /** context of child components */
+    private Context mChildContext;
+
+    /** a factory for creating submodules (i.e. the Checks) */
+    private ModuleFactory mModuleFactory;
+
+    /** controls whether we should use recursive or iterative
+     * algorithm for tree processing.
+     */
+    private final boolean mRecursive;
+
+    /** logger for debug purpose */
+    private static final Log LOG =
+        LogFactory.getLog("com.puppycrawl.tools.checkstyle.TreeWalker");
+
+    /**
+     * Creates a new <code>TreeWalker</code> instance.
+     */
+    public TreeWalker()
+    {
+        setFileExtensions(new String[]{"java"});
+        // Tree walker can use two possible algorithms for
+        // tree processing (iterative and recursive.
+        // Recursive is default for now.
+        final String recursive =
+            System.getProperty("checkstyle.use.recursive.algorithm", "false");
+        mRecursive = "true".equals(recursive);
+        if (mRecursive) {
+            LOG.debug("TreeWalker uses recursive algorithm");
+        }
+        else {
+            LOG.debug("TreeWalker uses iterative algorithm");
+        }
+    }
+
+    /** @param aTabWidth the distance between tab stops */
+    public void setTabWidth(int aTabWidth)
+    {
+        mTabWidth = aTabWidth;
+    }
+
+    /** @param aFileName the cache file */
+    public void setCacheFile(String aFileName)
+    {
+        final Configuration configuration = getConfiguration();
+        mCache = new PropertyCacheFile(configuration, aFileName);
+    }
+
+    /** @param aClassLoader class loader to resolve classes with. */
+    public void setClassLoader(ClassLoader aClassLoader)
+    {
+        mClassLoader = aClassLoader;
+    }
+
+    /**
+     * Sets the module factory for creating child modules (Checks).
+     * @param aModuleFactory the factory
+     */
+    public void setModuleFactory(ModuleFactory aModuleFactory)
+    {
+        mModuleFactory = aModuleFactory;
+    }
+
+    @Override
+    public void finishLocalSetup()
+    {
+        final DefaultContext checkContext = new DefaultContext();
+        checkContext.add("classLoader", mClassLoader);
+        checkContext.add("messages", getMessageCollector());
+        checkContext.add("severity", getSeverity());
+        // TODO: hmmm.. this looks less than elegant
+        // we have just parsed the string,
+        // now we're recreating it only to parse it again a few moments later
+        checkContext.add("tabWidth", String.valueOf(mTabWidth));
+
+        mChildContext = checkContext;
+    }
+
+    @Override
+    public void setupChild(Configuration aChildConf)
+        throws CheckstyleException
+    {
+        // TODO: improve the error handing
+        final String name = aChildConf.getName();
+        final Object module = mModuleFactory.createModule(name);
+        if (!(module instanceof Check)) {
+            throw new CheckstyleException(
+                "TreeWalker is not allowed as a parent of " + name);
+        }
+        final Check c = (Check) module;
+        c.contextualize(mChildContext);
+        c.configure(aChildConf);
+        c.init();
+
+        registerCheck(c);
+    }
+
+    @Override
+    protected void processFiltered(File aFile, List<String> aLines)
+    {
+        // check if already checked and passed the file
+        final String fileName = aFile.getPath();
+        final long timestamp = aFile.lastModified();
+        if (mCache.alreadyChecked(fileName, timestamp)) {
+            return;
+        }
+
+        try {
+            final FileText text = FileText.fromLines(aFile, aLines);
+            final FileContents contents = new FileContents(text);
+            final DetailAST rootAST = TreeWalker.parse(contents);
+            walk(rootAST, contents);
+        }
+        catch (final RecognitionException re) {
+            Utils.getExceptionLogger()
+                .debug("RecognitionException occured.", re);
+            getMessageCollector().add(
+                new LocalizedMessage(
+                    re.getLine(),
+                    re.getColumn(),
+                    Defn.CHECKSTYLE_BUNDLE,
+                    "general.exception",
+                    new String[] {re.getMessage()},
+                    getId(),
+                    this.getClass(), null));
+        }
+        catch (final TokenStreamRecognitionException tre) {
+            Utils.getExceptionLogger()
+                .debug("TokenStreamRecognitionException occured.", tre);
+            final RecognitionException re = tre.recog;
+            if (re != null) {
+                getMessageCollector().add(
+                    new LocalizedMessage(
+                        re.getLine(),
+                        re.getColumn(),
+                        Defn.CHECKSTYLE_BUNDLE,
+                        "general.exception",
+                        new String[] {re.getMessage()},
+                        getId(),
+                        this.getClass(), null));
+            }
+            else {
+                getMessageCollector().add(
+                    new LocalizedMessage(
+                        0,
+                        Defn.CHECKSTYLE_BUNDLE,
+                        "general.exception",
+                        new String[]
+                        {"TokenStreamRecognitionException occured."},
+                        getId(),
+                        this.getClass(), null));
+            }
+        }
+        catch (final TokenStreamException te) {
+            Utils.getExceptionLogger()
+                .debug("TokenStreamException occured.", te);
+            getMessageCollector().add(
+                new LocalizedMessage(
+                    0,
+                    Defn.CHECKSTYLE_BUNDLE,
+                    "general.exception",
+                    new String[] {te.getMessage()},
+                    getId(),
+                    this.getClass(), null));
+        }
+        catch (final Throwable err) {
+            Utils.getExceptionLogger().debug("Throwable occured.", err);
+            getMessageCollector().add(
+                new LocalizedMessage(
+                    0,
+                    Defn.CHECKSTYLE_BUNDLE,
+                    "general.exception",
+                    new String[] {"" + err},
+                    getId(),
+                    this.getClass(), null));
+        }
+
+        if (getMessageCollector().size() == 0) {
+            mCache.checkedOk(fileName, timestamp);
+        }
+    }
+
+    /**
+     * Register a check for a given configuration.
+     * @param aCheck the check to register
+     * @throws CheckstyleException if an error occurs
+     */
+    private void registerCheck(Check aCheck)
+        throws CheckstyleException
+    {
+        final int[] tokens;
+        final Set<String> checkTokens = aCheck.getTokenNames();
+        if (!checkTokens.isEmpty()) {
+            tokens = aCheck.getRequiredTokens();
+
+            //register configured tokens
+            final int acceptableTokens[] = aCheck.getAcceptableTokens();
+            Arrays.sort(acceptableTokens);
+            for (String token : checkTokens) {
+                try {
+                    final int tokenId = TokenTypes.getTokenId(token);
+                    if (Arrays.binarySearch(acceptableTokens, tokenId) >= 0) {
+                        registerCheck(token, aCheck);
+                    }
+                    // TODO: else log warning
+                }
+                catch (final IllegalArgumentException ex) {
+                    throw new CheckstyleException("illegal token \""
+                        + token + "\" in check " + aCheck, ex);
+                }
+            }
+        }
+        else {
+            tokens = aCheck.getDefaultTokens();
+        }
+        for (int element : tokens) {
+            registerCheck(element, aCheck);
+        }
+        mAllChecks.add(aCheck);
+    }
+
+    /**
+     * Register a check for a specified token id.
+     * @param aTokenID the id of the token
+     * @param aCheck the check to register
+     */
+    private void registerCheck(int aTokenID, Check aCheck)
+    {
+        registerCheck(TokenTypes.getTokenName(aTokenID), aCheck);
+    }
+
+    /**
+     * Register a check for a specified token name
+     * @param aToken the name of the token
+     * @param aCheck the check to register
+     */
+    private void registerCheck(String aToken, Check aCheck)
+    {
+        mTokenToChecks.put(aToken, aCheck);
+    }
+
+    /**
+     * Initiates the walk of an AST.
+     * @param aAST the root AST
+     * @param aContents the contents of the file the AST was generated from
+     */
+    private void walk(DetailAST aAST, FileContents aContents)
+    {
+        getMessageCollector().reset();
+        notifyBegin(aAST, aContents);
+
+        // empty files are not flagged by javac, will yield aAST == null
+        if (aAST != null) {
+            if (useRecursiveAlgorithm()) {
+                processRec(aAST);
+            }
+            else {
+                processIter(aAST);
+            }
+        }
+
+        notifyEnd(aAST);
+    }
+
+
+    /**
+     * Notify interested checks that about to begin walking a tree.
+     * @param aRootAST the root of the tree
+     * @param aContents the contents of the file the AST was generated from
+     */
+    private void notifyBegin(DetailAST aRootAST, FileContents aContents)
+    {
+        for (Check ch : mAllChecks) {
+            ch.setFileContents(aContents);
+            ch.beginTree(aRootAST);
+        }
+    }
+
+    /**
+     * Notify checks that finished walking a tree.
+     * @param aRootAST the root of the tree
+     */
+    private void notifyEnd(DetailAST aRootAST)
+    {
+        for (Check ch : mAllChecks) {
+            ch.finishTree(aRootAST);
+        }
+    }
+
+    /**
+     * Recursively processes a node calling interested checks at each node.
+     * Uses recursive algorithm.
+     * @param aAST the node to start from
+     */
+    private void processRec(DetailAST aAST)
+    {
+        if (aAST == null) {
+            return;
+        }
+
+        notifyVisit(aAST);
+
+        final DetailAST child = aAST.getFirstChild();
+        if (child != null) {
+            processRec(child);
+        }
+
+        notifyLeave(aAST);
+
+        final DetailAST sibling = aAST.getNextSibling();
+        if (sibling != null) {
+            processRec(sibling);
+        }
+    }
+
+    /**
+     * Notify interested checks that visiting a node.
+     * @param aAST the node to notify for
+     */
+    private void notifyVisit(DetailAST aAST)
+    {
+        final Collection<Check> visitors =
+            mTokenToChecks.get(TokenTypes.getTokenName(aAST.getType()));
+        for (Check c : visitors) {
+            c.visitToken(aAST);
+        }
+    }
+
+    /**
+     * Notify interested checks that leaving a node.
+     *
+     * @param aAST
+     *                the node to notify for
+     */
+    private void notifyLeave(DetailAST aAST)
+    {
+        final Collection<Check> visitors =
+            mTokenToChecks.get(TokenTypes.getTokenName(aAST.getType()));
+        for (Check ch : visitors) {
+            ch.leaveToken(aAST);
+        }
+    }
+
+    /**
+     * Static helper method to parses a Java source file.
+     *
+     * @param aContents
+     *                contains the contents of the file
+     * @throws TokenStreamException
+     *                 if lexing failed
+     * @throws RecognitionException
+     *                 if parsing failed
+     * @return the root of the AST
+     */
+    public static DetailAST parse(FileContents aContents)
+        throws RecognitionException, TokenStreamException
+    {
+        final String fullText = aContents.getText().getFullText().toString();
+        final Reader sr = new StringReader(fullText);
+        final GeneratedJavaLexer lexer = new GeneratedJavaLexer(sr);
+        lexer.setFilename(aContents.getFilename());
+        lexer.setCommentListener(aContents);
+        lexer.setTreatAssertAsKeyword(true);
+        lexer.setTreatEnumAsKeyword(true);
+
+        final GeneratedJavaRecognizer parser =
+            new GeneratedJavaRecognizer(lexer);
+        parser.setFilename(aContents.getFilename());
+        parser.setASTNodeClass(DetailAST.class.getName());
+        parser.compilationUnit();
+
+        return (DetailAST) parser.getAST();
+    }
+
+    @Override
+    public void destroy()
+    {
+        for (Check c : mAllChecks) {
+            c.destroy();
+        }
+        mCache.destroy();
+        super.destroy();
+    }
+
+    /**
+     * @return true if we should use recursive algorithm
+     *         for tree processing, false for iterative one.
+     */
+    private boolean useRecursiveAlgorithm()
+    {
+        return mRecursive;
+    }
+
+    /**
+     * Processes a node calling interested checks at each node.
+     * Uses iterative algorithm.
+     * @param aRoot the root of tree for process
+     */
+    private void processIter(DetailAST aRoot)
+    {
+        DetailAST curNode = aRoot;
+        while (curNode != null) {
+            notifyVisit(curNode);
+            DetailAST toVisit = curNode.getFirstChild();
+            while ((curNode != null) && (toVisit == null)) {
+                notifyLeave(curNode);
+                toVisit = curNode.getNextSibling();
+                if (toVisit == null) {
+                    curNode = curNode.getParent();
+                }
+            }
+            curNode = toVisit;
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/XMLLogger.java b/src/main/java/com/puppycrawl/tools/checkstyle/XMLLogger.java
new file mode 100644
index 0000000..9e7a08d
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/XMLLogger.java
@@ -0,0 +1,237 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
+import java.util.ResourceBundle;
+
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.AuditListener;
+import com.puppycrawl.tools.checkstyle.api.AutomaticBean;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+
+/**
+ * Simple XML logger.
+ * It outputs everything in UTF-8 (default XML encoding is UTF-8) in case
+ * we want to localize error messages or simply that filenames are
+ * localized and takes care about escaping as well.
+
+ * @author <a href="mailto:stephane.bailliez at wanadoo.fr">Stephane Bailliez</a>
+ */
+public class XMLLogger
+    extends AutomaticBean
+    implements AuditListener
+{
+    /** decimal radix */
+    private static final int BASE_10 = 10;
+
+    /** hex radix */
+    private static final int BASE_16 = 16;
+
+    /** close output stream in auditFinished */
+    private boolean mCloseStream;
+
+    /** helper writer that allows easy encoding and printing */
+    private PrintWriter mWriter;
+
+    /** some known entities to detect */
+    private static final String[] ENTITIES = {"gt", "amp", "lt", "apos",
+                                              "quot", };
+
+    /**
+     * Creates a new <code>XMLLogger</code> instance.
+     * Sets the output to a defined stream.
+     * @param aOS the stream to write logs to.
+     * @param aCloseStream close aOS in auditFinished
+     */
+    public XMLLogger(OutputStream aOS, boolean aCloseStream)
+    {
+        setOutputStream(aOS);
+        mCloseStream = aCloseStream;
+    }
+
+    /**
+     * sets the OutputStream
+     * @param aOS the OutputStream to use
+     **/
+    private void setOutputStream(OutputStream aOS)
+    {
+        try {
+            final OutputStreamWriter osw = new OutputStreamWriter(aOS, "UTF-8");
+            mWriter = new PrintWriter(osw);
+        }
+        catch (final UnsupportedEncodingException e) {
+            // unlikely to happen...
+            throw new ExceptionInInitializerError(e);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void auditStarted(AuditEvent aEvt)
+    {
+        mWriter.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+
+        final ResourceBundle compilationProperties =
+            ResourceBundle.getBundle("checkstylecompilation");
+        final String version =
+            compilationProperties.getString("checkstyle.compile.version");
+
+        mWriter.println("<checkstyle version=\"" + version + "\">");
+    }
+
+    /** {@inheritDoc} */
+    public void auditFinished(AuditEvent aEvt)
+    {
+        mWriter.println("</checkstyle>");
+        if (mCloseStream) {
+            mWriter.close();
+        }
+        else {
+            mWriter.flush();
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void fileStarted(AuditEvent aEvt)
+    {
+        mWriter.println("<file name=\"" + encode(aEvt.getFileName()) + "\">");
+    }
+
+    /** {@inheritDoc} */
+    public void fileFinished(AuditEvent aEvt)
+    {
+        mWriter.println("</file>");
+    }
+
+    /** {@inheritDoc} */
+    public void addError(AuditEvent aEvt)
+    {
+        if (!SeverityLevel.IGNORE.equals(aEvt.getSeverityLevel())) {
+            mWriter.print("<error" + " line=\"" + aEvt.getLine() + "\"");
+            if (aEvt.getColumn() > 0) {
+                mWriter.print(" column=\"" + aEvt.getColumn() + "\"");
+            }
+            mWriter.print(" severity=\""
+                + aEvt.getSeverityLevel().getName()
+                + "\"");
+            mWriter.print(" message=\""
+                + encode(aEvt.getMessage())
+                + "\"");
+            mWriter.println(" source=\""
+                + encode(aEvt.getSourceName())
+                + "\"/>");
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void addException(AuditEvent aEvt, Throwable aThrowable)
+    {
+        final StringWriter sw = new StringWriter();
+        final PrintWriter pw = new PrintWriter(sw);
+        pw.println("<exception>");
+        pw.println("<![CDATA[");
+        aThrowable.printStackTrace(pw);
+        pw.println("]]>");
+        pw.println("</exception>");
+        pw.flush();
+        mWriter.println(encode(sw.toString()));
+    }
+
+    /**
+     * Escape <, > & ' and " as their entities.
+     * @param aValue the value to escape.
+     * @return the escaped value if necessary.
+     */
+    public String encode(String aValue)
+    {
+        final StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < aValue.length(); i++) {
+            final char c = aValue.charAt(i);
+            switch (c) {
+            case '<':
+                sb.append("<");
+                break;
+            case '>':
+                sb.append(">");
+                break;
+            case '\'':
+                sb.append("'");
+                break;
+            case '\"':
+                sb.append(""");
+                break;
+            case '&':
+                final int nextSemi = aValue.indexOf(";", i);
+                if ((nextSemi < 0)
+                    || !isReference(aValue.substring(i, nextSemi + 1)))
+                {
+                    sb.append("&");
+                }
+                else {
+                    sb.append('&');
+                }
+                break;
+            default:
+                sb.append(c);
+                break;
+            }
+        }
+        return sb.toString();
+    }
+
+    /**
+     * @return whether the given argument a character or entity reference
+     * @param aEnt the possible entity to look for.
+     */
+    public boolean isReference(String aEnt)
+    {
+        if (!(aEnt.charAt(0) == '&') || !aEnt.endsWith(";")) {
+            return false;
+        }
+
+        if (aEnt.charAt(1) == '#') {
+            int prefixLength = 2; // "&#"
+            int radix = BASE_10;
+            if (aEnt.charAt(2) == 'x') {
+                prefixLength++;
+                radix = BASE_16;
+            }
+            try {
+                Integer.parseInt(
+                    aEnt.substring(prefixLength, aEnt.length() - 1), radix);
+                return true;
+            }
+            catch (final NumberFormatException nfe) {
+                return false;
+            }
+        }
+
+        final String name = aEnt.substring(1, aEnt.length() - 1);
+        for (String element : ENTITIES) {
+            if (name.equals(element)) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java
new file mode 100644
index 0000000..5f5066b
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java
@@ -0,0 +1,206 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import java.io.File;
+import java.util.List;
+import java.util.TreeSet;
+
+/**
+ * Provides common functionality for many FileSetChecks.
+ *
+ * @author lkuehne
+ * @author oliver
+ */
+public abstract class AbstractFileSetCheck
+    extends AbstractViolationReporter
+    implements FileSetCheck
+{
+    /** The dispatcher errors are fired to. */
+    private MessageDispatcher mDispatcher;
+
+    /** the file extensions that are accepted by this filter */
+    private String[] mFileExtensions = {};
+
+    /** collects the error messages */
+    private final LocalizedMessages mMessages = new LocalizedMessages();
+
+    /**
+     * Called to process a file that matches the specified file extensions.
+     * @param aFile the file to be processed
+     * @param aLines an immutable list of the contents of the file.
+     */
+    protected abstract void processFiltered(File aFile, List<String> aLines);
+
+    /** {@inheritDoc} */
+    public void init()
+    {
+    }
+
+    /** {@inheritDoc} */
+    public void destroy()
+    {
+    }
+
+    /** {@inheritDoc} */
+    public void beginProcessing(String aCharset)
+    {
+    }
+
+    /** {@inheritDoc} */
+    public final TreeSet<LocalizedMessage> process(File aFile,
+                                                   List<String> aLines)
+    {
+        getMessageCollector().reset();
+        // Process only what interested in
+        if (fileExtensionMatches(aFile)) {
+            processFiltered(aFile, aLines);
+        }
+        return getMessageCollector().getMessages();
+    }
+
+    /** {@inheritDoc} */
+    public void finishProcessing()
+    {
+    }
+
+    /** {@inheritDoc} */
+    public final void setMessageDispatcher(MessageDispatcher aDispatcher)
+    {
+        mDispatcher = aDispatcher;
+    }
+
+    /**
+     * A message dispatcher is used to fire violation messages to
+     * interested audit listeners.
+     *
+     * @return the current MessageDispatcher.
+     */
+    protected final MessageDispatcher getMessageDispatcher()
+    {
+        return mDispatcher;
+    }
+
+    /**
+     * Sets the file extensions that identify the files that pass the
+     * filter of this FileSetCheck.
+     * @param aExtensions the set of file extensions. A missing
+     * initial '.' character of an extension is automatically added.
+     */
+    public final void setFileExtensions(String[] aExtensions)
+    {
+        if (aExtensions == null) {
+            mFileExtensions = null;
+            return;
+        }
+
+        mFileExtensions = new String[aExtensions.length];
+        for (int i = 0; i < aExtensions.length; i++) {
+            final String extension = aExtensions[i];
+            if (extension.startsWith(".")) {
+                mFileExtensions[i] = extension;
+            }
+            else {
+                mFileExtensions[i] = "." + extension;
+            }
+        }
+    }
+
+    /**
+     * Returns the collector for violation messages.
+     * Subclasses can use the collector to find out the violation
+     * messages to fire via the message dispatcher.
+     *
+     * @return the collector for localized messages.
+     */
+    protected final LocalizedMessages getMessageCollector()
+    {
+        return mMessages;
+    }
+
+    @Override
+    public final void log(int aLine, String aKey, Object... aArgs)
+    {
+        log(aLine, 0, aKey, aArgs);
+    }
+
+    @Override
+    public final void log(int aLineNo, int aColNo, String aKey,
+            Object... aArgs)
+    {
+        getMessageCollector().add(
+            new LocalizedMessage(aLineNo,
+                                 aColNo,
+                                 getMessageBundle(),
+                                 aKey,
+                                 aArgs,
+                                 getSeverityLevel(),
+                                 getId(),
+                                 this.getClass(),
+                                 this.getCustomMessages().get(aKey)));
+    }
+
+    /**
+     * Notify all listeners about the errors in a file.
+     * Calls <code>MessageDispatcher.fireErrors()</code> with
+     * all logged errors and than clears errors' list.
+     * @param aFileName the audited file
+     */
+    protected final void fireErrors(String aFileName)
+    {
+        final TreeSet<LocalizedMessage> errors = getMessageCollector()
+                .getMessages();
+        getMessageCollector().reset();
+        getMessageDispatcher().fireErrors(aFileName, errors);
+    }
+
+    /**
+     * Returns whether the file extension matches what we are meant to
+     * process.
+     * @param aFile the file to be checked.
+     * @return whether there is a match.
+     */
+    private boolean fileExtensionMatches(File aFile)
+    {
+        if ((null == mFileExtensions) || (mFileExtensions.length == 0)) {
+            return true;
+        }
+
+        // normalize extensions so all of them have a leading dot
+        final String[] withDotExtensions = new String[mFileExtensions.length];
+        for (int i = 0; i < mFileExtensions.length; i++) {
+            final String extension = mFileExtensions[i];
+            if (extension.startsWith(".")) {
+                withDotExtensions[i] = extension;
+            }
+            else {
+                withDotExtensions[i] = "." + extension;
+            }
+        }
+
+        final String fileName = aFile.getName();
+        for (final String fileExtension : withDotExtensions) {
+            if (fileName.endsWith(fileExtension)) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractLoader.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractLoader.java
new file mode 100644
index 0000000..c9f2b53
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractLoader.java
@@ -0,0 +1,139 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import com.google.common.collect.Maps;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * Contains the common implementation of a loader, for loading a configuration
+ * from an XML file.
+ * <p>
+ * The error handling policy can be described as being austere, dead set,
+ * disciplinary, dour, draconian, exacting, firm, forbidding, grim, hard, hard-
+ * boiled, harsh, harsh, in line, iron-fisted, no-nonsense, oppressive,
+ * persnickety, picky, prudish, punctilious, puritanical, rigid, rigorous,
+ * scrupulous, set, severe, square, stern, stickler, straight, strait-laced,
+ * stringent, stuffy, stuffy, tough, unpermissive, unsparing and uptight.
+ * </p>
+ *
+ * @author Oliver Burn
+ */
+public abstract class AbstractLoader
+    extends DefaultHandler
+{
+    /** maps public id to resolve to esource name for the DTD */
+    private final Map<String, String> mPublicIdToResourceNameMap;
+    /** parser to read XML files **/
+    private final XMLReader mParser;
+
+    /**
+     * Creates a new instance.
+     * @param aPublicId the public ID for the DTD to resolve
+     * @param aDtdResourceName the resource for the DTD
+     * @throws SAXException if an error occurs
+     * @throws ParserConfigurationException if an error occurs
+     */
+    protected AbstractLoader(String aPublicId, String aDtdResourceName)
+        throws SAXException, ParserConfigurationException
+    {
+        this(new HashMap<String, String>(1));
+        mPublicIdToResourceNameMap.put(aPublicId, aDtdResourceName);
+    }
+
+    /**
+     * Creates a new instance.
+     * @param aPublicIdToResourceNameMap maps public IDs to DTD resource names
+     * @throws SAXException if an error occurs
+     * @throws ParserConfigurationException if an error occurs
+     */
+    protected AbstractLoader(Map<String, String> aPublicIdToResourceNameMap)
+        throws SAXException, ParserConfigurationException
+    {
+        mPublicIdToResourceNameMap =
+            Maps.newHashMap(aPublicIdToResourceNameMap);
+        final SAXParserFactory factory = SAXParserFactory.newInstance();
+        factory.setValidating(true);
+        factory.setNamespaceAware(true);
+        mParser = factory.newSAXParser().getXMLReader();
+        mParser.setContentHandler(this);
+        mParser.setEntityResolver(this);
+        mParser.setErrorHandler(this);
+    }
+
+    /**
+     * Parses the specified input source.
+     * @param aInputSource the input source to parse.
+     * @throws IOException if an error occurs
+     * @throws SAXException in an error occurs
+     */
+    public void parseInputSource(InputSource aInputSource)
+        throws IOException, SAXException
+    {
+        mParser.parse(aInputSource);
+    }
+
+    @Override
+    public InputSource resolveEntity(String aPublicId, String aSystemId)
+        throws SAXException, IOException
+    {
+        if (mPublicIdToResourceNameMap.keySet().contains(aPublicId)) {
+            final String dtdResourceName =
+                    mPublicIdToResourceNameMap.get(aPublicId);
+            final ClassLoader loader =
+                this.getClass().getClassLoader();
+            final InputStream dtdIS =
+                loader.getResourceAsStream(dtdResourceName);
+            if (dtdIS == null) {
+                throw new SAXException(
+                    "Unable to load internal dtd " + dtdResourceName);
+            }
+            return new InputSource(dtdIS);
+        }
+        return super.resolveEntity(aPublicId, aSystemId);
+    }
+
+    @Override
+    public void warning(SAXParseException aEx) throws SAXException
+    {
+        throw aEx;
+    }
+
+    @Override
+    public void error(SAXParseException aEx) throws SAXException
+    {
+        throw aEx;
+    }
+
+    @Override
+    public void fatalError(SAXParseException aEx) throws SAXException
+    {
+        throw aEx;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractViolationReporter.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractViolationReporter.java
new file mode 100644
index 0000000..e64a36e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractViolationReporter.java
@@ -0,0 +1,175 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import java.util.Map;
+
+/**
+ * Serves as an abstract base class for all modules that report inspection
+ * findings. Such modules have a Severity level which is used for the
+ * {@link LocalizedMessage localized messages} that are created by the module.
+ *
+ * @author lkuehne
+ */
+public abstract class AbstractViolationReporter
+    extends AutomaticBean
+{
+    /** the severity level of any violations found */
+    private SeverityLevel mSeverityLevel = SeverityLevel.ERROR;
+
+    /** the identifier of the reporter */
+    private String mId;
+
+    /**
+     * Returns the severity level of the messages generated by this module.
+     * @return the severity level
+     * @see SeverityLevel
+     * @see LocalizedMessage#getSeverityLevel
+     */
+    public final SeverityLevel getSeverityLevel()
+    {
+        return mSeverityLevel;
+    }
+
+    /**
+     * Sets the severity level.  The string should be one of the names
+     * defined in the <code>SeverityLevel</code> class.
+     *
+     * @param aSeverity  The new severity level
+     * @see SeverityLevel
+     */
+    public final void setSeverity(String aSeverity)
+    {
+        mSeverityLevel = SeverityLevel.getInstance(aSeverity);
+    }
+
+    /**
+     *  Get the severity level's name.
+     *
+     *  @return  the check's severity level name.
+     */
+    public final String getSeverity()
+    {
+        return mSeverityLevel.getName();
+    }
+
+    /**
+     * Returns the identifier of the reporter. Can be null.
+     * @return the id
+     */
+    public final String getId()
+    {
+        return mId;
+    }
+
+    /**
+     * Sets the identifier of the reporter. Can be null.
+     * @param aId the id
+     */
+    public final void setId(final String aId)
+    {
+        mId = aId;
+    }
+
+    /**
+     * Helper method to log a LocalizedMessage.
+     *
+     * @param aAST a node to get line and column numbers associated
+     *             with the message
+     * @param aKey key to locale message format
+     * @param aArgs arguments to format
+     */
+    protected final void log(DetailAST aAST, String aKey, Object... aArgs)
+    {
+        log(aAST.getLineNo(), aAST.getColumnNo(), aKey, aArgs);
+    }
+
+    /**
+     * Returns the message bundle name resourcebundle that contains the messages
+     * used by this module.
+     * <p>
+     * The default implementation expects the resource files to be named
+     * messages.properties, messages_de.properties, etc. The file must
+     * be placed in the same package as the module implementation.
+     * </p>
+     * <p>
+     * Example: If you write com/foo/MyCoolCheck, create resource files
+     * com/foo/messages.properties, com/foo/messages_de.properties, etc.
+     * </p>
+     *
+     * @return name of a resource bundle that contains the messages
+     * used by this module.
+     */
+    protected String getMessageBundle()
+    {
+        final String className = this.getClass().getName();
+        return getMessageBundle(className);
+    }
+
+    /**
+     * Returns an unmodifiable map instance containing the custom messages
+     * for this configuration.
+     * @return unmodifiable map containing custom messages
+     */
+    protected Map<String, String> getCustomMessages()
+    {
+        return getConfiguration().getMessages();
+    }
+
+    /**
+     * for unit tests, especially with a class with no package name.
+     * @param aClassName class name of the module.
+     * @return name of a resource bundle that contains the messages
+     * used by the module.
+     */
+    String getMessageBundle(final String aClassName)
+    {
+        final int endIndex = aClassName.lastIndexOf('.');
+        final String messages = "messages";
+        if (endIndex < 0) {
+            return messages;
+        }
+        final String packageName = aClassName.substring(0, endIndex);
+        return packageName + "." + messages;
+    }
+
+    /**
+     * Log a message that has no column information.
+     *
+     * @param aLine the line number where the error was found
+     * @param aKey the message that describes the error
+     * @param aArgs the details of the message
+     *
+     * @see java.text.MessageFormat
+     */
+    public abstract void log(int aLine, String aKey, Object... aArgs);
+
+    /**
+     * Log a message that has column information.
+     *
+     * @param aLine the line number where the error was found
+     * @param aCol the column number where the error was found
+     * @param aKey the message that describes the error
+     * @param aArgs the details of the message
+     *
+     * @see java.text.MessageFormat
+     */
+    public abstract void log(int aLine, int aCol, String aKey,
+            Object... aArgs);
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/AnnotationUtility.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/AnnotationUtility.java
new file mode 100644
index 0000000..1655f03
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/AnnotationUtility.java
@@ -0,0 +1,208 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+
+/**
+ * Contains utility methods designed to work with annotations.
+ *
+ * @author Travis Schneeberger
+ */
+public final class AnnotationUtility
+{
+    /**
+     * private utility constructor.
+     * @throws UnsupportedOperationException if called
+     */
+    private AnnotationUtility()
+    {
+        throw new UnsupportedOperationException("do not instantiate.");
+    }
+
+    /**
+     * Checks to see if the AST is annotated with
+     * the passed in annotation.
+     *
+     * <p>
+     * This method will not look for imports or package
+     * statements to detect the passed in annotation.
+     * </p>
+     *
+     * <p>
+     * To check if an AST contains a passed in annotation
+     * taking into account fully-qualified names
+     * (ex: java.lang.Override, Override)
+     * this method will need to be called twice. Once for each
+     * name given.
+     * </p>
+     *
+     * @param aAST the current node
+     * @param aAnnotation the annotation name to check for
+     * @return true if contains the annotation
+     * @throws NullPointerException if the aAST or
+     * aAnnotation is null
+     */
+    public static boolean containsAnnotation(final DetailAST aAST,
+        String aAnnotation)
+    {
+        return AnnotationUtility.getAnnotation(aAST, aAnnotation) != null;
+    }
+
+    /**
+     * Checks to see if the AST is annotated with
+     * any annotation.
+     *
+     * @param aAST the current node
+     * @return true if contains an annotation
+     * @throws NullPointerException if the aAST is null
+     */
+    public static boolean containsAnnotation(final DetailAST aAST)
+    {
+        final DetailAST holder = AnnotationUtility.getAnnotationHolder(aAST);
+        return holder != null && holder.branchContains(TokenTypes.ANNOTATION);
+    }
+
+    /**
+     * Gets the AST that holds a series of annotations for the
+     * potentially annotated AST.  Returns <code>null</code>
+     * the passed in AST is not have an Annotation Holder.
+     *
+     * @param aAST the current node
+     * @return the Annotation Holder
+     * @throws NullPointerException if the aAST is null
+     */
+    public static DetailAST getAnnotationHolder(DetailAST aAST)
+    {
+        if (aAST == null) {
+            throw new NullPointerException("the aAST is null");
+        }
+
+        final DetailAST annotationHolder;
+
+        if (aAST.getType() == TokenTypes.ENUM_CONSTANT_DEF
+            || aAST.getType() == TokenTypes.PACKAGE_DEF)
+        {
+            annotationHolder = aAST.findFirstToken(TokenTypes.ANNOTATIONS);
+        }
+        else {
+            annotationHolder = aAST.findFirstToken(TokenTypes.MODIFIERS);
+        }
+
+        return annotationHolder;
+    }
+
+    /**
+     * Checks to see if the AST is annotated with
+     * the passed in annotation and return the AST
+     * representing that annotation.
+     *
+     * <p>
+     * This method will not look for imports or package
+     * statements to detect the passed in annotation.
+     * </p>
+     *
+     * <p>
+     * To check if an AST contains a passed in annotation
+     * taking into account fully-qualified names
+     * (ex: java.lang.Override, Override)
+     * this method will need to be called twice. Once for each
+     * name given.
+     * </p>
+     *
+     * @param aAST the current node
+     * @param aAnnotation the annotation name to check for
+     * @return the AST representing that annotation
+     * @throws NullPointerException if the aAST or
+     * aAnnotation is null
+     */
+    public static DetailAST getAnnotation(final DetailAST aAST,
+        String aAnnotation)
+    {
+        if (aAST == null) {
+            throw new NullPointerException("the aAST is null");
+        }
+
+        if (aAnnotation == null) {
+            throw new NullPointerException("the aAnnotation is null");
+        }
+
+        if (aAnnotation.trim().length() == 0) {
+            throw new IllegalArgumentException("the aAnnotation"
+                + "is empty or spaces");
+        }
+
+        final DetailAST holder = AnnotationUtility.getAnnotationHolder(aAST);
+
+        for (DetailAST child = holder.getFirstChild();
+            child != null; child = child.getNextSibling())
+        {
+            if (child.getType() == TokenTypes.ANNOTATION) {
+                final DetailAST at = child.getFirstChild();
+                final String aName =
+                    FullIdent.createFullIdent(at.getNextSibling()).getText();
+                if (aAnnotation.equals(aName)) {
+                    return child;
+                }
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Checks to see what the passed in AST (representing
+     * an annotation) is annotating.
+     *
+     * @param aAST the AST representing an annotation.
+     * @return the AST the annotation is annotating.
+     * @throws NullPointerException if the aAST is null
+     * @throws IllegalArgumentException if the aAST is not
+     * an {@link TokenTypes#ANNOTATION}
+     */
+    public static DetailAST annotatingWhat(DetailAST aAST)
+    {
+        if (aAST == null) {
+            throw new NullPointerException("the aAST is null");
+        }
+
+        if (aAST.getType() != TokenTypes.ANNOTATION) {
+            throw new IllegalArgumentException(
+                "The aAST is not an annotation. AST: " + aAST);
+        }
+
+        return aAST.getParent().getParent();
+    }
+
+    /**
+     * Checks to see if the passed in AST (representing
+     * an annotation) is annotating the passed in type.
+     * @param aAST the AST representing an annotation
+     * @param aTokenType the passed in type
+     * @return true if the annotation is annotating a type
+     * equal to the passed in type
+     * @throws NullPointerException if the aAST is null
+     * @throws IllegalArgumentException if the aAST is not
+     * an {@link TokenTypes#ANNOTATION}
+     */
+    public static boolean isAnnotatingType(DetailAST aAST, int aTokenType)
+    {
+        final DetailAST ast = AnnotationUtility.annotatingWhat(aAST);
+        return ast.getType() == aTokenType;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/AuditEvent.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/AuditEvent.java
new file mode 100644
index 0000000..6e21a29
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/AuditEvent.java
@@ -0,0 +1,146 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import java.util.EventObject;
+
+
+/**
+ * Raw event for audit.
+ * <p>
+ * <i>
+ * I'm not very satisfied about the design of this event since there are
+ * optional methods that will return null in most of the case. This will
+ * need some work to clean it up especially if we want to introduce
+ * a more sequential reporting action rather than a packet error
+ * reporting. This will allow for example to follow the process quickly
+ * in an interface or a servlet (yep, that's cool to run a check via
+ * a web interface in a source repository ;-)
+ * </i>
+ * </p>
+ *
+ * @author <a href="mailto:stephane.bailliez at wanadoo.fr">Stephane Bailliez</a>
+ * @see AuditListener
+ */
+public final class AuditEvent
+    extends EventObject
+{
+    /** Record a version. */
+    private static final long serialVersionUID = -3774725606973812736L;
+    /** filename event associated with **/
+    private final String mFileName;
+    /** message associated with the event **/
+    private final transient LocalizedMessage mMessage;
+
+    /**
+     * Creates a new instance.
+     * @param aSource the object that created the event
+     */
+    public AuditEvent(Object aSource)
+    {
+        this(aSource, null);
+    }
+
+    /**
+     * Creates a new <code>AuditEvent</code> instance.
+     * @param aSrc source of the event
+     * @param aFileName file associated with the event
+     */
+    public AuditEvent(Object aSrc, String aFileName)
+    {
+        this(aSrc, aFileName, null);
+    }
+
+    /**
+     * Creates a new <code>AuditEvent</code> instance.
+     *
+     * @param aSrc source of the event
+     * @param aFileName file associated with the event
+     * @param aMessage the actual message
+     */
+    public AuditEvent(Object aSrc, String aFileName, LocalizedMessage aMessage)
+    {
+        super(aSrc);
+        mFileName = aFileName;
+        mMessage = aMessage;
+    }
+
+    /**
+     * @return the file name currently being audited or null if there is
+     * no relation to a file.
+     */
+    public String getFileName()
+    {
+        return mFileName;
+    }
+
+    /**
+     * return the line number on the source file where the event occurred.
+     * This may be 0 if there is no relation to a file content.
+     * @return an integer representing the line number in the file source code.
+     */
+    public int getLine()
+    {
+        return mMessage.getLineNo();
+    }
+
+    /**
+     * return the message associated to the event.
+     * @return the event message
+     */
+    public String getMessage()
+    {
+        return mMessage.getMessage();
+    }
+
+    /** @return the column associated with the message **/
+    public int getColumn()
+    {
+        return mMessage.getColumnNo();
+    }
+
+    /** @return the audit event severity level **/
+    public SeverityLevel getSeverityLevel()
+    {
+        return (mMessage == null)
+            ? SeverityLevel.INFO
+            : mMessage.getSeverityLevel();
+    }
+
+    /**
+     * @return the identifier of the module that generated the event. Can return
+     *         null.
+     */
+    public String getModuleId()
+    {
+        return mMessage.getModuleId();
+    }
+
+    /** @return the name of the source for the message **/
+    public String getSourceName()
+    {
+        return mMessage.getSourceName();
+    }
+
+    /** @return the localized message **/
+    public LocalizedMessage getLocalizedMessage()
+    {
+        return mMessage;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/AuditListener.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/AuditListener.java
new file mode 100644
index 0000000..fe01612
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/AuditListener.java
@@ -0,0 +1,75 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import java.util.EventListener;
+
+
+/**
+ * Listener in charge of receiving events from the Checker.
+ * Typical events sequence is:
+ * <pre>
+ * auditStarted
+ *   (fileStarted
+ *     (addError)*
+ *   fileFinished )*
+ * auditFinished
+ * </pre>
+ * @author <a href="mailto:stephane.bailliez at wanadoo.fr">Stephane Bailliez</a>
+ */
+public interface AuditListener
+    extends EventListener
+{
+    /**
+     * Notify that the audit is about to start.
+     * @param aEvt the event details
+     */
+    void auditStarted(AuditEvent aEvt);
+
+    /**
+     * Notify that the audit is finished.
+     * @param aEvt the event details
+     */
+    void auditFinished(AuditEvent aEvt);
+
+    /**
+     * Notify that audit is about to start on a specific file.
+     * @param aEvt the event details
+     */
+    void fileStarted(AuditEvent aEvt);
+
+    /**
+     * Notify that audit is finished on a specific file.
+     * @param aEvt the event details
+     */
+    void fileFinished(AuditEvent aEvt);
+
+    /**
+     * Notify that an audit error was discovered on a specific file.
+     * @param aEvt the event details
+     */
+    void addError(AuditEvent aEvt);
+
+    /**
+     * Notify that an exception happened while performing audit.
+     * @param aEvt the event details
+     * @param aThrowable details of the exception
+     */
+    void addException(AuditEvent aEvt, Throwable aThrowable);
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java
new file mode 100644
index 0000000..571395a
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java
@@ -0,0 +1,296 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import com.google.common.collect.Lists;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collection;
+import java.util.List;
+import java.util.StringTokenizer;
+import org.apache.commons.beanutils.BeanUtilsBean;
+import org.apache.commons.beanutils.ConversionException;
+import org.apache.commons.beanutils.ConvertUtilsBean;
+import org.apache.commons.beanutils.Converter;
+import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.commons.beanutils.PropertyUtilsBean;
+import org.apache.commons.beanutils.converters.ArrayConverter;
+import org.apache.commons.beanutils.converters.BooleanConverter;
+import org.apache.commons.beanutils.converters.ByteConverter;
+import org.apache.commons.beanutils.converters.CharacterConverter;
+import org.apache.commons.beanutils.converters.DoubleConverter;
+import org.apache.commons.beanutils.converters.FloatConverter;
+import org.apache.commons.beanutils.converters.IntegerConverter;
+import org.apache.commons.beanutils.converters.LongConverter;
+import org.apache.commons.beanutils.converters.ShortConverter;
+
+/**
+ * A Java Bean that implements the component lifecycle interfaces by
+ * calling the bean's setters for all configuration attributes.
+ * @author lkuehne
+ */
+public class AutomaticBean
+    implements Configurable, Contextualizable
+{
+    /** the configuration of this bean */
+    private Configuration mConfiguration;
+
+
+    /**
+     * Creates a BeanUtilsBean that is configured to use
+     * type converters that throw a ConversionException
+     * instead of using the default value when something
+     * goes wrong.
+     *
+     * @return a configured BeanUtilsBean
+     */
+    private static BeanUtilsBean createBeanUtilsBean()
+    {
+        final ConvertUtilsBean cub = new ConvertUtilsBean();
+        // TODO: is there a smarter way to tell beanutils not to use defaults?
+        cub.register(new BooleanConverter(), Boolean.TYPE);
+        cub.register(new BooleanConverter(), Boolean.class);
+        cub.register(new ArrayConverter(
+            boolean[].class, new BooleanConverter()), boolean[].class);
+        cub.register(new ByteConverter(), Byte.TYPE);
+        cub.register(new ByteConverter(), Byte.class);
+        cub.register(new ArrayConverter(byte[].class, new ByteConverter()),
+            byte[].class);
+        cub.register(new CharacterConverter(), Character.TYPE);
+        cub.register(new CharacterConverter(), Character.class);
+        cub.register(new ArrayConverter(char[].class, new CharacterConverter()),
+            char[].class);
+        cub.register(new DoubleConverter(), Double.TYPE);
+        cub.register(new DoubleConverter(), Double.class);
+        cub.register(new ArrayConverter(double[].class, new DoubleConverter()),
+            double[].class);
+        cub.register(new FloatConverter(), Float.TYPE);
+        cub.register(new FloatConverter(), Float.class);
+        cub.register(new ArrayConverter(float[].class, new FloatConverter()),
+            float[].class);
+        cub.register(new IntegerConverter(), Integer.TYPE);
+        cub.register(new IntegerConverter(), Integer.class);
+        cub.register(new ArrayConverter(int[].class, new IntegerConverter()),
+            int[].class);
+        cub.register(new LongConverter(), Long.TYPE);
+        cub.register(new LongConverter(), Long.class);
+        cub.register(new ArrayConverter(long[].class, new LongConverter()),
+            long[].class);
+        cub.register(new ShortConverter(), Short.TYPE);
+        cub.register(new ShortConverter(), Short.class);
+        cub.register(new ArrayConverter(short[].class, new ShortConverter()),
+            short[].class);
+        cub.register(new RelaxedStringArrayConverter(), String[].class);
+
+        // BigDecimal, BigInteger, Class, Date, String, Time, TimeStamp
+        // do not use defaults in the default configuration of ConvertUtilsBean
+
+        return new BeanUtilsBean(cub, new PropertyUtilsBean());
+    }
+
+    /**
+     * Implements the Configurable interface using bean introspection.
+     *
+     * Subclasses are allowed to add behaviour. After the bean
+     * based setup has completed first the method
+     * {@link #finishLocalSetup finishLocalSetup}
+     * is called to allow completion of the bean's local setup,
+     * after that the method {@link #setupChild setupChild}
+     * is called for each {@link Configuration#getChildren child Configuration}
+     * of <code>aConfiguration</code>.
+     *
+     * @param aConfiguration {@inheritDoc}
+     * @throws CheckstyleException {@inheritDoc}
+     * @see Configurable
+     */
+    public final void configure(Configuration aConfiguration)
+        throws CheckstyleException
+    {
+        mConfiguration = aConfiguration;
+
+        final BeanUtilsBean beanUtils = createBeanUtilsBean();
+
+        // TODO: debug log messages
+        final String[] attributes = aConfiguration.getAttributeNames();
+
+        for (final String key : attributes) {
+            final String value = aConfiguration.getAttribute(key);
+
+            try {
+                // BeanUtilsBean.copyProperties silently ignores missing setters
+                // for key, so we have to go through great lengths here to
+                // figure out if the bean property really exists.
+                final PropertyDescriptor pd =
+                    PropertyUtils.getPropertyDescriptor(this, key);
+                if ((pd == null) || (pd.getWriteMethod() == null)) {
+                    throw new CheckstyleException(
+                        "Property '" + key + "' in module "
+                        + aConfiguration.getName()
+                        + " does not exist, please check the documentation");
+                }
+
+                // finally we can set the bean property
+                beanUtils.copyProperty(this, key, value);
+            }
+            catch (final InvocationTargetException e) {
+                throw new CheckstyleException(
+                    "Cannot set property '" + key + "' in module "
+                    + aConfiguration.getName() + " to '" + value
+                    + "': " + e.getTargetException().getMessage(), e);
+            }
+            catch (final IllegalAccessException e) {
+                throw new CheckstyleException(
+                    "cannot access " + key + " in "
+                    + this.getClass().getName(), e);
+            }
+            catch (final NoSuchMethodException e) {
+                throw new CheckstyleException(
+                    "cannot access " + key + " in "
+                    + this.getClass().getName(), e);
+            }
+            catch (final IllegalArgumentException e) {
+                throw new CheckstyleException(
+                    "illegal value '" + value + "' for property '" + key
+                    + "' of module " + aConfiguration.getName(), e);
+            }
+            catch (final ConversionException e) {
+                throw new CheckstyleException(
+                    "illegal value '" + value + "' for property '" + key
+                    + "' of module " + aConfiguration.getName(), e);
+            }
+
+        }
+
+        finishLocalSetup();
+
+        final Configuration[] childConfigs = aConfiguration.getChildren();
+        for (final Configuration childConfig : childConfigs) {
+            setupChild(childConfig);
+        }
+    }
+
+    /**
+     * Implements the Contextualizable interface using bean introspection.
+     * @param aContext {@inheritDoc}
+     * @throws CheckstyleException {@inheritDoc}
+     * @see Contextualizable
+     */
+    public final void contextualize(Context aContext)
+        throws CheckstyleException
+    {
+        final BeanUtilsBean beanUtils = createBeanUtilsBean();
+
+        // TODO: debug log messages
+        final Collection<String> attributes = aContext.getAttributeNames();
+
+        for (final String key : attributes) {
+            final Object value = aContext.get(key);
+
+            try {
+                beanUtils.copyProperty(this, key, value);
+            }
+            catch (final InvocationTargetException e) {
+                // TODO: log.debug("The bean " + this.getClass()
+                // + " is not interested in " + value)
+                throw new CheckstyleException("cannot set property "
+                    + key + " to value " + value + " in bean "
+                    + this.getClass().getName(), e);
+            }
+            catch (final IllegalAccessException e) {
+                throw new CheckstyleException(
+                    "cannot access " + key + " in "
+                    + this.getClass().getName(), e);
+            }
+            catch (final IllegalArgumentException e) {
+                throw new CheckstyleException(
+                    "illegal value '" + value + "' for property '" + key
+                    + "' of bean " + this.getClass().getName(), e);
+            }
+            catch (final ConversionException e) {
+                throw new CheckstyleException(
+                    "illegal value '" + value + "' for property '" + key
+                    + "' of bean " + this.getClass().getName(), e);
+            }
+        }
+    }
+
+    /**
+     * Returns the configuration that was used to configure this component.
+     * @return the configuration that was used to configure this component.
+     */
+    protected final Configuration getConfiguration()
+    {
+        return mConfiguration;
+    }
+
+    /**
+     * Provides a hook to finish the part of this component's setup that
+     * was not handled by the bean introspection.
+     * <p>
+     * The default implementation does nothing.
+     * </p>
+     * @throws CheckstyleException if there is a configuration error.
+     */
+    protected void finishLocalSetup() throws CheckstyleException
+    {
+    }
+
+    /**
+     * Called by configure() for every child of this component's Configuration.
+     * <p>
+     * The default implementation does nothing.
+     * </p>
+     * @param aChildConf a child of this component's Configuration
+     * @throws CheckstyleException if there is a configuration error.
+     * @see Configuration#getChildren
+     */
+    protected void setupChild(Configuration aChildConf)
+        throws CheckstyleException
+    {
+    }
+
+    /**
+     * A converter that does not care whether the array elements contain String
+     * characters like '*' or '_'. The normal ArrayConverter class has problems
+     * with this characters.
+     */
+    private static class RelaxedStringArrayConverter implements Converter
+    {
+        /** {@inheritDoc} */
+        public Object convert(@SuppressWarnings("rawtypes") Class aType,
+            Object aValue)
+        {
+            if (null == aType) {
+                throw new ConversionException("Cannot convert from null.");
+            }
+
+            // Convert to a String and trim it for the tokenizer.
+            final StringTokenizer st = new StringTokenizer(
+                aValue.toString().trim(), ",");
+            final List<String> result = Lists.newArrayList();
+
+            while (st.hasMoreTokens()) {
+                final String token = st.nextToken();
+                result.add(token.trim());
+            }
+
+            return result.toArray(new String[result.size()]);
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/Check.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/Check.java
new file mode 100644
index 0000000..0e33c17
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/Check.java
@@ -0,0 +1,261 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import com.google.common.collect.Sets;
+import java.util.Set;
+
+/**
+ * The base class for checks.
+ *
+ * @author Oliver Burn
+ * @version 1.0
+ * @see <a href="{@docRoot}/../writingchecks.html" target="_top">Writing
+ * your own checks</a>
+ */
+public abstract class Check extends AbstractViolationReporter
+{
+    /** default tab width for column reporting */
+    private static final int DEFAULT_TAB_WIDTH = 8;
+
+    /** the current file contents */
+    private FileContents mFileContents;
+
+    /** the tokens the check is interested in */
+    private final Set<String> mTokens = Sets.newHashSet();
+
+    /** the object for collecting messages. */
+    private LocalizedMessages mMessages;
+
+    /** the tab width for column reporting */
+    private int mTabWidth = DEFAULT_TAB_WIDTH; // meaningful default
+
+    /**
+     * The class loader to load external classes. Not initialised as this must
+     * be set by my creator.
+     */
+    private ClassLoader mLoader;
+
+    /**
+     * Returns the default token a check is interested in. Only used if the
+     * configuration for a check does not define the tokens.
+     * @return the default tokens
+     * @see TokenTypes
+     */
+    public abstract int[] getDefaultTokens();
+
+    /**
+     * The configurable token set.
+     * Used to protect Checks against malicious users who specify an
+     * unacceptable token set in the configuration file.
+     * The default implementation returns the check's default tokens.
+     * @return the token set this check is designed for.
+     * @see TokenTypes
+     */
+    public int[] getAcceptableTokens()
+    {
+        final int[] defaultTokens = getDefaultTokens();
+        final int[] copy = new int[defaultTokens.length];
+        System.arraycopy(defaultTokens, 0, copy, 0, defaultTokens.length);
+        return copy;
+    }
+
+    /**
+     * The tokens that this check must be registered for.
+     * @return the token set this must be registered for.
+     * @see TokenTypes
+     */
+    public int[] getRequiredTokens()
+    {
+        return new int[] {};
+    }
+
+    /**
+     * Adds a set of tokens the check is interested in.
+     * @param aStrRep the string representation of the tokens interested in
+     */
+    public final void setTokens(String[] aStrRep)
+    {
+        for (final String s : aStrRep) {
+            mTokens.add(s);
+        }
+    }
+
+    /**
+     * Returns the tokens registered for the check.
+     * @return the set of token names
+     */
+    public final Set<String> getTokenNames()
+    {
+        return mTokens;
+    }
+
+    /**
+     * Set the global object used to collect messages.
+     * @param aMessages the messages to log with
+     */
+    public final void setMessages(LocalizedMessages aMessages)
+    {
+        mMessages = aMessages;
+    }
+
+    /**
+     * Initialise the check. This is the time to verify that the check has
+     * everything required to perform it job.
+     */
+    public void init()
+    {
+    }
+
+    /**
+     * Destroy the check. It is being retired from service.
+     */
+    public void destroy()
+    {
+    }
+
+    /**
+     * Called before the starting to process a tree. Ideal place to initialise
+     * information that is to be collected whilst processing a tree.
+     * @param aRootAST the root of the tree
+     */
+    public void beginTree(DetailAST aRootAST)
+    {
+    }
+
+    /**
+     * Called after finished processing a tree. Ideal place to report on
+     * information collected whilst processing a tree.
+     * @param aRootAST the root of the tree
+     */
+    public void finishTree(DetailAST aRootAST)
+    {
+    }
+
+    /**
+     * Called to process a token.
+     * @param aAST the token to process
+     */
+    public void visitToken(DetailAST aAST)
+    {
+    }
+
+    /**
+     * Called after all the child nodes have been process.
+     * @param aAST the token leaving
+     */
+    public void leaveToken(DetailAST aAST)
+    {
+    }
+
+    /**
+     * Returns the lines associated with the tree.
+     * @return the file contents
+     */
+    public final String[] getLines()
+    {
+        return getFileContents().getLines();
+    }
+
+    /**
+     * Set the file contents associated with the tree.
+     * @param aContents the manager
+     */
+    public final void setFileContents(FileContents aContents)
+    {
+        mFileContents = aContents;
+    }
+
+    /**
+     * Returns the file contents associated with the tree.
+     * @return the file contents
+     */
+    public final FileContents getFileContents()
+    {
+        return mFileContents;
+    }
+
+    /**
+     * Set the class loader associated with the tree.
+     * @param aLoader the class loader
+     */
+    public final void setClassLoader(ClassLoader aLoader)
+    {
+        mLoader = aLoader;
+    }
+
+    /**
+     * Returns the class loader associated with the tree.
+     * @return the class loader
+     */
+    public final ClassLoader getClassLoader()
+    {
+        return mLoader;
+    }
+
+    /** @return the tab width to report errors with */
+    protected final int getTabWidth()
+    {
+        return mTabWidth;
+    }
+
+    /**
+     * Set the tab width to report errors with.
+     * @param aTabWidth an <code>int</code> value
+     */
+    public final void setTabWidth(int aTabWidth)
+    {
+        mTabWidth = aTabWidth;
+    }
+
+    @Override
+    public final void log(int aLine, String aKey, Object... aArgs)
+    {
+        mMessages.add(
+            new LocalizedMessage(
+                aLine,
+                getMessageBundle(),
+                aKey,
+                aArgs,
+                getSeverityLevel(),
+                getId(),
+                this.getClass(),
+                this.getCustomMessages().get(aKey)));
+    }
+
+
+    @Override
+    public final void log(int aLineNo, int aColNo, String aKey,
+            Object... aArgs)
+    {
+        final int col = 1 + Utils.lengthExpandedTabs(
+            getLines()[aLineNo - 1], aColNo, getTabWidth());
+        mMessages.add(
+            new LocalizedMessage(
+                aLineNo,
+                col,
+                getMessageBundle(),
+                aKey,
+                aArgs,
+                getSeverityLevel(),
+                getId(),
+                this.getClass(),
+                this.getCustomMessages().get(aKey)));
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/CheckstyleException.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/CheckstyleException.java
new file mode 100644
index 0000000..dbc8152
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/CheckstyleException.java
@@ -0,0 +1,53 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+/**
+ * Represents an error condition within Checkstyle.
+ *
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public class CheckstyleException extends Exception
+{
+    /** For Serialisation that will never happen. */
+    private static final long serialVersionUID = -3517342299748221108L;
+
+    /**
+     * Creates a new <code>CheckstyleException</code> instance.
+     *
+     * @param aMessage a <code>String</code> value
+     */
+    public CheckstyleException(String aMessage)
+    {
+        super(aMessage);
+    }
+
+    /**
+     * Creates a new <code>CheckstyleException</code> instance
+     * that was caused by another exception.
+     *
+     * @param aMessage a message that explains this exception
+     * @param aCause the Exception that is wrapped by this exception
+     */
+    public CheckstyleException(String aMessage, Throwable aCause)
+    {
+        super(aMessage, aCause);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/Comment.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/Comment.java
new file mode 100644
index 0000000..48c187e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/Comment.java
@@ -0,0 +1,112 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+/**
+ * Representation of the comment block.
+ *
+ * @author o_sukhodolsky
+ */
+public class Comment implements TextBlock
+{
+    /** text of the comment. */
+    private final String[] mText;
+
+    /** number of first line of the comment. */
+    private final int mFirstLine;
+
+    /** number of last line of the comment. */
+    private final int mLastLine;
+
+    /** number of first column of the comment. */
+    private final int mFirstCol;
+
+    /** number of last column of the comment. */
+    private final int mLastCol;
+
+    /**
+     * Creates new instance.
+     * @param aText the lines that make up the comment.
+     * @param aFirstCol number of the first column of the comment.
+     * @param aLastLine number of the last line of the comment.
+     * @param aLastCol number of the last column of the comment.
+     */
+    public Comment(final String[] aText, final int aFirstCol,
+            final int aLastLine, final int aLastCol)
+    {
+        mText = new String[aText.length];
+        System.arraycopy(aText, 0, mText, 0, mText.length);
+        mFirstLine = aLastLine - mText.length + 1;
+        mLastLine = aLastLine;
+        mFirstCol = aFirstCol;
+        mLastCol = aLastCol;
+    }
+
+    /** {@inheritDoc} */
+    public final String[] getText()
+    {
+        return mText.clone();
+    }
+
+    /** {@inheritDoc} */
+    public final int getStartLineNo()
+    {
+        return mFirstLine;
+    }
+
+    /** {@inheritDoc} */
+    public final int getEndLineNo()
+    {
+        return mLastLine;
+    }
+
+    /** {@inheritDoc} */
+    public int getStartColNo()
+    {
+        return mFirstCol;
+    }
+
+    /** {@inheritDoc} */
+    public int getEndColNo()
+    {
+        return mLastCol;
+    }
+
+    /** {@inheritDoc} */
+    public boolean intersects(int aStartLineNo, int aStartColNo,
+                              int aEndLineNo, int aEndColNo)
+    {
+        // compute a single number for start and end
+        // to simpify conditional logic
+        final long multiplier = Integer.MAX_VALUE;
+        final long thisStart = mFirstLine * multiplier + mFirstCol;
+        final long thisEnd = mLastLine * multiplier + mLastCol;
+        final long inStart = aStartLineNo * multiplier + aStartColNo;
+        final long inEnd = aEndLineNo * multiplier + aEndColNo;
+
+        return !((thisEnd < inStart) || (inEnd < thisStart));
+    }
+
+    @Override
+    public String toString()
+    {
+        return "Comment[" + mFirstLine + ":" + mFirstCol + "-"
+            + mLastLine + ":" + mLastCol + "]";
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/Configurable.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/Configurable.java
new file mode 100644
index 0000000..2869e9f
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/Configurable.java
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+/**
+ * A component that can be configured.  The general idea of
+ * Configuration/Configurable was taken from <a target="_top"
+ * href="http://jakarta.apache.org/avalon/">Jakarta's Avalon framework</a>.
+ * @author lkuehne
+ */
+public interface Configurable
+{
+    /**
+     * Configures this component.
+     * @param aConfiguration the configuration to use.
+     * @throws CheckstyleException if there is a configuration error.
+     */
+    void configure(Configuration aConfiguration) throws CheckstyleException;
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/Configuration.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/Configuration.java
new file mode 100644
index 0000000..32a25f9
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/Configuration.java
@@ -0,0 +1,66 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import com.google.common.collect.ImmutableMap;
+
+import java.io.Serializable;
+
+
+/**
+ * A Configuration is used to configure a Configurable component.  The general
+ * idea of Configuration/Configurable was taken from <a target="_top"
+ * href="http://jakarta.apache.org/avalon/">Jakarta's Avalon framework</a>.
+ * @author lkuehne
+ */
+public interface Configuration extends Serializable
+{
+    /**
+     * The set of attribute names.
+     * @return The set of attribute names, never null.
+     */
+    String[] getAttributeNames();
+
+    /**
+     * The attribute value for an attribute name.
+     * @param aName the attribute name
+     * @return the value that is associated with aName
+     * @throws CheckstyleException if aName is not a valid attribute name
+     */
+    String getAttribute(String aName) throws CheckstyleException;
+
+    /**
+     * The set of child configurations.
+     * @return The set of child configurations, never null.
+     */
+    Configuration[] getChildren();
+
+    /**
+     * The name of this configuration.
+     * @return The name of this configuration.
+     */
+    String getName();
+
+    /**
+     * Returns an unmodifiable map instance containing the custom messages
+     * for this configuration.
+     * @return unmodifiable map containing custom messages
+     */
+    ImmutableMap<String, String> getMessages();
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/Context.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/Context.java
new file mode 100644
index 0000000..fa94081
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/Context.java
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import com.google.common.collect.ImmutableCollection;
+
+/**
+ * A context to be used in subcomponents. The general idea of
+ * Context/Contextualizable was taken from <a target="_top"
+ * href="http://jakarta.apache.org/avalon/">Jakarta's Avalon framework</a>.
+ * @author lkuehne
+ * @see Contextualizable
+ */
+public interface Context
+{
+    /**
+     * Searches for the value with the specified attribute key in this context.
+     * @param aKey the attribute key.
+     * @return the value in this context with the specified attribute key value.
+     */
+    Object get(String aKey);
+
+    /**
+     * Returns the names of all atttributes of this context.
+     * @return the names of all atttributes of this context.
+     */
+    ImmutableCollection<String> getAttributeNames();
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/Contextualizable.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/Contextualizable.java
new file mode 100644
index 0000000..3b7259b
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/Contextualizable.java
@@ -0,0 +1,38 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+
+/**
+ * A Component that needs context information from it's container to work.
+ * The container will create a Context object and pass it to this
+ * Contextualizable. Contextualization will occur before configuration. The
+ * general idea of Context/Contextualizable was taken from <a target="_top"
+ * href="http://jakarta.apache.org/avalon/">Jakarta's Avalon framework</a>.
+ * @author lkuehne
+ */
+public interface Contextualizable
+{
+    /**
+     * Sets the context for this Component.
+     * @param aContext the context.
+     * @throws CheckstyleException if there is a contextualization error.
+     */
+    void contextualize(Context aContext) throws CheckstyleException;
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/DetailAST.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/DetailAST.java
new file mode 100644
index 0000000..c0542eb
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/DetailAST.java
@@ -0,0 +1,311 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import java.util.BitSet;
+
+import antlr.CommonAST;
+import antlr.Token;
+import antlr.collections.AST;
+
+/**
+ * An extension of the CommonAST that records the line and column
+ * number.  The idea was taken from <a target="_top"
+ * href="http://www.jguru.com/jguru/faq/view.jsp?EID=62654">Java Guru
+ * FAQ: How can I include line numbers in automatically generated
+ * ASTs?</a>.
+ * @author Oliver Burn
+ * @author lkuehne
+ * @version 1.0
+ * @see <a href="http://www.antlr.org/">ANTLR Website</a>
+ */
+public final class DetailAST extends CommonAST
+{
+    /** For Serialisation that will never happen. */
+    private static final long serialVersionUID = -2580884815577559874L;
+
+    /** constant to indicate if not calculated the child count */
+    private static final int NOT_INITIALIZED = Integer.MIN_VALUE;
+
+    /** the line number **/
+    private int mLineNo = NOT_INITIALIZED;
+    /** the column number **/
+    private int mColumnNo = NOT_INITIALIZED;
+
+    /** number of children */
+    private int mChildCount = NOT_INITIALIZED;
+    /** the parent token */
+    private DetailAST mParent;
+    /** previous sibling */
+    private DetailAST mPreviousSibling;
+
+    /**
+     * All token types in this branch.
+     * Token 'x' (where x is an int) is in this branch
+     * if mBranchTokenTypes.get(x) is true.
+     */
+    private BitSet mBranchTokenTypes;
+
+    @Override
+    public void initialize(Token aTok)
+    {
+        super.initialize(aTok);
+        mLineNo = aTok.getLine();
+        mColumnNo = aTok.getColumn() - 1; // expect columns to start @ 0
+    }
+
+    @Override
+    public void initialize(AST aAST)
+    {
+        final DetailAST da = (DetailAST) aAST;
+        setText(da.getText());
+        setType(da.getType());
+        mLineNo = da.getLineNo();
+        mColumnNo = da.getColumnNo();
+    }
+
+    @Override
+    public void setFirstChild(AST aAST)
+    {
+        mChildCount = NOT_INITIALIZED;
+        super.setFirstChild(aAST);
+        if (aAST != null) {
+            ((DetailAST) aAST).setParent(this);
+        }
+    }
+
+    @Override
+    public void setNextSibling(AST aAST)
+    {
+        super.setNextSibling(aAST);
+        if ((aAST != null) && (mParent != null)) {
+            ((DetailAST) aAST).setParent(mParent);
+        }
+        if (aAST != null) {
+            ((DetailAST) aAST).setPreviousSibling(this);
+        }
+    }
+
+    /**
+     * Sets previous sibling.
+     * @param aAST a previous sibling
+     */
+    void setPreviousSibling(DetailAST aAST)
+    {
+        mPreviousSibling = aAST;
+    }
+
+    @Override
+    public void addChild(AST aAST)
+    {
+        super.addChild(aAST);
+        if (aAST != null) {
+            ((DetailAST) aAST).setParent(this);
+            (getFirstChild()).setParent(this);
+        }
+    }
+
+    /**
+     * Returns the number of child nodes one level below this node. That is is
+     * does not recurse down the tree.
+     * @return the number of child nodes
+     */
+    public int getChildCount()
+    {
+        // lazy init
+        if (mChildCount == NOT_INITIALIZED) {
+            mChildCount = 0;
+            AST child = getFirstChild();
+
+            while (child != null) {
+                mChildCount += 1;
+                child = child.getNextSibling();
+            }
+        }
+        return mChildCount;
+    }
+
+    /**
+     * Set the parent token.
+     * @param aParent the parent token
+     */
+    // TODO: should be private but that breaks the DetailASTTest
+    // until we manage parent in DetailAST instead of externally
+    void setParent(DetailAST aParent)
+    {
+        // TODO: Check visibility, could be private
+        // if set in setFirstChild() and friends
+        mParent = aParent;
+        final DetailAST nextSibling = getNextSibling();
+        if (nextSibling != null) {
+            nextSibling.setParent(aParent);
+            nextSibling.setPreviousSibling(this);
+        }
+    }
+
+    /**
+     * Returns the parent token.
+     * @return the parent token
+     */
+    public DetailAST getParent()
+    {
+        return mParent;
+    }
+
+    /** @return the line number **/
+    public int getLineNo()
+    {
+        if (mLineNo == NOT_INITIALIZED) {
+            // an inner AST that has been initialized
+            // with initialize(String text)
+            final DetailAST child = getFirstChild();
+            final DetailAST sibling = getNextSibling();
+            if (child != null) {
+                return child.getLineNo();
+            }
+            else if (sibling != null) {
+                return sibling.getLineNo();
+            }
+        }
+        return mLineNo;
+    }
+
+    /** @return the column number **/
+    public int getColumnNo()
+    {
+        if (mColumnNo == NOT_INITIALIZED) {
+            // an inner AST that has been initialized
+            // with initialize(String text)
+            final DetailAST child = getFirstChild();
+            final DetailAST sibling = getNextSibling();
+            if (child != null) {
+                return child.getColumnNo();
+            }
+            else if (sibling != null) {
+                return sibling.getColumnNo();
+            }
+        }
+        return mColumnNo;
+    }
+
+    /** @return the last child node */
+    public DetailAST getLastChild()
+    {
+        DetailAST ast = getFirstChild();
+        while ((ast != null) && (ast.getNextSibling() != null)) {
+            ast = ast.getNextSibling();
+        }
+        return ast;
+    }
+
+    /**
+     * @return the token types that occur in the branch as a sorted set.
+     */
+    private BitSet getBranchTokenTypes()
+    {
+        // lazy init
+        if (mBranchTokenTypes == null) {
+
+            mBranchTokenTypes = new BitSet();
+            mBranchTokenTypes.set(getType());
+
+            // add union of all childs
+            DetailAST child = getFirstChild();
+            while (child != null) {
+                final BitSet childTypes = child.getBranchTokenTypes();
+                mBranchTokenTypes.or(childTypes);
+
+                child = child.getNextSibling();
+            }
+        }
+        return mBranchTokenTypes;
+    }
+
+    /**
+     * Checks if this branch of the parse tree contains a token
+     * of the provided type.
+     * @param aType a TokenType
+     * @return true if and only if this branch (including this node)
+     * contains a token of type <code>aType</code>.
+     */
+    public boolean branchContains(int aType)
+    {
+        return getBranchTokenTypes().get(aType);
+    }
+
+    /**
+     * Returns the number of direct child tokens that have the specified type.
+     * @param aType the token type to match
+     * @return the number of matching token
+     */
+    public int getChildCount(int aType)
+    {
+        int count = 0;
+        for (AST i = getFirstChild(); i != null; i = i.getNextSibling()) {
+            if (i.getType() == aType) {
+                count++;
+            }
+        }
+        return count;
+    }
+
+    /**
+     * Returns the previous sibling or null if no such sibling exists.
+     * @return the previous sibling or null if no such sibling exists.
+     */
+    public DetailAST getPreviousSibling()
+    {
+        return mPreviousSibling;
+    }
+
+    /**
+     * Returns the first child token that makes a specified type.
+     * @param aType the token type to match
+     * @return the matching token, or null if no match
+     */
+    public DetailAST findFirstToken(int aType)
+    {
+        DetailAST retVal = null;
+        for (DetailAST i = getFirstChild(); i != null; i = i.getNextSibling()) {
+            if (i.getType() == aType) {
+                retVal = i;
+                break;
+            }
+        }
+        return retVal;
+    }
+
+    @Override
+    public String toString()
+    {
+        return super.toString() + "[" + getLineNo() + "x" + getColumnNo() + "]";
+    }
+
+    @Override
+    public DetailAST getNextSibling()
+    {
+        return (DetailAST) super.getNextSibling();
+    }
+
+    @Override
+    public DetailAST getFirstChild()
+    {
+        return (DetailAST) super.getFirstChild();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/FastStack.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/FastStack.java
new file mode 100644
index 0000000..19fd292
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/FastStack.java
@@ -0,0 +1,140 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import com.google.common.collect.Lists;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Simple implementation of a LIFO Stack that can be used instead of
+ * {@link java.util.Vector} which is <tt>synchronized</tt>.
+ * @author oliverb
+ * @param <E> The type to hold.
+ */
+public class FastStack<E> implements Iterable<E>
+{
+    /** Hold the entries in the stack. */
+    private final List<E> mEntries = Lists.newArrayList();
+
+    /**
+     * Pushes the supplied element onto the stack.
+     * @param aElement the element to push onto the stack.
+     */
+    public void push(E aElement)
+    {
+        mEntries.add(aElement);
+    }
+
+    /**
+     * Returns whether the stack is empty.
+     * @return whether the stack is empty.
+     */
+    public boolean isEmpty()
+    {
+        return mEntries.isEmpty();
+    }
+
+    /**
+     * Returns the number of entries in the stack.
+     * @return the number of entries in the stack.
+     */
+    public int size()
+    {
+        return mEntries.size();
+    }
+
+    /**
+     * Returns the entry at the top of the stack without removing it.
+     * @return the top entry
+     * @throws IllegalStateException if the stack is empty.
+     */
+    public E peek()
+    {
+        if (mEntries.isEmpty()) {
+            throw new IllegalStateException("FastStack is empty");
+        }
+        return mEntries.get(mEntries.size() - 1);
+    }
+
+    /**
+     * Returns the entry at the top of the stack by removing it.
+     * @return the top entry
+     * @throws IllegalStateException if the stack is empty.
+     */
+    public E pop()
+    {
+        if (mEntries.isEmpty()) {
+            throw new IllegalStateException("FastStack is empty");
+        }
+        return mEntries.remove(mEntries.size() - 1);
+    }
+
+    /**
+     * Return the element at the specified index. It does not remove the
+     * element from the stack.
+     * @param aIndex the index to return
+     * @return the element at the index
+     * @throws IllegalArgumentException if index out of range
+     */
+    public E peek(int aIndex)
+    {
+        if ((aIndex < 0) || (aIndex >= mEntries.size())) {
+            throw new IllegalArgumentException("index out of range.");
+        }
+        return mEntries.get(aIndex);
+    }
+
+    /**
+     * Returns if the stack contains the specified element.
+     * @param aElement the element to find
+     * @return whether the stack contains the entry
+     */
+    public boolean contains(E aElement)
+    {
+        return mEntries.contains(aElement);
+    }
+
+    /**
+     * Clears the stack.
+     */
+    public void clear()
+    {
+        mEntries.clear();
+    }
+
+    /**
+     * Returns an iterator that goes from the oldest element to the newest.
+     * @return an iterator
+     */
+    public Iterator<E> iterator()
+    {
+        return mEntries.iterator();
+    }
+
+    /**
+     * Factory method to create a new instance.
+     * @param <T> the type of elements to hold in the stack.
+     * @return a new instance of {@link FastStack}
+     */
+    public static <T> FastStack<T> newInstance()
+    {
+        return new FastStack<T>();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java
new file mode 100644
index 0000000..cff966d
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/FileContents.java
@@ -0,0 +1,326 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import com.google.common.collect.ImmutableMap;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.puppycrawl.tools.checkstyle.grammars.CommentListener;
+import java.io.File;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Pattern;
+
+/**
+ * Represents the contents of a file.
+ *
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public final class FileContents implements CommentListener
+{
+    /**
+     * the pattern to match a single line comment containing only the comment
+     * itself -- no code.
+     */
+    private static final String MATCH_SINGLELINE_COMMENT_PAT = "^\\s*//.*$";
+    /** compiled regexp to match a single-line comment line */
+    private static final Pattern MATCH_SINGLELINE_COMMENT = Pattern
+            .compile(MATCH_SINGLELINE_COMMENT_PAT);
+
+    /** the file name */
+    private final String mFilename;
+
+    /** the text */
+    private final FileText mText;
+
+    /** map of the Javadoc comments indexed on the last line of the comment.
+     * The hack is it assumes that there is only one Javadoc comment per line.
+     */
+    private final Map<Integer, TextBlock> mJavadocComments = Maps.newHashMap();
+    /** map of the C++ comments indexed on the first line of the comment. */
+    private final Map<Integer, TextBlock> mCPlusPlusComments =
+        Maps.newHashMap();
+
+    /**
+     * map of the C comments indexed on the first line of the comment to a list
+     * of comments on that line
+     */
+    private final Map<Integer, List<TextBlock>> mCComments = Maps.newHashMap();
+
+    /**
+     * Creates a new <code>FileContents</code> instance.
+     *
+     * @param aFilename name of the file
+     * @param aLines the contents of the file
+     * @deprecated Use {@link #FileContents(FileText)} instead
+     *   in order to preserve the original line breaks where possible.
+     */
+    @Deprecated public FileContents(String aFilename, String[] aLines)
+    {
+        mFilename = aFilename;
+        mText = FileText.fromLines(new File(aFilename), Arrays.asList(aLines));
+    }
+
+    /**
+     * Creates a new <code>FileContents</code> instance.
+     *
+     * @param aText the contents of the file
+     */
+    public FileContents(FileText aText)
+    {
+        mFilename = aText.getFile().toString();
+        mText = aText;
+    }
+
+    /** {@inheritDoc} */
+    public void reportSingleLineComment(String aType, int aStartLineNo,
+            int aStartColNo)
+    {
+        reportCppComment(aStartLineNo, aStartColNo);
+    }
+
+    /** {@inheritDoc} */
+    public void reportBlockComment(String aType, int aStartLineNo,
+            int aStartColNo, int aEndLineNo, int aEndColNo)
+    {
+        reportCComment(aStartLineNo, aStartColNo, aEndLineNo, aEndColNo);
+    }
+
+    /**
+     * Report the location of a C++ style comment.
+     * @param aStartLineNo the starting line number
+     * @param aStartColNo the starting column number
+     **/
+    public void reportCppComment(int aStartLineNo, int aStartColNo)
+    {
+        final String line = line(aStartLineNo - 1);
+        final String[] txt = new String[] {line.substring(aStartColNo)};
+        final Comment comment = new Comment(txt, aStartColNo, aStartLineNo,
+                line.length() - 1);
+        mCPlusPlusComments.put(aStartLineNo, comment);
+    }
+
+    /**
+     * Returns a map of all the C++ style comments. The key is a line number,
+     * the value is the comment {@link TextBlock} at the line.
+     * @return the Map of comments
+     */
+    public ImmutableMap<Integer, TextBlock> getCppComments()
+    {
+        return ImmutableMap.copyOf(mCPlusPlusComments);
+    }
+
+    /**
+     * Report the location of a C-style comment.
+     * @param aStartLineNo the starting line number
+     * @param aStartColNo the starting column number
+     * @param aEndLineNo the ending line number
+     * @param aEndColNo the ending column number
+     **/
+    public void reportCComment(int aStartLineNo, int aStartColNo,
+            int aEndLineNo, int aEndColNo)
+    {
+        final String[] cc = extractCComment(aStartLineNo, aStartColNo,
+                aEndLineNo, aEndColNo);
+        final Comment comment = new Comment(cc, aStartColNo, aEndLineNo,
+                aEndColNo);
+
+        // save the comment
+        if (mCComments.containsKey(aStartLineNo)) {
+            final List<TextBlock> entries = mCComments.get(aStartLineNo);
+            entries.add(comment);
+        }
+        else {
+            final List<TextBlock> entries = Lists.newArrayList();
+            entries.add(comment);
+            mCComments.put(aStartLineNo, entries);
+        }
+
+        // Remember if possible Javadoc comment
+        if (line(aStartLineNo - 1).indexOf("/**", aStartColNo) != -1) {
+            mJavadocComments.put(aEndLineNo - 1, comment);
+        }
+    }
+
+    /**
+     * Returns a map of all C style comments. The key is the line number, the
+     * value is a {@link List} of C style comment {@link TextBlock}s
+     * that start at that line.
+     * @return the map of comments
+     */
+    public ImmutableMap<Integer, List<TextBlock>> getCComments()
+    {
+        return ImmutableMap.copyOf(mCComments);
+    }
+
+    /**
+     * Returns the specified C comment as a String array.
+     * @return C comment as a array
+     * @param aStartLineNo the starting line number
+     * @param aStartColNo the starting column number
+     * @param aEndLineNo the ending line number
+     * @param aEndColNo the ending column number
+     **/
+    private String[] extractCComment(int aStartLineNo, int aStartColNo,
+            int aEndLineNo, int aEndColNo)
+    {
+        String[] retVal;
+        if (aStartLineNo == aEndLineNo) {
+            retVal = new String[1];
+            retVal[0] = line(aStartLineNo - 1).substring(aStartColNo,
+                    aEndColNo + 1);
+        }
+        else {
+            retVal = new String[aEndLineNo - aStartLineNo + 1];
+            retVal[0] = line(aStartLineNo - 1).substring(aStartColNo);
+            for (int i = aStartLineNo; i < aEndLineNo; i++) {
+                retVal[i - aStartLineNo + 1] = line(i);
+            }
+            retVal[retVal.length - 1] = line(aEndLineNo - 1).substring(0,
+                    aEndColNo + 1);
+        }
+        return retVal;
+    }
+
+    /**
+     * Returns the Javadoc comment before the specified line.
+     * A return value of <code>null</code> means there is no such comment.
+     * @return the Javadoc comment, or <code>null</code> if none
+     * @param aLineNo the line number to check before
+     **/
+    public TextBlock getJavadocBefore(int aLineNo)
+    {
+        // Lines start at 1 to the callers perspective, so need to take off 2
+        int lineNo = aLineNo - 2;
+
+        // skip blank lines
+        while ((lineNo > 0) && (lineIsBlank(lineNo) || lineIsComment(lineNo))) {
+            lineNo--;
+        }
+
+        return mJavadocComments.get(lineNo);
+    }
+
+    /**
+     * Get a single line.
+     * For internal use only, as getText().get(lineNo) is just as
+     * suitable for external use and avoids method duplication.
+     * @param aLineNo the number of the line to get
+     * @return the corresponding line, without terminator
+     * @throws IndexOutOfBoundsException if lineNo is invalid
+     */
+    private String line(int aLineNo)
+    {
+        return mText.get(aLineNo);
+    }
+
+    /**
+     * Get the full text of the file.
+     * @return an object containing the full text of the file
+     */
+    public FileText getText()
+    {
+        return mText;
+    }
+
+    /** @return the lines in the file */
+    public String[] getLines()
+    {
+        return mText.toLinesArray();
+    }
+
+    /** @return the name of the file */
+    public String getFilename()
+    {
+        return mFilename;
+    }
+
+    /**
+     * Checks if the specified line is blank.
+     * @param aLineNo the line number to check
+     * @return if the specified line consists only of tabs and spaces.
+     **/
+    public boolean lineIsBlank(int aLineNo)
+    {
+        // possible improvement: avoid garbage creation in trim()
+        return "".equals(line(aLineNo).trim());
+    }
+
+    /**
+     * Checks if the specified line is a single-line comment without code.
+     * @param aLineNo  the line number to check
+     * @return if the specified line consists of only a single line comment
+     *         without code.
+     **/
+    public boolean lineIsComment(int aLineNo)
+    {
+        return MATCH_SINGLELINE_COMMENT.matcher(line(aLineNo)).matches();
+    }
+
+    /**
+     * Checks if the specified position intersects with a comment.
+     * @param aStartLineNo the starting line number
+     * @param aStartColNo the starting column number
+     * @param aEndLineNo the ending line number
+     * @param aEndColNo the ending column number
+     * @return true if the positions intersects with a comment.
+     **/
+    public boolean hasIntersectionWithComment(int aStartLineNo,
+            int aStartColNo, int aEndLineNo, int aEndColNo)
+    {
+        // Check C comments (all comments should be checked)
+        final Collection<List<TextBlock>> values = mCComments.values();
+        for (final List<TextBlock> row : values) {
+            for (final TextBlock comment : row) {
+                if (comment.intersects(aStartLineNo, aStartColNo, aEndLineNo,
+                        aEndColNo))
+                {
+                    return true;
+                }
+            }
+        }
+
+        // Check CPP comments (line searching is possible)
+        for (int lineNumber = aStartLineNo; lineNumber <= aEndLineNo;
+             lineNumber++)
+        {
+            final TextBlock comment = mCPlusPlusComments.get(lineNumber);
+            if ((comment != null)
+                    && comment.intersects(aStartLineNo, aStartColNo,
+                            aEndLineNo, aEndColNo))
+            {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Checks if the current file is a package-info.java file.
+     * @return true if the package file.
+     */
+    public boolean inPackageInfo()
+    {
+        return this.getFilename().endsWith("package-info.java");
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/FileSetCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/FileSetCheck.java
new file mode 100644
index 0000000..da5a43f
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/FileSetCheck.java
@@ -0,0 +1,82 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import java.io.File;
+import java.util.List;
+import java.util.TreeSet;
+
+/**
+ * Interface for Checking a set of files for some criteria.
+ *
+ * @author lkuehne
+ * @author oliver
+ */
+public interface FileSetCheck
+    extends Configurable, Contextualizable
+{
+    /**
+     * Sets the MessageDispatcher that is used to dispatch error
+     * messages to AuditListeners during processing.
+     * @param aDispatcher the dispatcher
+     */
+    void setMessageDispatcher(MessageDispatcher aDispatcher);
+
+    /**
+     * Initialise the instance. This is the time to verify that everything
+     * required to perform it job.
+     */
+    void init();
+
+    /** Cleans up the object. **/
+    void destroy();
+
+    /**
+     * Called when about to be called to process a set of files.
+     * @param aCharset the character set used to read the files.
+     */
+    void beginProcessing(String aCharset);
+
+    /**
+     * Request to process a file. The implementation should use the supplied
+     * contents and not read the contents again. This reduces the amount of
+     * file I/O.
+     * <p>
+     * The file set to process might contain files that are not
+     * interesting to the FileSetCheck. Such files should be ignored,
+     * no error message should be fired for them. For example a FileSetCheck
+     * that checks java files should ignore HTML or properties files.
+     * </p>
+     * <p>
+     * The method should return the set of messages to be logged.
+     * </p>
+     *
+     * @param aFile the file to be processed
+     * @param aLines an immutable list of the contents of the file.
+     * @return the list of messages to be logged.
+     */
+    TreeSet<LocalizedMessage> process(File aFile, List<String> aLines);
+
+    /**
+     * Called when all the files have been processed. This is the time to
+     * perform any checks that need to be done across a set of files. In this
+     * method, the implementation is responsible for the logging of messages.
+     */
+    void finishProcessing();
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java
new file mode 100644
index 0000000..c4506d6
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/FileText.java
@@ -0,0 +1,359 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.UnsupportedEncodingException;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetDecoder;
+import java.nio.charset.CodingErrorAction;
+import java.nio.charset.UnsupportedCharsetException;
+import java.util.AbstractList;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.ConcurrentModificationException;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Represents the text contents of a file of arbitrary plain text type.
+ * <p>
+ * This class will be passed to instances of class FileSetCheck by
+ * Checker. It implements a string list to ensure backwards
+ * compatibility, but can be extended in the future to allow more
+ * flexible, more powerful or more efficient handling of certain
+ * situations.
+ * </p>
+ *
+ * @author Martin von Gagern
+ */
+public final class FileText extends AbstractList<String>
+{
+
+    /**
+     * The number of characters to read in one go.
+     */
+    private static final int READ_BUFFER_SIZE = 1024;
+
+    /**
+     * Regular expression pattern matching all line terminators.
+     */
+    private static final Pattern LINE_TERMINATOR =
+        Utils.getPattern("\\n|\\r\\n?");
+
+    // For now, we always keep both full text and lines array.
+    // In the long run, however, the one passed at initialization might be
+    // enough, while the other could be lazily created when requested.
+    // This would save memory but cost CPU cycles.
+
+    /**
+     * The name of the file.
+     * <code>null</code> if no file name is available for whatever reason.
+     */
+    private final File mFile;
+
+    /**
+     * The charset used to read the file.
+     * <code>null</code> if the file was reconstructed from a list of lines.
+     */
+    private final Charset mCharset;
+
+    /**
+     * The full text contents of the file.
+     */
+    private final String mFullText;
+
+    /**
+     * The lines of the file, without terminators.
+     */
+    private final String[] mLines;
+
+    /**
+     * The first position of each line within the full text.
+     */
+    private int[] mLineBreaks;
+
+    /**
+     * Creates a new file text representation.
+     *
+     * The file will be read using the specified encoding, replacing
+     * malformed input and unmappable characters with the default
+     * replacement character.
+     *
+     * @param aFile the name of the file
+     * @param aCharsetName the encoding to use when reading the file
+     * @throws NullPointerException if the text is null
+     * @throws IOException if the file could not be read
+     */
+    public FileText(File aFile, String aCharsetName) throws IOException
+    {
+        mFile = aFile;
+
+        // We use our own decoder, to be sure we have complete control
+        // about replacements.
+        final CharsetDecoder decoder;
+        try {
+            mCharset = Charset.forName(aCharsetName);
+            decoder = mCharset.newDecoder();
+            decoder.onMalformedInput(CodingErrorAction.REPLACE);
+            decoder.onUnmappableCharacter(CodingErrorAction.REPLACE);
+        }
+        catch (final UnsupportedCharsetException ex) {
+            final String message = "Unsupported charset: " + aCharsetName;
+            final UnsupportedEncodingException ex2;
+            ex2 = new UnsupportedEncodingException(message);
+            ex2.initCause(ex);
+            throw ex2;
+        }
+
+        final char[] chars = new char[READ_BUFFER_SIZE];
+        final StringBuilder buf = new StringBuilder();
+        final FileInputStream stream = new FileInputStream(aFile);
+        final Reader reader = new InputStreamReader(stream, decoder);
+        try {
+            while (true) {
+                final int len = reader.read(chars);
+                if (len < 0) {
+                    break;
+                }
+                buf.append(chars, 0, len);
+            }
+        }
+        finally {
+            Utils.closeQuietly(reader);
+        }
+        // buf.trimToSize(); // could be used instead of toString().
+        mFullText = buf.toString();
+
+        // Use the BufferedReader to break down the lines as this
+        // is about 30% faster than using the
+        // LINE_TERMINATOR.split(mFullText, -1) method
+        final ArrayList<String> lines = new ArrayList<String>();
+        final BufferedReader br =
+            new BufferedReader(new StringReader(mFullText));
+        for (;;) {
+            final String l = br.readLine();
+            if (null == l) {
+                break;
+            }
+            lines.add(l);
+        }
+        mLines = lines.toArray(new String[lines.size()]);
+    }
+
+    /**
+     * Compatibility constructor.
+     *
+     * This constructor reconstructs the text of the file by joining
+     * lines with linefeed characters. This process does not restore
+     * the original line terminators and should therefore be avoided.
+     *
+     * @param aFile the name of the file
+     * @param aLines the lines of the text, without terminators
+     * @throws NullPointerException if the lines array is null
+     */
+    private FileText(File aFile, List<String> aLines)
+    {
+        final StringBuilder buf = new StringBuilder();
+        for (final String line : aLines) {
+            buf.append(line).append('\n');
+        }
+        buf.trimToSize();
+
+        mFile = aFile;
+        mCharset = null;
+        mFullText = buf.toString();
+        mLines = aLines.toArray(new String[aLines.size()]);
+    }
+
+    /**
+     * Compatibility conversion.
+     *
+     * This method can be used to convert the arguments passed to
+     * {@link FileSetCheck#process(File,List)} to a FileText
+     * object. If the list of lines already is a FileText, it is
+     * returned as is. Otherwise, a new FileText is constructed by
+     * joining the lines using line feed characters.
+     *
+     * @param aFile the name of the file
+     * @param aLines the lines of the text, without terminators
+     * @return an object representing the denoted text file
+     */
+    public static FileText fromLines(File aFile, List<String> aLines)
+    {
+        return (aLines instanceof FileText)
+            ? (FileText) aLines
+            : new FileText(aFile, aLines);
+    }
+
+    /**
+     * Get the name of the file.
+     * @return an object containing the name of the file
+     */
+    public File getFile()
+    {
+        return mFile;
+    }
+
+    /**
+     * Get the character set which was used to read the file.
+     * Will be <code>null</code> for a file reconstructed from its lines.
+     * @return the charset used when the file was read
+     */
+    public Charset getCharset()
+    {
+        return mCharset;
+    }
+
+    /**
+     * Get the binary contents of the file.
+     * The returned object must not be modified.
+     * @return a buffer containing the bytes making up the file
+     * @throws IOException if the bytes could not be read from the file
+     */
+    public ByteBuffer getBytes() throws IOException
+    {
+        // We might decide to cache file bytes in the future.
+        if (mFile == null) {
+            return null;
+        }
+        if (mFile.length() > Integer.MAX_VALUE) {
+            throw new IOException("File too large.");
+        }
+        byte[] bytes = new byte[(int) mFile.length() + 1];
+        final FileInputStream stream = new FileInputStream(mFile);
+        try {
+            int fill = 0;
+            while (true) {
+                if (fill >= bytes.length) {
+                    // shouldn't happen, but it might nevertheless
+                    final byte[] newBytes = new byte[bytes.length * 2 + 1];
+                    System.arraycopy(bytes, 0, newBytes, 0, fill);
+                    bytes = newBytes;
+                }
+                final int len = stream.read(bytes, fill,
+                                            bytes.length - fill);
+                if (len == -1) {
+                    break;
+                }
+                fill += len;
+            }
+            return ByteBuffer.wrap(bytes, 0, fill).asReadOnlyBuffer();
+        }
+        finally {
+            Utils.closeQuietly(stream);
+        }
+    }
+
+    /**
+     * Retrieve the full text of the file.
+     * @return the full text of the file
+     */
+    public CharSequence getFullText()
+    {
+        return mFullText;
+    }
+
+    /**
+     * Returns an array of all lines.
+     * {@code text.toLinesArray()} is equivalent to
+     * {@code text.toArray(new String[text.size()])}.
+     * @return an array of all lines of the text
+     */
+    public String[] toLinesArray()
+    {
+        return mLines.clone();
+    }
+
+    /**
+     * Find positions of line breaks in the full text.
+     * @return an array giving the first positions of each line.
+     */
+    private int[] lineBreaks()
+    {
+        if (mLineBreaks == null) {
+            final int[] lineBreaks = new int[size() + 1];
+            lineBreaks[0] = 0;
+            int lineNo = 1;
+            final Matcher matcher = LINE_TERMINATOR.matcher(mFullText);
+            while (matcher.find()) {
+                lineBreaks[lineNo++] = matcher.end();
+            }
+            if (lineNo < lineBreaks.length) {
+                lineBreaks[lineNo++] = mFullText.length();
+            }
+            if (lineNo != lineBreaks.length) {
+                throw new ConcurrentModificationException("Text changed.");
+            }
+            mLineBreaks = lineBreaks;
+        }
+        return mLineBreaks;
+    }
+
+    /**
+     * Determine line and column numbers in full text.
+     * @param aPos the character position in the full text
+     * @return the line and column numbers of this character
+     */
+    public LineColumn lineColumn(int aPos)
+    {
+        final int[] lineBreaks = lineBreaks();
+        int lineNo = Arrays.binarySearch(lineBreaks, aPos);
+        if (lineNo < 0) {
+            // we have: lineNo = -(insertion point) - 1
+            // we want: lineNo =  (insertion point) - 1
+            lineNo = -lineNo - 2;
+        }
+        final int startOfLine = lineBreaks[lineNo];
+        final int columnNo = aPos - startOfLine;
+        // now we have lineNo and columnNo, both starting at zero.
+        return new LineColumn(lineNo + 1, columnNo);
+    }
+
+    /**
+     * Retrieves a line of the text by its number.
+     * The returned line will not contain a trailing terminator.
+     * @param aLineNo the number of the line to get, starting at zero
+     * @return the line with the given number
+     */
+    @Override
+    public String get(final int aLineNo)
+    {
+        return mLines[aLineNo];
+    }
+
+    /**
+     * Counts the lines of the text.
+     * @return the number of lines in the text
+     */
+    @Override
+    public int size()
+    {
+        return mLines.length;
+    }
+
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/Filter.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/Filter.java
new file mode 100644
index 0000000..bac327b
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/Filter.java
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+/**
+ * An interface for filtering AuditEvents.
+ * @author Rick Giles
+ */
+public interface Filter
+
+{
+    /**
+     * Determines whether or not a filtered AuditEvent is accepted.
+     * @param aEvent the AudtiEvent to filter.
+     * @return true if the aEvent is accepted.
+     */
+    boolean accept(AuditEvent aEvent);
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/FilterSet.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/FilterSet.java
new file mode 100644
index 0000000..0251cf6
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/FilterSet.java
@@ -0,0 +1,101 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import com.google.common.collect.Sets;
+import java.util.Set;
+
+/**
+ * A filter set applies filters to AuditEvents.
+ * If a filter in the set rejects an AuditEvent, then the
+ * AuditEvent is rejected. Otherwise, the AuditEvent is accepted.
+ * @author Rick Giles
+ */
+public class FilterSet
+    implements Filter
+{
+    /** filter set */
+    private final Set<Filter> mFilters = Sets.newHashSet();
+
+    /**
+     * Adds a Filter to the set.
+     * @param aFilter the Filter to add.
+     */
+    public void addFilter(Filter aFilter)
+    {
+        mFilters.add(aFilter);
+    }
+
+    /**
+     * Removes filter.
+     * @param aFilter filter to remove.
+     */
+    public void removeFilter(Filter aFilter)
+    {
+        mFilters.remove(aFilter);
+    }
+
+    /**
+     * Returns the Filters of the filter set.
+     * @return the Filters of the filter set.
+     */
+    protected Set<Filter> getFilters()
+    {
+        return mFilters;
+    }
+
+    @Override
+    public String toString()
+    {
+        return mFilters.toString();
+    }
+
+    @Override
+    public int hashCode()
+    {
+        return mFilters.hashCode();
+    }
+
+    @Override
+    public boolean equals(Object aObject)
+    {
+        if (aObject instanceof FilterSet) {
+            final FilterSet other = (FilterSet) aObject;
+            return this.mFilters.equals(other.mFilters);
+        }
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    public boolean accept(AuditEvent aEvent)
+    {
+        for (Filter filter : mFilters) {
+            if (!filter.accept(aEvent)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /** Clears the FilterSet. */
+    public void clear()
+    {
+        mFilters.clear();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/FullIdent.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/FullIdent.java
new file mode 100644
index 0000000..695329e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/FullIdent.java
@@ -0,0 +1,151 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+/**
+ * Represents a full identifier, including dots, with associated
+ * position information.
+ *
+ * <p>
+ * Identifiers such as <code>java.util.HashMap</code> are spread across
+ * multiple AST nodes in the syntax tree (three IDENT nodes, two DOT nodes).
+ * A FullIdent represents the whole String (excluding any intermediate
+ * whitespace), which is often easier to work with in Checks.
+ * </p>
+ *
+ * @author Oliver Burn
+ * @see TokenTypes#DOT
+ * @see TokenTypes#IDENT
+ **/
+public final class FullIdent
+{
+    /** the string **/
+    private final StringBuffer mBuffer = new StringBuffer();
+    /** the line number **/
+    private int mLineNo;
+    /** the column number **/
+    private int mColNo;
+
+    /** hide default constructor */
+    private FullIdent()
+    {
+    }
+
+    /** @return the text **/
+    public String getText()
+    {
+        return mBuffer.toString();
+    }
+
+    /** @return the line number **/
+    public int getLineNo()
+    {
+        return mLineNo;
+    }
+
+    /** @return the column number **/
+    public int getColumnNo()
+    {
+        return mColNo;
+    }
+
+    /**
+     * Append the specified text.
+     * @param aText the text to append
+     */
+    private void append(String aText)
+    {
+        mBuffer.append(aText);
+    }
+
+    /**
+     * Append the specified token and also recalibrate the first line and
+     * column.
+     * @param aAST the token to append
+     */
+    private void append(DetailAST aAST)
+    {
+        mBuffer.append(aAST.getText());
+        if (mLineNo == 0) {
+            mLineNo = aAST.getLineNo();
+        }
+        else if (aAST.getLineNo() > 0) {
+            mLineNo = Math.min(mLineNo, aAST.getLineNo());
+        }
+        // TODO: make a function
+        if (mColNo == 0) {
+            mColNo = aAST.getColumnNo();
+        }
+        else if (aAST.getColumnNo() > 0) {
+            mColNo = Math.min(mColNo, aAST.getColumnNo());
+        }
+    }
+
+    /**
+     * Creates a new FullIdent starting from the specified node.
+     * @param aAST the node to start from
+     * @return a <code>FullIdent</code> value
+     */
+    public static FullIdent createFullIdent(DetailAST aAST)
+    {
+        final FullIdent fi = new FullIdent();
+        extractFullIdent(fi, aAST);
+        return fi;
+    }
+
+    /**
+     * Creates a new FullIdent starting from the child of the specified node.
+     * @param aAST the parent node from where to start from
+     * @return a <code>FullIdent</code> value
+     */
+    public static FullIdent createFullIdentBelow(DetailAST aAST)
+    {
+        return createFullIdent(aAST.getFirstChild());
+    }
+
+    /**
+     * Recursively extract a FullIdent.
+     *
+     * @param aFull the FullIdent to add to
+     * @param aAST the node to recurse from
+     */
+    private static void extractFullIdent(FullIdent aFull, DetailAST aAST)
+    {
+        if (aAST == null) {
+            return;
+        }
+
+        if (aAST.getType() == TokenTypes.DOT) {
+            extractFullIdent(aFull, aAST.getFirstChild());
+            aFull.append(".");
+            extractFullIdent(
+                aFull, aAST.getFirstChild().getNextSibling());
+        }
+        else {
+            aFull.append(aAST);
+        }
+    }
+
+    @Override
+    public String toString()
+    {
+        return getText() + "[" + getLineNo() + "x" + getColumnNo() + "]";
+    }
+
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocTagInfo.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocTagInfo.java
new file mode 100644
index 0000000..bc4c082
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocTagInfo.java
@@ -0,0 +1,644 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import com.google.common.collect.ImmutableMap;
+import java.util.Map;
+
+/**
+ * This enum defines the various Javadoc tags and there properties.
+ *
+ * <p>
+ * This class was modeled after documentation located at
+ * <a href="http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html">
+ * javadoc</a>
+ *
+ * and
+ *
+ * <a href="http://java.sun.com/j2se/javadoc/writingdoccomments/index.html">
+ * how to write</a>.
+ * </p>
+ *
+ * <p>
+ * Some of this documentation was a little incomplete (ex: valid placement of
+ * code, value, and literal tags).
+ * </p>
+ *
+ * <p>
+ * Whenever an inconsistency was found the author's judgment was used.
+ * </p>
+ *
+ * <p>
+ * For now, the number of required/optional tag arguments are not included
+ * because some Javadoc tags have very complex rules for determining this
+ * (ex: {@code {@value}} tag).
+ * </p>
+ *
+ * <p>
+ * Also, the {@link #isValidOn(DetailAST) isValidOn} method does not consider
+ * classes defined in a local code block (method, init block, etc.).
+ * </p>
+ *
+ * @author Travis Schneeberger
+ */
+public enum JavadocTagInfo
+{
+    /**
+     * {@code @author}.
+     */
+    AUTHOR("@author", "author", Type.BLOCK, true, true)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            return type == TokenTypes.PACKAGE_DEF
+                || type == TokenTypes.CLASS_DEF
+                || type == TokenTypes.INTERFACE_DEF
+                || type == TokenTypes.ENUM_DEF
+                || type == TokenTypes.ANNOTATION_DEF;
+        }
+    },
+
+    /**
+     * {@code {@code}}.
+     */
+    CODE("{@code}", "code", Type.INLINE, true, true)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            return type == TokenTypes.PACKAGE_DEF
+                || type == TokenTypes.CLASS_DEF
+                || type == TokenTypes.INTERFACE_DEF
+                || type == TokenTypes.ENUM_DEF
+                || type == TokenTypes.ANNOTATION_DEF
+                || type == TokenTypes.METHOD_DEF
+                || type == TokenTypes.CTOR_DEF
+                || (type == TokenTypes.VARIABLE_DEF
+                && !ScopeUtils.isLocalVariableDef(aAst));
+        }
+    },
+
+    /**
+     * {@code {@docRoot}}.
+     */
+    DOC_ROOT("{@docRoot}", "docRoot", Type.INLINE, true, true)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            return type == TokenTypes.PACKAGE_DEF
+                || type == TokenTypes.CLASS_DEF
+                || type == TokenTypes.INTERFACE_DEF
+                || type == TokenTypes.ENUM_DEF
+                || type == TokenTypes.ANNOTATION_DEF
+                || type == TokenTypes.METHOD_DEF || type == TokenTypes.CTOR_DEF
+                || (type == TokenTypes.VARIABLE_DEF
+                && !ScopeUtils.isLocalVariableDef(aAst));
+        }
+    },
+
+    /**
+     * {@code @deprecated}.
+     */
+    DEPRECATED("@deprecated", "deprecated", Type.BLOCK, false, false)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            return type == TokenTypes.CLASS_DEF
+                || type == TokenTypes.INTERFACE_DEF
+                || type == TokenTypes.ENUM_DEF
+                || type == TokenTypes.ANNOTATION_DEF
+                || type == TokenTypes.METHOD_DEF
+                || type == TokenTypes.CTOR_DEF
+                || type == TokenTypes.ENUM_CONSTANT_DEF
+                || type == TokenTypes.ANNOTATION_FIELD_DEF
+                || (type == TokenTypes.VARIABLE_DEF
+                && !ScopeUtils.isLocalVariableDef(aAst));
+        }
+    },
+
+    /**
+     * {@code @exception}.
+     */
+    EXCEPTION("@exception", "exception", Type.BLOCK, false, false)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            return type == TokenTypes.METHOD_DEF || type == TokenTypes.CTOR_DEF;
+        }
+    },
+
+    /**
+     * {@code {@inheritDoc}}.
+     */
+    INHERIT_DOC("{@inheritDoc}", "inheritDoc", Type.INLINE, false, false)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+
+            return type == TokenTypes.METHOD_DEF
+                && !aAst.branchContains(TokenTypes.LITERAL_STATIC)
+                && ScopeUtils.getScopeFromMods(aAst
+                    .findFirstToken(TokenTypes.MODIFIERS)) != Scope.PRIVATE;
+        }
+    },
+
+    /**
+     * {@code {@link}}.
+     */
+    LINK("{@link}", "link", Type.INLINE, true, true)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            return type == TokenTypes.PACKAGE_DEF
+                || type == TokenTypes.CLASS_DEF
+                || type == TokenTypes.INTERFACE_DEF
+                || type == TokenTypes.ENUM_DEF
+                || type == TokenTypes.ANNOTATION_DEF
+                || type == TokenTypes.METHOD_DEF || type == TokenTypes.CTOR_DEF
+                || (type == TokenTypes.VARIABLE_DEF
+                && !ScopeUtils.isLocalVariableDef(aAst));
+        }
+    },
+
+    /**
+     * {@code {@linkplain}}.
+     */
+    LINKPLAIN("{@linkplain}", "linkplain", Type.INLINE, true, true)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            return type == TokenTypes.PACKAGE_DEF
+                || type == TokenTypes.CLASS_DEF
+                || type == TokenTypes.INTERFACE_DEF
+                || type == TokenTypes.ENUM_DEF
+                || type == TokenTypes.ANNOTATION_DEF
+                || type == TokenTypes.METHOD_DEF || type == TokenTypes.CTOR_DEF
+                || (type == TokenTypes.VARIABLE_DEF
+                && !ScopeUtils.isLocalVariableDef(aAst));
+        }
+    },
+
+    /**
+     * {@code {@literal}}.
+     */
+    LITERAL("{@literal}", "literal", Type.INLINE, true, true)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            return type == TokenTypes.PACKAGE_DEF
+                || type == TokenTypes.CLASS_DEF
+                || type == TokenTypes.INTERFACE_DEF
+                || type == TokenTypes.ENUM_DEF
+                || type == TokenTypes.ANNOTATION_DEF
+                || type == TokenTypes.METHOD_DEF || type == TokenTypes.CTOR_DEF
+                || (type == TokenTypes.VARIABLE_DEF
+                && !ScopeUtils.isLocalVariableDef(aAst));
+        }
+    },
+
+    /**
+     * {@code @param}.
+     */
+    PARAM("@param", "param", Type.BLOCK, false, false)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            return type == TokenTypes.CLASS_DEF
+                || type == TokenTypes.INTERFACE_DEF
+                || type == TokenTypes.METHOD_DEF
+                || type == TokenTypes.CTOR_DEF;
+        }
+    },
+
+    /**
+     * {@code @return}.
+     */
+    RETURN("@return", "return", Type.BLOCK, false, false)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            final DetailAST returnType = aAst.findFirstToken(TokenTypes.TYPE);
+
+            return type == TokenTypes.METHOD_DEF
+                && returnType.getFirstChild().getType()
+                != TokenTypes.LITERAL_VOID;
+
+        }
+    },
+
+    /**
+     * {@code @see}.
+     */
+    SEE("@see", "see", Type.BLOCK, true, true)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            return type == TokenTypes.PACKAGE_DEF
+                || type == TokenTypes.CLASS_DEF
+                || type == TokenTypes.INTERFACE_DEF
+                || type == TokenTypes.ENUM_DEF
+                || type == TokenTypes.ANNOTATION_DEF
+                || type == TokenTypes.METHOD_DEF
+                || type == TokenTypes.CTOR_DEF
+                || (type == TokenTypes.VARIABLE_DEF
+                && !ScopeUtils.isLocalVariableDef(aAst));
+        }
+    },
+
+    /**
+     * {@code @serial}.
+     */
+    SERIAL("@serial", "serial", Type.BLOCK, true, false)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+
+            return type == TokenTypes.VARIABLE_DEF
+                && !ScopeUtils.isLocalVariableDef(aAst);
+        }
+    },
+
+    /**
+     * {@code @serialData}.
+     */
+    SERIAL_DATA("@serialData", "serialData", Type.BLOCK, false, false)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            final DetailAST methodNameAst = aAst
+                .findFirstToken(TokenTypes.IDENT);
+            final String methodName = methodNameAst.getText();
+
+            return type == TokenTypes.METHOD_DEF
+                && ("writeObject".equals(methodName)
+                    || "readObject".equals(methodName)
+                    || "writeExternal".equals(methodName)
+                    || "readExternal".equals(methodName)
+                    || "writeReplace".equals(methodName)
+                    || "readResolve"
+                    .equals(methodName));
+        }
+    },
+
+    /**
+     * {@code @serialField}.
+     */
+    SERIAL_FIELD("@serialField", "serialField", Type.BLOCK, false, false)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            final DetailAST varType = aAst.findFirstToken(TokenTypes.TYPE);
+
+            return type == TokenTypes.VARIABLE_DEF
+                && varType.getType() == TokenTypes.ARRAY_DECLARATOR
+                && "ObjectStreamField"
+                    .equals(varType.getFirstChild().getText());
+        }
+    },
+
+    /**
+     * {@code @since}.
+     */
+    SINCE("@since", "since", Type.BLOCK, true, true)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            return type == TokenTypes.PACKAGE_DEF
+                || type == TokenTypes.CLASS_DEF
+                || type == TokenTypes.INTERFACE_DEF
+                || type == TokenTypes.ENUM_DEF
+                || type == TokenTypes.ANNOTATION_DEF
+                || type == TokenTypes.METHOD_DEF
+                || type == TokenTypes.CTOR_DEF
+                || (type == TokenTypes.VARIABLE_DEF
+                && !ScopeUtils.isLocalVariableDef(aAst));
+        }
+    },
+
+    /**
+     * {@code @throws}.
+     */
+    THROWS("@throws", "throws", Type.BLOCK, false, false)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            return type == TokenTypes.METHOD_DEF
+                || type == TokenTypes.CTOR_DEF;
+        }
+    },
+
+    /**
+     * {@code {@value}}.
+     */
+    VALUE("{@value}", "value", Type.INLINE, true, true)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            return type == TokenTypes.PACKAGE_DEF
+                || type == TokenTypes.CLASS_DEF
+                || type == TokenTypes.INTERFACE_DEF
+                || type == TokenTypes.ENUM_DEF
+                || type == TokenTypes.ANNOTATION_DEF
+                || type == TokenTypes.METHOD_DEF
+                || type == TokenTypes.CTOR_DEF
+                || (type == TokenTypes.VARIABLE_DEF
+                && !ScopeUtils.isLocalVariableDef(aAst));
+        }
+    },
+
+    /**
+     * {@code @version}.
+     */
+    VERSION("@version", "version", Type.BLOCK, true, true)
+    {
+        /** {@inheritDoc} */
+        @Override
+        public boolean isValidOn(final DetailAST aAst)
+        {
+            final int type = aAst.getType();
+            return type == TokenTypes.PACKAGE_DEF
+                || type == TokenTypes.CLASS_DEF
+                || type == TokenTypes.INTERFACE_DEF
+                || type == TokenTypes.ENUM_DEF
+                || type == TokenTypes.ANNOTATION_DEF;
+        }
+    };
+
+    /** holds tag text to tag enum mappings **/
+    private static final Map<String, JavadocTagInfo> TEXT_TO_TAG;
+    /** holds tag name to tag enum mappings **/
+    private static final Map<String, JavadocTagInfo> NAME_TO_TAG;
+
+    static
+    {
+        final ImmutableMap.Builder<String, JavadocTagInfo> textToTagBuilder =
+            new ImmutableMap.Builder<String, JavadocTagInfo>();
+
+        final ImmutableMap.Builder<String, JavadocTagInfo> nameToTagBuilder =
+            new ImmutableMap.Builder<String, JavadocTagInfo>();
+
+        for (final JavadocTagInfo tag : JavadocTagInfo.values()) {
+            textToTagBuilder.put(tag.getText(), tag);
+            nameToTagBuilder.put(tag.getName(), tag);
+        }
+
+        TEXT_TO_TAG = textToTagBuilder.build();
+        NAME_TO_TAG = nameToTagBuilder.build();
+    }
+
+    /** the tag text **/
+    private final String mText;
+    /** the tag name **/
+    private final String mName;
+    /** the tag type **/
+    private final Type mType;
+    /** if tag is valid in package.html **/
+    private final boolean mValidInPackageHtml;
+    /** if tag is valid in overview.html **/
+    private final boolean mValidInOverviewHtml;
+
+    /**
+     * Sets the various properties of a Javadoc tag.
+     *
+     * @param aText the tag text
+     * @param aName the tag name
+     * @param aType the type of tag
+     * @param aValidInPackageHtml whether the tag is valid
+     * in package.html file
+     * @param aValidInOverviewHtml whether the tag is valid
+     * in overview.html file
+     */
+    private JavadocTagInfo(final String aText, final String aName,
+        final Type aType, final boolean aValidInPackageHtml,
+        final boolean aValidInOverviewHtml)
+    {
+        this.mText = aText;
+        this.mName = aName;
+        this.mType = aType;
+        this.mValidInPackageHtml = aValidInPackageHtml;
+        this.mValidInOverviewHtml = aValidInOverviewHtml;
+    }
+
+    /**
+     * Checks if a particular Javadoc tag is valid within a Javadoc block of a
+     * given AST.
+     *
+     * <p>
+     * For example: Given a call to
+     * <code>JavadocTag.RETURN{@link #isValidOn(DetailAST)}</code>.
+     * </p>
+     *
+     * <p>
+     * If passing in a DetailAST representing a non-void METHOD_DEF
+     * <code> true </code> would be returned. If passing in a DetailAST
+     * representing a CLASS_DEF <code> false </code> would be returned because
+     * CLASS_DEF's cannot return a value.
+     * </p>
+     *
+     * @param aAST the AST representing a type that can be Javadoc'd
+     * @return true if tag is valid.
+     */
+    public abstract boolean isValidOn(DetailAST aAST);
+
+    /**
+     * Checks if tag is valid in a package.html Javadoc file.
+     *
+     * @return true if tag is valid.
+     */
+    public boolean isValidInPackageHtml()
+    {
+        return this.mValidInPackageHtml;
+    }
+
+    /**
+     * Checks if tag is valid in a overview.html Javadoc file.
+     *
+     * @return true if tag is valid.
+     */
+    public boolean isValidInOverviewHtml()
+    {
+        return this.mValidInOverviewHtml;
+    }
+
+    /**
+     * Gets the tag text.
+     * @return the tag text
+     */
+    public String getText()
+    {
+        return this.mText;
+    }
+
+    /**
+     * Gets the tag name.
+     * @return the tag name
+     */
+    public String getName()
+    {
+        return this.mName;
+    }
+
+    /**
+     * Gets the Tag type defined by {@link JavadocTagInfo.Type Type}.
+     * @return the Tag type
+     */
+    public Type getType()
+    {
+        return this.mType;
+    }
+
+    /**
+     * returns a JavadocTag from the tag text.
+     * @param aText String representing the tag text
+     * @return Returns a JavadocTag type from a String representing the tag
+     * @throws NullPointerException if the text is null
+     * @throws IllegalArgumentException if the text is not a valid tag
+     */
+    public static JavadocTagInfo fromText(final String aText)
+    {
+        if (aText == null) {
+            throw new NullPointerException("the text is null");
+        }
+
+        final JavadocTagInfo tag = TEXT_TO_TAG.get(aText);
+
+        if (tag == null) {
+            throw new IllegalArgumentException("the text [" + aText
+                + "] is not a valid Javadoc tag text");
+        }
+
+        return tag;
+    }
+
+    /**
+     * returns a JavadocTag from the tag name.
+     * @param aName String name of the tag
+     * @return Returns a JavadocTag type from a String representing the tag
+     * @throws NullPointerException if the text is null
+     * @throws IllegalArgumentException if the text is not a valid tag. The name
+     *    can be checked using {@link JavadocTagInfo#isValidName(String)}
+     */
+    public static JavadocTagInfo fromName(final String aName)
+    {
+        if (aName == null) {
+            throw new NullPointerException("the name is null");
+        }
+
+        final JavadocTagInfo tag = NAME_TO_TAG.get(aName);
+
+        if (tag == null) {
+            throw new IllegalArgumentException("the name [" + aName
+                + "] is not a valid Javadoc tag name");
+        }
+
+        return tag;
+    }
+
+    /**
+     * Returns whether the provided name is for a valid tag.
+     * @param aName the tag name to check.
+     * @return whether the provided name is for a valid tag.
+     */
+    public static boolean isValidName(final String aName)
+    {
+        return NAME_TO_TAG.containsKey(aName);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String toString()
+    {
+        return "text [" + this.mText + "] name [" + this.mName
+            + "] type [" + this.mType
+            + "] validInPackageHtml [" + this.mValidInPackageHtml
+            + "] validInOverviewHtml [" + this.mValidInOverviewHtml + "]";
+    }
+
+    /**
+     * The Javadoc Type.
+     *
+     * For example a {@code @param} tag is a block tag while a
+     * {@code {@link}} tag is a inline tag.
+     *
+     * @author Travis Schneeberger
+     */
+    public enum Type
+    {
+        /** block type. **/
+        BLOCK,
+
+        /** inline type. **/
+        INLINE;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/LineColumn.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/LineColumn.java
new file mode 100644
index 0000000..69a76cc
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/LineColumn.java
@@ -0,0 +1,65 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+/**
+ * Immutable line and column numbers.
+ *
+ * @author Martin von Gagern
+ */
+public class LineColumn implements Comparable<LineColumn>
+{
+
+    /** The one-based line number */
+    private final int mLine;
+
+    /** The zero-based column number */
+    private final int mCol;
+
+    /**
+     * Constructs a new pair of line and column numbers.
+     * @param aLine the one-based line number
+     * @param aCol the zero-based column number
+     */
+    public LineColumn(int aLine, int aCol)
+    {
+        mLine = aLine;
+        mCol = aCol;
+    }
+
+    /** @return the one-based line number */
+    public int getLine()
+    {
+        return mLine;
+    }
+
+    /** @return the zero-based column number */
+    public int getColumn()
+    {
+        return mCol;
+    }
+
+    /** {@inheritDoc} */
+    public int compareTo(LineColumn aLineColumn)
+    {
+        return (this.getLine() != aLineColumn.getLine())
+            ? this.getLine() - aLineColumn.getLine()
+            : this.getColumn() - aLineColumn.getColumn();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/LocalizedMessage.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/LocalizedMessage.java
new file mode 100644
index 0000000..33ad88a
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/LocalizedMessage.java
@@ -0,0 +1,383 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import java.io.Serializable;
+import java.text.MessageFormat;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+/**
+ * Represents a message that can be localised. The translations come from
+ * message.properties files. The underlying implementation uses
+ * java.text.MessageFormat.
+ *
+ * @author Oliver Burn
+ * @author lkuehne
+ * @version 1.0
+ */
+public final class LocalizedMessage
+    implements Comparable<LocalizedMessage>, Serializable
+{
+    /** Required for serialization. */
+    private static final long serialVersionUID = 5675176836184862150L;
+
+    /** hash function multiplicand */
+    private static final int HASH_MULT = 29;
+
+    /** the locale to localise messages to **/
+    private static Locale sLocale = Locale.getDefault();
+
+    /**
+     * A cache that maps bundle names to RessourceBundles.
+     * Avoids repetitive calls to ResourceBundle.getBundle().
+     */
+    private static final Map<String, ResourceBundle> BUNDLE_CACHE =
+        Collections.synchronizedMap(new HashMap<String, ResourceBundle>());
+
+    /** the line number **/
+    private final int mLineNo;
+    /** the column number **/
+    private final int mColNo;
+
+    /** the severity level **/
+    private final SeverityLevel mSeverityLevel;
+
+    /** the id of the module generating the message. */
+    private final String mModuleId;
+
+    /** the default severity level if one is not specified */
+    private static final SeverityLevel DEFAULT_SEVERITY = SeverityLevel.ERROR;
+
+    /** key for the message format **/
+    private final String mKey;
+
+    /** arguments for MessageFormat **/
+    private final Object[] mArgs;
+
+    /** name of the resource bundle to get messages from **/
+    private final String mBundle;
+
+    /** class of the source for this LocalizedMessage */
+    private final Class<?> mSourceClass;
+
+    /** a custom message overriding the default message from the bundle. */
+    private final String mCustomMessage;
+
+    @Override
+    public boolean equals(Object aObject)
+    {
+        if (this == aObject) {
+            return true;
+        }
+        if (!(aObject instanceof LocalizedMessage)) {
+            return false;
+        }
+
+        final LocalizedMessage localizedMessage = (LocalizedMessage) aObject;
+
+        if (mColNo != localizedMessage.mColNo) {
+            return false;
+        }
+        if (mLineNo != localizedMessage.mLineNo) {
+            return false;
+        }
+        if (!mKey.equals(localizedMessage.mKey)) {
+            return false;
+        }
+
+        if (!Arrays.equals(mArgs, localizedMessage.mArgs)) {
+            return false;
+        }
+        // ignoring mBundle for perf reasons.
+
+        // we currently never load the same error from different bundles.
+
+        return true;
+    }
+
+    @Override
+    public int hashCode()
+    {
+        int result;
+        result = mLineNo;
+        result = HASH_MULT * result + mColNo;
+        result = HASH_MULT * result + mKey.hashCode();
+        for (final Object element : mArgs) {
+            result = HASH_MULT * result + element.hashCode();
+        }
+        return result;
+    }
+
+    /**
+     * Creates a new <code>LocalizedMessage</code> instance.
+     *
+     * @param aLineNo line number associated with the message
+     * @param aColNo column number associated with the message
+     * @param aBundle resource bundle name
+     * @param aKey the key to locate the translation
+     * @param aArgs arguments for the translation
+     * @param aSeverityLevel severity level for the message
+     * @param aModuleId the id of the module the message is associated with
+     * @param aSourceClass the Class that is the source of the message
+     * @param aCustomMessage optional custom message overriding the default
+     */
+    public LocalizedMessage(int aLineNo,
+                            int aColNo,
+                            String aBundle,
+                            String aKey,
+                            Object[] aArgs,
+                            SeverityLevel aSeverityLevel,
+                            String aModuleId,
+                            Class<?> aSourceClass,
+                            String aCustomMessage)
+    {
+        mLineNo = aLineNo;
+        mColNo = aColNo;
+        mKey = aKey;
+        mArgs = (null == aArgs) ? null : aArgs.clone();
+        mBundle = aBundle;
+        mSeverityLevel = aSeverityLevel;
+        mModuleId = aModuleId;
+        mSourceClass = aSourceClass;
+        mCustomMessage = aCustomMessage;
+    }
+
+    /**
+     * Creates a new <code>LocalizedMessage</code> instance.
+     *
+     * @param aLineNo line number associated with the message
+     * @param aColNo column number associated with the message
+     * @param aBundle resource bundle name
+     * @param aKey the key to locate the translation
+     * @param aArgs arguments for the translation
+     * @param aModuleId the id of the module the message is associated with
+     * @param aSourceClass the Class that is the source of the message
+     * @param aCustomMessage optional custom message overriding the default
+     */
+    public LocalizedMessage(int aLineNo,
+                            int aColNo,
+                            String aBundle,
+                            String aKey,
+                            Object[] aArgs,
+                            String aModuleId,
+                            Class<?> aSourceClass,
+                            String aCustomMessage)
+    {
+        this(aLineNo,
+             aColNo,
+             aBundle,
+             aKey,
+             aArgs,
+             DEFAULT_SEVERITY,
+             aModuleId,
+             aSourceClass,
+             aCustomMessage);
+    }
+
+    /**
+     * Creates a new <code>LocalizedMessage</code> instance.
+     *
+     * @param aLineNo line number associated with the message
+     * @param aBundle resource bundle name
+     * @param aKey the key to locate the translation
+     * @param aArgs arguments for the translation
+     * @param aSeverityLevel severity level for the message
+     * @param aModuleId the id of the module the message is associated with
+     * @param aSourceClass the source class for the message
+     * @param aCustomMessage optional custom message overriding the default
+     */
+    public LocalizedMessage(int aLineNo,
+                            String aBundle,
+                            String aKey,
+                            Object[] aArgs,
+                            SeverityLevel aSeverityLevel,
+                            String aModuleId,
+                            Class<?> aSourceClass,
+                            String aCustomMessage)
+    {
+        this(aLineNo, 0, aBundle, aKey, aArgs, aSeverityLevel, aModuleId,
+                aSourceClass, aCustomMessage);
+    }
+
+    /**
+     * Creates a new <code>LocalizedMessage</code> instance. The column number
+     * defaults to 0.
+     *
+     * @param aLineNo line number associated with the message
+     * @param aBundle name of a resource bundle that contains error messages
+     * @param aKey the key to locate the translation
+     * @param aArgs arguments for the translation
+     * @param aModuleId the id of the module the message is associated with
+     * @param aSourceClass the name of the source for the message
+     * @param aCustomMessage optional custom message overriding the default
+     */
+    public LocalizedMessage(
+        int aLineNo,
+        String aBundle,
+        String aKey,
+        Object[] aArgs,
+        String aModuleId,
+        Class<?> aSourceClass,
+        String aCustomMessage)
+    {
+        this(aLineNo, 0, aBundle, aKey, aArgs, DEFAULT_SEVERITY, aModuleId,
+                aSourceClass, aCustomMessage);
+    }
+
+    /** Clears the cache. */
+    public static void clearCache()
+    {
+        synchronized (BUNDLE_CACHE) {
+            BUNDLE_CACHE.clear();
+        }
+    }
+
+    /** @return the translated message **/
+    public String getMessage()
+    {
+
+        final String customMessage = getCustomMessage();
+        if (customMessage != null) {
+            return customMessage;
+        }
+
+        try {
+            // Important to use the default class loader, and not the one in
+            // the GlobalProperties object. This is because the class loader in
+            // the GlobalProperties is specified by the user for resolving
+            // custom classes.
+            final ResourceBundle bundle = getBundle(mBundle);
+            final String pattern = bundle.getString(mKey);
+            return MessageFormat.format(pattern, mArgs);
+        }
+        catch (final MissingResourceException ex) {
+            // If the Check author didn't provide i18n resource bundles
+            // and logs error messages directly, this will return
+            // the author's original message
+            return MessageFormat.format(mKey, mArgs);
+        }
+    }
+
+    /**
+     * Returns the formatted custom message if one is configured.
+     * @return the formatted custom message or <code>null</code>
+     *          if there is no custom message
+     */
+    private String getCustomMessage()
+    {
+
+        if (mCustomMessage == null) {
+            return null;
+        }
+
+        return MessageFormat.format(mCustomMessage, mArgs);
+    }
+
+    /**
+     * Find a ResourceBundle for a given bundle name. Uses the classloader
+     * of the class emitting this message, to be sure to get the correct
+     * bundle.
+     * @param aBundleName the bundle name
+     * @return a ResourceBundle
+     */
+    private ResourceBundle getBundle(String aBundleName)
+    {
+        synchronized (BUNDLE_CACHE) {
+            ResourceBundle bundle = BUNDLE_CACHE
+                    .get(aBundleName);
+            if (bundle == null) {
+                bundle = ResourceBundle.getBundle(aBundleName, sLocale,
+                        mSourceClass.getClassLoader());
+                BUNDLE_CACHE.put(aBundleName, bundle);
+            }
+            return bundle;
+        }
+    }
+
+    /** @return the line number **/
+    public int getLineNo()
+    {
+        return mLineNo;
+    }
+
+    /** @return the column number **/
+    public int getColumnNo()
+    {
+        return mColNo;
+    }
+
+    /** @return the severity level **/
+    public SeverityLevel getSeverityLevel()
+    {
+        return mSeverityLevel;
+    }
+
+    /** @return the module identifier. */
+    public String getModuleId()
+    {
+        return mModuleId;
+    }
+
+    /**
+     * Returns the message key to locate the translation, can also be used
+     * in IDE plugins to map error messages to corrective actions.
+     *
+     * @return the message key
+     */
+    public String getKey()
+    {
+        return mKey;
+    }
+
+    /** @return the name of the source for this LocalizedMessage */
+    public String getSourceName()
+    {
+        return mSourceClass.getName();
+    }
+
+    /** @param aLocale the locale to use for localization **/
+    public static void setLocale(Locale aLocale)
+    {
+        sLocale = aLocale;
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Interface Comparable methods
+    ////////////////////////////////////////////////////////////////////////////
+
+    /** {@inheritDoc} */
+    public int compareTo(LocalizedMessage aOther)
+    {
+        if (getLineNo() == aOther.getLineNo()) {
+            if (getColumnNo() == aOther.getColumnNo()) {
+                return getMessage().compareTo(aOther.getMessage());
+            }
+            return (getColumnNo() < aOther.getColumnNo()) ? -1 : 1;
+        }
+
+        return (getLineNo() < aOther.getLineNo()) ? -1 : 1;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/LocalizedMessages.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/LocalizedMessages.java
new file mode 100644
index 0000000..015db15
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/LocalizedMessages.java
@@ -0,0 +1,64 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+// TODO: check that this class is in the right package
+// as soon as architecture has settled. At the time of writing
+// this class is not necessary as a part of the public api
+
+import com.google.common.collect.Sets;
+import java.util.TreeSet;
+
+/**
+ * Collection of messages.
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public final class LocalizedMessages
+{
+    /** contains the messages logged **/
+    private final TreeSet<LocalizedMessage> mMessages = Sets.newTreeSet();
+
+    /** @return the logged messages **/
+    public TreeSet<LocalizedMessage> getMessages()
+    {
+        return Sets.newTreeSet(mMessages);
+    }
+
+    /** Reset the object. **/
+    public void reset()
+    {
+        mMessages.clear();
+    }
+
+    /**
+     * Logs a message to be reported.
+     * @param aMsg the message to log
+     **/
+    public void add(LocalizedMessage aMsg)
+    {
+        mMessages.add(aMsg);
+    }
+
+    /** @return the number of messages */
+    public int size()
+    {
+        return mMessages.size();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/MessageDispatcher.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/MessageDispatcher.java
new file mode 100644
index 0000000..8043e9e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/MessageDispatcher.java
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import java.util.SortedSet;
+
+/**
+ * Used by FileSetChecks to distribute AuditEvents to AuditListeners.
+ * @author lkuehne
+ */
+public interface MessageDispatcher
+{
+    /**
+     * Notify all listeners about the beginning of a file audit.
+     * @param aFileName the file to be audited
+     */
+    void fireFileStarted(String aFileName);
+
+    /**
+     * Notify all listeners about the end of a file audit.
+     * @param aFileName the audited file
+     */
+    void fireFileFinished(String aFileName);
+
+    /**
+     * Notify all listeners about the errors in a file.
+     * @param aFileName the audited file
+     * @param aErrors the audit errors from the file
+     */
+    void fireErrors(String aFileName, SortedSet<LocalizedMessage> aErrors);
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/Scope.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/Scope.java
new file mode 100644
index 0000000..a547d1e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/Scope.java
@@ -0,0 +1,78 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+/**
+ * Represents a Java visibility scope.
+ *
+ * @author Lars K�hne
+ * @author Travis Schneeberger
+ */
+public enum Scope
+{
+    /** nothing scope. */
+    NOTHING,
+    /** public scope. */
+    PUBLIC,
+    /** protected scope. */
+    PROTECTED,
+    /** package or default scope. */
+    PACKAGE,
+    /** private scope. */
+    PRIVATE,
+    /** anonymous inner scope. */
+    ANONINNER;
+
+    @Override
+    public String toString()
+    {
+        return getName();
+    }
+
+    /**
+     * @return the name of this severity level.
+     */
+    public String getName()
+    {
+        return name().toLowerCase();
+    }
+
+    /**
+     * Checks if this scope is a subscope of another scope.
+     * Example: PUBLIC is a subscope of PRIVATE.
+     *
+     * @param aScope a <code>Scope</code> value
+     * @return if <code>this</code> is a subscope of <code>aScope</code>.
+     */
+    public boolean isIn(Scope aScope)
+    {
+        return (compareTo(aScope) <= 0);
+    }
+
+    /**
+     * Scope factory method.
+     *
+     * @param aScopeName scope name, such as "nothing", "public", etc.
+     * @return the <code>Scope</code> associated with <code>aScopeName</code>
+     */
+    public static Scope getInstance(String aScopeName)
+    {
+        return valueOf(Scope.class, aScopeName.trim().toUpperCase());
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/ScopeUtils.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/ScopeUtils.java
new file mode 100644
index 0000000..200e2ce
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/ScopeUtils.java
@@ -0,0 +1,303 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import antlr.collections.AST;
+
+/**
+ * Contains utility methods for working on scope.
+ *
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public final class ScopeUtils
+{
+    ///CLOVER:OFF
+    /** prevent instantiation */
+    private ScopeUtils()
+    {
+    }
+    ///CLOVER:ON
+
+    /**
+     * Returns the Scope specified by the modifier set.
+     *
+     * @param aMods root node of a modifier set
+     * @return a <code>Scope</code> value
+     */
+    public static Scope getScopeFromMods(DetailAST aMods)
+    {
+        Scope retVal = Scope.PACKAGE; // default scope
+        for (AST token = aMods.getFirstChild();
+            token != null;
+            token = token.getNextSibling())
+        {
+            if ("public".equals(token.getText())) {
+                retVal = Scope.PUBLIC;
+                break;
+            }
+            else if ("protected".equals(token.getText())) {
+                retVal = Scope.PROTECTED;
+                break;
+            }
+            else if ("private".equals(token.getText())) {
+                retVal = Scope.PRIVATE;
+                break;
+            }
+        }
+        return retVal;
+    }
+
+    /**
+     * Returns the scope of the surrounding "block".
+     * @param aAST the node to return the scope for
+     * @return the Scope of the surrounding block
+     */
+    public static Scope getSurroundingScope(DetailAST aAST)
+    {
+        Scope retVal = null;
+        for (DetailAST token = aAST.getParent();
+             token != null;
+             token = token.getParent())
+        {
+            final int type = token.getType();
+            if ((type == TokenTypes.CLASS_DEF)
+                || (type == TokenTypes.INTERFACE_DEF)
+                || (type == TokenTypes.ANNOTATION_DEF)
+                || (type == TokenTypes.ENUM_DEF))
+            {
+                final DetailAST mods =
+                    token.findFirstToken(TokenTypes.MODIFIERS);
+                final Scope modScope = ScopeUtils.getScopeFromMods(mods);
+                if ((retVal == null) || (retVal.isIn(modScope))) {
+                    retVal = modScope;
+                }
+            }
+            else if (type == TokenTypes.LITERAL_NEW) {
+                retVal = Scope.ANONINNER;
+                break; //because Scope.ANONINNER is not in any other Scope
+            }
+        }
+
+        return retVal;
+    }
+
+    /**
+     * Returns whether a node is directly contained within an interface block.
+     *
+     * @param aAST the node to check if directly contained within an interface
+     * block
+     * @return a <code>boolean</code> value
+     */
+    public static boolean inInterfaceBlock(DetailAST aAST)
+    {
+        boolean retVal = false;
+
+        // Loop up looking for a containing interface block
+        for (DetailAST token = aAST.getParent();
+             token != null;
+             token = token.getParent())
+        {
+            final int type = token.getType();
+            if ((type == TokenTypes.CLASS_DEF)
+                || (type == TokenTypes.ENUM_DEF)
+                || (type == TokenTypes.ANNOTATION_DEF))
+            {
+                break; // in a class, enum or annotation
+            }
+            else if (type == TokenTypes.LITERAL_NEW) {
+                break; // inner implementation
+            }
+            else if (type == TokenTypes.INTERFACE_DEF) {
+                retVal = true;
+                break;
+            }
+        }
+
+        return retVal;
+    }
+
+    /**
+     * Returns whether a node is directly contained within an annotation block.
+     *
+     * @param aAST the node to check if directly contained within an annotation
+     * block
+     * @return a <code>boolean</code> value
+     */
+    public static boolean inAnnotationBlock(DetailAST aAST)
+    {
+        boolean retVal = false;
+
+        // Loop up looking for a containing interface block
+        for (DetailAST token = aAST.getParent();
+             token != null;
+             token = token.getParent())
+        {
+            final int type = token.getType();
+            if ((type == TokenTypes.CLASS_DEF)
+                || (type == TokenTypes.ENUM_DEF)
+                || (type == TokenTypes.INTERFACE_DEF))
+            {
+                break; // in a class, enum or interface
+            }
+            else if (type == TokenTypes.LITERAL_NEW) {
+                break; // inner implementation
+            }
+            else if (type == TokenTypes.ANNOTATION_DEF) {
+                retVal = true;
+                break;
+            }
+        }
+
+        return retVal;
+    }
+
+    /**
+     * Returns whether a node is directly contained within an interface or
+     * annotation block.
+     *
+     * @param aAST the node to check if directly contained within an interface
+     * or annotation block
+     * @return a <code>boolean</code> value
+     */
+    public static boolean inInterfaceOrAnnotationBlock(DetailAST aAST)
+    {
+        return inInterfaceBlock(aAST) || inAnnotationBlock(aAST);
+    }
+
+    /**
+     * Returns whether a node is directly contained within an enum block.
+     *
+     * @param aAST the node to check if directly contained within an enum
+     * block
+     * @return a <code>boolean</code> value
+     */
+    public static boolean inEnumBlock(DetailAST aAST)
+    {
+        boolean retVal = false;
+
+        // Loop up looking for a containing interface block
+        for (DetailAST token = aAST.getParent();
+             token != null;
+             token = token.getParent())
+        {
+            final int type = token.getType();
+            if ((type == TokenTypes.INTERFACE_DEF)
+                || (type == TokenTypes.ANNOTATION_DEF)
+                || (type == TokenTypes.CLASS_DEF))
+            {
+                break; // in an interface, annotation or class
+            }
+            else if (type == TokenTypes.LITERAL_NEW) {
+                break; // inner implementation, enums can't be inner classes
+            }
+            else if (type == TokenTypes.ENUM_DEF) {
+                retVal = true;
+                break;
+            }
+        }
+
+        return retVal;
+    }
+
+    /**
+     * Returns whether the scope of a node is restricted to a code block.
+     * A code block is a method or constructor body, or a initialiser block.
+     *
+     * @param aAST the node to check
+     * @return a <code>boolean</code> value
+     */
+    public static boolean inCodeBlock(DetailAST aAST)
+    {
+        boolean retVal = false;
+
+        // Loop up looking for a containing code block
+        for (DetailAST token = aAST.getParent();
+             token != null;
+             token = token.getParent())
+        {
+            final int type = token.getType();
+            if ((type == TokenTypes.METHOD_DEF)
+                || (type == TokenTypes.CTOR_DEF)
+                || (type == TokenTypes.INSTANCE_INIT)
+                || (type == TokenTypes.STATIC_INIT))
+            {
+                retVal = true;
+                break;
+            }
+        }
+
+        return retVal;
+    }
+
+    /**
+     * Returns whether a node is contained in the outer most type block.
+     *
+     * @param aAST the node to check
+     * @return a <code>boolean</code> value
+     */
+    public static boolean isOuterMostType(DetailAST aAST)
+    {
+        boolean retVal = true;
+        for (DetailAST parent = aAST.getParent();
+             parent != null;
+             parent = parent.getParent())
+        {
+            if ((parent.getType() == TokenTypes.CLASS_DEF)
+                || (parent.getType() == TokenTypes.INTERFACE_DEF)
+                || (parent.getType() == TokenTypes.ANNOTATION_DEF)
+                || (parent.getType() == TokenTypes.ENUM_DEF))
+            {
+                retVal = false;
+                break;
+            }
+        }
+
+        return retVal;
+    }
+
+    /**
+     * Determines whether a node is a local variable definition.
+     * I.e. if it is declared in a code block, a for initializer,
+     * or a catch parameter.
+     * @param aAST the node to check.
+     * @return whether aAST is a local variable definition.
+     */
+    public static boolean isLocalVariableDef(DetailAST aAST)
+    {
+        // variable declaration?
+        if (aAST.getType() == TokenTypes.VARIABLE_DEF) {
+            final DetailAST parent = aAST.getParent();
+            if (parent != null) {
+                final int type = parent.getType();
+                return (type == TokenTypes.SLIST)
+                    || (type == TokenTypes.FOR_INIT)
+                    || (type == TokenTypes.FOR_EACH_CLAUSE);
+            }
+        }
+        // catch parameter?
+        else if (aAST.getType() == TokenTypes.PARAMETER_DEF) {
+            final DetailAST parent = aAST.getParent();
+            if (parent != null) {
+                return (parent.getType() == TokenTypes.LITERAL_CATCH);
+            }
+        }
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/SeverityLevel.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/SeverityLevel.java
new file mode 100644
index 0000000..10c2788
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/SeverityLevel.java
@@ -0,0 +1,70 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+/**
+ * <p>
+ * Severity level for a check violation.
+ * </p>
+ * <p>
+ * Each violation of an audit check is assigned one of the severity levels
+ * defined here.
+ * </p>
+ *
+ * @author David Schneider
+ * @author Travis Schneeberger
+ */
+public enum SeverityLevel
+{
+    /** security level ignore. */
+    IGNORE,
+    /** security level info. */
+    INFO,
+    /** security level warning. */
+    WARNING,
+    /** security level error. */
+    ERROR;
+
+    @Override
+    public String toString()
+    {
+        return getName();
+    }
+
+    /**
+     * @return the name of this severity level.
+     */
+    public String getName()
+    {
+        return name().toLowerCase();
+    }
+
+    /**
+     * SeverityLevel factory method.
+     *
+     * @param aSecurityLevelName level name, such as "ignore", "info", etc.
+     * @return the <code>SeverityLevel</code>
+     * associated with <code>aSecurityLevelName</code>
+     */
+    public static SeverityLevel getInstance(String aSecurityLevelName)
+    {
+        return valueOf(SeverityLevel.class, aSecurityLevelName.trim()
+                .toUpperCase());
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/SeverityLevelCounter.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/SeverityLevelCounter.java
new file mode 100644
index 0000000..5814acf
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/SeverityLevelCounter.java
@@ -0,0 +1,92 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+/**
+ * An audit listener that counts how many {@link AuditEvent AuditEvents}
+ * of a given severity have been generated.
+ *
+ * @author lkuehne
+ */
+public final class SeverityLevelCounter implements AuditListener
+{
+    /** The severity level to watch out for. */
+    private SeverityLevel mLevel;
+
+    /** Keeps track of the number of counted events. */
+    private int mCount;
+
+    /**
+     * Creates a new counter.
+     * @param aLevel the severity level events need to have, must be non-null.
+     */
+    public SeverityLevelCounter(SeverityLevel aLevel)
+    {
+        if (aLevel == null) {
+            throw new IllegalArgumentException();
+        }
+        mLevel = aLevel;
+    }
+
+    /** {@inheritDoc} */
+    public void addError(AuditEvent aEvt)
+    {
+        if (mLevel.equals(aEvt.getSeverityLevel())) {
+            mCount++;
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void addException(AuditEvent aEvt, Throwable aThrowable)
+    {
+        if (SeverityLevel.ERROR.equals(mLevel)) {
+            mCount++;
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void auditStarted(AuditEvent aEvt)
+    {
+        mCount = 0;
+    }
+
+    /** {@inheritDoc} */
+    public void fileStarted(AuditEvent aEvt)
+    {
+    }
+
+    /** {@inheritDoc} */
+    public void auditFinished(AuditEvent aEvt)
+    {
+    }
+
+    /** {@inheritDoc} */
+    public void fileFinished(AuditEvent aEvt)
+    {
+    }
+
+    /**
+     * Returns the number of counted events since audit started.
+     * @return the number of counted events since audit started.
+     */
+    public int getCount()
+    {
+        return mCount;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/TextBlock.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/TextBlock.java
new file mode 100644
index 0000000..abafdc7
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/TextBlock.java
@@ -0,0 +1,78 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+/**
+ * A block of text from an inputfile that does not necessarily
+ * have any grammatical structure.
+ *
+ * @author lkuehne
+ */
+public interface TextBlock
+{
+    /**
+     * The text content of the text block.
+     * Each line is represented by one array entry.
+     * The linebreak characters are not part of the text content.
+     *
+     * @return the text content of the text block.
+     */
+    String[] getText();
+
+    /**
+     * The line in the inputfile where the text block starts.
+     * Counting starts from 1.
+     * @return first line of the text block
+     */
+    int getStartLineNo();
+
+    /**
+     * The last line of the text block in the inputfile.
+     * Counting starts from 1.
+     * @return last line of the text block
+     */
+    int getEndLineNo();
+
+    /**
+     * The column in the inputfile where the text block starts.
+     * Counting starts from 0.
+     * @return first line of the text block
+     */
+    int getStartColNo();
+
+    /**
+     * The column in the inputfile where the text block ends.
+     * Counting starts from 0.
+     * @return last line of the text block
+     */
+    int getEndColNo();
+
+    /**
+     * Checks if this comment intersects with a specified
+     * part of the file.
+     *
+     * @param aStartLineNo the starting line number in the file
+     * @param aStartColNo the starting column number in the file
+     * @param aEndLineNo the ending line number in the file
+     * @param aEndColNo the ending column number in the file
+     * @return true if the positions intersects with this comment.
+     */
+    boolean intersects(int aStartLineNo, int aStartColNo,
+                       int aEndLineNo, int aEndColNo);
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java
new file mode 100644
index 0000000..50a05d2
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java
@@ -0,0 +1,3533 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import java.lang.reflect.Field;
+import java.util.ResourceBundle;
+
+import com.google.common.collect.ImmutableMap;
+import com.puppycrawl.tools.checkstyle.grammars.GeneratedJavaTokenTypes;
+
+/**
+ * Contains the constants for all the tokens contained in the Abstract
+ * Syntax Tree.
+ *
+ * <p>Implementation detail: This class has been introduced to break
+ * the circular dependency between packages.</p>
+ *
+ * @author Oliver Burn
+ * @author <a href="mailto:dobratzp at ele.uri.edu">Peter Dobratz</a>
+ * @version 1.0
+ */
+public final class TokenTypes
+{
+    ///CLOVER:OFF
+    /** prevent instantiation */
+    private TokenTypes()
+    {
+    }
+    ///CLOVER:ON
+
+    // The following three types are never part of an AST,
+    // left here as a reminder so nobody will read them accidentally
+
+    /* * token representing a NULL_TREE_LOOKAHEAD */
+    // public static final int NULL_TREE_LOOKAHEAD = 3;
+    /* * token representing a BLOCK */
+    // public static final int BLOCK = 4;
+    /* * token representing a VOCAB */
+    // public static final int VOCAB = 149;
+
+    // These are the types that can actually occur in an AST
+    // it makes sense to register Checks for these types
+
+    /**
+     * The end of file token.  This is the root node for the source
+     * file.  It's children are an optional package definition, zero
+     * or more import statements, and one or more class or interface
+     * definitions.
+     *
+     * @see #PACKAGE_DEF
+     * @see #IMPORT
+     * @see #CLASS_DEF
+     * @see #INTERFACE_DEF
+     **/
+    public static final int EOF = GeneratedJavaTokenTypes.EOF;
+    /**
+     * Modifiers for type, method, and field declarations.  The
+     * modifiers element is always present even though it may have no
+     * children.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html">Java
+     * Language Specification, Chapter 8</a>
+     * @see #LITERAL_PUBLIC
+     * @see #LITERAL_PROTECTED
+     * @see #LITERAL_PRIVATE
+     * @see #ABSTRACT
+     * @see #LITERAL_STATIC
+     * @see #FINAL
+     * @see #LITERAL_TRANSIENT
+     * @see #LITERAL_VOLATILE
+     * @see #LITERAL_SYNCHRONIZED
+     * @see #LITERAL_NATIVE
+     * @see #STRICTFP
+     * @see #ANNOTATION
+     * @see #LITERAL_DEFAULT
+     **/
+    public static final int MODIFIERS = GeneratedJavaTokenTypes.MODIFIERS;
+
+    /**
+     * An object block.  These are children of class, interface, enum,
+     * annotation and enum constant declarations.
+     * Also, object blocks are children of the new keyword when defining
+     * anonymous inner types.
+     *
+     * @see #LCURLY
+     * @see #INSTANCE_INIT
+     * @see #STATIC_INIT
+     * @see #CLASS_DEF
+     * @see #CTOR_DEF
+     * @see #METHOD_DEF
+     * @see #VARIABLE_DEF
+     * @see #RCURLY
+     * @see #INTERFACE_DEF
+     * @see #LITERAL_NEW
+     * @see #ENUM_DEF
+     * @see #ENUM_CONSTANT_DEF
+     * @see #ANNOTATION_DEF
+     **/
+    public static final int OBJBLOCK = GeneratedJavaTokenTypes.OBJBLOCK;
+    /**
+     * A list of statements.
+     *
+     * @see #RCURLY
+     * @see #EXPR
+     * @see #LABELED_STAT
+     * @see #LITERAL_THROWS
+     * @see #LITERAL_RETURN
+     * @see #SEMI
+     * @see #METHOD_DEF
+     * @see #CTOR_DEF
+     * @see #LITERAL_FOR
+     * @see #LITERAL_WHILE
+     * @see #LITERAL_IF
+     * @see #LITERAL_ELSE
+     * @see #CASE_GROUP
+     **/
+    public static final int SLIST = GeneratedJavaTokenTypes.SLIST;
+    /**
+     * A constructor declaration.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * public SpecialEntry(int value, String text)
+     * {
+     *   this.value = value;
+     *   this.text = text;
+     * }
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--CTOR_DEF
+     *     |
+     *     +--MODIFIERS
+     *         |
+     *         +--LITERAL_PUBLIC (public)
+     *     +--IDENT (SpecialEntry)
+     *     +--LPAREN (()
+     *     +--PARAMETERS
+     *         |
+     *         +--PARAMETER_DEF
+     *             |
+     *             +--MODIFIERS
+     *             +--TYPE
+     *                 |
+     *                 +--LITERAL_INT (int)
+     *             +--IDENT (value)
+     *         +--COMMA (,)
+     *         +--PARAMETER_DEF
+     *             |
+     *             +--MODIFIERS
+     *             +--TYPE
+     *                 |
+     *                 +--IDENT (String)
+     *             +--IDENT (text)
+     *     +--RPAREN ())
+     *     +--SLIST ({)
+     *         |
+     *         +--EXPR
+     *             |
+     *             +--ASSIGN (=)
+     *                 |
+     *                 +--DOT (.)
+     *                     |
+     *                     +--LITERAL_THIS (this)
+     *                     +--IDENT (value)
+     *                 +--IDENT (value)
+     *         +--SEMI (;)
+     *         +--EXPR
+     *             |
+     *             +--ASSIGN (=)
+     *                 |
+     *                 +--DOT (.)
+     *                     |
+     *                     +--LITERAL_THIS (this)
+     *                     +--IDENT (text)
+     *                 +--IDENT (text)
+     *         +--SEMI (;)
+     *         +--RCURLY (})
+     * </pre>
+     *
+     * @see #OBJBLOCK
+     * @see #CLASS_DEF
+     **/
+    public static final int CTOR_DEF = GeneratedJavaTokenTypes.CTOR_DEF;
+    /**
+     * A method declaration.  The children are modifiers, type parameters,
+     * return type, method name, parameter list, an optional throws list, and
+     * statement list.  The statement list is omitted if the method
+     * declaration appears in an interface declaration.  Method
+     * declarations may appear inside object blocks of class
+     * declarations, interface declarations, enum declarations,
+     * enum constant declarations or anonymous inner-class declarations.
+     *
+     * <p>For example:</p>
+     *
+     * <pre>
+     *  public static int square(int x)
+     *  {
+     *    return x*x;
+     *  }
+     * </pre>
+     *
+     * <p>parses as:</p>
+     *
+     * <pre>
+     * +--METHOD_DEF
+     *     |
+     *     +--MODIFIERS
+     *         |
+     *         +--LITERAL_PUBLIC (public)
+     *         +--LITERAL_STATIC (static)
+     *     +--TYPE
+     *         |
+     *         +--LITERAL_INT (int)
+     *     +--IDENT (square)
+     *     +--PARAMETERS
+     *         |
+     *         +--PARAMETER_DEF
+     *             |
+     *             +--MODIFIERS
+     *             +--TYPE
+     *                 |
+     *                 +--LITERAL_INT (int)
+     *             +--IDENT (x)
+     *     +--SLIST ({)
+     *         |
+     *         +--LITERAL_RETURN (return)
+     *             |
+     *             +--EXPR
+     *                 |
+     *                 +--STAR (*)
+     *                     |
+     *                     +--IDENT (x)
+     *                     +--IDENT (x)
+     *             +--SEMI (;)
+     *         +--RCURLY (})
+     * </pre>
+     *
+     * @see #MODIFIERS
+     * @see #TYPE_PARAMETERS
+     * @see #TYPE
+     * @see #IDENT
+     * @see #PARAMETERS
+     * @see #LITERAL_THROWS
+     * @see #SLIST
+     * @see #OBJBLOCK
+     **/
+    public static final int METHOD_DEF = GeneratedJavaTokenTypes.METHOD_DEF;
+    /**
+     * A field or local variable declaration.  The children are
+     * modifiers, type, the identifier name, and an optional
+     * assignment statement.
+     *
+     * @see #MODIFIERS
+     * @see #TYPE
+     * @see #IDENT
+     * @see #ASSIGN
+     **/
+    public static final int VARIABLE_DEF =
+        GeneratedJavaTokenTypes.VARIABLE_DEF;
+
+    /**
+     * An instance initializer.  Zero or more instance initializers
+     * may appear in class and enum definitions.  This token will be a child
+     * of the object block of the declaring type.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#246032">Java
+     * Language Specification§8.6</a>
+     * @see #SLIST
+     * @see #OBJBLOCK
+     **/
+    public static final int INSTANCE_INIT =
+        GeneratedJavaTokenTypes.INSTANCE_INIT;
+
+    /**
+     * A static initialization block.  Zero or more static
+     * initializers may be children of the object block of a class
+     * or enum declaration (interfaces cannot have static initializers).  The
+     * first and only child is a statement list.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#39245">Java
+     * Language Specification, §8.7</a>
+     * @see #SLIST
+     * @see #OBJBLOCK
+     **/
+    public static final int STATIC_INIT =
+        GeneratedJavaTokenTypes.STATIC_INIT;
+
+    /**
+     * A type.  This is either a return type of a method or a type of
+     * a variable or field.  The first child of this element is the
+     * actual type.  This may be a primitive type, an identifier, a
+     * dot which is the root of a fully qualified type, or an array of
+     * any of these. The second child may be type arguments to the type.
+     *
+     * @see #VARIABLE_DEF
+     * @see #METHOD_DEF
+     * @see #PARAMETER_DEF
+     * @see #IDENT
+     * @see #DOT
+     * @see #LITERAL_VOID
+     * @see #LITERAL_BOOLEAN
+     * @see #LITERAL_BYTE
+     * @see #LITERAL_CHAR
+     * @see #LITERAL_SHORT
+     * @see #LITERAL_INT
+     * @see #LITERAL_FLOAT
+     * @see #LITERAL_LONG
+     * @see #LITERAL_DOUBLE
+     * @see #ARRAY_DECLARATOR
+     * @see #TYPE_ARGUMENTS
+     **/
+    public static final int TYPE = GeneratedJavaTokenTypes.TYPE;
+    /**
+     * A class declaration.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * public class MyClass
+     *   implements Serializable
+     * {
+     * }
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--CLASS_DEF
+     *     |
+     *     +--MODIFIERS
+     *         |
+     *         +--LITERAL_PUBLIC (public)
+     *     +--LITERAL_CLASS (class)
+     *     +--IDENT (MyClass)
+     *     +--EXTENDS_CLAUSE
+     *     +--IMPLEMENTS_CLAUSE
+     *         |
+     *         +--IDENT (Serializable)
+     *     +--OBJBLOCK
+     *         |
+     *         +--LCURLY ({)
+     *         +--RCURLY (})
+     * </pre>
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html">Java
+     * Language Specification, Chapter 8</a>
+     * @see #MODIFIERS
+     * @see #IDENT
+     * @see #EXTENDS_CLAUSE
+     * @see #IMPLEMENTS_CLAUSE
+     * @see #OBJBLOCK
+     * @see #LITERAL_NEW
+     **/
+    public static final int CLASS_DEF = GeneratedJavaTokenTypes.CLASS_DEF;
+    /**
+     * An interface declaration.
+     *
+     * <p>For example:</p>
+     *
+     * <pre>
+     *   public interface MyInterface
+     *   {
+     *   }
+     *
+     * </pre>
+     *
+     * <p>parses as:</p>
+     *
+     * <pre>
+     * +--INTERFACE_DEF
+     *     |
+     *     +--MODIFIERS
+     *         |
+     *         +--LITERAL_PUBLIC (public)
+     *     +--LITERAL_INTERFACE (interface)
+     *     +--IDENT (MyInterface)
+     *     +--EXTENDS_CLAUSE
+     *     +--OBJBLOCK
+     *         |
+     *         +--LCURLY ({)
+     *         +--RCURLY (})
+     * </pre>
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/interfaces.doc.html">Java
+     * Language Specification, Chapter 9</a>
+     * @see #MODIFIERS
+     * @see #IDENT
+     * @see #EXTENDS_CLAUSE
+     * @see #OBJBLOCK
+     **/
+    public static final int INTERFACE_DEF =
+        GeneratedJavaTokenTypes.INTERFACE_DEF;
+
+    /**
+     * The package declaration.  This is optional, but if it is
+     * included, then there is only one package declaration per source
+     * file and it must be the first non-comment in the file. A package
+     * declaration may be annotated in which case the annotations comes
+     * before the rest of the declaration (and are the first children).
+     *
+     * <p>For example:</p>
+     *
+     * <pre>
+     *   package com.puppycrawl.tools.checkstyle.api;
+     * </pre>
+     *
+     * <p>parses as:</p>
+     *
+     * <pre>
+     * +--PACKAGE_DEF (package)
+     *     |
+     *     +--ANNOTATIONS
+     *     +--DOT (.)
+     *         |
+     *         +--DOT (.)
+     *             |
+     *             +--DOT (.)
+     *                 |
+     *                 +--DOT (.)
+     *                     |
+     *                     +--IDENT (com)
+     *                     +--IDENT (puppycrawl)
+     *                 +--IDENT (tools)
+     *             +--IDENT (checkstyle)
+     *         +--IDENT (api)
+     *     +--SEMI (;)
+     * </pre>
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html#26619">Java
+     * Language Specification §7.4</a>
+     * @see #DOT
+     * @see #IDENT
+     * @see #SEMI
+     * @see #ANNOTATIONS
+     * @see FullIdent
+     **/
+    public static final int PACKAGE_DEF = GeneratedJavaTokenTypes.PACKAGE_DEF;
+    /**
+     * An array declaration.
+     *
+     * <p>If the array declaration represents a type, then the type of
+     * the array elements is the first child.  Multidimensional arrays
+     * may be regarded as arrays of arrays.  In other words, the first
+     * child of the array declaration is another array
+     * declaration.</p>
+     *
+     * <p>For example:</p>
+     * <pre>
+     *   int[] x;
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--VARIABLE_DEF
+     *     |
+     *     +--MODIFIERS
+     *     +--TYPE
+     *         |
+     *         +--ARRAY_DECLARATOR ([)
+     *             |
+     *             +--LITERAL_INT (int)
+     *     +--IDENT (x)
+     * +--SEMI (;)
+     * </pre>
+     *
+     * <p>The array declaration may also represent an inline array
+     * definition.  In this case, the first child will be either an
+     * expression specifying the length of the array or an array
+     * initialization block.</p>
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/arrays.doc.html">Java
+     * Language Specification Chapter 10</a>
+     * @see #TYPE
+     * @see #ARRAY_INIT
+     **/
+    public static final int ARRAY_DECLARATOR =
+        GeneratedJavaTokenTypes.ARRAY_DECLARATOR;
+
+    /**
+     * An extends clause.  This appear as part of class and interface
+     * definitions.  This element appears even if the
+     * <code>extends</code> keyword is not explicitly used.  The child
+     * is an optional identifier.
+     *
+     * <p>For example:</p>
+     *
+     *
+     * <p>parses as:</p>
+     * <pre>
+     * +--EXTENDS_CLAUSE
+     *     |
+     *     +--DOT (.)
+     *         |
+     *         +--DOT (.)
+     *             |
+     *             +--IDENT (java)
+     *             +--IDENT (util)
+     *         +--IDENT (LinkedList)
+     * </pre>
+     *
+     * @see #IDENT
+     * @see #DOT
+     * @see #CLASS_DEF
+     * @see #INTERFACE_DEF
+     * @see FullIdent
+     **/
+    public static final int EXTENDS_CLAUSE =
+        GeneratedJavaTokenTypes.EXTENDS_CLAUSE;
+
+    /**
+     * An implements clause.  This always appears in a class or enum
+     * declaration, even if there are no implemented interfaces.  The
+     * children are a comma separated list of zero or more
+     * identifiers.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * implements Serializable, Comparable
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--IMPLEMENTS_CLAUSE
+     *     |
+     *     +--IDENT (Serializable)
+     *     +--COMMA (,)
+     *     +--IDENT (Comparable)
+     * </pre>
+     *
+     * @see #IDENT
+     * @see #DOT
+     * @see #COMMA
+     * @see #CLASS_DEF
+     * @see #ENUM_DEF
+     **/
+    public static final int IMPLEMENTS_CLAUSE =
+        GeneratedJavaTokenTypes.IMPLEMENTS_CLAUSE;
+
+    /**
+     * A list of parameters to a method or constructor.  The children
+     * are zero or more parameter declarations separated by commas.
+     *
+     * <p>For example</p>
+     * <pre>
+     * int start, int end
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--PARAMETERS
+     *     |
+     *     +--PARAMETER_DEF
+     *         |
+     *         +--MODIFIERS
+     *         +--TYPE
+     *             |
+     *             +--LITERAL_INT (int)
+     *         +--IDENT (start)
+     *     +--COMMA (,)
+     *     +--PARAMETER_DEF
+     *         |
+     *         +--MODIFIERS
+     *         +--TYPE
+     *             |
+     *             +--LITERAL_INT (int)
+     *         +--IDENT (end)
+     * </pre>
+     *
+     * @see #PARAMETER_DEF
+     * @see #COMMA
+     * @see #METHOD_DEF
+     * @see #CTOR_DEF
+     **/
+    public static final int PARAMETERS = GeneratedJavaTokenTypes.PARAMETERS;
+    /**
+     * A parameter declaration. The last parameter in a list of parameters may
+     * be variable length (indicated by the ELLIPSIS child node immediately
+     * after the TYPE child).
+     *
+     * @see #MODIFIERS
+     * @see #TYPE
+     * @see #IDENT
+     * @see #PARAMETERS
+     * @see #ELLIPSIS
+     **/
+    public static final int PARAMETER_DEF =
+        GeneratedJavaTokenTypes.PARAMETER_DEF;
+
+    /**
+     * A labeled statement.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * outside: ;
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--LABELED_STAT (:)
+     *     |
+     *     +--IDENT (outside)
+     *     +--EMPTY_STAT (;)
+     * </pre>
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/statements.doc.html#78993">Java
+     * Language Specification, §14.7</a>
+     * @see #SLIST
+     **/
+    public static final int LABELED_STAT =
+        GeneratedJavaTokenTypes.LABELED_STAT;
+
+    /**
+     * A type-cast.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * (String)it.next()
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--TYPECAST (()
+     *     |
+     *     +--TYPE
+     *         |
+     *         +--IDENT (String)
+     *     +--RPAREN ())
+     *     +--METHOD_CALL (()
+     *         |
+     *         +--DOT (.)
+     *             |
+     *             +--IDENT (it)
+     *             +--IDENT (next)
+     *         +--ELIST
+     *         +--RPAREN ())
+     * </pre>
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#238146">Java
+     * Language Specification, §15.16</a>
+     * @see #EXPR
+     * @see #TYPE
+     * @see #TYPE_ARGUMENTS
+     * @see #RPAREN
+     **/
+    public static final int TYPECAST = GeneratedJavaTokenTypes.TYPECAST;
+    /**
+     * The array index operator.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * ar[2] = 5;
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--EXPR
+     *     |
+     *     +--ASSIGN (=)
+     *         |
+     *         +--INDEX_OP ([)
+     *             |
+     *             +--IDENT (ar)
+     *             +--EXPR
+     *                 |
+     *                 +--NUM_INT (2)
+     *         +--NUM_INT (5)
+     * +--SEMI (;)
+     * </pre>
+     *
+     * @see #EXPR
+     **/
+    public static final int INDEX_OP = GeneratedJavaTokenTypes.INDEX_OP;
+    /**
+     * The <code>++</code> (postfix increment) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#39438">Java
+     * Language Specification, §15.14.1</a>
+     * @see #EXPR
+     * @see #INC
+     **/
+    public static final int POST_INC = GeneratedJavaTokenTypes.POST_INC;
+    /**
+     * The <code>--</code> (postfix decrement) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#4987">Java
+     * Language Specification, §15.14.2</a>
+     * @see #EXPR
+     * @see #DEC
+     **/
+    public static final int POST_DEC = GeneratedJavaTokenTypes.POST_DEC;
+    /**
+     * A method call. A method call may have type arguments however these
+     * are attached to the appropriate node in the qualified method name.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * Math.random()
+     * </pre>
+     * <p>parses as:
+     * <pre>
+     * +--METHOD_CALL (()
+     *     |
+     *     +--DOT (.)
+     *         |
+     *         +--IDENT (Math)
+     *         +--IDENT (random)
+     *     +--ELIST
+     *     +--RPAREN ())
+     * </pre>
+     *
+     *
+     * @see #IDENT
+     * @see #TYPE_ARGUMENTS
+     * @see #DOT
+     * @see #ELIST
+     * @see #RPAREN
+     * @see FullIdent
+     **/
+    public static final int METHOD_CALL = GeneratedJavaTokenTypes.METHOD_CALL;
+
+    /**
+     * Part of Java 8 syntax. Method or constructor call without arguments.
+     * @see #DOUBLE_COLON
+     */
+    public static final int METHOD_REF = GeneratedJavaTokenTypes.METHOD_REF;
+    /**
+     * An expression.  Operators with lower precedence appear at a
+     * higher level in the tree than operators with higher precedence.
+     * Parentheses are siblings to the operator they enclose.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * x = 4 + 3 * 5 + (30 + 26) / 4 + 5 % 4 + (1<<3);
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--EXPR
+     *     |
+     *     +--ASSIGN (=)
+     *         |
+     *         +--IDENT (x)
+     *         +--PLUS (+)
+     *             |
+     *             +--PLUS (+)
+     *                 |
+     *                 +--PLUS (+)
+     *                     |
+     *                     +--PLUS (+)
+     *                         |
+     *                         +--NUM_INT (4)
+     *                         +--STAR (*)
+     *                             |
+     *                             +--NUM_INT (3)
+     *                             +--NUM_INT (5)
+     *                     +--DIV (/)
+     *                         |
+     *                         +--LPAREN (()
+     *                         +--PLUS (+)
+     *                             |
+     *                             +--NUM_INT (30)
+     *                             +--NUM_INT (26)
+     *                         +--RPAREN ())
+     *                         +--NUM_INT (4)
+     *                 +--MOD (%)
+     *                     |
+     *                     +--NUM_INT (5)
+     *                     +--NUM_INT (4)
+     *             +--LPAREN (()
+     *             +--SL (<<)
+     *                 |
+     *                 +--NUM_INT (1)
+     *                 +--NUM_INT (3)
+     *             +--RPAREN ())
+     * +--SEMI (;)
+     * </pre>
+     *
+     * @see #ELIST
+     * @see #ASSIGN
+     * @see #LPAREN
+     * @see #RPAREN
+     **/
+    public static final int EXPR = GeneratedJavaTokenTypes.EXPR;
+    /**
+     * An array initialization.  This may occur as part of an array
+     * declaration or inline with <code>new</code>.
+     *
+     * <p>For example:</p>
+     * <pre>
+     *   int[] y =
+     *     {
+     *       1,
+     *       2,
+     *     };
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--VARIABLE_DEF
+     *     |
+     *     +--MODIFIERS
+     *     +--TYPE
+     *         |
+     *         +--ARRAY_DECLARATOR ([)
+     *             |
+     *             +--LITERAL_INT (int)
+     *     +--IDENT (y)
+     *     +--ASSIGN (=)
+     *         |
+     *         +--ARRAY_INIT ({)
+     *             |
+     *             +--EXPR
+     *                 |
+     *                 +--NUM_INT (1)
+     *             +--COMMA (,)
+     *             +--EXPR
+     *                 |
+     *                 +--NUM_INT (2)
+     *             +--COMMA (,)
+     *             +--RCURLY (})
+     * +--SEMI (;)
+     * </pre>
+     *
+     * <p>Also consider:</p>
+     * <pre>
+     *   int[] z = new int[]
+     *     {
+     *       1,
+     *       2,
+     *     };
+     * </pre>
+     * <p>which parses as:</p>
+     * <pre>
+     * +--VARIABLE_DEF
+     *     |
+     *     +--MODIFIERS
+     *     +--TYPE
+     *         |
+     *         +--ARRAY_DECLARATOR ([)
+     *             |
+     *             +--LITERAL_INT (int)
+     *     +--IDENT (z)
+     *     +--ASSIGN (=)
+     *         |
+     *         +--EXPR
+     *             |
+     *             +--LITERAL_NEW (new)
+     *                 |
+     *                 +--LITERAL_INT (int)
+     *                 +--ARRAY_DECLARATOR ([)
+     *                 +--ARRAY_INIT ({)
+     *                     |
+     *                     +--EXPR
+     *                         |
+     *                         +--NUM_INT (1)
+     *                     +--COMMA (,)
+     *                     +--EXPR
+     *                         |
+     *                         +--NUM_INT (2)
+     *                     +--COMMA (,)
+     *                     +--RCURLY (})
+     * </pre>
+     *
+     * @see #ARRAY_DECLARATOR
+     * @see #TYPE
+     * @see #LITERAL_NEW
+     * @see #COMMA
+     **/
+    public static final int ARRAY_INIT = GeneratedJavaTokenTypes.ARRAY_INIT;
+    /**
+     * An import declaration.  Import declarations are option, but
+     * must appear after the package declaration and before the first type
+     * declaration.
+     *
+     * <p>For example:</p>
+     *
+     * <pre>
+     *   import java.io.IOException;
+     * </pre>
+     *
+     * <p>parses as:</p>
+     *
+     * <pre>
+     * +--IMPORT (import)
+     *     |
+     *     +--DOT (.)
+     *         |
+     *         +--DOT (.)
+     *             |
+     *             +--IDENT (java)
+     *             +--IDENT (io)
+     *         +--IDENT (IOException)
+     *     +--SEMI (;)
+     * </pre>
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html#70209">Java
+     * Language Specification §7.5</a>
+     * @see #DOT
+     * @see #IDENT
+     * @see #STAR
+     * @see #SEMI
+     * @see FullIdent
+     **/
+    public static final int IMPORT = GeneratedJavaTokenTypes.IMPORT;
+    /**
+     * The <code>-</code> (unary minus) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#236345">Java
+     * Language Specification, §15.15.4</a>
+     * @see #EXPR
+     **/
+    public static final int UNARY_MINUS = GeneratedJavaTokenTypes.UNARY_MINUS;
+    /**
+     * The <code>+</code> (unary plus) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#24924">Java
+     * Language Specification, §15.15.3</a>
+     * @see #EXPR
+     **/
+    public static final int UNARY_PLUS = GeneratedJavaTokenTypes.UNARY_PLUS;
+    /**
+     * A group of case clauses.  Case clauses with no associated
+     * statements are grouped together into a case group.  The last
+     * child is a statement list containing the statements to execute
+     * upon a match.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * case 0:
+     * case 1:
+     * case 2:
+     *   x = 3;
+     *   break;
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--CASE_GROUP
+     *     |
+     *     +--LITERAL_CASE (case)
+     *         |
+     *         +--EXPR
+     *             |
+     *             +--NUM_INT (0)
+     *     +--LITERAL_CASE (case)
+     *         |
+     *         +--EXPR
+     *             |
+     *             +--NUM_INT (1)
+     *     +--LITERAL_CASE (case)
+     *         |
+     *         +--EXPR
+     *             |
+     *             +--NUM_INT (2)
+     *     +--SLIST
+     *         |
+     *         +--EXPR
+     *             |
+     *             +--ASSIGN (=)
+     *                 |
+     *                 +--IDENT (x)
+     *                 +--NUM_INT (3)
+     *         +--SEMI (;)
+     *         +--LITERAL_BREAK (break)
+     *             |
+     *             +--SEMI (;)
+     * </pre>
+     *
+     * @see #LITERAL_CASE
+     * @see #LITERAL_DEFAULT
+     * @see #LITERAL_SWITCH
+     **/
+    public static final int CASE_GROUP = GeneratedJavaTokenTypes.CASE_GROUP;
+    /**
+     * An expression list.  The children are a comma separated list of
+     * expressions.
+     *
+     * @see #LITERAL_NEW
+     * @see #FOR_INIT
+     * @see #FOR_ITERATOR
+     * @see #EXPR
+     * @see #METHOD_CALL
+     * @see #CTOR_CALL
+     * @see #SUPER_CTOR_CALL
+     **/
+    public static final int ELIST = GeneratedJavaTokenTypes.ELIST;
+    /**
+     * A for loop initializer.  This is a child of
+     * <code>LITERAL_FOR</code>.  The children of this element may be
+     * a comma separated list of variable declarations, an expression
+     * list, or empty.
+     *
+     * @see #VARIABLE_DEF
+     * @see #ELIST
+     * @see #LITERAL_FOR
+     **/
+    public static final int FOR_INIT = GeneratedJavaTokenTypes.FOR_INIT;
+    /**
+     * A for loop condition.  This is a child of
+     * <code>LITERAL_FOR</code>.  The child of this element is an
+     * optional expression.
+     *
+     * @see #EXPR
+     * @see #LITERAL_FOR
+     **/
+    public static final int FOR_CONDITION =
+        GeneratedJavaTokenTypes.FOR_CONDITION;
+
+    /**
+     * A for loop iterator.  This is a child of
+     * <code>LITERAL_FOR</code>.  The child of this element is an
+     * optional expression list.
+     *
+     * @see #ELIST
+     * @see #LITERAL_FOR
+     **/
+    public static final int FOR_ITERATOR =
+        GeneratedJavaTokenTypes.FOR_ITERATOR;
+
+    /**
+     * The empty statement.  This goes in place of an
+     * <code>SLIST</code> for a <code>for</code> or <code>while</code>
+     * loop body.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/statements.doc.html#5970">Java
+     * Language Specification, §14.6</a>
+     * @see #LITERAL_FOR
+     * @see #LITERAL_WHILE
+     **/
+    public static final int EMPTY_STAT = GeneratedJavaTokenTypes.EMPTY_STAT;
+    /**
+     * The <code>final</code> keyword.
+     *
+     * @see #MODIFIERS
+     **/
+    public static final int FINAL = GeneratedJavaTokenTypes.FINAL;
+    /**
+     * The <code>abstract</code> keyword.
+     *
+     * @see #MODIFIERS
+     **/
+    public static final int ABSTRACT = GeneratedJavaTokenTypes.ABSTRACT;
+    /**
+     * The <code>strictfp</code> keyword.
+     *
+     * @see #MODIFIERS
+     **/
+    public static final int STRICTFP = GeneratedJavaTokenTypes.STRICTFP;
+    /**
+     * A super constructor call.
+     *
+     * @see #ELIST
+     * @see #RPAREN
+     * @see #SEMI
+     * @see #CTOR_CALL
+     **/
+    public static final int SUPER_CTOR_CALL =
+        GeneratedJavaTokenTypes.SUPER_CTOR_CALL;
+
+    /**
+     * A constructor call.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * this(1);
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--CTOR_CALL (this)
+     *     |
+     *     +--LPAREN (()
+     *     +--ELIST
+     *         |
+     *         +--EXPR
+     *             |
+     *             +--NUM_INT (1)
+     *     +--RPAREN ())
+     *     +--SEMI (;)
+     * </pre>
+     *
+     * @see #ELIST
+     * @see #RPAREN
+     * @see #SEMI
+     * @see #SUPER_CTOR_CALL
+     **/
+    public static final int CTOR_CALL = GeneratedJavaTokenTypes.CTOR_CALL;
+    /* *
+     * This token does not appear in the tree.
+     *
+     * @see #PACKAGE_DEF
+     **/
+    //public static final int LITERAL_PACKAGE =
+    //    GeneratedJavaTokenTypes.LITERAL_package;
+
+    /**
+     * The statement terminator (<code>;</code>).  Depending on the
+     * context, this make occur as a sibling, a child, or not at all.
+     *
+     * @see #PACKAGE_DEF
+     * @see #IMPORT
+     * @see #SLIST
+     * @see #ARRAY_INIT
+     * @see #LITERAL_FOR
+     **/
+    public static final int SEMI = GeneratedJavaTokenTypes.SEMI;
+    /* *
+     * This token does not appear in the tree.
+     *
+     * @see #IMPORT
+     **/
+    // public static final int LITERAL_IMPORT =
+    //     GeneratedJavaTokenTypes.LITERAL_import;
+
+    /* *
+     * This token does not appear in the tree.
+     *
+     * @see #INDEX_OP
+     * @see #ARRAY_DECLARATOR
+     **/
+    //public static final int LBRACK = GeneratedJavaTokenTypes.LBRACK;
+    /**
+     * The <code>]</code> symbol.
+     *
+     * @see #INDEX_OP
+     * @see #ARRAY_DECLARATOR
+     **/
+    public static final int RBRACK = GeneratedJavaTokenTypes.RBRACK;
+    /**
+     * The <code>void</code> keyword.
+     *
+     * @see #TYPE
+     **/
+    public static final int LITERAL_VOID =
+        GeneratedJavaTokenTypes.LITERAL_void;
+
+    /**
+     * The <code>boolean</code> keyword.
+     *
+     * @see #TYPE
+     **/
+    public static final int LITERAL_BOOLEAN =
+        GeneratedJavaTokenTypes.LITERAL_boolean;
+
+    /**
+     * The <code>byte</code> keyword.
+     *
+     * @see #TYPE
+     **/
+    public static final int LITERAL_BYTE =
+        GeneratedJavaTokenTypes.LITERAL_byte;
+
+    /**
+     * The <code>char</code> keyword.
+     *
+     * @see #TYPE
+     **/
+    public static final int LITERAL_CHAR =
+        GeneratedJavaTokenTypes.LITERAL_char;
+
+    /**
+     * The <code>short</code> keyword.
+     *
+     * @see #TYPE
+     **/
+    public static final int LITERAL_SHORT =
+        GeneratedJavaTokenTypes.LITERAL_short;
+
+    /**
+     * The <code>int</code> keyword.
+     *
+     * @see #TYPE
+     **/
+    public static final int LITERAL_INT = GeneratedJavaTokenTypes.LITERAL_int;
+    /**
+     * The <code>float</code> keyword.
+     *
+     * @see #TYPE
+     **/
+    public static final int LITERAL_FLOAT =
+        GeneratedJavaTokenTypes.LITERAL_float;
+
+    /**
+     * The <code>long</code> keyword.
+     *
+     * @see #TYPE
+     **/
+    public static final int LITERAL_LONG =
+        GeneratedJavaTokenTypes.LITERAL_long;
+
+    /**
+     * The <code>double</code> keyword.
+     *
+     * @see #TYPE
+     **/
+    public static final int LITERAL_DOUBLE =
+        GeneratedJavaTokenTypes.LITERAL_double;
+
+    /**
+     * An identifier.  These can be names of types, subpackages,
+     * fields, methods, parameters, and local variables.
+     **/
+    public static final int IDENT = GeneratedJavaTokenTypes.IDENT;
+    /**
+     * The <code>.</code> (dot) operator.
+     *
+     * @see FullIdent
+     **/
+    public static final int DOT = GeneratedJavaTokenTypes.DOT;
+    /**
+     * The <code>*</code> (multiplication or wildcard) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html#26725">Java
+     * Language Specification, §7.5.2</a>
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5036">Java
+     * Language Specification, §15.17.1</a>
+     * @see #EXPR
+     * @see #IMPORT
+     **/
+    public static final int STAR = GeneratedJavaTokenTypes.STAR;
+    /**
+     * The <code>private</code> keyword.
+     *
+     * @see #MODIFIERS
+     **/
+    public static final int LITERAL_PRIVATE =
+        GeneratedJavaTokenTypes.LITERAL_private;
+
+    /**
+     * The <code>public</code> keyword.
+     *
+     * @see #MODIFIERS
+     **/
+    public static final int LITERAL_PUBLIC =
+        GeneratedJavaTokenTypes.LITERAL_public;
+
+    /**
+     * The <code>protected</code> keyword.
+     *
+     * @see #MODIFIERS
+     **/
+    public static final int LITERAL_PROTECTED =
+        GeneratedJavaTokenTypes.LITERAL_protected;
+
+    /**
+     * The <code>static</code> keyword.
+     *
+     * @see #MODIFIERS
+     **/
+    public static final int LITERAL_STATIC =
+        GeneratedJavaTokenTypes.LITERAL_static;
+
+    /**
+     * The <code>transient</code> keyword.
+     *
+     * @see #MODIFIERS
+     **/
+    public static final int LITERAL_TRANSIENT =
+        GeneratedJavaTokenTypes.LITERAL_transient;
+
+    /**
+     * The <code>native</code> keyword.
+     *
+     * @see #MODIFIERS
+     **/
+    public static final int LITERAL_NATIVE =
+        GeneratedJavaTokenTypes.LITERAL_native;
+
+    /**
+     * The <code>synchronized</code> keyword.  This may be used as a
+     * modifier of a method or in the definition of a synchronized
+     * block.
+     *
+     * <p>For example:</p>
+     *
+     * <pre>
+     * synchronized(this)
+     * {
+     *   x++;
+     * }
+     * </pre>
+     *
+     * <p>parses as:</p>
+     *
+     * <pre>
+     * +--LITERAL_SYNCHRONIZED (synchronized)
+     *     |
+     *     +--LPAREN (()
+     *     +--EXPR
+     *         |
+     *         +--LITERAL_THIS (this)
+     *     +--RPAREN ())
+     *     +--SLIST ({)
+     *         |
+     *         +--EXPR
+     *             |
+     *             +--POST_INC (++)
+     *                 |
+     *                 +--IDENT (x)
+     *         +--SEMI (;)
+     *         +--RCURLY (})
+     * +--RCURLY (})
+     * </pre>
+     *
+     * @see #MODIFIERS
+     * @see #LPAREN
+     * @see #EXPR
+     * @see #RPAREN
+     * @see #SLIST
+     * @see #RCURLY
+     **/
+    public static final int LITERAL_SYNCHRONIZED =
+        GeneratedJavaTokenTypes.LITERAL_synchronized;
+
+    /**
+     * The <code>volatile</code> keyword.
+     *
+     * @see #MODIFIERS
+     **/
+    public static final int LITERAL_VOLATILE =
+        GeneratedJavaTokenTypes.LITERAL_volatile;
+
+    /**
+     * The <code>class</code> keyword.  This element appears both
+     * as part of a class declaration, and inline to reference a
+     * class object.
+     *
+     * <p>For example:</p>
+     *
+     * <pre>
+     * int.class
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--EXPR
+     *     |
+     *     +--DOT (.)
+     *         |
+     *         +--LITERAL_INT (int)
+     *         +--LITERAL_CLASS (class)
+     * </pre>
+     *
+     * @see #DOT
+     * @see #IDENT
+     * @see #CLASS_DEF
+     * @see FullIdent
+     **/
+    public static final int LITERAL_CLASS =
+        GeneratedJavaTokenTypes.LITERAL_class;
+
+    /* *
+     * This token does not appear in the tree.
+     *
+     * @see #EXTENDS_CLAUSE
+     **/
+    //public static final int LITERAL_EXTENDS =
+    //    GeneratedJavaTokenTypes.LITERAL_extends;
+
+    /**
+     * The <code>interface</code> keyword. This token appears in
+     * interface definition.
+     *
+     * @see #INTERFACE_DEF
+     **/
+    public static final int LITERAL_INTERFACE =
+        GeneratedJavaTokenTypes.LITERAL_interface;
+
+    /**
+     * A left (curly) brace (<code>{</code>).
+     *
+     * @see #OBJBLOCK
+     * @see #ARRAY_INIT
+     * @see #SLIST
+     **/
+    public static final int LCURLY = GeneratedJavaTokenTypes.LCURLY;
+    /**
+     * A right (curly) brace (<code>}</code>).
+     *
+     * @see #OBJBLOCK
+     * @see #ARRAY_INIT
+     * @see #SLIST
+     **/
+    public static final int RCURLY = GeneratedJavaTokenTypes.RCURLY;
+    /**
+     * The <code>,</code> (comma) operator.
+     *
+     * @see #ARRAY_INIT
+     * @see #FOR_INIT
+     * @see #FOR_ITERATOR
+     * @see #LITERAL_THROWS
+     * @see #IMPLEMENTS_CLAUSE
+     **/
+    public static final int COMMA = GeneratedJavaTokenTypes.COMMA;
+    /* *
+     * This token does not appear in the tree.
+     *
+     * @see #IMPLEMENTS_CLAUSE
+     **/
+    // public static final int LITERAL_IMPLEMENTS =
+    //     GeneratedJavaTokenTypes.LITERAL_implements;
+
+    /**
+     * A left parenthesis (<code>(</code>).
+     *
+     * @see #LITERAL_FOR
+     * @see #LITERAL_NEW
+     * @see #EXPR
+     * @see #LITERAL_SWITCH
+     * @see #LITERAL_CATCH
+     **/
+    public static final int LPAREN = GeneratedJavaTokenTypes.LPAREN;
+    /**
+     * A right parenthesis (<code>)</code>).
+     *
+     * @see #LITERAL_FOR
+     * @see #LITERAL_NEW
+     * @see #METHOD_CALL
+     * @see #TYPECAST
+     * @see #EXPR
+     * @see #LITERAL_SWITCH
+     * @see #LITERAL_CATCH
+     **/
+    public static final int RPAREN = GeneratedJavaTokenTypes.RPAREN;
+    /**
+     * The <code>this</code> keyword.
+     *
+     * @see #EXPR
+     * @see #CTOR_CALL
+     **/
+    public static final int LITERAL_THIS =
+        GeneratedJavaTokenTypes.LITERAL_this;
+
+    /**
+     * The <code>super</code> keyword.
+     *
+     * @see #EXPR
+     * @see #SUPER_CTOR_CALL
+     **/
+    public static final int LITERAL_SUPER =
+        GeneratedJavaTokenTypes.LITERAL_super;
+
+    /**
+     * The <code>=</code> (assignment) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5295">Java
+     * Language Specification, §15.26.1</a>
+     * @see #EXPR
+     **/
+    public static final int ASSIGN = GeneratedJavaTokenTypes.ASSIGN;
+    /**
+     * The <code>throws</code> keyword.  The children are a number of
+     * one or more identifiers separated by commas.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#78323">Java
+     * Language Specification, §8.4.4</a>
+     * @see #IDENT
+     * @see #DOT
+     * @see #COMMA
+     * @see #METHOD_DEF
+     * @see #CTOR_DEF
+     * @see FullIdent
+     **/
+    public static final int LITERAL_THROWS =
+        GeneratedJavaTokenTypes.LITERAL_throws;
+
+    /**
+     * The <code>:</code> (colon) operator.  This will appear as part
+     * of the conditional operator (<code>? :</code>).
+     *
+     * @see #QUESTION
+     * @see #LABELED_STAT
+     * @see #CASE_GROUP
+     **/
+    public static final int COLON = GeneratedJavaTokenTypes.COLON;
+
+    /**
+     * The <code>::</code> (double colon) operator.
+     * It is part of Java 8 syntax that is used for method reference.
+     * @see #METHOD_REF
+     */
+    public static final int DOUBLE_COLON = GeneratedJavaTokenTypes.DOUBLE_COLON;
+    /**
+     * The <code>if</code> keyword.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * if(optimistic)
+     * {
+     *   message = "half full";
+     * }
+     * else
+     * {
+     *   message = "half empty";
+     * }
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--LITERAL_IF (if)
+     *     |
+     *     +--LPAREN (()
+     *     +--EXPR
+     *         |
+     *         +--IDENT (optimistic)
+     *     +--RPAREN ())
+     *     +--SLIST ({)
+     *         |
+     *         +--EXPR
+     *             |
+     *             +--ASSIGN (=)
+     *                 |
+     *                 +--IDENT (message)
+     *                 +--STRING_LITERAL ("half full")
+     *         +--SEMI (;)
+     *         +--RCURLY (})
+     *     +--LITERAL_ELSE (else)
+     *         |
+     *         +--SLIST ({)
+     *             |
+     *             +--EXPR
+     *                 |
+     *                 +--ASSIGN (=)
+     *                     |
+     *                     +--IDENT (message)
+     *                     +--STRING_LITERAL ("half empty")
+     *             +--SEMI (;)
+     *             +--RCURLY (})
+     * </pre>
+     *
+     * @see #LPAREN
+     * @see #EXPR
+     * @see #RPAREN
+     * @see #SLIST
+     * @see #EMPTY_STAT
+     * @see #LITERAL_ELSE
+     **/
+    public static final int LITERAL_IF = GeneratedJavaTokenTypes.LITERAL_if;
+    /**
+     * The <code>for</code> keyword.  The children are <code>(</code>,
+     * an initializer, a condition, an iterator, a <code>)</code> and
+     * either a statement list, a single expression, or an empty
+     * statement.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * for(int i = 0, n = myArray.length; i < n; i++)
+     * {
+     * }
+     * </pre>
+     *
+     * <p>parses as:</p>
+     * <pre>
+     * +--LITERAL_FOR (for)
+     *     |
+     *     +--LPAREN (()
+     *     +--FOR_INIT
+     *         |
+     *         +--VARIABLE_DEF
+     *             |
+     *             +--MODIFIERS
+     *             +--TYPE
+     *                 |
+     *                 +--LITERAL_INT (int)
+     *             +--IDENT (i)
+     *             +--ASSIGN (=)
+     *                 |
+     *                 +--EXPR
+     *                     |
+     *                     +--NUM_INT (0)
+     *         +--COMMA (,)
+     *         +--VARIABLE_DEF
+     *             |
+     *             +--MODIFIERS
+     *             +--TYPE
+     *                 |
+     *                 +--LITERAL_INT (int)
+     *             +--IDENT (n)
+     *             +--ASSIGN (=)
+     *                 |
+     *                 +--EXPR
+     *                     |
+     *                     +--DOT (.)
+     *                         |
+     *                         +--IDENT (myArray)
+     *                         +--IDENT (length)
+     *     +--SEMI (;)
+     *     +--FOR_CONDITION
+     *         |
+     *         +--EXPR
+     *             |
+     *             +--LT (<)
+     *                 |
+     *                 +--IDENT (i)
+     *                 +--IDENT (n)
+     *     +--SEMI (;)
+     *     +--FOR_ITERATOR
+     *         |
+     *         +--ELIST
+     *             |
+     *             +--EXPR
+     *                 |
+     *                 +--POST_INC (++)
+     *                     |
+     *                     +--IDENT (i)
+     *     +--RPAREN ())
+     *     +--SLIST ({)
+     *         |
+     *         +--RCURLY (})
+     * </pre>
+     *
+     * @see #LPAREN
+     * @see #FOR_INIT
+     * @see #SEMI
+     * @see #FOR_CONDITION
+     * @see #FOR_ITERATOR
+     * @see #RPAREN
+     * @see #SLIST
+     * @see #EMPTY_STAT
+     * @see #EXPR
+     **/
+    public static final int LITERAL_FOR = GeneratedJavaTokenTypes.LITERAL_for;
+    /**
+     * The <code>while</code> keyword.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * while(line != null)
+     * {
+     *   process(line);
+     *   line = in.readLine();
+     * }
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--LITERAL_WHILE (while)
+     *     |
+     *     +--LPAREN (()
+     *     +--EXPR
+     *         |
+     *         +--NOT_EQUAL (!=)
+     *             |
+     *             +--IDENT (line)
+     *             +--LITERAL_NULL (null)
+     *     +--RPAREN ())
+     *     +--SLIST ({)
+     *         |
+     *         +--EXPR
+     *             |
+     *             +--METHOD_CALL (()
+     *                 |
+     *                 +--IDENT (process)
+     *                 +--ELIST
+     *                     |
+     *                     +--EXPR
+     *                         |
+     *                         +--IDENT (line)
+     *                 +--RPAREN ())
+     *         +--SEMI (;)
+     *         +--EXPR
+     *             |
+     *             +--ASSIGN (=)
+     *                 |
+     *                 +--IDENT (line)
+     *                 +--METHOD_CALL (()
+     *                     |
+     *                     +--DOT (.)
+     *                         |
+     *                         +--IDENT (in)
+     *                         +--IDENT (readLine)
+     *                     +--ELIST
+     *                     +--RPAREN ())
+     *         +--SEMI (;)
+     *         +--RCURLY (})
+     * </pre>
+     **/
+    public static final int LITERAL_WHILE =
+        GeneratedJavaTokenTypes.LITERAL_while;
+
+    /**
+     * The <code>do</code> keyword.  Note the the while token does not
+     * appear as part of the do-while construct.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * do
+     * {
+     *   x = rand.nextInt(10);
+     * }
+     * while(x < 5);
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--LITERAL_DO (do)
+     *     |
+     *     +--SLIST ({)
+     *         |
+     *         +--EXPR
+     *             |
+     *             +--ASSIGN (=)
+     *                 |
+     *                 +--IDENT (x)
+     *                 +--METHOD_CALL (()
+     *                     |
+     *                     +--DOT (.)
+     *                         |
+     *                         +--IDENT (rand)
+     *                         +--IDENT (nextInt)
+     *                     +--ELIST
+     *                         |
+     *                         +--EXPR
+     *                             |
+     *                             +--NUM_INT (10)
+     *                     +--RPAREN ())
+     *         +--SEMI (;)
+     *         +--RCURLY (})
+     *     +--LPAREN (()
+     *     +--EXPR
+     *         |
+     *         +--LT (<)
+     *             |
+     *             +--IDENT (x)
+     *             +--NUM_INT (5)
+     *     +--RPAREN ())
+     *     +--SEMI (;)
+     * </pre>
+     *
+     * @see #SLIST
+     * @see #EXPR
+     * @see #EMPTY_STAT
+     * @see #LPAREN
+     * @see #RPAREN
+     * @see #SEMI
+     **/
+    public static final int LITERAL_DO = GeneratedJavaTokenTypes.LITERAL_do;
+    /**
+     * Literal <code>while</code> in do-while loop.
+     * @see #LITERAL_DO
+     */
+    public static final int DO_WHILE = GeneratedJavaTokenTypes.DO_WHILE;
+    /**
+     * The <code>break</code> keyword.  The first child is an optional
+     * identifier and the last child is a semicolon.
+     *
+     * @see #IDENT
+     * @see #SEMI
+     * @see #SLIST
+     **/
+    public static final int LITERAL_BREAK =
+        GeneratedJavaTokenTypes.LITERAL_break;
+
+    /**
+     * The <code>continue</code> keyword.  The first child is an
+     * optional identifier and the last child is a semicolon.
+     *
+     * @see #IDENT
+     * @see #SEMI
+     * @see #SLIST
+     **/
+    public static final int LITERAL_CONTINUE =
+        GeneratedJavaTokenTypes.LITERAL_continue;
+
+    /**
+     * The <code>return</code> keyword.  The first child is an
+     * optional expression for the return value.  The last child is a
+     * semi colon.
+     *
+     * @see #EXPR
+     * @see #SEMI
+     * @see #SLIST
+     **/
+    public static final int LITERAL_RETURN =
+        GeneratedJavaTokenTypes.LITERAL_return;
+
+    /**
+     * The <code>switch</code> keyword.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * switch(type)
+     * {
+     *   case 0:
+     *     background = Color.blue;
+     *     break;
+     *   case 1:
+     *     background = Color.red;
+     *     break;
+     *   default:
+     *     background = Color.green;
+     *     break;
+     * }
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--LITERAL_SWITCH (switch)
+     *     |
+     *     +--LPAREN (()
+     *     +--EXPR
+     *         |
+     *         +--IDENT (type)
+     *     +--RPAREN ())
+     *     +--LCURLY ({)
+     *     +--CASE_GROUP
+     *         |
+     *         +--LITERAL_CASE (case)
+     *             |
+     *             +--EXPR
+     *                 |
+     *                 +--NUM_INT (0)
+     *         +--SLIST
+     *             |
+     *             +--EXPR
+     *                 |
+     *                 +--ASSIGN (=)
+     *                     |
+     *                     +--IDENT (background)
+     *                     +--DOT (.)
+     *                         |
+     *                         +--IDENT (Color)
+     *                         +--IDENT (blue)
+     *             +--SEMI (;)
+     *             +--LITERAL_BREAK (break)
+     *                 |
+     *                 +--SEMI (;)
+     *     +--CASE_GROUP
+     *         |
+     *         +--LITERAL_CASE (case)
+     *             |
+     *             +--EXPR
+     *                 |
+     *                 +--NUM_INT (1)
+     *         +--SLIST
+     *             |
+     *             +--EXPR
+     *                 |
+     *                 +--ASSIGN (=)
+     *                     |
+     *                     +--IDENT (background)
+     *                     +--DOT (.)
+     *                         |
+     *                         +--IDENT (Color)
+     *                         +--IDENT (red)
+     *             +--SEMI (;)
+     *             +--LITERAL_BREAK (break)
+     *                 |
+     *                 +--SEMI (;)
+     *     +--CASE_GROUP
+     *         |
+     *         +--LITERAL_DEFAULT (default)
+     *         +--SLIST
+     *             |
+     *             +--EXPR
+     *                 |
+     *                 +--ASSIGN (=)
+     *                     |
+     *                     +--IDENT (background)
+     *                     +--DOT (.)
+     *                         |
+     *                         +--IDENT (Color)
+     *                         +--IDENT (green)
+     *             +--SEMI (;)
+     *             +--LITERAL_BREAK (break)
+     *                 |
+     *                 +--SEMI (;)
+     *     +--RCURLY (})
+     * </pre>
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/statements.doc.html#35518">Java
+     * Language Specification, §14.10</a>
+     * @see #LPAREN
+     * @see #EXPR
+     * @see #RPAREN
+     * @see #LCURLY
+     * @see #CASE_GROUP
+     * @see #RCURLY
+     * @see #SLIST
+     **/
+    public static final int LITERAL_SWITCH =
+        GeneratedJavaTokenTypes.LITERAL_switch;
+
+    /**
+     * The <code>throw</code> keyword.  The first child is an
+     * expression that evaluates to a <code>Throwable</code> instance.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/statements.doc.html#237350">Java
+     * Language Specification, §14.17</a>
+     * @see #SLIST
+     * @see #EXPR
+     **/
+    public static final int LITERAL_THROW =
+        GeneratedJavaTokenTypes.LITERAL_throw;
+
+    /**
+     * The <code>else</code> keyword.  This appears as a child of an
+     * <code>if</code> statement.
+     *
+     * @see #SLIST
+     * @see #EXPR
+     * @see #EMPTY_STAT
+     * @see #LITERAL_IF
+     **/
+    public static final int LITERAL_ELSE =
+        GeneratedJavaTokenTypes.LITERAL_else;
+
+    /**
+     * The <code>case</code> keyword.  The first child is a constant
+     * expression that evaluates to a integer.
+     *
+     * @see #CASE_GROUP
+     * @see #EXPR
+     **/
+    public static final int LITERAL_CASE =
+        GeneratedJavaTokenTypes.LITERAL_case;
+
+    /**
+     * The <code>default</code> keyword.  This element has no
+     * children.
+     *
+     * @see #CASE_GROUP
+     * @see #MODIFIERS
+     **/
+    public static final int LITERAL_DEFAULT =
+        GeneratedJavaTokenTypes.LITERAL_default;
+
+    /**
+     * The <code>try</code> keyword.  The children are a statement
+     * list, zero or more catch blocks and then an optional finally
+     * block.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * try
+     * {
+     *   FileReader in = new FileReader("abc.txt");
+     * }
+     * catch(IOException ioe)
+     * {
+     * }
+     * finally
+     * {
+     * }
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--LITERAL_TRY (try)
+     *     |
+     *     +--SLIST ({)
+     *         |
+     *         +--VARIABLE_DEF
+     *             |
+     *             +--MODIFIERS
+     *             +--TYPE
+     *                 |
+     *                 +--IDENT (FileReader)
+     *             +--IDENT (in)
+     *             +--ASSIGN (=)
+     *                 |
+     *                 +--EXPR
+     *                     |
+     *                     +--LITERAL_NEW (new)
+     *                         |
+     *                         +--IDENT (FileReader)
+     *                         +--LPAREN (()
+     *                         +--ELIST
+     *                             |
+     *                             +--EXPR
+     *                                 |
+     *                                 +--STRING_LITERAL ("abc.txt")
+     *                         +--RPAREN ())
+     *         +--SEMI (;)
+     *         +--RCURLY (})
+     *     +--LITERAL_CATCH (catch)
+     *         |
+     *         +--LPAREN (()
+     *         +--PARAMETER_DEF
+     *             |
+     *             +--MODIFIERS
+     *             +--TYPE
+     *                 |
+     *                 +--IDENT (IOException)
+     *             +--IDENT (ioe)
+     *         +--RPAREN ())
+     *         +--SLIST ({)
+     *             |
+     *             +--RCURLY (})
+     *     +--LITERAL_FINALLY (finally)
+     *         |
+     *         +--SLIST ({)
+     *             |
+     *             +--RCURLY (})
+     * +--RCURLY (})
+     * </pre>
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/statements.doc.html#79311">Java
+     * Language Specification, §14.19</a>
+     * @see #SLIST
+     * @see #LITERAL_CATCH
+     * @see #LITERAL_FINALLY
+     **/
+    public static final int LITERAL_TRY = GeneratedJavaTokenTypes.LITERAL_try;
+
+    /**
+     * Java 7 try-with-resources construct.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * try (Foo foo = new Foo(); Bar bar = new Bar()) { }
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--LITERAL_TRY (try)
+     *     |
+     *     +--RESOURCE_SPECIFICATION
+     *         |
+     *         +--LPAREN (()
+     *         +--RESOURCES
+     *             |
+     *             +--RESOURCE
+     *                 |
+     *                 +--MODIFIERS
+     *                 +--TYPE
+     *                     |
+     *                     +--IDENT (Foo)
+     *                 +--IDENT (foo)
+     *                 +--ASSIGN (=)
+     *                 +--EXPR
+     *                    |
+     *                    +--LITERAL_NEW (new)
+     *                       |
+     *                       +--IDENT (Foo)
+     *                       +--LPAREN (()
+     *                       +--ELIST
+     *                       +--RPAREN ())
+     *             +--SEMI (;)
+     *             +--RESOURCE
+     *                 |
+     *                 +--MODIFIERS
+     *                 +--TYPE
+     *                     |
+     *                     +--IDENT (Bar)
+     *                 +--IDENT (bar)
+     *                 +--ASSIGN (=)
+     *                 +--EXPR
+     *                    |
+     *                    +--LITERAL_NEW (new)
+     *                       |
+     *                       +--IDENT (Bar)
+     *                       +--LPAREN (()
+     *                       +--ELIST
+     *                       +--RPAREN ())
+     *         +--RPAREN ())
+     *     +--SLIST ({)
+     *         +--RCURLY (})
+     * </pre>
+     *
+     * @see #LPAREN
+     * @see #RESOURCES
+     * @see #RESOURCE
+     * @see #SEMI
+     * @see #RPAREN
+     * @see #LITERAL_TRY
+     **/
+    public static final int RESOURCE_SPECIFICATION =
+        GeneratedJavaTokenTypes.RESOURCE_SPECIFICATION;
+
+    /**
+     * Java 7 try-with-resources construct.
+     *
+     * @see #RESOURCE_SPECIFICATION
+     **/
+    public static final int RESOURCES =
+        GeneratedJavaTokenTypes.RESOURCES;
+
+    /**
+     * Java 7 try-with-resources construct.
+     *
+     * @see #RESOURCE_SPECIFICATION
+     **/
+    public static final int RESOURCE =
+        GeneratedJavaTokenTypes.RESOURCE;
+
+    /**
+     * The <code>catch</code> keyword.
+     *
+     * @see #LPAREN
+     * @see #PARAMETER_DEF
+     * @see #RPAREN
+     * @see #SLIST
+     * @see #LITERAL_TRY
+     **/
+    public static final int LITERAL_CATCH =
+        GeneratedJavaTokenTypes.LITERAL_catch;
+
+    /**
+     * The <code>finally</code> keyword.
+     *
+     * @see #SLIST
+     * @see #LITERAL_TRY
+     **/
+    public static final int LITERAL_FINALLY =
+        GeneratedJavaTokenTypes.LITERAL_finally;
+
+    /**
+     * The <code>+=</code> (addition assignment) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
+     * Language Specification, §15.26.2</a>
+     * @see #EXPR
+     **/
+    public static final int PLUS_ASSIGN = GeneratedJavaTokenTypes.PLUS_ASSIGN;
+    /**
+     * The <code>-=</code> (subtraction assignment) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
+     * Language Specification, §15.26.2</a>
+     * @see #EXPR
+     **/
+    public static final int MINUS_ASSIGN =
+        GeneratedJavaTokenTypes.MINUS_ASSIGN;
+
+    /**
+     * The <code>*=</code> (multiplication assignment) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
+     * Language Specification, §15.26.2</a>
+     * @see #EXPR
+     **/
+    public static final int STAR_ASSIGN = GeneratedJavaTokenTypes.STAR_ASSIGN;
+    /**
+     * The <code>/=</code> (division assignment) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
+     * Language Specification, §15.26.2</a>
+     * @see #EXPR
+     **/
+    public static final int DIV_ASSIGN = GeneratedJavaTokenTypes.DIV_ASSIGN;
+    /**
+     * The <code>%=</code> (remainder assignment) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
+     * Language Specification, §15.26.2</a>
+     * @see #EXPR
+     **/
+    public static final int MOD_ASSIGN = GeneratedJavaTokenTypes.MOD_ASSIGN;
+    /**
+     * The <code>>>=</code> (signed right shift assignment)
+     * operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
+     * Language Specification, §15.26.2</a>
+     * @see #EXPR
+     **/
+    public static final int SR_ASSIGN = GeneratedJavaTokenTypes.SR_ASSIGN;
+    /**
+     * The <code>>>>=</code> (unsigned right shift assignment)
+     * operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
+     * Language Specification, §15.26.2</a>
+     * @see #EXPR
+     **/
+    public static final int BSR_ASSIGN = GeneratedJavaTokenTypes.BSR_ASSIGN;
+    /**
+     * The <code><<=</code> (left shift assignment) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
+     * Language Specification, §15.26.2</a>
+     * @see #EXPR
+     **/
+    public static final int SL_ASSIGN = GeneratedJavaTokenTypes.SL_ASSIGN;
+    /**
+     * The <code>&=</code> (bitwise AND assignment) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
+     * Language Specification, §15.26.2</a>
+     * @see #EXPR
+     **/
+    public static final int BAND_ASSIGN = GeneratedJavaTokenTypes.BAND_ASSIGN;
+    /**
+     * The <code>^=</code> (bitwise exclusive OR assignment) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
+     * Language Specification, §15.26.2</a>
+     * @see #EXPR
+     **/
+    public static final int BXOR_ASSIGN = GeneratedJavaTokenTypes.BXOR_ASSIGN;
+    /**
+     * The <code>|=</code> (bitwise OR assignment) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
+     * Language Specification, §15.26.2</a>
+     * @see #EXPR
+     **/
+    public static final int BOR_ASSIGN = GeneratedJavaTokenTypes.BOR_ASSIGN;
+    /**
+     * The <code>?</code> (conditional) operator.  Technically,
+     * the colon is also part of this operator, but it appears as a
+     * separate token.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * (quantity == 1) ? "": "s"
+     * </pre>
+     * <p>
+     * parses as:
+     * </p>
+     * <pre>
+     * +--QUESTION (?)
+     *     |
+     *     +--LPAREN (()
+     *     +--EQUAL (==)
+     *         |
+     *         +--IDENT (quantity)
+     *         +--NUM_INT (1)
+     *     +--RPAREN ())
+     *     +--STRING_LITERAL ("")
+     *     +--COLON (:)
+     *     +--STRING_LITERAL ("s")
+     * </pre>
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#290293">Java
+     * Language Specification, §15.25</a>
+     * @see #EXPR
+     * @see #COLON
+     **/
+    public static final int QUESTION = GeneratedJavaTokenTypes.QUESTION;
+    /**
+     * The <code>||</code> (conditional OR) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#54532">Java
+     * Language Specification, §15.24</a>
+     * @see #EXPR
+     **/
+    public static final int LOR = GeneratedJavaTokenTypes.LOR;
+    /**
+     * The <code>&&</code> (conditional AND) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5247">Java
+     * Language Specification, §15.23</a>
+     * @see #EXPR
+     **/
+    public static final int LAND = GeneratedJavaTokenTypes.LAND;
+    /**
+     * The <code>|</code> (bitwise OR) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5233">Java
+     * Language Specification, §15.22.1</a>
+     * @see #EXPR
+     **/
+    public static final int BOR = GeneratedJavaTokenTypes.BOR;
+    /**
+     * The <code>^</code> (bitwise exclusive OR) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5233">Java
+     * Language Specification, §15.22.1</a>
+     * @see #EXPR
+     **/
+    public static final int BXOR = GeneratedJavaTokenTypes.BXOR;
+    /**
+     * The <code>&</code> (bitwise AND) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5233">Java
+     * Language Specification, §15.22.1</a>
+     * @see #EXPR
+     **/
+    public static final int BAND = GeneratedJavaTokenTypes.BAND;
+    /**
+     * The <code>!=</code> (not equal) operator.
+     *
+     * @see #EXPR
+     **/
+    public static final int NOT_EQUAL = GeneratedJavaTokenTypes.NOT_EQUAL;
+    /**
+     * The <code>==</code> (equal) operator.
+     *
+     * @see #EXPR
+     **/
+    public static final int EQUAL = GeneratedJavaTokenTypes.EQUAL;
+    /**
+     * The <code><</code> (less than) operator.
+     *
+     * @see #EXPR
+     **/
+    public static final int LT = GeneratedJavaTokenTypes.LT;
+    /**
+     * The <code>></code> (greater than) operator.
+     *
+     * @see #EXPR
+     **/
+    public static final int GT = GeneratedJavaTokenTypes.GT;
+    /**
+     * The <code><=</code> (less than or equal) operator.
+     *
+     * @see #EXPR
+     **/
+    public static final int LE = GeneratedJavaTokenTypes.LE;
+    /**
+     * The <code>>=</code> (greater than or equal) operator.
+     *
+     * @see #EXPR
+     **/
+    public static final int GE = GeneratedJavaTokenTypes.GE;
+    /**
+     * The <code>instanceof</code> operator.  The first child is an
+     * object reference or something that evaluates to an object
+     * reference.  The second child is a reference type.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#80289">Java
+     * Language Specification, §15.20.2</a>
+     * @see #EXPR
+     * @see #METHOD_CALL
+     * @see #IDENT
+     * @see #DOT
+     * @see #TYPE
+     * @see FullIdent
+     **/
+    public static final int LITERAL_INSTANCEOF =
+        GeneratedJavaTokenTypes.LITERAL_instanceof;
+
+    /**
+     * The <code><<</code> (shift left) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5121">Java
+     * Language Specification, §15.19</a>
+     * @see #EXPR
+     **/
+    public static final int SL = GeneratedJavaTokenTypes.SL;
+    /**
+     * The <code>>></code> (signed shift right) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5121">Java
+     * Language Specification, §15.19</a>
+     * @see #EXPR
+     **/
+    public static final int SR = GeneratedJavaTokenTypes.SR;
+    /**
+     * The <code>>>></code> (unsigned shift right) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5121">Java
+     * Language Specification, §15.19</a>
+     * @see #EXPR
+     **/
+    public static final int BSR = GeneratedJavaTokenTypes.BSR;
+    /**
+     * The <code>+</code> (addition) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#15746">Java
+     * Language Specification, §15.18</a>
+     * @see #EXPR
+     **/
+    public static final int PLUS = GeneratedJavaTokenTypes.PLUS;
+    /**
+     * The <code>-</code> (subtraction) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#15746">Java
+     * Language Specification, §15.18</a>
+     * @see #EXPR
+     **/
+    public static final int MINUS = GeneratedJavaTokenTypes.MINUS;
+    /**
+     * The <code>/</code> (division) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5047">Java
+     * Language Specification, §15.17.2</a>
+     * @see #EXPR
+     **/
+    public static final int DIV = GeneratedJavaTokenTypes.DIV;
+    /**
+     * The <code>%</code> (remainder) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#24956">Java
+     * Language Specification, §15.17.3</a>
+     * @see #EXPR
+     **/
+    public static final int MOD = GeneratedJavaTokenTypes.MOD;
+    /**
+     * The <code>++</code> (prefix increment) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#39547">Java
+     * Language Specification, §15.15.1</a>
+     * @see #EXPR
+     * @see #POST_INC
+     **/
+    public static final int INC = GeneratedJavaTokenTypes.INC;
+    /**
+     * The <code>--</code> (prefix decrement) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#239136">Java
+     * Language Specification, §15.15.2</a>
+     * @see #EXPR
+     * @see #POST_DEC
+     **/
+    public static final int DEC = GeneratedJavaTokenTypes.DEC;
+    /**
+     * The <code>~</code> (bitwise complement) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5017">Java
+     * Language Specification, §15.15.5</a>
+     * @see #EXPR
+     **/
+    public static final int BNOT = GeneratedJavaTokenTypes.BNOT;
+    /**
+     * The <code>!</code> (logical complement) operator.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#13350">Java
+     * Language Specification, §15.15.6</a>
+     * @see #EXPR
+     **/
+    public static final int LNOT = GeneratedJavaTokenTypes.LNOT;
+    /**
+     * The <code>true</code> keyword.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#49652">Java
+     * Language Specification, §3.10.3</a>
+     * @see #EXPR
+     * @see #LITERAL_FALSE
+     **/
+    public static final int LITERAL_TRUE =
+        GeneratedJavaTokenTypes.LITERAL_true;
+
+    /**
+     * The <code>false</code> keyword.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#49652">Java
+     * Language Specification, §3.10.3</a>
+     * @see #EXPR
+     * @see #LITERAL_TRUE
+     **/
+    public static final int LITERAL_FALSE =
+        GeneratedJavaTokenTypes.LITERAL_false;
+
+    /**
+     * The <code>null</code> keyword.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#230717">Java
+     * Language Specification, §3.10.7</a>
+     * @see #EXPR
+     **/
+    public static final int LITERAL_NULL =
+        GeneratedJavaTokenTypes.LITERAL_null;
+
+    /**
+     * The <code>new</code> keyword.  This element is used to define
+     * new instances of objects, new arrays, and new anonymous inner
+     * classes.
+     *
+     * <p>For example:</p>
+     *
+     * <pre>
+     * new ArrayList(50)
+     * </pre>
+     *
+     * <p>parses as:</p>
+     * <pre>
+     * +--LITERAL_NEW (new)
+     *     |
+     *     +--IDENT (ArrayList)
+     *     +--LPAREN (()
+     *     +--ELIST
+     *         |
+     *         +--EXPR
+     *             |
+     *             +--NUM_INT (50)
+     *     +--RPAREN ())
+     * </pre>
+     *
+     * <p>For example:</p>
+     * <pre>
+     * new float[]
+     *   {
+     *     3.0f,
+     *     4.0f
+     *   };
+     * </pre>
+     *
+     * <p>parses as:</p>
+     * <pre>
+     * +--LITERAL_NEW (new)
+     *     |
+     *     +--LITERAL_FLOAT (float)
+     *     +--ARRAY_DECLARATOR ([)
+     *     +--ARRAY_INIT ({)
+     *         |
+     *         +--EXPR
+     *             |
+     *             +--NUM_FLOAT (3.0f)
+     *         +--COMMA (,)
+     *         +--EXPR
+     *             |
+     *             +--NUM_FLOAT (4.0f)
+     *         +--RCURLY (})
+     * </pre>
+     *
+     * <p>For example:</p>
+     * <pre>
+     * new FilenameFilter()
+     * {
+     *   public boolean accept(File dir, String name)
+     *   {
+     *     return name.endsWith(".java");
+     *   }
+     * }
+     * </pre>
+     *
+     * <p>parses as:</p>
+     * <pre>
+     * +--LITERAL_NEW (new)
+     *     |
+     *     +--IDENT (FilenameFilter)
+     *     +--LPAREN (()
+     *     +--ELIST
+     *     +--RPAREN ())
+     *     +--OBJBLOCK
+     *         |
+     *         +--LCURLY ({)
+     *         +--METHOD_DEF
+     *             |
+     *             +--MODIFIERS
+     *                 |
+     *                 +--LITERAL_PUBLIC (public)
+     *             +--TYPE
+     *                 |
+     *                 +--LITERAL_BOOLEAN (boolean)
+     *             +--IDENT (accept)
+     *             +--PARAMETERS
+     *                 |
+     *                 +--PARAMETER_DEF
+     *                     |
+     *                     +--MODIFIERS
+     *                     +--TYPE
+     *                         |
+     *                         +--IDENT (File)
+     *                     +--IDENT (dir)
+     *                 +--COMMA (,)
+     *                 +--PARAMETER_DEF
+     *                     |
+     *                     +--MODIFIERS
+     *                     +--TYPE
+     *                         |
+     *                         +--IDENT (String)
+     *                     +--IDENT (name)
+     *             +--SLIST ({)
+     *                 |
+     *                 +--LITERAL_RETURN (return)
+     *                     |
+     *                     +--EXPR
+     *                         |
+     *                         +--METHOD_CALL (()
+     *                             |
+     *                             +--DOT (.)
+     *                                 |
+     *                                 +--IDENT (name)
+     *                                 +--IDENT (endsWith)
+     *                             +--ELIST
+     *                                 |
+     *                                 +--EXPR
+     *                                     |
+     *                                     +--STRING_LITERAL (".java")
+     *                             +--RPAREN ())
+     *                     +--SEMI (;)
+     *                 +--RCURLY (})
+     *         +--RCURLY (})
+     * </pre>
+     *
+     * @see #IDENT
+     * @see #DOT
+     * @see #LPAREN
+     * @see #ELIST
+     * @see #RPAREN
+     * @see #OBJBLOCK
+     * @see #ARRAY_INIT
+     * @see FullIdent
+     **/
+    public static final int LITERAL_NEW = GeneratedJavaTokenTypes.LITERAL_new;
+    /**
+     * An integer literal.  These may be specified in decimal,
+     * hexadecimal, or octal form.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#48282">Java
+     * Language Specification, §3.10.1</a>
+     * @see #EXPR
+     * @see #NUM_LONG
+     **/
+    public static final int NUM_INT = GeneratedJavaTokenTypes.NUM_INT;
+    /**
+     * A character literal.  This is a (possibly escaped) character
+     * enclosed in single quotes.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#100960">Java
+     * Language Specification, §3.10.4</a>
+     * @see #EXPR
+     **/
+    public static final int CHAR_LITERAL =
+        GeneratedJavaTokenTypes.CHAR_LITERAL;
+
+    /**
+     * A string literal.  This is a sequence of (possibly escaped)
+     * characters enclosed in double quotes.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#101084">Java
+     * Language Specification, §3.10.5</a>
+     * @see #EXPR
+     **/
+    public static final int STRING_LITERAL =
+        GeneratedJavaTokenTypes.STRING_LITERAL;
+
+    /**
+     * A single precision floating point literal.  This is a floating
+     * point number with an <code>F</code> or <code>f</code> suffix.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#230798">Java
+     * Language Specification, §3.10.2</a>
+     * @see #EXPR
+     * @see #NUM_DOUBLE
+     **/
+    public static final int NUM_FLOAT = GeneratedJavaTokenTypes.NUM_FLOAT;
+    /**
+     * A long integer literal.  These are almost the same as integer
+     * literals, but they have an <code>L</code> or <code>l</code>
+     * (ell) suffix.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#48282">Java
+     * Language Specification, §3.10.1</a>
+     * @see #EXPR
+     * @see #NUM_INT
+     **/
+    public static final int NUM_LONG = GeneratedJavaTokenTypes.NUM_LONG;
+    /**
+     * A double precision floating point literal.  This is a floating
+     * point number with an optional <code>D</code> or <code>d</code>
+     * suffix.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#230798">Java
+     * Language Specification, §3.10.2</a>
+     * @see #EXPR
+     * @see #NUM_FLOAT
+     **/
+    public static final int NUM_DOUBLE = GeneratedJavaTokenTypes.NUM_DOUBLE;
+    /* *
+     * This token does not appear in the tree.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#95710">Java
+     * Language Specification, §3.6</a>
+     * @see FileContents
+     **/
+    //public static final int WS = GeneratedJavaTokenTypes.WS;
+    /* *
+     * This token does not appear in the tree.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#48125">Java
+     * Language Specification, §3.7</a>
+     * @see FileContents
+     **/
+    //public static final int SL_COMMENT = GeneratedJavaTokenTypes.SL_COMMENT;
+    /* *
+     * This token does not appear in the tree.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#48125">Java
+     * Language Specification, §3.7</a>
+     * @see FileContents
+     **/
+    //public static final int ML_COMMENT = GeneratedJavaTokenTypes.ML_COMMENT;
+    /* *
+     * This token does not appear in the tree.
+     *
+     * @see <a
+     * href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#101089">Java
+     * Language Specification, §3.10.6</a>
+     * @see #CHAR_LITERAL
+     * @see #STRING_LITERAL
+     **/
+    //public static final int ESC = GeneratedJavaTokenTypes.ESC;
+    /* *
+     * This token does not appear in the tree.
+     *
+     * @see #NUM_INT
+     * @see #NUM_LONG
+     **/
+    //public static final int HEX_DIGIT = GeneratedJavaTokenTypes.HEX_DIGIT;
+    /* *
+     * This token does not appear in the tree.
+     *
+     * @see #NUM_FLOAT
+     * @see #NUM_DOUBLE
+     **/
+    //public static final int EXPONENT = GeneratedJavaTokenTypes.EXPONENT;
+    /* *
+     * This token does not appear in the tree.
+     *
+     * @see #NUM_FLOAT
+     * @see #NUM_DOUBLE
+     **/
+    // public static final int FLOAT_SUFFIX =
+    //     GeneratedJavaTokenTypes.FLOAT_SUFFIX;
+
+    /**
+     * The <code>assert</code> keyword.  This is only for Java 1.4 and
+     * later.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * assert(x==4);
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--LITERAL_ASSERT (assert)
+     *     |
+     *     +--EXPR
+     *         |
+     *         +--LPAREN (()
+     *         +--EQUAL (==)
+     *             |
+     *             +--IDENT (x)
+     *             +--NUM_INT (4)
+     *         +--RPAREN ())
+     *     +--SEMI (;)
+     * </pre>
+     **/
+    public static final int LITERAL_ASSERT = GeneratedJavaTokenTypes.ASSERT;
+
+    /**
+     * A static import declaration.  Static import declarations are optional,
+     * but must appear after the package declaration and before the type
+     * declaration.
+     *
+     * <p>For example:</p>
+     *
+     * <pre>
+     *   import static java.io.IOException;
+     * </pre>
+     *
+     * <p>parses as:</p>
+     *
+     * <pre>
+     * +--STATIC_IMPORT (import)
+     *     |
+     *     +--LITERAL_STATIC
+     *     +--DOT (.)
+     *         |
+     *         +--DOT (.)
+     *             |
+     *             +--IDENT (java)
+     *             +--IDENT (io)
+     *         +--IDENT (IOException)
+     *     +--SEMI (;)
+     * </pre>
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=201">
+     * JSR201</a>
+     * @see #LITERAL_STATIC
+     * @see #DOT
+     * @see #IDENT
+     * @see #STAR
+     * @see #SEMI
+     * @see FullIdent
+     **/
+    public static final int STATIC_IMPORT =
+        GeneratedJavaTokenTypes.STATIC_IMPORT;
+
+    /**
+     * An enum declaration. Its notable children are
+     * enum constant declarations followed by
+     * any construct that may be expected in a class body.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * public enum MyEnum
+     *   implements Serializable
+     * {
+     *     FIRST_CONSTANT,
+     *     SECOND_CONSTANT;
+     *
+     *     public void someMethod()
+     *     {
+     *     }
+     * }
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--ENUM_DEF
+     *     |
+     *     +--MODIFIERS
+     *         |
+     *         +--LITERAL_PUBLIC (public)
+     *     +--ENUM (enum)
+     *     +--IDENT (MyEnum)
+     *     +--EXTENDS_CLAUSE
+     *     +--IMPLEMENTS_CLAUSE
+     *         |
+     *         +--IDENT (Serializable)
+     *     +--OBJBLOCK
+     *         |
+     *         +--LCURLY ({)
+     *         +--ENUM_CONSTANT_DEF
+     *             |
+     *             +--IDENT (FIRST_CONSTANT)
+     *         +--COMMA (,)
+     *         +--ENUM_CONSTANT_DEF
+     *             |
+     *             +--IDENT (SECOND_CONSTANT)
+     *         +--SEMI (;)
+     *         +--METHOD_DEF
+     *             |
+     *             +--MODIFIERS
+     *                 |
+     *                 +--LITERAL_PUBLIC (public)
+     *             +--TYPE
+     *                 |
+     *                 +--LITERAL_void (void)
+     *             +--IDENT (someMethod)
+     *             +--LPAREN (()
+     *             +--PARAMETERS
+     *             +--RPAREN ())
+     *             +--SLIST ({)
+     *                 |
+     *                 +--RCURLY (})
+     *         +--RCURLY (})
+     * </pre>
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=201">
+     * JSR201</a>
+     * @see #MODIFIERS
+     * @see #ENUM
+     * @see #IDENT
+     * @see #EXTENDS_CLAUSE
+     * @see #IMPLEMENTS_CLAUSE
+     * @see #OBJBLOCK
+     * @see #LITERAL_NEW
+     * @see #ENUM_CONSTANT_DEF
+     **/
+    public static final int ENUM_DEF =
+        GeneratedJavaTokenTypes.ENUM_DEF;
+
+    /**
+     * The <code>enum</code> keyword.  This element appears
+     * as part of an enum declaration.
+     **/
+    public static final int ENUM =
+        GeneratedJavaTokenTypes.ENUM;
+
+    /**
+     * An enum constant declaration. Its notable children are annotations,
+     * arguments and object block akin to an annonymous
+     * inner class' body.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * SOME_CONSTANT(1)
+     * {
+     *     public void someMethodOverridenFromMainBody()
+     *     {
+     *     }
+     * }
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--ENUM_CONSTANT_DEF
+     *     |
+     *     +--ANNOTATIONS
+     *     +--IDENT (SOME_CONSTANT)
+     *     +--LPAREN (()
+     *     +--ELIST
+     *         |
+     *         +--EXPR
+     *             |
+     *             +--NUM_INT (1)
+     *     +--RPAREN ())
+     *     +--OBJBLOCK
+     *         |
+     *         +--LCURLY ({)
+     *         |
+     *         +--METHOD_DEF
+     *             |
+     *             +--MODIFIERS
+     *                 |
+     *                 +--LITERAL_PUBLIC (public)
+     *             +--TYPE
+     *                 |
+     *                 +--LITERAL_void (void)
+     *             +--IDENT (someMethodOverridenFromMainBody)
+     *             +--LPAREN (()
+     *             +--PARAMETERS
+     *             +--RPAREN ())
+     *             +--SLIST ({)
+     *                 |
+     *                 +--RCURLY (})
+     *         +--RCURLY (})
+     * </pre>
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=201">
+     * JSR201</a>
+     * @see #ANNOTATIONS
+     * @see #MODIFIERS
+     * @see #IDENT
+     * @see #ELIST
+     * @see #OBJBLOCK
+     **/
+    public static final int ENUM_CONSTANT_DEF =
+        GeneratedJavaTokenTypes.ENUM_CONSTANT_DEF;
+
+    /**
+     * A for-each clause.  This is a child of
+     * <code>LITERAL_FOR</code>.  The children of this element may be
+     * a parameter definition, the colon literal and an expression.
+     *
+     * @see #VARIABLE_DEF
+     * @see #ELIST
+     * @see #LITERAL_FOR
+     **/
+    public static final int FOR_EACH_CLAUSE =
+        GeneratedJavaTokenTypes.FOR_EACH_CLAUSE;
+
+    /**
+     * An annotation declaration. The notable children are the name of the
+     * annotation type, annotation field declarations and (constant) fields.
+     *
+     * <p>For example:</p>
+     * <pre>
+     * public @interface MyAnnotation
+     * {
+     *     int someValue();
+     * }
+     * </pre>
+     * <p>parses as:</p>
+     * <pre>
+     * +--ANNOTATION_DEF
+     *     |
+     *     +--MODIFIERS
+     *         |
+     *         +--LITERAL_PUBLIC (public)
+     *     +--AT (@)
+     *     +--LITERAL_INTERFACE (interface)
+     *     +--IDENT (MyAnnotation)
+     *     +--OBJBLOCK
+     *         |
+     *         +--LCURLY ({)
+     *         +--ANNOTATION_FIELD_DEF
+     *             |
+     *             +--MODIFIERS
+     *             +--TYPE
+     *                 |
+     *                 +--LITERAL_INT (int)
+     *             +--IDENT (someValue)
+     *             +--LPAREN (()
+     *             +--RPAREN ())
+     *             +--SEMI (;)
+     *         +--RCURLY (})
+     * </pre>
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=201">
+     * JSR201</a>
+     * @see #MODIFIERS
+     * @see #LITERAL_INTERFACE
+     * @see #IDENT
+     * @see #OBJBLOCK
+     * @see #ANNOTATION_FIELD_DEF
+     **/
+    public static final int ANNOTATION_DEF =
+        GeneratedJavaTokenTypes.ANNOTATION_DEF;
+
+
+    /**
+     * An annotation field declaration.  The notable children are modifiers,
+     * field type, field name and an optional default value (a conditional
+     * compile-time constant expression). Default values may also by
+     * annotations.
+     *
+     * <p>For example:</p>
+     *
+     * <pre>
+     *     String someField() default "Hello world";
+     * </pre>
+     *
+     * <p>parses as:</p>
+     *
+     * <pre>
+     * +--ANNOTATION_FIELD_DEF
+     *     |
+     *     +--MODIFIERS
+     *     +--TYPE
+     *         |
+     *         +--IDENT (String)
+     *     +--IDENT (someField)
+     *     +--LPAREN (()
+     *     +--RPAREN ())
+     *     +--LITERAL_DEFAULT (default)
+     *     +--STRING_LITERAL ("Hello world")
+     *     +--SEMI (;)
+     * </pre>
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=201">
+     * JSR201</a>
+     * @see #MODIFIERS
+     * @see #TYPE
+     * @see #LITERAL_DEFAULT
+     */
+    public static final int ANNOTATION_FIELD_DEF =
+        GeneratedJavaTokenTypes.ANNOTATION_FIELD_DEF;
+
+    // note: @ is the html escape for '@',
+    // used here to avoid confusing the javadoc tool
+    /**
+     * A collection of annotations on a package or enum constant.
+     * A collections of annotations will only occur on these nodes
+     * as all other nodes that may be qualified with an annotation can
+     * be qualified with any other modifier and hence these annotations
+     * would be contained in a {@link #MODIFIERS} node.
+     *
+     * <p>For example:</p>
+     *
+     * <pre>
+     *     @MyAnnotation package blah;
+     * </pre>
+     *
+     * <p>parses as:</p>
+     *
+     * <pre>
+     * +--PACKAGE_DEF (package)
+     *     |
+     *     +--ANNOTATIONS
+     *         |
+     *         +--ANNOTATION
+     *             |
+     *             +--AT (@)
+     *             +--IDENT (MyAnnotation)
+     *     +--IDENT (blah)
+     *     +--SEMI (;)
+     * </pre>
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=201">
+     * JSR201</a>
+     * @see #ANNOTATION
+     * @see #AT
+     * @see #IDENT
+     */
+    public static final int ANNOTATIONS =
+        GeneratedJavaTokenTypes.ANNOTATIONS;
+
+    // note: @ is the html escape for '@',
+    // used here to avoid confusing the javadoc tool
+    /**
+     * An annotation of a package, type, field, parameter or variable.
+     * An annotation may occur anywhere modifiers occur (it is a
+     * type of modifier) and may also occur prior to a package definition.
+     * The notable children are: The annotation name and either a single
+     * default annotation value or a sequence of name value pairs.
+     * Annotation values may also be annotations themselves.
+     *
+     * <p>For example:</p>
+     *
+     * <pre>
+     *     @MyAnnotation(someField1 = "Hello",
+     *                    someField2 = @SomeOtherAnnotation)
+     * </pre>
+     *
+     * <p>parses as:</p>
+     *
+     * <pre>
+     * +--ANNOTATION
+     *     |
+     *     +--AT (@)
+     *     +--IDENT (MyAnnotation)
+     *     +--LPAREN (()
+     *     +--ANNOTATION_MEMBER_VALUE_PAIR
+     *         |
+     *         +--IDENT (someField1)
+     *         +--ASSIGN (=)
+     *         +--ANNOTATION
+     *             |
+     *             +--AT (@)
+     *             +--IDENT (SomeOtherAnnotation)
+     *     +--ANNOTATION_MEMBER_VALUE_PAIR
+     *         |
+     *         +--IDENT (someField2)
+     *         +--ASSIGN (=)
+     *         +--STRING_LITERAL ("Hello")
+     *     +--RPAREN ())
+     * </pre>
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=201">
+     * JSR201</a>
+     * @see #MODIFIERS
+     * @see #IDENT
+     * @see #ANNOTATION_MEMBER_VALUE_PAIR
+     */
+    public static final int ANNOTATION =
+        GeneratedJavaTokenTypes.ANNOTATION;
+
+    /**
+     * An initialisation of an annotation member with a value.
+     * Its children are the name of the member, the assignment literal
+     * and the (compile-time constant conditional expression) value.
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=201">
+     * JSR201</a>
+     * @see #ANNOTATION
+     * @see #IDENT
+     */
+    public static final int ANNOTATION_MEMBER_VALUE_PAIR =
+        GeneratedJavaTokenTypes.ANNOTATION_MEMBER_VALUE_PAIR;
+
+    /**
+     * An annotation array member initialisation.
+     * Initializers can not be nested.
+     * Am initializer may be present as a default to a annotation
+     * member, as the single default value to an annotation
+     * (e.g. @Annotation({1,2})) or as the value of an annotation
+     * member value pair.
+     *
+     * <p>For example:</p>
+     *
+     * <pre>
+     *     { 1, 2 }
+     * </pre>
+     *
+     * <p>parses as:</p>
+     *
+     * <pre>
+     * +--ANNOTATION_ARRAY_INIT ({)
+     *     |
+     *     +--NUM_INT (1)
+     *     +--COMMA (,)
+     *     +--NUM_INT (2)
+     *     +--RCURLY (})
+     * </pre>
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=201">
+     * JSR201</a>
+     * @see #ANNOTATION
+     * @see #IDENT
+     * @see #ANNOTATION_MEMBER_VALUE_PAIR
+     */
+    public static final int ANNOTATION_ARRAY_INIT =
+        GeneratedJavaTokenTypes.ANNOTATION_ARRAY_INIT;
+
+    /**
+     * A list of type parameters to a class, interface or
+     * method definition. Children are LT, at least one
+     * TYPE_PARAMETER, zero or more of: a COMMAs followed by a single
+     * TYPE_PARAMETER and a final GT.
+     *
+     * <p>For example:</p>
+     *
+     * <pre>
+     *     public class Blah<A, B>
+     *     {
+     *     }
+     * </pre>
+     *
+     * <p>parses as:</p>
+     *
+     * <pre>
+     * +--CLASS_DEF ({)
+     *     |
+     *     +--MODIFIERS
+     *         |
+     *         +--LITERAL_PUBLIC (public)
+     *     +--LITERAL_CLASS (class)
+     *     +--IDENT (Blah)
+     *     +--TYPE_PARAMETERS
+     *         |
+     *         +--GENERIC_START (<)
+     *         +--TYPE_PARAMETER
+     *             |
+     *             +--IDENT (A)
+     *         +--COMMA (,)
+     *         +--TYPE_PARAMETER
+     *             |
+     *             +--IDENT (B)
+     *         +--GENERIC_END (>)
+     *     +--OBJBLOCK
+     *         |
+     *         +--LCURLY ({)
+     *     +--NUM_INT (1)
+     *     +--COMMA (,)
+     *     +--NUM_INT (2)
+     *     +--RCURLY (})
+     * </pre>
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=14">
+     * JSR14</a>
+     * @see #GENERIC_START
+     * @see #GENERIC_END
+     * @see #TYPE_PARAMETER
+     * @see #COMMA
+     */
+    public static final int TYPE_PARAMETERS =
+        GeneratedJavaTokenTypes.TYPE_PARAMETERS;
+
+    /**
+     * A type parameter to a class, interface or method definition.
+     * Children are the type name and an optional TYPE_UPPER_BOUNDS.
+     *
+     * <p>For example:</p>
+     *
+     * <pre>
+     *     A extends Collection
+     * </pre>
+     *
+     * <p>parses as:</p>
+     *
+     * <pre>
+     * +--TYPE_PARAMETER
+     *     |
+     *     +--IDENT (A)
+     *     +--TYPE_UPPER_BOUNDS
+     *         |
+     *         +--IDENT (Collection)
+     * </pre>
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=14">
+     * JSR14</a>
+     * @see #IDENT
+     * @see #WILDCARD_TYPE
+     * @see #TYPE_UPPER_BOUNDS
+     */
+    public static final int TYPE_PARAMETER =
+        GeneratedJavaTokenTypes.TYPE_PARAMETER;
+
+    /**
+     * A list of type arguments to a type reference or
+     * a method/ctor invocation. Children are GENERIC_START, at least one
+     * TYPE_ARGUMENT, zero or more of a COMMAs followed by a single
+     * TYPE_ARGUMENT, and a final GENERIC_END.
+     *
+     * <p>For example:</p>
+     *
+     * <pre>
+     *     public Collection<?> a;
+     * </pre>
+     *
+     * <p>parses as:</p>
+     *
+     * <pre>
+     * +--VARIABLE_DEF
+     *     |
+     *     +--MODIFIERS
+     *         |
+     *         +--LITERAL_PUBLIC (public)
+     *     +--TYPE
+     *         |
+     *         +--IDENT (Collection)
+     *             |
+     *             +--TYPE_ARGUMENTS
+     *                 |
+     *                 +--GENERIC_START (<)
+     *                 +--TYPE_ARGUMENT
+     *                     |
+     *                     +--WILDCARD_TYPE (?)
+     *                 +--GENERIC_END (>)
+     *     +--IDENT (a)
+     *     +--SEMI (;)
+     * </pre>
+     *
+     * @see #GENERIC_START
+     * @see #GENERIC_END
+     * @see #TYPE_ARGUMENT
+     * @see #COMMA
+     */
+    public static final int TYPE_ARGUMENTS =
+        GeneratedJavaTokenTypes.TYPE_ARGUMENTS;
+
+    /**
+     * A type arguments to a type reference or a method/ctor invocation.
+     * Children are either: type name or wildcard type with possible type
+     * upper or lower bounds.
+     *
+     * <p>For example:</p>
+     *
+     * <pre>
+     *     ? super List
+     * </pre>
+     *
+     * <p>parses as:</p>
+     *
+     * <pre>
+     * +--TYPE_ARGUMENT
+     *     |
+     *     +--WILDCARD_TYPE (?)
+     *     +--TYPE_LOWER_BOUNDS
+     *         |
+     *         +--IDENT (List)
+     * </pre>
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=14">
+     * JSR14</a>
+     * @see #WILDCARD_TYPE
+     * @see #TYPE_UPPER_BOUNDS
+     * @see #TYPE_LOWER_BOUNDS
+     */
+    public static final int TYPE_ARGUMENT =
+        GeneratedJavaTokenTypes.TYPE_ARGUMENT;
+
+    /**
+     * The type that refers to all types. This node has no children.
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=14">
+     * JSR14</a>
+     * @see #TYPE_ARGUMENT
+     * @see #TYPE_UPPER_BOUNDS
+     * @see #TYPE_LOWER_BOUNDS
+     */
+    public static final int WILDCARD_TYPE =
+        GeneratedJavaTokenTypes.WILDCARD_TYPE;
+
+    /**
+     * An upper bounds on a wildcard type argument or type parameter.
+     * This node has one child - the type that is being used for
+     * the bounding.
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=14">
+     * JSR14</a>
+     * @see #TYPE_PARAMETER
+     * @see #TYPE_ARGUMENT
+     * @see #WILDCARD_TYPE
+     */
+    public static final int TYPE_UPPER_BOUNDS =
+        GeneratedJavaTokenTypes.TYPE_UPPER_BOUNDS;
+
+    /**
+     * A lower bounds on a wildcard type argument. This node has one child
+     *  - the type that is being used for the bounding.
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=14">
+     * JSR14</a>
+     * @see #TYPE_ARGUMENT
+     * @see #WILDCARD_TYPE
+     */
+    public static final int TYPE_LOWER_BOUNDS =
+        GeneratedJavaTokenTypes.TYPE_LOWER_BOUNDS;
+
+    /**
+     * An 'at' symbol - signifying an annotation instance or the prefix
+     * to the interface literal signifying the definition of an annotation
+     * declaration.
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=201">
+     * JSR201</a>
+     */
+    public static final int AT = GeneratedJavaTokenTypes.AT;
+
+    /**
+     * A triple dot for variable-length parameters. This token only ever occurs
+     * in a parameter declaration immediately after the type of the parameter.
+     *
+     * @see <a href="http://www.jcp.org/en/jsr/detail?id=201">
+     * JSR201</a>
+     */
+    public static final int ELLIPSIS = GeneratedJavaTokenTypes.ELLIPSIS;
+
+    /**
+     * '&' symbol when used in a generic upper or lower bounds constrain
+     * e.g. {@code Comparable<<? extends Serializable, CharSequence>}.
+     */
+    public static final int TYPE_EXTENSION_AND =
+        GeneratedJavaTokenTypes.TYPE_EXTENSION_AND;
+
+    /**
+     * '<' symbol signifying the start of type arguments or type
+     * parameters.
+     */
+    public static final int GENERIC_START =
+        GeneratedJavaTokenTypes.GENERIC_START;
+
+    /**
+     * '>' symbol signifying the end of type arguments or type parameters.
+     */
+    public static final int GENERIC_END = GeneratedJavaTokenTypes.GENERIC_END;
+
+    /**
+     * Special lambda symbol '->'.
+     */
+    public static final int LAMBDA = GeneratedJavaTokenTypes.LAMBDA;
+
+    ////////////////////////////////////////////////////////////////////////
+    // The interesting code goes here
+    ////////////////////////////////////////////////////////////////////////
+
+    /** maps from a token name to value */
+    private static final ImmutableMap<String, Integer> TOKEN_NAME_TO_VALUE;
+    /** maps from a token value to name */
+    private static final String[] TOKEN_VALUE_TO_NAME;
+
+    // initialise the constants
+    static {
+        final ImmutableMap.Builder<String, Integer> builder =
+            ImmutableMap.builder();
+        final Field[] fields = TokenTypes.class.getDeclaredFields();
+        String[] tempTokenValueToName = new String[0];
+        for (final Field f : fields) {
+            // Only process the int declarations.
+            if (f.getType() != Integer.TYPE) {
+                continue;
+            }
+
+            final String name = f.getName();
+            try {
+                final int tokenValue = f.getInt(name);
+                builder.put(name, tokenValue);
+                if (tokenValue > tempTokenValueToName.length - 1) {
+                    final String[] temp = new String[tokenValue + 1];
+                    System.arraycopy(tempTokenValueToName, 0,
+                                     temp, 0, tempTokenValueToName.length);
+                    tempTokenValueToName = temp;
+                }
+                tempTokenValueToName[tokenValue] = name;
+            }
+            catch (final IllegalArgumentException e) {
+                e.printStackTrace();
+                System.exit(1);
+            }
+            catch (final IllegalAccessException e) {
+                e.printStackTrace();
+                System.exit(1);
+            }
+        }
+
+        TOKEN_NAME_TO_VALUE = builder.build();
+        TOKEN_VALUE_TO_NAME = tempTokenValueToName;
+    }
+
+    /**
+     * Returns the name of a token for a given ID.
+     * @param aID the ID of the token name to get
+     * @return a token name
+     */
+    public static String getTokenName(int aID)
+    {
+        if (aID > TOKEN_VALUE_TO_NAME.length - 1) {
+            throw new IllegalArgumentException("given id " + aID);
+        }
+        final String name = TOKEN_VALUE_TO_NAME[aID];
+        if (name == null) {
+            throw new IllegalArgumentException("given id " + aID);
+        }
+        return name;
+    }
+
+    /**
+     * Returns the ID of a token for a given name.
+     * @param aName the name of the token ID to get
+     * @return a token ID
+     */
+    public static int getTokenId(String aName)
+    {
+        final Integer id = TOKEN_NAME_TO_VALUE.get(aName);
+        if (id == null) {
+            throw new IllegalArgumentException("given name " + aName);
+        }
+        return id.intValue();
+    }
+
+    /**
+     * Returns the short description of a token for a given name.
+     * @param aName the name of the token ID to get
+     * @return a short description
+     */
+    public static String getShortDescription(String aName)
+    {
+        if (!TOKEN_NAME_TO_VALUE.containsKey(aName)) {
+            throw new IllegalArgumentException("given name " + aName);
+        }
+
+        final String tokentypes =
+            "com.puppycrawl.tools.checkstyle.api.tokentypes";
+        final ResourceBundle bundle = ResourceBundle.getBundle(tokentypes);
+        return bundle.getString(aName);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/Utils.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/Utils.java
new file mode 100644
index 0000000..cfbf866
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/Utils.java
@@ -0,0 +1,293 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
+import java.io.Closeable;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
+import java.io.UnsupportedEncodingException;
+import java.util.List;
+import java.util.concurrent.ConcurrentMap;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import org.apache.commons.beanutils.ConversionException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Contains utility methods.
+ *
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public final class Utils
+{
+    /** Map of all created regular expressions **/
+    private static final ConcurrentMap<String, Pattern> CREATED_RES =
+        Maps.newConcurrentMap();
+    /** Shared instance of logger for exception logging. */
+    private static final Log EXCEPTION_LOG =
+        LogFactory.getLog("com.puppycrawl.tools.checkstyle.ExceptionLog");
+
+    ///CLOVER:OFF
+    /** stop instances being created **/
+    private Utils()
+    {
+    }
+    ///CLOVER:ON
+
+    /**
+     * Accessor for shared instance of logger which should be
+     * used to log all exceptions occurred during <code>FileSetCheck</code>
+     * work (<code>debug()</code> should be used).
+     * @return shared exception logger.
+     */
+    public static Log getExceptionLogger()
+    {
+        return EXCEPTION_LOG;
+    }
+
+    /**
+     * Returns whether the specified string contains only whitespace up to the
+     * specified index.
+     *
+     * @param aIndex index to check up to
+     * @param aLine the line to check
+     * @return whether there is only whitespace
+     */
+    public static boolean whitespaceBefore(int aIndex, String aLine)
+    {
+        for (int i = 0; i < aIndex; i++) {
+            if (!Character.isWhitespace(aLine.charAt(i))) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Returns the length of a string ignoring all trailing whitespace. It is a
+     * pity that there is not a trim() like method that only removed the
+     * trailing whitespace.
+     * @param aLine the string to process
+     * @return the length of the string ignoring all trailing whitespace
+     **/
+    public static int lengthMinusTrailingWhitespace(String aLine)
+    {
+        int len = aLine.length();
+        for (int i = len - 1; i >= 0; i--) {
+            if (!Character.isWhitespace(aLine.charAt(i))) {
+                break;
+            }
+            len--;
+        }
+        return len;
+    }
+
+    /**
+     * Returns the length of a String prefix with tabs expanded.
+     * Each tab is counted as the number of characters is takes to
+     * jump to the next tab stop.
+     * @param aString the input String
+     * @param aToIdx index in aString (exclusive) where the calculation stops
+     * @param aTabWidth the distance between tab stop position.
+     * @return the length of aString.substring(0, aToIdx) with tabs expanded.
+     */
+    public static int lengthExpandedTabs(String aString,
+                                         int aToIdx,
+                                         int aTabWidth)
+    {
+        int len = 0;
+        final char[] chars = aString.toCharArray();
+        for (int idx = 0; idx < aToIdx; idx++) {
+            if (chars[idx] == '\t') {
+                len = (len / aTabWidth + 1) * aTabWidth;
+            }
+            else {
+                len++;
+            }
+        }
+        return len;
+    }
+
+    /**
+     * This is a factory method to return an Pattern object for the specified
+     * regular expression. It calls {@link #getPattern(String, int)} with the
+     * compile flags defaults to 0.
+     * @return an Pattern object for the supplied pattern
+     * @param aPattern the regular expression pattern
+     * @throws PatternSyntaxException an invalid pattern was supplied
+     **/
+    public static Pattern getPattern(String aPattern)
+        throws PatternSyntaxException
+    {
+        return getPattern(aPattern, 0);
+    }
+
+    /**
+     * This is a factory method to return an Pattern object for the specified
+     * regular expression and compile flags.
+     * @return an Pattern object for the supplied pattern
+     * @param aPattern the regular expression pattern
+     * @param aCompileFlags the compilation flags
+     * @throws PatternSyntaxException an invalid pattern was supplied
+     **/
+    public static Pattern getPattern(String aPattern, int aCompileFlags)
+        throws PatternSyntaxException
+    {
+        final String key = aPattern + ":flags-" + aCompileFlags;
+        Pattern retVal = CREATED_RES.get(key);
+        if (retVal == null) {
+            retVal = Pattern.compile(aPattern, aCompileFlags);
+            CREATED_RES.putIfAbsent(key, retVal);
+        }
+        return retVal;
+    }
+
+    /**
+     * Loads the contents of a file in a String array.
+     * @return the lines in the file
+     * @param aFileName the name of the file to load
+     * @throws IOException error occurred
+     * @deprecated consider using {@link FileText} instead
+     **/
+    @Deprecated
+    public static String[] getLines(String aFileName)
+        throws IOException
+    {
+        return getLines(
+            aFileName,
+            System.getProperty("file.encoding", "UTF-8"));
+    }
+
+    /**
+     * Loads the contents of a file in a String array using
+     * the named charset.
+     * @return the lines in the file
+     * @param aFileName the name of the file to load
+     * @param aCharsetName the name of a supported charset
+     * @throws IOException error occurred
+     * @deprecated consider using {@link FileText} instead
+     **/
+    @Deprecated
+    public static String[] getLines(String aFileName, String aCharsetName)
+        throws IOException
+    {
+        final List<String> lines = Lists.newArrayList();
+        final FileInputStream fr = new FileInputStream(aFileName);
+        LineNumberReader lnr = null;
+        try {
+            lnr = new LineNumberReader(new InputStreamReader(fr, aCharsetName));
+        }
+        catch (final UnsupportedEncodingException ex) {
+            fr.close();
+            final String message = "unsupported charset: " + ex.getMessage();
+            throw new UnsupportedEncodingException(message);
+        }
+        try {
+            while (true) {
+                final String l = lnr.readLine();
+                if (l == null) {
+                    break;
+                }
+                lines.add(l);
+            }
+        }
+        finally {
+            Utils.closeQuietly(lnr);
+        }
+        return lines.toArray(new String[lines.size()]);
+    }
+
+    /**
+     * Helper method to create a regular expression.
+     * @param aPattern the pattern to match
+     * @return a created regexp object
+     * @throws ConversionException if unable to create Pattern object.
+     **/
+    public static Pattern createPattern(String aPattern)
+        throws ConversionException
+    {
+        Pattern retVal = null;
+        try {
+            retVal = getPattern(aPattern);
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException(
+                "Failed to initialise regexp expression " + aPattern, e);
+        }
+        return retVal;
+    }
+
+    /**
+     * @return the base class name from a fully qualified name
+     * @param aType the fully qualified name. Cannot be null
+     */
+    public static String baseClassname(String aType)
+    {
+        final int i = aType.lastIndexOf(".");
+        return (i == -1) ? aType : aType.substring(i + 1);
+    }
+
+    /**
+     * Create a stripped down version of a filename.
+     * @param aBasedir the prefix to strip off the original filename
+     * @param aFileName the original filename
+     * @return the filename where an initial prefix of basedir is stripped
+     */
+    public static String getStrippedFileName(
+            final String aBasedir, final String aFileName)
+    {
+        final String stripped;
+        if ((aBasedir == null) || !aFileName.startsWith(aBasedir)) {
+            stripped = aFileName;
+        }
+        else {
+            // making the assumption that there is text after basedir
+            final int skipSep = aBasedir.endsWith(File.separator) ? 0 : 1;
+            stripped = aFileName.substring(aBasedir.length() + skipSep);
+        }
+        return stripped;
+    }
+
+    /**
+     * Closes the supplied {@link Closeable} object ignoring an
+     * {@link IOException} if it is thrown. Honestly, what are you going to
+     * do if you cannot close a file.
+     * @param aShutting the object to be closed.
+     */
+    public static void closeQuietly(Closeable aShutting)
+    {
+        if (null != aShutting) {
+            try {
+                aShutting.close();
+            }
+            catch (IOException e) {
+                ; // ignore
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/api/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/api/package-info.java
new file mode 100644
index 0000000..e2251b4
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/api/package-info.java
@@ -0,0 +1,24 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the core API to be used to implement checks. If you want to
+ * implement your own check, you should be referring to this package.
+ */
+package com.puppycrawl.tools.checkstyle.api;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractFormatCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractFormatCheck.java
new file mode 100644
index 0000000..3ff4ae0
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractFormatCheck.java
@@ -0,0 +1,122 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import org.apache.commons.beanutils.ConversionException;
+
+/**
+ * <p> Abstract class for checks that verify strings using a
+ * {@link java.util.regex.Pattern regular expression}.  It
+ * provides support for setting the regular
+ * expression using the property name <code>format</code>.  </p>
+ *
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public abstract class AbstractFormatCheck
+    extends Check
+{
+    /** the flags to create the regular expression with */
+    private int mCompileFlags;
+    /** the regexp to match against */
+    private Pattern mRegexp;
+    /** the format string of the regexp */
+    private String mFormat;
+
+    /**
+     * Creates a new <code>AbstractFormatCheck</code> instance. Defaults the
+     * compile flag to 0 (the default).
+     * @param aDefaultFormat default format
+     * @throws ConversionException unable to parse aDefaultFormat
+     */
+    public AbstractFormatCheck(String aDefaultFormat)
+        throws ConversionException
+    {
+        this(aDefaultFormat, 0);
+    }
+
+    /**
+     * Creates a new <code>AbstractFormatCheck</code> instance.
+     * @param aDefaultFormat default format
+     * @param aCompileFlags the Pattern flags to compile the regexp with.
+     * See {@link Pattern#compile(java.lang.String, int)}
+     * @throws ConversionException unable to parse aDefaultFormat
+     */
+    public AbstractFormatCheck(String aDefaultFormat, int aCompileFlags)
+        throws ConversionException
+    {
+        updateRegexp(aDefaultFormat, aCompileFlags);
+    }
+
+    /**
+     * Set the format to the specified regular expression.
+     * @param aFormat a <code>String</code> value
+     * @throws ConversionException unable to parse aFormat
+     */
+    public final void setFormat(String aFormat)
+        throws ConversionException
+    {
+        updateRegexp(aFormat, mCompileFlags);
+    }
+
+    /**
+     * Set the compile flags for the regular expression.
+     * @param aCompileFlags the compile flags to use.
+     */
+    public final void setCompileFlags(int aCompileFlags)
+    {
+        updateRegexp(mFormat, aCompileFlags);
+    }
+
+    /** @return the regexp to match against */
+    public final Pattern getRegexp()
+    {
+        return mRegexp;
+    }
+
+    /** @return the regexp format */
+    public final String getFormat()
+    {
+        return mFormat;
+    }
+
+    /**
+     * Updates the regular expression using the supplied format and compiler
+     * flags. Will also update the member variables.
+     * @param aFormat the format of the regular expression.
+     * @param aCompileFlags the compiler flags to use.
+     */
+    private void updateRegexp(String aFormat, int aCompileFlags)
+    {
+        try {
+            mRegexp = Utils.getPattern(aFormat, aCompileFlags);
+            mFormat = aFormat;
+            mCompileFlags |= aCompileFlags;
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractOptionCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractOptionCheck.java
new file mode 100644
index 0000000..e338774
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractOptionCheck.java
@@ -0,0 +1,79 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import org.apache.commons.beanutils.ConversionException;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+
+/**
+ * Abstract class for checks with a parameter named <tt>option</tt>, where the
+ * option is identified by a {@link Enum}. The logic to convert from a string
+ * representation to the {@link Enum} is to {@link String#trim()} the string
+ * and convert using {@link String#toUpperCase()} and then look up using
+ * {@link Enum#valueOf}.
+ * @param <T> the type of the option.
+ * @author Oliver Burn
+ * @author Rick Giles
+ */
+public abstract class AbstractOptionCheck<T extends Enum<T>>
+    extends Check
+{
+    /** Since I cannot get this by going <tt>T.class</tt>. */
+    private final Class<T> mOptionClass;
+    /** the policy to enforce */
+    private T mOption;
+
+    /**
+     * Creates a new <code>AbstractOptionCheck</code> instance.
+     * @param aDefault the default option.
+     * @param aOptionClass the class for the option. Required due to a quirk
+     *        in the Java language.
+     */
+    public AbstractOptionCheck(T aDefault, Class<T> aOptionClass)
+    {
+        mOption = aDefault;
+        mOptionClass = aOptionClass;
+    }
+
+    /**
+     * Set the option to enforce.
+     * @param aOption string to decode option from
+     * @throws ConversionException if unable to decode
+     */
+    public void setOption(String aOption) throws ConversionException
+    {
+        try {
+            mOption = Enum.valueOf(mOptionClass, aOption.trim().toUpperCase());
+        }
+        catch (IllegalArgumentException iae) {
+            throw new ConversionException("unable to parse " + aOption, iae);
+        }
+    }
+
+    /**
+     * @return the <code>AbstractOption</code> set
+     */
+    public T getAbstractOption()
+    {
+        // WARNING!! Do not rename this method to getOption(). It breaks
+        // BeanUtils, which will silently not call setOption. Very annoying!
+        return mOption;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractTypeAwareCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractTypeAwareCheck.java
new file mode 100644
index 0000000..3210410
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/AbstractTypeAwareCheck.java
@@ -0,0 +1,603 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.LocalizedMessage;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Abstract class that endeavours to maintain type information for the Java
+ * file being checked. It provides helper methods for performing type
+ * information functions.
+ *
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public abstract class AbstractTypeAwareCheck extends Check
+{
+    /** imports details **/
+    private final Set<String> mImports = Sets.newHashSet();
+
+    /** full identifier for package of the method **/
+    private FullIdent mPackageFullIdent;
+
+    /** Name of current class. */
+    private String mCurrentClass;
+
+    /** <code>ClassResolver</code> instance for current tree. */
+    private ClassResolver mClassResolver;
+
+    /** Stack of maps for type params. */
+    private final FastStack<Map<String, ClassInfo>> mTypeParams =
+        FastStack.newInstance();
+
+    /**
+     * Whether to log class loading errors to the checkstyle report
+     * instead of throwing a RTE.
+     *
+     * Logging errors will avoid stopping checkstyle completely
+     * because of a typo in javadoc. However, with modern IDEs that
+     * support automated refactoring and generate javadoc this will
+     * occur rarely, so by default we assume a configuration problem
+     * in the checkstyle classpath and throw an execption.
+     *
+     * This configuration option was triggered by bug 1422462.
+     */
+    private boolean mLogLoadErrors = true;
+
+    /**
+     * Controls whether to log class loading errors to the checkstyle report
+     * instead of throwing a RTE.
+     *
+     * @param aLogLoadErrors true if errors should be logged
+     */
+    public final void setLogLoadErrors(boolean aLogLoadErrors)
+    {
+        mLogLoadErrors = aLogLoadErrors;
+    }
+
+    /**
+     * Whether to show class loading errors in the checkstyle report.
+     * Request ID 1491630
+     */
+    private boolean mSuppressLoadErrors;
+
+    /**
+     * Controls whether to show class loading errors in the checkstyle report.
+     *
+     * @param aSuppressLoadErrors true if errors shouldn't be shown
+     */
+    public final void setSuppressLoadErrors(boolean aSuppressLoadErrors)
+    {
+        mSuppressLoadErrors = aSuppressLoadErrors;
+    }
+
+    /**
+     * Called to process an AST when visiting it.
+     * @param aAST the AST to process. Guaranteed to not be PACKAGE_DEF or
+     *             IMPORT tokens.
+     */
+    protected abstract void processAST(DetailAST aAST);
+
+    @Override
+    public final int[] getRequiredTokens()
+    {
+        return new int[] {
+            TokenTypes.PACKAGE_DEF,
+            TokenTypes.IMPORT,
+            TokenTypes.CLASS_DEF,
+            TokenTypes.INTERFACE_DEF,
+            TokenTypes.ENUM_DEF,
+        };
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        mPackageFullIdent = FullIdent.createFullIdent(null);
+        mImports.clear();
+        // add java.lang.* since it's always imported
+        mImports.add("java.lang.*");
+        mClassResolver = null;
+        mCurrentClass = "";
+        mTypeParams.clear();
+    }
+
+    @Override
+    public final void visitToken(DetailAST aAST)
+    {
+        if (aAST.getType() == TokenTypes.PACKAGE_DEF) {
+            processPackage(aAST);
+        }
+        else if (aAST.getType() == TokenTypes.IMPORT) {
+            processImport(aAST);
+        }
+        else if ((aAST.getType() == TokenTypes.CLASS_DEF)
+                 || (aAST.getType() == TokenTypes.INTERFACE_DEF)
+                 || (aAST.getType() == TokenTypes.ENUM_DEF))
+        {
+            processClass(aAST);
+        }
+        else {
+            if (aAST.getType() == TokenTypes.METHOD_DEF) {
+                processTypeParams(aAST);
+            }
+            processAST(aAST);
+        }
+    }
+
+    @Override
+    public final void leaveToken(DetailAST aAST)
+    {
+        if ((aAST.getType() == TokenTypes.CLASS_DEF)
+            || (aAST.getType() == TokenTypes.ENUM_DEF))
+        {
+            // perhaps it was inner class
+            int dotIdx = mCurrentClass.lastIndexOf("$");
+            if (dotIdx == -1) {
+                // perhaps just a class
+                dotIdx = mCurrentClass.lastIndexOf(".");
+            }
+            if (dotIdx == -1) {
+                // looks like a topmost class
+                mCurrentClass = "";
+            }
+            else {
+                mCurrentClass = mCurrentClass.substring(0, dotIdx);
+            }
+            mTypeParams.pop();
+        }
+        else if (aAST.getType() == TokenTypes.METHOD_DEF) {
+            mTypeParams.pop();
+        }
+        else if ((aAST.getType() != TokenTypes.PACKAGE_DEF)
+                 && (aAST.getType() != TokenTypes.IMPORT))
+        {
+            leaveAST(aAST);
+        }
+    }
+
+    /**
+     * Called when exiting an AST. A no-op by default, extending classes
+     * may choose to override this to augment their processing.
+     * @param aAST the AST we are departing. Guaranteed to not be PACKAGE_DEF,
+     *             CLASS_DEF, or IMPORT
+     */
+    protected void leaveAST(DetailAST aAST)
+    {
+    }
+
+    /**
+     * Is exception is unchecked (subclass of <code>RuntimeException</code>
+     * or <code>Error</code>
+     *
+     * @param aException <code>Class</code> of exception to check
+     * @return true  if exception is unchecked
+     *         false if exception is checked
+     */
+    protected boolean isUnchecked(Class<?> aException)
+    {
+        return isSubclass(aException, RuntimeException.class)
+            || isSubclass(aException, Error.class);
+    }
+
+    /**
+     * Checks if one class is subclass of another
+     *
+     * @param aChild <code>Class</code> of class
+     *               which should be child
+     * @param aParent <code>Class</code> of class
+     *                which should be parent
+     * @return true  if aChild is subclass of aParent
+     *         false otherwise
+     */
+    protected boolean isSubclass(Class<?> aChild, Class<?> aParent)
+    {
+        return (aParent != null) && (aChild != null)
+            &&  aParent.isAssignableFrom(aChild);
+    }
+
+    /** @return <code>ClassResolver</code> for current tree. */
+    private ClassResolver getClassResolver()
+    {
+        if (mClassResolver == null) {
+            mClassResolver =
+                new ClassResolver(getClassLoader(),
+                                  mPackageFullIdent.getText(),
+                                  mImports);
+        }
+        return mClassResolver;
+    }
+
+    /**
+     * Attempts to resolve the Class for a specified name.
+     * @param aClassName name of the class to resolve
+     * @param aCurrentClass name of surrounding class.
+     * @return the resolved class or <code>null</code>
+     *          if unable to resolve the class.
+     */
+    protected final Class<?> resolveClass(String aClassName,
+            String aCurrentClass)
+    {
+        try {
+            return getClassResolver().resolve(aClassName, aCurrentClass);
+        }
+        catch (final ClassNotFoundException e) {
+            return null;
+        }
+    }
+
+    /**
+     * Tries to load class. Logs error if unable.
+     * @param aIdent name of class which we try to load.
+     * @param aCurrentClass name of surrounding class.
+     * @return <code>Class</code> for a ident.
+     */
+    protected final Class<?> tryLoadClass(Token aIdent, String aCurrentClass)
+    {
+        final Class<?> clazz = resolveClass(aIdent.getText(), aCurrentClass);
+        if (clazz == null) {
+            logLoadError(aIdent);
+        }
+        return clazz;
+    }
+
+    /**
+     * Logs error if unable to load class information.
+     * Abstract, should be overrided in subclasses.
+     * @param aIdent class name for which we can no load class.
+     */
+    protected abstract void logLoadError(Token aIdent);
+
+    /**
+     * Common implementation for logLoadError() method.
+     * @param aLineNo line number of the problem.
+     * @param aColumnNo column number of the problem.
+     * @param aMsgKey message key to use.
+     * @param aValues values to fill the message out.
+     */
+    protected final void logLoadErrorImpl(int aLineNo, int aColumnNo,
+                                          String aMsgKey, Object... aValues)
+    {
+        if (!mLogLoadErrors) {
+            final LocalizedMessage msg = new LocalizedMessage(aLineNo,
+                                                    aColumnNo,
+                                                    getMessageBundle(),
+                                                    aMsgKey,
+                                                    aValues,
+                                                    getSeverityLevel(),
+                                                    getId(),
+                                                    this.getClass(),
+                                                    null);
+            throw new RuntimeException(msg.getMessage());
+        }
+
+        if (!mSuppressLoadErrors) {
+            log(aLineNo, aColumnNo, aMsgKey, aValues);
+        }
+    }
+
+    /**
+     * Collects the details of a package.
+     * @param aAST node containing the package details
+     */
+    private void processPackage(DetailAST aAST)
+    {
+        final DetailAST nameAST = aAST.getLastChild().getPreviousSibling();
+        mPackageFullIdent = FullIdent.createFullIdent(nameAST);
+    }
+
+    /**
+     * Collects the details of imports.
+     * @param aAST node containing the import details
+     */
+    private void processImport(DetailAST aAST)
+    {
+        final FullIdent name = FullIdent.createFullIdentBelow(aAST);
+        if (name != null) {
+            mImports.add(name.getText());
+        }
+    }
+
+    /**
+     * Process type params (if any) for given class, enum or method.
+     * @param aAST class, enum or method to process.
+     */
+    private void processTypeParams(DetailAST aAST)
+    {
+        final DetailAST typeParams =
+            aAST.findFirstToken(TokenTypes.TYPE_PARAMETERS);
+
+        final Map<String, ClassInfo> paramsMap = Maps.newHashMap();
+        mTypeParams.push(paramsMap);
+
+        if (typeParams == null) {
+            return;
+        }
+
+        for (DetailAST child = typeParams.getFirstChild();
+             child != null;
+             child = child.getNextSibling())
+        {
+            if (child.getType() == TokenTypes.TYPE_PARAMETER) {
+                final DetailAST param = child;
+                final String alias =
+                    param.findFirstToken(TokenTypes.IDENT).getText();
+                final DetailAST bounds =
+                    param.findFirstToken(TokenTypes.TYPE_UPPER_BOUNDS);
+                if (bounds != null) {
+                    final FullIdent name =
+                        FullIdent.createFullIdentBelow(bounds);
+                    final ClassInfo ci =
+                        createClassInfo(new Token(name), getCurrentClassName());
+                    paramsMap.put(alias, ci);
+                }
+            }
+        }
+    }
+
+    /**
+     * Processes class definition.
+     * @param aAST class definition to process.
+     */
+    private void processClass(DetailAST aAST)
+    {
+        final DetailAST ident = aAST.findFirstToken(TokenTypes.IDENT);
+        mCurrentClass += ("".equals(mCurrentClass) ? "" : "$")
+            + ident.getText();
+
+        processTypeParams(aAST);
+    }
+
+    /**
+     * Returns current class.
+     * @return name of current class.
+     */
+    protected final String getCurrentClassName()
+    {
+        return mCurrentClass;
+    }
+
+    /**
+     * Creates class info for given name.
+     * @param aName name of type.
+     * @param aSurroundingClass name of surrounding class.
+     * @return class infor for given name.
+     */
+    protected final ClassInfo createClassInfo(final Token aName,
+                                              final String aSurroundingClass)
+    {
+        final ClassInfo ci = findClassAlias(aName.getText());
+        if (ci != null) {
+            return new ClassAlias(aName, ci);
+        }
+        return new RegularClass(aName, aSurroundingClass, this);
+    }
+
+    /**
+     * Looking if a given name is alias.
+     * @param aName given name
+     * @return ClassInfo for alias if it exists, null otherwise
+     */
+    protected final ClassInfo findClassAlias(final String aName)
+    {
+        ClassInfo ci = null;
+        for (int i = mTypeParams.size() - 1; i >= 0; i--) {
+            final Map<String, ClassInfo> paramMap = mTypeParams.peek(i);
+            ci = paramMap.get(aName);
+            if (ci != null) {
+                break;
+            }
+        }
+        return ci;
+    }
+
+    /**
+     * Contains class's <code>Token</code>.
+     */
+    protected abstract static class ClassInfo
+    {
+        /** <code>FullIdent</code> associated with this class. */
+        private final Token mName;
+
+        /** @return class name */
+        public final Token getName()
+        {
+            return mName;
+        }
+
+        /** @return <code>Class</code> associated with an object. */
+        public abstract Class<?> getClazz();
+
+        /**
+         * Creates new instance of class inforamtion object.
+         * @param aName token which represents class name.
+         */
+        protected ClassInfo(final Token aName)
+        {
+            if (aName == null) {
+                throw new NullPointerException(
+                    "ClassInfo's name should be non-null");
+            }
+            mName = aName;
+        }
+    }
+
+    /** Represents regular classes/enumes. */
+    private static final class RegularClass extends ClassInfo
+    {
+        /** name of surrounding class. */
+        private final String mSurroundingClass;
+        /** is class loadable. */
+        private boolean mIsLoadable = true;
+        /** <code>Class</code> object of this class if it's loadable. */
+        private Class<?> mClass;
+        /** the check we use to resolve classes. */
+        private final AbstractTypeAwareCheck mCheck;
+
+        /**
+         * Creates new instance of of class information object.
+         * @param aName <code>FullIdent</code> associated with new object.
+         * @param aSurroundingClass name of current surrounding class.
+         * @param aCheck the check we use to load class.
+         */
+        private RegularClass(final Token aName,
+                             final String aSurroundingClass,
+                             final AbstractTypeAwareCheck aCheck)
+        {
+            super(aName);
+            mSurroundingClass = aSurroundingClass;
+            mCheck = aCheck;
+        }
+        /** @return if class is loadable ot not. */
+        private boolean isLoadable()
+        {
+            return mIsLoadable;
+        }
+
+        @Override
+        public Class<?> getClazz()
+        {
+            if (isLoadable() && (mClass == null)) {
+                setClazz(mCheck.tryLoadClass(getName(), mSurroundingClass));
+            }
+            return mClass;
+        }
+
+        /**
+         * Associates <code> Class</code> with an object.
+         * @param aClass <code>Class</code> to associate with.
+         */
+        private void setClazz(Class<?> aClass)
+        {
+            mClass = aClass;
+            mIsLoadable = (mClass != null);
+        }
+
+        @Override
+        public String toString()
+        {
+            return "RegularClass[name=" + getName()
+                + ", in class=" + mSurroundingClass
+                + ", loadable=" + mIsLoadable
+                + ", class=" + mClass + "]";
+        }
+    }
+
+    /** Represents type param which is "alias" for real type. */
+    private static class ClassAlias extends ClassInfo
+    {
+        /** Class information associated with the alias. */
+        private final ClassInfo mClassInfo;
+
+        /**
+         * Creates nnew instance of the class.
+         * @param aName token which represents name of class alias.
+         * @param aClassInfo class information associated with the alias.
+         */
+        ClassAlias(final Token aName, ClassInfo aClassInfo)
+        {
+            super(aName);
+            mClassInfo = aClassInfo;
+        }
+
+        @Override
+        public final Class<?> getClazz()
+        {
+            return mClassInfo.getClazz();
+        }
+
+        @Override
+        public String toString()
+        {
+            return "ClassAlias[alias " + getName()
+                + " for " + mClassInfo + "]";
+        }
+    }
+
+    /**
+     * Represents text element with location in the text.
+     */
+    protected static class Token
+    {
+        /** token's column number. */
+        private final int mColumn;
+        /** token's line number. */
+        private final int mLine;
+        /** token's text. */
+        private final String mText;
+
+        /**
+         * Creates token.
+         * @param aText token's text
+         * @param aLine token's line number
+         * @param aColumn token's column number
+         */
+        public Token(String aText, int aLine, int aColumn)
+        {
+            mText = aText;
+            mLine = aLine;
+            mColumn = aColumn;
+        }
+
+        /**
+         * Converts FullIdent to Token.
+         * @param aFullIdent full ident to convert.
+         */
+        public Token(FullIdent aFullIdent)
+        {
+            mText = aFullIdent.getText();
+            mLine = aFullIdent.getLineNo();
+            mColumn = aFullIdent.getColumnNo();
+        }
+
+        /** @return line number of the token */
+        public int getLineNo()
+        {
+            return mLine;
+        }
+
+        /** @return column number of the token */
+        public int getColumnNo()
+        {
+            return mColumn;
+        }
+
+        /** @return text of the token */
+        public String getText()
+        {
+            return mText;
+        }
+
+        @Override
+        public String toString()
+        {
+            return "Token[" + getText() + "(" + getLineNo()
+                + "x" + getColumnNo() + ")]";
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/ArrayTypeStyleCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/ArrayTypeStyleCheck.java
new file mode 100644
index 0000000..edd99b1
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/ArrayTypeStyleCheck.java
@@ -0,0 +1,78 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Checks the style of array type definitions.
+ * Some like Java-style: <code>public static void main(String[] args)</code>
+ * and some like C-style: public static void main(String args[])
+ *
+ * By default the Check enforces Java style.
+ * @author lkuehne
+ */
+public class ArrayTypeStyleCheck extends Check
+{
+    /** controls whether to use Java or C style */
+    private boolean mJavaStyle = true;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.ARRAY_DECLARATOR};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST typeAST = aAST.getParent();
+        if (typeAST.getType() != TokenTypes.TYPE) {
+            return;
+        }
+        final DetailAST declAST = typeAST.getParent();
+        if (declAST.getType() == TokenTypes.METHOD_DEF) {
+            // Do not check method's return type.
+            // We have no alternatives here.
+            return;
+        }
+
+        final DetailAST variableAST = typeAST.getNextSibling();
+        if (variableAST != null) {
+            final boolean isJavaStyle =
+                (variableAST.getLineNo() > aAST.getLineNo())
+                || (variableAST.getColumnNo() > aAST.getColumnNo());
+
+            if (isJavaStyle != mJavaStyle) {
+                log(aAST.getLineNo(), aAST.getColumnNo(), "array.type.style");
+            }
+        }
+    }
+
+    /**
+     * Controls whether to check for Java or C style.
+     * @param aJavaStyle true if Java style should be used.
+     */
+    public void setJavaStyle(boolean aJavaStyle)
+    {
+        mJavaStyle = aJavaStyle;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/AvoidEscapedUnicodeCharactersCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/AvoidEscapedUnicodeCharactersCheck.java
new file mode 100644
index 0000000..1ed6254
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/AvoidEscapedUnicodeCharactersCheck.java
@@ -0,0 +1,346 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+/**
+ * <p>
+ * Restrict using <a href =
+ * "http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.3">
+ * Unicode escapes</a> (e.g. \u221e).
+ * It is possible to allow using escapes for
+ * <a href="http://en.wiktionary.org/wiki/Appendix:Control_characters">
+ * non-printable(control) characters</a>.
+ * Also, this check can be configured to allow using escapes
+ * if trail comment is present. By the option it is possible to
+ * allow using escapes if literal contains only them. By the option it
+ * is possible to allow using escapes for space literals.
+ * </p>
+ * <p>
+ * Examples of using Unicode:</p>
+ * <pre>
+ * String unitAbbrev = "μs"; //Best: perfectly clear even without a comment.
+ * String unitAbbrev = "\u03bcs"; //Poor: the reader has no idea what this is.
+ * </pre>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="AvoidEscapedUnicodeCharacters"/>
+ * </pre>
+ * <p>
+ * An example of non-printable(control) characters.
+ * </p>
+ * <pre>
+ * return '\ufeff' + content; // byte order mark
+ * </pre>
+ * <p>
+ * An example of how to configure the check to allow using escapes
+ * for non-printable(control) characters:
+ * </p>
+ * <pre>
+ * <module name="AvoidEscapedUnicodeCharacters">
+ *     <property name="allowEscapesForControlCharacters" value="true"/>
+ * </module>
+ * </pre>
+ * <p>
+ * Example of using escapes with trail comment:
+ * </p>
+ * <pre>
+ * String unitAbbrev = "\u03bcs"; // Greek letter mu, "s"
+ * </pre>
+ * <p>An example of how to configure the check to allow using escapes
+ * if trail comment is present:
+ * </p>
+ * <pre>
+ * <module name="AvoidEscapedUnicodeCharacters">
+ *     <property name="allowByTailComment" value="true"/>
+ * </module>
+ * </pre>
+ * <p>Example of using escapes if literal contains only them:
+ * </p>
+ * <pre>
+ * String unitAbbrev = "\u03bc\u03bc\u03bc";
+ * </pre>
+ * <p>An example of how to configure the check to allow escapes
+ * if literal contains only them:
+ * </p>
+ * <pre>
+ * <module name="AvoidEscapedUnicodeCharacters">
+ *    <property name="allowIfAllCharactersEscaped" value="true"/>
+ * </module>
+ * </pre>
+ * <p>An example of how to configure the check to allow non-printable escapes:
+ * </p>
+ * <pre>
+ * <module name="AvoidEscapedUnicodeCharacters">
+ *    <property name="allowNonPrintableEscapes" value="true"/>
+ * </module>
+ * </pre>
+ *
+ * @author maxvetrenko
+ *
+ */
+public class AvoidEscapedUnicodeCharactersCheck
+    extends Check
+{
+     /** Regexp for Unicode chars */
+    private static Pattern sUnicodeRegexp =
+            Utils.getPattern("\\\\u[a-fA-F0-9]{4}");
+
+    /** Regexp Unicode control characters */
+    private static Pattern sUnicodeControl = Utils.getPattern("\\\\(u|U)"
+            + "(00[0-1][0-1A-Fa-f]|00[8-9][0-9A-Fa-f]|034(f|F)|070(f|F)"
+            + "|180(e|E)|200[b-fB-F]|202[b-eB-E]|206[0-4a-fA-F]"
+            + "|[fF]{3}[9a-bA-B]|[fF][eE][fF]{2})");
+
+    /** Regexp for trail comment */
+    private static Pattern sCommentRegexp = Utils.getPattern(";[ ]*//+"
+            + "[a-zA-Z0-9 ]*|;[ ]*/[*]{1}+[a-zA-Z0-9 ]*");
+
+    /** Regexp for all escaped chars*/
+    private static Pattern sAllEscapedChars =
+            Utils.getPattern("^((\\\\u)[a-fA-F0-9]{4}"
+                    + "||\\\\b|\\\\t|\\\\n|\\\\f|\\\\r|\\\\|\\\"|\\\')+$");
+
+    /** Regexp for non-printable unicode chars*/
+    private static Pattern sNonPrintableChars = Utils.getPattern("\\\\u1680|\\\\u2028"
+            + "|\\\\u2029|\\\\u205(f|F)|\\\\u3000|\\\\u2007|\\\\u2000|\\\\u200(a|A)"
+            + "|\\\\u007(F|f)|\\\\u009(f|F)|\\\\u(f|F){4}|\\\\u007(F|f)|\\\\u00(a|A)(d|D)"
+            + "|\\\\u0600|\\\\u061(c|C)|\\\\u06(d|D){2}|\\\\u070(f|F)|\\\\u1680|\\\\u180(e|E)"
+            + "|\\\\u2000|\\\\u2028|\\\\u205(f|F)|\\\\u2066|\\\\u2067|\\\\u2068|\\\\u2069"
+            + "|\\\\u206(a|A)|\\\\u(d|D)800|\\\\u(f|F)(e|E)(f|F){2}|\\\\u(f|F){3}9"
+            + "|\\\\u(f|F){3}(a|A)|\\\\u0020|\\\\u00(a|A)0|\\\\u00(a|A)(d|D)|\\\\u0604"
+            + "|\\\\u061(c|C)|\\\\u06(d|D){2}|\\\\u070(f|F)|\\\\u1680|\\\\u180(e|E)|\\\\u200(f|F)"
+            + "|\\\\u202(f|F)|\\\\u2064|\\\\u2066|\\\\u2067|\\\\u2068|\\\\u2069|\\\\u206(f|F)"
+            + "|\\\\u(f|F)8(f|F){2}|\\\\u(f|F)(e|E)(f|F){2}|\\\\u(f|F){3}9|\\\\u(f|F){3}(b|B)"
+            + "|\\\\u05(d|D)0|\\\\u05(f|F)3|\\\\u0600|\\\\u0750|\\\\u0(e|E)00|\\\\u1(e|E)00"
+            + "|\\\\u2100|\\\\u(f|F)(b|B)50|\\\\u(f|F)(e|E)70|\\\\u(F|f){2}61|\\\\u04(f|F)9"
+            + "|\\\\u05(b|B)(e|E)|\\\\u05(e|E)(a|A)|\\\\u05(f|F)4|\\\\u06(f|F){2}"
+            + "|\\\\u077(f|F)|\\\\u0(e|E)7(f|F)|\\\\u20(a|A)(f|F)|\\\\u213(a|A)|\\\\u0000"
+            + "|\\\\u(f|F)(d|D)(f|F){2}|\\\\u(f|F)(e|E)(f|F){2}|\\\\u(f|F){2}(d|D)(c|C)"
+            + "|\\\\u2002|\\\\u0085|\\\\u200(a|A)|\\\\u2005|\\\\u2000|\\\\u2029|\\\\u000(B|b)"
+            + "|\\\\u2008|\\\\u2003|\\\\u205(f|F)|\\\\u1680|\\\\u0009|\\\\u0020|\\\\u2006"
+            + "|\\\\u2001|\\\\u202(f|F)|\\\\u00(a|A)0|\\\\u000(c|C)|\\\\u2009|\\\\u2004|\\\\u2028"
+            + "|\\\\u2028|\\\\u2007|\\\\u2004|\\\\u2028|\\\\u2007|\\\\u2025"
+            + "|\\\\u(f|F){2}0(e|E)|\\\\u(f|F){2}61");
+
+    /** Allow use escapes for non-printable(control) characters.  */
+    private boolean mAllowEscapesForControlCharacters;
+
+    /** Allow use escapes if trail comment is present*/
+    private boolean mAllowByTailComment;
+
+    /** Allow if all characters in literal are excaped*/
+    private boolean mAllowIfAllCharactersEscaped;
+
+    /** Allow escapes for space literals*/
+    private boolean mAllowNonPrintableEscapes;
+
+    /**
+     * Set mAllowIfAllCharactersEscaped.
+     * @param aAllow user's value.
+     */
+    public final void setAllowEscapesForControlCharacters(boolean aAllow)
+    {
+        mAllowEscapesForControlCharacters = aAllow;
+    }
+
+    /**
+     * Set mAllowByTailComment.
+     * @param aAllow user's value.
+     */
+    public final void setAllowByTailComment(boolean aAllow)
+    {
+        mAllowByTailComment = aAllow;
+    }
+
+    /**
+     * Set mAllowIfAllCharactersEscaped.
+     * @param aAllow user's value.
+     */
+    public final void setAllowIfAllCharactersEscaped(boolean aAllow)
+    {
+        mAllowIfAllCharactersEscaped = aAllow;
+    }
+
+    /**
+     * Set mAllowSpaceEscapes.
+     * @param aAllow user's value.
+     */
+    public final void setAllowNonPrintableEscapes(boolean aAllow)
+    {
+        mAllowNonPrintableEscapes = aAllow;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.STRING_LITERAL, TokenTypes.CHAR_LITERAL};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+
+        final String literal = aAST.getText();
+
+        if (hasUnicodeChar(literal)) {
+            if (!(mAllowByTailComment && hasTrailComment(aAST)
+                    || isAllCharactersEscaped(literal)
+                    || (mAllowEscapesForControlCharacters
+                            && isOnlyUnicodeValidChars(literal, sUnicodeControl))
+                    || (mAllowNonPrintableEscapes
+                            && isOnlyUnicodeValidChars(literal, sNonPrintableChars))))
+            {
+                log(aAST.getLineNo(), "forbid.escaped.unicode.char");
+            }
+        }
+    }
+
+    /**
+     * Checks if literal has Unicode chars.
+     * @param aLiteral String literal.
+     * @return true if literal has Unicode chars.
+     */
+    private boolean hasUnicodeChar(String aLiteral)
+    {
+        return sUnicodeRegexp.matcher(aLiteral).find();
+    }
+
+    /**
+     * Check if String literal contains Unicode control chars.
+     * @param aLiteral String llteral.
+     * @param aPattern RegExp for valid characters.
+     * @return true, if String literal contains Unicode control chars.
+     */
+    private boolean isOnlyUnicodeValidChars(String aLiteral, Pattern aPattern)
+    {
+        final int unicodeMatchesCounter =
+                countMatches(sUnicodeRegexp, aLiteral);
+        final int unicodeValidMatchesCouter =
+                countMatches(aPattern, aLiteral);
+        return unicodeMatchesCounter - unicodeValidMatchesCouter == 0;
+    }
+
+    /**
+     * Check if trail comment is present after aAst token.
+     * @param aAst current token.
+     * @return true if trail comment is present after aAst token.
+     */
+    private boolean hasTrailComment(DetailAST aAst)
+    {
+        boolean result = false;
+        final DetailAST variableDef = getVariableDef(aAst);
+        DetailAST semi;
+
+        if (variableDef != null) {
+
+            semi = variableDef.getNextSibling();
+
+            if (semi.getType() != TokenTypes.SEMI) {
+                semi = variableDef.getLastChild();
+            }
+        }
+        else {
+            semi = getSemi(aAst);
+        }
+
+        if (semi != null) {
+            final int lineNo = semi.getLineNo();
+            final String currentLine = getLines()[lineNo - 1];
+
+            if (currentLine != null && sCommentRegexp.matcher(currentLine).find()) {
+                result = true;
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * Count regexp matchers into String literal.
+     * @param aPattern pattern.
+     * @param aTarget String literal.
+     * @return count of regexp matchers.
+     */
+    private int countMatches(Pattern aPattern, String aTarget)
+    {
+        int matcherCounter = 0;
+        final Matcher matcher = aPattern.matcher(aTarget);
+        while (matcher.find()) {
+            matcherCounter++;
+        }
+        return matcherCounter;
+    }
+
+    /**
+     * Get variable definition.
+     * @param aAst current token.
+     * @return variable definition.
+     */
+    private DetailAST getVariableDef(DetailAST aAst)
+    {
+        DetailAST result = aAst.getParent();
+        while (result != null
+                && result.getType() != TokenTypes.VARIABLE_DEF)
+        {
+            result = result.getParent();
+        }
+        return result;
+    }
+
+    /**
+     * Get semi token.
+     * @param aAst current token.
+     * @return semi token or null.
+     */
+    private DetailAST getSemi(DetailAST aAst)
+    {
+        DetailAST result = aAst.getParent();
+        while (result != null
+                && result.getLastChild().getType() != TokenTypes.SEMI)
+        {
+            result = result.getParent();
+        }
+        if (result != null) {
+            result = result.getLastChild();
+        }
+        return result;
+    }
+
+    /**
+     * Checks if all characters in String literal is escaped.
+     * @param aLiteral current literal.
+     * @return true if all characters in String literal is escaped.
+     */
+    private boolean isAllCharactersEscaped(String aLiteral)
+    {
+        return mAllowIfAllCharactersEscaped
+                && sAllEscapedChars.matcher(aLiteral.substring(1,
+                        aLiteral.length() - 1)).find();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/CheckUtils.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/CheckUtils.java
new file mode 100644
index 0000000..3d1ae36
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/CheckUtils.java
@@ -0,0 +1,329 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import java.util.List;
+
+/**
+ * Contains utility methods for the checks.
+ *
+ * @author Oliver Burn
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ * @author o_sukhodolsky
+ */
+public final class CheckUtils
+{
+    /** prevent instances */
+    private CheckUtils()
+    {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * Tests whether a method definition AST defines an equals covariant.
+     * @param aAST the method definition AST to test.
+     * Precondition: aAST is a TokenTypes.METHOD_DEF node.
+     * @return true if aAST defines an equals covariant.
+     */
+    public static boolean isEqualsMethod(DetailAST aAST)
+    {
+        if (aAST.getType() != TokenTypes.METHOD_DEF) {
+            // A node must be method def
+            return false;
+        }
+
+        // non-static, non-abstract?
+        final DetailAST modifiers = aAST.findFirstToken(TokenTypes.MODIFIERS);
+        if (modifiers.branchContains(TokenTypes.LITERAL_STATIC)
+            || modifiers.branchContains(TokenTypes.ABSTRACT))
+        {
+            return false;
+        }
+
+        // named "equals"?
+        final DetailAST nameNode = aAST.findFirstToken(TokenTypes.IDENT);
+        final String name = nameNode.getText();
+        if (!"equals".equals(name)) {
+            return false;
+        }
+
+        // one parameter?
+        final DetailAST paramsNode = aAST.findFirstToken(TokenTypes.PARAMETERS);
+        return (paramsNode.getChildCount() == 1);
+    }
+
+    /**
+     * Returns whether a token represents an ELSE as part of an ELSE / IF set.
+     * @param aAST the token to check
+     * @return whether it is
+     */
+    public static boolean isElseIf(DetailAST aAST)
+    {
+        final DetailAST parentAST = aAST.getParent();
+
+        return (aAST.getType() == TokenTypes.LITERAL_IF)
+            && (isElse(parentAST) || isElseWithCurlyBraces(parentAST));
+    }
+
+    /**
+     * Returns whether a token represents an ELSE.
+     * @param aAST the token to check
+     * @return whether the token represents an ELSE
+     */
+    private static boolean isElse(DetailAST aAST)
+    {
+        return aAST.getType() == TokenTypes.LITERAL_ELSE;
+    }
+
+    /**
+     * Returns whether a token represents an SLIST as part of an ELSE
+     * statement.
+     * @param aAST the token to check
+     * @return whether the toke does represent an SLIST as part of an ELSE
+     */
+    private static boolean isElseWithCurlyBraces(DetailAST aAST)
+    {
+        return (aAST.getType() == TokenTypes.SLIST)
+            && (aAST.getChildCount() == 2)
+            && isElse(aAST.getParent());
+    }
+
+    /**
+     * Creates <code>FullIdent</code> for given type node.
+     * @param aTypeAST a type node.
+     * @return <code>FullIdent</code> for given type.
+     */
+    public static FullIdent createFullType(DetailAST aTypeAST)
+    {
+        final DetailAST arrayDeclAST =
+            aTypeAST.findFirstToken(TokenTypes.ARRAY_DECLARATOR);
+
+        return createFullTypeNoArrays(arrayDeclAST == null ? aTypeAST
+                                                           : arrayDeclAST);
+    }
+
+    /**
+     * @param aTypeAST a type node (no array)
+     * @return <code>FullIdent</code> for given type.
+     */
+    private static FullIdent createFullTypeNoArrays(DetailAST aTypeAST)
+    {
+        return FullIdent.createFullIdent(aTypeAST.getFirstChild());
+    }
+
+    // constants for parseDouble()
+    /** octal radix */
+    private static final int BASE_8 = 8;
+
+    /** decimal radix */
+    private static final int BASE_10 = 10;
+
+    /** hex radix */
+    private static final int BASE_16 = 16;
+
+    /**
+     * Returns the value represented by the specified string of the specified
+     * type. Returns 0 for types other than float, double, int, and long.
+     * @param aText the string to be parsed.
+     * @param aType the token type of the text. Should be a constant of
+     * {@link com.puppycrawl.tools.checkstyle.api.TokenTypes}.
+     * @return the double value represented by the string argument.
+     */
+    public static double parseDouble(String aText, int aType)
+    {
+        String txt = aText.replaceAll("_", "");
+        double result = 0;
+        switch (aType) {
+        case TokenTypes.NUM_FLOAT:
+        case TokenTypes.NUM_DOUBLE:
+            result = Double.parseDouble(txt);
+            break;
+        case TokenTypes.NUM_INT:
+        case TokenTypes.NUM_LONG:
+            int radix = BASE_10;
+            if (txt.startsWith("0x") || txt.startsWith("0X")) {
+                radix = BASE_16;
+                txt = txt.substring(2);
+            }
+            else if (txt.charAt(0) == '0') {
+                radix = BASE_8;
+                txt = txt.substring(1);
+            }
+            if ((txt.endsWith("L")) || (txt.endsWith("l"))) {
+                txt = txt.substring(0, txt.length() - 1);
+            }
+            if (txt.length() > 0) {
+                if (aType == TokenTypes.NUM_INT) {
+                    result = parseInt(txt, radix);
+                }
+                else {
+                    result = parseLong(txt, radix);
+                }
+            }
+            break;
+        default:
+            break;
+        }
+        return result;
+    }
+
+    /**
+     * Parses the string argument as a signed integer in the radix specified by
+     * the second argument. The characters in the string must all be digits of
+     * the specified radix. Handles negative values, which method
+     * java.lang.Integer.parseInt(String, int) does not.
+     * @param aText the String containing the integer representation to be
+     * parsed. Precondition: aText contains a parsable int.
+     * @param aRadix the radix to be used while parsing aText.
+     * @return the integer represented by the string argument in the specified
+     * radix.
+     */
+    public static int parseInt(String aText, int aRadix)
+    {
+        int result = 0;
+        final int max = aText.length();
+        for (int i = 0; i < max; i++) {
+            final int digit = Character.digit(aText.charAt(i), aRadix);
+            result *= aRadix;
+            result += digit;
+        }
+        return result;
+    }
+
+    /**
+     * Parses the string argument as a signed long in the radix specified by
+     * the second argument. The characters in the string must all be digits of
+     * the specified radix. Handles negative values, which method
+     * java.lang.Integer.parseInt(String, int) does not.
+     * @param aText the String containing the integer representation to be
+     * parsed. Precondition: aText contains a parsable int.
+     * @param aRadix the radix to be used while parsing aText.
+     * @return the long represented by the string argument in the specified
+     * radix.
+     */
+    public static long parseLong(String aText, int aRadix)
+    {
+        long result = 0;
+        final int max = aText.length();
+        for (int i = 0; i < max; i++) {
+            final int digit = Character.digit(aText.charAt(i), aRadix);
+            result *= aRadix;
+            result += digit;
+        }
+        return result;
+    }
+
+    /**
+     * Returns the value represented by the specified string of the specified
+     * type. Returns 0 for types other than float, double, int, and long.
+     * @param aText the string to be parsed.
+     * @param aType the token type of the text. Should be a constant of
+     * {@link com.puppycrawl.tools.checkstyle.api.TokenTypes}.
+     * @return the float value represented by the string argument.
+     */
+    public static double parseFloat(String aText, int aType)
+    {
+        return (float) parseDouble(aText, aType);
+    }
+
+    /**
+     * Finds sub-node for given node minimal (line, column) pair.
+     * @param aNode the root of tree for search.
+     * @return sub-node with minimal (line, column) pair.
+     */
+    public static DetailAST getFirstNode(final DetailAST aNode)
+    {
+        DetailAST currentNode = aNode;
+        DetailAST child = aNode.getFirstChild();
+        while (child != null) {
+            final DetailAST newNode = getFirstNode(child);
+            if ((newNode.getLineNo() < currentNode.getLineNo())
+                || ((newNode.getLineNo() == currentNode.getLineNo())
+                    && (newNode.getColumnNo() < currentNode.getColumnNo())))
+            {
+                currentNode = newNode;
+            }
+            child = child.getNextSibling();
+        }
+
+        return currentNode;
+    }
+
+    /**
+     * Retrieves the names of the type parameters to the node.
+     * @param aNode the parameterised AST node
+     * @return a list of type parameter names
+     */
+    public static List<String> getTypeParameterNames(final DetailAST aNode)
+    {
+        final DetailAST typeParameters =
+            aNode.findFirstToken(TokenTypes.TYPE_PARAMETERS);
+
+        final List<String> typeParamNames = Lists.newArrayList();
+        if (typeParameters != null) {
+            final DetailAST typeParam =
+                typeParameters.findFirstToken(TokenTypes.TYPE_PARAMETER);
+            typeParamNames.add(
+                typeParam.findFirstToken(TokenTypes.IDENT).getText());
+
+            DetailAST sibling = typeParam.getNextSibling();
+            while (sibling != null) {
+                if (sibling.getType() == TokenTypes.TYPE_PARAMETER) {
+                    typeParamNames.add(
+                        sibling.findFirstToken(TokenTypes.IDENT).getText());
+                }
+                sibling = sibling.getNextSibling();
+            }
+        }
+
+        return typeParamNames;
+    }
+
+    /**
+     * Retrieves the type parameters to the node.
+     * @param aNode the parameterised AST node
+     * @return a list of type parameter names
+     */
+    public static List<DetailAST> getTypeParameters(final DetailAST aNode)
+    {
+        final DetailAST typeParameters =
+            aNode.findFirstToken(TokenTypes.TYPE_PARAMETERS);
+
+        final List<DetailAST> typeParams = Lists.newArrayList();
+        if (typeParameters != null) {
+            final DetailAST typeParam =
+                typeParameters.findFirstToken(TokenTypes.TYPE_PARAMETER);
+            typeParams.add(typeParam);
+
+            DetailAST sibling = typeParam.getNextSibling();
+            while (sibling != null) {
+                if (sibling.getType() == TokenTypes.TYPE_PARAMETER) {
+                    typeParams.add(sibling);
+                }
+                sibling = sibling.getNextSibling();
+            }
+        }
+
+        return typeParams;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/ClassResolver.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/ClassResolver.java
new file mode 100644
index 0000000..f3fd260
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/ClassResolver.java
@@ -0,0 +1,185 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import java.util.Set;
+
+/**
+ * Utility class to resolve a class name to an actual class. Note that loaded
+ * classes are not initialized.
+ * <p>Limitations: this does not handle inner classes very well.</p>
+ *
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public class ClassResolver
+{
+    /** name of the package to check if the class belongs to **/
+    private final String mPkg;
+    /** set of imports to check against **/
+    private final Set<String> mImports;
+    /** use to load classes **/
+    private final ClassLoader mLoader;
+
+    /**
+     * Creates a new <code>ClassResolver</code> instance.
+     *
+     * @param aLoader the ClassLoader to load classes with.
+     * @param aPkg the name of the package the class may belong to
+     * @param aImports set of imports to check if the class belongs to
+     */
+    public ClassResolver(ClassLoader aLoader, String aPkg, Set<String> aImports)
+    {
+        mLoader = aLoader;
+        mPkg = aPkg;
+        mImports = aImports;
+        mImports.add("java.lang.*");
+    }
+
+    /**
+     * Attempts to resolve the Class for a specified name. The algorithm is
+     * to check:
+     * - fully qualified name
+     * - explicit imports
+     * - enclosing package
+     * - star imports
+     * @param aName name of the class to resolve
+     * @param aCurrentClass name of current class (for inner classes).
+     * @return the resolved class
+     * @throws ClassNotFoundException if unable to resolve the class
+     */
+    public Class<?> resolve(String aName, String aCurrentClass)
+        throws ClassNotFoundException
+    {
+        // See if the class is full qualified
+        Class<?> clazz = resolveQualifiedName(aName);
+        if (clazz != null) {
+            return clazz;
+        }
+
+        // try matching explicit imports
+        for (String imp : mImports) {
+            // Very important to add the "." in the check below. Otherwise you
+            // when checking for "DataException", it will match on
+            // "SecurityDataException". This has been the cause of a very
+            // difficult bug to resolve!
+            if (imp.endsWith("." + aName)) {
+                clazz = resolveQualifiedName(imp);
+                if (clazz != null) {
+                    return clazz;
+                }
+
+            }
+        }
+
+        // See if in the package
+        if (!"".equals(mPkg)) {
+            clazz = resolveQualifiedName(mPkg + "." + aName);
+            if (clazz != null) {
+                return clazz;
+            }
+        }
+
+        //inner class of this class???
+        if (!"".equals(aCurrentClass)) {
+            final String innerClass = (!"".equals(mPkg) ? (mPkg + ".") : "")
+                + aCurrentClass + "$" + aName;
+            if (isLoadable(innerClass)) {
+                return safeLoad(innerClass);
+            }
+        }
+
+        // try star imports
+        for (String imp : mImports) {
+            if (imp.endsWith(".*")) {
+                final String fqn = imp.substring(0, imp.lastIndexOf('.') + 1)
+                    + aName;
+                clazz = resolveQualifiedName(fqn);
+                if (clazz != null) {
+                    return clazz;
+                }
+            }
+        }
+
+        // Giving up, the type is unknown, so load the class to generate an
+        // exception
+        return safeLoad(aName);
+    }
+
+    /**
+     * @return whether a specified class is loadable with safeLoad().
+     * @param aName name of the class to check
+     */
+    public boolean isLoadable(String aName)
+    {
+        try {
+            safeLoad(aName);
+            return true;
+        }
+        catch (final ClassNotFoundException e) {
+            return false;
+        }
+    }
+
+    /**
+     * Will load a specified class is such a way that it will NOT be
+     * initialised.
+     * @param aName name of the class to load
+     * @return the <code>Class</code> for the specified class
+     * @throws ClassNotFoundException if an error occurs
+     */
+    public Class<?> safeLoad(String aName)
+        throws ClassNotFoundException
+    {
+        // The next line will load the class using the specified class
+        // loader. The magic is having the "false" parameter. This means the
+        // class will not be initialised. Very, very important.
+        return Class.forName(aName, false, mLoader);
+    }
+
+    /**
+     * Tries to resolve a class for fully-specified name.
+     * @param aName a given name of class.
+     * @return Class object for the given name or null.
+     */
+    private Class<?> resolveQualifiedName(final String aName)
+    {
+        try {
+            if (isLoadable(aName)) {
+                return safeLoad(aName);
+            }
+            //Perhaps it's fully-qualified inner class
+            final int dot = aName.lastIndexOf(".");
+            if (dot != -1) {
+                final String innerName =
+                    aName.substring(0, dot) + "$" + aName.substring(dot + 1);
+                if (isLoadable(innerName)) {
+                    return safeLoad(innerName);
+                }
+            }
+        }
+        catch (final ClassNotFoundException ex) {
+            // we shouldn't get this exception here,
+            // so this is unexpected runtime exception
+            throw new RuntimeException(ex);
+        }
+
+        return null;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/DeclarationCollector.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/DeclarationCollector.java
new file mode 100644
index 0000000..01a9376
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/DeclarationCollector.java
@@ -0,0 +1,384 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+import java.util.Deque;
+import java.util.Map;
+import java.util.Queue;
+import java.util.Set;
+
+/**
+ * Abstract class for checks which need to collect information about
+ * declared members/parameters/variables.
+ *
+ * @author o_sukhodolsky
+ */
+public abstract class DeclarationCollector extends Check
+{
+    /**
+     * Tree of all the parsed frames
+     */
+    private Map<DetailAST, LexicalFrame> mFrames;
+
+    /**
+     * Frame for the currently processed AST
+     */
+    private LexicalFrame mCurrent;
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        final Deque<LexicalFrame> aFrameStack = Lists.newLinkedList();
+        aFrameStack.add(new GlobalFrame());
+
+        mFrames = Maps.newHashMap();
+
+        DetailAST curNode = aRootAST;
+        while (curNode != null) {
+            collectDeclarations(aFrameStack, curNode);
+            DetailAST toVisit = curNode.getFirstChild();
+            while (curNode != null && toVisit == null) {
+                endCollectingDeclarations(aFrameStack, curNode);
+                toVisit = curNode.getNextSibling();
+                if (toVisit == null) {
+                    curNode = curNode.getParent();
+                }
+            }
+            curNode = toVisit;
+        }
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.CLASS_DEF :
+        case TokenTypes.INTERFACE_DEF :
+        case TokenTypes.ENUM_DEF :
+        case TokenTypes.ANNOTATION_DEF :
+        case TokenTypes.SLIST :
+        case TokenTypes.METHOD_DEF :
+        case TokenTypes.CTOR_DEF :
+            this.mCurrent = this.mFrames.get(aAST);
+            break;
+        default :
+            // do nothing
+        }
+    } // end visitToken
+
+    /**
+     * Parse the next AST for declarations
+     *
+     * @param aFrameStack Stack containing the FrameTree being built
+     * @param aAST AST to parse
+     */
+    private void collectDeclarations(Deque<LexicalFrame> aFrameStack,
+        DetailAST aAST)
+    {
+        final LexicalFrame frame = aFrameStack.peek();
+        switch (aAST.getType()) {
+        case TokenTypes.VARIABLE_DEF :  {
+            final String name =
+                    aAST.findFirstToken(TokenTypes.IDENT).getText();
+            if (frame instanceof ClassFrame) {
+                final DetailAST mods =
+                    aAST.findFirstToken(TokenTypes.MODIFIERS);
+                if (ScopeUtils.inInterfaceBlock(aAST)
+                        || mods.branchContains(TokenTypes.LITERAL_STATIC))
+                {
+                    ((ClassFrame) frame).addStaticMember(name);
+                }
+                else {
+                    ((ClassFrame) frame).addInstanceMember(name);
+                }
+            }
+            else {
+                frame.addName(name);
+            }
+            break;
+        }
+        case TokenTypes.PARAMETER_DEF : {
+            final DetailAST nameAST = aAST.findFirstToken(TokenTypes.IDENT);
+            frame.addName(nameAST.getText());
+            break;
+        }
+        case TokenTypes.CLASS_DEF :
+        case TokenTypes.INTERFACE_DEF :
+        case TokenTypes.ENUM_DEF :
+        case TokenTypes.ANNOTATION_DEF : {
+            final DetailAST nameAST = aAST.findFirstToken(TokenTypes.IDENT);
+            frame.addName(nameAST.getText());
+            aFrameStack.addFirst(new ClassFrame(frame));
+            break;
+        }
+        case TokenTypes.SLIST :
+            aFrameStack.addFirst(new BlockFrame(frame));
+            break;
+        case TokenTypes.METHOD_DEF : {
+            final String name = aAST.findFirstToken(TokenTypes.IDENT).getText();
+            if (frame instanceof ClassFrame) {
+                final DetailAST mods =
+                    aAST.findFirstToken(TokenTypes.MODIFIERS);
+                if (mods.branchContains(TokenTypes.LITERAL_STATIC)) {
+                    ((ClassFrame) frame).addStaticMember(name);
+                }
+                else {
+                    ((ClassFrame) frame).addInstanceMember(name);
+                }
+            }
+        }
+        case TokenTypes.CTOR_DEF :
+            aFrameStack.addFirst(new MethodFrame(frame));
+            break;
+        default:
+            // do nothing
+        }
+    }
+
+
+    /**
+     * End parsing of the AST for declarations.
+     *
+     * @param aFrameStack Stack containing the FrameTree being built
+     * @param aAST AST that was parsed
+     */
+    private void endCollectingDeclarations(Queue<LexicalFrame> aFrameStack,
+        DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.CLASS_DEF :
+        case TokenTypes.INTERFACE_DEF :
+        case TokenTypes.ENUM_DEF :
+        case TokenTypes.ANNOTATION_DEF :
+        case TokenTypes.SLIST :
+        case TokenTypes.METHOD_DEF :
+        case TokenTypes.CTOR_DEF :
+            this.mFrames.put(aAST, aFrameStack.poll());
+            break;
+        default :
+            // do nothing
+        }
+    }
+
+    /**
+     * Check if given name is a name for class field in current environment.
+     * @param aName a name to check
+     * @return true is the given name is name of method or member.
+     */
+    protected final boolean isClassField(String aName)
+    {
+        final LexicalFrame frame = findFrame(aName);
+        return (frame instanceof ClassFrame)
+                && ((ClassFrame) frame).hasInstanceMember(aName);
+    }
+
+    /**
+     * Find frame containing declaration
+     * @param aName name of the declaration to find
+     * @return LexicalFrame containing declaration or null
+     */
+    private LexicalFrame findFrame(String aName)
+    {
+        if (mCurrent != null) {
+            return mCurrent.getIfContains(aName);
+        }
+        else {
+            return null;
+        }
+    }
+
+    /**
+     * A declaration frame.
+     * @author Stephen Bloch
+     * June 19, 2003
+     */
+    private abstract static class LexicalFrame
+    {
+        /** Set of name of variables declared in this frame. */
+        private final Set<String> mVarNames;
+        /**
+         * Parent frame.
+         */
+        private final LexicalFrame mParent;
+
+        /**
+         * constructor -- invokable only via super() from subclasses
+         *
+         * @param aParent parent frame
+         */
+        protected LexicalFrame(LexicalFrame aParent)
+        {
+            mParent = aParent;
+            mVarNames = Sets.newHashSet();
+        }
+
+        /** add a name to the frame.
+         * @param aNameToAdd  the name we're adding
+         */
+        void addName(String aNameToAdd)
+        {
+            mVarNames.add(aNameToAdd);
+        }
+
+        /** check whether the frame contains a given name.
+         * @param aNameToFind  the name we're looking for
+         * @return whether it was found
+         */
+        boolean contains(String aNameToFind)
+        {
+            return mVarNames.contains(aNameToFind);
+        }
+
+        /** check whether the frame contains a given name.
+         * @param aNameToFind  the name we're looking for
+         * @return whether it was found
+         */
+        LexicalFrame getIfContains(String aNameToFind)
+        {
+            if (contains(aNameToFind)) {
+                return this;
+            }
+            else if (mParent != null) {
+                return mParent.getIfContains(aNameToFind);
+            }
+            else {
+                return null;
+            }
+        }
+    }
+
+    /**
+     * The global frame; should hold only class names.
+     * @author Stephen Bloch
+     */
+    private static class GlobalFrame extends LexicalFrame
+    {
+
+        /**
+         * Constructor for the root of the FrameTree
+         */
+        protected GlobalFrame()
+        {
+            super(null);
+        }
+    }
+
+    /**
+     * A frame initiated at method definition; holds parameter names.
+     * @author Stephen Bloch
+     */
+    private static class MethodFrame extends LexicalFrame
+    {
+        /**
+         * @param aParent parent frame
+         */
+        protected MethodFrame(LexicalFrame aParent)
+        {
+            super(aParent);
+        }
+    }
+
+    /**
+     * A frame initiated at class definition; holds instance variable
+     * names.  For the present, I'm not worried about other class names,
+     * method names, etc.
+     * @author Stephen Bloch
+     */
+    private static class ClassFrame extends LexicalFrame
+    {
+        /** Set of name of instance members declared in this frame. */
+        private final Set<String> mInstanceMembers;
+        /** Set of name of variables declared in this frame. */
+        private final Set<String> mStaticMembers;
+
+        /**
+         * Creates new instance of ClassFrame
+         * @param aParent parent frame
+         */
+        public ClassFrame(LexicalFrame aParent)
+        {
+            super(aParent);
+            mInstanceMembers = Sets.newHashSet();
+            mStaticMembers = Sets.newHashSet();
+        }
+
+        /**
+         * Adds static member's name.
+         * @param aName a name of static member of the class
+         */
+        public void addStaticMember(final String aName)
+        {
+            mStaticMembers.add(aName);
+        }
+
+        /**
+         * Adds instance member's name.
+         * @param aName a name of instance member of the class
+         */
+        public void addInstanceMember(final String aName)
+        {
+            mInstanceMembers.add(aName);
+        }
+
+        /**
+         * Checks if a given name is a known instance member of the class.
+         * @param aName a name to check
+         * @return true is the given name is a name of a known
+         *         instance member of the class
+         */
+        public boolean hasInstanceMember(final String aName)
+        {
+            return mInstanceMembers.contains(aName);
+        }
+
+        @Override
+        boolean contains(String aNameToFind)
+        {
+            return super.contains(aNameToFind)
+                    || mInstanceMembers.contains(aNameToFind)
+                    || mStaticMembers.contains(aNameToFind);
+        }
+    }
+
+    /**
+     * A frame initiated on entering a statement list; holds local variable
+     * names.  For the present, I'm not worried about other class names,
+     * method names, etc.
+     * @author Stephen Bloch
+     */
+    private static class BlockFrame extends LexicalFrame
+    {
+
+        /**
+         * @param aParent parent frame
+         */
+        protected BlockFrame(LexicalFrame aParent)
+        {
+            super(aParent);
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java
new file mode 100644
index 0000000..870951e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java
@@ -0,0 +1,389 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import antlr.collections.AST;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import java.util.Arrays;
+import java.util.Set;
+
+/**
+ * <p>
+ * Checks for restricted tokens beneath other tokens.
+ * </p>
+ * <p>
+ * Examples of how to configure the check:
+ * </p>
+ * <pre>
+ * <!-- String literal equality check -->
+ * <module name="DescendantToken">
+ *     <property name="tokens" value="EQUAL,NOT_EQUAL"/>
+ *     <property name="limitedTokens" value="STRING_LITERAL"/>
+ *     <property name="maximumNumber" value="0"/>
+ *     <property name="maximumDepth" value="1"/>
+ * </module>
+ *
+ * <!-- Switch with no default -->
+ * <module name="DescendantToken">
+ *     <property name="tokens" value="LITERAL_SWITCH"/>
+ *     <property name="maximumDepth" value="2"/>
+ *     <property name="limitedTokens" value="LITERAL_DEFAULT"/>
+ *     <property name="minimumNumber" value="1"/>
+ * </module>
+ *
+ * <!-- Assert statement may have side effects -->
+ * <module name="DescendantToken">
+ *     <property name="tokens" value="LITERAL_ASSERT"/>
+ *     <property name="limitedTokens" value="ASSIGN,DEC,INC,POST_DEC,
+ *     POST_INC,PLUS_ASSIGN,MINUS_ASSIGN,STAR_ASSIGN,DIV_ASSIGN,MOD_ASSIGN,
+ *     BSR_ASSIGN,SR_ASSIGN,SL_ASSIGN,BAND_ASSIGN,BXOR_ASSIGN,BOR_ASSIGN,
+ *     METHOD_CALL"/>
+ *     <property name="maximumNumber" value="0"/>
+ * </module>
+ *
+ * <!-- Initialiser in for performs no setup - use while instead? -->
+ * <module name="DescendantToken">
+ *     <property name="tokens" value="FOR_INIT"/>
+ *     <property name="limitedTokens" value="EXPR"/>
+ *     <property name="minimumNumber" value="1"/>
+ * </module>
+ *
+ * <!-- Condition in for performs no check -->
+ * <module name="DescendantToken">
+ *     <property name="tokens" value="FOR_CONDITION"/>
+ *     <property name="limitedTokens" value="EXPR"/>
+ *     <property name="minimumNumber" value="1"/>
+ * </module>
+ *
+ * <!-- Switch within switch -->
+ * <module name="DescendantToken">
+ *     <property name="tokens" value="LITERAL_SWITCH"/>
+ *     <property name="limitedTokens" value="LITERAL_SWITCH"/>
+ *     <property name="maximumNumber" value="0"/>
+ *     <property name="minimumDepth" value="1"/>
+ * </module>
+ *
+ * <!-- Return from within a catch or finally block -->
+ * <module name="DescendantToken">
+ *     <property name="tokens" value="LITERAL_FINALLY,LITERAL_CATCH"/>
+ *     <property name="limitedTokens" value="LITERAL_RETURN"/>
+ *     <property name="maximumNumber" value="0"/>
+ * </module>
+ *
+ * <!-- Try within catch or finally block -->
+ * <module name="DescendantToken">
+ *     <property name="tokens" value="LITERAL_CATCH,LITERAL_FINALLY"/>
+ *     <property name="limitedTokens" value="LITERAL_TRY"/>
+ *     <property name="maximumNumber" value="0"/>
+ * </module>
+ *
+ * <!-- Too many cases within a switch -->
+ * <module name="DescendantToken">
+ *     <property name="tokens" value="LITERAL_SWITCH"/>
+ *     <property name="limitedTokens" value="LITERAL_CASE"/>
+ *     <property name="maximumDepth" value="2"/>
+ *     <property name="maximumNumber" value="10"/>
+ * </module>
+ *
+ * <!-- Too many local variables within a method -->
+ * <module name="DescendantToken">
+ *     <property name="tokens" value="METHOD_DEF"/>
+ *     <property name="limitedTokens" value="VARIABLE_DEF"/>
+ *     <property name="maximumDepth" value="2"/>
+ *     <property name="maximumNumber" value="10"/>
+ * </module>
+ *
+ * <!-- Too many returns from within a method -->
+ * <module name="DescendantToken">
+ *     <property name="tokens" value="METHOD_DEF"/>
+ *     <property name="limitedTokens" value="LITERAL_RETURN"/>
+ *     <property name="maximumNumber" value="3"/>
+ * </module>
+ *
+ * <!-- Too many fields within an interface -->
+ * <module name="DescendantToken">
+ *     <property name="tokens" value="INTERFACE_DEF"/>
+ *     <property name="limitedTokens" value="VARIABLE_DEF"/>
+ *     <property name="maximumDepth" value="2"/>
+ *     <property name="maximumNumber" value="0"/>
+ * </module>
+ *
+ * <!-- Limit the number of exceptions a method can throw -->
+ * <module name="DescendantToken">
+ *     <property name="tokens" value="LITERAL_THROWS"/>
+ *     <property name="limitedTokens" value="IDENT"/>
+ *     <property name="maximumNumber" value="1"/>
+ * </module>
+ *
+ * <!-- Limit the number of expressions in a method -->
+ * <module name="DescendantToken">
+ *     <property name="tokens" value="METHOD_DEF"/>
+ *     <property name="limitedTokens" value="EXPR"/>
+ *     <property name="maximumNumber" value="200"/>
+ * </module>
+ *
+ * <!-- Disallow empty statements -->
+ * <module name="DescendantToken">
+ *     <property name="tokens" value="EMPTY_STAT"/>
+ *     <property name="limitedTokens" value="EMPTY_STAT"/>
+ *     <property name="maximumNumber" value="0"/>
+ *     <property name="maximumDepth" value="0"/>
+ *     <property name="maximumMessage"
+ *         value="Empty statement is not allowed."/>
+ * </module>
+ *
+ * <!-- Too many fields within a class -->
+ * <module name="DescendantToken">
+ *     <property name="tokens" value="CLASS_DEF"/>
+ *     <property name="limitedTokens" value="VARIABLE_DEF"/>
+ *     <property name="maximumDepth" value="2"/>
+ *     <property name="maximumNumber" value="10"/>
+ * </module>
+ * </pre>
+ *
+ * @author Tim Tyler <tim at tt1.org>
+ * @author Rick Giles
+ */
+public class DescendantTokenCheck extends Check
+{
+     /** minimum  depth */
+    private int mMinimumDepth;
+    /** maximum depth */
+    private int mMaximumDepth = Integer.MAX_VALUE;
+    /** minimum number */
+    private int mMinimumNumber;
+    /** maximum number */
+    private int mMaximumNumber = Integer.MAX_VALUE;
+    /** Whether to sum the number of tokens found. */
+    private boolean mSumTokenCounts;
+    /** limited tokens */
+    private int[] mLimitedTokens = new int[0];
+    /** error message when minimum count not reached */
+    private String mMinimumMessage;
+    /** error message when maximum count exceeded */
+    private String mMaximumMessage;
+
+    /**
+     * Counts of descendant tokens.
+     * Indexed by (token ID - 1) for performance.
+     */
+    private int[] mCounts = new int[0];
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[0];
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        //reset counts
+        Arrays.fill(mCounts, 0);
+        countTokens(aAST, 0);
+
+        // name of this token
+        final String name = TokenTypes.getTokenName(aAST.getType());
+
+        if (mSumTokenCounts) {
+            int total = 0;
+            for (int element : mLimitedTokens) {
+                total += mCounts[element - 1];
+            }
+            if (total < mMinimumNumber) {
+                log(aAST.getLineNo(), aAST.getColumnNo(),
+                        (null == mMinimumMessage) ? "descendant.token.sum.min"
+                                : mMinimumMessage,
+                        String.valueOf(total),
+                        String.valueOf(mMinimumNumber), name);
+            }
+            if (total > mMaximumNumber) {
+                log(aAST.getLineNo(), aAST.getColumnNo(),
+                        (null == mMaximumMessage) ? "descendant.token.sum.max"
+                                : mMaximumMessage,
+                        String.valueOf(total),
+                        String.valueOf(mMaximumNumber),
+                        name);
+            }
+        }
+        else {
+            for (int element : mLimitedTokens) {
+                final int tokenCount = mCounts[element - 1];
+                if (tokenCount < mMinimumNumber) {
+                    final String descendantName = TokenTypes
+                            .getTokenName(element);
+                    log(aAST.getLineNo(), aAST.getColumnNo(),
+                            (null == mMinimumMessage) ? "descendant.token.min"
+                                    : mMinimumMessage,
+                            String.valueOf(tokenCount),
+                            String.valueOf(mMinimumNumber),
+                            name,
+                            descendantName);
+                }
+                if (tokenCount > mMaximumNumber) {
+                    final String descendantName = TokenTypes
+                            .getTokenName(element);
+                    log(aAST.getLineNo(), aAST.getColumnNo(),
+                            (null == mMaximumMessage) ? "descendant.token.max"
+                                    : mMaximumMessage,
+                            String.valueOf(tokenCount),
+                            String.valueOf(mMaximumNumber),
+                            name,
+                            descendantName);
+                }
+            }
+        }
+    }
+
+    /**
+     * Counts the number of occurrences of descendant tokens.
+     * @param aAST the root token for descendants.
+     * @param aDepth the maximum depth of the counted descendants.
+     */
+    private void countTokens(AST aAST, int aDepth)
+    {
+        if (aDepth <= mMaximumDepth) {
+            //update count
+            if (aDepth >= mMinimumDepth) {
+                final int type = aAST.getType();
+                if (type <= mCounts.length) {
+                    mCounts[type - 1]++;
+                }
+            }
+            AST child = aAST.getFirstChild();
+            final int nextDepth = aDepth + 1;
+            while (child != null) {
+                countTokens(child, nextDepth);
+                child = child.getNextSibling();
+            }
+        }
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        // Any tokens set by property 'tokens' are acceptable
+        final Set<String> tokenNames = getTokenNames();
+        final int[] result = new int[tokenNames.size()];
+        int i = 0;
+        for (String name : tokenNames) {
+            result[i++] = TokenTypes.getTokenId(name);
+        }
+        return result;
+    }
+
+    /**
+     * Sets the tokens which occurance as descendant is limited.
+     * @param aLimitedTokens - list of tokens to ignore.
+     */
+    public void setLimitedTokens(String[] aLimitedTokens)
+    {
+        mLimitedTokens = new int[aLimitedTokens.length];
+
+        int maxToken = 0;
+        for (int i = 0; i < aLimitedTokens.length; i++) {
+            mLimitedTokens[i] = TokenTypes.getTokenId(aLimitedTokens[i]);
+            if (mLimitedTokens[i] > maxToken) {
+                maxToken = mLimitedTokens[i];
+            }
+        }
+        mCounts = new int[maxToken];
+    }
+
+    /**
+     * Sets the minimum depth for descendant counts.
+     * @param aMinimumDepth the minimum depth for descendant counts.
+     */
+    public void setMinimumDepth(int aMinimumDepth)
+    {
+        mMinimumDepth = aMinimumDepth;
+    }
+
+    /**
+     * Sets the maximum depth for descendant counts.
+     * @param aMaximumDepth the maximum depth for descendant counts.
+     */
+    public void setMaximumDepth(int aMaximumDepth)
+    {
+        mMaximumDepth = aMaximumDepth;
+    }
+
+   /**
+    * Sets a minimum count for descendants.
+    * @param aMinimumNumber the minimum count for descendants.
+    */
+    public void setMinimumNumber(int aMinimumNumber)
+    {
+        mMinimumNumber = aMinimumNumber;
+    }
+
+    /**
+      * Sets a maximum count for descendants.
+      * @param aMaximumNumber the maximum count for descendants.
+      */
+    public void setMaximumNumber(int aMaximumNumber)
+    {
+        mMaximumNumber = aMaximumNumber;
+    }
+
+    /**
+     * Sets the error message for minimum count not reached.
+     * @param aMessage the error message for minimum count not reached.
+     * Used as a <code>MessageFormat</code> pattern with arguments
+     * <ul>
+     * <li>{0} - token count</li>
+     * <li>{1} - minimum number</li>
+     * <li>{2} - name of token</li>
+     * <li>{3} - name of limited token</li>
+     * </ul>
+     */
+    public void setMinimumMessage(String aMessage)
+    {
+        mMinimumMessage = aMessage;
+    }
+
+    /**
+     * Sets the error message for maximum count exceeded.
+     * @param aMessage the error message for maximum count exceeded.
+     * Used as a <code>MessageFormat</code> pattern with arguments
+     * <ul>
+     * <li>{0} - token count</li>
+     * <li>{1} - maximum number</li>
+     * <li>{2} - name of token</li>
+     * <li>{3} - name of limited token</li>
+     * </ul>
+     */
+
+    public void setMaximumMessage(String aMessage)
+    {
+        mMaximumMessage = aMessage;
+    }
+
+    /**
+     * Sets whether to use the sum of the tokens found, rather than the
+     * individual counts.
+     * @param aSum whether to use the sum.
+     */
+    public void setSumTokenCounts(boolean aSum)
+    {
+        mSumTokenCounts = aSum;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/FileContentsHolder.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/FileContentsHolder.java
new file mode 100644
index 0000000..baf5ba7
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/FileContentsHolder.java
@@ -0,0 +1,65 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FileContents;
+
+/**
+ * Holds the current file contents for global access when configured
+ * as a TreeWalker sub-module. For example,
+ * a filter can access the current file contents through this module.
+ * @author Mike McMahon
+ * @author Rick Giles
+ */
+public class FileContentsHolder
+    extends Check
+{
+    /** The current file contents. */
+    private static final ThreadLocal<FileContents> FILE_CONTENTS =
+        new ThreadLocal<FileContents>();
+
+    /** @return the current file contents. */
+    public static FileContents getContents()
+    {
+        return FILE_CONTENTS.get();
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[0];
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        FILE_CONTENTS.set(getFileContents());
+    }
+
+    @Override
+    public void destroy()
+    {
+        // This needs to be called in destroy, rather than finishTree()
+        // as finishTree() is called before the messages are passed to the
+        // filters. Without calling remove, there is a memory leak.
+        FILE_CONTENTS.remove();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/FinalParametersCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/FinalParametersCheck.java
new file mode 100644
index 0000000..2c006c7
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/FinalParametersCheck.java
@@ -0,0 +1,140 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Check that method/constructor/catch/foreach parameters are final.
+ * The user can set the token set to METHOD_DEF, CONSTRUCTOR_DEF,
+ * LITERAL_CATCH, FOR_EACH_CLAUSE or any combination of these token
+ * types, to control the scope of this check.
+ * Default scope is both METHOD_DEF and CONSTRUCTOR_DEF.
+ *
+ * @author lkuehne
+ * @author o_sukhodolsky
+ * @author Michael Studman
+ */
+public class FinalParametersCheck extends Check
+{
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.METHOD_DEF,
+            TokenTypes.CTOR_DEF,
+        };
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return new int[] {
+            TokenTypes.METHOD_DEF,
+            TokenTypes.CTOR_DEF,
+            TokenTypes.LITERAL_CATCH,
+            TokenTypes.FOR_EACH_CLAUSE,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        // don't flag interfaces
+        final DetailAST container = aAST.getParent().getParent();
+        if (container.getType() == TokenTypes.INTERFACE_DEF) {
+            return;
+        }
+
+        if (aAST.getType() == TokenTypes.LITERAL_CATCH) {
+            visitCatch(aAST);
+        }
+        else if (aAST.getType() == TokenTypes.FOR_EACH_CLAUSE) {
+            visitForEachClause(aAST);
+        }
+        else {
+            visitMethod(aAST);
+        }
+    }
+
+    /**
+     * Checks parameters of the method or ctor.
+     * @param aMethod method or ctor to check.
+     */
+    private void visitMethod(final DetailAST aMethod)
+    {
+        // exit on fast lane if there is nothing to check here
+        if (!aMethod.branchContains(TokenTypes.PARAMETER_DEF)) {
+            return;
+        }
+
+        // ignore abstract method
+        final DetailAST modifiers =
+            aMethod.findFirstToken(TokenTypes.MODIFIERS);
+        if (modifiers.branchContains(TokenTypes.ABSTRACT)) {
+            return;
+        }
+
+        // we can now be sure that there is at least one parameter
+        final DetailAST parameters =
+            aMethod.findFirstToken(TokenTypes.PARAMETERS);
+        DetailAST child = parameters.getFirstChild();
+        while (child != null) {
+            // childs are PARAMETER_DEF and COMMA
+            if (child.getType() == TokenTypes.PARAMETER_DEF) {
+                checkParam(child);
+            }
+            child = child.getNextSibling();
+        }
+    }
+
+    /**
+     * Checks parameter of the catch block.
+     * @param aCatch catch block to check.
+     */
+    private void visitCatch(final DetailAST aCatch)
+    {
+        checkParam(aCatch.findFirstToken(TokenTypes.PARAMETER_DEF));
+    }
+
+    /**
+     * Checks parameter of the for each clause.
+     * @param aForEachClause for each clause to check.
+     */
+    private void visitForEachClause(final DetailAST aForEachClause)
+    {
+        checkParam(aForEachClause.findFirstToken(TokenTypes.VARIABLE_DEF));
+    }
+
+    /**
+     * Checks if the given parameter is final.
+     * @param aParam parameter to check.
+     */
+    private void checkParam(final DetailAST aParam)
+    {
+        if (!aParam.branchContains(TokenTypes.FINAL)) {
+            final DetailAST paramName = aParam.findFirstToken(TokenTypes.IDENT);
+            final DetailAST firstNode = CheckUtils.getFirstNode(aParam);
+            log(firstNode.getLineNo(), firstNode.getColumnNo(),
+                "final.parameter", paramName.getText());
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/LineSeparatorOption.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/LineSeparatorOption.java
new file mode 100644
index 0000000..3b59db5
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/LineSeparatorOption.java
@@ -0,0 +1,72 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+/**
+ * Represents the options for line separator settings.
+ *
+ * @author lkuehne
+ * @see NewlineAtEndOfFileCheck
+ */
+public enum LineSeparatorOption
+{
+    /** Windows-style line separators. **/
+    CRLF("\r\n"),
+
+    /** Mac-style line separators. **/
+    CR("\r"),
+
+    /** Unix-style line separators. **/
+    LF("\n"),
+
+    /** System default line separators. **/
+    SYSTEM(System.getProperty("line.separator"));
+
+    /** the line separator representation */
+    private final String mLineSeparator;
+
+    /**
+     * Creates a new <code>LineSeparatorOption</code> instance.
+     * @param aSep the line separator, e.g. "\r\n"
+     */
+    private LineSeparatorOption(String aSep)
+    {
+        mLineSeparator = aSep;
+    }
+
+    /**
+     * @param aBytes a bytes array to check
+     * @return if aBytes is equal to the byte representation
+     * of this line separator
+     */
+    public boolean matches(byte[] aBytes)
+    {
+        final String s = new String(aBytes);
+        return s.equals(mLineSeparator);
+    }
+
+    /**
+     * @return the length of the file separator,
+     * e.g. 1 for CR, 2 for CRLF, ...
+     */
+    public int length()
+    {
+        return mLineSeparator.length();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/NewlineAtEndOfFileCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/NewlineAtEndOfFileCheck.java
new file mode 100644
index 0000000..f84e1e6
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/NewlineAtEndOfFileCheck.java
@@ -0,0 +1,127 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import java.io.File;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.util.List;
+import org.apache.commons.beanutils.ConversionException;
+
+/**
+ * <p>
+ * Checks that there is a newline at the end of each file.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="NewlineAtEndOfFile"/></pre>
+ * <p>
+ * This will check against the platform-specific default line separator.
+ * </p>
+ * <p>
+ * It is also possible to enforce the use of a specific line-separator across
+ * platforms, with the 'lineSeparator' property:
+ * </p>
+ * <pre>
+ * <module name="NewlineAtEndOfFile">
+ *   <property name="lineSeparator" value="lf"/>
+ * </module></pre>
+ * <p>
+ * Valid values for the 'lineSeparator' property are 'system' (system default),
+ * 'crlf' (windows), 'cr' (mac) and 'lf' (unix).
+ * </p>
+ *
+ * @author Christopher Lenz
+ * @author lkuehne
+ * @version 1.0
+ */
+public class NewlineAtEndOfFileCheck
+    extends AbstractFileSetCheck
+{
+    /** the line separator to check against. */
+    private LineSeparatorOption mLineSeparator = LineSeparatorOption.SYSTEM;
+
+    @Override
+    protected void processFiltered(File aFile, List<String> aLines)
+    {
+        // Cannot use aLines as the line separators have been removed!
+        RandomAccessFile randomAccessFile = null;
+        try {
+            randomAccessFile = new RandomAccessFile(aFile, "r");
+            if (!endsWithNewline(randomAccessFile)) {
+                log(0, "noNewlineAtEOF", aFile.getPath());
+            }
+        }
+        catch (final IOException e) {
+            log(0, "unable.open", aFile.getPath());
+        }
+        finally {
+            Utils.closeQuietly(randomAccessFile);
+        }
+    }
+
+    /**
+     * Sets the line separator to one of 'crlf', 'lf' or 'cr'.
+     *
+     * @param aLineSeparator The line separator to set
+     * @throws IllegalArgumentException If the specified line separator is not
+     *         one of 'crlf', 'lf' or 'cr'
+     */
+    public void setLineSeparator(String aLineSeparator)
+    {
+        try {
+            mLineSeparator =
+                Enum.valueOf(LineSeparatorOption.class, aLineSeparator.trim()
+                    .toUpperCase());
+        }
+        catch (IllegalArgumentException iae) {
+            throw new ConversionException("unable to parse " + aLineSeparator,
+                iae);
+        }
+    }
+
+    /**
+     * Checks whether the content provided by the Reader ends with the platform
+     * specific line separator.
+     * @param aRandomAccessFile The reader for the content to check
+     * @return boolean Whether the content ends with a line separator
+     * @throws IOException When an IO error occurred while reading from the
+     *         provided reader
+     */
+    private boolean endsWithNewline(RandomAccessFile aRandomAccessFile)
+        throws IOException
+    {
+        final int len = mLineSeparator.length();
+        if (aRandomAccessFile.length() < len) {
+            return false;
+        }
+        aRandomAccessFile.seek(aRandomAccessFile.length() - len);
+        final byte lastBytes[] = new byte[len];
+        final int readBytes = aRandomAccessFile.read(lastBytes);
+        if (readBytes != len) {
+            throw new IOException("Unable to read " + len + " bytes, got "
+                    + readBytes);
+        }
+        return mLineSeparator.matches(lastBytes);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/OuterTypeFilenameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/OuterTypeFilenameCheck.java
new file mode 100644
index 0000000..664c0d6
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/OuterTypeFilenameCheck.java
@@ -0,0 +1,110 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import java.io.File;
+
+/**
+ * Checks that the outer type name and the file name match.
+ * @author Oliver Burn
+ * @author maxvetrenko
+ */
+public class OuterTypeFilenameCheck extends Check
+{
+    /** indicates whether the first token has been seen in the file. */
+    private boolean mSeenFirstToken;
+
+    /** Current file name*/
+    private String mFileName;
+
+    /** If file has public type*/
+    private boolean mHasPublic;
+
+    /** If first type has has same name as file*/
+    private boolean mValidFirst;
+
+    /** Outer type with mismatched file name*/
+    private DetailAST mWrongType;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.CLASS_DEF, TokenTypes.INTERFACE_DEF,
+            TokenTypes.ENUM_DEF, TokenTypes.ANNOTATION_DEF,
+        };
+    }
+
+    @Override
+    public void beginTree(DetailAST aAST)
+    {
+        mFileName = getFileName();
+        mSeenFirstToken = false;
+        mValidFirst = false;
+        mHasPublic = false;
+        mWrongType = null;
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final String outerTypeName = aAST.findFirstToken(TokenTypes.IDENT).getText();
+        if (!mSeenFirstToken) {
+
+            if (mFileName.equals(outerTypeName)) {
+                mValidFirst = true;
+            }
+            else {
+                mWrongType = aAST;
+            }
+        }
+        else {
+            final DetailAST modifiers = aAST.findFirstToken(TokenTypes.MODIFIERS);
+            if (modifiers.findFirstToken(TokenTypes.LITERAL_PUBLIC) != null
+                    && aAST.getParent() == null)
+            {
+                mHasPublic = true;
+            }
+        }
+        mSeenFirstToken = true;
+    }
+
+    @Override
+    public void finishTree(DetailAST aRootAST)
+    {
+        if (!(mValidFirst || mHasPublic) && mWrongType != null) {
+            log(mWrongType.getLineNo(), "type.file.mismatch");
+        }
+    }
+
+    /**
+     * Get source file name.
+     * @return source file name.
+     */
+    private String getFileName()
+    {
+        String fname = getFileContents().getFilename();
+        fname = fname.substring(fname.lastIndexOf(File.separatorChar) + 1);
+        fname = fname.replaceAll("\\.[^\\.]*$", "");
+        return fname;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/RegexpCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/RegexpCheck.java
new file mode 100644
index 0000000..9a84aef
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/RegexpCheck.java
@@ -0,0 +1,256 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FileContents;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * <p>
+ * A check that makes sure that a specified pattern exists (or not) in the file.
+ * </p>
+ * <p>
+ * An example of how to configure the check to make sure a copyright statement
+ * is included in the file (but without requirements on where in the file
+ * it should be):
+ * </p>
+ * <pre>
+ * <module name="RequiredRegexp">
+ *    <property name="format" value="This code is copyrighted"/>
+ * </module>
+ * </pre>
+ * <p>
+ * And to make sure the same statement appears at the beginning of the file.
+ * </p>
+ * <pre>
+ * <module name="RequiredRegexp">
+ *    <property name="format" value="\AThis code is copyrighted"/>
+ * </module>
+ * </pre>
+ * @author Stan Quinn
+ */
+public class RegexpCheck extends AbstractFormatCheck
+{
+    /** Default duplicate limit */
+    private static final int DEFAULT_DUPLICATE_LIMIT = -1;
+
+    /** Default error report limit */
+    private static final int DEFAULT_ERROR_LIMIT = 100;
+
+    /** Error count exceeded message */
+    private static final String ERROR_LIMIT_EXCEEDED_MESSAGE =
+        "The error limit has been exceeded, "
+        + "the check is aborting, there may be more unreported errors.";
+
+    /** Custom message for report. */
+    private String mMessage = "";
+
+    /** Ignore matches within comments? **/
+    private boolean mIgnoreComments;
+
+    /** Pattern illegal? */
+    private boolean mIllegalPattern;
+
+    /** Error report limit */
+    private int mErrorLimit = DEFAULT_ERROR_LIMIT;
+
+    /** Disallow more than x duplicates? */
+    private int mDuplicateLimit;
+
+    /** Boolean to say if we should check for duplicates. */
+    private boolean mCheckForDuplicates;
+
+    /** Tracks number of matches made */
+    private int mMatchCount;
+
+    /** Tracks number of errors */
+    private int mErrorCount;
+
+    /** Relates StringBuffer positions to line # and column */
+    private final List<Integer[]> mCharacters = Lists.newArrayList();
+
+    /** The mMatcher */
+    private Matcher mMatcher;
+
+    /**
+     * Instantiates an new RegexpCheck.
+     */
+    public RegexpCheck()
+    {
+        super("$^", Pattern.MULTILINE); // the empty language
+    }
+
+    /**
+     * Setter for message property.
+     * @param aMessage custom message which should be used in report.
+     */
+    public void setMessage(String aMessage)
+    {
+        mMessage = (aMessage == null) ? "" : aMessage;
+    }
+
+    /**
+     * Getter for message property.
+     * I'm not sure if this gets used by anything outside,
+     * I just included it because GenericIllegalRegexp had it,
+     * it's being used in logMessage() so it's covered in EMMA.
+     * @return custom message to be used in report.
+     */
+    public String getMessage()
+    {
+        return mMessage;
+    }
+
+    /**
+     * Sets if matches within comments should be ignored.
+     * @param aIgnoreComments True if comments should be ignored.
+     */
+    public void setIgnoreComments(boolean aIgnoreComments)
+    {
+        mIgnoreComments = aIgnoreComments;
+    }
+
+    /**
+     * Sets if pattern is illegal, otherwise pattern is required.
+     * @param aIllegalPattern True if pattern is not allowed.
+     */
+    public void setIllegalPattern(boolean aIllegalPattern)
+    {
+        mIllegalPattern = aIllegalPattern;
+    }
+
+    /**
+     * Sets the limit on the number of errors to report.
+     * @param aErrorLimit the number of errors to report.
+     */
+    public void setErrorLimit(int aErrorLimit)
+    {
+        mErrorLimit = aErrorLimit;
+    }
+
+    /**
+     * Sets the maximum number of instances of required pattern allowed.
+     * @param aDuplicateLimit negative values mean no duplicate checking,
+     * any positive value is used as the limit.
+     */
+    public void setDuplicateLimit(int aDuplicateLimit)
+    {
+        mDuplicateLimit = aDuplicateLimit;
+        mCheckForDuplicates = (mDuplicateLimit > DEFAULT_DUPLICATE_LIMIT);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[0];
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        mCharacters.clear();
+        final Pattern pattern = getRegexp();
+        final String[] lines = getLines();
+        final StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < lines.length; i++) {
+            sb.append(lines[i]);
+            sb.append('\n');
+            for (int j = 0; j < (lines[i].length() + 1); j++) {
+                mCharacters.add(new Integer[] {i + 1, j});
+            }
+        }
+        mMatcher = pattern.matcher(sb.toString());
+        mMatchCount = 0;
+        mErrorCount = 0;
+        findMatch();
+    }
+
+    /** recursive method that finds the matches. */
+    private void findMatch()
+    {
+        int startLine;
+        int startColumn;
+        int endLine;
+        int endColumn;
+        boolean foundMatch;
+        boolean ignore = false;
+
+        foundMatch = mMatcher.find();
+        if (!foundMatch && !mIllegalPattern && (mMatchCount == 0)) {
+            logMessage(0);
+        }
+        else if (foundMatch) {
+            startLine = (mCharacters.get(mMatcher.start()))[0].
+                    intValue();
+            startColumn = (mCharacters.get(mMatcher.start()))[1].
+                    intValue();
+            endLine = (mCharacters.get(mMatcher.end() - 1))[0].
+                    intValue();
+            endColumn = (mCharacters.get(mMatcher.end() - 1))[1].
+                    intValue();
+            if (mIgnoreComments) {
+                final FileContents theFileContents = getFileContents();
+                ignore = theFileContents.hasIntersectionWithComment(startLine,
+                    startColumn, endLine, endColumn);
+            }
+            if (!ignore) {
+                mMatchCount++;
+                if (mIllegalPattern || (mCheckForDuplicates
+                        && ((mMatchCount - 1) > mDuplicateLimit)))
+                {
+                    mErrorCount++;
+                    logMessage(startLine);
+                }
+            }
+            if ((mErrorCount < mErrorLimit)
+                    && (ignore || mIllegalPattern || mCheckForDuplicates))
+            {
+                findMatch();
+            }
+        }
+    }
+
+    /**
+     * Displays the right message.
+     * @param aLineNumber the line number the message relates to.
+     */
+    private void logMessage(int aLineNumber)
+    {
+        String message = "".equals(getMessage()) ? getFormat() : mMessage;
+        if (mErrorCount >= mErrorLimit) {
+            message = ERROR_LIMIT_EXCEEDED_MESSAGE + message;
+        }
+        if (mIllegalPattern) {
+            log(aLineNumber, "illegal.regexp", message);
+        }
+        else {
+            if (aLineNumber > 0) {
+                log(aLineNumber, "duplicate.regexp", message);
+            }
+            else {
+                log(aLineNumber, "required.regexp", message);
+            }
+        }
+    }
+}
+
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/SuppressWarningsHolder.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/SuppressWarningsHolder.java
new file mode 100644
index 0000000..9ca6ea0
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/SuppressWarningsHolder.java
@@ -0,0 +1,436 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Lists;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+import org.apache.commons.beanutils.ConversionException;
+
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Maintains a set of check suppressions from {@link SuppressWarnings}
+ * annotations.
+ * @author Trevor Robinson
+ */
+public class SuppressWarningsHolder
+    extends Check
+{
+    /**
+     * Optional prefix for warning suppressions that are only intended to be
+     * recognized by checkstyle. For instance, to suppress {@code
+     * FallThroughCheck} only in checkstyle (and not in javac), use the
+     * suppression {@code "checkstyle:fallthrough"}. To suppress the warning in
+     * both tools, just use {@code "fallthrough"}.
+     */
+    public static final String CHECKSTYLE_PREFIX = "checkstyle:";
+
+    /** java.lang namespace prefix, which is stripped from SuppressWarnings */
+    private static final String JAVA_LANG_PREFIX = "java.lang.";
+
+    /** suffix to be removed from subclasses of Check */
+    private static final String CHECK_SUFFIX = "Check";
+
+    /** a map from check source names to suppression aliases */
+    private static final Map<String, String> CHECK_ALIAS_MAP =
+        new HashMap<String, String>();
+
+    /**
+     * a thread-local holder for the list of suppression entries for the last
+     * file parsed
+     */
+    private static final ThreadLocal<List<Entry>> ENTRIES =
+        new ThreadLocal<List<Entry>>();
+
+    /** records a particular suppression for a region of a file */
+    private static class Entry
+    {
+        /** the source name of the suppressed check */
+        private final String mCheckName;
+        /** the suppression region for the check */
+        private final int mFirstLine, mFirstColumn, mLastLine, mLastColumn;
+
+        /**
+         * Constructs a new suppression region entry.
+         * @param aCheckName the source name of the suppressed check
+         * @param aFirstLine the first line of the suppression region
+         * @param aFirstColumn the first column of the suppression region
+         * @param aLastLine the last line of the suppression region
+         * @param aLastColumn the last column of the suppression region
+         */
+        public Entry(String aCheckName, int aFirstLine, int aFirstColumn,
+            int aLastLine, int aLastColumn)
+        {
+            mCheckName = aCheckName;
+            mFirstLine = aFirstLine;
+            mFirstColumn = aFirstColumn;
+            mLastLine = aLastLine;
+            mLastColumn = aLastColumn;
+        }
+
+        /** @return the source name of the suppressed check */
+        public String getCheckName()
+        {
+            return mCheckName;
+        }
+
+        /** @return the first line of the suppression region */
+        public int getFirstLine()
+        {
+            return mFirstLine;
+        }
+
+        /** @return the first column of the suppression region */
+        public int getFirstColumn()
+        {
+            return mFirstColumn;
+        }
+
+        /** @return the last line of the suppression region */
+        public int getLastLine()
+        {
+            return mLastLine;
+        }
+
+        /** @return the last column of the suppression region */
+        public int getLastColumn()
+        {
+            return mLastColumn;
+        }
+    }
+
+    /**
+     * Returns the default alias for the source name of a check, which is the
+     * source name in lower case with any dotted prefix or "Check" suffix
+     * removed.
+     * @param aSourceName the source name of the check (generally the class
+     *        name)
+     * @return the default alias for the given check
+     */
+    public static String getDefaultAlias(String aSourceName)
+    {
+        final int startIndex = aSourceName.lastIndexOf('.') + 1;
+        int endIndex = aSourceName.length();
+        if (aSourceName.endsWith(CHECK_SUFFIX)) {
+            endIndex -= CHECK_SUFFIX.length();
+        }
+        return aSourceName.substring(startIndex, endIndex).toLowerCase();
+    }
+
+    /**
+     * Returns the alias for the source name of a check. If an alias has been
+     * explicitly registered via {@link #registerAlias(String, String)}, that
+     * alias is returned; otherwise, the default alias is used.
+     * @param aSourceName the source name of the check (generally the class
+     *        name)
+     * @return the current alias for the given check
+     */
+    public static String getAlias(String aSourceName)
+    {
+        String checkAlias = CHECK_ALIAS_MAP.get(aSourceName);
+        if (checkAlias == null) {
+            checkAlias = getDefaultAlias(aSourceName);
+        }
+        return checkAlias;
+    }
+
+    /**
+     * Registers an alias for the source name of a check.
+     * @param aSourceName the source name of the check (generally the class
+     *        name)
+     * @param aCheckAlias the alias used in {@link SuppressWarnings} annotations
+     */
+    public static void registerAlias(String aSourceName, String aCheckAlias)
+    {
+        CHECK_ALIAS_MAP.put(aSourceName, aCheckAlias);
+    }
+
+    /**
+     * Registers a list of source name aliases based on a comma-separated list
+     * of {@code source=alias} items, such as {@code
+     * com.puppycrawl.tools.checkstyle.checks.sizes.ParameterNumberCheck=
+     * paramnum}.
+     * @param aAliasList the list of comma-separated alias assigments
+     */
+    public void setAliasList(String aAliasList)
+    {
+        for (String sourceAlias : aAliasList.split(",")) {
+            final int index = sourceAlias.indexOf("=");
+            if (index > 0) {
+                registerAlias(sourceAlias.substring(0, index), sourceAlias
+                    .substring(index + 1));
+            }
+            else if (sourceAlias.length() > 0) {
+                throw new ConversionException(
+                    "'=' expected in alias list item: " + sourceAlias);
+            }
+        }
+    }
+
+    /**
+     * Checks for a suppression of a check with the given source name and
+     * location in the last file processed.
+     * @param aSourceName the source name of the check
+     * @param aLine the line number of the check
+     * @param aColumn the column number of the check
+     * @return whether the check with the given name is suppressed at the given
+     *         source location
+     */
+    public static boolean isSuppressed(String aSourceName, int aLine,
+        int aColumn)
+    {
+        final List<Entry> entries = ENTRIES.get();
+        final String checkAlias = getAlias(aSourceName);
+        if (entries != null && checkAlias != null) {
+            for (Entry entry : entries) {
+                final boolean afterStart =
+                    entry.getFirstLine() < aLine
+                        || (entry.getFirstLine() == aLine && entry
+                            .getFirstColumn() <= aColumn);
+                final boolean beforeEnd =
+                    entry.getLastLine() > aLine
+                        || (entry.getLastLine() == aLine && entry
+                            .getLastColumn() >= aColumn);
+                final boolean nameMatches =
+                    entry.getCheckName().equals(checkAlias);
+                if (afterStart && beforeEnd && nameMatches) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.ANNOTATION};
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        ENTRIES.set(new LinkedList<Entry>());
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        // check whether annotation is SuppressWarnings
+        // expected children: AT ( IDENT | DOT ) LPAREN <values> RPAREN
+        String identifier = getIdentifier(getNthChild(aAST, 1));
+        if (identifier.startsWith(JAVA_LANG_PREFIX)) {
+            identifier = identifier.substring(JAVA_LANG_PREFIX.length());
+        }
+        if ("SuppressWarnings".equals(identifier)) {
+
+            // get values of annotation
+            List<String> values = null;
+            final DetailAST lparenAST = aAST.findFirstToken(TokenTypes.LPAREN);
+            if (lparenAST != null) {
+                final DetailAST nextAST = lparenAST.getNextSibling();
+                if (nextAST != null) {
+                    final int nextType = nextAST.getType();
+                    switch (nextType) {
+                    case TokenTypes.EXPR:
+                    case TokenTypes.ANNOTATION_ARRAY_INIT:
+                        values = getAnnotationValues(nextAST);
+                        break;
+
+                    case TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR:
+                        // expected children: IDENT ASSIGN ( EXPR |
+                        // ANNOTATION_ARRAY_INIT )
+                        values = getAnnotationValues(getNthChild(nextAST, 2));
+                        break;
+
+                    case TokenTypes.RPAREN:
+                        // no value present (not valid Java)
+                        break;
+
+                    default:
+                        // unknown annotation value type (new syntax?)
+                    }
+                }
+            }
+            if (values == null) {
+                log(aAST, "suppress.warnings.missing.value");
+                return;
+            }
+
+            // get target of annotation
+            DetailAST targetAST = null;
+            DetailAST parentAST = aAST.getParent();
+            if (parentAST != null) {
+                switch (parentAST.getType()) {
+                case TokenTypes.MODIFIERS:
+                case TokenTypes.ANNOTATIONS:
+                    parentAST = parentAST.getParent();
+                    if (parentAST != null) {
+                        switch (parentAST.getType()) {
+                        case TokenTypes.ANNOTATION_DEF:
+                        case TokenTypes.PACKAGE_DEF:
+                        case TokenTypes.CLASS_DEF:
+                        case TokenTypes.INTERFACE_DEF:
+                        case TokenTypes.ENUM_DEF:
+                        case TokenTypes.CTOR_DEF:
+                        case TokenTypes.METHOD_DEF:
+                        case TokenTypes.PARAMETER_DEF:
+                        case TokenTypes.VARIABLE_DEF:
+                            targetAST = parentAST;
+                            break;
+
+                        default:
+                            // unexpected target type
+                        }
+                    }
+                    break;
+
+                default:
+                    // unexpected container type
+                }
+            }
+            if (targetAST == null) {
+                log(aAST, "suppress.warnings.invalid.target");
+            }
+
+            // get text range of target
+            final int firstLine = targetAST.getLineNo();
+            final int firstColumn = targetAST.getColumnNo();
+            final DetailAST nextAST = targetAST.getNextSibling();
+            final int lastLine, lastColumn;
+            if (nextAST != null) {
+                lastLine = nextAST.getLineNo();
+                lastColumn = nextAST.getColumnNo() - 1;
+            }
+            else {
+                lastLine = Integer.MAX_VALUE;
+                lastColumn = Integer.MAX_VALUE;
+            }
+
+            // add suppression entries for listed checks
+            final List<Entry> entries = ENTRIES.get();
+            if (entries != null) {
+                for (String value : values) {
+                    // strip off the checkstyle-only prefix if present
+                    if (value.startsWith(CHECKSTYLE_PREFIX)) {
+                        value = value.substring(CHECKSTYLE_PREFIX.length());
+                    }
+                    entries.add(new Entry(value, firstLine, firstColumn,
+                        lastLine, lastColumn));
+                }
+            }
+        }
+    }
+
+    /**
+     * Returns the n'th child of an AST node.
+     * @param aAST the AST node to get the child of
+     * @param aIndex the index of the child to get
+     * @return the n'th child of the given AST node, or {@code null} if none
+     */
+    private static DetailAST getNthChild(DetailAST aAST, int aIndex)
+    {
+        DetailAST child = aAST.getFirstChild();
+        if (child != null) {
+            for (int i = 0; i < aIndex && child != null; ++i) {
+                child = child.getNextSibling();
+            }
+        }
+        return child;
+    }
+
+    /**
+     * Returns the Java identifier represented by an AST.
+     * @param aAST an AST node for an IDENT or DOT
+     * @return the Java identifier represented by the given AST subtree
+     * @throws IllegalArgumentException if the AST is invalid
+     */
+    private static String getIdentifier(DetailAST aAST)
+    {
+        if (aAST != null) {
+            if (aAST.getType() == TokenTypes.IDENT) {
+                return aAST.getText();
+            }
+            else if (aAST.getType() == TokenTypes.DOT) {
+                return getIdentifier(aAST.getFirstChild()) + "."
+                    + getIdentifier(aAST.getLastChild());
+            }
+        }
+        throw new IllegalArgumentException("Identifier AST expected: " + aAST);
+    }
+
+    /**
+     * Returns the literal string expression represented by an AST.
+     * @param aAST an AST node for an EXPR
+     * @return the Java string represented by the given AST expression
+     * @throws IllegalArgumentException if the AST is invalid
+     */
+    private static String getStringExpr(DetailAST aAST)
+    {
+        if (aAST != null && aAST.getType() == TokenTypes.EXPR) {
+            final DetailAST firstChild = aAST.getFirstChild();
+            if (firstChild.getType() == TokenTypes.STRING_LITERAL) {
+                // NOTE: escaped characters are not unescaped
+                final String quotedText = firstChild.getText();
+                return quotedText.substring(1, quotedText.length() - 1);
+            }
+            throw new IllegalArgumentException("String literal AST expected: "
+                + firstChild);
+        }
+        throw new IllegalArgumentException("Expression AST expected: " + aAST);
+    }
+
+    /**
+     * Returns the annotation values represented by an AST.
+     * @param aAST an AST node for an EXPR or ANNOTATION_ARRAY_INIT
+     * @return the list of Java string represented by the given AST for an
+     *         expression or annotation array initializer
+     * @throws IllegalArgumentException if the AST is invalid
+     */
+    private static List<String> getAnnotationValues(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.EXPR:
+            return ImmutableList.of(getStringExpr(aAST));
+
+        case TokenTypes.ANNOTATION_ARRAY_INIT:
+            final List<String> valueList = Lists.newLinkedList();
+            DetailAST childAST = aAST.getFirstChild();
+            while (childAST != null) {
+                if (childAST.getType() == TokenTypes.EXPR) {
+                    valueList.add(getStringExpr(childAST));
+                }
+                childAST = childAST.getNextSibling();
+            }
+            return valueList;
+
+        default:
+        }
+        throw new IllegalArgumentException(
+            "Expression or annotation array initializer AST expected: " + aAST);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/TodoCommentCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/TodoCommentCheck.java
new file mode 100644
index 0000000..2f33abe
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/TodoCommentCheck.java
@@ -0,0 +1,113 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FileContents;
+import com.puppycrawl.tools.checkstyle.api.TextBlock;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * A check for TODO comments.
+ * Actually it is a generic {@link java.util.regex.Pattern regular expression}
+ * matcher on Java comments.
+ * To check for other patterns in Java comments, set property format.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="TodoComment"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check for comments that contain
+ * <code>WARNING</code> is:
+ * </p>
+ * <pre>
+ * <module name="TodoComment">
+ *    <property name="format" value="WARNING"/>
+ * </module>
+ * </pre>
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public class TodoCommentCheck
+    extends AbstractFormatCheck
+{
+    /**
+     * Creates a new <code>TodoCommentCheck</code> instance.
+     */
+    public TodoCommentCheck()
+    {
+        super("TODO:"); // the empty language
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[0];
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        final FileContents contents = getFileContents();
+        checkCppComments(contents);
+        checkBadComments(contents);
+    }
+
+    /**
+     * Checks the C++ comments for todo expressions.
+     * @param aContents the <code>FileContents</code>
+     */
+    private void checkCppComments(FileContents aContents)
+    {
+        final Map<Integer, TextBlock> comments = aContents.getCppComments();
+        for (Map.Entry<Integer, TextBlock> entry : comments.entrySet()) {
+            final String cmt = entry.getValue().getText()[0];
+            if (getRegexp().matcher(cmt).find()) {
+                log(entry.getKey().intValue(), "todo.match", getFormat());
+            }
+        }
+    }
+
+    /**
+     * Checks the C-style comments for todo expressions.
+     * @param aContents the <code>FileContents</code>
+     */
+    private void checkBadComments(FileContents aContents)
+    {
+        final Map<Integer, List<TextBlock>> allComments = aContents
+                .getCComments();
+        for (Map.Entry<Integer, List<TextBlock>> entry : allComments.entrySet())
+        {
+            for (TextBlock line : entry.getValue()) {
+                final String[] cmt = line.getText();
+                for (int i = 0; i < cmt.length; i++) {
+                    if (getRegexp().matcher(cmt[i]).find()) {
+                        log(entry.getKey().intValue() + i, "todo.match",
+                                getFormat());
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/TrailingCommentCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/TrailingCommentCheck.java
new file mode 100644
index 0000000..aa8eb2d
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/TrailingCommentCheck.java
@@ -0,0 +1,211 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TextBlock;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+import org.apache.commons.beanutils.ConversionException;
+
+/**
+ * <p>
+ * The check to ensure that requires that comments be the only thing on a line.
+ * For the case of // comments that means that the only thing that should
+ * precede it is whitespace.
+ * It doesn't check comments if they do not end line, i.e. it accept
+ * the following:
+ * <code>Thread.sleep( 10 <some comment here> );</code>
+ * Format property is intended to deal with the "} // while" example.
+ * </p>
+ * <p>
+ * Rationale: Steve McConnel in "Code Complete" suggests that endline
+ * comments are a bad practice. An end line comment would
+ * be one that is on the same line as actual code. For example:
+ * <pre>
+ *  a = b + c;      // Some insightful comment
+ *  d = e / f;        // Another comment for this line
+ * </pre>
+ * Quoting "Code Complete" for the justification:
+ * <ul>
+ * <li>
+ * "The comments have to be aligned so that they do not
+ * interfere with the visual structure of the code. If you don't
+ * align them neatly, they'll make your listing look like it's been
+ * through a washing machine."
+ * </li>
+ * <li>
+ * "Endline comments tend to be hard to format...It takes time
+ * to align them. Such time is not spent learning more about
+ * the code; it's dedicated solely to the tedious task of
+ * pressing the spacebar or tab key."
+ * </li>
+ * <li>
+ * "Endline comments are also hard to maintain. If the code on
+ * any line containing an endline comment grows, it bumps the
+ * comment farther out, and all the other endline comments will
+ * have to bumped out to match. Styles that are hard to
+ * maintain aren't maintained...."
+ * </li>
+ * <li>
+ * "Endline comments also tend to be cryptic. The right side of
+ * the line doesn't offer much room and the desire to keep the
+ * comment on one line means the comment must be short.
+ * Work then goes into making the line as short as possible
+ * instead of as clear as possible. The comment usually ends
+ * up as cryptic as possible...."
+ * </li>
+ * <li>
+ * "A systemic problem with endline comments is that it's hard
+ * to write a meaningful comment for one line of code. Most
+ * endline comments just repeat the line of code, which hurts
+ * more than it helps."
+ * </li>
+ * </ul>
+ * His comments on being hard to maintain when the size of
+ * the line changes are even more important in the age of
+ * automated refactorings.
+ *
+ * <p>
+ * To configure the check so it enforces only comment on a line:
+ * <pre>
+ * <module name="TrailingComment">
+ *    <property name="format" value="^\\s*$"/>
+ * </module>
+ * </pre>
+ *
+ * @author o_sukhodolsky
+ */
+public class TrailingCommentCheck extends AbstractFormatCheck
+{
+    /** default format for allowed blank line. */
+    private static final String DEFAULT_FORMAT = "^[\\s\\}\\);]*$";
+
+    /** pattern for legal trailing comment. */
+    private Pattern mLegalComment;
+
+    /**
+     * Sets patter for legal trailing comments.
+     * @param aFormat format to set.
+     * @throws ConversionException unable to parse a given format.
+     */
+    public void setLegalComment(final String aFormat)
+        throws ConversionException
+    {
+        try {
+            mLegalComment = Utils.getPattern(aFormat);
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+    }
+    /**
+     * Creates new instance of the check.
+     * @throws ConversionException unable to parse DEFAULT_FORMAT.
+     */
+    public TrailingCommentCheck() throws ConversionException
+    {
+        super(DEFAULT_FORMAT);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[0];
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        throw new IllegalStateException("visitToken() shouldn't be called.");
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        final Pattern blankLinePattern = getRegexp();
+        final Map<Integer, TextBlock> cppComments = getFileContents()
+                .getCppComments();
+        final Map<Integer, List<TextBlock>> cComments = getFileContents()
+                .getCComments();
+        final Set<Integer> lines = Sets.newHashSet();
+        lines.addAll(cppComments.keySet());
+        lines.addAll(cComments.keySet());
+
+        for (Integer lineNo : lines) {
+            final String line = getLines()[lineNo.intValue() - 1];
+            String lineBefore = "";
+            TextBlock comment = null;
+            if (cppComments.containsKey(lineNo)) {
+                comment = cppComments.get(lineNo);
+                lineBefore = line.substring(0, comment.getStartColNo());
+            }
+            else if (cComments.containsKey(lineNo)) {
+                final List<TextBlock> commentList = cComments.get(lineNo);
+                comment = commentList.get(commentList.size() - 1);
+                lineBefore = line.substring(0, comment.getStartColNo());
+                if (comment.getText().length == 1) {
+                    final String lineAfter =
+                        line.substring(comment.getEndColNo() + 1).trim();
+                    if (!"".equals(lineAfter)) {
+                        // do not check comment which doesn't end line
+                        continue;
+                    }
+                }
+            }
+            if ((comment != null)
+                && !blankLinePattern.matcher(lineBefore).find()
+                && !isLegalComment(comment))
+            {
+                log(lineNo.intValue(), "trailing.comments");
+            }
+        }
+    }
+
+    /**
+     * Checks if given comment is legal (single-line and matches to the
+     * pattern).
+     * @param aComment comment to check.
+     * @return true if the comment if legal.
+     */
+    private boolean isLegalComment(final TextBlock aComment)
+    {
+        if (mLegalComment == null) {
+            return false;
+        }
+        // multi-line comment can not be legal
+        if (aComment.getStartLineNo() != aComment.getEndLineNo()) {
+            return false;
+        }
+        String commentText = aComment.getText()[0];
+        // remove chars which start comment
+        commentText = commentText.substring(2);
+        // if this is a C-style comment we need to remove its end
+        if (commentText.endsWith("*/")) {
+            commentText = commentText.substring(0, commentText.length() - 2);
+        }
+        commentText = commentText.trim();
+        return mLegalComment.matcher(commentText).find();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java
new file mode 100644
index 0000000..60d7881
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java
@@ -0,0 +1,264 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.Defn;
+import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
+import com.puppycrawl.tools.checkstyle.api.LocalizedMessage;
+import com.puppycrawl.tools.checkstyle.api.MessageDispatcher;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.Map.Entry;
+
+/**
+ * <p>
+ * The TranslationCheck class helps to ensure the correct translation of code by
+ * checking property files for consistency regarding their keys.
+ * Two property files describing one and the same context are consistent if they
+ * contain the same keys.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="Translation"/>
+ * </pre>
+ * @author Alexandra Bunge
+ * @author lkuehne
+ */
+public class TranslationCheck
+    extends AbstractFileSetCheck
+{
+    /** The property files to process. */
+    private final List<File> mPropertyFiles = Lists.newArrayList();
+
+    /**
+     * Creates a new <code>TranslationCheck</code> instance.
+     */
+    public TranslationCheck()
+    {
+        setFileExtensions(new String[]{"properties"});
+    }
+
+    @Override
+    public void beginProcessing(String aCharset)
+    {
+        super.beginProcessing(aCharset);
+        mPropertyFiles.clear();
+    }
+
+    @Override
+    protected void processFiltered(File aFile, List<String> aLines)
+    {
+        mPropertyFiles.add(aFile);
+    }
+
+    @Override
+    public void finishProcessing()
+    {
+        super.finishProcessing();
+        final Map<String, Set<File>> propFilesMap =
+            arrangePropertyFiles(mPropertyFiles);
+        checkPropertyFileSets(propFilesMap);
+    }
+
+    /**
+     * Gets the basename (the unique prefix) of a property file. For example
+     * "xyz/messages" is the basename of "xyz/messages.properties",
+     * "xyz/messages_de_AT.properties", "xyz/messages_en.properties", etc.
+     *
+     * @param aFile the file
+     * @return the extracted basename
+     */
+    private static String extractPropertyIdentifier(final File aFile)
+    {
+        final String filePath = aFile.getPath();
+        final int dirNameEnd = filePath.lastIndexOf(File.separatorChar);
+        final int baseNameStart = dirNameEnd + 1;
+        final int underscoreIdx = filePath.indexOf('_', baseNameStart);
+        final int dotIdx = filePath.indexOf('.', baseNameStart);
+        final int cutoffIdx = (underscoreIdx != -1) ? underscoreIdx : dotIdx;
+        return filePath.substring(0, cutoffIdx);
+    }
+
+    /**
+     * Arranges a set of property files by their prefix.
+     * The method returns a Map object. The filename prefixes
+     * work as keys each mapped to a set of files.
+     * @param aPropFiles the set of property files
+     * @return a Map object which holds the arranged property file sets
+     */
+    private static Map<String, Set<File>> arrangePropertyFiles(
+        List<File> aPropFiles)
+    {
+        final Map<String, Set<File>> propFileMap = Maps.newHashMap();
+
+        for (final File f : aPropFiles) {
+            final String identifier = extractPropertyIdentifier(f);
+
+            Set<File> fileSet = propFileMap.get(identifier);
+            if (fileSet == null) {
+                fileSet = Sets.newHashSet();
+                propFileMap.put(identifier, fileSet);
+            }
+            fileSet.add(f);
+        }
+        return propFileMap;
+    }
+
+    /**
+     * Loads the keys of the specified property file into a set.
+     * @param aFile the property file
+     * @return a Set object which holds the loaded keys
+     */
+    private Set<Object> loadKeys(File aFile)
+    {
+        final Set<Object> keys = Sets.newHashSet();
+        InputStream inStream = null;
+
+        try {
+            // Load file and properties.
+            inStream = new FileInputStream(aFile);
+            final Properties props = new Properties();
+            props.load(inStream);
+
+            // Gather the keys and put them into a set
+            final Enumeration<?> e = props.propertyNames();
+            while (e.hasMoreElements()) {
+                keys.add(e.nextElement());
+            }
+        }
+        catch (final IOException e) {
+            logIOException(e, aFile);
+        }
+        finally {
+            Utils.closeQuietly(inStream);
+        }
+        return keys;
+    }
+
+    /**
+     * helper method to log an io exception.
+     * @param aEx the exception that occured
+     * @param aFile the file that could not be processed
+     */
+    private void logIOException(IOException aEx, File aFile)
+    {
+        String[] args = null;
+        String key = "general.fileNotFound";
+        if (!(aEx instanceof FileNotFoundException)) {
+            args = new String[] {aEx.getMessage()};
+            key = "general.exception";
+        }
+        final LocalizedMessage message =
+            new LocalizedMessage(
+                0,
+                Defn.CHECKSTYLE_BUNDLE,
+                key,
+                args,
+                getId(),
+                this.getClass(), null);
+        final TreeSet<LocalizedMessage> messages = Sets.newTreeSet();
+        messages.add(message);
+        getMessageDispatcher().fireErrors(aFile.getPath(), messages);
+        Utils.getExceptionLogger().debug("IOException occured.", aEx);
+    }
+
+
+    /**
+     * Compares the key sets of the given property files (arranged in a map)
+     * with the specified key set. All missing keys are reported.
+     * @param aKeys the set of keys to compare with
+     * @param aFileMap a Map from property files to their key sets
+     */
+    private void compareKeySets(Set<Object> aKeys,
+            Map<File, Set<Object>> aFileMap)
+    {
+        final Set<Entry<File, Set<Object>>> fls = aFileMap.entrySet();
+
+        for (Entry<File, Set<Object>> entry : fls) {
+            final File currentFile = entry.getKey();
+            final MessageDispatcher dispatcher = getMessageDispatcher();
+            final String path = currentFile.getPath();
+            dispatcher.fireFileStarted(path);
+            final Set<Object> currentKeys = entry.getValue();
+
+            // Clone the keys so that they are not lost
+            final Set<Object> keysClone = Sets.newHashSet(aKeys);
+            keysClone.removeAll(currentKeys);
+
+            // Remaining elements in the key set are missing in the current file
+            if (!keysClone.isEmpty()) {
+                for (Object key : keysClone) {
+                    log(0, "translation.missingKey", key);
+                }
+            }
+            fireErrors(path);
+            dispatcher.fireFileFinished(path);
+        }
+    }
+
+
+    /**
+     * Tests whether the given property files (arranged by their prefixes
+     * in a Map) contain the proper keys.
+     *
+     * Each group of files must have the same keys. If this is not the case
+     * an error message is posted giving information which key misses in
+     * which file.
+     *
+     * @param aPropFiles the property files organized as Map
+     */
+    private void checkPropertyFileSets(Map<String, Set<File>> aPropFiles)
+    {
+        final Set<Entry<String, Set<File>>> entrySet = aPropFiles.entrySet();
+
+        for (Entry<String, Set<File>> entry : entrySet) {
+            final Set<File> files = entry.getValue();
+
+            if (files.size() >= 2) {
+                // build a map from files to the keys they contain
+                final Set<Object> keys = Sets.newHashSet();
+                final Map<File, Set<Object>> fileMap = Maps.newHashMap();
+
+                for (File file : files) {
+                    final Set<Object> fileKeys = loadKeys(file);
+                    keys.addAll(fileKeys);
+                    fileMap.put(file, fileKeys);
+                }
+
+                // check the map for consistency
+                compareKeySets(keys, fileMap);
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/UncommentedMainCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/UncommentedMainCheck.java
new file mode 100644
index 0000000..7a5f4b5
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/UncommentedMainCheck.java
@@ -0,0 +1,255 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import org.apache.commons.beanutils.ConversionException;
+
+/**
+ * Detects uncommented main methods. Basically detects
+ * any main method, since if it is detectable
+ * that means it is uncommented.
+ *
+ * <pre class="body">
+ * <module name="UncommentedMain"/>
+ * </pre>
+ *
+ * @author Michael Yui
+ * @author o_sukhodolsky
+ */
+public class UncommentedMainCheck
+    extends Check
+{
+    /** the pattern to exclude classes from the check */
+    private String mExcludedClasses = "^$";
+    /** compiled regexp to exclude classes from check */
+    private Pattern mExcludedClassesPattern =
+        Utils.createPattern(mExcludedClasses);
+    /** current class name */
+    private String mCurrentClass;
+    /** current package */
+    private FullIdent mPackage;
+    /** class definition depth */
+    private int mClassDepth;
+
+    /**
+     * Set the excluded classes pattern.
+     * @param aExcludedClasses a <code>String</code> value
+     * @throws ConversionException unable to parse aExcludedClasses
+     */
+    public void setExcludedClasses(String aExcludedClasses)
+        throws ConversionException
+    {
+        try {
+            mExcludedClasses = aExcludedClasses;
+            mExcludedClassesPattern = Utils.getPattern(mExcludedClasses);
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse "
+                                          + mExcludedClasses,
+                                          e);
+        }
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.METHOD_DEF,
+            TokenTypes.CLASS_DEF,
+            TokenTypes.PACKAGE_DEF,
+        };
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        mPackage = FullIdent.createFullIdent(null);
+        mCurrentClass = null;
+        mClassDepth = 0;
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAst)
+    {
+        if (aAst.getType() == TokenTypes.CLASS_DEF) {
+            if (mClassDepth == 1) {
+                mCurrentClass = null;
+            }
+            mClassDepth--;
+        }
+    }
+
+    @Override
+    public void visitToken(DetailAST aAst)
+    {
+        switch (aAst.getType()) {
+        case TokenTypes.PACKAGE_DEF:
+            visitPackageDef(aAst);
+            break;
+        case TokenTypes.CLASS_DEF:
+            visitClassDef(aAst);
+            break;
+        case TokenTypes.METHOD_DEF:
+            visitMethodDef(aAst);
+            break;
+        default:
+            throw new IllegalStateException(aAst.toString());
+        }
+    }
+
+    /**
+     * Sets current package.
+     * @param aPackage node for package definition
+     */
+    private void visitPackageDef(DetailAST aPackage)
+    {
+        mPackage = FullIdent.createFullIdent(aPackage.getLastChild()
+                .getPreviousSibling());
+    }
+
+    /**
+     * If not inner class then change current class name.
+     * @param aClass node for class definition
+     */
+    private void visitClassDef(DetailAST aClass)
+    {
+        // we are not use inner classes because they can not
+        // have static methods
+        if (mClassDepth == 0) {
+            final DetailAST ident = aClass.findFirstToken(TokenTypes.IDENT);
+            mCurrentClass = mPackage.getText() + "." + ident.getText();
+            mClassDepth++;
+        }
+    }
+
+    /**
+     * Checks method definition if this is
+     * <code>public static void main(String[])</code>.
+     * @param aMethod method definition node
+     */
+    private void visitMethodDef(DetailAST aMethod)
+    {
+        if (mClassDepth != 1) {
+            // method in inner class or in interface definition
+            return;
+        }
+
+        if (checkClassName()
+            && checkName(aMethod)
+            && checkModifiers(aMethod)
+            && checkType(aMethod)
+            && checkParams(aMethod))
+        {
+            log(aMethod.getLineNo(), "uncommented.main");
+        }
+    }
+
+    /**
+     * Checks that current class is not excluded
+     * @return true if check passed, false otherwise
+     */
+    private boolean checkClassName()
+    {
+        return !mExcludedClassesPattern.matcher(mCurrentClass).find();
+    }
+
+    /**
+     * Checks that method name is @quot;main at quot;.
+     * @param aMethod the METHOD_DEF node
+     * @return true if check passed, false otherwise
+     */
+    private boolean checkName(DetailAST aMethod)
+    {
+        final DetailAST ident = aMethod.findFirstToken(TokenTypes.IDENT);
+        return "main".equals(ident.getText());
+    }
+
+    /**
+     * Checks that method has final and static modifiers.
+     * @param aMethod the METHOD_DEF node
+     * @return true if check passed, false otherwise
+     */
+    private boolean checkModifiers(DetailAST aMethod)
+    {
+        final DetailAST modifiers =
+            aMethod.findFirstToken(TokenTypes.MODIFIERS);
+
+        return modifiers.branchContains(TokenTypes.LITERAL_PUBLIC)
+            && modifiers.branchContains(TokenTypes.LITERAL_STATIC);
+    }
+
+    /**
+     * Checks that return type is <code>void</code>.
+     * @param aMethod the METHOD_DEF node
+     * @return true if check passed, false otherwise
+     */
+    private boolean checkType(DetailAST aMethod)
+    {
+        final DetailAST type =
+            aMethod.findFirstToken(TokenTypes.TYPE).getFirstChild();
+        return type.getType() == TokenTypes.LITERAL_VOID;
+    }
+
+    /**
+     * Checks that method has only <code>String[]</code> param
+     * @param aMethod the METHOD_DEF node
+     * @return true if check passed, false otherwise
+     */
+    private boolean checkParams(DetailAST aMethod)
+    {
+        final DetailAST params = aMethod.findFirstToken(TokenTypes.PARAMETERS);
+        if (params.getChildCount() != 1) {
+            return false;
+        }
+        final DetailAST paramType = (params.getFirstChild())
+            .findFirstToken(TokenTypes.TYPE);
+        final DetailAST arrayDecl =
+            paramType.findFirstToken(TokenTypes.ARRAY_DECLARATOR);
+        if (arrayDecl == null) {
+            return false;
+        }
+
+        final DetailAST arrayType = arrayDecl.getFirstChild();
+
+        if ((arrayType.getType() == TokenTypes.IDENT)
+            || (arrayType.getType() == TokenTypes.DOT))
+        {
+            final FullIdent type = FullIdent.createFullIdent(arrayType);
+            return ("String".equals(type.getText())
+                    || "java.lang.String".equals(type.getText()));
+        }
+
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/UniquePropertiesCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/UniquePropertiesCheck.java
new file mode 100644
index 0000000..54e7fda
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/UniquePropertiesCheck.java
@@ -0,0 +1,150 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.List;
+import java.util.Properties;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.google.common.collect.HashMultiset;
+import com.google.common.collect.Multiset;
+import com.google.common.collect.Multiset.Entry;
+import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
+
+/**
+ * Checks the uniqueness of property keys (left from equal sign) in the
+ * properties file.
+ *
+ * @author Pavel Baranchikov
+ */
+public class UniquePropertiesCheck extends AbstractFileSetCheck
+{
+
+    /**
+     * Localization key for check violation.
+     */
+    public static final String MSG_KEY = "properties.duplicateproperty";
+    /**
+     * Localization key for IO exception occurred on file open.
+     */
+    public static final String IO_EXCEPTION_KEY = "unable.open.cause";
+
+    /**
+     * Construct the check with default values.
+     */
+    public UniquePropertiesCheck()
+    {
+        super.setFileExtensions(new String[]
+        {"properties"});
+    }
+
+    @Override
+    protected void processFiltered(File aFile, List<String> aLines)
+    {
+        final UniqueProperties properties = new UniqueProperties();
+
+        try {
+            // As file is already read, there should not be any exceptions.
+            properties.load(new FileInputStream(aFile));
+        }
+        catch (IOException e) {
+            log(0, IO_EXCEPTION_KEY, aFile.getPath(),
+                    e.getLocalizedMessage());
+        }
+
+        for (Entry<String> duplication : properties
+                .getDuplicatedStrings().entrySet())
+        {
+            final String keyName = duplication.getElement();
+            final int lineNumber = getLineNumber(aLines, keyName);
+            // Number of occurrences is number of duplications + 1
+            log(lineNumber, MSG_KEY, keyName, duplication.getCount() + 1);
+        }
+    }
+
+    /**
+     * Method returns line number the key is detected in the checked properties
+     * files first.
+     *
+     * @param aLines
+     *            properties file lines list
+     * @param aKeyNane
+     *            key name to look for
+     * @return line number of first occurrence. If no key found in properties
+     *         file, 0 is returned
+     */
+    protected int getLineNumber(List<String> aLines, String aKeyNane)
+    {
+        final String keyPatternString =
+                "^" + aKeyNane.replace(" ", "\\\\ ") + "[\\s:=].*$";
+        final Pattern keyPattern = Pattern.compile(keyPatternString);
+        int lineNumber = 1;
+        final Matcher matcher = keyPattern.matcher("");
+        for (String line : aLines) {
+            matcher.reset(line);
+            if (matcher.matches()) {
+                break;
+            }
+            ++lineNumber;
+        }
+        if (lineNumber > aLines.size()) {
+            lineNumber = 0;
+        }
+        return lineNumber;
+    }
+
+    /**
+     * Properties subclass to store duplicated property keys in a separate map.
+     *
+     * @author Pavel Baranchikov
+     */
+    private static class UniqueProperties extends Properties
+    {
+        /**
+         * Default serial version id.
+         */
+        private static final long serialVersionUID = 1L;
+        /**
+         * Multiset, holding duplicated keys. Keys are added here only if they
+         * already exist in Properties' inner map.
+         */
+        private final Multiset<String> mDuplicatedStrings = HashMultiset
+                .create();
+
+        @Override
+        public synchronized Object put(Object aKey, Object aValue)
+        {
+            final Object oldValue = super.put(aKey, aValue);
+            if (oldValue != null && aKey instanceof String) {
+                final String keyString = (String) aKey;
+                mDuplicatedStrings.add(keyString);
+            }
+            return oldValue;
+        }
+
+        public Multiset<String> getDuplicatedStrings()
+        {
+            return mDuplicatedStrings;
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/UpperEllCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/UpperEllCheck.java
new file mode 100644
index 0000000..6a15374
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/UpperEllCheck.java
@@ -0,0 +1,67 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>Checks that long constants are defined with an upper ell.
+ * That is <span class="code">'L'</span> and not
+ * <span class="code">'l'</span>. This is in accordance to the Java Language
+ * Specification, <a href=
+"http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#48282"
+ * >Section 3.10.1</a>.
+ * </p>
+ * <p>
+ * Rationale: The letter <span class="code">l</span> looks a lot
+ * like the number <span class="code">1</span>.
+ * </p>
+ *
+ * Examples
+ * <p class="body">
+ * To configure the check:
+ *
+ * </p>
+ * <pre class="body">
+ * <module name="UpperEll"/>
+ * </pre>
+ *
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public class UpperEllCheck extends Check
+{
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.NUM_LONG};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (aAST.getText().endsWith("l")) {
+            log(aAST.getLineNo(),
+                aAST.getColumnNo() + aAST.getText().length() - 1,
+                "upperEll");
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationUseStyleCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationUseStyleCheck.java
new file mode 100644
index 0000000..f086f35
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationUseStyleCheck.java
@@ -0,0 +1,515 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.annotation;
+
+import org.apache.commons.beanutils.ConversionException;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * This check controls the style with the usage of annotations.
+ *
+ * <p>
+ * Annotations have three element styles starting with the least verbose.
+ * <ul>
+ * <li>{@link ElementStyle#COMPACT_NO_ARRAY COMPACT_NO_ARRAY}</li>
+ * <li>{@link ElementStyle#COMPACT COMPACT}</li>
+ * <li>{@link ElementStyle#EXPANDED EXPANDED}</li>
+ * </ul>
+ * To not enforce an element style
+ * a {@link ElementStyle#IGNORE IGNORE} type is provided.  The desired style
+ * can be set through the <code>elementStyle</code> property.
+ *
+ *
+ * <p>
+ * Using the EXPANDED style is more verbose. The expanded version
+ * is sometimes referred to as "named parameters" in other languages.
+ *
+ *
+ * <p>
+ * Using the COMPACT style is less verbose. This style can only
+ * be used when there is an element called 'value' which is  either
+ * the sole element or all other elements have default valuess.
+ *
+ *
+ * <p>
+ * Using the COMPACT_NO_ARRAY style is less verbose. It is similar
+ * to the COMPACT style but single value arrays are flagged. With
+ * annotations a single value array does not need to be placed in an
+ * array initializer. This style can only be used when there is an
+ * element called 'value' which is either the sole element or all other
+ * elements have default values.
+ *
+ *
+ * <p>
+ * The ending parenthesis are optional when using annotations with no elements.
+ * To always require ending parenthesis use the
+ * {@link ClosingParens#ALWAYS ALWAYS} type.  To never have ending parenthesis
+ * use the {@link ClosingParens#NEVER NEVER} type. To not enforce a
+ * closing parenthesis preference a {@link ClosingParens#IGNORE IGNORE} type is
+ * provided. Set this through the <code>closingParens</code> property.
+ *
+ *
+ * <p>
+ * Annotations also allow you to specify arrays of elements in a standard
+ * format.  As with normal arrays, a trailing comma is optional. To always
+ * require a trailing comma use the {@link TrailingArrayComma#ALWAYS ALWAYS}
+ * type. To never have a trailing  comma use the
+ * {@link TrailingArrayComma#NEVER NEVER} type. To not enforce a trailing
+ * array comma preference a {@link TrailingArrayComma#IGNORE IGNORE} type
+ * is provided.  Set this through the <code>trailingArrayComma</code> property.
+ *
+ *
+ * <p>
+ * By default the ElementStyle is set to EXPANDED, the TrailingArrayComma
+ * is set to NEVER, and the ClosingParans is set to ALWAYS.
+ *
+ *
+ * <p>
+ * According to the JLS, it is legal to include a trailing comma
+ * in arrays used in annotations but Sun's Java 5 & 6 compilers will not
+ * compile with this syntax. This may in be a bug in Sun's compilers
+ * since eclipse 3.4's built-in compiler does allow this syntax as
+ * defined in the JLS. Note: this was tested with compilers included with
+ * JDK versions 1.5.0.17 and 1.6.0.11 and the compiler included with eclipse
+ * 3.4.1.
+ *
+ * See <a
+ * href="http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html">
+ * Java Language specification, sections 9.7</a>.
+ *
+ *
+ * <p>
+ * An example shown below is set to enforce an EXPANDED style, with a
+ * trailing array comma set to NEVER and always including the closing
+ * parenthesis.
+ *
+ *
+ * <pre>
+ * <module name="AnnotationUseStyle">
+ *    <property name="ElementStyle"
+ *        value="EXPANDED"/>
+ *    <property name="TrailingArrayComma"
+ *        value="NEVER"/>
+ *    <property name="ClosingParens"
+ *        value="ALWAYS"/>
+ * </module>
+ * </pre>
+ *
+ * @author Travis Schneeberger
+ */
+public final class AnnotationUseStyleCheck extends Check
+{
+    /**
+     * the element name used to receive special linguistic support
+     * for annotation use.
+     */
+    private static final String ANNOTATION_ELEMENT_SINGLE_NAME =
+        "value";
+
+    //not extending AbstractOptionCheck because check
+    //has more than one option type.
+
+    /** @see #setElementStyle(String) */
+    private ElementStyle mStyle = ElementStyle.COMPACT_NO_ARRAY;
+
+    //defaulting to NEVER because of the strange compiler behavior
+    /** @see #setTrailingArrayComma(String) */
+    private TrailingArrayComma mComma = TrailingArrayComma.NEVER;
+
+    /** @see #setClosingParens(String) */
+    private ClosingParens mParens = ClosingParens.NEVER;
+
+    /**
+     * Sets the ElementStyle from a string.
+     *
+     * @param aStyle string representation
+     * @throws ConversionException if cannot convert string.
+     */
+    public void setElementStyle(final String aStyle)
+    {
+        this.mStyle = this.getOption(ElementStyle.class, aStyle);
+    }
+
+    /**
+     * Sets the TrailingArrayComma from a string.
+     *
+     * @param aComma string representation
+     * @throws ConversionException if cannot convert string.
+     */
+    public void setTrailingArrayComma(final String aComma)
+    {
+        this.mComma = this.getOption(TrailingArrayComma.class, aComma);
+    }
+
+    /**
+     * Sets the ClosingParens from a string.
+     *
+     * @param aParens string representation
+     * @throws ConversionException if cannot convert string.
+     */
+    public void setClosingParens(final String aParens)
+    {
+        this.mParens = this.getOption(ClosingParens.class, aParens);
+    }
+
+    /**
+     * Retrieves an {@link Enum Enum} type from a @{link String String}.
+     * @param <T> the enum type
+     * @param aEnumClass the enum class
+     * @param aString the string representing the enum
+     * @return the enum type
+     */
+    private <T extends Enum<T>> T getOption(final Class<T> aEnumClass,
+        final String aString)
+    {
+        try {
+            return Enum.valueOf(aEnumClass, aString.trim().toUpperCase());
+        }
+        catch (final IllegalArgumentException iae) {
+            throw new ConversionException("unable to parse " + aString, iae);
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return this.getRequiredTokens();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return new int[] {
+            TokenTypes.ANNOTATION,
+        };
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return this.getRequiredTokens();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void visitToken(final DetailAST aAST)
+    {
+        this.checkStyleType(aAST);
+        this.checkCheckClosingParens(aAST);
+        this.checkTrailingComma(aAST);
+    }
+
+    /**
+     * Checks to see if the
+     * {@link ElementStyle AnnotationElementStyle}
+     * is correct.
+     *
+     * @param aAnnotation the annotation token
+     */
+    private void checkStyleType(final DetailAST aAnnotation)
+    {
+        if (ElementStyle.IGNORE.equals(this.mStyle)
+            || this.mStyle == null)
+        {
+            return;
+        }
+
+        if (ElementStyle.COMPACT_NO_ARRAY.equals(this.mStyle)) {
+            this.checkCompactNoArrayStyle(aAnnotation);
+        }
+        else if (ElementStyle.COMPACT.equals(this.mStyle)) {
+            this.checkCompactStyle(aAnnotation);
+        }
+        else if (ElementStyle.EXPANDED.equals(this.mStyle)) {
+            this.checkExpandedStyle(aAnnotation);
+        }
+    }
+
+    /**
+     * Checks for expanded style type violations.
+     *
+     * @param aAnnotation the annotation token
+     */
+    private void checkExpandedStyle(final DetailAST aAnnotation)
+    {
+        final int valuePairCount =
+            aAnnotation.getChildCount(TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR);
+
+        if (valuePairCount == 0
+            && aAnnotation.branchContains(TokenTypes.EXPR))
+        {
+            this.log(aAnnotation.getLineNo(), "annotation.incorrect.style",
+                ElementStyle.EXPANDED);
+        }
+    }
+
+    /**
+     * Checks for compact style type violations.
+     *
+     * @param aAnnotation the annotation token
+     */
+    private void checkCompactStyle(final DetailAST aAnnotation)
+    {
+        final int valuePairCount =
+            aAnnotation.getChildCount(
+                TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR);
+
+        final DetailAST valuePair =
+            aAnnotation.findFirstToken(
+                TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR);
+
+        if (valuePairCount == 1
+            && AnnotationUseStyleCheck.ANNOTATION_ELEMENT_SINGLE_NAME.equals(
+                valuePair.getFirstChild().getText()))
+        {
+            this.log(aAnnotation.getLineNo(), "annotation.incorrect.style",
+                ElementStyle.COMPACT);
+        }
+    }
+
+    /**
+     * Checks for compact no array style type violations.
+     *
+     * @param aAnnotation the annotation token
+     */
+    private void checkCompactNoArrayStyle(final DetailAST aAnnotation)
+    {
+        final DetailAST arrayInit =
+            aAnnotation.findFirstToken(TokenTypes.ANNOTATION_ARRAY_INIT);
+
+        final int valuePairCount =
+            aAnnotation.getChildCount(TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR);
+
+        final DetailAST valuePair =
+            aAnnotation.findFirstToken(TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR);
+
+        //in compact style with one value
+        if (arrayInit != null
+            && arrayInit.getChildCount(TokenTypes.EXPR) == 1)
+        {
+            this.log(aAnnotation.getLineNo(), "annotation.incorrect.style",
+                ElementStyle.COMPACT_NO_ARRAY);
+        }
+        //in expanded style with one value and the correct element name
+        else if (valuePairCount == 1) {
+            final DetailAST nestedArrayInit =
+                valuePair.findFirstToken(TokenTypes.ANNOTATION_ARRAY_INIT);
+
+            if (nestedArrayInit != null
+                && AnnotationUseStyleCheck.
+                    ANNOTATION_ELEMENT_SINGLE_NAME.equals(
+                    valuePair.getFirstChild().getText())
+                    && nestedArrayInit.getChildCount(TokenTypes.EXPR) == 1)
+            {
+                this.log(aAnnotation.getLineNo(), "annotation.incorrect.style",
+                    ElementStyle.COMPACT_NO_ARRAY);
+            }
+        }
+    }
+
+    /**
+     * Checks to see if the trailing comma is present if required or
+     * prohibited.
+     *
+     * @param aAnnotation the annotation token
+     */
+    private void checkTrailingComma(final DetailAST aAnnotation)
+    {
+        if (TrailingArrayComma.IGNORE.equals(this.mComma)
+            || this.mComma == null)
+        {
+            return;
+        }
+
+        DetailAST child = aAnnotation.getFirstChild();
+
+        while (child != null) {
+            DetailAST arrayInit = null;
+
+            if (child.getType()
+                == TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR)
+            {
+                arrayInit =
+                    child.findFirstToken(TokenTypes.ANNOTATION_ARRAY_INIT);
+            }
+            else if (child.getType() == TokenTypes.ANNOTATION_ARRAY_INIT) {
+                arrayInit = child;
+            }
+
+            if (arrayInit != null) {
+                this.logCommaViolation(arrayInit);
+            }
+            child = child.getNextSibling();
+        }
+    }
+
+    /**
+     * logs a trailing array comma violation if one exists.
+     *
+     * @param aAST the array init
+     * {@link TokenTypes#ANNOTATION_ARRAY_INIT ANNOTATION_ARRAY_INIT}.
+     */
+    private void logCommaViolation(final DetailAST aAST)
+    {
+        final DetailAST rCurly = aAST.findFirstToken(TokenTypes.RCURLY);
+
+        //comma can be null if array is empty
+        final DetailAST comma = rCurly.getPreviousSibling();
+
+        if (TrailingArrayComma.ALWAYS.equals(this.mComma)
+            && (comma == null || comma.getType() != TokenTypes.COMMA))
+        {
+            this.log(rCurly.getLineNo(),
+                rCurly.getColumnNo(), "annotation.trailing.comma.missing");
+        }
+        else if (TrailingArrayComma.NEVER.equals(this.mComma)
+            && comma != null && comma.getType() == TokenTypes.COMMA)
+        {
+            this.log(comma.getLineNo(),
+                comma.getColumnNo(), "annotation.trailing.comma.present");
+        }
+    }
+
+    /**
+     * Checks to see if the closing parenthesis are present if required or
+     * prohibited.
+     *
+     * @param aAST the annotation token
+     */
+    private void checkCheckClosingParens(final DetailAST aAST)
+    {
+        if (ClosingParens.IGNORE.equals(this.mParens)
+            || this.mParens == null)
+        {
+            return;
+        }
+
+        final DetailAST paren = aAST.getLastChild();
+        final boolean parenExists = paren.getType() == TokenTypes.RPAREN;
+
+        if (ClosingParens.ALWAYS.equals(this.mParens)
+            && !parenExists)
+        {
+            this.log(aAST.getLineNo(), "annotation.parens.missing");
+        }
+        else if (ClosingParens.NEVER.equals(this.mParens)
+            && !aAST.branchContains(TokenTypes.EXPR)
+            && parenExists)
+        {
+            this.log(aAST.getLineNo(), "annotation.parens.present");
+        }
+    }
+
+    /**
+     * Defines the styles for defining elements in an annotation.
+     * @author Travis Schneeberger
+     */
+    public static enum ElementStyle {
+
+        /**
+         * expanded example
+         *
+         * <pre>@SuppressWarnings(value={"unchecked","unused",})</pre>.
+         */
+        EXPANDED,
+
+        /**
+         * compact example
+         *
+         * <pre>@SuppressWarnings({"unchecked","unused",})</pre>
+         * <br>or<br>
+         * <pre>@SuppressWarnings("unchecked")</pre>.
+         */
+        COMPACT,
+
+        /**
+         * compact example.]
+         *
+         * <pre>@SuppressWarnings("unchecked")</pre>.
+         */
+        COMPACT_NO_ARRAY,
+
+        /**
+         * mixed styles.
+         */
+        IGNORE,
+    }
+
+    /**
+     * Defines the two styles for defining
+     * elements in an annotation.
+     *
+     * @author Travis Schneeberger
+     */
+    public static enum TrailingArrayComma {
+
+        /**
+         * with comma example
+         *
+         * <pre>@SuppressWarnings(value={"unchecked","unused",})</pre>.
+         */
+        ALWAYS,
+
+        /**
+         * without comma example
+         *
+         * <pre>@SuppressWarnings(value={"unchecked","unused"})</pre>.
+         */
+        NEVER,
+
+        /**
+         * mixed styles.
+         */
+        IGNORE,
+    }
+
+    /**
+     * Defines the two styles for defining
+     * elements in an annotation.
+     *
+     * @author Travis Schneeberger
+     */
+    public static enum ClosingParens {
+
+        /**
+         * with parens example
+         *
+         * <pre>@Deprecated()</pre>.
+         */
+        ALWAYS,
+
+        /**
+         * without parens example
+         *
+         * <pre>@Deprecated</pre>.
+         */
+        NEVER,
+
+        /**
+         * mixed styles.
+         */
+        IGNORE,
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingDeprecatedCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingDeprecatedCheck.java
new file mode 100644
index 0000000..9a4746e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingDeprecatedCheck.java
@@ -0,0 +1,215 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.annotation;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.puppycrawl.tools.checkstyle.api.AnnotationUtility;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.JavadocTagInfo;
+import com.puppycrawl.tools.checkstyle.api.TextBlock;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+/**
+ * <p>
+ * This class is used to verify that both the
+ * {@link java.lang.Deprecated Deprecated} annotation
+ * and the deprecated javadoc tag are present when
+ * either one is present.
+ * </p>
+ *
+ * <p>
+ * Both ways of flagging deprecation serve their own purpose.  The
+ * {@link java.lang.Deprecated Deprecated} annotation is used for
+ * compilers and development tools.  The deprecated javadoc tag is
+ * used to document why something is deprecated and what, if any,
+ * alternatives exist.
+ * </p>
+ *
+ * <p>
+ * In order to properly mark something as deprecated both forms of
+ * deprecation should be present.
+ * </p>
+ *
+ * <p>
+ * Package deprecation is a exception to the rule of always using the
+ * javadoc tag and annotation to deprecate.  Only the package-info.java
+ * file can contain a Deprecated annotation and it CANNOT contain
+ * a deprecated javadoc tag.  This is the case with
+ * Sun's javadoc tool released with JDK 1.6.0_11.  As a result, this check
+ * does not deal with Deprecated packages in any way.  <b>No official
+ * documentation was found confirming this behavior is correct
+ * (of the javadoc tool).</b>
+ * </p>
+ *
+ * <p>
+ * To configure this check do the following:
+ * </p>
+ *
+ * <pre>
+ * <module name="JavadocDeprecated"/>
+ * </pre>
+ *
+ * @author Travis Schneeberger
+ */
+public final class MissingDeprecatedCheck extends Check
+{
+    /** {@link Deprecated Deprecated} annotation name */
+    private static final String DEPRECATED = "Deprecated";
+
+    /** fully-qualified {@link Deprecated Deprecated} annotation name */
+    private static final String FQ_DEPRECATED = "java.lang." + DEPRECATED;
+
+    /** compiled regexp to match Javadoc tag with no argument * */
+    private static final Pattern MATCH_DEPRECATED =
+        Utils.createPattern("@(deprecated)\\s+\\S");
+
+    /** compiled regexp to match first part of multilineJavadoc tags * */
+    private static final Pattern MATCH_DEPRECATED_MULTILINE_START =
+        Utils.createPattern("@(deprecated)\\s*$");
+
+    /** compiled regexp to look for a continuation of the comment * */
+    private static final Pattern MATCH_DEPRECATED_MULTILINE_CONT =
+        Utils.createPattern("(\\*/|@|[^\\s\\*])");
+
+    /** Multiline finished at end of comment * */
+    private static final String END_JAVADOC = "*/";
+    /** Multiline finished at next Javadoc * */
+    private static final String NEXT_TAG = "@";
+
+    /** {@inheritDoc} */
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return this.getAcceptableTokens();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return new int[] {
+            TokenTypes.INTERFACE_DEF,
+            TokenTypes.CLASS_DEF,
+            TokenTypes.ANNOTATION_DEF,
+            TokenTypes.ENUM_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.CTOR_DEF,
+            TokenTypes.VARIABLE_DEF,
+            TokenTypes.ENUM_CONSTANT_DEF,
+            TokenTypes.ANNOTATION_FIELD_DEF,
+        };
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void visitToken(final DetailAST aAST)
+    {
+        final TextBlock javadoc =
+            this.getFileContents().getJavadocBefore(aAST.getLineNo());
+
+        final boolean containsAnnotation =
+            AnnotationUtility.containsAnnotation(aAST, DEPRECATED)
+            || AnnotationUtility.containsAnnotation(aAST, FQ_DEPRECATED);
+
+        final boolean containsJavadocTag = this.containsJavadocTag(javadoc);
+
+        if (containsAnnotation ^ containsJavadocTag) {
+            this.log(aAST.getLineNo(), "annotation.missing.deprecated");
+        }
+    }
+
+    /**
+     * Checks to see if the text block contains a deprecated tag.
+     *
+     * @param aJavadoc the javadoc of the AST
+     * @return true if contains the tag
+     */
+    private boolean containsJavadocTag(final TextBlock aJavadoc)
+    {
+        if (aJavadoc == null) {
+            return false;
+        }
+
+        final String[] lines = aJavadoc.getText();
+
+        boolean found = false;
+
+        int currentLine = aJavadoc.getStartLineNo() - 1;
+
+        for (int i = 0; i < lines.length; i++) {
+            currentLine++;
+            final String line = lines[i];
+
+            final Matcher javadocNoargMatcher =
+                MissingDeprecatedCheck.MATCH_DEPRECATED.matcher(line);
+            final Matcher noargMultilineStart =
+                MissingDeprecatedCheck.
+                    MATCH_DEPRECATED_MULTILINE_START.matcher(line);
+
+            if (javadocNoargMatcher.find()) {
+                if (found) {
+                    this.log(currentLine, "javadoc.duplicateTag",
+                        JavadocTagInfo.DEPRECATED.getText());
+                }
+                found = true;
+            }
+            else if (noargMultilineStart.find()) {
+                // Look for the rest of the comment if all we saw was
+                // the tag and the name. Stop when we see '*/' (end of
+                // Javadoc), '@' (start of next tag), or anything that's
+                // not whitespace or '*' characters.
+
+                for (int remIndex = i + 1;
+                    remIndex < lines.length; remIndex++)
+                {
+                    final Matcher multilineCont =
+                        MissingDeprecatedCheck.MATCH_DEPRECATED_MULTILINE_CONT
+                        .matcher(lines[remIndex]);
+
+                    if (multilineCont.find()) {
+                        remIndex = lines.length;
+                        final String lFin = multilineCont.group(1);
+                        if (!lFin.equals(MissingDeprecatedCheck.NEXT_TAG)
+                            && !lFin.equals(MissingDeprecatedCheck.END_JAVADOC))
+                        {
+                            if (found) {
+                                this.log(currentLine, "javadoc.duplicateTag",
+                                    JavadocTagInfo.DEPRECATED.getText());
+                            }
+                            found = true;
+                        }
+                        else {
+                            this.log(currentLine, "javadoc.missing");
+                            if (found) {
+                                this.log(currentLine, "javadoc.duplicateTag",
+                                    JavadocTagInfo.DEPRECATED.getText());
+                            }
+                            found = true;
+                        }
+                    }
+                }
+            }
+        }
+        return found;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheck.java
new file mode 100644
index 0000000..4e72b42
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheck.java
@@ -0,0 +1,193 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.annotation;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.puppycrawl.tools.checkstyle.api.AnnotationUtility;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.JavadocTagInfo;
+import com.puppycrawl.tools.checkstyle.api.TextBlock;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+/**
+ * <p>
+ * This class is used to verify that the {@link java.lang.Override Override}
+ * annotation is present when the inheritDoc javadoc tag is present.
+ * </p>
+ *
+ * <p>
+ * Rationale: The {@link java.lang.Override Override} annotation helps
+ * compiler tools ensure that an override is actually occurring.  It is
+ * quite easy to accidentally overload a method or hide a static method
+ * and using the {@link java.lang.Override Override} annotation points
+ * out these problems.
+ * </p>
+ *
+ * <p>
+ * This check will log a violation if using the inheritDoc tag on a method that
+ * is not valid (ex: private, or static method).
+ * </p>
+ *
+ * <p>
+ * There is a slight difference between the Override annotation in Java 5 versus
+ * Java 6 and above. In Java 5, any method overridden from an interface cannot
+ * be annotated with Override. In Java 6 this behavior is allowed.
+ * </p>
+ *
+ * <p>
+ * As a result of the aforementioned difference between Java 5 and Java 6, a
+ * property called <code> javaFiveCompatibility </code> is available. This
+ * property will only check classes, interfaces, etc. that do not contain the
+ * extends or implements keyword or are not anonymous classes. This means it
+ * only checks methods overridden from <code>java.lang.Object</code>
+ *
+ * <b>Java 5 Compatibility mode severely limits this check. It is recommended to
+ * only use it on Java 5 source</b>
+ * </p>
+ *
+ * <pre>
+ * <module name="MissingOverride">
+ *    <property name="javaFiveCompatibility"
+ *        value="true"/>
+ * </module>
+ * </pre>
+ *
+ * @author Travis Schneeberger
+ */
+public final class MissingOverrideCheck extends Check
+{
+    /** {@link Override Override} annotation name */
+    private static final String OVERRIDE = "Override";
+
+    /** fully-qualified {@link Override Override} annotation name */
+    private static final String FQ_OVERRIDE = "java.lang." + OVERRIDE;
+
+    /** compiled regexp to match Javadoc tags with no argument and {} * */
+    private static final Pattern MATCH_INHERITDOC =
+        Utils.createPattern("\\{\\s*@(inheritDoc)\\s*\\}");
+
+    /** @see #setJavaFiveCompatibility(boolean) */
+    private boolean mJavaFiveCompatibility;
+
+    /**
+     * Sets Java 5 compatibility mode.
+     *
+     * <p>
+     * In Java 5, this check could flag code that is not valid for the Override
+     * annotation even though it is a proper override. See the class
+     * documentation for more information.
+     * </p>
+     *
+     * <p>
+     * Set this to true to turn on Java 5 compatibility mode. Set this to
+     * false to turn off Java 5 compatibility mode.
+     * </p>
+     *
+     * @param aCompatibility compatibility or not
+     */
+    public void setJavaFiveCompatibility(final boolean aCompatibility)
+    {
+        this.mJavaFiveCompatibility = aCompatibility;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return this.getRequiredTokens();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return this.getRequiredTokens();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return new int[]
+        {TokenTypes.METHOD_DEF, };
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void visitToken(final DetailAST aAST)
+    {
+        final TextBlock javadoc =
+            this.getFileContents().getJavadocBefore(aAST.getLineNo());
+
+
+        final boolean containsTag = this.containsJavadocTag(javadoc);
+        if (containsTag && !JavadocTagInfo.INHERIT_DOC.isValidOn(aAST)) {
+            this.log(aAST.getLineNo(), "tag.not.valid.on",
+                JavadocTagInfo.INHERIT_DOC.getText());
+            return;
+        }
+
+        if (this.mJavaFiveCompatibility) {
+            final DetailAST defOrNew = aAST.getParent().getParent();
+
+            if (defOrNew.branchContains(TokenTypes.EXTENDS_CLAUSE)
+                || defOrNew.branchContains(TokenTypes.IMPLEMENTS_CLAUSE)
+                || defOrNew.getType() == TokenTypes.LITERAL_NEW)
+            {
+                return;
+            }
+        }
+
+        if (containsTag
+            && (!AnnotationUtility.containsAnnotation(aAST, OVERRIDE)
+            && !AnnotationUtility.containsAnnotation(aAST, FQ_OVERRIDE)))
+        {
+            this.log(aAST.getLineNo(), "annotation.missing.override");
+        }
+    }
+
+    /**
+     * Checks to see if the text block contains a inheritDoc tag.
+     *
+     * @param aJavadoc the javadoc of the AST
+     * @return true if contains the tag
+     */
+    private boolean containsJavadocTag(final TextBlock aJavadoc)
+    {
+        if (aJavadoc == null) {
+            return false;
+        }
+
+        final String[] lines = aJavadoc.getText();
+
+        for (final String line : lines) {
+            final Matcher matchInheritDoc =
+                MissingOverrideCheck.MATCH_INHERITDOC.matcher(line);
+
+            if (matchInheritDoc.find()) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/PackageAnnotationCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/PackageAnnotationCheck.java
new file mode 100644
index 0000000..7ba420c
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/PackageAnnotationCheck.java
@@ -0,0 +1,85 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.annotation;
+
+import com.puppycrawl.tools.checkstyle.api.AnnotationUtility;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * This check makes sure that all package annotations are in the
+ * package-info.java file.
+ *
+ * <p>
+ * According to the Java JLS 3rd ed.
+ * </p>
+ *
+ * <p>
+ * The JLS does not enforce the placement of package annotations.
+ * This placement may vary based on implementation.  The JLS
+ * does highly recommend that all package annotations are
+ * placed in the package-info.java file.
+ *
+ * See <a
+ * href="http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html">
+ * Java Language specification, sections 7.4.1.1</a>.
+ * </p>
+ * @author Travis Schneeberger
+ */
+public class PackageAnnotationCheck extends Check
+{
+
+    /** {@inheritDoc} */
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return this.getRequiredTokens();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return new int[] {
+            TokenTypes.PACKAGE_DEF,
+        };
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return this.getRequiredTokens();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void visitToken(final DetailAST aAST)
+    {
+        final boolean containsAnnotation =
+            AnnotationUtility.containsAnnotation(aAST);
+        final boolean inPackageInfo =
+            this.getFileContents().inPackageInfo();
+
+        if (containsAnnotation && !inPackageInfo) {
+            this.log(aAST.getLine(), "annotation.package.location");
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/SuppressWarningsCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/SuppressWarningsCheck.java
new file mode 100644
index 0000000..7fdac94
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/SuppressWarningsCheck.java
@@ -0,0 +1,315 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.annotation;
+
+import java.util.regex.Matcher;
+
+import com.puppycrawl.tools.checkstyle.api.AnnotationUtility;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.AbstractFormatCheck;
+
+/**
+ * <p>
+ * This check allows you to specify what warnings that
+ * {@link SuppressWarnings SuppressWarnings} is not
+ * allowed to suppress.  You can also specify a list
+ * of TokenTypes that the configured warning(s) cannot
+ * be suppressed on.
+ * </p>
+ *
+ * <p>
+ * The {@link AbstractFormatCheck#setFormat warnings} property is a
+ * regex pattern.  Any warning being suppressed matching
+ * this pattern will be flagged.
+ * </p>
+ *
+ * <p>
+ * By default, any warning specified will be disallowed on
+ * all legal TokenTypes unless otherwise specified via
+ * the
+ * {@link com.puppycrawl.tools.checkstyle.api.Check#setTokens(String[]) tokens}
+ * property.
+ *
+ * Also, by default warnings that are empty strings or all
+ * whitespace (regex: ^$|^\s+$) are flagged.  By specifying,
+ * the format property these defaults no longer apply.
+ * </p>
+ *
+ * <p>
+ * Limitations:  This check does not consider conditionals
+ * inside the SuppressWarnings annotation. <br>
+ * For example:
+ * {@code @SuppressWarnings((false) ? (true) ? "unchecked" : "foo" : "unused")}
+ * According to the above example, the "unused" warning is being suppressed
+ * not the "unchecked" or "foo" warnings.  All of these warnings will be
+ * considered and matched against regardless of what the conditional
+ * evaluates to.
+ * </p>
+ *
+ * <p>
+ * This check can be configured so that the "unchecked"
+ * and "unused" warnings cannot be suppressed on
+ * anything but variable and parameter declarations.
+ * See below of an example.
+ * </p>
+ *
+ * <pre>
+ * <module name="SuppressWarnings">
+ *    <property name="format"
+ *        value="^unchecked$|^unused$"/>
+ *    <property name="tokens"
+ *        value="
+ *        CLASS_DEF,INTERFACE_DEF,ENUM_DEF,
+ *        ANNOTATION_DEF,ANNOTATION_FIELD_DEF,
+ *        ENUM_CONSTANT_DEF,METHOD_DEF,CTOR_DEF
+ *        "/>
+ * </module>
+ * </pre>
+ * @author Travis Schneeberger
+ */
+public class SuppressWarningsCheck extends AbstractFormatCheck
+{
+    /** {@link SuppressWarnings SuppressWarnings} annotation name */
+    private static final String SUPPRESS_WARNINGS = "SuppressWarnings";
+
+    /**
+     * fully-qualified {@link SuppressWarnings SuppressWarnings}
+     * annotation name
+     */
+    private static final String FQ_SUPPRESS_WARNINGS =
+        "java.lang." + SUPPRESS_WARNINGS;
+
+    /**
+     * Ctor that specifies the default for the format property
+     * as specified in the class javadocs.
+     */
+    public SuppressWarningsCheck()
+    {
+        super("^$|^\\s+$");
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public final int[] getDefaultTokens()
+    {
+        return this.getAcceptableTokens();
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public final int[] getAcceptableTokens()
+    {
+        return new int[] {
+            TokenTypes.CLASS_DEF,
+            TokenTypes.INTERFACE_DEF,
+            TokenTypes.ENUM_DEF,
+            TokenTypes.ANNOTATION_DEF,
+            TokenTypes.ANNOTATION_FIELD_DEF,
+            TokenTypes.ENUM_CONSTANT_DEF,
+            TokenTypes.PARAMETER_DEF,
+            TokenTypes.VARIABLE_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.CTOR_DEF,
+        };
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void visitToken(final DetailAST aAST)
+    {
+        final DetailAST annotation = this.getSuppressWarnings(aAST);
+
+        if (annotation == null) {
+            return;
+        }
+
+        final DetailAST warningHolder =
+            this.findWarningsHolder(annotation);
+
+        DetailAST warning = warningHolder.findFirstToken(TokenTypes.EXPR);
+
+        //rare case with empty array ex: @SuppressWarnings({})
+        if (warning == null) {
+            //check to see if empty warnings are forbidden -- are by default
+            this.logMatch(warningHolder.getLineNo(),
+                warningHolder.getColumnNo(), "");
+            return;
+        }
+
+        while (warning != null) {
+            if (warning.getType() == TokenTypes.EXPR) {
+                final DetailAST fChild = warning.getFirstChild();
+
+                //typical case
+                if (fChild.getType() == TokenTypes.STRING_LITERAL) {
+                    final String warningText =
+                        this.removeQuotes(warning.getFirstChild().getText());
+                    this.logMatch(warning.getLineNo(),
+                        warning.getColumnNo(), warningText);
+
+     //conditional case
+     //ex: @SuppressWarnings((false) ? (true) ? "unchecked" : "foo" : "unused")
+                }
+                else if (fChild.getType() == TokenTypes.QUESTION) {
+                    this.walkConditional(fChild);
+                }
+                else {
+                    assert false : "Should never get here, type: "
+                        + fChild.getType() + " text: " + fChild.getText();
+                }
+            }
+            warning = warning.getNextSibling();
+        }
+    }
+
+    /**
+     * Gets the {@link SuppressWarnings SuppressWarnings} annotation
+     * that is annotating the AST.  If the annotation does not exist
+     * this method will return {@code null}.
+     *
+     * @param aAST the AST
+     * @return the {@link SuppressWarnings SuppressWarnings} annotation
+     */
+    private DetailAST getSuppressWarnings(DetailAST aAST)
+    {
+        final DetailAST annotation = AnnotationUtility.getAnnotation(
+            aAST, SuppressWarningsCheck.SUPPRESS_WARNINGS);
+
+        return (annotation != null) ? annotation
+            : AnnotationUtility.getAnnotation(
+                aAST, SuppressWarningsCheck.FQ_SUPPRESS_WARNINGS);
+    }
+
+    /**
+     * This method looks for a warning that matches a configured expression.
+     * If found it logs a violation at the given line and column number.
+     *
+     * @param aLineNo the line number
+     * @param aColNum the column number
+     * @param aWarningText the warning.
+     */
+    private void logMatch(final int aLineNo,
+        final int aColNum, final String aWarningText)
+    {
+        final Matcher matcher = this.getRegexp().matcher(aWarningText);
+        if (matcher.matches()) {
+            this.log(aLineNo, aColNum,
+                "suppressed.warning.not.allowed", aWarningText);
+        }
+    }
+
+    /**
+     * Find the parent (holder) of the of the warnings (Expr).
+     *
+     * @param aAnnotation the annotation
+     * @return a Token representing the expr.
+     */
+    private DetailAST findWarningsHolder(final DetailAST aAnnotation)
+    {
+        final DetailAST annValuePair =
+            aAnnotation.findFirstToken(TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR);
+        final DetailAST annArrayInit;
+
+        if (annValuePair != null) {
+            annArrayInit =
+                annValuePair.findFirstToken(TokenTypes.ANNOTATION_ARRAY_INIT);
+        }
+        else {
+            annArrayInit =
+                aAnnotation.findFirstToken(TokenTypes.ANNOTATION_ARRAY_INIT);
+        }
+
+        if (annArrayInit != null) {
+            return annArrayInit;
+        }
+
+        return aAnnotation;
+    }
+
+    /**
+     * Strips a single double quote from the front and back of a string.
+     *
+     * For example:
+     * <br/>
+     * Input String = "unchecked"
+     * <br/>
+     * Output String = unchecked
+     *
+     * @param aWarning the warning string
+     * @return the string without two quotes
+     */
+    private String removeQuotes(final String aWarning)
+    {
+        assert aWarning != null : "the aWarning was null";
+        assert aWarning.charAt(0) == '"';
+        assert aWarning.charAt(aWarning.length() - 1) == '"';
+
+        return aWarning.substring(1, aWarning.length() - 1);
+    }
+
+    /**
+     * Recursively walks a conditional expression checking the left
+     * and right sides, checking for matches and
+     * logging violations.
+     *
+     * @param aCond a Conditional type
+     * {@link TokenTypes#QUESTION QUESTION}
+     */
+    private void walkConditional(final DetailAST aCond)
+    {
+        if (aCond.getType() != TokenTypes.QUESTION) {
+            final String warningText =
+                this.removeQuotes(aCond.getText());
+            this.logMatch(aCond.getLineNo(), aCond.getColumnNo(), warningText);
+            return;
+        }
+
+        this.walkConditional(this.getCondLeft(aCond));
+        this.walkConditional(this.getCondRight(aCond));
+    }
+
+    /**
+     * Retrieves the left side of a conditional.
+     *
+     * @param aCond aCond a conditional type
+     * {@link TokenTypes#QUESTION QUESTION}
+     * @return either the value
+     * or another conditional
+     */
+    private DetailAST getCondLeft(final DetailAST aCond)
+    {
+        final DetailAST colon = aCond.findFirstToken(TokenTypes.COLON);
+        return colon.getPreviousSibling();
+    }
+
+    /**
+     * Retrieves the right side of a conditional.
+     *
+     * @param aCond a conditional type
+     * {@link TokenTypes#QUESTION QUESTION}
+     * @return either the value
+     * or another conditional
+     */
+    private DetailAST getCondRight(final DetailAST aCond)
+    {
+        final DetailAST colon = aCond.findFirstToken(TokenTypes.COLON);
+        return colon.getNextSibling();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/package-info.java
new file mode 100644
index 0000000..bb8a2f9
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/package-info.java
@@ -0,0 +1,24 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the <span class="xdocspagetitle">Annotation checks</span> that are
+ * bundled with the main distribution.
+ */
+package com.puppycrawl.tools.checkstyle.checks.annotation;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/AvoidNestedBlocksCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/AvoidNestedBlocksCheck.java
new file mode 100644
index 0000000..bf9fc77
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/AvoidNestedBlocksCheck.java
@@ -0,0 +1,125 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.blocks;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * Finds nested blocks.
+ *
+ * <p>
+ * For example this Check flags confusing code like
+ * </p>
+ * <pre>
+ * public void guessTheOutput()
+ * {
+ *     int whichIsWhich = 0;
+ *     {
+ *         int whichIsWhich = 2;
+ *     }
+ *     System.out.println("value = " + whichIsWhich);
+ * }
+ * </pre>
+ *
+ * and debugging / refactoring leftovers such as
+ *
+ * <pre>
+ * // if (someOldCondition)
+ * {
+ *     System.out.println("unconditional");
+ * }
+ * </pre>
+ *
+ * <p>
+ * A case in a switch statement does not implicitly form a block.
+ * Thus to be able to introduce local variables that have case scope
+ * it is necessary to open a nested block. This is supported, set
+ * the allowInSwitchCase property to true and include all statements
+ * of the case in the block.
+ * </p>
+ *
+ * <pre>
+ * switch (a)
+ * {
+ *     case 0:
+ *         // Never OK, break outside block
+ *         {
+ *             x = 1;
+ *         }
+ *         break;
+ *     case 1:
+ *         // Never OK, statement outside block
+ *         System.out.println("Hello");
+ *         {
+ *             x = 2;
+ *             break;
+ *         }
+ *     case 1:
+ *         // OK if allowInSwitchCase is true
+ *         {
+ *             System.out.println("Hello");
+ *             x = 2;
+ *             break;
+ *         }
+ * }
+ * </pre>
+ *
+ * @author lkuehne
+ */
+public class AvoidNestedBlocksCheck extends Check
+{
+    /**
+     * Whether nested blocks are allowed if they are the
+     * only child of a switch case.
+     */
+    private boolean mAllowInSwitchCase;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.SLIST};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST parent = aAST.getParent();
+        if (parent.getType() == TokenTypes.SLIST) {
+            if (mAllowInSwitchCase
+                    && (parent.getParent().getType() == TokenTypes.CASE_GROUP)
+                    && (parent.getNumberOfChildren() == 1))
+            {
+                return;
+            }
+            log(aAST.getLineNo(), aAST.getColumnNo(), "block.nested");
+        }
+    }
+
+    /**
+     * Setter for allowInSwitchCase property.
+     * @param aAllowInSwitchCase whether nested blocks are allowed
+     *                 if they are the only child of a switch case.
+     */
+    public void setAllowInSwitchCase(boolean aAllowInSwitchCase)
+    {
+        mAllowInSwitchCase = aAllowInSwitchCase;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/BlockOption.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/BlockOption.java
new file mode 100644
index 0000000..4c54ec7
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/BlockOption.java
@@ -0,0 +1,50 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.blocks;
+
+/**
+ * Represents the policy for checking block statements.
+ * @see com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck
+ * @author Rick Giles
+ */
+public enum BlockOption
+{
+    /**
+     * Represents the policy that there is some text in the block. For example:
+     *
+     * <pre>
+     * catch (Exception ex) {
+     *     // This is a bad coding practice
+     * }
+     * </pre>
+     */
+    TEXT,
+
+    /**
+     * Represents the policy that there is a statement in the block. For
+     * example:
+     *
+     * <pre>
+     * finally {
+     *     lock.release();
+     * }
+     * </pre>
+     */
+    STMT;
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyBlockCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyBlockCheck.java
new file mode 100644
index 0000000..2aa1c6d
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyBlockCheck.java
@@ -0,0 +1,171 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.blocks;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.AbstractOptionCheck;
+
+/**
+ * Checks for empty blocks. The policy to verify is specified using the {@link
+ * BlockOption} class and defaults to {@link BlockOption#STMT}.
+ *
+ * <p> By default the check will check the following blocks:
+ *  {@link TokenTypes#LITERAL_WHILE LITERAL_WHILE},
+ *  {@link TokenTypes#LITERAL_TRY LITERAL_TRY},
+ *  {@link TokenTypes#LITERAL_CATCH LITERAL_CATCH},
+ *  {@link TokenTypes#LITERAL_FINALLY LITERAL_FINALLY},
+ *  {@link TokenTypes#LITERAL_DO LITERAL_DO},
+ *  {@link TokenTypes#LITERAL_IF LITERAL_IF},
+ *  {@link TokenTypes#LITERAL_ELSE LITERAL_ELSE},
+ *  {@link TokenTypes#LITERAL_FOR LITERAL_FOR},
+ *  {@link TokenTypes#STATIC_INIT STATIC_INIT},
+ *  {@link TokenTypes#LITERAL_SWITCH LITERAL_SWITCH}.
+ * </p>
+ *
+ * <p> An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="EmptyBlock"/>
+ * </pre>
+ *
+ * <p> An example of how to configure the check for the {@link
+ * BlockOption#TEXT} policy and only catch blocks is:
+ * </p>
+ *
+ * <pre>
+ * <module name="EmptyBlock">
+ *    <property name="tokens" value="LITERAL_CATCH"/>
+ *    <property name="option" value="text"/>
+ * </module>
+ * </pre>
+ *
+ * @author Lars K�hne
+ */
+public class EmptyBlockCheck
+    extends AbstractOptionCheck<BlockOption>
+{
+    /**
+     * Creates a new <code>EmptyBlockCheck</code> instance.
+     */
+    public EmptyBlockCheck()
+    {
+        super(BlockOption.STMT, BlockOption.class);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.LITERAL_WHILE,
+            TokenTypes.LITERAL_TRY,
+            TokenTypes.LITERAL_CATCH,
+            TokenTypes.LITERAL_FINALLY,
+            TokenTypes.LITERAL_DO,
+            TokenTypes.LITERAL_IF,
+            TokenTypes.LITERAL_ELSE,
+            TokenTypes.LITERAL_FOR,
+            TokenTypes.INSTANCE_INIT,
+            TokenTypes.STATIC_INIT,
+            TokenTypes.LITERAL_SWITCH,
+            //TODO: does this handle TokenTypes.LITERAL_SYNCHRONIZED?
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST slistToken = aAST.findFirstToken(TokenTypes.SLIST);
+        final DetailAST leftCurly = slistToken != null
+                ? slistToken : aAST.findFirstToken(TokenTypes.LCURLY);
+        if (leftCurly != null) {
+            if (getAbstractOption() == BlockOption.STMT) {
+                boolean emptyBlock;
+                if (leftCurly.getType() == TokenTypes.LCURLY) {
+                    emptyBlock = leftCurly.getNextSibling().getType() != TokenTypes.CASE_GROUP;
+                }
+                else {
+                    emptyBlock = leftCurly.getChildCount() <= 1;
+                }
+                if (emptyBlock) {
+                    log(leftCurly.getLineNo(),
+                        leftCurly.getColumnNo(),
+                        "block.noStmt",
+                        aAST.getText());
+                }
+            }
+            else if (getAbstractOption() == BlockOption.TEXT
+                    && !hasText(leftCurly))
+            {
+                log(leftCurly.getLineNo(),
+                    leftCurly.getColumnNo(),
+                    "block.empty",
+                    aAST.getText());
+            }
+        }
+    }
+
+    /**
+     * @param aSlistAST a <code>DetailAST</code> value
+     * @return whether the SLIST token contains any text.
+     */
+    protected boolean hasText(final DetailAST aSlistAST)
+    {
+        boolean retVal = false;
+
+        final DetailAST rightCurly = aSlistAST.findFirstToken(TokenTypes.RCURLY);
+        final DetailAST rcurlyAST = rightCurly != null
+                ? rightCurly : aSlistAST.getParent().findFirstToken(TokenTypes.RCURLY);
+        if (rcurlyAST != null) {
+            final int slistLineNo = aSlistAST.getLineNo();
+            final int slistColNo = aSlistAST.getColumnNo();
+            final int rcurlyLineNo = rcurlyAST.getLineNo();
+            final int rcurlyColNo = rcurlyAST.getColumnNo();
+            final String[] lines = getLines();
+            if (slistLineNo == rcurlyLineNo) {
+                // Handle braces on the same line
+                final String txt = lines[slistLineNo - 1]
+                    .substring(slistColNo + 1, rcurlyColNo);
+                if (txt.trim().length() != 0) {
+                    retVal = true;
+                }
+            }
+            else {
+                // check only whitespace of first & last lines
+                if ((lines[slistLineNo - 1]
+                     .substring(slistColNo + 1).trim().length() != 0)
+                    || (lines[rcurlyLineNo - 1]
+                        .substring(0, rcurlyColNo).trim().length() != 0))
+                {
+                    retVal = true;
+                }
+                else {
+                    // check if all lines are also only whitespace
+                    for (int i = slistLineNo; i < (rcurlyLineNo - 1); i++) {
+                        if (lines[i].trim().length() > 0) {
+                            retVal = true;
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+        return retVal;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheck.java
new file mode 100644
index 0000000..c0f34d1
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheck.java
@@ -0,0 +1,338 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.blocks;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import com.puppycrawl.tools.checkstyle.checks.AbstractOptionCheck;
+
+/**
+ * <p>
+ * Checks the placement of left curly braces on types, methods and
+ * other blocks:
+ *  {@link  TokenTypes#LITERAL_CATCH LITERAL_CATCH},  {@link
+ * TokenTypes#LITERAL_DO LITERAL_DO},  {@link TokenTypes#LITERAL_ELSE
+ * LITERAL_ELSE},  {@link TokenTypes#LITERAL_FINALLY LITERAL_FINALLY},  {@link
+ * TokenTypes#LITERAL_FOR LITERAL_FOR},  {@link TokenTypes#LITERAL_IF
+ * LITERAL_IF},  {@link TokenTypes#LITERAL_SWITCH LITERAL_SWITCH},  {@link
+ * TokenTypes#LITERAL_SYNCHRONIZED LITERAL_SYNCHRONIZED},  {@link
+ * TokenTypes#LITERAL_TRY LITERAL_TRY},  {@link TokenTypes#LITERAL_WHILE
+ * LITERAL_WHILE}.
+ * </p>
+ *
+ * <p>
+ * The policy to verify is specified using the {@link LeftCurlyOption} class and
+ * defaults to {@link LeftCurlyOption#EOL}. Policies {@link LeftCurlyOption#EOL}
+ * and {@link LeftCurlyOption#NLOW} take into account property maxLineLength.
+ * The default value for maxLineLength is 80.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="LeftCurly"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check with policy
+ * {@link LeftCurlyOption#NLOW} and maxLineLength 120 is:
+ * </p>
+ * <pre>
+ * <module name="LeftCurly">
+ *      <property name="option"
+ * value="nlow"/>     <property name="maxLineLength" value="120"/> <
+ * /module>
+ * </pre>
+ * <p>
+ * An example of how to configure the check to validate enum definitions:
+ * </p>
+ * <pre>
+ * <module name="LeftCurly">
+ *      <property name="ignoreEnums" value="false"/>
+ * </module>
+ * </pre>
+ *
+ * @author Oliver Burn
+ * @author lkuehne
+ * @author maxvetrenko
+ * @version 1.0
+ */
+public class LeftCurlyCheck
+    extends AbstractOptionCheck<LeftCurlyOption>
+{
+    /** default maximum line length */
+    private static final int DEFAULT_MAX_LINE_LENGTH = 80;
+
+    /** TODO: replace this ugly hack **/
+    private int mMaxLineLength = DEFAULT_MAX_LINE_LENGTH;
+
+    /** If true, Check will ignore enums*/
+    private boolean mIgnoreEnums = true;
+
+    /**
+     * Creates a default instance and sets the policy to EOL.
+     */
+    public LeftCurlyCheck()
+    {
+        super(LeftCurlyOption.EOL, LeftCurlyOption.class);
+    }
+
+    /**
+     * Sets the maximum line length used in calculating the placement of the
+     * left curly brace.
+     * @param aMaxLineLength the max allowed line length
+     */
+    public void setMaxLineLength(int aMaxLineLength)
+    {
+        mMaxLineLength = aMaxLineLength;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.INTERFACE_DEF,
+            TokenTypes.CLASS_DEF,
+            TokenTypes.ANNOTATION_DEF,
+            TokenTypes.ENUM_DEF,
+            TokenTypes.CTOR_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.ENUM_CONSTANT_DEF,
+            TokenTypes.LITERAL_WHILE,
+            TokenTypes.LITERAL_TRY,
+            TokenTypes.LITERAL_CATCH,
+            TokenTypes.LITERAL_FINALLY,
+            TokenTypes.LITERAL_SYNCHRONIZED,
+            TokenTypes.LITERAL_SWITCH,
+            TokenTypes.LITERAL_DO,
+            TokenTypes.LITERAL_IF,
+            TokenTypes.LITERAL_ELSE,
+            TokenTypes.LITERAL_FOR,
+            // TODO: need to handle....
+            //TokenTypes.STATIC_INIT,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST startToken;
+        final DetailAST brace;
+
+        switch (aAST.getType()) {
+        case TokenTypes.CTOR_DEF :
+        case TokenTypes.METHOD_DEF :
+            startToken = skipAnnotationOnlyLines(aAST);
+            brace = aAST.findFirstToken(TokenTypes.SLIST);
+            break;
+
+        case TokenTypes.INTERFACE_DEF :
+        case TokenTypes.CLASS_DEF :
+        case TokenTypes.ANNOTATION_DEF :
+        case TokenTypes.ENUM_DEF :
+        case TokenTypes.ENUM_CONSTANT_DEF :
+            startToken = skipAnnotationOnlyLines(aAST);
+            final DetailAST objBlock = aAST.findFirstToken(TokenTypes.OBJBLOCK);
+            brace = (objBlock == null)
+                ? null
+                : (DetailAST) objBlock.getFirstChild();
+            break;
+
+        case TokenTypes.LITERAL_WHILE:
+        case TokenTypes.LITERAL_CATCH:
+        case TokenTypes.LITERAL_SYNCHRONIZED:
+        case TokenTypes.LITERAL_FOR:
+        case TokenTypes.LITERAL_TRY:
+        case TokenTypes.LITERAL_FINALLY:
+        case TokenTypes.LITERAL_DO:
+        case TokenTypes.LITERAL_IF :
+            startToken = aAST;
+            brace = aAST.findFirstToken(TokenTypes.SLIST);
+            break;
+
+        case TokenTypes.LITERAL_ELSE :
+            startToken = aAST;
+            final DetailAST candidate = aAST.getFirstChild();
+            brace =
+                (candidate.getType() == TokenTypes.SLIST)
+                ? candidate
+                : null; // silently ignore
+            break;
+
+        case TokenTypes.LITERAL_SWITCH :
+            startToken = aAST;
+            brace = aAST.findFirstToken(TokenTypes.LCURLY);
+            break;
+
+        default :
+            startToken = null;
+            brace = null;
+        }
+
+        if ((brace != null) && (startToken != null)) {
+            verifyBrace(brace, startToken);
+        }
+    }
+
+    /**
+     * Skip lines that only contain <code>TokenTypes.ANNOTATION</code>s.
+     * If the received <code>DetailAST</code>
+     * has annotations within its modifiers then first token on the line
+     * of the first token afer all annotations is return. This might be
+     * an annotation.
+     * Otherwise, the received <code>DetailAST</code> is returned.
+     * @param aAST <code>DetailAST</code>.
+     * @return <code>DetailAST</code>.
+     */
+    private DetailAST skipAnnotationOnlyLines(DetailAST aAST)
+    {
+        final DetailAST modifiers = aAST.findFirstToken(TokenTypes.MODIFIERS);
+        if (modifiers == null) {
+            return aAST;
+        }
+        DetailAST lastAnnot = findLastAnnotation(modifiers);
+        if (lastAnnot == null) {
+            // There are no annotations.
+            return aAST;
+        }
+        final DetailAST tokenAfterLast = lastAnnot.getNextSibling() != null
+                                       ? lastAnnot.getNextSibling()
+                                       : modifiers.getNextSibling();
+        if (tokenAfterLast.getLineNo() > lastAnnot.getLineNo()) {
+            return tokenAfterLast;
+        }
+        final int lastAnnotLineNumber = lastAnnot.getLineNo();
+        while (lastAnnot.getPreviousSibling() != null
+               && (lastAnnot.getPreviousSibling().getLineNo()
+                    == lastAnnotLineNumber))
+        {
+            lastAnnot = lastAnnot.getPreviousSibling();
+        }
+        return lastAnnot;
+    }
+
+    /**
+     * Find the last token of type <code>TokenTypes.ANNOTATION</code>
+     * under the given set of modifiers.
+     * @param aModifiers <code>DetailAST</code>.
+     * @return <code>DetailAST</code> or null if there are no annotations.
+     */
+    private DetailAST findLastAnnotation(DetailAST aModifiers)
+    {
+        DetailAST aAnnot = aModifiers.findFirstToken(TokenTypes.ANNOTATION);
+        while (aAnnot != null && aAnnot.getNextSibling() != null
+               && aAnnot.getNextSibling().getType() == TokenTypes.ANNOTATION)
+        {
+            aAnnot = aAnnot.getNextSibling();
+        }
+        return aAnnot;
+    }
+
+    /**
+     * Verifies that a specified left curly brace is placed correctly
+     * according to policy.
+     * @param aBrace token for left curly brace
+     * @param aStartToken token for start of expression
+     */
+    private void verifyBrace(final DetailAST aBrace,
+                             final DetailAST aStartToken)
+    {
+        final String braceLine = getLines()[aBrace.getLineNo() - 1];
+
+        // calculate the previous line length without trailing whitespace. Need
+        // to handle the case where there is no previous line, cause the line
+        // being check is the first line in the file.
+        final int prevLineLen = (aBrace.getLineNo() == 1)
+            ? mMaxLineLength
+            : Utils.lengthMinusTrailingWhitespace(
+                getLines()[aBrace.getLineNo() - 2]);
+
+        // Check for being told to ignore, or have '{}' which is a special case
+        if ((braceLine.length() > (aBrace.getColumnNo() + 1))
+            && (braceLine.charAt(aBrace.getColumnNo() + 1) == '}'))
+        {
+            ; // ignore
+        }
+        else if (getAbstractOption() == LeftCurlyOption.NL) {
+            if (!Utils.whitespaceBefore(aBrace.getColumnNo(), braceLine)) {
+                log(aBrace.getLineNo(), aBrace.getColumnNo(),
+                    "line.new", "{");
+            }
+        }
+        else if (getAbstractOption() == LeftCurlyOption.EOL) {
+            if (Utils.whitespaceBefore(aBrace.getColumnNo(), braceLine)
+                && ((prevLineLen + 2) <= mMaxLineLength))
+            {
+                log(aBrace.getLineNo(), aBrace.getColumnNo(),
+                    "line.previous", "{");
+            }
+            if (!hasLineBreakAfter(aBrace)) {
+                log(aBrace.getLineNo(), aBrace.getColumnNo(), "line.break.after");
+            }
+        }
+        else if (getAbstractOption() == LeftCurlyOption.NLOW) {
+            if (aStartToken.getLineNo() == aBrace.getLineNo()) {
+                ; // all ok as on the same line
+            }
+            else if ((aStartToken.getLineNo() + 1) == aBrace.getLineNo()) {
+                if (!Utils.whitespaceBefore(aBrace.getColumnNo(), braceLine)) {
+                    log(aBrace.getLineNo(), aBrace.getColumnNo(),
+                        "line.new", "{");
+                }
+                else if ((prevLineLen + 2) <= mMaxLineLength) {
+                    log(aBrace.getLineNo(), aBrace.getColumnNo(),
+                        "line.previous", "{");
+                }
+            }
+            else if (!Utils.whitespaceBefore(aBrace.getColumnNo(), braceLine)) {
+                log(aBrace.getLineNo(), aBrace.getColumnNo(),
+                    "line.new", "{");
+            }
+        }
+    }
+
+    /**
+     * Checks if left curly has line break after.
+     * @param aLeftCurly
+     *        Left curly token.
+     * @return
+     *        True, left curly has line break after.
+     */
+    private boolean hasLineBreakAfter(DetailAST aLeftCurly)
+    {
+        DetailAST nextToken = null;
+        if (aLeftCurly.getType() == TokenTypes.SLIST) {
+            nextToken = aLeftCurly.getFirstChild();
+        }
+        else {
+            if (aLeftCurly.getParent().getParent().getType() == TokenTypes.ENUM_DEF)
+            {
+                if (!mIgnoreEnums) {
+                    nextToken = aLeftCurly.getNextSibling();
+                }
+            }
+        }
+        if (nextToken != null && nextToken.getType() != TokenTypes.RCURLY) {
+            if (aLeftCurly.getLineNo() == nextToken.getLineNo()) {
+                return false;
+            }
+        }
+        return true;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyOption.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyOption.java
new file mode 100644
index 0000000..ccd2eb0
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyOption.java
@@ -0,0 +1,74 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.blocks;
+
+/**
+ * Represents the options for placing the left curly brace <code>'{'</code>.
+ *
+ * @author Oliver Burn
+ * @version 1
+ */
+public enum LeftCurlyOption
+{
+    /**
+     * Represents the policy for placing the brace at the end of line. For
+     * example:
+     * <pre>
+     * if (condition) {
+     *     ...
+     * </pre>
+     **/
+    EOL,
+
+    /**
+     * Represents the policy that if the brace will fit on the first line of
+     * the statement, taking into account maximum line length, then apply
+     * <code>EOL</code> rule. Otherwise apply the <code>NL</code>
+     * rule. <code>NLOW</code> is a mnemonic for "new line on wrap".
+     *
+     * <p> For the example above Checkstyle will enforce:
+     *
+     * <pre>
+     * if (condition) {
+     *     ...
+     * </pre>
+     *
+     * But for a statement spanning multiple lines, Checkstyle will enforce:
+     *
+     * <pre>
+     * if (condition1 && condition2 &&
+     *     condition3 && condition4)
+     * {
+     *     ...
+     * </pre>
+     *
+     **/
+    NLOW,
+
+    /**
+     * Represents the policy that the brace must always be on a new line. For
+     * example:
+     * <pre>
+     * if (condition)
+     * {
+     *     ...
+     * </pre>
+     */
+    NL;
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheck.java
new file mode 100644
index 0000000..47fedd6
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheck.java
@@ -0,0 +1,84 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.blocks;
+
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks for braces around code blocks.
+ * </p>
+ * <p> By default the check will check the following blocks:
+ *  {@link TokenTypes#LITERAL_DO LITERAL_DO},
+ *  {@link TokenTypes#LITERAL_ELSE LITERAL_ELSE},
+ *  {@link TokenTypes#LITERAL_FOR LITERAL_FOR},
+ *  {@link TokenTypes#LITERAL_IF LITERAL_IF},
+ *  {@link TokenTypes#LITERAL_WHILE LITERAL_WHILE}.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="NeedBraces"/>
+ * </pre>
+ * <p> An example of how to configure the check for <code>if</code> and
+ * <code>else</code> blocks is:
+ * </p>
+ * <pre>
+ * <module name="NeedBraces">
+ *     <property name="tokens" value="LITERAL_IF, LITERAL_ELSE"/>
+ * </module>
+ * </pre>
+ *
+ * @author Rick Giles
+ * @version 1.0
+ */
+public class NeedBracesCheck extends Check
+{
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.LITERAL_DO,
+            TokenTypes.LITERAL_ELSE,
+            TokenTypes.LITERAL_FOR,
+            TokenTypes.LITERAL_IF,
+            TokenTypes.LITERAL_WHILE,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST slistAST = aAST.findFirstToken(TokenTypes.SLIST);
+        boolean isElseIf = false;
+        if ((aAST.getType() == TokenTypes.LITERAL_ELSE)
+            && (aAST.findFirstToken(TokenTypes.LITERAL_IF) != null))
+        {
+            isElseIf = true;
+        }
+        if ((slistAST == null) && !isElseIf) {
+            log(aAST.getLineNo(), "needBraces", aAST.getText());
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheck.java
new file mode 100644
index 0000000..fdb0411
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheck.java
@@ -0,0 +1,296 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.blocks;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import com.puppycrawl.tools.checkstyle.checks.AbstractOptionCheck;
+import com.puppycrawl.tools.checkstyle.checks.CheckUtils;
+
+/**
+ * <p>
+ * Checks the placement of right curly braces.
+ * The policy to verify is specified using the {@link RightCurlyOption} class
+ * and defaults to {@link RightCurlyOption#SAME}.
+ * </p>
+ * <p> By default the check will check the following tokens:
+ *  {@link TokenTypes#LITERAL_TRY LITERAL_TRY},
+ *  {@link TokenTypes#LITERAL_CATCH LITERAL_CATCH},
+ *  {@link TokenTypes#LITERAL_FINALLY LITERAL_FINALLY},
+ *  {@link TokenTypes#LITERAL_IF LITERAL_IF},
+ *  {@link TokenTypes#LITERAL_ELSE LITERAL_ELSE}.
+ * Other acceptable tokens are:
+ *  {@link TokenTypes#CLASS_DEF CLASS_DEF},
+ *  {@link TokenTypes#METHOD_DEF METHOD_DEF},
+ *  {@link TokenTypes#CTOR_DEF CTOR_DEF}.
+ *  {@link TokenTypes#LITERAL_FOR LITERAL_FOR}.
+ *  {@link TokenTypes#LITERAL_WHILE LITERAL_WHILE}.
+ *  {@link TokenTypes#LITERAL_DO LITERAL_DO}.
+ *  {@link TokenTypes#STATIC_INIT STATIC_INIT}.
+ *  {@link TokenTypes#INSTANCE_INIT INSTANCE_INIT}.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="RightCurly"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check with policy
+ * {@link RightCurlyOption#ALONE} for <code>else</code> and
+ * <code>{@link TokenTypes#METHOD_DEF METHOD_DEF}</code>tokens is:
+ * </p>
+ * <pre>
+ * <module name="RightCurly">
+ *     <property name="tokens" value="LITERAL_ELSE"/>
+ *     <property name="option" value="alone"/>
+ * </module>
+ * </pre>
+ *
+ * @author Oliver Burn
+ * @author lkuehne
+ * @author o_sukhodolsky
+ * @author maxvetrenko
+ * @version 2.0
+ */
+public class RightCurlyCheck extends AbstractOptionCheck<RightCurlyOption>
+{
+    /** Do we need to check if rculry starts line. */
+    private boolean mShouldStartLine = true;
+
+    /**
+     * Sets the right curly option to same.
+     */
+    public RightCurlyCheck()
+    {
+        super(RightCurlyOption.SAME, RightCurlyOption.class);
+    }
+
+    /**
+     * Does the check need to check if rcurly starts line.
+     * @param aFlag new value of this property.
+     */
+    public void setShouldStartLine(boolean aFlag)
+    {
+        mShouldStartLine = aFlag;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.LITERAL_TRY,
+            TokenTypes.LITERAL_CATCH,
+            TokenTypes.LITERAL_FINALLY,
+            TokenTypes.LITERAL_IF,
+            TokenTypes.LITERAL_ELSE,
+        };
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return new int[] {
+            TokenTypes.LITERAL_TRY,
+            TokenTypes.LITERAL_CATCH,
+            TokenTypes.LITERAL_FINALLY,
+            TokenTypes.LITERAL_IF,
+            TokenTypes.LITERAL_ELSE,
+            TokenTypes.CLASS_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.CTOR_DEF,
+            TokenTypes.LITERAL_FOR,
+            TokenTypes.LITERAL_WHILE,
+            TokenTypes.LITERAL_DO,
+            TokenTypes.STATIC_INIT,
+            TokenTypes.INSTANCE_INIT,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        // Attempt to locate the tokens to do the check
+        DetailAST rcurly;
+        DetailAST lcurly;
+        DetailAST nextToken;
+        boolean shouldCheckLastRcurly = false;
+
+        switch (aAST.getType()) {
+        case TokenTypes.LITERAL_TRY:
+            lcurly = aAST.getFirstChild();
+            nextToken = lcurly.getNextSibling();
+            rcurly = lcurly.getLastChild();
+            break;
+        case TokenTypes.LITERAL_CATCH:
+            nextToken = aAST.getNextSibling();
+            lcurly = aAST.getLastChild();
+            rcurly = lcurly.getLastChild();
+            if (nextToken == null) {
+                shouldCheckLastRcurly = true;
+                nextToken = getNextToken(aAST);
+            }
+            break;
+        case TokenTypes.LITERAL_IF:
+            nextToken = aAST.findFirstToken(TokenTypes.LITERAL_ELSE);
+            if (nextToken != null) {
+                lcurly = nextToken.getPreviousSibling();
+                rcurly = lcurly.getLastChild();
+            }
+            else {
+                shouldCheckLastRcurly = true;
+                nextToken = getNextToken(aAST);
+                lcurly = aAST.getLastChild();
+                rcurly = lcurly.getLastChild();
+            }
+            break;
+        case TokenTypes.LITERAL_ELSE:
+            shouldCheckLastRcurly = true;
+            nextToken = getNextToken(aAST);
+            lcurly = aAST.getFirstChild();
+            rcurly = lcurly.getLastChild();
+            break;
+        case TokenTypes.LITERAL_FINALLY:
+            shouldCheckLastRcurly = true;
+            nextToken = getNextToken(aAST);
+            lcurly = aAST.getFirstChild();
+            rcurly = lcurly.getLastChild();
+            break;
+        case TokenTypes.CLASS_DEF:
+            final DetailAST child = aAST.getLastChild();
+            lcurly = child.getFirstChild();
+            rcurly = child.getLastChild();
+            nextToken = aAST;
+            break;
+        case TokenTypes.CTOR_DEF:
+        case TokenTypes.STATIC_INIT:
+        case TokenTypes.INSTANCE_INIT:
+            lcurly = aAST.findFirstToken(TokenTypes.SLIST);
+            rcurly = lcurly.getLastChild();
+            nextToken = aAST;
+            break;
+        case TokenTypes.METHOD_DEF:
+        case TokenTypes.LITERAL_FOR:
+        case TokenTypes.LITERAL_WHILE:
+        case TokenTypes.LITERAL_DO:
+            lcurly = aAST.findFirstToken(TokenTypes.SLIST);
+            //SLIST could be absent if method is abstract, and code like "while(true);"
+            if (lcurly == null) {
+                return;
+            }
+            rcurly = lcurly.getLastChild();
+            nextToken = aAST;
+            break;
+        default:
+            throw new RuntimeException("Unexpected token type ("
+                    + TokenTypes.getTokenName(aAST.getType()) + ")");
+        }
+
+        if ((rcurly == null) || (rcurly.getType() != TokenTypes.RCURLY)) {
+            // we need to have both tokens to perform the check
+            return;
+        }
+
+        if (getAbstractOption() == RightCurlyOption.SAME && !hasLineBreakBefore(rcurly)) {
+            log(rcurly, "line.break.before");
+        }
+
+        if (shouldCheckLastRcurly) {
+            if (rcurly.getLineNo() == nextToken.getLineNo()) {
+                log(rcurly, "line.alone", "}");
+            }
+        }
+        else if ((getAbstractOption() == RightCurlyOption.SAME)
+                && (rcurly.getLineNo() != nextToken.getLineNo()))
+        {
+            log(rcurly, "line.same", "}");
+        }
+        else if ((getAbstractOption() == RightCurlyOption.ALONE)
+                && (rcurly.getLineNo() == nextToken.getLineNo())
+                && !isEmptyBody(lcurly))
+        {
+            log(rcurly, "line.alone", "}");
+        }
+
+        if (!mShouldStartLine) {
+            return;
+        }
+        final boolean startsLine =
+                Utils.whitespaceBefore(rcurly.getColumnNo(),
+                        getLines()[rcurly.getLineNo() - 1]);
+
+        if (!startsLine && (lcurly.getLineNo() != rcurly.getLineNo())) {
+            log(rcurly, "line.new", "}");
+        }
+    }
+
+    /**
+     * Checks if definition body is empty.
+     * @param aLcurly left curly.
+     * @return true if definition body is empty.
+     */
+    private boolean isEmptyBody(DetailAST aLcurly)
+    {
+        boolean result = false;
+        if (aLcurly.getParent().getType() == TokenTypes.OBJBLOCK) {
+            if (aLcurly.getNextSibling().getType() == TokenTypes.RCURLY) {
+                result = true;
+            }
+        }
+        else if (aLcurly.getFirstChild().getType() == TokenTypes.RCURLY) {
+            result = true;
+        }
+        return result;
+    }
+
+    /**
+     * Finds next token after the given one.
+     * @param aAST the given node.
+     * @return the token which represents next lexical item.
+     */
+    private DetailAST getNextToken(DetailAST aAST)
+    {
+        DetailAST next = null;
+        DetailAST parent = aAST;
+        while ((parent != null) && (next == null)) {
+            next = parent.getNextSibling();
+            parent = parent.getParent();
+        }
+        return CheckUtils.getFirstNode(next);
+    }
+
+    /**
+     * Checks if right curly has line break before.
+     * @param aRightCurly
+     *        Right curly token.
+     * @return
+     *        True, if right curly has line break before.
+     */
+    private boolean hasLineBreakBefore(DetailAST aRightCurly)
+    {
+        if (aRightCurly != null) {
+            final DetailAST previousToken = aRightCurly.getPreviousSibling();
+            if (previousToken != null && aRightCurly.getLineNo() == previousToken.getLineNo()) {
+                return false;
+            }
+        }
+        return true;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyOption.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyOption.java
new file mode 100644
index 0000000..09ac3d9
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyOption.java
@@ -0,0 +1,53 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.blocks;
+
+/**
+ * Represents the options for placing the right curly brace <code>'}'</code>.
+ *
+ * @author Oliver Burn
+ * @version 1
+ */
+public enum RightCurlyOption
+{
+    /**
+     * Represents the policy that the brace must be alone on the line. For
+     * example:
+     *
+     * <pre>
+     * try {
+     *     ...
+     * }
+     * finally {
+     * </pre>
+     **/
+    ALONE,
+
+    /**
+     * Represents the policy that the brace must be on the same line as the
+     * next statement. For example:
+     *
+     * <pre>
+     * try {
+     *     ...
+     * } finally {
+     * </pre>
+     **/
+    SAME;
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/package-info.java
new file mode 100644
index 0000000..cf4f39e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/package-info.java
@@ -0,0 +1,24 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the <span class="xdocspagetitle">Block checks</span> that are
+ * bundled with the main distribution.
+ */
+package com.puppycrawl.tools.checkstyle.checks.blocks;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractIllegalCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractIllegalCheck.java
new file mode 100644
index 0000000..7fde17f
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractIllegalCheck.java
@@ -0,0 +1,76 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import java.util.Set;
+
+/**
+ * Support for checks that look for usage of illegal types.
+ * @author Oliver Burn
+ */
+public abstract class AbstractIllegalCheck extends Check
+{
+    /** Illegal class names */
+    private final Set<String> mIllegalClassNames = Sets.newHashSet();
+
+    /**
+     * Constructs an object.
+     * @param aInitialNames the initial class names to treat as illegal
+     */
+    protected AbstractIllegalCheck(final String[] aInitialNames)
+    {
+        assert aInitialNames != null;
+        setIllegalClassNames(aInitialNames);
+    }
+
+    /**
+     * Checks if given class is illegal.
+     *
+     * @param aIdent
+     *            ident to check.
+     * @return true if given ident is illegal.
+     */
+    protected final boolean isIllegalClassName(final String aIdent)
+    {
+        return mIllegalClassNames.contains(aIdent);
+    }
+
+    /**
+     * Set the list of illegal classes.
+     *
+     * @param aClassNames
+     *            array of illegal exception classes
+     */
+    public final void setIllegalClassNames(final String[] aClassNames)
+    {
+        assert aClassNames != null;
+        mIllegalClassNames.clear();
+        for (final String name : aClassNames) {
+            mIllegalClassNames.add(name);
+            final int lastDot = name.lastIndexOf(".");
+            if ((lastDot > 0) && (lastDot < (name.length() - 1))) {
+                final String shortName = name
+                        .substring(name.lastIndexOf(".") + 1);
+                mIllegalClassNames.add(shortName);
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractIllegalMethodCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractIllegalMethodCheck.java
new file mode 100644
index 0000000..c7c477b
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractIllegalMethodCheck.java
@@ -0,0 +1,71 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Provide support for checking for a method with a specified name and no
+ * arguments.
+ * @author Oliver Burn
+ */
+public abstract class AbstractIllegalMethodCheck extends Check
+{
+    /** Name of method to disallow. */
+    private final String mMethodName;
+    /** The error key to report with. */
+    private final String mErrorKey;
+
+    /**
+     * Creates an instance.
+     * @param aMethodName name of the method to disallow.
+     * @param aErrorKey the error key to report with.
+     */
+    public AbstractIllegalMethodCheck(String aMethodName, String aErrorKey)
+    {
+        mMethodName = aMethodName;
+        mErrorKey = aErrorKey;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.METHOD_DEF};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST mid = aAST.findFirstToken(TokenTypes.IDENT);
+        final String methodName = mid.getText();
+
+        if (mMethodName.equals(methodName)) {
+
+            final DetailAST params = aAST.findFirstToken(TokenTypes.PARAMETERS);
+            final boolean hasEmptyParamList =
+                !params.branchContains(TokenTypes.PARAMETER_DEF);
+
+            if (hasEmptyParamList) {
+                log(aAST.getLineNo(), mErrorKey);
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractNestedDepthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractNestedDepthCheck.java
new file mode 100644
index 0000000..b5852f8
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractNestedDepthCheck.java
@@ -0,0 +1,93 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * Abstract class which provides helpers functionality for nestedchecks.
+ *
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ */
+public abstract class AbstractNestedDepthCheck extends Check
+{
+    /** maximum allowed nesting depth */
+    private int mMax;
+    /** curren nesting depth */
+    private int mDepth;
+
+    /**
+     * Creates new instance of checks.
+     * @param aMax default allowed nesting depth.
+     */
+    public AbstractNestedDepthCheck(int aMax)
+    {
+        setMax(aMax);
+    }
+
+    @Override
+    public final int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        mDepth = 0;
+    }
+
+    /**
+     * Getter for maximum allowed nesting depth.
+     * @return maximum allowed nesting depth.
+     */
+    public final int getMax()
+    {
+        return mMax;
+    }
+
+    /**
+     * Setter for maximum allowed nesting depth.
+     * @param aMax maximum allowed nesting depth.
+     */
+    public final void setMax(int aMax)
+    {
+        mMax = aMax;
+    }
+
+    /**
+     * Increasing current nesting depth.
+     * @param aAST note which increases nesting.
+     * @param aMessageId message id for logging error.
+     */
+    protected final void nestIn(DetailAST aAST, String aMessageId)
+    {
+        if (mDepth > mMax) {
+            log(aAST, aMessageId, mDepth, mMax);
+        }
+        ++mDepth;
+    }
+
+    /** Decreasing current nesting depth */
+    protected final void nestOut()
+    {
+        --mDepth;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractSuperCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractSuperCheck.java
new file mode 100644
index 0000000..b93fab5
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AbstractSuperCheck.java
@@ -0,0 +1,223 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import antlr.collections.AST;
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import java.util.LinkedList;
+
+/**
+ * <p>
+ * Abstract class for checking that an overriding method with no parameters
+ * invokes the super method.
+ * </p>
+ * @author Rick Giles
+ */
+public abstract class AbstractSuperCheck
+        extends Check
+{
+    /**
+     * Stack node for a method definition and a record of
+     * whether the method has a call to the super method.
+     * @author Rick Giles
+     */
+    private static class MethodNode
+    {
+        /** method definition */
+        private final DetailAST mMethod;
+
+        /** true if the overriding method calls the super method */
+        private boolean mCallsSuper;
+
+        /**
+         * Constructs a stack node for a method definition.
+         * @param aAST AST for the method definition.
+         */
+        public MethodNode(DetailAST aAST)
+        {
+            mMethod = aAST;
+            mCallsSuper = false;
+        }
+
+        /**
+         * Records that the overriding method has a call to the super method.
+         */
+        public void setCallsSuper()
+        {
+            mCallsSuper = true;
+        }
+
+        /**
+         * Determines whether the overriding method has a call to the super
+         * method.
+         * @return true if the overriding method has a call to the super
+         * method.
+         */
+        public boolean getCallsSuper()
+        {
+            return mCallsSuper;
+        }
+
+        /**
+         * Returns the overriding method definition AST.
+         * @return the overriding method definition AST.
+         */
+        public DetailAST getMethod()
+        {
+            return mMethod;
+        }
+    }
+
+    /** stack of methods */
+    private final LinkedList<MethodNode> mMethodStack = Lists.newLinkedList();
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.METHOD_DEF,
+            TokenTypes.LITERAL_SUPER,
+        };
+    }
+
+    /**
+     * Returns the name of the overriding method.
+     * @return the name of the overriding method.
+     */
+    protected abstract String getMethodName();
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        mMethodStack.clear();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (isOverridingMethod(aAST)) {
+            mMethodStack.add(new MethodNode(aAST));
+        }
+        else if (isSuperCall(aAST)) {
+            final MethodNode methodNode = mMethodStack.getLast();
+            methodNode.setCallsSuper();
+        }
+    }
+
+    /**
+     *  Determines whether a 'super' literal is a call to the super method
+     * for this check.
+     * @param aAST the AST node of a 'super' literal.
+     * @return true if aAST is a call to the super method
+     * for this check.
+     */
+    private boolean isSuperCall(DetailAST aAST)
+    {
+        if (aAST.getType() != TokenTypes.LITERAL_SUPER) {
+            return false;
+        }
+        // dot operator?
+        DetailAST parent = aAST.getParent();
+        if ((parent == null) || (parent.getType() != TokenTypes.DOT)) {
+            return false;
+        }
+
+        // same name of method
+        AST sibling = aAST.getNextSibling();
+        // ignore type parameters
+        if ((sibling != null)
+            && (sibling.getType() == TokenTypes.TYPE_ARGUMENTS))
+        {
+            sibling = sibling.getNextSibling();
+        }
+        if ((sibling == null) || (sibling.getType() != TokenTypes.IDENT)) {
+            return false;
+        }
+        final String name = sibling.getText();
+        if (!getMethodName().equals(name)) {
+            return false;
+        }
+
+        // 0 parameters?
+        final DetailAST args = parent.getNextSibling();
+        if ((args == null) || (args.getType() != TokenTypes.ELIST)) {
+            return false;
+        }
+        if (args.getChildCount() != 0) {
+            return false;
+        }
+
+        // in an overriding method for this check?
+        while (parent != null) {
+            if (parent.getType() == TokenTypes.METHOD_DEF) {
+                return isOverridingMethod(parent);
+            }
+            else if ((parent.getType() == TokenTypes.CTOR_DEF)
+                || (parent.getType() == TokenTypes.INSTANCE_INIT))
+            {
+                return false;
+            }
+            parent = parent.getParent();
+        }
+        return false;
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        if (isOverridingMethod(aAST)) {
+            final MethodNode methodNode =
+                mMethodStack.removeLast();
+            if (!methodNode.getCallsSuper()) {
+                final DetailAST methodAST = methodNode.getMethod();
+                final DetailAST nameAST =
+                    methodAST.findFirstToken(TokenTypes.IDENT);
+                log(nameAST.getLineNo(), nameAST.getColumnNo(),
+                    "missing.super.call", nameAST.getText());
+            }
+        }
+    }
+
+    /**
+     * Determines whether an AST is a method definition for this check,
+     * with 0 parameters.
+     * @param aAST the method definition AST.
+     * @return true if the method of aAST is a method for this check.
+     */
+    private boolean isOverridingMethod(DetailAST aAST)
+    {
+        if ((aAST.getType() != TokenTypes.METHOD_DEF)
+            || ScopeUtils.inInterfaceOrAnnotationBlock(aAST))
+        {
+            return false;
+        }
+        final DetailAST nameAST = aAST.findFirstToken(TokenTypes.IDENT);
+        final String name = nameAST.getText();
+        if (!getMethodName().equals(name)) {
+            return false;
+        }
+        final DetailAST params = aAST.findFirstToken(TokenTypes.PARAMETERS);
+        return (params.getChildCount() == 0);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ArrayTrailingCommaCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ArrayTrailingCommaCheck.java
new file mode 100644
index 0000000..174efbb
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ArrayTrailingCommaCheck.java
@@ -0,0 +1,67 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * <p>
+ * Checks if array initialization contains optional trailing comma.
+ * </p>
+ * <p>
+ * Rationale: Putting this comma in make is easier to change the
+ * order of the elements or add new elements on the end.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="ArrayTrailingComma"/>
+ * </pre>
+ * @author o_sukhodolsky
+ */
+public class ArrayTrailingCommaCheck extends Check
+{
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.ARRAY_INIT};
+    }
+
+    @Override
+    public void visitToken(DetailAST aArrayInit)
+    {
+        final DetailAST rcurly = aArrayInit.findFirstToken(TokenTypes.RCURLY);
+
+        // if curlys are on the same line
+        // or array is empty then check nothing
+        if ((aArrayInit.getLineNo() == rcurly.getLineNo())
+            || (aArrayInit.getChildCount() == 1))
+        {
+            return;
+        }
+
+        final DetailAST prev = rcurly.getPreviousSibling();
+        if (prev.getType() != TokenTypes.COMMA) {
+            log(rcurly.getLineNo(), "array.trailing.comma");
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AvoidInlineConditionalsCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AvoidInlineConditionalsCheck.java
new file mode 100644
index 0000000..68915b4
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/AvoidInlineConditionalsCheck.java
@@ -0,0 +1,61 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * Detects inline conditionals.
+ *
+ * An example inline conditional is this:
+ * <pre>
+ * String a = getParameter("a");
+ * String b = (a==null || a.length<1) ? null : a.substring(1);
+ * </pre>
+ *
+ * Rationale: Some developers find inline conditionals hard to read,
+ * so their company's coding standards forbids them.
+ *
+ * @author lkuehne
+ */
+public class AvoidInlineConditionalsCheck extends Check
+{
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[]{TokenTypes.QUESTION};
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        // the only place a QUESTION token can occur is in inline conditionals
+        // so no need to do any further tricks here - pretty trivial Check!
+
+        log(aAST.getLineNo(), aAST.getColumnNo(), "inline.conditional.avoid");
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/CovariantEqualsCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/CovariantEqualsCheck.java
new file mode 100644
index 0000000..6dfc6b9
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/CovariantEqualsCheck.java
@@ -0,0 +1,120 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.CheckUtils;
+import java.util.Set;
+
+/**
+ * <p>Checks that if a class defines a covariant method equals,
+ * then it defines method equals(java.lang.Object).
+ * Inspired by findbugs,
+ * http://www.cs.umd.edu/~pugh/java/bugs/docs/findbugsPaper.pdf
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="CovariantEquals"/>
+ * </pre>
+ * @author Rick Giles
+ * @version 1.0
+ */
+public class CovariantEqualsCheck extends Check
+{
+    /** Set of equals method definitions */
+    private final Set<DetailAST> mEqualsMethods = Sets.newHashSet();
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.CLASS_DEF, TokenTypes.LITERAL_NEW, };
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        mEqualsMethods.clear();
+        boolean hasEqualsObject = false;
+
+        // examine method definitions for equals methods
+        final DetailAST objBlock = aAST.findFirstToken(TokenTypes.OBJBLOCK);
+        if (objBlock != null) {
+            DetailAST child = objBlock.getFirstChild();
+            while (child != null) {
+                if (child.getType() == TokenTypes.METHOD_DEF
+                        && CheckUtils.isEqualsMethod(child))
+                {
+                    if (hasObjectParameter(child)) {
+                        hasEqualsObject = true;
+                    }
+                    else {
+                        mEqualsMethods.add(child);
+                    }
+                }
+                child = child.getNextSibling();
+            }
+
+            // report equals method definitions
+            if (!hasEqualsObject) {
+                for (DetailAST equalsAST : mEqualsMethods) {
+                    final DetailAST nameNode = equalsAST
+                            .findFirstToken(TokenTypes.IDENT);
+                    log(nameNode.getLineNo(), nameNode.getColumnNo(),
+                            "covariant.equals");
+                }
+            }
+        }
+    }
+
+    /**
+     * Tests whether a method definition AST has exactly one
+     * parameter of type Object.
+     * @param aAST the method definition AST to test.
+     * Precondition: aAST is a TokenTypes.METHOD_DEF node.
+     * @return true if aAST has exactly one parameter of type Object.
+     */
+    private boolean hasObjectParameter(DetailAST aAST)
+    {
+        // one parameter?
+        final DetailAST paramsNode = aAST.findFirstToken(TokenTypes.PARAMETERS);
+        if (paramsNode.getChildCount() != 1) {
+            return false;
+        }
+
+        // parameter type "Object"?
+        final DetailAST paramNode =
+            paramsNode.findFirstToken(TokenTypes.PARAMETER_DEF);
+        final DetailAST typeNode = paramNode.findFirstToken(TokenTypes.TYPE);
+        final FullIdent fullIdent = FullIdent.createFullIdentBelow(typeNode);
+        final String name = fullIdent.getText();
+        return ("Object".equals(name) || "java.lang.Object".equals(name));
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/DeclarationOrderCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/DeclarationOrderCheck.java
new file mode 100644
index 0000000..4bbe6b9
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/DeclarationOrderCheck.java
@@ -0,0 +1,234 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks that the parts of a class or interface declaration
+ * appear in the order suggested by the
+ * <a
+ * href="http://java.sun.com/docs/codeconv/html/CodeConventions.doc2.html#1852"
+ * >Code Conventions for the Java Programming Language</a>.
+ *
+ *
+ * <ol>
+ * <li> Class (static) variables. First the public class variables, then
+ *      the protected, then package level (no access modifier), and then
+ *      the private. </li>
+ * <li> Instance variables. First the public class variables, then
+ *      the protected, then package level (no access modifier), and then
+ *      the private. </li>
+ * <li> Constructors </li>
+ * <li> Methods </li>
+ * </ol>
+ *
+ * <p>
+ * An example of how to configure the check is:
+ *
+ * <pre>
+ * <module name="DeclarationOrder"/>
+ * </pre>
+ *
+ * @author r_auckenthaler
+ */
+public class DeclarationOrderCheck extends Check
+{
+    /** State for the VARIABLE_DEF */
+    private static final int STATE_STATIC_VARIABLE_DEF = 1;
+
+    /** State for the VARIABLE_DEF */
+    private static final int STATE_INSTANCE_VARIABLE_DEF = 2;
+
+    /** State for the CTOR_DEF */
+    private static final int STATE_CTOR_DEF = 3;
+
+    /** State for the METHOD_DEF */
+    private static final int STATE_METHOD_DEF = 4;
+
+    /**
+     * List of Declaration States. This is necessary due to
+     * inner classes that have their own state
+     */
+    private final FastStack<ScopeState> mScopeStates = FastStack.newInstance();
+
+    /**
+     * private class to encapsulate the state
+     */
+    private static class ScopeState
+    {
+        /** The state the check is in */
+        private int mScopeState = STATE_STATIC_VARIABLE_DEF;
+
+        /** The sub-state the check is in */
+        private Scope mDeclarationAccess = Scope.PUBLIC;
+    }
+
+    /** If true, ignores the check to constructors. */
+    private boolean mIgnoreConstructors;
+    /** If true, ignore the check to methods. */
+    private boolean mIgnoreMethods;
+    /** If true, ignore the check to modifiers (fields, ...). */
+    private boolean mIgnoreModifiers;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.CTOR_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.MODIFIERS,
+            TokenTypes.OBJBLOCK,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final int parentType = aAST.getParent().getType();
+        ScopeState state;
+
+        switch (aAST.getType()) {
+        case TokenTypes.OBJBLOCK:
+            mScopeStates.push(new ScopeState());
+            break;
+
+        case TokenTypes.CTOR_DEF:
+            if (parentType != TokenTypes.OBJBLOCK) {
+                return;
+            }
+
+            state = mScopeStates.peek();
+            if (state.mScopeState > STATE_CTOR_DEF) {
+                if (!mIgnoreConstructors) {
+                    log(aAST, "declaration.order.constructor");
+                }
+            }
+            else {
+                state.mScopeState = STATE_CTOR_DEF;
+            }
+            break;
+
+        case TokenTypes.METHOD_DEF:
+            state = mScopeStates.peek();
+            if (parentType != TokenTypes.OBJBLOCK) {
+                return;
+            }
+
+            if (state.mScopeState > STATE_METHOD_DEF) {
+                if (!mIgnoreMethods) {
+                    log(aAST, "declaration.order.method");
+                }
+            }
+            else {
+                state.mScopeState = STATE_METHOD_DEF;
+            }
+            break;
+
+        case TokenTypes.MODIFIERS:
+            if ((parentType != TokenTypes.VARIABLE_DEF)
+                || (aAST.getParent().getParent().getType()
+                    != TokenTypes.OBJBLOCK))
+            {
+                return;
+            }
+
+            state = mScopeStates.peek();
+            if (aAST.findFirstToken(TokenTypes.LITERAL_STATIC) != null) {
+                if (state.mScopeState > STATE_STATIC_VARIABLE_DEF) {
+                    if (!mIgnoreModifiers
+                        || state.mScopeState > STATE_INSTANCE_VARIABLE_DEF)
+                    {
+                        log(aAST, "declaration.order.static");
+                    }
+                }
+                else {
+                    state.mScopeState = STATE_STATIC_VARIABLE_DEF;
+                }
+            }
+            else {
+                if (state.mScopeState > STATE_INSTANCE_VARIABLE_DEF) {
+                    log(aAST, "declaration.order.instance");
+                }
+                else if (state.mScopeState == STATE_STATIC_VARIABLE_DEF) {
+                    state.mDeclarationAccess = Scope.PUBLIC;
+                    state.mScopeState = STATE_INSTANCE_VARIABLE_DEF;
+                }
+            }
+
+            final Scope access = ScopeUtils.getScopeFromMods(aAST);
+            if (state.mDeclarationAccess.compareTo(access) > 0) {
+                if (!mIgnoreModifiers) {
+                    log(aAST, "declaration.order.access");
+                }
+            }
+            else {
+                state.mDeclarationAccess = access;
+            }
+            break;
+
+        default:
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.OBJBLOCK:
+            mScopeStates.pop();
+            break;
+
+        default:
+        }
+    }
+
+    /**
+     * Sets whether to ignore constructors.
+     * @param aIgnoreConstructors whether to ignore constructors.
+     */
+    public void setIgnoreConstructors(boolean aIgnoreConstructors)
+    {
+        mIgnoreConstructors = aIgnoreConstructors;
+    }
+
+    /**
+     * Sets whether to ignore methods.
+     * @param aIgnoreMethods whether to ignore methods.
+     */
+    public void setIgnoreMethods(boolean aIgnoreMethods)
+    {
+        mIgnoreMethods = aIgnoreMethods;
+    }
+
+    /**
+     * Sets whether to ignore modifiers.
+     * @param aIgnoreModifiers whether to ignore modifiers.
+     */
+    public void setIgnoreModifiers(boolean aIgnoreModifiers)
+    {
+        mIgnoreModifiers = aIgnoreModifiers;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/DefaultComesLastCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/DefaultComesLastCheck.java
new file mode 100644
index 0000000..2da3d6a
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/DefaultComesLastCheck.java
@@ -0,0 +1,86 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Check that the <code>default</code> is after all the <code>case</code>s
+ * in a <code>switch</code> statement.
+ * </p>
+ * <p>
+ * Rationale: Java allows <code>default</code> anywhere within the
+ * <code>switch</code> statement. But if it comes after the last
+ * <code>case</code> then it is more readable.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="DefaultComesLast"/>
+ * </pre>
+ * @author o_sukhodolsky
+ */
+public class DefaultComesLastCheck extends Check
+{
+    /** Creates new instance of the check. */
+    public DefaultComesLastCheck()
+    {
+        // do nothing
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.LITERAL_DEFAULT,
+        };
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST defaultGroupAST = aAST.getParent();
+        //default keywords used in annotations too - not what we're
+        //interested in
+        if (defaultGroupAST.getType() != TokenTypes.ANNOTATION_FIELD_DEF
+                && defaultGroupAST.getType() != TokenTypes.MODIFIERS)
+        {
+            final DetailAST switchAST = defaultGroupAST.getParent();
+            final DetailAST lastGroupAST =
+                switchAST.getLastChild().getPreviousSibling();
+
+            if ((defaultGroupAST.getLineNo() != lastGroupAST.getLineNo())
+                || (defaultGroupAST.getColumnNo()
+                    != lastGroupAST.getColumnNo()))
+            {
+                log(aAST, "default.comes.last");
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EmptyStatementCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EmptyStatementCheck.java
new file mode 100644
index 0000000..7ffc3d5
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EmptyStatementCheck.java
@@ -0,0 +1,59 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * <p>
+ * Detects empty statements (standalone ';').
+ * Empty statements often introduce bugs
+ * that are hard to spot, such as in
+ * </p>
+ * <pre>
+ * if (someCondition);
+ *   doConditionalStuff();
+ * doUnconditionalStuff();
+ * </pre>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="EmptyStatement"/>
+ * </pre>
+ * @author Rick Giles
+ * @version 1.0
+ */
+public class EmptyStatementCheck extends Check
+{
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.EMPTY_STAT};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        log(aAST.getLineNo(), aAST.getColumnNo(), "empty.statement");
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsAvoidNullCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsAvoidNullCheck.java
new file mode 100644
index 0000000..c6e0a5e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsAvoidNullCheck.java
@@ -0,0 +1,244 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import antlr.collections.AST;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks that any combination of String literals with optional
+ * assignment is on the left side of an equals() comparison.
+ * </p>
+ *
+ * <p>
+ * Rationale: Calling the equals() method on String literals
+ * will avoid a potential NullPointerException.  Also, it is
+ * pretty common to see null check right before equals comparisons
+ * which is not necessary in the below example.
+ *
+ * For example:
+ *
+ * <pre>
+ *  <code>
+ *    String nullString = null;
+ *    nullString.equals("My_Sweet_String");
+ *  </code>
+ * </pre>
+ * should be refactored to
+ *
+ * <pre>
+ *  <code>
+ *    String nullString = null;
+ *    "My_Sweet_String".equals(nullString);
+ *  </code>
+ * </pre>
+ *
+ *
+ * <p>
+ * Limitations: If the equals method is overridden or
+ * a covariant equals method is defined and the implementation
+ * is incorrect (where s.equals(t) does not return the same result
+ * as t.equals(s)) then rearranging the called on object and
+ * parameter may have unexpected results
+ *
+ * <br>
+ *
+ * Java's Autoboxing feature has an affect
+ * on how this check is implemented. Pre Java 5 all IDENT + IDENT
+ * object concatenations would not cause a NullPointerException even
+ * if null.  Those situations could have been included in this check.
+ * They would simply act as if they surrounded by String.valueOf()
+ * which would concatenate the String null.
+ *
+ * <p>
+ * The following example will cause a
+ * NullPointerException as a result of what autoboxing does.
+ * <pre>
+ * Integer i = null, j = null;
+ * String number = "5"
+ * number.equals(i + j);
+ * </pre>
+ *
+ *
+ * Since, it is difficult to determine what kind of Object is being
+ * concatenated all ident concatenation is considered unsafe.
+ *
+ * @author Travis Schneeberger
+ * version 1.0
+ */
+public class EqualsAvoidNullCheck extends Check
+{
+    /** Whether to process equalsIgnoreCase() invocations. */
+    private boolean mIgnoreEqualsIgnoreCase;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.METHOD_CALL};
+    }
+
+    @Override
+    public void visitToken(final DetailAST aMethodCall)
+    {
+        final DetailAST dot = aMethodCall.getFirstChild();
+        if (dot.getType() != TokenTypes.DOT) {
+            return;
+        }
+
+        final DetailAST objCalledOn = dot.getFirstChild();
+
+        //checks for calling equals on String literal and
+        //anon object which cannot be null
+        //Also, checks if calling using strange inner class
+        //syntax outter.inner.equals(otherObj) by looking
+        //for the dot operator which cannot be improved
+        if ((objCalledOn.getType() == TokenTypes.STRING_LITERAL)
+                || (objCalledOn.getType() == TokenTypes.LITERAL_NEW)
+                || (objCalledOn.getType() == TokenTypes.DOT))
+        {
+            return;
+        }
+
+        final DetailAST method = objCalledOn.getNextSibling();
+        final DetailAST expr = dot.getNextSibling().getFirstChild();
+
+        if ("equals".equals(method.getText())
+            && containsOneArg(expr) && containsAllSafeTokens(expr))
+        {
+            log(aMethodCall.getLineNo(), aMethodCall.getColumnNo(),
+                "equals.avoid.null");
+        }
+
+        if (!mIgnoreEqualsIgnoreCase
+            && "equalsIgnoreCase".equals(method.getText())
+            && containsOneArg(expr) && containsAllSafeTokens(expr))
+        {
+            log(aMethodCall.getLineNo(), aMethodCall.getColumnNo(),
+                "equalsIgnoreCase.avoid.null");
+        }
+    }
+
+    /**
+     * Checks if a method contains no arguments
+     * starting at with the argument expression.
+     *
+     * @param aExpr the argument expression
+     * @return true if the method contains no args, false if not
+     */
+    private boolean containsNoArgs(final AST aExpr)
+    {
+        return (aExpr == null);
+    }
+
+    /**
+     * Checks if a method contains multiple arguments
+     * starting at with the argument expression.
+     *
+     * @param aExpr the argument expression
+     * @return true if the method contains multiple args, false if not
+     */
+    private boolean containsMultiArgs(final AST aExpr)
+    {
+        final AST comma = aExpr.getNextSibling();
+        return (comma != null) && (comma.getType() == TokenTypes.COMMA);
+    }
+
+    /**
+     * Checks if a method contains a single argument
+     * starting at with the argument expression.
+     *
+     * @param aExpr the argument expression
+     * @return true if the method contains a single arg, false if not
+     */
+    private boolean containsOneArg(final AST aExpr)
+    {
+        return !containsNoArgs(aExpr) && !containsMultiArgs(aExpr);
+    }
+
+    /**
+     * <p>
+     * Looks for all "safe" Token combinations in the argument
+     * expression branch.
+     * </p>
+     *
+     * <p>
+     * See class documentation for details on autoboxing's affect
+     * on this method implementation.
+     * </p>
+     *
+     * @param aExpr the argument expression
+     * @return - true if any child matches the set of tokens, false if not
+     */
+    private boolean containsAllSafeTokens(final DetailAST aExpr)
+    {
+        DetailAST arg = aExpr.getFirstChild();
+
+        if (arg.branchContains(TokenTypes.METHOD_CALL)) {
+            return false;
+        }
+        arg = skipVariableAssign(arg);
+
+        //Plus assignment can have ill affects
+        //do not want to recommend moving expression
+        //See example:
+        //String s = "SweetString";
+        //s.equals(s += "SweetString"); //false
+        //s = "SweetString";
+        //(s += "SweetString").equals(s); //true
+        //arg = skipVariablePlusAssign(arg);
+
+        if ((arg).branchContains(TokenTypes.PLUS_ASSIGN)
+                || (arg).branchContains(TokenTypes.IDENT))
+        {
+            return false;
+        }
+
+        //must be just String literals if got here
+        return true;
+    }
+
+    /**
+     * Skips over an inner assign portion of an argument expression.
+     * @param aCurrentAST current token in the argument expression
+     * @return the next relevant token
+     */
+    private DetailAST skipVariableAssign(final DetailAST aCurrentAST)
+    {
+        if ((aCurrentAST.getType() == TokenTypes.ASSIGN)
+                && (aCurrentAST.getFirstChild().getType() == TokenTypes.IDENT))
+        {
+            return aCurrentAST.getFirstChild().getNextSibling();
+        }
+        return aCurrentAST;
+    }
+
+    /**
+     * Whether to ignore checking {@code String.equalsIgnoreCase(String)}.
+     * @param aNewValue whether to ignore checking
+     *    {@code String.equalsIgnoreCase(String)}.
+     */
+    public void setIgnoreEqualsIgnoreCase(boolean aNewValue)
+    {
+        mIgnoreEqualsIgnoreCase = aNewValue;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsHashCodeCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsHashCodeCheck.java
new file mode 100644
index 0000000..9e24fa7
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsHashCodeCheck.java
@@ -0,0 +1,139 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import antlr.collections.AST;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * <p>
+ * Checks that classes that override equals() also override hashCode().
+ * </p>
+ * <p>
+ * Rationale: The contract of equals() and hashCode() requires that
+ * equal objects have the same hashCode. Hence, whenever you override
+ * equals() you must override hashCode() to ensure that your class can
+ * be used in collections that are hash based.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="EqualsHashCode"/>
+ * </pre>
+ * @author lkuehne
+ */
+public class EqualsHashCodeCheck
+        extends Check
+{
+    // implementation note: we have to use the following members to
+    // keep track of definitions in different inner classes
+
+    /** maps OBJ_BLOCK to the method definition of equals() */
+    private final Map<DetailAST, DetailAST> mObjBlockEquals = Maps.newHashMap();
+
+    /** the set of OBJ_BLOCKs that contain a definition of hashCode() */
+    private final Set<DetailAST> mObjBlockWithHashCode = Sets.newHashSet();
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.METHOD_DEF};
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        mObjBlockEquals.clear();
+        mObjBlockWithHashCode.clear();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST modifiers = aAST.getFirstChild();
+        final AST type = aAST.findFirstToken(TokenTypes.TYPE);
+        final AST methodName = aAST.findFirstToken(TokenTypes.IDENT);
+        final DetailAST parameters = aAST.findFirstToken(TokenTypes.PARAMETERS);
+
+        if ((type.getFirstChild().getType() == TokenTypes.LITERAL_BOOLEAN)
+                && "equals".equals(methodName.getText())
+                && modifiers.branchContains(TokenTypes.LITERAL_PUBLIC)
+                && (parameters.getChildCount() == 1)
+                && isObjectParam(parameters.getFirstChild())
+            )
+        {
+            mObjBlockEquals.put(aAST.getParent(), aAST);
+        }
+        else if ((type.getFirstChild().getType() == TokenTypes.LITERAL_INT)
+                && "hashCode".equals(methodName.getText())
+                && modifiers.branchContains(TokenTypes.LITERAL_PUBLIC)
+                && (parameters.getFirstChild() == null)) // no params
+        {
+            mObjBlockWithHashCode.add(aAST.getParent());
+        }
+    }
+
+    /**
+     * Determines if an AST is a formal param of type Object (or subclass).
+     * @param aFirstChild the AST to check
+     * @return true iff aFirstChild is a parameter of an Object type.
+     */
+    private boolean isObjectParam(AST aFirstChild)
+    {
+        final AST modifiers = aFirstChild.getFirstChild();
+        final AST type = modifiers.getNextSibling();
+        switch (type.getFirstChild().getType()) {
+        case TokenTypes.LITERAL_BOOLEAN:
+        case TokenTypes.LITERAL_BYTE:
+        case TokenTypes.LITERAL_CHAR:
+        case TokenTypes.LITERAL_DOUBLE:
+        case TokenTypes.LITERAL_FLOAT:
+        case TokenTypes.LITERAL_INT:
+        case TokenTypes.LITERAL_LONG:
+        case TokenTypes.LITERAL_SHORT:
+            return false;
+        default:
+            return true;
+        }
+    }
+
+    @Override
+    public void finishTree(DetailAST aRootAST)
+    {
+        final Set<DetailAST> equalsDefs = mObjBlockEquals.keySet();
+        for (DetailAST objBlock : equalsDefs) {
+            if (!mObjBlockWithHashCode.contains(objBlock)) {
+                final DetailAST equalsAST = mObjBlockEquals.get(objBlock);
+                log(equalsAST.getLineNo(), equalsAST.getColumnNo(),
+                        "equals.noHashCode");
+            }
+        }
+
+        mObjBlockEquals.clear();
+        mObjBlockWithHashCode.clear();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ExplicitInitializationCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ExplicitInitializationCheck.java
new file mode 100644
index 0000000..c19d3cb
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ExplicitInitializationCheck.java
@@ -0,0 +1,164 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+import com.puppycrawl.tools.checkstyle.checks.CheckUtils;
+
+/**
+ * <p>
+ * Checks if any class or object member explicitly initialized
+ * to default for its type value (<code>null</code> for object
+ * references, zero for numeric types and <code>char</code>
+ * and <code>false</code> for <code>boolean</code>.
+ * </p>
+ * <p>
+ * Rationale: each instance variable gets
+ * initialized twice, to the same value.  Java
+ * initializes each instance variable to its default
+ * value (0 or null) before performing any
+ * initialization specified in the code.  So in this case,
+ * x gets initialized to 0 twice, and bar gets initialized
+ * to null twice.  So there is a minor inefficiency.  This style of
+ * coding is a hold-over from C/C++ style coding,
+ * and it shows that the developer isn't really confident that
+ * Java really initializes instance variables to default
+ * values.
+ * </p>
+ *
+ * @author o_sukhodolsky
+ */
+public class ExplicitInitializationCheck extends Check
+{
+    @Override
+    public final int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.VARIABLE_DEF};
+    }
+
+    @Override
+    public final int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        // do not check local variables and
+        // fields declared in interface/annotations
+        if (ScopeUtils.isLocalVariableDef(aAST)
+            || ScopeUtils.inInterfaceOrAnnotationBlock(aAST))
+        {
+            return;
+        }
+
+        final DetailAST assign = aAST.findFirstToken(TokenTypes.ASSIGN);
+        if (assign == null) {
+            // no assign - no check
+            return;
+        }
+
+        final DetailAST modifiers = aAST.findFirstToken(TokenTypes.MODIFIERS);
+        if ((modifiers != null)
+            && modifiers.branchContains(TokenTypes.FINAL))
+        {
+            // do not check final variables
+            return;
+        }
+
+        final DetailAST type = aAST.findFirstToken(TokenTypes.TYPE);
+        final DetailAST ident = aAST.findFirstToken(TokenTypes.IDENT);
+        final DetailAST exprStart =
+            assign.getFirstChild().getFirstChild();
+        if (isObjectType(type)
+            && (exprStart.getType() == TokenTypes.LITERAL_NULL))
+        {
+            log(ident, "explicit.init", ident.getText(), "null");
+        }
+
+        final int primitiveType = type.getFirstChild().getType();
+        if ((primitiveType == TokenTypes.LITERAL_BOOLEAN)
+            && (exprStart.getType() == TokenTypes.LITERAL_FALSE))
+        {
+            log(ident, "explicit.init", ident.getText(), "false");
+        }
+        if (isNumericType(primitiveType) && isZero(exprStart)) {
+            log(ident, "explicit.init", ident.getText(), "0");
+        }
+        if ((primitiveType == TokenTypes.LITERAL_CHAR)
+            && (isZero(exprStart)
+                || ((exprStart.getType() == TokenTypes.CHAR_LITERAL)
+                && "'\\0'".equals(exprStart.getText()))))
+        {
+            log(ident, "explicit.init", ident.getText(), "\\0");
+        }
+    }
+
+    /**
+     * Determines if a giiven type is an object type.
+     * @param aType type to check.
+     * @return true if it is an object type.
+     */
+    private boolean isObjectType(DetailAST aType)
+    {
+        final int type = aType.getFirstChild().getType();
+        return ((type == TokenTypes.IDENT) || (type == TokenTypes.DOT)
+                || (type == TokenTypes.ARRAY_DECLARATOR));
+    }
+
+    /**
+     * Determine if a given type is a numeric type.
+     * @param aType code of the type for check.
+     * @return true if it's a numeric type.
+     * @see TokenTypes
+     */
+    private boolean isNumericType(int aType)
+    {
+        return ((aType == TokenTypes.LITERAL_BYTE)
+                || (aType == TokenTypes.LITERAL_SHORT)
+                || (aType == TokenTypes.LITERAL_INT)
+                || (aType == TokenTypes.LITERAL_FLOAT)
+                || (aType == TokenTypes.LITERAL_LONG)
+                || (aType == TokenTypes.LITERAL_DOUBLE));
+    }
+
+    /**
+     * @param aExpr node to check.
+     * @return true if given node contains numeric constant for zero.
+     */
+    private boolean isZero(DetailAST aExpr)
+    {
+        final int type = aExpr.getType();
+        switch (type) {
+        case TokenTypes.NUM_FLOAT:
+        case TokenTypes.NUM_DOUBLE:
+        case TokenTypes.NUM_INT:
+        case TokenTypes.NUM_LONG:
+            final String text = aExpr.getText();
+            return (0 == CheckUtils.parseFloat(text, type));
+        default:
+            return false;
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FallThroughCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FallThroughCheck.java
new file mode 100644
index 0000000..f79f185
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FallThroughCheck.java
@@ -0,0 +1,390 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+/**
+ * Checks for fall through in switch statements
+ * Finds locations where a case contains Java code -
+ * but lacks a break, return, throw or continue statement.
+ *
+ * <p>
+ * The check honors special comments to suppress warnings about
+ * the fall through. By default the comments "fallthru",
+ * "fall through", "falls through" and "fallthrough" are recognized.
+ * </p>
+ * <p>
+ * The following fragment of code will NOT trigger the check,
+ * because of the comment "fallthru".
+ * </p>
+ * <pre>
+ * case 3:
+ *     x = 2;
+ *     // fallthru
+ * case 4:
+ * </pre>
+ * <p>
+ * The recognized relief comment can be configured with the property
+ * <code>reliefPattern</code>. Default value of this regular expression
+ * is "fallthru|fall through|fallthrough|falls through".
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="FallThrough">
+ *     <property name="reliefPattern"
+ *                  value="Fall Through"/>
+ * </module>
+ * </pre>
+ *
+ * @author o_sukhodolsky
+ */
+public class FallThroughCheck extends Check
+{
+    /** Do we need to check last case group. */
+    private boolean mCheckLastGroup;
+
+    /** Relief pattern to allow fall throught to the next case branch. */
+    private String mReliefPattern = "fallthru|falls? ?through";
+
+    /** Relief regexp. */
+    private Pattern mRegExp;
+
+    /** Creates new instance of the check. */
+    public FallThroughCheck()
+    {
+        // do nothing
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[]{TokenTypes.CASE_GROUP};
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    /**
+     * Set the relief pattern.
+     *
+     * @param aPattern
+     *            The regular expression pattern.
+     */
+    public void setReliefPattern(String aPattern)
+    {
+        mReliefPattern = aPattern;
+    }
+
+    /**
+     * Configures whether we need to check last case group or not.
+     * @param aValue new value of the property.
+     */
+    public void setCheckLastCaseGroup(boolean aValue)
+    {
+        mCheckLastGroup = aValue;
+    }
+
+    @Override
+    public void init()
+    {
+        super.init();
+        mRegExp = Utils.getPattern(mReliefPattern);
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST nextGroup = aAST.getNextSibling();
+        final boolean isLastGroup =
+            ((nextGroup == null)
+             || (nextGroup.getType() != TokenTypes.CASE_GROUP));
+        if (isLastGroup && !mCheckLastGroup) {
+            // we do not need to check last group
+            return;
+        }
+
+        final DetailAST slist = aAST.findFirstToken(TokenTypes.SLIST);
+
+        if (!isTerminated(slist, true, true)
+            && !hasFallTruComment(aAST, nextGroup))
+        {
+            if (!isLastGroup) {
+                log(nextGroup, "fall.through");
+            }
+            else {
+                log(aAST, "fall.through.last");
+            }
+        }
+    }
+
+    /**
+     * Checks if a given subtree terminated by return, throw or,
+     * if allowed break, continue.
+     * @param aAST root of given subtree
+     * @param aUseBreak should we consider break as terminator.
+     * @param aUseContinue should we consider continue as terminator.
+     * @return true if the subtree is terminated.
+     */
+    private boolean isTerminated(final DetailAST aAST, boolean aUseBreak,
+                                 boolean aUseContinue)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.LITERAL_RETURN:
+        case TokenTypes.LITERAL_THROW:
+            return true;
+        case TokenTypes.LITERAL_BREAK:
+            return aUseBreak;
+        case TokenTypes.LITERAL_CONTINUE:
+            return aUseContinue;
+        case TokenTypes.SLIST:
+            return checkSlist(aAST, aUseBreak, aUseContinue);
+        case TokenTypes.LITERAL_IF:
+            return checkIf(aAST, aUseBreak, aUseContinue);
+        case TokenTypes.LITERAL_FOR:
+        case TokenTypes.LITERAL_WHILE:
+        case TokenTypes.LITERAL_DO:
+            return checkLoop(aAST);
+        case TokenTypes.LITERAL_TRY:
+            return checkTry(aAST, aUseBreak, aUseContinue);
+        case TokenTypes.LITERAL_SWITCH:
+            return checkSwitch(aAST, aUseContinue);
+        default:
+            return false;
+        }
+    }
+
+    /**
+     * Checks if a given SLIST terminated by return, throw or,
+     * if allowed break, continue.
+     * @param aAST SLIST to check
+     * @param aUseBreak should we consider break as terminator.
+     * @param aUseContinue should we consider continue as terminator.
+     * @return true if SLIST is terminated.
+     */
+    private boolean checkSlist(final DetailAST aAST, boolean aUseBreak,
+                               boolean aUseContinue)
+    {
+        DetailAST lastStmt = aAST.getLastChild();
+        if (lastStmt == null) {
+            // if last case in switch is empty then slist is empty
+            // since this is a last case it is not a fall-through
+            return true;
+        }
+
+        if (lastStmt.getType() == TokenTypes.RCURLY) {
+            lastStmt = lastStmt.getPreviousSibling();
+        }
+
+        return (lastStmt != null)
+            && isTerminated(lastStmt, aUseBreak, aUseContinue);
+    }
+
+    /**
+     * Checks if a given IF terminated by return, throw or,
+     * if allowed break, continue.
+     * @param aAST IF to check
+     * @param aUseBreak should we consider break as terminator.
+     * @param aUseContinue should we consider continue as terminator.
+     * @return true if IF is terminated.
+     */
+    private boolean checkIf(final DetailAST aAST, boolean aUseBreak,
+                            boolean aUseContinue)
+    {
+        final DetailAST thenStmt = aAST.findFirstToken(TokenTypes.RPAREN)
+                .getNextSibling();
+        final DetailAST elseStmt = thenStmt.getNextSibling();
+        boolean isTerminated = isTerminated(thenStmt, aUseBreak, aUseContinue);
+
+        if (isTerminated && (elseStmt != null)) {
+            isTerminated = isTerminated(elseStmt.getFirstChild(),
+                                        aUseBreak, aUseContinue);
+        }
+        return isTerminated;
+    }
+
+    /**
+     * Checks if a given loop terminated by return, throw or,
+     * if allowed break, continue.
+     * @param aAST loop to check
+     * @return true if loop is terminated.
+     */
+    private boolean checkLoop(final DetailAST aAST)
+    {
+        DetailAST loopBody = null;
+        if (aAST.getType() == TokenTypes.LITERAL_DO) {
+            final DetailAST lparen = aAST.findFirstToken(TokenTypes.DO_WHILE);
+            loopBody = lparen.getPreviousSibling();
+        }
+        else {
+            final DetailAST rparen = aAST.findFirstToken(TokenTypes.RPAREN);
+            loopBody = rparen.getNextSibling();
+        }
+        return isTerminated(loopBody, false, false);
+    }
+
+    /**
+     * Checks if a given try/catch/finally block terminated by return, throw or,
+     * if allowed break, continue.
+     * @param aAST loop to check
+     * @param aUseBreak should we consider break as terminator.
+     * @param aUseContinue should we consider continue as terminator.
+     * @return true if try/cath/finally block is terminated.
+     */
+    private boolean checkTry(final DetailAST aAST, boolean aUseBreak,
+                             boolean aUseContinue)
+    {
+        final DetailAST finalStmt = aAST.getLastChild();
+        if (finalStmt.getType() == TokenTypes.LITERAL_FINALLY) {
+            return isTerminated(finalStmt.findFirstToken(TokenTypes.SLIST),
+                                aUseBreak, aUseContinue);
+        }
+
+        boolean isTerminated = isTerminated(aAST.getFirstChild(),
+                                            aUseBreak, aUseContinue);
+
+        DetailAST catchStmt = aAST.findFirstToken(TokenTypes.LITERAL_CATCH);
+        while ((catchStmt != null) && isTerminated) {
+            final DetailAST catchBody =
+                catchStmt.findFirstToken(TokenTypes.SLIST);
+            isTerminated &= isTerminated(catchBody, aUseBreak, aUseContinue);
+            catchStmt = catchStmt.getNextSibling();
+        }
+        return isTerminated;
+    }
+
+    /**
+     * Checks if a given switch terminated by return, throw or,
+     * if allowed break, continue.
+     * @param aAST loop to check
+     * @param aUseContinue should we consider continue as terminator.
+     * @return true if switch is terminated.
+     */
+    private boolean checkSwitch(final DetailAST aAST, boolean aUseContinue)
+    {
+        DetailAST caseGroup = aAST.findFirstToken(TokenTypes.CASE_GROUP);
+        boolean isTerminated = (caseGroup != null);
+        while (isTerminated && (caseGroup != null)
+               && (caseGroup.getType() != TokenTypes.RCURLY))
+        {
+            final DetailAST caseBody =
+                caseGroup.findFirstToken(TokenTypes.SLIST);
+            isTerminated &= isTerminated(caseBody, false, aUseContinue);
+            caseGroup = caseGroup.getNextSibling();
+        }
+        return isTerminated;
+    }
+
+    /**
+     * Determines if the fall through case between <code>aCurrentCase</code> and
+     * <code>aNextCase</code> is reliefed by a appropriate comment.
+     *
+     * @param aCurrentCase AST of the case that falls through to the next case.
+     * @param aNextCase AST of the next case.
+     * @return True if a relief comment was found
+     */
+    private boolean hasFallTruComment(DetailAST aCurrentCase,
+            DetailAST aNextCase)
+    {
+
+        final int startLineNo = aCurrentCase.getLineNo();
+        final int endLineNo = aNextCase.getLineNo();
+        final int endColNo = aNextCase.getColumnNo();
+
+        /*
+         * Remember: The lines number returned from the AST is 1-based, but
+         * the lines number in this array are 0-based. So you will often
+         * see a "lineNo-1" etc.
+         */
+        final String[] lines = getLines();
+
+        /*
+         * Handle:
+         *    case 1:
+         *    /+ FALLTHRU +/ case 2:
+         *    ....
+         * and
+         *    switch(i) {
+         *    default:
+         *    /+ FALLTHRU +/}
+         */
+        final String linepart = lines[endLineNo - 1].substring(0, endColNo);
+        if (commentMatch(mRegExp, linepart, endLineNo)) {
+            return true;
+        }
+
+        /*
+         * Handle:
+         *    case 1:
+         *    .....
+         *    // FALLTHRU
+         *    case 2:
+         *    ....
+         * and
+         *    switch(i) {
+         *    default:
+         *    // FALLTHRU
+         *    }
+         */
+        for (int i = endLineNo - 2; i > startLineNo - 1; i--) {
+            if (lines[i].trim().length() != 0) {
+                return commentMatch(mRegExp, lines[i], i + 1);
+            }
+        }
+
+        // Well -- no relief comment found.
+        return false;
+    }
+
+    /**
+     * Does a regular expression match on the given line and checks that a
+     * possible match is within a comment.
+     * @param aPattern The regular expression pattern to use.
+     * @param aLine The line of test to do the match on.
+     * @param aLineNo The line number in the file.
+     * @return True if a match was found inside a comment.
+     */
+    private boolean commentMatch(Pattern aPattern, String aLine, int aLineNo
+    )
+    {
+        final Matcher matcher = aPattern.matcher(aLine);
+
+        final boolean hit = matcher.find();
+
+        if (hit) {
+            final int startMatch = matcher.start();
+            // -1 because it returns the char position beyond the match
+            final int endMatch = matcher.end() - 1;
+            return getFileContents().hasIntersectionWithComment(aLineNo,
+                    startMatch, aLineNo, endMatch);
+        }
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java
new file mode 100644
index 0000000..5c433ad
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java
@@ -0,0 +1,219 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * <p>
+ * Ensures that local variables that never get their values changed,
+ * must be declared final.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="FinalLocalVariable">
+ *     <property name="token" value="VARIABLE_DEF"/>
+ * </module>
+ * </pre>
+ * @author k_gibbs, r_auckenthaler
+ */
+public class FinalLocalVariableCheck extends Check
+{
+    /** Scope Stack */
+    private final FastStack<Map<String, DetailAST>> mScopeStack =
+        FastStack.newInstance();
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.IDENT,
+            TokenTypes.CTOR_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.VARIABLE_DEF,
+            TokenTypes.INSTANCE_INIT,
+            TokenTypes.STATIC_INIT,
+            TokenTypes.LITERAL_FOR,
+            TokenTypes.SLIST,
+            TokenTypes.OBJBLOCK,
+        };
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return new int[] {
+            TokenTypes.VARIABLE_DEF,
+            TokenTypes.PARAMETER_DEF,
+        };
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return new int[] {
+            TokenTypes.IDENT,
+            TokenTypes.CTOR_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.INSTANCE_INIT,
+            TokenTypes.STATIC_INIT,
+            TokenTypes.LITERAL_FOR,
+            TokenTypes.SLIST,
+            TokenTypes.OBJBLOCK,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.OBJBLOCK:
+        case TokenTypes.SLIST:
+        case TokenTypes.LITERAL_FOR:
+        case TokenTypes.METHOD_DEF:
+        case TokenTypes.CTOR_DEF:
+        case TokenTypes.STATIC_INIT:
+        case TokenTypes.INSTANCE_INIT:
+            mScopeStack.push(new HashMap<String, DetailAST>());
+            break;
+
+        case TokenTypes.PARAMETER_DEF:
+            if (ScopeUtils.inInterfaceBlock(aAST)
+                || inAbstractMethod(aAST))
+            {
+                break;
+            }
+        case TokenTypes.VARIABLE_DEF:
+            if ((aAST.getParent().getType() != TokenTypes.OBJBLOCK)
+                && (aAST.getParent().getType() != TokenTypes.FOR_EACH_CLAUSE))
+            {
+                insertVariable(aAST);
+            }
+            break;
+
+        case TokenTypes.IDENT:
+            final int parentType = aAST.getParent().getType();
+            if ((TokenTypes.POST_DEC        == parentType)
+                || (TokenTypes.DEC          == parentType)
+                || (TokenTypes.POST_INC     == parentType)
+                || (TokenTypes.INC          == parentType)
+                || (TokenTypes.ASSIGN       == parentType)
+                || (TokenTypes.PLUS_ASSIGN  == parentType)
+                || (TokenTypes.MINUS_ASSIGN == parentType)
+                || (TokenTypes.DIV_ASSIGN   == parentType)
+                || (TokenTypes.STAR_ASSIGN  == parentType)
+                || (TokenTypes.MOD_ASSIGN   == parentType)
+                || (TokenTypes.SR_ASSIGN    == parentType)
+                || (TokenTypes.BSR_ASSIGN   == parentType)
+                || (TokenTypes.SL_ASSIGN    == parentType)
+                || (TokenTypes.BXOR_ASSIGN  == parentType)
+                || (TokenTypes.BOR_ASSIGN   == parentType)
+                || (TokenTypes.BAND_ASSIGN  == parentType))
+            {
+                // TODO: is there better way to check is aAST
+                // in left part of assignment?
+                if (aAST.getParent().getFirstChild() == aAST) {
+                    removeVariable(aAST);
+                }
+            }
+            break;
+
+        default:
+        }
+    }
+
+    /**
+     * Determines whether an AST is a descentant of an abstract method.
+     * @param aAST the AST to check.
+     * @return true if aAST is a descentant of an abstract method.
+     */
+    private boolean inAbstractMethod(DetailAST aAST)
+    {
+        DetailAST parent = aAST.getParent();
+        while (parent != null) {
+            if (parent.getType() == TokenTypes.METHOD_DEF) {
+                final DetailAST modifiers =
+                    parent.findFirstToken(TokenTypes.MODIFIERS);
+                return modifiers.branchContains(TokenTypes.ABSTRACT);
+            }
+            parent = parent.getParent();
+        }
+        return false;
+    }
+
+    /**
+     * Inserts a variable at the topmost scope stack
+     * @param aAST the variable to insert
+     */
+    private void insertVariable(DetailAST aAST)
+    {
+        if (!aAST.branchContains(TokenTypes.FINAL)) {
+            final Map<String, DetailAST> state = mScopeStack.peek();
+            final DetailAST ast = aAST.findFirstToken(TokenTypes.IDENT);
+            state.put(ast.getText(), ast);
+        }
+    }
+
+    /**
+     * Removes the variable from the Stacks
+     * @param aAST Variable to remove
+     */
+    private void removeVariable(DetailAST aAST)
+    {
+        for (int i = mScopeStack.size() - 1; i >= 0; i--) {
+            final Map<String, DetailAST> state = mScopeStack.peek(i);
+            final Object obj = state.remove(aAST.getText());
+            if (obj != null) {
+                break;
+            }
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        super.leaveToken(aAST);
+
+        switch (aAST.getType()) {
+        case TokenTypes.OBJBLOCK:
+        case TokenTypes.SLIST:
+        case TokenTypes.LITERAL_FOR:
+        case TokenTypes.CTOR_DEF:
+        case TokenTypes.STATIC_INIT:
+        case TokenTypes.INSTANCE_INIT:
+        case TokenTypes.METHOD_DEF:
+            final Map<String, DetailAST> state = mScopeStack.pop();
+            for (DetailAST var : state.values()) {
+                log(var.getLineNo(), var.getColumnNo(), "final.variable", var
+                        .getText());
+            }
+            break;
+
+        default:
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java
new file mode 100644
index 0000000..d62f734
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheck.java
@@ -0,0 +1,490 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+import java.util.Set;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+import org.apache.commons.beanutils.ConversionException;
+
+/**
+ * <p>Checks that a local variable or a parameter does not shadow
+ * a field that is defined in the same class.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="HiddenField"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check so that it checks variables but not
+ * parameters is:
+ * </p>
+ * <pre>
+ * <module name="HiddenField">
+ *    <property name="tokens" value="VARIABLE_DEF"/>
+ * </module>
+ * </pre>
+ * <p>
+ * An example of how to configure the check so that it ignores the parameter of
+ * a setter method is:
+ * </p>
+ * <pre>
+ * <module name="HiddenField">
+ *    <property name="ignoreSetter" value="true"/>
+ * </module>
+ * </pre>
+ * <p>
+ * An example of how to configure the check so that it ignores constructor
+ * parameters is:
+ * </p>
+ * <pre>
+ * <module name="HiddenField">
+ *    <property name="ignoreConstructorParameter" value="true"/>
+ * </module>
+ * </pre>
+ * @author Rick Giles
+ * @version 1.0
+ */
+public class HiddenFieldCheck
+    extends Check
+{
+    /** stack of sets of field names,
+     * one for each class of a set of nested classes.
+     */
+    private FieldFrame mCurrentFrame;
+
+    /** the regexp to match against */
+    private Pattern mRegexp;
+
+    /** controls whether to check the parameter of a property setter method */
+    private boolean mIgnoreSetter;
+
+    /** controls whether to check the parameter of a constructor */
+    private boolean mIgnoreConstructorParameter;
+
+    /** controls whether to check the parameter of abstract methods. */
+    private boolean mIgnoreAbstractMethods;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.VARIABLE_DEF,
+            TokenTypes.PARAMETER_DEF,
+            TokenTypes.CLASS_DEF,
+            TokenTypes.ENUM_DEF,
+            TokenTypes.ENUM_CONSTANT_DEF,
+        };
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return new int[] {
+            TokenTypes.VARIABLE_DEF,
+            TokenTypes.PARAMETER_DEF,
+        };
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return new int[] {
+            TokenTypes.CLASS_DEF,
+            TokenTypes.ENUM_DEF,
+            TokenTypes.ENUM_CONSTANT_DEF,
+        };
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        mCurrentFrame = new FieldFrame(null, true);
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if ((aAST.getType() == TokenTypes.VARIABLE_DEF)
+            || (aAST.getType() == TokenTypes.PARAMETER_DEF))
+        {
+            processVariable(aAST);
+            return;
+        }
+
+        //A more thorough check of enum constant class bodies is
+        //possible (checking for hidden fields against the enum
+        //class body in addition to enum constant class bodies)
+        //but not attempted as it seems out of the scope of this
+        //check.
+        final DetailAST typeMods = aAST.findFirstToken(TokenTypes.MODIFIERS);
+        final boolean isStaticInnerType =
+                (typeMods != null)
+                        && typeMods.branchContains(TokenTypes.LITERAL_STATIC);
+        final FieldFrame frame =
+                new FieldFrame(mCurrentFrame, isStaticInnerType);
+
+        //add fields to container
+        final DetailAST objBlock = aAST.findFirstToken(TokenTypes.OBJBLOCK);
+        // enum constants may not have bodies
+        if (objBlock != null) {
+            DetailAST child = objBlock.getFirstChild();
+            while (child != null) {
+                if (child.getType() == TokenTypes.VARIABLE_DEF) {
+                    final String name =
+                        child.findFirstToken(TokenTypes.IDENT).getText();
+                    final DetailAST mods =
+                        child.findFirstToken(TokenTypes.MODIFIERS);
+                    if (mods.branchContains(TokenTypes.LITERAL_STATIC)) {
+                        frame.addStaticField(name);
+                    }
+                    else {
+                        frame.addInstanceField(name);
+                    }
+                }
+                child = child.getNextSibling();
+            }
+        }
+        // push container
+        mCurrentFrame = frame;
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        if ((aAST.getType() == TokenTypes.CLASS_DEF)
+            || (aAST.getType() == TokenTypes.ENUM_DEF)
+            || (aAST.getType() == TokenTypes.ENUM_CONSTANT_DEF))
+        {
+            //pop
+            mCurrentFrame = mCurrentFrame.getParent();
+        }
+    }
+
+    /**
+     * Process a variable token.
+     * Check whether a local variable or parameter shadows a field.
+     * Store a field for later comparison with local variables and parameters.
+     * @param aAST the variable token.
+     */
+    private void processVariable(DetailAST aAST)
+    {
+        if (ScopeUtils.inInterfaceOrAnnotationBlock(aAST)
+            || (!ScopeUtils.isLocalVariableDef(aAST)
+            && (aAST.getType() != TokenTypes.PARAMETER_DEF)))
+        {
+            // do nothing
+            return;
+        }
+        //local variable or parameter. Does it shadow a field?
+        final DetailAST nameAST = aAST.findFirstToken(TokenTypes.IDENT);
+        final String name = nameAST.getText();
+        if ((mCurrentFrame.containsStaticField(name)
+             || (!inStatic(aAST) && mCurrentFrame.containsInstanceField(name)))
+            && ((mRegexp == null) || (!getRegexp().matcher(name).find()))
+            && !isIgnoredSetterParam(aAST, name)
+            && !isIgnoredConstructorParam(aAST)
+            && !isIgnoredParamOfAbstractMethod(aAST))
+        {
+            log(nameAST, "hidden.field", name);
+        }
+    }
+
+    /**
+     * Determines whether an AST node is in a static method or static
+     * initializer.
+     * @param aAST the node to check.
+     * @return true if aAST is in a static method or a static block;
+     */
+    private static boolean inStatic(DetailAST aAST)
+    {
+        DetailAST parent = aAST.getParent();
+        while (parent != null) {
+            switch (parent.getType()) {
+            case TokenTypes.STATIC_INIT:
+                return true;
+            case TokenTypes.METHOD_DEF:
+                final DetailAST mods =
+                    parent.findFirstToken(TokenTypes.MODIFIERS);
+                return mods.branchContains(TokenTypes.LITERAL_STATIC);
+            default:
+                parent = parent.getParent();
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Decides whether to ignore an AST node that is the parameter of a
+     * setter method, where the property setter method for field 'xyz' has
+     * name 'setXyz', one parameter named 'xyz', and return type void.
+     * @param aAST the AST to check.
+     * @param aName the name of aAST.
+     * @return true if aAST should be ignored because check property
+     * ignoreSetter is true and aAST is the parameter of a setter method.
+     */
+    private boolean isIgnoredSetterParam(DetailAST aAST, String aName)
+    {
+        if (aAST.getType() != TokenTypes.PARAMETER_DEF
+            || !mIgnoreSetter)
+        {
+            return false;
+        }
+        //single parameter?
+        final DetailAST parametersAST = aAST.getParent();
+        if (parametersAST.getChildCount() != 1) {
+            return false;
+        }
+        //method parameter, not constructor parameter?
+        final DetailAST methodAST = parametersAST.getParent();
+        if (methodAST.getType() != TokenTypes.METHOD_DEF) {
+            return false;
+        }
+        //void?
+        final DetailAST typeAST = methodAST.findFirstToken(TokenTypes.TYPE);
+        if (!typeAST.branchContains(TokenTypes.LITERAL_VOID)) {
+            return false;
+        }
+
+        //property setter name?
+        final String methodName =
+                methodAST.findFirstToken(TokenTypes.IDENT).getText();
+        final String expectedName = "set" + capitalize(aName);
+        return methodName.equals(expectedName);
+    }
+
+    /**
+     * Capitalizes a given property name the way we expect to see it in
+     * a setter name.
+     * @param aName a property name
+     * @return capitalized property name
+     */
+    private static String capitalize(final String aName)
+    {
+        if (aName == null || aName.length() == 0) {
+            return aName;
+        }
+        // we should not capitalize the first character if the second
+        // one is a capital one, since according to JavaBeans spec
+        // setXYzz() is a setter for XYzz property, not for xYzz one.
+        if (aName.length() > 1 && Character.isUpperCase(aName.charAt(1))) {
+            return aName;
+        }
+        return aName.substring(0, 1).toUpperCase() + aName.substring(1);
+    }
+
+    /**
+     * Decides whether to ignore an AST node that is the parameter of a
+     * constructor.
+     * @param aAST the AST to check.
+     * @return true if aAST should be ignored because check property
+     * ignoreConstructorParameter is true and aAST is a constructor parameter.
+     */
+    private boolean isIgnoredConstructorParam(DetailAST aAST)
+    {
+        if ((aAST.getType() != TokenTypes.PARAMETER_DEF)
+            || !mIgnoreConstructorParameter)
+        {
+            return false;
+        }
+        final DetailAST parametersAST = aAST.getParent();
+        final DetailAST constructorAST = parametersAST.getParent();
+        return (constructorAST.getType() == TokenTypes.CTOR_DEF);
+    }
+
+    /**
+     * Decides whether to ignore an AST node that is the parameter of an
+     * abstract method.
+     * @param aAST the AST to check.
+     * @return true if aAST should be ignored because check property
+     * ignoreAbstactMethods is true and aAST is a parameter of abstract
+     * methods.
+     */
+    private boolean isIgnoredParamOfAbstractMethod(DetailAST aAST)
+    {
+        if ((aAST.getType() != TokenTypes.PARAMETER_DEF)
+            || !mIgnoreAbstractMethods)
+        {
+            return false;
+        }
+        final DetailAST method = aAST.getParent().getParent();
+        if (method.getType() != TokenTypes.METHOD_DEF) {
+            return false;
+        }
+        final DetailAST mods = method.findFirstToken(TokenTypes.MODIFIERS);
+        return ((mods != null) && mods.branchContains(TokenTypes.ABSTRACT));
+    }
+
+    /**
+     * Set the ignore format to the specified regular expression.
+     * @param aFormat a <code>String</code> value
+     * @throws ConversionException unable to parse aFormat
+     */
+    public void setIgnoreFormat(String aFormat)
+        throws ConversionException
+    {
+        try {
+            mRegexp = Utils.getPattern(aFormat);
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+    }
+
+    /**
+     * Set whether to ignore the parameter of a property setter method.
+     * @param aIgnoreSetter decide whether to ignore the parameter of
+     * a property setter method.
+     */
+    public void setIgnoreSetter(boolean aIgnoreSetter)
+    {
+        mIgnoreSetter = aIgnoreSetter;
+    }
+
+    /**
+     * Set whether to ignore constructor parameters.
+     * @param aIgnoreConstructorParameter decide whether to ignore
+     * constructor parameters.
+     */
+    public void setIgnoreConstructorParameter(
+        boolean aIgnoreConstructorParameter)
+    {
+        mIgnoreConstructorParameter = aIgnoreConstructorParameter;
+    }
+
+    /**
+     * Set whether to ignore parameters of abstract methods.
+     * @param aIgnoreAbstractMethods decide whether to ignore
+     * parameters of abstract methods.
+     */
+    public void setIgnoreAbstractMethods(
+        boolean aIgnoreAbstractMethods)
+    {
+        mIgnoreAbstractMethods = aIgnoreAbstractMethods;
+    }
+
+    /** @return the regexp to match against */
+    public Pattern getRegexp()
+    {
+        return mRegexp;
+    }
+
+    /**
+     * Holds the names of static and instance fields of a type.
+     * @author Rick Giles
+     * Describe class FieldFrame
+     * @author Rick Giles
+     * @version Oct 26, 2003
+     */
+    private static class FieldFrame
+    {
+        /** is this a static inner type */
+        private final boolean mStaticType;
+
+        /** parent frame. */
+        private final FieldFrame mParent;
+
+        /** set of instance field names */
+        private final Set<String> mInstanceFields = Sets.newHashSet();
+
+        /** set of static field names */
+        private final Set<String> mStaticFields = Sets.newHashSet();
+
+        /** Creates new frame.
+         * @param aStaticType is this a static inner type (class or enum).
+         * @param aParent parent frame.
+         */
+        public FieldFrame(FieldFrame aParent, boolean aStaticType)
+        {
+            mParent = aParent;
+            mStaticType = aStaticType;
+        }
+
+        /** Is this frame for static inner type.
+         * @return is this field frame for static inner type.
+         */
+        boolean isStaticType()
+        {
+            return mStaticType;
+        }
+
+        /**
+         * Adds an instance field to this FieldFrame.
+         * @param aField  the name of the instance field.
+         */
+        public void addInstanceField(String aField)
+        {
+            mInstanceFields.add(aField);
+        }
+
+        /**
+         * Adds a static field to this FieldFrame.
+         * @param aField  the name of the instance field.
+         */
+        public void addStaticField(String aField)
+        {
+            mStaticFields.add(aField);
+        }
+
+        /**
+         * Determines whether this FieldFrame contains an instance field.
+         * @param aField the field to check.
+         * @return true if this FieldFrame contains instance field aField.
+         */
+        public boolean containsInstanceField(String aField)
+        {
+            return mInstanceFields.contains(aField)
+                    || !isStaticType()
+                    && (mParent != null)
+                    && mParent.containsInstanceField(aField);
+
+        }
+
+        /**
+         * Determines whether this FieldFrame contains a static field.
+         * @param aField the field to check.
+         * @return true if this FieldFrame contains static field aField.
+         */
+        public boolean containsStaticField(String aField)
+        {
+            return mStaticFields.contains(aField)
+                    || (mParent != null)
+                    && mParent.containsStaticField(aField);
+
+        }
+
+        /**
+         * Getter for parent frame.
+         * @return parent frame.
+         */
+        public FieldFrame getParent()
+        {
+            return mParent;
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalCatchCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalCatchCheck.java
new file mode 100644
index 0000000..79efffa
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalCatchCheck.java
@@ -0,0 +1,103 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Catching java.lang.Exception, java.lang.Error or java.lang.RuntimeException
+ * is almost never acceptable.
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ * @author <a href="mailto:IliaDubinin91 at gmail.com">Ilja Dubinin</a>
+ */
+public final class IllegalCatchCheck extends AbstractIllegalCheck
+{
+    /** Creates new instance of the check. */
+    public IllegalCatchCheck()
+    {
+        super(new String[] {"Exception", "Error",
+                            "RuntimeException", "Throwable",
+                            "java.lang.Error",
+                            "java.lang.Exception",
+                            "java.lang.RuntimeException",
+                            "java.lang.Throwable",
+        });
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.LITERAL_CATCH};
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void visitToken(DetailAST aDetailAST)
+    {
+        final DetailAST paramDef =
+            aDetailAST.findFirstToken(TokenTypes.PARAMETER_DEF);
+        final DetailAST excTypeParent =
+                paramDef.findFirstToken(TokenTypes.TYPE);
+        final List<DetailAST> excTypes = getAllExceptionTypes(excTypeParent);
+
+        for (DetailAST excType : excTypes) {
+            final FullIdent ident = FullIdent.createFullIdent(excType);
+
+            if (isIllegalClassName(ident.getText())) {
+                log(aDetailAST, "illegal.catch", ident.getText());
+            }
+        }
+    }
+
+    /**
+     * Finds all exception types in current catch.
+     * We need it till we can have few different exception types into one catch.
+     * @param aParentToken - parent node for types (TYPE or BOR)
+     * @return list, that contains all exception types in current catch
+     */
+    public List<DetailAST> getAllExceptionTypes(DetailAST aParentToken)
+    {
+        DetailAST currentNode = aParentToken.getFirstChild();
+        final List<DetailAST> exceptionTypes = new LinkedList<DetailAST>();
+        if (currentNode.getType() == TokenTypes.BOR) {
+            exceptionTypes.addAll(getAllExceptionTypes(currentNode));
+            currentNode = currentNode.getNextSibling();
+            if (currentNode != null) {
+                exceptionTypes.add(currentNode);
+            }
+        }
+        else {
+            exceptionTypes.add(currentNode);
+            while ((currentNode = currentNode.getNextSibling()) != null) {
+                exceptionTypes.add(currentNode);
+            }
+        }
+        return exceptionTypes;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java
new file mode 100644
index 0000000..a6584a1
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java
@@ -0,0 +1,330 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import antlr.collections.AST;
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+// TODO: Clean up potential duplicate code here and in UnusedImportsCheck
+/**
+ * <p>
+ * Checks for illegal instantiations where a factory method is preferred.
+ * </p>
+ * <p>
+ * Rationale: Depending on the project, for some classes it might be
+ * preferable to create instances through factory methods rather than
+ * calling the constructor.
+ * </p>
+ * <p>
+ * A simple example is the java.lang.Boolean class, to save memory and CPU
+ * cycles it is preferable to use the predeifined constants TRUE and FALSE.
+ * Constructor invocations should be replaced by calls to Boolean.valueOf().
+ * </p>
+ * <p>
+ * Some extremely performance sensitive projects may require the use of factory
+ * methods for other classes as well, to enforce the usage of number caches or
+ * object pools.
+ * </p>
+ * <p>
+ * Limitations: It is currently not possible to specify array classes.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="IllegalInstantiation"/>
+ * </pre>
+ * @author lkuehne
+ */
+public class IllegalInstantiationCheck
+    extends Check
+{
+    /** Set of fully qualified classnames. E.g. "java.lang.Boolean" */
+    private final Set<String> mIllegalClasses = Sets.newHashSet();
+
+    /** name of the package */
+    private String mPkgName;
+
+    /** the imports for the file */
+    private final Set<FullIdent> mImports = Sets.newHashSet();
+
+    /** the class names defined in the file */
+    private final Set<String> mClassNames = Sets.newHashSet();
+
+    /** the instantiations in the file */
+    private final Set<DetailAST> mInstantiations = Sets.newHashSet();
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.IMPORT,
+            TokenTypes.LITERAL_NEW,
+            TokenTypes.PACKAGE_DEF,
+            TokenTypes.CLASS_DEF,
+        };
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        // Return an empty array to not allow user to change configuration.
+        return new int[] {};
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return new int[] {
+            TokenTypes.IMPORT,
+            TokenTypes.LITERAL_NEW,
+            TokenTypes.PACKAGE_DEF,
+        };
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        super.beginTree(aRootAST);
+        mPkgName = null;
+        mImports.clear();
+        mInstantiations.clear();
+        mClassNames.clear();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.LITERAL_NEW:
+            processLiteralNew(aAST);
+            break;
+        case TokenTypes.PACKAGE_DEF:
+            processPackageDef(aAST);
+            break;
+        case TokenTypes.IMPORT:
+            processImport(aAST);
+            break;
+        case TokenTypes.CLASS_DEF:
+            processClassDef(aAST);
+            break;
+        default:
+            throw new IllegalArgumentException("Unknown type " + aAST);
+        }
+    }
+
+    @Override
+    public void finishTree(DetailAST aRootAST)
+    {
+        for (DetailAST literalNewAST : mInstantiations) {
+            postprocessLiteralNew(literalNewAST);
+        }
+    }
+
+    /**
+     * Collects classes defined in the source file. Required
+     * to avoid false alarms for local vs. java.lang classes.
+     *
+     * @param aAST the classdef token.
+     */
+    private void processClassDef(DetailAST aAST)
+    {
+        final DetailAST identToken = aAST.findFirstToken(TokenTypes.IDENT);
+        final String className = identToken.getText();
+        mClassNames.add(className);
+    }
+
+    /**
+     * Perform processing for an import token
+     * @param aAST the import token
+     */
+    private void processImport(DetailAST aAST)
+    {
+        final FullIdent name = FullIdent.createFullIdentBelow(aAST);
+        if (name != null) {
+            // Note: different from UnusedImportsCheck.processImport(),
+            // '.*' imports are also added here
+            mImports.add(name);
+        }
+    }
+
+    /**
+     * Perform processing for an package token
+     * @param aAST the package token
+     */
+    private void processPackageDef(DetailAST aAST)
+    {
+        final DetailAST packageNameAST = aAST.getLastChild()
+                .getPreviousSibling();
+        final FullIdent packageIdent =
+                FullIdent.createFullIdent(packageNameAST);
+        mPkgName = packageIdent.getText();
+    }
+
+    /**
+     * Collects a "new" token.
+     * @param aAST the "new" token
+     */
+    private void processLiteralNew(DetailAST aAST)
+    {
+        if (aAST.getParent().getType() == TokenTypes.METHOD_REF) {
+            return;
+        }
+        mInstantiations.add(aAST);
+    }
+
+    /**
+     * Processes one of the collected "new" tokens when treewalking
+     * has finished.
+     * @param aAST the "new" token.
+     */
+    private void postprocessLiteralNew(DetailAST aAST)
+    {
+        final DetailAST typeNameAST = aAST.getFirstChild();
+        final AST nameSibling = typeNameAST.getNextSibling();
+        if ((nameSibling != null)
+                && (nameSibling.getType() == TokenTypes.ARRAY_DECLARATOR))
+        {
+            // aAST == "new Boolean[]"
+            return;
+        }
+
+        final FullIdent typeIdent = FullIdent.createFullIdent(typeNameAST);
+        final String typeName = typeIdent.getText();
+        final int lineNo = aAST.getLineNo();
+        final int colNo = aAST.getColumnNo();
+        final String fqClassName = getIllegalInstantiation(typeName);
+        if (fqClassName != null) {
+            log(lineNo, colNo, "instantiation.avoid", fqClassName);
+        }
+    }
+
+    /**
+     * Checks illegal instantiations.
+     * @param aClassName instantiated class, may or may not be qualified
+     * @return the fully qualified class name of aClassName
+     * or null if instantiation of aClassName is OK
+     */
+    private String getIllegalInstantiation(String aClassName)
+    {
+        final String javaLang = "java.lang.";
+
+        if (mIllegalClasses.contains(aClassName)) {
+            return aClassName;
+        }
+
+        final int clsNameLen = aClassName.length();
+        final int pkgNameLen = (mPkgName == null) ? 0 : mPkgName.length();
+
+        for (String illegal : mIllegalClasses) {
+            final int illegalLen = illegal.length();
+
+            // class from java.lang
+            if (((illegalLen - javaLang.length()) == clsNameLen)
+                && illegal.endsWith(aClassName)
+                && illegal.startsWith(javaLang))
+            {
+                // java.lang needs no import, but a class without import might
+                // also come from the same file or be in the same package.
+                // E.g. if a class defines an inner class "Boolean",
+                // the expression "new Boolean()" refers to that class,
+                // not to java.lang.Boolean
+
+                final boolean isSameFile = mClassNames.contains(aClassName);
+
+                boolean isSamePackage = false;
+                try {
+                    final ClassLoader classLoader = getClassLoader();
+                    if (classLoader != null) {
+                        final String fqName = mPkgName + "." + aClassName;
+                        classLoader.loadClass(fqName);
+                        // no ClassNotFoundException, fqName is a known class
+                        isSamePackage = true;
+                    }
+                }
+                catch (final ClassNotFoundException ex) {
+                    // not a class from the same package
+                    isSamePackage = false;
+                }
+
+                if (!(isSameFile || isSamePackage)) {
+                    return illegal;
+                }
+            }
+
+            // class from same package
+
+            // the toplevel package (mPkgName == null) is covered by the
+            // "illegalInsts.contains(aClassName)" check above
+
+            // the test is the "no garbage" version of
+            // illegal.equals(mPkgName + "." + aClassName)
+            if ((mPkgName != null)
+                && (clsNameLen == illegalLen - pkgNameLen - 1)
+                && (illegal.charAt(pkgNameLen) == '.')
+                && illegal.endsWith(aClassName)
+                && illegal.startsWith(mPkgName))
+            {
+                return illegal;
+            }
+            // import statements
+            for (FullIdent importLineText : mImports) {
+                final String importArg = importLineText.getText();
+                if (importArg.endsWith(".*")) {
+                    final String fqClass =
+                        importArg.substring(0, importArg.length() - 1)
+                        + aClassName;
+                    // assume that illegalInsts only contain existing classes
+                    // or else we might create a false alarm here
+                    if (mIllegalClasses.contains(fqClass)) {
+                        return fqClass;
+                    }
+                }
+                else {
+                    if (Utils.baseClassname(importArg).equals(aClassName)
+                        && mIllegalClasses.contains(importArg))
+                    {
+                        return importArg;
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Sets the classes that are illegal to instantiate.
+     * @param aClassNames a comma seperate list of class names
+     */
+    public void setClasses(String aClassNames)
+    {
+        mIllegalClasses.clear();
+        final StringTokenizer tok = new StringTokenizer(aClassNames, ",");
+        while (tok.hasMoreTokens()) {
+            mIllegalClasses.add(tok.nextToken());
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalThrowsCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalThrowsCheck.java
new file mode 100644
index 0000000..d2d02b9
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalThrowsCheck.java
@@ -0,0 +1,108 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import java.util.Set;
+
+/**
+ * Throwing java.lang.Error or java.lang.RuntimeException
+ * is almost never acceptable.
+ * @author Oliver Burn
+ */
+public final class IllegalThrowsCheck extends AbstractIllegalCheck
+{
+
+    /** Default ignored method names. */
+    private static final String[] DEFAULT_IGNORED_METHOD_NAMES = {
+        "finalize",
+    };
+
+    /** methods which should be ignored. */
+    private final Set<String> mIgnoredMethodNames = Sets.newHashSet();
+
+    /** Creates new instance of the check. */
+    public IllegalThrowsCheck()
+    {
+        super(new String[] {"Error",
+                            "RuntimeException", "Throwable",
+                            "java.lang.Error",
+                            "java.lang.RuntimeException",
+                            "java.lang.Throwable",
+        });
+        setIgnoredMethodNames(DEFAULT_IGNORED_METHOD_NAMES);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.LITERAL_THROWS};
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void visitToken(DetailAST aDetailAST)
+    {
+        DetailAST token = aDetailAST.getFirstChild();
+        // Check if the method with the given name should be ignored.
+        if (!(shouldIgnoreMethod(aDetailAST.getParent().findFirstToken(
+                                     TokenTypes.IDENT).getText())))
+        {
+            while (token != null) {
+                if (token.getType() != TokenTypes.COMMA) {
+                    final FullIdent ident = FullIdent.createFullIdent(token);
+                    if (isIllegalClassName(ident.getText())) {
+                        log(token, "illegal.throw", ident.getText());
+                    }
+                }
+                token = token.getNextSibling();
+            }
+        }
+    }
+
+    /**
+     * Check if the method is specified in the ignore method list
+     * @param aName the name to check
+     * @return whether the method with the passed name should be ignored
+     */
+    private boolean shouldIgnoreMethod(String aName)
+    {
+        return mIgnoredMethodNames.contains(aName);
+    }
+
+    /**
+     * Set the list of ignore method names.
+     * @param aMethodNames array of ignored method names
+     */
+    public void setIgnoredMethodNames(String[] aMethodNames)
+    {
+        mIgnoredMethodNames.clear();
+        for (String element : aMethodNames) {
+            mIgnoredMethodNames.add(element);
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTokenCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTokenCheck.java
new file mode 100644
index 0000000..3d867a0
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTokenCheck.java
@@ -0,0 +1,95 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import java.util.Set;
+
+/**
+ * <p>
+ * Checks for illegal tokens.
+ * </p>
+ * <p>
+ * Rational: Certain language features are often lead to hard to
+ * maintain code or are non-obvious to novice developers. Others
+ * may be discouraged in certain frameworks, such as not having
+ * native methods in EJB components.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="IllegalToken"/>
+ * </pre>
+ * <p> An example of how to configure the check to forbid
+ * a {@link TokenTypes#LITERAL_NATIVE LITERAL_NATIVE} token is:
+ * </p>
+ * <pre>
+ * <module name="IllegalToken">
+ *     <property name="tokens" value="LITERAL_NATIVE"/>
+ * </module>
+ * </pre>
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ * @author Rick Giles
+ */
+public class IllegalTokenCheck
+    extends Check
+{
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.LITERAL_SWITCH,
+            TokenTypes.POST_INC,
+            TokenTypes.POST_DEC,
+        };
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        // Any tokens set by property 'tokens' are acceptable
+        int[] tokensToCopy = getDefaultTokens();
+        final Set<String> tokenNames = getTokenNames();
+        if (!tokenNames.isEmpty()) {
+            tokensToCopy = new int[tokenNames.size()];
+            int i = 0;
+            for (String name : tokenNames) {
+                tokensToCopy[i] = TokenTypes.getTokenId(name);
+                i++;
+            }
+        }
+        final int[] copy = new int[tokensToCopy.length];
+        System.arraycopy(tokensToCopy, 0, copy, 0, tokensToCopy.length);
+        return copy;
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        log(
+            aAST.getLineNo(),
+            aAST.getColumnNo(),
+            "illegal.token",
+            aAST.getText());
+    }
+
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTokenTextCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTokenTextCheck.java
new file mode 100644
index 0000000..b1cc761
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTokenTextCheck.java
@@ -0,0 +1,141 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.AbstractFormatCheck;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+/**
+ * <p>
+ * Checks for illegal token text.
+ * </p>
+ * <p> An example of how to configure the check to forbid String literals
+ * containing <code>"a href"</code> is:
+ * </p>
+ * <pre>
+ * <module name="IllegalTokenText">
+ *     <property name="tokens" value="STRING_LITERAL"/>
+ *     <property name="format" value="a href"/>
+ * </module>
+ * </pre>
+ * <p> An example of how to configure the check to forbid leading zeros in an
+ * integer literal, other than zero and a hex literal is:
+ * </p>
+ * <pre>
+ * <module name="IllegalTokenText">
+ *     <property name="tokens" value="NUM_INT,NUM_LONG"/>
+ *     <property name="format" value="^0[^lx]"/>
+ *     <property name="ignoreCase" value="true"/>
+ * </module>
+ * </pre>
+ * @author Rick Giles
+ */
+public class IllegalTokenTextCheck
+    extends AbstractFormatCheck
+{
+    /**
+     * Custom message for report if illegal regexp found
+     * ignored if empty.
+     */
+    private String mMessage = "";
+
+    /**
+     * Instantiates a new instance.
+     */
+    public IllegalTokenTextCheck()
+    {
+        super("$^"); // the empty language
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[0];
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        // Any tokens set by property 'tokens' are acceptable
+        final Set<String> tokenNames = getTokenNames();
+        final int[] result = new int[tokenNames.size()];
+        int i = 0;
+        for (final String name : tokenNames) {
+            result[i] = TokenTypes.getTokenId(name);
+            i++;
+        }
+        return result;
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final String text = aAST.getText();
+        if (getRegexp().matcher(text).find()) {
+            String message = getMessage();
+            if ("".equals(message)) {
+                message = "illegal.token.text";
+            }
+            log(
+                aAST.getLineNo(),
+                aAST.getColumnNo(),
+                message,
+                getFormat());
+        }
+    }
+
+    /**
+     * Setter for message property.
+     * @param aMessage custom message which should be used
+     *                 to report about violations.
+     */
+    public void setMessage(String aMessage)
+    {
+        mMessage = (null == aMessage) ? "" : aMessage;
+    }
+
+    /**
+     * Getter for message property.
+     * @return custom message which should be used
+     * to report about violations.
+     */
+    public String getMessage()
+    {
+        return mMessage;
+    }
+
+    /**
+     * Set whether or not the match is case sensitive.
+     * @param aCaseInsensitive true if the match is case insensitive.
+     */
+    public void setIgnoreCase(boolean aCaseInsensitive)
+    {
+        if (aCaseInsensitive) {
+            setCompileFlags(Pattern.CASE_INSENSITIVE);
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheck.java
new file mode 100644
index 0000000..81dd01d
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheck.java
@@ -0,0 +1,269 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.AbstractFormatCheck;
+import com.puppycrawl.tools.checkstyle.checks.CheckUtils;
+import java.util.Set;
+
+/**
+ * <p>
+ * Checks that particular class are never used as types in variable
+ * declarations, return values or parameters. Includes
+ * a pattern check that by default disallows abstract classes.
+ * </p>
+ * <p>
+ * Rationale:
+ * Helps reduce coupling on concrete classes. In addition abstract
+ * classes should be thought of a convenience base class
+ * implementations of interfaces and as such are not types themsleves.
+ * </p>
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ */
+public final class IllegalTypeCheck extends AbstractFormatCheck
+{
+    /** Default value of pattern for illegal class name. */
+    private static final String DEFAULT_FORMAT = "^(.*[\\.])?Abstract.*$";
+    /** Abstract classes legal by default. */
+    private static final String[] DEFAULT_LEGAL_ABSTRACT_NAMES = {};
+    /** Types illegal by default. */
+    private static final String[] DEFAULT_ILLEGAL_TYPES = {
+        "GregorianCalendar",
+        "Hashtable",
+        "HashSet",
+        "HashMap",
+        "ArrayList",
+        "LinkedList",
+        "LinkedHashMap",
+        "LinkedHashSet",
+        "TreeSet",
+        "TreeMap",
+        "Vector",
+        "java.util.GregorianCalendar",
+        "java.util.Hashtable",
+        "java.util.HashSet",
+        "java.util.HashMap",
+        "java.util.ArrayList",
+        "java.util.LinkedList",
+        "java.util.LinkedHashMap",
+        "java.util.LinkedHashSet",
+        "java.util.TreeSet",
+        "java.util.TreeMap",
+        "java.util.Vector",
+    };
+
+    /** Default ignored method names. */
+    private static final String[] DEFAULT_IGNORED_METHOD_NAMES = {
+        "getInitialContext",
+        "getEnvironment",
+    };
+
+    /** illegal classes. */
+    private final Set<String> mIllegalClassNames = Sets.newHashSet();
+    /** legal abstract classes. */
+    private final Set<String> mLegalAbstractClassNames = Sets.newHashSet();
+    /** methods which should be ignored. */
+    private final Set<String> mIgnoredMethodNames = Sets.newHashSet();
+
+    /** Creates new instance of the check. */
+    public IllegalTypeCheck()
+    {
+        super(DEFAULT_FORMAT);
+        setIllegalClassNames(DEFAULT_ILLEGAL_TYPES);
+        setLegalAbstractClassNames(DEFAULT_LEGAL_ABSTRACT_NAMES);
+        setIgnoredMethodNames(DEFAULT_IGNORED_METHOD_NAMES);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.VARIABLE_DEF,
+            TokenTypes.PARAMETER_DEF,
+            TokenTypes.METHOD_DEF,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.METHOD_DEF:
+            visitMethodDef(aAST);
+            break;
+        case TokenTypes.VARIABLE_DEF:
+            visitVariableDef(aAST);
+            break;
+        case TokenTypes.PARAMETER_DEF:
+            visitParameterDef(aAST);
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    /**
+     * Checks return type of a given method.
+     * @param aAST method for check.
+     */
+    private void visitMethodDef(DetailAST aAST)
+    {
+        if (isCheckedMethod(aAST)) {
+            checkClassName(aAST);
+        }
+    }
+
+    /**
+     * Checks type of parameters.
+     * @param aAST parameter list for check.
+     */
+    private void visitParameterDef(DetailAST aAST)
+    {
+        final DetailAST grandParentAST = aAST.getParent().getParent();
+
+        if ((grandParentAST.getType() == TokenTypes.METHOD_DEF)
+            && isCheckedMethod(grandParentAST))
+        {
+            checkClassName(aAST);
+        }
+    }
+
+    /**
+     * Checks type of given variable.
+     * @param aAST variable to check.
+     */
+    private void visitVariableDef(DetailAST aAST)
+    {
+        checkClassName(aAST);
+    }
+
+    /**
+     * Checks type of given method, parameter or variable.
+     * @param aAST node to check.
+     */
+    private void checkClassName(DetailAST aAST)
+    {
+        final DetailAST type = aAST.findFirstToken(TokenTypes.TYPE);
+        final FullIdent ident = CheckUtils.createFullType(type);
+
+        if (isMatchingClassName(ident.getText())) {
+            log(ident.getLineNo(), ident.getColumnNo(),
+                "illegal.type", ident.getText());
+        }
+    }
+
+    /**
+     * @param aClassName class name to check.
+     * @return true if given class name is one of illegal classes
+     *         or if it matches to abstract class names pattern.
+     */
+    private boolean isMatchingClassName(String aClassName)
+    {
+        return mIllegalClassNames.contains(aClassName)
+            || (!mLegalAbstractClassNames.contains(aClassName)
+                && getRegexp().matcher(aClassName).find());
+    }
+
+    /**
+     * @param aAST method def to check.
+     * @return true if we should check this method.
+     */
+    private boolean isCheckedMethod(DetailAST aAST)
+    {
+        final String methodName =
+            aAST.findFirstToken(TokenTypes.IDENT).getText();
+        return !mIgnoredMethodNames.contains(methodName);
+    }
+
+    /**
+     * Set the list of illegal variable types.
+     * @param aClassNames array of illegal variable types
+     */
+    public void setIllegalClassNames(String[] aClassNames)
+    {
+        mIllegalClassNames.clear();
+        for (String name : aClassNames) {
+            mIllegalClassNames.add(name);
+            final int lastDot = name.lastIndexOf(".");
+            if ((lastDot > 0) && (lastDot < (name.length() - 1))) {
+                final String shortName =
+                    name.substring(name.lastIndexOf(".") + 1);
+                mIllegalClassNames.add(shortName);
+            }
+        }
+    }
+
+    /**
+     * Get the list of illegal variable types.
+     * @return array of illegal variable types
+     */
+    public String[] getIllegalClassNames()
+    {
+        return mIllegalClassNames.toArray(
+            new String[mIllegalClassNames.size()]);
+    }
+
+    /**
+     * Set the list of ignore method names.
+     * @param aMethodNames array of ignored method names
+     */
+    public void setIgnoredMethodNames(String[] aMethodNames)
+    {
+        mIgnoredMethodNames.clear();
+        for (String element : aMethodNames) {
+            mIgnoredMethodNames.add(element);
+        }
+    }
+
+    /**
+     * Get the list of ignored method names.
+     * @return array of ignored method names
+     */
+    public String[] getIgnoredMethodNames()
+    {
+        return mIgnoredMethodNames.toArray(
+            new String[mIgnoredMethodNames.size()]);
+    }
+
+    /**
+     * Set the list of legal abstract class names.
+     * @param aClassNames array of legal abstract class names
+     */
+    public void setLegalAbstractClassNames(String[] aClassNames)
+    {
+        mLegalAbstractClassNames.clear();
+        for (String element : aClassNames) {
+            mLegalAbstractClassNames.add(element);
+        }
+    }
+
+    /**
+     * Get the list of legal abstract class names.
+     * @return array of legal abstract class names
+     */
+    public String[] getLegalAbstractClassNames()
+    {
+        return mLegalAbstractClassNames.toArray(
+            new String[mLegalAbstractClassNames.size()]);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheck.java
new file mode 100644
index 0000000..7858c5d
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheck.java
@@ -0,0 +1,238 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import java.util.Arrays;
+
+import antlr.collections.AST;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * <p>
+ * Checks for assignments in subexpressions, such as in
+ * <code>String s = Integer.toString(i = 2);</code>.
+ * </p>
+ * <p>
+ * Rationale: With the exception of <code>for</code> iterators, all assignments
+ * should occur in their own toplevel statement to increase readability.
+ * With inner assignments like the above it is difficult to see all places
+ * where a variable is set.
+ * </p>
+ *
+ * @author lkuehne
+ */
+public class InnerAssignmentCheck
+        extends Check
+{
+    /**
+     * list of allowed AST types from an assignement AST node
+     * towards the root.
+     */
+    private static final int[][] ALLOWED_ASSIGMENT_CONTEXT = {
+        {TokenTypes.EXPR, TokenTypes.SLIST},
+        {TokenTypes.VARIABLE_DEF},
+        {TokenTypes.EXPR, TokenTypes.ELIST, TokenTypes.FOR_INIT},
+        {TokenTypes.EXPR, TokenTypes.ELIST, TokenTypes.FOR_ITERATOR},
+        {TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR},
+        {
+            TokenTypes.RESOURCE,
+            TokenTypes.RESOURCES,
+            TokenTypes.RESOURCE_SPECIFICATION,
+        },
+    };
+
+    /**
+     * list of allowed AST types from an assignement AST node
+     * towards the root.
+     */
+    private static final int[][] CONTROL_CONTEXT = {
+        {TokenTypes.EXPR, TokenTypes.LITERAL_DO},
+        {TokenTypes.EXPR, TokenTypes.LITERAL_FOR},
+        {TokenTypes.EXPR, TokenTypes.LITERAL_WHILE},
+        {TokenTypes.EXPR, TokenTypes.LITERAL_IF},
+        {TokenTypes.EXPR, TokenTypes.LITERAL_ELSE},
+    };
+
+    /**
+     * list of allowed AST types from a comparison node (above an assignement)
+     * towards the root.
+     */
+    private static final int[][] ALLOWED_ASSIGMENT_IN_COMPARISON_CONTEXT = {
+        {TokenTypes.EXPR, TokenTypes.LITERAL_WHILE, },
+    };
+
+    /**
+     * The token types that identify comparison operators.
+     */
+    private static final int[] COMPARISON_TYPES = {
+        TokenTypes.EQUAL,
+        TokenTypes.GE,
+        TokenTypes.GT,
+        TokenTypes.LE,
+        TokenTypes.LT,
+        TokenTypes.NOT_EQUAL,
+    };
+
+    static {
+        Arrays.sort(COMPARISON_TYPES);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.ASSIGN,            // '='
+            TokenTypes.DIV_ASSIGN,        // "/="
+            TokenTypes.PLUS_ASSIGN,       // "+="
+            TokenTypes.MINUS_ASSIGN,      //"-="
+            TokenTypes.STAR_ASSIGN,       // "*="
+            TokenTypes.MOD_ASSIGN,        // "%="
+            TokenTypes.SR_ASSIGN,         // ">>="
+            TokenTypes.BSR_ASSIGN,        // ">>>="
+            TokenTypes.SL_ASSIGN,         // "<<="
+            TokenTypes.BXOR_ASSIGN,       // "^="
+            TokenTypes.BOR_ASSIGN,        // "|="
+            TokenTypes.BAND_ASSIGN,       // "&="
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (isInContext(aAST, ALLOWED_ASSIGMENT_CONTEXT)) {
+            return;
+        }
+
+        if (isInNoBraceControlStatement(aAST)) {
+            return;
+        }
+
+        if (isInWhileIdiom(aAST)) {
+            return;
+        }
+
+        log(aAST.getLineNo(), aAST.getColumnNo(), "assignment.inner.avoid");
+    }
+
+    /**
+     * Determines if aAST is in the body of a flow control statement without
+     * braces. An example of such a statement would be
+     * <p>
+     * <pre>
+     * if (y < 0)
+     *     x = y;
+     * </pre>
+     * </p>
+     * <p>
+     * This leads to the following AST structure:
+     * </p>
+     * <p>
+     * <pre>
+     * LITERAL_IF
+     *     LPAREN
+     *     EXPR // test
+     *     RPAREN
+     *     EXPR // body
+     *     SEMI
+     * </pre>
+     * </p>
+     * <p>
+     * We need to ensure that aAST is in the body and not in the test.
+     * </p>
+     *
+     * @param aAST an assignment operator AST
+     * @return whether aAST is in the body of a flow control statement
+     */
+    private static boolean isInNoBraceControlStatement(DetailAST aAST)
+    {
+        if (!isInContext(aAST, CONTROL_CONTEXT)) {
+            return false;
+        }
+        final DetailAST expr = aAST.getParent();
+        final AST exprNext = expr.getNextSibling();
+        return (exprNext != null) && (exprNext.getType() == TokenTypes.SEMI);
+    }
+
+    /**
+     * Tests whether the given AST is used in the "assignment in while test"
+     * idiom.
+     * <p>
+     * <pre>
+     * while ((b = is.read()) != -1) {
+     *   // work with b
+     * }
+     * </pre>
+     * </p>
+     *
+     * @param aAST assignment AST
+     * @return whether the context of the assignemt AST indicates the idiom
+     */
+    private boolean isInWhileIdiom(DetailAST aAST)
+    {
+        if (!isComparison(aAST.getParent())) {
+            return false;
+        }
+        return isInContext(
+                aAST.getParent(), ALLOWED_ASSIGMENT_IN_COMPARISON_CONTEXT);
+    }
+
+    /**
+     * Checks if an AST is a comparison operator.
+     * @param aAST the AST to check
+     * @return true iff aAST is a comparison operator.
+     */
+    private static boolean isComparison(DetailAST aAST)
+    {
+        final int astType = aAST.getType();
+        return (Arrays.binarySearch(COMPARISON_TYPES, astType) >= 0);
+    }
+
+    /**
+     * Tests whether the provided AST is in
+     * one of the given contexts.
+     *
+     * @param aAST the AST from which to start walking towards root
+     * @param aContextSet the contexts to test against.
+     *
+     * @return whether the parents nodes of aAST match
+     * one of the allowed type paths
+     */
+    private static boolean isInContext(DetailAST aAST, int[][] aContextSet)
+    {
+        for (int[] element : aContextSet) {
+            DetailAST current = aAST;
+            final int len = element.length;
+            for (int j = 0; j < len; j++) {
+                current = current.getParent();
+                final int expectedType = element[j];
+                if ((current == null) || (current.getType() != expectedType)) {
+                    break;
+                }
+                if (j == len - 1) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/JUnitTestCaseCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/JUnitTestCaseCheck.java
new file mode 100644
index 0000000..cd90a90
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/JUnitTestCaseCheck.java
@@ -0,0 +1,224 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+import com.puppycrawl.tools.checkstyle.checks.CheckUtils;
+
+/**
+ * Ensures that the setUp(), tearDown()methods are named correctly,
+ * have no arguments, return void and are either public or protected.
+ * Also ensures that suite() is named correctly, has no arguments, returns
+ * junit.framework.Test, and is public and static.
+ *
+ * Rationale: Developers will often misname one or more of these
+ * methods and not realise that the method is not being called.
+ *
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ */
+public final class JUnitTestCaseCheck extends Check
+{
+    /** <code>setUp()</code> method name. */
+    private static final String SET_UP_METHOD_NAME = "setUp";
+    /** <code>tearDown()</code> method name. */
+    private static final String TEAR_DOWN_METHOD_NAME = "tearDown";
+    /** <code>suite()</code> method name. */
+    private static final String SUITE_METHOD_NAME = "suite";
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.METHOD_DEF};
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.METHOD_DEF:
+            visitMethodDef(aAST);
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    /**
+     * Checks given method definition.
+     * @param aAST a method def node for check
+     */
+    private void visitMethodDef(DetailAST aAST)
+    {
+        final String name = aAST.findFirstToken(TokenTypes.IDENT).getText();
+
+        if (name.equalsIgnoreCase(SET_UP_METHOD_NAME)) {
+            checkSetUpTearDownMethod(aAST, name, SET_UP_METHOD_NAME);
+        }
+        else if (name.equalsIgnoreCase(TEAR_DOWN_METHOD_NAME)) {
+            checkSetUpTearDownMethod(aAST, name, TEAR_DOWN_METHOD_NAME);
+        }
+        else if (name.equalsIgnoreCase(SUITE_METHOD_NAME)) {
+            checkSuiteMethod(aAST, name);
+        }
+    }
+
+    /**
+     * Checks signature/name of <code>suite()</code>.
+     * @param aAST method definition node
+     * @param aActualName method name
+     */
+    private void checkSuiteMethod(DetailAST aAST, String aActualName)
+    {
+        if (!aActualName.equals(SUITE_METHOD_NAME)) {
+            log(aAST, "junit.method.name", SUITE_METHOD_NAME);
+        }
+
+        if (!isPublicAndStatic(aAST)) {
+            log(aAST, "junit.method.public.and.static", SUITE_METHOD_NAME);
+        }
+
+        // let's check return type
+        final DetailAST typeAST = aAST.findFirstToken(TokenTypes.TYPE);
+        final boolean isArray =
+            (typeAST.findFirstToken(TokenTypes.ARRAY_DECLARATOR) != null);
+        final String type = CheckUtils.createFullType(typeAST).getText();
+        if (isArray
+            || (!"Test".equals(type)
+            && !"junit.framework.Test".equals(type)))
+        {
+            log(aAST, "junit.method.return.type",
+                SUITE_METHOD_NAME, "junit.framework.Test");
+        }
+        checkParameters(aAST, SUITE_METHOD_NAME);
+    }
+
+    /**
+     * Checks signature/name of <code>setUp()</code>/<code>tearDown</code>.
+     * @param aAST method definition node
+     * @param aActualName actual method name
+     * @param aExpectedName expected method name
+     */
+    private void checkSetUpTearDownMethod(DetailAST aAST, String aActualName,
+                                          String aExpectedName)
+    {
+        if (!aActualName.equals(aExpectedName)) {
+            log(aAST, "junit.method.name", aActualName, aExpectedName);
+        }
+
+        if (!isPublicOrProtected(aAST)) {
+            log(aAST, "junit.method.protected.or.public", aExpectedName);
+        }
+
+        if (isStatic(aAST)) {
+            log(aAST, "junit.method.static", aExpectedName);
+        }
+
+        checkReturnValue(aAST, aActualName);
+        checkParameters(aAST, aActualName);
+    }
+
+    /**
+     * Checks that given method returns <code>void</code>.
+     * @param aAST method definition node
+     * @param aName method name
+     */
+    private void checkReturnValue(DetailAST aAST, String aName)
+    {
+        final DetailAST returnValueAST = aAST.findFirstToken(TokenTypes.TYPE);
+
+        if (returnValueAST.findFirstToken(TokenTypes.LITERAL_VOID) == null) {
+            log(aAST, "junit.method.return.type", aName, "void");
+        }
+    }
+
+    /**
+     * Checks return value of given method.
+     * @param aAST method definition node
+     * @param aName method name
+     */
+    private void checkParameters(DetailAST aAST, String aName)
+    {
+        final DetailAST parametersAST =
+            aAST.findFirstToken(TokenTypes.PARAMETERS);
+
+        if (parametersAST.getChildCount() != 0) {
+            log(aAST, "junit.method.parameters", aName);
+        }
+    }
+
+    /**
+     * Checks if given method declared as public or
+     * protected and non-static.
+     * @param aAST method definition node
+     * @return true if given method is declared as public or protected
+     */
+    private boolean isPublicOrProtected(DetailAST aAST)
+    {
+        final DetailAST modifiersAST =
+            aAST.findFirstToken(TokenTypes.MODIFIERS);
+        final DetailAST publicAST =
+            modifiersAST.findFirstToken(TokenTypes.LITERAL_PUBLIC);
+        final DetailAST protectedAST =
+            modifiersAST.findFirstToken(TokenTypes.LITERAL_PROTECTED);
+
+        return (publicAST != null) || (protectedAST != null);
+    }
+
+    /**
+     * Checks if given method declared as <code>public</code> and
+     * <code>static</code>.
+     * @param aAST method definition node
+     * @return true if given method is declared as public and static
+     */
+    private boolean isPublicAndStatic(DetailAST aAST)
+    {
+        final DetailAST modifiersAST =
+            aAST.findFirstToken(TokenTypes.MODIFIERS);
+        final DetailAST publicAST =
+            modifiersAST.findFirstToken(TokenTypes.LITERAL_PUBLIC);
+        final DetailAST staticAST =
+            modifiersAST.findFirstToken(TokenTypes.LITERAL_STATIC);
+
+        return (publicAST != null) && (staticAST != null);
+    }
+
+    /**
+     * Checks if given method declared as static.
+     * @param aAST method definition node
+     * @return true if given method is declared as static
+     */
+    private boolean isStatic(DetailAST aAST)
+    {
+        final DetailAST modifiersAST =
+            aAST.findFirstToken(TokenTypes.MODIFIERS);
+        final DetailAST staticAST =
+            modifiersAST.findFirstToken(TokenTypes.LITERAL_STATIC);
+
+        return (staticAST != null);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheck.java
new file mode 100644
index 0000000..68d6a86
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheck.java
@@ -0,0 +1,302 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.CheckUtils;
+import java.util.Arrays;
+
+/**
+ * <p>
+ * Checks for magic numbers.
+ * </p>
+ * <p>
+ * An example of how to configure the check to ignore
+ * numbers 0, 1, 1.5, 2:
+ * </p>
+ * <pre>
+ * <module name="MagicNumber">
+ *    <property name="ignoreNumbers" value="0, 1, 1.5, 2"/>
+ *    <property name="ignoreHashCodeMethod" value="true"/>
+ * </module>
+ * </pre>
+ * @author Rick Giles
+ * @author Lars K�hne
+ * @author Daniel Solano G�mez
+ */
+public class MagicNumberCheck extends Check
+{
+    /**
+     * The token types that are allowed in the AST path from the
+     * number literal to the enclosing constant definition.
+     */
+    private static final int[] ALLOWED_PATH_TOKENTYPES = {
+        TokenTypes.ASSIGN,
+        TokenTypes.ARRAY_INIT,
+        TokenTypes.EXPR,
+        TokenTypes.UNARY_PLUS,
+        TokenTypes.UNARY_MINUS,
+        TokenTypes.TYPECAST,
+        TokenTypes.ELIST,
+        TokenTypes.LITERAL_NEW,
+        TokenTypes.METHOD_CALL,
+        TokenTypes.STAR,
+    };
+
+    static {
+        Arrays.sort(ALLOWED_PATH_TOKENTYPES);
+    }
+
+    /** the numbers to ignore in the check, sorted */
+    private double[] mIgnoreNumbers = {-1, 0, 1, 2};
+    /** Whether to ignore magic numbers in a hash code method. */
+    private boolean mIgnoreHashCodeMethod;
+    /** Whether to ignore magic numbers in annotation. */
+    private boolean mIgnoreAnnotation;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.NUM_DOUBLE,
+            TokenTypes.NUM_FLOAT,
+            TokenTypes.NUM_INT,
+            TokenTypes.NUM_LONG,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (mIgnoreAnnotation && isInAnnotation(aAST)) {
+            return;
+        }
+
+        if (inIgnoreList(aAST)
+            || (mIgnoreHashCodeMethod && isInHashCodeMethod(aAST)))
+        {
+            return;
+        }
+
+        final DetailAST constantDefAST = findContainingConstantDef(aAST);
+
+        if (constantDefAST == null) {
+            reportMagicNumber(aAST);
+        }
+        else {
+            DetailAST ast = aAST.getParent();
+            while (ast != constantDefAST) {
+                final int type = ast.getType();
+                if (Arrays.binarySearch(ALLOWED_PATH_TOKENTYPES, type) < 0) {
+                    reportMagicNumber(aAST);
+                    break;
+                }
+
+                ast = ast.getParent();
+            }
+        }
+    }
+
+    /**
+     * Finds the constant definition that contains aAST.
+     * @param aAST the AST
+     * @return the constant def or null if aAST is not
+     * contained in a constant definition
+     */
+    private DetailAST findContainingConstantDef(DetailAST aAST)
+    {
+        DetailAST varDefAST = aAST;
+        while ((varDefAST != null)
+                && (varDefAST.getType() != TokenTypes.VARIABLE_DEF)
+                && (varDefAST.getType() != TokenTypes.ENUM_CONSTANT_DEF))
+        {
+            varDefAST = varDefAST.getParent();
+        }
+
+        // no containing variable definition?
+        if (varDefAST == null) {
+            return null;
+        }
+
+        // implicit constant?
+        if (ScopeUtils.inInterfaceOrAnnotationBlock(varDefAST)
+            || (varDefAST.getType() == TokenTypes.ENUM_CONSTANT_DEF))
+        {
+            return varDefAST;
+        }
+
+        // explicit constant
+        final DetailAST modifiersAST =
+                varDefAST.findFirstToken(TokenTypes.MODIFIERS);
+        if (modifiersAST.branchContains(TokenTypes.FINAL)) {
+            return varDefAST;
+        }
+
+        return null;
+    }
+
+    /**
+     * Reports aAST as a magic number, includes unary operators as needed.
+     * @param aAST the AST node that contains the number to report
+     */
+    private void reportMagicNumber(DetailAST aAST)
+    {
+        String text = aAST.getText();
+        final DetailAST parent = aAST.getParent();
+        DetailAST reportAST = aAST;
+        if (parent.getType() == TokenTypes.UNARY_MINUS) {
+            reportAST = parent;
+            text = "-" + text;
+        }
+        else if (parent.getType() == TokenTypes.UNARY_PLUS) {
+            reportAST = parent;
+            text = "+" + text;
+        }
+        log(reportAST.getLineNo(),
+                reportAST.getColumnNo(),
+                "magic.number",
+                text);
+    }
+
+    /**
+     * Determines whether or not the given AST is in a valid hash code method.
+     * A valid hash code method is considered to be a method of the signature
+     * {@code public int hashCode()}.
+     *
+     * @param aAST the AST from which to search for an enclosing hash code
+     * method definition
+     *
+     * @return {@code true} if {@code aAST} is in the scope of a valid hash
+     * code method
+     */
+    private boolean isInHashCodeMethod(DetailAST aAST)
+    {
+        // if not in a code block, can't be in hashCode()
+        if (!ScopeUtils.inCodeBlock(aAST)) {
+            return false;
+        }
+
+        // find the method definition AST
+        DetailAST methodDefAST = aAST.getParent();
+        while ((null != methodDefAST)
+                && (TokenTypes.METHOD_DEF != methodDefAST.getType()))
+        {
+            methodDefAST = methodDefAST.getParent();
+        }
+
+        if (null == methodDefAST) {
+            return false;
+        }
+
+        // Check for 'hashCode' name.
+        final DetailAST identAST =
+            methodDefAST.findFirstToken(TokenTypes.IDENT);
+        if (!"hashCode".equals(identAST.getText())) {
+            return false;
+        }
+
+        // Check for no arguments.
+        final DetailAST paramAST =
+            methodDefAST.findFirstToken(TokenTypes.PARAMETERS);
+        if (0 != paramAST.getChildCount()) {
+            return false;
+        }
+
+        // we are in a 'public int hashCode()' method! The compiler will ensure
+        // the method returns an 'int' and is public.
+        return true;
+    }
+
+    /**
+     * Decides whether the number of an AST is in the ignore list of this
+     * check.
+     * @param aAST the AST to check
+     * @return true if the number of aAST is in the ignore list of this
+     * check.
+     */
+    private boolean inIgnoreList(DetailAST aAST)
+    {
+        double value = CheckUtils.parseDouble(aAST.getText(), aAST.getType());
+        final DetailAST parent = aAST.getParent();
+        if (parent.getType() == TokenTypes.UNARY_MINUS) {
+            value = -1 * value;
+        }
+        return (Arrays.binarySearch(mIgnoreNumbers, value) >= 0);
+    }
+
+    /**
+     * Sets the numbers to ignore in the check.
+     * BeanUtils converts numeric token list to double array automatically.
+     * @param aList list of numbers to ignore.
+     */
+    public void setIgnoreNumbers(double[] aList)
+    {
+        if ((aList == null) || (aList.length == 0)) {
+            mIgnoreNumbers = new double[0];
+        }
+        else {
+            mIgnoreNumbers = new double[aList.length];
+            System.arraycopy(aList, 0, mIgnoreNumbers, 0, aList.length);
+            Arrays.sort(mIgnoreNumbers);
+        }
+    }
+
+    /**
+     * Set whether to ignore hashCode methods.
+     * @param aIgnoreHashCodeMethod decide whether to ignore
+     * hash code methods
+     */
+    public void setIgnoreHashCodeMethod(boolean aIgnoreHashCodeMethod)
+    {
+        mIgnoreHashCodeMethod = aIgnoreHashCodeMethod;
+    }
+
+    /**
+     * Set whether to ignore Annotations.
+     * @param aIgnoreAnnotation decide whether to ignore annotations
+     */
+    public void setIgnoreAnnotation(boolean aIgnoreAnnotation)
+    {
+        mIgnoreAnnotation = aIgnoreAnnotation;
+    }
+
+    /**
+     * Determines if the column displays a token type of annotation or
+     * annotation member
+     *
+     * @param aAST the AST from which to search for annotations
+     *
+     * @return {@code true} if the token type for this node is a annotation
+     */
+    private boolean isInAnnotation(DetailAST aAST)
+    {
+        if ((null == aAST.getParent())
+                || (null == aAST.getParent().getParent()))
+        {
+            return false;
+        }
+
+        return (TokenTypes.ANNOTATION == aAST.getParent().getParent().getType())
+                || (TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR
+                        == aAST.getParent().getParent().getType());
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MissingCtorCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MissingCtorCheck.java
new file mode 100644
index 0000000..617d9c0
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MissingCtorCheck.java
@@ -0,0 +1,78 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+import com.puppycrawl.tools.checkstyle.checks.DescendantTokenCheck;
+
+/**
+ * <p>
+ * Checks that classes (except abstract one) define a ctor and don't rely
+ * on the default one.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="MissingCtor"/>
+ * </pre>
+ *
+ * @author o_sukhodolsky
+ */
+public class MissingCtorCheck extends DescendantTokenCheck
+{
+    /** Creates new instance of the check. */
+    public MissingCtorCheck()
+    {
+        setLimitedTokens(new String[] {
+            TokenTypes.getTokenName(TokenTypes.CTOR_DEF),
+        });
+        setMinimumNumber(1);
+        setMaximumDepth(2);
+        setMinimumMessage("missing.ctor");
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[]{TokenTypes.CLASS_DEF};
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST modifiers = aAST.findFirstToken(TokenTypes.MODIFIERS);
+        if ((modifiers != null)
+            && modifiers.branchContains(TokenTypes.ABSTRACT))
+        {
+            // should apply the check to abstract class
+            return;
+        }
+
+        super.visitToken(aAST);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MissingSwitchDefaultCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MissingSwitchDefaultCheck.java
new file mode 100644
index 0000000..139ee67
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MissingSwitchDefaultCheck.java
@@ -0,0 +1,69 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.DescendantTokenCheck;
+
+/**
+ * <p>
+ * Checks that switch statement has "default" clause.
+ * </p>
+ * <p>
+ * Rationale: It's usually a good idea to introduce a
+ * default case in every switch statement. Even if
+ * the developer is sure that all currently possible
+ * cases are covered, this should be expressed in the
+ * default branch, e.g. by using an assertion. This way
+ * the code is protected aginst later changes, e.g.
+ * introduction of new types in an enumeration type.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="MissingSwitchDefault"/>
+ * </pre>
+ * @author o_sukhodolsky
+ */
+public class MissingSwitchDefaultCheck extends DescendantTokenCheck
+{
+    /** Creates new instance of the check. */
+    public MissingSwitchDefaultCheck()
+    {
+        setLimitedTokens(new String[] {
+            TokenTypes.getTokenName(TokenTypes.LITERAL_DEFAULT),
+        });
+        setMinimumNumber(1);
+        setMaximumDepth(2);
+        setMinimumMessage("missing.switch.default");
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[]{TokenTypes.LITERAL_SWITCH};
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return getDefaultTokens();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ModifiedControlVariableCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ModifiedControlVariableCheck.java
new file mode 100644
index 0000000..761fee2
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ModifiedControlVariableCheck.java
@@ -0,0 +1,247 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+/**
+ * Check for ensuring that for loop control variables are not modified
+ * inside the for block.
+ *
+ * @author Daniel Grenner
+ */
+public final class ModifiedControlVariableCheck extends Check
+{
+    /** Current set of parameters. */
+    private FastStack<String> mCurrentVariables = FastStack.newInstance();
+    /** Stack of block parameters. */
+    private final FastStack<FastStack<String>> mVariableStack =
+        FastStack.newInstance();
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.OBJBLOCK,
+            TokenTypes.LITERAL_FOR,
+            TokenTypes.FOR_ITERATOR,
+            TokenTypes.FOR_EACH_CLAUSE,
+            TokenTypes.ASSIGN,
+            TokenTypes.PLUS_ASSIGN,
+            TokenTypes.MINUS_ASSIGN,
+            TokenTypes.STAR_ASSIGN,
+            TokenTypes.DIV_ASSIGN,
+            TokenTypes.MOD_ASSIGN,
+            TokenTypes.SR_ASSIGN,
+            TokenTypes.BSR_ASSIGN,
+            TokenTypes.SL_ASSIGN,
+            TokenTypes.BAND_ASSIGN,
+            TokenTypes.BXOR_ASSIGN,
+            TokenTypes.BOR_ASSIGN,
+            TokenTypes.INC,
+            TokenTypes.POST_INC,
+            TokenTypes.DEC,
+            TokenTypes.POST_DEC,
+        };
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        // clear data
+        mCurrentVariables.clear();
+        mVariableStack.clear();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.OBJBLOCK:
+            enterBlock();
+            break;
+        case TokenTypes.LITERAL_FOR:
+        case TokenTypes.FOR_ITERATOR:
+        case TokenTypes.FOR_EACH_CLAUSE:
+            break;
+        case TokenTypes.ASSIGN:
+        case TokenTypes.PLUS_ASSIGN:
+        case TokenTypes.MINUS_ASSIGN:
+        case TokenTypes.STAR_ASSIGN:
+        case TokenTypes.DIV_ASSIGN:
+        case TokenTypes.MOD_ASSIGN:
+        case TokenTypes.SR_ASSIGN:
+        case TokenTypes.BSR_ASSIGN:
+        case TokenTypes.SL_ASSIGN:
+        case TokenTypes.BAND_ASSIGN:
+        case TokenTypes.BXOR_ASSIGN:
+        case TokenTypes.BOR_ASSIGN:
+        case TokenTypes.INC:
+        case TokenTypes.POST_INC:
+        case TokenTypes.DEC:
+        case TokenTypes.POST_DEC:
+            checkIdent(aAST);
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.FOR_ITERATOR:
+            leaveForIter(aAST.getParent());
+            break;
+        case TokenTypes.FOR_EACH_CLAUSE:
+            leaveForEach(aAST);
+            break;
+        case TokenTypes.LITERAL_FOR:
+            leaveForDef(aAST);
+            break;
+        case TokenTypes.OBJBLOCK:
+            exitBlock();
+            break;
+        case TokenTypes.ASSIGN:
+        case TokenTypes.PLUS_ASSIGN:
+        case TokenTypes.MINUS_ASSIGN:
+        case TokenTypes.STAR_ASSIGN:
+        case TokenTypes.DIV_ASSIGN:
+        case TokenTypes.MOD_ASSIGN:
+        case TokenTypes.SR_ASSIGN:
+        case TokenTypes.BSR_ASSIGN:
+        case TokenTypes.SL_ASSIGN:
+        case TokenTypes.BAND_ASSIGN:
+        case TokenTypes.BXOR_ASSIGN:
+        case TokenTypes.BOR_ASSIGN:
+        case TokenTypes.INC:
+        case TokenTypes.POST_INC:
+        case TokenTypes.DEC:
+        case TokenTypes.POST_DEC:
+            // Do nothing
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    /**
+     * Enters an inner class, which requires a new variable set.
+     */
+    private void enterBlock()
+    {
+        mVariableStack.push(mCurrentVariables);
+        mCurrentVariables = FastStack.newInstance();
+
+    }
+    /**
+     * Leave an inner class, so restore variable set.
+     */
+    private void exitBlock()
+    {
+        mCurrentVariables = mVariableStack.pop();
+    }
+
+    /**
+     * Check if ident is parameter.
+     * @param aAST ident to check.
+     */
+    private void checkIdent(DetailAST aAST)
+    {
+        if ((mCurrentVariables != null) && !mCurrentVariables.isEmpty()) {
+            final DetailAST identAST = aAST.getFirstChild();
+
+            if ((identAST != null)
+                && (identAST.getType() == TokenTypes.IDENT)
+                && mCurrentVariables.contains(identAST.getText()))
+            {
+                log(aAST.getLineNo(), aAST.getColumnNo(),
+                    "modified.control.variable", identAST.getText());
+            }
+        }
+    }
+
+    /**
+     * Push current variables to the stack.
+     * @param aAST a for definition.
+     */
+    private void leaveForIter(DetailAST aAST)
+    {
+        final DetailAST forInitAST = aAST.findFirstToken(TokenTypes.FOR_INIT);
+        DetailAST parameterDefAST =
+            forInitAST.findFirstToken(TokenTypes.VARIABLE_DEF);
+
+        for (; parameterDefAST != null;
+             parameterDefAST = parameterDefAST.getNextSibling())
+        {
+            if (parameterDefAST.getType() == TokenTypes.VARIABLE_DEF) {
+                final DetailAST param =
+                    parameterDefAST.findFirstToken(TokenTypes.IDENT);
+                mCurrentVariables.push(param.getText());
+            }
+        }
+    }
+
+    /**
+     * Push current variables to the stack.
+     * @param aForEach a for-each clause
+     */
+    private void leaveForEach(DetailAST aForEach)
+    {
+        final DetailAST paramDef =
+            aForEach.findFirstToken(TokenTypes.VARIABLE_DEF);
+        final DetailAST paramName = paramDef.findFirstToken(TokenTypes.IDENT);
+        mCurrentVariables.push(paramName.getText());
+    }
+
+    /**
+     * Pops the variables from the stack.
+     * @param aAST a for definition.
+     */
+    private void leaveForDef(DetailAST aAST)
+    {
+        final DetailAST forInitAST = aAST.findFirstToken(TokenTypes.FOR_INIT);
+        if (forInitAST != null) {
+            DetailAST parameterDefAST =
+                forInitAST.findFirstToken(TokenTypes.VARIABLE_DEF);
+
+            for (; parameterDefAST != null;
+                 parameterDefAST = parameterDefAST.getNextSibling())
+            {
+                if (parameterDefAST.getType() == TokenTypes.VARIABLE_DEF) {
+                    mCurrentVariables.pop();
+                }
+            }
+        }
+        else {
+            // this is for-each loop, just pop veriables
+            mCurrentVariables.pop();
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleStringLiteralsCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleStringLiteralsCheck.java
new file mode 100644
index 0000000..8356ecf
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleStringLiteralsCheck.java
@@ -0,0 +1,223 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import java.util.BitSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+/**
+ * Checks for multiple occurrences of the same string literal within a
+ * single file.
+ *
+ * @author Daniel Grenner
+ */
+public class MultipleStringLiteralsCheck extends Check
+{
+    /**
+     * The found strings and their positions.
+     * {@code <String, ArrayList>}, with the ArrayList containing StringInfo
+     * objects.
+     */
+    private final Map<String, List<StringInfo>> mStringMap = Maps.newHashMap();
+
+    /**
+     * Marks the TokenTypes where duplicate strings should be ignored.
+     */
+    private final BitSet mIgnoreOccurrenceContext = new BitSet();
+
+    /**
+     * The allowed number of string duplicates in a file before an error is
+     * generated.
+     */
+    private int mAllowedDuplicates = 1;
+
+    /**
+     * Sets the maximum allowed duplicates of a string.
+     * @param aAllowedDuplicates The maximum number of duplicates.
+     */
+    public void setAllowedDuplicates(int aAllowedDuplicates)
+    {
+        mAllowedDuplicates = aAllowedDuplicates;
+    }
+
+    /**
+     * Pattern for matching ignored strings.
+     */
+    private Pattern mPattern;
+
+    /**
+     * Construct an instance with default values.
+     */
+    public MultipleStringLiteralsCheck()
+    {
+        setIgnoreStringsRegexp("^\"\"$");
+        mIgnoreOccurrenceContext.set(TokenTypes.ANNOTATION);
+    }
+
+    /**
+     * Sets regexp pattern for ignored strings.
+     * @param aIgnoreStringsRegexp regexp pattern for ignored strings
+     */
+    public void setIgnoreStringsRegexp(String aIgnoreStringsRegexp)
+    {
+        if ((aIgnoreStringsRegexp != null)
+            && (aIgnoreStringsRegexp.length() > 0))
+        {
+            mPattern = Utils.getPattern(aIgnoreStringsRegexp);
+        }
+        else {
+            mPattern = null;
+        }
+    }
+
+    /**
+     * Adds a set of tokens the check is interested in.
+     * @param aStrRep the string representation of the tokens interested in
+     */
+    public final void setIgnoreOccurrenceContext(String[] aStrRep)
+    {
+        mIgnoreOccurrenceContext.clear();
+        for (final String s : aStrRep) {
+            final int type = TokenTypes.getTokenId(s);
+            mIgnoreOccurrenceContext.set(type);
+        }
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.STRING_LITERAL};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (isInIgnoreOccurrenceContext(aAST)) {
+            return;
+        }
+        final String currentString = aAST.getText();
+        if ((mPattern == null) || !mPattern.matcher(currentString).find()) {
+            List<StringInfo> hitList = mStringMap.get(currentString);
+            if (hitList == null) {
+                hitList = Lists.newArrayList();
+                mStringMap.put(currentString, hitList);
+            }
+            final int line = aAST.getLineNo();
+            final int col = aAST.getColumnNo();
+            hitList.add(new StringInfo(line, col));
+        }
+    }
+
+    /**
+     * Analyses the path from the AST root to a given AST for occurrences
+     * of the token types in {@link #mIgnoreOccurrenceContext}.
+     *
+     * @param aAST the node from where to start searching towards the root node
+     * @return whether the path from the root node to aAST contains one of the
+     * token type in {@link #mIgnoreOccurrenceContext}.
+     */
+    private boolean isInIgnoreOccurrenceContext(DetailAST aAST)
+    {
+        for (DetailAST token = aAST;
+             token.getParent() != null;
+             token = token.getParent())
+        {
+            final int type = token.getType();
+            if (mIgnoreOccurrenceContext.get(type)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        super.beginTree(aRootAST);
+        mStringMap.clear();
+    }
+
+    @Override
+    public void finishTree(DetailAST aRootAST)
+    {
+        final Set<String> keys = mStringMap.keySet();
+        for (String key : keys) {
+            final List<StringInfo> hits = mStringMap.get(key);
+            if (hits.size() > mAllowedDuplicates) {
+                final StringInfo firstFinding = hits.get(0);
+                final int line = firstFinding.getLine();
+                final int col = firstFinding.getCol();
+                log(line, col, "multiple.string.literal", key, hits.size());
+            }
+        }
+    }
+
+    /**
+     * This class contains information about where a string was found.
+     */
+    private static final class StringInfo
+    {
+        /**
+         * Line of finding
+         */
+        private final int mLine;
+        /**
+         * Column of finding
+         */
+        private final int mCol;
+        /**
+         * Creates information about a string position.
+         * @param aLine int
+         * @param aCol int
+         */
+        private StringInfo(int aLine, int aCol)
+        {
+            mLine = aLine;
+            mCol = aCol;
+        }
+
+        /**
+         * The line where a string was found.
+         * @return int Line of the string.
+         */
+        private int getLine()
+        {
+            return mLine;
+        }
+
+        /**
+         * The column where a string was found.
+         * @return int Column of the string.
+         */
+        private int getCol()
+        {
+            return mCol;
+        }
+    }
+
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleVariableDeclarationsCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleVariableDeclarationsCheck.java
new file mode 100644
index 0000000..efcd893
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleVariableDeclarationsCheck.java
@@ -0,0 +1,125 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.CheckUtils;
+
+/**
+ * <p>
+ * Checks that each variable declaration is in its own statement
+ * and on its own line.
+ * </p>
+ * <p>
+ * Rationale: <a
+ * href="http://java.sun.com/docs/codeconv/html/CodeConventions.doc5.html#2991">
+ * the SUN Code conventions chapter 6.1</a> recommends that
+ * declarations should be one per line.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="MultipleVariableDeclarations"/>
+ * </pre>
+ * @author o_sukhodolsky
+ */
+public class MultipleVariableDeclarationsCheck extends Check
+{
+    /** Creates new instance of the check. */
+    public MultipleVariableDeclarationsCheck()
+    {
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.VARIABLE_DEF};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        DetailAST nextNode = aAST.getNextSibling();
+        final boolean isCommaSeparated =
+            ((nextNode != null) && (nextNode.getType() == TokenTypes.COMMA));
+
+        if (nextNode == null) {
+            // no next statement - no check
+            return;
+        }
+
+        if ((nextNode.getType() == TokenTypes.COMMA)
+            || (nextNode.getType() == TokenTypes.SEMI))
+        {
+            nextNode = nextNode.getNextSibling();
+        }
+
+        if ((nextNode != null)
+            && (nextNode.getType() == TokenTypes.VARIABLE_DEF))
+        {
+            final DetailAST firstNode = CheckUtils.getFirstNode(aAST);
+            if (isCommaSeparated) {
+                // Check if the multiple variable declarations are in a
+                // for loop initializer. If they are, then no warning
+                // should be displayed. Declaring multiple variables in
+                // a for loop initializer is a good way to minimize
+                // variable scope. Refer Feature Request Id - 2895985
+                // for more details
+                if (aAST.getParent().getType() != TokenTypes.FOR_INIT) {
+                    log(firstNode, "multiple.variable.declarations.comma");
+                }
+                return;
+            }
+
+            final DetailAST lastNode = getLastNode(aAST);
+            final DetailAST firstNextNode = CheckUtils.getFirstNode(nextNode);
+
+            if (firstNextNode.getLineNo() == lastNode.getLineNo()) {
+                log(firstNode, "multiple.variable.declarations");
+            }
+        }
+
+    }
+
+    /**
+     * Finds sub-node for given node maximum (line, column) pair.
+     * @param aNode the root of tree for search.
+     * @return sub-node with maximum (line, column) pair.
+     */
+    private static DetailAST getLastNode(final DetailAST aNode)
+    {
+        DetailAST currentNode = aNode;
+        DetailAST child = aNode.getFirstChild();
+        while (child != null) {
+            final DetailAST newNode = getLastNode(child);
+            if ((newNode.getLineNo() > currentNode.getLineNo())
+                || ((newNode.getLineNo() == currentNode.getLineNo())
+                    && (newNode.getColumnNo() > currentNode.getColumnNo())))
+            {
+                currentNode = newNode;
+            }
+            child = child.getNextSibling();
+        }
+
+        return currentNode;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedForDepthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedForDepthCheck.java
new file mode 100644
index 0000000..9753423
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedForDepthCheck.java
@@ -0,0 +1,75 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Check the number of nested <code>for</code> -statements. The maximum
+ * number of nested layers can be configured. The default value is 1. Most of
+ * the logic is implemented in the parent class. The code for the class is
+ * copied from the NestedIfDepthCheck-class. The only difference is the
+ * intercepted token (for instead of if). Example:
+ * <pre>
+ *  <!-- Restricts nested for blocks to a specified depth (default = 1).
+ *                                                                        -->
+ *  <module name="com.puppycrawl.tools.checkstyle.checks.coding
+ *                                            .CatchWithLostStackCheck">
+ *    <property name="severity" value="info"/>
+ *    <property name="max" value="1"/>
+ *  </module>
+ * </pre>
+ * @author Alexander Jesse
+ * @see com.puppycrawl.tools.checkstyle.checks.coding.AbstractNestedDepthCheck
+ * @see com.puppycrawl.tools.checkstyle.checks.coding.NestedIfDepthCheck
+ */
+public final class NestedForDepthCheck extends AbstractNestedDepthCheck
+{
+    /** default allowed nesting depth. */
+    private static final int DEFAULT_MAX = 1;
+
+    /** Creates new check instance with default allowed nesting depth. */
+    public NestedForDepthCheck()
+    {
+        super(DEFAULT_MAX);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.LITERAL_FOR};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (TokenTypes.LITERAL_FOR == aAST.getType()) {
+            nestIn(aAST, "nested.for.depth");
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        if (TokenTypes.LITERAL_FOR == aAST.getType()) {
+            nestOut();
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedIfDepthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedIfDepthCheck.java
new file mode 100644
index 0000000..537ec02
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedIfDepthCheck.java
@@ -0,0 +1,92 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.CheckUtils;
+
+/**
+ * Restricts nested if-else blocks to a specified depth (default = 1).
+ *
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ */
+public final class NestedIfDepthCheck extends AbstractNestedDepthCheck
+{
+    /** default allowed nesting depth. */
+    private static final int DEFAULT_MAX = 1;
+
+    /** Creates new check instance with default allowed nesting depth. */
+    public NestedIfDepthCheck()
+    {
+        super(DEFAULT_MAX);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.LITERAL_IF};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.LITERAL_IF:
+            visitLiteralIf(aAST);
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.LITERAL_IF:
+            leaveLiteralIf(aAST);
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    /**
+     * Increases current nesting depth.
+     * @param aIf node for if.
+     */
+    private void visitLiteralIf(DetailAST aIf)
+    {
+        if (!CheckUtils.isElseIf(aIf)) {
+            nestIn(aIf, "nested.if.depth");
+        }
+    }
+
+    /**
+     * Decreases current nesting depth.
+     * @param aIf node for if.
+     */
+    private void leaveLiteralIf(DetailAST aIf)
+    {
+        if (!CheckUtils.isElseIf(aIf)) {
+            nestOut();
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedTryDepthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedTryDepthCheck.java
new file mode 100644
index 0000000..c6e58c3
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedTryDepthCheck.java
@@ -0,0 +1,83 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Restricts nested try-catch-finally blocks to a specified depth (default = 1).
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ */
+public final class NestedTryDepthCheck extends AbstractNestedDepthCheck
+{
+    /** default allowed nesting depth */
+    private static final int DEFAULT_MAX = 1;
+
+    /** Creates new check instance with default allowed nesting depth. */
+    public NestedTryDepthCheck()
+    {
+        super(DEFAULT_MAX);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.LITERAL_TRY};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.LITERAL_TRY:
+            visitLiteralTry(aAST);
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.LITERAL_TRY:
+            leaveLiteralTry();
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    /**
+     * Increases current nesting depth.
+     * @param aTry node for try.
+     */
+    private void visitLiteralTry(DetailAST aTry)
+    {
+        nestIn(aTry, "nested.try.depth");
+    }
+
+    /** Decreases current nesting depth */
+    private void leaveLiteralTry()
+    {
+        nestOut();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NoCloneCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NoCloneCheck.java
new file mode 100644
index 0000000..80bcbf4
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NoCloneCheck.java
@@ -0,0 +1,138 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+/**
+ * <p>
+ * Checks that the clone method is not overridden from the
+ * Object class.
+ * </p>
+ *
+ * <p>
+ * Rationale: The clone method relies on strange/hard to follow rules that
+ * do not work it all situations.  Consequently, it is difficult to
+ * override correctly.  Below are some of the rules/reasons why the clone
+ * method should be avoided.
+ *
+ * <ul>
+ * <li>
+ * Classes supporting the clone method should implement the Cloneable
+ * interface but the Cloneable interface does not include the clone method.
+ * As a result, it doesn't enforce the method override.
+ * </li>
+ * <li>
+ * The Cloneable interface forces the Object's clone method to work
+ * correctly. Without implementing it, the Object's clone method will
+ * throw a CloneNotSupportedException.
+ * </li>
+ * <li>
+ * Non-final classes must return the object returned from a call to
+ * super.clone().
+ * </li>
+ * <li>
+ * Final classes can use a constructor to create a clone which is different
+ * from non-final classes.
+ * </li>
+ * <li>
+ * If a super class implements the clone method incorrectly all subclasses
+ * calling super.clone() are doomed to failure.
+ * </li>
+ * <li>
+ * If a class has references to mutable objects then those object
+ * references must be replaced with copies in the clone method
+ * after calling super.clone().
+ * </li>
+ * <li>
+ * The clone method does not work correctly with final mutable object
+ * references because final references cannot be reassigned.
+ * </li>
+ * <li>
+ * If a super class overrides the clone method then all subclasses must
+ * provide a correct clone implementation.
+ * </li>
+ * </ul>
+ *
+ *
+ * <p>
+ * Two alternatives to the clone method, in some cases, is a copy constructor
+ * or a static factory method to return copies of an object. Both of these
+ * approaches are simpler and do not conflict with final fields. They do not
+ * force the calling client to handle a CloneNotSupportedException.  They also
+ * are typed therefore no casting is necessary. Finally, they are more
+ * flexible since they can take interface types rather than concrete classes.
+ *
+ *
+ * <p>
+ * Sometimes a copy constructor or static factory is not an acceptable
+ * alternative to the clone method.  The example below highlights the
+ * limitation of a copy constructor (or static factory). Assume
+ * Square is a subclass for Shape.
+ *
+ * <pre>
+ * Shape s1 = new Square();
+ * System.out.println(s1 instanceof Square); //true
+ * </pre>
+ *
+ * ...assume at this point the code knows nothing of s1 being a Square
+ *    that's the beauty of polymorphism but the code wants to copy
+ *    the Square which is declared as a Shape, its super type...
+ *
+ * <pre>
+ * Shape s2 = new Shape(s1); //using the copy constructor
+ * System.out.println(s2 instanceof Square); //false
+ * </pre>
+ *
+ * The working solution (without knowing about all subclasses and doing many
+ * casts) is to do the following (assuming correct clone implementation).
+ *
+ * <pre>
+ * Shape s2 = s1.clone();
+ * System.out.println(s2 instanceof Square); //true
+ * </pre>
+ *
+ * Just keep in mind if this type of polymorphic cloning is required
+ * then a properly implemented clone method may be the best choice.
+ *
+ *
+ * <p>
+ * Much of this information was taken from Effective Java:
+ * Programming Language Guide First Edition by Joshua Bloch
+ * pages 45-52.  Give Bloch credit for writing an excellent book.
+ * </p>
+ *
+ * <p>
+ * This check is almost exactly the same as the {@link NoFinalizerCheck}
+ *
+ *
+ * @author Travis Schneeberger
+ * @version 1.0
+ * @see java.lang.Object#clone()
+ * @see java.lang.Cloneable
+ * @see java.lang.CloneNotSupportedException
+ */
+public class NoCloneCheck extends  AbstractIllegalMethodCheck
+{
+    /**
+     * Creates an instance.
+     */
+    public NoCloneCheck()
+    {
+        super("clone", "avoid.clone.method");
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NoFinalizerCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NoFinalizerCheck.java
new file mode 100644
index 0000000..692013d
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/NoFinalizerCheck.java
@@ -0,0 +1,38 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+/**
+ * Checks that no method having zero parameters is defined
+ * using the name <em>finalize</em>.
+ *
+ * @author fqian at google.com (Feng Qian)
+ * @author smckay at google.com (Steve McKay)
+ * @author lkuehne
+ */
+public class NoFinalizerCheck extends AbstractIllegalMethodCheck
+{
+    /**
+     * Creates an instance.
+     */
+    public NoFinalizerCheck()
+    {
+        super("finalize", "avoid.finalizer.method");
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/OneStatementPerLineCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/OneStatementPerLineCheck.java
new file mode 100644
index 0000000..c1dace4
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/OneStatementPerLineCheck.java
@@ -0,0 +1,121 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Restricts the number of statements per line to one.
+ * @author Alexander Jesse
+ * @author Oliver Burn
+ */
+public final class OneStatementPerLineCheck extends Check
+{
+    /** hold the line-number where the last statement ended. */
+    private int mLastStatementEnd = -1;
+    /** tracks the depth of EXPR tokens. */
+    private int mExprDepth;
+
+    /**
+     * The for-header usually has 3 statements on one line, but THIS IS OK.
+     */
+    private boolean mInForHeader;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.EXPR, TokenTypes.SEMI, TokenTypes.FOR_INIT,
+            TokenTypes.FOR_ITERATOR,
+        };
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        mExprDepth = 0;
+        mInForHeader = false;
+        mLastStatementEnd = -1;
+    }
+
+    @Override
+    public void visitToken(DetailAST aAst)
+    {
+        switch (aAst.getType()) {
+        case TokenTypes.EXPR:
+            visitExpr(aAst);
+            break;
+        case TokenTypes.SEMI:
+            visitSemi(aAst);
+            break;
+        case TokenTypes.FOR_INIT:
+            mInForHeader = true;
+            break;
+        default:
+            break;
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAst)
+    {
+        switch (aAst.getType()) {
+        case TokenTypes.FOR_ITERATOR:
+            mInForHeader = false;
+            break;
+        case TokenTypes.EXPR:
+            mExprDepth--;
+            break;
+        default:
+            break;
+        }
+    }
+
+    /**
+     * Mark the state-change for the statement (entering) and remember the
+     * first line of the last statement. If the first line of the new
+     * statement is the same as the last line of the last statement and we are
+     * not within a for-statement, then the rule is violated.
+     * @param aAst token for the {@link TokenTypes#EXPR}.
+     */
+    private void visitExpr(DetailAST aAst)
+    {
+        mExprDepth++;
+        if (mExprDepth == 1
+                && !mInForHeader
+                && (mLastStatementEnd == aAst.getLineNo()))
+        {
+            log(aAst, "multiple.statements.line");
+        }
+    }
+
+    /**
+     * Mark the state-change for the statement (leaving) and remember the last
+     * line of the last statement.
+     * @param aAst for the {@link TokenTypes#SEMI}.
+     */
+    private void visitSemi(DetailAST aAst)
+    {
+        if (mExprDepth == 0) {
+            mLastStatementEnd = aAst.getLineNo();
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/OverloadMethodsDeclarationOrderCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/OverloadMethodsDeclarationOrderCheck.java
new file mode 100644
index 0000000..1029735
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/OverloadMethodsDeclarationOrderCheck.java
@@ -0,0 +1,106 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks that overload methods are grouped together. Example:
+ * </p>
+ * <pre>
+ * <code>
+ * public void foo(int i) {}
+ * public void foo(String s) {}
+ * public void notFoo() {} // Have to be after foo(int i, String s)
+ * public void foo(int i, String s) {}
+ * </code>
+ * </pre>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ *
+ * <pre>
+ * <module name="OverloadMethodsDeclarationOrder"/>
+ * </pre>
+ * @author maxvetrenko
+ */
+public class OverloadMethodsDeclarationOrderCheck extends Check
+{
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.OBJBLOCK,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final int parentType = aAST.getParent().getType();
+        if (parentType == TokenTypes.CLASS_DEF
+                || parentType == TokenTypes.ENUM_DEF
+                || parentType == TokenTypes.INTERFACE_DEF
+                || parentType == TokenTypes.LITERAL_NEW)
+        {
+            checkOverloadMethodsGrouping(aAST);
+        }
+    }
+
+    /**
+     * Checks that if overload methods are grouped together they should not be
+     * separated from each other.
+     * @param aObjectBlock
+     *        is a class, interface or enum object block.
+     */
+    private void checkOverloadMethodsGrouping(DetailAST aObjectBlock)
+    {
+        final int allowedDistance = 1;
+        DetailAST currentToken = aObjectBlock.getFirstChild();
+        final Map<String, Integer> methodIndexMap = new HashMap<String, Integer>();
+        final Map<String, Integer> methodLineNumberMap = new HashMap<String, Integer>();
+        int currentIndex = 0;
+        while (currentToken != null) {
+            if (currentToken.getType() == TokenTypes.METHOD_DEF) {
+                currentIndex++;
+                final String methodName =
+                        currentToken.findFirstToken(TokenTypes.IDENT).getText();
+                if (methodIndexMap.containsKey(methodName)) {
+                    final int priviousIndex = methodIndexMap.get(methodName);
+                    if (currentIndex - priviousIndex > allowedDistance) {
+                        final int previousLineWithOverloadMethod =
+                                methodLineNumberMap.get(methodName);
+                        log(currentToken.getLineNo(), "overload.methods.declaration",
+                                previousLineWithOverloadMethod);
+                    }
+                }
+                methodIndexMap.put(methodName, currentIndex);
+                methodLineNumberMap.put(methodName, currentToken.getLineNo());
+            }
+            currentToken = currentToken.getNextSibling();
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/PackageDeclarationCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/PackageDeclarationCheck.java
new file mode 100644
index 0000000..37c135f
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/PackageDeclarationCheck.java
@@ -0,0 +1,104 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import java.io.File;
+
+/**
+ * Ensures there is a package declaration.
+ * Rationale: Classes that live in the null package cannot be
+ * imported. Many novice developers are not aware of this.
+ *
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ * @author Oliver Burn
+ */
+public final class PackageDeclarationCheck extends Check
+{
+    /** is package defined. */
+    private boolean mDefined;
+    /** whether to ignore the directory name matches the package. */
+    private boolean mIgnoreDirectoryName;
+
+    /**
+     * Set whether to ignore checking the directory name.
+     * @param aValue the new value.
+     */
+    public void setIgnoreDirectoryName(boolean aValue)
+    {
+        mIgnoreDirectoryName = aValue;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.PACKAGE_DEF};
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void beginTree(DetailAST aAST)
+    {
+        mDefined = false;
+    }
+
+    @Override
+    public void finishTree(DetailAST aAST)
+    {
+        if (!mDefined) {
+            log(aAST.getLineNo(), "missing.package.declaration");
+        }
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        mDefined = true;
+        if (mIgnoreDirectoryName) {
+            return;
+        }
+
+        // Calculate the directory name, but stripping off the last
+        // part.
+        final String fname = getFileContents().getFilename();
+        final int lastPos = fname.lastIndexOf(File.separatorChar);
+        final String dirname = fname.substring(0, lastPos);
+
+        // Convert the found package name into the expected directory name.
+        final DetailAST nameAST = aAST.getLastChild().getPreviousSibling();
+        final FullIdent full = FullIdent.createFullIdent(nameAST);
+        final String expected = full.getText().replace('.', File.separatorChar);
+
+        // Finally see that the real directory ends with the expected directory
+        if (!dirname.endsWith(expected)) {
+            log(full.getLineNo(),
+                full.getColumnNo(),
+                "package.dir.mismatch",
+                expected);
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ParameterAssignmentCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ParameterAssignmentCheck.java
new file mode 100644
index 0000000..f376fda
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ParameterAssignmentCheck.java
@@ -0,0 +1,227 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import java.util.Set;
+
+/**
+ * <p>
+ * Disallow assignment of parameters.
+ * </p>
+ * <p>
+ * Rationale:
+ * Parameter assignment is often considered poor
+ * programming practice. Forcing developers to declare
+ * parameters as final is often onerous. Having a check
+ * ensure that parameters are never assigned would give
+ * the best of both worlds.
+ * </p>
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ */
+public final class ParameterAssignmentCheck extends Check
+{
+    /** Stack of methods' parameters. */
+    private final FastStack<Set<String>> mParameterNamesStack =
+        FastStack.newInstance();
+    /** Current set of perameters. */
+    private Set<String> mParameterNames;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.CTOR_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.ASSIGN,
+            TokenTypes.PLUS_ASSIGN,
+            TokenTypes.MINUS_ASSIGN,
+            TokenTypes.STAR_ASSIGN,
+            TokenTypes.DIV_ASSIGN,
+            TokenTypes.MOD_ASSIGN,
+            TokenTypes.SR_ASSIGN,
+            TokenTypes.BSR_ASSIGN,
+            TokenTypes.SL_ASSIGN,
+            TokenTypes.BAND_ASSIGN,
+            TokenTypes.BXOR_ASSIGN,
+            TokenTypes.BOR_ASSIGN,
+            TokenTypes.INC,
+            TokenTypes.POST_INC,
+            TokenTypes.DEC,
+            TokenTypes.POST_DEC,
+        };
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        // clear data
+        mParameterNamesStack.clear();
+        mParameterNames = null;
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.CTOR_DEF:
+        case TokenTypes.METHOD_DEF:
+            visitMethodDef(aAST);
+            break;
+        case TokenTypes.ASSIGN:
+        case TokenTypes.PLUS_ASSIGN:
+        case TokenTypes.MINUS_ASSIGN:
+        case TokenTypes.STAR_ASSIGN:
+        case TokenTypes.DIV_ASSIGN:
+        case TokenTypes.MOD_ASSIGN:
+        case TokenTypes.SR_ASSIGN:
+        case TokenTypes.BSR_ASSIGN:
+        case TokenTypes.SL_ASSIGN:
+        case TokenTypes.BAND_ASSIGN:
+        case TokenTypes.BXOR_ASSIGN:
+        case TokenTypes.BOR_ASSIGN:
+            visitAssign(aAST);
+            break;
+        case TokenTypes.INC:
+        case TokenTypes.POST_INC:
+        case TokenTypes.DEC:
+        case TokenTypes.POST_DEC:
+            visitIncDec(aAST);
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.CTOR_DEF:
+        case TokenTypes.METHOD_DEF:
+            leaveMethodDef();
+            break;
+        case TokenTypes.ASSIGN:
+        case TokenTypes.PLUS_ASSIGN:
+        case TokenTypes.MINUS_ASSIGN:
+        case TokenTypes.STAR_ASSIGN:
+        case TokenTypes.DIV_ASSIGN:
+        case TokenTypes.MOD_ASSIGN:
+        case TokenTypes.SR_ASSIGN:
+        case TokenTypes.BSR_ASSIGN:
+        case TokenTypes.SL_ASSIGN:
+        case TokenTypes.BAND_ASSIGN:
+        case TokenTypes.BXOR_ASSIGN:
+        case TokenTypes.BOR_ASSIGN:
+        case TokenTypes.INC:
+        case TokenTypes.POST_INC:
+        case TokenTypes.DEC:
+        case TokenTypes.POST_DEC:
+            // Do nothing
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    /**
+     * Ckecks if this is assignments of parameter.
+     * @param aAST assignment to check.
+     */
+    private void visitAssign(DetailAST aAST)
+    {
+        checkIdent(aAST);
+    }
+
+    /**
+     * Checks if this is increment/decrement of parameter.
+     * @param aAST dec/inc to check.
+     */
+    private void visitIncDec(DetailAST aAST)
+    {
+        checkIdent(aAST);
+    }
+
+    /**
+     * Check if ident is parameter.
+     * @param aAST ident to check.
+     */
+    private void checkIdent(DetailAST aAST)
+    {
+        if ((mParameterNames != null) && !mParameterNames.isEmpty()) {
+            final DetailAST identAST = aAST.getFirstChild();
+
+            if ((identAST != null)
+                && (identAST.getType() == TokenTypes.IDENT)
+                && mParameterNames.contains(identAST.getText()))
+            {
+                log(aAST.getLineNo(), aAST.getColumnNo(),
+                    "parameter.assignment", identAST.getText());
+            }
+        }
+    }
+
+    /**
+     * Creates new set of parameters and store old one in stack.
+     * @param aAST a method to process.
+     */
+    private void visitMethodDef(DetailAST aAST)
+    {
+        mParameterNamesStack.push(mParameterNames);
+        mParameterNames = Sets.newHashSet();
+
+        visitMethodParameters(aAST.findFirstToken(TokenTypes.PARAMETERS));
+    }
+
+    /** Restores old set of parameters. */
+    private void leaveMethodDef()
+    {
+        mParameterNames = mParameterNamesStack.pop();
+    }
+
+    /**
+     * Creates new parameter set for given method.
+     * @param aAST a method for process.
+     */
+    private void visitMethodParameters(DetailAST aAST)
+    {
+        DetailAST parameterDefAST =
+            aAST.findFirstToken(TokenTypes.PARAMETER_DEF);
+
+        for (; parameterDefAST != null;
+             parameterDefAST = parameterDefAST.getNextSibling())
+        {
+            if (parameterDefAST.getType() == TokenTypes.PARAMETER_DEF) {
+                final DetailAST param =
+                    parameterDefAST.findFirstToken(TokenTypes.IDENT);
+                mParameterNames.add(param.getText());
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RedundantThrowsCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RedundantThrowsCheck.java
new file mode 100644
index 0000000..119f72c
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RedundantThrowsCheck.java
@@ -0,0 +1,175 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.AbstractTypeAwareCheck;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Checks for redundant exceptions declared in throws clause
+ * such as duplicates, unchecked exceptions or subclasses of
+ * another declared exception.
+ *
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="RedundantThrows">
+ *    <property name="allowUnchecked" value="true"/>
+ *    <property name="allowSubclasses" value="true"/>
+ * </module>
+ * </pre>
+ * @author o_sukhodolsky
+ */
+public class RedundantThrowsCheck extends AbstractTypeAwareCheck
+{
+    /**
+     * whether unchecked exceptions in throws
+     * are allowed or not
+     */
+    private boolean mAllowUnchecked;
+
+    /**
+     * whether subclass of another declared
+     * exception is allowed in throws clause
+     */
+    private boolean mAllowSubclasses;
+
+    /**
+     * Getter for allowUnchecked property.
+     * @param aAllowUnchecked whether unchecked excpetions in throws
+     *                         are allowed or not
+     */
+    public void setAllowUnchecked(boolean aAllowUnchecked)
+    {
+        mAllowUnchecked = aAllowUnchecked;
+    }
+
+    /**
+     * Getter for allowSubclasses property.
+     * @param aAllowSubclasses whether subclass of another declared
+     *                         exception is allowed in throws clause
+     */
+    public void setAllowSubclasses(boolean aAllowSubclasses)
+    {
+        mAllowSubclasses = aAllowSubclasses;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.PACKAGE_DEF,
+            TokenTypes.IMPORT,
+            TokenTypes.CLASS_DEF,
+            TokenTypes.INTERFACE_DEF,
+            TokenTypes.ENUM_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.CTOR_DEF,
+        };
+    }
+
+    @Override
+    protected final void processAST(DetailAST aAST)
+    {
+        final List<ClassInfo> knownExcs = Lists.newLinkedList();
+        final DetailAST throwsAST =
+            aAST.findFirstToken(TokenTypes.LITERAL_THROWS);
+        if (throwsAST != null) {
+            DetailAST child = throwsAST.getFirstChild();
+            while (child != null) {
+                if ((child.getType() == TokenTypes.IDENT)
+                    || (child.getType() == TokenTypes.DOT))
+                {
+                    final FullIdent fi = FullIdent.createFullIdent(child);
+                    checkException(fi, knownExcs);
+                }
+                child = child.getNextSibling();
+            }
+        }
+    }
+
+    @Override
+    protected final void logLoadError(Token aIdent)
+    {
+        logLoadErrorImpl(aIdent.getLineNo(), aIdent.getColumnNo(),
+                         "redundant.throws.classInfo", aIdent.getText());
+    }
+
+    /**
+     * Checks if an exception is already know (list of known
+     * exceptions contains it or its superclass) and it's not
+     * a superclass for some known exception and it's not
+     * an unchecked exception.
+     * If it's unknown then it will be added to ist of known exception.
+     * All subclasses of this exception will be deleted from known
+     * and the exception  will be added instead.
+     *
+     * @param aExc <code>FullIdent</code> of exception to check
+     * @param aKnownExcs list of already known exception
+     */
+    private void checkException(FullIdent aExc, List<ClassInfo> aKnownExcs)
+    {
+        // Let's try to load class.
+        final ClassInfo newClassInfo =
+            createClassInfo(new Token(aExc), getCurrentClassName());
+
+        if (!mAllowUnchecked && isUnchecked(newClassInfo.getClazz())) {
+            log(aExc.getLineNo(), aExc.getColumnNo(),
+                "redundant.throws.unchecked", aExc.getText());
+        }
+
+        boolean shouldAdd = true;
+        for (final Iterator<ClassInfo> known = aKnownExcs.iterator(); known
+                .hasNext();)
+        {
+            final ClassInfo ci = known.next();
+            final Token fi = ci.getName();
+
+            if (ci.getClazz() == newClassInfo.getClazz()) {
+                shouldAdd = false;
+                log(aExc.getLineNo(), aExc.getColumnNo(),
+                    "redundant.throws.duplicate", aExc.getText());
+            }
+            else if (!mAllowSubclasses) {
+                if (isSubclass(ci.getClazz(), newClassInfo.getClazz())) {
+                    known.remove();
+                    log(fi.getLineNo(), fi.getColumnNo(),
+                        "redundant.throws.subclass",
+                        fi.getText(), aExc.getText());
+                }
+                else if (isSubclass(newClassInfo.getClazz(), ci.getClazz())) {
+                    shouldAdd = false;
+                    log(aExc.getLineNo(), aExc.getColumnNo(),
+                        "redundant.throws.subclass",
+                        aExc.getText(), fi.getText());
+                }
+            }
+        }
+
+        if (shouldAdd) {
+            aKnownExcs.add(newClassInfo);
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java
new file mode 100644
index 0000000..caef1a9
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java
@@ -0,0 +1,200 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.DeclarationCollector;
+
+/**
+ * <p>Checks that code doesn't rely on the "this" default.
+ * That is references to instance variables and methods of the present
+ * object are explicitly of the form "this.varName" or
+ * "this.methodName(args)".
+ *</p>
+ * <p>Examples of use:
+ * <pre>
+ * <module name="RequireThis"/>
+ * </pre>
+ * An example of how to configure to check <code>this</code> qualifier for
+ * methods only:
+ * <pre>
+ * <module name="RequireThis">
+ *   <property name="checkFields" value="false"/>
+ *   <property name="checkMethods" value="true"/>
+ * </module>
+ * </pre>
+ *
+ * <p>Limitations: I'm not currently doing anything about static variables
+ * or catch-blocks.  Static methods invoked on a class name seem to be OK;
+ * both the class name and the method name have a DOT parent.
+ * Non-static methods invoked on either this or a variable name seem to be
+ * OK, likewise.</p>
+ * <p>Much of the code for this check was cribbed from Rick Giles's
+ * <code>HiddenFieldCheck</code>.</p>
+ *
+ * @author Stephen Bloch
+ * @author o_sukhodolsky
+ */
+public class RequireThisCheck extends DeclarationCollector
+{
+    /** whether we should check fields usage. */
+    private boolean mCheckFields = true;
+    /** whether we should check methods usage. */
+    private boolean mCheckMethods = true;
+
+    /**
+     * Setter for checkFields property.
+     * @param aCheckFields should we check fields usage or not.
+     */
+    public void setCheckFields(boolean aCheckFields)
+    {
+        mCheckFields = aCheckFields;
+    }
+    /**
+     * @return true if we should check fields usage false otherwise.
+     */
+    public boolean getCheckFields()
+    {
+        return mCheckFields;
+    }
+
+    /**
+     * Setter for checkMethods property.
+     * @param aCheckMethods should we check methods usage or not.
+     */
+    public void setCheckMethods(boolean aCheckMethods)
+    {
+        mCheckMethods = aCheckMethods;
+    }
+    /**
+     * @return true if we should check methods usage false otherwise.
+     */
+    public boolean getCheckMethods()
+    {
+        return mCheckMethods;
+    }
+
+    /** Creates new instance of the check. */
+    public RequireThisCheck()
+    {
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.CLASS_DEF,
+            TokenTypes.CTOR_DEF,
+            TokenTypes.ENUM_DEF,
+            TokenTypes.IDENT,
+            TokenTypes.INTERFACE_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.PARAMETER_DEF,
+            TokenTypes.SLIST,
+            TokenTypes.VARIABLE_DEF,
+        };
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        super.visitToken(aAST);
+        if (aAST.getType() == TokenTypes.IDENT) {
+            processIDENT(aAST);
+        }
+    } // end visitToken
+
+    /**
+     * Checks if a given IDENT is method call or field name which
+     * require explicit <code>this</code> qualifier.
+     *
+     * @param aAST IDENT to check.
+     */
+    private void processIDENT(DetailAST aAST)
+    {
+        final int parentType = aAST.getParent().getType();
+
+        if (parentType == TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR
+            || parentType == TokenTypes.ANNOTATION
+            || parentType == TokenTypes.ANNOTATION_FIELD_DEF)
+        {
+            //cannot refer to 'this' from annotations
+            return;
+        }
+
+        // let's check method calls
+        if (parentType == TokenTypes.METHOD_CALL) {
+            if (mCheckMethods && isClassField(aAST.getText())) {
+                log(aAST, "require.this.method", aAST.getText());
+            }
+            return;
+        }
+
+        // let's check fields
+        if (!mCheckFields) {
+            // we shouldn't check fields
+            return;
+        }
+
+        if (ScopeUtils.getSurroundingScope(aAST) == null) {
+            // it is not a class or interface it's
+            // either import or package
+            // we shouldn't checks this
+            return;
+        }
+
+        if ((parentType == TokenTypes.DOT)
+            && (aAST.getPreviousSibling() != null))
+        {
+            // it's the method name in a method call; no problem
+            return;
+        }
+        if ((parentType == TokenTypes.TYPE)
+            || (parentType == TokenTypes.LITERAL_NEW))
+        {
+            // it's a type name; no problem
+            return;
+        }
+        if ((parentType == TokenTypes.VARIABLE_DEF)
+            || (parentType == TokenTypes.CTOR_DEF)
+            || (parentType == TokenTypes.METHOD_DEF)
+            || (parentType == TokenTypes.CLASS_DEF)
+            || (parentType == TokenTypes.ENUM_DEF)
+            || (parentType == TokenTypes.INTERFACE_DEF)
+            || (parentType == TokenTypes.PARAMETER_DEF)
+            || (parentType == TokenTypes.TYPE_ARGUMENT))
+        {
+            // it's being declared; no problem
+            return;
+        }
+
+        final String name = aAST.getText();
+        if (isClassField(name)) {
+            log(aAST, "require.this.variable", name);
+        }
+    }
+} // end class RequireThis
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheck.java
new file mode 100644
index 0000000..8b43cd7
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheck.java
@@ -0,0 +1,197 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.AbstractFormatCheck;
+
+/**
+ * <p>
+ * Restricts return statements to a specified count (default = 2).
+ * Ignores specified methods (<code>equals()</code> by default).
+ * </p>
+ * <p>
+ * Rationale: Too many return points can be indication that code is
+ * attempting to do too much or may be difficult to understand.
+ * </p>
+ *
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ * TODO: Test for inside a static block
+ */
+public final class ReturnCountCheck extends AbstractFormatCheck
+{
+    /** Default allowed number of return statements. */
+    private static final int DEFAULT_MAX = 2;
+
+    /** Stack of method contexts. */
+    private final FastStack<Context> mContextStack = FastStack.newInstance();
+    /** Maximum allowed number of return stmts. */
+    private int mMax;
+    /** Current method context. */
+    private Context mContext;
+
+    /** Creates new instance of the checks. */
+    public ReturnCountCheck()
+    {
+        super("^equals$");
+        setMax(DEFAULT_MAX);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.CTOR_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.LITERAL_RETURN,
+        };
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return new int[]{
+            TokenTypes.CTOR_DEF,
+            TokenTypes.METHOD_DEF,
+        };
+    }
+
+    /**
+     * Getter for max property.
+     * @return maximum allowed number of return statements.
+     */
+    public int getMax()
+    {
+        return mMax;
+    }
+
+    /**
+     * Setter for max property.
+     * @param aMax maximum allowed number of return statements.
+     */
+    public void setMax(int aMax)
+    {
+        mMax = aMax;
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        mContext = null;
+        mContextStack.clear();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.CTOR_DEF:
+        case TokenTypes.METHOD_DEF:
+            visitMethodDef(aAST);
+            break;
+        case TokenTypes.LITERAL_RETURN:
+            mContext.visitLiteralReturn();
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.CTOR_DEF:
+        case TokenTypes.METHOD_DEF:
+            leaveMethodDef(aAST);
+            break;
+        case TokenTypes.LITERAL_RETURN:
+            // Do nothing
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    /**
+     * Creates new method context and places old one on the stack.
+     * @param aAST method definition for check.
+     */
+    private void visitMethodDef(DetailAST aAST)
+    {
+        mContextStack.push(mContext);
+        final DetailAST methodNameAST = aAST.findFirstToken(TokenTypes.IDENT);
+        mContext =
+            new Context(!getRegexp().matcher(methodNameAST.getText()).find());
+    }
+
+    /**
+     * Checks number of return statements and restore
+     * previous method context.
+     * @param aAST method def node.
+     */
+    private void leaveMethodDef(DetailAST aAST)
+    {
+        mContext.checkCount(aAST);
+        mContext = mContextStack.pop();
+    }
+
+    /**
+     * Class to encapsulate information about one method.
+     * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+     */
+    private class Context
+    {
+        /** Whether we should check this method or not. */
+        private final boolean mChecking;
+        /** Counter for return statements. */
+        private int mCount;
+
+        /**
+         * Creates new method context.
+         * @param aChecking should we check this method or not.
+         */
+        public Context(boolean aChecking)
+        {
+            mChecking = aChecking;
+            mCount = 0;
+        }
+
+        /** Increase number of return statements. */
+        public void visitLiteralReturn()
+        {
+            ++mCount;
+        }
+
+        /**
+         * Checks if number of return statements in method more
+         * than allowed.
+         * @param aAST method def associated with this context.
+         */
+        public void checkCount(DetailAST aAST)
+        {
+            if (mChecking && (mCount > getMax())) {
+                log(aAST.getLineNo(), aAST.getColumnNo(), "return.count",
+                    mCount, getMax());
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanExpressionCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanExpressionCheck.java
new file mode 100644
index 0000000..35b20ce
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanExpressionCheck.java
@@ -0,0 +1,82 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * <p>
+ * Checks for overly complicated boolean expressions. Currently finds code like
+ * <code>if (b == true)</code>, <code>b || true</code>, <code>!false</code>,
+ * etc.
+ * </p>
+ * <p>
+ * Rationale: Complex boolean logic makes code hard to understand and maintain.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="SimplifyBooleanExpression"/>
+ * </pre>
+ * @author lkuehne
+ */
+public class SimplifyBooleanExpressionCheck
+        extends Check
+{
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.LITERAL_TRUE, TokenTypes.LITERAL_FALSE};
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        // Return empty list to prevent user changing tokens in the
+        // configuration.
+        return new int[] {};
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return new int[] {TokenTypes.LITERAL_TRUE, TokenTypes.LITERAL_FALSE};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST parent = aAST.getParent();
+        switch (parent.getType()) {
+        case TokenTypes.NOT_EQUAL:
+        case TokenTypes.EQUAL:
+        case TokenTypes.LNOT:
+        case TokenTypes.LOR:
+        case TokenTypes.LAND:
+            log(parent.getLineNo(), parent.getColumnNo(),
+                "simplify.expression");
+            break;
+        default:
+            break;
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanReturnCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanReturnCheck.java
new file mode 100644
index 0000000..8a4306c
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanReturnCheck.java
@@ -0,0 +1,149 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import antlr.collections.AST;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+
+/**
+ * <p>
+ * Checks for overly complicated boolean return statements.
+ * Idea shamelessly stolen from the equivalent PMD rule (pmd.sourceforge.net).
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="SimplifyBooleanReturn"/>
+ * </pre>
+ * @author Lars K�hne
+ */
+public class SimplifyBooleanReturnCheck
+    extends Check
+{
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.LITERAL_IF};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        // LITERAL_IF has the following four or five children:
+        // '('
+        // condition
+        // ')'
+        // thenStatement
+        // [ LITERAL_ELSE (with the elseStatement as a child) ]
+
+        // don't bother if this is not if then else
+        final AST elseLiteral =
+            aAST.findFirstToken(TokenTypes.LITERAL_ELSE);
+        if (elseLiteral == null) {
+            return;
+        }
+        final AST elseStatement = elseLiteral.getFirstChild();
+
+        // skip '(' and ')'
+        // TODO: Introduce helpers in DetailAST
+        final AST condition = aAST.getFirstChild().getNextSibling();
+        final AST thenStatement = condition.getNextSibling().getNextSibling();
+
+        if (returnsOnlyBooleanLiteral(thenStatement)
+            && returnsOnlyBooleanLiteral(elseStatement))
+        {
+            log(aAST.getLineNo(), aAST.getColumnNo(), "simplify.boolreturn");
+        }
+    }
+
+    /**
+     * Returns if an AST is a return statment with a boolean literal
+     * or a compound statement that contains only such a return statement.
+     *
+     * Returns <code>true</code> iff aAST represents
+     * <br/>
+     * <pre>
+     * return true/false;
+     * </pre>
+     * or
+     * <br/>
+     * <pre>
+     * {
+     *   return true/false;
+     * }
+     * </pre>
+     *
+     * @param aAST the sytax tree to check
+     * @return if aAST is a return statment with a boolean literal.
+     */
+    private static boolean returnsOnlyBooleanLiteral(AST aAST)
+    {
+        if (isBooleanLiteralReturnStatement(aAST)) {
+            return true;
+        }
+
+        final AST firstStmnt = aAST.getFirstChild();
+        return isBooleanLiteralReturnStatement(firstStmnt);
+    }
+
+    /**
+     * Returns if an AST is a return statment with a boolean literal.
+     *
+     * Returns <code>true</code> iff aAST represents
+     * <br/>
+     * <pre>
+     * return true/false;
+     * </pre>
+     *
+     * @param aAST the sytax tree to check
+     * @return if aAST is a return statment with a boolean literal.
+     */
+    private static boolean isBooleanLiteralReturnStatement(AST aAST)
+    {
+        if ((aAST == null) || (aAST.getType() != TokenTypes.LITERAL_RETURN)) {
+            return false;
+        }
+
+        final AST expr = aAST.getFirstChild();
+
+        if ((expr == null) || (expr.getType() == TokenTypes.SEMI)) {
+            return false;
+        }
+
+        final AST value = expr.getFirstChild();
+        return isBooleanLiteralType(value.getType());
+    }
+
+    /**
+     * Checks if a token type is a literal true or false.
+     * @param aTokenType the TokenType
+     * @return true iff aTokenType is LITERAL_TRUE or LITERAL_FALSE
+     */
+    private static boolean isBooleanLiteralType(final int aTokenType)
+    {
+        final boolean isTrue = (aTokenType == TokenTypes.LITERAL_TRUE);
+        final boolean isFalse = (aTokenType == TokenTypes.LITERAL_FALSE);
+        return isTrue || isFalse;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/StringLiteralEqualityCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/StringLiteralEqualityCheck.java
new file mode 100644
index 0000000..0b8cc56
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/StringLiteralEqualityCheck.java
@@ -0,0 +1,60 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import antlr.collections.AST;
+
+/**
+ * <p>Checks that string literals are not used with
+ * <code>==</code> or <code>!=</code>.
+ * </p>
+ * <p>
+ * Rationale: Novice Java programmers often use code like
+ * <code>if (x == "something")</code> when they mean
+ * <code>if ("something".equals(x))</code>.
+ * </p>
+ *
+ * @author Lars Kühne
+ */
+public class StringLiteralEqualityCheck extends Check
+{
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.EQUAL, TokenTypes.NOT_EQUAL};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        // no need to check for nulls here, == and != always have two children
+        final AST firstChild = aAST.getFirstChild();
+        final AST secondChild = firstChild.getNextSibling();
+
+        if ((firstChild.getType() == TokenTypes.STRING_LITERAL)
+                || (secondChild.getType() == TokenTypes.STRING_LITERAL))
+        {
+            log(aAST.getLineNo(), aAST.getColumnNo(),
+                    "string.literal.equality", aAST.getText());
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/SuperCloneCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/SuperCloneCheck.java
new file mode 100644
index 0000000..6c4bb83
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/SuperCloneCheck.java
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+
+/**
+ * <p>
+ * Checks that an overriding clone() method invokes super.clone().
+ * </p>
+ * <p>
+ * Reference:<a
+ * href="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Object.html#clone()">
+ * Object.clone</a>.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="SuperClone"/>
+ * </pre>
+ * @author Rick Giles
+ */
+public class SuperCloneCheck extends AbstractSuperCheck
+{
+    @Override
+    protected String getMethodName()
+    {
+        return "clone";
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/SuperFinalizeCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/SuperFinalizeCheck.java
new file mode 100644
index 0000000..4353597
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/SuperFinalizeCheck.java
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+
+/**
+ * <p>
+ * Checks that an overriding finalize() method invokes super.finalize().
+ * </p>
+ * <p>
+ * Reference:<a
+ * href="http://java.sun.com/docs/books/tutorial/java/data/garbagecollection.html">
+ * Cleaning up unused objects</a>.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="SuperFinalize"/>
+ * </pre>
+ * @author Rick Giles
+ */
+public class SuperFinalizeCheck extends AbstractSuperCheck
+{
+    @Override
+    protected String getMethodName()
+    {
+        return "finalize";
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheck.java
new file mode 100644
index 0000000..f3aa564
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheck.java
@@ -0,0 +1,292 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import antlr.collections.AST;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks if unnecessary parentheses are used in a statement or expression.
+ * The check will flag the following with warnings:
+ * </p>
+ * <pre>
+ *     return (x);          // parens around identifier
+ *     return (x + 1);      // parens around return value
+ *     int x = (y / 2 + 1); // parens around assignment rhs
+ *     for (int i = (0); i < 10; i++) {  // parens around literal
+ *     t -= (z + 1);        // parens around assignment rhs</pre>
+ * <p>
+ * The check is not "type aware", that is to say, it can't tell if parentheses
+ * are unnecessary based on the types in an expression.  It also doesn't know
+ * about operator precedence and associatvity; therefore it won't catch
+ * something like
+ * </p>
+ * <pre>
+ *     int x = (a + b) + c;</pre>
+ * <p>
+ * In the above case, given that <em>a</em>, <em>b</em>, and <em>c</em> are
+ * all <code>int</code> variables, the parentheses around <code>a + b</code>
+ * are not needed.
+ * </p>
+ *
+ * @author Eric Roe
+ */
+public class UnnecessaryParenthesesCheck extends Check
+{
+    /** The minimum number of child nodes to consider for a match. */
+    private static final int MIN_CHILDREN_FOR_MATCH = 3;
+    /** The maximum string length before we chop the string. */
+    private static final int MAX_QUOTED_LENGTH = 25;
+
+    /** Token types for literals. */
+    private static final int [] LITERALS = {
+        TokenTypes.NUM_DOUBLE,
+        TokenTypes.NUM_FLOAT,
+        TokenTypes.NUM_INT,
+        TokenTypes.NUM_LONG,
+        TokenTypes.STRING_LITERAL,
+        TokenTypes.LITERAL_NULL,
+        TokenTypes.LITERAL_FALSE,
+        TokenTypes.LITERAL_TRUE,
+    };
+
+    /** Token types for assignment operations. */
+    private static final int [] ASSIGNMENTS = {
+        TokenTypes.ASSIGN,
+        TokenTypes.BAND_ASSIGN,
+        TokenTypes.BOR_ASSIGN,
+        TokenTypes.BSR_ASSIGN,
+        TokenTypes.BXOR_ASSIGN,
+        TokenTypes.DIV_ASSIGN,
+        TokenTypes.MINUS_ASSIGN,
+        TokenTypes.MOD_ASSIGN,
+        TokenTypes.PLUS_ASSIGN,
+        TokenTypes.SL_ASSIGN,
+        TokenTypes.SR_ASSIGN,
+        TokenTypes.STAR_ASSIGN,
+    };
+
+    /**
+     * Used to test if logging a warning in a parent node may be skipped
+     * because a warning was already logged on an immediate child node.
+     */
+    private DetailAST mParentToSkip;
+    /** Depth of nested assignments.  Normally this will be 0 or 1. */
+    private int mAssignDepth;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int [] {
+            TokenTypes.EXPR,
+            TokenTypes.IDENT,
+            TokenTypes.NUM_DOUBLE,
+            TokenTypes.NUM_FLOAT,
+            TokenTypes.NUM_INT,
+            TokenTypes.NUM_LONG,
+            TokenTypes.STRING_LITERAL,
+            TokenTypes.LITERAL_NULL,
+            TokenTypes.LITERAL_FALSE,
+            TokenTypes.LITERAL_TRUE,
+            TokenTypes.ASSIGN,
+            TokenTypes.BAND_ASSIGN,
+            TokenTypes.BOR_ASSIGN,
+            TokenTypes.BSR_ASSIGN,
+            TokenTypes.BXOR_ASSIGN,
+            TokenTypes.DIV_ASSIGN,
+            TokenTypes.MINUS_ASSIGN,
+            TokenTypes.MOD_ASSIGN,
+            TokenTypes.PLUS_ASSIGN,
+            TokenTypes.SL_ASSIGN,
+            TokenTypes.SR_ASSIGN,
+            TokenTypes.STAR_ASSIGN,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final int type = aAST.getType();
+        final boolean surrounded = isSurrounded(aAST);
+        final DetailAST parent = aAST.getParent();
+
+        if ((type == TokenTypes.ASSIGN)
+            && (parent.getType() == TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR))
+        {
+            // shouldn't process assign in annotation pairs
+            return;
+        }
+
+        // An identifier surrounded by parentheses.
+        if (surrounded && (type == TokenTypes.IDENT)) {
+            mParentToSkip = aAST.getParent();
+            log(aAST, "unnecessary.paren.ident", aAST.getText());
+            return;
+        }
+
+        // A literal (numeric or string) surrounded by parentheses.
+        if (surrounded && inTokenList(type, LITERALS)) {
+            mParentToSkip = aAST.getParent();
+            if (type == TokenTypes.STRING_LITERAL) {
+                log(aAST, "unnecessary.paren.string",
+                    chopString(aAST.getText()));
+            }
+            else {
+                log(aAST, "unnecessary.paren.literal", aAST.getText());
+            }
+            return;
+        }
+
+        // The rhs of an assignment surrounded by parentheses.
+        if (inTokenList(type, ASSIGNMENTS)) {
+            mAssignDepth++;
+            final DetailAST last = aAST.getLastChild();
+            if (last.getType() == TokenTypes.RPAREN) {
+                log(aAST, "unnecessary.paren.assign");
+            }
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        final int type = aAST.getType();
+        final DetailAST parent = aAST.getParent();
+
+        if ((type == TokenTypes.ASSIGN)
+            && (parent.getType() == TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR))
+        {
+            // shouldn't process assign in annotation pairs
+            return;
+        }
+
+        // An expression is surrounded by parentheses.
+        if (type == TokenTypes.EXPR) {
+
+            // If 'mParentToSkip' == 'aAST', then we've already logged a
+            // warning about an immediate child node in visitToken, so we don't
+            // need to log another one here.
+
+            if ((mParentToSkip != aAST) && exprSurrounded(aAST)) {
+                if (mAssignDepth >= 1) {
+                    log(aAST, "unnecessary.paren.assign");
+                }
+                else if (aAST.getParent().getType()
+                    == TokenTypes.LITERAL_RETURN)
+                {
+                    log(aAST, "unnecessary.paren.return");
+                }
+                else {
+                    log(aAST, "unnecessary.paren.expr");
+                }
+            }
+
+            mParentToSkip = null;
+        }
+        else if (inTokenList(type, ASSIGNMENTS)) {
+            mAssignDepth--;
+        }
+
+        super.leaveToken(aAST);
+    }
+
+    /**
+     * Tests if the given <code>DetailAST</code> is surrounded by parentheses.
+     * In short, does <code>aAST</code> have a previous sibling whose type is
+     * <code>TokenTypes.LPAREN</code> and a next sibling whose type is <code>
+     * TokenTypes.RPAREN</code>.
+     * @param aAST the <code>DetailAST</code> to check if it is surrounded by
+     *        parentheses.
+     * @return <code>true</code> if <code>aAST</code> is surrounded by
+     *         parentheses.
+     */
+    private boolean isSurrounded(DetailAST aAST)
+    {
+        final DetailAST prev = aAST.getPreviousSibling();
+        final DetailAST next = aAST.getNextSibling();
+
+        return (prev != null) && (prev.getType() == TokenTypes.LPAREN)
+            && (next != null) && (next.getType() == TokenTypes.RPAREN);
+    }
+
+    /**
+     * Tests if the given expression node is surrounded by parentheses.
+     * @param aAST a <code>DetailAST</code> whose type is
+     *        <code>TokenTypes.EXPR</code>.
+     * @return <code>true</code> if the expression is surrounded by
+     *         parentheses.
+     * @throws IllegalArgumentException if <code>aAST.getType()</code> is not
+     *         equal to <code>TokenTypes.EXPR</code>.
+     */
+    private boolean exprSurrounded(DetailAST aAST)
+    {
+        if (aAST.getType() != TokenTypes.EXPR) {
+            throw new IllegalArgumentException("Not an expression node.");
+        }
+        boolean surrounded = false;
+        if (aAST.getChildCount() >= MIN_CHILDREN_FOR_MATCH) {
+            final AST n1 = aAST.getFirstChild();
+            final AST nn = aAST.getLastChild();
+
+            surrounded = (n1.getType() == TokenTypes.LPAREN)
+                && (nn.getType() == TokenTypes.RPAREN);
+        }
+        return surrounded;
+    }
+
+    /**
+     * Check if the given token type can be found in an array of token types.
+     * @param aType the token type.
+     * @param aTokens an array of token types to search.
+     * @return <code>true</code> if <code>aType</code> was found in <code>
+     *         aTokens</code>.
+     */
+    private boolean inTokenList(int aType, int [] aTokens)
+    {
+        // NOTE: Given the small size of the two arrays searched, I'm not sure
+        //       it's worth bothering with doing a binary search or using a
+        //       HashMap to do the searches.
+
+        boolean found = false;
+        for (int i = 0; (i < aTokens.length) && !found; i++) {
+            found = aTokens[i] == aType;
+        }
+        return found;
+    }
+
+    /**
+     * Returns the specified string chopped to <code>MAX_QUOTED_LENGTH</code>
+     * plus an ellipsis (...) if the length of the string exceeds <code>
+     * MAX_QUOTED_LENGTH</code>.
+     * @param aString the string to potentially chop.
+     * @return the chopped string if <code>aString</code> is longer than
+     *         <code>MAX_QUOTED_LENGTH</code>; otherwise <code>aString</code>.
+     */
+    private String chopString(String aString)
+    {
+        if (aString.length() > MAX_QUOTED_LENGTH) {
+            return aString.substring(0, MAX_QUOTED_LENGTH) + "...\"";
+        }
+        return aString;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/VariableDeclarationUsageDistanceCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/VariableDeclarationUsageDistanceCheck.java
new file mode 100644
index 0000000..b264f0e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/VariableDeclarationUsageDistanceCheck.java
@@ -0,0 +1,903 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import java.util.AbstractMap.SimpleEntry;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import antlr.collections.ASTEnumeration;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks the distance between declaration of variable and its first usage.
+ * </p>
+ * Example #1:
+ * <pre>
+ *      <code>int count;
+ *      a = a + b;
+ *      b = a + a;
+ *      count = b; // DECLARATION OF VARIABLE 'count'
+ *                 // SHOULD BE HERE (distance = 3)</code>
+ * </pre>
+ * Example #2:
+ * <pre>
+ *     <code>int count;
+ *     {
+ *         a = a + b;
+ *         count = b; // DECLARATION OF VARIABLE 'count'
+ *                    // SHOULD BE HERE (distance = 2)
+ *     }</code>
+ * </pre>
+ *
+ * <p>
+ * Check can detect a block of initialization methods. If a variable is used in
+ * such a block and there is no other statements after this variable then distance=1.
+ * </p>
+ * <p>
+ * <b>Case #1:</b>
+ * <pre>
+ * int <b>minutes</b> = 5;
+ * Calendar cal = Calendar.getInstance();
+ * cal.setTimeInMillis(timeNow);
+ * cal.set(Calendar.SECOND, 0);
+ * cal.set(Calendar.MILLISECOND, 0);
+ * cal.set(Calendar.HOUR_OF_DAY, hh);
+ * cal.set(Calendar.MINUTE, <b>minutes</b>);
+ *
+ * The distance for the variable <b>minutes</b> is 1 even
+ * though this variable is used in the fifth method's call.
+ * </pre>
+ *
+ * <p>
+ * <b>Case #2:</b>
+ * <pre>
+ * int <b>minutes</b> = 5;
+ * Calendar cal = Calendar.getInstance();
+ * cal.setTimeInMillis(timeNow);
+ * cal.set(Calendar.SECOND, 0);
+ * cal.set(Calendar.MILLISECOND, 0);
+ * <i>System.out.println(cal);</i>
+ * cal.set(Calendar.HOUR_OF_DAY, hh);
+ * cal.set(Calendar.MINUTE, <b>minutes</b>);
+ *
+ * The distance for the variable <b>minutes</b> is 6 because there is one more expression
+ * (except the initialization block) between the declaration of this variable and its usage.
+ * </pre>
+ *
+ *
+ * There are several additional options to configure the check:
+ * <pre>
+ * 1. allowedDistance - allows to set a distance
+ * between declaration of variable and its first usage.
+ * 2. ignoreVariablePattern - allows to set a RegEx pattern for
+ * ignoring the distance calculation for variables listed in this pattern.
+ * 3. validateBetweenScopes - allows to calculate the distance between
+ * declaration of variable and its first usage in the different scopes.
+ * 4. ignoreFinal - allows to ignore variables with a 'final' modifier.
+ * </pre>
+ * ATTENTION!! (Not supported cases)
+ * <pre>
+ * Case #1:
+ * <code>{
+ * int c;
+ * int a = 3;
+ * int b = 2;
+ *     {
+ *     a = a + b;
+ *     c = b;
+ *     }
+ * }</code>
+ *
+ * Distance for variable 'a' = 1;
+ * Distance for variable 'b' = 1;
+ * Distance for variable 'c' = 2.
+ * </pre>
+ * As distance by default is 1 the Check doesn't raise warning for variables 'a'
+ * and 'b' to move them into the block.
+ * <pre>
+ * Case #2:
+ * <code>int sum = 0;
+ * for (int i = 0; i < 20; i++) {
+ *     a++;
+ *     b--;
+ *     sum++;
+ *     if (sum > 10) {
+ *         res = true;
+ *     }
+ * }</code>
+ * Distance for variable 'sum' = 3.
+ * </pre>
+ * <p>
+ * As the distance is more then the default one, the Check raises warning for variable
+ * 'sum' to move it into the 'for(...)' block. But there is situation when
+ * variable 'sum' hasn't to be 0 within each iteration. So, to avoid such
+ * warnings you can use Suppression Filter, provided by Checkstyle, for the
+ * whole class.
+ * </p>
+ *
+ * <p>
+ * An example how to configure this Check:
+ * </p>
+ * <pre>
+ * <module name="VariableDeclarationUsageDistance"/>
+ * </pre>
+ * <p>
+ * An example of how to configure this Check:
+ *  - to set the allowed distance to 4;
+ *  - to ignore variables with prefix '^temp';
+ *  - to force the validation between scopes;
+ *  - to check the final variables;
+ * </p>
+ * <pre>
+ * <module name="VariableDeclarationUsageDistance">
+ *     <property name="allowedDistance" value="4">
+ *     <property name="ignoreVariablePattern" value="^temp.*">
+ *     <property name="validateBetweenScopes" value="true">
+ *     <property name="mIgnoreFinal" value="false">
+ * </module>
+ * </pre>
+ *
+ * @author <a href="mailto:rd.ryly at gmail.com">Ruslan Diachenko</a>
+ * @author <a href="mailto:barataliba at gmail.com">Baratali Izmailov</a>
+ */
+public class VariableDeclarationUsageDistanceCheck extends Check
+{
+    /**
+     * Warning message key.
+     */
+    public static final String MSG_KEY = "variable.declaration.usage.distance";
+
+    /**
+     * Warning message key.
+     */
+    public static final String MSG_KEY_EXT = "variable.declaration.usage.distance.extend";
+
+    /**
+     * Default value of distance between declaration of variable and its first
+     * usage.
+     */
+    private static final int DEFAULT_DISTANCE = 3;
+
+    /** Allowed distance between declaration of variable and its first usage. */
+    private int mAllowedDistance = DEFAULT_DISTANCE;
+
+    /**
+     * RegExp pattern to ignore distance calculation for variables listed in
+     * this pattern.
+     */
+    private Pattern mIgnoreVariablePattern = Pattern.compile("");
+
+    /**
+     * Allows to calculate distance between declaration of variable and its
+     * first usage in different scopes.
+     */
+    private boolean mValidateBetweenScopes;
+
+    /** Allows to ignore variables with 'final' modifier. */
+    private boolean mIgnoreFinal = true;
+
+    /**
+     * Sets an allowed distance between declaration of variable and its first
+     * usage.
+     * @param aAllowedDistance
+     *        Allowed distance between declaration of variable and its first
+     *        usage.
+     */
+    public void setAllowedDistance(int aAllowedDistance)
+    {
+        this.mAllowedDistance = aAllowedDistance;
+    }
+
+    /**
+     * Sets RegExp pattern to ignore distance calculation for variables listed
+     * in this pattern.
+     * @param aIgnorePattern
+     *        Pattern contains ignored variables.
+     */
+    public void setIgnoreVariablePattern(String aIgnorePattern)
+    {
+        this.mIgnoreVariablePattern = Pattern.compile(aIgnorePattern);
+    }
+
+    /**
+     * Sets option which allows to calculate distance between declaration of
+     * variable and its first usage in different scopes.
+     * @param aValidateBetweenScopes
+     *        Defines if allow to calculate distance between declaration of
+     *        variable and its first usage in different scopes or not.
+     */
+    public void setValidateBetweenScopes(boolean aValidateBetweenScopes)
+    {
+        this.mValidateBetweenScopes = aValidateBetweenScopes;
+    }
+
+    /**
+     * Sets ignore option for variables with 'final' modifier.
+     * @param aIgnoreFinal
+     *        Defines if ignore variables with 'final' modifier or not.
+     */
+    public void setIgnoreFinal(boolean aIgnoreFinal)
+    {
+        this.mIgnoreFinal = aIgnoreFinal;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.VARIABLE_DEF};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final int parentType = aAST.getParent().getType();
+        final DetailAST modifiers = aAST.getFirstChild();
+
+        if ((mIgnoreFinal && modifiers.branchContains(TokenTypes.FINAL))
+                || parentType == TokenTypes.OBJBLOCK)
+        {
+            ;// no code
+        }
+        else {
+            final DetailAST variable = aAST.findFirstToken(TokenTypes.IDENT);
+
+            if (!isVariableMatchesIgnorePattern(variable.getText())) {
+                final DetailAST semicolonAst = aAST.getNextSibling();
+                Entry<DetailAST, Integer> entry = null;
+                if (mValidateBetweenScopes) {
+                    entry = calculateDistanceBetweenScopes(semicolonAst, variable);
+                }
+                else {
+                    entry = calculateDistanceInSingleScope(semicolonAst, variable);
+                }
+                final DetailAST variableUsageAst = entry.getKey();
+                final int dist = entry.getValue();
+                if (dist > mAllowedDistance
+                        && !isInitializationSequence(variableUsageAst, variable.getText()))
+                {
+                    if (mIgnoreFinal) {
+                        log(variable.getLineNo(),
+                                MSG_KEY_EXT, variable.getText(), dist, mAllowedDistance);
+                    }
+                    else {
+                        log(variable.getLineNo(),
+                                MSG_KEY, variable.getText(), dist, mAllowedDistance);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Get name of instance whose method is called.
+     * @param aMethodCallAst
+     *        DetailAST of METHOD_CALL.
+     * @return name of instance.
+     */
+    private static String getInstanceName(DetailAST aMethodCallAst)
+    {
+        final String methodCallName =
+                FullIdent.createFullIdentBelow(aMethodCallAst).getText();
+        final int lastDotIndex = methodCallName.lastIndexOf('.');
+        String instanceName = "";
+        if (lastDotIndex != -1) {
+            instanceName = methodCallName.substring(0, lastDotIndex);
+        }
+        return instanceName;
+    }
+
+    /**
+     * Processes statements until usage of variable to detect sequence of
+     * initialization methods.
+     * @param aVariableUsageAst
+     *        DetailAST of expression that uses variable named aVariableName.
+     * @param aVariableName
+     *        name of considered variable.
+     * @return true if statements between declaration and usage of variable are
+     *         initialization methods.
+     */
+    private static boolean isInitializationSequence(
+            DetailAST aVariableUsageAst, String aVariableName)
+    {
+        boolean result = true;
+        boolean isUsedVariableDeclarationFound = false;
+        DetailAST currentSiblingAst = aVariableUsageAst;
+        String initInstanceName = "";
+
+        while (result
+                && !isUsedVariableDeclarationFound
+                && currentSiblingAst != null)
+        {
+
+            switch (currentSiblingAst.getType()) {
+
+            case TokenTypes.EXPR:
+                final DetailAST methodCallAst = currentSiblingAst.getFirstChild();
+
+                if (methodCallAst != null
+                        && methodCallAst.getType() == TokenTypes.METHOD_CALL)
+                {
+                    final String instanceName =
+                            getInstanceName(methodCallAst);
+                    // method is called without instance
+                    if (instanceName.isEmpty()) {
+                        result = false;
+                    }
+                    // differs from previous instance
+                    else if (!instanceName.equals(initInstanceName)) {
+                        if (!initInstanceName.isEmpty()) {
+                            result = false;
+                        }
+                        else {
+                            initInstanceName = instanceName;
+                        }
+                    }
+                }
+                else { // is not method call
+                    result = false;
+                }
+                break;
+
+            case TokenTypes.VARIABLE_DEF:
+                final String currentVariableName = currentSiblingAst.
+                        findFirstToken(TokenTypes.IDENT).getText();
+                isUsedVariableDeclarationFound = aVariableName.equals(currentVariableName);
+                break;
+
+            case TokenTypes.SEMI:
+                break;
+
+            default:
+                result = false;
+            }
+
+            currentSiblingAst = currentSiblingAst.getPreviousSibling();
+        }
+
+        return result;
+    }
+
+    /**
+     * Calculates distance between declaration of variable and its first usage
+     * in single scope.
+     * @param aSemicolonAst
+     *        Regular node of Ast which is checked for content of checking
+     *        variable.
+     * @param aVariableIdentAst
+     *        Variable which distance is calculated for.
+     * @return entry which contains expression with variable usage and distance.
+     */
+    private Entry<DetailAST, Integer> calculateDistanceInSingleScope(
+            DetailAST aSemicolonAst, DetailAST aVariableIdentAst)
+    {
+        int dist = 0;
+        boolean firstUsageFound = false;
+        DetailAST currentAst = aSemicolonAst;
+        DetailAST variableUsageAst = null;
+
+        while (!firstUsageFound && currentAst != null
+                && currentAst.getType() != TokenTypes.RCURLY)
+        {
+            if (currentAst.getFirstChild() != null) {
+
+                if (isChild(currentAst, aVariableIdentAst)) {
+
+                    switch (currentAst.getType()) {
+                    case TokenTypes.VARIABLE_DEF:
+                        dist++;
+                        break;
+                    case TokenTypes.SLIST:
+                        dist = 0;
+                        break;
+                    case TokenTypes.LITERAL_FOR:
+                    case TokenTypes.LITERAL_WHILE:
+                    case TokenTypes.LITERAL_DO:
+                    case TokenTypes.LITERAL_IF:
+                    case TokenTypes.LITERAL_SWITCH:
+                        if (isVariableInOperatorExpr(currentAst, aVariableIdentAst)) {
+                            dist++;
+                        }
+                        else { // variable usage is in inner scope
+                            // reset counters, because we can't determine distance
+                            dist = 0;
+                        }
+                        break;
+                    default:
+                        if (currentAst.branchContains(TokenTypes.SLIST)) {
+                            dist = 0;
+                        }
+                        else {
+                            dist++;
+                        }
+                    }
+                    variableUsageAst = currentAst;
+                    firstUsageFound = true;
+                }
+                else if (currentAst.getType() != TokenTypes.VARIABLE_DEF) {
+                    dist++;
+                }
+            }
+            currentAst = currentAst.getNextSibling();
+        }
+
+        // If variable wasn't used after its declaration, distance is 0.
+        if (!firstUsageFound) {
+            dist = 0;
+        }
+
+        return new SimpleEntry<DetailAST, Integer>(variableUsageAst, dist);
+    }
+
+    /**
+     * Calculates distance between declaration of variable and its first usage
+     * in multiple scopes.
+     * @param aAST
+     *        Regular node of Ast which is checked for content of checking
+     *        variable.
+     * @param aVariable
+     *        Variable which distance is calculated for.
+     * @return entry which contains expression with variable usage and distance.
+     */
+    private Entry<DetailAST, Integer> calculateDistanceBetweenScopes(
+            DetailAST aAST, DetailAST aVariable)
+    {
+        int dist = 0;
+        DetailAST currentScopeAst = aAST;
+        DetailAST variableUsageAst = null;
+        while (currentScopeAst != null) {
+            final List<DetailAST> variableUsageExpressions = new ArrayList<DetailAST>();
+            DetailAST currentStatementAst = currentScopeAst;
+            currentScopeAst = null;
+            while (currentStatementAst != null
+                    && currentStatementAst.getType() != TokenTypes.RCURLY)
+            {
+                if (currentStatementAst.getFirstChild() != null) {
+                    if (isChild(currentStatementAst, aVariable)) {
+                        variableUsageExpressions.add(currentStatementAst);
+                    }
+                    // If expression doesn't contain variable and this variable
+                    // hasn't been met yet, than distance + 1.
+                    else if (variableUsageExpressions.size() == 0
+                            && currentStatementAst.getType() != TokenTypes.VARIABLE_DEF)
+                    {
+                        dist++;
+                    }
+                }
+                currentStatementAst = currentStatementAst.getNextSibling();
+            }
+            // If variable usage exists in a single scope, then look into
+            // this scope and count distance until variable usage.
+            if (variableUsageExpressions.size() == 1) {
+                final DetailAST blockWithVariableUsage = variableUsageExpressions
+                        .get(0);
+                DetailAST exprWithVariableUsage = null;
+                switch (blockWithVariableUsage.getType()) {
+                case TokenTypes.VARIABLE_DEF:
+                case TokenTypes.EXPR:
+                    dist++;
+                    break;
+                case TokenTypes.LITERAL_FOR:
+                case TokenTypes.LITERAL_WHILE:
+                case TokenTypes.LITERAL_DO:
+                    exprWithVariableUsage = getFirstNodeInsideForWhileDoWhileBlocks(
+                            blockWithVariableUsage, aVariable);
+                    break;
+                case TokenTypes.LITERAL_IF:
+                    exprWithVariableUsage = getFirstNodeInsideIfBlock(
+                            blockWithVariableUsage, aVariable);
+                    break;
+                case TokenTypes.LITERAL_SWITCH:
+                    exprWithVariableUsage = getFirstNodeInsideSwitchBlock(
+                            blockWithVariableUsage, aVariable);
+                    break;
+                case TokenTypes.LITERAL_TRY:
+                    exprWithVariableUsage =
+                        getFirstNodeInsideTryCatchFinallyBlocks(blockWithVariableUsage, aVariable);
+                    break;
+                default:
+                    exprWithVariableUsage = blockWithVariableUsage.getFirstChild();
+                }
+                currentScopeAst = exprWithVariableUsage;
+                if (exprWithVariableUsage != null) {
+                    variableUsageAst = exprWithVariableUsage;
+                }
+                else {
+                    variableUsageAst = blockWithVariableUsage;
+                }
+            }
+            // If variable usage exists in different scopes, then distance =
+            // distance until variable first usage.
+            else if (variableUsageExpressions.size() > 1) {
+                dist++;
+                variableUsageAst = variableUsageExpressions.get(0);
+            }
+            // If there's no any variable usage, then distance = 0.
+            else {
+                variableUsageAst = null;
+            }
+        }
+        return new SimpleEntry<DetailAST, Integer>(variableUsageAst, dist);
+    }
+
+    /**
+     * Gets first Ast node inside FOR, WHILE or DO-WHILE blocks if variable
+     * usage is met only inside the block (not in its declaration!).
+     * @param aBlock
+     *        Ast node represents FOR, WHILE or DO-WHILE block.
+     * @param aVariable
+     *        Variable which is checked for content in block.
+     * @return If variable usage is met only inside the block
+     *         (not in its declaration!) than return the first Ast node
+     *         of this block, otherwise - null.
+     */
+    private DetailAST getFirstNodeInsideForWhileDoWhileBlocks(
+            DetailAST aBlock, DetailAST aVariable)
+    {
+        DetailAST firstNodeInsideBlock = null;
+
+        if (!isVariableInOperatorExpr(aBlock, aVariable)) {
+            DetailAST currentNode = null;
+
+            // Find currentNode for DO-WHILE block.
+            if (aBlock.getType() == TokenTypes.LITERAL_DO) {
+                currentNode = aBlock.getFirstChild();
+            }
+            // Find currentNode for FOR or WHILE block.
+            else {
+                // Looking for RPAREN ( ')' ) token to mark the end of operator
+                // expression.
+                currentNode = aBlock.findFirstToken(TokenTypes.RPAREN);
+                if (currentNode != null) {
+                    currentNode = currentNode.getNextSibling();
+                }
+            }
+
+            if (currentNode != null) {
+                final int currentNodeType = currentNode.getType();
+
+                if (currentNodeType == TokenTypes.SLIST) {
+                    firstNodeInsideBlock = currentNode.getFirstChild();
+                }
+                else if (currentNodeType == TokenTypes.VARIABLE_DEF
+                        || currentNodeType == TokenTypes.EXPR)
+                {
+                    ; // no code
+                }
+                else {
+                    firstNodeInsideBlock = currentNode;
+                }
+            }
+        }
+
+        return firstNodeInsideBlock;
+    }
+
+    /**
+     * Gets first Ast node inside IF block if variable usage is met
+     * only inside the block (not in its declaration!).
+     * @param aBlock
+     *        Ast node represents IF block.
+     * @param aVariable
+     *        Variable which is checked for content in block.
+     * @return If variable usage is met only inside the block
+     *         (not in its declaration!) than return the first Ast node
+     *         of this block, otherwise - null.
+     */
+    private DetailAST getFirstNodeInsideIfBlock(
+            DetailAST aBlock, DetailAST aVariable)
+    {
+        DetailAST firstNodeInsideBlock = null;
+
+        if (!isVariableInOperatorExpr(aBlock, aVariable)) {
+            DetailAST currentNode = aBlock.getLastChild();
+            final List<DetailAST> variableUsageExpressions =
+                    new ArrayList<DetailAST>();
+
+            while (currentNode != null
+                    && currentNode.getType() == TokenTypes.LITERAL_ELSE)
+            {
+                final DetailAST previousNode =
+                        currentNode.getPreviousSibling();
+
+                // Checking variable usage inside IF block.
+                if (isChild(previousNode, aVariable)) {
+                    variableUsageExpressions.add(previousNode);
+                }
+
+                // Looking into ELSE block, get its first child and analyze it.
+                currentNode = currentNode.getFirstChild();
+
+                if (currentNode.getType() == TokenTypes.LITERAL_IF) {
+                    currentNode = currentNode.getLastChild();
+                }
+                else if (isChild(currentNode, aVariable)) {
+                    variableUsageExpressions.add(currentNode);
+                    currentNode = null;
+                }
+            }
+
+            // If IF block doesn't include ELSE than analyze variable usage
+            // only inside IF block.
+            if (currentNode != null
+                    && isChild(currentNode, aVariable))
+            {
+                variableUsageExpressions.add(currentNode);
+            }
+
+            // If variable usage exists in several related blocks, then
+            // firstNodeInsideBlock = null, otherwise if variable usage exists
+            // only inside one block, then get node from
+            // variableUsageExpressions.
+            if (variableUsageExpressions.size() == 1) {
+                firstNodeInsideBlock = variableUsageExpressions.get(0);
+            }
+        }
+
+        return firstNodeInsideBlock;
+    }
+
+    /**
+     * Gets first Ast node inside SWITCH block if variable usage is met
+     * only inside the block (not in its declaration!).
+     * @param aBlock
+     *        Ast node represents SWITCH block.
+     * @param aVariable
+     *        Variable which is checked for content in block.
+     * @return If variable usage is met only inside the block
+     *         (not in its declaration!) than return the first Ast node
+     *         of this block, otherwise - null.
+     */
+    private DetailAST getFirstNodeInsideSwitchBlock(
+            DetailAST aBlock, DetailAST aVariable)
+    {
+        DetailAST firstNodeInsideBlock = null;
+
+        if (!isVariableInOperatorExpr(aBlock, aVariable)) {
+            DetailAST currentNode = aBlock
+                    .findFirstToken(TokenTypes.CASE_GROUP);
+            final List<DetailAST> variableUsageExpressions =
+                    new ArrayList<DetailAST>();
+
+            // Checking variable usage inside all CASE blocks.
+            while (currentNode != null
+                    && currentNode.getType() == TokenTypes.CASE_GROUP)
+            {
+                final DetailAST lastNodeInCaseGroup =
+                        currentNode.getLastChild();
+
+                if (isChild(lastNodeInCaseGroup, aVariable)) {
+                    variableUsageExpressions.add(lastNodeInCaseGroup);
+                }
+                currentNode = currentNode.getNextSibling();
+            }
+
+            // If variable usage exists in several related blocks, then
+            // firstNodeInsideBlock = null, otherwise if variable usage exists
+            // only inside one block, then get node from
+            // variableUsageExpressions.
+            if (variableUsageExpressions.size() == 1) {
+                firstNodeInsideBlock = variableUsageExpressions.get(0);
+            }
+        }
+
+        return firstNodeInsideBlock;
+    }
+
+    /**
+     * Gets first Ast node inside TRY-CATCH-FINALLY blocks if variable usage is
+     * met only inside the block (not in its declaration!).
+     * @param aBlock
+     *        Ast node represents TRY-CATCH-FINALLY block.
+     * @param aVariable
+     *        Variable which is checked for content in block.
+     * @return If variable usage is met only inside the block
+     *         (not in its declaration!) than return the first Ast node
+     *         of this block, otherwise - null.
+     */
+    private static DetailAST getFirstNodeInsideTryCatchFinallyBlocks(
+            DetailAST aBlock, DetailAST aVariable)
+    {
+        DetailAST currentNode = aBlock.getFirstChild();
+        final List<DetailAST> variableUsageExpressions =
+                new ArrayList<DetailAST>();
+
+        // Checking variable usage inside TRY block.
+        if (isChild(currentNode, aVariable)) {
+            variableUsageExpressions.add(currentNode);
+        }
+
+        // Switch on CATCH block.
+        currentNode = currentNode.getNextSibling();
+
+        // Checking variable usage inside all CATCH blocks.
+        while (currentNode != null
+                && currentNode.getType() == TokenTypes.LITERAL_CATCH)
+        {
+            final DetailAST catchBlock = currentNode.getLastChild();
+
+            if (isChild(catchBlock, aVariable)) {
+                variableUsageExpressions.add(catchBlock);
+            }
+            currentNode = currentNode.getNextSibling();
+        }
+
+        // Checking variable usage inside FINALLY block.
+        if (currentNode != null) {
+            final DetailAST finalBlock = currentNode.getLastChild();
+
+            if (isChild(finalBlock, aVariable)) {
+                variableUsageExpressions.add(finalBlock);
+            }
+        }
+
+        DetailAST variableUsageNode = null;
+
+        // If variable usage exists in several related blocks, then
+        // firstNodeInsideBlock = null, otherwise if variable usage exists
+        // only inside one block, then get node from
+        // variableUsageExpressions.
+        if (variableUsageExpressions.size() == 1) {
+            variableUsageNode = variableUsageExpressions.get(0).getFirstChild();
+        }
+
+        return variableUsageNode;
+    }
+
+    /**
+     * Checks if variable is in operator declaration. For instance:
+     * <pre>
+     * boolean b = true;
+     * if (b) {...}
+     * </pre>
+     * Variable 'b' is in declaration of operator IF.
+     * @param aOperator
+     *        Ast node which represents operator.
+     * @param aVariable
+     *        Variable which is checked for content in operator.
+     * @return true if operator contains variable in its declaration, otherwise
+     *         - false.
+     */
+    private boolean isVariableInOperatorExpr(
+            DetailAST aOperator, DetailAST aVariable)
+    {
+        boolean isVarInOperatorDeclr = false;
+        final DetailAST openingBracket =
+                aOperator.findFirstToken(TokenTypes.LPAREN);
+
+        if (openingBracket != null) {
+            // Get EXPR between brackets
+            DetailAST exprBetweenBrackets = openingBracket
+                    .getNextSibling();
+
+            // Look if variable is in operator expression
+            while (exprBetweenBrackets.getType() != TokenTypes.RPAREN) {
+
+                if (isChild(exprBetweenBrackets, aVariable)) {
+                    isVarInOperatorDeclr = true;
+                    break;
+                }
+                exprBetweenBrackets = exprBetweenBrackets.getNextSibling();
+            }
+
+            // Variable may be met in ELSE declaration or in CASE declaration.
+            // So, check variable usage in these declarations.
+            if (!isVarInOperatorDeclr) {
+                switch (aOperator.getType()) {
+                case TokenTypes.LITERAL_IF:
+                    final DetailAST elseBlock = aOperator.getLastChild();
+
+                    if (elseBlock.getType() == TokenTypes.LITERAL_ELSE) {
+                        // Get IF followed by ELSE
+                        final DetailAST firstNodeInsideElseBlock = elseBlock
+                                .getFirstChild();
+
+                        if (firstNodeInsideElseBlock.getType()
+                                == TokenTypes.LITERAL_IF)
+                        {
+                            isVarInOperatorDeclr |=
+                                    isVariableInOperatorExpr(
+                                            firstNodeInsideElseBlock,
+                                            aVariable);
+                        }
+                    }
+                    break;
+
+                case TokenTypes.LITERAL_SWITCH:
+                    DetailAST currentCaseBlock = aOperator
+                            .findFirstToken(TokenTypes.CASE_GROUP);
+
+                    while (currentCaseBlock != null
+                            && currentCaseBlock.getType()
+                            == TokenTypes.CASE_GROUP)
+                    {
+                        final DetailAST firstNodeInsideCaseBlock =
+                                currentCaseBlock.getFirstChild();
+
+                        if (isChild(firstNodeInsideCaseBlock,
+                                aVariable))
+                        {
+                            isVarInOperatorDeclr = true;
+                            break;
+                        }
+                        currentCaseBlock = currentCaseBlock.getNextSibling();
+                    }
+                    break;
+
+                default:
+                    ;// no code
+                }
+            }
+        }
+
+        return isVarInOperatorDeclr;
+    }
+
+    /**
+     * Checks if Ast node contains given element.
+     * @param aParent
+     *        Node of AST.
+     * @param aAST
+     *        Ast element which is checked for content in Ast node.
+     * @return true if Ast element was found in Ast node, otherwise - false.
+     */
+    private static boolean isChild(DetailAST aParent, DetailAST aAST)
+    {
+        boolean isChild = false;
+        final ASTEnumeration astList = aParent.findAllPartial(aAST);
+
+        while (astList.hasMoreNodes()) {
+            final DetailAST ast = (DetailAST) astList.nextNode();
+            DetailAST astParent = ast.getParent();
+
+            while (astParent != null) {
+
+                if (astParent.equals(aParent)
+                        && astParent.getLineNo() == aParent.getLineNo())
+                {
+                    isChild = true;
+                    break;
+                }
+                astParent = astParent.getParent();
+            }
+        }
+
+        return isChild;
+    }
+
+    /**
+     * Checks if entrance variable is contained in ignored pattern.
+     * @param aVariable
+     *        Variable which is checked for content in ignored pattern.
+     * @return true if variable was found, otherwise - false.
+     */
+    private boolean isVariableMatchesIgnorePattern(String aVariable)
+    {
+        final Matcher matcher = mIgnoreVariablePattern.matcher(aVariable);
+        return matcher.matches();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/package-info.java
new file mode 100644
index 0000000..98d15bd
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/package-info.java
@@ -0,0 +1,24 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the <span class="xdocspagetitle">Coding</span> checks that are
+ * bundled with the main distribution.
+ */
+package com.puppycrawl.tools.checkstyle.checks.coding;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/DesignForExtensionCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/DesignForExtensionCheck.java
new file mode 100644
index 0000000..d245618
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/DesignForExtensionCheck.java
@@ -0,0 +1,157 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Checks that classes are designed for inheritance.
+ *
+ * <p>
+ * More specifically, it enforces a programming style
+ * where superclasses provide empty "hooks" that can be
+ * implemented by subclasses.
+ * </p>
+ *
+ * <p>
+ * The exact rule is that nonprivate, nonstatic methods in
+ * nonfinal classes (or classes that do not
+ * only have private constructors) must either be
+ * <ul>
+ * <li>abstract or</li>
+ * <li>final or</li>
+ * <li>have an empty implementation</li>
+ * </ul>
+ *
+ *
+ * <p>
+ * This protects superclasses against being broken by
+ * subclasses. The downside is that subclasses are limited
+ * in their flexibility, in particular they cannot prevent
+ * execution of code in the superclass, but that also
+ * means that subclasses can't forget to call their super
+ * method.
+ * </p>
+ *
+ * @author lkuehne
+ */
+public class DesignForExtensionCheck extends Check
+{
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.METHOD_DEF};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        // nothing to do for Interfaces
+        if (ScopeUtils.inInterfaceOrAnnotationBlock(aAST)) {
+            return;
+        }
+
+        // method is ok if it is private or abstract or final
+        final DetailAST modifiers = aAST.findFirstToken(TokenTypes.MODIFIERS);
+        if (modifiers.branchContains(TokenTypes.LITERAL_PRIVATE)
+            || modifiers.branchContains(TokenTypes.ABSTRACT)
+            || modifiers.branchContains(TokenTypes.FINAL)
+            || modifiers.branchContains(TokenTypes.LITERAL_STATIC))
+        {
+            return;
+        }
+
+        // method is ok if containing class is not visible in API and
+        // cannot be extended by 3rd parties (bug #884035)
+        if (!ScopeUtils.getSurroundingScope(aAST).isIn(Scope.PROTECTED)) {
+            return;
+        }
+
+        // method is ok if it is implementation can verified to be empty
+        // Note: native methods don't have impl in java code, so
+        // implementation can be null even if method not abstract
+        final DetailAST implementation = aAST.findFirstToken(TokenTypes.SLIST);
+        if ((implementation != null)
+            && (implementation.getFirstChild().getType() == TokenTypes.RCURLY))
+        {
+            return;
+        }
+
+        // check if the containing class can be subclassed
+        final DetailAST classDef = findContainingClass(aAST);
+        final DetailAST classMods =
+            classDef.findFirstToken(TokenTypes.MODIFIERS);
+        if ((classDef.getType() == TokenTypes.ENUM_DEF)
+            || classMods.branchContains(TokenTypes.FINAL))
+        {
+            return;
+        }
+
+        // check if subclassing is prevented by having only private ctors
+        final DetailAST objBlock = classDef.findFirstToken(TokenTypes.OBJBLOCK);
+
+        boolean hasDefaultConstructor = true;
+        boolean hasExplNonPrivateCtor = false;
+
+        DetailAST candidate = objBlock.getFirstChild();
+
+        while (candidate != null) {
+            if (candidate.getType() == TokenTypes.CTOR_DEF) {
+                hasDefaultConstructor = false;
+
+                final DetailAST ctorMods =
+                    candidate.findFirstToken(TokenTypes.MODIFIERS);
+                if (!ctorMods.branchContains(TokenTypes.LITERAL_PRIVATE)) {
+                    hasExplNonPrivateCtor = true;
+                    break;
+                }
+            }
+            candidate = candidate.getNextSibling();
+        }
+
+        if (hasDefaultConstructor || hasExplNonPrivateCtor) {
+            final String name = aAST.findFirstToken(TokenTypes.IDENT).getText();
+            log(aAST.getLineNo(), aAST.getColumnNo(),
+                "design.forExtension", name);
+        }
+
+
+
+    }
+
+    /**
+     * Searches the tree towards the root until it finds a CLASS_DEF node.
+     * @param aAST the start node for searching
+     * @return the CLASS_DEF node.
+     */
+    private DetailAST findContainingClass(DetailAST aAST)
+    {
+        DetailAST searchAST = aAST;
+        while ((searchAST.getType() != TokenTypes.CLASS_DEF)
+               && (searchAST.getType() != TokenTypes.ENUM_DEF))
+        {
+            searchAST = searchAST.getParent();
+        }
+        return searchAST;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheck.java
new file mode 100644
index 0000000..628a19f
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheck.java
@@ -0,0 +1,184 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks that class which has only private ctors
+ * is declared as final.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="FinalClass"/>
+ * </pre>
+ * @author o_sukhodolsky
+ */
+public class FinalClassCheck
+    extends Check
+{
+    /** Keeps ClassDesc objects for stack of declared classes. */
+    private final FastStack<ClassDesc> mClasses = FastStack.newInstance();
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[]{TokenTypes.CLASS_DEF, TokenTypes.CTOR_DEF};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST modifiers = aAST.findFirstToken(TokenTypes.MODIFIERS);
+
+        if (aAST.getType() == TokenTypes.CLASS_DEF) {
+            final boolean isFinal = (modifiers != null)
+                    && modifiers.branchContains(TokenTypes.FINAL);
+            final boolean isAbstract = (modifiers != null)
+                    && modifiers.branchContains(TokenTypes.ABSTRACT);
+            mClasses.push(new ClassDesc(isFinal, isAbstract));
+        }
+        else if (!ScopeUtils.inEnumBlock(aAST)) { //ctors in enums don't matter
+            final ClassDesc desc = mClasses.peek();
+            if ((modifiers != null)
+                && modifiers.branchContains(TokenTypes.LITERAL_PRIVATE))
+            {
+                desc.reportPrivateCtor();
+            }
+            else {
+                desc.reportNonPrivateCtor();
+            }
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        if (aAST.getType() != TokenTypes.CLASS_DEF) {
+            return;
+        }
+
+        final ClassDesc desc = mClasses.pop();
+        if (!desc.isDeclaredAsFinal()
+            && !desc.isDeclaredAsAbstract()
+            && desc.hasPrivateCtor()
+            && !desc.hasNonPrivateCtor())
+        {
+            final String className =
+                aAST.findFirstToken(TokenTypes.IDENT).getText();
+            log(aAST.getLineNo(), "final.class", className);
+        }
+    }
+
+    /** maintains information about class' ctors */
+    private static final class ClassDesc
+    {
+        /** is class declared as final */
+        private final boolean mDeclaredAsFinal;
+
+        /** is class declared as abstract */
+        private final boolean mDeclaredAsAbstract;
+
+        /** does class have non-provate ctors */
+        private boolean mHasNonPrivateCtor;
+
+        /** does class have private ctors */
+        private boolean mHasPrivateCtor;
+
+        /**
+         *  create a new ClassDesc instance.
+         *  @param aDeclaredAsFinal indicates if the
+         *         class declared as final
+         *  @param aDeclaredAsAbstract indicates if the
+         *         class declared as abstract
+         */
+        ClassDesc(boolean aDeclaredAsFinal, boolean aDeclaredAsAbstract)
+        {
+            mDeclaredAsFinal = aDeclaredAsFinal;
+            mDeclaredAsAbstract = aDeclaredAsAbstract;
+        }
+
+        /** adds private ctor. */
+        void reportPrivateCtor()
+        {
+            mHasPrivateCtor = true;
+        }
+
+        /** adds non-private ctor. */
+        void reportNonPrivateCtor()
+        {
+            mHasNonPrivateCtor = true;
+        }
+
+        /**
+         *  does class have private ctors.
+         *  @return true if class has private ctors
+         */
+        boolean hasPrivateCtor()
+        {
+            return mHasPrivateCtor;
+        }
+
+        /**
+         *  does class have non-private ctors.
+         *  @return true if class has non-private ctors
+         */
+        boolean hasNonPrivateCtor()
+        {
+            return mHasNonPrivateCtor;
+        }
+
+        /**
+         *  is class declared as final.
+         *  @return true if class is declared as final
+         */
+        boolean isDeclaredAsFinal()
+        {
+            return mDeclaredAsFinal;
+        }
+
+        /**
+         *  is class declared as abstract.
+         *  @return true if class is declared as final
+         */
+        boolean isDeclaredAsAbstract()
+        {
+            return mDeclaredAsAbstract;
+        }
+
+        @Override
+        public String toString()
+        {
+            return this.getClass().getName()
+                + "["
+                + "final=" + mDeclaredAsFinal
+                + " abstract=" + mDeclaredAsAbstract
+                + " pctor=" + mHasPrivateCtor
+                + " ctor=" + mHasNonPrivateCtor
+                + "]";
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheck.java
new file mode 100644
index 0000000..590927a
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheck.java
@@ -0,0 +1,132 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * Make sure that utility classes (classes that contain only static methods)
+ * do not have a public constructor.
+ * <p>
+ * Rationale: Instantiating utility classes does not make sense.
+ * A common mistake is forgetting to hide the default constructor.
+ * </p>
+ *
+ * @author lkuehne
+ */
+public class HideUtilityClassConstructorCheck extends Check
+{
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.CLASS_DEF};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (isAbstract(aAST)) {
+            // abstract class could not have private constructor
+            return;
+        }
+
+        final DetailAST objBlock = aAST.findFirstToken(TokenTypes.OBJBLOCK);
+        DetailAST child = objBlock.getFirstChild();
+        final boolean hasStaticModifier = isStatic(aAST);
+        boolean hasMethodOrField = false;
+        boolean hasNonStaticMethodOrField = false;
+        boolean hasNonPrivateStaticMethodOrField = false;
+        boolean hasDefaultCtor = true;
+        boolean hasPublicCtor = false;
+
+        while (child != null) {
+            final int type = child.getType();
+            if (type == TokenTypes.METHOD_DEF
+                    || type == TokenTypes.VARIABLE_DEF)
+            {
+                hasMethodOrField = true;
+                final DetailAST modifiers =
+                    child.findFirstToken(TokenTypes.MODIFIERS);
+                final boolean isStatic =
+                    modifiers.branchContains(TokenTypes.LITERAL_STATIC);
+                final boolean isPrivate =
+                    modifiers.branchContains(TokenTypes.LITERAL_PRIVATE);
+
+                if (!isStatic && !isPrivate) {
+                    hasNonStaticMethodOrField = true;
+                }
+                if (isStatic && !isPrivate) {
+                    hasNonPrivateStaticMethodOrField = true;
+                }
+            }
+            if (type == TokenTypes.CTOR_DEF) {
+                hasDefaultCtor = false;
+                final DetailAST modifiers =
+                    child.findFirstToken(TokenTypes.MODIFIERS);
+                if (!modifiers.branchContains(TokenTypes.LITERAL_PRIVATE)
+                    && !modifiers.branchContains(TokenTypes.LITERAL_PROTECTED))
+                {
+                    // treat package visible as public
+                    // for the purpose of this Check
+                    hasPublicCtor = true;
+                }
+
+            }
+            child = child.getNextSibling();
+        }
+
+        final boolean hasAccessibleCtor = (hasDefaultCtor || hasPublicCtor);
+
+        // figure out if class extends java.lang.object directly
+        // keep it simple for now and get a 99% solution
+        // TODO: check for "extends java.lang.Object" and "extends Object"
+        // consider "import org.omg.CORBA.*"
+        final boolean extendsJLO = // J.Lo even made it into in our sources :-)
+            aAST.findFirstToken(TokenTypes.EXTENDS_CLAUSE) == null;
+
+        final boolean isUtilClass = extendsJLO && hasMethodOrField
+            && !hasNonStaticMethodOrField && hasNonPrivateStaticMethodOrField;
+
+        if (isUtilClass && (hasAccessibleCtor && !hasStaticModifier)) {
+            log(aAST.getLineNo(), aAST.getColumnNo(), "hide.utility.class");
+        }
+    }
+
+    /**
+     * @param aAST class definition for check.
+     * @return true if a given class declared as abstract.
+     */
+    private boolean isAbstract(DetailAST aAST)
+    {
+        return aAST.findFirstToken(TokenTypes.MODIFIERS)
+            .branchContains(TokenTypes.ABSTRACT);
+    }
+
+    /**
+     * @param aAST class definition for check.
+     * @return true if a given class declared as static.
+     */
+    private boolean isStatic(DetailAST aAST)
+    {
+        return aAST.findFirstToken(TokenTypes.MODIFIERS)
+            .branchContains(TokenTypes.LITERAL_STATIC);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/InnerTypeLastCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/InnerTypeLastCheck.java
new file mode 100644
index 0000000..1ac07e4
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/InnerTypeLastCheck.java
@@ -0,0 +1,76 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Check nested (internal) classes/interfaces are declared at the bottom of the
+ * class after all method and field declarations.
+ * </p>
+ *
+ * @author <a href="mailto:ryly at mail.ru">Ruslan Dyachenko</a>
+ */
+public class InnerTypeLastCheck extends Check
+{
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.CLASS_DEF, TokenTypes.INTERFACE_DEF};
+    }
+
+    /** Meet a root class. */
+    private boolean mRootClass = true;
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        /** First root class */
+        if (mRootClass) {
+            mRootClass = false;
+        }
+        else {
+            DetailAST nextSibling = aAST.getNextSibling();
+            while (null != nextSibling
+                && ((nextSibling.getType() != TokenTypes.CLASS_DEF)
+                    || (nextSibling.getType() != TokenTypes.INTERFACE_DEF)))
+            {
+                if (nextSibling.getType() == TokenTypes.VARIABLE_DEF
+                        || nextSibling.getType() == TokenTypes.METHOD_DEF)
+                {
+                    log(nextSibling.getLineNo(), nextSibling.getColumnNo(),
+                        "arrangement.members.before.inner");
+                }
+                nextSibling = nextSibling.getNextSibling();
+            }
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        /** Is this a root class */
+        if (null == aAST.getParent()) {
+            mRootClass = true;
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/InterfaceIsTypeCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/InterfaceIsTypeCheck.java
new file mode 100644
index 0000000..bc86bd5
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/InterfaceIsTypeCheck.java
@@ -0,0 +1,87 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * Implements Bloch, Effective Java, Item 17 -
+ * Use Interfaces only to define types.
+ *
+ * <p>
+ * An interface should describe a <em>type</em>, it is therefore
+ * inappropriate to define an interface that does not contain any methods
+ * but only constants.
+ * </p>
+ *
+ * <p>
+ * The check can be configured to also disallow marker interfaces like
+ * <code>java.io.Serializable</code>, that do not contain methods or
+ * constants at all.
+ * </p>
+ *
+ * @author lkuehne
+ */
+public final class InterfaceIsTypeCheck
+        extends Check
+{
+    /** flag to control whether marker interfaces are allowed. */
+    private boolean mAllowMarkerInterfaces = true;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.INTERFACE_DEF};
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST objBlock =
+                aAST.findFirstToken(TokenTypes.OBJBLOCK);
+        final DetailAST methodDef =
+                objBlock.findFirstToken(TokenTypes.METHOD_DEF);
+        final DetailAST variableDef =
+                objBlock.findFirstToken(TokenTypes.VARIABLE_DEF);
+        final boolean methodRequired =
+                !mAllowMarkerInterfaces || (variableDef != null);
+
+        if ((methodDef == null) && methodRequired) {
+            log(aAST.getLineNo(), "interface.type");
+        }
+
+    }
+
+    /**
+     * Controls whether marker interfaces like Serializable are allowed.
+     * @param aFlag whether to allow marker interfaces or not
+     */
+    public void setAllowMarkerInterfaces(boolean aFlag)
+    {
+        mAllowMarkerInterfaces = aFlag;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/MutableExceptionCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/MutableExceptionCheck.java
new file mode 100644
index 0000000..af0394e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/MutableExceptionCheck.java
@@ -0,0 +1,135 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.AbstractFormatCheck;
+
+/**
+ * <p> Ensures that exceptions (defined as any class name conforming
+ * to some regular expression) are immutable. That is, have only final
+ * fields.</p>
+ * <p> Rationale: Exception instances should represent an error
+ * condition. Having non final fields not only allows the state to be
+ * modified by accident and therefore mask the original condition but
+ * also allows developers to accidentally forget to initialise state
+ * thereby leading to code catching the exception to draw incorrect
+ * conclusions based on the state.</p>
+ *
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ */
+public final class MutableExceptionCheck extends AbstractFormatCheck
+{
+    /** Default value for format property. */
+    private static final String DEFAULT_FORMAT = "^.*Exception$|^.*Error$";
+    /** Stack of checking information for classes. */
+    private final FastStack<Boolean> mCheckingStack = FastStack.newInstance();
+    /** Should we check current class or not. */
+    private boolean mChecking;
+
+    /** Creates new instance of the check. */
+    public MutableExceptionCheck()
+    {
+        super(DEFAULT_FORMAT);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.CLASS_DEF, TokenTypes.VARIABLE_DEF};
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.CLASS_DEF:
+            visitClassDef(aAST);
+            break;
+        case TokenTypes.VARIABLE_DEF:
+            visitVariableDef(aAST);
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.CLASS_DEF:
+            leaveClassDef();
+            break;
+        default:
+            // Do nothing
+        }
+    }
+
+    /**
+     * Called when we start processing class definition.
+     * @param aAST class definition node
+     */
+    private void visitClassDef(DetailAST aAST)
+    {
+        mCheckingStack.push(mChecking ? Boolean.TRUE : Boolean.FALSE);
+        mChecking =
+            isExceptionClass(aAST.findFirstToken(TokenTypes.IDENT).getText());
+    }
+
+    /** Called when we leave class definition. */
+    private void leaveClassDef()
+    {
+        mChecking = (mCheckingStack.pop()).booleanValue();
+    }
+
+    /**
+     * Checks variable definition.
+     * @param aAST variable def node for check.
+     */
+    private void visitVariableDef(DetailAST aAST)
+    {
+        if (mChecking && (aAST.getParent().getType() == TokenTypes.OBJBLOCK)) {
+            final DetailAST modifiersAST =
+                aAST.findFirstToken(TokenTypes.MODIFIERS);
+
+            if (!(modifiersAST.findFirstToken(TokenTypes.FINAL) != null)) {
+                log(aAST.getLineNo(),  aAST.getColumnNo(), "mutable.exception",
+                        aAST.findFirstToken(TokenTypes.IDENT).getText());
+            }
+        }
+    }
+
+    /**
+     * @param aClassName class name to check
+     * @return true if a given class name confirms specified format
+     */
+    private boolean isExceptionClass(String aClassName)
+    {
+        return getRegexp().matcher(aClassName).find();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/OneTopLevelClassCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/OneTopLevelClassCheck.java
new file mode 100644
index 0000000..be76b2d
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/OneTopLevelClassCheck.java
@@ -0,0 +1,151 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import java.util.Map;
+import java.util.TreeMap;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ *
+ * Checks that each top-level class, interface
+ * or enum resides in a source file of its own.
+ * <p>
+ * Official description of a 'top-level' term:<a
+ * href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-7.html#jls-7.6">
+ * 7.6. Top Level Type Declarations</a>. If file doesn't contains
+ * public class, enum or interface, top-level type is the first type in file.
+ * </p>
+ * <p>
+ * An example of code with violations:
+ * </p>
+ * <pre><code>
+ * public class Foo{
+ *     //methods
+ * }
+ *
+ * class Foo2{
+ *     //methods
+ * }
+ * </code></pre>
+ * <p>
+ * An example of code without top-level public type:
+ * </p>
+ * <pre><code>
+ * class Foo{ //top-level class
+ *     //methods
+ * }
+ *
+ * class Foo2{
+ *     //methods
+ * }
+ * </code></pre>
+ * <p>
+ * An example of check's configuration:
+ * </p>
+ * <pre>
+ * <module name="OneTopLevelClass"/>
+ * </pre>
+ *
+ * <p>
+ * An example of code without violations:
+ * </p>
+ * <pre><code>
+ * public class Foo{
+ *     //methods
+ * }
+ * </code></pre>
+ *
+ * @author maxvetrenko
+ */
+public class OneTopLevelClassCheck extends Check
+{
+
+    /**
+     * True if a java source file contains a type
+     * with a public access level modifier.
+     */
+    private boolean mPublicTypeFound;
+
+    /** Mapping between type names and line numbers of the type declarations.*/
+    private TreeMap<Integer, String> mLineNumberTypeMap =
+            new TreeMap<Integer, String>();
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {};
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        DetailAST currentNode = aRootAST;
+        while (currentNode != null) {
+            if (currentNode.getType() == TokenTypes.CLASS_DEF
+                    || currentNode.getType() == TokenTypes.ENUM_DEF
+                    || currentNode.getType() == TokenTypes.INTERFACE_DEF)
+            {
+                if (isPublic(currentNode)) {
+                    mPublicTypeFound = true;
+                }
+
+                else {
+                    final String typeName = currentNode.
+                            findFirstToken(TokenTypes.IDENT).getText();
+                    mLineNumberTypeMap.put(currentNode.getLineNo(), typeName);
+                }
+            }
+            currentNode = currentNode.getNextSibling();
+        }
+    }
+
+    @Override
+    public void finishTree(DetailAST aRootAST)
+    {
+        if (!mPublicTypeFound && !mLineNumberTypeMap.isEmpty()) {
+            // skip first top-level type.
+            mLineNumberTypeMap.remove(mLineNumberTypeMap.firstKey());
+        }
+
+        for (Map.Entry<Integer, String> entry
+                : mLineNumberTypeMap.entrySet())
+        {
+            log(entry.getKey(), "one.top.level.class", entry.getValue());
+        }
+
+        mLineNumberTypeMap.clear();
+        mPublicTypeFound = false;
+    }
+
+    /**
+     * Checks if a type is public.
+     * @param aTypeDef type definition node.
+     * @return true if a type has a public access level modifier.
+     */
+    private boolean isPublic(DetailAST aTypeDef)
+    {
+        final DetailAST modifiers =
+                aTypeDef.findFirstToken(TokenTypes.MODIFIERS);
+        return modifiers.findFirstToken(TokenTypes.LITERAL_PUBLIC) != null;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/ThrowsCountCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/ThrowsCountCheck.java
new file mode 100644
index 0000000..e8f04b8
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/ThrowsCountCheck.java
@@ -0,0 +1,114 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Restricts throws statements to a specified count (default = 1).
+ * </p>
+ * <p>
+ * Rationale:
+ * Exceptions form part of a methods interface. Declaring
+ * a method to throw too many differently rooted
+ * exceptions makes exception handling onerous and leads
+ * to poor programming practices such as catch
+ * (Exception). This check forces developers to put
+ * exceptions into a hierarchy such that in the simplest
+ * case, only one type of exception need be checked for by
+ * a caller but allows any sub-classes to be caught
+ * specifically if necessary.
+ * </p>
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ */
+public final class ThrowsCountCheck extends Check
+{
+    /** default value of max property */
+    private static final int DEFAULT_MAX = 1;
+
+    /** maximum allowed throws statements */
+    private int mMax;
+
+    /** Creates new instance of the check. */
+    public ThrowsCountCheck()
+    {
+        setMax(DEFAULT_MAX);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.LITERAL_THROWS,
+        };
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    /**
+     * Getter for max property.
+     * @return maximum allowed throws statements.
+     */
+    public int getMax()
+    {
+        return mMax;
+    }
+
+    /**
+     * Setter for max property.
+     * @param aMax maximum allowed throws statements.
+     */
+    public void setMax(int aMax)
+    {
+        mMax = aMax;
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.LITERAL_THROWS:
+            visitLiteralThrows(aAST);
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    /**
+     * Checks number of throws statements.
+     * @param aAST throws for check.
+     */
+    private void visitLiteralThrows(DetailAST aAST)
+    {
+        // Account for all the commas!
+        final int count = (aAST.getChildCount() + 1) / 2;
+        if (count > getMax()) {
+            log(aAST.getLineNo(),  aAST.getColumnNo(), "throws.count",
+                count, getMax());
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/VisibilityModifierCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/VisibilityModifierCheck.java
new file mode 100644
index 0000000..12e8c14
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/VisibilityModifierCheck.java
@@ -0,0 +1,216 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import antlr.collections.AST;
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import java.util.Set;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+import org.apache.commons.beanutils.ConversionException;
+
+/**
+ * Checks visibility of class members. Only static final members may be public,
+ * other class members must be private unless allowProtected/Package is set.
+ * <p>
+ * Public members are not flagged if the name matches the public
+ * member regular expression (contains "^serialVersionUID$" by
+ * default).
+ * </p>
+ * Rationale: Enforce encapsulation.
+ *
+ * @author lkuehne
+ */
+public class VisibilityModifierCheck
+    extends Check
+{
+    /** whether protected members are allowed */
+    private boolean mProtectedAllowed;
+
+    /** whether package visible members are allowed */
+    private boolean mPackageAllowed;
+
+    /**
+     * pattern for public members that should be ignored.  Note:
+     * Earlier versions of checkstyle used ^f[A-Z][a-zA-Z0-9]*$ as the
+     * default to allow CMP for EJB 1.1 with the default settings.
+     * With EJB 2.0 it is not longer necessary to have public access
+     * for persistent fields.
+     */
+    private String mPublicMemberFormat = "^serialVersionUID$";
+
+    /** regexp for public members that should be ignored */
+    private Pattern mPublicMemberPattern;
+
+    /** Create an instance. */
+    public VisibilityModifierCheck()
+    {
+        setPublicMemberPattern(mPublicMemberFormat);
+    }
+
+    /** @return whether protected members are allowed */
+    public boolean isProtectedAllowed()
+    {
+        return mProtectedAllowed;
+    }
+
+    /**
+     * Set whether protected members are allowed.
+     * @param aProtectedAllowed whether protected members are allowed
+     */
+    public void setProtectedAllowed(boolean aProtectedAllowed)
+    {
+        mProtectedAllowed = aProtectedAllowed;
+    }
+
+    /** @return whether package visible members are allowed */
+    public boolean isPackageAllowed()
+    {
+        return mPackageAllowed;
+    }
+
+    /**
+     * Set whether package visible members are allowed.
+     * @param aPackageAllowed whether package visible members are allowed
+     */
+    public void setPackageAllowed(boolean aPackageAllowed)
+    {
+        mPackageAllowed = aPackageAllowed;
+    }
+
+    /**
+     * Set the pattern for public members to ignore.
+     * @param aPattern pattern for public members to ignore.
+     */
+    public void setPublicMemberPattern(String aPattern)
+    {
+        try {
+            mPublicMemberPattern = Utils.getPattern(aPattern);
+            mPublicMemberFormat = aPattern;
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aPattern, e);
+        }
+    }
+
+    /**
+     * @return the regexp for public members to ignore.
+     */
+    private Pattern getPublicMemberRegexp()
+    {
+        return mPublicMemberPattern;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.VARIABLE_DEF};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if ((aAST.getType() != TokenTypes.VARIABLE_DEF)
+            || (aAST.getParent().getType() != TokenTypes.OBJBLOCK))
+        {
+            return;
+        }
+
+        final DetailAST varNameAST = getVarNameAST(aAST);
+        final String varName = varNameAST.getText();
+        final boolean inInterfaceOrAnnotationBlock =
+            ScopeUtils.inInterfaceOrAnnotationBlock(aAST);
+        final Set<String> mods = getModifiers(aAST);
+        final String declaredScope = getVisibilityScope(mods);
+        final String variableScope =
+             inInterfaceOrAnnotationBlock ? "public" : declaredScope;
+
+        if (!("private".equals(variableScope)
+                || inInterfaceOrAnnotationBlock // implicitly static and final
+                || (mods.contains("static") && mods.contains("final"))
+                || ("package".equals(variableScope) && isPackageAllowed())
+                || ("protected".equals(variableScope) && isProtectedAllowed())
+                || ("public".equals(variableScope)
+                   && getPublicMemberRegexp().matcher(varName).find())))
+        {
+            log(varNameAST.getLineNo(), varNameAST.getColumnNo(),
+                    "variable.notPrivate", varName);
+        }
+    }
+
+    /**
+     * Returns the variable name in a VARIABLE_DEF AST.
+     * @param aVariableDefAST an AST where type == VARIABLE_DEF AST.
+     * @return the variable name in aVariableDefAST
+     */
+    private DetailAST getVarNameAST(DetailAST aVariableDefAST)
+    {
+        DetailAST ast = aVariableDefAST.getFirstChild();
+        while (ast != null) {
+            final DetailAST nextSibling = ast.getNextSibling();
+            if (ast.getType() == TokenTypes.TYPE) {
+                return nextSibling;
+            }
+            ast = nextSibling;
+        }
+        return null;
+    }
+
+    /**
+     * Returns the set of modifier Strings for a VARIABLE_DEF AST.
+     * @param aVariableDefAST AST for a vraiable definition
+     * @return the set of modifier Strings for variableDefAST
+     */
+    private Set<String> getModifiers(DetailAST aVariableDefAST)
+    {
+        final AST modifiersAST = aVariableDefAST.getFirstChild();
+        if (modifiersAST.getType() != TokenTypes.MODIFIERS) {
+            throw new IllegalStateException("Strange parse tree");
+        }
+        final Set<String> retVal = Sets.newHashSet();
+        AST modifier = modifiersAST.getFirstChild();
+        while (modifier != null) {
+            retVal.add(modifier.getText());
+            modifier = modifier.getNextSibling();
+        }
+        return retVal;
+
+    }
+
+    /**
+     * Returns the visibility scope specified with a set of modifiers.
+     * @param aModifiers the set of modifier Strings
+     * @return one of "public", "private", "protected", "package"
+     */
+    private String getVisibilityScope(Set<String> aModifiers)
+    {
+        final String[] explicitModifiers = {"public", "private", "protected"};
+        for (final String candidate : explicitModifiers) {
+            if (aModifiers.contains(candidate)) {
+                return candidate;
+            }
+        }
+        return "package";
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/package-info.java
new file mode 100644
index 0000000..b85c13a
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/design/package-info.java
@@ -0,0 +1,24 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the <span class="xdocspagetitle">Class Design</span> checks that
+ * are bundled with the main distribution.
+ */
+package com.puppycrawl.tools.checkstyle.checks.design;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/duplicates/ChecksumInfo.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/duplicates/ChecksumInfo.java
new file mode 100644
index 0000000..52fa58e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/duplicates/ChecksumInfo.java
@@ -0,0 +1,178 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.duplicates;
+
+import java.util.Arrays;
+
+/**
+ * Helper class for {@link StrictDuplicateCodeCheck},
+ * provides block checksum information for a single file.
+ *
+ * @author lkuehne
+ */
+final class ChecksumInfo
+{
+    /**
+     * Helper value to avoid object allocations in
+     * {@link #hasChecksumOverlapsWith(ChecksumInfo)}.
+     */
+    private static final int[] NO_LINES = new int[0];
+
+    /**
+     * Holds the checksums from the constructor call,
+     * except {@link StrictDuplicateCodeCheck#IGNORE}, sorted.
+     */
+    private int[] mSortedChecksums;
+
+    /**
+     * Reverse mapping from {@link #mSortedChecksums} to the checksums
+     * from the constructor call.
+     *
+     * <code>mSortedRelevantChecksums[i] == checksums[mOrigIdx[i]]</code>
+     */
+    private int[] mOrigIdx;
+
+    /**
+     * Creates a new ChecksumInfo.
+     *
+     * @param aBlockChecksums the block checksums as caculated by
+     * the {@link StrictDuplicateCodeCheck}.ChecksumGenerator
+     */
+    ChecksumInfo(int[] aBlockChecksums)
+    {
+        final int csLen = aBlockChecksums.length;
+        final int[] relevant = new int[csLen];
+        final int[] reverse = new int[csLen];
+        int count = 0;
+        for (int j = 0; j < csLen; j++) {
+            final int checksum = aBlockChecksums[j];
+            if (checksum != StrictDuplicateCodeCheck.IGNORE) {
+                reverse[count] = j;
+                relevant[count++] = checksum;
+            }
+        }
+        mSortedChecksums = new int[count];
+        mOrigIdx = new int[count];
+        System.arraycopy(relevant, 0, mSortedChecksums, 0, count);
+        System.arraycopy(reverse, 0, mOrigIdx, 0, count);
+        sort();
+    }
+
+    /**
+     * Sorts the {@link #mSortedChecksums} field and simultaneously
+     * maintains the {@link #mOrigIdx} mapping. The maintenance of the
+     * reverse mapping is the reason why we don't simply use Arrays.sort() here.
+     */
+    private void sort()
+    {
+        // abbreviation for longish field name
+        final int[] arr = mSortedChecksums;
+        final int len = arr.length;
+
+        // bubblesort will do for now. It's important that the algorithm
+        // is stable, i.e. it doesn't swap equal values
+        for (int i = 0; i < len; i++) {
+            for (int j = i; j > 0 && arr[j] < arr[j - 1]; j--) {
+                final int k = j - 1;
+                // swap j and k and maintain mOrigIdx
+                final int v = arr[j];
+                arr[j] = arr[k];
+                arr[k] = v;
+                final int z = mOrigIdx[j];
+                mOrigIdx[j] = mOrigIdx[k];
+                mOrigIdx[k] = z;
+            }
+        }
+    }
+
+    /**
+     * Returns whether the same checksum occurs both in this ChecksumInfo and
+     * another one,
+     *
+     * @param aChecksumInfo the other ChecksumInfo
+     * @return true iff the same checksum occurs in both ChecksumInfos
+     */
+    boolean hasChecksumOverlapsWith(final ChecksumInfo aChecksumInfo)
+    {
+        final int[] jSortedrelevantChecksums =
+            aChecksumInfo.mSortedChecksums;
+        final int iLen = mSortedChecksums.length;
+        final int jLen = jSortedrelevantChecksums.length;
+
+        // Both arrays are sorted, so we walk them in parallel,
+        // increasing the index that points to the smaller value.
+        // If the values ever become the same we have found an overlap.
+        int jdx = 0;
+        int idx = 0;
+        while (jdx < jLen && idx < iLen) {
+            final long iSum = mSortedChecksums[idx];
+            final long jSum = jSortedrelevantChecksums[jdx];
+            if (iSum < jSum) {
+                idx += 1;
+            }
+            else if (iSum > jSum) {
+                jdx += 1;
+            }
+            else {
+                // files i and j contain a block with the same checksum
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Returns the lines that start a block with a given checksum.
+     *
+     * @param aSum the checksum
+     * @return sorted line indices
+     */
+    int[] findLinesWithChecksum(final int aSum)
+    {
+        int idx = Arrays.binarySearch(mSortedChecksums, aSum);
+        if (idx < 0) {
+            return NO_LINES;
+        }
+
+        // binary search might have left us in the
+        // middle of a sequence of identical checksums
+
+        // rewind
+        while (idx > 0 && mSortedChecksums[idx - 1] == aSum) {
+            idx -= 1;
+        }
+        final int start = idx;
+
+        // forward
+        int end = start + 1;
+        while (end < mSortedChecksums.length
+                && mSortedChecksums[end] == mSortedChecksums[end - 1])
+        {
+            end += 1;
+        }
+
+        // find original lines through reverse mapping
+        final int[] ret = new int[end - start];
+        for (int i = 0; i < ret.length; i++) {
+            ret[i] = mOrigIdx[start + i];
+        }
+        Arrays.sort(ret);
+        return ret;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/duplicates/StrictDuplicateCodeCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/duplicates/StrictDuplicateCodeCheck.java
new file mode 100644
index 0000000..dabe15f
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/duplicates/StrictDuplicateCodeCheck.java
@@ -0,0 +1,542 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.duplicates;
+
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.Lists;
+import com.google.common.collect.MapMaker;
+import com.google.common.collect.Multimap;
+import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
+import com.puppycrawl.tools.checkstyle.api.FileText;
+import com.puppycrawl.tools.checkstyle.api.MessageDispatcher;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import java.io.File;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Performs a line-by-line comparison of all code lines and reports
+ * duplicate code if a sequence of lines differs only in
+ * indentation.  All import statements in Java code are ignored, any
+ * other line - including javadoc, whitespace lines between methods,
+ * etc. - is considered (which is why the check is called
+ * <em>strict</em>).
+ *
+ * @author Lars Kühne
+ */
+public final class StrictDuplicateCodeCheck extends AbstractFileSetCheck
+{
+    /**
+     * A prime that is used o calculate checksums of lines and blocks of lines.
+     * Important that it's larger than the length of most lines to avoid hash
+     * collisions.
+     *
+     * For a list of primes see
+     * http://www.utm.edu/research/primes/lists/small/1000.txt
+     */
+    private static final int BIG_PRIME = 317;
+
+    /**
+     * Converts each consecutive block of {@link #mMin} lines of the
+     * original source lines to a checksum that is checked against
+     * to find duplicates.
+     */
+    private interface ChecksumGenerator
+    {
+        /**
+         * Convert each block of the original source lines
+         * to a checksum that is checked against to find duplicates
+         *
+         * @param aOriginalLines the original lines as they appear
+         * in the source file
+         *
+         * @return an array of (aOriginalLines.length - mMin + 1) checksums
+         */
+        int[] convertLines(String[] aOriginalLines);
+    }
+
+
+    /**
+     * Calculates checksums for text files.
+     */
+    private class TextfileChecksumGenerator implements ChecksumGenerator
+    {
+        /** {@inheritDoc} */
+        public int[] convertLines(String[] aOriginalLines)
+        {
+            final int lineCount = aOriginalLines.length;
+            final long[] checkSums = new long[lineCount];
+            for (int i = 0; i < lineCount; i++) {
+                final String line = aOriginalLines[i];
+                checkSums[i] = calcChecksum(line);
+            }
+            final int retLen = Math.max(0, lineCount - mMin + 1);
+            final int[] ret = new int[retLen];
+
+            for (int i = 0; i < retLen; i++) {
+                int blockChecksum = 0;
+                boolean onlyEmptyLines = true;
+                for (int j = 0; j < mMin; j++) {
+                    if (aOriginalLines[i + j].length() > 0) {
+                        onlyEmptyLines = false;
+                    }
+                    final long checksum = checkSums[i + j];
+                    if (checksum == IGNORE) {
+                        blockChecksum = IGNORE;
+                        break;
+                    }
+                    blockChecksum += (j + 1) * BIG_PRIME * checksum;
+                }
+                ret[i] = onlyEmptyLines ? IGNORE : blockChecksum;
+            }
+            return ret;
+        }
+
+        /**
+         * Computes a checksum for a a single line of text.
+         * @param aLine the aLine
+         * @return checksum
+         */
+        protected int calcChecksum(String aLine)
+        {
+            final int hashCode = aLine.hashCode();
+            if (hashCode == IGNORE) {
+                return Integer.MAX_VALUE / 2;
+            }
+            return hashCode;
+        }
+    }
+
+    /**
+     * A TextfileChecksumGenerator that also ignores imports.
+     */
+    private class JavaChecksumGenerator extends TextfileChecksumGenerator
+    {
+        // TODO: return IGNORE for lines in the header comment?
+        // That would require some simple parsing...
+
+        // we could also parse the java code using the TreeWalker
+        // and then ignore everything before the CLASS_DEF...
+
+        @Override
+        protected int calcChecksum(String aLine)
+        {
+            // to avoid false alarms it is important that different lines
+            // result in different checksums.
+            if (aLine.startsWith("import ")) {
+                return IGNORE;
+            }
+            return super.calcChecksum(aLine);
+        }
+    }
+
+    /** a jakarta commons log */
+    private static final Log LOG =
+            LogFactory.getLog(StrictDuplicateCodeCheck.class);
+
+    /** the checksum value to use for lines that should be ignored */
+    static final int IGNORE = Integer.MIN_VALUE;
+
+    /** default value for mMin */
+    private static final int DEFAULT_MIN_DUPLICATE_LINES = 12;
+
+    /** number of lines that have to be idential for reporting duplicates */
+    private int mMin = DEFAULT_MIN_DUPLICATE_LINES;
+
+    /** the basedir to strip off in filenames */
+    private String mBasedir;
+
+    /**
+     * The checksums of all files that are currently checked.
+     * Dimension one: file index
+     * Dimension two: block start line
+     */
+    private int[][] mLineBlockChecksums;
+
+    /**
+     * helper to speed up searching algorithm, holds the checksums from
+     * {@link #mLineBlockChecksums} except {@link #IGNORE}, sorted.
+     */
+    private ChecksumInfo[] mChecksumInfo;
+
+    /** files that are currently checked */
+    private final List<File> mFiles = Lists.newArrayList();
+
+    /**
+     * A SoftReference cache for the trimmed lines of a file path.
+     */
+    private final Map<String, String[]> mTrimmedLineCache =
+        new MapMaker().softValues().makeMap();
+
+    // fields required only for statistics
+
+    /** total number of duplicates found */
+    private int mDuplicates;
+    /** the charset used to load files. */
+    private String mCharset;
+
+    /** Creates a new instance of this class. */
+    public StrictDuplicateCodeCheck()
+    {
+    }
+
+    /**
+     * Sets the minimum number of lines that must be equivalent
+     * before the check complains.
+     *
+     * @param aMin the number of lines that must be equal before
+     * triggering a 'duplicate code' message.
+     */
+    public void setMin(int aMin)
+    {
+        if (aMin < 1) {
+            throw new IllegalArgumentException("min must be 1 or higher");
+        }
+        mMin = aMin;
+    }
+
+    /** @param aBasedir the base directory to strip off in filenames */
+    public void setBasedir(String aBasedir)
+    {
+        mBasedir = aBasedir;
+    }
+
+    @Override
+    public void beginProcessing(String aCharset)
+    {
+        super.beginProcessing(aCharset);
+        mCharset = aCharset;
+        mFiles.clear();
+    }
+
+    @Override
+    protected void processFiltered(File aFile, List<String> aLines)
+    {
+        mFiles.add(aFile);
+    }
+
+    @Override
+    public void finishProcessing()
+    {
+        super.finishProcessing();
+        final long start = System.currentTimeMillis();
+        mDuplicates = 0;
+        mLineBlockChecksums = new int[mFiles.size()][];
+        mChecksumInfo = new ChecksumInfo[mFiles.size()];
+
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Reading " + mFiles.size() + " input files");
+        }
+
+        for (int i = 0; i < mFiles.size(); i++) {
+            final File file = mFiles.get(i);
+            try {
+                final String[] lines = getTrimmedLines(file);
+                final ChecksumGenerator transformer =
+                    findChecksumGenerator(file);
+                mLineBlockChecksums[i] = transformer.convertLines(lines);
+            }
+            catch (final IOException ex) {
+                LOG.error("Cannot access " + file + " ("
+                          + ex.getMessage() + "), ignoring", ex);
+                // TODO: better to throw an exception here?
+                // it would be best to throw IOException from process(),
+                // but interface definition doesn't allow that...
+                mLineBlockChecksums = new int[0][0];
+            }
+        }
+        fillSortedRelevantChecksums();
+
+        final long endReading = System.currentTimeMillis();
+        findDuplicates();
+        final long endSearching = System.currentTimeMillis();
+
+        dumpStats(start, endReading, endSearching);
+
+        mLineBlockChecksums = null;
+        mChecksumInfo = null;
+    }
+
+    /**
+     * Finds the Checksum generator for a given file.
+     *
+     * @param aFile the file to check for duplicates
+     * @return a generator to use for aFile
+     */
+    private ChecksumGenerator findChecksumGenerator(File aFile)
+    {
+        if (aFile.getName().endsWith(".java")) {
+            return new JavaChecksumGenerator();
+        }
+        // TODO: Not sure what to do with binary files such as gifs
+        return new TextfileChecksumGenerator();
+    }
+
+    /**
+     * Dump out statistics data on stderr.
+     * @param aStart start time
+     * @param aEndReading end time of reading phsical files
+     * @param aEndSearching end time duplicate analysis
+     */
+    private void dumpStats(long aStart, long aEndReading, long aEndSearching)
+    {
+        if (LOG.isDebugEnabled()) {
+            final long initTime = aEndReading - aStart;
+            final long workTime = aEndSearching - aEndReading;
+            LOG.debug("files = " + mFiles.size());
+            LOG.debug("duplicates = " + mDuplicates);
+            LOG.debug("Runtime = " + initTime + " + " + workTime);
+        }
+    }
+
+    /**
+     * filters and sorts the relevant lines and stores the result
+     * in sortedRelevantChecksums during the setup phase.
+     * That data is later used in a binary search to find out
+     * if it is worth investigating a file for duplicates of a block.
+     * If the block's checksum does not occur in the other file
+     * at all, we can skip that file quickly.
+     */
+    private void fillSortedRelevantChecksums()
+    {
+        for (int i = 0; i < mLineBlockChecksums.length; i++) {
+            final int[] checksums = mLineBlockChecksums[i];
+            mChecksumInfo[i] = new ChecksumInfo(checksums);
+        }
+    }
+
+    /**
+     * finds duplicate lines in mFiles,
+     * using a textsearch algorithm to find reoccuring
+     * patters in the lineChecksums.
+     */
+    private void findDuplicates()
+    {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Analysis phase");
+        }
+
+        // It's been a while since my CS degree, but I think this is
+        // somewhere near O(LOC^2).
+
+        // It may be possible to do this *much* smarter,
+        // but I don't have the Knuth bible at hand right now :-)
+
+        final int len = mFiles.size();
+        for (int i = 0; i < len; i++) {
+
+            final String path = mFiles.get(i).getPath();
+            getMessageCollector().reset();
+            final MessageDispatcher dispatcher = getMessageDispatcher();
+            dispatcher.fireFileStarted(path);
+
+            for (int j = 0; j <= i; j++) {
+                findDuplicatesInFiles(i, j);
+            }
+
+            fireErrors(path);
+            dispatcher.fireFileFinished(path);
+        }
+    }
+
+    /**
+     * Compare two files and search for duplicates.
+     * @param aI mLineChecksums index of the first file to compare
+     * @param aJ mLineChecksums index of the seconds file to compare
+     */
+    private void findDuplicatesInFiles(int aI, int aJ)
+    {
+        final ChecksumInfo iChecksumInfo = mChecksumInfo[aI];
+        final ChecksumInfo jChecksumInfo = mChecksumInfo[aJ];
+        if (!iChecksumInfo.hasChecksumOverlapsWith(jChecksumInfo)) {
+            return;
+        }
+
+        final int[] iLineBlockChecksums = mLineBlockChecksums[aI];
+        final int iBlockCount = iLineBlockChecksums.length;
+
+        // blocks of duplicate code might be longer than 'min'. We need to
+        // remember the line combinations where we must ignore identical blocks
+        // because we have already reported them for an earlier blockIdx.
+        final Multimap<Integer, Integer> ignorePairs =
+            ArrayListMultimap.create();
+
+        // go through all the blocks in iFile and
+        // check if the following mMin lines occur in jFile
+        for (int iLine = 0; iLine < iBlockCount; iLine++) {
+
+            final int iSum = iLineBlockChecksums[iLine];
+            final int[] jLines = jChecksumInfo.findLinesWithChecksum(iSum);
+            // detailed analysis only if the iLine block occurs in jFile at all
+            if (jLines.length > 0) {
+                findDuplicateFromLine(aI, aJ, iLine, jLines, ignorePairs);
+            }
+        }
+    }
+
+    /**
+     * Find and report a duplicate of the code starting from line aILine
+     * in file aI in the file aJ. The caller has already ensured that
+     * there are at least mMax duplicate lines, this method mainly analyzes
+     * how far the block of duplicates extends.
+     *
+     * @param aI index of file that contains the candidate code
+     * @param aJ index of file that is searched for a dup of the candidate
+     * @param aILine starting line of the candidate in aI
+     * @param aJLines lines in file aJ that have the same checksum as aILine
+     * @param aIgnore Bag from iLine to jLines, an entry indicates that
+     * this line i/j-combination has already been reported as part of another
+     * viloation
+     */
+    private void findDuplicateFromLine(
+        final int aI, final int aJ, final int aILine,
+        final int[] aJLines, final Multimap<Integer, Integer> aIgnore)
+    {
+        // Using something more advanced like Boyer-Moore might be a
+        // good idea...
+
+        final int[] iCheckSums = mLineBlockChecksums[aI];
+        final int[] jCheckSums = mLineBlockChecksums[aJ];
+        final long checkSum = iCheckSums[aILine];
+
+        for (int jLine : aJLines) {
+
+            if (aI == aJ && aILine >= jLine) {
+                continue;
+            }
+
+            if (jCheckSums[jLine] != checkSum) {
+                continue;
+            }
+
+            final Collection<Integer> ignoreEntries = aIgnore.get(aILine);
+            if (ignoreEntries != null && ignoreEntries.contains(jLine)) {
+                continue;
+            }
+
+            final int duplicateLines =
+                verifiyDuplicateLines(aI, aJ, aILine, jLine);
+            if (duplicateLines >= mMin) {
+                reportDuplicate(duplicateLines, aILine, mFiles.get(aJ), jLine);
+                final int extend = duplicateLines - mMin;
+                for (int i = 0; i < extend; i++) {
+                    final int offset = (i + 1);
+                    aIgnore.put(aILine + offset, jLine + offset);
+                }
+            }
+        }
+    }
+
+    /**
+     * Verifies the number of lines that are equal.
+     * Note that block checksums might be equal for blocks that in fact
+     * are different, so we must check the actual file content again.
+     *
+     * @param aI file index i
+     * @param aJ file index j
+     * @param aIStartLine start line of potential duplicate code in file i
+     * @param aJStartLine start line of potential duplicate code in file j
+     * @return the number of verified equal lines
+     */
+    private int verifiyDuplicateLines(
+        int aI, int aJ, int aIStartLine, int aJStartLine)
+    {
+        final File iFile = mFiles.get(aI);
+        final File jFile = mFiles.get(aJ);
+        try {
+            final String[] iLines = getTrimmedLines(iFile);
+            final String[] jLines = getTrimmedLines(jFile);
+
+            int verified = 0;
+            int i = aIStartLine;
+            int j = aJStartLine;
+            while (i < iLines.length && j < jLines.length
+                && iLines[i++].equals(jLines[j++]))
+            {
+                verified += 1;
+            }
+            return verified;
+        }
+        catch (IOException ex) {
+            LOG.error("Unable to verify potential duplicate for "
+                + iFile + " and " + jFile, ex);
+            return 0;
+        }
+    }
+
+
+    /**
+     * Returns the trimmed lines of a given file.
+     * Caches the results, so when memory is available
+     * we try to avoid reading the file repeatedly.
+     *
+     * @param aFile the file
+     * @return the lines in aFile after applying {@link String#trim()}
+     * @throws IOException if the file content cannot be read
+     */
+    private String[] getTrimmedLines(File aFile) throws IOException
+    {
+        final String path = aFile.getPath();
+        final String[] cachedLines = mTrimmedLineCache.get(path);
+        if (cachedLines != null) {
+            return cachedLines;
+        }
+        final String charset = mCharset;
+        final FileText text = new FileText(aFile, charset);
+        final String[] lines = getTrimmed(text.toLinesArray());
+        mTrimmedLineCache.put(path, lines);
+        return lines;
+    }
+
+    /**
+     * Applies {@link String#trim()} on each String in a given array.
+     * @param aLines the original Strings
+     * @return the converted Strings after applying {@link String#trim()}
+     */
+    private String[] getTrimmed(String[] aLines)
+    {
+        final String[] ret = new String[aLines.length];
+        for (int i = 0; i < ret.length; i++) {
+            ret[i] = aLines[i].trim();
+        }
+        return ret;
+    }
+
+    /**
+     * Dumps out a duplicate report.
+     * @param aEquivalent number of equivalent lines
+     * @param aILine location of duplicate code
+     * within file that is currently checked
+     * @param aJFile the other file that contains the duplicate
+     * @param aJLine location of duplicate code within aJFile
+     */
+    private void reportDuplicate(
+            int aEquivalent, int aILine, File aJFile, int aJLine)
+    {
+        final String fileName =
+                Utils.getStrippedFileName(mBasedir, aJFile.getPath());
+        log(aILine + 1, "duplicates.lines", aEquivalent, fileName, aJLine + 1);
+        mDuplicates += 1;
+    }
+
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/duplicates/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/duplicates/package-info.java
new file mode 100644
index 0000000..ae71a00
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/duplicates/package-info.java
@@ -0,0 +1,24 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Duplicate code detection tools.
+ */
+package com.puppycrawl.tools.checkstyle.checks.duplicates;
+
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/AbstractHeaderCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/AbstractHeaderCheck.java
new file mode 100644
index 0000000..0167ce9
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/AbstractHeaderCheck.java
@@ -0,0 +1,245 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.header;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.nio.charset.Charset;
+import java.util.List;
+
+import org.apache.commons.beanutils.ConversionException;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+/**
+ * Abstract super class for header checks.
+ * Provides support for header and headerFile properties.
+ * @author o_sukhosolsky
+ */
+public abstract class AbstractHeaderCheck extends AbstractFileSetCheck
+{
+    /** The file that contains the header to check against. */
+    private String mFilename;
+
+    /** Name of a charset to use for loading the header from a file. */
+    private String mCharset = System.getProperty("file.encoding", "UTF-8");
+
+    /** the lines of the header file. */
+    private final List<String> mHeaderLines = Lists.newArrayList();
+
+
+    /**
+     * Return the header lines to check against.
+     * @return the header lines to check against.
+     */
+    protected ImmutableList<String> getHeaderLines()
+    {
+        return ImmutableList.copyOf(mHeaderLines);
+    }
+
+    /**
+     * Set the charset to use for loading the header from a file.
+     * @param aCharset the charset to use for loading the header from a file
+     * @throws UnsupportedEncodingException if aCharset is unsupported
+     */
+    public void setCharset(String aCharset) throws UnsupportedEncodingException
+    {
+        if (!Charset.isSupported(aCharset)) {
+            final String message = "unsupported charset: '" + aCharset + "'";
+            throw new UnsupportedEncodingException(message);
+        }
+        mCharset = aCharset;
+    }
+
+    /**
+     * Set the header file to check against.
+     * @param aFileName the file that contains the header to check against.
+     */
+    public void setHeaderFile(String aFileName)
+    {
+        // Handle empty param
+        if ((aFileName == null) || (aFileName.trim().length() == 0)) {
+            return;
+        }
+
+        mFilename = aFileName;
+    }
+
+    /**
+     * Load the header from a file.
+     * @throws CheckstyleException if the file cannot be loaded
+     */
+    private void loadHeaderFile() throws CheckstyleException
+    {
+        checkHeaderNotInitialized();
+        Reader headerReader = null;
+        try {
+            final URI uri = resolveHeaderFile();
+            headerReader = new InputStreamReader(new BufferedInputStream(
+                    uri.toURL().openStream()), mCharset);
+            loadHeader(headerReader);
+        }
+        catch (final IOException ex) {
+            throw new CheckstyleException(
+                    "unable to load header file " + mFilename, ex);
+        }
+        finally {
+            Utils.closeQuietly(headerReader);
+        }
+    }
+
+    /**
+     * Resolve the specified filename param to a URI.
+     * @return resolved header file URI
+     * @throws IOException on failure
+     */
+    private URI resolveHeaderFile() throws IOException
+    {
+        // figure out if this is a File or a URL
+        URI uri;
+        try {
+            final URL url = new URL(mFilename);
+            uri = url.toURI();
+        }
+        catch (final MalformedURLException ex) {
+            uri = null;
+        }
+        catch (final URISyntaxException ex) {
+            // URL violating RFC 2396
+            uri = null;
+        }
+        if (uri == null) {
+            final File file = new File(mFilename);
+            if (file.exists()) {
+                uri = file.toURI();
+            }
+            else {
+                // check to see if the file is in the classpath
+                try {
+                    final URL configUrl = AbstractHeaderCheck.class
+                            .getResource(mFilename);
+                    if (configUrl == null) {
+                        throw new FileNotFoundException(mFilename);
+                    }
+                    uri = configUrl.toURI();
+                }
+                catch (final URISyntaxException e) {
+                    throw new FileNotFoundException(mFilename);
+                }
+            }
+        }
+        return uri;
+    }
+
+    /**
+     * Called before initializing the header.
+     * @throws ConversionException if header has already been set
+     */
+    private void checkHeaderNotInitialized()
+    {
+        if (!mHeaderLines.isEmpty()) {
+            throw new ConversionException(
+                    "header has already been set - "
+                    + "set either header or headerFile, not both");
+        }
+    }
+
+    /**
+     * Set the header to check against. Individual lines in the header
+     * must be separated by '\n' characters.
+     * @param aHeader header content to check against.
+     * @throws ConversionException if the header cannot be interpreted
+     */
+    public void setHeader(String aHeader)
+    {
+        if ((aHeader == null) || (aHeader.trim().length() == 0)) {
+            return;
+        }
+
+        checkHeaderNotInitialized();
+
+        final String headerExpandedNewLines = aHeader.replaceAll("\\\\n", "\n");
+
+        final Reader headerReader = new StringReader(headerExpandedNewLines);
+        try {
+            loadHeader(headerReader);
+        }
+        catch (final IOException ex) {
+            throw new ConversionException("unable to load header", ex);
+        }
+        finally {
+            Utils.closeQuietly(headerReader);
+        }
+    }
+
+    /**
+     * Load header to check against from a Reader into mHeaderLines.
+     * @param aHeaderReader delivers the header to check against
+     * @throws IOException if
+     */
+    private void loadHeader(final Reader aHeaderReader) throws IOException
+    {
+        final LineNumberReader lnr = new LineNumberReader(aHeaderReader);
+        mHeaderLines.clear();
+        while (true) {
+            final String l = lnr.readLine();
+            if (l == null) {
+                break;
+            }
+            mHeaderLines.add(l);
+        }
+        postprocessHeaderLines();
+    }
+
+    /**
+     * Hook method for post processing header lines.
+     * This implementation does nothing.
+     */
+    protected void postprocessHeaderLines()
+    {
+    }
+
+    @Override
+    protected final void finishLocalSetup() throws CheckstyleException
+    {
+        if (mFilename != null) {
+            loadHeaderFile();
+        }
+        if (mHeaderLines.isEmpty()) {
+            throw new CheckstyleException(
+                    "property 'headerFile' is missing or invalid in module "
+                    + getConfiguration().getName());
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/HeaderCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/HeaderCheck.java
new file mode 100644
index 0000000..26c93f2
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/HeaderCheck.java
@@ -0,0 +1,91 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.header;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Checks the header of the source against a fixed header file.
+ *
+ * @author Lars K�hne
+ */
+public class HeaderCheck extends AbstractHeaderCheck
+{
+    /** empty array to avoid instantiations. */
+    private static final int[] EMPTY_INT_ARRAY = new int[0];
+
+    /** the header lines to ignore in the check, sorted. */
+    private int[] mIgnoreLines = EMPTY_INT_ARRAY;
+
+    /**
+     * @param aLineNo a line number
+     * @return if <code>aLineNo</code> is one of the ignored header lines.
+     */
+    private boolean isIgnoreLine(int aLineNo)
+    {
+        return (Arrays.binarySearch(mIgnoreLines, aLineNo) >= 0);
+    }
+
+    /**
+     * Checks if a code line matches the required header line.
+     * @param aLineNumber the line number to check against the header
+     * @param aLine the line contents
+     * @return true if and only if the line matches the required header line
+     */
+    protected boolean isMatch(int aLineNumber, String aLine)
+    {
+        // skip lines we are meant to ignore
+        return isIgnoreLine(aLineNumber + 1)
+            || getHeaderLines().get(aLineNumber).equals(aLine);
+    }
+
+    /**
+     * Set the lines numbers to ignore in the header check.
+     * @param aList comma separated list of line numbers to ignore in header.
+     */
+    public void setIgnoreLines(int[] aList)
+    {
+        if ((aList == null) || (aList.length == 0)) {
+            mIgnoreLines = EMPTY_INT_ARRAY;
+            return;
+        }
+
+        mIgnoreLines = new int[aList.length];
+        System.arraycopy(aList, 0, mIgnoreLines, 0, aList.length);
+        Arrays.sort(mIgnoreLines);
+    }
+
+    @Override
+    protected void processFiltered(File aFile, List<String> aLines)
+    {
+        if (getHeaderLines().size() > aLines.size()) {
+            log(1, "header.missing");
+        }
+        else {
+            for (int i = 0; i < getHeaderLines().size(); i++) {
+                if (!isMatch(i, aLines.get(i))) {
+                    log(i + 1, "header.mismatch", getHeaderLines().get(i));
+                    break; // stop checking
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/RegexpHeaderCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/RegexpHeaderCheck.java
new file mode 100644
index 0000000..95b135d
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/RegexpHeaderCheck.java
@@ -0,0 +1,150 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.header;
+
+import java.util.Arrays;
+
+import java.io.File;
+import java.util.List;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import org.apache.commons.beanutils.ConversionException;
+
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+/**
+ * Checks the header of the source against a header file that contains a
+ * {@link java.util.regex.Pattern regular expression}
+ * for each line of the source header.
+ *
+ * @author Lars K�hne
+ * @author o_sukhodolsky
+ */
+public class RegexpHeaderCheck extends AbstractHeaderCheck
+{
+    /** empty array to avoid instantiations. */
+    private static final int[] EMPTY_INT_ARRAY = new int[0];
+
+    /** the compiled regular expressions */
+    private final List<Pattern> mHeaderRegexps = Lists.newArrayList();
+
+    /** the header lines to repeat (0 or more) in the check, sorted. */
+    private int[] mMultiLines = EMPTY_INT_ARRAY;
+
+    /**
+     * Set the lines numbers to repeat in the header check.
+     * @param aList comma separated list of line numbers to repeat in header.
+     */
+    public void setMultiLines(int[] aList)
+    {
+        if ((aList == null) || (aList.length == 0)) {
+            mMultiLines = EMPTY_INT_ARRAY;
+            return;
+        }
+
+        mMultiLines = new int[aList.length];
+        System.arraycopy(aList, 0, mMultiLines, 0, aList.length);
+        Arrays.sort(mMultiLines);
+    }
+
+    @Override
+    protected void processFiltered(File aFile, List<String> aLines)
+    {
+        final int headerSize = getHeaderLines().size();
+        final int fileSize = aLines.size();
+
+        if (headerSize - mMultiLines.length > fileSize) {
+            log(1, "header.missing");
+        }
+        else {
+            int headerLineNo = 0;
+            int i;
+            for (i = 0; (headerLineNo < headerSize) && (i < fileSize); i++) {
+                final String line = aLines.get(i);
+                boolean isMatch = isMatch(line, headerLineNo);
+                while (!isMatch && isMultiLine(headerLineNo)) {
+                    headerLineNo++;
+                    isMatch = (headerLineNo == headerSize)
+                            || isMatch(line, headerLineNo);
+                }
+                if (!isMatch) {
+                    log(i + 1, "header.mismatch", getHeaderLines().get(
+                            headerLineNo));
+                    break; // stop checking
+                }
+                if (!isMultiLine(headerLineNo)) {
+                    headerLineNo++;
+                }
+            }
+            if (i == fileSize) {
+                // if file finished, but we have at least one non-multi-line
+                // header isn't completed
+                for (; headerLineNo < headerSize; headerLineNo++) {
+                    if (!isMultiLine(headerLineNo)) {
+                        log(1, "header.missing");
+                        break;
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Checks if a code line matches the required header line.
+     * @param aLine the code line
+     * @param aHeaderLineNo the header line number.
+     * @return true if and only if the line matches the required header line.
+     */
+    private boolean isMatch(String aLine, int aHeaderLineNo)
+    {
+        return mHeaderRegexps.get(aHeaderLineNo).matcher(aLine).find();
+    }
+
+    /**
+     * @param aLineNo a line number
+     * @return if <code>aLineNo</code> is one of the repeat header lines.
+     */
+    private boolean isMultiLine(int aLineNo)
+    {
+        return (Arrays.binarySearch(mMultiLines, aLineNo + 1) >= 0);
+    }
+
+    @Override
+    protected void postprocessHeaderLines()
+    {
+        final List<String> headerLines = getHeaderLines();
+        mHeaderRegexps.clear();
+        for (String line : headerLines) {
+            try {
+                // TODO: Not sure if cache in Utils is still necessary
+                mHeaderRegexps.add(Utils.getPattern(line));
+            }
+            catch (final PatternSyntaxException ex) {
+                throw new ConversionException("line "
+                        + (mHeaderRegexps.size() + 1)
+                        + " in header specification"
+                        + " is not a regular expression");
+            }
+        }
+    }
+
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/package-info.java
new file mode 100644
index 0000000..2d68572
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/header/package-info.java
@@ -0,0 +1,23 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * File Header checks.
+ */
+package com.puppycrawl.tools.checkstyle.checks.header;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AccessResult.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AccessResult.java
new file mode 100644
index 0000000..562454f
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AccessResult.java
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+/**
+ * Represents the result of an access check.
+ *
+ * @author Oliver Burn
+ */
+enum AccessResult {
+    /** Represents that access is allowed. */
+    ALLOWED,
+    /** Represents that access is disallowed. */
+    DISALLOWED,
+    /** Represents that access is unknown. */
+    UNKNOWN
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStarImportCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStarImportCheck.java
new file mode 100644
index 0000000..1933282
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStarImportCheck.java
@@ -0,0 +1,153 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import java.util.List;
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Check that finds import statements that use the * notation.
+ * </p>
+ * <p>
+ * Rationale: Importing all classes from a package or static
+ * members from a class leads to tight coupling between packages
+ * or classes and might lead to problems when a new version of a
+ * library introduces name clashes.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="AvoidStarImport">
+ *   <property name="excludes" value="java.io,java.net,java.lang.Math"/>
+ *   <property name="allowClassImports" value="false"/>
+ *   <property name="allowStaticMemberImports" value="false"/>
+ * </module>
+ * </pre>
+ *
+ * The optional "excludes" property allows for certain packages like
+ * java.io or java.net to be exempted from the rule. It also is used to
+ * allow certain classes like java.lang.Math or java.io.File to be
+ * excluded in order to support static member imports.
+ *
+ * The optional "allowClassImports" when set to true, will allow starred
+ * class imports but will not affect static member imports.
+ *
+ * The optional "allowStaticMemberImports" when set to true will allow
+ * starred static member imports but will not affect class imports.
+ *
+ * @author Oliver Burn
+ * @author <a href="bschneider at vecna.com">Bill Schneider</a>
+ * @author Travis Schneeberger
+ * @version 2.0
+ */
+public class AvoidStarImportCheck
+    extends Check
+{
+    /** the packages/classes to exempt from this check. */
+    private final List<String> mExcludes = Lists.newArrayList();
+
+    /** whether to allow all class imports */
+    private boolean mAllowClassImports;
+
+    /** whether to allow all static member imports */
+    private boolean mAllowStaticMemberImports;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.IMPORT, TokenTypes.STATIC_IMPORT};
+    }
+
+    /**
+     * Sets the list of packages or classes to be exempt from the check.
+     * The excludes can contain a .* or not.
+     * @param aExcludes a list of package names/fully-qualifies class names
+     * where star imports are ok
+     */
+    public void setExcludes(String[] aExcludes)
+    {
+        mExcludes.clear();
+        for (final String exclude : aExcludes) {
+            mExcludes.add(exclude.endsWith(".*") ? exclude : exclude + ".*");
+        }
+    }
+
+    /**
+     * Sets whether or not to allow all non-static class imports.
+     * @param aAllow true to allow false to disallow
+     */
+    public void setAllowClassImports(boolean aAllow)
+    {
+        mAllowClassImports = aAllow;
+    }
+
+    /**
+     * Sets whether or not to allow all static member imports.
+     * @param aAllow true to allow false to disallow
+     */
+    public void setAllowStaticMemberImports(boolean aAllow)
+    {
+        mAllowStaticMemberImports = aAllow;
+    }
+
+    @Override
+    public void visitToken(final DetailAST aAST)
+    {
+        if (!mAllowClassImports && (TokenTypes.IMPORT == aAST.getType())) {
+            final DetailAST startingDot = aAST.getFirstChild();
+            logsStarredImportViolation(startingDot);
+        }
+        else if (!mAllowStaticMemberImports
+            && (TokenTypes.STATIC_IMPORT == aAST.getType()))
+        {
+            // must navigate past the static keyword
+            final DetailAST startingDot = aAST.getFirstChild().getNextSibling();
+            logsStarredImportViolation(startingDot);
+        }
+    }
+
+    /**
+     * Gets the full import identifier.  If the import is a starred import and
+     * it's not excluded then a violation is logged.
+     * @param aStartingDot the starting dot for the import statement
+     */
+    private void logsStarredImportViolation(DetailAST aStartingDot)
+    {
+        final FullIdent name = FullIdent.createFullIdent(aStartingDot);
+        if (isStaredImport(name) && !mExcludes.contains(name.getText())) {
+            log(aStartingDot.getLineNo(), "import.avoidStar", name.getText());
+        }
+    }
+
+    /**
+     * Checks is an import is a stared import.
+     * @param aImportIdent the full import identifier
+     * @return true if a start import false if not
+     */
+    private boolean isStaredImport(FullIdent aImportIdent)
+    {
+        return (null != aImportIdent) && aImportIdent.getText().endsWith(".*");
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStaticImportCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStaticImportCheck.java
new file mode 100644
index 0000000..a8ec63b
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStaticImportCheck.java
@@ -0,0 +1,131 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Check that finds static imports.
+ * </p>
+ * <p>
+ * Rationale: Importing static members can lead to naming conflicts
+ * between class' members. It may lead to poor code readability since it
+ * may no longer be clear what class a member resides (without looking
+ * at the import statement).
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="AvoidStaticImport">
+ *   <property name="excludes"
+ *       value="java.lang.System.out,java.lang.Math.*"/>
+ * </module>
+ * </pre>
+ *
+ * The optional "excludes" property allows for certain classes via a star
+ * notation to be excluded such as java.lang.Math.* or specific
+ * static members to be excluded like java.lang.System.out for a variable
+ * or java.lang.Math.random for a method.
+ *
+ * <p>
+ * If you exclude a starred import on a class this automatically
+ * excludes each member individually.
+ * </p>
+ *
+ * <p>
+ * For example:
+ * Excluding java.lang.Math.* will allow the import of
+ * each static member in the Math class individually like
+ * java.lang.Math.PI
+ * </p>
+ * @author Travis Schneeberger
+ * @version 1.0
+ */
+public class AvoidStaticImportCheck
+    extends Check
+{
+    /** the classes/static members to exempt from this check. */
+    private String[] mExcludes = new String[0];
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.STATIC_IMPORT};
+    }
+
+    /**
+     * Sets the list of classes or static members to be exempt from the check.
+     * @param aExcludes a list of fully-qualified class names/specific
+     * static members where static imports are ok
+     */
+    public void setExcludes(String[] aExcludes)
+    {
+        mExcludes = aExcludes.clone();
+    }
+
+    @Override
+    public void visitToken(final DetailAST aAST)
+    {
+        final DetailAST startingDot =
+            aAST.getFirstChild().getNextSibling();
+        final FullIdent name = FullIdent.createFullIdent(startingDot);
+
+        if ((null != name) && !isExempt(name.getText())) {
+            log(startingDot.getLineNo(), "import.avoidStatic", name.getText());
+        }
+    }
+
+    /**
+     * Checks if a class or static member is exempt from known excludes.
+     *
+     * @param aClassOrStaticMember
+     *                the class or static member
+     * @return true if except false if not
+     */
+    private boolean isExempt(String aClassOrStaticMember)
+    {
+        for (String exclude : mExcludes) {
+            if (aClassOrStaticMember.equals(exclude)) {
+                return true;
+            }
+            else if (exclude.endsWith(".*")) {
+                //this section allows explicit imports
+                //to be exempt when configured using
+                //a starred import
+                final String excludeMinusDotStar =
+                    exclude.substring(0, exclude.length() - 2);
+                if (aClassOrStaticMember.startsWith(excludeMinusDotStar)) {
+                    final String member =
+                        aClassOrStaticMember.substring(
+                            excludeMinusDotStar.length() + 1);
+                    //if it contains a dot then it is not a member but a package
+                    if (member.indexOf('.') == -1) {
+                        return true;
+                    }
+                }
+            }
+        }
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/CustomImportOrderCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/CustomImportOrderCheck.java
new file mode 100644
index 0000000..ca2886d
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/CustomImportOrderCheck.java
@@ -0,0 +1,800 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+import java.util.regex.Pattern;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+/**
+ * <p>
+ * Checks that the groups of import declarations appear in the order specified
+ * by the user. If there is an import but its group is not specified in the
+ * configuration such an import should be placed at the end of the import list.
+ * </p>
+ * The rule consists of:
+ *
+ * <pre>
+ * STATIC group. This group sets the ordering of static imports.
+ * </pre>
+ *
+ * <pre>
+ * SAME_PACKAGE(n) group. This group sets the ordering of the same package imports.
+ * 'n' - a number of the first package domains. For example:
+ * </pre>
+ *
+ * <pre>
+ * package java.util.concurrent;
+ *
+ * import java.util.regex.Pattern;
+ * import java.util.List;
+ * import java.util.StringTokenizer;
+ * import java.util.regex.Pattern;
+ * import java.util.*;
+ * import java.util.concurrent.AbstractExecutorService;
+ * import java.util.concurrent.*;
+ *
+ * And we have such configuration: SAME_PACKAGE (3).
+ * Same package imports are java.util.*, java.util.concurrent.*,
+ * java.util.concurrent.AbstractExecutorService,
+ * java.util.List and java.util.StringTokenizer
+ * </pre>
+ *
+ * <pre>
+ * THIRD_PARTY_PACKAGE group. This group sets ordering of third party imports.
+ * Third party imports are all imports except STATIC,
+ * SAME_PACKAGE(n) and STANDARD_JAVA_PACKAGE.
+ * </pre>
+ *
+ * <pre>
+ * STANDARD_JAVA_PACKAGE group. This group sets ordering of standard java (java|javax) imports.
+ * </pre>
+ *
+ * <pre>
+ * SPECIAL_IMPORTS group. This group may contains some imports
+ * that have particular meaning for the user.
+ * </pre>
+ *
+ * <p>
+ * NOTICE!
+ * </p>
+ * <p>
+ * Use the separator '###' between rules.
+ * </p>
+ * <p>
+ * To set RegExps for THIRD_PARTY_PACKAGE and STANDARD_JAVA_PACKAGE groups use
+ * thirdPartyPackageRegExp and standardPackageRegExp options.
+ * </p>
+ *
+ * <pre>
+ * For example:
+ * </pre>
+ *
+ * <pre>
+ * <module name="CustomImportOrder">
+ *    <property name="customImportOrderRules"
+ *    value="STATIC###SAME_PACKAGE(3)###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
+ *    <property name="thirdPartyPackageRegExp" value="com|org"/>
+ *    <property name="standardPackageRegExp" value="java|javax"/>
+ * </module>
+ * </pre>
+ * <p>
+ * Also, this check can be configured to force empty line separator between
+ * import groups. For example
+ * </p>
+ *
+ * <pre>
+ * <module name="CustomImportOrder">
+ *    <property name="separateLineBetweenGroups" value="true"/>
+ * </module>
+ * </pre>
+ * <p>
+ * By the option it is possible to force alphabetically sorting.
+ * </p>
+ *
+ * <pre>
+ * <module name="CustomImportOrder">
+ *    <property name="sortImportsInGroupAlphabetically" value="true"/>
+ * </module>
+ * </pre>
+ * @author maxvetrenko
+ */
+public class CustomImportOrderCheck extends Check
+{
+
+    /** STATIC group name */
+    private static final String STATIC_RULE_GROUP = "STATIC";
+
+    /** SAME_PACKAGE group name */
+    private static final String SAME_PACKAGE_RULE_GROUP = "SAME_PACKAGE";
+
+    /** THIRD_PARTY_PACKAGE group name */
+    private static final String THIRD_PARTY_PACKAGE_RULE_GROUP = "THIRD_PARTY_PACKAGE";
+
+    /** STANDARD_JAVA_PACKAGE group name */
+    private static final String STANDARD_JAVA_PACKAGE_RULE_GROUP = "STANDARD_JAVA_PACKAGE";
+
+    /** NON_GROUP group name */
+    private static final String SPECIAL_IMPORTS_RULE_GROUP = "SPECIAL_IMPORTS";
+
+    /** NON_GROUP group name */
+    private static final String NON_GROUP_RULE_GROUP = "NON_GROUP";
+
+    /** RegExp for SAME_PACKAGE group imports */
+    private String mSamePackageDomainsRegExp = "";
+
+    /** RegExp for STANDARD_JAVA_PACKAGE group imports */
+    private Pattern mStandardPackageRegExp = Utils.getPattern("java|javax");
+
+    /** RegExp for THIRDPARTY_PACKAGE group imports */
+    private Pattern mThirdPartyPackageRegExp = Utils.getPattern("^$");
+
+    /** RegExp for SPECIAL_IMPORTS group imports */
+    private Pattern mSpecialImportsRegExp = Utils.getPattern("^$");
+
+    /** Force empty line separator between import groups */
+    private boolean mSeparateLineBetweenGroups = true;
+
+    /** Force grouping alphabetically */
+    private boolean mSortImportsInGroupAlphabetically;
+
+    /** List of order declaration customizing by user */
+    private final List<String> mCustomImportOrderRules =
+            new ArrayList<String>();
+
+    /** Number of first domains for SAME_PACKAGE group. */
+    private int mSamePackageMatchingDepth = 2;
+
+    /** Contains objects with import attributes */
+    private List<ImportDetails> mImportToGroupList =
+            new ArrayList<CustomImportOrderCheck.ImportDetails>();
+
+    /**
+     * Sets mStandardRegExp specified by user.
+     * @param aRegexp
+     *        user value.
+     */
+    public final void setStandardPackageRegExp(String aRegexp)
+    {
+        mStandardPackageRegExp = Utils.getPattern(aRegexp);
+    }
+
+    /**
+     * Sets mThirdPartyRegExp specified by user.
+     * @param aRegexp
+     *        user value.
+     */
+    public final void setThirdPartyPackageRegExp(String aRegexp)
+    {
+        mThirdPartyPackageRegExp = Utils.getPattern(aRegexp);
+    }
+
+    /**
+     * Sets mSpecialImportsRegExp specified by user.
+     * @param aRegexp
+     *        user value.
+     */
+    public final void setSpecialImportsRegExp(String aRegexp)
+    {
+        mSpecialImportsRegExp = Utils.getPattern(aRegexp);
+    }
+
+    /**
+     * Sets mSeparateLineBetweenGroups specified by user.
+     * @param aValue
+     *        user value.
+     */
+    public final void setSeparateLineBetweenGroups(boolean aValue)
+    {
+        mSeparateLineBetweenGroups = aValue;
+    }
+
+    /**
+     * Sets mSortImportsInGroupAlphabetically specified by user.
+     * @param aValue
+     *        user value.
+     */
+    public final void setSortImportsInGroupAlphabetically(boolean aValue)
+    {
+        mSortImportsInGroupAlphabetically = aValue;
+    }
+
+    /**
+     * Sets a custom import order from the rules in the string format specified
+     * by user.
+     * @param aInputCustomImportOrder
+     *        user value.
+     */
+    public final void setCustomImportOrderRules(final String aInputCustomImportOrder)
+    {
+        mCustomImportOrderRules.clear();
+        try {
+            for (String currentState : aInputCustomImportOrder
+                    .split("\\s*###\\s*"))
+            {
+                addRulesToList(currentState);
+            }
+            mCustomImportOrderRules.add(NON_GROUP_RULE_GROUP);
+        }
+        catch (StringIndexOutOfBoundsException exp) {
+            //if the structure of the input rule isn't correct
+            throw new RuntimeException("Unable to parse input rule: " + exp);
+        }
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.IMPORT,
+            TokenTypes.STATIC_IMPORT,
+            TokenTypes.PACKAGE_DEF,
+        };
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        mImportToGroupList.clear();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (aAST.getType() == TokenTypes.PACKAGE_DEF) {
+            if (mCustomImportOrderRules.contains(SAME_PACKAGE_RULE_GROUP)
+                    && mSamePackageMatchingDepth != -1)
+            {
+                mSamePackageDomainsRegExp = createSamePackageRegexp(
+                        mSamePackageMatchingDepth, aAST);
+            }
+        }
+        else {
+            final String importFullPath = getFullImportIdent(aAST);
+            final int lineNo = aAST.getLineNo();
+            final boolean isStatic = aAST.getType() == TokenTypes.STATIC_IMPORT;
+            mImportToGroupList.add(new ImportDetails(importFullPath,
+                    lineNo, getImportGroup(isStatic, importFullPath),
+                    isStatic));
+        }
+    }
+
+    @Override
+    public void finishTree(DetailAST aRootAST)
+    {
+
+        if (mImportToGroupList.isEmpty()) {
+            return;
+        }
+
+        final ImportDetails firstImport = mImportToGroupList.get(0);
+        String currentGroup = getImportGroup(firstImport.isStatic(),
+                firstImport.getImportFullPath());
+        int groupNumber = mCustomImportOrderRules.indexOf(currentGroup);
+        String previousImport = null;
+
+        for (ImportDetails importObject : mImportToGroupList) {
+            final String importGroup = importObject.getImportGroup();
+            final String fullImportIdent = importObject.mImportFullPath;
+
+            if (!importGroup.equals(currentGroup)) {
+                if (mCustomImportOrderRules.size() > groupNumber + 1) {
+                    final String nextGroup = getNextImportGroup(groupNumber + 1);
+                    if (importGroup.equals(nextGroup)) {
+                        if (mSeparateLineBetweenGroups && previousImport != null
+                                && !hasEmptyLineBefore(importObject.getLineNumber()))
+                        {
+                            log(importObject.getLineNumber(), "custom.import.order.line.separator",
+                                    fullImportIdent);
+                        }
+                        currentGroup = nextGroup;
+                        groupNumber = mCustomImportOrderRules.indexOf(nextGroup);
+                    }
+                    else {
+                        logWrongImportGroupOrder(importObject.getLineNumber(),
+                                importGroup);
+                    }
+                }
+                else {
+                    logWrongImportGroupOrder(importObject.getLineNumber(),
+                            importGroup);
+                }
+            }
+            else if (mSortImportsInGroupAlphabetically
+                    && previousImport != null
+                    && matchesImportGroup(importObject.isStatic(),
+                            fullImportIdent, currentGroup)
+                    && !(compare(fullImportIdent, previousImport) >= 0))
+            {
+                log(importObject.getLineNumber(), "custom.import.order.lex", fullImportIdent);
+            }
+            previousImport = fullImportIdent;
+        }
+    }
+
+    /**
+     * Log wrong import group order.
+     * @param aCurrentImportLine
+     *        line number of current import current import.
+     * @param aImportGroup
+     *        import group.
+     */
+    private void logWrongImportGroupOrder(int aCurrentImportLine, String aImportGroup)
+    {
+        if (NON_GROUP_RULE_GROUP.equals(aImportGroup)) {
+            log(aCurrentImportLine, "custom.import.order.nongroup.import");
+        }
+        else {
+            log(aCurrentImportLine, "custom.import.order", aImportGroup);
+        }
+    }
+
+    /**
+     * Get next import group.
+     * @param aCurrentGroupNumber
+     *        current group number.
+     * @return
+     *        next import group.
+     */
+    private String getNextImportGroup(int aCurrentGroupNumber)
+    {
+        int nextGroupNumber = aCurrentGroupNumber;
+
+        while (mCustomImportOrderRules.size() > nextGroupNumber + 1) {
+            if (hasAnyImportInCurrentGroup(mCustomImportOrderRules.get(nextGroupNumber)))
+            {
+                break;
+            }
+            nextGroupNumber++;
+        }
+        return mCustomImportOrderRules.get(nextGroupNumber);
+    }
+
+    /**
+     * Checks if current group contains any import.
+     * @param aCurrentGroup
+     *        current group.
+     * @return
+     *        true, if current group contains at least one import.
+     */
+    private boolean hasAnyImportInCurrentGroup(String aCurrentGroup)
+    {
+        for (ImportDetails currentImport : mImportToGroupList) {
+            if (aCurrentGroup.equals(currentImport.getImportGroup())) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Get import valid group.
+     * @param aStatic
+     *        is static import.
+     * @param aImportPath
+     *        full import path.
+     * @return import valid group.
+     */
+    private String getImportGroup(boolean aStatic, String aImportPath)
+    {
+        for (String group : mCustomImportOrderRules) {
+            if (matchesImportGroup(aStatic, aImportPath, group)) {
+                return group;
+            }
+        }
+        return NON_GROUP_RULE_GROUP;
+    }
+
+    /**
+     * Checks if the import is placed in the correct group.
+     * @param aStatic
+     *        if import is static.
+     * @param aImportPath
+     *        import full path.
+     * @param aCurrentGroup
+     *        current group.
+     * @return true, if import placed in the correct group.
+     */
+    private boolean matchesImportGroup(boolean aStatic, String aImportPath, String aCurrentGroup)
+    {
+        return matchesStaticImportGroup(aStatic, aCurrentGroup)
+                || matchesSamePackageImportGroup(aStatic, aImportPath, aCurrentGroup)
+                || matchesSpecialImportsGroup(aStatic, aImportPath, aCurrentGroup)
+                || matchesStandartImportGroup(aStatic, aImportPath, aCurrentGroup)
+                || matchesThirdPartyImportGroup(aStatic, aImportPath, aCurrentGroup);
+    }
+
+    /**
+     * Checks if the import is placed in the STATIC group.
+     * @param aStatic
+     *        is static import.
+     * @param aCurrentGroup
+     *        current group.
+     * @return true, if the import is placed in the static group.
+     */
+    private boolean matchesStaticImportGroup(boolean aStatic, String aCurrentGroup)
+    {
+        return aStatic && STATIC_RULE_GROUP.equals(aCurrentGroup);
+    }
+
+    /**
+     * Checks if the import is placed in the correct group.
+     * @param aStatic
+     *        if import is static.
+     * @param aImportPath
+     *        import full path.
+     * @param aCurrentGroup
+     *        current group.
+     * @return true, if the import is placed in the static group.
+     */
+    private boolean matchesSamePackageImportGroup(boolean aStatic,
+        String aImportPath, String aCurrentGroup)
+    {
+        final String importPath = aImportPath.substring(0, aImportPath.lastIndexOf("."));
+        return !aStatic && SAME_PACKAGE_RULE_GROUP.equals(aCurrentGroup)
+                && mSamePackageDomainsRegExp.contains(importPath);
+    }
+
+    /**
+     * Checks if the import is placed in the correct group.
+     * @param aStatic
+     *        if import is static.
+     * @param aCurrentImport
+     *        import full path.
+     * @param aCurrentGroup
+     *        current group.
+     * @return true, if the import is placed in the static group.
+     */
+    private boolean matchesStandartImportGroup(boolean aStatic,
+        String aCurrentImport, String aCurrentGroup)
+    {
+        return !aStatic && STANDARD_JAVA_PACKAGE_RULE_GROUP.equals(aCurrentGroup)
+                && mStandardPackageRegExp.matcher(aCurrentImport).find();
+    }
+
+    /**
+     * Checks if the import is placed in the correct group.
+     * @param aStatic
+     *        if import is static.
+     * @param aCurrentImport
+     *        import full path.
+     * @param aCurrentGroup
+     *        current group.
+     * @return true, if the import is placed in the static group.
+     */
+    private boolean matchesSpecialImportsGroup(boolean aStatic,
+        String aCurrentImport, String aCurrentGroup)
+    {
+        return !aStatic && SPECIAL_IMPORTS_RULE_GROUP.equals(aCurrentGroup)
+                && mSpecialImportsRegExp.matcher(aCurrentImport).find();
+    }
+
+    /**
+     * Checks if the import is placed in the correct group.
+     * @param aStatic
+     *        if import is static.
+     * @param aCurrentImport
+     *        import full path.
+     * @param aCurrentGroup
+     *        current group.
+     * @return true, if the import is placed in the static group.
+     */
+    private boolean matchesThirdPartyImportGroup(boolean aStatic,
+        String aCurrentImport, String aCurrentGroup)
+    {
+        return !aStatic && THIRD_PARTY_PACKAGE_RULE_GROUP.equals(aCurrentGroup)
+                && mThirdPartyPackageRegExp.matcher(aCurrentImport).find()
+                && !mStandardPackageRegExp.matcher(aCurrentImport).find();
+    }
+
+    /**
+     * Checks compare two import paths.
+     * @param aCurrentImport
+     *        current import.
+     * @param aPreviousImport
+     *        previous import.
+     * @return a negative integer, zero, or a positive integer as the
+     *        specified String is greater than, equal to, or less
+     *        than this String, ignoring case considerations.
+     */
+    private int compare(String aCurrentImport, String aPreviousImport)
+    {
+        int indexOfPreviousDotCurrent = 0;
+        int indexOfNextDotCurrent = 0;
+        String tokenCurrent = "";
+        int indexOfPreviousDotPrevious = 0;
+        int indexOfNextDotPrevious = 0;
+        String tokenPrevious = "";
+        final int currentImportDomainCount = countDomains(aCurrentImport);
+        final int previousImportDomainCount = countDomains(aPreviousImport);
+        int result = 0;
+
+        while (aCurrentImport.lastIndexOf(".") != indexOfPreviousDotCurrent - 1
+                && aPreviousImport.lastIndexOf(".") != indexOfPreviousDotPrevious - 1)
+        {
+            indexOfNextDotCurrent = aCurrentImport.indexOf(".", indexOfPreviousDotCurrent + 1);
+            indexOfNextDotPrevious = aPreviousImport.indexOf(".", indexOfPreviousDotPrevious + 1);
+            tokenCurrent = aCurrentImport.substring(indexOfPreviousDotCurrent,
+                    indexOfNextDotCurrent);
+            tokenPrevious = aPreviousImport.substring(indexOfPreviousDotPrevious,
+                    indexOfNextDotPrevious);
+            result = tokenCurrent.compareToIgnoreCase(tokenPrevious);
+            if (result != 0) {
+                return result;
+            }
+            indexOfPreviousDotCurrent = indexOfNextDotCurrent + 1;
+            indexOfPreviousDotPrevious = indexOfNextDotPrevious + 1;
+        }
+
+        if (result == 0 && (aCurrentImport.lastIndexOf(".") == indexOfPreviousDotCurrent - 1
+                || aPreviousImport.lastIndexOf(".") == indexOfPreviousDotPrevious - 1))
+        {
+            if (currentImportDomainCount != previousImportDomainCount) {
+                getClassName(indexOfNextDotPrevious, aPreviousImport);
+                return currentImportDomainCount - previousImportDomainCount;
+            }
+            else {
+                getClassName(indexOfNextDotPrevious, aPreviousImport);
+                return getClassName(indexOfNextDotCurrent,
+                        aCurrentImport).compareToIgnoreCase(getClassName(indexOfNextDotPrevious,
+                                aPreviousImport));
+            }
+        }
+        return 0;
+    }
+
+    /**
+     * Return class name from import full path.
+     * @param aStartFrom number of start.
+     * @param aImport import full path.
+     * @return class name.
+     */
+    private String getClassName(int aStartFrom, String aImport)
+    {
+        String className = aImport;
+        className = className.substring(aStartFrom, className.length());
+        final StringTokenizer token = new StringTokenizer(className, ".\r");
+        return token.nextToken();
+    }
+
+    /**
+     * Count number of domains.
+     * @param aImportPath current import.
+     * @return number of domains.
+     */
+    private static int countDomains(String aImportPath)
+    {
+        final StringTokenizer tokens = new StringTokenizer(aImportPath, ".");
+        int count = 0;
+
+        while (tokens.hasMoreTokens()) {
+            if (!Character.isUpperCase(tokens.nextToken().toString().charAt(0))) {
+                count++;
+            }
+            else {
+                break;
+            }
+        }
+        return count - 1;
+    }
+
+    /**
+     * Checks if a token has a empty line before.
+     * @param aLineNo
+     *        Line number of current import.
+     * @return true, if token have empty line before.
+     */
+    private boolean hasEmptyLineBefore(int aLineNo)
+    {
+        //  [lineNo - 2] is the number of the previous line
+        //  because the numbering starts from zero.
+        final String lineBefore = getLines()[aLineNo - 2];
+        return lineBefore.trim().isEmpty();
+    }
+
+    /**
+     * Forms import full path.
+     * @param aToken
+     *        current token.
+     * @return full path or null.
+     */
+    private static String getFullImportIdent(DetailAST aToken)
+    {
+        return aToken != null ? FullIdent.createFullIdent(aToken.
+                findFirstToken(TokenTypes.DOT)).getText() : "";
+    }
+
+    /**
+     * Parses ordering rule and adds it to the list with rules.
+     * @param aRule
+     *        String with rule.
+     */
+    private void addRulesToList(String aRule)
+    {
+        if (STATIC_RULE_GROUP.equals(aRule)
+                || THIRD_PARTY_PACKAGE_RULE_GROUP.equals(aRule)
+                || STANDARD_JAVA_PACKAGE_RULE_GROUP.equals(aRule)
+                || SPECIAL_IMPORTS_RULE_GROUP.equals(aRule))
+        {
+            mCustomImportOrderRules.add(aRule);
+
+        }
+        else if (aRule.startsWith(SAME_PACKAGE_RULE_GROUP)) {
+
+            final String rule = aRule.substring(aRule.indexOf("(") + 1,
+                    aRule.indexOf(")"));
+            try {
+                mSamePackageMatchingDepth = Integer.parseInt(rule);
+            }
+            catch (Exception e) {
+                mSamePackageDomainsRegExp = rule;
+            }
+            mCustomImportOrderRules.add(SAME_PACKAGE_RULE_GROUP);
+
+        }
+        else {
+            throw new RuntimeException("Unexpected rule: " + aRule);
+        }
+    }
+
+    /**
+     * Creates mSamePackageDomainsRegExp of the first package domains.
+     * @param aCount
+     *        number of first package domains.
+     * @param aPackageNode
+     *        package node.
+     * @return same package regexp.
+     */
+    private static String createSamePackageRegexp(int aCount, DetailAST aPackageNode)
+    {
+        final StringBuilder builder = new StringBuilder();
+        final String packageFullPath = getFullImportIdent(aPackageNode);
+        final StringTokenizer tokens = new StringTokenizer(packageFullPath, ".");
+        int count = aCount;
+
+        while (tokens.hasMoreTokens() && count > 0) {
+            builder.append(tokens.nextToken()).append(".");
+            count--;
+        }
+        return builder.append("*").toString();
+    }
+
+    /**
+     * Contains import attributes as line number, import full path, import
+     * group.
+     * @author max
+     */
+    class ImportDetails
+    {
+        /** Import full path */
+        private String mImportFullPath;
+
+        /** Import line number */
+        private int mLineNumber;
+
+        /** Import group */
+        private String mImportGroup;
+
+        /** Is static import */
+        private boolean mStatic;
+
+        /**
+         * @param aImportFullPath
+         *        import full path.
+         * @param aLineNumber
+         *        import line number.
+         * @param aImportGroup
+         *        import group.
+         * @param aStatic
+         *        if import is static.
+         */
+        public ImportDetails(String aImportFullPath,
+                int aLineNumber, String aImportGroup, boolean aStatic)
+        {
+            setImportFullPath(aImportFullPath);
+            setLineNumber(aLineNumber);
+            setImportGroup(aImportGroup);
+            setStatic(aStatic);
+        }
+
+        /**
+         * Get import full path variable.
+         * @return import full path variable.
+         */
+        public String getImportFullPath()
+        {
+            return mImportFullPath;
+        }
+
+        /**
+         * Set import full path variable.
+         * @param aImportFullPath
+         *        import full path variable.
+         */
+        public void setImportFullPath(String aImportFullPath)
+        {
+            this.mImportFullPath = aImportFullPath;
+        }
+
+        /**
+         * Get import line number.
+         * @return import line.
+         */
+        public int getLineNumber()
+        {
+            return mLineNumber;
+        }
+
+        /**
+         * Set import line number.
+         * @param aLineNumber
+         *        import line number.
+         */
+        public void setLineNumber(int aLineNumber)
+        {
+            this.mLineNumber = aLineNumber;
+        }
+
+        /**
+         * Get import group.
+         * @return import group.
+         */
+        public String getImportGroup()
+        {
+            return mImportGroup;
+        }
+
+        /**
+         * Set import group.
+         * @param aImportGroup
+         *        import group.
+         */
+        public void setImportGroup(String aImportGroup)
+        {
+            this.mImportGroup = aImportGroup;
+        }
+
+        /**
+         * Checks if import is static.
+         * @return true, if import is static.
+         */
+        public boolean isStatic()
+        {
+            return mStatic;
+        }
+
+        /**
+         * Set true, if import is static
+         * @param aStatic
+         *        if import is static.
+         */
+        public void setStatic(boolean aStatic)
+        {
+            this.mStatic = aStatic;
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/Guard.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/Guard.java
new file mode 100644
index 0000000..c2a8971
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/Guard.java
@@ -0,0 +1,144 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+/**
+ * Represents whether a package is allowed to be used or not.
+ * @author Oliver Burn
+ */
+class Guard
+{
+    /** Indicates if allow access or not. */
+    private final boolean mAllowed;
+    /** Package to control access to. */
+    private final String mPkgName;
+    /** Package to control access to. */
+    private final String mClassName;
+
+    /**
+     * Indicates if must be an exact match. Only valid if guard using a
+     * package.
+     */
+    private final boolean mExactMatch;
+    /** Indicates if the guard only applies to this package. */
+    private final boolean mLocalOnly;
+    /**
+     * Indicates if the package and the class names are to be interpreted
+     * as regular expressions.
+     */
+    private final boolean mRegExp;
+
+    /**
+     * Constructs an instance.
+     * @param aAllow whether to allow access.
+     * @param aLocalOnly whether guard is to be applied locally only
+     * @param aPkgName the package to apply guard on.
+     * @param aExactMatch whether the package must match exactly.
+     * @param aRegExp whether the package is to be interpreted as regular
+     *        expression.
+     */
+    Guard(final boolean aAllow, final boolean aLocalOnly,
+        final String aPkgName, final boolean aExactMatch, final boolean aRegExp)
+    {
+        mAllowed = aAllow;
+        mLocalOnly = aLocalOnly;
+        mPkgName = aPkgName;
+        mRegExp = aRegExp;
+        mClassName = null;
+        mExactMatch = aExactMatch;
+    }
+
+    /**
+     * Constructs an instance.
+     * @param aAllow whether to allow access.
+     * @param aLocalOnly whether guard is to be applied locally only
+     * @param aClassName the class to apply guard on.
+     * @param aRegExp whether the class is to be interpreted as regular
+     *        expression.
+     */
+    Guard(final boolean aAllow, final boolean aLocalOnly,
+        final String aClassName, final boolean aRegExp)
+    {
+        mAllowed = aAllow;
+        mLocalOnly = aLocalOnly;
+        mRegExp = aRegExp;
+        mPkgName = null;
+        mClassName = aClassName;
+        mExactMatch = true; // not used.
+    }
+
+    /**
+     * Verifies whether a package name be used.
+     * @param aForImport the package to check.
+     * @return a result {@link AccessResult} indicating whether it can be used.
+     */
+    AccessResult verifyImport(final String aForImport)
+    {
+        assert aForImport != null;
+        if (mClassName != null) {
+            final boolean classMatch = mRegExp
+                ? aForImport.matches(mClassName)
+                : aForImport.equals(mClassName);
+            return calculateResult(classMatch);
+        }
+
+        // Must be checking a package. First check that we actually match
+        // the package. Then check if matched and we must be an exact match.
+        // In this case, the text after the first "." must not contain
+        // another "." as this indicates that it is not an exact match.
+        assert mPkgName != null;
+        boolean pkgMatch;
+        if (mRegExp) {
+            pkgMatch = aForImport.matches(mPkgName + "\\..*");
+            if (pkgMatch && mExactMatch) {
+                pkgMatch = !aForImport.matches(mPkgName + "\\..*\\..*");
+            }
+        }
+        else {
+            pkgMatch = aForImport.startsWith(mPkgName + ".");
+            if (pkgMatch && mExactMatch) {
+                pkgMatch = (aForImport.indexOf('.',
+                    (mPkgName.length() + 1)) == -1);
+            }
+        }
+        return calculateResult(pkgMatch);
+    }
+
+    /**
+     * @return returns whether the guard is to only be applied locally.
+     */
+    boolean isLocalOnly()
+    {
+        return mLocalOnly;
+    }
+
+    /**
+     * Returns the appropriate {@link AccessResult} based on whether there
+     * was a match and if the guard is to allow access.
+     * @param aMatched indicates whether there was a match.
+     * @return An appropriate {@link AccessResult}.
+     */
+    private AccessResult calculateResult(final boolean aMatched)
+    {
+        if (aMatched) {
+            return mAllowed ? AccessResult.ALLOWED : AccessResult.DISALLOWED;
+        }
+        return AccessResult.UNKNOWN;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/IllegalImportCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/IllegalImportCheck.java
new file mode 100644
index 0000000..66d3229
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/IllegalImportCheck.java
@@ -0,0 +1,123 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks for imports from a set of illegal packages.
+ * By default, the check rejects all <code>sun.*</code> packages
+ * since programs that contain direct calls to the <code>sun.*</code> packages
+ * are <a href="http://java.sun.com/products/jdk/faq/faq-sun-packages.html">
+ * not 100% Pure Java</a>.
+ * </p>
+ * <p>
+ * To reject other packages, set property illegalPkgs to a comma-separated
+ * list of the illegal packages.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="IllegalImport"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check so that it rejects packages
+ * <code>java.io.*</code> and <code>java.sql.*</code> is
+ * </p>
+ * <pre>
+ * <module name="IllegalImport">
+ *    <property name="illegalPkgs" value="java.io, java.sql"/>
+ * </module>
+ *
+ * Compatible with Java 1.5 source.
+ *
+ * </pre>
+ * @author Oliver Burn
+ * @author Lars K�hne
+ * @version 1.0
+ */
+public class IllegalImportCheck
+    extends Check
+{
+    /** list of illegal packages */
+    private String[] mIllegalPkgs;
+
+    /**
+     * Creates a new <code>IllegalImportCheck</code> instance.
+     */
+    public IllegalImportCheck()
+    {
+        setIllegalPkgs(new String[] {"sun"});
+    }
+
+    /**
+     * Set the list of illegal packages.
+     * @param aFrom array of illegal packages
+     */
+    public void setIllegalPkgs(String[] aFrom)
+    {
+        mIllegalPkgs = aFrom.clone();
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.IMPORT, TokenTypes.STATIC_IMPORT};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final FullIdent imp;
+        if (aAST.getType() == TokenTypes.IMPORT) {
+            imp = FullIdent.createFullIdentBelow(aAST);
+        }
+        else {
+            imp = FullIdent.createFullIdent(
+                aAST.getFirstChild().getNextSibling());
+        }
+        if (isIllegalImport(imp.getText())) {
+            log(aAST.getLineNo(),
+                aAST.getColumnNo(),
+                "import.illegal",
+                imp.getText());
+        }
+    }
+
+    /**
+     * Checks if an import is from a package that must not be used.
+     * @param aImportText the argument of the import keyword
+     * @return if <code>aImportText</code> contains an illegal package prefix
+     */
+    private boolean isIllegalImport(String aImportText)
+    {
+        for (String element : mIllegalPkgs) {
+            if (aImportText.startsWith(element + ".")) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlCheck.java
new file mode 100644
index 0000000..5a76888
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlCheck.java
@@ -0,0 +1,152 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import java.io.File;
+import java.net.URI;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import org.apache.commons.beanutils.ConversionException;
+
+/**
+ * Check that controls what packages can be imported in each package. Useful
+ * for ensuring that application layering is not violated. Ideas on how the
+ * check can be improved include support for:
+ * <ul>
+ * <li>
+ * Change the default policy that if a package being checked does not
+ * match any guards, then it is allowed. Currently defaults to disallowed.
+ * </li>
+ * </ul>
+ *
+ * @author Oliver Burn
+ */
+public class ImportControlCheck extends Check
+{
+    /** The root package controller. */
+    private PkgControl mRoot;
+    /** The package doing the import. */
+    private String mInPkg;
+
+    /**
+     * The package controller for the current file. Used for performance
+     * optimisation.
+     */
+    private PkgControl mCurrentLeaf;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.PACKAGE_DEF, TokenTypes.IMPORT,
+                          TokenTypes.STATIC_IMPORT, };
+    }
+
+    @Override
+    public void beginTree(final DetailAST aRootAST)
+    {
+        mCurrentLeaf = null;
+    }
+
+    @Override
+    public void visitToken(final DetailAST aAST)
+    {
+        if (aAST.getType() == TokenTypes.PACKAGE_DEF) {
+            final DetailAST nameAST = aAST.getLastChild().getPreviousSibling();
+            final FullIdent full = FullIdent.createFullIdent(nameAST);
+            if (mRoot == null) {
+                log(nameAST, "import.control.missing.file");
+            }
+            else {
+                mInPkg = full.getText();
+                mCurrentLeaf = mRoot.locateFinest(mInPkg);
+                if (mCurrentLeaf == null) {
+                    log(nameAST, "import.control.unknown.pkg");
+                }
+            }
+        }
+        else if (mCurrentLeaf != null) {
+            final FullIdent imp;
+            if (aAST.getType() == TokenTypes.IMPORT) {
+                imp = FullIdent.createFullIdentBelow(aAST);
+            }
+            else {
+                // know it is a static import
+                imp = FullIdent.createFullIdent(aAST
+                        .getFirstChild().getNextSibling());
+            }
+            final AccessResult access = mCurrentLeaf.checkAccess(imp.getText(),
+                    mInPkg);
+            if (!AccessResult.ALLOWED.equals(access)) {
+                log(aAST, "import.control.disallowed", imp.getText());
+            }
+        }
+    }
+
+    /**
+     * Set the parameter for the url containing the import control
+     * configuration. It will cause the url to be loaded.
+     * @param aUrl the url of the file to load.
+     * @throws ConversionException on error loading the file.
+     */
+    public void setUrl(final String aUrl)
+    {
+        // Handle empty param
+        if ((aUrl == null) || (aUrl.trim().length() == 0)) {
+            return;
+        }
+        final URI uri;
+        try {
+            uri = URI.create(aUrl);
+        }
+        catch (final IllegalArgumentException ex) {
+            throw new ConversionException("syntax error in url " + aUrl, ex);
+        }
+        try {
+            mRoot = ImportControlLoader.load(uri);
+        }
+        catch (final CheckstyleException ex) {
+            throw new ConversionException("Unable to load " + aUrl, ex);
+        }
+    }
+
+    /**
+     * Set the parameter for the file containing the import control
+     * configuration. It will cause the file to be loaded.
+     * @param aName the name of the file to load.
+     * @throws ConversionException on error loading the file.
+     */
+    public void setFile(final String aName)
+    {
+        // Handle empty param
+        if ((aName == null) || (aName.trim().length() == 0)) {
+            return;
+        }
+
+        try {
+            mRoot = ImportControlLoader.load(new File(aName).toURI());
+        }
+        catch (final CheckstyleException ex) {
+            throw new ConversionException("Unable to load " + aName, ex);
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlLoader.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlLoader.java
new file mode 100644
index 0000000..fac5a45
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlLoader.java
@@ -0,0 +1,208 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import com.puppycrawl.tools.checkstyle.api.AbstractLoader;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.util.HashMap;
+import java.util.Map;
+import javax.xml.parsers.ParserConfigurationException;
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * Responsible for loading the contents of an import control configuration file.
+ * @author Oliver Burn
+ */
+final class ImportControlLoader extends AbstractLoader
+{
+    /** the public ID for the configuration dtd */
+    private static final String DTD_PUBLIC_ID_1_0 =
+        "-//Puppy Crawl//DTD Import Control 1.0//EN";
+
+    /** the public ID for the configuration dtd */
+    private static final String DTD_PUBLIC_ID_1_1 =
+        "-//Puppy Crawl//DTD Import Control 1.1//EN";
+
+    /** the resource for the configuration dtd */
+    private static final String DTD_RESOURCE_NAME_1_0 =
+        "com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_0.dtd";
+
+    /** the resource for the configuration dtd */
+    private static final String DTD_RESOURCE_NAME_1_1 =
+        "com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_1.dtd";
+
+    /** Used to hold the {@link PkgControl} objects. */
+    private final FastStack<PkgControl> mStack = FastStack.newInstance();
+
+    /** the map to lookup the resource name by the id */
+    private static final Map<String, String> DTD_RESOURCE_BY_ID =
+        new HashMap<String, String>();
+
+    /** Initialise the map */
+    static {
+        DTD_RESOURCE_BY_ID.put(DTD_PUBLIC_ID_1_0, DTD_RESOURCE_NAME_1_0);
+        DTD_RESOURCE_BY_ID.put(DTD_PUBLIC_ID_1_1, DTD_RESOURCE_NAME_1_1);
+    }
+    /**
+     * Constructs an instance.
+     * @throws ParserConfigurationException if an error occurs.
+     * @throws SAXException if an error occurs.
+     */
+    private ImportControlLoader() throws ParserConfigurationException,
+            SAXException
+    {
+        super(DTD_RESOURCE_BY_ID);
+    }
+
+    @Override
+    public void startElement(final String aNamespaceURI,
+                             final String aLocalName,
+                             final String aQName,
+                             final Attributes aAtts)
+        throws SAXException
+    {
+        if ("import-control".equals(aQName)) {
+            final String pkg = safeGet(aAtts, "pkg");
+            mStack.push(new PkgControl(pkg));
+        }
+        else if ("subpackage".equals(aQName)) {
+            assert !mStack.isEmpty();
+            final String name = safeGet(aAtts, "name");
+            mStack.push(new PkgControl(mStack.peek(), name));
+        }
+        else if ("allow".equals(aQName) || "disallow".equals(aQName)) {
+            assert !mStack.isEmpty();
+            // Need to handle either "pkg" or "class" attribute.
+            // May have "exact-match" for "pkg"
+            // May have "local-only"
+            final boolean isAllow = "allow".equals(aQName);
+            final boolean isLocalOnly = (aAtts.getValue("local-only") != null);
+            final String pkg = aAtts.getValue("pkg");
+            final boolean regex = (aAtts.getValue("regex") != null);
+            final Guard g;
+            if (pkg != null) {
+                final boolean exactMatch =
+                    (aAtts.getValue("exact-match") != null);
+                g = new Guard(isAllow, isLocalOnly, pkg, exactMatch, regex);
+            }
+            else {
+                // handle class names which can be normal class names or regular
+                // expressions
+                final String clazz = safeGet(aAtts, "class");
+                g = new Guard(isAllow, isLocalOnly, clazz, regex);
+            }
+
+            final PkgControl pc = mStack.peek();
+            pc.addGuard(g);
+        }
+    }
+
+    @Override
+    public void endElement(final String aNamespaceURI, final String aLocalName,
+        final String aQName)
+    {
+        if ("subpackage".equals(aQName)) {
+            assert mStack.size() > 1;
+            mStack.pop();
+        }
+    }
+
+    /**
+     * Loads the import control file from a file.
+     * @param aUri the uri of the file to load.
+     * @return the root {@link PkgControl} object.
+     * @throws CheckstyleException if an error occurs.
+     */
+    static PkgControl load(final URI aUri) throws CheckstyleException
+    {
+        InputStream is = null;
+        try {
+            is = aUri.toURL().openStream();
+        }
+        catch (final MalformedURLException e) {
+            throw new CheckstyleException("syntax error in url " + aUri, e);
+        }
+        catch (final IOException e) {
+            throw new CheckstyleException("unable to find " + aUri, e);
+        }
+        final InputSource source = new InputSource(is);
+        return load(source, aUri);
+    }
+
+    /**
+     * Loads the import control file from a {@link InputSource}.
+     * @param aSource the source to load from.
+     * @param aUri uri of the source being loaded.
+     * @return the root {@link PkgControl} object.
+     * @throws CheckstyleException if an error occurs.
+     */
+    private static PkgControl load(final InputSource aSource,
+        final URI aUri) throws CheckstyleException
+    {
+        try {
+            final ImportControlLoader loader = new ImportControlLoader();
+            loader.parseInputSource(aSource);
+            return loader.getRoot();
+        }
+        catch (final ParserConfigurationException e) {
+            throw new CheckstyleException("unable to parse " + aUri, e);
+        }
+        catch (final SAXException e) {
+            throw new CheckstyleException("unable to parse " + aUri
+                    + " - " + e.getMessage(), e);
+        }
+        catch (final IOException e) {
+            throw new CheckstyleException("unable to read " + aUri, e);
+        }
+    }
+
+    /**
+     * @return the root {@link PkgControl} object loaded.
+     */
+    private PkgControl getRoot()
+    {
+        assert mStack.size() == 1;
+        return mStack.peek();
+    }
+
+    /**
+     * Utility to safely get an attribute. If it does not exist an exception
+     * is thrown.
+     * @param aAtts collect to get attribute from.
+     * @param aName name of the attribute to get.
+     * @return the value of the attribute.
+     * @throws SAXException if the attribute does not exist.
+     */
+    private String safeGet(final Attributes aAtts, final String aName)
+        throws SAXException
+    {
+        final String retVal = aAtts.getValue(aName);
+        if (retVal == null) {
+            throw new SAXException("missing attribute " + aName);
+        }
+        return retVal;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheck.java
new file mode 100644
index 0000000..de82892
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheck.java
@@ -0,0 +1,404 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.AbstractOptionCheck;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * <ul>
+ * <li>groups imports: ensures that groups of imports come in a specific order
+ * (e.g., java. comes first, javax. comes second, then everything else)</li>
+ * <li>adds a separation between groups : ensures that a blank line sit between
+ * each group</li>
+ * <li>sorts imports inside each group: ensures that imports within each group
+ * are in lexicographic order</li>
+ * <li>sorts according to case: ensures that the comparison between import is
+ * case sensitive</li>
+ * <li>groups static imports: ensures that static imports are at the top (or the
+ * bottom) of all the imports, or above (or under) each group, or are treated
+ * like non static imports (@see {@link ImportOrderOption}</li>
+ * </ul>
+ *
+ * <p>
+ * Example:
+ * </p>
+ *
+ * <pre>
+ *  <module name="ImportOrder">
+ *    <property name="groups" value="java,javax"/>
+ *    <property name="ordered" value="true"/>
+ *    <property name="caseSensitive" value="false"/>
+ *    <property name="option" value="above"/>
+ *  </module>
+ * </pre>
+ *
+ * <p>
+ * Group descriptions enclosed in slashes are interpreted as regular
+ * expressions. If multiple groups match, the one matching a longer
+ * substring of the imported name will take precedence, with ties
+ * broken first in favor of earlier matches and finally in favor of
+ * the first matching group.
+ * </p>
+ *
+ * <p>
+ * There is always a wildcard group to which everything not in a named group
+ * belongs. If an import does not match a named group, the group belongs to
+ * this wildcard group. The wildcard group position can be specified using the
+ * {@code *} character.
+ * </p>
+ *
+ * <p>
+ * Defaults:
+ * </p>
+ * <ul>
+ * <li>import groups: none</li>
+ * <li>separation: false</li>
+ * <li>ordered: true</li>
+ * <li>case sensitive: true</li>
+ * <li>static import: under</li>
+ * </ul>
+ *
+ * <p>
+ * Compatible with Java 1.5 source.
+ * </p>
+ *
+ * @author Bill Schneider
+ * @author o_sukhodolsky
+ * @author David DIDIER
+ * @author Steve McKay
+ */
+public class ImportOrderCheck
+    extends AbstractOptionCheck<ImportOrderOption>
+{
+
+    /** the special wildcard that catches all remaining groups. */
+    private static final String WILDCARD_GROUP_NAME = "*";
+
+    /** List of import groups specified by the user. */
+    private Pattern[] mGroups = new Pattern[0];
+    /** Require imports in group be separated. */
+    private boolean mSeparated;
+    /** Require imports in group. */
+    private boolean mOrdered = true;
+    /** Should comparison be case sensitive. */
+    private boolean mCaseSensitive = true;
+
+    /** Last imported group. */
+    private int mLastGroup;
+    /** Line number of last import. */
+    private int mLastImportLine;
+    /** Name of last import. */
+    private String mLastImport;
+    /** If last import was static. */
+    private boolean mLastImportStatic;
+    /** Whether there was any imports. */
+    private boolean mBeforeFirstImport;
+
+    /**
+     * Groups static imports under each group.
+     */
+    public ImportOrderCheck()
+    {
+        super(ImportOrderOption.UNDER, ImportOrderOption.class);
+    }
+
+    /**
+     * Sets the list of package groups and the order they should occur in the
+     * file.
+     *
+     * @param aGroups a comma-separated list of package names/prefixes.
+     */
+    public void setGroups(String[] aGroups)
+    {
+        mGroups = new Pattern[aGroups.length];
+
+        for (int i = 0; i < aGroups.length; i++) {
+            String pkg = aGroups[i];
+            Pattern grp;
+
+            // if the pkg name is the wildcard, make it match zero chars
+            // from any name, so it will always be used as last resort.
+            if (WILDCARD_GROUP_NAME.equals(pkg)) {
+                grp = Pattern.compile(""); // matches any package
+            }
+            else if (pkg.startsWith("/")) {
+                if (!pkg.endsWith("/")) {
+                    throw new IllegalArgumentException("Invalid group");
+                }
+                pkg = pkg.substring(1, pkg.length() - 1);
+                grp = Pattern.compile(pkg);
+            }
+            else {
+                if (!pkg.endsWith(".")) {
+                    pkg = pkg + ".";
+                }
+                grp = Pattern.compile("^" + Pattern.quote(pkg));
+            }
+
+            mGroups[i] = grp;
+        }
+    }
+
+    /**
+     * Sets whether or not imports should be ordered within any one group of
+     * imports.
+     *
+     * @param aOrdered
+     *            whether lexicographic ordering of imports within a group
+     *            required or not.
+     */
+    public void setOrdered(boolean aOrdered)
+    {
+        mOrdered = aOrdered;
+    }
+
+    /**
+     * Sets whether or not groups of imports must be separated from one another
+     * by at least one blank line.
+     *
+     * @param aSeparated
+     *            whether groups should be separated by oen blank line.
+     */
+    public void setSeparated(boolean aSeparated)
+    {
+        mSeparated = aSeparated;
+    }
+
+    /**
+     * Sets whether string comparison should be case sensitive or not.
+     *
+     * @param aCaseSensitive
+     *            whether string comparison should be case sensitive.
+     */
+    public void setCaseSensitive(boolean aCaseSensitive)
+    {
+        mCaseSensitive = aCaseSensitive;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.IMPORT, TokenTypes.STATIC_IMPORT};
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        mLastGroup = Integer.MIN_VALUE;
+        mLastImportLine = Integer.MIN_VALUE;
+        mLastImport = "";
+        mLastImportStatic = false;
+        mBeforeFirstImport = true;
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final FullIdent ident;
+        final boolean isStatic;
+
+        if (aAST.getType() == TokenTypes.IMPORT) {
+            ident = FullIdent.createFullIdentBelow(aAST);
+            isStatic = false;
+        }
+        else {
+            ident = FullIdent.createFullIdent(aAST.getFirstChild()
+                    .getNextSibling());
+            isStatic = true;
+        }
+
+        switch (getAbstractOption()) {
+        case TOP:
+            if (!isStatic && mLastImportStatic) {
+                mLastGroup = Integer.MIN_VALUE;
+                mLastImport = "";
+            }
+            // no break;
+
+        case ABOVE:
+            // previous non-static but current is static
+            doVisitToken(ident, isStatic, (!mLastImportStatic && isStatic));
+            break;
+
+        case INFLOW:
+            // previous argument is useless here
+            doVisitToken(ident, isStatic, true);
+            break;
+
+        case BOTTOM:
+            if (isStatic && !mLastImportStatic) {
+                mLastGroup = Integer.MIN_VALUE;
+                mLastImport = "";
+            }
+            // no break;
+
+        case UNDER:
+            // previous static but current is non-static
+            doVisitToken(ident, isStatic, (mLastImportStatic && !isStatic));
+            break;
+
+        default:
+            break;
+        }
+
+        mLastImportLine = aAST.findFirstToken(TokenTypes.SEMI).getLineNo();
+        mLastImportStatic = isStatic;
+        mBeforeFirstImport = false;
+    }
+
+    /**
+     * Shares processing...
+     *
+     * @param aIdent the import to process.
+     * @param aIsStatic whether the token is static or not.
+     * @param aPrevious previous non-static but current is static (above), or
+     *                  previous static but current is non-static (under).
+     */
+    private void doVisitToken(FullIdent aIdent, boolean aIsStatic,
+            boolean aPrevious)
+    {
+        if (aIdent != null) {
+            final String name = aIdent.getText();
+            final int groupIdx = getGroupNumber(name);
+            final int line = aIdent.getLineNo();
+
+            if (groupIdx > mLastGroup) {
+                if (!mBeforeFirstImport && mSeparated) {
+                    // This check should be made more robust to handle
+                    // comments and imports that span more than one line.
+                    if ((line - mLastImportLine) < 2) {
+                        log(line, "import.separation", name);
+                    }
+                }
+            }
+            else if (groupIdx == mLastGroup) {
+                doVisitTokenInSameGroup(aIsStatic, aPrevious, name, line);
+            }
+            else {
+                log(line, "import.ordering", name);
+            }
+
+            mLastGroup = groupIdx;
+            mLastImport = name;
+        }
+    }
+
+    /**
+     * Shares processing...
+     *
+     * @param aIsStatic whether the token is static or not.
+     * @param aPrevious previous non-static but current is static (above), or
+     *    previous static but current is non-static (under).
+     * @param aName the name of the current import.
+     * @param aLine the line of the current import.
+     */
+    private void doVisitTokenInSameGroup(boolean aIsStatic,
+            boolean aPrevious, String aName, int aLine)
+    {
+        if (!mOrdered) {
+            return;
+        }
+
+        if (getAbstractOption().equals(ImportOrderOption.INFLOW)) {
+            // out of lexicographic order
+            if (compare(mLastImport, aName, mCaseSensitive) > 0) {
+                log(aLine, "import.ordering", aName);
+            }
+        }
+        else {
+            final boolean shouldFireError =
+                // current and previous static or current and
+                // previous non-static
+                (!(mLastImportStatic ^ aIsStatic)
+                &&
+                // and out of lexicographic order
+                (compare(mLastImport, aName, mCaseSensitive) > 0))
+                ||
+                // previous non-static but current is static (above)
+                // or
+                // previous static but current is non-static (under)
+                aPrevious;
+
+            if (shouldFireError) {
+                log(aLine, "import.ordering", aName);
+            }
+        }
+    }
+
+    /**
+     * Finds out what group the specified import belongs to.
+     *
+     * @param aName the import name to find.
+     * @return group number for given import name.
+     */
+    private int getGroupNumber(String aName)
+    {
+        int bestIndex = mGroups.length;
+        int bestLength = -1;
+        int bestPos = 0;
+
+        // find out what group this belongs in
+        // loop over mGroups and get index
+        for (int i = 0; i < mGroups.length; i++) {
+            final Matcher matcher = mGroups[i].matcher(aName);
+            while (matcher.find()) {
+                final int length = matcher.end() - matcher.start();
+                if ((length > bestLength)
+                    || ((length == bestLength) && (matcher.start() < bestPos)))
+                {
+                    bestIndex = i;
+                    bestLength = length;
+                    bestPos = matcher.start();
+                }
+            }
+        }
+
+        return bestIndex;
+    }
+
+    /**
+     * Compares two strings.
+     *
+     * @param aString1
+     *            the first string.
+     * @param aString2
+     *            the second string.
+     * @param aCaseSensitive
+     *            whether the comparison is case sensitive.
+     * @return the value <code>0</code> if string1 is equal to string2; a value
+     *         less than <code>0</code> if string1 is lexicographically less
+     *         than the string2; and a value greater than <code>0</code> if
+     *         string1 is lexicographically greater than string2.
+     */
+    private int compare(String aString1, String aString2,
+            boolean aCaseSensitive)
+    {
+        if (aCaseSensitive) {
+            return aString1.compareTo(aString2);
+        }
+
+        return aString1.compareToIgnoreCase(aString2);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderOption.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderOption.java
new file mode 100644
index 0000000..df1fc00
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderOption.java
@@ -0,0 +1,106 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+/**
+ * Represents the policy for checking import order statements.
+ * @see com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck
+ * @author David DIDIER
+ */
+public enum ImportOrderOption
+{
+    /**
+     * Represents the policy that static imports are all at the top.
+     * For example:
+     *
+     * <pre>
+        import static java.awt.Button.ABORT;
+        import static java.io.File.createTempFile;
+        import static javax.swing.WindowConstants.*;
+
+        import java.awt.Button;
+        import java.awt.event.ActionEvent;
+     * </pre>
+     */
+    TOP,
+
+    /**
+     * Represents the policy that static imports are above the local group.
+     * For example:
+     *
+     * <pre>
+        import static java.awt.Button.A;
+        import static javax.swing.WindowConstants.*;
+        import java.awt.Dialog;
+        import javax.swing.JComponent;
+
+        import static java.io.File.createTempFile;
+        import java.io.File;
+        import java.io.IOException;
+     * </pre>
+     */
+    ABOVE,
+
+    /**
+     * Represents the policy that static imports are processed like non static
+     * imports. For example:
+     *
+     * <pre>
+        import java.awt.Button;
+        import static java.awt.Button.ABORT;
+        import java.awt.Dialog;
+
+        import static javax.swing.WindowConstants.HIDE_ON_CLOSE;
+        import javax.swing.JComponent;
+     * </pre>
+     */
+    INFLOW,
+
+    /**
+     * Represents the policy that static imports are under the local group.
+     * For example:
+     *
+     * <pre>
+        import java.awt.Dialog;
+        import javax.swing.JComponent;
+        import static java.awt.Button.A;
+        import static javax.swing.WindowConstants.*;
+
+        import java.io.File;
+        import java.io.IOException;
+        import static java.io.File.createTempFile;
+     * </pre>
+     */
+    UNDER,
+
+    /**
+     * Represents the policy that static imports are all at the bottom.
+     * For example:
+     *
+     * <pre>
+        import java.awt.Button;
+        import java.awt.event.ActionEvent;
+
+        import static java.awt.Button.ABORT;
+        import static java.io.File.createTempFile;
+        import static javax.swing.WindowConstants.*;
+     * </pre>
+     */
+    BOTTOM;
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgControl.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgControl.java
new file mode 100644
index 0000000..5715bf5
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgControl.java
@@ -0,0 +1,157 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import com.google.common.collect.Lists;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * Represents the a tree of guards for controlling whether packages are allowed
+ * to be used. Each instance must have a single parent or be the root node.
+ * Each instance may have zero or more children.
+ *
+ * @author Oliver Burn
+ */
+class PkgControl
+{
+    /** List of {@link Guard} objects to check. */
+    private final LinkedList<Guard> mGuards = Lists.newLinkedList();
+    /** List of children {@link PkgControl} objects. */
+    private final List<PkgControl> mChildren = Lists.newArrayList();
+    /** The parent. Null indicates we are the root node. */
+    private final PkgControl mParent;
+    /** The full package name for the node. */
+    private final String mFullPackage;
+
+    /**
+     * Construct a root node.
+     * @param aPkgName the name of the package.
+     */
+    PkgControl(final String aPkgName)
+    {
+        assert aPkgName != null;
+        mParent = null;
+        mFullPackage = aPkgName;
+    }
+
+    /**
+     * Construct a child node.
+     * @param aParent the parent node.
+     * @param aSubPkg the sub package name.
+     */
+    PkgControl(final PkgControl aParent, final String aSubPkg)
+    {
+        assert aParent != null;
+        assert aSubPkg != null;
+        mParent = aParent;
+        mFullPackage = aParent.getFullPackage() + "." + aSubPkg;
+        mParent.mChildren.add(this);
+    }
+
+    /**
+     * Adds a guard to the node.
+     * @param aThug the guard to be added.
+     */
+    void addGuard(final Guard aThug)
+    {
+        mGuards.addFirst(aThug);
+    }
+
+    /**
+     * @return the full package name represented by the node.
+     */
+    String getFullPackage()
+    {
+        return mFullPackage;
+    }
+
+    /**
+     * Search down the tree to locate the finest match for a supplied package.
+     * @param aForPkg the package to search for.
+     * @return the finest match, or null if no match at all.
+     */
+    PkgControl locateFinest(final String aForPkg)
+    {
+        // Check if we are a match.
+        // This algormithm should be improved to check for a trailing "."
+        // or nothing following.
+        if (!aForPkg.startsWith(getFullPackage())) {
+            return null;
+        }
+
+        // Check if any of the children match.
+        for (PkgControl pc : mChildren) {
+            final PkgControl match = pc.locateFinest(aForPkg);
+            if (match != null) {
+                return match;
+            }
+        }
+
+        // No match so I am the best there is.
+        return this;
+    }
+
+    /**
+     * Returns whether a package is allowed to be used. The algorithm checks
+     * with the current node for a result, and if none is found then calls
+     * its parent looking for a match. This will recurse looking for match.
+     * If there is no clear result then {@link AccessResult#UNKNOWN} is
+     * returned.
+     * @param aForImport the package to check on.
+     * @param aInPkg the package doing the import.
+     * @return an {@link AccessResult}.
+     */
+    AccessResult checkAccess(final String aForImport, final String aInPkg)
+    {
+        final AccessResult retVal = localCheckAccess(aForImport, aInPkg);
+        if (retVal != AccessResult.UNKNOWN) {
+            return retVal;
+        }
+        else if (mParent == null) {
+            // we are the top, so default to not allowed.
+            return AccessResult.DISALLOWED;
+        }
+
+        return mParent.checkAccess(aForImport, aInPkg);
+    }
+
+    /**
+     * Checks whether any of the guards for this node control access to
+     * a specified package.
+     * @param aForImport the package to check.
+     * @param aInPkg the package doing the import.
+     * @return an {@link AccessResult}.
+     */
+    private AccessResult localCheckAccess(final String aForImport,
+        final String aInPkg)
+    {
+        for (Guard g : mGuards) {
+            // Check if a Guard is only meant to be applied locally.
+            if (g.isLocalOnly() && !mFullPackage.equals(aInPkg)) {
+                continue;
+            }
+            final AccessResult result = g.verifyImport(aForImport);
+            if (result != AccessResult.UNKNOWN) {
+                return result;
+            }
+        }
+        return AccessResult.UNKNOWN;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/RedundantImportCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/RedundantImportCheck.java
new file mode 100644
index 0000000..2ff8a93
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/RedundantImportCheck.java
@@ -0,0 +1,147 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import java.util.Set;
+
+/**
+ * <p>
+ * Checks for imports that are redundant. An import statement is
+ * considered redundant if:
+ * </p>
+ *<ul>
+ *  <li>It is a duplicate of another import. This is, when a class is imported
+ *  more than once.</li>
+ *  <li>The class non-statically imported is from the <code>java.lang</code>
+ *  package. For example importing <code>java.lang.String</code>.</li>
+ *  <li>The class non-statically imported is from the same package as the
+ *  current package.</li>
+ *</ul>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="RedundantImport"/>
+ * </pre>
+ *
+ * Compatible with Java 1.5 source.
+ *
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public class RedundantImportCheck
+    extends Check
+{
+    /** name of package in file */
+    private String mPkgName;
+    /** set of the imports */
+    private final Set<FullIdent> mImports = Sets.newHashSet();
+    /** set of static imports */
+    private final Set<FullIdent> mStaticImports = Sets.newHashSet();
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        mPkgName = null;
+        mImports.clear();
+        mStaticImports.clear();
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[]
+        {TokenTypes.IMPORT,
+         TokenTypes.STATIC_IMPORT,
+         TokenTypes.PACKAGE_DEF, };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (aAST.getType() == TokenTypes.PACKAGE_DEF) {
+            mPkgName = FullIdent.createFullIdent(
+                    aAST.getLastChild().getPreviousSibling()).getText();
+        }
+        else if (aAST.getType() == TokenTypes.IMPORT) {
+            final FullIdent imp = FullIdent.createFullIdentBelow(aAST);
+            if (fromPackage(imp.getText(), "java.lang")) {
+                log(aAST.getLineNo(), aAST.getColumnNo(), "import.lang",
+                    imp.getText());
+            }
+            else if (fromPackage(imp.getText(), mPkgName)) {
+                log(aAST.getLineNo(), aAST.getColumnNo(), "import.same",
+                    imp.getText());
+            }
+            // Check for a duplicate import
+            for (FullIdent full : mImports) {
+                if (imp.getText().equals(full.getText())) {
+                    log(aAST.getLineNo(), aAST.getColumnNo(),
+                            "import.duplicate", full.getLineNo(),
+                            imp.getText());
+                }
+            }
+
+            mImports.add(imp);
+        }
+        else {
+            // Check for a duplicate static import
+            final FullIdent imp =
+                FullIdent.createFullIdent(
+                    aAST.getLastChild().getPreviousSibling());
+            for (FullIdent full : mStaticImports) {
+                if (imp.getText().equals(full.getText())) {
+                    log(aAST.getLineNo(), aAST.getColumnNo(),
+                        "import.duplicate", full.getLineNo(), imp.getText());
+                }
+            }
+
+            mStaticImports.add(imp);
+        }
+    }
+
+    /**
+     * Determines if an import statement is for types from a specified package.
+     * @param aImport the import name
+     * @param aPkg the package name
+     * @return whether from the package
+     */
+    private static boolean fromPackage(String aImport, String aPkg)
+    {
+        boolean retVal = false;
+        if (aPkg == null) {
+            // If not package, then check for no package in the import.
+            retVal = (aImport.indexOf('.') == -1);
+        }
+        else {
+            final int index = aImport.lastIndexOf('.');
+            if (index != -1) {
+                final String front = aImport.substring(0, index);
+                retVal = front.equals(aPkg);
+            }
+        }
+        return retVal;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheck.java
new file mode 100644
index 0000000..482e0eb
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheck.java
@@ -0,0 +1,288 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FileContents;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TextBlock;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTag;
+import com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocUtils;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * <p>
+ * Checks for unused import statements.
+ * </p>
+ *  <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="UnusedImports"/>
+ * </pre>
+ *
+ * Compatible with Java 1.5 source.
+ *
+ * @author Oliver Burn
+ */
+public class UnusedImportsCheck extends Check
+{
+    /** regex to match class names. */
+    private static final Pattern CLASS_NAME = Pattern.compile(
+           "((:?[\\p{L}_$][\\p{L}\\p{N}_$]*\\.)*[\\p{L}_$][\\p{L}\\p{N}_$]*)");
+    /** regex to match the first class name. */
+    private static final Pattern FIRST_CLASS_NAME = Pattern.compile(
+           "^" + CLASS_NAME);
+    /** regex to match argument names. */
+    private static final Pattern ARGUMENT_NAME = Pattern.compile(
+           "[(,]\\s*" + CLASS_NAME.pattern());
+
+    /** flag to indicate when time to start collecting references. */
+    private boolean mCollect;
+    /** flag whether to process Javadoc comments. */
+    private boolean mProcessJavadoc;
+
+    /** set of the imports. */
+    private final Set<FullIdent> mImports = Sets.newHashSet();
+
+    /** set of references - possibly to imports or other things. */
+    private final Set<String> mReferenced = Sets.newHashSet();
+
+    /** Default constructor. */
+    public UnusedImportsCheck()
+    {
+    }
+
+    public void setProcessJavadoc(boolean aValue)
+    {
+        mProcessJavadoc = aValue;
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        mCollect = false;
+        mImports.clear();
+        mReferenced.clear();
+    }
+
+    @Override
+    public void finishTree(DetailAST aRootAST)
+    {
+        // loop over all the imports to see if referenced.
+        for (final FullIdent imp : mImports) {
+            if (!mReferenced.contains(Utils.baseClassname(imp.getText()))) {
+                log(imp.getLineNo(),
+                    imp.getColumnNo(),
+                    "import.unused", imp.getText());
+            }
+        }
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.IDENT,
+            TokenTypes.IMPORT,
+            TokenTypes.STATIC_IMPORT,
+            // Definitions that may contain Javadoc...
+            TokenTypes.PACKAGE_DEF,
+            TokenTypes.ANNOTATION_DEF,
+            TokenTypes.ANNOTATION_FIELD_DEF,
+            TokenTypes.ENUM_DEF,
+            TokenTypes.ENUM_CONSTANT_DEF,
+            TokenTypes.CLASS_DEF,
+            TokenTypes.INTERFACE_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.CTOR_DEF,
+            TokenTypes.VARIABLE_DEF,
+        };
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (aAST.getType() == TokenTypes.IDENT) {
+            if (mCollect) {
+                processIdent(aAST);
+            }
+        }
+        else if (aAST.getType() == TokenTypes.IMPORT) {
+            processImport(aAST);
+        }
+        else if (aAST.getType() == TokenTypes.STATIC_IMPORT) {
+            processStaticImport(aAST);
+        }
+        else {
+            mCollect = true;
+            if (mProcessJavadoc) {
+                processJavadoc(aAST);
+            }
+        }
+    }
+
+    /**
+     * Collects references made by IDENT.
+     * @param aAST the IDENT node to process
+     */
+    private void processIdent(DetailAST aAST)
+    {
+        final DetailAST parent = aAST.getParent();
+        final int parentType = parent.getType();
+        if (((parentType != TokenTypes.DOT)
+            && (parentType != TokenTypes.METHOD_DEF))
+            || ((parentType == TokenTypes.DOT)
+                && (aAST.getNextSibling() != null)))
+        {
+            mReferenced.add(aAST.getText());
+        }
+    }
+
+    /**
+     * Collects the details of imports.
+     * @param aAST node containing the import details
+     */
+    private void processImport(DetailAST aAST)
+    {
+        final FullIdent name = FullIdent.createFullIdentBelow(aAST);
+        if ((name != null) && !name.getText().endsWith(".*")) {
+            mImports.add(name);
+        }
+    }
+
+    /**
+     * Collects the details of static imports.
+     * @param aAST node containing the static import details
+     */
+    private void processStaticImport(DetailAST aAST)
+    {
+        final FullIdent name =
+            FullIdent.createFullIdent(
+                aAST.getFirstChild().getNextSibling());
+        if ((name != null) && !name.getText().endsWith(".*")) {
+            mImports.add(name);
+        }
+    }
+
+    /**
+     * Collects references made in JavaDoc comments.
+     * @param aAST node to inspect for JavaDoc
+     */
+    private void processJavadoc(DetailAST aAST)
+    {
+        final FileContents contents = getFileContents();
+        final int lineNo = aAST.getLineNo();
+        final TextBlock cmt = contents.getJavadocBefore(lineNo);
+        if (cmt != null) {
+            mReferenced.addAll(processJavadoc(cmt));
+        }
+    }
+
+    /**
+     * Process a javadoc {@link TextBlock} and return the set of classes
+     * referenced within.
+     * @param aCmt The javadoc block to parse
+     * @return a set of classes referenced in the javadoc block
+     */
+    private Set<String> processJavadoc(TextBlock aCmt)
+    {
+        final Set<String> references = new HashSet<String>();
+        // process all the @link type tags
+        // INLINEs inside BLOCKs get hidden when using ALL
+        for (final JavadocTag tag
+                : getValidTags(aCmt, JavadocUtils.JavadocTagType.INLINE))
+        {
+            if (tag.canReferenceImports()) {
+                references.addAll(processJavadocTag(tag));
+            }
+        }
+        // process all the @throws type tags
+        for (final JavadocTag tag
+                : getValidTags(aCmt, JavadocUtils.JavadocTagType.BLOCK))
+        {
+            if (tag.canReferenceImports()) {
+                references.addAll(
+                        matchPattern(tag.getArg1(), FIRST_CLASS_NAME));
+            }
+        }
+        return references;
+    }
+
+    /**
+     * Returns the list of valid tags found in a javadoc {@link TextBlock}
+     * @param aCmt The javadoc block to parse
+     * @param aTagType The type of tags we're interested in
+     * @return the list of tags
+     */
+    private List<JavadocTag> getValidTags(TextBlock aCmt,
+            JavadocUtils.JavadocTagType aTagType)
+    {
+        return JavadocUtils.getJavadocTags(aCmt, aTagType).getValidTags();
+    }
+
+    /**
+     * Returns a list of references found in a javadoc {@link JavadocTag}
+     * @param aTag The javadoc tag to parse
+     * @return A list of references found in this tag
+     */
+    private Set<String> processJavadocTag(JavadocTag aTag)
+    {
+        final Set<String> references = new HashSet<String>();
+        final String identifier = aTag.getArg1().trim();
+        for (Pattern pattern : new Pattern[]
+        {FIRST_CLASS_NAME, ARGUMENT_NAME})
+        {
+            references.addAll(matchPattern(identifier, pattern));
+        }
+        return references;
+    }
+
+    /**
+     * Extracts a list of texts matching a {@link Pattern} from a
+     * {@link String}.
+     * @param aIdentifier The String to match the pattern against
+     * @param aPattern The Pattern used to extract the texts
+     * @return A list of texts which matched the pattern
+     */
+    private Set<String> matchPattern(String aIdentifier, Pattern aPattern)
+    {
+        final Set<String> references = new HashSet<String>();
+        final Matcher matcher = aPattern.matcher(aIdentifier);
+        while (matcher.find()) {
+            references.add(matcher.group(1));
+        }
+        return references;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/package-info.java
new file mode 100644
index 0000000..6297f9f
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/package-info.java
@@ -0,0 +1,24 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the <span class="xdocspagetitle">Imports</span> checks that are
+ * bundled with the main distribution.
+ */
+package com.puppycrawl.tools.checkstyle.checks.imports;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ArrayInitHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ArrayInitHandler.java
new file mode 100644
index 0000000..4f49e73
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ArrayInitHandler.java
@@ -0,0 +1,157 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for array initialization blocks.
+ *
+ * @author jrichard
+ */
+public class ArrayInitHandler extends BlockParentHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public ArrayInitHandler(IndentationCheck aIndentCheck,
+        DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "array initialization", aAst, aParent);
+    }
+
+    @Override
+    protected IndentLevel getLevelImpl()
+    {
+        final DetailAST parentAST = getMainAst().getParent();
+        final int type = parentAST.getType();
+        if ((type == TokenTypes.LITERAL_NEW) || (type == TokenTypes.ASSIGN)) {
+            // note: assumes new or assignment is line to align with
+            return new IndentLevel(getLineStart(parentAST));
+        }
+        else if (getParent() instanceof ArrayInitHandler) {
+            return ((ArrayInitHandler) getParent()).getChildrenExpectedLevel();
+        }
+        else {
+            return getParent().getLevel();
+        }
+    }
+
+    @Override
+    protected DetailAST getToplevelAST()
+    {
+        return null;
+    }
+
+    @Override
+    protected DetailAST getLCurly()
+    {
+        return getMainAst();
+    }
+
+    @Override
+    protected IndentLevel curlyLevel()
+    {
+        final IndentLevel level = new IndentLevel(getLevel(), getBraceAdjustement());
+        level.addAcceptedIndent(level.getLastIndentLevel() + getLineWrappingIndent());
+        return level;
+    }
+
+    @Override
+    protected DetailAST getRCurly()
+    {
+        return getMainAst().findFirstToken(TokenTypes.RCURLY);
+    }
+
+    @Override
+    protected boolean rcurlyMustStart()
+    {
+        return false;
+    }
+
+    @Override
+    protected boolean childrenMayNest()
+    {
+        return true;
+    }
+
+    @Override
+    protected DetailAST getListChild()
+    {
+        return getMainAst();
+    }
+
+    @Override
+    protected IndentLevel getChildrenExpectedLevel()
+    {
+        final IndentLevel expectedIndent =
+            new IndentLevel(getLevel(), getIndentCheck().getArrayInitIndent(),
+                    getIndentCheck().getLineWrappingIndentation());
+
+        final int firstLine = getFirstLine(Integer.MAX_VALUE, getListChild());
+        if (hasCurlys() && (firstLine == getLCurly().getLineNo())) {
+            final int lcurlyPos = expandedTabsColumnNo(getLCurly());
+            final int firstChildPos =
+                getNextFirstNonblankOnLineAfter(firstLine, lcurlyPos);
+            if (firstChildPos >= 0) {
+                expectedIndent.addAcceptedIndent(firstChildPos);
+                expectedIndent.addAcceptedIndent(lcurlyPos + getLineWrappingIndent());
+            }
+        }
+        return expectedIndent;
+    }
+
+    /**
+     * @param aLineNo   number of line on which we search
+     * @param aColumnNo number of column after which we search
+     *
+     * @return column number of first non-blank char after
+     *         specified column on specified line or -1 if
+     *         such char doesn't exist.
+     */
+    private int getNextFirstNonblankOnLineAfter(int aLineNo, int aColumnNo)
+    {
+        int columnNo = aColumnNo + 1;
+        final String line = getIndentCheck().getLines()[aLineNo - 1];
+        final int lineLength = line.length();
+        while ((columnNo < lineLength)
+               && Character.isWhitespace(line.charAt(columnNo)))
+        {
+            columnNo++;
+        }
+
+        return (columnNo == lineLength) ? -1 : columnNo;
+    }
+
+    /**
+     * A shortcut for <code>IndentationCheck</code> property.
+     * @return value of lineWrappingIndentation property
+     *         of <code>IndentationCheck</code>
+     */
+    private int getLineWrappingIndent()
+    {
+        return getIndentCheck().getLineWrappingIndentation();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/BlockParentHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/BlockParentHandler.java
new file mode 100644
index 0000000..4cfba37
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/BlockParentHandler.java
@@ -0,0 +1,356 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for parents of blocks ('if', 'else', 'while', etc).
+ * <P>
+ * The "block" handler classes use a common superclass BlockParentHandler,
+ * employing the Template Method pattern.
+ * </P>
+ *
+ * <UL>
+ *   <LI>template method to get the lcurly</LI>
+ *   <LI>template method to get the rcurly</LI>
+ *   <LI>if curlys aren't present, then template method to get expressions
+ *       is called</LI>
+ *   <LI>now all the repetitous code which checks for BOL, if curlys are on
+ *       same line, etc. can be collapsed into  the superclass</LI>
+ * </UL>
+ *
+ *
+ * @author jrichard
+ */
+public class BlockParentHandler extends ExpressionHandler
+{
+    /**
+     * Children checked by parent handlers.
+     */
+    private static final int[] CHECKED_CHILDREN = new int[] {
+        TokenTypes.VARIABLE_DEF,
+        TokenTypes.EXPR,
+        TokenTypes.OBJBLOCK,
+        TokenTypes.LITERAL_BREAK,
+        TokenTypes.LITERAL_RETURN,
+        TokenTypes.LITERAL_THROW,
+        TokenTypes.LITERAL_CONTINUE,
+    };
+
+    /**
+     * Returns array of token types which should be checked among childrens.
+     * @return array of token types to check.
+     */
+    protected int[] getCheckedChildren()
+    {
+        return CHECKED_CHILDREN;
+    }
+
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * name, abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aName          the name of the handler
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public BlockParentHandler(IndentationCheck aIndentCheck,
+        String aName, DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, aName, aAst, aParent);
+    }
+
+    /**
+     * Get the top level expression being managed by this handler.
+     *
+     * @return the top level expression
+     */
+    protected DetailAST getToplevelAST()
+    {
+        return getMainAst();
+    }
+
+    /**
+     * Check the indent of the top level token.
+     */
+    protected void checkToplevelToken()
+    {
+        final DetailAST toplevel = getToplevelAST();
+
+        if ((toplevel == null)
+            || getLevel().accept(expandedTabsColumnNo(toplevel)) || hasLabelBefore())
+        {
+            return;
+        }
+        if (!toplevelMustStartLine() && !startsLine(toplevel)) {
+            return;
+        }
+        logError(toplevel, "", expandedTabsColumnNo(toplevel));
+    }
+
+    /**
+     * Check if the top level token has label before.
+     * @return true if the top level token has label before.
+     */
+    protected boolean hasLabelBefore()
+    {
+        final DetailAST parent = getToplevelAST().getParent();
+        return parent != null && parent.getType() == TokenTypes.LABELED_STAT
+            && parent.getLineNo() == getToplevelAST().getLineNo();
+    }
+
+    /**
+     * Determines if the top level token must start the line.
+     *
+     * @return true
+     */
+    protected boolean toplevelMustStartLine()
+    {
+        return true;
+    }
+
+    /**
+     * Determines if this block expression has curly braces.
+     *
+     * @return true if curly braces are present, false otherwise
+     */
+    protected boolean hasCurlys()
+    {
+        return (getLCurly() != null) && (getRCurly() != null);
+    }
+
+    /**
+     * Get the left curly brace portion of the expression we are handling.
+     *
+     * @return the left curly brace expression
+     */
+    protected DetailAST getLCurly()
+    {
+        return getMainAst().findFirstToken(TokenTypes.SLIST);
+    }
+
+    /**
+     * Get the right curly brace portion of the expression we are handling.
+     *
+     * @return the right curly brace expression
+     */
+    protected DetailAST getRCurly()
+    {
+        final DetailAST slist = getMainAst().findFirstToken(TokenTypes.SLIST);
+        if (slist == null) {
+            return null;
+        }
+
+        return slist.findFirstToken(TokenTypes.RCURLY);
+    }
+
+    /**
+     * Check the indentation of the left curly brace.
+     */
+    protected void checkLCurly()
+    {
+        // the lcurly can either be at the correct indentation, or nested
+        // with a previous expression
+        final DetailAST lcurly = getLCurly();
+        final int lcurlyPos = expandedTabsColumnNo(lcurly);
+
+        if ((lcurly == null)
+            || curlyLevel().accept(lcurlyPos)
+            || !startsLine(lcurly))
+        {
+            return;
+        }
+
+        logError(lcurly, "lcurly", lcurlyPos);
+    }
+
+    /**
+     * Get the expected indentation level for the curly braces.
+     *
+     * @return the curly brace indentation level
+     */
+    protected IndentLevel curlyLevel()
+    {
+        return new IndentLevel(getLevel(), getBraceAdjustement());
+    }
+
+    /**
+     * Determines if the right curly brace must be at the start of the line.
+     *
+     * @return true
+     */
+    protected boolean rcurlyMustStart()
+    {
+        return true;
+    }
+
+    /**
+     * Determines if child elements within the expression may be nested.
+     *
+     * @return false
+     */
+    protected boolean childrenMayNest()
+    {
+        return false;
+    }
+
+    /**
+     * Check the indentation of the right curly brace.
+     */
+    protected void checkRCurly()
+    {
+        // the rcurly can either be at the correct indentation, or
+        // on the same line as the lcurly
+        final DetailAST lcurly = getLCurly();
+        final DetailAST rcurly = getRCurly();
+        final int rcurlyPos = expandedTabsColumnNo(rcurly);
+
+        if ((rcurly == null)
+            || curlyLevel().accept(rcurlyPos)
+            || (!rcurlyMustStart() && !startsLine(rcurly))
+            || areOnSameLine(rcurly, lcurly))
+        {
+            return;
+        }
+        logError(rcurly, "rcurly", rcurlyPos, curlyLevel());
+    }
+
+    /**
+     * Get the child element that is not a list of statements.
+     *
+     * @return the non-list child element
+     */
+    protected DetailAST getNonlistChild()
+    {
+        return getMainAst().findFirstToken(TokenTypes.RPAREN).getNextSibling();
+    }
+
+    /**
+     * Check the indentation level of a child that is not a list of statements.
+     */
+    private void checkNonlistChild()
+    {
+        final DetailAST nonlist = getNonlistChild();
+        if (nonlist == null) {
+            return;
+        }
+
+        final IndentLevel expected = new IndentLevel(getLevel(), getBasicOffset());
+        checkExpressionSubtree(nonlist, expected, false, false);
+    }
+
+    /**
+     * Get the child element representing the list of statements.
+     *
+     * @return the statement list child
+     */
+    protected DetailAST getListChild()
+    {
+        return getMainAst().findFirstToken(TokenTypes.SLIST);
+    }
+
+    /**
+     * Get the right parenthesis portion of the expression we are handling.
+     *
+     * @return the right parenthis expression
+     */
+    protected DetailAST getRParen()
+    {
+        return getMainAst().findFirstToken(TokenTypes.RPAREN);
+    }
+
+    /**
+     * Get the left parenthesis portion of the expression we are handling.
+     *
+     * @return the left parenthis expression
+     */
+    protected DetailAST getLParen()
+    {
+        return getMainAst().findFirstToken(TokenTypes.LPAREN);
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        checkToplevelToken();
+        // seperate to allow for eventual configuration
+        checkLParen(getLParen());
+        checkRParen(getLParen(), getRParen());
+        if (hasCurlys()) {
+            checkLCurly();
+            checkRCurly();
+        }
+        final DetailAST listChild = getListChild();
+        if (listChild != null) {
+            // NOTE: switch statements usually don't have curlys
+            if (!hasCurlys() || !areOnSameLine(getLCurly(), getRCurly())) {
+                checkChildren(listChild,
+                              getCheckedChildren(),
+                              getChildrenExpectedLevel(),
+                              true,
+                              childrenMayNest());
+            }
+        }
+        else {
+            checkNonlistChild();
+        }
+    }
+
+    /**
+     * @return indentation level expected for children
+     */
+    protected IndentLevel getChildrenExpectedLevel()
+    {
+        // if we have multileveled expected level then we should
+        // try to suggest single level to children using curlies'
+        // levels.
+        if (getLevel().isMultiLevel() && hasCurlys()
+            && !areOnSameLine(getLCurly(), getRCurly()))
+        {
+            if (startsLine(getLCurly())) {
+                return new IndentLevel(expandedTabsColumnNo(getLCurly()) + getBasicOffset());
+            }
+            else if (startsLine(getRCurly())) {
+                final IndentLevel level = new IndentLevel(curlyLevel(), getBasicOffset());
+                level.addAcceptedIndent(level.getFirstIndentLevel() + getLineWrappingIndent());
+                return level;
+            }
+        }
+        return new IndentLevel(getLevel(), getBasicOffset());
+    }
+
+    @Override
+    public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
+    {
+        return getChildrenExpectedLevel();
+    }
+
+    /**
+     * A shortcut for <code>IndentationCheck</code> property.
+     * @return value of lineWrappingIndentation property
+     *         of <code>IndentationCheck</code>
+     */
+    private int getLineWrappingIndent()
+    {
+        return getIndentCheck().getLineWrappingIndentation();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CaseHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CaseHandler.java
new file mode 100644
index 0000000..02d01fb
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CaseHandler.java
@@ -0,0 +1,79 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for case statements.
+ *
+ * @author jrichard
+ */
+public class CaseHandler extends ExpressionHandler
+{
+    /**
+     * The child elements of a case expression.
+     */
+    private final int[] mCaseChildren = new int[] {
+        TokenTypes.LITERAL_CASE,
+        TokenTypes.LITERAL_DEFAULT,
+    };
+
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aExpr          the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public CaseHandler(IndentationCheck aIndentCheck,
+        DetailAST aExpr, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "case", aExpr, aParent);
+    }
+
+    @Override
+    protected IndentLevel getLevelImpl()
+    {
+        return new IndentLevel(getParent().getLevel(),
+                               getIndentCheck().getCaseIndent());
+    }
+
+    /**
+     * Check the indentation of the case statement.
+     */
+    private void checkCase()
+    {
+        checkChildren(getMainAst(), mCaseChildren, getLevel(), true, false);
+    }
+
+    @Override
+    public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
+    {
+        return getLevel();
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        checkCase();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CatchHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CatchHandler.java
new file mode 100644
index 0000000..c391815
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/CatchHandler.java
@@ -0,0 +1,67 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for catch blocks.
+ *
+ * @author jrichard
+ */
+public class CatchHandler extends BlockParentHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public CatchHandler(IndentationCheck aIndentCheck,
+        DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "catch", aAst, aParent);
+    }
+
+    @Override
+    protected boolean toplevelMustStartLine()
+    {
+        return false;
+    }
+
+    /**
+     * Check the indentation level of the conditional expression.
+     */
+    private void checkCondExpr()
+    {
+        final DetailAST condAst = getMainAst().findFirstToken(TokenTypes.LPAREN)
+            .getNextSibling();
+        checkExpressionSubtree(condAst, getLevel(), false, false);
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        super.checkIndentation();
+        checkCondExpr();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ClassDefHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ClassDefHandler.java
new file mode 100644
index 0000000..3d73e7e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ClassDefHandler.java
@@ -0,0 +1,118 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for class definitions.
+ *
+ * @author jrichard
+ */
+public class ClassDefHandler extends BlockParentHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public ClassDefHandler(IndentationCheck aIndentCheck,
+                           DetailAST aAst,
+                           ExpressionHandler aParent)
+    {
+        super(aIndentCheck,
+              (aAst.getType() == TokenTypes.CLASS_DEF)
+              ? "class def" : ((aAst.getType() == TokenTypes.ENUM_DEF)
+                  ? "enum def" : "interface def"),
+              aAst, aParent);
+    }
+
+    @Override
+    protected DetailAST getLCurly()
+    {
+        return getMainAst().findFirstToken(TokenTypes.OBJBLOCK)
+            .findFirstToken(TokenTypes.LCURLY);
+    }
+
+    @Override
+    protected DetailAST getRCurly()
+    {
+        return getMainAst().findFirstToken(TokenTypes.OBJBLOCK)
+            .findFirstToken(TokenTypes.RCURLY);
+    }
+
+    @Override
+    protected DetailAST getToplevelAST()
+    {
+        return null;
+        // note: ident checked by hand in check indentation;
+    }
+
+    @Override
+    protected DetailAST getListChild()
+    {
+        return getMainAst().findFirstToken(TokenTypes.OBJBLOCK);
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        final DetailAST modifiers = getMainAst().findFirstToken(TokenTypes.MODIFIERS);
+        if (modifiers.getChildCount() == 0) {
+            final DetailAST ident = getMainAst().findFirstToken(TokenTypes.IDENT);
+            final int lineStart = getLineStart(ident);
+            if (!getLevel().accept(lineStart)) {
+                logError(ident, "ident", lineStart);
+            }
+
+        }
+        else {
+            checkModifiers();
+        }
+
+        final LineWrappingHandler lineWrap =
+            new LineWrappingHandler(getIndentCheck(), getMainAst()) {
+                @Override
+                public DetailAST findLastNode(DetailAST aFirstNode)
+                {
+                    return aFirstNode.getLastChild();
+                }
+            };
+        lineWrap.checkIndentation();
+        super.checkIndentation();
+    }
+
+    @Override
+    protected int[] getCheckedChildren()
+    {
+        return new int[] {
+            TokenTypes.EXPR,
+            TokenTypes.OBJBLOCK,
+            TokenTypes.LITERAL_BREAK,
+            TokenTypes.LITERAL_RETURN,
+            TokenTypes.LITERAL_THROW,
+            TokenTypes.LITERAL_CONTINUE,
+        };
+    }
+
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/DoWhileHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/DoWhileHandler.java
new file mode 100644
index 0000000..41e2fdd
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/DoWhileHandler.java
@@ -0,0 +1,61 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for do...while blocks.
+ *
+ * @author jrichard
+ */
+public class DoWhileHandler extends BlockParentHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public DoWhileHandler(IndentationCheck aIndentCheck,
+            DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "do..while", aAst, aParent);
+    }
+
+    /**
+     * Check the indentation level of the conditional expression.
+     */
+    private void checkCondExpr()
+    {
+        final DetailAST condAst = getMainAst()
+            .findFirstToken(TokenTypes.LPAREN).getNextSibling();
+        checkExpressionSubtree(condAst, getLevel(), false, false);
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        super.checkIndentation();
+        checkCondExpr();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ElseHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ElseHandler.java
new file mode 100644
index 0000000..bfc840c
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ElseHandler.java
@@ -0,0 +1,73 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for else blocks.
+ *
+ * @author jrichard
+ */
+public class ElseHandler extends BlockParentHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public ElseHandler(IndentationCheck aIndentCheck,
+        DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "else", aAst, aParent);
+    }
+
+    @Override
+    protected void checkToplevelToken()
+    {
+        // check if else is nested with rcurly of if:
+        //
+        //  } else ...
+
+        final DetailAST ifAST = getMainAst().getParent();
+        if (ifAST != null) {
+            final DetailAST slist = ifAST.findFirstToken(TokenTypes.SLIST);
+            if (slist != null) {
+                final DetailAST lcurly = slist.getLastChild();
+                if ((lcurly != null)
+                    && (lcurly.getLineNo() == getMainAst().getLineNo()))
+                {
+                    // indentation checked as part of LITERAL IF check
+                    return;
+                }
+            }
+        }
+        super.checkToplevelToken();
+    }
+
+    @Override
+    protected DetailAST getNonlistChild()
+    {
+        return getMainAst().getFirstChild();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ExpressionHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ExpressionHandler.java
new file mode 100644
index 0000000..3673f95
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ExpressionHandler.java
@@ -0,0 +1,622 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import java.util.Arrays;
+
+/**
+ * Abstract base class for all handlers.
+ *
+ * @author jrichard
+ */
+public abstract class ExpressionHandler
+{
+    /**
+     * The instance of <code>IndentationCheck</code> using this handler.
+     */
+    private final IndentationCheck mIndentCheck;
+
+    /** the AST which is handled by this handler */
+    private final DetailAST mMainAst;
+
+    /** name used during output to user */
+    private final String mTypeName;
+
+    /** containing AST handler */
+    private final ExpressionHandler mParent;
+
+    /** indentation amount for this handler */
+    private IndentLevel mLevel;
+
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * name, abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aTypeName      the name of the handler
+     * @param aExpr          the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public ExpressionHandler(IndentationCheck aIndentCheck,
+            String aTypeName, DetailAST aExpr, ExpressionHandler aParent)
+    {
+        mIndentCheck = aIndentCheck;
+        mTypeName = aTypeName;
+        mMainAst = aExpr;
+        mParent = aParent;
+    }
+
+    /**
+     * Get the indentation amount for this handler. For performance reasons,
+     * this value is cached. The first time this method is called, the
+     * indentation amount is computed and stored. On further calls, the stored
+     * value is returned.
+     *
+     * @return the expected indentation amount
+     */
+    public final IndentLevel getLevel()
+    {
+        if (mLevel == null) {
+            mLevel = getLevelImpl();
+        }
+        return mLevel;
+    }
+
+    /**
+     * Compute the indentation amount for this handler.
+     *
+     * @return the expected indentation amount
+     */
+    protected IndentLevel getLevelImpl()
+    {
+        return mParent.suggestedChildLevel(this);
+    }
+
+    /**
+     * Indentation level suggested for a child element. Children don't have
+     * to respect this, but most do.
+     *
+     * @param aChild  child AST (so suggestion level can differ based on child
+     *                  type)
+     *
+     * @return suggested indentation for child
+     */
+    public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
+    {
+        return new IndentLevel(getLevel(), getBasicOffset());
+    }
+
+    /**
+     * Log an indentation error.
+     *
+     * @param aAst           the expression that caused the error
+     * @param aSubtypeName   the type of the expression
+     * @param aActualLevel    the actual indent level of the expression
+     */
+    protected final void logError(DetailAST aAst, String aSubtypeName,
+                                  int aActualLevel)
+    {
+        logError(aAst, aSubtypeName, aActualLevel, getLevel());
+    }
+
+    /**
+     * Log an indentation error.
+     *
+     * @param aAst           the expression that caused the error
+     * @param aSubtypeName   the type of the expression
+     * @param aActualLevel   the actual indent level of the expression
+     * @param aExpectedLevel the expected indent level of the expression
+     */
+    protected final void logError(DetailAST aAst, String aSubtypeName,
+                                  int aActualLevel, IndentLevel aExpectedLevel)
+    {
+        final String typeStr =
+            ("".equals(aSubtypeName) ? "" : (" " + aSubtypeName));
+        String messageKey = "indentation.error";
+        if (aExpectedLevel.isMultiLevel()) {
+            messageKey = "indentation.error.multi";
+        }
+        mIndentCheck.indentationLog(aAst.getLineNo(), messageKey,
+            mTypeName + typeStr, aActualLevel, aExpectedLevel);
+    }
+
+    /**
+     * Log child indentation error.
+     *
+     * @param aLine           the expression that caused the error
+     * @param aActualLevel   the actual indent level of the expression
+     * @param aExpectedLevel the expected indent level of the expression
+     */
+    private void logChildError(int aLine,
+                               int aActualLevel,
+                               IndentLevel aExpectedLevel)
+    {
+        String messageKey = "indentation.child.error";
+        if (aExpectedLevel.isMultiLevel()) {
+            messageKey = "indentation.child.error.multi";
+        }
+        mIndentCheck.indentationLog(aLine, messageKey,
+            mTypeName, aActualLevel, aExpectedLevel);
+    }
+
+    /**
+     * Determines if the given expression is at the start of a line.
+     *
+     * @param aAst   the expression to check
+     *
+     * @return true if it is, false otherwise
+     */
+    protected final boolean startsLine(DetailAST aAst)
+    {
+        return getLineStart(aAst) == expandedTabsColumnNo(aAst);
+    }
+
+    /**
+     * Determines if two expressions are on the same line.
+     *
+     * @param aAst1   the first expression
+     * @param aAst2   the second expression
+     *
+     * @return true if they are, false otherwise
+     */
+    static boolean areOnSameLine(DetailAST aAst1, DetailAST aAst2)
+    {
+        return (aAst1 != null) && (aAst2 != null)
+            && (aAst1.getLineNo() == aAst2.getLineNo());
+    }
+
+    /**
+     * Searchs in given sub-tree (including given node) for the token
+     * which represents first symbol for this sub-tree in file.
+     * @param aAST a root of sub-tree in which the search shoul be performed.
+     * @return a token which occurs first in the file.
+     */
+    static DetailAST getFirstToken(DetailAST aAST)
+    {
+        DetailAST first = aAST;
+        DetailAST child = aAST.getFirstChild();
+
+        while (child != null) {
+            final DetailAST toTest = getFirstToken(child);
+            if ((toTest.getLineNo() < first.getLineNo())
+                || ((toTest.getLineNo() == first.getLineNo())
+                    && (toTest.getColumnNo() < first.getColumnNo())))
+            {
+                first = toTest;
+            }
+            child = child.getNextSibling();
+        }
+
+        return first;
+    }
+
+    /**
+     * Get the start of the line for the given expression.
+     *
+     * @param aAst   the expression to find the start of the line for
+     *
+     * @return the start of the line for the given expression
+     */
+    protected final int getLineStart(DetailAST aAst)
+    {
+        final String line = mIndentCheck.getLines()[aAst.getLineNo() - 1];
+        return getLineStart(line);
+    }
+
+    /**
+     * Check the indentation of consecutive lines for the expression we are
+     * handling.
+     *
+     * @param aStartLine     the first line to check
+     * @param aEndLine       the last line to check
+     * @param aIndentLevel   the required indent level
+     */
+    protected final void checkLinesIndent(int aStartLine, int aEndLine,
+        IndentLevel aIndentLevel)
+    {
+        // check first line
+        checkSingleLine(aStartLine, aIndentLevel);
+
+        // check following lines
+        final IndentLevel offsetLevel =
+            new IndentLevel(aIndentLevel, getBasicOffset());
+        for (int i = aStartLine + 1; i <= aEndLine; i++) {
+            checkSingleLine(i, offsetLevel);
+        }
+    }
+
+    /**
+     * @return true if indentation should be increased after
+     *              fisrt line in checkLinesIndent()
+     *         false otherwise
+     */
+    protected boolean shouldIncreaseIndent()
+    {
+        return true;
+    }
+
+    /**
+     * Check the indentation for a set of lines.
+     *
+     * @param aLines              the set of lines to check
+     * @param aIndentLevel        the indentation level
+     * @param aFirstLineMatches   whether or not the first line has to match
+     * @param aFirstLine          firstline of whole expression
+     */
+    private void checkLinesIndent(LineSet aLines,
+                                  IndentLevel aIndentLevel,
+                                  boolean aFirstLineMatches,
+                                  int aFirstLine)
+    {
+        if (aLines.isEmpty()) {
+            return;
+        }
+
+        // check first line
+        final int startLine = aLines.firstLine();
+        final int endLine = aLines.lastLine();
+        final int startCol = aLines.firstLineCol();
+
+        final int realStartCol =
+            getLineStart(mIndentCheck.getLines()[startLine - 1]);
+
+        if (realStartCol == startCol) {
+            checkSingleLine(startLine, startCol, aIndentLevel,
+                aFirstLineMatches);
+        }
+
+        // if first line starts the line, following lines are indented
+        // one level; but if the first line of this expression is
+        // nested with the previous expression (which is assumed if it
+        // doesn't start the line) then don't indent more, the first
+        // indentation is absorbed by the nesting
+
+        IndentLevel theLevel = aIndentLevel;
+        if (aFirstLineMatches
+            || ((aFirstLine > mMainAst.getLineNo()) && shouldIncreaseIndent()))
+        {
+            theLevel = new IndentLevel(aIndentLevel, getBasicOffset());
+        }
+
+        // check following lines
+        for (int i = startLine + 1; i <= endLine; i++) {
+            final Integer col = aLines.getStartColumn(i);
+            // startCol could be null if this line didn't have an
+            // expression that was required to be checked (it could be
+            // checked by a child expression)
+
+            if (col != null) {
+                checkSingleLine(i, col.intValue(), theLevel, false);
+            }
+        }
+    }
+
+    /**
+     * Check the indent level for a single line.
+     *
+     * @param aLineNum       the line number to check
+     * @param aIndentLevel   the required indent level
+     */
+    private void checkSingleLine(int aLineNum, IndentLevel aIndentLevel)
+    {
+        final String line = mIndentCheck.getLines()[aLineNum - 1];
+        final int start = getLineStart(line);
+        if (aIndentLevel.gt(start)) {
+            logChildError(aLineNum, start, aIndentLevel);
+        }
+    }
+
+    /**
+     * Check the indentation for a single line.
+     *
+     * @param aLineNum       the number of the line to check
+     * @param aColNum        the column number we are starting at
+     * @param aIndentLevel   the indentation level
+     * @param aMustMatch     whether or not the indentation level must match
+     */
+
+    private void checkSingleLine(int aLineNum, int aColNum,
+        IndentLevel aIndentLevel, boolean aMustMatch)
+    {
+        final String line = mIndentCheck.getLines()[aLineNum - 1];
+        final int start = getLineStart(line);
+        // if must match is set, it is an error if the line start is not
+        // at the correct indention level; otherwise, it is an only an
+        // error if this statement starts the line and it is less than
+        // the correct indentation level
+        if (aMustMatch ? !aIndentLevel.accept(start)
+            : (aColNum == start) && aIndentLevel.gt(start))
+        {
+            logChildError(aLineNum, start, aIndentLevel);
+        }
+    }
+
+    /**
+     * Get the start of the specified line.
+     *
+     * @param aLine   the specified line number
+     *
+     * @return the start of the specified line
+     */
+    protected final int getLineStart(String aLine)
+    {
+        for (int start = 0; start < aLine.length(); start++) {
+            final char c = aLine.charAt(start);
+
+            if (!Character.isWhitespace(c)) {
+                return Utils.lengthExpandedTabs(
+                    aLine, start, mIndentCheck.getIndentationTabWidth());
+            }
+        }
+        return 0;
+    }
+
+    /**
+     * Check the indent level of the children of the specified parent
+     * expression.
+     *
+     * @param aParent             the parent whose children we are checking
+     * @param aTokenTypes         the token types to check
+     * @param aStartLevel         the starting indent level
+     * @param aFirstLineMatches   whether or not the first line needs to match
+     * @param aAllowNesting       whether or not nested children are allowed
+     */
+    protected final void checkChildren(DetailAST aParent,
+                                       int[] aTokenTypes,
+                                       IndentLevel aStartLevel,
+                                       boolean aFirstLineMatches,
+                                       boolean aAllowNesting)
+    {
+        Arrays.sort(aTokenTypes);
+        for (DetailAST child = aParent.getFirstChild();
+                child != null;
+                child = child.getNextSibling())
+        {
+            if (Arrays.binarySearch(aTokenTypes, child.getType()) >= 0) {
+                checkExpressionSubtree(child, aStartLevel,
+                    aFirstLineMatches, aAllowNesting);
+            }
+        }
+    }
+
+    /**
+     * Check the indentation level for an expression subtree.
+     *
+     * @param aTree               the expression subtree to check
+     * @param aLevel              the indentation level
+     * @param aFirstLineMatches   whether or not the first line has to match
+     * @param aAllowNesting       whether or not subtree nesting is allowed
+     */
+    protected final void checkExpressionSubtree(
+        DetailAST aTree,
+        IndentLevel aLevel,
+        boolean aFirstLineMatches,
+        boolean aAllowNesting
+    )
+    {
+        final LineSet subtreeLines = new LineSet();
+        final int firstLine = getFirstLine(Integer.MAX_VALUE, aTree);
+        if (aFirstLineMatches && !aAllowNesting) {
+            subtreeLines.addLineAndCol(firstLine,
+                getLineStart(mIndentCheck.getLines()[firstLine - 1]));
+        }
+        findSubtreeLines(subtreeLines, aTree, aAllowNesting);
+
+        checkLinesIndent(subtreeLines, aLevel, aFirstLineMatches, firstLine);
+    }
+
+    /**
+     * Get the first line for a given expression.
+     *
+     * @param aStartLine   the line we are starting from
+     * @param aTree        the expression to find the first line for
+     *
+     * @return the first line of the expression
+     */
+    protected final int getFirstLine(int aStartLine, DetailAST aTree)
+    {
+        int realStart = aStartLine;
+        final int currLine = aTree.getLineNo();
+        if (currLine < realStart) {
+            realStart = currLine;
+        }
+
+        // check children
+        for (DetailAST node = aTree.getFirstChild();
+            node != null;
+            node = node.getNextSibling())
+        {
+            realStart = getFirstLine(realStart, node);
+        }
+
+        return realStart;
+    }
+
+    /**
+     * Get the column number for the start of a given expression, expanding
+     * tabs out into spaces in the process.
+     *
+     * @param aAST   the expression to find the start of
+     *
+     * @return the column number for the start of the expression
+     */
+    protected final int expandedTabsColumnNo(DetailAST aAST)
+    {
+        final String line =
+            mIndentCheck.getLines()[aAST.getLineNo() - 1];
+
+        return Utils.lengthExpandedTabs(line, aAST.getColumnNo(),
+            mIndentCheck.getIndentationTabWidth());
+    }
+
+    /**
+     * Find the set of lines for a given subtree.
+     *
+     * @param aLines          the set of lines to add to
+     * @param aTree           the subtree to examine
+     * @param aAllowNesting   whether or not to allow nested subtrees
+     */
+    protected final void findSubtreeLines(LineSet aLines, DetailAST aTree,
+        boolean aAllowNesting)
+    {
+        if (getIndentCheck().getHandlerFactory().isHandledType(aTree.getType())
+            || (aTree.getLineNo() < 0))
+        {
+            return;
+        }
+
+        final int lineNum = aTree.getLineNo();
+        final Integer colNum = aLines.getStartColumn(lineNum);
+
+        final int thisLineColumn = expandedTabsColumnNo(aTree);
+        if ((colNum == null) || (thisLineColumn < colNum.intValue())) {
+            aLines.addLineAndCol(lineNum, thisLineColumn);
+        }
+
+        // check children
+        for (DetailAST node = aTree.getFirstChild();
+            node != null;
+            node = node.getNextSibling())
+        {
+            findSubtreeLines(aLines, node, aAllowNesting);
+        }
+    }
+
+    /**
+     * Check the indentation level of modifiers.
+     */
+    protected void checkModifiers()
+    {
+        final DetailAST modifiers =
+            mMainAst.findFirstToken(TokenTypes.MODIFIERS);
+        for (DetailAST modifier = modifiers.getFirstChild();
+             modifier != null;
+             modifier = modifier.getNextSibling())
+        {
+            if (startsLine(modifier)
+                && !getLevel().accept(expandedTabsColumnNo(modifier)))
+            {
+                logError(modifier, "modifier",
+                    expandedTabsColumnNo(modifier));
+            }
+        }
+    }
+
+    /**
+     * Check the indentation of the expression we are handling.
+     */
+    public abstract void checkIndentation();
+
+    /**
+     * Accessor for the IndentCheck attribute.
+     *
+     * @return the IndentCheck attribute
+     */
+    protected final IndentationCheck getIndentCheck()
+    {
+        return mIndentCheck;
+    }
+
+    /**
+     * Accessor for the MainAst attribute.
+     *
+     * @return the MainAst attribute
+     */
+    protected final DetailAST getMainAst()
+    {
+        return mMainAst;
+    }
+
+    /**
+     * Accessor for the Parent attribute.
+     *
+     * @return the Parent attribute
+     */
+    protected final ExpressionHandler getParent()
+    {
+        return mParent;
+    }
+
+    /**
+     * A shortcut for <code>IndentationCheck</code> property.
+     * @return value of basicOffset property of <code>IndentationCheck</code>
+     */
+    protected final int getBasicOffset()
+    {
+        return getIndentCheck().getBasicOffset();
+    }
+
+    /**
+     * A shortcut for <code>IndentationCheck</code> property.
+     * @return value of braceAdjustment property
+     *         of <code>IndentationCheck</code>
+     */
+    protected final int getBraceAdjustement()
+    {
+        return getIndentCheck().getBraceAdjustement();
+    }
+
+    /**
+     * Check the indentation of the right parenthesis.
+     * @param aRparen parenthesis to check
+     * @param aLparen left parenthesis associated with aRparen
+     */
+    protected final void checkRParen(DetailAST aLparen, DetailAST aRparen)
+    {
+        // no paren - no check :)
+        if (aRparen == null) {
+            return;
+        }
+
+        // the rcurly can either be at the correct indentation,
+        // or not first on the line ...
+        final int rparenLevel = expandedTabsColumnNo(aRparen);
+        if (getLevel().accept(rparenLevel) || !startsLine(aRparen)) {
+            return;
+        }
+
+        // or has <lparen level> + 1 indentation
+        final int lparenLevel = expandedTabsColumnNo(aLparen);
+        if (rparenLevel == (lparenLevel + 1)) {
+            return;
+        }
+
+        logError(aRparen, "rparen", rparenLevel);
+    }
+
+    /**
+     * Check the indentation of the left parenthesis.
+     * @param aLparen parenthesis to check
+     */
+    protected final void checkLParen(final DetailAST aLparen)
+    {
+        // the rcurly can either be at the correct indentation, or on the
+        // same line as the lcurly
+        if ((aLparen == null)
+            || getLevel().accept(expandedTabsColumnNo(aLparen))
+            || !startsLine(aLparen))
+        {
+            return;
+        }
+        logError(aLparen, "lparen", expandedTabsColumnNo(aLparen));
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/FinallyHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/FinallyHandler.java
new file mode 100644
index 0000000..e3e9849
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/FinallyHandler.java
@@ -0,0 +1,49 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * Handler for finally blocks.
+ *
+ * @author jrichard
+ */
+public class FinallyHandler extends BlockParentHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public FinallyHandler(IndentationCheck aIndentCheck,
+        DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "finally", aAst, aParent);
+    }
+
+    @Override
+    protected boolean toplevelMustStartLine()
+    {
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ForHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ForHandler.java
new file mode 100644
index 0000000..4a4d7fd
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ForHandler.java
@@ -0,0 +1,91 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for for loops.
+ *
+ * @author jrichard
+ */
+public class ForHandler extends BlockParentHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public ForHandler(IndentationCheck aIndentCheck,
+        DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "for", aAst, aParent);
+    }
+
+    /**
+     * Check the indentation of the parameters of the 'for' loop.
+     */
+    private void checkForParams()
+    {
+        final IndentLevel expected =
+            new IndentLevel(getLevel(), getBasicOffset());
+        final DetailAST init = getMainAst().findFirstToken(TokenTypes.FOR_INIT);
+
+        if (init != null) {
+            checkExpressionSubtree(init, expected, false, false);
+
+            final DetailAST cond =
+                getMainAst().findFirstToken(TokenTypes.FOR_CONDITION);
+            checkExpressionSubtree(cond, expected, false, false);
+
+            final DetailAST iter =
+                getMainAst().findFirstToken(TokenTypes.FOR_ITERATOR);
+            checkExpressionSubtree(iter, expected, false, false);
+        }
+        // for each
+        else {
+            final DetailAST forEach =
+                getMainAst().findFirstToken(TokenTypes.FOR_EACH_CLAUSE);
+            checkExpressionSubtree(forEach, expected, false, false);
+        }
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        checkForParams();
+        super.checkIndentation();
+        final LineWrappingHandler lineWrap =
+            new LineWrappingHandler(getIndentCheck(), getMainAst());
+        lineWrap.checkIndentation();
+    }
+
+    @Override
+    public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
+    {
+        if (aChild instanceof ElseHandler) {
+            return getLevel();
+        }
+        return super.suggestedChildLevel(aChild);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java
new file mode 100644
index 0000000..c107709
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java
@@ -0,0 +1,228 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.google.common.collect.Maps;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Map;
+import java.util.Set;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Factory for handlers. Looks up constructor via reflection.
+ *
+ * @author jrichard
+ */
+public class HandlerFactory
+{
+    /** Logger for indentation check */
+    private static final Log LOG =
+        LogFactory.getLog("com.puppycrawl.tools.checkstyle.checks.indentation");
+
+    /**
+     * Registered handlers.
+     */
+    private final Map<Integer, Constructor<?>> mTypeHandlers =
+        Maps.newHashMap();
+
+    /**
+     * registers a handler
+     *
+     * @param aType
+     *                type from TokenTypes
+     * @param aHandlerClass
+     *                the handler to register
+     */
+    private void register(int aType, Class<?> aHandlerClass)
+    {
+        try {
+            final Constructor<?> ctor = aHandlerClass
+                    .getConstructor(new Class[] {IndentationCheck.class,
+                        DetailAST.class, // current AST
+                        ExpressionHandler.class, // parent
+                    });
+            mTypeHandlers.put(aType, ctor);
+        }
+        ///CLOVER:OFF
+        catch (final NoSuchMethodException e) {
+            throw new RuntimeException("couldn't find ctor for "
+                                       + aHandlerClass);
+        }
+        catch (final SecurityException e) {
+            LOG.debug("couldn't find ctor for " + aHandlerClass, e);
+            throw new RuntimeException("couldn't find ctor for "
+                                       + aHandlerClass);
+        }
+        ///CLOVER:ON
+    }
+
+    /** Creates a HandlerFactory. */
+    public HandlerFactory()
+    {
+        register(TokenTypes.CASE_GROUP, CaseHandler.class);
+        register(TokenTypes.LITERAL_SWITCH, SwitchHandler.class);
+        register(TokenTypes.SLIST, SlistHandler.class);
+        register(TokenTypes.PACKAGE_DEF, PackageDefHandler.class);
+        register(TokenTypes.LITERAL_ELSE, ElseHandler.class);
+        register(TokenTypes.LITERAL_IF, IfHandler.class);
+        register(TokenTypes.LITERAL_TRY, TryHandler.class);
+        register(TokenTypes.LITERAL_CATCH, CatchHandler.class);
+        register(TokenTypes.LITERAL_FINALLY, FinallyHandler.class);
+        register(TokenTypes.LITERAL_DO, DoWhileHandler.class);
+        register(TokenTypes.LITERAL_WHILE, WhileHandler.class);
+        register(TokenTypes.LITERAL_FOR, ForHandler.class);
+        register(TokenTypes.METHOD_DEF, MethodDefHandler.class);
+        register(TokenTypes.CTOR_DEF, MethodDefHandler.class);
+        register(TokenTypes.CLASS_DEF, ClassDefHandler.class);
+        register(TokenTypes.ENUM_DEF, ClassDefHandler.class);
+        register(TokenTypes.OBJBLOCK, ObjectBlockHandler.class);
+        register(TokenTypes.INTERFACE_DEF, ClassDefHandler.class);
+        register(TokenTypes.IMPORT, ImportHandler.class);
+        register(TokenTypes.ARRAY_INIT, ArrayInitHandler.class);
+        register(TokenTypes.METHOD_CALL, MethodCallHandler.class);
+        register(TokenTypes.CTOR_CALL, MethodCallHandler.class);
+        register(TokenTypes.LABELED_STAT, LabelHandler.class);
+        register(TokenTypes.STATIC_INIT, StaticInitHandler.class);
+        register(TokenTypes.INSTANCE_INIT, SlistHandler.class);
+        register(TokenTypes.VARIABLE_DEF, MemberDefHandler.class);
+        register(TokenTypes.LITERAL_NEW, NewHandler.class);
+        register(TokenTypes.INDEX_OP, IndexHandler.class);
+    }
+
+    /**
+     * Returns true if this type (form TokenTypes) is handled.
+     *
+     * @param aType type from TokenTypes
+     * @return true if handler is registered, false otherwise
+     */
+    public boolean isHandledType(int aType)
+    {
+        final Set<Integer> typeSet = mTypeHandlers.keySet();
+        return typeSet.contains(aType);
+    }
+
+    /**
+     * Gets list of registered handler types.
+     *
+     * @return int[] of TokenType types
+     */
+    public int[] getHandledTypes()
+    {
+        final Set<Integer> typeSet = mTypeHandlers.keySet();
+        final int[] types = new int[typeSet.size()];
+        int index = 0;
+        for (final Integer val : typeSet) {
+            types[index++] = val;
+        }
+
+        return types;
+    }
+
+    /**
+     * Get the handler for an AST.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           ast to handle
+     * @param aParent        the handler parent of this AST
+     *
+     * @return the ExpressionHandler for aAst
+     */
+    public ExpressionHandler getHandler(IndentationCheck aIndentCheck,
+        DetailAST aAst, ExpressionHandler aParent)
+    {
+        final ExpressionHandler handler =
+            mCreatedHandlers.get(aAst);
+        if (handler != null) {
+            return handler;
+        }
+
+        if (aAst.getType() == TokenTypes.METHOD_CALL) {
+            return createMethodCallHandler(aIndentCheck, aAst, aParent);
+        }
+
+        ExpressionHandler expHandler = null;
+        try {
+            final Constructor<?> handlerCtor =
+                mTypeHandlers.get(aAst.getType());
+            if (handlerCtor != null) {
+                expHandler = (ExpressionHandler) handlerCtor.newInstance(
+                        aIndentCheck, aAst, aParent);
+            }
+        }
+        ///CLOVER:OFF
+        catch (final InstantiationException e) {
+            LOG.debug("couldn't instantiate constructor for " + aAst, e);
+            throw new RuntimeException("couldn't instantiate constructor for "
+                                       + aAst);
+        }
+        catch (final IllegalAccessException e) {
+            LOG.debug("couldn't access constructor for " + aAst, e);
+            throw new RuntimeException("couldn't access constructor for "
+                                       + aAst);
+        }
+        catch (final InvocationTargetException e) {
+            LOG.debug("couldn't instantiate constructor for " + aAst, e);
+            throw new RuntimeException("couldn't instantiate constructor for "
+                                       + aAst);
+        }
+        if (expHandler == null) {
+            throw new RuntimeException("no handler for type " + aAst.getType());
+        }
+        ///CLOVER:ON
+        return expHandler;
+    }
+
+    /**
+     * Create new instance of handler for METHOD_CALL.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           ast to handle
+     * @param aParent        the handler parent of this AST
+     *
+     * @return new instance.
+     */
+    ExpressionHandler createMethodCallHandler(IndentationCheck aIndentCheck,
+        DetailAST aAst, ExpressionHandler aParent)
+    {
+        ExpressionHandler theParent = aParent;
+        DetailAST ast = aAst.getFirstChild();
+        while ((ast != null) && (ast.getType() == TokenTypes.DOT)) {
+            ast = ast.getFirstChild();
+        }
+        if ((ast != null) && isHandledType(ast.getType())) {
+            theParent = getHandler(aIndentCheck, ast, theParent);
+            mCreatedHandlers.put(ast, theParent);
+        }
+        return new MethodCallHandler(aIndentCheck, aAst, theParent);
+    }
+
+    /** Clears cache of created handlers. */
+    void clearCreatedHandlers()
+    {
+        mCreatedHandlers.clear();
+    }
+
+    /** cache for created method call handlers */
+    private final Map<DetailAST, ExpressionHandler> mCreatedHandlers =
+        Maps.newHashMap();
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IfHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IfHandler.java
new file mode 100644
index 0000000..1df6aea
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IfHandler.java
@@ -0,0 +1,114 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for if statements.
+ *
+ * @author jrichard
+ */
+public class IfHandler extends BlockParentHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public IfHandler(IndentationCheck aIndentCheck,
+        DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "if", aAst, aParent);
+    }
+
+    @Override
+    public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
+    {
+        if (aChild instanceof ElseHandler) {
+            return getLevel();
+        }
+        return super.suggestedChildLevel(aChild);
+    }
+
+    @Override
+    protected IndentLevel getLevelImpl()
+    {
+        if (isIfAfterElse()) {
+            return getParent().getLevel();
+        }
+        return super.getLevelImpl();
+    }
+
+    /**
+     * Determines if this 'if' statement is part of an 'else' clause
+     * and on the same line.
+     *
+     * @return true if this 'if' is part of an 'else', false otherwise
+     */
+    private boolean isIfAfterElse()
+    {
+        // check if there is an 'else' and an 'if' on the same line
+        final DetailAST parent = getMainAst().getParent();
+        return (parent.getType() == TokenTypes.LITERAL_ELSE)
+            && (parent.getLineNo() == getMainAst().getLineNo());
+    }
+
+    @Override
+    protected void checkToplevelToken()
+    {
+        if (isIfAfterElse()) {
+            return;
+        }
+
+        super.checkToplevelToken();
+    }
+
+    /**
+     * Check the indentation of the conditional expression.
+     */
+    private void checkCondExpr()
+    {
+        final DetailAST condAst = getMainAst().findFirstToken(TokenTypes.LPAREN)
+            .getNextSibling();
+        final IndentLevel expected =
+            new IndentLevel(getLevel(), getBasicOffset());
+        checkExpressionSubtree(condAst, expected, false, false);
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        super.checkIndentation();
+        checkCondExpr();
+        final LineWrappingHandler lineWrap =
+            new LineWrappingHandler(getIndentCheck(), getMainAst()) {
+                @Override
+                public DetailAST findLastNode(DetailAST aFirstNode)
+                {
+                    return aFirstNode.findFirstToken(TokenTypes.RPAREN);
+                }
+            };
+        lineWrap.checkIndentation();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ImportHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ImportHandler.java
new file mode 100644
index 0000000..501d323
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ImportHandler.java
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for import statements.
+ *
+ * @author jrichard
+ */
+public class ImportHandler extends ExpressionHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public ImportHandler(IndentationCheck aIndentCheck,
+        DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "import", aAst, aParent);
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        final int lineStart = getMainAst().getLineNo();
+        final DetailAST semi = getMainAst().findFirstToken(TokenTypes.SEMI);
+        final int lineEnd = semi.getLineNo();
+
+        if (getMainAst().getLineNo() != lineEnd) {
+            checkLinesIndent(lineStart, lineEnd, getLevel());
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentLevel.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentLevel.java
new file mode 100644
index 0000000..0f01c64
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentLevel.java
@@ -0,0 +1,131 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import java.util.SortedSet;
+
+import com.google.common.base.Joiner;
+import com.google.common.collect.Sets;
+
+/**
+ * Encapsulates representation of notion of expected indentation levels.
+ * Provide a way to have multiple accaptable levels.
+ *
+ * @author o_sukhodolsky
+ */
+public class IndentLevel
+{
+    /** set of acceptable indentation levels. */
+    private final SortedSet<Integer> mLevels = Sets.newTreeSet();
+
+    /**
+     * Creates new instance with one accaptable indentation level.
+     * @param aIndent accaptable indentation level.
+     */
+    public IndentLevel(int aIndent)
+    {
+        mLevels.add(aIndent);
+    }
+
+    /**
+     * Creates new instance for nested structure.
+     * @param aBase parent's level
+     * @param aOffsets offsets from parent's level.
+     */
+    public IndentLevel(IndentLevel aBase, int... aOffsets)
+    {
+        for (Integer base : aBase.mLevels) {
+            for (int offset : aOffsets) {
+                mLevels.add(base + offset);
+            }
+        }
+    }
+
+    /**
+     * Checks wether we have more than one level.
+     * @return wether we have more than one level.
+     */
+    public final boolean isMultiLevel()
+    {
+        return mLevels.size() > 1;
+    }
+
+    /**
+     * Checks if given indentation is acceptable.
+     * @param aIndent indentation to check.
+     * @return true if given indentation is acceptable,
+     *         false otherwise.
+     */
+    public boolean accept(int aIndent)
+    {
+        return (mLevels.contains(aIndent));
+    }
+
+    /**
+     * @param aIndent indentation to check.
+     * @return true if <code>aIndent</code> less then minimal of
+     *         acceptable indentation levels, false otherwise.
+     */
+    public boolean gt(int aIndent)
+    {
+        return ((mLevels.first()).intValue() > aIndent);
+    }
+
+    /**
+     * Adds one more acceptable indentation level.
+     * @param aIndent new acceptable indentation.
+     */
+    public void addAcceptedIndent(int aIndent)
+    {
+        mLevels.add(aIndent);
+    }
+
+    /**
+     * Adds one more acceptable indentation level.
+     * @param aIndent new acceptable indentation.
+     */
+    public void addAcceptedIndent(IndentLevel aIndent)
+    {
+        mLevels.addAll(aIndent.mLevels);
+    }
+
+    /**
+     * Returns first indentation level.
+     * @return indentation level.
+     */
+    public int getFirstIndentLevel()
+    {
+        return mLevels.first();
+    }
+
+    /**
+     * Returns last indentation level.
+     * @return indentation level.
+     */
+    public int getLastIndentLevel()
+    {
+        return mLevels.last();
+    }
+
+    @Override
+    public String toString()
+    {
+        return Joiner.on(", ").join(mLevels);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheck.java
new file mode 100644
index 0000000..9f1d45c
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheck.java
@@ -0,0 +1,330 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+
+// TODO: allow preset indentation styles (IE... GNU style, Sun style, etc...)?
+
+// TODO: optionally make imports (and other?) statements required to start
+//   line? -- but maybe this should be a different check
+
+// TODO: optionally allow array children, throws clause, etc...
+//   to be of any indentation > required, for emacs-style indentation
+
+// TODO: this is not illegal, but probably should be:
+//        myfunc3(11, 11, Integer.
+//            getInteger("mytest").intValue(),  // this should be in 4 more
+//            11);
+
+// TODO: any dot-based indentation doesn't work (at least not yet...) the
+//  problem is that we don't know which way an expression tree will be built
+//  and with dot trees, they are built backwards.  This means code like
+//
+//  org.blah.mystuff
+//      .myclass.getFactoryObject()
+//          .objFunc().otherMethod();
+// and
+//  return ((MethodCallHandler) parent)
+//      .findContainingMethodCall(this);
+//  is all checked at the level of the first line.  Simple dots are actually
+// checked but the method call handler will have to be changed drastically
+// to fix the above...
+
+
+/**
+ * Checks correct indentation of Java Code.
+ *
+ * <p>
+ * The basic idea behind this is that while
+ * pretty printers are sometimes convenient for bulk reformats of
+ * legacy code, they often either aren't configurable enough or
+ * just can't anticipate how format should be done.  Sometimes this is
+ * personal preference, other times it is practical experience.  In any
+ * case, this check should just ensure that a minimal set of indentation
+ * rules are followed.
+ * </p>
+ *
+ * <p>
+ * Implementation --
+ *  Basically, this check requests visitation for all handled token
+ *  types (those tokens registered in the HandlerFactory).  When visitToken
+ *  is called, a new ExpressionHandler is created for the AST and pushed
+ *  onto the mHandlers stack.  The new handler then checks the indentation
+ *  for the currently visiting AST.  When leaveToken is called, the
+ *  ExpressionHandler is popped from the stack.
+ * </p>
+ *
+ * <p>
+ *  While on the stack the ExpressionHandler can be queried for the
+ *  indentation level it suggests for children as well as for other
+ *  values.
+ * </p>
+ *
+ * <p>
+ *  While an ExpressionHandler checks the indentation level of its own
+ *  AST, it typically also checks surrounding ASTs.  For instance, a
+ *  while loop handler checks the while loop as well as the braces
+ *  and immediate children.
+ * </p>
+ * <pre>
+ *   - handler class -to-> ID mapping kept in Map
+ *   - parent passed in during construction
+ *   - suggest child indent level
+ *   - allows for some tokens to be on same line (ie inner classes OBJBLOCK)
+ *     and not increase indentation level
+ *   - looked at using double dispatch for suggestedChildLevel(), but it
+ *     doesn't seem worthwhile, at least now
+ *   - both tabs and spaces are considered whitespace in front of the line...
+ *     tabs are converted to spaces
+ *   - block parents with parens -- for, while, if, etc... -- are checked that
+ *     they match the level of the parent
+ * </pre>
+ *
+ * @author jrichard
+ * @author o_sukhodolsky
+ * @author Maikel Steneker
+ * @author maxvetrenko
+ */
+public class IndentationCheck extends Check
+{
+    /** Default indentation amount - based on Sun */
+    private static final int DEFAULT_INDENTATION = 4;
+
+    /** how many tabs or spaces to use */
+    private int mBasicOffset = DEFAULT_INDENTATION;
+
+    /** how much to indent a case label */
+    private int mCaseIndentationAmount = DEFAULT_INDENTATION;
+
+    /** how far brace should be indented when on next line */
+    private int mBraceAdjustment;
+
+    /** how far throws should be indented when on next line */
+    private int mThrowsIndentationAmount = DEFAULT_INDENTATION;
+
+    /** how much to indent an array initialization when on next line */
+    private int mArrayInitIndentationAmount = DEFAULT_INDENTATION;
+
+    /** how far continuation line should be indented when line-wrapping is present */
+    private int mLineWrappingIndentation = DEFAULT_INDENTATION;
+
+    /** handlers currently in use */
+    private final FastStack<ExpressionHandler> mHandlers =
+        FastStack.newInstance();
+
+    /** factory from which handlers are distributed */
+    private final HandlerFactory mHandlerFactory = new HandlerFactory();
+
+    /** Creates a new instance of IndentationCheck. */
+    public IndentationCheck()
+    {
+    }
+
+    /**
+     * Set the basic offset.
+     *
+     * @param aBasicOffset   the number of tabs or spaces to indent
+     */
+    public void setBasicOffset(int aBasicOffset)
+    {
+        mBasicOffset = aBasicOffset;
+    }
+
+    /**
+     * Get the basic offset.
+     *
+     * @return the number of tabs or spaces to indent
+     */
+    public int getBasicOffset()
+    {
+        return mBasicOffset;
+    }
+
+    /**
+     * Adjusts brace indentation (positive offset).
+     *
+     * @param aAdjustmentAmount   the brace offset
+     */
+    public void setBraceAdjustment(int aAdjustmentAmount)
+    {
+        mBraceAdjustment = aAdjustmentAmount;
+    }
+
+    /**
+     * Get the brace adjustment amount.
+     *
+     * @return the positive offset to adjust braces
+     */
+    public int getBraceAdjustement()
+    {
+        return mBraceAdjustment;
+    }
+
+    /**
+     * Set the case indentation level.
+     *
+     * @param aAmount   the case indentation level
+     */
+    public void setCaseIndent(int aAmount)
+    {
+        mCaseIndentationAmount = aAmount;
+    }
+
+    /**
+     * Get the case indentation level.
+     *
+     * @return the case indentation level
+     */
+    public int getCaseIndent()
+    {
+        return mCaseIndentationAmount;
+    }
+
+    /**
+     * Set the throws indentation level.
+     *
+     * @param aThrowsIndent the throws indentation level
+     */
+    public void setThrowsIndent(int aThrowsIndent)
+    {
+        mThrowsIndentationAmount = aThrowsIndent;
+    }
+
+    /**
+     * Get the throws indentation level.
+     *
+     * @return the throws indentation level
+     */
+    public int getThrowsIndent()
+    {
+        return this.mThrowsIndentationAmount;
+    }
+
+    /**
+     * Set the array initialisation indentation level.
+     *
+     * @param aArrayInitIndent the array initialisation indentation level
+     */
+    public void setArrayInitIndent(int aArrayInitIndent)
+    {
+        mArrayInitIndentationAmount = aArrayInitIndent;
+    }
+
+    /**
+     * Get the line-wrapping indentation level.
+     *
+     * @return the initialisation indentation level
+     */
+    public int getArrayInitIndent()
+    {
+        return this.mArrayInitIndentationAmount;
+    }
+
+    /**
+     * Get the array line-wrapping indentation level.
+     *
+     * @return the line-wrapping indentation level
+     */
+    public int getLineWrappingIndentation()
+    {
+        return mLineWrappingIndentation;
+    }
+
+
+    /**
+     * Set the line-wrapping indentation level.
+     *
+     * @param aLineWrappingIndentation the line-wrapping indentation level
+     */
+    public void setLineWrappingIndentation(int aLineWrappingIndentation)
+    {
+        mLineWrappingIndentation = aLineWrappingIndentation;
+    }
+
+    /**
+     * Log an error message.
+     *
+     * @param aLine the line number where the error was found
+     * @param aKey the message that describes the error
+     * @param aArgs the details of the message
+     *
+     * @see java.text.MessageFormat
+     */
+    public void indentationLog(int aLine, String aKey, Object... aArgs)
+    {
+        super.log(aLine, aKey, aArgs);
+    }
+
+    /**
+     * Get the width of a tab.
+     *
+     * @return the width of a tab
+     */
+    public int getIndentationTabWidth()
+    {
+        return getTabWidth();
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return mHandlerFactory.getHandledTypes();
+    }
+
+    @Override
+    public void beginTree(DetailAST aAst)
+    {
+        mHandlerFactory.clearCreatedHandlers();
+        mHandlers.clear();
+        mHandlers.push(new PrimordialHandler(this));
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final ExpressionHandler handler = mHandlerFactory.getHandler(this, aAST,
+            mHandlers.peek());
+        mHandlers.push(handler);
+        try {
+            handler.checkIndentation();
+        }
+        catch (final NullPointerException npe) {
+            npe.printStackTrace();
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        mHandlers.pop();
+    }
+
+    /**
+     * Accessor for the handler factory.
+     *
+     * @return the handler factory
+     */
+    final HandlerFactory getHandlerFactory()
+    {
+        return mHandlerFactory;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndexHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndexHandler.java
new file mode 100644
index 0000000..56fc4ee
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndexHandler.java
@@ -0,0 +1,58 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * Handler for array index operation.
+ *
+ * @author yudindi
+ */
+public class IndexHandler extends ExpressionHandler
+{
+
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAST           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public IndexHandler(IndentationCheck aIndentCheck,
+                      DetailAST aAST,
+                      ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "index op", aAST, aParent);
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        // do nothing. Used to provide a correct suggested child level for now.
+    }
+
+    @Override
+    public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
+    {
+        return getLevel();
+    }
+
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/LabelHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/LabelHandler.java
new file mode 100644
index 0000000..f25396e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/LabelHandler.java
@@ -0,0 +1,80 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for labels.
+ *
+ * @author jrichard
+ */
+public class LabelHandler extends ExpressionHandler
+{
+    /**
+     * The types of expressions that are children of a label.
+     */
+    private final int[] mLabelChildren = new int[] {
+        TokenTypes.IDENT,
+    };
+
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aExpr          the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public LabelHandler(IndentationCheck aIndentCheck,
+        DetailAST aExpr, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "label", aExpr, aParent);
+    }
+
+    @Override
+    protected IndentLevel getLevelImpl()
+    {
+        final IndentLevel level = new IndentLevel(super.getLevelImpl(), -getBasicOffset());
+        level.addAcceptedIndent(super.getLevelImpl());
+        return level;
+    }
+
+    /**
+     * Check the indentation of the label.
+     */
+    private void checkLabel()
+    {
+        checkChildren(getMainAst(), mLabelChildren, getLevel(), true, false);
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        checkLabel();
+        // need to check children (like 'block' parents do)
+        final DetailAST parent = getMainAst().getFirstChild().getNextSibling();
+
+        final IndentLevel expected =
+            new IndentLevel(getLevel(), getBasicOffset());
+
+        checkExpressionSubtree(parent, expected, true, false);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/LineSet.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/LineSet.java
new file mode 100644
index 0000000..dec0016
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/LineSet.java
@@ -0,0 +1,105 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.google.common.collect.Maps;
+import java.util.SortedMap;
+
+/**
+ * Represents a set of lines.
+ *
+ * @author jrichard
+ */
+public class LineSet
+{
+    /**
+     * Maps line numbers to their start column.
+     */
+    private final SortedMap<Integer, Integer> mLines = Maps.newTreeMap();
+
+    /**
+     * Get the starting column for a given line number.
+     *
+     * @param aLineNum   the specified line number
+     *
+     * @return the starting column for the given line number
+     */
+    public Integer getStartColumn(Integer aLineNum)
+    {
+        return mLines.get(aLineNum);
+    }
+
+    /**
+     * Get the starting column for the first line.
+     *
+     * @return the starting column for the first line.
+     */
+    public int firstLineCol()
+    {
+        final Object firstLineKey = mLines.firstKey();
+        return (mLines.get(firstLineKey)).intValue();
+    }
+
+    /**
+     * Get the line number of the first line.
+     *
+     * @return the line number of the first line
+     */
+    public int firstLine()
+    {
+        return (mLines.firstKey()).intValue();
+    }
+
+    /**
+     * Get the line number of the last line.
+     *
+     * @return the line number of the last line
+     */
+    public int lastLine()
+    {
+        return (mLines.lastKey()).intValue();
+    }
+
+    /**
+     * Add a line to this set of lines.
+     *
+     * @param aLineNum   the line to add
+     * @param aCol       the starting column of the new line
+     */
+    public void addLineAndCol(int aLineNum, int aCol)
+    {
+        mLines.put(aLineNum, aCol);
+    }
+
+    /**
+     * Determines if this set of lines is empty.
+     *
+     * @return true if it is empty, false otherwise
+     */
+    public boolean isEmpty()
+    {
+        return mLines.isEmpty();
+    }
+
+    @Override
+    public String toString()
+    {
+        return "LineSet[ start=" + firstLine() + ", last=" + lastLine() + "]";
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/LineWrappingHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/LineWrappingHandler.java
new file mode 100644
index 0000000..f92127c
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/LineWrappingHandler.java
@@ -0,0 +1,334 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.NavigableMap;
+import java.util.TreeMap;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * This class checks line-wrapping into definitions and expressions. The
+ * line-wrapping indentation should be not less then value of the
+ * lineWrappingIndentation parameter.
+ *
+ * @author maxvetrenko
+ *
+ */
+public class LineWrappingHandler
+{
+
+    /**
+     * The current instance of <code>IndentationCheck</code> class using this
+     * handler. This field used to get access to private fields of
+     * IndentationCheck instance.
+     */
+    private final IndentationCheck mIndentCheck;
+
+    /**
+     * Root node for current expression.
+     */
+    private DetailAST mFirstNode;
+
+    /**
+     * Last node for current expression.
+     */
+    private DetailAST mLastNode;
+
+    /**
+     * User's value of line wrapping indentation.
+     */
+    private int mIndentLevel;
+
+    /**
+     * Sets values of class field, finds last node and calculates indentation level.
+     *
+     * @param aInstance
+     *            instance of IndentationCheck.
+     * @param aFirstNode
+     *            root node for current expression..
+     */
+    public LineWrappingHandler(IndentationCheck aInstance, DetailAST aFirstNode)
+    {
+        mIndentCheck = aInstance;
+        mFirstNode = aFirstNode;
+        mLastNode = findLastNode(mFirstNode);
+        mIndentLevel = mIndentCheck.getLineWrappingIndentation();
+    }
+
+    /**
+     * Finds last node of AST subtree.
+     *
+     * @param aFirstNode the first node of expression or definition.
+     * @return last node.
+     */
+    public DetailAST findLastNode(DetailAST aFirstNode)
+    {
+        return aFirstNode.getLastChild().getPreviousSibling();
+    }
+
+    /**
+     * @return correct indentation for current expression.
+     */
+    public int getCurrentIndentation()
+    {
+        return mFirstNode.getColumnNo() + mIndentLevel;
+    }
+
+    // Getters for private fields.
+
+    public final DetailAST getFirstNode()
+    {
+        return mFirstNode;
+    }
+
+    public final DetailAST getLastNode()
+    {
+        return mLastNode;
+    }
+
+    public final int getIndentLevel()
+    {
+        return mIndentLevel;
+    }
+
+    /**
+     * Checks line wrapping into expressions and definitions.
+     */
+    public void checkIndentation()
+    {
+        final NavigableMap<Integer, DetailAST> firstNodesOnLines = collectFirstNodes();
+
+        final DetailAST firstNode = firstNodesOnLines.get(firstNodesOnLines.firstKey());
+        if (firstNode.getType() == TokenTypes.AT) {
+            checkAnnotationIndentation(firstNode, firstNodesOnLines);
+        }
+
+        // First node should be removed because it was already checked before.
+        firstNodesOnLines.remove(firstNodesOnLines.firstKey());
+        final int firstNodeIndent = getFirstNodeIndent(firstNode);
+        final int currentIndent = firstNodeIndent + mIndentLevel;
+
+        for (DetailAST node : firstNodesOnLines.values()) {
+            final int currentType = node.getType();
+
+            if (currentType == TokenTypes.RCURLY
+                    || currentType == TokenTypes.RPAREN
+                    || currentType == TokenTypes.ARRAY_INIT)
+            {
+                logWarningMessage(node, firstNodeIndent);
+            }
+            else if (currentType == TokenTypes.LITERAL_IF) {
+                final DetailAST parent = node.getParent();
+
+                if (parent.getType() == TokenTypes.LITERAL_ELSE) {
+                    logWarningMessage(parent, currentIndent);
+                }
+            }
+            else {
+                logWarningMessage(node, currentIndent);
+            }
+        }
+    }
+
+    /**
+     * Calculates indentation of first node.
+     *
+     * @param aNode
+     *            first node.
+     * @return indentation of first node.
+     */
+    private int getFirstNodeIndent(DetailAST aNode)
+    {
+        int indentLevel = aNode.getColumnNo();
+
+        if (aNode.getType() == TokenTypes.LITERAL_IF
+                && aNode.getParent().getType() == TokenTypes.LITERAL_ELSE)
+        {
+            final DetailAST lcurly = aNode.getParent().getPreviousSibling();
+            final DetailAST rcurly = lcurly.getLastChild();
+
+            if (lcurly.getType() == TokenTypes.SLIST
+                    && rcurly.getLineNo() == aNode.getLineNo())
+            {
+                indentLevel = rcurly.getColumnNo();
+            }
+            else {
+                indentLevel = aNode.getParent().getColumnNo();
+            }
+        }
+        return indentLevel;
+    }
+
+    /**
+     * Finds first nodes on line and puts them into Map.
+     *
+     * @return NavigableMap which contains lines numbers as a key and first
+     *         nodes on lines as a values.
+     */
+    private NavigableMap<Integer, DetailAST> collectFirstNodes()
+    {
+        final NavigableMap<Integer, DetailAST> result = new TreeMap<Integer, DetailAST>();
+
+        result.put(mFirstNode.getLineNo(), mFirstNode);
+        DetailAST curNode = mFirstNode.getFirstChild();
+
+        while (curNode != null && curNode != mLastNode) {
+
+            if (curNode.getType() == TokenTypes.OBJBLOCK) {
+                curNode = curNode.getNextSibling();
+            }
+
+            if (curNode != null) {
+                final DetailAST firstTokenOnLine = result.get(curNode.getLineNo());
+
+                if (firstTokenOnLine == null
+                        || firstTokenOnLine != null
+                        && firstTokenOnLine.getColumnNo() >= curNode.getColumnNo())
+                {
+                    result.put(curNode.getLineNo(), curNode);
+                }
+                curNode = getNextCurNode(curNode);
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Returns next curNode node.
+     *
+     * @param aCurNode current node.
+     * @return next curNode node.
+     */
+    private DetailAST getNextCurNode(DetailAST aCurNode)
+    {
+        DetailAST nodeToVisit = aCurNode.getFirstChild();
+        DetailAST currentNode = aCurNode;
+
+        while ((currentNode != null) && (nodeToVisit == null)) {
+            nodeToVisit = currentNode.getNextSibling();
+            if (nodeToVisit == null) {
+                currentNode = currentNode.getParent();
+            }
+        }
+        return nodeToVisit;
+    }
+
+    /**
+     * Checks line wrapping into annotations.
+     *
+     * @param aModifiersNode modifiers node.
+     * @param aFirstNodesOnLines map which contains
+     *     first nodes as values and line numbers as keys.
+     */
+    private void checkAnnotationIndentation(DetailAST aModifiersNode,
+            NavigableMap<Integer, DetailAST> aFirstNodesOnLines)
+    {
+        final int currentIndent = aModifiersNode.getColumnNo() + mIndentLevel;
+        final int firstNodeIndent = aModifiersNode.getColumnNo();
+        final Collection<DetailAST> values = aFirstNodesOnLines.values();
+
+        final Iterator<DetailAST> itr = values.iterator();
+        while (itr.hasNext() && aFirstNodesOnLines.size() > 1) {
+            final DetailAST node = itr.next();
+            final int parentType = node.getParent().getType();
+
+            if (node.getType() == TokenTypes.AT) {
+
+                if (isAnnotationAloneOnLine(node.getParent())) {
+                    logWarningMessage(node, firstNodeIndent);
+                    itr.remove();
+                }
+            }
+            else if (parentType != TokenTypes.MODIFIERS
+                    && !hasTypeNodeAsParent(node)
+                    && parentType != TokenTypes.ENUM_DEF
+                    && parentType != TokenTypes.CTOR_DEF
+                    && node.getType() != TokenTypes.LITERAL_CLASS)
+            {
+                logWarningMessage(node, currentIndent);
+                itr.remove();
+            }
+        }
+    }
+
+    /**
+     * Checks if annotation is alone on line.
+     *
+     * @param aAnnotationNode
+     *            current annotation.
+     * @return true if annotation is alone on line.
+     */
+    private boolean isAnnotationAloneOnLine(DetailAST aAnnotationNode)
+    {
+        final DetailAST nextSibling = aAnnotationNode.getNextSibling();
+        if (nextSibling == null) {
+            final DetailAST typeNode = aAnnotationNode.getParent().getNextSibling();
+            return aAnnotationNode.getLineNo() != typeNode.getLineNo();
+        }
+        else {
+            return (nextSibling.getType() == TokenTypes.ANNOTATION
+                || aAnnotationNode.getLineNo() != nextSibling.getLineNo());
+        }
+    }
+
+    /**
+     * Checks if current node has TYPE node as a parent.
+     *
+     * @param aCurrentNode
+     *            current node.
+     * @return true if current node has TYPE node as a parent.
+     */
+    private boolean hasTypeNodeAsParent(DetailAST aCurrentNode)
+    {
+        DetailAST typeNode = aCurrentNode;
+        boolean result = false;
+        while (typeNode != null && typeNode.getType() != TokenTypes.SLIST
+                && typeNode.getType() != TokenTypes.OBJBLOCK)
+        {
+            if (typeNode.getType() == TokenTypes.TYPE
+                    || typeNode.getType() == TokenTypes.TYPE_PARAMETERS)
+            {
+                result = true;
+            }
+            typeNode = typeNode.getParent();
+        }
+        return result;
+    }
+
+    /**
+     * Logs warning message if indentation is incorrect.
+     *
+     * @param aCurrentNode
+     *            current node which probably invoked an error.
+     * @param aCurrentIndent
+     *            correct indentation.
+     */
+    private void logWarningMessage(DetailAST aCurrentNode, int aCurrentIndent)
+    {
+        if (aCurrentNode.getColumnNo() < aCurrentIndent) {
+            mIndentCheck.indentationLog(aCurrentNode.getLineNo(),
+                    "indentation.error", aCurrentNode.getText(),
+                    aCurrentNode.getColumnNo(), aCurrentIndent);
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/MemberDefHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/MemberDefHandler.java
new file mode 100644
index 0000000..64ae5f7
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/MemberDefHandler.java
@@ -0,0 +1,112 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for member definitions.
+ *
+ * @author o_sukhodolsky
+ */
+public class MemberDefHandler extends ExpressionHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAST           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public MemberDefHandler(IndentationCheck aIndentCheck,
+        DetailAST aAST, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "member def", aAST, aParent);
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        final DetailAST modifiersNode = getMainAst().findFirstToken(TokenTypes.MODIFIERS);
+        if (modifiersNode.getChildCount() != 0) {
+            checkModifiers();
+        }
+        else {
+            checkType();
+        }
+        final LineWrappingHandler lineWrap =
+            new LineWrappingHandler(getIndentCheck(), getMainAst()) {
+                @Override
+                public DetailAST findLastNode(DetailAST aFirstNode)
+                {
+                    DetailAST lastNode = getFirstNode().getLastChild();
+                    if (lastNode.getType() != TokenTypes.SEMI) {
+                        lastNode = getFirstNode().getNextSibling();
+                    }
+                    return lastNode;
+                }
+            };
+        if (lineWrap.getLastNode() != null && !isArrayDeclaration(getMainAst())) {
+            lineWrap.checkIndentation();
+        }
+    }
+
+    @Override
+    public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
+    {
+        return getLevel();
+    }
+
+    @Override
+    protected void checkModifiers()
+    {
+        final DetailAST modifier = getMainAst().findFirstToken(TokenTypes.MODIFIERS);
+        if (startsLine(modifier)
+            && !getLevel().accept(expandedTabsColumnNo(modifier)))
+        {
+            logError(modifier, "modifier", expandedTabsColumnNo(modifier));
+        }
+    }
+
+    /**
+     * Check the indentation of the method type.
+     */
+    private void checkType()
+    {
+        final DetailAST type = getMainAst().findFirstToken(TokenTypes.TYPE);
+        final DetailAST ident = ExpressionHandler.getFirstToken(type);
+        final int columnNo = expandedTabsColumnNo(ident);
+        if (startsLine(ident) && !getLevel().accept(columnNo)) {
+            logError(ident, "type", columnNo);
+        }
+    }
+
+    /**
+     * Checks if variable_def node is array declaration.
+     * @param aVariableDef current variable_def.
+     * @return true if variable_def node is array declaration.
+     */
+    private boolean isArrayDeclaration(DetailAST aVariableDef)
+    {
+        return aVariableDef.findFirstToken(TokenTypes.TYPE)
+            .findFirstToken(TokenTypes.ARRAY_DECLARATOR) != null;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/MethodCallHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/MethodCallHandler.java
new file mode 100644
index 0000000..3131546
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/MethodCallHandler.java
@@ -0,0 +1,209 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for method calls.
+ *
+ * @author jrichard
+ */
+public class MethodCallHandler extends ExpressionHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAST           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public MethodCallHandler(IndentationCheck aIndentCheck,
+        DetailAST aAST, ExpressionHandler aParent)
+    {
+        super(aIndentCheck,
+            aAST.getType() == TokenTypes.METHOD_CALL
+                ? "method call" : "ctor call",
+            aAST,
+            aParent);
+    }
+
+    @Override
+    protected IndentLevel getLevelImpl()
+    {
+        // if inside a method call's params, this could be part of
+        // an expression, so get the previous line's start
+        if (getParent() instanceof MethodCallHandler) {
+            final MethodCallHandler container =
+                ((MethodCallHandler) getParent());
+            if (container != null) {
+                if (areOnSameLine(container.getMainAst(), getMainAst())) {
+                    return container.getLevel();
+                }
+
+                // we should increase indentation only if this is the first
+                // chained method call which was moved to the next line
+                final DetailAST main = getMainAst();
+                final DetailAST dot = main.getFirstChild();
+                final DetailAST target = dot.getFirstChild();
+
+                if ((dot.getType() == TokenTypes.DOT)
+                    && (target.getType() == TokenTypes.METHOD_CALL))
+                {
+                    final DetailAST dot1 = target.getFirstChild();
+                    final DetailAST target1 = dot1.getFirstChild();
+
+                    if ((dot1.getType() == TokenTypes.DOT)
+                        && (target1.getType() == TokenTypes.METHOD_CALL))
+                    {
+                        return container.getLevel();
+                    }
+                }
+                return new IndentLevel(container.getLevel(), getBasicOffset());
+            }
+
+            // if we get here, we are the child of the left hand side (name
+            //  side) of a method call with no "containing" call, use
+            //  the first non-method call parent
+
+            ExpressionHandler p = getParent();
+            while (p instanceof MethodCallHandler) {
+                p = p.getParent();
+            }
+            return p.suggestedChildLevel(this);
+        }
+
+        // if our expression isn't first on the line, just use the start
+        // of the line
+        final LineSet lines = new LineSet();
+        findSubtreeLines(lines, getMainAst().getFirstChild(), true);
+        final int firstCol = lines.firstLineCol();
+        final int lineStart = getLineStart(getFirstAst(getMainAst()));
+        if (lineStart != firstCol) {
+            return new IndentLevel(lineStart);
+        }
+        return super.getLevelImpl();
+    }
+
+    /**
+     * Get the first AST of the specified method call.
+     *
+     * @param aAst
+     *            the method call
+     *
+     * @return the first AST of the specified method call
+     */
+    private DetailAST getFirstAst(DetailAST aAst)
+    {
+        // walk down the first child part of the dots that make up a method
+        // call name
+
+        DetailAST ast = aAst.getFirstChild();
+        while ((ast != null) && (ast.getType() == TokenTypes.DOT)) {
+            ast = ast.getFirstChild();
+        }
+
+        if (ast == null) {
+            ast = aAst;
+        }
+
+        return ast;
+    }
+
+    @Override
+    public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
+    {
+        // for whatever reason a method that crosses lines, like asList
+        // here:
+        //            System.out.println("methods are: " + Arrays.asList(
+        //                new String[] {"method"}).toString());
+        // will not have the right line num, so just get the child name
+
+        final DetailAST first = getMainAst().getFirstChild();
+        int indentLevel = getLineStart(first);
+        if (!areOnSameLine(aChild.getMainAst().getFirstChild(),
+                           getMainAst().getFirstChild()))
+        {
+            indentLevel += getBasicOffset();
+        }
+        return new IndentLevel(indentLevel);
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        final DetailAST exprNode = getMainAst().getParent();
+        if (exprNode.getParent().getType() != TokenTypes.LCURLY
+            && exprNode.getParent().getType() != TokenTypes.SLIST)
+        {
+            return;
+        }
+        final DetailAST methodName = getMainAst().getFirstChild();
+        checkExpressionSubtree(methodName, getLevel(), false, false);
+
+        final DetailAST lparen = getMainAst();
+        final DetailAST rparen = getMainAst().findFirstToken(TokenTypes.RPAREN);
+        checkLParen(lparen);
+
+        if (rparen.getLineNo() == lparen.getLineNo()) {
+            return;
+        }
+
+        checkExpressionSubtree(
+            getMainAst().findFirstToken(TokenTypes.ELIST),
+            new IndentLevel(getLevel(), getBasicOffset()),
+            false, true);
+
+        checkRParen(lparen, rparen);
+        final LineWrappingHandler lineWrap =
+            new LineWrappingHandler(getIndentCheck(), getMainAst()) {
+                @Override
+                public DetailAST findLastNode(DetailAST aFirstNode)
+                {
+                    DetailAST lastNode;
+                    if (getFirstNode().getNextSibling() == null) {
+                        lastNode = getFirstNode().getLastChild();
+                    }
+                    else {
+                        lastNode = getFirstNode().getNextSibling();
+                    }
+                    return lastNode;
+                }
+
+                @Override
+                public int getCurrentIndentation()
+                {
+                    DetailAST curNode = getFirstNode();
+                    while (curNode.getType() != TokenTypes.IDENT) {
+                        curNode = curNode.getFirstChild();
+                    }
+                    return curNode.getColumnNo() + getIndentLevel();
+                }
+            };
+        lineWrap.checkIndentation();
+    }
+
+    @Override
+    protected boolean shouldIncreaseIndent()
+    {
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/MethodDefHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/MethodDefHandler.java
new file mode 100644
index 0000000..c4fd64b
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/MethodDefHandler.java
@@ -0,0 +1,85 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for method definitions.
+ *
+ * @author jrichard
+ * @author Maikel Steneker
+ */
+public class MethodDefHandler extends BlockParentHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public MethodDefHandler(IndentationCheck aIndentCheck,
+        DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, (aAst.getType() == TokenTypes.CTOR_DEF)
+            ? "ctor def" : "method def", aAst, aParent);
+    }
+
+    @Override
+    protected DetailAST getToplevelAST()
+    {
+        // we check this stuff ourselves below
+        return null;
+    }
+
+    @Override
+    protected void checkModifiers()
+    {
+        final DetailAST modifier = getMainAst().findFirstToken(TokenTypes.MODIFIERS);
+        if (startsLine(modifier)
+            && !getLevel().accept(expandedTabsColumnNo(modifier)))
+        {
+            logError(modifier, "modifier", expandedTabsColumnNo(modifier));
+        }
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        checkModifiers();
+
+        final LineWrappingHandler lineWrap =
+            new LineWrappingHandler(getIndentCheck(), getMainAst()) {
+                @Override
+                public DetailAST findLastNode(DetailAST aFirstNode)
+                {
+                    return aFirstNode.getLastChild().getPreviousSibling();
+                }
+            };
+        lineWrap.checkIndentation();
+        if (getLCurly() == null) {
+            // asbtract method def -- no body
+            return;
+        }
+        super.checkIndentation();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/NewHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/NewHandler.java
new file mode 100644
index 0000000..60e18a4
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/NewHandler.java
@@ -0,0 +1,102 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for operator new.
+ * @author o_sukhodolsky
+ * @author Ilja Dubinin
+ */
+public class NewHandler extends ExpressionHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAST           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public NewHandler(IndentationCheck aIndentCheck,
+                      DetailAST aAST,
+                      ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "operator new", aAST, aParent);
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        final DetailAST type = getMainAst().getFirstChild();
+        if (type != null) {
+            checkExpressionSubtree(type, getLevel(), false, false);
+        }
+
+        final DetailAST lparen = getMainAst().findFirstToken(TokenTypes.LPAREN);
+        final DetailAST rparen = getMainAst().findFirstToken(TokenTypes.RPAREN);
+        checkLParen(lparen);
+
+        if ((rparen == null) || (lparen == null)
+            || (rparen.getLineNo() == lparen.getLineNo()))
+        {
+            return;
+        }
+
+        if (getMainAst().getType() != TokenTypes.OBJBLOCK) {
+            return;
+        }
+
+        // if this method name is on the same line as a containing
+        // method, don't indent, this allows expressions like:
+        //    method("my str" + method2(
+        //        "my str2"));
+        // as well as
+        //    method("my str" +
+        //        method2(
+        //            "my str2"));
+        //
+
+        checkExpressionSubtree(
+            getMainAst().findFirstToken(TokenTypes.ELIST),
+            new IndentLevel(getLevel(), getBasicOffset()),
+            false, true);
+
+        checkRParen(lparen, rparen);
+    }
+
+    @Override
+    protected IndentLevel getLevelImpl()
+    {
+        // if our expression isn't first on the line, just use the start
+        // of the line
+        if (getLineStart(getMainAst()) != getMainAst().getColumnNo()) {
+            return new IndentLevel(getLineStart(getMainAst()));
+        }
+        return super.getLevelImpl();
+    }
+
+    @Override
+    protected boolean shouldIncreaseIndent()
+    {
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ObjectBlockHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ObjectBlockHandler.java
new file mode 100644
index 0000000..74dd5e8
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/ObjectBlockHandler.java
@@ -0,0 +1,130 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for inner classes.
+ *
+ * @author jrichard
+ */
+public class ObjectBlockHandler extends BlockParentHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public ObjectBlockHandler(IndentationCheck aIndentCheck,
+        DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "object def", aAst, aParent);
+    }
+
+    @Override
+    protected DetailAST getToplevelAST()
+    {
+        return null;
+    }
+
+    @Override
+    protected DetailAST getLCurly()
+    {
+        return getMainAst().findFirstToken(TokenTypes.LCURLY);
+    }
+
+    @Override
+    protected DetailAST getRCurly()
+    {
+        return getMainAst().findFirstToken(TokenTypes.RCURLY);
+    }
+
+    @Override
+    protected DetailAST getListChild()
+    {
+        return getMainAst();
+    }
+
+    @Override
+    protected IndentLevel getLevelImpl()
+    {
+        final DetailAST parentAST = getMainAst().getParent();
+        IndentLevel indent = getParent().getLevel();
+        if (parentAST.getType() == TokenTypes.LITERAL_NEW) {
+            indent.addAcceptedIndent(super.getLevelImpl());
+        }
+        else if (parentAST.getType() == TokenTypes.ENUM_CONSTANT_DEF) {
+            indent = super.getLevelImpl();
+        }
+        return indent;
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        // if we have a class or interface as a parent, don't do anything,
+        // as this is checked by class def; so
+        // only do this if we have a new for a parent (anonymous inner
+        // class)
+        final DetailAST parentAST = getMainAst().getParent();
+        if (parentAST.getType() != TokenTypes.LITERAL_NEW) {
+            return;
+        }
+
+        super.checkIndentation();
+    }
+
+    @Override
+    protected boolean rcurlyMustStart()
+    {
+        return false;
+    }
+
+    @Override
+    protected void checkRCurly()
+    {
+        final DetailAST lcurly = getLCurly();
+        final DetailAST rcurly = getRCurly();
+        final int rcurlyPos = expandedTabsColumnNo(rcurly);
+        final IndentLevel level = curlyLevel();
+        level.addAcceptedIndent(level.getFirstIndentLevel() + getLineWrappingIndent());
+
+        if ((rcurly != null) && !level.accept(rcurlyPos)
+            && (rcurlyMustStart() || startsLine(rcurly))
+                && !areOnSameLine(rcurly, lcurly))
+        {
+            logError(rcurly, "rcurly", rcurlyPos, curlyLevel());
+        }
+    }
+
+    /**
+     * A shortcut for <code>IndentationCheck</code> property.
+     * @return value of lineWrappingIndentation property
+     *         of <code>IndentationCheck</code>
+     */
+    private int getLineWrappingIndent()
+    {
+        return getIndentCheck().getLineWrappingIndentation();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/PackageDefHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/PackageDefHandler.java
new file mode 100644
index 0000000..f46fe05
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/PackageDefHandler.java
@@ -0,0 +1,57 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for package definitions.
+ *
+ * @author jrichard
+ */
+public class PackageDefHandler extends ExpressionHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public PackageDefHandler(IndentationCheck aIndentCheck,
+            DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "package def", aAst, aParent);
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        final int columnNo = expandedTabsColumnNo(getMainAst());
+        if (!getLevel().accept(columnNo)) {
+            logError(getMainAst(), "", columnNo);
+        }
+
+        checkLinesIndent(getMainAst().getLineNo(),
+            getMainAst().findFirstToken(TokenTypes.SEMI).getLineNo(),
+            getLevel());
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/PrimordialHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/PrimordialHandler.java
new file mode 100644
index 0000000..4aa2431
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/PrimordialHandler.java
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+/**
+ * A default no-op handler.
+ *
+ * @author jrichard
+ */
+public class PrimordialHandler extends ExpressionHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check.
+     *
+     * @param aIndentCheck   the indentation check
+     */
+    public PrimordialHandler(IndentationCheck aIndentCheck)
+    {
+        super(aIndentCheck, null, null, null);
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        // nothing to check
+    }
+
+    @Override
+    public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
+    {
+        return new IndentLevel(0);
+    }
+
+    @Override
+    protected IndentLevel getLevelImpl()
+    {
+        return new IndentLevel(0);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/SlistHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/SlistHandler.java
new file mode 100644
index 0000000..d13755d
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/SlistHandler.java
@@ -0,0 +1,133 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for a list of statements.
+ *
+ * @author jrichard
+ */
+public class SlistHandler extends BlockParentHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public SlistHandler(IndentationCheck aIndentCheck,
+        DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "block", aAst, aParent);
+    }
+
+    @Override
+    public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
+    {
+        // this is:
+        //  switch (var) {
+        //     case 3: {
+        //        break;
+        //     }
+        //  }
+        //  ... the case SLIST is followed by a user-created SLIST and
+        //  preceded by a switch
+
+        // if our parent is a block handler we want to be transparent
+        if (((getParent() instanceof BlockParentHandler)
+                && !(getParent() instanceof SlistHandler))
+            || ((getParent() instanceof CaseHandler)
+                && (aChild instanceof SlistHandler)))
+        {
+            return getParent().suggestedChildLevel(aChild);
+        }
+        return super.suggestedChildLevel(aChild);
+    }
+
+    @Override
+    protected DetailAST getNonlistChild()
+    {
+        // blocks always have either block children or they are transparent
+        // and aren't checking children at all.  In the later case, the
+        // superclass will want to check single children, so when it
+        // does tell it we have none.
+        return null;
+    }
+
+    @Override
+    protected DetailAST getListChild()
+    {
+        return getMainAst();
+    }
+
+    @Override
+    protected DetailAST getLCurly()
+    {
+        return getMainAst();
+    }
+
+    @Override
+    protected DetailAST getRCurly()
+    {
+        return getMainAst().findFirstToken(TokenTypes.RCURLY);
+    }
+
+    @Override
+    protected DetailAST getToplevelAST()
+    {
+        return null;
+    }
+
+    /**
+     * Determine if the expression we are handling has a block parent.
+     *
+     * @return true if it does, false otherwise
+     */
+    private boolean hasBlockParent()
+    {
+        final int parentType = getMainAst().getParent().getType();
+        return (parentType == TokenTypes.LITERAL_IF)
+            || (parentType == TokenTypes.LITERAL_FOR)
+            || (parentType == TokenTypes.LITERAL_WHILE)
+            || (parentType == TokenTypes.LITERAL_DO)
+            || (parentType == TokenTypes.LITERAL_ELSE)
+            || (parentType == TokenTypes.LITERAL_TRY)
+            || (parentType == TokenTypes.LITERAL_CATCH)
+            || (parentType == TokenTypes.LITERAL_FINALLY)
+            || (parentType == TokenTypes.CTOR_DEF)
+            || (parentType == TokenTypes.METHOD_DEF)
+            || (parentType == TokenTypes.STATIC_INIT);
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        // only need to check this if parent is not
+        // an if, else, while, do, ctor, method
+        if (hasBlockParent()) {
+            return;
+        }
+        super.checkIndentation();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/StaticInitHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/StaticInitHandler.java
new file mode 100644
index 0000000..a0bc22c
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/StaticInitHandler.java
@@ -0,0 +1,49 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * Handler for static initialization blocks.
+ *
+ * @author Jeff Weston
+ */
+public class StaticInitHandler extends BlockParentHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public StaticInitHandler(IndentationCheck aIndentCheck,
+        DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "static initialization", aAst, aParent);
+    }
+
+    @Override
+    protected boolean toplevelMustStartLine()
+    {
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/SwitchHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/SwitchHandler.java
new file mode 100644
index 0000000..d23022f
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/SwitchHandler.java
@@ -0,0 +1,92 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for switch statements.
+ *
+ * @author jrichard
+ */
+public class SwitchHandler extends BlockParentHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public SwitchHandler(IndentationCheck aIndentCheck,
+        DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "switch", aAst, aParent);
+    }
+
+    @Override
+    protected DetailAST getLCurly()
+    {
+        return getMainAst().findFirstToken(TokenTypes.LCURLY);
+    }
+
+    @Override
+    protected DetailAST getRCurly()
+    {
+        return getMainAst().findFirstToken(TokenTypes.RCURLY);
+    }
+
+    @Override
+    protected DetailAST getListChild()
+    {
+        // all children should be taken care of by case handler (plus
+        // there is no parent of just the cases, if checking is needed
+        // here in the future, an additional way beyond checkChildren()
+        // will have to be devised to get children)
+        return null;
+    }
+
+    @Override
+    protected DetailAST getNonlistChild()
+    {
+        return null;
+    }
+
+    /**
+     * Check the indentation of the switch expression.
+     */
+    private void checkSwitchExpr()
+    {
+        checkExpressionSubtree(
+            getMainAst().findFirstToken(TokenTypes.LPAREN).
+                getNextSibling(),
+            getLevel(),
+            false,
+            false);
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        checkSwitchExpr();
+        super.checkIndentation();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/TryHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/TryHandler.java
new file mode 100644
index 0000000..8f818d6
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/TryHandler.java
@@ -0,0 +1,54 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * Handler for try blocks.
+ *
+ * @author jrichard
+ */
+public class TryHandler extends BlockParentHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public TryHandler(IndentationCheck aIndentCheck,
+        DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "try", aAst, aParent);
+    }
+
+    @Override
+    public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
+    {
+        if ((aChild instanceof CatchHandler)
+            || (aChild instanceof FinallyHandler))
+        {
+            return getLevel();
+        }
+        return super.suggestedChildLevel(aChild);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/WhileHandler.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/WhileHandler.java
new file mode 100644
index 0000000..329d6e7
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/WhileHandler.java
@@ -0,0 +1,62 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Handler for while loops.
+ *
+ * @author jrichard
+ */
+public class WhileHandler extends BlockParentHandler
+{
+    /**
+     * Construct an instance of this handler with the given indentation check,
+     * abstract syntax tree, and parent handler.
+     *
+     * @param aIndentCheck   the indentation check
+     * @param aAst           the abstract syntax tree
+     * @param aParent        the parent handler
+     */
+    public WhileHandler(IndentationCheck aIndentCheck,
+        DetailAST aAst, ExpressionHandler aParent)
+    {
+        super(aIndentCheck, "while", aAst, aParent);
+    }
+
+    /**
+     * Check the indentation of the conditional expression.
+     */
+    private void checkCondExpr()
+    {
+        final DetailAST condAst = getMainAst().findFirstToken(TokenTypes.EXPR);
+        final IndentLevel expected =
+            new IndentLevel(getLevel(), getBasicOffset());
+        checkExpressionSubtree(condAst, expected, false, false);
+    }
+
+    @Override
+    public void checkIndentation()
+    {
+        checkCondExpr();
+        super.checkIndentation();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/package-info.java
new file mode 100644
index 0000000..7f8e884
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/package-info.java
@@ -0,0 +1,24 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains all classes required for the
+ * <span class="xdocspagetitle">indentation</span> check.
+ */
+package com.puppycrawl.tools.checkstyle.checks.indentation;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/HtmlTag.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/HtmlTag.java
new file mode 100644
index 0000000..18c9d65
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/HtmlTag.java
@@ -0,0 +1,137 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+/**
+ * Used to keep track of a tag and the text that follows it.
+ *
+ * @author Chris Stillwell
+ */
+class HtmlTag
+{
+    /** The maximum length of text to display with this tag. */
+    private static final int MAX_TEXT_LEN = 60;
+
+    /** The HTML tag name. */
+    private final String mId;
+
+    /** The line number in the source file where this tag was found. */
+    private final int mLineNo;
+
+    /** The position within the line where this tag was found. */
+    private final int mPosition;
+
+    /** The comment line of text where this tag appears. */
+    private final String mText;
+
+    /** if this tag is self-closed. */
+    private final boolean mClosedTag;
+
+    /** if the tag is inomplete. */
+    private final boolean mIncomplete;
+
+    /**
+     * Construct the HtmlTag.
+     * @param aId the HTML tag name.
+     * @param aLineNo the source line number of this tag.
+     * @param aPosition the position within the text of this tag.
+     * @param aClosedTag if this tag is self-closed (XHTML style)
+     * @param aIncomplete is the tag is incomplete.
+     * @param aText the line of comment text for this tag.
+     */
+    HtmlTag(String aId, int aLineNo, int aPosition, boolean aClosedTag,
+            boolean aIncomplete, String aText)
+    {
+        mId = (!"".equals(aId) && (aId.charAt(0) == '/'))
+            ? aId.substring(1) : aId;
+        mLineNo = aLineNo;
+        mPosition = aPosition;
+        mText = aText;
+        mClosedTag = aClosedTag;
+        mIncomplete = aIncomplete;
+    }
+
+    /**
+     * Returns the id (name) of this tag.
+     * @return a String id.
+     */
+    public String getId()
+    {
+        return mId;
+    }
+
+    /**
+     * Indicates if this tag is a close (end) tag.
+     * @return <code>true</code> is this is a close tag.
+     */
+    public boolean isCloseTag()
+    {
+        if (mPosition == (mText.length() - 1)) {
+            return false;
+        }
+        return (mText.charAt(mPosition + 1) == '/');
+    }
+
+    /**
+     * Indicates if this tag is a self-closed XHTML style.
+     * @return <code>true</code> is this is a self-closed tag.
+     */
+    public boolean isClosedTag()
+    {
+        return mClosedTag;
+    }
+
+    /**
+     * Indicates if this tag is incomplete (has no close >).
+     * @return <code>true</code> if the tag is incomplete.
+     */
+    public boolean isIncompleteTag()
+    {
+        return mIncomplete;
+    }
+
+    /**
+     * Returns the source line number where this tag was found.
+     * Used for displaying a Checkstyle error.
+     * @return an int line number.
+     */
+    public int getLineno()
+    {
+        return mLineNo;
+    }
+
+    /**
+     * Returns the position with in the comment line where this tag
+     * was found.  Used for displaying a Checkstyle error.
+     * @return an int relative to zero.
+     */
+    public int getPosition()
+    {
+        return mPosition;
+    }
+
+    @Override
+    public String toString()
+    {
+        final int startOfText = mPosition;
+        final int endOfText =
+            Math.min(startOfText + HtmlTag.MAX_TEXT_LEN, mText.length());
+        return mText.substring(startOfText, endOfText);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/InvalidJavadocTag.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/InvalidJavadocTag.java
new file mode 100644
index 0000000..d488aa4
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/InvalidJavadocTag.java
@@ -0,0 +1,61 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+/**
+ * Value object for storing data about an invalid Javadoc validTags.
+ * @author Oliver Burn
+ */
+public final class InvalidJavadocTag
+{
+    /** The line in which the invalid tag occurs. */
+    private final int mLine;
+    /** The column in which the invalid tag occurs. */
+    private final int mCol;
+    /** The name of the invalid tag. */
+    private final String mName;
+
+    /**
+     * Creates an instance.
+     * @param aLine the line of the tag
+     * @param aCol the column of the tag
+     * @param aName the name of the invalid tag
+     */
+    public InvalidJavadocTag(int aLine, int aCol, String aName)
+    {
+        mLine = aLine;
+        mCol = aCol;
+        mName = aName;
+    }
+
+    public int getLine()
+    {
+        return mLine;
+    }
+
+    public int getCol()
+    {
+        return mCol;
+    }
+
+    public String getName()
+    {
+        return mName;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java
new file mode 100644
index 0000000..1191359
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java
@@ -0,0 +1,967 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import antlr.collections.AST;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FileContents;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.JavadocTagInfo;
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TextBlock;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import com.puppycrawl.tools.checkstyle.checks.AbstractTypeAwareCheck;
+import com.puppycrawl.tools.checkstyle.checks.CheckUtils;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Checks the Javadoc of a method or constructor.
+ *
+ * @author Oliver Burn
+ * @author Rick Giles
+ * @author o_sukhodoslky
+ */
+public class JavadocMethodCheck extends AbstractTypeAwareCheck
+{
+    /** compiled regexp to match Javadoc tags that take an argument * */
+    private static final Pattern MATCH_JAVADOC_ARG =
+        Utils.createPattern("@(throws|exception|param)\\s+(\\S+)\\s+\\S*");
+
+    /** compiled regexp to match first part of multilineJavadoc tags * */
+    private static final Pattern MATCH_JAVADOC_ARG_MULTILINE_START =
+        Utils.createPattern("@(throws|exception|param)\\s+(\\S+)\\s*$");
+
+    /** compiled regexp to look for a continuation of the comment * */
+    private static final Pattern MATCH_JAVADOC_MULTILINE_CONT =
+        Utils.createPattern("(\\*/|@|[^\\s\\*])");
+
+    /** Multiline finished at end of comment * */
+    private static final String END_JAVADOC = "*/";
+    /** Multiline finished at next Javadoc * */
+    private static final String NEXT_TAG = "@";
+
+    /** compiled regexp to match Javadoc tags with no argument * */
+    private static final Pattern MATCH_JAVADOC_NOARG =
+        Utils.createPattern("@(return|see)\\s+\\S");
+    /** compiled regexp to match first part of multilineJavadoc tags * */
+    private static final Pattern MATCH_JAVADOC_NOARG_MULTILINE_START =
+        Utils.createPattern("@(return|see)\\s*$");
+    /** compiled regexp to match Javadoc tags with no argument and {} * */
+    private static final Pattern MATCH_JAVADOC_NOARG_CURLY =
+        Utils.createPattern("\\{\\s*@(inheritDoc)\\s*\\}");
+
+    /** Maximum children allowed * */
+    private static final int MAX_CHILDREN = 7;
+
+    /** Maximum children allowed * */
+    private static final int BODY_SIZE = 3;
+
+    /** the visibility scope where Javadoc comments are checked * */
+    private Scope mScope = Scope.PRIVATE;
+
+    /** the visibility scope where Javadoc comments shouldn't be checked * */
+    private Scope mExcludeScope;
+
+    /**
+     * controls whether to allow documented exceptions that are not declared if
+     * they are a subclass of java.lang.RuntimeException.
+     */
+    private boolean mAllowUndeclaredRTE;
+
+    /**
+     * controls whether to allow documented exceptions that are subclass of one
+     * of declared exception. Defaults to false (backward compatibility).
+     */
+    private boolean mAllowThrowsTagsForSubclasses;
+
+    /**
+     * controls whether to ignore errors when a method has parameters but does
+     * not have matching param tags in the javadoc. Defaults to false.
+     */
+    private boolean mAllowMissingParamTags;
+
+    /**
+     * controls whether to ignore errors when a method declares that it throws
+     * exceptions but does not have matching throws tags in the javadoc.
+     * Defaults to false.
+     */
+    private boolean mAllowMissingThrowsTags;
+
+    /**
+     * controls whether to ignore errors when a method returns non-void type
+     * but does not have a return tag in the javadoc. Defaults to false.
+     */
+    private boolean mAllowMissingReturnTag;
+
+    /**
+     * Controls whether to ignore errors when there is no javadoc. Defaults to
+     * false.
+     */
+    private boolean mAllowMissingJavadoc;
+
+    /**
+     * Controls whether to allow missing Javadoc on accessor methods for
+     * properties (setters and getters).
+     */
+    private boolean mAllowMissingPropertyJavadoc;
+
+    /**
+     * Set the scope.
+     *
+     * @param aFrom a <code>String</code> value
+     */
+    public void setScope(String aFrom)
+    {
+        mScope = Scope.getInstance(aFrom);
+    }
+
+    /**
+     * Set the excludeScope.
+     *
+     * @param aScope a <code>String</code> value
+     */
+    public void setExcludeScope(String aScope)
+    {
+        mExcludeScope = Scope.getInstance(aScope);
+    }
+
+    /**
+     * controls whether to allow documented exceptions that are not declared if
+     * they are a subclass of java.lang.RuntimeException.
+     *
+     * @param aFlag a <code>Boolean</code> value
+     */
+    public void setAllowUndeclaredRTE(boolean aFlag)
+    {
+        mAllowUndeclaredRTE = aFlag;
+    }
+
+    /**
+     * controls whether to allow documented exception that are subclass of one
+     * of declared exceptions.
+     *
+     * @param aFlag a <code>Boolean</code> value
+     */
+    public void setAllowThrowsTagsForSubclasses(boolean aFlag)
+    {
+        mAllowThrowsTagsForSubclasses = aFlag;
+    }
+
+    /**
+     * controls whether to allow a method which has parameters to omit matching
+     * param tags in the javadoc. Defaults to false.
+     *
+     * @param aFlag a <code>Boolean</code> value
+     */
+    public void setAllowMissingParamTags(boolean aFlag)
+    {
+        mAllowMissingParamTags = aFlag;
+    }
+
+    /**
+     * controls whether to allow a method which declares that it throws
+     * exceptions to omit matching throws tags in the javadoc. Defaults to
+     * false.
+     *
+     * @param aFlag a <code>Boolean</code> value
+     */
+    public void setAllowMissingThrowsTags(boolean aFlag)
+    {
+        mAllowMissingThrowsTags = aFlag;
+    }
+
+    /**
+     * controls whether to allow a method which returns non-void type to omit
+     * the return tag in the javadoc. Defaults to false.
+     *
+     * @param aFlag a <code>Boolean</code> value
+     */
+    public void setAllowMissingReturnTag(boolean aFlag)
+    {
+        mAllowMissingReturnTag = aFlag;
+    }
+
+    /**
+     * Controls whether to ignore errors when there is no javadoc. Defaults to
+     * false.
+     *
+     * @param aFlag a <code>Boolean</code> value
+     */
+    public void setAllowMissingJavadoc(boolean aFlag)
+    {
+        mAllowMissingJavadoc = aFlag;
+    }
+
+    /**
+     * Controls whether to ignore errors when there is no javadoc for a
+     * property accessor (setter/getter methods). Defaults to false.
+     *
+     * @param aFlag a <code>Boolean</code> value
+     */
+    public void setAllowMissingPropertyJavadoc(final boolean aFlag)
+    {
+        mAllowMissingPropertyJavadoc = aFlag;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.PACKAGE_DEF, TokenTypes.IMPORT,
+                          TokenTypes.CLASS_DEF, TokenTypes.ENUM_DEF,
+                          TokenTypes.INTERFACE_DEF,
+                          TokenTypes.METHOD_DEF, TokenTypes.CTOR_DEF,
+                          TokenTypes.ANNOTATION_FIELD_DEF,
+        };
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return new int[] {TokenTypes.METHOD_DEF, TokenTypes.CTOR_DEF,
+                          TokenTypes.ANNOTATION_FIELD_DEF,
+        };
+    }
+
+    @Override
+    protected final void processAST(DetailAST aAST)
+    {
+        final Scope theScope = calculateScope(aAST);
+        if (shouldCheck(aAST, theScope)) {
+            final FileContents contents = getFileContents();
+            final TextBlock cmt = contents.getJavadocBefore(aAST.getLineNo());
+
+            if (cmt == null) {
+                if (!isMissingJavadocAllowed(aAST)) {
+                    log(aAST, "javadoc.missing");
+                }
+            }
+            else {
+                checkComment(aAST, cmt);
+            }
+        }
+    }
+
+    @Override
+    protected final void logLoadError(Token aIdent)
+    {
+        logLoadErrorImpl(aIdent.getLineNo(), aIdent.getColumnNo(),
+            "javadoc.classInfo",
+            JavadocTagInfo.THROWS.getText(), aIdent.getText());
+    }
+
+    /**
+     * The JavadocMethodCheck is about to report a missing Javadoc.
+     * This hook can be used by derived classes to allow a missing javadoc
+     * in some situations.  The default implementation checks
+     * <code>allowMissingJavadoc</code> and
+     * <code>allowMissingPropertyJavadoc</code> properties, do not forget
+     * to call <code>super.isMissingJavadocAllowed(aAST)</code> in case
+     * you want to keep this logic.
+     * @param aAST the tree node for the method or constructor.
+     * @return True if this method or constructor doesn't need Javadoc.
+     */
+    protected boolean isMissingJavadocAllowed(final DetailAST aAST)
+    {
+        return mAllowMissingJavadoc || isOverrideMethod(aAST)
+            || (mAllowMissingPropertyJavadoc
+                && (isSetterMethod(aAST) || isGetterMethod(aAST)));
+    }
+
+    /**
+     * Whether we should check this node.
+     *
+     * @param aAST a given node.
+     * @param aScope the scope of the node.
+     * @return whether we should check a given node.
+     */
+    private boolean shouldCheck(final DetailAST aAST, final Scope aScope)
+    {
+        final Scope surroundingScope = ScopeUtils.getSurroundingScope(aAST);
+
+        return aScope.isIn(mScope)
+                && surroundingScope.isIn(mScope)
+                && ((mExcludeScope == null) || !aScope.isIn(mExcludeScope)
+                    || !surroundingScope.isIn(mExcludeScope));
+    }
+
+    /**
+     * Checks the Javadoc for a method.
+     *
+     * @param aAST the token for the method
+     * @param aComment the Javadoc comment
+     */
+    private void checkComment(DetailAST aAST, TextBlock aComment)
+    {
+        final List<JavadocTag> tags = getMethodTags(aComment);
+
+        if (hasShortCircuitTag(aAST, tags)) {
+            return;
+        }
+
+        Iterator<JavadocTag> it = tags.iterator();
+        if (aAST.getType() != TokenTypes.ANNOTATION_FIELD_DEF) {
+            // Check for inheritDoc
+            boolean hasInheritDocTag = false;
+            while (it.hasNext() && !hasInheritDocTag) {
+                hasInheritDocTag |= (it.next()).isInheritDocTag();
+            }
+
+            checkParamTags(tags, aAST, !hasInheritDocTag);
+            checkThrowsTags(tags, getThrows(aAST), !hasInheritDocTag);
+            if (isFunction(aAST)) {
+                checkReturnTag(tags, aAST.getLineNo(), !hasInheritDocTag);
+            }
+        }
+
+        // Dump out all unused tags
+        it = tags.iterator();
+        while (it.hasNext()) {
+            final JavadocTag jt = it.next();
+            if (!jt.isSeeOrInheritDocTag()) {
+                log(jt.getLineNo(), "javadoc.unusedTagGeneral");
+            }
+        }
+    }
+
+    /**
+     * Validates whether the Javadoc has a short circuit tag. Currently this is
+     * the inheritTag. Any errors are logged.
+     *
+     * @param aAST the construct being checked
+     * @param aTags the list of Javadoc tags associated with the construct
+     * @return true if the construct has a short circuit tag.
+     */
+    private boolean hasShortCircuitTag(final DetailAST aAST,
+            final List<JavadocTag> aTags)
+    {
+        // Check if it contains {@inheritDoc} tag
+        if ((aTags.size() != 1)
+                || !(aTags.get(0)).isInheritDocTag())
+        {
+            return false;
+        }
+
+        // Invalid if private, a constructor, or a static method
+        if (!JavadocTagInfo.INHERIT_DOC.isValidOn(aAST)) {
+            log(aAST, "javadoc.invalidInheritDoc");
+        }
+
+        return true;
+    }
+
+    /**
+     * Returns the scope for the method/constructor at the specified AST. If
+     * the method is in an interface or annotation block, the scope is assumed
+     * to be public.
+     *
+     * @param aAST the token of the method/constructor
+     * @return the scope of the method/constructor
+     */
+    private Scope calculateScope(final DetailAST aAST)
+    {
+        final DetailAST mods = aAST.findFirstToken(TokenTypes.MODIFIERS);
+        final Scope declaredScope = ScopeUtils.getScopeFromMods(mods);
+        return ScopeUtils.inInterfaceOrAnnotationBlock(aAST) ? Scope.PUBLIC
+                : declaredScope;
+    }
+
+    /**
+     * Returns the tags in a javadoc comment. Only finds throws, exception,
+     * param, return and see tags.
+     *
+     * @return the tags found
+     * @param aComment the Javadoc comment
+     */
+    private List<JavadocTag> getMethodTags(TextBlock aComment)
+    {
+        final String[] lines = aComment.getText();
+        final List<JavadocTag> tags = Lists.newArrayList();
+        int currentLine = aComment.getStartLineNo() - 1;
+
+        for (int i = 0; i < lines.length; i++) {
+            currentLine++;
+            final Matcher javadocArgMatcher =
+                MATCH_JAVADOC_ARG.matcher(lines[i]);
+            final Matcher javadocNoargMatcher =
+                MATCH_JAVADOC_NOARG.matcher(lines[i]);
+            final Matcher noargCurlyMatcher =
+                MATCH_JAVADOC_NOARG_CURLY.matcher(lines[i]);
+            final Matcher argMultilineStart =
+                MATCH_JAVADOC_ARG_MULTILINE_START.matcher(lines[i]);
+            final Matcher noargMultilineStart =
+                MATCH_JAVADOC_NOARG_MULTILINE_START.matcher(lines[i]);
+
+            if (javadocArgMatcher.find()) {
+                int col = javadocArgMatcher.start(1) - 1;
+                if (i == 0) {
+                    col += aComment.getStartColNo();
+                }
+                tags.add(new JavadocTag(currentLine, col, javadocArgMatcher
+                        .group(1), javadocArgMatcher.group(2)));
+            }
+            else if (javadocNoargMatcher.find()) {
+                int col = javadocNoargMatcher.start(1) - 1;
+                if (i == 0) {
+                    col += aComment.getStartColNo();
+                }
+                tags.add(new JavadocTag(currentLine, col, javadocNoargMatcher
+                        .group(1)));
+            }
+            else if (noargCurlyMatcher.find()) {
+                int col = noargCurlyMatcher.start(1) - 1;
+                if (i == 0) {
+                    col += aComment.getStartColNo();
+                }
+                tags.add(new JavadocTag(currentLine, col, noargCurlyMatcher
+                        .group(1)));
+            }
+            else if (argMultilineStart.find()) {
+                final String p1 = argMultilineStart.group(1);
+                final String p2 = argMultilineStart.group(2);
+                int col = argMultilineStart.start(1) - 1;
+                if (i == 0) {
+                    col += aComment.getStartColNo();
+                }
+
+                // Look for the rest of the comment if all we saw was
+                // the tag and the name. Stop when we see '*/' (end of
+                // Javadoc), '@' (start of next tag), or anything that's
+                // not whitespace or '*' characters.
+                int remIndex = i + 1;
+                while (remIndex < lines.length) {
+                    final Matcher multilineCont = MATCH_JAVADOC_MULTILINE_CONT
+                            .matcher(lines[remIndex]);
+                    if (multilineCont.find()) {
+                        remIndex = lines.length;
+                        final String lFin = multilineCont.group(1);
+                        if (!lFin.equals(NEXT_TAG)
+                            && !lFin.equals(END_JAVADOC))
+                        {
+                            tags.add(new JavadocTag(currentLine, col, p1, p2));
+                        }
+                    }
+                    remIndex++;
+                }
+            }
+            else if (noargMultilineStart.find()) {
+                final String p1 = noargMultilineStart.group(1);
+                int col = noargMultilineStart.start(1) - 1;
+                if (i == 0) {
+                    col += aComment.getStartColNo();
+                }
+
+                // Look for the rest of the comment if all we saw was
+                // the tag and the name. Stop when we see '*/' (end of
+                // Javadoc), '@' (start of next tag), or anything that's
+                // not whitespace or '*' characters.
+                int remIndex = i + 1;
+                while (remIndex < lines.length) {
+                    final Matcher multilineCont = MATCH_JAVADOC_MULTILINE_CONT
+                            .matcher(lines[remIndex]);
+                    if (multilineCont.find()) {
+                        remIndex = lines.length;
+                        final String lFin = multilineCont.group(1);
+                        if (!lFin.equals(NEXT_TAG)
+                            && !lFin.equals(END_JAVADOC))
+                        {
+                            tags.add(new JavadocTag(currentLine, col, p1));
+                        }
+                    }
+                    remIndex++;
+                }
+            }
+        }
+        return tags;
+    }
+
+    /**
+     * Computes the parameter nodes for a method.
+     *
+     * @param aAST the method node.
+     * @return the list of parameter nodes for aAST.
+     */
+    private List<DetailAST> getParameters(DetailAST aAST)
+    {
+        final DetailAST params = aAST.findFirstToken(TokenTypes.PARAMETERS);
+        final List<DetailAST> retVal = Lists.newArrayList();
+
+        DetailAST child = params.getFirstChild();
+        while (child != null) {
+            if (child.getType() == TokenTypes.PARAMETER_DEF) {
+                final DetailAST ident = child.findFirstToken(TokenTypes.IDENT);
+                retVal.add(ident);
+            }
+            child = child.getNextSibling();
+        }
+        return retVal;
+    }
+
+    /**
+     * Computes the exception nodes for a method.
+     *
+     * @param aAST the method node.
+     * @return the list of exception nodes for aAST.
+     */
+    private List<ExceptionInfo> getThrows(DetailAST aAST)
+    {
+        final List<ExceptionInfo> retVal = Lists.newArrayList();
+        final DetailAST throwsAST = aAST
+                .findFirstToken(TokenTypes.LITERAL_THROWS);
+        if (throwsAST != null) {
+            DetailAST child = throwsAST.getFirstChild();
+            while (child != null) {
+                if ((child.getType() == TokenTypes.IDENT)
+                        || (child.getType() == TokenTypes.DOT))
+                {
+                    final FullIdent fi = FullIdent.createFullIdent(child);
+                    final ExceptionInfo ei = new ExceptionInfo(new Token(fi),
+                            getCurrentClassName());
+                    retVal.add(ei);
+                }
+                child = child.getNextSibling();
+            }
+        }
+        return retVal;
+    }
+
+    /**
+     * Checks a set of tags for matching parameters.
+     *
+     * @param aTags the tags to check
+     * @param aParent the node which takes the parameters
+     * @param aReportExpectedTags whether we should report if do not find
+     *            expected tag
+     */
+    private void checkParamTags(final List<JavadocTag> aTags,
+            final DetailAST aParent, boolean aReportExpectedTags)
+    {
+        final List<DetailAST> params = getParameters(aParent);
+        final List<DetailAST> typeParams = CheckUtils
+                .getTypeParameters(aParent);
+
+        // Loop over the tags, checking to see they exist in the params.
+        final ListIterator<JavadocTag> tagIt = aTags.listIterator();
+        while (tagIt.hasNext()) {
+            final JavadocTag tag = tagIt.next();
+
+            if (!tag.isParamTag()) {
+                continue;
+            }
+
+            tagIt.remove();
+
+            boolean found = false;
+
+            // Loop looking for matching param
+            final Iterator<DetailAST> paramIt = params.iterator();
+            while (paramIt.hasNext()) {
+                final DetailAST param = paramIt.next();
+                if (param.getText().equals(tag.getArg1())) {
+                    found = true;
+                    paramIt.remove();
+                    break;
+                }
+            }
+
+            if (tag.getArg1().startsWith("<") && tag.getArg1().endsWith(">")) {
+                // Loop looking for matching type param
+                final Iterator<DetailAST> typeParamsIt = typeParams.iterator();
+                while (typeParamsIt.hasNext()) {
+                    final DetailAST typeParam = typeParamsIt.next();
+                    if (typeParam.findFirstToken(TokenTypes.IDENT).getText()
+                            .equals(
+                                    tag.getArg1().substring(1,
+                                            tag.getArg1().length() - 1)))
+                    {
+                        found = true;
+                        typeParamsIt.remove();
+                        break;
+                    }
+                }
+
+            }
+
+            // Handle extra JavadocTag
+            if (!found) {
+                log(tag.getLineNo(), tag.getColumnNo(), "javadoc.unusedTag",
+                        "@param", tag.getArg1());
+            }
+        }
+
+        // Now dump out all type parameters/parameters without tags :- unless
+        // the user has chosen to suppress these problems
+        if (!mAllowMissingParamTags && aReportExpectedTags) {
+            for (DetailAST param : params) {
+                log(param, "javadoc.expectedTag",
+                    JavadocTagInfo.PARAM.getText(), param.getText());
+            }
+
+            for (DetailAST typeParam : typeParams) {
+                log(typeParam, "javadoc.expectedTag",
+                    JavadocTagInfo.PARAM.getText(),
+                    "<" + typeParam.findFirstToken(TokenTypes.IDENT).getText()
+                    + ">");
+            }
+        }
+    }
+
+    /**
+     * Checks whether a method is a function.
+     *
+     * @param aAST the method node.
+     * @return whether the method is a function.
+     */
+    private boolean isFunction(DetailAST aAST)
+    {
+        boolean retVal = false;
+        if (aAST.getType() == TokenTypes.METHOD_DEF) {
+            final DetailAST typeAST = aAST.findFirstToken(TokenTypes.TYPE);
+            if ((typeAST != null)
+                && (typeAST.findFirstToken(TokenTypes.LITERAL_VOID) == null))
+            {
+                retVal = true;
+            }
+        }
+        return retVal;
+    }
+
+    /**
+     * Checks for only one return tag. All return tags will be removed from the
+     * supplied list.
+     *
+     * @param aTags the tags to check
+     * @param aLineNo the line number of the expected tag
+     * @param aReportExpectedTags whether we should report if do not find
+     *            expected tag
+     */
+    private void checkReturnTag(List<JavadocTag> aTags, int aLineNo,
+        boolean aReportExpectedTags)
+    {
+        // Loop over tags finding return tags. After the first one, report an
+        // error.
+        boolean found = false;
+        final ListIterator<JavadocTag> it = aTags.listIterator();
+        while (it.hasNext()) {
+            final JavadocTag jt = it.next();
+            if (jt.isReturnTag()) {
+                if (found) {
+                    log(jt.getLineNo(), jt.getColumnNo(),
+                        "javadoc.duplicateTag",
+                        JavadocTagInfo.RETURN.getText());
+                }
+                found = true;
+                it.remove();
+            }
+        }
+
+        // Handle there being no @return tags :- unless
+        // the user has chosen to suppress these problems
+        if (!found && !mAllowMissingReturnTag && aReportExpectedTags) {
+            log(aLineNo, "javadoc.return.expected");
+        }
+    }
+
+    /**
+     * Checks a set of tags for matching throws.
+     *
+     * @param aTags the tags to check
+     * @param aThrows the throws to check
+     * @param aReportExpectedTags whether we should report if do not find
+     *            expected tag
+     */
+    private void checkThrowsTags(List<JavadocTag> aTags,
+            List<ExceptionInfo> aThrows, boolean aReportExpectedTags)
+    {
+        // Loop over the tags, checking to see they exist in the throws.
+        // The foundThrows used for performance only
+        final Set<String> foundThrows = Sets.newHashSet();
+        final ListIterator<JavadocTag> tagIt = aTags.listIterator();
+        while (tagIt.hasNext()) {
+            final JavadocTag tag = tagIt.next();
+
+            if (!tag.isThrowsTag()) {
+                continue;
+            }
+
+            tagIt.remove();
+
+            // Loop looking for matching throw
+            final String documentedEx = tag.getArg1();
+            final Token token = new Token(tag.getArg1(), tag.getLineNo(), tag
+                    .getColumnNo());
+            final ClassInfo documentedCI = createClassInfo(token,
+                    getCurrentClassName());
+            boolean found = foundThrows.contains(documentedEx);
+
+            // First look for matches on the exception name
+            ListIterator<ExceptionInfo> throwIt = aThrows.listIterator();
+            while (!found && throwIt.hasNext()) {
+                final ExceptionInfo ei = throwIt.next();
+
+                if (ei.getName().getText().equals(
+                        documentedCI.getName().getText()))
+                {
+                    found = true;
+                    ei.setFound();
+                    foundThrows.add(documentedEx);
+                }
+            }
+
+            // Now match on the exception type
+            throwIt = aThrows.listIterator();
+            while (!found && throwIt.hasNext()) {
+                final ExceptionInfo ei = throwIt.next();
+
+                if (documentedCI.getClazz() == ei.getClazz()) {
+                    found = true;
+                    ei.setFound();
+                    foundThrows.add(documentedEx);
+                }
+                else if (mAllowThrowsTagsForSubclasses) {
+                    found = isSubclass(documentedCI.getClazz(), ei.getClazz());
+                }
+            }
+
+            // Handle extra JavadocTag.
+            if (!found) {
+                boolean reqd = true;
+                if (mAllowUndeclaredRTE) {
+                    reqd = !isUnchecked(documentedCI.getClazz());
+                }
+
+                if (reqd) {
+                    log(tag.getLineNo(), tag.getColumnNo(),
+                        "javadoc.unusedTag",
+                        JavadocTagInfo.THROWS.getText(), tag.getArg1());
+
+                }
+            }
+        }
+
+        // Now dump out all throws without tags :- unless
+        // the user has chosen to suppress these problems
+        if (!mAllowMissingThrowsTags && aReportExpectedTags) {
+            for (ExceptionInfo ei : aThrows) {
+                if (!ei.isFound()) {
+                    final Token fi = ei.getName();
+                    log(fi.getLineNo(), fi.getColumnNo(),
+                        "javadoc.expectedTag",
+                        JavadocTagInfo.THROWS.getText(), fi.getText());
+                }
+            }
+        }
+    }
+
+    /**
+     * Returns whether an AST represents a setter method.
+     * @param aAST the AST to check with
+     * @return whether the AST represents a setter method
+     */
+    private boolean isSetterMethod(final DetailAST aAST)
+    {
+        // Check have a method with exactly 7 children which are all that
+        // is allowed in a proper setter method which does not throw any
+        // exceptions.
+        if ((aAST.getType() != TokenTypes.METHOD_DEF)
+                || (aAST.getChildCount() != MAX_CHILDREN))
+        {
+            return false;
+        }
+
+        // Should I handle only being in a class????
+
+        // Check the name matches format setX...
+        final DetailAST type = aAST.findFirstToken(TokenTypes.TYPE);
+        final String name = type.getNextSibling().getText();
+        if (!name.matches("^set[A-Z].*")) { // Depends on JDK 1.4
+            return false;
+        }
+
+        // Check the return type is void
+        if (type.getChildCount(TokenTypes.LITERAL_VOID) == 0) {
+            return false;
+        }
+
+        // Check that is had only one parameter
+        final DetailAST params = aAST.findFirstToken(TokenTypes.PARAMETERS);
+        if ((params == null)
+                || (params.getChildCount(TokenTypes.PARAMETER_DEF) != 1))
+        {
+            return false;
+        }
+
+        // Now verify that the body consists of:
+        // SLIST -> EXPR -> ASSIGN
+        // SEMI
+        // RCURLY
+        final DetailAST slist = aAST.findFirstToken(TokenTypes.SLIST);
+        if ((slist == null) || (slist.getChildCount() != BODY_SIZE)) {
+            return false;
+        }
+
+        final AST expr = slist.getFirstChild();
+        if ((expr.getType() != TokenTypes.EXPR)
+                || (expr.getFirstChild().getType() != TokenTypes.ASSIGN))
+        {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Returns whether an AST represents a getter method.
+     * @param aAST the AST to check with
+     * @return whether the AST represents a getter method
+     */
+    private boolean isGetterMethod(final DetailAST aAST)
+    {
+        // Check have a method with exactly 7 children which are all that
+        // is allowed in a proper getter method which does not throw any
+        // exceptions.
+        if ((aAST.getType() != TokenTypes.METHOD_DEF)
+                || (aAST.getChildCount() != MAX_CHILDREN))
+        {
+            return false;
+        }
+
+        // Check the name matches format of getX or isX. Technically I should
+        // check that the format isX is only used with a boolean type.
+        final DetailAST type = aAST.findFirstToken(TokenTypes.TYPE);
+        final String name = type.getNextSibling().getText();
+        if (!name.matches("^(is|get)[A-Z].*")) { // Depends on JDK 1.4
+            return false;
+        }
+
+        // Check the return type is void
+        if (type.getChildCount(TokenTypes.LITERAL_VOID) > 0) {
+            return false;
+        }
+
+        // Check that is had only one parameter
+        final DetailAST params = aAST.findFirstToken(TokenTypes.PARAMETERS);
+        if ((params == null)
+                || (params.getChildCount(TokenTypes.PARAMETER_DEF) > 0))
+        {
+            return false;
+        }
+
+        // Now verify that the body consists of:
+        // SLIST -> RETURN
+        // RCURLY
+        final DetailAST slist = aAST.findFirstToken(TokenTypes.SLIST);
+        if ((slist == null) || (slist.getChildCount() != 2)) {
+            return false;
+        }
+
+        final AST expr = slist.getFirstChild();
+        if ((expr.getType() != TokenTypes.LITERAL_RETURN)
+                || (expr.getFirstChild().getType() != TokenTypes.EXPR))
+        {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Returns is a method has the "@Override" annotation.
+     * @param aAST the AST to check with
+     * @return whether the AST represents a method that has the annotation.
+     */
+    private boolean isOverrideMethod(DetailAST aAST)
+    {
+        // Need it to be a method, cannot have an override on anything else.
+        // Must also have MODIFIERS token to hold the @Override
+        if ((TokenTypes.METHOD_DEF != aAST.getType())
+            || (TokenTypes.MODIFIERS != aAST.getFirstChild().getType()))
+        {
+            return false;
+        }
+
+        // Now loop over all nodes while they are annotations looking for
+        // an "@Override".
+        DetailAST node = aAST.getFirstChild().getFirstChild();
+        while ((null != node) && (TokenTypes.ANNOTATION == node.getType())) {
+            if ((node.getFirstChild().getType() == TokenTypes.AT)
+                && (node.getFirstChild().getNextSibling().getType()
+                    == TokenTypes.IDENT)
+                && ("Override".equals(
+                        node.getFirstChild().getNextSibling().getText())))
+            {
+                return true;
+            }
+            node = node.getNextSibling();
+        }
+        return false;
+    }
+
+    /** Stores useful information about declared exception. */
+    private class ExceptionInfo
+    {
+        /** does the exception have throws tag associated with. */
+        private boolean mFound;
+        /** class information associated with this exception. */
+        private final ClassInfo mClassInfo;
+
+        /**
+         * Creates new instance for <code>FullIdent</code>.
+         *
+         * @param aIdent the exception
+         * @param aCurrentClass name of current class.
+         */
+        ExceptionInfo(Token aIdent, String aCurrentClass)
+        {
+            mClassInfo = createClassInfo(aIdent, aCurrentClass);
+        }
+
+        /** Mark that the exception has associated throws tag */
+        final void setFound()
+        {
+            mFound = true;
+        }
+
+        /** @return whether the exception has throws tag associated with */
+        final boolean isFound()
+        {
+            return mFound;
+        }
+
+        /** @return exception's name */
+        final Token getName()
+        {
+            return mClassInfo.getName();
+        }
+
+        /** @return class for this exception */
+        final Class<?> getClazz()
+        {
+            return mClassInfo.getClazz();
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocPackageCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocPackageCheck.java
new file mode 100644
index 0000000..2d1d6e2
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocPackageCheck.java
@@ -0,0 +1,89 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
+import java.io.File;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Checks that all packages have a package documentation. See the documentation
+ * for more information.
+ * @author Oliver Burn
+ */
+public class JavadocPackageCheck extends AbstractFileSetCheck
+{
+    /** Indicates if allow legacy "package.html" file to be used. */
+    private boolean mAllowLegacy;
+    /** The directories checked. */
+    private final Set<File> mDirectoriesChecked = Sets.newHashSet();
+
+    /**
+     * Creates a new instance.
+     */
+    public JavadocPackageCheck()
+    {
+        // java, not html!
+        // The rule is: Every JAVA file should have a package.html sibling
+        setFileExtensions(new String[]{"java"});
+    }
+
+    @Override
+    public void beginProcessing(String aCharset)
+    {
+        super.beginProcessing(aCharset);
+        mDirectoriesChecked.clear();
+    }
+
+    @Override
+    protected void processFiltered(File aFile, List<String> aLines)
+    {
+        // Check if already processed directory
+        final File dir = aFile.getParentFile();
+        if (mDirectoriesChecked.contains(dir)) {
+            return;
+        }
+        mDirectoriesChecked.add(dir);
+
+        // Check for the preferred file.
+        final File packageInfo = new File(dir, "package-info.java");
+        final File packageHtml = new File(dir, "package.html");
+
+        if (packageInfo.exists()) {
+            if (packageHtml.exists()) {
+                log(0, "javadoc.legacyPackageHtml");
+            }
+        }
+        else if (!mAllowLegacy || !packageHtml.exists()) {
+            log(0, "javadoc.packageInfo");
+        }
+    }
+
+    /**
+     * Indicates whether to allow support for the legacy <i>package.html</i>
+     * file.
+     * @param aAllowLegacy whether to allow support.
+     */
+    public void setAllowLegacy(boolean aAllowLegacy)
+    {
+        mAllowLegacy = aAllowLegacy;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java
new file mode 100644
index 0000000..44bf02d
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java
@@ -0,0 +1,547 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import com.google.common.collect.ImmutableSortedSet;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.FileContents;
+import com.puppycrawl.tools.checkstyle.api.JavadocTagInfo;
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TextBlock;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.CheckUtils;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+/**
+ * Custom Checkstyle Check to validate Javadoc.
+ *
+ * @author Chris Stillwell
+ * @author Daniel Grenner
+ * @author Travis Schneeberger
+ * @version 1.2
+ */
+public class JavadocStyleCheck
+    extends Check
+{
+    /** Message property key for the Unclosed HTML message. */
+    private static final String UNCLOSED_HTML = "javadoc.unclosedhtml";
+
+    /** Message property key for the Extra HTML message. */
+    private static final String EXTRA_HTML = "javadoc.extrahtml";
+
+    /** HTML tags that do not require a close tag. */
+    private static final Set<String> SINGLE_TAGS = ImmutableSortedSet.of(
+            "br", "li", "dt", "dd", "hr", "img", "p", "td", "tr", "th");
+
+    /** HTML tags that are allowed in java docs.
+     * From http://www.w3schools.com/tags/default.asp
+     * The froms and structure tags are not allowed
+     */
+    private static final Set<String> ALLOWED_TAGS = ImmutableSortedSet.of(
+            "a", "abbr", "acronym", "address", "area", "b", "bdo", "big",
+            "blockquote", "br", "caption", "cite", "code", "colgroup", "dd",
+            "del", "div", "dfn", "dl", "dt", "em", "fieldset", "font", "h1",
+            "h2", "h3", "h4", "h5", "h6", "hr", "i", "img", "ins", "kbd",
+            "li", "ol", "p", "pre", "q", "samp", "small", "span", "strong",
+            "style", "sub", "sup", "table", "tbody", "td", "tfoot", "th",
+            "thead", "tr", "tt", "u", "ul");
+
+    /** The scope to check. */
+    private Scope mScope = Scope.PRIVATE;
+
+    /** the visibility scope where Javadoc comments shouldn't be checked **/
+    private Scope mExcludeScope;
+
+    /** Format for matching the end of a sentence. */
+    private String mEndOfSentenceFormat = "([.?!][ \t\n\r\f<])|([.?!]$)";
+
+    /** Regular expression for matching the end of a sentence. */
+    private Pattern mEndOfSentencePattern;
+
+    /**
+     * Indicates if the first sentence should be checked for proper end of
+     * sentence punctuation.
+     */
+    private boolean mCheckFirstSentence = true;
+
+    /**
+     * Indicates if the HTML within the comment should be checked.
+     */
+    private boolean mCheckHtml = true;
+
+    /**
+     * Indicates if empty javadoc statements should be checked.
+     */
+    private boolean mCheckEmptyJavadoc;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.INTERFACE_DEF,
+            TokenTypes.CLASS_DEF,
+            TokenTypes.ANNOTATION_DEF,
+            TokenTypes.ENUM_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.CTOR_DEF,
+            TokenTypes.VARIABLE_DEF,
+            TokenTypes.ENUM_CONSTANT_DEF,
+            TokenTypes.ANNOTATION_FIELD_DEF,
+            TokenTypes.PACKAGE_DEF,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (shouldCheck(aAST)) {
+            final FileContents contents = getFileContents();
+            // Need to start searching for the comment before the annotations
+            // that may exist. Even if annotations are not defined on the
+            // package, the ANNOTATIONS AST is defined.
+            final TextBlock cmt =
+                contents.getJavadocBefore(aAST.getFirstChild().getLineNo());
+
+            checkComment(aAST, cmt);
+        }
+    }
+
+    /**
+     * Whether we should check this node.
+     * @param aAST a given node.
+     * @return whether we should check a given node.
+     */
+    private boolean shouldCheck(final DetailAST aAST)
+    {
+        if (aAST.getType() == TokenTypes.PACKAGE_DEF) {
+            return getFileContents().inPackageInfo();
+        }
+
+        if (ScopeUtils.inCodeBlock(aAST)) {
+            return false;
+        }
+
+        final Scope declaredScope;
+        if (aAST.getType() == TokenTypes.ENUM_CONSTANT_DEF) {
+            declaredScope = Scope.PUBLIC;
+        }
+        else {
+            declaredScope = ScopeUtils.getScopeFromMods(
+                aAST.findFirstToken(TokenTypes.MODIFIERS));
+        }
+
+        final Scope scope =
+            ScopeUtils.inInterfaceOrAnnotationBlock(aAST)
+            ? Scope.PUBLIC : declaredScope;
+        final Scope surroundingScope = ScopeUtils.getSurroundingScope(aAST);
+
+        return scope.isIn(mScope)
+            && ((surroundingScope == null) || surroundingScope.isIn(mScope))
+            && ((mExcludeScope == null)
+                || !scope.isIn(mExcludeScope)
+                || ((surroundingScope != null)
+                && !surroundingScope.isIn(mExcludeScope)));
+    }
+
+    /**
+     * Performs the various checks agains the Javadoc comment.
+     *
+     * @param aAST the AST of the element being documented
+     * @param aComment the source lines that make up the Javadoc comment.
+     *
+     * @see #checkFirstSentence(DetailAST, TextBlock)
+     * @see #checkHtml(DetailAST, TextBlock)
+     */
+    private void checkComment(final DetailAST aAST, final TextBlock aComment)
+    {
+        if (aComment == null) {
+            /*checking for missing docs in JavadocStyleCheck is not consistent
+            with the rest of CheckStyle...  Even though, I didn't think it
+            made sense to make another csheck just to ensure that the
+            package-info.java file actually contains package Javadocs.*/
+            if (getFileContents().inPackageInfo()) {
+                log(aAST.getLineNo(), "javadoc.missing");
+            }
+            return;
+        }
+
+        if (mCheckFirstSentence) {
+            checkFirstSentence(aAST, aComment);
+        }
+
+        if (mCheckHtml) {
+            checkHtml(aAST, aComment);
+        }
+
+        if (mCheckEmptyJavadoc) {
+            checkEmptyJavadoc(aComment);
+        }
+    }
+
+    /**
+     * Checks that the first sentence ends with proper punctuation.  This method
+     * uses a regular expression that checks for the presence of a period,
+     * question mark, or exclamation mark followed either by whitespace, an
+     * HTML element, or the end of string. This method ignores {_AT_inheritDoc}
+     * comments for TokenTypes that are valid for {_AT_inheritDoc}.
+     *
+     * @param aAST the current node
+     * @param aComment the source lines that make up the Javadoc comment.
+     */
+    private void checkFirstSentence(final DetailAST aAST, TextBlock aComment)
+    {
+        final String commentText = getCommentText(aComment.getText());
+
+        if ((commentText.length() != 0)
+            && !getEndOfSentencePattern().matcher(commentText).find()
+            && !("{@inheritDoc}".equals(commentText)
+            && JavadocTagInfo.INHERIT_DOC.isValidOn(aAST)))
+        {
+            log(aComment.getStartLineNo(), "javadoc.noperiod");
+        }
+    }
+
+    /**
+     * Checks that the Javadoc is not empty.
+     *
+     * @param aComment the source lines that make up the Javadoc comment.
+     */
+    private void checkEmptyJavadoc(TextBlock aComment)
+    {
+        final String commentText = getCommentText(aComment.getText());
+
+        if (commentText.length() == 0) {
+            log(aComment.getStartLineNo(), "javadoc.empty");
+        }
+    }
+
+    /**
+     * Returns the comment text from the Javadoc.
+     * @param aComments the lines of Javadoc.
+     * @return a comment text String.
+     */
+    private String getCommentText(String[] aComments)
+    {
+        final StringBuffer buffer = new StringBuffer();
+        for (final String line : aComments) {
+            final int textStart = findTextStart(line);
+
+            if (textStart != -1) {
+                if (line.charAt(textStart) == '@') {
+                    //we have found the tag section
+                    break;
+                }
+                buffer.append(line.substring(textStart));
+                trimTail(buffer);
+                buffer.append('\n');
+            }
+        }
+
+        return buffer.toString().trim();
+    }
+
+    /**
+     * Finds the index of the first non-whitespace character ignoring the
+     * Javadoc comment start and end strings (&#47** and *&#47) as well as any
+     * leading asterisk.
+     * @param aLine the Javadoc comment line of text to scan.
+     * @return the int index relative to 0 for the start of text
+     *         or -1 if not found.
+     */
+    private int findTextStart(String aLine)
+    {
+        int textStart = -1;
+        for (int i = 0; i < aLine.length(); i++) {
+            if (!Character.isWhitespace(aLine.charAt(i))) {
+                if (aLine.regionMatches(i, "/**", 0, "/**".length())) {
+                    i += 2;
+                }
+                else if (aLine.regionMatches(i, "*/", 0, 2)) {
+                    i++;
+                }
+                else if (aLine.charAt(i) != '*') {
+                    textStart = i;
+                    break;
+                }
+            }
+        }
+        return textStart;
+    }
+
+    /**
+     * Trims any trailing whitespace or the end of Javadoc comment string.
+     * @param aBuffer the StringBuffer to trim.
+     */
+    private void trimTail(StringBuffer aBuffer)
+    {
+        for (int i = aBuffer.length() - 1; i >= 0; i--) {
+            if (Character.isWhitespace(aBuffer.charAt(i))) {
+                aBuffer.deleteCharAt(i);
+            }
+            else if ((i > 0)
+                     && (aBuffer.charAt(i - 1) == '*')
+                     && (aBuffer.charAt(i) == '/'))
+            {
+                aBuffer.deleteCharAt(i);
+                aBuffer.deleteCharAt(i - 1);
+                i--;
+                while (aBuffer.charAt(i - 1) == '*') {
+                    aBuffer.deleteCharAt(i - 1);
+                    i--;
+                }
+            }
+            else {
+                break;
+            }
+        }
+    }
+
+    /**
+     * Checks the comment for HTML tags that do not have a corresponding close
+     * tag or a close tag that has no previous open tag.  This code was
+     * primarily copied from the DocCheck checkHtml method.
+     *
+     * @param aAST the node with the Javadoc
+     * @param aComment the <code>TextBlock</code> which represents
+     *                 the Javadoc comment.
+     */
+    private void checkHtml(final DetailAST aAST, final TextBlock aComment)
+    {
+        final int lineno = aComment.getStartLineNo();
+        final FastStack<HtmlTag> htmlStack = FastStack.newInstance();
+        final String[] text = aComment.getText();
+        final List<String> typeParameters =
+            CheckUtils.getTypeParameterNames(aAST);
+
+        TagParser parser = null;
+        parser = new TagParser(text, lineno);
+
+        while (parser.hasNextTag()) {
+            final HtmlTag tag = parser.nextTag();
+
+            if (tag.isIncompleteTag()) {
+                log(tag.getLineno(), "javadoc.incompleteTag",
+                    text[tag.getLineno() - lineno]);
+                return;
+            }
+            if (tag.isClosedTag()) {
+                //do nothing
+                continue;
+            }
+            if (!tag.isCloseTag()) {
+                //We only push html tags that are allowed
+                if (isAllowedTag(tag)) {
+                    htmlStack.push(tag);
+                }
+            }
+            else {
+                // We have found a close tag.
+                if (isExtraHtml(tag.getId(), htmlStack)) {
+                    // No corresponding open tag was found on the stack.
+                    log(tag.getLineno(),
+                        tag.getPosition(),
+                        EXTRA_HTML,
+                        tag);
+                }
+                else {
+                    // See if there are any unclosed tags that were opened
+                    // after this one.
+                    checkUnclosedTags(htmlStack, tag.getId());
+                }
+            }
+        }
+
+        // Identify any tags left on the stack.
+        String lastFound = ""; // Skip multiples, like <b>...<b>
+        for (final HtmlTag htag : htmlStack) {
+            if (!isSingleTag(htag)
+                && !htag.getId().equals(lastFound)
+                && !typeParameters.contains(htag.getId()))
+            {
+                log(htag.getLineno(), htag.getPosition(), UNCLOSED_HTML, htag);
+                lastFound = htag.getId();
+            }
+        }
+    }
+
+    /**
+     * Checks to see if there are any unclosed tags on the stack.  The token
+     * represents a html tag that has been closed and has a corresponding open
+     * tag on the stack.  Any tags, except single tags, that were opened
+     * (pushed on the stack) after the token are missing a close.
+     *
+     * @param aHtmlStack the stack of opened HTML tags.
+     * @param aToken the current HTML tag name that has been closed.
+     */
+    private void checkUnclosedTags(FastStack<HtmlTag> aHtmlStack, String aToken)
+    {
+        final FastStack<HtmlTag> unclosedTags = FastStack.newInstance();
+        HtmlTag lastOpenTag = aHtmlStack.pop();
+        while (!aToken.equalsIgnoreCase(lastOpenTag.getId())) {
+            // Find unclosed elements. Put them on a stack so the
+            // output order won't be back-to-front.
+            if (isSingleTag(lastOpenTag)) {
+                lastOpenTag = aHtmlStack.pop();
+            }
+            else {
+                unclosedTags.push(lastOpenTag);
+                lastOpenTag = aHtmlStack.pop();
+            }
+        }
+
+        // Output the unterminated tags, if any
+        String lastFound = ""; // Skip multiples, like <b>..<b>
+        for (final HtmlTag htag : unclosedTags) {
+            lastOpenTag = htag;
+            if (lastOpenTag.getId().equals(lastFound)) {
+                continue;
+            }
+            lastFound = lastOpenTag.getId();
+            log(lastOpenTag.getLineno(),
+                lastOpenTag.getPosition(),
+                UNCLOSED_HTML,
+                lastOpenTag);
+        }
+    }
+
+    /**
+     * Determines if the HtmlTag is one which does not require a close tag.
+     *
+     * @param aTag the HtmlTag to check.
+     * @return <code>true</code> if the HtmlTag is a single tag.
+     */
+    private boolean isSingleTag(HtmlTag aTag)
+    {
+        // If its a singleton tag (<p>, <br>, etc.), ignore it
+        // Can't simply not put them on the stack, since singletons
+        // like <dt> and <dd> (unhappily) may either be terminated
+        // or not terminated. Both options are legal.
+        return SINGLE_TAGS.contains(aTag.getId().toLowerCase());
+    }
+
+    /**
+     * Determines if the HtmlTag is one which is allowed in a javadoc.
+     *
+     * @param aTag the HtmlTag to check.
+     * @return <code>true</code> if the HtmlTag is an allowed html tag.
+     */
+    private boolean isAllowedTag(HtmlTag aTag)
+    {
+        return ALLOWED_TAGS.contains(aTag.getId().toLowerCase());
+    }
+
+    /**
+     * Determines if the given token is an extra HTML tag. This indicates that
+     * a close tag was found that does not have a corresponding open tag.
+     *
+     * @param aToken an HTML tag id for which a close was found.
+     * @param aHtmlStack a Stack of previous open HTML tags.
+     * @return <code>false</code> if a previous open tag was found
+     *         for the token.
+     */
+    private boolean isExtraHtml(String aToken, FastStack<HtmlTag> aHtmlStack)
+    {
+        boolean isExtra = true;
+        for (final HtmlTag td : aHtmlStack) {
+            // Loop, looking for tags that are closed.
+            // The loop is needed in case there are unclosed
+            // tags on the stack. In that case, the stack would
+            // not be empty, but this tag would still be extra.
+            if (aToken.equalsIgnoreCase(td.getId())) {
+                isExtra = false;
+                break;
+            }
+        }
+
+        return isExtra;
+    }
+
+    /**
+     * Sets the scope to check.
+     * @param aFrom string to get the scope from
+     */
+    public void setScope(String aFrom)
+    {
+        mScope = Scope.getInstance(aFrom);
+    }
+
+    /**
+     * Set the excludeScope.
+     * @param aScope a <code>String</code> value
+     */
+    public void setExcludeScope(String aScope)
+    {
+        mExcludeScope = Scope.getInstance(aScope);
+    }
+
+    /**
+     * Set the format for matching the end of a sentence.
+     * @param aFormat format for matching the end of a sentence.
+     */
+    public void setEndOfSentenceFormat(String aFormat)
+    {
+        mEndOfSentenceFormat = aFormat;
+    }
+
+    /**
+     * Returns a regular expression for matching the end of a sentence.
+     *
+     * @return a regular expression for matching the end of a sentence.
+     */
+    private Pattern getEndOfSentencePattern()
+    {
+        if (mEndOfSentencePattern == null) {
+            mEndOfSentencePattern = Pattern.compile(mEndOfSentenceFormat);
+        }
+        return mEndOfSentencePattern;
+    }
+
+    /**
+     * Sets the flag that determines if the first sentence is checked for
+     * proper end of sentence punctuation.
+     * @param aFlag <code>true</code> if the first sentence is to be checked
+     */
+    public void setCheckFirstSentence(boolean aFlag)
+    {
+        mCheckFirstSentence = aFlag;
+    }
+
+    /**
+     * Sets the flag that determines if HTML checking is to be performed.
+     * @param aFlag <code>true</code> if HTML checking is to be performed.
+     */
+    public void setCheckHtml(boolean aFlag)
+    {
+        mCheckHtml = aFlag;
+    }
+
+    /**
+     * Sets the flag that determines if empty JavaDoc checking should be done.
+     * @param aFlag <code>true</code> if empty JavaDoc checking should be done.
+     */
+    public void setCheckEmptyJavadoc(boolean aFlag)
+    {
+        mCheckEmptyJavadoc = aFlag;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTag.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTag.java
new file mode 100644
index 0000000..f7da7d6
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTag.java
@@ -0,0 +1,142 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import com.puppycrawl.tools.checkstyle.api.JavadocTagInfo;
+
+/**
+ * Represents a Javadoc tag. Provides methods to query what type of tag it is.
+ * @author Oliver Burn
+ */
+public class JavadocTag
+{
+    /** the line number of the tag **/
+    private final int mLineNo;
+    /** the column number of the tag **/
+    private int mColumnNo;
+    /** an optional first argument. For example the parameter name. **/
+    private final String mArg1;
+    /** the JavadocTagInfo representing this tag **/
+    private final JavadocTagInfo mTagInfo;
+
+    /**
+     * Constructs the object.
+     * @param aLine the line number of the tag
+     * @param aColumn the column number of the tag
+     * @param aTag the tag string
+     * @param aArg1 the tag argument
+     **/
+    public JavadocTag(int aLine, int aColumn, String aTag, String aArg1)
+    {
+        mLineNo = aLine;
+        mColumnNo = aColumn;
+        mArg1 = aArg1;
+        mTagInfo = JavadocTagInfo.fromName(aTag);
+    }
+
+    /**
+     * Constructs the object.
+     * @param aLine the line number of the tag
+     * @param aColumn the column number of the tag
+     * @param aTag the tag string
+     **/
+    public JavadocTag(int aLine, int aColumn, String aTag)
+    {
+        this(aLine, aColumn, aTag, null);
+    }
+
+    /** @return the tag string **/
+    public String getTagName()
+    {
+        return mTagInfo.getName();
+    }
+
+    /** @return the first argument. null if not set. **/
+    public String getArg1()
+    {
+        return mArg1;
+    }
+
+    /** @return the line number **/
+    public int getLineNo()
+    {
+        return mLineNo;
+    }
+
+    /** @return the column number */
+    public int getColumnNo()
+    {
+        return mColumnNo;
+    }
+
+    @Override
+    public String toString()
+    {
+        return "{Tag = '" + getTagName() + "', lineNo = " + getLineNo()
+            + ", columnNo=" + mColumnNo + ", Arg1 = '" + getArg1() + "'}";
+    }
+
+    /** @return whether the tag is an 'author' tag **/
+    public boolean isAuthorTag()
+    {
+        return JavadocTagInfo.AUTHOR.equals(mTagInfo);
+    }
+
+    /** @return whether the tag is an 'return' tag **/
+    public boolean isReturnTag()
+    {
+        return JavadocTagInfo.RETURN.equals(mTagInfo);
+    }
+
+    /** @return whether the tag is an 'param' tag **/
+    public boolean isParamTag()
+    {
+        return JavadocTagInfo.PARAM.equals(mTagInfo);
+    }
+
+    /** @return whether the tag is an 'throws' or 'exception' tag **/
+    public boolean isThrowsTag()
+    {
+        return (JavadocTagInfo.THROWS.equals(mTagInfo)
+            || JavadocTagInfo.EXCEPTION.equals(mTagInfo));
+    }
+
+    /** @return whether the tag is a 'see' or 'inheritDoc' tag **/
+    public boolean isSeeOrInheritDocTag()
+    {
+        return (JavadocTagInfo.SEE.equals(mTagInfo) || isInheritDocTag());
+    }
+
+    /** @return whether the tag is a 'inheritDoc' tag **/
+    public boolean isInheritDocTag()
+    {
+        return JavadocTagInfo.INHERIT_DOC.equals(mTagInfo);
+    }
+
+    /** @return whether the tag can contain references to imported classes **/
+    public boolean canReferenceImports()
+    {
+        return (JavadocTagInfo.SEE.equals(mTagInfo)
+                || JavadocTagInfo.LINK.equals(mTagInfo)
+                || JavadocTagInfo.LINKPLAIN.equals(mTagInfo)
+                || JavadocTagInfo.THROWS.equals(mTagInfo)
+                || JavadocTagInfo.EXCEPTION.equals(mTagInfo));
+    }
+}
+
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTags.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTags.java
new file mode 100644
index 0000000..9b4e944
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTags.java
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import java.util.List;
+
+/**
+ * Value object for combining the list of valid validTags with information
+ * about invalid validTags encountered in a certain Javadoc comment.
+ * @author Oliver Burn
+ */
+public final class JavadocTags
+{
+    /** Valid validTags. */
+    private final List<JavadocTag> mValidTags;
+    /** Invalid validTags. */
+    private final List<InvalidJavadocTag> mInvalidTags;
+
+    /**
+     * Creates an instance.
+     * @param aTags the list of valid tags
+     * @param aInvalidTags the list of invalid tags
+     */
+    public JavadocTags(List<JavadocTag> aTags,
+            List<InvalidJavadocTag> aInvalidTags)
+    {
+        mValidTags = aTags;
+        mInvalidTags = aInvalidTags;
+    }
+
+    public List<JavadocTag> getValidTags()
+    {
+        return mValidTags;
+    }
+
+    public List<InvalidJavadocTag> getInvalidTags()
+    {
+        return mInvalidTags;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java
new file mode 100644
index 0000000..ec92ec5
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java
@@ -0,0 +1,320 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FileContents;
+import com.puppycrawl.tools.checkstyle.api.JavadocTagInfo;
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TextBlock;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import com.puppycrawl.tools.checkstyle.checks.CheckUtils;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+import org.apache.commons.beanutils.ConversionException;
+
+/**
+ * Checks the Javadoc of a type.
+ *
+ * @author Oliver Burn
+ * @author Michael Tamm
+ */
+public class JavadocTypeCheck
+    extends Check
+{
+    /** the scope to check for */
+    private Scope mScope = Scope.PRIVATE;
+    /** the visibility scope where Javadoc comments shouldn't be checked **/
+    private Scope mExcludeScope;
+    /** compiled regexp to match author tag content **/
+    private Pattern mAuthorFormatPattern;
+    /** compiled regexp to match version tag content **/
+    private Pattern mVersionFormatPattern;
+    /** regexp to match author tag content */
+    private String mAuthorFormat;
+    /** regexp to match version tag content */
+    private String mVersionFormat;
+    /**
+     * controls whether to ignore errors when a method has type parameters but
+     * does not have matching param tags in the javadoc. Defaults to false.
+     */
+    private boolean mAllowMissingParamTags;
+    /** controls whether to flag errors for unknown tags. Defaults to false. */
+    private boolean mAllowUnknownTags;
+
+    /**
+     * Sets the scope to check.
+     * @param aFrom string to set scope from
+     */
+    public void setScope(String aFrom)
+    {
+        mScope = Scope.getInstance(aFrom);
+    }
+
+    /**
+     * Set the excludeScope.
+     * @param aScope a <code>String</code> value
+     */
+    public void setExcludeScope(String aScope)
+    {
+        mExcludeScope = Scope.getInstance(aScope);
+    }
+
+    /**
+     * Set the author tag pattern.
+     * @param aFormat a <code>String</code> value
+     * @throws ConversionException unable to parse aFormat
+     */
+    public void setAuthorFormat(String aFormat)
+        throws ConversionException
+    {
+        try {
+            mAuthorFormat = aFormat;
+            mAuthorFormatPattern = Utils.getPattern(aFormat);
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+    }
+
+    /**
+     * Set the version format pattern.
+     * @param aFormat a <code>String</code> value
+     * @throws ConversionException unable to parse aFormat
+     */
+    public void setVersionFormat(String aFormat)
+        throws ConversionException
+    {
+        try {
+            mVersionFormat = aFormat;
+            mVersionFormatPattern = Utils.getPattern(aFormat);
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+
+    }
+
+    /**
+     * Controls whether to allow a type which has type parameters to
+     * omit matching param tags in the javadoc. Defaults to false.
+     *
+     * @param aFlag a <code>Boolean</code> value
+     */
+    public void setAllowMissingParamTags(boolean aFlag)
+    {
+        mAllowMissingParamTags = aFlag;
+    }
+
+    /**
+     * Controls whether to flag errors for unknown tags. Defaults to false.
+     * @param aFlag a <code>Boolean</code> value
+     */
+    public void setAllowUnknownTags(boolean aFlag)
+    {
+        mAllowUnknownTags = aFlag;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.INTERFACE_DEF,
+            TokenTypes.CLASS_DEF,
+            TokenTypes.ENUM_DEF,
+            TokenTypes.ANNOTATION_DEF,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (shouldCheck(aAST)) {
+            final FileContents contents = getFileContents();
+            final int lineNo = aAST.getLineNo();
+            final TextBlock cmt = contents.getJavadocBefore(lineNo);
+            if (cmt == null) {
+                log(lineNo, "javadoc.missing");
+            }
+            else if (ScopeUtils.isOuterMostType(aAST)) {
+                // don't check author/version for inner classes
+                final List<JavadocTag> tags = getJavadocTags(cmt);
+                checkTag(lineNo, tags, JavadocTagInfo.AUTHOR.getName(),
+                         mAuthorFormatPattern, mAuthorFormat);
+                checkTag(lineNo, tags, JavadocTagInfo.VERSION.getName(),
+                         mVersionFormatPattern, mVersionFormat);
+
+                final List<String> typeParamNames =
+                    CheckUtils.getTypeParameterNames(aAST);
+
+                if (!mAllowMissingParamTags) {
+                    //Check type parameters that should exist, do
+                    for (final String string : typeParamNames) {
+                        checkTypeParamTag(
+                            lineNo, tags, string);
+                    }
+                }
+
+                checkUnusedTypeParamTags(tags, typeParamNames);
+            }
+        }
+    }
+
+    /**
+     * Whether we should check this node.
+     * @param aAST a given node.
+     * @return whether we should check a given node.
+     */
+    private boolean shouldCheck(final DetailAST aAST)
+    {
+        final DetailAST mods = aAST.findFirstToken(TokenTypes.MODIFIERS);
+        final Scope declaredScope = ScopeUtils.getScopeFromMods(mods);
+        final Scope scope =
+            ScopeUtils.inInterfaceOrAnnotationBlock(aAST)
+                ? Scope.PUBLIC : declaredScope;
+        final Scope surroundingScope = ScopeUtils.getSurroundingScope(aAST);
+
+        return scope.isIn(mScope)
+            && ((surroundingScope == null) || surroundingScope.isIn(mScope))
+            && ((mExcludeScope == null)
+                || !scope.isIn(mExcludeScope)
+                || ((surroundingScope != null)
+                && !surroundingScope.isIn(mExcludeScope)));
+    }
+
+    /**
+     * Gets all standalone tags from a given javadoc.
+     * @param aCmt the Javadoc comment to process.
+     * @return all standalone tags from the given javadoc.
+     */
+    private List<JavadocTag> getJavadocTags(TextBlock aCmt)
+    {
+        final JavadocTags tags = JavadocUtils.getJavadocTags(aCmt,
+            JavadocUtils.JavadocTagType.BLOCK);
+        if (!mAllowUnknownTags) {
+            for (final InvalidJavadocTag tag : tags.getInvalidTags()) {
+                log(tag.getLine(), tag.getCol(), "javadoc.unknownTag",
+                    tag.getName());
+            }
+        }
+        return tags.getValidTags();
+    }
+
+    /**
+     * Verifies that a type definition has a required tag.
+     * @param aLineNo the line number for the type definition.
+     * @param aTags tags from the Javadoc comment for the type definition.
+     * @param aTag the required tag name.
+     * @param aFormatPattern regexp for the tag value.
+     * @param aFormat pattern for the tag value.
+     */
+    private void checkTag(int aLineNo, List<JavadocTag> aTags, String aTag,
+                          Pattern aFormatPattern, String aFormat)
+    {
+        if (aFormatPattern == null) {
+            return;
+        }
+
+        int tagCount = 0;
+        for (int i = aTags.size() - 1; i >= 0; i--) {
+            final JavadocTag tag = aTags.get(i);
+            if (tag.getTagName().equals(aTag)) {
+                tagCount++;
+                if (!aFormatPattern.matcher(tag.getArg1()).find()) {
+                    log(aLineNo, "type.tagFormat", "@" + aTag, aFormat);
+                }
+            }
+        }
+        if (tagCount == 0) {
+            log(aLineNo, "type.missingTag", "@" + aTag);
+        }
+    }
+
+    /**
+     * Verifies that a type definition has the specified param tag for
+     * the specified type parameter name.
+     * @param aLineNo the line number for the type definition.
+     * @param aTags tags from the Javadoc comment for the type definition.
+     * @param aTypeParamName the name of the type parameter
+     */
+    private void checkTypeParamTag(final int aLineNo,
+            final List<JavadocTag> aTags, final String aTypeParamName)
+    {
+        boolean found = false;
+        for (int i = aTags.size() - 1; i >= 0; i--) {
+            final JavadocTag tag = aTags.get(i);
+            if (tag.isParamTag()
+                && (tag.getArg1() != null)
+                && (tag.getArg1().indexOf("<" + aTypeParamName + ">") == 0))
+            {
+                found = true;
+            }
+        }
+        if (!found) {
+            log(aLineNo, "type.missingTag",
+                JavadocTagInfo.PARAM.getText() + " <" + aTypeParamName + ">");
+        }
+    }
+
+    /**
+     * Checks for unused param tags for type parameters.
+     * @param aTags tags from the Javadoc comment for the type definition.
+     * @param aTypeParamNames names of type parameters
+     */
+    private void checkUnusedTypeParamTags(
+        final List<JavadocTag> aTags,
+        final List<String> aTypeParamNames)
+    {
+        final Pattern pattern = Utils.getPattern("\\s*<([^>]+)>.*");
+        for (int i = aTags.size() - 1; i >= 0; i--) {
+            final JavadocTag tag = aTags.get(i);
+            if (tag.isParamTag()) {
+
+                if (tag.getArg1() != null) {
+
+                    final Matcher matcher = pattern.matcher(tag.getArg1());
+                    String typeParamName = null;
+
+                    if (matcher.matches()) {
+                        typeParamName = matcher.group(1).trim();
+                        if (!aTypeParamNames.contains(typeParamName)) {
+                            log(tag.getLineNo(), tag.getColumnNo(),
+                                "javadoc.unusedTag",
+                                JavadocTagInfo.PARAM.getText(),
+                                "<" + typeParamName + ">");
+                        }
+                    }
+                    else {
+                        log(tag.getLineNo(), tag.getColumnNo(),
+                            "javadoc.unusedTagGeneral");
+                    }
+                }
+                else {
+                    log(tag.getLineNo(), tag.getColumnNo(),
+                        "javadoc.unusedTagGeneral");
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocUtils.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocUtils.java
new file mode 100644
index 0000000..c38e28b
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocUtils.java
@@ -0,0 +1,141 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.api.JavadocTagInfo;
+import com.puppycrawl.tools.checkstyle.api.TextBlock;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Contains utility methods for working with Javadoc.
+ * @author Lyle Hanson
+ */
+public final class JavadocUtils
+{
+    ///CLOVER:OFF
+    /** prevent instantiation */
+    private JavadocUtils()
+    {
+    }
+    ///CLOVER:ON
+
+    /**
+     * Gets validTags from a given piece of Javadoc.
+     * @param aCmt the Javadoc comment to process.
+     * @param aTagType the type of validTags we're interested in
+     * @return all standalone validTags from the given javadoc.
+     */
+    public static JavadocTags getJavadocTags(TextBlock aCmt,
+                                             JavadocTagType aTagType)
+    {
+        final String[] text = aCmt.getText();
+        final List<JavadocTag> tags = Lists.newArrayList();
+        final List<InvalidJavadocTag> invalidTags = Lists.newArrayList();
+        Pattern blockTagPattern =
+            Utils.getPattern("/\\*{2,}\\s*@(\\p{Alpha}+)\\s");
+        for (int i = 0; i < text.length; i++) {
+            final String s = text[i];
+            final Matcher blockTagMatcher = blockTagPattern.matcher(s);
+            if ((aTagType.equals(JavadocTagType.ALL) || aTagType
+                    .equals(JavadocTagType.BLOCK)) && blockTagMatcher.find())
+            {
+                final String tagName = blockTagMatcher.group(1);
+                String content = s.substring(blockTagMatcher.end(1));
+                if (content.endsWith("*/")) {
+                    content = content.substring(0, content.length() - 2);
+                }
+                final int line = aCmt.getStartLineNo() + i;
+                int col = blockTagMatcher.start(1) - 1;
+                if (i == 0) {
+                    col += aCmt.getStartColNo();
+                }
+                if (JavadocTagInfo.isValidName(tagName)) {
+                    tags.add(
+                        new JavadocTag(line, col, tagName, content.trim()));
+                }
+                else {
+                    invalidTags.add(new InvalidJavadocTag(line, col, tagName));
+                }
+            }
+            // No block tag, so look for inline validTags
+            else if (aTagType.equals(JavadocTagType.ALL)
+                    || aTagType.equals(JavadocTagType.INLINE))
+            {
+                // Match JavaDoc text after comment characters
+                final Pattern commentPattern =
+                    Utils.getPattern("^\\s*(?:/\\*{2,}|\\*+)\\s*(.*)");
+                final Matcher commentMatcher = commentPattern.matcher(s);
+                final String commentContents;
+                final int commentOffset; // offset including comment characters
+                if (!commentMatcher.find()) {
+                    commentContents = s; // No leading asterisks, still valid
+                    commentOffset = 0;
+                }
+                else {
+                    commentContents = commentMatcher.group(1);
+                    commentOffset = commentMatcher.start(1) - 1;
+                }
+                final Pattern tagPattern =
+                    Utils.getPattern(".*?\\{@(\\p{Alpha}+)\\s+(.*?)\\}");
+                final Matcher tagMatcher = tagPattern.matcher(commentContents);
+                while (tagMatcher.find()) {
+                    if (tagMatcher.groupCount() == 2) {
+                        final String tagName = tagMatcher.group(1);
+                        final String tagValue = tagMatcher.group(2).trim();
+                        final int line = aCmt.getStartLineNo() + i;
+                        int col = commentOffset + (tagMatcher.start(1) - 1);
+                        if (i == 0) {
+                            col += aCmt.getStartColNo();
+                        }
+                        if (JavadocTagInfo.isValidName(tagName)) {
+                            tags.add(new JavadocTag(line, col, tagName,
+                                    tagValue));
+                        }
+                        else {
+                            invalidTags.add(new InvalidJavadocTag(line, col,
+                                    tagName));
+                        }
+                    }
+                    // else Error: Unexpected match count for inline JavaDoc
+                    // tag!
+                }
+            }
+            blockTagPattern =
+                Utils.getPattern("^\\s*\\**\\s*@(\\p{Alpha}+)\\s");
+        }
+        return new JavadocTags(tags, invalidTags);
+    }
+
+    /**
+     * The type of Javadoc tag we want returned.
+     */
+    public enum JavadocTagType
+    {
+        /** block type. */
+        BLOCK,
+        /** inline type. */
+        INLINE,
+        /** all validTags. */
+        ALL;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheck.java
new file mode 100644
index 0000000..0a1f1b4
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheck.java
@@ -0,0 +1,159 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FileContents;
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TextBlock;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+import java.util.regex.Pattern;
+
+/**
+ * Checks that a variable has Javadoc comment.
+ *
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public class JavadocVariableCheck
+    extends Check
+{
+    /** the scope to check */
+    private Scope mScope = Scope.PRIVATE;
+
+    /** the visibility scope where Javadoc comments shouldn't be checked **/
+    private Scope mExcludeScope;
+
+    /** the regular expression to ignore variable name */
+    private String mIgnoreNameRegexp;
+
+    /** the pattern to ignore variable name */
+    private Pattern mIgnoreNamePattern;
+
+    /**
+     * Sets the scope to check.
+     * @param aFrom string to get the scope from
+     */
+    public void setScope(String aFrom)
+    {
+        mScope = Scope.getInstance(aFrom);
+    }
+
+    /**
+     * Set the excludeScope.
+     * @param aScope a <code>String</code> value
+     */
+    public void setExcludeScope(String aScope)
+    {
+        mExcludeScope = Scope.getInstance(aScope);
+    }
+
+    /**
+     * Sets the variable names to ignore in the check.
+     * @param aRegexp regexp to define variable names to ignore.
+     */
+    public void setIgnoreNamePattern(String aRegexp)
+    {
+        mIgnoreNameRegexp = aRegexp;
+        if (!(aRegexp == null || aRegexp.length() == 0)) {
+            mIgnoreNamePattern = Pattern.compile(aRegexp);
+        }
+        else {
+            mIgnoreNamePattern = null;
+        }
+    }
+
+    /**
+     * Gets the variable names to ignore in the check.
+     * @return true regexp string to define variable names to ignore.
+     */
+    public String getIgnoreNamePattern()
+    {
+        return mIgnoreNameRegexp;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.VARIABLE_DEF,
+            TokenTypes.ENUM_CONSTANT_DEF,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (shouldCheck(aAST)) {
+            final FileContents contents = getFileContents();
+            final TextBlock cmt =
+                contents.getJavadocBefore(aAST.getLineNo());
+
+            if (cmt == null) {
+                log(aAST, "javadoc.missing");
+            }
+        }
+    }
+
+    /**
+     * Decides whether the variable name of an AST is in the ignore list.
+     * @param aAST the AST to check
+     * @return true if the variable name of aAST is in the ignore list.
+     */
+    private boolean isIgnored(DetailAST aAST)
+    {
+        final String name = aAST.findFirstToken(TokenTypes.IDENT).getText();
+        return mIgnoreNamePattern != null
+                && mIgnoreNamePattern.matcher(name).matches();
+    }
+
+    /**
+     * Whether we should check this node.
+     * @param aAST a given node.
+     * @return whether we should check a given node.
+     */
+    private boolean shouldCheck(final DetailAST aAST)
+    {
+        if (ScopeUtils.inCodeBlock(aAST) || isIgnored(aAST)) {
+            return false;
+        }
+
+        final Scope scope;
+        if (aAST.getType() == TokenTypes.ENUM_CONSTANT_DEF) {
+            scope = Scope.PUBLIC;
+        }
+        else {
+            final DetailAST mods = aAST.findFirstToken(TokenTypes.MODIFIERS);
+            final Scope declaredScope = ScopeUtils.getScopeFromMods(mods);
+            scope =
+                ScopeUtils.inInterfaceOrAnnotationBlock(aAST)
+                    ? Scope.PUBLIC : declaredScope;
+        }
+
+        final Scope surroundingScope = ScopeUtils.getSurroundingScope(aAST);
+
+        return scope.isIn(mScope) && surroundingScope.isIn(mScope)
+            && ((mExcludeScope == null)
+                || !scope.isIn(mExcludeScope)
+                || !surroundingScope.isIn(mExcludeScope));
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java
new file mode 100644
index 0000000..05d5e14
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/TagParser.java
@@ -0,0 +1,316 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import com.google.common.collect.Lists;
+import java.util.List;
+
+/**
+ * <p>
+ * Helper class used to parse HTML tags or generic type identifiers
+ * from a single line of text. Just the beginning of the HTML tag
+ * is located.  No attempt is made to parse out the complete tag,
+ * particularly since some of the tag parameters could be located
+ * on the following line of text.  The <code>hasNextTag</code> and
+ * <code>nextTag</code> methods are used to iterate through the HTML
+ * tags or generic type identifiers that were found on the line of text.
+ * </p>
+ *
+ * <p>
+ * This class isn't really specific to HTML tags. Currently the only HTML
+ * tag that this class looks specifically for is the HTML comment tag.
+ * This class helps figure out if a tag exists and if it is well-formed.
+ * It does not know whether it is valid HTML.  This class is also used for
+ * generics types which looks like opening HTML tags ex: {@code <T>, <E>, <V>,
+ * <MY_FOO_TYPE>}, etc. According to this class they are valid tags.
+ * </p>
+ *
+ * @author Chris Stillwell
+ */
+class TagParser
+{
+    /** List of HtmlTags found on the input line of text. */
+    private final List<HtmlTag> mTags = Lists.newLinkedList();
+
+    /**
+     * Constructs a TagParser and finds the first tag if any.
+     * @param aText the line of text to parse.
+     * @param aLineNo the source line number.
+     */
+    public TagParser(String[] aText, int aLineNo)
+    {
+        parseTags(aText, aLineNo);
+    }
+
+    /**
+     * Returns the next available HtmlTag.
+     * @return a HtmlTag or <code>null</code> if none available.
+     * @throws IndexOutOfBoundsException if there are no HtmlTags
+     *         left to return.
+     */
+    public HtmlTag nextTag()
+    {
+        return mTags.remove(0);
+    }
+
+    /**
+     * Indicates if there are any more HtmlTag to retrieve.
+     * @return <code>true</code> if there are more tags.
+     */
+    public boolean hasNextTag()
+    {
+        return !mTags.isEmpty();
+    }
+
+    /**
+     * Performs lazy initialization on the internal tags List
+     * and adds the tag.
+     * @param aTag the HtmlTag to add.
+     */
+    private void add(HtmlTag aTag)
+    {
+        mTags.add(aTag);
+    }
+
+    /**
+     * Parses the text line for any HTML tags and adds them to the internal
+     * List of tags.
+     * @param aText the source line to parse.
+     * @param aLineNo the source line number.
+     */
+    private void parseTags(String[] aText, int aLineNo)
+    {
+        final int nLines = aText.length;
+        Point position = new Point(0, 0);
+
+        position = findChar(aText, '<', position);
+        while (position.getLineNo() < nLines) {
+            // if this is html comment then skip it
+            if (isCommentTag(aText, position)) {
+                position = skipHtmlComment(aText, position);
+            }
+            else if (!isTag(aText, position)) {
+                position = getNextCharPos(aText, position);
+            }
+            else {
+                // find end of tag
+                final Point endTag = findChar(aText, '>', position);
+                final boolean incompleteTag = (endTag.getLineNo() >= nLines);
+                // get tag id (one word)
+                final String tagId =
+                    (incompleteTag ? "" : getTagId(aText, position));
+                // is this closed tag
+                final boolean closedTag =
+                    ((endTag.getLineNo() < nLines) && (endTag.getColumnNo() > 0)
+                     && (aText[endTag.getLineNo()]
+                     .charAt(endTag.getColumnNo() - 1) == '/'));
+                // add new tag
+                add(new HtmlTag(tagId,
+                                position.getLineNo() + aLineNo,
+                                position.getColumnNo(),
+                                closedTag,
+                                incompleteTag,
+                                aText[position.getLineNo()]));
+                position = endTag;
+            }
+            position = findChar(aText, '<', position);
+        }
+    }
+
+    /**
+     * Checks if the given position is start one for HTML tag.
+     * @param aText text of javadoc comments.
+     * @param aPos position to check.
+     * @return <code>true</code> some HTML tag starts from given position.
+     */
+    private boolean isTag(String[] aText, Point aPos)
+    {
+        final int column = aPos.getColumnNo() + 1;
+        final String text = aText[aPos.getLineNo()];
+
+        //Character.isJavaIdentifier... may not be a valid HTML
+        //identifier but is valid for generics
+        return ((column < text.length())
+                && (Character.isJavaIdentifierStart(text.charAt(column))
+                    || Character.isJavaIdentifierPart(text.charAt(column))
+                    || text.charAt(column) == '/')
+                || (column >= text.length()));
+    }
+
+    /**
+     * Parse tag id.
+     * @param aText text of javadoc comments.
+     * @param aTagStart start position of the tag
+     * @return id for given tag
+     */
+    private String getTagId(String[] aText, Point aTagStart)
+    {
+        int column = aTagStart.getColumnNo() + 1;
+        String text = aText[aTagStart.getLineNo()];
+        if (column >= text.length()) {
+            return "";
+        }
+
+        if (text.charAt(column) == '/') {
+            column++;
+        }
+
+        text = text.substring(column).trim();
+        column = 0;
+
+        //Character.isJavaIdentifier... may not be a valid HTML
+        //identifier but is valid for generics
+        while (column < text.length()
+            && (Character.isJavaIdentifierStart(text.charAt(column))
+                || Character.isJavaIdentifierPart(text.charAt(column))))
+        {
+            column++;
+        }
+
+        return text.substring(0, column);
+    }
+
+    /**
+     * If this is a HTML-comments.
+     * @param aText text of javadoc comments
+     * @param aPos position to check
+     * @return <code>true</code> if HTML-comments
+     *         starts form given position.
+     */
+    private boolean isCommentTag(String[] aText, Point aPos)
+    {
+        return aText[aPos.getLineNo()].startsWith("<!--", aPos.getColumnNo());
+    }
+
+    /**
+     * Skips HTML comments.
+     * @param aText text of javadoc comments.
+     * @param aFrom start position of HTML-comments
+     * @return position after HTML-comments
+     */
+    private Point skipHtmlComment(String[] aText, Point aFrom)
+    {
+        Point to = aFrom;
+        to = findChar(aText, '>', to);
+        while ((to.getLineNo() < aText.length)
+               && !aText[to.getLineNo()]
+               .substring(0, to.getColumnNo() + 1).endsWith("-->"))
+        {
+            to = findChar(aText, '>', getNextCharPos(aText, to));
+        }
+        return to;
+    }
+
+    /**
+     * Finds next occurrence of given character.
+     * @param aText text to search
+     * @param aChar character to search
+     * @param aFrom position to start search
+     * @return position of next occurrence of given character
+     */
+    private Point findChar(String[] aText, char aChar, Point aFrom)
+    {
+        Point curr = new Point(aFrom.getLineNo(), aFrom.getColumnNo());
+        while ((curr.getLineNo() < aText.length)
+               && (aText[curr.getLineNo()].charAt(curr.getColumnNo()) != aChar))
+        {
+            curr = getNextCharPos(aText, curr);
+        }
+
+        return curr;
+    }
+
+    /**
+     * Returns position of next comment character, skips
+     * whitespaces and asterisks.
+     * @param aText to search.
+     * @param aFrom location to search from
+     * @return location of the next character.
+     */
+    private Point getNextCharPos(String[] aText, Point aFrom)
+    {
+        int line = aFrom.getLineNo();
+        int column = aFrom.getColumnNo() + 1;
+        while ((line < aText.length) && (column >= aText[line].length())) {
+            // go to the next line
+            line++;
+            column = 0;
+            if (line < aText.length) {
+                //skip beginning spaces and stars
+                final String currentLine = aText[line];
+                while ((column < currentLine.length())
+                       && (Character.isWhitespace(currentLine.charAt(column))
+                           || (currentLine.charAt(column) == '*')))
+                {
+                    column++;
+                    if ((column < currentLine.length())
+                        && (currentLine.charAt(column - 1) == '*')
+                        && (currentLine.charAt(column) == '/'))
+                    {
+                        // this is end of comment
+                        column = currentLine.length();
+                    }
+                }
+            }
+        }
+
+        return new Point(line, column);
+    }
+
+    /**
+     * Represents current position in the text.
+     * @author o_sukholsky
+     */
+    private static final class Point
+    {
+        /** line number. */
+        private final int mLine;
+        /** column number.*/
+        private final int mColumn;
+
+        /**
+         * Creates new <code>Point</code> instance.
+         * @param aLineNo line number
+         * @param aColumnNo column number
+         */
+        public Point(int aLineNo, int aColumnNo)
+        {
+            mLine = aLineNo;
+            mColumn = aColumnNo;
+        }
+
+        /**
+         * Getter for line number.
+         * @return line number of the position.
+         */
+        public int getLineNo()
+        {
+            return mLine;
+        }
+
+        /**
+         * Getter for column number.
+         * @return column number of the position.
+         */
+        public int getColumnNo()
+        {
+            return mColumn;
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/WriteTagCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/WriteTagCheck.java
new file mode 100644
index 0000000..66412ea
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/WriteTagCheck.java
@@ -0,0 +1,232 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FileContents;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+import com.puppycrawl.tools.checkstyle.api.TextBlock;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+import org.apache.commons.beanutils.ConversionException;
+
+/**
+ * <p>
+ * Outputs a JavaDoc tag as information. Can be used e.g. with the stylesheets
+ * that sort the report by author name.
+ * To define the format for a tag, set property tagFormat to a
+ * regular expression.
+ * This check uses two different severity levels. The normal one is used for
+ * reporting when the tag is missing. The additional one (tagSeverity) is used
+ * for the level of reporting when the tag exists. The default value for
+ * tagSeverity is info.
+ * </p>
+ * <p> An example of how to configure the check for printing author name is:
+ *</p>
+ * <pre>
+ * <module name="WriteTag">
+ *    <property name="tag" value="@author"/>
+ *    <property name="tagFormat" value="\S"/>
+ * </module>
+ * </pre>
+ * <p> An example of how to configure the check to print warnings if an
+ * "@incomplete" tag is found, and not print anything if it is not found:
+ *</p>
+ * <pre>
+ * <module name="WriteTag">
+ *    <property name="tag" value="@incomplete"/>
+ *    <property name="tagFormat" value="\S"/>
+ *    <property name="severity" value="ignore"/>
+ *    <property name="tagSeverity" value="warning"/>
+ * </module>
+ * </pre>
+ *
+ * @author Daniel Grenner
+ * @version 1.0
+ */
+public class WriteTagCheck
+    extends Check
+{
+    /** compiled regexp to match tag **/
+    private Pattern mTagRE;
+    /** compiled regexp to match tag content **/
+    private Pattern mTagFormatRE;
+
+    /** regexp to match tag */
+    private String mTag;
+    /** regexp to match tag content */
+    private String mTagFormat;
+    /** the severity level of found tag reports */
+    private SeverityLevel mTagSeverityLevel = SeverityLevel.INFO;
+
+    /**
+     * Sets the tag to check.
+     * @param aTag tag to check
+     * @throws ConversionException If the tag is not a valid regular exception.
+     */
+    public void setTag(String aTag)
+        throws ConversionException
+    {
+        try {
+            mTag = aTag;
+            mTagRE = Utils.getPattern(aTag + "\\s*(.*$)");
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aTag, e);
+        }
+    }
+
+    /**
+     * Set the tag format.
+     * @param aFormat a <code>String</code> value
+     * @throws ConversionException unable to parse aFormat
+     */
+    public void setTagFormat(String aFormat)
+        throws ConversionException
+    {
+        try {
+            mTagFormat = aFormat;
+            mTagFormatRE = Utils.getPattern(aFormat);
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+    }
+
+    /**
+     * Sets the tag severity level.  The string should be one of the names
+     * defined in the <code>SeverityLevel</code> class.
+     *
+     * @param aSeverity  The new severity level
+     * @see SeverityLevel
+     */
+    public final void setTagSeverity(String aSeverity)
+    {
+        mTagSeverityLevel = SeverityLevel.getInstance(aSeverity);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.INTERFACE_DEF,
+                          TokenTypes.CLASS_DEF,
+                          TokenTypes.ENUM_DEF,
+                          TokenTypes.ANNOTATION_DEF,
+        };
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return new int[] {TokenTypes.INTERFACE_DEF,
+                          TokenTypes.CLASS_DEF,
+                          TokenTypes.ENUM_DEF,
+                          TokenTypes.ANNOTATION_DEF,
+                          TokenTypes.METHOD_DEF,
+                          TokenTypes.CTOR_DEF,
+                          TokenTypes.ENUM_CONSTANT_DEF,
+                          TokenTypes.ANNOTATION_FIELD_DEF,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final FileContents contents = getFileContents();
+        final int lineNo = aAST.getLineNo();
+        final TextBlock cmt =
+            contents.getJavadocBefore(lineNo);
+        if (cmt == null) {
+            log(lineNo, "type.missingTag", mTag);
+        }
+        else {
+            checkTag(lineNo, cmt.getText(), mTag, mTagRE, mTagFormatRE,
+                mTagFormat);
+        }
+    }
+
+    /**
+     * Verifies that a type definition has a required tag.
+     * @param aLineNo the line number for the type definition.
+     * @param aComment the Javadoc comment for the type definition.
+     * @param aTag the required tag name.
+     * @param aTagRE regexp for the full tag.
+     * @param aFormatRE regexp for the tag value.
+     * @param aFormat pattern for the tag value.
+     */
+    private void checkTag(
+            int aLineNo,
+            String[] aComment,
+            String aTag,
+            Pattern aTagRE,
+            Pattern aFormatRE,
+            String aFormat)
+    {
+        if (aTagRE == null) {
+            return;
+        }
+
+        int tagCount = 0;
+        for (int i = 0; i < aComment.length; i++) {
+            final String s = aComment[i];
+            final Matcher matcher = aTagRE.matcher(s);
+            if (matcher.find()) {
+                tagCount += 1;
+                final int contentStart = matcher.start(1);
+                final String content = s.substring(contentStart);
+                if ((aFormatRE != null) && !aFormatRE.matcher(content).find()) {
+                    log(aLineNo + i - aComment.length, "type.tagFormat", aTag,
+                        aFormat);
+                }
+                else {
+                    logTag(aLineNo + i - aComment.length, aTag, content);
+                }
+
+            }
+        }
+        if (tagCount == 0) {
+            log(aLineNo, "type.missingTag", aTag);
+        }
+
+    }
+
+
+    /**
+     * Log a message.
+     *
+     * @param aLine the line number where the error was found
+     * @param aTag the javdoc tag to be logged
+     * @param aTagValue the contents of the tag
+     *
+     * @see java.text.MessageFormat
+     */
+    protected final void logTag(int aLine, String aTag, String aTagValue)
+    {
+        final String originalSeverity = getSeverity();
+        setSeverity(mTagSeverityLevel.getName());
+
+        log(aLine, "javadoc.writeTag", aTag, aTagValue);
+
+        setSeverity(originalSeverity);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/package-info.java
new file mode 100644
index 0000000..19a995d
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/package-info.java
@@ -0,0 +1,23 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the Javadoc checks that are bundled with the main distribution.
+ */
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractClassCouplingCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractClassCouplingCheck.java
new file mode 100644
index 0000000..dde4b2b
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractClassCouplingCheck.java
@@ -0,0 +1,312 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.metrics;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.CheckUtils;
+
+import java.util.Set;
+
+/**
+ * Base class for coupling calculation.
+ *
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ * @author o_sukhodolsky
+ */
+public abstract class AbstractClassCouplingCheck extends Check
+{
+    /** Class names to ignore. */
+    private static final Set<String> DEFAULT_EXCLUDED_CLASSES =
+                ImmutableSet.<String>builder()
+                // primitives
+                .add("boolean", "byte", "char", "double", "float", "int")
+                .add("long", "short", "void")
+                // wrappers
+                .add("Boolean", "Byte", "Character", "Double", "Float")
+                .add("Integer", "Long", "Short", "Void")
+                // java.lang.*
+                .add("Object", "Class")
+                .add("String", "StringBuffer", "StringBuilder")
+                // Exceptions
+                .add("ArrayIndexOutOfBoundsException", "Exception")
+                .add("RuntimeException", "IllegalArgumentException")
+                .add("IllegalStateException", "IndexOutOfBoundsException")
+                .add("NullPointerException", "Throwable", "SecurityException")
+                .add("UnsupportedOperationException")
+                // java.util.*
+                .add("List", "ArrayList", "Deque", "Queue", "LinkedList")
+                .add("Set", "HashSet", "SortedSet", "TreeSet")
+                .add("Map", "HashMap", "SortedMap", "TreeMap")
+                .build();
+    /** User-configured class names to ignore. */
+    private Set<String> mExcludedClasses = DEFAULT_EXCLUDED_CLASSES;
+    /** Allowed complexity. */
+    private int mMax;
+    /** package of the file we check. */
+    private String mPackageName;
+
+    /** Stack of contexts. */
+    private final FastStack<Context> mContextStack = FastStack.newInstance();
+    /** Current context. */
+    private Context mContext;
+
+    /**
+     * Creates new instance of the check.
+     * @param aDefaultMax default value for allowed complexity.
+     */
+    protected AbstractClassCouplingCheck(int aDefaultMax)
+    {
+        setMax(aDefaultMax);
+    }
+
+    @Override
+    public final int[] getDefaultTokens()
+    {
+        return getRequiredTokens();
+    }
+
+    /** @return allowed complexity. */
+    public final int getMax()
+    {
+        return mMax;
+    }
+
+    /**
+     * Sets maximul allowed complexity.
+     * @param aMax allowed complexity.
+     */
+    public final void setMax(int aMax)
+    {
+        mMax = aMax;
+    }
+
+    /**
+     * Sets user-excluded classes to ignore.
+     * @param aExcludedClasses the list of classes to ignore.
+     */
+    public final void setExcludedClasses(String[] aExcludedClasses)
+    {
+        mExcludedClasses = ImmutableSet.copyOf(aExcludedClasses);
+    }
+
+    @Override
+    public final void beginTree(DetailAST aAST)
+    {
+        mPackageName = "";
+    }
+
+    /** @return message key we use for log violations. */
+    protected abstract String getLogMessageId();
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.PACKAGE_DEF:
+            visitPackageDef(aAST);
+            break;
+        case TokenTypes.CLASS_DEF:
+        case TokenTypes.INTERFACE_DEF:
+        case TokenTypes.ANNOTATION_DEF:
+        case TokenTypes.ENUM_DEF:
+            visitClassDef(aAST);
+            break;
+        case TokenTypes.TYPE:
+            mContext.visitType(aAST);
+            break;
+        case TokenTypes.LITERAL_NEW:
+            mContext.visitLiteralNew(aAST);
+            break;
+        case TokenTypes.LITERAL_THROWS:
+            mContext.visitLiteralThrows(aAST);
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.CLASS_DEF:
+        case TokenTypes.INTERFACE_DEF:
+        case TokenTypes.ANNOTATION_DEF:
+        case TokenTypes.ENUM_DEF:
+            leaveClassDef();
+            break;
+        default:
+            // Do nothing
+        }
+    }
+
+    /**
+     * Stores package of current class we check.
+     * @param aPkg package definition.
+     */
+    private void visitPackageDef(DetailAST aPkg)
+    {
+        final FullIdent ident = FullIdent.createFullIdent(aPkg.getLastChild()
+                .getPreviousSibling());
+        mPackageName = ident.getText();
+    }
+
+    /**
+     * Creates new context for a given class.
+     * @param aClassDef class definition node.
+     */
+    private void visitClassDef(DetailAST aClassDef)
+    {
+        mContextStack.push(mContext);
+        final String className =
+            aClassDef.findFirstToken(TokenTypes.IDENT).getText();
+        mContext = new Context(className,
+                               aClassDef.getLineNo(),
+                               aClassDef.getColumnNo());
+    }
+
+    /** Restores previous context. */
+    private void leaveClassDef()
+    {
+        mContext.checkCoupling();
+        mContext = mContextStack.pop();
+    }
+
+    /**
+     * Incapsulates information about class coupling.
+     *
+     * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+     * @author o_sukhodolsky
+     */
+    private class Context
+    {
+        /**
+         * Set of referenced classes.
+         * Sorted by name for predictable error messages in unit tests.
+         */
+        private final Set<String> mReferencedClassNames = Sets.newTreeSet();
+        /** Own class name. */
+        private final String mClassName;
+        /* Location of own class. (Used to log violations) */
+        /** Line number of class definition. */
+        private final int mLineNo;
+        /** Column number of class definition. */
+        private final int mColumnNo;
+
+        /**
+         * Create new context associated with given class.
+         * @param aClassName name of the given class.
+         * @param aLineNo line of class definition.
+         * @param aColumnNo column of class definition.
+         */
+        public Context(String aClassName, int aLineNo, int aColumnNo)
+        {
+            mClassName = aClassName;
+            mLineNo = aLineNo;
+            mColumnNo = aColumnNo;
+        }
+
+        /**
+         * Visits throws clause and collects all exceptions we throw.
+         * @param aThrows throws to process.
+         */
+        public void visitLiteralThrows(DetailAST aThrows)
+        {
+            for (DetailAST childAST = aThrows.getFirstChild();
+                 childAST != null;
+                 childAST = childAST.getNextSibling())
+            {
+                if (childAST.getType() != TokenTypes.COMMA) {
+                    addReferencedClassName(childAST);
+                }
+            }
+        }
+
+        /**
+         * Visits type.
+         * @param aAST type to process.
+         */
+        public void visitType(DetailAST aAST)
+        {
+            final String className = CheckUtils.createFullType(aAST).getText();
+            mContext.addReferencedClassName(className);
+        }
+
+        /**
+         * Visits NEW.
+         * @param aAST NEW to process.
+         */
+        public void visitLiteralNew(DetailAST aAST)
+        {
+            mContext.addReferencedClassName(aAST.getFirstChild());
+        }
+
+        /**
+         * Adds new referenced class.
+         * @param aAST a node which represents referenced class.
+         */
+        private void addReferencedClassName(DetailAST aAST)
+        {
+            final String className = FullIdent.createFullIdent(aAST).getText();
+            addReferencedClassName(className);
+        }
+
+        /**
+         * Adds new referenced class.
+         * @param aClassName class name of the referenced class.
+         */
+        private void addReferencedClassName(String aClassName)
+        {
+            if (isSignificant(aClassName)) {
+                mReferencedClassNames.add(aClassName);
+            }
+        }
+
+        /** Checks if coupling less than allowed or not. */
+        public void checkCoupling()
+        {
+            mReferencedClassNames.remove(mClassName);
+            mReferencedClassNames.remove(mPackageName + "." + mClassName);
+
+            if (mReferencedClassNames.size() > mMax) {
+                log(mLineNo, mColumnNo, getLogMessageId(),
+                        mReferencedClassNames.size(), getMax(),
+                        mReferencedClassNames.toString());
+            }
+        }
+
+        /**
+         * Checks if given class shouldn't be ignored and not from java.lang.
+         * @param aClassName class to check.
+         * @return true if we should count this class.
+         */
+        private boolean isSignificant(String aClassName)
+        {
+            return (aClassName.length() > 0)
+                    && !mExcludedClasses.contains(aClassName)
+                    && !aClassName.startsWith("java.lang.");
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractComplexityCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractComplexityCheck.java
new file mode 100644
index 0000000..4dc646f
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractComplexityCheck.java
@@ -0,0 +1,201 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.metrics;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import java.math.BigInteger;
+
+/**
+ * Base class for checks the calculate complexity based around methods.
+ *
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ * @author Oliver Burn
+ */
+public abstract class AbstractComplexityCheck
+    extends Check
+{
+    /** the initial current value */
+    private static final BigInteger INITIAL_VALUE = BigInteger.ONE;
+
+    /** stack of values - all but the current value */
+    private final FastStack<BigInteger> mValueStack = FastStack.newInstance();
+
+    /** the current value */
+    private BigInteger mCurrentValue = BigInteger.ZERO;
+
+    /** threshold to report error for */
+    private int mMax;
+
+    /**
+     * Creates an instance.
+     * @param aMax the threshold of when to report an error
+     */
+    public AbstractComplexityCheck(int aMax)
+    {
+        mMax = aMax;
+    }
+
+    /**
+     * @return the message ID to log violations with
+     */
+    protected abstract String getMessageID();
+
+    /**
+     * Hook called when visiting a token. Will not be called the method
+     * definition tokens.
+     *
+     * @param aAST the token being visited
+     */
+    protected void visitTokenHook(DetailAST aAST)
+    {
+    }
+
+    /**
+     * Hook called when leaving a token. Will not be called the method
+     * definition tokens.
+     *
+     * @param aAST the token being left
+     */
+    protected void leaveTokenHook(DetailAST aAST)
+    {
+    }
+
+    @Override
+    public final int[] getRequiredTokens()
+    {
+        return new int[] {
+            TokenTypes.CTOR_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.INSTANCE_INIT,
+            TokenTypes.STATIC_INIT,
+        };
+    }
+
+    /** @return the maximum threshold allowed */
+    public final int getMax()
+    {
+        return mMax;
+    }
+
+    /**
+     * Set the maximum threshold allowed.
+     *
+     * @param aMax the maximum threshold
+     */
+    public final void setMax(int aMax)
+    {
+        mMax = aMax;
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.CTOR_DEF:
+        case TokenTypes.METHOD_DEF:
+        case TokenTypes.INSTANCE_INIT:
+        case TokenTypes.STATIC_INIT:
+            visitMethodDef();
+            break;
+        default:
+            visitTokenHook(aAST);
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.CTOR_DEF:
+        case TokenTypes.METHOD_DEF:
+        case TokenTypes.INSTANCE_INIT:
+        case TokenTypes.STATIC_INIT:
+            leaveMethodDef(aAST);
+            break;
+        default:
+            leaveTokenHook(aAST);
+        }
+    }
+
+    /**
+     * @return the current value
+     */
+    protected final BigInteger getCurrentValue()
+    {
+        return mCurrentValue;
+    }
+
+    /**
+     * Set the current value
+     * @param aValue the new value
+     */
+    protected final void setCurrentValue(BigInteger aValue)
+    {
+        mCurrentValue = aValue;
+    }
+
+    /**
+     * Increments the current value by a specified amount.
+     *
+     * @param aBy the amount to increment by
+     */
+    protected final void incrementCurrentValue(BigInteger aBy)
+    {
+        setCurrentValue(getCurrentValue().add(aBy));
+    }
+
+    /** Push the current value on the stack */
+    protected final void pushValue()
+    {
+        mValueStack.push(mCurrentValue);
+        mCurrentValue = INITIAL_VALUE;
+    }
+
+    /**
+     * @return pop a value off the stack and make it the current value
+     */
+    protected final BigInteger popValue()
+    {
+        mCurrentValue = mValueStack.pop();
+        return mCurrentValue;
+    }
+
+    /** Process the start of the method definition */
+    private void visitMethodDef()
+    {
+        pushValue();
+    }
+
+    /**
+     * Process the end of a method definition.
+     *
+     * @param aAST the token representing the method definition
+     */
+    private void leaveMethodDef(DetailAST aAST)
+    {
+        final BigInteger max = BigInteger.valueOf(mMax);
+        if (mCurrentValue.compareTo(max) > 0) {
+            log(aAST, getMessageID(), mCurrentValue, max);
+        }
+        popValue();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/BooleanExpressionComplexityCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/BooleanExpressionComplexityCheck.java
new file mode 100644
index 0000000..0a26f9a
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/BooleanExpressionComplexityCheck.java
@@ -0,0 +1,222 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.metrics;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.CheckUtils;
+
+/**
+ * Restricts nested boolean operators (&&, ||, &, | and ^) to
+ * a specified depth (default = 3).
+ *
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ * @author o_sukhodolsky
+ */
+public final class BooleanExpressionComplexityCheck extends Check
+{
+    /** Default allowed complexity. */
+    private static final int DEFAULT_MAX = 3;
+
+    /** Stack of contexts. */
+    private final FastStack<Context> mContextStack = FastStack.newInstance();
+    /** Maximum allowed complexity. */
+    private int mMax;
+    /** Current context. */
+    private Context mContext;
+
+    /** Creates new instance of the check. */
+    public BooleanExpressionComplexityCheck()
+    {
+        setMax(DEFAULT_MAX);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.CTOR_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.EXPR,
+            TokenTypes.LAND,
+            TokenTypes.BAND,
+            TokenTypes.LOR,
+            TokenTypes.BOR,
+            TokenTypes.BXOR,
+        };
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return new int[] {
+            TokenTypes.CTOR_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.EXPR,
+        };
+    }
+
+    /**
+     * Getter for maximum allowed complexity.
+     * @return value of maximum allowed complexity.
+     */
+    public int getMax()
+    {
+        return mMax;
+    }
+
+    /**
+     * Setter for maximum allowed complexity.
+     * @param aMax new maximum allowed complexity.
+     */
+    public void setMax(int aMax)
+    {
+        mMax = aMax;
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.CTOR_DEF:
+        case TokenTypes.METHOD_DEF:
+            visitMethodDef(aAST);
+            break;
+        case TokenTypes.EXPR:
+            visitExpr();
+            break;
+        case TokenTypes.LAND:
+        case TokenTypes.BAND:
+        case TokenTypes.LOR:
+        case TokenTypes.BOR:
+        case TokenTypes.BXOR:
+            mContext.visitBooleanOperator();
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.CTOR_DEF:
+        case TokenTypes.METHOD_DEF:
+            leaveMethodDef();
+            break;
+        case TokenTypes.EXPR:
+            leaveExpr(aAST);
+            break;
+        default:
+            // Do nothing
+        }
+    }
+
+    /**
+     * Creates new context for a given method.
+     * @param aAST a method we start to check.
+     */
+    private void visitMethodDef(DetailAST aAST)
+    {
+        mContextStack.push(mContext);
+        mContext = new Context(!CheckUtils.isEqualsMethod(aAST));
+    }
+
+    /** Removes old context. */
+    private void leaveMethodDef()
+    {
+        mContext = mContextStack.pop();
+    }
+
+    /** Creates and pushes new context. */
+    private void visitExpr()
+    {
+        mContextStack.push(mContext);
+        mContext = new Context((mContext == null) || mContext.isChecking());
+    }
+
+    /**
+     * Restores previous context.
+     * @param aAST expression we leave.
+     */
+    private void leaveExpr(DetailAST aAST)
+    {
+        mContext.checkCount(aAST);
+        mContext = mContextStack.pop();
+    }
+
+    /**
+     * Represents context (method/expression) in which we check complexity.
+     *
+     * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+     * @author o_sukhodolsky
+     */
+    private class Context
+    {
+        /**
+         * Should we perform check in current context or not.
+         * Usually false if we are inside equals() method.
+         */
+        private final boolean mChecking;
+        /** Count of boolean operators. */
+        private int mCount;
+
+        /**
+         * Creates new instance.
+         * @param aChecking should we check in current context or not.
+         */
+        public Context(boolean aChecking)
+        {
+            mChecking = aChecking;
+            mCount = 0;
+        }
+
+        /**
+         * Getter for checking property.
+         * @return should we check in current context or not.
+         */
+        public boolean isChecking()
+        {
+            return mChecking;
+        }
+
+        /** Increases operator counter. */
+        public void visitBooleanOperator()
+        {
+            ++mCount;
+        }
+
+        /**
+         * Checks if we violates maximum allowed complexity.
+         * @param aAST a node we check now.
+         */
+        public void checkCount(DetailAST aAST)
+        {
+            if (mChecking && (mCount > getMax())) {
+                final DetailAST parentAST = aAST.getParent();
+
+                log(parentAST.getLineNo(), parentAST.getColumnNo(),
+                    "booleanExpressionComplexity", mCount, getMax());
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/ClassDataAbstractionCouplingCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/ClassDataAbstractionCouplingCheck.java
new file mode 100644
index 0000000..74a2876
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/ClassDataAbstractionCouplingCheck.java
@@ -0,0 +1,60 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.metrics;
+
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * This metric measures the number of instantiations of other classes
+ * within the given class.
+ *
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ * @author o_sukhodolsky
+ */
+public final class ClassDataAbstractionCouplingCheck
+    extends AbstractClassCouplingCheck
+{
+    /** Default allowed complexity. */
+    private static final int DEFAULT_MAX = 7;
+
+    /** Creates bew instance of the check. */
+    public ClassDataAbstractionCouplingCheck()
+    {
+        super(DEFAULT_MAX);
+        setTokens(new String[] {"LITERAL_NEW"});
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return new int[] {
+            TokenTypes.PACKAGE_DEF,
+            TokenTypes.CLASS_DEF,
+            TokenTypes.INTERFACE_DEF,
+            TokenTypes.ENUM_DEF,
+            TokenTypes.LITERAL_NEW,
+        };
+    }
+
+    @Override
+    protected String getLogMessageId()
+    {
+        return "classDataAbstractionCoupling";
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/ClassFanOutComplexityCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/ClassFanOutComplexityCheck.java
new file mode 100644
index 0000000..2f9905f
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/ClassFanOutComplexityCheck.java
@@ -0,0 +1,62 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.metrics;
+
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * The number of other classes a given class relies on. Also the square
+ * of this has been shown to indicate the amount of maintenance required
+ * in functional programs (on a file basis) at least.
+ *
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ * @author o_sukhodolsky
+ */
+public final class ClassFanOutComplexityCheck extends AbstractClassCouplingCheck
+{
+    /** default value of max value. */
+    private static final int DEFAULT_MAX = 20;
+
+    /** Creates new instance of this check. */
+    public ClassFanOutComplexityCheck()
+    {
+        super(DEFAULT_MAX);
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return new int[] {
+            TokenTypes.PACKAGE_DEF,
+            TokenTypes.CLASS_DEF,
+            TokenTypes.INTERFACE_DEF,
+            TokenTypes.ENUM_DEF,
+            TokenTypes.TYPE,
+            TokenTypes.LITERAL_NEW,
+            TokenTypes.LITERAL_THROWS,
+            TokenTypes.ANNOTATION_DEF,
+        };
+    }
+
+    @Override
+    protected String getLogMessageId()
+    {
+        return "classFanOutComplexity";
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/CyclomaticComplexityCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/CyclomaticComplexityCheck.java
new file mode 100644
index 0000000..cc6af9b
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/CyclomaticComplexityCheck.java
@@ -0,0 +1,80 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.metrics;
+
+import java.math.BigInteger;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Checks cyclomatic complexity against a specified limit. The complexity is
+ * measured by the number of "if", "while", "do", "for", "?:", "catch",
+ * "switch", "case", "&&" and "||" statements (plus one) in the body of
+ * the member. It is a measure of the minimum number of possible paths through
+ * the source and therefore the number of required tests. Generally 1-4 is
+ * considered good, 5-7 ok, 8-10 consider re-factoring, and 11+ re-factor now!
+ *
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ * @author Oliver Burn
+ */
+public class CyclomaticComplexityCheck
+    extends AbstractComplexityCheck
+{
+    /** default allowed complexity */
+    private static final int DEFAULT_VALUE = 10;
+
+    /** Create an instance. */
+    public CyclomaticComplexityCheck()
+    {
+        super(DEFAULT_VALUE);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.CTOR_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.INSTANCE_INIT,
+            TokenTypes.STATIC_INIT,
+            TokenTypes.LITERAL_WHILE,
+            TokenTypes.LITERAL_DO,
+            TokenTypes.LITERAL_FOR,
+            TokenTypes.LITERAL_IF,
+            TokenTypes.LITERAL_CASE,
+            TokenTypes.LITERAL_CATCH,
+            TokenTypes.QUESTION,
+            TokenTypes.LAND,
+            TokenTypes.LOR,
+        };
+    }
+
+    @Override
+    protected final void visitTokenHook(DetailAST aAST)
+    {
+        incrementCurrentValue(BigInteger.ONE);
+    }
+
+    @Override
+    protected final String getMessageID()
+    {
+        return "cyclomaticComplexity";
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/JavaNCSSCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/JavaNCSSCheck.java
new file mode 100644
index 0000000..1e00a32
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/JavaNCSSCheck.java
@@ -0,0 +1,356 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.metrics;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * This check calculates the Non Commenting Source Statements (NCSS) metric for
+ * java source files and methods. The check adheres to the <a
+ * href="http://www.kclee.com/clemens/java/javancss/">JavaNCSS specification
+ * </a> and gives the same results as the JavaNCSS tool.
+ *
+ * The NCSS-metric tries to determine complexity of methods, classes and files
+ * by counting the non commenting lines. Roughly said this is (nearly)
+ * equivalent to counting the semicolons and opening curly braces.
+ *
+ * @author Lars K�dderitzsch
+ */
+public class JavaNCSSCheck extends Check
+{
+    /** default constant for max file ncss */
+    private static final int FILE_MAX_NCSS = 2000;
+
+    /** default constant for max file ncss */
+    private static final int CLASS_MAX_NCSS = 1500;
+
+    /** default constant for max method ncss */
+    private static final int METHOD_MAX_NCSS = 50;
+
+    /** maximum ncss for a complete source file */
+    private int mFileMax = FILE_MAX_NCSS;
+
+    /** maximum ncss for a class */
+    private int mClassMax = CLASS_MAX_NCSS;
+
+    /** maximum ncss for a method */
+    private int mMethodMax = METHOD_MAX_NCSS;
+
+    /** list containing the stacked counters */
+    private FastStack<Counter> mCounters;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[]{
+            TokenTypes.CLASS_DEF,
+            TokenTypes.INTERFACE_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.CTOR_DEF,
+            TokenTypes.INSTANCE_INIT,
+            TokenTypes.STATIC_INIT,
+            TokenTypes.PACKAGE_DEF,
+            TokenTypes.IMPORT,
+            TokenTypes.VARIABLE_DEF,
+            TokenTypes.CTOR_CALL,
+            TokenTypes.SUPER_CTOR_CALL,
+            TokenTypes.LITERAL_IF,
+            TokenTypes.LITERAL_ELSE,
+            TokenTypes.LITERAL_WHILE,
+            TokenTypes.LITERAL_DO,
+            TokenTypes.LITERAL_FOR,
+            TokenTypes.LITERAL_SWITCH,
+            TokenTypes.LITERAL_BREAK,
+            TokenTypes.LITERAL_CONTINUE,
+            TokenTypes.LITERAL_RETURN,
+            TokenTypes.LITERAL_THROW,
+            TokenTypes.LITERAL_SYNCHRONIZED,
+            TokenTypes.LITERAL_CATCH,
+            TokenTypes.LITERAL_FINALLY,
+            TokenTypes.EXPR,
+            TokenTypes.LABELED_STAT,
+            TokenTypes.LITERAL_CASE,
+            TokenTypes.LITERAL_DEFAULT,
+        };
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return new int[]{
+            TokenTypes.CLASS_DEF,
+            TokenTypes.INTERFACE_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.CTOR_DEF,
+            TokenTypes.INSTANCE_INIT,
+            TokenTypes.STATIC_INIT,
+            TokenTypes.PACKAGE_DEF,
+            TokenTypes.IMPORT,
+            TokenTypes.VARIABLE_DEF,
+            TokenTypes.CTOR_CALL,
+            TokenTypes.SUPER_CTOR_CALL,
+            TokenTypes.LITERAL_IF,
+            TokenTypes.LITERAL_ELSE,
+            TokenTypes.LITERAL_WHILE,
+            TokenTypes.LITERAL_DO,
+            TokenTypes.LITERAL_FOR,
+            TokenTypes.LITERAL_SWITCH,
+            TokenTypes.LITERAL_BREAK,
+            TokenTypes.LITERAL_CONTINUE,
+            TokenTypes.LITERAL_RETURN,
+            TokenTypes.LITERAL_THROW,
+            TokenTypes.LITERAL_SYNCHRONIZED,
+            TokenTypes.LITERAL_CATCH,
+            TokenTypes.LITERAL_FINALLY,
+            TokenTypes.EXPR,
+            TokenTypes.LABELED_STAT,
+            TokenTypes.LITERAL_CASE,
+            TokenTypes.LITERAL_DEFAULT,
+        };
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        mCounters = new FastStack<Counter>();
+
+        //add a counter for the file
+        mCounters.push(new Counter());
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final int tokenType = aAST.getType();
+
+        if ((TokenTypes.CLASS_DEF == tokenType)
+            || (TokenTypes.METHOD_DEF == tokenType)
+            || (TokenTypes.CTOR_DEF == tokenType)
+            || (TokenTypes.STATIC_INIT == tokenType)
+            || (TokenTypes.INSTANCE_INIT == tokenType))
+        {
+            //add a counter for this class/method
+            mCounters.push(new Counter());
+        }
+
+        //check if token is countable
+        if (isCountable(aAST)) {
+            //increment the stacked counters
+            for (final Counter c : mCounters) {
+                c.increment();
+            }
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        final int tokenType = aAST.getType();
+        if ((TokenTypes.METHOD_DEF == tokenType)
+            || (TokenTypes.CTOR_DEF == tokenType)
+            || (TokenTypes.STATIC_INIT == tokenType)
+            || (TokenTypes.INSTANCE_INIT == tokenType))
+        {
+            //pop counter from the stack
+            final Counter counter = mCounters.pop();
+
+            final int count = counter.getCount();
+            if (count > mMethodMax) {
+                log(aAST.getLineNo(), aAST.getColumnNo(), "ncss.method",
+                        count, mMethodMax);
+            }
+        }
+        else if (TokenTypes.CLASS_DEF == tokenType) {
+            //pop counter from the stack
+            final Counter counter = mCounters.pop();
+
+            final int count = counter.getCount();
+            if (count > mClassMax) {
+                log(aAST.getLineNo(), aAST.getColumnNo(), "ncss.class",
+                        count, mClassMax);
+            }
+        }
+    }
+
+    @Override
+    public void finishTree(DetailAST aRootAST)
+    {
+        //pop counter from the stack
+        final Counter counter = mCounters.pop();
+
+        final int count = counter.getCount();
+        if (count > mFileMax) {
+            log(aRootAST.getLineNo(), aRootAST.getColumnNo(), "ncss.file",
+                    count, mFileMax);
+        }
+    }
+
+    /**
+     * Sets the maximum ncss for a file.
+     *
+     * @param aFileMax
+     *            the maximum ncss
+     */
+    public void setFileMaximum(int aFileMax)
+    {
+        mFileMax = aFileMax;
+    }
+
+    /**
+     * Sets the maximum ncss for a class.
+     *
+     * @param aClassMax
+     *            the maximum ncss
+     */
+    public void setClassMaximum(int aClassMax)
+    {
+        mClassMax = aClassMax;
+    }
+
+    /**
+     * Sets the maximum ncss for a method.
+     *
+     * @param aMethodMax
+     *            the maximum ncss
+     */
+    public void setMethodMaximum(int aMethodMax)
+    {
+        mMethodMax = aMethodMax;
+    }
+
+    /**
+     * Checks if a token is countable for the ncss metric
+     *
+     * @param aAST
+     *            the AST
+     * @return true if the token is countable
+     */
+    private boolean isCountable(DetailAST aAST)
+    {
+        boolean countable = true;
+
+        final int tokenType = aAST.getType();
+
+        //check if an expression is countable
+        if (TokenTypes.EXPR == tokenType) {
+            countable = isExpressionCountable(aAST);
+        }
+        //check if an variable definition is countable
+        else if (TokenTypes.VARIABLE_DEF == tokenType) {
+            countable = isVariableDefCountable(aAST);
+        }
+        return countable;
+    }
+
+    /**
+     * Checks if a variable definition is countable.
+     *
+     * @param aAST the AST
+     * @return true if the variable definition is countable, false otherwise
+     */
+    private boolean isVariableDefCountable(DetailAST aAST)
+    {
+        boolean countable = false;
+
+        //count variable defs only if they are direct child to a slist or
+        // object block
+        final int parentType = aAST.getParent().getType();
+
+        if ((TokenTypes.SLIST == parentType)
+            || (TokenTypes.OBJBLOCK == parentType))
+        {
+            final DetailAST prevSibling = aAST.getPreviousSibling();
+
+            //is countable if no previous sibling is found or
+            //the sibling is no COMMA.
+            //This is done because multiple assignment on one line are countes
+            // as 1
+            countable = (prevSibling == null)
+                    || (TokenTypes.COMMA != prevSibling.getType());
+        }
+
+        return countable;
+    }
+
+    /**
+     * Checks if an expression is countable for the ncss metric.
+     *
+     * @param aAST the AST
+     * @return true if the expression is countable, false otherwise
+     */
+    private boolean isExpressionCountable(DetailAST aAST)
+    {
+        boolean countable = true;
+
+        //count expressions only if they are direct child to a slist (method
+        // body, for loop...)
+        //or direct child of label,if,else,do,while,for
+        final int parentType = aAST.getParent().getType();
+        switch (parentType) {
+        case TokenTypes.SLIST :
+        case TokenTypes.LABELED_STAT :
+        case TokenTypes.LITERAL_FOR :
+        case TokenTypes.LITERAL_DO :
+        case TokenTypes.LITERAL_WHILE :
+        case TokenTypes.LITERAL_IF :
+        case TokenTypes.LITERAL_ELSE :
+            //don't count if or loop conditions
+            final DetailAST prevSibling = aAST.getPreviousSibling();
+            countable = (prevSibling == null)
+                || (TokenTypes.LPAREN != prevSibling.getType());
+            break;
+        default :
+            countable = false;
+            break;
+        }
+        return countable;
+    }
+
+    /**
+     * @author Lars K�dderitzsch
+     *
+     * Class representing a counter,
+     */
+    private static class Counter
+    {
+        /** the counters internal integer */
+        private int mIvCount;
+
+        /**
+         * Increments the counter.
+         */
+        public void increment()
+        {
+            mIvCount++;
+        }
+
+        /**
+         * Gets the counters value
+         *
+         * @return the counter
+         */
+        public int getCount()
+        {
+            return mIvCount;
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/NPathComplexityCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/NPathComplexityCheck.java
new file mode 100644
index 0000000..567e8fd
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/NPathComplexityCheck.java
@@ -0,0 +1,147 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.metrics;
+
+import java.math.BigInteger;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Checks the npath complexity against a specified limit (default = 200).
+ * The npath metric computes the number of possible execution paths
+ * through a function. Similar to the cyclomatic complexity but also
+ * takes into account the nesting of conditional statements and
+ * multi-part boolean expressions.
+ *
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ * @author o_sukhodolsky
+ * TODO: For every or: _value += (_orCount * (nestedValue - 1));
+ * TODO: For every and: ???
+ */
+public final class NPathComplexityCheck extends AbstractComplexityCheck
+{
+    /** Default allowed complexity. */
+    private static final int DEFAULT_MAX = 200;
+
+    /** Creates new instance of the check. */
+    public NPathComplexityCheck()
+    {
+        super(DEFAULT_MAX);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.CTOR_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.STATIC_INIT,
+            TokenTypes.INSTANCE_INIT,
+            TokenTypes.LITERAL_WHILE,
+            TokenTypes.LITERAL_DO,
+            TokenTypes.LITERAL_FOR,
+            TokenTypes.LITERAL_IF,
+            TokenTypes.LITERAL_ELSE,
+            TokenTypes.LITERAL_SWITCH,
+            TokenTypes.LITERAL_CASE,
+            TokenTypes.LITERAL_TRY,
+            TokenTypes.LITERAL_CATCH,
+            TokenTypes.QUESTION,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.LITERAL_WHILE:
+        case TokenTypes.LITERAL_DO:
+        case TokenTypes.LITERAL_FOR:
+        case TokenTypes.LITERAL_IF:
+        case TokenTypes.QUESTION:
+        case TokenTypes.LITERAL_TRY:
+        case TokenTypes.LITERAL_SWITCH:
+            visitMultiplyingConditional();
+            break;
+        case TokenTypes.LITERAL_ELSE:
+        case TokenTypes.LITERAL_CATCH:
+        case TokenTypes.LITERAL_CASE:
+            visitAddingConditional();
+            break;
+        default:
+            super.visitToken(aAST);
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.LITERAL_WHILE:
+        case TokenTypes.LITERAL_DO:
+        case TokenTypes.LITERAL_FOR:
+        case TokenTypes.LITERAL_IF:
+        case TokenTypes.QUESTION:
+        case TokenTypes.LITERAL_TRY:
+        case TokenTypes.LITERAL_SWITCH:
+            leaveMultiplyingConditional();
+            break;
+        case TokenTypes.LITERAL_ELSE:
+        case TokenTypes.LITERAL_CATCH:
+        case TokenTypes.LITERAL_CASE:
+            leaveAddingConditional();
+            break;
+        default:
+            super.leaveToken(aAST);
+        }
+    }
+
+    @Override
+    protected String getMessageID()
+    {
+        return "npathComplexity";
+    }
+
+    /** Visits else, catch or case. */
+    private void visitAddingConditional()
+    {
+        pushValue();
+    }
+
+    /** Leaves else, catch or case. */
+    private void leaveAddingConditional()
+    {
+        setCurrentValue(
+                getCurrentValue().subtract(BigInteger.ONE).add(popValue()));
+    }
+
+    /** Visits while, do, for, if, try, ? (in ?::) or switch. */
+    private void visitMultiplyingConditional()
+    {
+        pushValue();
+    }
+
+    /** Leaves while, do, for, if, try, ? (in ?::) or switch. */
+    private void leaveMultiplyingConditional()
+    {
+        setCurrentValue(
+                getCurrentValue().add(BigInteger.ONE).multiply(popValue()));
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/package-info.java
new file mode 100644
index 0000000..cb54cb0
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/package-info.java
@@ -0,0 +1,24 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the <span class="xdocspagetitle">Metrics</span> checks that are
+ * bundled with the main distribution.
+ */
+package com.puppycrawl.tools.checkstyle.checks.metrics;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheck.java
new file mode 100644
index 0000000..e92053d
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheck.java
@@ -0,0 +1,169 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.modifier;
+
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * <p>
+ * Checks that the order of modifiers conforms to the suggestions in the
+ * <a
+ * href="http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html">
+ * Java Language specification, sections 8.1.1, 8.3.1 and 8.4.3</a>.
+ * The correct order is:</p>
+
+<ol>
+  <li><span class="code">public</span></li>
+  <li><span class="code">protected</span></li>
+
+  <li><span class="code">private</span></li>
+  <li><span class="code">abstract</span></li>
+  <li><span class="code">static</span></li>
+  <li><span class="code">final</span></li>
+  <li><span class="code">transient</span></li>
+  <li><span class="code">volatile</span></li>
+
+  <li><span class="code">synchronized</span></li>
+  <li><span class="code">native</span></li>
+  <li><span class="code">strictfp</span></li>
+</ol>
+ * In additional, modifiers are checked to ensure all annotations
+ * are declared before all other modifiers.
+ * <p>
+ * Rationale: Code is easier to read if everybody follows
+ * a standard.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="ModifierOrder"/>
+ * </pre>
+ * @author Lars K�hne
+ */
+public class ModifierOrderCheck
+    extends Check
+{
+    /**
+     * The order of modifiers as suggested in sections 8.1.1,
+     * 8.3.1 and 8.4.3 of the JLS.
+     */
+    private static final String[] JLS_ORDER =
+    {
+        "public", "protected", "private", "abstract", "static", "final",
+        "transient", "volatile", "synchronized", "native", "strictfp", "default",
+    };
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.MODIFIERS};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final List<DetailAST> mods = Lists.newArrayList();
+        DetailAST modifier = aAST.getFirstChild();
+        while (modifier != null) {
+            mods.add(modifier);
+            modifier = modifier.getNextSibling();
+        }
+
+        if (!mods.isEmpty()) {
+            final DetailAST error = checkOrderSuggestedByJLS(mods);
+            if (error != null) {
+                if (error.getType() == TokenTypes.ANNOTATION) {
+                    log(error.getLineNo(), error.getColumnNo(),
+                            "annotation.order",
+                             error.getFirstChild().getText()
+                             + error.getFirstChild().getNextSibling()
+                                .getText());
+                }
+                else {
+                    log(error.getLineNo(), error.getColumnNo(),
+                            "mod.order", error.getText());
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Checks if the modifiers were added in the order suggested
+     * in the Java language specification.
+     *
+     * @param aModifiers list of modifier AST tokens
+     * @return null if the order is correct, otherwise returns the offending
+     * *       modifier AST.
+     */
+    DetailAST checkOrderSuggestedByJLS(List<DetailAST> aModifiers)
+    {
+        int i = 0;
+        DetailAST modifier;
+        final Iterator<DetailAST> it = aModifiers.iterator();
+        //No modifiers, no problems
+        if (!it.hasNext()) {
+            return null;
+        }
+
+        //Speed past all initial annotations
+        do {
+            modifier = it.next();
+        }
+        while (it.hasNext() && (modifier.getType() == TokenTypes.ANNOTATION));
+
+        //All modifiers are annotations, no problem
+        if (modifier.getType() == TokenTypes.ANNOTATION) {
+            return null;
+        }
+
+        while (i < JLS_ORDER.length) {
+            if (modifier.getType() == TokenTypes.ANNOTATION) {
+                //Annotation not at start of modifiers, bad
+                return modifier;
+            }
+
+            while ((i < JLS_ORDER.length)
+                   && !JLS_ORDER[i].equals(modifier.getText()))
+            {
+                i++;
+            }
+
+            if (i == JLS_ORDER.length) {
+                //Current modifier is out of JLS order
+                return modifier;
+            }
+            else if (!it.hasNext()) {
+                //Reached end of modifiers without problem
+                return null;
+            }
+            else {
+                modifier = it.next();
+            }
+        }
+
+        return modifier;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierCheck.java
new file mode 100644
index 0000000..8aac911
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierCheck.java
@@ -0,0 +1,130 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.modifier;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Checks for redundant modifiers in interface and annotation definitions.
+ * Also checks for redundant final modifiers on methods of final classes.
+ *
+ * @author lkuehne
+ */
+public class RedundantModifierCheck
+    extends Check
+{
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.METHOD_DEF,
+            TokenTypes.VARIABLE_DEF,
+            TokenTypes.ANNOTATION_FIELD_DEF,
+            TokenTypes.INTERFACE_DEF,
+        };
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return new int[] {};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (TokenTypes.INTERFACE_DEF == aAST.getType()) {
+            final DetailAST modifiers =
+                aAST.findFirstToken(TokenTypes.MODIFIERS);
+            if (null != modifiers) {
+                for (final int tokenType : new int[] {
+                    TokenTypes.LITERAL_STATIC,
+                    TokenTypes.ABSTRACT, })
+                {
+                    final DetailAST modifier =
+                            modifiers.findFirstToken(tokenType);
+                    if (null != modifier) {
+                        log(modifier.getLineNo(), modifier.getColumnNo(),
+                                "redundantModifier", modifier.getText());
+                    }
+                }
+            }
+        }
+        else if (ScopeUtils.inInterfaceOrAnnotationBlock(aAST)) {
+            final DetailAST modifiers =
+                aAST.findFirstToken(TokenTypes.MODIFIERS);
+
+            DetailAST modifier = modifiers.getFirstChild();
+            while (modifier != null) {
+
+                // javac does not allow final or static in interface methods
+                // order annotation fields hence no need to check that this
+                // is not a method or annotation field
+
+                final int type = modifier.getType();
+                if ((type == TokenTypes.LITERAL_PUBLIC)
+                    || ((type == TokenTypes.LITERAL_STATIC)
+                            && aAST.getType() != TokenTypes.METHOD_DEF)
+                    || (type == TokenTypes.ABSTRACT)
+                    || (type == TokenTypes.FINAL))
+                {
+                    log(modifier.getLineNo(), modifier.getColumnNo(),
+                            "redundantModifier", modifier.getText());
+                    break;
+                }
+
+                modifier = modifier.getNextSibling();
+            }
+        }
+        else if (aAST.getType() == TokenTypes.METHOD_DEF) {
+            final DetailAST modifiers =
+                            aAST.findFirstToken(TokenTypes.MODIFIERS);
+            // private method?
+            boolean checkFinal =
+                modifiers.branchContains(TokenTypes.LITERAL_PRIVATE);
+            // declared in a final class?
+            DetailAST parent = aAST.getParent();
+            while (parent != null) {
+                if (parent.getType() == TokenTypes.CLASS_DEF) {
+                    final DetailAST classModifiers =
+                        parent.findFirstToken(TokenTypes.MODIFIERS);
+                    checkFinal |=
+                        classModifiers.branchContains(TokenTypes.FINAL);
+                    break;
+                }
+                parent = parent.getParent();
+            }
+            if (checkFinal) {
+                DetailAST modifier = modifiers.getFirstChild();
+                while (modifier != null) {
+                    final int type = modifier.getType();
+                    if (type == TokenTypes.FINAL) {
+                        log(modifier.getLineNo(), modifier.getColumnNo(),
+                                "redundantModifier", modifier.getText());
+                        break;
+                    }
+                    modifier = modifier.getNextSibling();
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/package-info.java
new file mode 100644
index 0000000..e8361ed
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/modifier/package-info.java
@@ -0,0 +1,23 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the modifier checks that are bundled with the main distribution.
+ */
+package com.puppycrawl.tools.checkstyle.checks.modifier;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheck.java
new file mode 100644
index 0000000..6ff7cb1
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheck.java
@@ -0,0 +1,349 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * The Check validate abbreviations(consecutive capital letters) length in
+ * identifier name, it also allows to enforce camel case naming. Please read more at
+ * <a href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.3-camel-case">
+ * Google Style Guide</a> to get to know how to avoid long abbreviations in names.
+ * </p>
+ * <p>
+ * Option <code>allowedAbbreviationLength</code> indicates on the allowed amount of capital
+ * letters in abbreviations in the classes, interfaces,
+ * variables and methods names. Default value is '3'.
+ * </p>
+ * <p>
+ * Option <code>allowedAbbreviations</code> - list of abbreviations that
+ * must be skipped for checking. Abbreviations should be separated by comma,
+ * no spaces are allowed.
+ * </p>
+ * <p>
+ * Option <code>ignoreFinal</code> allow to skip variables with <code>final</code> modifier.
+ * Default value is <code>true</code>.
+ * </p>
+ * <p>
+ * Option <code>ignoreStatic</code> allow to skip variables with <code>static</code> modifier.
+ * Default value is <code>true</code>.
+ * </p>
+ * <p>
+ * Option <code>ignoreOverriddenMethod</code> - Allows to
+ * ignore methods tagged with <code>@Override</code> annotation
+ * (that usually mean inherited name). Default value is <code>true</code>.
+ * </p>
+ * Default configuration
+ * <pre>
+ * <module name="AbbreviationAsWordInName" />
+ * </pre>
+ * <p>
+ * To configure to check variables and classes identifiers, do not ignore
+ * variables with static modifier
+ * and allow no abbreviations (enforce camel case phrase) but allow XML and URL abbreviations.
+ * </p>
+ * <pre>
+ * <module name="AbbreviationAsWordInName">
+ *     <property name="tokens" value="VARIABLE_DEF,CLASS_DEF"/>
+ *     <property name="ignoreStatic" value="false"/>
+ *     <property name="allowedAbbreviationLength" value="1"/>
+ *     <property name="allowedAbbreviations" value="XML,URL"/>
+ * </module>
+ * </pre>
+ *
+ * @author Roman Ivanov, Daniil Yaroslvtsev, Baratali Izmailov
+ */
+public class AbbreviationAsWordInNameCheck extends Check
+{
+
+    /**
+     * Warning message key.
+     */
+    public static final String MSG_KEY = "abbreviation.as.word";
+
+    /**
+     * The default value of "allowedAbbreviationLength" option.
+     */
+    private static final int DEFAULT_ALLOWED_ABBREVIATIONS_LENGTH = 3;
+
+    /**
+     * Variable indicates on the allowed amount of capital letters in
+     * abbreviations in the classes, interfaces, variables and methods names.
+     */
+    private int mAllowedAbbreviationLength =
+            DEFAULT_ALLOWED_ABBREVIATIONS_LENGTH;
+
+    /**
+     * Set of allowed abbreviation to ignore in check.
+     */
+    private Set<String> mAllowedAbbreviations = new HashSet<String>();
+
+    /** Allows to ignore variables with 'final' modifier. */
+    private boolean mIgnoreFinal = true;
+
+    /** Allows to ignore variables with 'static' modifier. */
+    private boolean mIgnoreStatic = true;
+
+    /** Allows to ignore methods with '@Override' annotation. */
+    private boolean mIgnoreOverriddenMethods = true;
+
+    /**
+     * Sets ignore option for variables with 'final' modifier.
+     * @param aIgnoreFinal
+     *        Defines if ignore variables with 'final' modifier or not.
+     */
+    public void setIgnoreFinal(boolean aIgnoreFinal)
+    {
+        this.mIgnoreFinal = aIgnoreFinal;
+    }
+
+    /**
+     * Sets ignore option for variables with 'static' modifier.
+     * @param aIgnoreStatic
+     *        Defines if ignore variables with 'static' modifier or not.
+     */
+    public void setIgnoreStatic(boolean aIgnoreStatic)
+    {
+        this.mIgnoreStatic = aIgnoreStatic;
+    }
+
+    /**
+     * Sets ignore option for methods with "@Override" annotation.
+     * @param aIgnoreOverriddenMethods
+     *        Defines if ignore methods with "@Override" annotation or not.
+     */
+    public void setIgnoreOverriddenMethods(boolean aIgnoreOverriddenMethods)
+    {
+        this.mIgnoreOverriddenMethods = aIgnoreOverriddenMethods;
+    }
+
+    /**
+     * Allowed abbreviation length in names.
+     * @param aAllowedAbbreviationLength
+     *            amount of allowed capital letters in abbreviation.
+     */
+    public void setAllowedAbbreviationLength(int aAllowedAbbreviationLength)
+    {
+        mAllowedAbbreviationLength = aAllowedAbbreviationLength;
+    }
+
+    /**
+     * Set a list of abbreviations that must be skipped for checking.
+     * Abbreviations should be separated by comma, no spaces is allowed.
+     * @param aAllowedAbbreviations
+     *        an string of abbreviations that must be skipped from checking,
+     *        each abbreviation separated by comma.
+     */
+    public void setAllowedAbbreviations(String aAllowedAbbreviations)
+    {
+        if (aAllowedAbbreviations != null) {
+            mAllowedAbbreviations = new HashSet<String>(
+                    Arrays.asList(aAllowedAbbreviations.split(",")));
+        }
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.CLASS_DEF,
+            TokenTypes.INTERFACE_DEF,
+            TokenTypes.ENUM_DEF,
+            TokenTypes.ANNOTATION_DEF,
+            TokenTypes.ANNOTATION_FIELD_DEF,
+            TokenTypes.PARAMETER_DEF,
+            TokenTypes.VARIABLE_DEF,
+            TokenTypes.METHOD_DEF,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAst)
+    {
+
+        if (!isIgnoreSituation(aAst)) {
+
+            final DetailAST nameAst = aAst.findFirstToken(TokenTypes.IDENT);
+            final String typeName = nameAst.getText();
+
+            final String abbr = getDisallowedAbbreviation(typeName);
+            if (abbr != null) {
+                log(nameAst.getLineNo(), MSG_KEY, mAllowedAbbreviationLength);
+            }
+        }
+    }
+
+    /**
+     * Checks if it is an ignore situation.
+     * @param aAst input DetailAST node.
+     * @return true if it is an ignore situation found for given input DetailAST
+     *         node.
+     */
+    private boolean isIgnoreSituation(DetailAST aAst)
+    {
+        final DetailAST modifiers = aAst.getFirstChild();
+
+        boolean result = false;
+        if (aAst.getType() == TokenTypes.VARIABLE_DEF) {
+            if ((mIgnoreFinal || mIgnoreStatic)
+                    && isInterfaceDeclaration(aAst))
+            {
+                // field declarations in interface are static/final
+                result = true;
+            }
+            else {
+                result = (mIgnoreFinal
+                          && modifiers.branchContains(TokenTypes.FINAL))
+                    || (mIgnoreStatic
+                        && modifiers.branchContains(TokenTypes.LITERAL_STATIC));
+            }
+        }
+        else if (aAst.getType() == TokenTypes.METHOD_DEF) {
+            result = mIgnoreOverriddenMethods
+                    && hasOverrideAnnotation(modifiers);
+        }
+        return result;
+    }
+
+    /**
+     * Check that variable definition in interface definition.
+     * @param aVariableDefAst variable definition.
+     * @return true if variable definition(aVaribaleDefAst) is in interface
+     * definition.
+     */
+    private static boolean isInterfaceDeclaration(DetailAST aVariableDefAst)
+    {
+        boolean result = false;
+        final DetailAST astBlock = aVariableDefAst.getParent();
+        if (astBlock != null) {
+            final DetailAST astParent2 = astBlock.getParent();
+            if (astParent2 != null
+                    && astParent2.getType() == TokenTypes.INTERFACE_DEF)
+            {
+                result = true;
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Checks that the method has "@Override" annotation.
+     * @param aMethodModifiersAST
+     *        A DetailAST nod is related to the given method modifiers
+     *        (MODIFIERS type).
+     * @return true if method has "@Override" annotation.
+     */
+    private static boolean hasOverrideAnnotation(DetailAST aMethodModifiersAST)
+    {
+        boolean result = false;
+        for (DetailAST child : getChildren(aMethodModifiersAST)) {
+            if (child.getType() == TokenTypes.ANNOTATION) {
+                final DetailAST annotationIdent = child.findFirstToken(TokenTypes.IDENT);
+                if (annotationIdent != null && "Override".equals(annotationIdent.getText())) {
+                    result = true;
+                    break;
+                }
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Gets the disallowed abbreviation contained in given String.
+     * @param aString
+     *        the given String.
+     * @return the disallowed abbreviation contained in given String as a
+     *         separate String.
+     */
+    private String getDisallowedAbbreviation(String aString)
+    {
+        int beginIndex = 0;
+        boolean abbrStarted = false;
+        String result = null;
+
+        for (int index = 0; index < aString.length(); index++) {
+            final char symbol = aString.charAt(index);
+
+            if (Character.isUpperCase(symbol)) {
+                if (!abbrStarted) {
+                    abbrStarted = true;
+                    beginIndex = index;
+                }
+            }
+            else {
+                if (abbrStarted) {
+                    abbrStarted = false;
+
+                    // -1 as a first capital is usually beginning of next word
+                    final int endIndex = index - 1;
+                    final int abbrLength = endIndex - beginIndex;
+                    if (abbrLength > mAllowedAbbreviationLength) {
+                        result = aString.substring(beginIndex, endIndex);
+                        if (!mAllowedAbbreviations.contains(result)) {
+                            break;
+                        }
+                        else {
+                            result = null;
+                        }
+                    }
+                    beginIndex = -1;
+                }
+            }
+        }
+        if (abbrStarted) {
+            final int endIndex = aString.length();
+            final int abbrLength = endIndex - beginIndex;
+            if (abbrLength > 1 && abbrLength > mAllowedAbbreviationLength) {
+                result = aString.substring(beginIndex, endIndex);
+                if (mAllowedAbbreviations.contains(result)) {
+                    result = null;
+                }
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Gets all the children which are one level below on the current DetailAST
+     * parent node.
+     * @param aNode
+     *        Current parent node.
+     * @return The list of children one level below on the current parent node.
+     */
+    private static List<DetailAST> getChildren(final DetailAST aNode)
+    {
+        final List<DetailAST> result = new LinkedList<DetailAST>();
+        DetailAST curNode = aNode.getFirstChild();
+        while (curNode != null) {
+            result.add(curNode);
+            curNode = curNode.getNextSibling();
+        }
+        return result;
+    }
+
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractAccessControlNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractAccessControlNameCheck.java
new file mode 100644
index 0000000..4e979bc
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractAccessControlNameCheck.java
@@ -0,0 +1,173 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Abstract class for checking a class member (field/method)'s name conforms to
+ * a format specified by the format property.
+ *
+ * <p>
+ * This class extends {@link AbstractNameCheck} with support for access level
+ * restrictions. This allows the check to be configured to be applied to one of
+ * the four Java access levels: {@code public}, {@code protected},
+ * {@code "package"}, and {@code private}.
+ * </p>
+ *
+ * <p>
+ * Level is configured using the following properties:
+ * <ol>
+ * <li>applyToPublic, default true;</li>
+ * <li>applyToProtected, default true;</li>
+ * <li>applyToPackage, default true;</li>
+ * <li>applyToPrivate, default true;</li>
+ * </ol>
+ *
+ *
+ * @author Rick Giles
+ * @version 1.0
+ */
+public abstract class AbstractAccessControlNameCheck
+    extends AbstractNameCheck
+{
+    /** If true, applies the check be public members. */
+    private boolean mApplyToPublic = true;
+
+    /** If true, applies the check be protected members. */
+    private boolean mApplyToProtected = true;
+
+    /** If true, applies the check be "package" members. */
+    private boolean mApplyToPackage = true;
+
+    /** If true, applies the check be private members. */
+    private boolean mApplyToPrivate = true;
+
+    /**
+     * Creates a new {@code AbstractAccessControlNameCheck} instance.
+     *
+     * @param aFormat
+     *                format to check with
+     */
+    public AbstractAccessControlNameCheck(String aFormat)
+    {
+        super(aFormat);
+    }
+
+    @Override
+    protected boolean mustCheckName(DetailAST aAST)
+    {
+        return shouldCheckInScope(aAST);
+    }
+
+    /**
+     * Should we check member with given modifiers.
+     *
+     * @param aModifiers
+     *                modifiers of member to check.
+     * @return true if we should check such member.
+     */
+    protected boolean shouldCheckInScope(DetailAST aModifiers)
+    {
+        if (aModifiers == null) {
+            // if there are no modifiers it is a package-private
+            return mApplyToPackage;
+        }
+
+        final boolean isPublic = aModifiers
+                .branchContains(TokenTypes.LITERAL_PUBLIC);
+        final boolean isProtected = aModifiers
+                .branchContains(TokenTypes.LITERAL_PROTECTED);
+        final boolean isPrivate = aModifiers
+                .branchContains(TokenTypes.LITERAL_PRIVATE);
+        final boolean isPackage = !(isPublic || isProtected || isPrivate);
+
+        return (mApplyToPublic && isPublic)
+                || (mApplyToProtected && isProtected)
+                || (mApplyToPackage && isPackage)
+                || (mApplyToPrivate && isPrivate);
+    }
+
+    /**
+     * Sets whether we should apply the check to public members.
+     *
+     * @param aApplyTo new value of the property.
+     */
+    public void setApplyToPublic(boolean aApplyTo)
+    {
+        mApplyToPublic = aApplyTo;
+    }
+
+    /** @return true if the check should be applied to public members. */
+    public boolean getApplyToPublic()
+    {
+        return mApplyToPublic;
+    }
+
+    /**
+     * Sets whether we should apply the check to protected members.
+     *
+     * @param aApplyTo new value of the property.
+     */
+    public void setApplyToProtected(boolean aApplyTo)
+    {
+        mApplyToProtected = aApplyTo;
+    }
+
+    /** @return true if the check should be applied to protected members. */
+    public boolean getApplyToProtected()
+    {
+        return mApplyToProtected;
+    }
+
+    /**
+     * Sets whether we should apply the check to package-private members.
+     *
+     * @param aApplyTo new value of the property.
+     */
+    public void setApplyToPackage(boolean aApplyTo)
+    {
+        mApplyToPackage = aApplyTo;
+    }
+
+    /**
+     * @return true if the check should be applied to package-private members.
+     */
+    public boolean getApplyToPackage()
+    {
+        return mApplyToPackage;
+    }
+
+    /**
+     * Sets whether we should apply the check to private members.
+     *
+     * @param aApplyTo new value of the property.
+     */
+    public void setApplyToPrivate(boolean aApplyTo)
+    {
+        mApplyToPrivate = aApplyTo;
+    }
+
+    /** @return true if the check should be applied to private members. */
+    public boolean getApplyToPrivate()
+    {
+        return mApplyToPrivate;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheck.java
new file mode 100644
index 0000000..ff240fa
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheck.java
@@ -0,0 +1,137 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.AbstractFormatCheck;
+
+/**
+ * <p>
+ * Ensures that the names of abstract classes conforming to some
+ * regular expression and check that <code>abstract</code> modifier exists.
+ * </p>
+ * <p>
+ * Rationale: Abstract classes are convenience base class
+ * implementations of interfaces, not types as such. As such
+ * they should be named to indicate this. Also if names of classes
+ * starts with 'Abstract' it's very convenient that they will
+ * have abstract modifier.
+ * </p>
+ *
+ * @author <a href="mailto:simon at redhillconsulting.com.au">Simon Harris</a>
+ * @author <a href="mailto:solid.danil at gmail.com">Danil Lopatin</a>
+ */
+public final class AbstractClassNameCheck extends AbstractFormatCheck
+{
+    /** Default format for abstract class names */
+    private static final String DEFAULT_FORMAT = "^Abstract.*$|^.*Factory$";
+
+    /** whether to ignore checking the modifier */
+    private boolean mIgnoreModifier;
+
+    /** whether to ignore checking the name */
+    private boolean mIgnoreName;
+
+    /** Creates new instance of the check. */
+    public AbstractClassNameCheck()
+    {
+        super(DEFAULT_FORMAT);
+    }
+
+    /**
+     * Whether to ignore checking for the <code>abstract</code> modifier.
+     * @param aValue new value
+     */
+    public void setIgnoreModifier(boolean aValue)
+    {
+        mIgnoreModifier = aValue;
+    }
+
+    /**
+     * Whether to ignore checking the name.
+     * @param aValue new value.
+     */
+    public void setIgnoreName(boolean aValue)
+    {
+        mIgnoreName = aValue;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[]{TokenTypes.CLASS_DEF};
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return getDefaultTokens();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (TokenTypes.CLASS_DEF == aAST.getType()) {
+            visitClassDef(aAST);
+        }
+    }
+
+    /**
+     * Checks class definition.
+     * @param aAST class definition for check.
+     */
+    private void visitClassDef(DetailAST aAST)
+    {
+        final String className =
+            aAST.findFirstToken(TokenTypes.IDENT).getText();
+        if (isAbstract(aAST)) {
+            // if class has abstract modifier
+            if (!mIgnoreName && !isMatchingClassName(className)) {
+                log(aAST.getLineNo(), aAST.getColumnNo(),
+                    "illegal.abstract.class.name", className, getFormat());
+            }
+        }
+        else if (!mIgnoreModifier && isMatchingClassName(className)) {
+            log(aAST.getLineNo(), aAST.getColumnNo(),
+                "no.abstract.class.modifier", className);
+        }
+    }
+
+    /**
+     * @param aAST class definition for check.
+     * @return true if a given class declared as abstract.
+     */
+    private boolean isAbstract(DetailAST aAST)
+    {
+        final DetailAST abstractAST = aAST.findFirstToken(TokenTypes.MODIFIERS)
+            .findFirstToken(TokenTypes.ABSTRACT);
+
+        return abstractAST != null;
+    }
+
+    /**
+     * @param aClassName class name for check.
+     * @return true if class name matches format of abstract class names.
+     */
+    private boolean isMatchingClassName(String aClassName)
+    {
+        return getRegexp().matcher(aClassName).find();
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractNameCheck.java
new file mode 100644
index 0000000..0b4d641
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractNameCheck.java
@@ -0,0 +1,75 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.AbstractFormatCheck;
+
+/**
+ * Abstract class for checking that names conform to a specified format.
+ *
+ * @author Rick Giles
+ * @version 1.0
+ */
+public abstract class AbstractNameCheck
+    extends AbstractFormatCheck
+{
+    /**
+     * Message key for invalid pattern error.
+     */
+    public static final String MSG_INVALID_PATTERN = "name.invalidPattern";
+
+    /**
+     * Creates a new <code>AbstractNameCheck</code> instance.
+     * @param aFormat format to check with
+     */
+    public AbstractNameCheck(String aFormat)
+    {
+        super(aFormat);
+    }
+
+    /**
+     * Decides whether the name of an AST should be checked against
+     * the format regexp.
+     * @param aAST the AST to check.
+     * @return true if the IDENT subnode of aAST should be checked against
+     * the format regexp.
+     */
+    protected boolean mustCheckName(DetailAST aAST)
+    {
+        return true;
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (mustCheckName(aAST)) {
+            final DetailAST nameAST = aAST.findFirstToken(TokenTypes.IDENT);
+            if (!getRegexp().matcher(nameAST.getText()).find()) {
+                log(nameAST.getLineNo(),
+                    nameAST.getColumnNo(),
+                    MSG_INVALID_PATTERN,
+                    nameAST.getText(),
+                    getFormat());
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractTypeParameterNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractTypeParameterNameCheck.java
new file mode 100644
index 0000000..922e10d
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractTypeParameterNameCheck.java
@@ -0,0 +1,89 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Abstract class for checking if a class/method type parameter's name
+ * conforms to a format specified by the format property.
+ * </p>
+ *
+ * <p>This class extends {@link AbstractNameCheck}</p>
+ *
+ * @author Travis Schneeberger
+ * @version 1.0
+ */
+public abstract class AbstractTypeParameterNameCheck
+    extends AbstractNameCheck
+{
+    /** the location of the type parameter **/
+    private int mLocation;
+
+    /**
+     * Creates a new <code>AbstractTypeParameterNameCheck</code> instance.
+     * @param aFormat format to check with
+     */
+    public AbstractTypeParameterNameCheck(String aFormat)
+    {
+        super(aFormat);
+    }
+
+    @Override
+    public final int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.TYPE_PARAMETER,
+        };
+    }
+
+    @Override
+    public final void init()
+    {
+        this.mLocation = getLocation();
+
+        assert (this.mLocation == TokenTypes.CLASS_DEF)
+            || (this.mLocation == TokenTypes.METHOD_DEF)
+            || (this.mLocation == TokenTypes.INTERFACE_DEF);
+    }
+
+    @Override
+    protected final boolean mustCheckName(DetailAST aAST)
+    {
+        DetailAST location =
+            aAST.getParent().getParent();
+
+        if (location.getType() == TokenTypes.MODIFIERS) {
+            location = location.getParent();
+        }
+
+        return location.getType() == this.mLocation;
+    }
+
+    /**
+     * This method must be overriden to specify the
+     * location of the type parameter to check.
+     *
+     * @return <code> TokenTypes.CLASS_DEF </code>
+     * or <code> TokenTypes.METHOD_DEF </code>
+     */
+    protected abstract int getLocation();
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ClassTypeParameterNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ClassTypeParameterNameCheck.java
new file mode 100644
index 0000000..09b657f
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ClassTypeParameterNameCheck.java
@@ -0,0 +1,63 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks that class type parameter names conform to a format specified
+ * by the format property.  The format is a
+ * {@link java.util.regex.Pattern regular expression} and defaults to
+ * <strong>^[A-Z]$</strong>.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="ClassTypeParameterName"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check for names that are only a single
+ * letter is
+ * </p>
+ * <pre>
+ * <module name="ClassTypeParameterName">
+ *    <property name="format" value="^[a-zA-Z]$"/>
+ * </module>
+ * </pre>
+ *
+ * @author Travis Schneeberger
+ * @version 1.0
+ */
+public class ClassTypeParameterNameCheck
+    extends AbstractTypeParameterNameCheck
+{
+    /** Creates a new <code>ClassTypeParameterNameCheck</code> instance. */
+    public ClassTypeParameterNameCheck()
+    {
+        super("^[A-Z]$");
+    }
+
+    @Override
+    protected final int getLocation()
+    {
+        return TokenTypes.CLASS_DEF;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ConstantNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ConstantNameCheck.java
new file mode 100644
index 0000000..be1cba7
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ConstantNameCheck.java
@@ -0,0 +1,102 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks that constant names conform to a format specified
+ * by the format property.
+ * A <em>constant</em> is a <strong>static</strong> and <strong>final</strong>
+ * field or an interface/annotation field, except
+ * <strong>serialVersionUID</strong> and <strong>serialPersistentFields
+ * </strong>.  The format is a regular expression
+ * and defaults to <strong>^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$</strong>.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="ConstantName"/>
+ * </pre>
+ *
+ * <p>
+ * An example of how to configure the check for names that are only upper case
+ * letters and digits is:
+ * </p>
+ * <pre>
+ * <module name="ConstantName">
+ *    <property name="format" value="^[A-Z][A-Z0-9]*$"/>
+ * </module>
+ * </pre>
+ *
+ *
+ * @author Rick Giles
+ * @version 1.0
+ */
+public class ConstantNameCheck
+    extends AbstractAccessControlNameCheck
+{
+    /** Creates a new <code>ConstantNameCheck</code> instance. */
+    public ConstantNameCheck()
+    {
+        super("^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$");
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.VARIABLE_DEF};
+    }
+
+    @Override
+    protected final boolean mustCheckName(DetailAST aAST)
+    {
+        boolean retVal = false;
+
+        final DetailAST modifiersAST =
+            aAST.findFirstToken(TokenTypes.MODIFIERS);
+        final boolean isStatic = (modifiersAST != null)
+            && modifiersAST.branchContains(TokenTypes.LITERAL_STATIC);
+        final boolean isFinal = (modifiersAST != null)
+            && modifiersAST.branchContains(TokenTypes.FINAL);
+
+        if ((isStatic  && isFinal && shouldCheckInScope(modifiersAST))
+                || ScopeUtils.inAnnotationBlock(aAST)
+                || (ScopeUtils.inInterfaceOrAnnotationBlock(aAST)
+                        && !ScopeUtils.inCodeBlock(aAST)))
+        {
+            // Handle the serialVersionUID and serialPersistentFields  constants
+            // which are used for Serialization. Cannot enforce rules on it. :-)
+            final DetailAST nameAST = aAST.findFirstToken(TokenTypes.IDENT);
+            if ((nameAST != null)
+                && !("serialVersionUID".equals(nameAST.getText()))
+                && !("serialPersistentFields".equals(nameAST.getText())))
+            {
+                retVal = true;
+            }
+        }
+
+        return retVal;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/InterfaceTypeParameterNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/InterfaceTypeParameterNameCheck.java
new file mode 100644
index 0000000..ea024c3
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/InterfaceTypeParameterNameCheck.java
@@ -0,0 +1,62 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks that interface type parameter names conform to a format specified
+ * by the format property.  The format is a
+ * {@link java.util.regex.Pattern regular expression} and defaults to
+ * <strong>^[A-Z]$</strong>.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="InterfaceTypeParameterName"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check for names that are only a single
+ * letter is
+ * </p>
+ * <pre>
+ * <module name="InterfaceTypeParameterName">
+ *    <property name="format" value="^[a-zA-Z]$"/>
+ * </module>
+ * </pre>
+ *
+ * @author maxvetrenko
+ */
+public class InterfaceTypeParameterNameCheck
+    extends AbstractTypeParameterNameCheck
+{
+    /** Creates a new <code>InterfaceTypeParameterNameCheck</code> instance. */
+    public InterfaceTypeParameterNameCheck()
+    {
+        super("^[A-Z]$");
+    }
+
+    @Override
+    protected final int getLocation()
+    {
+        return TokenTypes.INTERFACE_DEF;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalFinalVariableNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalFinalVariableNameCheck.java
new file mode 100644
index 0000000..5b28703
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalFinalVariableNameCheck.java
@@ -0,0 +1,79 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks that local final variable names conform to a format specified
+ * by the format property. A catch parameter is considered to be
+ * a local variable.The format is a
+ * {@link java.util.regex.Pattern regular expression} and defaults to
+ * <strong>^[a-z][a-zA-Z0-9]*$</strong>.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="LocalFinalVariableName"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check for names that are only upper case
+ * letters and digits is:
+ * </p>
+ * <pre>
+ * <module name="LocalFinalVariableName">
+ *    <property name="format" value="^[A-Z][A-Z0-9]*$"/>
+ * </module>
+ * </pre>
+ *
+ * @author Rick Giles
+ * @version 1.0
+ */
+public class LocalFinalVariableNameCheck
+    extends AbstractNameCheck
+{
+    /** Creates a new <code>LocalFinalVariableNameCheck</code> instance. */
+    public LocalFinalVariableNameCheck()
+    {
+        super("^[a-z][a-zA-Z0-9]*$");
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.VARIABLE_DEF,
+            TokenTypes.PARAMETER_DEF,
+        };
+    }
+
+    @Override
+    protected final boolean mustCheckName(DetailAST aAST)
+    {
+        final DetailAST modifiersAST =
+            aAST.findFirstToken(TokenTypes.MODIFIERS);
+        final boolean isFinal = (modifiersAST != null)
+            && modifiersAST.branchContains(TokenTypes.FINAL);
+        return (isFinal && ScopeUtils.isLocalVariableDef(aAST));
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalVariableNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalVariableNameCheck.java
new file mode 100644
index 0000000..21a7243
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalVariableNameCheck.java
@@ -0,0 +1,132 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import java.util.regex.Pattern;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+/**
+ * <p>
+ * Checks that local, non-final variable names conform to a format specified
+ * by the format property. A catch parameter is considered to be
+ * a local variable. The format is a
+ * {@link java.util.regex.Pattern regular expression}
+ * and defaults to
+ * <strong>^[a-z][a-zA-Z0-9]*$</strong>.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="LocalVariableName"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check for names that begin with a lower
+ * case letter, followed by letters, digits, and underscores is:
+ * </p>
+ * <pre>
+ * <module name="LocalVariableName">
+ *    <property name="format" value="^[a-z](_?[a-zA-Z0-9]+)*$"/>
+ * </module>
+ * </pre>
+ * <p>
+ * An example of one character variable name in
+ * initialization expression(like "i") in FOR loop:
+ * </p>
+ * <pre>
+ * for(int i = 1; i < 10; i++) {}
+ * </pre>
+ * <p>
+ * An example of how to configure the check to allow one char variable name in
+ * <a href="http://docs.oracle.com/javase/tutorial/java/nutsandbolts/for.html">
+ * initialization expressions</a> in FOR loop:
+ * </p>
+ * <pre>
+ * <module name="LocalVariableName">
+ *    <property name="allowOneCharVarInForLoop" value="true"/>
+ * </module>
+ * </pre>
+ * <p>
+ *
+ * @author Rick Giles
+ * @author maxvetrenko
+ * @version 1.0
+ */
+public class LocalVariableNameCheck
+    extends AbstractNameCheck
+{
+    /**
+     * Allow one character name for initialization expression in FOR loop.
+     */
+    private boolean mAllowOneCharVarInForLoop;
+
+    /** Regexp for one-char loop variables. */
+    private static Pattern sSingleChar = Utils.getPattern("^[a-z]$");
+
+    /** Creates a new <code>LocalVariableNameCheck</code> instance. */
+    public LocalVariableNameCheck()
+    {
+        super("^[a-z][a-zA-Z0-9]*$");
+    }
+
+    public final void setAllowOneCharVarInForLoop(boolean aAllow)
+    {
+        mAllowOneCharVarInForLoop = aAllow;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.VARIABLE_DEF,
+            TokenTypes.PARAMETER_DEF,
+        };
+    }
+
+    @Override
+    protected final boolean mustCheckName(DetailAST aAST)
+    {
+        final DetailAST modifiersAST =
+            aAST.findFirstToken(TokenTypes.MODIFIERS);
+        final boolean isFinal = (modifiersAST != null)
+            && modifiersAST.branchContains(TokenTypes.FINAL);
+        if (mAllowOneCharVarInForLoop && isForLoopVariable(aAST)) {
+            final String variableName =
+                    aAST.findFirstToken(TokenTypes.IDENT).getText();
+            return !sSingleChar.matcher(variableName).find();
+        }
+        return (!isFinal && ScopeUtils.isLocalVariableDef(aAST));
+    }
+
+    /**
+     * Checks if a variable is the loop's one.
+     * @param aVariableDef variable definition.
+     * @return true if a variable is the loop's one.
+     */
+    private boolean isForLoopVariable(DetailAST aVariableDef)
+    {
+        final int parentType = aVariableDef.getParent().getType();
+        return  parentType == TokenTypes.FOR_INIT
+                || parentType == TokenTypes.FOR_EACH_CLAUSE;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MemberNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MemberNameCheck.java
new file mode 100644
index 0000000..0732c13
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MemberNameCheck.java
@@ -0,0 +1,79 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks that instance variable names conform to a format specified
+ * by the format property. The format is a
+ * {@link java.util.regex.Pattern regular expression}
+ * and defaults to
+ * <strong>^[a-z][a-zA-Z0-9]*$</strong>.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="MemberName"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check for names that begin with
+ * "m", followed by an upper case letter, and then letters and
+ * digits is:
+ * </p>
+ * <pre>
+ * <module name="MemberName">
+ *    <property name="format" value="^m[A-Z][a-zA-Z0-9]*$"/>
+ * </module>
+ * </pre>
+ * @author Rick Giles
+ * @version 1.0
+ */
+public class MemberNameCheck
+    extends AbstractAccessControlNameCheck
+{
+    /** Creates a new <code>MemberNameCheck</code> instance. */
+    public MemberNameCheck()
+    {
+        super("^[a-z][a-zA-Z0-9]*$");
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.VARIABLE_DEF};
+    }
+
+    @Override
+    protected final boolean mustCheckName(DetailAST aAST)
+    {
+        final DetailAST modifiersAST =
+            aAST.findFirstToken(TokenTypes.MODIFIERS);
+        final boolean isStatic = (modifiersAST != null)
+            && modifiersAST.branchContains(TokenTypes.LITERAL_STATIC);
+
+        return (!isStatic && !ScopeUtils.inInterfaceOrAnnotationBlock(aAST)
+            && !ScopeUtils.isLocalVariableDef(aAST))
+            && shouldCheckInScope(modifiersAST);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodNameCheck.java
new file mode 100644
index 0000000..2a6f29e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodNameCheck.java
@@ -0,0 +1,125 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks that method names conform to a format specified
+ * by the format property. The format is a
+ * {@link java.util.regex.Pattern regular expression}
+ * and defaults to
+ * <strong>^[a-z][a-zA-Z0-9]*$</strong>.
+ * </p>
+ *
+ * <p>
+ * Also, checks if a method name has the same name as the residing class.
+ * The default is false (it is not allowed).  It is legal in Java to have
+ * method with the same name as a class.  As long as a return type is specified
+ * it is a method and not a constructor which it could be easily confused as.
+ * </p>
+ *
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="MethodName"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check for names that begin with
+ * a lower case letter, followed by letters, digits, and underscores is:
+ * </p>
+ * <pre>
+ * <module name="MethodName">
+ *    <property name="format" value="^[a-z](_?[a-zA-Z0-9]+)*$"/>
+ * </module>
+ * </pre>
+ *
+ * <p>
+ * An example of how to configure the check to allow method names
+ * to be equal to the residing class name is:
+ * </p>
+ * <pre>
+ * <module name="MethodName">
+ *    <property name="allowClassName" value="true"/>
+ * </module>
+ * </pre>
+ * @author Oliver Burn
+ * @author Travis Schneeberger
+ * @version 1.1
+ */
+public class MethodNameCheck
+    extends AbstractAccessControlNameCheck
+{
+    /**
+     * for allowing method name to be the same as the class name.
+     */
+    private boolean mAllowClassName;
+
+    /** Creates a new <code>MethodNameCheck</code> instance. */
+    public MethodNameCheck()
+    {
+        super("^[a-z][a-zA-Z0-9]*$");
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.METHOD_DEF, };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAst)
+    {
+        super.visitToken(aAst); // Will check the name against the format.
+
+        if (!mAllowClassName) {
+            final DetailAST method =
+                aAst.findFirstToken(TokenTypes.IDENT);
+            //in all cases this will be the classDef type except anon inner
+            //with anon inner classes this will be the Literal_New keyword
+            final DetailAST classDefOrNew = aAst.getParent().getParent();
+            final DetailAST classIdent =
+                classDefOrNew.findFirstToken(TokenTypes.IDENT);
+            // Following logic is to handle when a classIdent can not be
+            // found. This is when you have a Literal_New keyword followed
+            // a DOT, which is when you have:
+            // new Outclass.InnerInterface(x) { ... }
+            // Such a rare case, will not have the logic to handle parsing
+            // down the tree looking for the first ident.
+            if ((null != classIdent)
+                && method.getText().equals(classIdent.getText()))
+            {
+                log(method.getLineNo(), method.getColumnNo(),
+                    "method.name.equals.class.name", method.getText());
+            }
+        }
+    }
+
+    /**
+     * Sets the property for allowing a method to be the same name as a class.
+     * @param aAllowClassName true to allow false to disallow
+     */
+    public void setAllowClassName(boolean aAllowClassName)
+    {
+        mAllowClassName = aAllowClassName;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodTypeParameterNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodTypeParameterNameCheck.java
new file mode 100644
index 0000000..b6231ac
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodTypeParameterNameCheck.java
@@ -0,0 +1,63 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks that class type parameter names conform to a format specified
+ * by the format property.  The format is a
+ * {@link java.util.regex.Pattern regular expression} and defaults to
+ * <strong>^[A-Z]$</strong>.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="MethodTypeParameterName"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check for names that are only a single
+ * letter is
+ * </p>
+ * <pre>
+ * <module name="MethodTypeParameterName">
+ *    <property name="format" value="^[a-zA-Z]$"/>
+ * </module>
+ * </pre>
+ *
+ * @author Travis Schneeberger
+ * @version 1.0
+ */
+public class MethodTypeParameterNameCheck
+    extends AbstractTypeParameterNameCheck
+{
+    /** Creates a new <code>MethodTypeParameterNameCheck</code> instance. */
+    public MethodTypeParameterNameCheck()
+    {
+        super("^[A-Z]$");
+    }
+
+    @Override
+    protected final int getLocation()
+    {
+        return TokenTypes.METHOD_DEF;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/PackageNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/PackageNameCheck.java
new file mode 100644
index 0000000..bc03792
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/PackageNameCheck.java
@@ -0,0 +1,96 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.AbstractFormatCheck;
+
+/**
+ * <p>
+ * Checks that package names conform to a format specified
+ * by the format property. The format is a
+ * {@link java.util.regex.Pattern regular expression}
+ * and defaults to
+ * <strong>^[a-z]+(\.[a-zA-Z_][a-zA-Z_0-9]*)*$</strong>.
+ * </p>
+ * <p>
+ * The default format has been chosen to match the requirements in the
+ * <a
+ * href="http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html#40169">
+ * Java Language specification</a> and the Sun coding conventions.
+ * However both underscores and uppercase letters are rather uncommon,
+ * so most projects should probably use
+ * <strong>^[a-z]+(\.[a-z][a-z0-9]*)*$</strong>.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="PackageName"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check for package names that begin with
+ * <code>com.puppycrawl.tools.checkstyle</code> is:
+ * </p>
+ * <pre>
+ * <module name="PackageName">
+ *    <property name="format"
+ *              value="^com\.puppycrawl\.tools\.checkstyle(\\.[a-zA-Z_][a-zA-Z_0-9]*)*$"/>
+ * </module>
+ * </pre>
+ *
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public class PackageNameCheck
+    extends AbstractFormatCheck
+{
+    /**
+     * Creates a new <code>PackageNameCheck</code> instance.
+     */
+    public PackageNameCheck()
+    {
+        // Uppercase letters seem rather uncommon, but they're allowed in
+        // http://java.sun.com/docs/books/jls/
+        //   second_edition/html/packages.doc.html#40169
+        super("^[a-z]+(\\.[a-zA-Z_][a-zA-Z0-9_]*)*$");
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.PACKAGE_DEF};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST nameAST = aAST.getLastChild().getPreviousSibling();
+        final FullIdent full = FullIdent.createFullIdent(nameAST);
+        if (!getRegexp().matcher(full.getText()).find()) {
+            log(full.getLineNo(),
+                full.getColumnNo(),
+                "name.invalidPattern",
+                full.getText(),
+                getFormat());
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ParameterNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ParameterNameCheck.java
new file mode 100644
index 0000000..be01b3f
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ParameterNameCheck.java
@@ -0,0 +1,74 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+* <p>
+ * Checks that parameter names conform to a format specified
+ * by the format property. The format is a
+ * {@link java.util.regex.Pattern regular expression}
+ * and defaults to
+ * <strong>^[a-z][a-zA-Z0-9]*$</strong>.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="ParameterName"/>
+ * </pre>
+ * <p>
+  * An example of how to configure the check for names that begin with
+ * a lower case letter, followed by letters, digits, and underscores is:
+ * </p>
+ * <pre>
+ * <module name="ParameterName">
+ *    <property name="format" value="^^[a-z](_?[a-zA-Z0-9]+)*$"/>
+ * </module>
+ * </pre>
+ *
+ * @author Oliver Burn
+ */
+public class ParameterNameCheck
+    extends AbstractNameCheck
+{
+    /**
+     * Creates a new <code>ParameterNameCheck</code> instance.
+     */
+    public ParameterNameCheck()
+    {
+        super("^[a-z][a-zA-Z0-9]*$");
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.PARAMETER_DEF};
+    }
+
+    @Override
+    protected boolean mustCheckName(DetailAST aAST)
+    {
+        return !(
+            (aAST.getParent() != null)
+                && (aAST.getParent().getType() == TokenTypes.LITERAL_CATCH));
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/StaticVariableNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/StaticVariableNameCheck.java
new file mode 100644
index 0000000..7f595bd
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/StaticVariableNameCheck.java
@@ -0,0 +1,80 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks that static, non-final variable names conform to a format specified
+ * by the format property. The format is a
+ * {@link java.util.regex.Pattern regular expression} and defaults to
+ * <strong>^[a-z][a-zA-Z0-9]*$</strong>.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="StaticVariableName"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check for names that begin with
+ * a lower case letter, followed by letters, digits, and underscores is:
+ * </p>
+ * <pre>
+ * <module name="StaticVariableName">
+ *    <property name="format" value="^[a-z](_?[a-zA-Z0-9]+)*$"/>
+ * </module>
+ * </pre>
+ * @author Rick Giles
+ * @version 1.0
+ */
+public class StaticVariableNameCheck
+    extends AbstractAccessControlNameCheck
+{
+    /** Creates a new <code>StaticVariableNameCheck</code> instance. */
+    public StaticVariableNameCheck()
+    {
+        super("^[a-z][a-zA-Z0-9]*$");
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.VARIABLE_DEF};
+    }
+
+    @Override
+    protected final boolean mustCheckName(DetailAST aAST)
+    {
+        final DetailAST modifiersAST =
+            aAST.findFirstToken(TokenTypes.MODIFIERS);
+        final boolean isStatic = (modifiersAST != null)
+            && modifiersAST.branchContains(TokenTypes.LITERAL_STATIC);
+        final boolean isFinal = (modifiersAST != null)
+            && modifiersAST.branchContains(TokenTypes.FINAL);
+
+        return (isStatic
+                && !isFinal
+                && shouldCheckInScope(modifiersAST)
+                && !ScopeUtils.inInterfaceOrAnnotationBlock(aAST));
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/TypeNameCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/TypeNameCheck.java
new file mode 100644
index 0000000..4e8243b
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/TypeNameCheck.java
@@ -0,0 +1,74 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks that type names conform to a format specified
+ * by the format property. The format is a
+ * {@link java.util.regex.Pattern regular expression} and defaults to
+ * <strong>^[A-Z][a-zA-Z0-9]*$</strong>.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="TypeName"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check for names that begin with
+ * a lower case letter, followed by letters, digits, and underscores is:
+ * </p>
+ * <pre>
+ * <module name="TypeName">
+ *    <property name="format" value="^[a-z](_?[a-zA-Z0-9]+)*$"/>
+ * </module>
+ * </pre>
+ * @author Oliver Burn
+ */
+public class TypeNameCheck
+    extends AbstractAccessControlNameCheck
+{
+
+    /**
+     * default pattern for type name.
+     */
+    public static final String DEFAULT_PATTERN = "^[A-Z][a-zA-Z0-9]*$";
+
+    /**
+     * Creates a new <code>TypeNameCheck</code> instance.
+     */
+    public TypeNameCheck()
+    {
+        super(DEFAULT_PATTERN);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.CLASS_DEF,
+                          TokenTypes.INTERFACE_DEF,
+                          TokenTypes.ENUM_DEF,
+                          TokenTypes.ANNOTATION_DEF,
+        };
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/package-info.java
new file mode 100644
index 0000000..dddd5b5
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/package-info.java
@@ -0,0 +1,24 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the <span class="xdocspagetitle">Naming conventions</span> checks
+ * that are bundled with the main distribution.
+ */
+package com.puppycrawl.tools.checkstyle.checks.naming;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/package-info.java
new file mode 100644
index 0000000..ed8b94e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/package-info.java
@@ -0,0 +1,23 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the checks that are bundled with the main distribution.
+ */
+package com.puppycrawl.tools.checkstyle.checks;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/CommentSuppressor.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/CommentSuppressor.java
new file mode 100644
index 0000000..5faf56b
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/CommentSuppressor.java
@@ -0,0 +1,50 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.regexp;
+
+import com.puppycrawl.tools.checkstyle.api.FileContents;
+
+/**
+ * Implementation of a {@link MatchSuppressor} that suppresses based on
+ * whether in a comment.
+ * @author Oliver Burn
+ */
+class CommentSuppressor implements MatchSuppressor
+{
+    /** File contents to check for comments. */
+    private FileContents mCurrentContents;
+
+    /** {@inheritDoc} */
+    public boolean shouldSuppress(int aStartLineNo, int aStartColNo,
+            int aEndLineNo, int aEndColNo)
+    {
+        return (null != mCurrentContents)
+                && mCurrentContents.hasIntersectionWithComment(aStartLineNo,
+                        aStartColNo, aEndLineNo, aEndColNo);
+    }
+
+    /**
+     * Set the current file contents.
+     * @param aCurrentContents the new contents.
+     */
+    public void setCurrentContents(FileContents aCurrentContents)
+    {
+        mCurrentContents = aCurrentContents;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/DetectorOptions.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/DetectorOptions.java
new file mode 100644
index 0000000..c1f6356
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/DetectorOptions.java
@@ -0,0 +1,202 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.regexp;
+
+import com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import java.util.regex.Pattern;
+
+/**
+ * Options for a detector.
+ * @author Oliver Burn
+ */
+class DetectorOptions
+{
+    /**
+     * Flags to compile a regular expression with.
+     * See {@link Pattern#flags()}.
+     */
+    private final int mCompileFlags;
+    /** Used for reporting violations. */
+    private final AbstractViolationReporter mReporter;
+    /** Format of the regular expression to check for. */
+    private String mFormat;
+    /** The message to report on detection. If blank, then use the format. */
+    private String mMessage = "";
+    /** Minimum number of times regular expression should occur in a file. */
+    private int mMinimum;
+    /** Maximum number of times regular expression should occur in a file. */
+    private int mMaximum;
+    /** Whether to ignore case when matching. */
+    private boolean mIgnoreCase;
+    /** Used to determine whether to suppress a detected match. */
+    private MatchSuppressor mSuppressor = NeverSuppress.INSTANCE;
+
+    /**
+     * Creates an instance.
+     * @param aCompileFlags the flags to create the regular expression with.
+     * @param aReporter used to report violations.
+     */
+    public DetectorOptions(int aCompileFlags,
+            AbstractViolationReporter aReporter)
+    {
+        mCompileFlags = aCompileFlags;
+        mReporter = aReporter;
+    }
+
+    /**
+     * The format to use when matching lines.
+     * @param aFormat the format to use when matching lines.
+     * @return current instance
+     */
+    public DetectorOptions setFormat(String aFormat)
+    {
+        mFormat = aFormat;
+        return this;
+    }
+
+    /**
+     * Message to use when reporting a match.
+     * @param aMessage message to use when reporting a match.
+     * @return current instance.
+     */
+    public DetectorOptions setMessage(String aMessage)
+    {
+        mMessage = aMessage;
+        return this;
+    }
+
+    /**
+     * Set the minimum allowed number of detections.
+     * @param aMinimum the minimum allowed number of detections.
+     * @return current instance
+     */
+    public DetectorOptions setMinimum(int aMinimum)
+    {
+        mMinimum = aMinimum;
+        return this;
+    }
+
+    /**
+     * Set the maximum allowed number of detections.
+     * @param aMaximum the maximum allowed number of detections.
+     * @return current instance
+     */
+    public DetectorOptions setMaximum(int aMaximum)
+    {
+        mMaximum = aMaximum;
+        return this;
+    }
+
+    /**
+     * Set the suppressor to use.
+     * @param aSup the suppressor to use.
+     * @return current instance
+     */
+    public DetectorOptions setSuppressor(MatchSuppressor aSup)
+    {
+        mSuppressor = aSup;
+        return this;
+    }
+
+    /**
+     * Set whether to ignore case when matching.
+     * @param aIgnore whether to ignore case when matching.
+     * @return current instance
+     */
+    public DetectorOptions setIgnoreCase(boolean aIgnore)
+    {
+        mIgnoreCase = aIgnore;
+        return this;
+    }
+
+    /**
+     * Format of the regular expression.
+     * @return format of the regular expression.
+     */
+    public String getFormat()
+    {
+        return mFormat;
+    }
+
+    /**
+     * The violation reporter to use.
+     * @return the violation reporter to use.
+     */
+    public AbstractViolationReporter getReporter()
+    {
+        return mReporter;
+    }
+
+    /**
+     * The message to report errors with.
+     * @return the message to report errors with.
+     */
+    public String getMessage()
+    {
+        return mMessage;
+    }
+
+    /**
+     * The minimum number of allowed detections.
+     * @return the minimum number of allowed detections.
+     */
+    public int getMinimum()
+    {
+        return mMinimum;
+    }
+
+    /**
+     * The maximum number of allowed detections.
+     * @return the maximum number of allowed detections.
+     */
+    public int getMaximum()
+    {
+        return mMaximum;
+    }
+
+    /**
+     * The suppressor to use.
+     * @return the suppressor to use.
+     */
+    public MatchSuppressor getSuppressor()
+    {
+        return mSuppressor;
+    }
+
+    /**
+     * Whether to ignore case when matching.
+     * @return whether to ignore case when matching.
+     */
+    public boolean isIgnoreCase()
+    {
+        return mIgnoreCase;
+    }
+
+    /**
+     * The pattern to use when matching.
+     * @return the pattern to use when matching.
+     */
+    public Pattern getPattern()
+    {
+        final int options = (mIgnoreCase) ? mCompileFlags
+                | Pattern.CASE_INSENSITIVE : mCompileFlags;
+        return Utils.getPattern(mFormat, options);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/MatchSuppressor.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/MatchSuppressor.java
new file mode 100644
index 0000000..905f7aa
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/MatchSuppressor.java
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.regexp;
+
+/**
+ * Represents a suppressor for matches.
+ * @author oliver
+ */
+interface MatchSuppressor
+{
+    /**
+     * Checks if the specified selection should be suppressed.
+     * @param aStartLineNo the starting line number
+     * @param aStartColNo the starting column number
+     * @param aEndLineNo the ending line number
+     * @param aEndColNo the ending column number
+     * @return true if the positions intersects with a comment.
+     **/
+    boolean shouldSuppress(int aStartLineNo, int aStartColNo, int aEndLineNo,
+            int aEndColNo);
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/MultilineDetector.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/MultilineDetector.java
new file mode 100644
index 0000000..82ab82e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/MultilineDetector.java
@@ -0,0 +1,111 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.regexp;
+
+import java.util.regex.Matcher;
+import com.puppycrawl.tools.checkstyle.api.FileText;
+import com.puppycrawl.tools.checkstyle.api.LineColumn;
+
+/**
+ * A detector that matches across multiple lines.
+ * @author oliver
+ */
+class MultilineDetector
+{
+    /** The detection options to use. */
+    private final DetectorOptions mOptions;
+    /** Tracks the number of matches. */
+    private int mCurrentMatches;
+    /** The mMatcher */
+    private Matcher mMatcher;
+    /** The file text content */
+    private FileText mText;
+
+    /**
+     * Creates an instance.
+     * @param aOptions the options to use.
+     */
+    public MultilineDetector(DetectorOptions aOptions)
+    {
+        mOptions = aOptions;
+    }
+
+    /**
+     * Processes an entire text file looking for matches.
+     * @param aText the text to process
+     */
+    public void processLines(FileText aText)
+    {
+        mText = aText;
+        resetState();
+        mMatcher = mOptions.getPattern().matcher(mText.getFullText());
+        findMatch();
+        finish();
+    }
+
+    /** recursive method that finds the matches. */
+    private void findMatch()
+    {
+        final boolean foundMatch = mMatcher.find();
+        if (!foundMatch) {
+            return;
+        }
+
+        final LineColumn start = mText.lineColumn(mMatcher.start());
+        final LineColumn end = mText.lineColumn(mMatcher.end());
+
+        if (!mOptions.getSuppressor().shouldSuppress(start.getLine(),
+                start.getColumn(), end.getLine(), end.getColumn()))
+        {
+            mCurrentMatches++;
+            if (mCurrentMatches > mOptions.getMaximum()) {
+                if ("".equals(mOptions.getMessage())) {
+                    mOptions.getReporter().log(start.getLine(),
+                            "regexp.exceeded", mMatcher.pattern().toString());
+                }
+                else {
+                    mOptions.getReporter()
+                            .log(start.getLine(), mOptions.getMessage());
+                }
+            }
+        }
+        findMatch();
+    }
+    /** Perform processing at the end of a set of lines. */
+    private void finish()
+    {
+        if (mCurrentMatches < mOptions.getMinimum()) {
+            if ("".equals(mOptions.getMessage())) {
+                mOptions.getReporter().log(0, "regexp.minimum",
+                        mOptions.getMinimum(), mOptions.getFormat());
+            }
+            else {
+                mOptions.getReporter().log(0, mOptions.getMessage());
+            }
+        }
+    }
+
+    /**
+     * Reset the state of the detector.
+     */
+    private void resetState()
+    {
+        mCurrentMatches = 0;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/NeverSuppress.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/NeverSuppress.java
new file mode 100644
index 0000000..e6798bb
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/NeverSuppress.java
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.regexp;
+
+/**
+ * An implementation of {@link MatchSuppressor} that never suppresses a
+ * match.
+ * @author oliver
+ */
+public final class NeverSuppress implements MatchSuppressor
+{
+    /** The shared instance. */
+    public static final MatchSuppressor INSTANCE = new NeverSuppress();
+
+    /** Stop creation of instances. */
+    private NeverSuppress()
+    {
+    }
+
+    /** {@inheritDoc} */
+    public boolean shouldSuppress(int aStartLineNo, int aStartColNo,
+            int aEndLineNo, int aEndColNo)
+    {
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpMultilineCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpMultilineCheck.java
new file mode 100644
index 0000000..94e1037
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpMultilineCheck.java
@@ -0,0 +1,98 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.regexp;
+
+import java.util.regex.Pattern;
+
+import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
+import com.puppycrawl.tools.checkstyle.api.FileText;
+import java.io.File;
+import java.util.List;
+
+/**
+ * Implementation of a check that looks that matches across multiple lines in
+ * any file type.
+ * @author Oliver Burn
+ */
+public class RegexpMultilineCheck extends AbstractFileSetCheck
+{
+    /** The detection options to use. */
+    private DetectorOptions mOptions = new DetectorOptions(Pattern.MULTILINE,
+            this);
+    /** The detector to use. */
+    private MultilineDetector mDetector;
+
+    @Override
+    public void beginProcessing(String aCharset)
+    {
+        super.beginProcessing(aCharset);
+        mDetector = new MultilineDetector(mOptions);
+    }
+
+    @Override
+    protected void processFiltered(File aFile, List<String> aLines)
+    {
+        mDetector.processLines(FileText.fromLines(aFile, aLines));
+    }
+
+    /**
+     * Set the format of the regular expression to match.
+     * @param aFormat the format of the regular expression to match.
+     */
+    public void setFormat(String aFormat)
+    {
+        mOptions.setFormat(aFormat);
+    }
+
+    /**
+     * Set the message to report for a match.
+     * @param aMessage the message to report for a match.
+     */
+    public void setMessage(String aMessage)
+    {
+        mOptions.setMessage(aMessage);
+    }
+
+    /**
+     * Set the minimum number of matches required per file.
+     * @param aMinimum the minimum number of matches required per file.
+     */
+    public void setMinimum(int aMinimum)
+    {
+        mOptions.setMinimum(aMinimum);
+    }
+
+    /**
+     * Set the maximum number of matches required per file.
+     * @param aMaximum the maximum number of matches required per file.
+     */
+    public void setMaximum(int aMaximum)
+    {
+        mOptions.setMaximum(aMaximum);
+    }
+
+    /**
+     * Set whether to ignore case when matching.
+     * @param aIgnore whether to ignore case when matching.
+     */
+    public void setIgnoreCase(boolean aIgnore)
+    {
+        mOptions.setIgnoreCase(aIgnore);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineCheck.java
new file mode 100644
index 0000000..df9dc26
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineCheck.java
@@ -0,0 +1,93 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.regexp;
+
+import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
+import java.io.File;
+import java.util.List;
+
+/**
+ * Implementation of a check that looks for a single line in any file type.
+ * @author Oliver Burn
+ */
+public class RegexpSinglelineCheck extends AbstractFileSetCheck
+{
+    /** The detection options to use. */
+    private DetectorOptions mOptions = new DetectorOptions(0, this);
+    /** The detector to use. */
+    private SinglelineDetector mDetector;
+
+    @Override
+    public void beginProcessing(String aCharset)
+    {
+        super.beginProcessing(aCharset);
+        mDetector = new SinglelineDetector(mOptions);
+    }
+
+    @Override
+    protected void processFiltered(File aFile, List<String> aLines)
+    {
+        mDetector.processLines(aLines);
+    }
+
+    /**
+     * Set the format of the regular expression to match.
+     * @param aFormat the format of the regular expression to match.
+     */
+    public void setFormat(String aFormat)
+    {
+        mOptions.setFormat(aFormat);
+    }
+
+    /**
+     * Set the message to report for a match.
+     * @param aMessage the message to report for a match.
+     */
+    public void setMessage(String aMessage)
+    {
+        mOptions.setMessage(aMessage);
+    }
+
+    /**
+     * Set the minimum number of matches required per file.
+     * @param aMinimum the minimum number of matches required per file.
+     */
+    public void setMinimum(int aMinimum)
+    {
+        mOptions.setMinimum(aMinimum);
+    }
+
+    /**
+     * Set the maximum number of matches required per file.
+     * @param aMaximum the maximum number of matches required per file.
+     */
+    public void setMaximum(int aMaximum)
+    {
+        mOptions.setMaximum(aMaximum);
+    }
+
+    /**
+     * Set whether to ignore case when matching.
+     * @param aIgnore whether to ignore case when matching.
+     */
+    public void setIgnoreCase(boolean aIgnore)
+    {
+        mOptions.setIgnoreCase(aIgnore);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineJavaCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineJavaCheck.java
new file mode 100644
index 0000000..7c64461
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineJavaCheck.java
@@ -0,0 +1,117 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.regexp;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import java.util.Arrays;
+
+/**
+ * Implementation of a check that looks for a single line in Java files.
+ * Supports ignoring comments for matches.
+ * @author Oliver Burn
+ */
+public class RegexpSinglelineJavaCheck extends Check
+{
+    /** The detection options to use. */
+    private DetectorOptions mOptions = new DetectorOptions(0, this);
+    /** The detector to use. */
+    private SinglelineDetector mDetector;
+    /** The suppressor to use. */
+    private final CommentSuppressor mSuppressor = new CommentSuppressor();
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[0];
+    }
+
+    @Override
+    public void init()
+    {
+        super.init();
+        mDetector = new SinglelineDetector(mOptions);
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        mSuppressor.setCurrentContents(getFileContents());
+        mDetector.processLines(Arrays.asList(getLines()));
+    }
+
+    /**
+     * Set the format of the regular expression to match.
+     * @param aFormat the format of the regular expression to match.
+     */
+    public void setFormat(String aFormat)
+    {
+        mOptions.setFormat(aFormat);
+    }
+
+    /**
+     * Set the message to report for a match.
+     * @param aMessage the message to report for a match.
+     */
+    public void setMessage(String aMessage)
+    {
+        mOptions.setMessage(aMessage);
+    }
+
+    /**
+     * Set the minimum number of matches required per file.
+     * @param aMinimum the minimum number of matches required per file.
+     */
+    public void setMinimum(int aMinimum)
+    {
+        mOptions.setMinimum(aMinimum);
+    }
+
+    /**
+     * Set the maximum number of matches required per file.
+     * @param aMaximum the maximum number of matches required per file.
+     */
+    public void setMaximum(int aMaximum)
+    {
+        mOptions.setMaximum(aMaximum);
+    }
+
+    /**
+     * Set whether to ignore case when matching.
+     * @param aIgnore whether to ignore case when matching.
+     */
+    public void setIgnoreCase(boolean aIgnore)
+    {
+        mOptions.setIgnoreCase(aIgnore);
+    }
+
+    /**
+     * Set whether to ignore comments when matching.
+     * @param aIgnore whether to ignore comments when matching.
+     */
+    public void setIgnoreComments(boolean aIgnore)
+    {
+        if (aIgnore) {
+            mOptions.setSuppressor(mSuppressor);
+        }
+        else {
+            mOptions.setSuppressor(NeverSuppress.INSTANCE);
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/SinglelineDetector.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/SinglelineDetector.java
new file mode 100644
index 0000000..34114fd
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/SinglelineDetector.java
@@ -0,0 +1,124 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.regexp;
+
+import java.util.List;
+import java.util.regex.Matcher;
+
+/**
+ * A detector that matches individual lines.
+ * @author oliver
+ */
+class SinglelineDetector
+{
+    /** The detection options to use. */
+    private final DetectorOptions mOptions;
+    /** Tracks the number of matches. */
+    private int mCurrentMatches;
+
+    /**
+     * Creates an instance.
+     * @param aOptions the options to use.
+     */
+    public SinglelineDetector(DetectorOptions aOptions)
+    {
+        mOptions = aOptions;
+    }
+
+    /**
+     * Processes a set of lines looking for matches.
+     * @param aLines the lines to process.
+     */
+    public void processLines(List<String> aLines)
+    {
+        resetState();
+        int lineno = 0;
+        for (String line : aLines) {
+            lineno++;
+            checkLine(lineno, line, mOptions.getPattern().matcher(line), 0);
+        }
+        finish();
+    }
+
+    /** Perform processing at the end of a set of lines. */
+    private void finish()
+    {
+        if (mCurrentMatches < mOptions.getMinimum()) {
+            if ("".equals(mOptions.getMessage())) {
+                mOptions.getReporter().log(0, "regexp.minimum",
+                        mOptions.getMinimum(), mOptions.getFormat());
+            }
+            else {
+                mOptions.getReporter().log(0, mOptions.getMessage());
+            }
+        }
+    }
+
+    /**
+     * Reset the state of the detector.
+     */
+    private void resetState()
+    {
+        mCurrentMatches = 0;
+    }
+
+    /**
+     * Check a line for matches.
+     * @param aLineno the line number of the line to check
+     * @param aLine the line to check
+     * @param aMatcher the matcher to use
+     * @param aStartPosition the position to start searching from.
+     */
+    private void checkLine(int aLineno, String aLine, Matcher aMatcher,
+            int aStartPosition)
+    {
+        final boolean foundMatch = aMatcher.find(aStartPosition);
+        if (!foundMatch) {
+            return;
+        }
+
+        // match is found, check for intersection with comment
+        final int startCol = aMatcher.start(0);
+        final int endCol = aMatcher.end(0);
+        // Note that Matcher.end(int) returns the offset AFTER the
+        // last matched character, but shouldSuppress()
+        // needs column number of the last character.
+        // So we need to use (endCol - 1) here.
+        if (mOptions.getSuppressor()
+                .shouldSuppress(aLineno, startCol, aLineno, endCol - 1))
+        {
+            if (endCol < aLine.length()) {
+                // check if the expression is on the rest of the line
+                checkLine(aLineno, aLine, aMatcher, endCol);
+            }
+            return; // end processing here
+        }
+
+        mCurrentMatches++;
+        if (mCurrentMatches > mOptions.getMaximum()) {
+            if ("".equals(mOptions.getMessage())) {
+                mOptions.getReporter().log(aLineno, "regexp.exceeded",
+                        aMatcher.pattern().toString());
+            }
+            else {
+                mOptions.getReporter().log(aLineno, mOptions.getMessage());
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/package-info.java
new file mode 100644
index 0000000..46e1327
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/regexp/package-info.java
@@ -0,0 +1,24 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the regular expression checks that are bundled with the main
+ * distribution.
+ */
+package com.puppycrawl.tools.checkstyle.checks.regexp;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/AnonInnerLengthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/AnonInnerLengthCheck.java
new file mode 100644
index 0000000..0f42cb0
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/AnonInnerLengthCheck.java
@@ -0,0 +1,96 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks for long anonymous inner classes.
+ * </p>
+ * <p>
+ * Rationale: If an anonymous inner class becomes very long
+ * it is hard to understand and to see the flow of the method
+ * where the class is defined. Therefore long anonymous inner
+ * classes should usually be refactored into a named inner class.
+ * See also Bloch, Effective Java, p. 93.
+ * </p>
+ * <p>
+ * The default maximum anonymous inner class length is 20 lines.
+ * To change the maximum number of lines, set property max.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="AnonInnerLength"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check so that it accepts anonymous
+ * inner classes with up to 60 lines is:
+ * </p>
+ * <pre>
+ * <module name="AnonInnerLength">
+ *    <property name="max" value="60"/>
+ * </module>
+ * </pre>
+ *
+ * @author Rob Worth
+ */
+public class AnonInnerLengthCheck extends Check
+{
+    /** default maximum number of lines */
+    private static final int DEFAULT_MAX = 20;
+
+    /** maximum number of lines */
+    private int mMax = DEFAULT_MAX;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.LITERAL_NEW};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST openingBrace = aAST.findFirstToken(TokenTypes.OBJBLOCK);
+        if (openingBrace != null) {
+            final DetailAST closingBrace =
+                openingBrace.findFirstToken(TokenTypes.RCURLY);
+            final int length =
+                closingBrace.getLineNo() - openingBrace.getLineNo() + 1;
+            if (length > mMax) {
+                log(aAST.getLineNo(), aAST.getColumnNo(), "maxLen.anonInner",
+                        length, mMax);
+            }
+        }
+    }
+
+
+    /**
+     * @param aLength the maximum length of an anonymous inner class.
+     */
+    public void setMax(int aLength)
+    {
+        mMax = aLength;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ExecutableStatementCountCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ExecutableStatementCountCheck.java
new file mode 100644
index 0000000..560b28c
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ExecutableStatementCountCheck.java
@@ -0,0 +1,233 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Restricts the number of executable statements to a specified limit
+ * (default = 30).
+ * @author Simon Harris
+ */
+public final class ExecutableStatementCountCheck
+    extends Check
+{
+    /** default threshold */
+    private static final int DEFAULT_MAX = 30;
+
+    /** threshold to report error for */
+    private int mMax;
+
+    /** Stack of method contexts. */
+    private final FastStack<Context> mContextStack = FastStack.newInstance();
+
+    /** Current method context. */
+    private Context mContext;
+
+    /** Constructs a <code>ExecutableStatementCountCheck</code>. */
+    public ExecutableStatementCountCheck()
+    {
+        setMax(DEFAULT_MAX);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.CTOR_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.INSTANCE_INIT,
+            TokenTypes.STATIC_INIT,
+            TokenTypes.SLIST,
+        };
+    }
+
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return new int[] {TokenTypes.SLIST};
+    }
+
+    /**
+     * Gets the maximum threshold.
+     * @return the maximum threshold.
+     */
+    public int getMax()
+    {
+        return mMax;
+    }
+
+    /**
+     * Sets the maximum threshold.
+     * @param aMax the maximum threshold.
+     */
+    public void setMax(int aMax)
+    {
+        mMax = aMax;
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        mContext = null;
+        mContextStack.clear();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.CTOR_DEF:
+        case TokenTypes.METHOD_DEF:
+        case TokenTypes.INSTANCE_INIT:
+        case TokenTypes.STATIC_INIT:
+            visitMemberDef(aAST);
+            break;
+        case TokenTypes.SLIST:
+            visitSlist(aAST);
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        switch (aAST.getType()) {
+        case TokenTypes.CTOR_DEF:
+        case TokenTypes.METHOD_DEF:
+        case TokenTypes.INSTANCE_INIT:
+        case TokenTypes.STATIC_INIT:
+            leaveMemberDef(aAST);
+            break;
+        case TokenTypes.SLIST:
+            // Do nothing
+            break;
+        default:
+            throw new IllegalStateException(aAST.toString());
+        }
+    }
+
+    /**
+     * Process the start of the member definition.
+     * @param aAST the token representing the member definition.
+     */
+    private void visitMemberDef(DetailAST aAST)
+    {
+        mContextStack.push(mContext);
+        mContext = new Context(aAST);
+    }
+
+    /**
+     * Process the end of a member definition.
+     *
+     * @param aAST the token representing the member definition.
+     */
+    private void leaveMemberDef(DetailAST aAST)
+    {
+        final int count = mContext.getCount();
+        if (count > getMax()) {
+            log(aAST.getLineNo(), aAST.getColumnNo(),
+                    "executableStatementCount", count, getMax());
+        }
+        mContext = mContextStack.pop();
+    }
+
+    /**
+     * Process the end of a statement list.
+     *
+     * @param aAST the token representing the statement list.
+     */
+    private void visitSlist(DetailAST aAST)
+    {
+        if (mContext != null) {
+            // find member AST for the statement list
+            final DetailAST contextAST = mContext.getAST();
+            DetailAST parent = aAST.getParent();
+            while (parent != null) {
+                final int type = parent.getType();
+                if ((type == TokenTypes.CTOR_DEF)
+                    || (type == TokenTypes.METHOD_DEF)
+                    || (type == TokenTypes.INSTANCE_INIT)
+                    || (type == TokenTypes.STATIC_INIT))
+                {
+                    if (parent == contextAST) {
+                        mContext.addCount(aAST.getChildCount() / 2);
+                    }
+                    break;
+                }
+                parent = parent.getParent();
+            }
+        }
+    }
+
+    /**
+     * Class to encapsulate counting information about one member.
+     * @author Simon Harris
+     */
+    private static class Context
+    {
+        /** Member AST node. */
+        private final DetailAST mAST;
+
+        /** Counter for context elements. */
+        private int mCount;
+
+        /**
+         * Creates new member context.
+         * @param aAST member AST node.
+         */
+        public Context(DetailAST aAST)
+        {
+            mAST = aAST;
+            mCount = 0;
+        }
+
+        /**
+         * Increase count.
+         * @param aCount the count increment.
+         */
+        public void addCount(int aCount)
+        {
+            mCount += aCount;
+        }
+
+        /**
+         * Gets the member AST node.
+         * @return the member AST node.
+         */
+        public DetailAST getAST()
+        {
+            return mAST;
+        }
+
+        /**
+         * Gets the count.
+         * @return the count.
+         */
+        public int getCount()
+        {
+            return mCount;
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/FileLengthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/FileLengthCheck.java
new file mode 100644
index 0000000..4533619
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/FileLengthCheck.java
@@ -0,0 +1,79 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
+import java.io.File;
+import java.util.List;
+
+/**
+ * <p>
+ * Checks for long source files.
+ * </p>
+ * <p>
+ * Rationale: If a source file becomes very long it is hard to understand.
+ * Therefore long classes should usually be refactored into several
+ * individual classes that focus on a specific task.
+ * </p>
+ * <p>
+ * The default maximum file length is 2000 lines. To change the maximum
+ * number of lines, set property max.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="FileLength"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check so that it accepts files with at
+ * most 1500 lines is:
+ * </p>
+ * <pre>
+ * <module name="FileLength">
+ *    <property name="max" value="1500"/>
+ * </module>
+ * </pre>
+ * @author Lars K�hne
+ */
+public class FileLengthCheck extends AbstractFileSetCheck
+{
+    /** default maximum number of lines */
+    private static final int DEFAULT_MAX_LINES = 2000;
+
+    /** the maximum number of lines */
+    private int mMaxFileLength = DEFAULT_MAX_LINES;
+
+    @Override
+    protected void processFiltered(File aFile, List<String> aLines)
+    {
+        if (aLines.size() > mMaxFileLength) {
+            log(1, "maxLen.file", aLines.size(), mMaxFileLength);
+        }
+    }
+
+    /**
+     * @param aLength the maximum length of a Java source file
+     */
+    public void setMax(int aLength)
+    {
+        mMaxFileLength = aLength;
+    }
+
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheck.java
new file mode 100644
index 0000000..c472438
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheck.java
@@ -0,0 +1,144 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+import org.apache.commons.beanutils.ConversionException;
+
+/**
+ * Checks for long lines.
+ *
+ * <p>
+ * Rationale: Long lines are hard to read in printouts or if developers
+ * have limited screen space for the source code, e.g. if the IDE displays
+ * additional information like project tree, class hierarchy, etc.
+ * </p>
+ *
+ * <p>
+ * Note: Support for the special handling of imports in CheckStyle Version 2
+ * has been dropped as it is a special case of regexp: The user can set
+ * the ignorePattern to "^import" and achieve the same effect.
+ * </p>
+ * <p>
+ * The default maximum allowable line length is 80 characters. To change the
+ * maximum, set property max.
+ * </p>
+ * <p>
+ * To ignore lines in the check, set property ignorePattern to a regular
+ * expression for the lines to ignore.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="LineLength"/>
+ * </pre>
+ * <p> An example of how to configure the check to accept lines up to 120
+ * characters long is:
+ *</p>
+ * <pre>
+ * <module name="LineLength">
+ *    <property name="max" value="120"/>
+ * </module>
+ * </pre>
+ * <p> An example of how to configure the check to ignore lines that begin with
+ * " * ", followed by just one word, such as within a Javadoc comment,
+ * is:
+ * </p>
+ * <pre>
+ * <module name="LineLength">
+ *    <property name="ignorePattern" value="^ *\* *[^ ]+$"/>
+ * </module>
+ * </pre>
+ *
+ * @author Lars K�hne
+ */
+public class LineLengthCheck extends Check
+{
+    /** default maximum number of columns in a line */
+    private static final int DEFAULT_MAX_COLUMNS = 80;
+
+    /** the maximum number of columns in a line */
+    private int mMax = DEFAULT_MAX_COLUMNS;
+
+    /** the regexp when long lines are ignored */
+    private Pattern mIgnorePattern;
+
+    /**
+     * Creates a new <code>LineLengthCheck</code> instance.
+     */
+    public LineLengthCheck()
+    {
+        setIgnorePattern("^$");
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[0];
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        final String[] lines = getLines();
+        for (int i = 0; i < lines.length; i++) {
+
+            final String line = lines[i];
+            final int realLength = Utils.lengthExpandedTabs(
+                line, line.length(), getTabWidth());
+
+
+            if ((realLength > mMax)
+                && !mIgnorePattern.matcher(line).find())
+            {
+                log(i + 1, "maxLineLen", mMax, realLength);
+            }
+        }
+    }
+
+    /**
+     * @param aLength the maximum length of a line
+     */
+    public void setMax(int aLength)
+    {
+        mMax = aLength;
+    }
+
+    /**
+     * Set the ignore pattern.
+     * @param aFormat a <code>String</code> value
+     * @throws ConversionException unable to parse aFormat
+     */
+    public void setIgnorePattern(String aFormat)
+        throws ConversionException
+    {
+        try {
+            mIgnorePattern = Utils.getPattern(aFormat);
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheck.java
new file mode 100644
index 0000000..7354757
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheck.java
@@ -0,0 +1,240 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FastStack;
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import java.util.EnumMap;
+
+/**
+ * Counts the methods of the type-definition and checks whether this
+ * count is higher than the configured limit.
+ * @author Alexander Jesse
+ * @author Oliver Burn
+ */
+public final class MethodCountCheck extends Check
+{
+    /**
+     * Marker class used to collect data about the number of methods per
+     * class. Objects of this class are used on the Stack to count the
+     * methods for each class and layer.
+     */
+    private static class MethodCounter
+    {
+        /** Maintains the counts. */
+        private final EnumMap<Scope, Integer> mCounts =
+            new EnumMap<Scope, Integer>(Scope.class);
+        /** indicated is an interface, in which case all methods are public */
+        private final boolean mInInterface;
+        /** tracks the total. */
+        private int mTotal;
+
+        /**
+         * Creates an interface.
+         * @param aInInterface indicated if counter for an interface. In which
+         *        case, add all counts as public methods.
+         */
+        MethodCounter(boolean aInInterface)
+        {
+            mInInterface = aInInterface;
+        }
+
+        /**
+         * Increments to counter by one for the supplied scope.
+         * @param aScope the scope counter to increment.
+         */
+        void increment(Scope aScope)
+        {
+            mTotal++;
+            if (mInInterface) {
+                mCounts.put(Scope.PUBLIC, 1 + value(Scope.PUBLIC));
+            }
+            else {
+                mCounts.put(aScope, 1 + value(aScope));
+            }
+        }
+
+        /**
+         * @return the value of a scope counter
+         * @param aScope the scope counter to get the value of
+         */
+        int value(Scope aScope)
+        {
+            final Integer value = mCounts.get(aScope);
+            return (null == value) ? 0 : value;
+        }
+
+        /** @return the total number of methods. */
+        int getTotal()
+        {
+            return mTotal;
+        }
+    };
+
+    /** default maximum number of methods */
+    private static final int DEFAULT_MAX_METHODS = 100;
+    /** Maximum private methods. */
+    private int mMaxPrivate = DEFAULT_MAX_METHODS;
+    /** Maximum package methods. */
+    private int mMaxPackage = DEFAULT_MAX_METHODS;
+    /** Maximum protected methods. */
+    private int mMaxProtected = DEFAULT_MAX_METHODS;
+    /** Maximum public methods. */
+    private int mMaxPublic = DEFAULT_MAX_METHODS;
+    /** Maximum total number of methods. */
+    private int mMaxTotal = DEFAULT_MAX_METHODS;
+    /** Maintains stack of counters, to support inner types. */
+    private final FastStack<MethodCounter> mCounters =
+        new FastStack<MethodCounter>();
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.CLASS_DEF,
+            TokenTypes.ENUM_CONSTANT_DEF,
+            TokenTypes.ENUM_DEF,
+            TokenTypes.INTERFACE_DEF,
+            TokenTypes.METHOD_DEF,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if ((TokenTypes.CLASS_DEF == aAST.getType())
+            || (TokenTypes.INTERFACE_DEF == aAST.getType())
+            || (TokenTypes.ENUM_CONSTANT_DEF == aAST.getType())
+            || (TokenTypes.ENUM_DEF == aAST.getType()))
+        {
+            mCounters.push(new MethodCounter(
+                TokenTypes.INTERFACE_DEF == aAST.getType()));
+        }
+        else if (TokenTypes.METHOD_DEF == aAST.getType()) {
+            raiseCounter(aAST);
+        }
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAST)
+    {
+        if ((TokenTypes.CLASS_DEF == aAST.getType())
+            || (TokenTypes.INTERFACE_DEF == aAST.getType())
+            || (TokenTypes.ENUM_CONSTANT_DEF == aAST.getType())
+            || (TokenTypes.ENUM_DEF == aAST.getType()))
+        {
+            final MethodCounter counter = mCounters.pop();
+            checkCounters(counter, aAST);
+        }
+    }
+
+    /**
+     * Determine the visibility modifier and raise the corresponding counter.
+     * @param aMethod
+     *            The method-subtree from the AbstractSyntaxTree.
+     */
+    private void raiseCounter(DetailAST aMethod)
+    {
+        final MethodCounter actualCounter = mCounters.peek();
+        final DetailAST temp = aMethod.findFirstToken(TokenTypes.MODIFIERS);
+        final Scope scope = ScopeUtils.getScopeFromMods(temp);
+        actualCounter.increment(scope);
+    }
+
+    /**
+     * Check the counters and report violations.
+     * @param aCounter the method counters to check
+     * @param aAst to report errors against.
+     */
+    private void checkCounters(MethodCounter aCounter, DetailAST aAst)
+    {
+        checkMax(mMaxPrivate, aCounter.value(Scope.PRIVATE),
+                 "too.many.privateMethods", aAst);
+        checkMax(mMaxPackage, aCounter.value(Scope.PACKAGE),
+                 "too.many.packageMethods", aAst);
+        checkMax(mMaxProtected, aCounter.value(Scope.PROTECTED),
+                 "too.many.protectedMethods", aAst);
+        checkMax(mMaxPublic, aCounter.value(Scope.PUBLIC),
+                 "too.many.publicMethods", aAst);
+        checkMax(mMaxTotal, aCounter.getTotal(), "too.many.methods", aAst);
+    }
+
+    /**
+     * Utility for reporting if a maximum has been exceeded.
+     * @param aMax the maximum allowed value
+     * @param aValue the actual value
+     * @param aMsg the message to log. Takes two arguments of value and maximum.
+     * @param aAst the AST to associate with the message.
+     */
+    private void checkMax(int aMax, int aValue, String aMsg, DetailAST aAst)
+    {
+        if (aMax < aValue) {
+            log(aAst.getLineNo(), aMsg, aValue, aMax);
+        }
+    }
+
+    /**
+     * Sets the maximum allowed <code>private</code> methods per type.
+     * @param aValue the maximum allowed.
+     */
+    public void setMaxPrivate(int aValue)
+    {
+        mMaxPrivate = aValue;
+    }
+
+    /**
+     * Sets the maximum allowed <code>package</code> methods per type.
+     * @param aValue the maximum allowed.
+     */
+    public void setMaxPackage(int aValue)
+    {
+        mMaxPackage = aValue;
+    }
+
+    /**
+     * Sets the maximum allowed <code>protected</code> methods per type.
+     * @param aValue the maximum allowed.
+     */
+    public void setMaxProtected(int aValue)
+    {
+        mMaxProtected = aValue;
+    }
+
+    /**
+     * Sets the maximum allowed <code>public</code> methods per type.
+     * @param aValue the maximum allowed.
+     */
+    public void setMaxPublic(int aValue)
+    {
+        mMaxPublic = aValue;
+    }
+
+    /**
+     * Sets the maximum total methods per type.
+     * @param aValue the maximum allowed.
+     */
+    public void setMaxTotal(int aValue)
+    {
+        mMaxTotal = aValue;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.java
new file mode 100644
index 0000000..1536afb
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheck.java
@@ -0,0 +1,115 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FileContents;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks for long methods.
+ * </p>
+ * <p>
+ * Rationale: If a method becomes very long it is hard to understand.
+ * Therefore long methods should usually be refactored into several
+ * individual methods that focus on a specific task.
+ * </p>
+ *<p>
+ * The default maximum method length is 150 lines. To change the maximum
+ * number of lines, set property max.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="MethodLength"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check so that it accepts methods with at
+ * most 60 lines is:
+ * </p>
+ * <pre>
+ * <module name="MethodLength">
+ *    <property name="max" value="60"/>
+ * </module>
+ * </pre>
+ * @author Lars K�hne
+ */
+public class MethodLengthCheck extends Check
+{
+    /** whether to ignore empty lines and single line comments */
+    private boolean mCountEmpty = true;
+
+    /** default maximum number of lines */
+    private static final int DEFAULT_MAX_LINES = 150;
+
+    /** the maximum number of lines */
+    private int mMax = DEFAULT_MAX_LINES;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.METHOD_DEF, TokenTypes.CTOR_DEF};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST openingBrace = aAST.findFirstToken(TokenTypes.SLIST);
+        if (openingBrace != null) {
+            final DetailAST closingBrace =
+                openingBrace.findFirstToken(TokenTypes.RCURLY);
+            int length =
+                closingBrace.getLineNo() - openingBrace.getLineNo() + 1;
+
+            if (!mCountEmpty) {
+                final FileContents contents = getFileContents();
+                final int lastLine = closingBrace.getLineNo();
+                for (int i = openingBrace.getLineNo() - 1; i < lastLine; i++) {
+                    if (contents.lineIsBlank(i) || contents.lineIsComment(i)) {
+                        length--;
+                    }
+                }
+            }
+            if (length > mMax) {
+                log(aAST.getLineNo(), aAST.getColumnNo(), "maxLen.method",
+                        length, mMax);
+            }
+        }
+    }
+
+    /**
+     * @param aLength the maximum length of a method.
+     */
+    public void setMax(int aLength)
+    {
+        mMax = aLength;
+    }
+
+    /**
+     * @param aCountEmpty whether to count empty and single line comments
+     * of the form //.
+     */
+    public void setCountEmpty(boolean aCountEmpty)
+    {
+        mCountEmpty = aCountEmpty;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/OuterTypeNumberCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/OuterTypeNumberCheck.java
new file mode 100644
index 0000000..9fa6b39
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/OuterTypeNumberCheck.java
@@ -0,0 +1,83 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Check;
+
+/**
+ * Checks for the number of defined types at the "outer" level.
+ * @author oliverb
+ */
+public class OuterTypeNumberCheck extends Check
+{
+    /** The maximum allowed number of outer types. */
+    private int mMax = 1;
+    /** Tracks the current depth in types. */
+    private int mCurrentDepth;
+    /** Tracks the number of outer types found. */
+    private int mOuterNum;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.CLASS_DEF, TokenTypes.INTERFACE_DEF,
+            TokenTypes.ENUM_DEF, TokenTypes.ANNOTATION_DEF, };
+    }
+
+    @Override
+    public void beginTree(DetailAST aAst)
+    {
+        mCurrentDepth = 0;
+        mOuterNum = 0;
+    }
+
+    @Override
+    public void finishTree(DetailAST aAst)
+    {
+        if (mMax < mOuterNum) {
+            log(aAst, "maxOuterTypes", mOuterNum, mMax);
+        }
+    }
+
+    @Override
+    public void visitToken(DetailAST aAst)
+    {
+        if (0 == mCurrentDepth) {
+            mOuterNum++;
+        }
+        mCurrentDepth++;
+    }
+
+    @Override
+    public void leaveToken(DetailAST aAst)
+    {
+        mCurrentDepth--;
+    }
+
+    /**
+     * Sets the maximum allowed number of outer types.
+     * @param aTo the new number.
+     */
+    public void setMax(int aTo)
+    {
+        mMax = aTo;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ParameterNumberCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ParameterNumberCheck.java
new file mode 100644
index 0000000..a81ac42
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/ParameterNumberCheck.java
@@ -0,0 +1,84 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks the number of parameters that a method or constructor has.
+ * The default allowable number of parameters is 7.
+ * To change the number of allowable parameters, set property max.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="ParameterNumber"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check to allow 10 parameters is:
+ * </p>
+ * <pre>
+ * <module name="ParameterNumber">
+ *    <property name="max" value="10"/>
+ * </module>
+ * </pre>
+
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public class ParameterNumberCheck
+    extends Check
+{
+    /** default maximum number of allowed parameters */
+    private static final int DEFAULT_MAX_PARAMETERS = 7;
+
+    /** the maximum number of allowed parameters */
+    private int mMax = DEFAULT_MAX_PARAMETERS;
+
+    /**
+     * Sets the maximum number of allowed parameters.
+     * @param aMax the max allowed parameters
+     */
+    public void setMax(int aMax)
+    {
+        mMax = aMax;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.METHOD_DEF, TokenTypes.CTOR_DEF};
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST params = aAST.findFirstToken(TokenTypes.PARAMETERS);
+        final int count = params.getChildCount(TokenTypes.PARAMETER_DEF);
+        if (count > mMax) {
+            final DetailAST name = aAST.findFirstToken(TokenTypes.IDENT);
+            log(name.getLineNo(), name.getColumnNo(), "maxParam", mMax, count);
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/package-info.java
new file mode 100644
index 0000000..92a5071
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/package-info.java
@@ -0,0 +1,24 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the <span class="xdocspagetitle">Size Violations</span> checks
+ * that are bundled with the main distribution.
+ */
+package com.puppycrawl.tools.checkstyle.checks.sizes;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/AbstractParenPadCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/AbstractParenPadCheck.java
new file mode 100644
index 0000000..ea3c031
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/AbstractParenPadCheck.java
@@ -0,0 +1,91 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import com.puppycrawl.tools.checkstyle.checks.AbstractOptionCheck;
+
+/**
+ * <p>Abstract class for checking the padding of parentheses. That is whether a
+ * space is required after a left parenthesis and before a right parenthesis,
+ * or such spaces are forbidden.
+ * </p>
+ * @author Oliver Burn
+ * @version 1.0
+ */
+abstract class AbstractParenPadCheck
+    extends AbstractOptionCheck<PadOption>
+{
+    /**
+     * Sets the paren pad otion to nospace.
+     */
+    AbstractParenPadCheck()
+    {
+        super(PadOption.NOSPACE, PadOption.class);
+    }
+
+    /**
+     * Process a token representing a left parentheses.
+     * @param aAST the token representing a left parentheses
+     */
+    protected void processLeft(DetailAST aAST)
+    {
+        final String line = getLines()[aAST.getLineNo() - 1];
+        final int after = aAST.getColumnNo() + 1;
+        if (after < line.length()) {
+            if ((PadOption.NOSPACE == getAbstractOption())
+                && (Character.isWhitespace(line.charAt(after))))
+            {
+                log(aAST.getLineNo(), after, "ws.followed", "(");
+            }
+            else if ((PadOption.SPACE == getAbstractOption())
+                     && !Character.isWhitespace(line.charAt(after))
+                     && (line.charAt(after) != ')'))
+            {
+                log(aAST.getLineNo(), after, "ws.notFollowed", "(");
+            }
+        }
+    }
+
+    /**
+     * Process a token representing a right parentheses.
+     * @param aAST the token representing a right parentheses
+     */
+    protected void processRight(DetailAST aAST)
+    {
+        final String line = getLines()[aAST.getLineNo() - 1];
+        final int before = aAST.getColumnNo() - 1;
+        if (before >= 0) {
+            if ((PadOption.NOSPACE == getAbstractOption())
+                && Character.isWhitespace(line.charAt(before))
+                && !Utils.whitespaceBefore(before, line))
+            {
+                log(aAST.getLineNo(), before, "ws.preceded", ")");
+            }
+            else if ((PadOption.SPACE == getAbstractOption())
+                && !Character.isWhitespace(line.charAt(before))
+                && (line.charAt(before) != '('))
+            {
+                log(aAST.getLineNo(), aAST.getColumnNo(),
+                    "ws.notPreceded", ")");
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForInitializerPadCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForInitializerPadCheck.java
new file mode 100644
index 0000000..b13bfe5
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForInitializerPadCheck.java
@@ -0,0 +1,93 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import com.puppycrawl.tools.checkstyle.checks.AbstractOptionCheck;
+
+/**
+ * <p>Checks the padding of an empty for initializer; that is whether a
+ * space is required at an empty for initializer, or such spaces are
+ * forbidden. No check occurs if there is a line wrap at the initializer, as in
+ * </p>
+ * <pre class="body">
+for (
+      ; i < j; i++, j--)
+   </pre>
+ * <p>
+ * The policy to verify is specified using the {@link PadOption} class and
+ * defaults to {@link PadOption#NOSPACE}.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="EmptyForInitializerPad"/>
+ * </pre>
+ *
+ * @author lkuehne
+ * @version 1.0
+ */
+public class EmptyForInitializerPadCheck
+    extends AbstractOptionCheck<PadOption>
+{
+    /**
+     * Sets the paren pad otion to nospace.
+     */
+    public EmptyForInitializerPadCheck()
+    {
+        super(PadOption.NOSPACE, PadOption.class);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.FOR_INIT,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (aAST.getChildCount() == 0) {
+            //empty for initializer. test pad before semi.
+            final DetailAST semi = aAST.getNextSibling();
+            final int semiLineIdx = semi.getLineNo() - 1;
+            final String line = getLines()[semiLineIdx];
+            final int before = semi.getColumnNo() - 1;
+            //don't check if semi at beginning of line
+            if (!Utils.whitespaceBefore(before, line)) {
+                final PadOption option = getAbstractOption();
+                if ((PadOption.NOSPACE == option)
+                    && (Character.isWhitespace(line.charAt(before))))
+                {
+                    log(semi.getLineNo(), before, "ws.preceded", ";");
+                }
+                else if ((PadOption.SPACE == option)
+                         && !Character.isWhitespace(line.charAt(before)))
+                {
+                    log(semi.getLineNo(), before, "ws.notPreceded", ";");
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForIteratorPadCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForIteratorPadCheck.java
new file mode 100644
index 0000000..2efc880
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForIteratorPadCheck.java
@@ -0,0 +1,91 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.AbstractOptionCheck;
+
+/**
+ * <p>Checks the padding of an empty for iterator; that is whether a
+ * space is required at an empty for iterator, or such spaces are
+ * forbidden. No check occurs if there is a line wrap at the iterator, as in
+ * </p>
+ * <pre class="body">
+for (Iterator foo = very.long.line.iterator();
+      foo.hasNext();
+     )
+   </pre>
+ * <p>
+ * The policy to verify is specified using the {@link PadOption} class and
+ * defaults to {@link PadOption#NOSPACE}.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="EmptyForIteratorPad"/>
+ * </pre>
+ *
+ * @author Rick Giles
+ * @version 1.0
+ */
+public class EmptyForIteratorPadCheck
+    extends AbstractOptionCheck<PadOption>
+{
+    /**
+     * Sets the paren pad otion to nospace.
+     */
+    public EmptyForIteratorPadCheck()
+    {
+        super(PadOption.NOSPACE, PadOption.class);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.FOR_ITERATOR,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (aAST.getChildCount() == 0) {
+            //empty for iterator. test pad after semi.
+            final DetailAST semi = aAST.getPreviousSibling();
+            final String line = getLines()[semi.getLineNo() - 1];
+            final int after = semi.getColumnNo() + 1;
+            //don't check if at end of line
+            if (after < line.length()) {
+                if ((PadOption.NOSPACE == getAbstractOption())
+                    && (Character.isWhitespace(line.charAt(after))))
+                {
+                    log(semi.getLineNo(), after, "ws.followed", ";");
+                }
+                else if ((PadOption.SPACE == getAbstractOption())
+                         && !Character.isWhitespace(line.charAt(after)))
+                {
+                    log(semi.getLineNo(), after, "ws.notFollowed", ";");
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyLineSeparatorCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyLineSeparatorCheck.java
new file mode 100644
index 0000000..a5469e8
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyLineSeparatorCheck.java
@@ -0,0 +1,221 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ *
+ * Checks for empty line separators after header, package, all import declarations,
+ * fields, constructors, methods, nested classes,
+ * static initializers and instance initializers.
+ *
+ * <p> By default the check will check the following statements:
+ *  {@link TokenTypes#PACKAGE_DEF PACKAGE_DEF},
+ *  {@link TokenTypes#IMPORT IMPORT},
+ *  {@link TokenTypes#CLASS_DEF CLASS_DEF},
+ *  {@link TokenTypes#INTERFACE_DEF INTERFACE_DEF},
+ *  {@link TokenTypes#STATIC_INIT STATIC_INIT},
+ *  {@link TokenTypes#INSTANCE_INIT INSTANCE_INIT},
+ *  {@link TokenTypes#METHOD_DEF METHOD_DEF},
+ *  {@link TokenTypes#CTOR_DEF CTOR_DEF},
+ *  {@link TokenTypes#VARIABLE_DEF VARIABLE_DEF}.
+ * </p>
+ *
+ * <p>
+ * Example of declarations without empty line separator:
+ * </p>
+ *
+ * <pre>
+ * ///////////////////////////////////////////////////
+ * //HEADER
+ * ///////////////////////////////////////////////////
+ * package com.puppycrawl.tools.checkstyle.whitespace;
+ * import java.io.Serializable;
+ * class Foo
+ * {
+ *     public static final int FOO_CONST = 1;
+ *     public void foo() {} //should be separated from previous statement.
+ * }
+ * </pre>
+ *
+ * <p> An example of how to configure the check with default parameters is:
+ * </p>
+ *
+ * <pre>
+ * <module name="EmptyLineSeparator"/>
+ * </pre>
+ *
+ * <p>
+ * Example of declarations with empty line separator
+ * that is expected by the Check by default:
+ * </p>
+ *
+ * <pre>
+ * ///////////////////////////////////////////////////
+ * //HEADER
+ * ///////////////////////////////////////////////////
+ *
+ * package com.puppycrawl.tools.checkstyle.whitespace;
+ *
+ * import java.io.Serializable;
+ *
+ * class Foo
+ * {
+ *     public static final int FOO_CONST = 1;
+ *
+ *     public void foo() {}
+ * }
+ * </pre>
+ * <p> An example how to check empty line after
+ * {@link TokenTypes#VARIABLE_DEF VARIABLE_DEF} and
+ * {@link TokenTypes#METHOD_DEF METHOD_DEF}:
+ * </p>
+ *
+ * <pre>
+ * <module name="EmptyLineSeparator">
+ *    <property name="tokens" value="VARIABLE_DEF, METHOD_DEF"/>
+ * </module>
+ * </pre>
+ *
+ * <p>
+ * An example how to allow no empty line between fields:
+ * </p>
+ * <pre>
+ * <module name="EmptyLineSeparator">
+ *    <property name="allowNoEmptyLineBetweenFields" value="true"/>
+ * </module>
+ * </pre>
+ *
+ * @author maxvetrenko
+ *
+ */
+public class EmptyLineSeparatorCheck extends Check
+{
+    /** */
+    private boolean mAllowNoEmptyLineBetweenFields;
+
+    /**
+     * Allow no empty line between fields.
+     * @param aAllow
+     *        User's value.
+     */
+    public final void setAllowNoEmptyLineBetweenFields(boolean aAllow)
+    {
+        mAllowNoEmptyLineBetweenFields = aAllow;
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.PACKAGE_DEF,
+            TokenTypes.IMPORT,
+            TokenTypes.CLASS_DEF,
+            TokenTypes.INTERFACE_DEF,
+            TokenTypes.ENUM_DEF,
+            TokenTypes.STATIC_INIT,
+            TokenTypes.INSTANCE_INIT,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.CTOR_DEF,
+            TokenTypes.VARIABLE_DEF,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST nextToken = aAST.getNextSibling();
+
+        if (nextToken != null && nextToken.getType() != TokenTypes.RCURLY) {
+            final int astType = aAST.getType();
+            switch (astType) {
+            case TokenTypes.VARIABLE_DEF:
+                if (isTypeField(aAST) && !hasEmptyLineAfter(aAST)) {
+                    if (mAllowNoEmptyLineBetweenFields
+                            && nextToken.getType() != TokenTypes.VARIABLE_DEF)
+                    {
+                        log(nextToken.getLineNo(), "empty.line.separator", nextToken.getText());
+                    }
+                    else if (!mAllowNoEmptyLineBetweenFields) {
+                        log(nextToken.getLineNo(), "empty.line.separator", nextToken.getText());
+                    }
+                }
+                break;
+            case TokenTypes.IMPORT:
+                if (astType != nextToken.getType() && !hasEmptyLineAfter(aAST)
+                    || (aAST.getLineNo() > 1 && !hasEmptyLineBefore(aAST)
+                            && aAST.getPreviousSibling() == null))
+                {
+                    log(nextToken.getLineNo(), "empty.line.separator", nextToken.getText());
+                }
+                break;
+            case TokenTypes.PACKAGE_DEF:
+                if (aAST.getLineNo() > 1 && !hasEmptyLineBefore(aAST)) {
+                    log(aAST.getLineNo(), "empty.line.separator", aAST.getText());
+                }
+            default:
+                if (!hasEmptyLineAfter(aAST)) {
+                    log(nextToken.getLineNo(), "empty.line.separator", nextToken.getText());
+                }
+            }
+        }
+    }
+
+    /**
+     * Checks if token have empty line after.
+     * @param aToken token.
+     * @return true if token have empty line after.
+     */
+    private boolean hasEmptyLineAfter(DetailAST aToken)
+    {
+        DetailAST lastToken = aToken.getLastChild().getLastChild();
+        if (null == lastToken) {
+            lastToken = aToken.getLastChild();
+        }
+        return aToken.getNextSibling().getLineNo() - lastToken.getLineNo() > 1;
+    }
+
+    /**
+     * Checks if a token has a empty line before.
+     * @param aToken token.
+     * @return true, if token have empty line before.
+     */
+    private boolean hasEmptyLineBefore(DetailAST aToken)
+    {
+        final int lineNo = aToken.getLineNo();
+        //  [lineNo - 2] is the number of the previous line because the numbering starts from zero.
+        final String lineBefore = getLines()[lineNo - 2];
+        return lineBefore.trim().isEmpty();
+    }
+
+    /**
+     * If variable definition is a type field.
+     * @param aVariableDef variable definition.
+     * @return true variable definition is a type field.
+     */
+    private boolean isTypeField(DetailAST aVariableDef)
+    {
+        final int parentType = aVariableDef.getParent().getParent().getType();
+        return parentType == TokenTypes.CLASS_DEF;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/FileTabCharacterCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/FileTabCharacterCheck.java
new file mode 100644
index 0000000..dd2d257
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/FileTabCharacterCheck.java
@@ -0,0 +1,61 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
+import java.io.File;
+import java.util.List;
+
+/**
+ * Checks to see if a file contains a tab character.
+ * @author oliverb
+ */
+public class FileTabCharacterCheck extends AbstractFileSetCheck
+{
+    /** Indicates whether to report once per file, or for each line. */
+    private boolean mEachLine;
+
+    @Override
+    protected void processFiltered(File aFile, List<String> aLines)
+    {
+        int lineNum = 0;
+        for (final String line : aLines) {
+            lineNum++;
+            final int tabPosition = line.indexOf('\t');
+            if (tabPosition != -1) {
+                if (mEachLine) {
+                    log(lineNum, tabPosition + 1, "containsTab");
+                }
+                else {
+                    log(lineNum, tabPosition + 1, "file.containsTab");
+                    break;
+                }
+            }
+        }
+    }
+
+    /**
+     * Whether report on each line containing a tab.
+     * @param aEachLine Whether report on each line containing a tab.
+     */
+    public void setEachLine(boolean aEachLine)
+    {
+        mEachLine = aEachLine;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheck.java
new file mode 100644
index 0000000..5081b85
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheck.java
@@ -0,0 +1,237 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+/**
+ * <p>
+ * Checks that the whitespace around the Generic tokens (angle brackets)
+ * "<" and ">" are correct to the <i>typical</i> convention.
+ * The convention is not configurable.
+ * </p>
+ * <br>
+ * <p>
+ * Left angle bracket ("<"):
+ * </p>
+ * <br>
+ * <ul>
+ * <li> should be preceded with whitespace only
+ *   in generic methods definitions.</li>
+ * <li> should not be preceded with whitespace
+ *   when it is precede method name or following type name.</li>
+ * <li> should not be followed with whitespace in all cases.</li>
+ * </ul>
+ * <br>
+ * <p>
+ * Right angle bracket (">"):
+ * </p>
+ * <br>
+ * <ul>
+ * <li> should not be preceded with whitespace in all cases.</li>
+ * <li> should be followed with whitespace in almost all cases,
+ *   except diamond operators and when preceding method name.</li></ul>
+ * <br>
+ * <p>
+ * Examples with correct spacing:
+ * </p>
+ * <br>
+ * <pre>
+ * public void <K, V extends Number> boolean foo(K, V) {}  // Generic methods definitions
+ * class name<T1, T2, ..., Tn> {}                          // Generic type definition
+ * OrderedPair<String, Box<Integer>> p;              // Generic type reference
+ * boolean same = Util.<Integer, String>compare(p1, p2);   // Generic preceded method name
+ * Pair<Integer, String> p1 = new Pair<>(1, "apple");// Diamond operator
+ * </pre>
+ * @author Oliver Burn
+ */
+public class GenericWhitespaceCheck extends Check
+{
+    /** Used to count the depth of a Generic expression. */
+    private int mDepth;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.GENERIC_START, TokenTypes.GENERIC_END};
+    }
+
+    @Override
+    public void beginTree(DetailAST aRootAST)
+    {
+        // Reset for each tree, just incase there are errors in preceeding
+        // trees.
+        mDepth = 0;
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (aAST.getType() == TokenTypes.GENERIC_START) {
+            processStart(aAST);
+            mDepth++;
+        }
+        else if (aAST.getType() == TokenTypes.GENERIC_END) {
+            processEnd(aAST);
+            mDepth--;
+        }
+    }
+
+    /**
+     * Checks the token for the end of Generics.
+     * @param aAST the token to check
+     */
+    private void processEnd(DetailAST aAST)
+    {
+        final String line = getLines()[aAST.getLineNo() - 1];
+        final int before = aAST.getColumnNo() - 1;
+        final int after = aAST.getColumnNo() + 1;
+
+        if ((0 <= before) && Character.isWhitespace(line.charAt(before))
+                && !Utils.whitespaceBefore(before, line))
+        {
+            log(aAST.getLineNo(), before, "ws.preceded", ">");
+        }
+
+        if (after < line.length()) {
+
+            // Check if the last Generic, in which case must be a whitespace
+            // or a '(),[.'.
+            if (1 == mDepth) {
+                final char charAfter = line.charAt(after);
+
+                // Need to handle a number of cases. First is:
+                //    Collections.<Object>emptySet();
+                //                        ^
+                //                        +--- whitespace not allowed
+                if ((aAST.getParent().getType() == TokenTypes.TYPE_ARGUMENTS)
+                    && (aAST.getParent().getParent().getType()
+                        == TokenTypes.DOT)
+                    && (aAST.getParent().getParent().getParent().getType()
+                        == TokenTypes.METHOD_CALL))
+                {
+                    if (Character.isWhitespace(charAfter)) {
+                        log(aAST.getLineNo(), after, "ws.followed", ">");
+                    }
+                }
+                else if (!Character.isWhitespace(charAfter)
+                    && ('(' != charAfter) && (')' != charAfter)
+                    && (',' != charAfter) && ('[' != charAfter)
+                    && ('.' != charAfter))
+                {
+                    log(aAST.getLineNo(), after, "ws.illegalFollow", ">");
+                }
+            }
+            else {
+                // In a nested Generic type, so can only be a '>' or ',' or '&'
+
+                // In case of several extends definitions:
+                //
+                //   class IntEnumValueType<E extends Enum<E> & IntEnum>
+                //                                          ^
+                //   should be whitespace if followed by & -+
+                //
+                final int indexOfAmp = line.indexOf('&', after);
+                if ((indexOfAmp != -1)
+                    && whitespaceBetween(after, indexOfAmp, line))
+                {
+                    if (indexOfAmp - after == 0) {
+                        log(aAST.getLineNo(), after, "ws.notPreceded", "&");
+                    }
+                    else if (indexOfAmp - after != 1) {
+                        log(aAST.getLineNo(), after, "ws.followed", ">");
+                    }
+                }
+                else if ((line.charAt(after) != '>')
+                         && (line.charAt(after) != ',')
+                         && (line.charAt(after) != '['))
+                {
+                    log(aAST.getLineNo(), after, "ws.followed", ">");
+                }
+            }
+        }
+    }
+
+    /**
+     * Checks the token for the start of Generics.
+     * @param aAST the token to check
+     */
+    private void processStart(DetailAST aAST)
+    {
+        final String line = getLines()[aAST.getLineNo() - 1];
+        final int before = aAST.getColumnNo() - 1;
+        final int after = aAST.getColumnNo() + 1;
+
+        // Need to handle two cases as in:
+        //
+        //   public static <T> Callable<T> callable(Runnable task, T result)
+        //                 ^           ^
+        //      ws reqd ---+           +--- whitespace NOT required
+        //
+        if (0 <= before) {
+            // Detect if the first case
+            final DetailAST parent = aAST.getParent();
+            final DetailAST grandparent = parent.getParent();
+            if ((TokenTypes.TYPE_PARAMETERS == parent.getType())
+                && ((TokenTypes.CTOR_DEF == grandparent.getType())
+                    || (TokenTypes.METHOD_DEF == grandparent.getType())))
+            {
+                // Require whitespace
+                if (!Character.isWhitespace(line.charAt(before))) {
+                    log(aAST.getLineNo(), before, "ws.notPreceded", "<");
+                }
+            }
+            // Whitespace not required
+            else if (Character.isWhitespace(line.charAt(before))
+                && !Utils.whitespaceBefore(before, line))
+            {
+                log(aAST.getLineNo(), before, "ws.preceded", "<");
+            }
+        }
+
+        if ((after < line.length())
+                && Character.isWhitespace(line.charAt(after)))
+        {
+            log(aAST.getLineNo(), after, "ws.followed", "<");
+        }
+    }
+
+    /**
+     * Returns whether the specified string contains only whitespace between
+     * specified indices.
+     *
+     * @param aFromIndex the index to start the search from. Inclusive
+     * @param aToIndex the index to finish the search. Exclusive
+     * @param aLine the line to check
+     * @return whether there are only whitespaces (or nothing)
+     */
+    private static boolean whitespaceBetween(
+        int aFromIndex, int aToIndex, String aLine)
+    {
+        for (int i = aFromIndex; i < aToIndex; i++) {
+            if (!Character.isWhitespace(aLine.charAt(i))) {
+                return false;
+            }
+        }
+        return true;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/MethodParamPadCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/MethodParamPadCheck.java
new file mode 100644
index 0000000..7fa29e1
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/MethodParamPadCheck.java
@@ -0,0 +1,137 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import com.puppycrawl.tools.checkstyle.checks.AbstractOptionCheck;
+
+/**
+ * <p>
+ * Checks the padding between the identifier of a method definition,
+ * constructor definition, method call, or constructor invocation;
+ * and the left parenthesis of the parameter list.
+ * That is, if the identifier and left parenthesis are on the same line,
+ * checks whether a space is required immediately after the identifier or
+ * such a space is forbidden.
+ * If they are not on the same line, reports an error, unless configured to
+ * allow line breaks.
+ * </p>
+ * <p> By default the check will check the following tokens:
+ *  {@link TokenTypes#CTOR_DEF CTOR_DEF},
+ *  {@link TokenTypes#LITERAL_NEW LITERAL_NEW},
+ *  {@link TokenTypes#METHOD_CALL METHOD_CALL},
+ *  {@link TokenTypes#METHOD_DEF METHOD_DEF},
+ *  {@link TokenTypes#SUPER_CTOR_CALL SUPER_CTOR_CALL}.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="MethodParamPad"/>
+ * </pre>
+ * <p> An example of how to configure the check to require a space
+ * after the identifier of a method definition, except if the left
+ * parenthesis occurs on a new line, is:
+ * </p>
+ * <pre>
+ * <module name="MethodParamPad">
+ *     <property name="tokens" value="METHOD_DEF"/>
+ *     <property name="option" value="space"/>
+ *     <property name="allowLineBreaks" value="true"/>
+ * </module>
+ * </pre>
+ * @author Rick Giles
+ * @version 1.0
+ */
+
+public class MethodParamPadCheck
+    extends AbstractOptionCheck<PadOption>
+{
+    /**
+     * Sets the pad option to nospace.
+     */
+    public MethodParamPadCheck()
+    {
+        super(PadOption.NOSPACE, PadOption.class);
+    }
+
+    /** Whether whitespace is allowed if the method identifier is at a
+     * linebreak */
+    private boolean mAllowLineBreaks;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.CTOR_DEF,
+            TokenTypes.LITERAL_NEW,
+            TokenTypes.METHOD_CALL,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.SUPER_CTOR_CALL,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final DetailAST parenAST;
+        if ((aAST.getType() == TokenTypes.METHOD_CALL)) {
+            parenAST = aAST;
+        }
+        else {
+            parenAST = aAST.findFirstToken(TokenTypes.LPAREN);
+            // array construction => parenAST == null
+            if (parenAST == null) {
+                return;
+            }
+        }
+
+        final String line = getLines()[parenAST.getLineNo() - 1];
+        if (Utils.whitespaceBefore(parenAST.getColumnNo(), line)) {
+            if (!mAllowLineBreaks) {
+                log(parenAST, "line.previous", parenAST.getText());
+            }
+        }
+        else {
+            final int before = parenAST.getColumnNo() - 1;
+            if ((PadOption.NOSPACE == getAbstractOption())
+                && (Character.isWhitespace(line.charAt(before))))
+            {
+                log(parenAST , "ws.preceded", parenAST.getText());
+            }
+            else if ((PadOption.SPACE == getAbstractOption())
+                     && !Character.isWhitespace(line.charAt(before)))
+            {
+                log(parenAST, "ws.notPreceded", parenAST.getText());
+            }
+        }
+    }
+
+    /**
+     * Control whether whitespace is flagged at linebreaks.
+     * @param aAllowLineBreaks whether whitespace should be
+     * flagged at linebreaks.
+     */
+    public void setAllowLineBreaks(boolean aAllowLineBreaks)
+    {
+        mAllowLineBreaks = aAllowLineBreaks;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoLineWrapCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoLineWrapCheck.java
new file mode 100644
index 0000000..2372b13
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoLineWrapCheck.java
@@ -0,0 +1,96 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>Checks that chosen statements are not line-wrapped.
+ * By default this Check restricts wrapping import and package statements,
+ * but it's possible to check any statement.
+ * </p>
+ *
+ * Examples
+ * <p class="body">
+ *
+ * Examples of line-wrapped statements (bad case):
+ * <pre><code> package com.puppycrawl.
+ *    tools.checkstyle.checks;
+ *
+ * import com.puppycrawl.tools.
+ *    checkstyle.api.Check;
+ * </code></pre>
+ *
+ * <p>
+ * To configure the check to force no line-wrapping
+ * in package and import statements (default values):
+ * </p>
+ * <pre class="body">
+ * <module name="NoLineWrap"/>
+ * </pre>
+ *
+ * <p>
+ * To configure the check to force no line-wrapping only
+ * in import statements:
+ * </p>
+ * <pre class="body">
+ * <module name="NoLineWrap">
+ *     <property name="tokens" value="IMPORT">
+ * </module>
+ * </pre>
+ *
+ * Examples of not line-wrapped statements (good case):
+ * <pre><code> import com.puppycrawl.tools.checkstyle.api.Check;
+ * </code></pre>
+ *
+ * @author maxvetrenko
+ */
+public class NoLineWrapCheck extends Check
+{
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.PACKAGE_DEF, TokenTypes.IMPORT};
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return new int[] {
+            TokenTypes.IMPORT,
+            TokenTypes.PACKAGE_DEF,
+            TokenTypes.CLASS_DEF,
+            TokenTypes.METHOD_DEF,
+            TokenTypes.CTOR_DEF,
+            TokenTypes.ENUM_DEF,
+            TokenTypes.INTERFACE_DEF,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (aAST.getLineNo() != aAST.getLastChild().getLineNo()) {
+            log(aAST.getLineNo(), "no.line.wrap", aAST.getText());
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceAfterCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceAfterCheck.java
new file mode 100644
index 0000000..7ac5296
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceAfterCheck.java
@@ -0,0 +1,136 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks that there is no whitespace after a token.
+ * More specifically, it checks that it is not followed by whitespace,
+ * or (if linebreaks are allowed) all characters on the line after are
+ * whitespace. To forbid linebreaks afer a token, set property
+ * allowLineBreaks to false.
+ * </p>
+  * <p> By default the check will check the following operators:
+ *  {@link TokenTypes#ARRAY_INIT ARRAY_INIT},
+ *  {@link TokenTypes#BNOT BNOT},
+ *  {@link TokenTypes#DEC DEC},
+ *  {@link TokenTypes#DOT DOT},
+ *  {@link TokenTypes#INC INC},
+ *  {@link TokenTypes#LNOT LNOT},
+ *  {@link TokenTypes#UNARY_MINUS UNARY_MINUS},
+ *  {@link TokenTypes#UNARY_PLUS UNARY_PLUS}. It also supports the operator
+ *  {@link TokenTypes#TYPECAST TYPECAST}.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="NoWhitespaceAfter"/>
+ * </pre>
+ * <p> An example of how to configure the check to forbid linebreaks after
+ * a {@link TokenTypes#DOT DOT} token is:
+ * </p>
+ * <pre>
+ * <module name="NoWhitespaceAfter">
+ *     <property name="tokens" value="DOT"/>
+ *     <property name="allowLineBreaks" value="false"/>
+ * </module>
+ * </pre>
+ * @author Rick Giles
+ * @author lkuehne
+ * @version 1.0
+ */
+public class NoWhitespaceAfterCheck extends Check
+{
+    /** Whether whitespace is allowed if the AST is at a linebreak */
+    private boolean mAllowLineBreaks = true;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.ARRAY_INIT,
+            TokenTypes.INC,
+            TokenTypes.DEC,
+            TokenTypes.UNARY_MINUS,
+            TokenTypes.UNARY_PLUS,
+            TokenTypes.BNOT,
+            TokenTypes.LNOT,
+            TokenTypes.DOT,
+        };
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return new int[] {
+            TokenTypes.ARRAY_INIT,
+            TokenTypes.INC,
+            TokenTypes.DEC,
+            TokenTypes.UNARY_MINUS,
+            TokenTypes.UNARY_PLUS,
+            TokenTypes.BNOT,
+            TokenTypes.LNOT,
+            TokenTypes.DOT,
+            TokenTypes.TYPECAST,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        DetailAST targetAST = aAST;
+        if (targetAST.getType() == TokenTypes.TYPECAST) {
+            targetAST = targetAST.findFirstToken(TokenTypes.RPAREN);
+        }
+        final String line = getLines()[aAST.getLineNo() - 1];
+        final int after =
+            targetAST.getColumnNo() + targetAST.getText().length();
+
+        if ((after >= line.length())
+            || Character.isWhitespace(line.charAt(after)))
+        {
+            boolean flag = !mAllowLineBreaks;
+            for (int i = after + 1; !flag && (i < line.length()); i++) {
+                if (!Character.isWhitespace(line.charAt(i))) {
+                    flag = true;
+                }
+            }
+            if (flag) {
+                log(targetAST.getLineNo(), after,
+                    "ws.followed", targetAST.getText());
+            }
+        }
+    }
+
+    /**
+     * Control whether whitespace is flagged at linebreaks.
+     * @param aAllowLineBreaks whether whitespace should be
+     * flagged at linebreaks.
+     */
+    public void setAllowLineBreaks(boolean aAllowLineBreaks)
+    {
+        mAllowLineBreaks = aAllowLineBreaks;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCheck.java
new file mode 100644
index 0000000..c0b9fee
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCheck.java
@@ -0,0 +1,130 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks that there is no whitespace before a token.
+ * More specifically, it checks that it is not preceded with whitespace,
+ * or (if linebreaks are allowed) all characters on the line before are
+ * whitespace. To allow linebreaks before a token, set property
+ * allowLineBreaks to true.
+ * </p>
+ * <p> By default the check will check the following operators:
+ *  {@link TokenTypes#SEMI SEMI},
+ *  {@link TokenTypes#POST_DEC POST_DEC},
+ *  {@link TokenTypes#POST_INC POST_INC}.
+ * {@link TokenTypes#DOT DOT} is also an acceptable token in a configuration
+ * of this check.
+ * </p>
+ *
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="NoWhitespaceBefore"/>
+ * </pre>
+ * <p> An example of how to configure the check to allow linebreaks before
+ * a {@link TokenTypes#DOT DOT} token is:
+ * </p>
+ * <pre>
+ * <module name="NoWhitespaceBefore">
+ *     <property name="tokens" value="DOT"/>
+ *     <property name="allowLineBreaks" value="true"/>
+ * </module>
+ * </pre>
+ * @author Rick Giles
+ * @author lkuehne
+ * @version 1.0
+ */
+public class NoWhitespaceBeforeCheck
+    extends Check
+{
+    /** Whether whitespace is allowed if the AST is at a linebreak */
+    private boolean mAllowLineBreaks;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.SEMI,
+            TokenTypes.POST_INC,
+            TokenTypes.POST_DEC,
+        };
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return new int[] {
+            TokenTypes.SEMI,
+            TokenTypes.POST_INC,
+            TokenTypes.POST_DEC,
+            TokenTypes.DOT,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final String[] lines = getLines();
+        final String line = lines[aAST.getLineNo() - 1];
+        final int before = aAST.getColumnNo() - 1;
+
+        if ((before < 0) || Character.isWhitespace(line.charAt(before))) {
+
+            // empty FOR initializer?
+            if (aAST.getType() == TokenTypes.SEMI) {
+                final DetailAST sibling = aAST.getPreviousSibling();
+                if ((sibling != null)
+                        && (sibling.getType() == TokenTypes.FOR_INIT)
+                        && (sibling.getChildCount() == 0))
+                {
+                    return;
+                }
+            }
+
+            boolean flag = !mAllowLineBreaks;
+            // verify all characters before '.' are whitespace
+            for (int i = 0; !flag && (i < before); i++) {
+                if (!Character.isWhitespace(line.charAt(i))) {
+                    flag = true;
+                }
+            }
+            if (flag) {
+                log(aAST.getLineNo(), before, "ws.preceded", aAST.getText());
+            }
+        }
+    }
+
+    /**
+     * Control whether whitespace is flagged at linebreaks.
+     * @param aAllowLineBreaks whether whitespace should be
+     * flagged at linebreaks.
+     */
+    public void setAllowLineBreaks(boolean aAllowLineBreaks)
+    {
+        mAllowLineBreaks = aAllowLineBreaks;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/OperatorWrapCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/OperatorWrapCheck.java
new file mode 100644
index 0000000..de097b4
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/OperatorWrapCheck.java
@@ -0,0 +1,210 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import com.puppycrawl.tools.checkstyle.checks.AbstractOptionCheck;
+
+/**
+ * <p>
+ * Checks line wrapping for operators.
+ * The policy to verify is specified using the {@link WrapOption} class
+ * and defaults to {@link WrapOption#NL}.
+ * </p>
+ * <p> By default the check will check the following operators:
+ *  {@link TokenTypes#BAND BAND},
+ *  {@link TokenTypes#BOR BOR},
+ *  {@link TokenTypes#BSR BSR},
+ *  {@link TokenTypes#BXOR BXOR},
+ *  {@link TokenTypes#COLON COLON},
+ *  {@link TokenTypes#DIV DIV},
+ *  {@link TokenTypes#EQUAL EQUAL},
+ *  {@link TokenTypes#GE GE},
+ *  {@link TokenTypes#GT GT},
+ *  {@link TokenTypes#LAND LAND},
+ *  {@link TokenTypes#LE LE},
+ *  {@link TokenTypes#LITERAL_INSTANCEOF LITERAL_INSTANCEOF},
+ *  {@link TokenTypes#LOR LOR},
+ *  {@link TokenTypes#LT LT},
+ *  {@link TokenTypes#MINUS MINUS},
+ *  {@link TokenTypes#MOD MOD},
+ *  {@link TokenTypes#NOT_EQUAL NOT_EQUAL},
+ *  {@link TokenTypes#PLUS PLUS},
+ *  {@link TokenTypes#QUESTION QUESTION},
+ *  {@link TokenTypes#SL SL},
+ *  {@link TokenTypes#SR SR},
+ *  {@link TokenTypes#STAR STAR}.
+ * Other acceptable tokens are
+ *  {@link TokenTypes#ASSIGN ASSIGN},
+ *  {@link TokenTypes#BAND_ASSIGN BAND_ASSIGN},
+ *  {@link TokenTypes#BOR_ASSIGN BOR_ASSIGN},
+ *  {@link TokenTypes#BSR_ASSIGN BSR_ASSIGN},
+ *  {@link TokenTypes#BXOR_ASSIGN BXOR_ASSIGN},
+ *  {@link TokenTypes#DIV_ASSIGN DIV_ASSIGN},
+ *  {@link TokenTypes#MINUS_ASSIGN MINUS_ASSIGN},
+ *  {@link TokenTypes#MOD_ASSIGN MOD_ASSIGN},
+ *  {@link TokenTypes#PLUS_ASSIGN PLUS_ASSIGN},
+ *  {@link TokenTypes#SL_ASSIGN SL_ASSIGN},
+ *  {@link TokenTypes#SR_ASSIGN SR_ASSIGN},
+ *  {@link TokenTypes#STAR_ASSIGN STAR_ASSIGN}.
+ * </p>
+ *  <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="OperatorWrap"/>
+ * </pre>
+ * <p> An example of how to configure the check for assignment operators at the
+ * end of a line is:
+ * </p>
+ * <pre>
+ * <module name="OperatorWrap">
+ *     <property name="tokens"
+ *               value="ASSIGN,DIV_ASSIGN,PLUS_ASSIGN,MINUS_ASSIGN,STAR_ASSIGN,MOD_ASSIGN,SR_ASSIGN,BSR_ASSIGN,SL_ASSIGN,BXOR_ASSIGN,BOR_ASSIGN,BAND_ASSIGN"/>
+ *     <property name="option" value="eol"/>
+  * </module>
+ * </pre>
+ *
+ * @author Rick Giles
+ * @version 1.0
+ */
+public class OperatorWrapCheck
+    extends AbstractOptionCheck<WrapOption>
+{
+    /**
+     * Sets the operator wrap option to new line.
+     */
+    public OperatorWrapCheck()
+    {
+        super(WrapOption.NL, WrapOption.class);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.QUESTION,          // '?'
+            TokenTypes.COLON,             // ':' (not reported for a case)
+            TokenTypes.EQUAL,             // "=="
+            TokenTypes.NOT_EQUAL,         // "!="
+            TokenTypes.DIV,               // '/'
+            TokenTypes.PLUS,              //' +' (unary plus is UNARY_PLUS)
+            TokenTypes.MINUS,             // '-' (unary minus is UNARY_MINUS)
+            TokenTypes.STAR,              // '*'
+            TokenTypes.MOD,               // '%'
+            TokenTypes.SR,                // ">>"
+            TokenTypes.BSR,               // ">>>"
+            TokenTypes.GE,                // ">="
+            TokenTypes.GT,                // ">"
+            TokenTypes.SL,                // "<<"
+            TokenTypes.LE,                // "<="
+            TokenTypes.LT,                // '<'
+            TokenTypes.BXOR,              // '^'
+            TokenTypes.BOR,               // '|'
+            TokenTypes.LOR,               // "||"
+            TokenTypes.BAND,              // '&'
+            TokenTypes.LAND,              // "&&"
+            TokenTypes.TYPE_EXTENSION_AND,
+            TokenTypes.LITERAL_INSTANCEOF,
+        };
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return new int[] {
+            TokenTypes.QUESTION,          // '?'
+            TokenTypes.COLON,             // ':' (not reported for a case)
+            TokenTypes.EQUAL,             // "=="
+            TokenTypes.NOT_EQUAL,         // "!="
+            TokenTypes.DIV,               // '/'
+            TokenTypes.PLUS,              //' +' (unary plus is UNARY_PLUS)
+            TokenTypes.MINUS,             // '-' (unary minus is UNARY_MINUS)
+            TokenTypes.STAR,              // '*'
+            TokenTypes.MOD,               // '%'
+            TokenTypes.SR,                // ">>"
+            TokenTypes.BSR,               // ">>>"
+            TokenTypes.GE,                // ">="
+            TokenTypes.GT,                // ">"
+            TokenTypes.SL,                // "<<"
+            TokenTypes.LE,                // "<="
+            TokenTypes.LT,                // '<'
+            TokenTypes.BXOR,              // '^'
+            TokenTypes.BOR,               // '|'
+            TokenTypes.LOR,               // "||"
+            TokenTypes.BAND,              // '&'
+            TokenTypes.LAND,              // "&&"
+            TokenTypes.LITERAL_INSTANCEOF,
+            TokenTypes.TYPE_EXTENSION_AND,
+            TokenTypes.ASSIGN,            // '='
+            TokenTypes.DIV_ASSIGN,        // "/="
+            TokenTypes.PLUS_ASSIGN,       // "+="
+            TokenTypes.MINUS_ASSIGN,      //"-="
+            TokenTypes.STAR_ASSIGN,       // "*="
+            TokenTypes.MOD_ASSIGN,        // "%="
+            TokenTypes.SR_ASSIGN,         // ">>="
+            TokenTypes.BSR_ASSIGN,        // ">>>="
+            TokenTypes.SL_ASSIGN,         // "<<="
+            TokenTypes.BXOR_ASSIGN,       // "^="
+            TokenTypes.BOR_ASSIGN,        // "|="
+            TokenTypes.BAND_ASSIGN,       // "&="
+
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        if (aAST.getType() == TokenTypes.COLON) {
+            final DetailAST parent = aAST.getParent();
+            if ((parent.getType() == TokenTypes.LITERAL_DEFAULT)
+                || (parent.getType() == TokenTypes.LITERAL_CASE))
+            {
+                //we do not want to check colon for cases and defaults
+                return;
+            }
+        }
+        final WrapOption wOp = getAbstractOption();
+
+        final String text = aAST.getText();
+        final int colNo = aAST.getColumnNo();
+        final int lineNo = aAST.getLineNo();
+        final String currentLine = getLines()[lineNo - 1];
+
+        // TODO: Handle comments before and after operator
+        // Check if rest of line is whitespace, and not just the operator
+        // by itself. This last bit is to handle the operator on a line by
+        // itself.
+        if ((wOp == WrapOption.NL)
+            && !text.equals(currentLine.trim())
+            && (currentLine.substring(colNo + text.length())
+                .trim().length() == 0))
+        {
+            log(lineNo, colNo, "line.new", text);
+        }
+        else if ((wOp == WrapOption.EOL)
+                  && Utils.whitespaceBefore(colNo - 1, currentLine))
+        {
+            log(lineNo, colNo, "line.previous", text);
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/PadOption.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/PadOption.java
new file mode 100644
index 0000000..741bc62
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/PadOption.java
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+/**
+ * Represents the options for whitespace around parentheses.
+ *
+ * @author Oliver Burn
+ * @version 1
+ * @see EmptyForIteratorPadCheck
+ * @see ParenPadCheck
+ */
+public enum PadOption
+{
+    /**
+     * Represents no spacing following a left parenthesis
+     * or preceding a right one.
+     */
+    NOSPACE,
+
+    /**
+     * Represents mandatory spacing following a left parenthesis
+     * and preceeing a right one.
+     */
+    SPACE;
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadCheck.java
new file mode 100644
index 0000000..7660d16
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadCheck.java
@@ -0,0 +1,145 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>Checks the padding of parentheses; that is whether a space is required
+ * after a left parenthesis and before a right parenthesis, or such spaces are
+ * forbidden, with the exception that it does
+ * not check for padding of the right parenthesis  at an empty for iterator.
+ * Use Check {@link EmptyForIteratorPadCheck EmptyForIteratorPad} to validate
+ * empty for iterators.
+ * </p>
+ * <p>
+ * The policy to verify is specified using the {@link PadOption} class and
+ * defaults to {@link PadOption#NOSPACE}.
+ * </p>
+ * <p> By default the check will check parentheses that occur with the following
+ * tokens:
+ *  {@link TokenTypes#CTOR_CALL CTOR_CALL},
+ *  {@link TokenTypes#LPAREN LPAREN},
+ *  {@link TokenTypes#METHOD_CALL METHOD_CALL},
+ *  {@link TokenTypes#RPAREN RPAREN},
+ *  {@link TokenTypes#SUPER_CTOR_CALL SUPER_CTOR_CALL},
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="ParenPad"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check to require spaces for the
+ * parentheses of constructor, method, and super constructor invocations is:
+ * </p>
+ * <pre>
+ * <module name="ParenPad">
+ *     <property name="tokens"
+ *               value="CTOR_CALL, METHOD_CALL, SUPER_CTOR_CALL"/>
+ *     <property name="option" value="space"/>
+ * </module>
+ * </pre>
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public class ParenPadCheck extends AbstractParenPadCheck
+{
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {TokenTypes.RPAREN,
+                          TokenTypes.LPAREN,
+                          TokenTypes.CTOR_CALL,
+                          TokenTypes.SUPER_CTOR_CALL,
+                          TokenTypes.METHOD_CALL,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        DetailAST theAst = aAST;
+        // Strange logic in this method to guard against checking RPAREN tokens
+        // that are associated with a TYPECAST token.
+        if (theAst.getType() != TokenTypes.RPAREN) {
+            if ((theAst.getType() == TokenTypes.CTOR_CALL)
+                || (theAst.getType() == TokenTypes.SUPER_CTOR_CALL))
+            {
+                theAst = theAst.getFirstChild();
+            }
+            if (!isPreceedsEmptyForInit(theAst)) {
+                processLeft(theAst);
+            }
+        }
+        else if (((theAst.getParent() == null)
+                 || (theAst.getParent().getType() != TokenTypes.TYPECAST)
+                 || (theAst.getParent().findFirstToken(TokenTypes.RPAREN)
+                     != theAst))
+                 && !isFollowsEmptyForIterator(theAst))
+        {
+            processRight(theAst);
+        }
+    }
+
+    /**
+     * @param aAST the token to check
+     * @return whether a token follows an empty for iterator
+     */
+    private boolean isFollowsEmptyForIterator(DetailAST aAST)
+    {
+        boolean followsEmptyForIterator = false;
+        final DetailAST parent = aAST.getParent();
+        //Only traditional for statements are examined, not for-each statements
+        if ((parent != null)
+            && (parent.getType() == TokenTypes.LITERAL_FOR)
+            && (parent.findFirstToken(TokenTypes.FOR_EACH_CLAUSE) == null))
+        {
+            final DetailAST forIterator =
+                parent.findFirstToken(TokenTypes.FOR_ITERATOR);
+            followsEmptyForIterator = (forIterator.getChildCount() == 0)
+                && (aAST == forIterator.getNextSibling());
+        }
+        return followsEmptyForIterator;
+    }
+
+    /**
+     * @param aAST the token to check
+     * @return whether a token preceeds an empty for initializer
+     */
+    private boolean isPreceedsEmptyForInit(DetailAST aAST)
+    {
+        boolean preceedsEmptyForInintializer = false;
+        final DetailAST parent = aAST.getParent();
+        //Only traditional for statements are examined, not for-each statements
+        if ((parent != null)
+            && (parent.getType() == TokenTypes.LITERAL_FOR)
+            && (parent.findFirstToken(TokenTypes.FOR_EACH_CLAUSE) == null))
+        {
+            final DetailAST forIterator =
+                    parent.findFirstToken(TokenTypes.FOR_INIT);
+            preceedsEmptyForInintializer = (forIterator.getChildCount() == 0)
+                    && (aAST == forIterator.getPreviousSibling());
+        }
+        return preceedsEmptyForInintializer;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SeparatorWrapCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SeparatorWrapCheck.java
new file mode 100644
index 0000000..66e914f
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SeparatorWrapCheck.java
@@ -0,0 +1,142 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.checks.AbstractOptionCheck;
+
+/**
+ * <p>
+ * Checks line wrapping with separators.
+ * The policy to verify is specified using the {@link WrapOption} class
+ * and defaults to {@link WrapOption#EOL}.
+ * </p>
+ * <p> By default the check will check the following separators:
+ *  {@link TokenTypes#DOT DOT},
+ *  {@link TokenTypes#COMMA COMMA},
+ * Other acceptable tokens are
+ *  {@link TokenTypes#SEMI SEMI},
+ *  {@link TokenTypes#ELLIPSIS ELLIPSIS},
+ *  {@link TokenTypes#AT AT},
+ *  {@link TokenTypes#LPAREN LPAREN},
+ *  {@link TokenTypes#RPAREN RPAREN},
+ *  {@link TokenTypes#ARRAY_DECLARATOR ARRAY_DECLARATOR},
+ *  {@link TokenTypes#RBRACK RBRACK},
+ * </p>
+ * <p>
+ * Code example for comma and dot at the new line:
+ * </p>
+ * <pre>
+ * s
+ *    .isEmpty();
+ * foo(i
+ *    ,s);
+ * </pre>
+ *  <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="SeparatorWrap"/>
+ * </pre>
+ * <p>
+ * Code example for comma and dot at the previous line:
+ * </p>
+ * <pre>
+ * s.
+ *    isEmpty();
+ * foo(i,
+ *    s);
+ * </pre>
+ * <p> An example of how to configure the check for comma at the
+ * new line is:
+ * </p>
+ * <pre>
+ * <module name="SeparatorWrap">
+ *     <property name="tokens" value="COMMA"/>
+ *     <property name="option" value="nl"/>
+ * </module>
+ * </pre>
+ *
+ * @author maxvetrenko
+ */
+public class SeparatorWrapCheck
+    extends AbstractOptionCheck<WrapOption>
+{
+    /**
+     * Sets the comma wrap option to end of the line.
+     */
+    public SeparatorWrapCheck()
+    {
+        super(WrapOption.EOL, WrapOption.class);
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.DOT,
+            TokenTypes.COMMA,
+        };
+    }
+
+    @Override
+    public int[] getAcceptableTokens()
+    {
+        return new int[] {
+            TokenTypes.DOT,
+            TokenTypes.COMMA,
+            TokenTypes.SEMI,
+            TokenTypes.ELLIPSIS,
+            TokenTypes.AT,
+            TokenTypes.LPAREN,
+            TokenTypes.RPAREN,
+            TokenTypes.ARRAY_DECLARATOR,
+            TokenTypes.RBRACK,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        // TODO: It is a copy/paste from OperatorWrapCheck.
+        //It should be fixed in another issue
+        final String text = aAST.getText();
+        final int colNo = aAST.getColumnNo();
+        final int lineNo = aAST.getLineNo();
+        final String currentLine = getLines()[lineNo - 1];
+        final String substringAfterToken =
+                currentLine.substring(colNo + text.length()).trim();
+        final String substringBeforeToken =
+                currentLine.substring(0, colNo).trim();
+        final WrapOption wSp = getAbstractOption();
+
+        if (wSp == WrapOption.EOL
+                && (substringBeforeToken.length() == 0))
+        {
+            log(lineNo, colNo, "line.previous", text);
+        }
+        else if (wSp == WrapOption.NL
+                 && substringAfterToken.length() == 0)
+        {
+            log(lineNo, colNo, "line.new", text);
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypecastParenPadCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypecastParenPadCheck.java
new file mode 100644
index 0000000..296553a
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypecastParenPadCheck.java
@@ -0,0 +1,81 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>Checks the padding of parentheses for typecasts. That is whether a space
+ * is required after a left parenthesis and before a right parenthesis, or such
+ * spaces are forbidden.
+ * </p>
+ * <p>
+ * The policy to verify is specified using the {@link PadOption} class and
+ * defaults to {@link PadOption#NOSPACE}.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="TypecastParenPad"/>
+ * </pre>
+ * <p>
+ * An example of how to configure the check to require spaces for the
+ * parentheses of constructor, method, and super constructor invocations is:
+ * </p>
+ * <pre>
+ * <module name="TypecastParenPad">
+ *     <property name="option" value="space"/>
+ * </module>
+ * </pre>
+ * @author Oliver Burn
+ * @version 1.0
+ */
+public class TypecastParenPadCheck extends AbstractParenPadCheck
+{
+    @Override
+    public int[] getRequiredTokens()
+    {
+        return new int[] {TokenTypes.RPAREN, TokenTypes.TYPECAST};
+    }
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return getRequiredTokens();
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        // Strange logic in this method to guard against checking RPAREN tokens
+        // that are not associated with a TYPECAST token.
+        if (aAST.getType() == TokenTypes.TYPECAST) {
+            processLeft(aAST);
+        }
+        else if ((aAST.getParent() != null)
+                 && (aAST.getParent().getType() == TokenTypes.TYPECAST)
+                 && (aAST.getParent().findFirstToken(TokenTypes.RPAREN)
+                     == aAST))
+        {
+            processRight(aAST);
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAfterCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAfterCheck.java
new file mode 100644
index 0000000..647deb8
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAfterCheck.java
@@ -0,0 +1,113 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * <p>
+ * Checks that a token is followed by whitespace, with the exception that it
+ * does not check for whitespace after the semicolon of an empty for iterator.
+ * Use Check {@link EmptyForIteratorPadCheck EmptyForIteratorPad} to validate
+ * empty for iterators.
+ * </p>
+ * <p> By default the check will check the following tokens:
+ *  {@link TokenTypes#COMMA COMMA},
+ *  {@link TokenTypes#SEMI SEMI},
+ *  {@link TokenTypes#TYPECAST TYPECAST}.
+ * </p>
+ * <p>
+ * An example of how to configure the check is:
+ * </p>
+ * <pre>
+ * <module name="WhitespaceAfter"/>
+ * </pre>
+ * <p> An example of how to configure the check for whitespace only after
+ * {@link TokenTypes#COMMA COMMA} and {@link TokenTypes#SEMI SEMI} tokens is:
+ * </p>
+ * <pre>
+ * <module name="WhitespaceAfter">
+ *     <property name="tokens" value="COMMA, SEMI"/>
+ * </module>
+ * </pre>
+ * @author Oliver Burn
+ * @author Rick Giles
+ * @version 1.0
+ */
+public class WhitespaceAfterCheck
+    extends Check
+{
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.COMMA,
+            TokenTypes.SEMI,
+            TokenTypes.TYPECAST,
+        };
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final Object[] message;
+        final DetailAST targetAST;
+        if (aAST.getType() == TokenTypes.TYPECAST) {
+            targetAST = aAST.findFirstToken(TokenTypes.RPAREN);
+            // TODO: i18n
+            message = new Object[]{"cast"};
+        }
+        else {
+            targetAST = aAST;
+            message = new Object[]{aAST.getText()};
+        }
+        final String line = getLines()[targetAST.getLineNo() - 1];
+        final int after =
+            targetAST.getColumnNo() + targetAST.getText().length();
+
+        if (after < line.length()) {
+
+            final char charAfter = line.charAt(after);
+            if ((targetAST.getType() == TokenTypes.SEMI)
+                && ((charAfter == ';') || (charAfter == ')')))
+            {
+                return;
+            }
+            if (!Character.isWhitespace(charAfter)) {
+                //empty FOR_ITERATOR?
+                if (targetAST.getType() == TokenTypes.SEMI) {
+                    final DetailAST sibling =
+                        targetAST.getNextSibling();
+                    if ((sibling != null)
+                        && (sibling.getType() == TokenTypes.FOR_ITERATOR)
+                        && (sibling.getChildCount() == 0))
+                    {
+                        return;
+                    }
+                }
+                log(targetAST.getLineNo(),
+                    targetAST.getColumnNo() + targetAST.getText().length(),
+                    "ws.notFollowed",
+                    message);
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundCheck.java
new file mode 100644
index 0000000..a7d8660
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundCheck.java
@@ -0,0 +1,467 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.api.Check;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * <p>
+ * Checks that a token is surrounded by whitespace.
+ *
+ * <p> By default the check will check the following operators:
+ *  {@link TokenTypes#LITERAL_ASSERT ASSERT},
+ *  {@link TokenTypes#ASSIGN ASSIGN},
+ *  {@link TokenTypes#BAND BAND},
+ *  {@link TokenTypes#BAND_ASSIGN BAND_ASSIGN},
+ *  {@link TokenTypes#BOR BOR},
+ *  {@link TokenTypes#BOR_ASSIGN BOR_ASSIGN},
+ *  {@link TokenTypes#BSR BSR},
+ *  {@link TokenTypes#BSR_ASSIGN BSR_ASSIGN},
+ *  {@link TokenTypes#BXOR BXOR},
+ *  {@link TokenTypes#BXOR_ASSIGN BXOR_ASSIGN},
+ *  {@link TokenTypes#COLON COLON},
+ *  {@link TokenTypes#DIV DIV},
+ *  {@link TokenTypes#DIV_ASSIGN DIV_ASSIGN},
+ *  {@link TokenTypes#DO_WHILE DO_WHILE},
+ *  {@link TokenTypes#EQUAL EQUAL},
+ *  {@link TokenTypes#GE GE},
+ *  {@link TokenTypes#GT GT},
+ *  {@link TokenTypes#LAND LAND},
+ *  {@link TokenTypes#LCURLY LCURLY},
+ *  {@link TokenTypes#LE LE},
+ *  {@link TokenTypes#LITERAL_CATCH LITERAL_CATCH},
+ *  {@link TokenTypes#LITERAL_DO LITERAL_DO},
+ *  {@link TokenTypes#LITERAL_ELSE LITERAL_ELSE},
+ *  {@link TokenTypes#LITERAL_FINALLY LITERAL_FINALLY},
+ *  {@link TokenTypes#LITERAL_FOR LITERAL_FOR},
+ *  {@link TokenTypes#LITERAL_IF LITERAL_IF},
+ *  {@link TokenTypes#LITERAL_RETURN LITERAL_RETURN},
+ *  {@link TokenTypes#LITERAL_SWITCH LITERAL_SWITCH},
+ *  {@link TokenTypes#LITERAL_SYNCHRONIZED LITERAL_SYNCHRONIZED},
+ *  {@link TokenTypes#LITERAL_TRY LITERAL_TRY},
+ *  {@link TokenTypes#LITERAL_WHILE LITERAL_WHILE},
+ *  {@link TokenTypes#LOR LOR},
+ *  {@link TokenTypes#LT LT},
+ *  {@link TokenTypes#MINUS MINUS},
+ *  {@link TokenTypes#MINUS_ASSIGN MINUS_ASSIGN},
+ *  {@link TokenTypes#MOD MOD},
+ *  {@link TokenTypes#MOD_ASSIGN MOD_ASSIGN},
+ *  {@link TokenTypes#NOT_EQUAL NOT_EQUAL},
+ *  {@link TokenTypes#PLUS PLUS},
+ *  {@link TokenTypes#PLUS_ASSIGN PLUS_ASSIGN},
+ *  {@link TokenTypes#QUESTION QUESTION},
+ *  {@link TokenTypes#RCURLY RCURLY},
+ *  {@link TokenTypes#SL SL},
+ *  {@link TokenTypes#SLIST SLIST},
+ *  {@link TokenTypes#SL_ASSIGN SL_ASSIGN},
+ *  {@link TokenTypes#SR SR},
+ *  {@link TokenTypes#SR_ASSIGN SR_ASSIGN},
+ *  {@link TokenTypes#STAR STAR},
+ *  {@link TokenTypes#STAR_ASSIGN STAR_ASSIGN},
+ *  {@link TokenTypes#LITERAL_ASSERT LITERAL_ASSERT},
+ *  {@link TokenTypes#TYPE_EXTENSION_AND TYPE_EXTENSION_AND}.
+ *
+ * <p>
+ * An example of how to configure the check is:
+ *
+ * <pre>
+ * <module name="WhitespaceAround"/>
+ * </pre>
+ *
+ * <p> An example of how to configure the check for whitespace only around
+ * assignment operators is:
+ *
+ * <pre>
+ * <module name="WhitespaceAround">
+ *     <property name="tokens"
+ *               value="ASSIGN,DIV_ASSIGN,PLUS_ASSIGN,MINUS_ASSIGN,STAR_ASSIGN,MOD_ASSIGN,SR_ASSIGN,BSR_ASSIGN,SL_ASSIGN,BXOR_ASSIGN,BOR_ASSIGN,BAND_ASSIGN"/>
+ * </module>
+ * </pre>
+ *
+ * <p>
+ * In addition, this check can be configured to allow empty methods, types,
+ * for, while, do-while loops and constructor bodies.
+ * For example:
+ *
+ * <p>
+ * <pre><code>
+ * public MyClass() {}      // empty constructor
+ * public void func() {}    // empty method
+ * public interface Foo {} // empty interface
+ * public class Foo {} // empty class
+ * public enum Foo {} // empty enum
+ * MyClass c = new MyClass() {}; // empty anonymous class
+ * while (i = 1) {} // empty while loop
+ * for (int i = 1; i > 1; i++) {} // empty for loop
+ * do {} while (i = 1); // empty do-while loop
+ * public @interface Beta {} // empty annotation type
+ * </code></pre>
+ *
+ * <p>
+ * To configure the check to allow empty method blocks use
+ *
+ * <p>
+ * <pre>   <property name="allowEmptyMethods" value="true" /></pre>
+ *
+ * <p>
+ * To configure the check to allow empty constructor blocks use
+ *
+ * <p>
+ * <pre>   <property name="allowEmptyConstructors" value="true" /></pre>
+ *
+ * <p>
+ * To configure the check to allow empty type blocks use
+ *
+ * <p>
+ * <pre>   <property name="allowEmptyTypes" value="true" /></pre>
+ *
+ * <p>
+ * To configure the check to allow empty loop blocks use
+ *
+ * <p>
+ * <pre>   <property name="allowEmptyLoops" value="true" /></pre>
+ *
+ *
+ * <p>
+ * Also, this check can be configured to ignore the colon in an enhanced for
+ * loop. The colon in an enhanced for loop is ignored by default
+ *
+ * <p>
+ * To configure the check to ignore the colon
+ *
+ * <p>
+ * <pre>   <property name="ignoreEnhancedForColon" value="true" /></pre>
+ *
+ *
+ * @author Oliver Burn
+ * @author maxvetrenko
+ * @version 1.0
+ */
+public class WhitespaceAroundCheck extends Check
+{
+    /** Whether or not empty constructor bodies are allowed. */
+    private boolean mAllowEmptyCtors;
+    /** Whether or not empty method bodies are allowed. */
+    private boolean mAllowEmptyMethods;
+    /** Whether or not empty classes, enums and interfaces are allowed*/
+    private boolean mAllowEmptyTypes;
+    /** Whether or not empty loops are allowed*/
+    private boolean mAllowEmptyLoops;
+    /** whether or not to ignore a colon in a enhanced for loop */
+    private boolean mIgnoreEnhancedForColon = true;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[] {
+            TokenTypes.ASSIGN,
+            TokenTypes.BAND,
+            TokenTypes.BAND_ASSIGN,
+            TokenTypes.BOR,
+            TokenTypes.BOR_ASSIGN,
+            TokenTypes.BSR,
+            TokenTypes.BSR_ASSIGN,
+            TokenTypes.BXOR,
+            TokenTypes.BXOR_ASSIGN,
+            TokenTypes.COLON,
+            TokenTypes.DIV,
+            TokenTypes.DIV_ASSIGN,
+            TokenTypes.DO_WHILE,
+            TokenTypes.EQUAL,
+            TokenTypes.GE,
+            TokenTypes.GT,
+            TokenTypes.LAND,
+            TokenTypes.LCURLY,
+            TokenTypes.LE,
+            TokenTypes.LITERAL_CATCH,
+            TokenTypes.LITERAL_DO,
+            TokenTypes.LITERAL_ELSE,
+            TokenTypes.LITERAL_FINALLY,
+            TokenTypes.LITERAL_FOR,
+            TokenTypes.LITERAL_IF,
+            TokenTypes.LITERAL_RETURN,
+            TokenTypes.LITERAL_SWITCH,
+            TokenTypes.LITERAL_SYNCHRONIZED,
+            TokenTypes.LITERAL_TRY,
+            TokenTypes.LITERAL_WHILE,
+            TokenTypes.LOR,
+            TokenTypes.LT,
+            TokenTypes.MINUS,
+            TokenTypes.MINUS_ASSIGN,
+            TokenTypes.MOD,
+            TokenTypes.MOD_ASSIGN,
+            TokenTypes.NOT_EQUAL,
+            TokenTypes.PLUS,
+            TokenTypes.PLUS_ASSIGN,
+            TokenTypes.QUESTION,
+            TokenTypes.RCURLY,
+            TokenTypes.SL,
+            TokenTypes.SLIST,
+            TokenTypes.SL_ASSIGN,
+            TokenTypes.SR,
+            TokenTypes.SR_ASSIGN,
+            TokenTypes.STAR,
+            TokenTypes.STAR_ASSIGN,
+            TokenTypes.LITERAL_ASSERT,
+            TokenTypes.TYPE_EXTENSION_AND,
+        };
+    }
+
+    /**
+     * Sets whether or not empty method bodies are allowed.
+     * @param aAllow <code>true</code> to allow empty method bodies.
+     */
+    public void setAllowEmptyMethods(boolean aAllow)
+    {
+        mAllowEmptyMethods = aAllow;
+    }
+
+    /**
+     * Sets whether or not empty constructor bodies are allowed.
+     * @param aAllow <code>true</code> to allow empty constructor bodies.
+     */
+    public void setAllowEmptyConstructors(boolean aAllow)
+    {
+        mAllowEmptyCtors = aAllow;
+    }
+
+    /**
+     * Sets whether or not to ignore the whitespace around the
+     * colon in an enhanced for loop.
+     * @param aIgnore <code>true</code> to ignore enhanced for colon.
+     */
+    public void setIgnoreEnhancedForColon(boolean aIgnore)
+    {
+        mIgnoreEnhancedForColon = aIgnore;
+    }
+
+    /**
+     * Sets whether or not empty type bodies are allowed.
+     * @param aAllow <code>true</code> to allow empty type bodies.
+     */
+    public void setAllowEmptyTypes(boolean aAllow)
+    {
+        mAllowEmptyTypes = aAllow;
+    }
+
+    /**
+     * Sets whether or not empty loop bodies are allowed.
+     * @param aAllow <code>true</code> to allow empty loops bodies.
+     */
+    public void setAllowEmptyLoops(boolean aAllow)
+    {
+        mAllowEmptyLoops = aAllow;
+    }
+
+    @Override
+    public void visitToken(DetailAST aAST)
+    {
+        final int currentType = aAST.getType();
+        final int parentType = aAST.getParent().getType();
+
+        // Check for CURLY in array initializer
+        if (((currentType == TokenTypes.RCURLY)
+                || (currentType == TokenTypes.LCURLY))
+            && ((parentType == TokenTypes.ARRAY_INIT)
+                || (parentType == TokenTypes.ANNOTATION_ARRAY_INIT)))
+        {
+            return;
+        }
+
+        // Check for import pkg.name.*;
+        if ((currentType == TokenTypes.STAR)
+            && (parentType == TokenTypes.DOT))
+        {
+            return;
+        }
+
+        // Check for an SLIST that has a parent CASE_GROUP. It is not a '{'.
+        if ((currentType == TokenTypes.SLIST)
+            && (parentType == TokenTypes.CASE_GROUP))
+        {
+            return;
+        }
+
+        if ((currentType == TokenTypes.COLON)) {
+            //we do not want to check colon for cases and defaults
+            if (parentType == TokenTypes.LITERAL_DEFAULT
+                || parentType == TokenTypes.LITERAL_CASE)
+            {
+                return;
+            }
+            else if (parentType == TokenTypes.FOR_EACH_CLAUSE
+                && this.mIgnoreEnhancedForColon)
+            {
+                return;
+            }
+        }
+
+        // Checks if empty methods, ctors or loops are allowed.
+        if (isEmptyMethodBlock(aAST, parentType)
+                || isEmptyCtorBlock(aAST, parentType)
+                || isEmptyLoop(aAST, parentType))
+        {
+            return;
+        }
+
+        // Checks if empty classes, interfaces or enums are allowed
+        if (mAllowEmptyTypes && (isEmptyType(aAST, parentType))) {
+            return;
+        }
+
+        final String[] lines = getLines();
+        final String line = lines[aAST.getLineNo() - 1];
+        final int before = aAST.getColumnNo() - 1;
+        final int after = aAST.getColumnNo() + aAST.getText().length();
+
+        if ((before >= 0) && !Character.isWhitespace(line.charAt(before))) {
+            log(aAST.getLineNo(), aAST.getColumnNo(),
+                    "ws.notPreceded", aAST.getText());
+        }
+
+        if (after >= line.length()) {
+            return;
+        }
+
+        final char nextChar = line.charAt(after);
+        if (!Character.isWhitespace(nextChar)
+            // Check for "return;"
+            && !((currentType == TokenTypes.LITERAL_RETURN)
+                && (aAST.getFirstChild().getType() == TokenTypes.SEMI))
+            // Check for "})" or "};" or "},". Happens with anon-inners
+            && !((currentType == TokenTypes.RCURLY)
+                && ((nextChar == ')')
+                    || (nextChar == ';')
+                    || (nextChar == ',')
+                    || (nextChar == '.'))))
+        {
+            log(aAST.getLineNo(), aAST.getColumnNo() + aAST.getText().length(),
+                    "ws.notFollowed", aAST.getText());
+        }
+    }
+
+    /**
+     * Test if the given <code>DetailAST</code> is part of an allowed empty
+     * method block.
+     * @param aAST the <code>DetailAST</code> to test.
+     * @param aParentType the token type of <code>aAST</code>'s parent.
+     * @return <code>true</code> if <code>aAST</code> makes up part of an
+     *         allowed empty method block.
+     */
+    private boolean isEmptyMethodBlock(DetailAST aAST, int aParentType)
+    {
+        return mAllowEmptyMethods
+            && isEmptyBlock(aAST, aParentType, TokenTypes.METHOD_DEF);
+    }
+
+    /**
+     * Test if the given <code>DetailAST</code> is part of an allowed empty
+     * constructor (ctor) block.
+     * @param aAST the <code>DetailAST</code> to test.
+     * @param aParentType the token type of <code>aAST</code>'s parent.
+     * @return <code>true</code> if <code>aAST</code> makes up part of an
+     *         allowed empty constructor block.
+     */
+    private boolean isEmptyCtorBlock(DetailAST aAST, int aParentType)
+    {
+        return mAllowEmptyCtors
+            && isEmptyBlock(aAST, aParentType, TokenTypes.CTOR_DEF);
+    }
+
+    /**
+     *
+     * @param aAST aAST the <code>DetailAST</code> to test.
+     * @param aParentType the token type of <code>aAST</code>'s parent.
+     * @return <code>true</code> if <code>aAST</code> makes up part of an
+     *         allowed empty loop block.
+     */
+    private boolean isEmptyLoop(DetailAST aAST, int aParentType)
+    {
+        return mAllowEmptyLoops
+            && (isEmptyBlock(aAST, aParentType, TokenTypes.LITERAL_FOR)
+                    || isEmptyBlock(aAST,
+                            aParentType, TokenTypes.LITERAL_WHILE)
+                            || isEmptyBlock(aAST,
+                                    aParentType, TokenTypes.LITERAL_DO));
+    }
+
+    /**
+     * Test if the given <code>DetailAST</code> is part of an empty block.
+     * An example empty block might look like the following
+     * <p>
+     * <pre>   class Foo {}</pre>
+     * </p>
+     *
+     * @param aAST aAST the <code>DetailAST</code> to test.
+     * @param aParentType the token type of <code>aAST</code>'s parent.
+     * @return <code>true</code> if <code>aAST</code> makes up part of an
+     *         empty block contained under a <code>aMatch</code> token type
+     *         node.
+     */
+    private boolean isEmptyType(DetailAST aAST, int aParentType)
+    {
+        final int type = aAST.getType();
+        if ((type == TokenTypes.RCURLY || type == TokenTypes.LCURLY)
+                && aParentType == TokenTypes.OBJBLOCK)
+        {
+            final DetailAST typeNode = aAST.getParent().getParent();
+            final int matchType = typeNode.getType();
+            if (matchType == TokenTypes.CLASS_DEF
+                    || matchType == TokenTypes.INTERFACE_DEF
+                    || matchType == TokenTypes.ENUM_DEF
+                    || matchType == TokenTypes.LITERAL_NEW
+                    || matchType == TokenTypes.ANNOTATION_DEF)
+            {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Tests if a given <code>DetailAST</code> is part of an empty block.
+     * An example empty block might look like the following
+     * <p>
+     * <pre>   public void myMethod(int val) {}</pre>
+     * </p>
+     * In the above, the method body is an empty block ("{}").
+     *
+     * @param aAST the <code>DetailAST</code> to test.
+     * @param aParentType the token type of <code>aAST</code>'s parent.
+     * @param aMatch the parent token type we're looking to match.
+     * @return <code>true</code> if <code>aAST</code> makes up part of an
+     *         empty block contained under a <code>aMatch</code> token type
+     *         node.
+     */
+    private boolean isEmptyBlock(DetailAST aAST, int aParentType, int aMatch)
+    {
+        final int type = aAST.getType();
+        if (type == TokenTypes.RCURLY) {
+            final DetailAST grandParent = aAST.getParent().getParent();
+            return (aParentType == TokenTypes.SLIST)
+                && (grandParent.getType() == aMatch);
+        }
+
+        return (type == TokenTypes.SLIST)
+            && (aParentType == aMatch)
+            && (aAST.getFirstChild().getType() == TokenTypes.RCURLY);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WrapOption.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WrapOption.java
new file mode 100644
index 0000000..f5836b7
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WrapOption.java
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+/**
+ * Represents the options for wrapping on an operator.
+ *
+ * @author Rick Giles
+ * @version 1.0
+ */
+public enum WrapOption
+{
+    /** Require that the token is on a new line. */
+    NL,
+    /** Require that the token is at the end of the line. */
+    EOL;
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/package-info.java
new file mode 100644
index 0000000..96e2950
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/package-info.java
@@ -0,0 +1,24 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the <span class="xdocspagetitle">Whitespace</span> checks that
+ * are bundled with the main distribution.
+ */
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/doclets/CheckDocsDoclet.java b/src/main/java/com/puppycrawl/tools/checkstyle/doclets/CheckDocsDoclet.java
new file mode 100644
index 0000000..830a388
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/doclets/CheckDocsDoclet.java
@@ -0,0 +1,256 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.doclets;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.Comparator;
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.RootDoc;
+import com.sun.javadoc.Tag;
+
+/**
+ * Doclet which is used to extract Anakia input files from the
+ * Javadoc of Check implementations, so the Check's docs are
+ * autogenerated.
+ * Attention: this is incomplete autogenerator of Check's documentation
+ * from the Check's javadoc. It is not used now, and should be removed from
+ * master branch till completed.
+ * @author lkuehne
+ */
+public final class CheckDocsDoclet
+{
+    /** javadoc command line option for dest dir. */
+    private static final String DEST_DIR_OPT = "-d";
+
+    /** Stop instances being created. */
+    private CheckDocsDoclet()
+    {
+    }
+
+    /**
+     * Comparator that compares the {@link ClassDoc ClassDocs} of two checks
+     * by their check name.
+     */
+    private static class ClassDocByCheckNameComparator implements
+        Comparator<ClassDoc>
+    {
+        /** {@inheritDoc} */
+        public int compare(ClassDoc aObject1, ClassDoc aObject2)
+        {
+            final String checkName1 = getCheckName(aObject1);
+            final String checkName2 = getCheckName(aObject2);
+            return checkName1.compareTo(checkName2);
+        }
+    }
+
+    /**
+     * The first sentence of the check description.
+     *
+     * @param aClassDoc class doc of the check, e.g. EmptyStatement
+     * @return The first sentence of the check description.
+     */
+    private static String getDescription(final ClassDoc aClassDoc)
+    {
+        final Tag[] tags = aClassDoc.firstSentenceTags();
+        final StringBuffer buf = new StringBuffer();
+        if (tags.length > 0) {
+            buf.append(tags[0].text());
+        }
+        removeOpeningParagraphTag(buf);
+        return buf.toString();
+    }
+
+    /**
+     * Removes an opening p tag from a StringBuffer.
+     * @param aText the text to process
+     */
+    private static void removeOpeningParagraphTag(final StringBuffer aText)
+    {
+        final String openTag = "<p>";
+        final int tagLen = openTag.length();
+        if ((aText.length() > tagLen)
+                && aText.substring(0, tagLen).equals(openTag))
+        {
+            aText.delete(0, tagLen);
+        }
+    }
+
+    /**
+     * Returns the official name of a check.
+     *
+     * @param aClassDoc the the check's documentation as extracted by javadoc
+     * @return the check name, e.g. "IllegalImport" for
+     * the "c.p.t.c.c.i.IllegalImportCheck" class.
+     */
+    private static String getCheckName(final ClassDoc aClassDoc)
+    {
+        final String strippedClassName = aClassDoc.typeName();
+        final String checkName;
+        if (strippedClassName.endsWith("Check")) {
+            checkName = strippedClassName.substring(
+                    0, strippedClassName.length() - "Check".length());
+        }
+        else {
+            checkName = strippedClassName;
+        }
+        return checkName;
+    }
+
+    /**
+     * Writes the opening tags of an xdoc.
+     * @param aPrintWriter you guessed it ... the target to print to :)
+     * @param aTitle the title to use for the document.
+     */
+    private static void writeXdocsHeader(
+            final PrintWriter aPrintWriter,
+            final String aTitle)
+    {
+        aPrintWriter.println("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
+        aPrintWriter.println("<document>");
+        aPrintWriter.println("<properties>");
+        aPrintWriter.println("<title>" + aTitle + "</title>");
+        aPrintWriter.println("<author "
+                + "email=\"checkstyle-devel at lists.sourceforge.net"
+                + "\">Checkstyle Development Team</author>");
+        aPrintWriter.println("</properties>");
+        aPrintWriter.println("<body>");
+        aPrintWriter.flush();
+    }
+
+    /**
+     * Writes the closing tags of an xdoc document.
+     * @param aPrintWriter you guessed it ... the target to print to :)
+     */
+    private static void writeXdocsFooter(final PrintWriter aPrintWriter)
+    {
+        aPrintWriter.println("</body>");
+        aPrintWriter.println("</document>");
+        aPrintWriter.flush();
+    }
+
+    /**
+     * Doclet entry point.
+     * @param aRoot parsed javadoc of all java files passed to the javadoc task
+     * @return true (TODO: semantics of the return value is not clear to me)
+     * @throws IOException if there are problems writing output
+     */
+    public static boolean start(RootDoc aRoot) throws IOException
+    {
+        final ClassDoc[] classDocs = aRoot.classes();
+
+        final File destDir = new File(getDestDir(aRoot.options()));
+
+        final File checksIndexFile = new File(destDir, "availablechecks.xml");
+        final PrintWriter fileWriter = new PrintWriter(
+                new FileWriter(checksIndexFile));
+        writeXdocsHeader(fileWriter, "Available Checks");
+
+        fileWriter.println("<p>Checkstyle provides many checks that you can"
+                + " apply to your source code. Below is an alphabetical"
+                + " reference, the site navigation menu provides a reference"
+                + " organized by functionality.</p>");
+        fileWriter.println("<table>");
+
+        Arrays.sort(classDocs, new ClassDocByCheckNameComparator());
+
+        for (final ClassDoc classDoc : classDocs) {
+
+            // TODO: introduce a "CheckstyleModule" interface
+            // so we can do better in the next line...
+            if (classDoc.typeName().endsWith("Check")
+                    && !classDoc.isAbstract())
+            {
+                String pageName = getPageName(classDoc);
+
+                // allow checks to override pageName when
+                // java package hierarchy is not reflected in doc structure
+                final Tag[] docPageTags = classDoc.tags("checkstyle-docpage");
+                if ((docPageTags != null) && (docPageTags.length > 0)) {
+                    pageName = docPageTags[0].text();
+                }
+
+                final String descr = getDescription(classDoc);
+                final String checkName = getCheckName(classDoc);
+
+
+                fileWriter.println("<tr>"
+                        + "<td><a href=\""
+                        + "config_" + pageName + ".html#" + checkName
+                        + "\">" + checkName + "</a></td><td>"
+                        + descr
+                        + "</td></tr>");
+            }
+        }
+
+        fileWriter.println("</table>");
+        writeXdocsFooter(fileWriter);
+        fileWriter.close();
+        return true;
+    }
+
+    /**
+     * Calculates the human readable page name for a doc page.
+     *
+     * @param aClassDoc the doc page.
+     * @return the human readable page name for the doc page.
+     */
+    private static String getPageName(ClassDoc aClassDoc)
+    {
+        final String packageName = aClassDoc.containingPackage().name();
+        final String pageName =
+                packageName.substring(packageName.lastIndexOf('.') + 1);
+        if ("checks".equals(pageName)) {
+            return "misc";
+        }
+        return pageName;
+    }
+
+    /**
+     * Return the destination directory for this Javadoc run.
+     * @param aOptions Javadoc commandline options
+     * @return the dest dir specified on the command line (or ant task)
+     */
+    public static String getDestDir(String[][] aOptions)
+    {
+        for (final String[] opt : aOptions) {
+            if (DEST_DIR_OPT.equalsIgnoreCase(opt[0])) {
+                return opt[1];
+            }
+        }
+        return null; // TODO: throw exception here ???
+    }
+
+    /**
+     * Returns option length (how many parts are in option).
+     * @param aOption option name to process
+     * @return option length (how many parts are in option).
+     */
+    public static int optionLength(String aOption)
+    {
+        if (DEST_DIR_OPT.equals(aOption)) {
+            return 2;
+        }
+        return 0;
+    }
+
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/doclets/TokenTypesDoclet.java b/src/main/java/com/puppycrawl/tools/checkstyle/doclets/TokenTypesDoclet.java
new file mode 100644
index 0000000..1eb9e41
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/doclets/TokenTypesDoclet.java
@@ -0,0 +1,150 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.doclets;
+
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.DocErrorReporter;
+import com.sun.javadoc.FieldDoc;
+import com.sun.javadoc.RootDoc;
+
+/**
+ * Doclet which is used to write property file with short descriptions
+ * (first sentences) of TokenTypes' constants.
+ * Request: 724871
+ * For ide plugins (like the eclipse plugin) it would be useful to have
+ * programmatic access to the first sentence of the TokenType constants,
+ * so they can use them in their configuration gui.
+ * @author o_sukhodolsky
+ */
+public final class TokenTypesDoclet
+{
+    /** Command line option to specify file to write output of the doclet. */
+    private static final String DEST_FILE_OPT = "-destfile";
+
+    /** Stop instances being created. */
+    private TokenTypesDoclet()
+    {
+    }
+
+    /**
+     * The doclet's starter method.
+     * @param aRoot <code>RootDoc</code> given to the doclet
+     * @exception FileNotFoundException will be thrown if the doclet
+     *            will be unable to write to the specified file.
+     * @return true if the given <code>RootDoc</code> is processed.
+     */
+    public static boolean start(RootDoc aRoot) throws FileNotFoundException
+    {
+        final String fileName = getDestFileName(aRoot.options());
+        final FileOutputStream fos = new FileOutputStream(fileName);
+        PrintStream ps = null;
+        try {
+            ps = new PrintStream(fos);
+            final ClassDoc[] classes = aRoot.classes();
+            if ((classes.length != 1)
+                || !"TokenTypes".equals(classes[0].name()))
+            {
+                final String message =
+                    "The doclet should be used for TokenTypes only";
+                throw new IllegalArgumentException(message);
+            }
+
+            final FieldDoc[] fields = classes[0].fields();
+            for (final FieldDoc field : fields) {
+                if (field.isStatic() && field.isPublic() && field.isFinal()
+                    && "int".equals((field.type().qualifiedTypeName())))
+                {
+                    if (field.firstSentenceTags().length != 1) {
+                        final String message = "Should be only one tag.";
+                        throw new IllegalArgumentException(message);
+                    }
+                    ps.println(field.name() + "="
+                        + field.firstSentenceTags()[0].text());
+                }
+            }
+        }
+        finally {
+            if (ps != null) {
+                ps.close();
+            }
+        }
+
+        return true;
+    }
+
+    /**
+     * Returns option length (how many parts are in option).
+     * @param aOption option name to process
+     * @return option length (how many parts are in option).
+     */
+    public static int optionLength(String aOption)
+    {
+        if (DEST_FILE_OPT.equals(aOption)) {
+            return 2;
+        }
+        return 0;
+    }
+
+    /**
+     * Checks that only valid options was specified.
+     * @param aOptions all parsed options
+     * @param aReporter the reporter to report errors.
+     * @return true if only valid options was specified
+     */
+    public static boolean validOptions(String aOptions[][],
+                                       DocErrorReporter aReporter)
+    {
+        boolean foundDestFileOption = false;
+        for (final String[] opt : aOptions) {
+            if (DEST_FILE_OPT.equals(opt[0])) {
+                if (foundDestFileOption) {
+                    aReporter.printError("Only one -destfile option allowed.");
+                    return false;
+                }
+                foundDestFileOption = true;
+            }
+        }
+        if (!foundDestFileOption) {
+            final String message =
+                "Usage: javadoc -destfile file -doclet TokenTypesDoclet ...";
+            aReporter.printError(message);
+        }
+        return foundDestFileOption;
+    }
+
+    /**
+     * Reads destination file name.
+     * @param aOptions all specified options.
+     * @return destination file name
+     */
+    private static String getDestFileName(String[][] aOptions)
+    {
+        String fileName = null;
+        for (final String[] opt : aOptions) {
+            if (DEST_FILE_OPT.equals(opt[0])) {
+                fileName = opt[1];
+            }
+        }
+        return fileName;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/doclets/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/doclets/package-info.java
new file mode 100644
index 0000000..267757f
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/doclets/package-info.java
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the doclets used during the build of Checktyle. REally
+ * <p>
+ * You should <strong>not be</strong> referring to this package.
+ * </p>
+ */
+package com.puppycrawl.tools.checkstyle.doclets;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/CSVFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/CSVFilter.java
new file mode 100644
index 0000000..369f7a5
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/CSVFilter.java
@@ -0,0 +1,122 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import com.google.common.collect.Sets;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+/**
+ * <p>
+ * This filter accepts an integer that matches a CSV value, where
+ * each value is an integer or a range of integers.
+ * </p>
+ * @author Rick Giles
+ * @author o_sukhodolsky
+ */
+class CSVFilter implements IntFilter
+{
+    /** filter set */
+    private final Set<IntFilter> mFilters = Sets.newHashSet();
+
+    /**
+     * Adds a IntFilter to the set.
+     * @param aFilter the IntFilter to add.
+     */
+    public void addFilter(IntFilter aFilter)
+    {
+        mFilters.add(aFilter);
+    }
+
+    /**
+     * Returns the IntFilters of the filter set.
+     * @return the IntFilters of the filter set.
+     */
+    protected Set<IntFilter> getFilters()
+    {
+        return mFilters;
+    }
+
+    /**
+     * Constructs a <code>CSVFilter</code> from a CSV, Comma-Separated Values,
+     * string. Each value is an integer, or a range of integers. A range of
+     * integers is of the form integer-integer, such as 1-10.
+     * Note: integers must be non-negative.
+     * @param aPattern the CSV string.
+     * @throws NumberFormatException if a component substring does not
+     * contain a parsable integer.
+     */
+    public CSVFilter(String aPattern)
+        throws NumberFormatException
+    {
+        final StringTokenizer tokenizer = new StringTokenizer(aPattern, ",");
+        while (tokenizer.hasMoreTokens()) {
+            final String token = tokenizer.nextToken().trim();
+            final int index = token.indexOf("-");
+            if (index == -1) {
+                final int matchValue = Integer.parseInt(token);
+                addFilter(new IntMatchFilter(matchValue));
+            }
+            else {
+                final int lowerBound =
+                    Integer.parseInt(token.substring(0, index));
+                final int upperBound =
+                    Integer.parseInt(token.substring(index + 1));
+                addFilter(new IntRangeFilter(lowerBound, upperBound));
+            }
+        }
+    }
+
+    /**
+     * Determines whether an Integer matches a CSV integer value.
+     * @param aInt the Integer to check.
+     * @return true if aInt is an Integer that matches a CSV value.
+     */
+    public boolean accept(int aInt)
+    {
+        for (IntFilter filter : getFilters()) {
+            if (filter.accept(aInt)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public String toString()
+    {
+        return mFilters.toString();
+    }
+
+    @Override
+    public int hashCode()
+    {
+        return mFilters.hashCode();
+    }
+
+    @Override
+    public boolean equals(Object aObject)
+    {
+        if (aObject instanceof CSVFilter) {
+            final CSVFilter other = (CSVFilter) aObject;
+            return this.mFilters.equals(other.mFilters);
+        }
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntFilter.java
new file mode 100644
index 0000000..62ad633
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntFilter.java
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+/**
+ * An interface for filtering Integer.
+ * @author o_sukhodolsky
+ */
+interface IntFilter
+
+{
+    /**
+     * Determines whether or not a filtered Integer is accepted.
+     * @param aInt the Integer to filter.
+     * @return true if the aInt is accepted.
+     */
+    boolean accept(int aInt);
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntMatchFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntMatchFilter.java
new file mode 100644
index 0000000..1860d94
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntMatchFilter.java
@@ -0,0 +1,66 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+/**
+ * This filter accepts a matching Integer.
+ * @author Rick Giles
+ */
+class IntMatchFilter implements IntFilter
+{
+    /** the matching Integer */
+    private final int mMatchValue;
+
+    /**
+     * Constructs a MatchFilter for an int.
+     * @param aMatchValue the matching int.
+     */
+    public IntMatchFilter(int aMatchValue)
+    {
+        mMatchValue = aMatchValue;
+    }
+
+    /** {@inheritDoc} */
+    public boolean accept(int aInt)
+    {
+        return mMatchValue == aInt;
+    }
+
+    @Override
+    public String toString()
+    {
+        return "IntMatchFilter[" + mMatchValue + "]";
+    }
+
+    @Override
+    public int hashCode()
+    {
+        return Integer.valueOf(mMatchValue).hashCode();
+    }
+
+    @Override
+    public boolean equals(Object aObject)
+    {
+        if (aObject instanceof IntMatchFilter) {
+            final IntMatchFilter other = (IntMatchFilter) aObject;
+            return this.mMatchValue == other.mMatchValue;
+        }
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntRangeFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntRangeFilter.java
new file mode 100644
index 0000000..25cc87e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/IntRangeFilter.java
@@ -0,0 +1,78 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+/**
+ * This filter accepts an Integer in a range.
+ * @author Rick Giles
+ */
+class IntRangeFilter implements IntFilter
+{
+    /** hash function multiplicand */
+    private static final int HASH_MULT = 29;
+
+    /** lower bound of the range */
+    private final Integer mLowerBound;
+
+    /** upper bound of the range */
+    private final Integer mUpperBound;
+
+    /**
+     * Constructs a <code>IntRangeFilter</code> with a
+     * lower bound and an upper bound for the range.
+     * @param aLowerBound the lower bound of the range.
+     * @param aUpperBound the upper bound of the range.
+     */
+    public IntRangeFilter(int aLowerBound, int aUpperBound)
+    {
+        mLowerBound = aLowerBound;
+        mUpperBound = aUpperBound;
+    }
+
+    /** {@inheritDoc} */
+    public boolean accept(int aInt)
+    {
+        return ((mLowerBound.compareTo(aInt) <= 0)
+            && (mUpperBound.compareTo(aInt) >= 0));
+    }
+
+    @Override
+    public int hashCode()
+    {
+        return HASH_MULT * mLowerBound.intValue() + mUpperBound.intValue();
+    }
+
+    @Override
+    public boolean equals(Object aObject)
+    {
+        if (aObject instanceof IntRangeFilter) {
+            final IntRangeFilter other = (IntRangeFilter) aObject;
+            return (this.mLowerBound.equals(other.mLowerBound)
+                && this.mUpperBound.equals(other.mUpperBound));
+        }
+        return false;
+    }
+
+    @Override
+    public String toString()
+    {
+        return "IntRangeFilter[" + mLowerBound + "," + mUpperBound + "]";
+    }
+
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SeverityMatchFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SeverityMatchFilter.java
new file mode 100644
index 0000000..d57e4aa
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SeverityMatchFilter.java
@@ -0,0 +1,73 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.AutomaticBean;
+import com.puppycrawl.tools.checkstyle.api.Filter;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+
+/**
+ * This is a very simple filter based on severity matching.
+ * The filter admits option severity and accepts an AuditEvent
+ * if its severity equals the filter's severity.
+ * @author Rick Giles
+ */
+public class SeverityMatchFilter
+    extends AutomaticBean
+    implements Filter
+{
+    /** the severity level to accept */
+    private SeverityLevel mSeverityLevel = SeverityLevel.ERROR;
+
+    /** whether to accept or reject on severity matches */
+    private boolean mAcceptOnMatch = true;
+
+    /**
+     * Sets the severity level.  The string should be one of the names
+     * defined in the <code>SeverityLevel</code> class.
+     *
+     * @param aSeverity  The new severity level
+     * @see SeverityLevel
+     */
+    public final void setSeverity(String aSeverity)
+    {
+        mSeverityLevel = SeverityLevel.getInstance(aSeverity);
+    }
+
+    /**
+     * Sets whether to accept or reject on matching severity level.
+     * @param aAcceptOnMatch if true, accept on matches; if
+     * false, reject on matches.
+     */
+    public final void setAcceptOnMatch(boolean aAcceptOnMatch)
+    {
+        mAcceptOnMatch = aAcceptOnMatch;
+    }
+
+    /** {@inheritDoc} */
+    public boolean accept(AuditEvent aEvent)
+    {
+        final boolean result = mSeverityLevel.equals(aEvent.getSeverityLevel());
+        if (mAcceptOnMatch) {
+            return result;
+        }
+        return !result;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressElement.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressElement.java
new file mode 100644
index 0000000..30b9966
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressElement.java
@@ -0,0 +1,250 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.Filter;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+/**
+ * This filter processes {@link com.puppycrawl.tools.checkstyle.api.AuditEvent}
+ * objects based on the criteria of file, check, module id, line, and
+ * column. It rejects an AuditEvent if the following match:
+ * <ul>
+ *   <li>the event's file name; and</li>
+ *   <li>the check name or the module identifier; and</li>
+ *   <li>(optionally) the event's line is in the filter's line CSV; and</li>
+ *   <li>(optionally) the check's columns is in the filter's column CSV.</li>
+ * </ul>
+ *
+ * @author Rick Giles
+ */
+public class SuppressElement
+    implements Filter
+{
+    /** hash function multiplicand */
+    private static final int HASH_MULT = 29;
+
+    /** the regexp to match file names against */
+    private final Pattern mFileRegexp;
+
+    /** the pattern for file names*/
+    private final String mFilePattern;
+
+    /** the regexp to match check names against */
+    private Pattern mCheckRegexp;
+
+    /** the pattern for check class names*/
+    private String mCheckPattern;
+
+    /** module id filter. */
+    private String mModuleId;
+
+    /** line number filter */
+    private CSVFilter mLineFilter;
+
+    /** CSV for line number filter */
+    private String mLinesCSV;
+
+    /** column number filter */
+    private CSVFilter mColumnFilter;
+
+    /** CSV for column number filter */
+    private String mColumnsCSV;
+
+    /**
+     * Constructs a <code>SuppressElement</code> for a
+     * file name pattern. Must either call {@link #setColumns(String)} or
+     * {@link #setModuleId(String)} before using this object.
+     * @param aFiles regular expression for names of filtered files.
+     * @throws PatternSyntaxException if there is an error.
+     */
+    public SuppressElement(String aFiles)
+        throws PatternSyntaxException
+    {
+        mFilePattern = aFiles;
+        mFileRegexp = Utils.getPattern(aFiles);
+    }
+
+    /**
+     * Set the check class pattern.
+     * @param aChecks regular expression for filtered check classes.
+     */
+    public void setChecks(final String aChecks)
+    {
+        mCheckPattern = aChecks;
+        mCheckRegexp = Utils.getPattern(aChecks);
+    }
+
+    /**
+     * Set the module id for filtering. Cannot be null.
+     * @param aModuleId the id
+     */
+    public void setModuleId(final String aModuleId)
+    {
+        mModuleId = aModuleId;
+    }
+    /**
+     * Sets the CSV values and ranges for line number filtering.
+     * E.g. "1,7-15,18".
+     * @param aLines CSV values and ranges for line number filtering.
+     */
+    public void setLines(String aLines)
+    {
+        mLinesCSV = aLines;
+        if (aLines != null) {
+            mLineFilter = new CSVFilter(aLines);
+        }
+        else {
+            mLineFilter = null;
+        }
+    }
+
+    /**
+     * Sets the CSV values and ranges for column number filtering.
+     *  E.g. "1,7-15,18".
+     * @param aColumns CSV values and ranges for column number filtering.
+     */
+    public void setColumns(String aColumns)
+    {
+        mColumnsCSV = aColumns;
+        if (aColumns != null) {
+            mColumnFilter = new CSVFilter(aColumns);
+        }
+        else {
+            mColumnFilter = null;
+        }
+    }
+
+    /** {@inheritDoc} */
+    public boolean accept(AuditEvent aEvent)
+    {
+        // file and check match?
+        if ((aEvent.getFileName() == null)
+                || !mFileRegexp.matcher(aEvent.getFileName()).find()
+                || (aEvent.getLocalizedMessage() == null)
+                || ((mModuleId != null) && !mModuleId.equals(aEvent
+                        .getModuleId()))
+                || ((mCheckRegexp != null) && !mCheckRegexp.matcher(
+                        aEvent.getSourceName()).find()))
+        {
+            return true;
+        }
+
+        // reject if no line/column matching
+        if ((mLineFilter == null) && (mColumnFilter == null)) {
+            return false;
+        }
+
+        if (mLineFilter != null && mLineFilter.accept(aEvent.getLine())) {
+            return false;
+        }
+
+        if (mColumnFilter != null && mColumnFilter.accept(aEvent.getColumn())) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public String toString()
+    {
+        return "SuppressElement[files=" + mFilePattern + ",checks="
+            + mCheckPattern + ",lines=" + mLinesCSV + ",columns="
+            + mColumnsCSV + "]";
+    }
+
+    @Override
+    public int hashCode()
+    {
+        int result = HASH_MULT * mFilePattern.hashCode();
+        if (mCheckPattern != null) {
+            result = HASH_MULT * result + mCheckPattern.hashCode();
+        }
+        if (mModuleId != null) {
+            result = HASH_MULT * result + mModuleId.hashCode();
+        }
+        if (mLinesCSV != null) {
+            result = HASH_MULT * result + mLinesCSV.hashCode();
+        }
+        if (mColumnsCSV != null) {
+            result = HASH_MULT * result + mColumnsCSV.hashCode();
+        }
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object aObject)
+    {
+        if (aObject instanceof SuppressElement) {
+            final SuppressElement other = (SuppressElement) aObject;
+
+            // same file pattern?
+            if (!this.mFilePattern.equals(other.mFilePattern)) {
+                return false;
+            }
+
+            // same check pattern?
+            if (mCheckPattern != null) {
+                if (!mCheckPattern.equals(other.mCheckPattern)) {
+                    return false;
+                }
+            }
+            else if (other.mCheckPattern != null) {
+                return false;
+            }
+
+            // same module id?
+            if (mModuleId != null) {
+                if (!mModuleId.equals(other.mModuleId)) {
+                    return false;
+                }
+            }
+            else if (other.mModuleId != null) {
+                return false;
+            }
+
+            // same line number filter?
+            if (mLineFilter != null) {
+                if (!mLineFilter.equals(other.mLineFilter)) {
+                    return false;
+                }
+            }
+            else if (other.mLineFilter != null) {
+                return false;
+            }
+
+            // same column number filter?
+            if (mColumnFilter != null) {
+                if (!mColumnFilter.equals(other.mColumnFilter)) {
+                    return false;
+                }
+            }
+            else if (other.mColumnFilter != null) {
+                return false;
+            }
+
+            // everything is the same
+            return true;
+        }
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWarningsFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWarningsFilter.java
new file mode 100644
index 0000000..ea2d56e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWarningsFilter.java
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.AutomaticBean;
+import com.puppycrawl.tools.checkstyle.api.Filter;
+import com.puppycrawl.tools.checkstyle.checks.SuppressWarningsHolder;
+
+/**
+ * A filter that suppresses warnings using the {@link SuppressWarnings}
+ * annotation.
+ * @author Trevor Robinson
+ */
+public class SuppressWarningsFilter
+    extends AutomaticBean
+    implements Filter
+{
+    /** {@inheritDoc} */
+    public boolean accept(AuditEvent aEvent)
+    {
+        return !SuppressWarningsHolder.isSuppressed(aEvent.getSourceName(),
+            aEvent.getLine(), aEvent.getColumn());
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java
new file mode 100644
index 0000000..cfae9a3
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java
@@ -0,0 +1,518 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.AutomaticBean;
+import com.puppycrawl.tools.checkstyle.api.FileContents;
+import com.puppycrawl.tools.checkstyle.api.Filter;
+import com.puppycrawl.tools.checkstyle.api.TextBlock;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import com.puppycrawl.tools.checkstyle.checks.FileContentsHolder;
+import java.lang.ref.WeakReference;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+import org.apache.commons.beanutils.ConversionException;
+
+/**
+ * <p>
+ * A filter that uses nearby comments to suppress audit events.
+ * </p>
+ * <p>
+ * This check is philosophically similar to {@link SuppressionCommentFilter}.
+ * Unlike {@link SuppressionCommentFilter}, this filter does not require
+ * pairs of comments.  This check may be used to suppress warnings in the
+ * current line:
+ * <pre>
+ *    offendingLine(for, whatever, reason); // SUPPRESS ParameterNumberCheck
+ * </pre>
+ * or it may be configured to span multiple lines, either forward:
+ * <pre>
+ *    // PERMIT MultipleVariableDeclarations NEXT 3 LINES
+ *    double x1 = 1.0, y1 = 0.0, z1 = 0.0;
+ *    double x2 = 0.0, y2 = 1.0, z2 = 0.0;
+ *    double x3 = 0.0, y3 = 0.0, z3 = 1.0;
+ * </pre>
+ * or reverse:
+ * <pre>
+ *   try {
+ *     thirdPartyLibrary.method();
+ *   } catch (RuntimeException e) {
+ *     // ALLOW ILLEGAL CATCH BECAUSE third party API wraps everything
+ *     // in RuntimeExceptions.
+ *     ...
+ *   }
+ * </pre>
+ *
+ * <p>
+ * See {@link SuppressionCommentFilter} for usage notes.
+ *
+ *
+ * @author Mick Killianey
+ */
+public class SuppressWithNearbyCommentFilter
+    extends AutomaticBean
+    implements Filter
+{
+    /**
+     * A Tag holds a suppression comment and its location.
+     */
+    public class Tag implements Comparable<Tag>
+    {
+        /** The text of the tag. */
+        private final String mText;
+
+        /** The first line where warnings may be suppressed. */
+        private int mFirstLine;
+
+        /** The last line where warnings may be suppressed. */
+        private int mLastLine;
+
+        /** The parsed check regexp, expanded for the text of this tag. */
+        private Pattern mTagCheckRegexp;
+
+        /** The parsed message regexp, expanded for the text of this tag. */
+        private Pattern mTagMessageRegexp;
+
+        /**
+         * Constructs a tag.
+         * @param aText the text of the suppression.
+         * @param aLine the line number.
+         * @throws ConversionException if unable to parse expanded aText.
+         * on.
+         */
+        public Tag(String aText, int aLine)
+            throws ConversionException
+        {
+            mText = aText;
+
+            mTagCheckRegexp = mCheckRegexp;
+            //Expand regexp for check and message
+            //Does not intern Patterns with Utils.getPattern()
+            String format = "";
+            try {
+                format = expandFromComment(aText, mCheckFormat, mCommentRegexp);
+                mTagCheckRegexp = Pattern.compile(format);
+                if (mMessageFormat != null) {
+                    format = expandFromComment(
+                         aText, mMessageFormat, mCommentRegexp);
+                    mTagMessageRegexp = Pattern.compile(format);
+                }
+                int influence = 0;
+                if (mInfluenceFormat != null) {
+                    format = expandFromComment(
+                        aText, mInfluenceFormat, mCommentRegexp);
+                    try {
+                        if (format.startsWith("+")) {
+                            format = format.substring(1);
+                        }
+                        influence = Integer.parseInt(format);
+                    }
+                    catch (final NumberFormatException e) {
+                        throw new ConversionException(
+                            "unable to parse influence from '" + aText
+                                + "' using " + mInfluenceFormat, e);
+                    }
+                }
+                if (influence >= 0) {
+                    mFirstLine = aLine;
+                    mLastLine = aLine + influence;
+                }
+                else {
+                    mFirstLine = aLine + influence;
+                    mLastLine = aLine;
+                }
+            }
+            catch (final PatternSyntaxException e) {
+                throw new ConversionException(
+                    "unable to parse expanded comment " + format,
+                    e);
+            }
+        }
+
+        /** @return the text of the tag. */
+        public String getText()
+        {
+            return mText;
+        }
+
+        /** @return the line number of the first suppressed line. */
+        public int getFirstLine()
+        {
+            return mFirstLine;
+        }
+
+        /** @return the line number of the last suppressed line. */
+        public int getLastLine()
+        {
+            return mLastLine;
+        }
+
+        /**
+         * Compares the position of this tag in the file
+         * with the position of another tag.
+         * @param aOther the tag to compare with this one.
+         * @return a negative number if this tag is before the other tag,
+         * 0 if they are at the same position, and a positive number if this
+         * tag is after the other tag.
+         * @see java.lang.Comparable#compareTo(java.lang.Object)
+         */
+        public int compareTo(Tag aOther)
+        {
+            if (mFirstLine == aOther.mFirstLine) {
+                return mLastLine - aOther.mLastLine;
+            }
+
+            return (mFirstLine - aOther.mFirstLine);
+        }
+
+        /**
+         * Determines whether the source of an audit event
+         * matches the text of this tag.
+         * @param aEvent the <code>AuditEvent</code> to check.
+         * @return true if the source of aEvent matches the text of this tag.
+         */
+        public boolean isMatch(AuditEvent aEvent)
+        {
+            final int line = aEvent.getLine();
+            if (line < mFirstLine) {
+                return false;
+            }
+            if (line > mLastLine) {
+                return false;
+            }
+            final Matcher tagMatcher =
+                mTagCheckRegexp.matcher(aEvent.getSourceName());
+            if (tagMatcher.find()) {
+                return true;
+            }
+            if (mTagMessageRegexp != null) {
+                final Matcher messageMatcher =
+                    mTagMessageRegexp.matcher(aEvent.getMessage());
+                return messageMatcher.find();
+            }
+            return false;
+        }
+
+        /**
+         * Expand based on a matching comment.
+         * @param aComment the comment.
+         * @param aString the string to expand.
+         * @param aRegexp the parsed expander.
+         * @return the expanded string
+         */
+        private String expandFromComment(
+            String aComment,
+            String aString,
+            Pattern aRegexp)
+        {
+            final Matcher matcher = aRegexp.matcher(aComment);
+            // Match primarily for effect.
+            if (!matcher.find()) {
+                ///CLOVER:OFF
+                return aString;
+                ///CLOVER:ON
+            }
+            String result = aString;
+            for (int i = 0; i <= matcher.groupCount(); i++) {
+                // $n expands comment match like in Pattern.subst().
+                result = result.replaceAll("\\$" + i, matcher.group(i));
+            }
+            return result;
+        }
+
+        /** {@inheritDoc} */
+        @Override
+        public final String toString()
+        {
+            return "Tag[lines=[" + getFirstLine() + " to " + getLastLine()
+                + "]; text='" + getText() + "']";
+        }
+    }
+
+    /** Format to turns checkstyle reporting off. */
+    private static final String DEFAULT_COMMENT_FORMAT =
+        "SUPPRESS CHECKSTYLE (\\w+)";
+
+    /** Default regex for checks that should be suppressed. */
+    private static final String DEFAULT_CHECK_FORMAT = ".*";
+
+    /** Default regex for messages that should be suppressed. */
+    private static final String DEFAULT_MESSAGE_FORMAT = null;
+
+    /** Default regex for lines that should be suppressed. */
+    private static final String DEFAULT_INFLUENCE_FORMAT = "0";
+
+    /** Whether to look for trigger in C-style comments. */
+    private boolean mCheckC = true;
+
+    /** Whether to look for trigger in C++-style comments. */
+    private boolean mCheckCPP = true;
+
+    /** Parsed comment regexp that marks checkstyle suppression region. */
+    private Pattern mCommentRegexp;
+
+    /** The comment pattern that triggers suppression. */
+    private String mCheckFormat;
+
+    /** The parsed check regexp. */
+    private Pattern mCheckRegexp;
+
+    /** The message format to suppress. */
+    private String mMessageFormat;
+
+    /** The influence of the suppression comment. */
+    private String mInfluenceFormat;
+
+
+    //TODO: Investigate performance improvement with array
+    /** Tagged comments */
+    private final List<Tag> mTags = Lists.newArrayList();
+
+    /**
+     * References the current FileContents for this filter.
+     * Since this is a weak reference to the FileContents, the FileContents
+     * can be reclaimed as soon as the strong references in TreeWalker
+     * and FileContentsHolder are reassigned to the next FileContents,
+     * at which time filtering for the current FileContents is finished.
+     */
+    private WeakReference<FileContents> mFileContentsReference =
+        new WeakReference<FileContents>(null);
+
+    /**
+     * Constructs a SuppressionCommentFilter.
+     * Initializes comment on, comment off, and check formats
+     * to defaults.
+     */
+    public SuppressWithNearbyCommentFilter()
+    {
+        if (DEFAULT_COMMENT_FORMAT != null) {
+            setCommentFormat(DEFAULT_COMMENT_FORMAT);
+        }
+        if (DEFAULT_CHECK_FORMAT != null) {
+            setCheckFormat(DEFAULT_CHECK_FORMAT);
+        }
+        if (DEFAULT_MESSAGE_FORMAT != null) {
+            setMessageFormat(DEFAULT_MESSAGE_FORMAT);
+        }
+        if (DEFAULT_INFLUENCE_FORMAT != null) {
+            setInfluenceFormat(DEFAULT_INFLUENCE_FORMAT);
+        }
+    }
+
+    /**
+     * Set the format for a comment that turns off reporting.
+     * @param aFormat a <code>String</code> value.
+     * @throws ConversionException unable to parse aFormat.
+     */
+    public void setCommentFormat(String aFormat)
+        throws ConversionException
+    {
+        try {
+            mCommentRegexp = Utils.getPattern(aFormat);
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+    }
+
+    /** @return the FileContents for this filter. */
+    public FileContents getFileContents()
+    {
+        return mFileContentsReference.get();
+    }
+
+    /**
+     * Set the FileContents for this filter.
+     * @param aFileContents the FileContents for this filter.
+     */
+    public void setFileContents(FileContents aFileContents)
+    {
+        mFileContentsReference = new WeakReference<FileContents>(aFileContents);
+    }
+
+    /**
+     * Set the format for a check.
+     * @param aFormat a <code>String</code> value
+     * @throws ConversionException unable to parse aFormat
+     */
+    public void setCheckFormat(String aFormat)
+        throws ConversionException
+    {
+        try {
+            mCheckRegexp = Utils.getPattern(aFormat);
+            mCheckFormat = aFormat;
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+    }
+
+    /**
+     * Set the format for a message.
+     * @param aFormat a <code>String</code> value
+     * @throws ConversionException unable to parse aFormat
+     */
+    public void setMessageFormat(String aFormat)
+        throws ConversionException
+    {
+        // check that aFormat parses
+        try {
+            Utils.getPattern(aFormat);
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+        mMessageFormat = aFormat;
+    }
+
+    /**
+     * Set the format for the influence of this check.
+     * @param aFormat a <code>String</code> value
+     * @throws ConversionException unable to parse aFormat
+     */
+    public void setInfluenceFormat(String aFormat)
+        throws ConversionException
+    {
+        // check that aFormat parses
+        try {
+            Utils.getPattern(aFormat);
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+        mInfluenceFormat = aFormat;
+    }
+
+
+    /**
+     * Set whether to look in C++ comments.
+     * @param aCheckCPP <code>true</code> if C++ comments are checked.
+     */
+    public void setCheckCPP(boolean aCheckCPP)
+    {
+        mCheckCPP = aCheckCPP;
+    }
+
+    /**
+     * Set whether to look in C comments.
+     * @param aCheckC <code>true</code> if C comments are checked.
+     */
+    public void setCheckC(boolean aCheckC)
+    {
+        mCheckC = aCheckC;
+    }
+
+    /** {@inheritDoc} */
+    public boolean accept(AuditEvent aEvent)
+    {
+        if (aEvent.getLocalizedMessage() == null) {
+            return true;        // A special event.
+        }
+
+        // Lazy update. If the first event for the current file, update file
+        // contents and tag suppressions
+        final FileContents currentContents = FileContentsHolder.getContents();
+        if (currentContents == null) {
+            // we have no contents, so we can not filter.
+            // TODO: perhaps we should notify user somehow?
+            return true;
+        }
+        if (getFileContents() != currentContents) {
+            setFileContents(currentContents);
+            tagSuppressions();
+        }
+        for (final Iterator<Tag> iter = mTags.iterator(); iter.hasNext();) {
+            final Tag tag = iter.next();
+            if (tag.isMatch(aEvent)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Collects all the suppression tags for all comments into a list and
+     * sorts the list.
+     */
+    private void tagSuppressions()
+    {
+        mTags.clear();
+        final FileContents contents = getFileContents();
+        if (mCheckCPP) {
+            tagSuppressions(contents.getCppComments().values());
+        }
+        if (mCheckC) {
+            final Collection<List<TextBlock>> cComments =
+                contents.getCComments().values();
+            for (final List<TextBlock> element : cComments) {
+                tagSuppressions(element);
+            }
+        }
+        Collections.sort(mTags);
+    }
+
+    /**
+     * Appends the suppressions in a collection of comments to the full
+     * set of suppression tags.
+     * @param aComments the set of comments.
+     */
+    private void tagSuppressions(Collection<TextBlock> aComments)
+    {
+        for (final TextBlock comment : aComments) {
+            final int startLineNo = comment.getStartLineNo();
+            final String[] text = comment.getText();
+            tagCommentLine(text[0], startLineNo);
+            for (int i = 1; i < text.length; i++) {
+                tagCommentLine(text[i], startLineNo + i);
+            }
+        }
+    }
+
+    /**
+     * Tags a string if it matches the format for turning
+     * checkstyle reporting on or the format for turning reporting off.
+     * @param aText the string to tag.
+     * @param aLine the line number of aText.
+     */
+    private void tagCommentLine(String aText, int aLine)
+    {
+        final Matcher matcher = mCommentRegexp.matcher(aText);
+        if (matcher.find()) {
+            addTag(matcher.group(0), aLine);
+        }
+    }
+
+    /**
+     * Adds a comment suppression <code>Tag</code> to the list of all tags.
+     * @param aText the text of the tag.
+     * @param aLine the line number of the tag.
+     */
+    private void addTag(String aText, int aLine)
+    {
+        final Tag tag = new Tag(aText, aLine);
+        mTags.add(tag);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java
new file mode 100644
index 0000000..5967c9c
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java
@@ -0,0 +1,530 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.AutomaticBean;
+import com.puppycrawl.tools.checkstyle.api.FileContents;
+import com.puppycrawl.tools.checkstyle.api.Filter;
+import com.puppycrawl.tools.checkstyle.api.TextBlock;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import com.puppycrawl.tools.checkstyle.checks.FileContentsHolder;
+import java.lang.ref.WeakReference;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+import org.apache.commons.beanutils.ConversionException;
+
+/**
+ * <p>
+ * A filter that uses comments to suppress audit events.
+ * </p>
+ * <p>
+ * Rationale:
+ * Sometimes there are legitimate reasons for violating a check.  When
+ * this is a matter of the code in question and not personal
+ * preference, the best place to override the policy is in the code
+ * itself.  Semi-structured comments can be associated with the check.
+ * This is sometimes superior to a separate suppressions file, which
+ * must be kept up-to-date as the source file is edited.
+ * </p>
+ * <p>
+ * Usage:
+ * This check only works in conjunction with the FileContentsHolder module
+ * since that module makes the suppression comments in the .java
+ * files available <i>sub rosa</i>.
+ * </p>
+ * @see FileContentsHolder
+ * @author Mike McMahon
+ * @author Rick Giles
+ */
+public class SuppressionCommentFilter
+    extends AutomaticBean
+    implements Filter
+{
+    /**
+     * A Tag holds a suppression comment and its location, and determines
+     * whether the supression turns checkstyle reporting on or off.
+     * @author Rick Giles
+     */
+    public class Tag
+        implements Comparable<Tag>
+    {
+        /** The text of the tag. */
+        private final String mText;
+
+        /** The line number of the tag. */
+        private final int mLine;
+
+        /** The column number of the tag. */
+        private final int mColumn;
+
+        /** Determines whether the suppression turns checkstyle reporting on. */
+        private final boolean mOn;
+
+        /** The parsed check regexp, expanded for the text of this tag. */
+        private Pattern mTagCheckRegexp;
+
+        /** The parsed message regexp, expanded for the text of this tag. */
+        private Pattern mTagMessageRegexp;
+
+        /**
+         * Constructs a tag.
+         * @param aLine the line number.
+         * @param aColumn the column number.
+         * @param aText the text of the suppression.
+         * @param aOn <code>true</code> if the tag turns checkstyle reporting.
+         * @throws ConversionException if unable to parse expanded aText.
+         * on.
+         */
+        public Tag(int aLine, int aColumn, String aText, boolean aOn)
+            throws ConversionException
+        {
+            mLine = aLine;
+            mColumn = aColumn;
+            mText = aText;
+            mOn = aOn;
+
+            mTagCheckRegexp = mCheckRegexp;
+            //Expand regexp for check and message
+            //Does not intern Patterns with Utils.getPattern()
+            String format = "";
+            try {
+                if (aOn) {
+                    format =
+                        expandFromComment(aText, mCheckFormat, mOnRegexp);
+                    mTagCheckRegexp = Pattern.compile(format);
+                    if (mMessageFormat != null) {
+                        format =
+                            expandFromComment(aText, mMessageFormat, mOnRegexp);
+                        mTagMessageRegexp = Pattern.compile(format);
+                    }
+                }
+                else {
+                    format =
+                        expandFromComment(aText, mCheckFormat, mOffRegexp);
+                    mTagCheckRegexp = Pattern.compile(format);
+                    if (mMessageFormat != null) {
+                        format =
+                            expandFromComment(
+                                aText,
+                                mMessageFormat,
+                                mOffRegexp);
+                        mTagMessageRegexp = Pattern.compile(format);
+                    }
+                }
+            }
+            catch (final PatternSyntaxException e) {
+                throw new ConversionException(
+                    "unable to parse expanded comment " + format,
+                    e);
+            }
+        }
+
+        /** @return the text of the tag. */
+        public String getText()
+        {
+            return mText;
+        }
+
+        /** @return the line number of the tag in the source file. */
+        public int getLine()
+        {
+            return mLine;
+        }
+
+        /**
+         * Determines the column number of the tag in the source file.
+         * Will be 0 for all lines of multiline comment, except the
+         * first line.
+         * @return the column number of the tag in the source file.
+         */
+        public int getColumn()
+        {
+            return mColumn;
+        }
+
+        /**
+         * Determines whether the suppression turns checkstyle reporting on or
+         * off.
+         * @return <code>true</code>if the suppression turns reporting on.
+         */
+        public boolean isOn()
+        {
+            return mOn;
+        }
+
+        /**
+         * Compares the position of this tag in the file
+         * with the position of another tag.
+         * @param aObject the tag to compare with this one.
+         * @return a negative number if this tag is before the other tag,
+         * 0 if they are at the same position, and a positive number if this
+         * tag is after the other tag.
+         * @see java.lang.Comparable#compareTo(java.lang.Object)
+         */
+        public int compareTo(Tag aObject)
+        {
+            if (mLine == aObject.mLine) {
+                return mColumn - aObject.mColumn;
+            }
+
+            return (mLine - aObject.mLine);
+        }
+
+        /**
+         * Determines whether the source of an audit event
+         * matches the text of this tag.
+         * @param aEvent the <code>AuditEvent</code> to check.
+         * @return true if the source of aEvent matches the text of this tag.
+         */
+        public boolean isMatch(AuditEvent aEvent)
+        {
+            final Matcher tagMatcher =
+                mTagCheckRegexp.matcher(aEvent.getSourceName());
+            if (tagMatcher.find()) {
+                if (mTagMessageRegexp != null) {
+                    final Matcher messageMatcher =
+                            mTagMessageRegexp.matcher(aEvent.getMessage());
+                    return messageMatcher.find();
+                }
+                return true;
+            }
+            return false;
+        }
+
+        /**
+         * Expand based on a matching comment.
+         * @param aComment the comment.
+         * @param aString the string to expand.
+         * @param aRegexp the parsed expander.
+         * @return the expanded string
+         */
+        private String expandFromComment(
+            String aComment,
+            String aString,
+            Pattern aRegexp)
+        {
+            final Matcher matcher = aRegexp.matcher(aComment);
+            // Match primarily for effect.
+            if (!matcher.find()) {
+                ///CLOVER:OFF
+                return aString;
+                ///CLOVER:ON
+            }
+            String result = aString;
+            for (int i = 0; i <= matcher.groupCount(); i++) {
+                // $n expands comment match like in Pattern.subst().
+                result = result.replaceAll("\\$" + i, matcher.group(i));
+            }
+            return result;
+        }
+
+        @Override
+        public final String toString()
+        {
+            return "Tag[line=" + getLine() + "; col=" + getColumn()
+                + "; on=" + isOn() + "; text='" + getText() + "']";
+        }
+    }
+
+    /** Turns checkstyle reporting off. */
+    private static final String DEFAULT_OFF_FORMAT = "CHECKSTYLE\\:OFF";
+
+    /** Turns checkstyle reporting on. */
+    private static final String DEFAULT_ON_FORMAT = "CHECKSTYLE\\:ON";
+
+    /** Control all checks */
+    private static final String DEFAULT_CHECK_FORMAT = ".*";
+
+    /** Whether to look in comments of the C type. */
+    private boolean mCheckC = true;
+
+    /** Whether to look in comments of the C++ type. */
+    private boolean mCheckCPP = true;
+
+    /** Parsed comment regexp that turns checkstyle reporting off. */
+    private Pattern mOffRegexp;
+
+    /** Parsed comment regexp that turns checkstyle reporting on. */
+    private Pattern mOnRegexp;
+
+    /** The check format to suppress. */
+    private String mCheckFormat;
+
+    /** The parsed check regexp. */
+    private Pattern mCheckRegexp;
+
+    /** The message format to suppress. */
+    private String mMessageFormat;
+
+    //TODO: Investigate performance improvement with array
+    /** Tagged comments */
+    private final List<Tag> mTags = Lists.newArrayList();
+
+    /**
+     * References the current FileContents for this filter.
+     * Since this is a weak reference to the FileContents, the FileContents
+     * can be reclaimed as soon as the strong references in TreeWalker
+     * and FileContentsHolder are reassigned to the next FileContents,
+     * at which time filtering for the current FileContents is finished.
+     */
+    private WeakReference<FileContents> mFileContentsReference =
+        new WeakReference<FileContents>(null);
+
+    /**
+     * Constructs a SuppressionCommentFilter.
+     * Initializes comment on, comment off, and check formats
+     * to defaults.
+     */
+    public SuppressionCommentFilter()
+    {
+        setOnCommentFormat(DEFAULT_ON_FORMAT);
+        setOffCommentFormat(DEFAULT_OFF_FORMAT);
+        setCheckFormat(DEFAULT_CHECK_FORMAT);
+    }
+
+    /**
+     * Set the format for a comment that turns off reporting.
+     * @param aFormat a <code>String</code> value.
+     * @throws ConversionException unable to parse aFormat.
+     */
+    public void setOffCommentFormat(String aFormat)
+        throws ConversionException
+    {
+        try {
+            mOffRegexp = Utils.getPattern(aFormat);
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+    }
+
+    /**
+     * Set the format for a comment that turns on reporting.
+     * @param aFormat a <code>String</code> value
+     * @throws ConversionException unable to parse aFormat
+     */
+    public void setOnCommentFormat(String aFormat)
+        throws ConversionException
+    {
+        try {
+            mOnRegexp = Utils.getPattern(aFormat);
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+    }
+
+    /** @return the FileContents for this filter. */
+    public FileContents getFileContents()
+    {
+        return mFileContentsReference.get();
+    }
+
+    /**
+     * Set the FileContents for this filter.
+     * @param aFileContents the FileContents for this filter.
+     */
+    public void setFileContents(FileContents aFileContents)
+    {
+        mFileContentsReference = new WeakReference<FileContents>(aFileContents);
+    }
+
+    /**
+     * Set the format for a check.
+     * @param aFormat a <code>String</code> value
+     * @throws ConversionException unable to parse aFormat
+     */
+    public void setCheckFormat(String aFormat)
+        throws ConversionException
+    {
+        try {
+            mCheckRegexp = Utils.getPattern(aFormat);
+            mCheckFormat = aFormat;
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+    }
+
+    /**
+     * Set the format for a message.
+     * @param aFormat a <code>String</code> value
+     * @throws ConversionException unable to parse aFormat
+     */
+    public void setMessageFormat(String aFormat)
+        throws ConversionException
+    {
+        // check that aFormat parses
+        try {
+            Utils.getPattern(aFormat);
+        }
+        catch (final PatternSyntaxException e) {
+            throw new ConversionException("unable to parse " + aFormat, e);
+        }
+        mMessageFormat = aFormat;
+    }
+
+
+    /**
+     * Set whether to look in C++ comments.
+     * @param aCheckCPP <code>true</code> if C++ comments are checked.
+     */
+    public void setCheckCPP(boolean aCheckCPP)
+    {
+        mCheckCPP = aCheckCPP;
+    }
+
+    /**
+     * Set whether to look in C comments.
+     * @param aCheckC <code>true</code> if C comments are checked.
+     */
+    public void setCheckC(boolean aCheckC)
+    {
+        mCheckC = aCheckC;
+    }
+
+    /** {@inheritDoc} */
+    public boolean accept(AuditEvent aEvent)
+    {
+        if (aEvent.getLocalizedMessage() == null) {
+            return true;        // A special event.
+        }
+
+        // Lazy update. If the first event for the current file, update file
+        // contents and tag suppressions
+        final FileContents currentContents = FileContentsHolder.getContents();
+        if (currentContents == null) {
+            // we have no contents, so we can not filter.
+            // TODO: perhaps we should notify user somehow?
+            return true;
+        }
+        if (getFileContents() != currentContents) {
+            setFileContents(currentContents);
+            tagSuppressions();
+        }
+        final Tag matchTag = findNearestMatch(aEvent);
+        if ((matchTag != null) && !matchTag.isOn()) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Finds the nearest comment text tag that matches an audit event.
+     * The nearest tag is before the line and column of the event.
+     * @param aEvent the <code>AuditEvent</code> to match.
+     * @return The <code>Tag</code> nearest aEvent.
+     */
+    private Tag findNearestMatch(AuditEvent aEvent)
+    {
+        Tag result = null;
+        // TODO: try binary search if sequential search becomes a performance
+        // problem.
+        for (Tag tag : mTags) {
+            if ((tag.getLine() > aEvent.getLine())
+                || ((tag.getLine() == aEvent.getLine())
+                    && (tag.getColumn() > aEvent.getColumn())))
+            {
+                break;
+            }
+            if (tag.isMatch(aEvent)) {
+                result = tag;
+            }
+        };
+        return result;
+    }
+
+    /**
+     * Collects all the suppression tags for all comments into a list and
+     * sorts the list.
+     */
+    private void tagSuppressions()
+    {
+        mTags.clear();
+        final FileContents contents = getFileContents();
+        if (mCheckCPP) {
+            tagSuppressions(contents.getCppComments().values());
+        }
+        if (mCheckC) {
+            final Collection<List<TextBlock>> cComments = contents
+                    .getCComments().values();
+            for (List<TextBlock> element : cComments) {
+                tagSuppressions(element);
+            }
+        }
+        Collections.sort(mTags);
+    }
+
+    /**
+     * Appends the suppressions in a collection of comments to the full
+     * set of suppression tags.
+     * @param aComments the set of comments.
+     */
+    private void tagSuppressions(Collection<TextBlock> aComments)
+    {
+        for (TextBlock comment : aComments) {
+            final int startLineNo = comment.getStartLineNo();
+            final String[] text = comment.getText();
+            tagCommentLine(text[0], startLineNo, comment.getStartColNo());
+            for (int i = 1; i < text.length; i++) {
+                tagCommentLine(text[i], startLineNo + i, 0);
+            }
+        }
+    }
+
+    /**
+     * Tags a string if it matches the format for turning
+     * checkstyle reporting on or the format for turning reporting off.
+     * @param aText the string to tag.
+     * @param aLine the line number of aText.
+     * @param aColumn the column number of aText.
+     */
+    private void tagCommentLine(String aText, int aLine, int aColumn)
+    {
+        final Matcher offMatcher = mOffRegexp.matcher(aText);
+        if (offMatcher.find()) {
+            addTag(offMatcher.group(0), aLine, aColumn, false);
+        }
+        else {
+            final Matcher onMatcher = mOnRegexp.matcher(aText);
+            if (onMatcher.find()) {
+                addTag(onMatcher.group(0), aLine, aColumn, true);
+            }
+        }
+    }
+
+    /**
+     * Adds a <code>Tag</code> to the list of all tags.
+     * @param aText the text of the tag.
+     * @param aLine the line number of the tag.
+     * @param aColumn the column number of the tag.
+     * @param aOn <code>true</code> if the tag turns checkstyle reporting on.
+     */
+    private void addTag(String aText, int aLine, int aColumn, boolean aOn)
+    {
+        final Tag tag = new Tag(aLine, aColumn, aText, aOn);
+        mTags.add(tag);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionFilter.java
new file mode 100644
index 0000000..479017e
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionFilter.java
@@ -0,0 +1,79 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.AutomaticBean;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.Filter;
+import com.puppycrawl.tools.checkstyle.api.FilterSet;
+
+/**
+ * <p>
+ * This filter accepts AuditEvents according to file, check, line, and
+ * column, as specified in a suppression file.
+ * </p>
+ * @author Rick Giles
+ */
+public class SuppressionFilter
+    extends AutomaticBean
+    implements Filter
+{
+    /** set of individual suppresses */
+    private FilterSet mFilters = new FilterSet();
+
+    /**
+     * Loads the suppressions for a file.
+     * @param aFileName name of the suppressions file.
+     * @throws CheckstyleException if there is an error.
+     */
+    public void setFile(String aFileName)
+        throws CheckstyleException
+    {
+        mFilters = SuppressionsLoader.loadSuppressions(aFileName);
+    }
+
+    /** {@inheritDoc} */
+    public boolean accept(AuditEvent aEvent)
+    {
+        return mFilters.accept(aEvent);
+    }
+
+    @Override
+    public String toString()
+    {
+        return mFilters.toString();
+    }
+
+    @Override
+    public int hashCode()
+    {
+        return mFilters.hashCode();
+    }
+
+    @Override
+    public boolean equals(Object aObject)
+    {
+        if (aObject instanceof SuppressionFilter) {
+            final SuppressionFilter other = (SuppressionFilter) aObject;
+            return this.mFilters.equals(other.mFilters);
+        }
+        return false;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionsLoader.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionsLoader.java
new file mode 100644
index 0000000..f2cd2aa
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionsLoader.java
@@ -0,0 +1,229 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Map;
+import java.util.regex.PatternSyntaxException;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import com.google.common.collect.Maps;
+import com.puppycrawl.tools.checkstyle.api.AbstractLoader;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.FilterSet;
+
+/**
+ * Loads a filter chain of suppressions.
+ * @author Rick Giles
+ */
+public final class SuppressionsLoader
+    extends AbstractLoader
+{
+    /** the public ID for the configuration dtd */
+    private static final String DTD_PUBLIC_ID_1_0 =
+        "-//Puppy Crawl//DTD Suppressions 1.0//EN";
+    /** the resource for the configuration dtd */
+    private static final String DTD_RESOURCE_NAME_1_0 =
+        "com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd";
+    /** the public ID for the configuration dtd */
+    private static final String DTD_PUBLIC_ID_1_1 =
+        "-//Puppy Crawl//DTD Suppressions 1.1//EN";
+    /** the resource for the configuration dtd */
+    private static final String DTD_RESOURCE_NAME_1_1 =
+        "com/puppycrawl/tools/checkstyle/suppressions_1_1.dtd";
+
+    /**
+     * the filter chain to return in getAFilterChain(),
+     * configured during parsing
+     */
+    private final FilterSet mFilterChain = new FilterSet();
+
+    /**
+     * Creates a new <code>SuppressionsLoader</code> instance.
+     * @throws ParserConfigurationException if an error occurs
+     * @throws SAXException if an error occurs
+     */
+    private SuppressionsLoader()
+        throws ParserConfigurationException, SAXException
+    {
+        super(createIdToResourceNameMap());
+    }
+
+    /**
+     * Returns the loaded filter chain.
+     * @return the loaded filter chain.
+     */
+    public FilterSet getFilterChain()
+    {
+        return mFilterChain;
+    }
+
+    @Override
+    public void startElement(String aNamespaceURI,
+                             String aLocalName,
+                             String aQName,
+                             Attributes aAtts)
+        throws SAXException
+    {
+        if ("suppress".equals(aQName)) {
+            //add SuppressElement filter to the filter chain
+            final String files = aAtts.getValue("files");
+            if (files == null) {
+                throw new SAXException("missing files attribute");
+            }
+            final String checks = aAtts.getValue("checks");
+            final String modId = aAtts.getValue("id");
+            if ((checks == null) && (modId == null)) {
+                throw new SAXException("missing checks and id attribute");
+            }
+            final SuppressElement suppress;
+            try {
+                suppress = new SuppressElement(files);
+                if (modId != null) {
+                    suppress.setModuleId(modId);
+                }
+                if (checks != null) {
+                    suppress.setChecks(checks);
+                }
+            }
+            catch (final PatternSyntaxException e) {
+                throw new SAXException("invalid files or checks format");
+            }
+            final String lines = aAtts.getValue("lines");
+            if (lines != null) {
+                suppress.setLines(lines);
+            }
+            final String columns = aAtts.getValue("columns");
+            if (columns != null) {
+                suppress.setColumns(columns);
+            }
+            mFilterChain.addFilter(suppress);
+        }
+    }
+
+    /**
+     * Returns the suppression filters in a specified file.
+     * @param aFilename name of the suppresssions file.
+     * @return the filter chain of suppression elements specified in the file.
+     * @throws CheckstyleException if an error occurs.
+     */
+    public static FilterSet loadSuppressions(String aFilename)
+        throws CheckstyleException
+    {
+        try {
+            // figure out if this is a File or a URL
+            URI uri;
+            try {
+                final URL url = new URL(aFilename);
+                uri = url.toURI();
+            }
+            catch (final MalformedURLException ex) {
+                uri = null;
+            }
+            catch (final URISyntaxException ex) {
+                // URL violating RFC 2396
+                uri = null;
+            }
+            if (uri == null) {
+                final File file = new File(aFilename);
+                if (file.exists()) {
+                    uri = file.toURI();
+                }
+                else {
+                    // check to see if the file is in the classpath
+                    try {
+                        final URL configUrl = SuppressionsLoader.class
+                                .getResource(aFilename);
+                        if (configUrl == null) {
+                            throw new FileNotFoundException(aFilename);
+                        }
+                        uri = configUrl.toURI();
+                    }
+                    catch (final URISyntaxException e) {
+                        throw new FileNotFoundException(aFilename);
+                    }
+                }
+            }
+            final InputSource source = new InputSource(uri.toString());
+            return loadSuppressions(source, aFilename);
+        }
+        catch (final FileNotFoundException e) {
+            throw new CheckstyleException("unable to find " + aFilename, e);
+        }
+    }
+
+    /**
+     * Returns the suppression filters in a specified source.
+     * @param aSource the source for the suppressions.
+     * @param aSourceName the name of the source.
+     * @return the filter chain of suppression elements in aSource.
+     * @throws CheckstyleException if an error occurs.
+     */
+    private static FilterSet loadSuppressions(
+            InputSource aSource, String aSourceName)
+        throws CheckstyleException
+    {
+        try {
+            final SuppressionsLoader suppressionsLoader =
+                new SuppressionsLoader();
+            suppressionsLoader.parseInputSource(aSource);
+            return suppressionsLoader.getFilterChain();
+        }
+        catch (final FileNotFoundException e) {
+            throw new CheckstyleException("unable to find " + aSourceName, e);
+        }
+        catch (final ParserConfigurationException e) {
+            throw new CheckstyleException("unable to parse " + aSourceName, e);
+        }
+        catch (final SAXException e) {
+            throw new CheckstyleException("unable to parse "
+                    + aSourceName + " - " + e.getMessage(), e);
+        }
+        catch (final IOException e) {
+            throw new CheckstyleException("unable to read " + aSourceName, e);
+        }
+        catch (final NumberFormatException e) {
+            throw new CheckstyleException("number format exception "
+                + aSourceName + " - " + e.getMessage(), e);
+        }
+    }
+
+    /**
+     * Creates mapping between local resources and dtd ids.
+     * @return map between local resources and dtd ids.
+     */
+    private static Map<String, String> createIdToResourceNameMap()
+    {
+        final Map<String, String> map = Maps.newHashMap();
+        map.put(DTD_PUBLIC_ID_1_0, DTD_RESOURCE_NAME_1_0);
+        map.put(DTD_PUBLIC_ID_1_1, DTD_RESOURCE_NAME_1_1);
+        return map;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/package-info.java
new file mode 100644
index 0000000..af64fbc
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/package-info.java
@@ -0,0 +1,23 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the filters that are bundled with the main distribution.
+ */
+package com.puppycrawl.tools.checkstyle.filters;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/grammars/CommentListener.java b/src/main/java/com/puppycrawl/tools/checkstyle/grammars/CommentListener.java
new file mode 100644
index 0000000..d2a79e1
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/grammars/CommentListener.java
@@ -0,0 +1,57 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.grammars;
+
+/**
+ * This interface is used to be notified by parser about comments
+ * in the parsed code.
+ *
+ * @author o_sukhodolsky
+ */
+public interface CommentListener
+{
+    /**
+     * Report the location of a single line comment that extends from the
+     * given point to the end of the line. The type of comment is identified
+     * by a String whose value depends on the language being parsed, but would
+     * typically be the delimiter for the comment.
+     *
+     * @param aType an identifier for what type of comment it is.
+     * @param aStartLineNo the starting line number
+     * @param aStartColNo the starting column number
+     */
+    void reportSingleLineComment(String aType,
+                                 int aStartLineNo, int aStartColNo);
+
+    /**
+     * Report the location of a block comment that can span multiple lines.
+     * The type of comment is identified by a String whose value depends on
+     * the language being parsed, but would typically be the delimiter for the
+     * comment.
+     *
+     * @param aType an identifier for what type of comment it is.
+     * @param aStartLineNo the starting line number
+     * @param aStartColNo the starting column number
+     * @param aEndLineNo the ending line number
+     * @param aEndColNo the ending column number
+     */
+    void reportBlockComment(String aType,
+                            int aStartLineNo, int aStartColNo,
+                            int aEndLineNo, int aEndColNo);
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/grammars/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/grammars/package-info.java
new file mode 100644
index 0000000..9e4bb05
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/grammars/package-info.java
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the grammar used by the Checkstyle framework.
+ * <p>
+ * You should <strong>not be</strong> referring to this package.
+ * </p>
+ */
+package com.puppycrawl.tools.checkstyle.grammars;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/gui/AbstractCellEditor.java b/src/main/java/com/puppycrawl/tools/checkstyle/gui/AbstractCellEditor.java
new file mode 100644
index 0000000..f6ec9e7
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/gui/AbstractCellEditor.java
@@ -0,0 +1,158 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2002  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/*
+ * %W% %E%
+ *
+ * Copyright 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ * 
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer. 
+ *   
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution. 
+ *   
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.  
+ * 
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE 
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,   
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER  
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF 
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS 
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ * 
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+
+package com.puppycrawl.tools.checkstyle.gui;
+
+import java.util.EventObject;
+import javax.swing.CellEditor;
+import javax.swing.event.CellEditorListener;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.EventListenerList;
+
+/** 
+ * A base class for CellEditors, providing default implementations for all 
+ * methods in the CellEditor interface and support for managing a series 
+ * of listeners.
+ *
+ * <a href="http://java.sun.com/products/jfc/tsc/articles/treetable1/index.html">Original Source Location</a>
+ * 
+ * @author Philip Milne
+ */
+public class AbstractCellEditor implements CellEditor
+{
+    private final EventListenerList mListenerList = new EventListenerList();
+
+    /** @see CellEditor */
+    public Object getCellEditorValue()
+    {
+        return null;
+    }
+
+    /** @see CellEditor */
+    public boolean isCellEditable(EventObject e)
+    {
+        return true;
+    }
+
+    /** @see CellEditor */
+    public boolean shouldSelectCell(EventObject anEvent)
+    {
+        return false;
+    }
+
+    /** @see CellEditor */
+    public boolean stopCellEditing()
+    {
+        return true;
+    }
+
+    /** @see CellEditor */
+    public void cancelCellEditing()
+    {
+    }
+
+    /** @see CellEditor */
+    public void addCellEditorListener(CellEditorListener l)
+    {
+        mListenerList.add(CellEditorListener.class, l);
+    }
+
+    /** @see CellEditor */
+    public void removeCellEditorListener(CellEditorListener l)
+    {
+        mListenerList.remove(CellEditorListener.class, l);
+    }
+
+    /*
+     * Notify all listeners that have registered interest for
+     * notification on this event type.
+     * @see EventListenerList
+     */
+    protected void fireEditingStopped()
+    {
+        // Guaranteed to return a non-null array
+        final Object[] listeners = mListenerList.getListenerList();
+        // Process the listeners last to first, notifying
+        // those that are interested in this event
+        for (int i = listeners.length - 2; i >= 0; i -= 2) {
+            if (listeners[i] == CellEditorListener.class) {
+                ((CellEditorListener) listeners[i + 1]).editingStopped(new ChangeEvent(this));
+            }
+        }
+    }
+
+    /*
+     * Notify all listeners that have registered interest for
+     * notification on this event type.
+     * @see EventListenerList
+     */
+    protected void fireEditingCanceled()
+    {
+        // Guaranteed to return a non-null array
+        final Object[] listeners = mListenerList.getListenerList();
+        // Process the listeners last to first, notifying
+        // those that are interested in this event
+        for (int i = listeners.length - 2; i >= 0; i -= 2) {
+            if (listeners[i] == CellEditorListener.class) {
+                ((CellEditorListener) listeners[i + 1]).editingCanceled(new ChangeEvent(this));
+            }
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/gui/AbstractTreeTableModel.java b/src/main/java/com/puppycrawl/tools/checkstyle/gui/AbstractTreeTableModel.java
new file mode 100644
index 0000000..da044ae
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/gui/AbstractTreeTableModel.java
@@ -0,0 +1,268 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2002  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/*
+ * %W% %E%
+ *
+ * Copyright 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package com.puppycrawl.tools.checkstyle.gui;
+
+import javax.swing.event.EventListenerList;
+import javax.swing.event.TreeModelEvent;
+import javax.swing.event.TreeModelListener;
+import javax.swing.tree.TreePath;
+
+/**
+ * An abstract implementation of the TreeTableModel interface, handling
+ * the list of listeners.
+ *
+ * <a href="http://java.sun.com/products/jfc/tsc/articles/treetable1/index.html">Original Source Location</a>
+ *
+ * @author Philip Milne
+ */
+public abstract class AbstractTreeTableModel implements TreeTableModel
+{
+    private final Object mRoot;
+    private final EventListenerList mListenerList = new EventListenerList();
+
+    public AbstractTreeTableModel(Object root)
+    {
+        mRoot = root;
+    }
+
+    //
+    // Default implmentations for methods in the TreeModel interface.
+    //
+
+    public Object getRoot()
+    {
+        return mRoot;
+    }
+
+    public boolean isLeaf(Object node)
+    {
+        return getChildCount(node) == 0;
+    }
+
+    public void valueForPathChanged(TreePath path, Object newValue)
+    {
+    }
+
+    // This is not called in the JTree's default mode: use a naive implementation.
+    public int getIndexOfChild(Object parent, Object child)
+    {
+        for (int i = 0; i < getChildCount(parent); i++) {
+            if (getChild(parent, i).equals(child)) {
+                return i;
+            }
+        }
+        return -1;
+    }
+
+    public void addTreeModelListener(TreeModelListener l)
+    {
+        mListenerList.add(TreeModelListener.class, l);
+    }
+
+    public void removeTreeModelListener(TreeModelListener l)
+    {
+        mListenerList.remove(TreeModelListener.class, l);
+    }
+
+    /*
+     * Notify all listeners that have registered interest for
+     * notification on this event type.  The event instance
+     * is lazily created using the parameters passed into
+     * the fire method.
+     * @see EventListenerList
+     */
+    protected void fireTreeNodesChanged(Object source, Object[] path,
+            int[] childIndices,
+            Object[] children)
+    {
+        // Guaranteed to return a non-null array
+        final Object[] listeners = mListenerList.getListenerList();
+        TreeModelEvent e = null;
+        // Process the listeners last to first, notifying
+        // those that are interested in this event
+        for (int i = listeners.length - 2; i >= 0; i -= 2) {
+            if (listeners[i] == TreeModelListener.class) {
+                // Lazily create the event:
+                if (e == null) {
+                    e = new TreeModelEvent(source, path,
+                            childIndices, children);
+                }
+                ((TreeModelListener) listeners[i + 1]).treeNodesChanged(e);
+            }
+        }
+    }
+
+    /*
+     * Notify all listeners that have registered interest for
+     * notification on this event type.  The event instance
+     * is lazily created using the parameters passed into
+     * the fire method.
+     * @see EventListenerList
+     */
+    protected void fireTreeNodesInserted(Object source, Object[] path,
+            int[] childIndices,
+            Object[] children)
+    {
+        // Guaranteed to return a non-null array
+        final Object[] listeners = mListenerList.getListenerList();
+        TreeModelEvent e = null;
+        // Process the listeners last to first, notifying
+        // those that are interested in this event
+        for (int i = listeners.length - 2; i >= 0; i -= 2) {
+            if (listeners[i] == TreeModelListener.class) {
+                // Lazily create the event:
+                if (e == null) {
+                    e = new TreeModelEvent(source, path,
+                            childIndices, children);
+                }
+                ((TreeModelListener) listeners[i + 1]).treeNodesInserted(e);
+            }
+        }
+    }
+
+    /*
+     * Notify all listeners that have registered interest for
+     * notification on this event type.  The event instance
+     * is lazily created using the parameters passed into
+     * the fire method.
+     * @see EventListenerList
+     */
+    protected void fireTreeNodesRemoved(Object source, Object[] path,
+            int[] childIndices,
+            Object[] children)
+    {
+        // Guaranteed to return a non-null array
+        final Object[] listeners = mListenerList.getListenerList();
+        TreeModelEvent e = null;
+        // Process the listeners last to first, notifying
+        // those that are interested in this event
+        for (int i = listeners.length - 2; i >= 0; i -= 2) {
+            if (listeners[i] == TreeModelListener.class) {
+                // Lazily create the event:
+                if (e == null) {
+                    e = new TreeModelEvent(source, path,
+                            childIndices, children);
+                }
+                ((TreeModelListener) listeners[i + 1]).treeNodesRemoved(e);
+            }
+        }
+    }
+
+    /*
+     * Notify all listeners that have registered interest for
+     * notification on this event type.  The event instance
+     * is lazily created using the parameters passed into
+     * the fire method.
+     * @see EventListenerList
+     */
+    protected void fireTreeStructureChanged(Object source, Object[] path,
+            int[] childIndices,
+            Object[] children)
+    {
+        // Guaranteed to return a non-null array
+        final Object[] listeners = mListenerList.getListenerList();
+        TreeModelEvent e = null;
+        // Process the listeners last to first, notifying
+        // those that are interested in this event
+        for (int i = listeners.length - 2; i >= 0; i -= 2) {
+            if (listeners[i] == TreeModelListener.class) {
+                // Lazily create the event:
+                if (e == null) {
+                    e = new TreeModelEvent(source, path,
+                            childIndices, children);
+                }
+                ((TreeModelListener) listeners[i + 1]).treeStructureChanged(e);
+            }
+        }
+    }
+
+    //
+    // Default impelmentations for methods in the TreeTableModel interface.
+    //
+
+    public Class<?> getColumnClass(int column)
+    {
+        return Object.class;
+    }
+
+    /** By default, make the column with the Tree in it the only editable one.
+     *  Making this column editable causes the JTable to forward mouse
+     *  and keyboard events in the Tree column to the underlying JTree.
+     */
+    public boolean isCellEditable(Object node, int column)
+    {
+        return getColumnClass(column) == TreeTableModel.class;
+    }
+
+    public void setValueAt(Object aValue, Object node, int column)
+    {
+    }
+
+
+    // Left to be implemented in the subclass:
+
+    /*
+     *   public Object getChild(Object parent, int index)
+     *   public int getChildCount(Object parent)
+     *   public int getColumnCount()
+     *   public String getColumnName(Object node, int column)
+     *   public Object getValueAt(Object node, int column)
+     */
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/gui/CodeSelector.java b/src/main/java/com/puppycrawl/tools/checkstyle/gui/CodeSelector.java
new file mode 100644
index 0000000..c1ed663
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/gui/CodeSelector.java
@@ -0,0 +1,45 @@
+package com.puppycrawl.tools.checkstyle.gui;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import java.awt.Color;
+import java.util.List;
+import javax.swing.JTextArea;
+
+public class CodeSelector
+{
+    private final DetailAST ast;
+    private final JTextArea editor;
+    private final List<Integer> lines2position;
+
+    public CodeSelector(final DetailAST ast, final JTextArea editor,
+                        final List<Integer> lines2position)
+    {
+        this.ast = ast;
+        this.editor = editor;
+        this.lines2position = lines2position;
+    }
+
+    public void select() {
+        int start = lines2position.get(ast.getLineNo()) + ast.getColumnNo();
+        int end = findLastPosition(ast);
+
+        editor.setSelectedTextColor(Color.blue);
+        editor.requestFocusInWindow();
+        editor.setSelectionStart(start);
+        editor.setSelectionEnd(end);
+        editor.transferFocusBackward();
+    }
+
+    private int findLastPosition(final DetailAST ast)
+    {
+        if (ast.getChildCount() == 0)
+        {
+            return lines2position.get(ast.getLineNo()) + ast.getColumnNo()
+                + ast.getText().length();
+        }
+        else
+        {
+            return findLastPosition(ast.getLastChild());
+        }
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/gui/FileDrop.java b/src/main/java/com/puppycrawl/tools/checkstyle/gui/FileDrop.java
new file mode 100644
index 0000000..4c4932f
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/gui/FileDrop.java
@@ -0,0 +1,342 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2002  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.gui;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.awt.dnd.DnDConstants;
+import java.awt.dnd.DropTarget;
+import java.awt.dnd.DropTargetDragEvent;
+import java.awt.dnd.DropTargetDropEvent;
+import java.awt.dnd.DropTargetEvent;
+import java.awt.dnd.DropTargetListener;
+import java.awt.event.HierarchyEvent;
+import java.awt.event.HierarchyListener;
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.TooManyListenersException;
+import javax.swing.BorderFactory;
+import javax.swing.JComponent;
+import javax.swing.border.Border;
+
+/**
+ * This class makes it easy to drag and drop files from the operating
+ * system to a Java program. Any <tt>java.awt.Component</tt> can be
+ * dropped onto, but only <tt>javax.swing.JComponent</tt>s will indicate
+ * the drop event with a changed border.
+ * <p/>
+ * To use this class, construct a new <tt>FileDrop</tt> by passing
+ * it the target component and a <tt>Listener</tt> to receive notification
+ * when file(s) have been dropped. Here is an example:
+ * <p/>
+ * <code><pre>
+ *      JPanel myPanel = new JPanel();
+ *      new FileDrop( myPanel, new FileDrop.Listener()
+ *      {   public void filesDropped( java.io.File[] files )
+ *          {
+ *              // handle file drop
+ *              ...
+ *          }   // end filesDropped
+ *      }); // end FileDrop.Listener
+ * </pre></code>
+ * <p/>
+ * You can specify the border that will appear when files are being dragged by
+ * calling the constructor with a <tt>javax.swing.border.Border</tt>. Only
+ * <tt>JComponent</tt>s will show any indication with a border.
+ * <p/>
+ *
+ * <p>Original author: Robert Harder, rharder at usa.net</p>
+ *
+ * @author  Robert Harder
+ * @author  Lars K?hne
+ */
+class FileDrop
+{
+    // TODO: Not sure that changing borders is a good idea.
+    // At least we should make sure that the border insets are preserved so
+    // that the panel layout does not change during the DnD operation.
+
+    private transient Border normalBorder;
+    private transient final DropTargetListener dropListener;
+
+    // TODO: Blue is not a nice color in all LookAndFeels
+    /* Default border color */
+    private static final Color DEFAULT_BORDER_COLOR =
+            new Color(0f, 0f, 1f, 0.25f);
+
+    /**
+     * Constructs a {@link FileDrop} with a default light-blue border
+     * and, if <var>c</var> is a {@link java.awt.Container}, recursively
+     * sets all elements contained within as drop targets, though only
+     * the top level container will change borders.
+     *
+     * @param c Component on which files will be dropped.
+     * @param listener Listens for <tt>filesDropped</tt>.
+     * @since 1.0
+     */
+    FileDrop(
+            final Component c,
+            final Listener listener)
+            throws TooManyListenersException
+    {
+        this(   c, // Drop target
+                BorderFactory.createMatteBorder(2, 2, 2, 2, DEFAULT_BORDER_COLOR), // Drag border
+                true, // Recursive
+                listener);
+    }
+
+
+    /**
+     * Full constructor with a specified border and debugging optionally turned on.
+     * With Debugging turned on, more status messages will be displayed to
+     * <tt>out</tt>. A common way to use this constructor is with
+     * <tt>System.out</tt> or <tt>System.err</tt>. A <tt>null</tt> value for
+     * the parameter <tt>out</tt> will result in no debugging output.
+     *
+     * @param c Component on which files will be dropped.
+     * @param dragBorder Border to use on <tt>JComponent</tt> when dragging occurs.
+     * @param recursive Recursively set children as drop targets.
+     * @param listener Listens for <tt>filesDropped</tt>.
+     * @since 1.0
+     */
+    FileDrop(
+            final Component c,
+            final Border dragBorder,
+            final boolean recursive,
+            final Listener listener)
+            throws TooManyListenersException
+    {
+        dropListener = new FileDropTargetListener(c, dragBorder, listener);
+        makeDropTarget(c, recursive);
+    }
+
+
+    private void makeDropTarget(final Component c, boolean recursive)
+            throws TooManyListenersException
+    {
+        // Make drop target
+        final DropTarget dt = new DropTarget();
+        dt.addDropTargetListener(dropListener);
+
+        // Listen for hierarchy changes and remove the
+        // drop target when the parent gets cleared out.
+        c.addHierarchyListener(new HierarchyListener()
+        {
+            public void hierarchyChanged(HierarchyEvent evt)
+            {
+                final Component parent = c.getParent();
+                if (parent == null) {
+                    c.setDropTarget(null);
+                }
+                else {
+                    new DropTarget(c, dropListener);
+                }
+            }
+        });
+
+        if (c.getParent() != null) {
+            new DropTarget(c, dropListener);
+        }
+
+        if (recursive && (c instanceof Container)) {
+            final Container cont = (Container) c;
+            final Component[] comps = cont.getComponents();
+            for (Component element : comps)
+                makeDropTarget(element, recursive);
+        }
+    }
+
+
+    /** Determine if the dragged data is a file list. */
+    private boolean isDragOk(final DropTargetDragEvent evt)
+    {
+        boolean ok = false;
+        final DataFlavor[] flavors = evt.getCurrentDataFlavors();
+
+        // See if any of the flavors are a file list
+        int i = 0;
+        while (!ok && (i < flavors.length)) {   // Is the flavor a file list?
+            if (flavors[i].equals(DataFlavor.javaFileListFlavor))
+                ok = true;
+            i++;
+        }
+
+        return ok;
+    }
+
+
+    /**
+     * Removes the drag-and-drop hooks from the component and optionally
+     * from the all children. You should call this if you add and remove
+     * components after you've set up the drag-and-drop.
+     * This will recursively unregister all components contained within
+     * <var>c</var> if <var>c</var> is a {@link Container}.
+     *
+     * @param c The component to unregister as a drop target
+     * @since 1.0
+     */
+    static void remove(Component c)
+    {
+        remove(c, true);
+    }
+
+
+    /**
+     * Removes the drag-and-drop hooks from the component and optionally
+     * from the all children. You should call this if you add and remove
+     * components after you've set up the drag-and-drop.
+     *
+     * @param c The component to unregister
+     * @param recursive Recursively unregister components within a container
+     * @since 1.0
+     */
+    static void remove(Component c, boolean recursive)
+    {
+        c.setDropTarget(null);
+        if (recursive && (c instanceof Container)) {
+            final Component[] comps = ((Container) c).getComponents();
+            for (Component element : comps) {
+                remove(element, recursive);
+            }
+        }
+    }
+
+
+    /**
+     * Implement this inner interface to listen for when files are dropped. For example
+     * your class declaration may begin like this:
+     * <code><pre>
+     *      public class MyClass implements FileDrop.Listener
+     *      ...
+     *      public void filesDropped( File[] files )
+     *      {
+     *          ...
+     *      }   // end filesDropped
+     *      ...
+     * </pre></code>
+     *
+     * @since 1.0
+     */
+    public interface Listener
+    {
+        /**
+         * This method is called when files have been successfully dropped.
+         *
+         * @param files An array of <tt>File</tt>s that were dropped.
+         * @since 1.0
+         */
+        void filesDropped(File[] files);
+    }
+
+    private class FileDropTargetListener implements DropTargetListener
+    {
+        private final Component mC;
+        private final Border mDragBorder;
+        private final Listener mListener;
+
+        public void dragEnter(DropTargetDragEvent evt)
+        {
+            if (isDragOk(evt)) {
+                if (mC instanceof JComponent) {
+                    final JComponent jc = (JComponent) mC;
+                    normalBorder = jc.getBorder();
+                    jc.setBorder(mDragBorder);
+                }
+                evt.acceptDrag(DnDConstants.ACTION_COPY);
+            }
+            else {
+                evt.rejectDrag();
+            }
+        }
+
+        @SuppressWarnings("unchecked")
+        public void drop(DropTargetDropEvent evt)
+        {
+            try {
+                final Transferable tr = evt.getTransferable();
+
+                if (tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
+                    evt.acceptDrop(DnDConstants.ACTION_COPY);
+
+                    final List<File> fileList = (List<File>) tr.getTransferData(
+                            DataFlavor.javaFileListFlavor);
+                    final File[] files = new File[fileList.size()];
+                    fileList.toArray(files);
+
+                    if (mListener != null) {
+                        mListener.filesDropped(files);
+                    }
+
+                    evt.getDropTargetContext().dropComplete(true);
+                }
+                else {
+                    evt.rejectDrop();
+                }
+            }
+            catch (final IOException io) {
+                evt.rejectDrop();
+            }
+            catch (final UnsupportedFlavorException ufe) {
+                evt.rejectDrop();
+            }
+            finally {
+                if (mC instanceof JComponent) {
+                    final JComponent jc = (JComponent) mC;
+                    jc.setBorder(normalBorder);
+                }
+            }
+        }
+
+        public void dragExit(DropTargetEvent evt)
+        {
+            if (mC instanceof JComponent) {
+                final JComponent jc = (JComponent) mC;
+                jc.setBorder(normalBorder);
+            }
+        }
+
+        public void dropActionChanged(DropTargetDragEvent evt)
+        {
+            if (isDragOk(evt)) {
+                evt.acceptDrag(DnDConstants.ACTION_COPY);
+            }
+            else {
+                evt.rejectDrag();
+            }
+        }
+
+        public void dragOver(DropTargetDragEvent dtde)
+        {
+        }
+
+        public FileDropTargetListener(Component aC, Border aDragBorder, Listener aListener)
+        {
+            mC = aC;
+            mDragBorder = aDragBorder;
+            mListener = aListener;
+        }
+    }
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/gui/JTreeTable.java b/src/main/java/com/puppycrawl/tools/checkstyle/gui/JTreeTable.java
new file mode 100644
index 0000000..e68f175
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/gui/JTreeTable.java
@@ -0,0 +1,504 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2002  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/*
+ * %W% %E%
+ *
+ * Copyright 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package com.puppycrawl.tools.checkstyle.gui;
+
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.event.ActionEvent;
+import java.awt.event.MouseEvent;
+import java.util.EventObject;
+import java.util.List;
+
+import javax.swing.Action;
+import javax.swing.AbstractAction;
+import javax.swing.JTable;
+import javax.swing.JTextArea;
+import javax.swing.JTree;
+import javax.swing.KeyStroke;
+import javax.swing.ListSelectionModel;
+import javax.swing.LookAndFeel;
+import javax.swing.UIManager;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import javax.swing.table.TableCellEditor;
+import javax.swing.table.TableCellRenderer;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.DefaultTreeSelectionModel;
+import javax.swing.tree.TreeCellRenderer;
+import javax.swing.tree.TreeModel;
+import javax.swing.tree.TreePath;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+
+/**
+ * This example shows how to create a simple JTreeTable component,
+ * by using a JTree as a renderer (and editor) for the cells in a
+ * particular column in the JTable.
+ *
+ * <a href="http://java.sun.com/products/jfc/tsc/articles/treetable1/index.html">Original Source Location</a>
+ *
+ * @author Philip Milne
+ * @author Scott Violet
+ * @author Lars K�hne
+ */
+public class JTreeTable extends JTable
+{
+    /** For Serialisation that will never happen. */
+    private static final long serialVersionUID = -8493693409423365387L;
+    /** A subclass of JTree. */
+    protected TreeTableCellRenderer tree;
+    private JTextArea editor;
+    private List<Integer> lines2position;
+
+    public JTreeTable(TreeTableModel treeTableModel)
+    {
+        super();
+
+        // Create the tree. It will be used as a renderer and editor.
+        tree = new TreeTableCellRenderer(treeTableModel);
+
+        // Install a tableModel representing the visible rows in the tree.
+        super.setModel(new TreeTableModelAdapter(treeTableModel, tree));
+
+        // Force the JTable and JTree to share their row selection models.
+        final ListToTreeSelectionModelWrapper selectionWrapper = new
+                ListToTreeSelectionModelWrapper();
+        tree.setSelectionModel(selectionWrapper);
+        setSelectionModel(selectionWrapper.getListSelectionModel());
+
+        // Install the tree editor renderer and editor.
+        setDefaultRenderer(TreeTableModel.class, tree);
+        setDefaultEditor(TreeTableModel.class, new TreeTableCellEditor());
+
+        // No grid.
+        setShowGrid(false);
+
+        // No intercell spacing
+        setIntercellSpacing(new Dimension(0, 0));
+
+        // And update the height of the trees row to match that of
+        // the table.
+        if (tree.getRowHeight() < 1) {
+            // Metal looks better like this.
+            setRowHeight(getRowHeight());
+        }
+
+        final Action expand = new AbstractAction() {
+                /**
+             *
+             */
+            private static final long serialVersionUID = -5859674518660156121L;
+
+                public void actionPerformed(ActionEvent e) {
+                    final TreePath selected = tree.getSelectionPath();
+
+                    DetailAST ast = (DetailAST) selected.getLastPathComponent();
+                    new CodeSelector(ast, editor, lines2position).select();
+
+                    if (tree.isExpanded(selected)) {
+                        tree.collapsePath(selected);
+                    }
+                    else {
+                        tree.expandPath(selected);
+                    }
+                    tree.setSelectionPath(selected);
+                }
+            };
+        final KeyStroke stroke = KeyStroke.getKeyStroke("ENTER");
+        final String command = "expand/collapse";
+        getInputMap().put(stroke, command);
+        getActionMap().put(command, expand);
+    }
+
+    /**
+     * Overridden to message super and forward the method to the tree.
+     * Since the tree is not actually in the component hierarchy it will
+     * never receive this unless we forward it in this manner.
+     */
+    @Override
+    public void updateUI()
+    {
+        super.updateUI();
+        if (tree != null) {
+            tree.updateUI();
+        }
+        // Use the tree's default foreground and background colors in the
+        // table.
+        LookAndFeel.installColorsAndFont(this, "Tree.background",
+                "Tree.foreground", "Tree.font");
+    }
+
+    /* Workaround for BasicTableUI anomaly. Make sure the UI never tries to
+     * paint the editor. The UI currently uses different techniques to
+     * paint the renderers and editors and overriding setBounds() below
+     * is not the right thing to do for an editor. Returning -1 for the
+     * editing row in this case, ensures the editor is never painted.
+     */
+    @Override
+    public int getEditingRow()
+    {
+        final Class<?> editingClass = getColumnClass(editingColumn);
+        return (editingClass == TreeTableModel.class) ? -1 : editingRow;
+    }
+
+    /**
+     * Overridden to pass the new rowHeight to the tree.
+     */
+    @Override
+    public void setRowHeight(int newRowHeight)
+    {
+        super.setRowHeight(newRowHeight);
+        if ((tree != null) && (tree.getRowHeight() != newRowHeight)) {
+            tree.setRowHeight(getRowHeight());
+        }
+    }
+
+    /**
+     * @return the tree that is being shared between the model.
+     */
+    public JTree getTree()
+    {
+        return tree;
+    }
+
+    /**
+     * A TreeCellRenderer that displays a JTree.
+     */
+    class TreeTableCellRenderer extends JTree implements
+            TableCellRenderer
+    {
+        /**
+         *
+         */
+        private static final long serialVersionUID = 4324031590789321581L;
+        /** Last table/tree row asked to renderer. */
+        protected int visibleRow;
+
+        /** creates a new instance */
+        public TreeTableCellRenderer(TreeModel model)
+        {
+            super(model);
+        }
+
+        /**
+         * updateUI is overridden to set the colors of the Tree's renderer
+         * to match that of the table.
+         */
+        @Override
+        public void updateUI()
+        {
+            super.updateUI();
+            // Make the tree's cell renderer use the table's cell selection
+            // colors.
+            final TreeCellRenderer tcr = getCellRenderer();
+            if (tcr instanceof DefaultTreeCellRenderer) {
+                final DefaultTreeCellRenderer dtcr = ((DefaultTreeCellRenderer) tcr);
+                // For 1.1 uncomment this, 1.2 has a bug that will cause an
+                // exception to be thrown if the border selection color is
+                // null.
+                // dtcr.setBorderSelectionColor(null);
+                dtcr.setTextSelectionColor(UIManager.getColor
+                        ("Table.selectionForeground"));
+                dtcr.setBackgroundSelectionColor(UIManager.getColor
+                        ("Table.selectionBackground"));
+            }
+        }
+
+        /**
+         * Sets the row height of the tree, and forwards the row height to
+         * the table.
+         */
+        @Override
+        public void setRowHeight(int newRowHeight)
+        {
+            if (newRowHeight > 0) {
+                super.setRowHeight(newRowHeight);
+                if ((JTreeTable.this != null) &&
+                    (JTreeTable.this.getRowHeight() != newRowHeight))
+                {
+                    JTreeTable.this.setRowHeight(getRowHeight());
+                }
+            }
+        }
+
+        /**
+         * This is overridden to set the height to match that of the JTable.
+         */
+        @Override
+        public void setBounds(int x, int y, int w, int h)
+        {
+            super.setBounds(x, 0, w, JTreeTable.this.getHeight());
+        }
+
+        /**
+         * Sublcassed to translate the graphics such that the last visible
+         * row will be drawn at 0,0.
+         */
+        @Override
+        public void paint(Graphics g)
+        {
+            g.translate(0, -visibleRow * getRowHeight());
+            super.paint(g);
+        }
+
+        /**
+         * TreeCellRenderer method. Overridden to update the visible row.
+         * @see TableCellRenderer
+         */
+        public Component getTableCellRendererComponent(JTable table,
+                Object value,
+                boolean isSelected,
+                boolean hasFocus,
+                int row, int column)
+        {
+            if (isSelected) {
+                setBackground(table.getSelectionBackground());
+            } else {
+                setBackground(table.getBackground());
+            }
+
+            visibleRow = row;
+            return this;
+        }
+    }
+
+
+    /**
+     * TreeTableCellEditor implementation. Component returned is the
+     * JTree.
+     */
+    public class TreeTableCellEditor extends AbstractCellEditor implements
+            TableCellEditor
+    {
+        public Component getTableCellEditorComponent(JTable table,
+                Object value,
+                boolean isSelected,
+                int r, int c)
+        {
+            return tree;
+        }
+
+        /**
+         * Overridden to return false, and if the event is a mouse event
+         * it is forwarded to the tree.<p>
+         * The behavior for this is debatable, and should really be offered
+         * as a property. By returning false, all keyboard actions are
+         * implemented in terms of the table. By returning true, the
+         * tree would get a chance to do something with the keyboard
+         * events. For the most part this is ok. But for certain keys,
+         * such as left/right, the tree will expand/collapse where as
+         * the table focus should really move to a different column. Page
+         * up/down should also be implemented in terms of the table.
+         * By returning false this also has the added benefit that clicking
+         * outside of the bounds of the tree node, but still in the tree
+         * column will select the row, whereas if this returned true
+         * that wouldn't be the case.
+         * <p>By returning false we are also enforcing the policy that
+         * the tree will never be editable (at least by a key sequence).
+         *
+         * @see TableCellEditor
+         */
+        @Override
+        public boolean isCellEditable(EventObject e)
+        {
+            if (e instanceof MouseEvent) {
+                for (int counter = getColumnCount() - 1; counter >= 0;
+                     counter--) {
+                    if (getColumnClass(counter) == TreeTableModel.class) {
+                        final MouseEvent me = (MouseEvent) e;
+                        final MouseEvent newME = new MouseEvent(tree, me.getID(),
+                                me.getWhen(), me.getModifiers(),
+                                me.getX() - getCellRect(0, counter, true).x,
+                                me.getY(), me.getClickCount(),
+                                me.isPopupTrigger());
+                        tree.dispatchEvent(newME);
+                        break;
+                    }
+                }
+            }
+
+            return false;
+        }
+    }
+
+
+    /**
+     * ListToTreeSelectionModelWrapper extends DefaultTreeSelectionModel
+     * to listen for changes in the ListSelectionModel it maintains. Once
+     * a change in the ListSelectionModel happens, the paths are updated
+     * in the DefaultTreeSelectionModel.
+     */
+    class ListToTreeSelectionModelWrapper extends DefaultTreeSelectionModel
+    {
+        /**
+         *
+         */
+        private static final long serialVersionUID = 2267930983939339510L;
+        /** Set to true when we are updating the ListSelectionModel. */
+        protected boolean updatingListSelectionModel;
+
+        public ListToTreeSelectionModelWrapper()
+        {
+            super();
+            getListSelectionModel().addListSelectionListener
+                    (createListSelectionListener());
+        }
+
+        /**
+         * Returns the list selection model. ListToTreeSelectionModelWrapper
+         * listens for changes to this model and updates the selected paths
+         * accordingly.
+         *
+         * @return the list selection model
+         */
+        ListSelectionModel getListSelectionModel()
+        {
+            return listSelectionModel;
+        }
+
+        /**
+         * This is overridden to set <code>updatingListSelectionModel</code>
+         * and message super. This is the only place DefaultTreeSelectionModel
+         * alters the ListSelectionModel.
+         */
+        @Override
+        public void resetRowSelection()
+        {
+            if (!updatingListSelectionModel) {
+                updatingListSelectionModel = true;
+                try {
+                    super.resetRowSelection();
+                } finally {
+                    updatingListSelectionModel = false;
+                }
+            }
+            // Notice how we don't message super if
+            // updatingListSelectionModel is true. If
+            // updatingListSelectionModel is true, it implies the
+            // ListSelectionModel has already been updated and the
+            // paths are the only thing that needs to be updated.
+        }
+
+        /**
+         * Creates and returns an instance of ListSelectionHandler.
+         */
+        private ListSelectionListener createListSelectionListener()
+        {
+            return new ListSelectionHandler();
+        }
+
+        /**
+         * If <code>updatingListSelectionModel</code> is false, this will
+         * reset the selected paths from the selected rows in the list
+         * selection model.
+         */
+        protected void updateSelectedPathsFromSelectedRows()
+        {
+            if (!updatingListSelectionModel) {
+                updatingListSelectionModel = true;
+                try {
+                    // This is way expensive, ListSelectionModel needs an
+                    // enumerator for iterating.
+                    final int min = listSelectionModel.getMinSelectionIndex();
+                    final int max = listSelectionModel.getMaxSelectionIndex();
+
+                    clearSelection();
+                    if ((min != -1) && (max != -1)) {
+                        for (int counter = min; counter <= max; counter++) {
+                            if (listSelectionModel.isSelectedIndex(counter)) {
+                                final TreePath selPath = tree.getPathForRow
+                                        (counter);
+
+                                if (selPath != null) {
+                                    addSelectionPath(selPath);
+                                }
+                            }
+                        }
+                    }
+                } finally {
+                    updatingListSelectionModel = false;
+                }
+            }
+        }
+
+        /**
+         * Class responsible for calling updateSelectedPathsFromSelectedRows
+         * when the selection of the list changse.
+         */
+        class ListSelectionHandler implements ListSelectionListener
+        {
+            public void valueChanged(ListSelectionEvent e)
+            {
+                updateSelectedPathsFromSelectedRows();
+            }
+        }
+    }
+
+    public void setEditor(JTextArea mJTextArea)
+    {
+         this.editor = mJTextArea;
+    }
+
+    public void setLinePositionMap(List<Integer> lines2position)
+    {
+        this.lines2position = lines2position;
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/gui/Main.java b/src/main/java/com/puppycrawl/tools/checkstyle/gui/Main.java
new file mode 100644
index 0000000..83a3ffb
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/gui/Main.java
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2002  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.gui;
+
+import java.io.File;
+
+import javax.swing.JFrame;
+
+/**
+ * Entry point for starting the checkstyle GUI.
+ */
+public class Main
+{
+    static JFrame frame;
+
+    public static void main(String[] args)
+    {
+        frame = new JFrame("CheckStyle");
+        final ParseTreeInfoPanel panel = new ParseTreeInfoPanel();
+        frame.getContentPane().add(panel);
+        if (args.length >= 1) {
+            final File f = new File(args[0]);
+            panel.openFile(f, frame);
+        }
+        frame.pack();
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        frame.setVisible(true);
+    }
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeInfoPanel.java b/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeInfoPanel.java
new file mode 100644
index 0000000..fcfc7fa
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeInfoPanel.java
@@ -0,0 +1,308 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2002  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.gui;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.KeyEvent;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.TooManyListenersException;
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.JButton;
+import javax.swing.JFileChooser;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.SwingUtilities;
+import javax.swing.filechooser.FileFilter;
+import antlr.ANTLRException;
+import com.puppycrawl.tools.checkstyle.TreeWalker;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FileContents;
+import com.puppycrawl.tools.checkstyle.api.FileText;
+
+/**
+ * Displays information about a parse tree.
+ * The user can change the file that is parsed and displayed
+ * through a JFileChooser.
+ *
+ * @author Lars K�hne
+ */
+public class ParseTreeInfoPanel extends JPanel
+{
+    /** For Serialisation that will never happen. */
+    private static final long serialVersionUID = -4243405131202059043L;
+    private final JTreeTable mTreeTable;
+    private final ParseTreeModel mParseTreeModel;
+    private final JTextArea mJTextArea;
+    private File mLastDirectory = null;
+    private File mCurrentFile = null;
+    private final Action reloadAction;
+    private final List<Integer>   lines2position  = new ArrayList<Integer>();
+
+    private static class JavaFileFilter extends FileFilter
+    {
+        @Override
+        public boolean accept(File f)
+        {
+            if (f == null) {
+                return false;
+            }
+            return f.isDirectory() || f.getName().endsWith(".java");
+        }
+
+        @Override
+        public String getDescription()
+        {
+            return "Java Source Code";
+        }
+    }
+
+    private class FileSelectionAction extends AbstractAction
+    {
+        /**
+         *
+         */
+        private static final long serialVersionUID = -1926935338069418119L;
+
+        public FileSelectionAction()
+        {
+            super("Select Java File");
+            putValue(Action.MNEMONIC_KEY, KeyEvent.VK_S);
+        }
+
+        public void actionPerformed(ActionEvent e)
+        {
+            final JFileChooser fc = new JFileChooser( mLastDirectory );
+            final FileFilter filter = new JavaFileFilter();
+            fc.setFileFilter(filter);
+            final Component parent =
+                SwingUtilities.getRoot(ParseTreeInfoPanel.this);
+            fc.showDialog(parent, "Open");
+            final File file = fc.getSelectedFile();
+            openFile(file, parent);
+
+        }
+    }
+
+    private class ReloadAction extends AbstractAction
+    {
+        /**
+         *
+         */
+        private static final long serialVersionUID = -1021880396046355863L;
+
+        public ReloadAction()
+        {
+            super("Reload Java File");
+            putValue(Action.MNEMONIC_KEY, KeyEvent.VK_R);
+        }
+
+        public void actionPerformed(ActionEvent e)
+        {
+            final Component parent =
+                SwingUtilities.getRoot(ParseTreeInfoPanel.this);
+            openFile(mCurrentFile, parent);
+        }
+    }
+
+
+    private class FileDropListener implements FileDrop.Listener
+    {
+        private final JScrollPane mSp;
+
+        public void filesDropped(File[] files)
+        {
+            if ((files != null) && (files.length > 0))
+            {
+                final File file = files[0];
+                openFile(file, mSp);
+            }
+        }
+
+        public FileDropListener(JScrollPane aSp)
+        {
+            mSp = aSp;
+        }
+    }
+
+
+    public void openFile(File aFile, final Component aParent)
+    {
+        if (aFile != null) {
+            try {
+                Main.frame.setTitle("Checkstyle : " + aFile.getName());
+                final FileText text = new FileText(aFile.getAbsoluteFile(),
+                                                   getEncoding());
+                final DetailAST parseTree = parseFile(text);
+                mParseTreeModel.setParseTree(parseTree);
+                mCurrentFile = aFile;
+                mLastDirectory = aFile.getParentFile();
+                reloadAction.setEnabled(true);
+
+                final String[] sourceLines = text.toLinesArray();
+
+                // clear for each new file
+                 getLines2position().clear();
+                 // starts line counting at 1
+                 getLines2position().add(0);
+                 // insert the contents of the file to the text area
+                 for (String element : sourceLines)
+                 {
+                   getLines2position().add(mJTextArea.getText().length());
+                   mJTextArea.append(element + "\n");
+                 }
+
+                //clean the text area before inserting the lines of the new file
+                if (mJTextArea.getText().length() != 0) {
+                    mJTextArea.replaceRange("", 0, mJTextArea.getText()
+                            .length());
+                }
+
+                // insert the contents of the file to the text area
+                for (final String element : sourceLines) {
+                    mJTextArea.append(element + "\n");
+                }
+
+                // move back to the top of the file
+                mJTextArea.moveCaretPosition(0);
+            }
+            catch (final IOException ex) {
+                showErrorDialog(
+                        aParent,
+                        "Could not open " + aFile + ": " + ex.getMessage());
+            }
+            catch (final ANTLRException ex) {
+                showErrorDialog(
+                        aParent,
+                        "Could not parse " + aFile + ": " + ex.getMessage());
+            }
+        }
+    }
+
+    /**
+     * Parses a file and returns the parse tree.
+     * @param aFileName the file to parse
+     * @return the root node of the parse tree
+     * @throws IOException if the file cannot be opened
+     * @throws ANTLRException if the file is not a Java source
+     * @deprecated Use {@link #parseFile(FileText)} instead
+     */
+    @Deprecated
+    public static DetailAST parseFile(String aFileName)
+        throws IOException, ANTLRException
+    {
+        return parseFile(new FileText(new File(aFileName), getEncoding()));
+    }
+
+    /**
+     * Parses a file and returns the parse tree.
+     * @param aText the file to parse
+     * @return the root node of the parse tree
+     * @throws ANTLRException if the file is not a Java source
+     */
+    public static DetailAST parseFile(FileText aText)
+        throws ANTLRException
+    {
+        final FileContents contents = new FileContents(aText);
+        return TreeWalker.parse(contents);
+    }
+
+    /**
+     * Returns the configured file encoding.
+     * This can be set using the {@code file.encoding} system property.
+     * It defaults to UTF-8.
+     * @return the configured file encoding
+     */
+    private static String getEncoding()
+    {
+        return System.getProperty("file.encoding", "UTF-8");
+    }
+
+    /**
+     * Create a new ParseTreeInfoPanel instance.
+     */
+    public ParseTreeInfoPanel()
+    {
+        setLayout(new BorderLayout());
+
+        final DetailAST treeRoot = null;
+        mParseTreeModel = new ParseTreeModel(treeRoot);
+        mTreeTable = new JTreeTable(mParseTreeModel);
+        final JScrollPane sp = new JScrollPane(mTreeTable);
+        this.add(sp, BorderLayout.NORTH);
+
+        final JButton fileSelectionButton =
+            new JButton(new FileSelectionAction());
+
+        reloadAction = new ReloadAction();
+        reloadAction.setEnabled(false);
+        final JButton reloadButton = new JButton(reloadAction);
+
+        mJTextArea = new JTextArea(20, 15);
+        mJTextArea.setEditable(false);
+        mTreeTable.setEditor(mJTextArea);
+        mTreeTable.setLinePositionMap(lines2position);
+
+        final JScrollPane sp2 = new JScrollPane(mJTextArea);
+        this.add(sp2, BorderLayout.CENTER);
+
+        final JPanel p = new JPanel(new GridLayout(1,2));
+        this.add(p, BorderLayout.SOUTH);
+        p.add(fileSelectionButton);
+        p.add(reloadButton);
+
+        try {
+            // TODO: creating an object for the side effect of the constructor
+            // and then ignoring the object looks strange.
+            new FileDrop(sp, new FileDropListener(sp));
+        }
+        catch (final TooManyListenersException ex)
+        {
+           showErrorDialog(null, "Cannot initialize Drag and Drop support");
+        }
+
+    }
+
+    private void showErrorDialog(final Component parent, final String msg)
+    {
+        final Runnable showError = new Runnable()
+        {
+            public void run()
+            {
+                JOptionPane.showMessageDialog(parent, msg);
+            }
+        };
+        SwingUtilities.invokeLater(showError);
+    }
+
+    public List<Integer> getLines2position()
+    {
+      return lines2position;
+    }
+}
+
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeModel.java b/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeModel.java
new file mode 100644
index 0000000..9109bff
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeModel.java
@@ -0,0 +1,131 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2002  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.gui;
+
+import antlr.ASTFactory;
+import antlr.collections.AST;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * The model that backs the parse tree in the GUI.
+ *
+ * @author Lars K�hne
+ */
+public class ParseTreeModel extends AbstractTreeTableModel
+{
+    private static final String[] COLUMN_NAMES = new String[]{
+        "Tree", "Type", "Line", "Column", "Text"
+    };
+
+    public ParseTreeModel(DetailAST parseTree)
+    {
+        super(createArtificialTreeRoot());
+        setParseTree(parseTree);
+    }
+
+    private static DetailAST createArtificialTreeRoot()
+    {
+        final ASTFactory factory = new ASTFactory();
+        factory.setASTNodeClass(DetailAST.class.getName());
+        // TODO: Need to resolve if need a fake root node....
+        return (DetailAST) factory.create(TokenTypes.EOF, "ROOT");
+    }
+
+    void setParseTree(DetailAST parseTree)
+    {
+        final DetailAST root = (DetailAST) getRoot();
+        root.setFirstChild(parseTree);
+        final Object[] path = {root};
+        // no need to setup remaining info, as the call results in a
+        // table structure changed event anyway - we just pass nulls
+        fireTreeStructureChanged(this, path, null, null);
+    }
+
+    public int getColumnCount()
+    {
+        return COLUMN_NAMES.length;
+    }
+
+    public String getColumnName(int column)
+    {
+        return COLUMN_NAMES[column];
+    }
+
+    @Override
+    public Class<?> getColumnClass(int column)
+    {
+        switch (column) {
+            case 0:
+                return TreeTableModel.class;
+            case 1:
+                return String.class;
+            case 2:
+                return Integer.class;
+            case 3:
+                return Integer.class;
+            case 4:
+                return String.class;
+        }
+        return Object.class;
+    }
+
+    public Object getValueAt(Object node, int column)
+    {
+        final DetailAST ast = (DetailAST) node;
+        switch (column) {
+            case 0:
+                return null;
+            case 1:
+                return TokenTypes.getTokenName(ast.getType());
+            case 2:
+                return ast.getLineNo();
+            case 3:
+                return ast.getColumnNo();
+            case 4:
+                return ast.getText();
+        }
+        return null;
+    }
+
+    @Override
+    public void setValueAt(Object aValue, Object node, int column)
+    {
+    }
+
+    public Object getChild(Object parent, int index)
+    {
+        final DetailAST ast = (DetailAST) parent;
+        int i = 0;
+        AST child = ast.getFirstChild();
+        while (i < index) {
+            child = child.getNextSibling();
+            i++;
+        }
+        return child;
+    }
+
+    public int getChildCount(Object parent)
+    {
+        final DetailAST ast = (DetailAST) parent;
+        return ast.getChildCount();
+    }
+
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableModel.java b/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableModel.java
new file mode 100644
index 0000000..8105238
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableModel.java
@@ -0,0 +1,104 @@
+/*
+ * %W% %E%
+ *
+ * Copyright 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ * 
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer. 
+ *   
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution. 
+ *   
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.  
+ * 
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE 
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,   
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER  
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF 
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS 
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ * 
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package com.puppycrawl.tools.checkstyle.gui;
+
+import javax.swing.tree.TreeModel;
+
+/**
+ * TreeTableModel is the model used by a JTreeTable. It extends TreeModel
+ * to add methods for getting information about the set of columns each 
+ * node in the TreeTableModel may have. Each column, like a column in 
+ * a TableModel, has a name and a type associated with it. Each node in 
+ * the TreeTableModel can return a value for each of the columns and 
+ * set that value if isCellEditable() returns true. 
+ *
+ * <a href="http://java.sun.com/products/jfc/tsc/articles/treetable1/index.html">Original Source Location</a>
+ *
+ * @author Philip Milne 
+ * @author Scott Violet
+ */
+public interface TreeTableModel extends TreeModel
+{
+    /**
+     * @return the number of available column.
+     */
+    int getColumnCount();
+
+    /**
+     * @param column the column number
+     * @return the name for column number <code>column</code>.
+     */
+    String getColumnName(int column);
+
+    /**
+     * @param column the column number
+     * @return the type for column number <code>column</code>.
+     */
+    Class<?> getColumnClass(int column);
+
+    /**
+     * @param node the node
+     * @param column the column number
+     * @return the value to be displayed for node <code>node</code>, 
+     * at column number <code>column</code>.
+     */
+    Object getValueAt(Object node, int column);
+
+    /**
+     * Indicates whether the the value for node <code>node</code>, 
+     * at column number <code>column</code> is editable.
+     * 
+     * @param node the node.
+     * @param column the column number
+     * @return true if editable 
+     */
+    boolean isCellEditable(Object node, int column);
+
+    /**
+     * Sets the value for node <code>node</code>, 
+     * at column number <code>column</code>.
+     * 
+     * @param aValue the value to set
+     * @param node the node to set the value on
+     * @param column the column number
+     */
+    void setValueAt(Object aValue, Object node, int column);
+}
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableModelAdapter.java b/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableModelAdapter.java
new file mode 100644
index 0000000..d8f6ed6
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/gui/TreeTableModelAdapter.java
@@ -0,0 +1,211 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2002  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/*
+ * %W% %E%
+ *
+ * Copyright 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package com.puppycrawl.tools.checkstyle.gui;
+
+import javax.swing.JTree;
+import javax.swing.SwingUtilities;
+import javax.swing.table.AbstractTableModel;
+import javax.swing.tree.TreePath;
+import javax.swing.event.TreeExpansionEvent;
+import javax.swing.event.TreeExpansionListener;
+import javax.swing.event.TreeModelEvent;
+import javax.swing.event.TreeModelListener;
+
+/**
+ * This is a wrapper class takes a TreeTableModel and implements
+ * the table model interface. The implementation is trivial, with
+ * all of the event dispatching support provided by the superclass:
+ * the AbstractTableModel.
+ *
+ * <a href="http://java.sun.com/products/jfc/tsc/articles/treetable1/index.html">Original Source Location</a>
+ *
+ * @author Philip Milne
+ * @author Scott Violet
+ */
+public class TreeTableModelAdapter extends AbstractTableModel
+{
+    /** For Serialisation that will never happen. */
+    private static final long serialVersionUID = 8269213416115369275L;
+    private final JTree mTree;
+    private final TreeTableModel mTreeTableModel;
+
+    public TreeTableModelAdapter(TreeTableModel aTreeTableModel, JTree aTree)
+    {
+        this.mTree = aTree;
+        this.mTreeTableModel = aTreeTableModel;
+
+        aTree.addTreeExpansionListener(new TreeExpansionListener()
+        {
+            // Don't use fireTableRowsInserted() here; the selection model
+            // would get updated twice.
+            public void treeExpanded(TreeExpansionEvent event)
+            {
+                fireTableDataChanged();
+            }
+
+            public void treeCollapsed(TreeExpansionEvent event)
+            {
+                fireTableDataChanged();
+            }
+        });
+
+        // Install a TreeModelListener that can update the table when
+        // mTree changes. We use delayedFireTableDataChanged as we can
+        // not be guaranteed the mTree will have finished processing
+        // the event before us.
+        aTreeTableModel.addTreeModelListener(new TreeModelListener()
+        {
+            public void treeNodesChanged(TreeModelEvent e)
+            {
+                delayedFireTableDataChanged();
+            }
+
+            public void treeNodesInserted(TreeModelEvent e)
+            {
+                delayedFireTableDataChanged();
+            }
+
+            public void treeNodesRemoved(TreeModelEvent e)
+            {
+                delayedFireTableDataChanged();
+            }
+
+            public void treeStructureChanged(TreeModelEvent e)
+            {
+                delayedFireTableDataChanged();
+            }
+        });
+    }
+
+    // Wrappers, implementing TableModel interface.
+
+    public int getColumnCount()
+    {
+        return mTreeTableModel.getColumnCount();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getColumnName(int column)
+    {
+        return mTreeTableModel.getColumnName(column);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Class<?> getColumnClass(int column)
+    {
+        return mTreeTableModel.getColumnClass(column);
+    }
+
+    public int getRowCount()
+    {
+        return mTree.getRowCount();
+    }
+
+    protected Object nodeForRow(int row)
+    {
+        final TreePath treePath = mTree.getPathForRow(row);
+        return treePath.getLastPathComponent();
+    }
+
+    public Object getValueAt(int row, int column)
+    {
+        return mTreeTableModel.getValueAt(nodeForRow(row), column);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean isCellEditable(int row, int column)
+    {
+        return mTreeTableModel.isCellEditable(nodeForRow(row), column);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setValueAt(Object value, int row, int column)
+    {
+        mTreeTableModel.setValueAt(value, nodeForRow(row), column);
+    }
+
+    /**
+     * Invokes fireTableDataChanged after all the pending events have been
+     * processed. SwingUtilities.invokeLater is used to handle this.
+     */
+    protected void delayedFireTableDataChanged()
+    {
+        SwingUtilities.invokeLater(new Runnable()
+        {
+            public void run()
+            {
+                fireTableDataChanged();
+            }
+        });
+    }
+}
+
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/gui/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/gui/package-info.java
new file mode 100644
index 0000000..1a79145
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/gui/package-info.java
@@ -0,0 +1,50 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2008  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * User interface classes for CheckStyle. Currently this is mainly a gui to aid
+ * Check developers.
+ * <p>
+ * This is definitely work in progress. Here are some ideas where
+ * <strong>you</strong> could help:
+ * <ul>
+ *   <li>
+ *     Add a read only editor field that highlights the selected AST node.
+ *   </li>
+ *   <li>
+ *     Clicking in the editor field could open the corresponding tree path.
+ *   </li>
+ *   <li>
+ *     Add a configuration GUI that can be used in all IDE plugins
+ *     (well, err.., except Eclipse).
+ *   </li>
+ *   <li>
+ *     Add ability to execute individual Checks and display the error messages.
+ *   </li>
+ *   <li>
+ *     Add a GUI for the
+ *     {@link com.puppycrawl.tools.checkstyle.api.FileContents}.
+ *   </li>
+ *   <li>
+ *     Add ability to define a Check by example (another one of those crazy
+ *     ideas... :-)
+ *   </li>
+ * </ul>
+ */
+package com.puppycrawl.tools.checkstyle.gui;
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/package-info.java
new file mode 100644
index 0000000..10ba815
--- /dev/null
+++ b/src/main/java/com/puppycrawl/tools/checkstyle/package-info.java
@@ -0,0 +1,29 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Contains the implementation of the Checkstyle framework. Developers of
+ * plug-ins for Checkstyle should refer to this package to configure and run
+ * it.
+ * <p>
+ * You should <strong>not be</strong> referring to this package if you are
+ * implementing your own check.
+ * </p>
+ */
+package com.puppycrawl.tools.checkstyle;
diff --git a/src/main/resources/checkstyle_packages.xml b/src/main/resources/checkstyle_packages.xml
new file mode 100644
index 0000000..d111da7
--- /dev/null
+++ b/src/main/resources/checkstyle_packages.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE checkstyle-packages PUBLIC
+    "-//Puppy Crawl//DTD Package Names 1.0//EN"
+    "http://www.puppycrawl.com/dtds/packages_1_0.dtd">
+
+<checkstyle-packages>
+  <package name="com.puppycrawl.tools.checkstyle">
+    <package name="checks">
+      <package name="annotation"/>
+      <package name="blocks"/>
+      <package name="coding"/>
+      <package name="design"/>
+      <package name="duplicates"/>
+      <package name="header"/>
+      <package name="imports"/>
+      <package name="indentation"/>
+      <package name="javadoc"/>
+      <package name="metrics"/>
+      <package name="modifier"/>
+      <package name="naming"/>
+      <package name="regexp"/>
+      <package name="sizes"/>
+      <package name="whitespace"/>
+    </package>
+    <package name="filters"/>
+  </package>
+</checkstyle-packages>
diff --git a/src/main/resources/checkstyletask.properties b/src/main/resources/checkstyletask.properties
new file mode 100644
index 0000000..39e8aa8
--- /dev/null
+++ b/src/main/resources/checkstyletask.properties
@@ -0,0 +1 @@
+checkstyle=com.puppycrawl.tools.checkstyle.CheckStyleTask
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/antlib.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/antlib.xml
new file mode 100644
index 0000000..4fb4183
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/antlib.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<antlib>
+    <taskdef name="checkstyle"
+             classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
+    </taskdef>
+</antlib>
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/annotation/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/annotation/messages.properties
new file mode 100644
index 0000000..113855d
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/annotation/messages.properties
@@ -0,0 +1,14 @@
+annotation.missing.deprecated=Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.
+annotation.missing.override=Must include @java.lang.Override annotation when '{'@inheritDoc'}' Javadoc tag exists.
+annotation.not.valid.on=The annotation {0} is not valid at this location.
+annotation.incorrect.style=Annotation style must be ''{0}''.
+annotation.trailing.comma.missing=Annotation array values must contain trailing comma.
+annotation.trailing.comma.present=Annotation array values cannot contain trailing comma.
+annotation.parens.missing=Annotation must have closing parenthesis.
+annotation.parens.present=Annotation cannot have closing parenthesis.
+annotation.package.location=Package annotations must be in the package-info.java info.
+suppressed.warning.not.allowed=The warning ''{0}'' cannot be suppressed at this location.
+javadoc.duplicateTag=Duplicate {0} tag.
+javadoc.missing=Missing a Javadoc comment.
+tag.not.valid.on=The Javadoc {0} tag is not valid at this location.
+
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/annotation/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/annotation/messages_de.properties
new file mode 100644
index 0000000..5b68b61
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/annotation/messages_de.properties
@@ -0,0 +1,13 @@
+annotation.missing.deprecated=Wenn im Javadoc das Tag @deprecated vorkommt, muss auch die Annotation @java.lang.Deprecated vorhanden sein.
+annotation.missing.override=Die Annotation @java.lang.Override muss vorhanden sein, wenn im Javadoc das Tag '{'@inheritDoc'}' vorhanden ist.
+annotation.not.valid.on=Die Annotation {0} ist an dieser Stelle nicht zul�ssig.
+annotation.incorrect.style=Der Annotation Style sollte ''{0}'' sein.
+annotation.trailing.comma.missing=Das abschlie�ende Komma fehlt.
+annotation.trailing.comma.present=Das abschlie�ende Komma darf nicht verwendet werden.
+annotation.parens.missing=Bei dieser Annotation fehlen die nachgestellten runden Klammern.
+annotation.parens.present=Die nachgestellten runden Klammern sind nicht zul�ssig.
+annotation.package.location=Package-Annotationen m�ssen in der package-info.java stehen.
+suppressed.warning.not.allowed=Die Warnung ''{0}'' darf an dieser Stelle nicht unterdr�ckt werden.
+javadoc.duplicateTag=Doppeltes Tag {0}.
+javadoc.missing=Javadoc-Kommentar fehlt.
+tag.not.valid.on=Das Javadoc-Tag {0} ist an dieser Stelle nicht zul�ssig.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/annotation/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/annotation/messages_es.properties
new file mode 100644
index 0000000..139597f
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/annotation/messages_es.properties
@@ -0,0 +1,2 @@
+
+
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/annotation/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/annotation/messages_tr.properties
new file mode 100644
index 0000000..9bd3279
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/annotation/messages_tr.properties
@@ -0,0 +1,18 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+annotation.incorrect.style        = Anotasyon stili \u015Fu \u015Fekilde olmal\u0131: ''{0}''.
+annotation.missing.deprecated     = @java.lang.Deprecated anotasyonu ve @deprecated Javadoc etiketi (a\u00E7\u0131klamas\u0131yla birlikte) birlikte kullan\u0131lmal\u0131.
+annotation.missing.override       = @inheritDoc Javadoc etiketi kullan\u0131ld\u0131\u011F\u0131nda @java.lang.Override anotasyonu da kullan\u0131lmal\u0131.
+annotation.not.valid.on           = {0} anotasyonu bu konumda ge\u00E7erli de\u011Fil.
+annotation.package.location       = Paket anotasyonlar\u0131 package-info.java dosyas\u0131nda tan\u0131mlanmal\u0131.
+annotation.parens.missing         = Anotasyonun kapatma parantezi ('')'') olmal\u0131.
+annotation.parens.present         = Anotasyonun kapatma parantezi ('')'') olmamal\u0131.
+annotation.trailing.comma.missing = Anotasyonun dizi de\u011Ferlerini takip eden bir virg\u00FCl kullan\u0131lmal\u0131d\u0131r.
+annotation.trailing.comma.present = Anotasyonun dizi de\u011Ferlerini takip eden bir virg\u00FCl kullan\u0131lmamal\u0131d\u0131r.
+
+javadoc.duplicateTag = Tekrarlanm\u0131\u015F {0} etiketi.
+javadoc.missing      = Javadoc a\u00E7\u0131klamas\u0131 eksik.
+
+suppressed.warning.not.allowed = ''{0}'' uyar\u0131s\u0131 bu konumda bast\u0131r\u0131lamaz.
+
+tag.not.valid.on = {0} Javadoc etiketi bu konumda ge\u00E7ersiz.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages.properties
new file mode 100644
index 0000000..0abbcfb
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages.properties
@@ -0,0 +1,13 @@
+block.empty=Empty {0} block.
+block.nested=Avoid nested blocks.
+block.noStmt=Must have at least one statement.
+
+line.alone=''{0}'' should be alone on a line.
+line.new=''{0}'' should be on a new line.
+line.previous=''{0}'' should be on the previous line.
+line.same=''{0}'' should be on the same line.
+
+needBraces=''{0}'' construct must use '''{}'''s.
+
+line.break.after='''{''' should have line break after.
+line.break.before='''}''' should have line break before.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_de.properties
new file mode 100644
index 0000000..450360c
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_de.properties
@@ -0,0 +1,10 @@
+block.empty=Leerer {0}-Block.
+block.nested=Verschachtelte Bl�cke sollten vermieden werden.
+block.noStmt=Muss mindestens ein Statement beinhalten.
+
+line.alone=''{0}'' sollte allein in der Zeile stehen.
+line.new=''{0}'' sollte in einer neuen Zeile stehen.
+line.previous=''{0}'' sollte in der vorhergehenden Zeile stehen.
+line.same=''{0}'' sollte in derselben Zeile stehen.
+
+needBraces=Das ''{0}''-Konstrukt muss '''{}''' benutzen.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_es.properties
new file mode 100644
index 0000000..84d7355
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_es.properties
@@ -0,0 +1,11 @@
+block.empty=Bloque {0} vac�o.
+block.nested=Evitar bloques anidados.
+block.noStmt=Debe tener al menos una sentencia.
+
+line.alone=''{0}'' deber�a estar solo en una l�nea.
+line.new=''{0}'' deber�a estar en una nueva l�nea.
+line.previous=''{0}'' deber�a estar en la l�nea anterior.
+line.same=''{0}'' deber�a estar en la misma l�nea.
+
+needBraces=La construcci�n ''{0}'' debe usar '''{}'' (llaves).
+
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_fi.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_fi.properties
new file mode 100644
index 0000000..55d41b4
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_fi.properties
@@ -0,0 +1,10 @@
+block.empty=Tyhjä {0}-rakenne.
+block.nested=Avoid nested blocks.
+block.noStmt=Pitää olla ainakin yksi lause.
+
+line.alone=''{0}'' pitää olla yksinään rivillä.
+line.new=''{0}'' pitää olla uudella rivillä.
+line.previous=''{0}'' pitää olla edellisellä rivillä.
+line.same=''{0}'' pitää olla samalla rivillä.
+
+needBraces=''{0}''-rakenteen pitää käyttää '''{}'':a.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_fr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_fr.properties
new file mode 100644
index 0000000..fed2ccc
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_fr.properties
@@ -0,0 +1,10 @@
+block.empty=Bloc ''{0}'' vide.
+block.nested=Evitez d''imbriquer les blocs.
+block.noStmt=Le bloc devrait contenir au moins une instruction.
+
+line.alone=''{0}'' devrait �tre seul sur sa ligne.
+line.new=''{0}'' devrait �tre sur une nouvelle ligne.
+line.previous=''{0}'' devrait �tre sur la ligne pr�c�dente.
+line.same=''{0}'' devrait �tre sur la m�me ligne.
+
+needBraces=L''instruction ''{0}'' devrait utiliser des accolades  ('''{''' et '''}''').
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_ja.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_ja.properties
new file mode 100644
index 0000000..ee0e19a
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_ja.properties
@@ -0,0 +1,11 @@
+
+block.empty=\u7a7a\u306e {0} \u30d6\u30ed\u30c3\u30af\u3067\u3059\u3002
+block.nested=\u30cd\u30b9\u30c8\u3057\u305f\u30d6\u30ed\u30c3\u30af\u306f\u907f\u3051\u3066\u304f\u3060\u3055\u3044\u3002
+block.noStmt=\u5c11\u306a\u304f\u3068\u30821\u6587\u306f\u3042\u308b\u306f\u305a\u3067\u3059\u3002
+
+line.alone=''{0}'' \u306f\u72ec\u7acb\u3057\u305f\u884c\u306b\u3042\u308b\u3079\u304d\u3067\u3059\u3002
+line.new=''{0}'' \u306f\u65b0\u3057\u3044\u884c\u306b\u3042\u308b\u3079\u304d\u3067\u3059\u3002
+line.previous=''{0}'' \u306f\u524d\u306e\u884c\u306b\u3042\u308b\u3079\u304d\u3067\u3059\u3002
+line.same=''{0}'' \u306f\u540c\u4e00\u884c\u306b\u3042\u308b\u3079\u304d\u3067\u3059\u3002
+
+needBraces=''{0}'' \u6587\u3067\u306f '''{}''' \u3092\u4f7f\u7528\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_pt.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_pt.properties
new file mode 100644
index 0000000..3a6b679
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_pt.properties
@@ -0,0 +1,10 @@
+block.empty=Block {0} vazio.
+block.nested=Avoid nested blocks.
+block.noStmt=Tem que ter pelo menos uma instru��o.
+
+line.alone=''{0}'' deve estar sozinho numa linha.
+line.new=''{0}'' deve estar numa nova linha.
+line.previous=''{0}'' deve estar na linha anterior.
+line.same=''{0}'' deve estar na mesma linha.
+
+needBraces=A estrutura sint�ctica ''{0}'' deve utilizar '''{}'''s.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_tr.properties
new file mode 100644
index 0000000..f5b5725
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/blocks/messages_tr.properties
@@ -0,0 +1,12 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+block.empty  = Bo\u015F blok bulundu: {0}
+block.nested = \u0130\u00E7 i\u00E7e bloklar kullan\u0131lmamal\u0131d\u0131r.
+block.noStmt = Blok en az bir ifade i\u00E7ermeli.
+
+line.alone    = ''{0}'' ifadesi sat\u0131rda tek ba\u015F\u0131na olmal\u0131.
+line.new      = ''{0}'' ifadesi yeni sat\u0131rda olmal\u0131.
+line.previous = ''{0}'' ifadesi \u00F6nceki sat\u0131rda olmal\u0131.
+line.same     = ''{0}'' ifadesi ayn\u0131 sat\u0131rda olmal\u0131.
+
+needBraces = ''{0}'' yap\u0131s\u0131 s\u00FCsl\u00FC parantezler ('''{}''') kullanmal\u0131.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages.properties
new file mode 100644
index 0000000..b9047f1
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages.properties
@@ -0,0 +1,68 @@
+array.trailing.comma=Array should contain trailing comma.
+assignment.inner.avoid=Inner assignments should be avoided.
+avoid.finalizer.method=Avoid using finalizer method.
+avoid.clone.method=Avoid using clone method.
+covariant.equals=covariant equals without overriding equals(java.lang.Object).
+declaration.order.constructor=Constructor definition in wrong order.
+declaration.order.method=Method definition in wrong order.
+declaration.order.static=Static variable definition in wrong order.
+declaration.order.instance=Instance variable definition in wrong order.
+declaration.order.access=Variable access definition in wrong order.
+default.comes.last=Default should be last label in the switch.
+empty.statement=Empty statement.
+equals.avoid.null=String literal expressions should be on the left side of an equals comparison.
+equalsIgnoreCase.avoid.null=String literal expressions should be on the left side of an equalsIgnoreCase comparison.
+equals.noHashCode=Definition of ''equals()'' without corresponding definition of ''hashCode()''.
+explicit.init=Variable ''{0}'' explicitly initialized to ''{1}'' (default value for its type).
+fall.through=Fall through from previous branch of the switch statement.
+fall.through.last=Fall through from the last branch of the switch statement.
+final.variable=Variable ''{0}'' should be declared final.
+hidden.field=''{0}'' hides a field.
+illegal.catch=Catching ''{0}'' is not allowed.
+illegal.throw=Throwing ''{0}'' is not allowed.
+illegal.token=Using ''{0}'' is not allowed.
+illegal.token.text=Token text matches the illegal pattern ''{0}''.
+illegal.type=Declaring variables, return values or parameters of type ''{0}'' is not allowed.
+inline.conditional.avoid=Avoid inline conditionals.
+instantiation.avoid=Instantiation of {0} should be avoided.
+junit.method.name=The method ''{0}'' should be named ''{1}''.
+junit.method.return.type=The method ''{0}'' must be declared with a {1} return type.
+junit.method.parameters=The method ''{0}'' must be declared with no parameters.
+junit.method.public.and.static=The method ''{0}'' must be declared static.
+junit.method.protected.or.public=The method ''{0}'' must be public or protected.
+junit.method.static=The method ''{0}'' shouldn''t be static.
+magic.number=''{0}'' is a magic number.
+missing.ctor=Class should define a constructor.
+missing.package.declaration=Missing package declaration.
+missing.super.call=Method ''{0}'' should call ''super.{0}''.
+missing.switch.default=switch without \"default\" clause.
+modified.control.variable=Control variable ''{0}'' is modified.
+multiple.statements.line=Only one statement per line allowed.
+multiple.string.literal=The String {0} appears {1} times in the file.
+multiple.variable.declarations=Only one variable definition per line allowed.
+multiple.variable.declarations.comma=Each variable declaration must be in its own statement.
+nested.for.depth=Nested for depth is {0,number,integer} (max allowed is {1,number,integer}).
+nested.if.depth=Nested if-else depth is {0,number,integer} (max allowed is {1,number,integer}).
+nested.try.depth=Nested try depth is {0,number,integer} (max allowed is {1,number,integer}).
+parameter.assignment=Assignment of parameter ''{0}'' is not allowed.
+redundant.throws.classInfo=Unable to get class information for {0}.
+redundant.throws.duplicate=Redundant throws: ''{0}'' listed more then one time.
+redundant.throws.subclass=Redundant throws: ''{0}'' is subclass of ''{1}''.
+redundant.throws.unchecked=Redundant throws: ''{0}'' is unchecked exception.
+require.this.variable=Reference to instance variable ''{0}'' needs \"this.\".
+require.this.unfound.variable=Unable find where ''{0}'' is declared.
+require.this.method=Method call to ''{0}'' needs \"this.\".
+return.count=Return count is {0,number,integer} (max allowed is {1,number,integer}).
+simplify.boolreturn=Conditional logic can be removed.
+simplify.expression=Expression can be simplified.
+string.literal.equality=Literal Strings should be compared using equals(), not ''{0}''.
+unnecessary.paren.assign=Unnecessary parentheses around assignment right-hand side.
+unnecessary.paren.expr=Unnecessary parentheses around expression.
+unnecessary.paren.ident=Unnecessary parentheses around identifier ''{0}''.
+unnecessary.paren.literal=Unnecessary parentheses around literal ''{0}''.
+unnecessary.paren.return=Unnecessary parentheses around return value.
+unnecessary.paren.string=Unnecessary parentheses around string {0}.
+package.dir.mismatch=Package declaration does not match directory ''{0}''.
+variable.declaration.usage.distance=Distance between variable ''{0}'' declaration and its first usage is {1}, but allowed {2}.
+variable.declaration.usage.distance.extend=Distance between variable ''{0}'' declaration and its first usage is {1}, but allowed {2}.  Consider to make that variable as final if you still need to store its value in advance (before method calls that might do side effect on original value).
+overload.methods.declaration=Overload methods should not be split. Previous overloaded method located at line ''{0}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_de.properties
new file mode 100644
index 0000000..ba7cb89
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_de.properties
@@ -0,0 +1,67 @@
+array.trailing.comma=Array sollte mit einem Komma abgeschlossen werden.
+assignment.inner.avoid=Innere Zuweisungen sollten vermieden werden.
+avoid.finalizer.method=Die Verwendung von finalizer Methoden sollte vermieden werden.
+avoid.clone.method=Die Methode clone() sollte vermieden werden.
+covariant.equals=Kovariante Definition von equals() ohne equals(java.lang.Object) zu �berschreiben.
+declaration.order.constructor=Konstruktordefinition in falscher Reihenfolge.
+declaration.order.method=Methodendefinition in falscher Reihenfolge.
+declaration.order.static=Statische Variablendefinition in falscher Reihenfolge.
+declaration.order.instance=Instanzvariablendefinition in falscher Reihenfolge.
+declaration.order.access=Fehlerhafte Deklarationsreihenfolge f�r diesen Scope.
+default.comes.last=Default sollte das letzte Label im switch sein.
+empty.statement=Leere Anweisung.
+equals.avoid.null=String-Literale sollten auf der linken Seite eines equals()-Vergleichs stehen.
+equalsIgnoreCase.avoid.null=String-Literale sollten auf der linken Seite eines equalsIgnoreCase()-Vergleichs stehen.
+equals.noHashCode=Definition von ''equals()'' ohne korrespondierende Definition von ''hashCode()''.
+explicit.init=Variable ''{0}'' wird explizit mit ''{1}'' initialisiert (Defaultwert f�r ihren Typ).
+fall.through=Fall through vom vorherigen Zweig der switch Anweisung.
+fall.through.last=Fall through von letzten Zweig der switch Anweisung.
+final.variable=Variable ''{0}'' sollte als final deklariert werden.
+hidden.field=''{0}'' verbirgt ein Feld.
+illegal.catch=Catch von ''{0}'' ist nicht erlaubt.
+illegal.throw=Werfen von ''{0}'' ist nicht erlaubt.
+illegal.token=Benutzung von ''{0}'' ist nicht erlaubt.
+illegal.token.text=Tokentext entspricht dem Muster ''{0}''.
+illegal.type=Deklaration von Variablen, R�ckgabewerten oder Parametern des Typs ''{0}'' ist nicht erlaubt.
+inline.conditional.avoid=Der Bedingungsoperator sollte vermieden werden.
+instantiation.avoid=Instantiierung von {0} sollte vermieden werden.
+junit.method.name=Die Methode ''{0}'' sollte zu ''{1}'' umbenannt werden.
+junit.method.return.type=Die Methode ''{0}'' muss den R�ckgabetyp {1} haben.
+junit.method.parameters=Die Methode ''{0}'' muss parameterlos sein.
+junit.method.public.and.static=Die Methode ''{0}'' muss als static deklariert sein.
+junit.method.protected.or.public=Die Methode ''{0}'' muss public oder protected sein.
+junit.method.static=Die Methode ''{0}'' sollte nicht static sein.
+magic.number=''{0}'' sollte durch eine Konstante definiert sein.
+missing.ctor=Die Klasse sollte einen Konstruktor definieren.
+missing.package.declaration=Fehlende Package-Deklaration.
+missing.super.call=Die Methode ''{0}'' sollte ''super.{0}'' aufrufen.
+missing.switch.default=switch ohne \"default\".
+modified.control.variable=Die Kontrollvariable ''{0}'' wird modifiziert.
+multiple.statements.line=Pro Zeile ist nur 1 Anweisung erlaubt.
+multiple.string.literal=Der String {0} wird in dieser Datei {1} mal benutzt.
+multiple.variable.declarations=Nur eine Variablendefinition pro Zeile ist erlaubt.
+multiple.variable.declarations.comma=Jede Variablendeklaration muss in einer eigenen Anweisung erfolgen.
+nested.for.depth=Schachtelungstiefe der for-Schleife ist {0,number,integer} (Obergrenze ist {1,number,integer}).
+nested.if.depth=Schachtelungstiefe von if-else ist {0,number,integer} (Obergrenze ist {1,number,integer}).
+nested.try.depth=Schachtelungstiefe von try-Bl�cken ist {0,number,integer} (Obergrenze ist  {1,number,integer}).
+parameter.assignment=Zuweisung an den Parameter ''{0}'' ist nicht erlaubt.
+redundant.throws.classInfo=Klassen-Information f�r {0} nicht verf�gbar.
+redundant.throws.duplicate=�berfl�ssige throws-Deklaration: ''{0}'' ist mehrfach aufgef�hrt.
+redundant.throws.subclass=�berfl�ssige throws-Deklaration: ''{0}'' ist Unterklasse von ''{1}''.
+redundant.throws.unchecked=�berfl�ssige throws-Deklaration: ''{0}'' ist eine unchecked Exception (abgeleitet von RuntimeException).
+require.this.variable=Dereferenzierung der Instanzvariable ''{0}'' muss �ber \"this.\" erfolgen.
+require.this.unfound.variable=Checkstyle kann Deklaration von ''{0}'' nicht finden.
+require.this.method=Methodenaufruf ''{0}'' muss �ber \"this.\" erfolgen.
+return.count={0,number,integer} return-Anweisungen (Obergrenze ist {1,number,integer}).
+simplify.boolreturn=Die Verzweigung sollte entfernt werden.
+simplify.expression=Der Ausdruck kann vereinfacht werden.
+string.literal.equality=String-Literale sollten mit equals() verglichen werden, nicht mit ''{0}''.
+unnecessary.paren.assign=�berfl�ssige Klammern um die rechte Seite der Zuweisung.
+unnecessary.paren.expr=�berfl�ssige Klammern um Ausdruck.
+unnecessary.paren.ident=�berfl�ssige Klammern um den Bezeichner ''{0}''.
+unnecessary.paren.literal=�berfl�ssige Klammern um das Literal ''{0}''.
+unnecessary.paren.return=�berfl�ssige Klammern um den return-Wert.
+unnecessary.paren.string=�berfl�ssige Klammern um den String {0}.
+package.dir.mismatch=Name des Packages passt nicht zum Namen des Verzeichnisses ''{0}''.
+variable.declaration.usage.distance=Abstand zwischen der Deklaration der Variablen ''{0}'' und ihrer ersten Verwendung betr�gt {1}, d�rfte aber h�chstens {2} sein.
+overload.methods.declaration=�berladene Methoden sollten zusammen stehen. Vorangegangene �berladene Methode findet sich in Zeile ''{0}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_es.properties
new file mode 100644
index 0000000..a28584f
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_es.properties
@@ -0,0 +1,82 @@
+array.trailing.comma=El array deber�a llevar una coma al final.
+
+assignment.inner.avoid=Deben evitarse las asignaciones internas.
+
+covariant.equals=equals covariante sin sobrescribir equals(java.lang.Object).
+
+empty.statement=Sentencia vac�a.
+
+equals.noHashCode=Definici�n de ''equals()'' sin la correspondiente definici�n de ''hashCode()''.
+
+final.variable=La variable ''{0}'' debe declararse final.
+
+hidden.field=''{0}'' oculta un campo.
+
+illegal.token=El uso de ''{0}'' no esta permitido.
+
+illegal.token.text=El texto del token coincide con el patr�n ilegal ''{0}''.
+
+instantiation.avoid=Deber�a evitarse la instanciaci�n de {0}.
+
+inline.conditional.avoid=Evitar los condicionales en l�nea.
+
+magic.number=''{0}'' es un n�mero m�gico.
+
+missing.super.call=El m�todo ''{0}'' deber�a llamar a ''super.{0}''.
+missing.switch.default=switch sin etiqueta \"default\".
+
+multiple.string.literal=La cadena {0} aparece {1} veces en el fichero.
+
+redundant.throws.classInfo=No se puede obtener la informaci�n de clase de {0}.
+redundant.throws.duplicate=Sentencia throws redundante: ''{0}'' aparece m�s de una vez.
+redundant.throws.subclass=Sentencia throws redundante: ''{0}'' es una subclase de ''{1}''.
+redundant.throws.unchecked=Sentencia throws redundante: ''{0}'' es una excepci�n no comprobada.
+
+simplify.boolreturn=Se puede eliminar la l�gica condicional.
+simplify.expression=Se puede simplificar la expresi�n.
+
+nested.if.depth=La profundidad de if-else anidados es {0,number,integer} (m�ximo permitido es {1,number,integer}).
+nested.try.depth=La profundidad de try anidados es {0,number,integer} (m�ximo permitido es {1,number,integer}).
+
+string.literal.equality=Las cadenas literales deben compararse usando equals(), no ''{0}''.
+
+illegal.catch=Capturar la excepci�n ''{0}'' no est� permitido.
+missing.package.declaration=Falta la declaraci�n de paquete.
+
+junit.method.name=El m�todo ''{0}'' deber�a llamarse ''{1}''.
+junit.method.return.type=El m�todo ''{0}'' debe declararse con tipo de retorno {1}.
+junit.method.parameters=El m�todo ''{0}'' debe declararse sin par�metros.
+junit.method.public.and.static=El m�todo ''{0}'' debe declararse static.
+junit.method.protected.or.public=El m�todo ''{0}'' debe ser public o protected.
+junit.method.static=El m�todo ''{0}'' no deber�a ser static.
+
+return.count=El n�mero de sentencias return es {0,number,integer} (m�ximo permitido es {1,number,integer}).
+
+illegal.type=La declaraci�n de variables, valores de retorno o par�metros de tipo ''{0}'' no est� permitida.
+
+declaration.order.constructor=Definici�n de constructor en orden incorrecto.
+declaration.order.method=Definici�n de m�todo en orden incorrecto.
+declaration.order.static=Definici�n de variable static en orden incorrecto.
+declaration.order.instance=Definici�n de variable de instancia en orden incorrecto.
+declaration.order.access=Definici�n de acceso a variable en orden incorrecto.
+
+parameter.assignment=No esta permitida la asignaci�n del par�metro ''{0}''.
+
+modified.control.variable=Se modifica la variable de control ''{0}''.
+
+explicit.init=La variable ''{0}'' se inicializa explicitamente a ''{1}'' (valor por defecto para su tipo).
+default.comes.last=La etiqueta default debe ser la �ltima etiqueta en el switch.
+missing.ctor=La clase deber�a definir un constructor.
+fall.through=Ca�da desde la etiqueta anterior en la sentencia switch.
+require.this.variable=La referencia a la variable de instancia ''{0}'' necesita \"this.\".
+require.this.unfound.variable=No se puede encontrar la declaraci�n de ''{0}''.
+require.this.method=La llamada al m�todo ''{0}'' necesita \"this.\".
+multiple.variable.declarations=S�lo se permite una definici�n de variable por l�nea.
+multiple.variable.declarations.comma=Cada declaraci�n de variable debe estar en su l�nea.
+
+unnecessary.paren.assign=Par�ntesis innecesarios alrededor de la parte derecha de una asignaci�n.
+unnecessary.paren.expr=Par�ntesis innecesarios alrededor de la expresi�n.
+unnecessary.paren.ident=Par�ntesis innecesarios alrededor del identificador ''{0}''.
+unnecessary.paren.literal=Par�ntesis innecesarios alrededor del literal ''{0}''.
+unnecessary.paren.return=Par�ntesis innecesarios alrededor del valor de retorno.
+unnecessary.paren.string=Par�ntesis innecesarios alrededor de la cadena {0}.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_fi.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_fi.properties
new file mode 100644
index 0000000..05c1d45
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_fi.properties
@@ -0,0 +1,26 @@
+assignment.inner.avoid=Älä käytä sisäkkäisiä sijoituksia.
+
+equals.noHashCode=''equals()'' määritelty ilman vastaavaa ''hashCode()''-määrittelyä.
+
+final.variable=Muuttujan ''{0}'' pitäisi olla final.
+
+hidden.field=''{0}'' piilottaa muuttujan.
+
+illegal.token=''{0}'':n käyttö ei ole sallittu.
+
+instantiation.avoid=Älä instantioi {0}:a.
+
+missing.super.call=Metodin ''{0}'' pitäisi kutsua ''super.{0}'':aa.
+
+redundant.throws.duplicate=Ylimääräinen throws: ''{0}'' mainittu useamman kuin yhden kerran.
+redundant.throws.subclass=Ylimääräinen throws: ''{0}'' on ''{1}'':n aliluokka.
+redundant.throws.unchecked=Ylimääräinen throws: ''{0}'' on tarkistamaton poikkeus.
+
+simplify.boolreturn=Konditionaalilogiikan voisi poistaa.
+simplify.expression=Ilmaisua voisi yksinkertaistaa.
+
+nested.if.depth=Sisäkkäisten if-else -lausekkeiden syvyys on {0,number,integer} (suurin sallittu on {1,number,integer}).
+nested.if.depth=Sisäkkäisten try -lausekkeiden syvyys on {0,number,integer} (suurin sallittu on {1,number,integer}).
+
+junit.method.name=Metodin ''{0}'' nimi pitäisi olla ''{1}''.
+junit.method.static=Metodin ''{0}'' ei pitäisi olla staattinen.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_fr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_fr.properties
new file mode 100644
index 0000000..0f83724
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_fr.properties
@@ -0,0 +1,83 @@
+array.trailing.comma=La derni�re valeur d''un tableau devrait �tre suivie d''une virgule.
+
+assignment.inner.avoid=Evitez d''affecter une valeur � une variable au sein d''une expression.
+
+covariant.equals=Votre m�thode equals compare uniquement les objets de votre classe. N''oubliez pas de surcharger la m�thode equals(java.lang.Object).
+
+empty.statement=Instruction vide.
+
+equals.noHashCode=La d�finition de la m�thode ''equals()'' doit toujours �tre accompagn�e de la d�finition de la m�thode ''hashCode()''.
+
+final.variable=La variable ''{0}'' devrait �tre finale.
+
+hidden.field=''{0}'' masque un attribut.
+
+illegal.token=Il est interdit d''utiliser ''{0}''.
+
+illegal.token.text=Cha�ne de caract�res interdite ''{0}''.
+
+instantiation.avoid=L''instantiation de la classe {0} est prohib�e.
+
+inline.conditional.avoid=L''utilisation de l''op�rateur conditionel est prohib�e.
+
+magic.number=''{0}'' devrait �tre d�fini comme une constante.
+
+missing.super.call=La m�thode ''{0}'' devrait appeler ''super.{0}''.
+missing.switch.default=Il manque le cas \"default\" dans le bloc \"switch\".
+
+multiple.string.literal=La cha�ne {0} apparait {1} fois dans le fichier.
+
+redundant.throws.classInfo=Impossible d''obtenir les informations relatives � {0}.
+redundant.throws.duplicate=Clause throws redondante : ''{0}'' est pr�sent plus d''une fois.
+redundant.throws.subclass=Clause throws redondante : ''{0}'' est une sous-classe de ''{1}''.
+redundant.throws.unchecked=Clause throws redondante : ''{0}'' est une exception non v�rifi�e.
+
+simplify.boolreturn=Le test peut �tre supprim� et l''expression directement retourn�e.
+simplify.expression=L''expression peut �tre simplifi�e.
+
+nested.if.depth=Le nombre de ''if'' imbriqu� est de {0,number,integer}, alors que le maximum autoris� est de {1,number,integer}.
+nested.try.depth=Le nombre de ''try'' imbriqu� est de {0,number,integer}, alors que le maximum autoris� est de {1,number,integer}.
+
+string.literal.equality=Les chaines de caract�res litt�rales devraient �tre compar�es avec la m�thode equals() et pas avec ''{0}''.
+
+illegal.catch=Catcher l''exception ''{0}'' est prohib�.
+missing.package.declaration=D�claration de package manquante.
+
+junit.method.name=La m�thode ''{0}'' devrait �tre renomm�e ''{1}''.
+junit.method.return.type=La m�thode ''{0}'' devrait �tre d�clar�e avec un type de retour {1}.
+junit.method.parameters=La m�thode ''{0}'' devrait �tre d�clar�e sans param�tres.
+junit.method.public.and.static=La m�thode ''{0}'' devrait �tre d�clar�e statique.
+junit.method.protected.or.public=La m�thode ''{0}'' devrait �tre prot�g�e ou publique.
+junit.method.static=La m�thode ''{0}'' ne devrait pas �tre statique.
+
+return.count=Le nombre de return est de {0,number,integer} alors que le maximum autoris� est de {1,number,integer}.
+
+illegal.type=D�clarer des variables, des valeurs de retour ou des param�tres de type ''{0}'' est interdit.
+
+declaration.order.constructor=La d�finition des constructeurs n''apparait pas dans le bon ordre.
+declaration.order.method=La d�finition des m�thodes n''apparait pas dans le bon ordre.
+declaration.order.static=La d�finition des variables statiques n''apparait pas dans le bon ordre.
+declaration.order.instance=La d�finition des variables d''instance n''apparait pas dans le bon ordre.
+declaration.order.access=La d�finition des variables n''est pas tri�e suivant leur port�e.
+
+parameter.assignment=Il est interdit d''affecter une valeur au param�tre ''{0}''.
+
+modified.control.variable=La variable de controle ''{0}'' est modifi�e.
+
+explicit.init=L''initialisation explicite de la variable ''{0}'' � la valeur ''{1}'' est inutile, c''est la valeur par d�faut pour ce type.
+default.comes.last=Le cas \"default\" devrait apparaitre en dernier dans le bloc \"switch\".
+missing.ctor=Il manque un constructeur � la classe.
+fall.through=Le cas pr�c�dent du \"switch\" ne contient pas de break, return, throw ou continue.
+require.this.variable=La r�f�rence � la variable d''instance ''{0}'' doit utiliser \"this.\".
+require.this.unfound.variable=Impossible de trouver o� ''{0}'' est d�clar�.
+require.this.method=L''appel � la m�thode ''{0}'' n�cessite l''utilisation de  \"this.\".
+multiple.variable.declarations=Ne d�clarez pas plus d''une variable par ligne.
+multiple.variable.declarations.comma=Chaque d�claration de variable doit faire l''objet d''une instruction � part.
+
+unnecessary.paren.assign=Parenth�ses inutiles autour la partie droite de l''affectation.
+unnecessary.paren.expr=Parenth�ses inutiles autour de l''expression.
+unnecessary.paren.ident=Parenth�ses inutiles autour de l''identifiant ''{0}''.
+unnecessary.paren.literal=Parenth�ses inutiles autour de la cha�ne litt�rale ''{0}''.
+unnecessary.paren.return=Parenth�ses inutiles autour de la valeur de retour.
+unnecessary.paren.string=Parenth�ses inutiles autour de la cha�ne {0}.
+
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_ja.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_ja.properties
new file mode 100644
index 0000000..1ab0a4c
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_ja.properties
@@ -0,0 +1,62 @@
+array.trailing.comma=\u914d\u5217\u3067\u306f\u30ab\u30f3\u30de\u304c\u884c\u672b\u306b\u6765\u308b\u3088\u3046\u306b\u3059\u3079\u304d\u3067\u3059\u3002
+
+assignment.inner.avoid=\u5f0f\u5185\u90e8\u3067\u306e\u4ee3\u5165\u306f\u907f\u3051\u308b\u3079\u304d\u3067\u3059\u3002
+
+covariant.equals=equals(java.lang.Object) \u3092\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u305b\u305a\u306b covariant \u306a equals \u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002
+
+empty.statement=\u7a7a\u306e\u6587\u3067\u3059\u3002
+
+equals.noHashCode=''equals()'' \u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u306b\u5bfe\u5fdc\u3059\u308b ''hashCode()'' \u306e\u5b9a\u7fa9\u304c\u3042\u308a\u307e\u305b\u3093\u3002
+
+final.variable=\u5909\u6570 ''{0}'' \u306f final \u3068\u3057\u3066\u5ba3\u8a00\u3059\u3079\u304d\u3067\u3059\u3002
+
+hidden.field=''{0}'' \u304c\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u96a0\u3057\u3066\u3044\u307e\u3059\u3002
+
+illegal.token=''{0}'' \u306e\u4f7f\u7528\u306f\u8a31\u53ef\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
+
+illegal.token.text=\u30c8\u30fc\u30af\u30f3\u306e\u30c6\u30ad\u30b9\u30c8\u304c\u4e0d\u6b63\u306a\u30d1\u30bf\u30fc\u30f3 ''{0}'' \u306b\u4e00\u81f4\u3057\u3066\u3044\u307e\u3059\u3002
+
+instantiation.avoid={0} \u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u306f\u907f\u3051\u308b\u3079\u304d\u3067\u3059\u3002
+
+magic.number=''{0}'' \u306f\u30de\u30b8\u30c3\u30af\u30ca\u30f3\u30d0\u30fc\u3067\u3059\u3002
+
+missing.super.call=\u30e1\u30bd\u30c3\u30c9 ''{0}'' \u306f ''super.{0}'' \u3092\u547c\u3076\u3079\u304d\u3067\u3059\u3002
+missing.switch.default=\"default\" \u7bc0\u306e\u7121\u3044 switch \u6587\u3067\u3059\u3002
+
+redundant.throws.classInfo={0} \u306e\u30af\u30e9\u30b9\u60c5\u5831\u304c\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3002
+redundant.throws.duplicate=\u5197\u9577\u306a throws: ''{0}'' \u304c\u91cd\u8907\u3057\u3066\u3044\u307e\u3059\u3002
+redundant.throws.subclass=\u5197\u9577\u306a throws: ''{0}'' \u306f ''{1}'' \u306e\u30b5\u30d6\u30af\u30e9\u30b9\u3067\u3059\u3002
+redundant.throws.unchecked=\u5197\u9577\u306a throws: ''{0}'' \u306f\u30c1\u30a7\u30c3\u30af\u3055\u308c\u306a\u3044\u4f8b\u5916\u3067\u3059\u3002
+
+simplify.boolreturn=\u6761\u4ef6\u30ed\u30b8\u30c3\u30af\u306f\u306a\u304f\u305b\u307e\u3059\u3002
+simplify.expression=\u8868\u73fe\u306f\u7c21\u6f54\u306b\u3067\u304d\u307e\u3059\u3002
+
+nested.if.depth=\u30cd\u30b9\u30c8\u3057\u305f if-else \u306e\u6df1\u3055\u304c {0,number,integer} \uff08\u6700\u5927 {1,number,integer} \u307e\u3067\uff09\u3067\u3059\u3002
+nested.try.depth=\u30cd\u30b9\u30c8\u3057\u305f try \u306e\u6df1\u3055\u304c {0,number,integer} \uff08\u6700\u5927 {1,number,integer} \u307e\u3067\uff09\u3067\u3059\u3002
+
+string.literal.equality=\u30ea\u30c6\u30e9\u30eb\u306e\u6587\u5b57\u5217\u306f ''{0}'' \u3067\u306f\u306a\u304f\u3001 equals() \u3092\u4f7f\u7528\u3057\u3066\u6bd4\u8f03\u3059\u308b\u3079\u304d\u3067\u3059\u3002
+
+illegal.catch=''{0}'' \u3092\u30ad\u30e3\u30c3\u30c1\u3059\u308b\u3053\u3068\u306f\u8a31\u53ef\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
+missing.package.declaration=package \u5ba3\u8a00\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
+
+junit.method.name=\u30e1\u30bd\u30c3\u30c9 ''{0}'' \u306f ''{1}'' \u3068\u547d\u540d\u3059\u3079\u304d\u3067\u3059\u3002
+junit.method.return.type=\u30e1\u30bd\u30c3\u30c9 ''{0}'' \u306f\u623b\u308a\u5024\u306e\u578b\u3092 {1} \u3068\u3057\u3066\u5ba3\u8a00\u3059\u3079\u304d\u3067\u3059\u3002
+junit.method.parameters=\u30e1\u30bd\u30c3\u30c9 ''{0}'' \u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u306a\u3057\u3067\u5ba3\u8a00\u3059\u3079\u304d\u3067\u3059\u3002
+junit.method.public.and.static=\u30e1\u30bd\u30c3\u30c9 ''{0}'' \u306f static \u3068\u3057\u3066\u5ba3\u8a00\u3059\u3079\u304d\u3067\u3059\u3002
+junit.method.protected.or.public=\u30e1\u30bd\u30c3\u30c9 ''{0}'' \u306f public \u304b protected \u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+junit.method.static=\u30e1\u30bd\u30c3\u30c9 ''{0}'' \u306f static \u3067\u3042\u308b\u3079\u304d\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002
+
+return.count=return \u304c {0,number,integer} \u500b\u6240\u3042\u308a\u307e\u3059\uff08\u6700\u5927 {1,number,integer} \u307e\u3067\uff09\u3002
+
+illegal.type=''{0}'' \u578b\u306e\u5909\u6570\u3001\u623b\u308a\u5024\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u5ba3\u8a00\u3059\u308b\u3053\u3068\u306f\u8a31\u53ef\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
+
+declaration.order.constructor=\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306e\u5b9a\u7fa9\u9806\u5e8f\u304c\u9593\u9055\u3063\u3066\u3044\u307e\u3059\u3002
+declaration.order.method=\u30e1\u30bd\u30c3\u30c9\u306e\u5b9a\u7fa9\u9806\u5e8f\u304c\u9593\u9055\u3063\u3066\u3044\u307e\u3059\u3002
+declaration.order.static=static \u5909\u6570\u306e\u5b9a\u7fa9\u9806\u5e8f\u304c\u9593\u9055\u3063\u3066\u3044\u307e\u3059\u3002
+declaration.order.instance=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5909\u6570\u306e\u5b9a\u7fa9\u9806\u5e8f\u304c\u9593\u9055\u3063\u3066\u3044\u307e\u3059\u3002
+declaration.order.access=\u5909\u6570\u30a2\u30af\u30bb\u30b9\u306e\u5b9a\u7fa9\u9806\u5e8f\u304c\u9593\u9055\u3063\u3066\u3044\u307e\u3059\u3002
+
+parameter.assignment=\u30d1\u30e9\u30e1\u30fc\u30bf ''{0}'' \u3078\u306e\u4ee3\u5165\u306f\u8a31\u53ef\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
+
+explicit.init=\u5909\u6570 ''{0}'' \u304c\u660e\u793a\u7684\u306b ''{1}'' \uff08\u3053\u306e\u578b\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\uff09\u306b\u521d\u671f\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002
+
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_pt.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_pt.properties
new file mode 100644
index 0000000..82d8152
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_pt.properties
@@ -0,0 +1,39 @@
+array.trailing.comma=O vector deve ter uma virgula final.
+assignment.inner.avoid=As atribui��es internas devem ser evitadas.
+covariant.equals=\"equals\" covariante sem implementar equals(java.lang.Object).
+declaration.order.access=Defini��o de acesso a vari�vel em ordem errada.
+declaration.order.constructor=Defini��o de construtor em ordem errada.
+declaration.order.instance=Defini��o de vari�vel de inst�ncia em ordem errada.
+declaration.order.method=Defini��o de m�todo em ordem errada.
+declaration.order.static=Defini��o de vari�vel est�tica em ordem errada.
+empty.statement=Declara��o vazia.
+equals.noHashCode=Defini��o de ''equals()'' sem a defini��o de ''hashCode()''.
+explicit.init=Vari�vel ''{0}'' inicializada explicitamente para ''{1}'' (valor por omiss�o para o seu tipo).
+final.variable=Vari�vel ''{0}'' deve ser declarada final.
+hidden.field=''{0}'' esconde um campo.
+illegal.catch=O tratamento de ''{0}'' n�o � permitido.
+illegal.token.text=Texto do elemento coincide com o padr�o ilegal ''{0}''.
+illegal.token=N�o � permitida a utiliza��o de ''{0}''.
+illegal.type=A declara��o de vari�veis, valores de retorno ou par�metros do tipo ''{0}'' n�o � permitida.
+instantiation.avoid=A instancia��o de {0} deve ser evitada.
+junit.method.name=O m�todo ''{0}'' deveria ser chamado ''{1}''.
+junit.method.parameters=O m�todo ''{0}'' deve ser declarado sem par�metros.
+junit.method.protected.or.public=O m�todo ''{0}'' deve ser p�blico ou protegido.
+junit.method.public.and.static=O m�todo ''{0}'' deve ser declarado est�tico.
+junit.method.return.type=O m�todo ''{0}'' deve ser declarado com o tipo de retorno {1}.
+junit.method.static=O m�todo ''{0}'' n�o deve ser est�tico.
+magic.number=''{0}'' � um n�mero m�gico.
+missing.package.declaration=Falta a declara��o do pacote.
+missing.super.call=Method ''{0}'' deve chamar ''super.{0}''.
+missing.switch.default=switch sem o ramo \"default\".
+nested.if.depth=Profundidade de \"if-else\" � {0,number,integer} (m�ximo permitido � {1,number,integer}).
+nested.try.depth=Profundidade de \"try\" � {0,number,integer} (m�ximo permitido � {1,number,integer}).
+parameter.assignment=A atribui��o ao par�metro ''{0}'' n�o � permitda.
+redundant.throws.classInfo=N�o foi poss�vel obter os dados da classe {0}.
+redundant.throws.duplicate=throws redundante: ''{0}'' listado mais do que uma vez.
+redundant.throws.subclass=throws redundante: ''{0}'' � uma sub-classe de ''{1}''.
+redundant.throws.unchecked=throws redundante: ''{0}'' � um excep��o n�o-verificada.
+return.count=O n�mero de \"return\"s � {0,number,integer} (m�ximo permitido � {1,number,integer}).
+simplify.boolreturn=A l�gica condicional pode ser removida.
+simplify.expression=Express�o pode ser simplicada.
+string.literal.equality=\"Strings\" literais devem ser comparadas com equals(), n�o ''{0}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_tr.properties
new file mode 100644
index 0000000..45f0b6b
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/coding/messages_tr.properties
@@ -0,0 +1,98 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+array.trailing.comma = Dizi, takip eden bir virg\u00FCl i\u00E7ermelidir.
+
+assignment.inner.avoid = Dahili atamalar kullan\u0131lmamal\u0131d\u0131r.
+
+avoid.clone.method     = ''clone'' metodu kullan\u0131lmamal\u0131d\u0131r.
+avoid.finalizer.method = ''finalize'' metodu kullan\u0131lmamal\u0131d\u0131r.
+
+covariant.equals = java.lang.Object s\u0131n\u0131f\u0131n\u0131n ''equals'' metodundan ba\u015Fka bir ''equals'' metodu tan\u0131mlanm\u0131\u015F, java.lang.Object s\u0131n\u0131f\u0131ndan gelen ''equals'' metodu da ezilmelidir (override).
+
+declaration.order.access      = De\u011Fi\u015Fken, eri\u015Fim seviyesine g\u00F6re yanl\u0131\u015F s\u0131rada tan\u0131mlanm\u0131\u015F.
+declaration.order.constructor = ''constructor'' tan\u0131m\u0131 yanl\u0131\u015F s\u0131rada yap\u0131lm\u0131\u015F.
+declaration.order.instance    = De\u011Fi\u015Fken tan\u0131m\u0131 yanl\u0131\u015F s\u0131rada yap\u0131lm\u0131\u015F.
+declaration.order.method      = Metot tan\u0131m\u0131 yanl\u0131\u015F s\u0131rada yap\u0131lm\u0131\u015F.
+declaration.order.static      = ''static'' de\u011Fi\u015Fken tan\u0131m\u0131 yanl\u0131\u015F s\u0131rada yap\u0131lm\u0131\u015F.
+
+default.comes.last = ''switch'' i\u00E7erisindeki ''default'' ifadesi son durum olarak yer almal\u0131d\u0131r.
+
+doublechecked.locking.avoid = Double-Checked Locking (DCL - lock mekanizmas\u0131nda ikili kontrol) yap\u0131lmam\u0131\u015F.
+
+empty.statement = Bo\u015F ifade.
+
+equals.avoid.null           = ''equals'' metodunda kullan\u0131lan harflerden olu\u015Fan ifadeler ''equals'' metodunun sol taraf\u0131nda yer almal\u0131d\u0131r.
+equals.noHashCode           = ''equals'' metodu tan\u0131mlayan s\u0131n\u0131flar ''hashCode'' metodunu da tan\u0131mlamal\u0131d\u0131r.
+
+equalsIgnoreCase.avoid.null = ''equalsIgnoreCase'' metodunda kullan\u0131lan harflerden olu\u015Fan ifadeler ''equalsIgnoreCase'' metodunun sol taraf\u0131nda yer almal\u0131d\u0131r.
+
+explicit.init = ''{0}'' de\u011Fi\u015Fkeni (verilmese bile zaten ilklendirme de\u011Feri olan) ''{1}'' de\u011Feriyle ilklendirilmi\u015F.
+
+fall.through      = ''switch'' ifadesinin bir \u00F6nceki durumundan a\u015Fa\u011F\u0131 d\u00FC\u015Fme mevcut (''break'' kullan\u0131lmam\u0131\u015F olabilir).
+fall.through.last = ''switch'' ifadesinin son durumundan a\u015Fa\u011F\u0131 d\u00FC\u015Fme mevcut (''break'' kullan\u0131lmam\u0131\u015F olabilir).
+
+final.variable = ''{0}'' de\u011Fi\u015Fkeni ''final'' olarak tan\u0131mlanmal\u0131d\u0131r.
+
+hidden.field = ''{0}'', ba\u015Fka bir alan\u0131 gizliyor.
+
+illegal.catch      = ''{0}'' istisnas\u0131n\u0131/hatas\u0131n\u0131 yakalamaya izin verilmiyor.
+illegal.throw      = ''{0}'' istisnas\u0131n\u0131/hatas\u0131n\u0131 f\u0131rlatmaya izin verilmiyor.
+illegal.token      = ''{0}'' kullan\u0131m\u0131na izin verilmiyor.
+illegal.token.text = \u0130zin verilmeyen bir kal\u0131p kullan\u0131lm\u0131\u015F ''{0}''.
+illegal.type       = ''{0}'' tipinde de\u011Fi\u015Fken, d\u00F6n\u00FC\u015F de\u011Feri ya da parametre tan\u0131mlanmamal\u0131d\u0131r.
+
+inline.conditional.avoid = Sat\u0131r i\u00E7i ko\u015Fullu ifadeler kullan\u0131lmamal\u0131d\u0131r.
+
+instantiation.avoid = {0} s\u0131n\u0131f\u0131n\u0131n yeni nesnesi \u00FCretilmemelidir.
+
+junit.method.name                = ''{0}'' metodu ''{1}'' olarak adland\u0131r\u0131lmal\u0131d\u0131r.
+junit.method.parameters          = ''{0}'' metodu parametresiz olarak tan\u0131mlanmal\u0131.
+junit.method.protected.or.public = ''{0}'' metodu ''public'' ya da ''protected'' olmal\u0131.
+junit.method.public.and.static   = ''{0}'' metodu ''static'' olarak tan\u0131mlanmal\u0131.
+junit.method.return.type         = ''{0}'' metodunun d\u00F6n\u00FC\u015F tipi ''{1}'' olmal\u0131.
+junit.method.static              = ''{0}'' metodu ''static'' olarak tan\u0131mlanmamal\u0131.
+
+magic.number = ''{0}'' say\u0131s\u0131 ''magic number''d\u0131r. \u00D6nce tan\u0131mlanmal\u0131, sonra kullan\u0131lmal\u0131.
+
+missing.ctor                = S\u0131n\u0131f, bir ''constructor'' tan\u0131mlamal\u0131.
+missing.package.declaration = Paket tan\u0131m\u0131 yap\u0131lmam\u0131\u015F.
+missing.super.call          = ''{0}'' metodu ''super.{0}'' metodunu \u00E7a\u011F\u0131rmal\u0131.
+missing.switch.default      = ''default'' olmadan ''switch'' kullan\u0131lm\u0131\u015F.
+
+modified.control.variable = Kontrol de\u011Fi\u015Fkeninin de\u011Feri de\u011Fi\u015Ftirilmi\u015F.
+
+multiple.statements.line             = Her sat\u0131rda sadece bir ifade olmal\u0131d\u0131r.
+multiple.string.literal              = ''{0}'' de\u011Feri dosyada {1} defa kullan\u0131lm\u0131\u015F.
+multiple.variable.declarations       = Her sat\u0131rda sadece bir de\u011Fi\u015Fken tan\u0131mlanmal\u0131.
+multiple.variable.declarations.comma = Her de\u011Fi\u015Fken tan\u0131m\u0131 kendi ifadesinde yer almal\u0131.
+
+nested.for.depth = \u0130\u00E7 i\u00E7e kullan\u0131lan ''for'' say\u0131s\u0131 {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+nested.if.depth  = \u0130\u00E7 i\u00E7e kullan\u0131lan ''if-else'' say\u0131s\u0131 {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+nested.try.depth = \u0130\u00E7 i\u00E7e kullan\u0131lan ''try'' say\u0131s\u0131 {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+
+package.dir.mismatch = Paket tan\u0131m\u0131 ''{0}'' klas\u00F6r\u00FCyle e\u015Fle\u015Fmiyor.
+
+parameter.assignment = ''{0}'' parametresine atama yap\u0131lamaz.
+
+redundant.throws.classInfo = {0} i\u00E7in s\u0131n\u0131f bilgisi al\u0131nam\u0131yor.
+redundant.throws.duplicate = ''throws'' ifadesinde ''{0}'' tekrardan kullan\u0131lm\u0131\u015F.
+redundant.throws.subclass  = ''{0}'', ''{1}'' s\u0131n\u0131f\u0131n\u0131n alt s\u0131n\u0131f\u0131d\u0131r, ''throws'' kullan\u0131m\u0131 gereksizdir.
+redundant.throws.unchecked = ''{0}'' ''unchecked'' bir istisnad\u0131r, ''throws'' kullan\u0131m\u0131 gereksizdir.
+
+require.this.method           = ''{0}'' metoduna eri\u015Fim "this." kullan\u0131larak yap\u0131lmal\u0131d\u0131r.
+require.this.unfound.variable = ''{0}'' ifadesinin nerede tan\u0131mland\u0131\u011F\u0131 bilinmiyor.
+require.this.variable         = ''{0}'' de\u011Fi\u015Fkenine eri\u015Fim "this." kullan\u0131larak yap\u0131lmal\u0131d\u0131r.
+
+return.count = Kullan\u0131lan ''return'' say\u0131s\u0131 {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+
+simplify.boolreturn = Ko\u015Ful mant\u0131\u011F\u0131 kald\u0131r\u0131labilir.
+simplify.expression = \u0130fade sadele\u015Ftirilebilir.
+
+string.literal.equality = ''String'' ifadeleri ''{0}'' kullanarak de\u011Fil, equals() metodu kullanarak kar\u015F\u0131la\u015Ft\u0131r\u0131lmal\u0131.
+
+unnecessary.paren.assign  = Atama ifadesinin sa\u011F taraf\u0131nda gereksiz parantez mevcut.
+unnecessary.paren.expr    = \u0130fadenin etraf\u0131nda gereksiz parantez mevcut.
+unnecessary.paren.ident   = ''{0}'' belirte\u00E7inin etraf\u0131nda gereksiz parantez mevcut.
+unnecessary.paren.literal = ''{0}'' etraf\u0131nda gereksiz parantez mevcut.
+unnecessary.paren.return  = Geri d\u00F6n\u00FC\u015F de\u011Feri etraf\u0131nda gereksiz parantez mevcut.
+unnecessary.paren.string  = ''{0}'' etraf\u0131nda gereksiz parantez mevcut.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages.properties
new file mode 100644
index 0000000..df4b6d8
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages.properties
@@ -0,0 +1,9 @@
+arrangement.members.before.inner=Fields and methods should be before inner classes.
+design.forExtension=Method ''{0}'' is not designed for extension - needs to be abstract, final or empty.
+final.class=Class {0} should be declared as final.
+interface.type=interfaces should describe a type and hence have methods.
+variable.notPrivate=Variable ''{0}'' must be private and have accessor methods.
+mutable.exception=The field ''{0}'' must be declared final.
+throws.count=Throws count is {0,number,integer} (max allowed is {1,number,integer}).
+hide.utility.class=Utility classes should not have a public or default constructor.
+one.top.level.class=Top-level class {0} has to reside in its own source file.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_de.properties
new file mode 100644
index 0000000..3b0aa53
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_de.properties
@@ -0,0 +1,9 @@
+arrangement.members.before.inner=Felder und Methoden sollten vor inneren Klassen stehen.
+design.forExtension=Die Methode ''{0}'' ist nicht f�r Vererbung entworfen - muss abstract, final oder leer sein.
+final.class=Die Klasse {0} sollte als final deklariert sein, da alle ihre Konstruktoren private sind.
+interface.type=Interfaces sollten einen Typ beschreiben und darum Methoden beinhalten.
+variable.notPrivate=Variable ''{0}'' muss private sein.
+mutable.exception=Das Feld ''{0}'' muss final deklariert sein.
+throws.count=Anzahl der throws-Anweisungen ist {0,number,integer} (Obergrenze ist {1,number,integer}).
+hide.utility.class=Konstruktoren von Hilfsklassen sollten nicht public oder default deklariert sein.
+one.top.level.class=Die Top-Level-Klasse {0} muss in einer eigenen Datei liegen.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_es.properties
new file mode 100644
index 0000000..0aee407
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_es.properties
@@ -0,0 +1,6 @@
+design.forExtension=El m�todo ''{0}'' no est� dise�ado para ser extendido - necesita ser abstracto, final o vac�o.
+final.class=La clase {0} deber�a declararse final.
+interface.type=Los interfaces deber�an describir tipos y por tanto tener m�todos.
+variable.notPrivate=La variable ''{0}'' debe ser privada y tener m�todos de acceso.
+mutable.exception=El campo ''{0}'' debe declararse final.
+throws.count=El n�mero de throws es {0,number,integer} (m�ximo permitido es {1,number,integer}).
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_fi.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_fi.properties
new file mode 100644
index 0000000..9386019
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_fi.properties
@@ -0,0 +1,5 @@
+design.forExtension=Metodia ''{0}'' ei ole suunniteltu laajennettavaksi - pitäisi olla abstrakti, final tai tyhjä.
+final.class=Luokan {0} pitäisi olla final.
+interface.type=Rajapintojen pitäisi kuvata tyyppiä ja siten sisältää metodeja.
+variable.notPrivate=Muuttujan ''{0}'' pitää olla private ja sillä pitää olla accessorimetodit.
+throws.count=Heitettyjen poikkeusten lukumäärä on {0,number,integer} (suurin sallittu on {1,number,integer}).
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_fr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_fr.properties
new file mode 100644
index 0000000..8adf242
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_fr.properties
@@ -0,0 +1,9 @@
+design.forExtension=La m�thode ''{0}'' n''est pas con�ue pour �tre d�riv�e - il faut la d�clarer abstraite, finale ou la laisser vide.
+final.class=La classe {0} devrait �tre d�clar�e finale.
+interface.type=Les interfaces devraient d�crire des types et, � ce titre, comporter des m�thodes.
+variable.notPrivate=La variable ''{0}'' devrait �tre priv�e et avoir des accesseurs.
+mutable.exception=L''attribut ''{0}'' devrait �tre d�clar�e final.
+throws.count=Le nombre de clause \"throws\" {0,number,integer}, alors que le maximum autoris� est de {1,number,integer}.
+throws.count=Le nombre de clause \"throws\" est de {0,number,integer}, alors que le maximum autoris� est de {1,number,integer}.
+
+hide.utility.class=Les classes utilitaires ne doivent pas avoir de constructeur par d�faut ou public.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_ja.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_ja.properties
new file mode 100644
index 0000000..299c0b0
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_ja.properties
@@ -0,0 +1,7 @@
+design.forExtension=\u30e1\u30bd\u30c3\u30c9 ''{0}'' \u306f\u62e1\u5f35\u3059\u308b\u3088\u3046\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u305b\u3093 - abstract \u304b final \u304b\u7a7a\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002
+final.class=\u30af\u30e9\u30b9 {0} \u306f final \u3068\u3057\u3066\u5ba3\u8a00\u3059\u3079\u304d\u3067\u3059\u3002
+interface.type=\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u306f\u578b\u3092\u8a18\u8ff0\u3059\u308b\u3082\u306e\u3067\u3042\u308a\u3001\u30e1\u30bd\u30c3\u30c9\u3092\u6301\u3064\u3079\u304d\u3067\u3059\u3002
+variable.notPrivate=\u5909\u6570 ''{0}'' \u306f private \u3068\u3057\u3001\u30a2\u30af\u30bb\u30c3\u30b5\u30e1\u30bd\u30c3\u30c9\u3092\u6301\u3064\u3079\u304d\u3067\u3059\u3002
+mutable.exception=\u30d5\u30a3\u30fc\u30eb\u30c9 ''{0}'' \u306f final \u5ba3\u8a00\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+throws.count=throws \u306e\u6570\u304c {0,number,integer} \uff08\u6700\u5927 {1,number,integer} \u307e\u3067\uff09\u3067\u3059\u3002
+
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_pt.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_pt.properties
new file mode 100644
index 0000000..43a830a
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_pt.properties
@@ -0,0 +1,6 @@
+design.forExtension=O m�todo ''{0}'' n�o foi concebido para extens�o - precisa de ser abstracto, final ou vazio.
+final.class=A classe {0} deve ser declarada como final.
+interface.type=As interfaces devem descrever um tipo e portanto devem ter m�todos.
+mutable.exception=O campo ''{0}'' deve ser declarado final.
+throws.count=O n�mero de \"throws\" � {0,number,integer} (m�x. permitido � {1,number,integer}).
+variable.notPrivate=Vari�vel ''{0}'' deve ser privada e ter m�todos acessores.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_tr.properties
new file mode 100644
index 0000000..5507c57
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/design/messages_tr.properties
@@ -0,0 +1,17 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+arrangement.members.before.inner = Alanlar ve metotlar i\u00E7 s\u0131n\u0131flardan \u00F6nce olmal\u0131.
+
+design.forExtension = ''{0}'' metodu kendinden t\u00FCretmek i\u00E7in tasarlanmad\u0131 - ''abstract'' ya da ''final'' olarak tan\u0131mlanmal\u0131, veya i\u00E7i bo\u015F olmal\u0131.
+
+final.class = {0} s\u0131n\u0131f\u0131 ''final'' olarak tan\u0131mlanmal\u0131.
+
+hide.utility.class = Utility s\u0131n\u0131flar\u0131 (sadece ''static'' metotlar i\u00E7eren s\u0131n\u0131flar) ''public'' ya da varsay\u0131lan bir ''constructor'' i\u00E7ermemelidir.
+
+interface.type = Aray\u00FCzler bir t\u00FCr olarak tan\u0131mlanmal\u0131, dolay\u0131s\u0131yla metotlar\u0131 olmal\u0131.
+
+mutable.exception = ''{0}'' alan\u0131 ''final'' olarak tan\u0131mlanmal\u0131.
+
+throws.count = Kullan\u0131lan ''throws'' say\u0131s\u0131 {0,number,integer} (maksimum izin verilen say\u0131 {1,number,integer}).
+
+variable.notPrivate = ''{0}'' de\u011Fi\u015Fkeni ''private'' olarak tan\u0131mlanmal\u0131 ve  eri\u015Fim metotlar\u0131na(getter/setter) sahip olmal\u0131.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/duplicates/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/duplicates/messages.properties
new file mode 100644
index 0000000..8de48fb
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/duplicates/messages.properties
@@ -0,0 +1 @@
+duplicates.lines=Found duplicate of {0} lines in {1}, starting from line {2}
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/duplicates/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/duplicates/messages_de.properties
new file mode 100644
index 0000000..fdbed12
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/duplicates/messages_de.properties
@@ -0,0 +1 @@
+duplicates.lines={0} gleiche Zeilen in {1}, beginnend bei Zeile {2}
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/duplicates/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/duplicates/messages_es.properties
new file mode 100644
index 0000000..27b4491
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/duplicates/messages_es.properties
@@ -0,0 +1 @@
+duplicates.lines=Se encontraron {0} l�neas duplicadas en {1}, comenzando en la l�nea {2}
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/duplicates/messages_fr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/duplicates/messages_fr.properties
new file mode 100644
index 0000000..2843f38
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/duplicates/messages_fr.properties
@@ -0,0 +1 @@
+duplicates.lines=Copier-coller de {0} lignes dans {1}, � partir de la ligne {2}
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/duplicates/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/duplicates/messages_tr.properties
new file mode 100644
index 0000000..4a3f27e
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/duplicates/messages_tr.properties
@@ -0,0 +1,3 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+duplicates.lines = ''{1}'' dosyas\u0131nda {2} numaral\u0131 sat\u0131rdan itibaren {0} sat\u0131r tekrarlanm\u0131\u015F ifade bulundu.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages.properties
new file mode 100644
index 0000000..7903b89
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages.properties
@@ -0,0 +1,2 @@
+header.missing=Missing a header - not enough lines in file.
+header.mismatch=Line does not match expected header line of ''{0}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_de.properties
new file mode 100644
index 0000000..d32e7ab
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_de.properties
@@ -0,0 +1,2 @@
+header.missing=Header fehlt - Datei hat nicht genug Zeilen.
+header.mismatch=Zeile entspricht nicht der erwarteten Header-Zeile ''{0}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_es.properties
new file mode 100644
index 0000000..5ddaa6a
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_es.properties
@@ -0,0 +1,2 @@
+header.missing=Falta una cabecera - no hay l�neas suficientes en el fichero.
+header.mismatch=La l�nea no coincide con la l�nea de cabecera esperada ''{0}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_fi.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_fi.properties
new file mode 100644
index 0000000..2cbfbdb
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_fi.properties
@@ -0,0 +1,2 @@
+header.missing=Headeri puuttuu - ei riitt�v�sti rivej� tiedostossa.
+header.mismatch=Rivi ei ole odotetun ''{0}'' headerin mukainen.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_fr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_fr.properties
new file mode 100644
index 0000000..8dac4e7
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_fr.properties
@@ -0,0 +1,2 @@
+header.missing=En-t�te manquante - Le fichier ne contient pas assez de lignes.
+header.mismatch=La ligne ne correspond pas � la ligne d''en-t�te attendue ''{0}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_ja.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_ja.properties
new file mode 100644
index 0000000..a58c164
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_ja.properties
@@ -0,0 +1,2 @@
+header.missing=\u30d8\u30c3\u30c0\u304c\u3042\u308a\u307e\u305b\u3093 - \u30d5\u30a1\u30a4\u30eb\u306e\u884c\u6570\u304c\u4e0d\u8db3\u3057\u3066\u3044\u307e\u3059\u3002
+header.mismatch=\u884c\u304c\u671f\u5f85\u3055\u308c\u308b\u30d8\u30c3\u30c0\u884c ''{0}'' \u3068\u5408\u81f4\u3057\u307e\u305b\u3093\u3002
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_pt.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_pt.properties
new file mode 100644
index 0000000..f40c459
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_pt.properties
@@ -0,0 +1,2 @@
+header.mismatch=A linha n�o condiz com a linha de cabe�alho esperada ''{0}''.
+header.missing=Falta o cabe�alho - o ficheiro n�o tem linhas suficientes.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_tr.properties
new file mode 100644
index 0000000..21c4c77
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/header/messages_tr.properties
@@ -0,0 +1,4 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+header.mismatch = Sat\u0131r, beklenen ba\u015Fl\u0131k sat\u0131r\u0131 olan ''{0}'' ile e\u015Fle\u015Fmiyor.
+header.missing  = Ba\u015Fl\u0131k eksik - dosyada yeterli sat\u0131r yok.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_0.dtd b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_0.dtd
new file mode 100644
index 0000000..94a2a90
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_0.dtd
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Add the following to any file that is to be validated against this DTD:
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Import Control 1.0//EN"
+    "http://www.puppycrawl.com/dtds/import_control_1_0.dtd">
+-->
+
+<!--
+  The root element of the configuration file.
+-->
+<!ELEMENT import-control ((allow|disallow)*,subpackage*)>
+
+<!--
+  pkg - The root package to be checked. For example "com.puppycrawl".
+-->
+<!ATTLIST import-control
+          pkg NMTOKEN #REQUIRED>
+
+<!--
+  Represents a subpackage of the parent element.
+-->
+<!ELEMENT subpackage ((allow|disallow)*,subpackage*)>
+
+<!--
+  name - The name of the subpackage. For example if the name is "tools"
+  and the pa the parent is "com.puppycrawl", then it corresponds to the
+  package "com.puppycrawl.tools".
+-->
+<!ATTLIST subpackage
+  name NMTOKEN #REQUIRED>
+
+<!--
+  Represents attributes for a guard which can either allow or disallow
+  access.
+
+  pkg - The fully qualified name of the package to guard. Cannot be
+  specified in conjunction with "class".
+
+  class - The fully qualified name of the class to guard. Cannot be
+  specified in conjunction with "pkg".
+
+  exact-match - Only valid with "pkg". Specifies whether the package
+  name matching should be exact. For example, the pkg
+  "com.puppycrawl.tools" will match the import
+  "com.puppycrawl.tools.checkstyle.api.*" when the option is not set,
+  but will not match is the option is set.
+
+  local-only - Indicates that the guard is to apply only to the current
+  package and not to subpackages.
+
+-->
+<!ENTITY % attlist.guard "
+  pkg NMTOKEN #IMPLIED
+  exact-match (true) #IMPLIED
+  class NMTOKEN #IMPLIED
+  local-only (true) #IMPLIED">
+
+<!--
+  Represents a guard that will allow access.
+-->
+<!ELEMENT allow EMPTY>
+<!ATTLIST allow
+  %attlist.guard;>
+
+<!--
+  Represents a guard that will disallow access.
+-->
+<!ELEMENT disallow EMPTY>
+<!ATTLIST disallow
+  %attlist.guard;>
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_1.dtd b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_1.dtd
new file mode 100644
index 0000000..f6d57b7
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_1.dtd
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Add the following to any file that is to be validated against this DTD:
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Import Control 1.1//EN"
+    "http://www.puppycrawl.com/dtds/import_control_1_1.dtd">
+-->
+
+<!--
+  The root element of the configuration file.
+-->
+<!ELEMENT import-control ((allow|disallow)*,subpackage*)>
+
+<!--
+  pkg - The root package to be checked. For example "com.puppycrawl".
+-->
+<!ATTLIST import-control
+          pkg NMTOKEN #REQUIRED>
+
+<!--
+  Represents a subpackage of the parent element.
+-->
+<!ELEMENT subpackage ((allow|disallow)*,subpackage*)>
+
+<!--
+  name - The name of the subpackage. For example if the name is "tools"
+  and the pa the parent is "com.puppycrawl", then it corresponds to the
+  package "com.puppycrawl.tools".
+-->
+<!ATTLIST subpackage
+  name NMTOKEN #REQUIRED>
+
+<!--
+  Represents attributes for a guard which can either allow or disallow
+  access.
+
+  pkg - The fully qualified name of the package to guard. Cannot be
+  specified in conjunction with "class".
+
+  class - The fully qualified name of the class to guard. Cannot be
+  specified in conjunction with "pkg".
+
+  exact-match - Only valid with "pkg". Specifies whether the package
+  name matching should be exact. For example, the pkg
+  "com.puppycrawl.tools" will match the import
+  "com.puppycrawl.tools.checkstyle.api.*" when the option is not set,
+  but will not match is the option is set.
+
+  local-only - Indicates that the guard is to apply only to the current
+  package and not to subpackages.
+
+  regex - Indicates that the class or package name has to be interpreted as
+  regular expression.
+-->
+<!ENTITY % attlist.guard "
+  pkg CDATA #IMPLIED
+  exact-match (true) #IMPLIED
+  class CDATA #IMPLIED
+  local-only (true) #IMPLIED
+  regex (true) #IMPLIED">
+
+<!--
+  Represents a guard that will allow access.
+-->
+<!ELEMENT allow EMPTY>
+<!ATTLIST allow
+  %attlist.guard;>
+
+<!--
+  Represents a guard that will disallow access.
+-->
+<!ELEMENT disallow EMPTY>
+<!ATTLIST disallow
+  %attlist.guard;>
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages.properties
new file mode 100644
index 0000000..151b211
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages.properties
@@ -0,0 +1,16 @@
+import.avoidStar=Using the ''.*'' form of import should be avoided - {0}.
+import.avoidStatic=Using a static member import should be avoided - {0}.
+import.duplicate=Duplicate import to line {0,number,integer} - {1}.
+import.illegal=Import from illegal package - {0}.
+import.lang=Redundant import from the java.lang package - {0}.
+import.same=Redundant import from the same package - {0}.
+import.unused=Unused import - {0}.
+import.ordering=Wrong order for ''{0}'' import.
+import.separation=''{0}'' should be separated from previous imports.
+import.control.missing.file=Missing an import control file.
+import.control.disallowed=Disallowed import - {0}.
+import.control.unknown.pkg=Import control file does not handle this package.
+custom.import.order=Import statement is in the wrong order. Should be in the ''{0}'' group.
+custom.import.order.line.separator=''{0}''should be separated from previous import group.
+custom.import.order.lex=Wrong lexicographical order for ''{0}'' import.
+custom.import.order.nongroup.import=Imports without groups should be placed at the end of the import list.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_de.properties
new file mode 100644
index 0000000..0541cfe
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_de.properties
@@ -0,0 +1,12 @@
+import.avoidStar=Die Form ''.*'' f�r import-Anweisungen sollte vermieden werden - {0}.
+import.avoidStatic=Statische Member Imports sollten vermieden werden - {0}.
+import.duplicate=Gleiches import wie Zeile line {0,number,integer} - {1}.
+import.illegal=Import aus verbotenem Package - {0}.
+import.lang=�berfl�ssiges import aus dem Package java.lang - {0}.
+import.same=�berfl�ssiges import aus demselben Package - {0}.
+import.unused=Nicht benutztes import - {0}.
+import.ordering=Falsche Reihenfolge f�r import von ''{0}''.
+import.separation=''{0}'' sollte von vorherigen imports abgesetzt sein.
+import.control.missing.file=Import-Control-Datei fehlt.
+import.control.disallowed=Verbotener Import - {0}.
+import.control.unknown.pkg=Dieses Package wird von der Import-Control-Datei nicht abgedeckt.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_es.properties
new file mode 100644
index 0000000..dd1753b
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_es.properties
@@ -0,0 +1,8 @@
+import.avoidStar=Usar la importaci�n con ''.*'' deber�a evitarse - {0}.
+import.duplicate=import duplicado en la l�nea {0,number,integer} - {1}.
+import.illegal=Importaci�n de un paquete ilegal - {0}.
+import.lang=Importaci�n redundante del paquete java.lang - {0}.
+import.same=Importaci�n redundante del mismo paquete - {0}.
+import.unused=import no usado - {0}.
+import.ordering=Orden incorrecto para el import ''{0}''.
+import.separation=''{0}'' deber�a separarse de los import previos.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_fi.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_fi.properties
new file mode 100644
index 0000000..abaa8bc
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_fi.properties
@@ -0,0 +1,6 @@
+import.avoidStar=Älä käytä import-muotoa ''.*'' - {0}.
+import.duplicate=Duplikaatti-import rivin {0,number,integer} kanssa - {1}.
+import.illegal=Import sääntöjenvastaisesta paketista - {0}.
+import.lang=Tarpeeton import java.lang-paketista - {0}.
+import.same=Tarpeeton import samasta paketista - {0}.
+import.unused=Käyttämätön import - {0}.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_fr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_fr.properties
new file mode 100644
index 0000000..0170972
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_fr.properties
@@ -0,0 +1,8 @@
+import.avoidStar=L''utilisation des import.* est prohib� - {0}.
+import.duplicate=Import dupliqu� � la ligne {0,number,integer} - {1}.
+import.illegal=Import d''un package ill�gal - {0}.
+import.lang=Import redondant car la classe import�e est situ�e dans le package java.lang - {0}.
+import.same=Import redondant car la classe import�e est situ�e dans le m�me package - {0}.
+import.unused=Import inutilis� - {0}.
+import.ordering=L''ordre d''import n''est pas respect� : ''{0}''.
+import.separation=''{0}'' devrait �tre s�par� des imports pr�c�dents.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_ja.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_ja.properties
new file mode 100644
index 0000000..0ab7059
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_ja.properties
@@ -0,0 +1,8 @@
+import.avoidStar=''.*'' \u5f62\u5f0f\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u306e\u4f7f\u7528\u306f\u907f\u3051\u308b\u3079\u304d\u3067\u3059 - {0}\u3002
+import.duplicate={0,number,integer} \u884c\u76ee\u3068\u91cd\u8907\u3059\u308b\u30a4\u30f3\u30dd\u30fc\u30c8\u3067\u3059 - {1}\u3002
+import.illegal=\u4e0d\u6b63\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u304b\u3089\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u3067\u3059 - {0}\u3002
+import.lang=java.lang \u30d1\u30c3\u30b1\u30fc\u30b8\u304b\u3089\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u306f\u5197\u9577\u3067\u3059 - {0}\u3002
+import.same=\u540c\u4e00\u30d1\u30c3\u30b1\u30fc\u30b8\u304b\u3089\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u306f\u5197\u9577\u3067\u3059 - {0}\u3002
+import.unused=\u4f7f\u7528\u3055\u308c\u306a\u3044\u30a4\u30f3\u30dd\u30fc\u30c8\u3067\u3059 - {0}\u3002
+import.ordering=''{0}'' \u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u9806\u5e8f\u304c\u9593\u9055\u3063\u3066\u3044\u307e\u3059\u3002
+import.separation=''{0}'' \u306f\u4e0a\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u6587\u304b\u3089\uff11\u884c\u7a7a\u3051\u308b\u3079\u304d\u3067\u3059\u3002
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_pt.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_pt.properties
new file mode 100644
index 0000000..da027f7
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_pt.properties
@@ -0,0 +1,8 @@
+import.avoidStar=A forma de importa��o ''.*'' deve ser evitada - {0}.
+import.duplicate=Importa��o duplicada na linha {0,number,integer}. - {1}.
+import.illegal=Importa��o de um pacote ilegal - {0}.
+import.lang=Importa��o redundande do pacote java.lang - {0}.
+import.same=Importa��o redundante do mesmo pacote - {0}.
+import.unused=Importa��o n�o utilizada - {0}.
+import.ordering=Ordena��o incorrecta para a importa��o ''{0}''.
+import.separation=''{0}'' deve ser separado das importa��es anteriores.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_tr.properties
new file mode 100644
index 0000000..dc913dc
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/messages_tr.properties
@@ -0,0 +1,14 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+import.avoidStar            = Y\u0131ld\u0131zl\u0131 (''.*'' \u015Feklinde) import kullan\u0131lmamal\u0131d\u0131r - {0}.
+import.avoidStatic          = ''static'' bir ifade ''import'' edilmemeli - {0}.
+import.control.disallowed   = \u0130zin verilmeyen ''import'' kullan\u0131m\u0131 - {0}
+import.control.missing.file = ''import'' kontrol dosyas\u0131 eksik.
+import.control.unknown.pkg  = ''import'' kontrol dosyas\u0131 bu paketi kapsam\u0131yor.
+import.duplicate            = ''import'' ifadesi {0,number,integer} sat\u0131r\u0131nda tekrarlanm\u0131\u015F - {1}.
+import.illegal              = Ge\u00E7ersiz paketten ''import'' yap\u0131lm\u0131\u015F - {0}.
+import.lang                 = ''java.lang'' paketinden gereksiz ''import'' yap\u0131lm\u0131\u015F - {0}.
+import.ordering             = ''{0}'' ''import'' ifadesinin s\u0131ras\u0131 hatal\u0131.
+import.same                 = Ayn\u0131 paketten gereksiz ''import'' yap\u0131lm\u0131\u015F - ''{0}''.
+import.separation           = ''{0}'' ifadesi kendinden \u00F6nceki ''import'' ifadelerinden ayr\u0131lmal\u0131.
+import.unused               = Kullan\u0131lmayan import - {0}.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages.properties
new file mode 100644
index 0000000..c7ccf3f
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages.properties
@@ -0,0 +1,4 @@
+indentation.error.multi=''{0}'' have incorrect indentation level {1}, expected level should be one of the following: {2}.
+indentation.child.error.multi=''{0}'' child have incorrect indentation level {1}, expected level should be one of the following: {2}.
+indentation.error=''{0}'' have incorrect indentation level {1}, expected level should be {2}.
+indentation.child.error=''{0}'' child have incorrect indentation level {1}, expected level should be {2}.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_de.properties
new file mode 100644
index 0000000..addfa5d
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_de.properties
@@ -0,0 +1,3 @@
+indentation.error={0} bei Einr�cktiefe {1} nicht an korrekter Einr�cktiefe {2}
+indentation.child.error=Kind von {0} bei Einr�cktiefe {1} nicht an korrekter Einr�cktiefe {2}
+
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_es.properties
new file mode 100644
index 0000000..b1b10c6
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_es.properties
@@ -0,0 +1,2 @@
+indentation.error={0} en el nivel de sangrado {1} no est� al nivel correcto, {2}
+indentation.child.error={0} el descendiente en el nivel de sangrado {1} no est� al nivel correcto, {2}
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_fi.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_fi.properties
new file mode 100644
index 0000000..96fdff0
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_fi.properties
@@ -0,0 +1 @@
+indentation.error={0} sisennyssyvyydellä {1} ei ole oikealla syvyydellä {2}.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_fr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_fr.properties
new file mode 100644
index 0000000..06f8606
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_fr.properties
@@ -0,0 +1,2 @@
+indentation.error={0} au niveau d''indentation {1} n''est pas indent� correctement ({2})
+indentation.child.error=Le fils de {0} au niveau d''identation {1} n''est pas indent� correctement ({2})
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_ja.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_ja.properties
new file mode 100644
index 0000000..78e8f76
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_ja.properties
@@ -0,0 +1,4 @@
+indentation.error=\u30a4\u30f3\u30c7\u30f3\u30c8\u968e\u5c64 {1} \u306e {0} \u304c\u6b63\u3057\u3044\u30a4\u30f3\u30c7\u30f3\u30c8 {2} \u306b\u3042\u308a\u307e\u305b\u3093
+indentation.child.error=\u30a4\u30f3\u30c7\u30f3\u30c8\u968e\u5c64 {1} \u306e\u5b50 {0} \u304c\u6b63\u3057\u3044\u30a4\u30f3\u30c7\u30f3\u30c8 {2} \u306b\u3042\u308a\u307e\u305b\u3093
+
+
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_pt.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_pt.properties
new file mode 100644
index 0000000..381c844
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_pt.properties
@@ -0,0 +1,2 @@
+indentation.error={0} no n�vel de indenta��o {1} n�o est� na indenta��o correcta, {2}
+indentation.child.error=Filho de {0} no n�vel de indenta��o {1} n�o est� na indenta��o correcta, {2}
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_tr.properties
new file mode 100644
index 0000000..69e2d8d
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/indentation/messages_tr.properties
@@ -0,0 +1,4 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+indentation.child.error = {0} ifadesi do\u011Fru hizalanmam\u0131\u015F. Bulundu\u011Fu s\u00FCtun {1}, olmas\u0131 gereken s\u00FCtun {2}.
+indentation.error       = {0} ifadesi do\u011Fru hizalanmam\u0131\u015F. Bulundu\u011Fu s\u00FCtun {1}, olmas\u0131 gereken s\u00FCtun {2}.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages.properties
new file mode 100644
index 0000000..63625d3
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages.properties
@@ -0,0 +1,21 @@
+javadoc.classInfo=Unable to get class information for {0} tag ''{1}''.
+javadoc.expectedTag=Expected {0} tag for ''{1}''.
+javadoc.extrahtml=Extra HTML tag found: {0}
+javadoc.incompleteTag=Incomplete HTML tag found: {0}
+javadoc.missing=Missing a Javadoc comment.
+javadoc.noperiod=First sentence should end with a period.
+javadoc.packageHtml=Missing package documentation file.
+javadoc.duplicateTag=Duplicate {0} tag.
+javadoc.return.expected=Expected an @return tag.
+javadoc.unclosedhtml=Unclosed HTML tag found: {0}
+javadoc.unusedTag=Unused {0} tag for ''{1}''.
+javadoc.unusedTagGeneral=Unused Javadoc tag.
+javadoc.empty=Javadoc has empty description section.
+javadoc.writeTag={0}={1}
+javadoc.invalidInheritDoc=Invalid use of the '{'@inheritDoc'}' tag.
+javadoc.legacyPackageHtml=Legacy package.html file should be removed.
+javadoc.packageInfo=Missing package-info.java file.
+javadoc.unknownTag=Unknown tag ''{0}''.
+
+type.missingTag=Type Javadoc comment is missing an {0} tag.
+type.tagFormat=Type Javadoc tag {0} must match pattern ''{1}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_de.properties
new file mode 100644
index 0000000..b0381bc
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_de.properties
@@ -0,0 +1,21 @@
+javadoc.classInfo=Kann zum Tag ''{1}'' keine Klasseninformation zu {0} laden.
+javadoc.expectedTag=Erwartete Tag {0} f�r ''{1}''.
+javadoc.extrahtml=Unerwarteter schlie�ender HTML-Tag: {0}
+javadoc.incompleteTag=Unvollst�ndiger HTML-Tag: {0}
+javadoc.missing=Javadoc-Kommentar fehlt.
+javadoc.noperiod=Der erste Satz sollte mit einem Punkt abschlie�en.
+javadoc.packageHtml=Fehlende Package-Dokumentation.
+javadoc.duplicateTag=Doppelter {0}-Tag.
+javadoc.return.expected=Fehlender @return-Tag.
+javadoc.unclosedhtml=HTML-Tag {0} wird nicht geschlossen.
+javadoc.unusedTag=Nicht benutztes {0}-Tag f�r ''{1}''.
+javadoc.unusedTagGeneral=Nicht benutzter Javadoc-Tag.
+javadoc.empty=Javadoc enth�lt keine Beschreibung.
+javadoc.writeTag={0}={1}
+javadoc.invalidInheritDoc=Unerlaubte Verwendung des Tags '{'@inheritDoc'}'.
+javadoc.legacyPackageHtml=Die veraltete Datei package.html sollte entfernt werden.
+javadoc.packageInfo=package-info.java fehlt.
+javadoc.unknownTag=Unbekanntes Tag ''{0}''.
+
+type.missingTag=In der Klassen-Dokumentation fehlt ein {0}-Tag.
+type.tagFormat=Der Javadoc-Tag {0} entspricht nicht dem Muster ''{1}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_es.properties
new file mode 100644
index 0000000..96a0151
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_es.properties
@@ -0,0 +1,16 @@
+javadoc.classInfo=No se puede obtener la informaci�n de clase para {0} etiqueta ''{1}''.
+javadoc.expectedTag=Se esperaba la etiqueta {0} para ''{1}''.
+javadoc.extrahtml=Se encontr� una etiqueta HTML extra: {0}
+javadoc.incompleteTag=Se encontr� una etiqueta HTML incompleta: {0}
+javadoc.missing=Falta el comentario Javadoc.
+javadoc.noperiod=La primera frase deber�a finalizar con un punto.
+javadoc.packageHtml=Falta el fichero de documentaci�n del paquete.
+javadoc.duplicateTag=Etiqueta {0} duplicada.
+javadoc.return.expected=Se esperaba la etiqueta @return.
+javadoc.unclosedhtml=Se encontr� una etiqueta HTML sin cerrar: {0}
+javadoc.unusedTag=Etiqueta {0} no usada en ''{1}''.
+javadoc.unusedTagGeneral=Etiqueta Javadoc no usada.
+javadoc.empty=Hay una secci�n de descripci�n vac�a en el Javadoc.
+
+type.missingTag=Al comentario Javadoc le falta una etiqueta {0}.
+type.tagFormat=El comentario Javadoc {0} debe coincidir con el patr�n ''{1}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_fi.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_fi.properties
new file mode 100644
index 0000000..a9719f5
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_fi.properties
@@ -0,0 +1,11 @@
+javadoc.missing=Javadoc-kommentti puuttuu.
+javadoc.unusedTagGeneral=Tuntematon Javadoc-tagi.
+javadoc.unusedTag=Tuntematon tagi ''{1}'':lle: {0}.
+javadoc.expectedTag=Javadoc-tagi puuttuu: {0} tagi ''{1}''.
+javadoc.duplicateTag=Duplikaatti {0}-tagi.
+javadoc.return.expected=@return-tagi puuttuu.
+javadoc.classInfo=Luokkatiedot ei saatavilla: {0} tagi ''{1}''.
+javadoc.packageHtml=Pakettidokumentaatiotiedosto puuttuu.
+
+type.missingTag=Javadoc-kommentista puuttuu {0}-tagi.
+type.tagFormat=Javadoc-tagin {0} pitää olla mallin ''{1}'' mukainen.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_fr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_fr.properties
new file mode 100644
index 0000000..11239e0
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_fr.properties
@@ -0,0 +1,16 @@
+javadoc.classInfo=Impossible d''obtenir les informations relatives � la classe {1} pour la balise ''{0}''.
+javadoc.expectedTag=Balise javadoc {0} manquante pour ''{1}''.
+javadoc.extrahtml=Balise HTML en trop : {0}
+javadoc.incompleteTag=Balise HTML incompl�te : {0}
+javadoc.missing=Commentaire javadoc manquant.
+javadoc.noperiod=La premi�re ligne doit se terminer avec un point.
+javadoc.packageHtml=Fichier de documentation de package manquant.
+javadoc.duplicateTag=Balise javadoc {0} pr�sente plus d''une fois.
+javadoc.return.expected=Balise javadoc @return manquante.
+javadoc.unclosedhtml=Balise HTML trouv�e dans la javadoc : {0}
+javadoc.unusedTag=Balise javadoc {0} inutilis� pour ''{1}''.
+javadoc.unusedTagGeneral=Balise javadoc inutilis�.
+javadoc.empty=Le commentaire javadoc est vide.
+
+type.missingTag=Dans le commentaire javadoc de la classe, il manque une balise {0}.
+type.tagFormat=La balise javadoc {0} doit correspondre au motif ''{1}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_ja.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_ja.properties
new file mode 100644
index 0000000..cdd7889
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_ja.properties
@@ -0,0 +1,17 @@
+javadoc.classInfo={0} \u30bf\u30b0\u306e ''{1}'' \u306e\u30af\u30e9\u30b9\u60c5\u5831\u304c\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3002
+javadoc.expectedTag=''{1}'' \u306b\u306f {0} \u30bf\u30b0\u304c\u5fc5\u8981\u3067\u3059\u3002
+javadoc.extrahtml=\u4e0d\u8981\u306a\u7d42\u4e86\u30bf\u30b0\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f: {0}
+javadoc.incompleteTag=\u4e0d\u5b8c\u5168\u306aHTML\u30bf\u30b0\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f: {0}
+javadoc.missing=Javadoc \u30b3\u30e1\u30f3\u30c8\u304c\u3042\u308a\u307e\u305b\u3093\u3002
+javadoc.noperiod=\u6700\u521d\u306e\u4e00\u6587\u306f\u30d4\u30ea\u30aa\u30c9\u3067\u7d42\u308f\u3089\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+javadoc.packageHtml=\u30d1\u30c3\u30b1\u30fc\u30b8\u30c9\u30ad\u30e5\u30e1\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
+javadoc.duplicateTag={0} \u30bf\u30b0\u304c\u91cd\u8907\u3057\u3066\u3044\u307e\u3059\u3002
+javadoc.return.expected=@return \u30bf\u30b0\u304c\u5fc5\u8981\u3067\u3059\u3002
+javadoc.unclosedhtml=\u9589\u3058\u3066\u3044\u306a\u3044 HTML \u30bf\u30b0\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f: {0}
+javadoc.unusedTag=''{1}'' \u306b\u5bfe\u3059\u308b\u4f7f\u7528\u3055\u308c\u306a\u3044 {0} \u30bf\u30b0\u3067\u3059\u3002
+javadoc.unusedTagGeneral=\u4f7f\u7528\u3055\u308c\u306a\u3044 Javadoc \u30bf\u30b0\u3067\u3059\u3002
+
+type.missingTag=\u30af\u30e9\u30b9\u306e Javadoc \u30b3\u30e1\u30f3\u30c8\u306b {0} \u30bf\u30b0\u304c\u3042\u308a\u307e\u305b\u3093\u3002
+type.tagFormat=\u30af\u30e9\u30b9\u306e Javadoc \u30bf\u30b0 {0} \u306f\u30d1\u30bf\u30fc\u30f3 ''{1}'' \u306b\u5408\u81f4\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+
+
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_pt.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_pt.properties
new file mode 100644
index 0000000..c9c2522
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_pt.properties
@@ -0,0 +1,14 @@
+javadoc.classInfo=N�o foi poss�vel obter informa��es de classe para {0} marca ''{1}''.
+javadoc.expectedTag=Esperada a marca {0} para ''{1}''.
+javadoc.extrahtml=Marca HTML extra encontrada: {0}
+javadoc.incompleteTag=Marca HTML incompleta encontrada: {0}
+javadoc.missing=Falta o coment�rio Javadoc.
+javadoc.noperiod=A primeira frase deve acabar num ponto final.
+javadoc.packageHtml=Falta o ficheiro de documenta��o do pacote.
+javadoc.duplicateTag=Marca {0} duplicada.
+javadoc.return.expected=Esperava uma marca @return.
+javadoc.unclosedhtml=Marca HTML n�o fechada entrada: {0}
+javadoc.unusedTag=Marca {0} n�o utilizada por ''{1}''.
+javadoc.unusedTagGeneral=Marca Javadoc n�o utilizada.
+type.missingTag=Coment�rio Javadoc de tipo n�o est� presente na marca {0}.
+type.tagFormat=Marca Javadoc {0} do tipo deve condizer com o padr�o ''{1}''
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_tr.properties
new file mode 100644
index 0000000..63dd662
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc/messages_tr.properties
@@ -0,0 +1,23 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+javadoc.classInfo         = {0} etiketi ''{1}'' i\u00E7in s\u0131n\u0131f bilgisi al\u0131nam\u0131yor.
+javadoc.duplicateTag      = {0} etiketi tekrarlanm\u0131\u015F.
+javadoc.empty             = Javadoc tan\u0131m alan\u0131 bo\u015F b\u0131rak\u0131lm\u0131\u015F.
+javadoc.expectedTag       = ''{1}'' i\u00E7in {0} etiketi gerekli.
+javadoc.extrahtml         = Fazladan HTML etiketi bulundu: {0}
+javadoc.incompleteTag     = Tamamlanmam\u0131\u015F HTML etiketi bulundu: {0}
+javadoc.invalidInheritDoc = '{'@inheritDoc'}' etiketi kullan\u0131m\u0131 ge\u00E7ersiz.
+javadoc.legacyPackageHtml = Eskide kalan package.html dosyalar\u0131 kald\u0131r\u0131lmal\u0131.
+javadoc.missing           = Javadoc a\u00E7\u0131klamas\u0131 eksik.
+javadoc.noperiod          = \u0130lk c\u00FCmle nokta ile bitmeli.
+javadoc.packageHtml       = Paket dok\u00FCmantasyon dosyas\u0131 eksik.
+javadoc.packageInfo       = package-info.java dosyas\u0131 eksik.
+javadoc.return.expected   = @return etiketi eksik.
+javadoc.unclosedhtml      = Kapat\u0131lmam\u0131\u015F bir HTML etiketi bulundu: {0}
+javadoc.unknownTag        = Bilinmeyen etiket: ''{0}''.
+javadoc.unusedTag         = ''{1}'' i\u00E7in kullan\u0131lmayan {0} etiketi mevcut.
+javadoc.unusedTagGeneral  = Kullan\u0131lmayan Javadoc etiketi.
+javadoc.writeTag          = {0}={1}
+
+type.missingTag = T\u00FCr i\u00E7in yaz\u0131lan Javadoc a\u00E7\u0131klamas\u0131nda {0} etiketi eksik.
+type.tagFormat  = T\u00FCr i\u00E7in yaz\u0131lan {0} Javadoc etiketi \u015Fu kal\u0131pta olmal\u0131: ''{1}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages.properties
new file mode 100644
index 0000000..ba80f81
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages.properties
@@ -0,0 +1,34 @@
+noNewlineAtEOF=File does not end with a newline.
+unable.open=Unable to open ''{0}''.
+
+todo.match=Comment matches to-do format ''{0}''.
+
+upperEll=Should use uppercase ''L''.
+
+illegal.regexp=Line matches the illegal pattern ''{0}''.
+required.regexp=Required pattern ''{0}'' missing in file.
+duplicate.regexp=Found duplicate pattern ''{0}''.
+
+translation.missingKey=Key ''{0}'' missing.
+
+missing.switch.default=switch without \"default\" clause.
+
+uncommented.main=Uncommented main method found.
+
+descendant.token.min=Count of {0} for ''{2}'' descendant ''{3}'' is less than minimum count {1}.
+descendant.token.max=Count of {0} for ''{2}'' descendant ''{3}'' exceeds maximum count {1}.
+
+descendant.token.sum.min=Total count of {0} is less than minimum count {1} under ''{2}''.
+descendant.token.sum.max=Total count of {0} exceeds maximum count {1} under ''{2}''.
+
+final.parameter=Parameter {0} should be final.
+trailing.comments=Don''t use trailing comments.
+
+array.type.style=Array brackets at illegal position.
+
+type.file.mismatch=The name of the outer type and the file do not match.
+
+properties.duplicateproperty=Duplicated property ''{0}'' ({1} occurrence(s)).
+unable.open.cause=Unable to open ''{0}'': {1}.
+
+forbid.escaped.unicode.char=Unicode escape(s) usage should be avoided.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_de.properties
new file mode 100644
index 0000000..bc9abfd
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_de.properties
@@ -0,0 +1,34 @@
+noNewlineAtEOF=Datei endet nicht mit einem Zeilenumbruch.
+unable.open=Kann ''{0}'' nicht �ffnen.
+
+todo.match=Kommentar entspricht to-do-Format ''{0}''.
+
+upperEll=Zur besseren Lesbarkeit sollte ein gro�es ''L'' verwendet werden.
+
+illegal.regexp=Die Zeile entspricht dem verbotenen Muster ''{0}''.
+required.regexp=Keine Zeile entspricht dem Muster ''{0}''.
+duplicate.regexp=Duplikat gefunden nach dem Muster ''{0}''.
+
+translation.missingKey=�bersetzung f�r Schl�ssel ''{0}'' fehlt.
+
+missing.switch.default=switch ohne \"default\".
+
+uncommented.main=Unkommentierte main Methode.
+
+descendant.token.min=Anzahl von {2}-Unterknoten ''{3}'' ist {0}, muss mindestens {1} sein.
+descendant.token.max=Anzahl von {2}-Unterknoten ''{3}'' ist {0}, darf maximal {1} sein.
+
+descendant.token.sum.min=Anzahl der Tokens ist mit {0} kleiner als das erforderliche Minimum von {1} unter ''{2}''.
+descendant.token.sum.max=Anzahl der Tokens ist mit {0} gr��er als das erlaubte Maximum von {1} unter ''{2}''.
+
+final.parameter=Der Parameter {0} sollte als ''final'' deklariert sein.
+trailing.comments=Kommentare und Code sollten nicht in einer Zeile gemischt werden.
+
+array.type.style=Array-Klammern an ung�ltiger Position.
+
+type.file.mismatch=Der Name der �u�eren Klasse stimmt nicht mit dem Dateinamen �berein.
+
+properties.duplicateproperty=Duplizierte Property ''{0}'' (Anzahl {1}).
+unable.open.cause=Kann ''{0}'' nicht �ffnen: {1}.
+
+forbid.escaped.unicode.char=Unicode-Escapes sollten vermieden werden.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_es.properties
new file mode 100644
index 0000000..c2551ac
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_es.properties
@@ -0,0 +1,23 @@
+noNewlineAtEOF=El fichero no termina con un retorno de carro.
+
+todo.match=El comentario coincide con el formato to-do ''{0}''.
+
+upperEll=Deber�a usar ''L'' may�scula.
+
+
+
+illegal.regexp=La l�nea coincide con el patr�n ilegal ''{0}''.
+required.regexp=El patron requerido ''{0}'' falta en el fichero.
+
+
+translation.missingKey=La clave ''{0}'' falta.
+
+missing.switch.default=switch sin etiqueta \"default\".
+
+uncommented.main=Se encotr� un m�todo main sin comentar.
+
+descendant.token.min=El recuento {0} para ''{2}'' descendientes ''{3}'' es menor que el m�nimo {1}.
+descendant.token.max=El recuento {0} para ''{2}'' descendientes ''{3}'' excede el m�ximo {1}.
+
+final.parameter=El par�metro {0} deber�a ser final.
+trailing.comments=No usar comentarios de final de l�nea.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_fi.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_fi.properties
new file mode 100644
index 0000000..a4a3942
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_fi.properties
@@ -0,0 +1,11 @@
+noNewlineAtEOF=Tiedosto ei pääty rivinvaihtoon.
+
+todo.match=Kommentti on to-do formaatin ''{0}'' mukainen.
+
+upperEll=Pitää olla iso ''L''.
+
+illegal.regexp=Rivi on sääntöjenvaistaisen mallin mukainen: ''{0}''.
+
+
+translation.missingKey=Käännösavain ''{0}'' puuttuu.
+
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_fr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_fr.properties
new file mode 100644
index 0000000..d269eb3
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_fr.properties
@@ -0,0 +1,22 @@
+noNewlineAtEOF=Il manque un caract�re NewLine � la fin du fichier
+
+todo.match=Le commentaire correspond au format TODO ''{0}''.
+
+upperEll=Utilisez un ''L'' majuscule pour une meilleure lisibilit�.
+
+illegal.regexp=La ligne correspond au motif ill�gal ''{0}''.
+required.regexp=Le motif ''{0}'' attendu dans le fichier est manquant.
+
+
+translation.missingKey=La traduction du message ''{0}'' est manquante.
+
+missing.switch.default=Il manque le cas \"default\" dans le bloc \"switch\".
+
+uncommented.main=La m�thode principale n'est pas comment�e.
+
+descendant.token.min=Le nombre de lex�mes ''{3}'' descendant de ''{2}'' est {0}, il devrait �tre de {1} au minimum.
+descendant.token.max=Le nombre de lex�mes ''{3}'' descendant de ''{2}'' est {0}, il devrait �tre de {1} au maximum.
+
+final.parameter=Le param�tre {0} devrait �tre final.
+trailing.comments=Ne m�langez pas instructions Java et commentaires sur la m�me ligne.
+array.type.style=Les crochets du tableau ne sont pas plac�s au bon endroit.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_ja.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_ja.properties
new file mode 100644
index 0000000..76ccea9
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_ja.properties
@@ -0,0 +1,17 @@
+noNewlineAtEOF=\u30d5\u30a1\u30a4\u30eb\u304c\u65b0\u3057\u3044\u884c\u3067\u7d42\u4e86\u3057\u3066\u3044\u307e\u305b\u3093\u3002
+
+todo.match=\u30b3\u30e1\u30f3\u30c8\u304c to-do \u306e\u5f62\u5f0f ''{0}'' \u306b\u5408\u81f4\u3057\u3066\u3044\u307e\u3059\u3002
+
+upperEll=\u5927\u6587\u5b57\u306e ''L'' \u3092\u4f7f\u7528\u3059\u3079\u304d\u3067\u3059\u3002
+
+illegal.regexp=\u884c\u304c\u4e0d\u6b63\u306a\u30d1\u30bf\u30fc\u30f3 ''{0}'' \u306b\u5408\u81f4\u3057\u307e\u3059\u3002
+
+
+translation.missingKey=\u30ad\u30fc ''{0}'' \u304c\u3042\u308a\u307e\u305b\u3093\u3002
+
+missing.switch.default=\"default\" \u7bc0\u306e\u7121\u3044 switch \u6587\u3067\u3059\u3002
+
+uncommented.main=\u30b3\u30e1\u30f3\u30c8\u3067\u306f\u306a\u3044 main \u30e1\u30bd\u30c3\u30c9\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002
+
+descendant.token.min=''{2}'' \u306e\u5b50\u5b6b ''{3}'' \u306e\u6570 {0} \u304c\u6700\u5c0f\u6570 {1} \u3092\u6e80\u305f\u3057\u307e\u305b\u3093\u3002
+descendant.token.max=''{2}'' \u306e\u5b50\u5b6b ''{3}'' \u306e\u6570 {0} \u304c\u6700\u5927\u6570 {1} \u3092\u8d85\u3048\u3066\u3044\u307e\u3059\u3002
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_pt.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_pt.properties
new file mode 100644
index 0000000..161aa99
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_pt.properties
@@ -0,0 +1,9 @@
+descendant.token.max=Contagem de {0} para ''{2}'' descendente ''{3}'' � excede o n�mero m�ximo {1}.
+descendant.token.min=Contagem de {0} para ''{2}'' descendente ''{3}'' � menos do que o n�mero m�nimo {1}.
+illegal.regexp=A linha condiz com o padr�o inv�lido ''{0}''.
+missing.switch.default=switch sem o ramo \"default\".
+noNewlineAtEOF=File does not end with a newline.
+todo.match=O coment�rio condiz com o padr�o de tarefa pendente ''{0}''.
+translation.missingKey=Falta a chave ''{0}''.
+uncommented.main=M�todo main n�o comentado encontrado.
+upperEll=Deve ser utilizado um ''L'' mai�sculo.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_tr.properties
new file mode 100644
index 0000000..9d29a25
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/messages_tr.properties
@@ -0,0 +1,34 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+array.type.style = Dizi parantezleri ge\u00E7ersiz konumda bulunuyor.
+
+descendant.token.max     = ''{2}'' eleman\u0131ndan t\u00FCremi\u015F ''{3}'' i\u00E7in toplam {0} say\u0131s\u0131 maksimum {1} de\u011Ferinden daha y\u00FCksek.
+descendant.token.min     = ''{2}'' eleman\u0131ndan t\u00FCremi\u015F ''{3}'' i\u00E7in toplam {0} say\u0131s\u0131 minimum {1} de\u011Ferinden daha d\u00FC\u015F\u00FCk.
+descendant.token.sum.max = ''{2}'' alt\u0131ndaki toplam {0} say\u0131s\u0131 maksimum {1} de\u011Ferinden daha y\u00FCksek.
+descendant.token.sum.min = ''{2}'' alt\u0131ndaki toplam {0} say\u0131s\u0131 minimum {1} de\u011Ferinden daha d\u00FC\u015F\u00FCk.
+
+duplicate.regexp = Tekrarlanm\u00FD\u00FEbir kal\u0131p bulundu: ''{0}''.
+
+final.parameter = {0} parametresi ''final'' olarak tan\u0131mlanmal\u0131.
+
+illegal.regexp = Sat\u0131rda ge\u00E7ersiz bir kal\u0131p var: ''{0}''.
+
+missing.switch.default = ''default'' durumu olmayan bir ''switch'' mevcut.
+
+noNewlineAtEOF = Dosyan\u0131n sonunda yeni sat\u0131r karakteri yok.
+
+required.regexp = Dosyada olmas\u0131 gereken ''{0}'' kal\u0131b\u0131 yok.
+
+todo.match = A\u00E7\u0131klamalar, ''to-do'' format\u0131 olan ''{0}'' ile \u00E7ak\u0131\u015F\u0131yor.
+
+trailing.comments = \u0130zleyen (trailing) a\u00E7\u0131klamalar kullan\u0131lmamal\u0131d\u0131r.
+
+translation.missingKey = ''{0}'' anahtar\u0131 eksik.
+
+type.file.mismatch = En d\u0131\u015Ftaki t\u00FCr\u00FCn ad\u0131 dosya ad\u0131yla ayn\u0131 de\u011Fil.
+
+unable.open = ''{0}'' a\u00E7\u0131lam\u0131yor.
+
+uncommented.main = ''main'' metoduna a\u00E7\u0131klama girilmeli.
+
+upperEll = B\u00FCy\u00FCk harf ''L'' kullan\u0131lmal\u0131.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/metrics/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/metrics/messages.properties
new file mode 100644
index 0000000..f687209
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/metrics/messages.properties
@@ -0,0 +1,30 @@
+booleanExpressionComplexity=Boolean expression complexity is {0,number,integer} (max allowed is {1,number,integer}).
+classDataAbstractionCoupling=Class Data Abstraction Coupling is {0,number,integer} (max allowed is {1,number,integer}) classes {2}.
+classFanOutComplexity=Class Fan-Out Complexity is {0,number,integer} (max allowed is {1,number,integer}).
+cyclomaticComplexity=Cyclomatic Complexity is {0,number,integer} (max allowed is {1,number,integer}).
+duplicateLiteral=Duplicate instances of literal ''{0}'' are not allowed.
+finalField=The field ''{0}'' should be declared final.
+illegalAbstractClassName=Name ''{0}'' must match pattern ''{1}''.
+illegalCatch=Catching ''{0}'' is not allowed.
+illegalThrows=Throwing ''{0}'' is not allowed.
+illegalToken=Using ''{0}'' is not allowed.
+illegalType=Declaring variables, return values or parameters of type ''{0}'' is not allowed.
+junit.methodName=The method ''{0}'' should be named ''{1}''
+junit.methodParameters=The method ''{0}'' must be declared with no parameters.
+junit.methodPublicAndStatic=The method ''{0}'' must be declared static.
+junit.methodPublicOrProtected=The method {0} must be declared public or protected
+junit.methodReturnType=The method ''{0}'' must de declared with a void return type.
+mutableException=The field ''{0}'' must be declared final.
+nestedIfDepth=Nested if-else depth is {0,number,integer} (max allowed is {1,number,integer}).
+nestedTryDepth=Nested try depth is {0,number,integer} (max allowed is {1,number,integer}).
+npathComplexity=NPath Complexity is {0,number,integer} (max allowed is {1,number,integer}).
+packageDeclaration=Missing package declaration.
+parameterAssignment=Assignment of parameter ''{0}'' is not allowed.
+returnCount=Return count is {0,number,integer} (max allowed is {1,number,integer}).
+returnFromCatch=Return from catch is not allowed.
+returnFromFinally=Return from finally is not allowed.
+throwsCount=Throws count is {0,number,integer} (max allowed is {1,number,integer}).
+unusedVariable=Variable ''{0}'' is never used.
+ncss.method=NCSS for this method is {0,number,integer} (max allowed is {1,number,integer}).
+ncss.class=NCSS for this class is {0,number,integer} (max allowed is {1,number,integer}).
+ncss.file=NCSS for this file is {0,number,integer} (max allowed is {1,number,integer}).
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/metrics/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/metrics/messages_de.properties
new file mode 100644
index 0000000..80ba17e
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/metrics/messages_de.properties
@@ -0,0 +1,30 @@
+booleanExpressionComplexity=Komplexit�t des Boole'schen Ausdrucks betr�gt {0,number,integer} (Obergrenze ist {1,number,integer}).
+classDataAbstractionCoupling=Class Data Abstraction Coupling betr�gt {0,number,integer} (Obergrenze ist {1,number,integer}) Klassen {2}.
+classFanOutComplexity=Class Fan-Out Complexity betr�gt {0,number,integer} (Obergrenze ist {1,number,integer}).
+cyclomaticComplexity=Zyklomatische Komplexit�t betr�gt {0,number,integer} (Obergrenze ist {1,number,integer}).
+duplicateLiteral=Mehrfaches Auftreten des selben Literals ''{0}'' ist unzul�ssig.
+finalField=Das Feld ''{0}'' sollte ''final'' deklariert sein.
+illegalAbstractClassName=Der Name ''{0}'' muss dem Muster ''{1}'' entsprechen.
+illegalCatch=Fangen von ''{0}'' ist nicht erlaubt.
+illegalThrows=Werfen von ''{0}'' ist nicht erlaubt.
+illegalToken=Verwenden von ''{0}'' ist nicht erlaubt.
+illegalType=Variablen, R�ckgabewerte oder Parameter des Typs ''{0}'' sind nicht erlaubt.
+junit.methodName=Die Methode ''{0}'' sollte ''{1}'' heissen.
+junit.methodParameters=Die Methode ''{0}'' darf keine Parameter haben.
+junit.methodPublicAndStatic=Die Methode ''{0}'' muss als ''static'' deklariert sein.
+junit.methodPublicOrProtected=Die Methode {0}  muss als ''public'' oder ''protected'' deklariert sein.
+junit.methodReturnType=Die Methode ''{0}'' muss ''void'' als R�ckgabetyp haben.
+mutableException=Das Feld ''{0}'' muss als ''final'' deklariert sein.
+nestedIfDepth=Schachtelungstiefe f�r if-else betr�gt {0,number,integer} (Obergrenze ist {1,number,integer}).
+nestedTryDepth=Schachtelungstiefe f�r try betr�gt {0,number,integer} (Obergrenze ist {1,number,integer}).
+npathComplexity=NPath-Komplexit�t betr�gt {0,number,integer} (Obergrenze ist {1,number,integer}).
+packageDeclaration=Package-Deklaration fehlt.
+parameterAssignment=Zuweisungen an den Parameter ''{0}'' sind nicht erlaubt.
+returnCount=Anzahl der return-Anweisungen ist {0,number,integer} (Obergrenze ist {1,number,integer}).
+returnFromCatch=Return-Anweisungen d�rfen in einem Catch-Block nicht vorkommen.
+returnFromFinally=Return-Anweisungen d�rfen in einem Finally-Block nicht vorkommen.
+throwsCount=Anzahl Throws betr�gt {0,number,integer} (Obergrenze ist {1,number,integer}).
+unusedVariable=Die Variable ''{0}'' wird nicht verwendet.
+ncss.method=NCSS in dieser Methode ist {0,number,integer} (Obergrenze ist {1,number,integer}).
+ncss.class=NCSS in dieser Klasse ist {0,number,integer} (Obergrenze ist {1,number,integer}).
+ncss.file=NCSS in dieser Datei ist {0,number,integer} (Obergrenze ist {1,number,integer}).
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/metrics/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/metrics/messages_es.properties
new file mode 100644
index 0000000..1231b47
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/metrics/messages_es.properties
@@ -0,0 +1,30 @@
+booleanExpressionComplexity=La complejidad de la expresi�n l�gica es {0,number,integer} (m�xima permitida es {1,number,integer}).
+classDataAbstractionCoupling=El acoplamiento abstracto de datos entre clases es  {0,number,integer} (m�ximo permitida es {1,number,integer}) clases {2}.
+classFanOutComplexity=La complejidad Fan-Out de clase es {0,number,integer} (m�xima permitida es {1,number,integer}).
+cyclomaticComplexity=La complejidad ciclom�tica es {0,number,integer} (m�xima permitida es {1,number,integer}).
+duplicateLiteral=No estan permitidas instancias duplicadas del literal ''{0}''.
+finalField=El campo ''{0}'' deber�a declararse final.
+illegalAbstractClassName=El nombre ''{0}'' debe coincidir con el patr�n ''{1}''.
+illegalCatch=No est� permitido capturar la excepci�n ''{0}''.
+illegalThrows=No est� permitido lanzar la excepci�n ''{0}''.
+illegalToken=No est� permitido usar ''{0}''.
+illegalType=No est� permitido declarar variables, valores de retorno o par�metros de tipo ''{0}''.
+junit.methodName=El m�todo ''{0}'' deber�a llamarse ''{1}''
+junit.methodParameters=El m�todo ''{0}'' deber�a declararse sin par�metros.
+junit.methodPublicAndStatic=El m�todo ''{0}'' deber�a declararse static.
+junit.methodPublicOrProtected=El m�todo {0} deber�a declararse public o protected
+junit.methodReturnType=El m�todo ''{0}'' deber�a declararse con tipo de retorno void.
+mutableException=El campo ''{0}'' debe declararse final.
+nestedIfDepth=La profundidad de if-else anidados es {0,number,integer} (m�xima permitida es {1,number,integer}).
+nestedTryDepth=La profundidad de try anidados es {0,number,integer} (m�xima permitida es {1,number,integer}).
+npathComplexity=La complejidad NPath es {0,number,integer} (m�xima permitida es {1,number,integer}).
+packageDeclaration=Falta la declaraci�n de paquete.
+parameterAssignment=No est� permitido asignar al par�metro ''{0}''.
+returnCount=El n�mero de sentencias return es {0,number,integer} (m�ximo permitido es {1,number,integer}).
+returnFromCatch=No esta permitido return desde un catch.
+returnFromFinally=No esta permitido return desde un finally.
+throwsCount=El n�mero de throw es {0,number,integer} (m�ximo permitido es {1,number,integer}).
+unusedVariable=La variable ''{0}'' no se usa nunca.
+ncss.method=El NCSS para este m�todo es {0,number,integer} (m�ximo permitido es {1,number,integer}).
+ncss.class=El NCSS para esta clase es {0,number,integer} (m�ximo permitido es {1,number,integer}).
+ncss.file=El NCSS para este fichero es {0,number,integer} (m�ximo permitido es {1,number,integer}).
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/metrics/messages_fr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/metrics/messages_fr.properties
new file mode 100644
index 0000000..98b3980
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/metrics/messages_fr.properties
@@ -0,0 +1,30 @@
+booleanExpressionComplexity=La complexit� de l''expression bool�enne est de {0,number,integer}, alors que le maximum autoris� est de {1,number,integer}.
+classDataAbstractionCoupling=Le DAC (Data Abstraction Coupling) de la classe est de {0,number,integer} alors que le maximum autoris� est de {1,number,integer}.
+classFanOutComplexity=Le Fan-Out Complexity de la classe est de {0,number,integer} alors que le maximum autoris� est de {1,number,integer}.
+cyclomaticComplexity=La complexit� cyclomatique de la classe est de {0,number,integer} alors que le maximum autoris� est de {1,number,integer}.
+duplicateLiteral=Utiliser plusieurs fois la m�me cha�ne litt�rale ''{0}'' est interdit.
+finalField=L''attribut ''{0}'' devrait �tre d�clar� final.
+illegalAbstractClassName=Le nom ''{0}'' devrait respecter l''expression ''{1}''.
+illegalCatch=Il est interdit de catcher l''exception ''{0}''.
+illegalThrows=Il est interdit de d�clarer l''exception ''{0}''.
+illegalToken=Il est interdit d''utiliser ''{0}''.
+illegalType=Il est interdit de d�clarer des variables, valeurs de retour ou param�tres de type ''{0}''.
+junit.methodName=La m�thode ''{0}'' devrait �tre renomm�e ''{1}''
+junit.methodParameters=La m�thode ''{0}'' ne devrait pas comporter de param�tres.
+junit.methodPublicAndStatic=La m�thode ''{0}'' devrait �tre statique.
+junit.methodPublicOrProtected=La m�thode {0} devrait �tre prot�g�e ou publique.
+junit.methodReturnType=La m�thode ''{0}'' devrait avoir un type de retour \"void\".
+mutableException=L''attribut ''{0}'' devrait �tre d�clar� final.
+nestedIfDepth=Le nombre de if imbriqu�s est de {0,number,integer} alors que le maximum autoris� est de {1,number,integer}.
+nestedTryDepth=Le nombre de try imbriqu�s est de {0,number,integer} alors que le maximum autoris� est de {1,number,integer}.
+npathComplexity=La complexit� NPath est de {0,number,integer} alors que le maximum autoris� est de {1,number,integer}.
+packageDeclaration=D�claration de package manquante.
+parameterAssignment=L''affectation du param�tre ''{0}'' est interdit.
+returnCount=Le nombre d''instructions return est de {0,number,integer} alors que le maximum autoris� est de {1,number,integer}.
+returnFromCatch=Il est interdit de placer une instruction \"return\" dans un bloc \"catch\".
+returnFromFinally=Il est interdit de placer une instruction \"return\" dans un bloc \"finally\".
+throwsCount=Le nombre d''exceptions d�clar� est de {0,number,integer} alors que le maximum autoris� est de {1,number,integer}.
+unusedVariable=La variable ''{0}'' n''est jamais utilis�e.
+ncss.method=La m�trique NCSS pour cette m�thode vaut {0,number,integer} alors que le maximum autoris� est de {1,number,integer}.
+ncss.class=La m�trique NCSS pour cette classe vaut {0,number,integer} alors que le maximum autoris� est de {1,number,integer}.
+ncss.file=La m�trique NCSS pour ce fichier vaut {0,number,integer} alors que le maximum autoris� est de {1,number,integer}.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/metrics/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/metrics/messages_tr.properties
new file mode 100644
index 0000000..9ff8459
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/metrics/messages_tr.properties
@@ -0,0 +1,55 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+booleanExpressionComplexity = Mant\u0131ksal ifadenin karma\u015F\u0131kl\u0131\u011F\u0131 {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+
+classDataAbstractionCoupling = Class Data Abstraction Coupling (CDAC) de\u011Feri {0,number,integer} {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}). Nesnesi olu\u015Fturulan s\u0131n\u0131flar {2}. (CDAC: Bir s\u0131n\u0131f\u0131n, kendinden farkl\u0131 ka\u00E7 s\u0131n\u0131f\u0131n nesnesini olu\u015Fturdu\u011Fu.)
+
+classFanOutComplexity = Class Fan-Out Complexity (CFOC) de\u011Feri {0,number,integer} {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}). (CFOC: Bir s\u0131n\u0131f\u0131n, kendinden ba\u015Fka ka\u00E7 farkl\u0131 s\u0131n\u0131f\u0131 kulland\u0131\u011F\u0131)
+
+cyclomaticComplexity = Cyclomatic Complexity de\u011Feri {0,number,integer} {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}). (Cyclomatic Complexity: Bir metodun, constructorun ya da statik blo\u011Fun m\u00FCmk\u00FCn olan minimum ger\u00E7eklenme yolu say\u0131s\u0131)
+
+duplicateLiteral = ''{0}'' s\u00F6zc\u00FC\u011F\u00FC kod i\u00E7erisinde tekrarlanmamal\u0131, tan\u0131mlan\u0131p \u00F6yle kullan\u0131lmal\u0131.
+
+finalField = ''{0}'' alan\u0131 ''final'' olarak tan\u0131mlanmal\u0131.
+
+illegalAbstractClassName = ''{0}'' s\u0131n\u0131f\u0131n\u0131n ad\u0131 \u015Fu kal\u0131pta olmal\u0131: ''{1}''.
+
+illegalCatch = ''{0}'' istisnas\u0131n\u0131/hatas\u0131n\u0131 yakalamaya izin verilmiyor.
+
+illegalThrows = ''{0}'' istisnas\u0131n\u0131/hatas\u0131n\u0131 f\u0131rlatmaya izin verilmiyor.
+
+illegalToken = ''{0}'' kullanmaya izin verilmiyor.
+
+illegalType = ''{0}'' tipinde de\u011Fi\u015Fkenler, parametreler ya da geri d\u00F6n\u00FC\u015F de\u011Ferleri tan\u0131mlamaya, izin verilmiyor.
+
+junit.methodName              = ''{0}'' metodunun ad\u0131 ''{1}'' olmal\u0131.
+junit.methodParameters        = ''{0}'' metodu parametresiz olarak tan\u0131mlanmal\u0131.
+junit.methodPublicAndStatic   = ''{0}'' metodu ''static'' olarak tan\u0131mlanmal\u0131.
+junit.methodPublicOrProtected = {0} metodu ''public'' ya da ''protected'' olarak tan\u0131mlanmal\u0131.
+junit.methodReturnType        = ''{0}'' metodunun geri d\u00F6n\u00FC\u015F tipi ''void'' olmal\u0131.
+
+mutableException = ''{0}'' alan\u0131 ''final'' olarak tan\u0131mlanmal\u0131.
+
+ncss.class  = Bu s\u0131n\u0131f\u0131n a\u00E7\u0131klama olmayan kaynak kod sat\u0131r\u0131 (NCSS) say\u0131s\u0131  {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+ncss.file   = Bu dosyan\u0131n a\u00E7\u0131klama olmayan kaynak kod sat\u0131r\u0131 (NCSS) say\u0131s\u0131  {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+ncss.method = Bu metodun a\u00E7\u0131klama olmayan kaynak kod sat\u0131r\u0131 (NCSS) say\u0131s\u0131  {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+
+nestedIfDepth = \u0130\u00E7 i\u00E7e kullan\u0131lan ''if-else'' say\u0131s\u0131 {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+
+nestedTryDepth = \u0130\u00E7 i\u00E7e kullan\u0131lan ''try'' say\u0131s\u0131 {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+
+npathComplexity = NPath Complexity de\u011Feri {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}). (NPath Complexity: Bir metodun m\u00FCmk\u00FCn olan t\u00FCm ger\u00E7eklenme yollar\u0131n\u0131n say\u0131s\u0131)
+
+packageDeclaration = Paket tan\u0131m\u0131 eksik.
+
+parameterAssignment = ''{0}'' parametresine de\u011Fer atanamaz.
+
+returnCount = ''return'' say\u0131s\u0131 {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+
+returnFromCatch = ''catch'' ifadesi i\u00E7inde ''return'' kullan\u0131lamaz.
+
+returnFromFinally = ''finally'' ifadesi i\u00E7inde ''return'' kullan\u0131lamaz.
+
+throwsCount = Kullan\u0131lan ''throws'' say\u0131s\u0131 {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+
+unusedVariable = ''{0}'' de\u011Fi\u015Fkeni hi\u00E7 kullan\u0131lmam\u0131\u015F.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages.properties
new file mode 100644
index 0000000..f5c9037
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages.properties
@@ -0,0 +1,4 @@
+redundantModifier=Redundant ''{0}'' modifier.
+annotation.order=''{0}'' annotation modifier does not preceed non-annotation modifiers.
+
+mod.order=''{0}'' modifier out of order with the JLS suggestions.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_de.properties
new file mode 100644
index 0000000..35c38e7
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_de.properties
@@ -0,0 +1,4 @@
+redundantModifier=�berfl�ssiger Modifier ''{0}''.
+annotation.order=''{0}'' Annotation-Modifier sollte vor den anderen Modifiern stehen.
+
+mod.order=Modifier ''{0}'' weicht von der empfohlenen Modifier-Reihenfolge aus der Java-Sprachdefinition ab.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_es.properties
new file mode 100644
index 0000000..a5b950d
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_es.properties
@@ -0,0 +1,4 @@
+redundantModifier=Modificador ''{0}'' redundante.
+annotation.order=El modificador de anotaci�n ''{0}'' no precede a los modificadores normales.
+
+mod.order=Modificador ''{0}'' desordenado seg�n las sugerencias de la JLS.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_fi.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_fi.properties
new file mode 100644
index 0000000..ee96ba7
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_fi.properties
@@ -0,0 +1,2 @@
+redundantModifier=Tarpeeton määrite: ''{0}''
+mod.order=''{0}'' määrite rikkoo JLS:n suositusten mukaisesen järjestyksen.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_fr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_fr.properties
new file mode 100644
index 0000000..cde3247
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_fr.properties
@@ -0,0 +1,5 @@
+redundantModifier=Mot-clef ''{0}'' redondant.
+
+annotation.order=Le modificateur d''annotation ''{0}'' ne pr�c�de pas les autres modificateurs.
+
+mod.order=Le mot-clef ''{0}'' n''appara�t pas dans l''ordre pr�conis� par les JLS.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_ja.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_ja.properties
new file mode 100644
index 0000000..5949243
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_ja.properties
@@ -0,0 +1,4 @@
+
+redundantModifier=\u5197\u9577\u306a ''{0}'' \u4fee\u98fe\u5b50\u3067\u3059\u3002
+
+mod.order=''{0}'' \u4fee\u98fe\u5b50\u304c JLS \u63d0\u6848\u306e\u9806\u5e8f\u306b\u6cbf\u3044\u307e\u305b\u3093\u3002
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_pt.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_pt.properties
new file mode 100644
index 0000000..e71d529
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_pt.properties
@@ -0,0 +1,4 @@
+
+redundantModifier=Modificador ''{0}'' � redundante.
+
+mod.order=Modificador ''{0}'' fora da orderm sugerida pela JLS.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_tr.properties
new file mode 100644
index 0000000..f0bdc37
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/modifier/messages_tr.properties
@@ -0,0 +1,7 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+annotation.order = ''{0}'' anotasyon niteleyicisi, anotasyon olmayan niteleyicilerden \u00F6nce kullan\u0131lmal\u0131.
+
+mod.order = ''{0}'' niteleyicisi, Java taraf\u0131ndan \u00F6nerilen s\u0131rada de\u011Fil.
+
+redundantModifier = Gereksiz ''{0}'' niteleyicisi.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages.properties
new file mode 100644
index 0000000..fe363cf
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages.properties
@@ -0,0 +1,6 @@
+name.invalidPattern=Name ''{0}'' must match pattern ''{1}''.
+illegal.abstract.class.name=Name ''{0}'' must match pattern ''{1}''.
+method.name.equals.class.name=Method Name ''{0}'' must not equal the enclosing class name.
+no.abstract.class.modifier=Class ''{0}'' must be declared as ''abstract''.
+
+abbreviation.as.word=Abbreviation in name must contain no more than ''{0}'' capital letters.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_de.properties
new file mode 100644
index 0000000..03cf2dd
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_de.properties
@@ -0,0 +1,6 @@
+name.invalidPattern=''{0}'' entspricht nicht dem Muster ''{1}''.
+illegal.abstract.class.name=Klassenname ''{0}'' entspricht nicht dem Muster ''{1}''.
+method.name.equals.class.name=Methodenname ''{0}'' darf nicht der gleiche sein wie der Name der Klasse.
+no.abstract.class.modifier=Die Klasse ''{0}'' muss ''abstract'' deklariert werden.
+
+abbreviation.as.word=Die Abk�rzung in diesem Bezeichner darf h�chstens aus ''{0}'' Gro�buchstaben bestehen.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_es.properties
new file mode 100644
index 0000000..c95e167
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_es.properties
@@ -0,0 +1,2 @@
+name.invalidPattern=El nombre ''{0}'' debe coincidir con el patr�n ''{1}''.
+illegal.abstract.class.name=El nombre ''{0}'' debe coincidir con el patr�n ''{1}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_fi.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_fi.properties
new file mode 100644
index 0000000..72a6315
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_fi.properties
@@ -0,0 +1,2 @@
+name.invalidPattern=Nimen ''{0}'' pitää olla mallin ''{1}'' mukainen.
+illegal.abstract.class.name=Nimen ''{0}'' pitää olla mallin ''{1}'' mukainen.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_fr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_fr.properties
new file mode 100644
index 0000000..6b5a6f4
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_fr.properties
@@ -0,0 +1,2 @@
+name.invalidPattern=Le nom ''{0}'' n''est pas conforme � l''expression ''{1}''.
+illegal.abstract.class.name=Le nom de la classe abstraite ''{0}'' n''est pas conforme � l''expression ''{1}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_ja.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_ja.properties
new file mode 100644
index 0000000..0b01db2
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_ja.properties
@@ -0,0 +1,2 @@
+name.invalidPattern=\u540d\u524d ''{0}'' \u306f\u30d1\u30bf\u30fc\u30f3 ''{1}'' \u306b\u4e00\u81f4\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+illegal.abstract.class.name=\u540d\u524d ''{0}'' \u306f\u30d1\u30bf\u30fc\u30f3 ''{1}'' \u306b\u4e00\u81f4\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_pt.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_pt.properties
new file mode 100644
index 0000000..2e1e3b6
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_pt.properties
@@ -0,0 +1,2 @@
+illegal.abstract.class.name=Nome ''{0}'' deve condizer com o padr�o ''{1}''.
+name.invalidPattern=Nome ''{0}'' deve condizer com o padr�o ''{1}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_tr.properties
new file mode 100644
index 0000000..9d4024e
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/naming/messages_tr.properties
@@ -0,0 +1,9 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+illegal.abstract.class.name = ''{0}'' ismi, \u015Fu kal\u0131pta olmal\u0131: ''{1}''.
+
+method.name.equals.class.name = ''{0}'' metodunun ad\u0131 kendini kapsayan t\u00FCr ile ayn\u0131 olmamal\u0131.
+
+name.invalidPattern = ''{0}'' ismi, \u015Fu kal\u0131pta olmal\u0131: ''{1}''.
+
+no.abstract.class.modifier = ''{0}'' s\u0131n\u0131f\u0131 ''abstract'' olarak tan\u0131mlanmal\u0131.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/regexp/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/regexp/messages.properties
new file mode 100644
index 0000000..2003aa3
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/regexp/messages.properties
@@ -0,0 +1,2 @@
+regexp.exceeded=Line matches the illegal pattern ''{0}''.
+regexp.minimum=File does not contain at least {0} matches for pattern ''{1}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/regexp/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/regexp/messages_de.properties
new file mode 100644
index 0000000..80f4138
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/regexp/messages_de.properties
@@ -0,0 +1,2 @@
+regexp.exceeded=Zeile trifft auf das verbotene Muster ''{0}'' zu.
+regexp.minimum=Datei enth�lt weniger als die erforderlichen {0} Treffer f�r das Muster ''{1}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/regexp/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/regexp/messages_tr.properties
new file mode 100644
index 0000000..46876ea
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/regexp/messages_tr.properties
@@ -0,0 +1,4 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+regexp.exceeded = Sat\u0131r, ge\u00E7ersiz ''{0}'' kal\u0131b\u0131yla e\u015Fle\u015Fiyor.
+regexp.minimum  = Dosya, ''{1}'' kal\u0131b\u0131 i\u00E7in en az {0} e\u015Fle\u015Fme i\u00E7ermiyor.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages.properties
new file mode 100644
index 0000000..d3bb19b
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages.properties
@@ -0,0 +1,12 @@
+executableStatementCount=Executable statement count is {0,number,integer} (max allowed is {1,number,integer}).
+maxLen.file=File length is {0,number,integer} lines (max allowed is {1,number,integer}).
+maxLen.method=Method length is {0,number,integer} lines (max allowed is {1,number,integer}).
+maxLen.anonInner=Anonymous inner class length is {0,number,integer} lines (max allowed is {1,number,integer}).
+maxLineLen=Line is longer than {0,number,integer} characters (found {1,number,integer}).
+maxOuterTypes=Outer types defined is {0,number,integer} (max allowed is {1,number,integer}).
+maxParam=More than {0,number,integer} parameters (found {1,number,integer}).
+too.many.privateMethods=Number of private methods is {0,number,integer} (max allowed is {1,number,integer}).
+too.many.packageMethods=Number of package methods is {0,number,integer} (max allowed is {1,number,integer}).
+too.many.protectedMethods=Number of protected methods is {0,number,integer} (max allowed is {1,number,integer}).
+too.many.publicMethods=Number of public methods is {0,number,integer} (max allowed is {1,number,integer}).
+too.many.methods=Total number of methods is {0,number,integer} (max allowed is {1,number,integer}).
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_de.properties
new file mode 100644
index 0000000..627fe83
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_de.properties
@@ -0,0 +1,12 @@
+executableStatementCount=Anzahl ausf�hrbarer Statements ist {0,number,integer} (Obergrenze ist {1,number,integer}).
+maxLen.file=Datei ist {0,number,integer} Zeilen lang, erlaubt sind h�chstens {1,number,integer}.
+maxLen.method=Methode ist {0,number,integer} Zeilen lang, erlaubt sind h�chstens {1,number,integer}.
+maxLen.anonInner=Anonyme innere Klasse ist {0,number,integer} Zeilen lang, erlaubt sind h�chstens {1,number,integer}.
+maxLineLen=Zeile l�nger als {0,number,integer} Zeichen
+maxOuterTypes=Anzahl �u�erer Typen ist {0,number,integer} (Obergrenze ist {1,number,integer}).
+maxParam=Mehr als {0,number,integer} Parameter.
+too.many.privateMethods=Es sind {0,number,integer} ''private'' deklarierte Methoden vorhanden (Obergrenze ist {1,number,integer}).
+too.many.packageMethods=Es sind {0,number,integer} package deklarierte Methoden vorhanden (Obergrenze ist {1,number,integer}).
+too.many.protectedMethods=Es sind {0,number,integer} ''protected'' deklarierte Methoden vorhanden (Obergrenze ist {1,number,integer}).
+too.many.publicMethods=Es sind {0,number,integer} ''public'' deklarierte Methoden vorhanden (Obergrenze ist {1,number,integer}).
+too.many.methods=Es sind insgesamt {0,number,integer} Methoden vorhanden (Obergrenze ist {1,number,integer}).
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_es.properties
new file mode 100644
index 0000000..1be61f0
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_es.properties
@@ -0,0 +1,7 @@
+executableStatementCount=El n�mero de sentencias ejecutables es {0,number,integer} (m�ximo permitido es {1,number,integer}).
+maxLen.file=El tama�o del fichero es {0,number,integer} l�neas (m�ximas permitidas {1,number,integer}).
+maxLen.method=El tama�o del m�todo es {0,number,integer} l�neas (m�ximas permitidas {1,number,integer}).
+maxLen.anonInner=El tama�o de la clase interna an�nima es {0,number,integer} l�neas (m�ximas permitidas {1,number,integer}).
+maxLineLen=La l�nea es mayor de {0,number,integer} caracteres.
+maxParam=M�s de {0,number,integer} par�metros.
+
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_fi.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_fi.properties
new file mode 100644
index 0000000..3801e4d
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_fi.properties
@@ -0,0 +1,4 @@
+maxLen.file=Tiedoston pituus on {0,number,integer} riviä (suurin sallittu on {1,number,integer}).
+maxLen.method=Metodin pituus on {0,number,integer} riviä (suurin sallittu on {1,number,integer}).
+maxLineLen=Rivi on pidempi kuin {0,number,integer} merkkiä.
+maxParam=Enemmän kuin {0,number,integer} parametriä.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_fr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_fr.properties
new file mode 100644
index 0000000..388615d
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_fr.properties
@@ -0,0 +1,7 @@
+executableStatementCount=Le nombre d''instructions est de {0,number,integer} alors que le maximum autoris� est de {1,number,integer}.
+maxLen.file=Le fichier contient {0,number,integer} lignes alors que le maximum autoris� est de {1,number,integer}.
+maxLen.method=La m�thode contient {0,number,integer} lignes alors que le maximum autoris� est de {1,number,integer}.
+maxLen.anonInner=La classe interne anonyme contient {0,number,integer} lignes alors que le maximum autoris� est de {1,number,integer}.
+maxLineLen=La ligne exc�de {0,number,integer} caract�res.
+maxParam=La m�thode ou le constructeur a plus de {0,number,integer} param�tres.
+
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_ja.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_ja.properties
new file mode 100644
index 0000000..cb46f10
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_ja.properties
@@ -0,0 +1,8 @@
+executableStatementCount=\u5b9f\u884c\u6587\u304c {0,number,integer} \u3042\u308a\u307e\u3059\uff08\u6700\u5927 {1,number,integer} \u307e\u3067\uff09\u3002
+maxLen.file=\u30d5\u30a1\u30a4\u30eb\u304c {0,number,integer} \u884c\u3042\u308a\u307e\u3059\uff08\u6700\u5927 {1,number,integer} \u884c\u307e\u3067\uff09\u3002
+maxLen.method=\u30e1\u30bd\u30c3\u30c9\u304c {0,number,integer} \u884c\u3042\u308a\u307e\u3059\uff08\u6700\u5927 {1,number,integer} \u884c\u307e\u3067\uff09\u3002
+maxLen.anonInner=\u7121\u540d\u30a4\u30f3\u30ca\u30fc\u30af\u30e9\u30b9\u306e\u9577\u3055\u304c {0,number,integer} \u884c\u3042\u308a\u307e\u3059\uff08\u6700\u5927 {1,number,integer} \u884c\u307e\u3067\uff09\u3002
+maxLineLen=\u884c\u304c {0,number,integer} \u6587\u5b57\u3092\u8d85\u3048\u3066\u3044\u307e\u3059\u3002
+maxParam=\u30d1\u30e9\u30e1\u30fc\u30bf\u6570\u304c {0,number,integer} \u3092\u8d85\u3048\u3066\u3044\u307e\u3059\u3002
+
+
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_pt.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_pt.properties
new file mode 100644
index 0000000..cab012e
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_pt.properties
@@ -0,0 +1,6 @@
+executableStatementCount=N�mero de declara��es execut�veis � {0,number,integer} (m�x. permitido s�o {1,number,integer}).
+maxLen.anonInner=Classe interna an�ima tem {0,number,integer} linhas (m�x. permitido s�o {1,number,integer}).
+maxLen.file=Ficheiro tem {0,number,integer} linhas (m�x. permitido s�o {1,number,integer}).
+maxLen.method=M�todo tem {0,number,integer} linhas (m�x. permitido s�o {1,number,integer}).
+maxLineLen=Linha cont�m mais do que {0,number,integer} caracteres.
+maxParam=Mais do que {0,number,integer} par�metros.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_tr.properties
new file mode 100644
index 0000000..a6a5a46
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/sizes/messages_tr.properties
@@ -0,0 +1,19 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+executableStatementCount = Y\u00FCr\u00FCt\u00FClebilir ifade say\u0131s\u0131 {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+
+maxLen.anonInner = \u0130simsiz i\u00E7 s\u0131n\u0131f uzunlu\u011Fu  {0,number,integer} sat\u0131r (maksimum izin verilen de\u011Fer {1,number,integer}).
+maxLen.file      = Dosya uzunlu\u011Fu {0,number,integer} sat\u0131r (maksimum izin verilen de\u011Fer {1,number,integer}).
+maxLen.method    = Metot uzunlu\u011Fu {0,number,integer} sat\u0131r (maksimum izin verilen de\u011Fer {1,number,integer}).
+
+maxLineLen = Sat\u0131r {0,number,integer} de\u011Ferinden daha uzun.
+
+maxOuterTypes = Tan\u0131mlanan d\u0131\u015F t\u00FCr say\u0131s\u0131  {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+
+maxParam = {0,number,integer} de\u011Ferinden daha fazla parametre mevcut.
+
+too.many.methods          = Toplam metot say\u0131s\u0131 {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+too.many.packageMethods   = Toplam ''package'' eri\u015Fimli metot say\u0131s\u0131 {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+too.many.privateMethods   = Toplam ''private'' metot say\u0131s\u0131 {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+too.many.protectedMethods = Toplam ''protected'' metot say\u0131s\u0131 {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
+too.many.publicMethods    = Toplam ''public'' metot say\u0131s\u0131 {0,number,integer} (maksimum izin verilen de\u011Fer {1,number,integer}).
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages.properties
new file mode 100644
index 0000000..f6776e7
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages.properties
@@ -0,0 +1,17 @@
+empty.line.separator=''{0}'' should be separated from previous statement.
+
+containsTab=Line contains a tab character.
+file.containsTab=File contains tab characters (this is the first instance).
+
+line.alone=''{0}'' should be alone on a line.
+line.new=''{0}'' should be on a new line.
+line.previous=''{0}'' should be on the previous line.
+line.same=''{0}'' should be on the same line.
+
+no.line.wrap={0} statement should not be line-wrapped.
+
+ws.followed=''{0}'' is followed by whitespace.
+ws.notFollowed=''{0}'' is not followed by whitespace.
+ws.notPreceded=''{0}'' is not preceded with whitespace.
+ws.preceded=''{0}'' is preceded with whitespace.
+ws.illegalFollow=''{0}'' is followed by an illegal character.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_de.properties
new file mode 100644
index 0000000..29c8817
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_de.properties
@@ -0,0 +1,17 @@
+empty.line.separator=''{0}'' sollte vom vorangehenden Ausdruck getrennt stehen.
+
+containsTab=Zeile enth�lt ein TAB-Zeichen
+file.containsTab=Datei enth�lt Tabulatorzeichen (diese Stelle ist das erste Vorkommnen).
+
+line.alone=''{0}'' sollte allein in der Zeile stehen.
+line.new=''{0}'' sollte in einer neuen Zeile stehen.
+line.previous=''{0}'' sollte in der vorangehenden Zeile stehen.
+line.same=''{0}'' sollte in derselben Zeile stehen.
+
+no.line.wrap=Der Ausdruck {0} sollte in einer Zeile stehen.
+
+ws.followed=Nach ''{0}'' folgt ein Leerzeichen.
+ws.notFollowed=Nach ''{0}'' folgt kein Leerzeichen.
+ws.notPreceded=Vor ''{0}'' befindet sich kein Leerzeichen.
+ws.preceded=Vor ''{0}'' befindet sich ein Leerzeichen.
+ws.illegalFollow=Nach ''{0}'' folgt ein ung�ltiges Zeichen.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_es.properties
new file mode 100644
index 0000000..4e9d9ae
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_es.properties
@@ -0,0 +1,11 @@
+containsTab=La l�nea contiene un car�cter de tabulaci�n.
+
+line.alone=''{0}'' deber�a estar solo en una l�nea.
+line.new=''{0}'' deber�a estar en una l�nea nueva.
+line.previous=''{0}'' deber�a estar en la l�nea anterior.
+line.same=''{0}'' deber�a estar en la misma l�nea.
+
+ws.followed=''{0}'' est� seguido de espacios en blanco.
+ws.notFollowed=''{0}'' no est� seguido de espacio en blanco.
+ws.notPreceded=''{0}'' no est� precedido de espacio en blanco.
+ws.preceded=''{0}'' est� precedido de espacio en blanco.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_fi.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_fi.properties
new file mode 100644
index 0000000..f4aec26
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_fi.properties
@@ -0,0 +1,11 @@
+containsTab=Rivi sisältää sarkainmerkin.
+
+line.alone=''{0}'' pitää olla yksinään rivillä.
+line.new=''{0}'' pitää olla uudella rivillä.
+line.previous=''{0}'' pitää olla edellisellä rivillä.
+line.same=''{0}'' pitää olla samalla rivillä.
+
+ws.followed=''{0}'':ta seuraa välilyönti.
+ws.notFollowed=''{0}'':ta ei seuraa välilyönti.
+ws.notPreceded=''{0}'':ta ei edellä välilyönti.
+ws.preceded=''{0}'':ta edeltää välilyönti.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_fr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_fr.properties
new file mode 100644
index 0000000..edc8890
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_fr.properties
@@ -0,0 +1,11 @@
+containsTab=La ligne contient un caract�re tabulation.
+
+line.alone=''{0}'' devrait �tre la seule instruction sur cette ligne.
+line.new=''{0}'' devrait �tre sur une nouvelle ligne.
+line.previous=''{0}'' devrait �tre sur la ligne pr�c�dente.
+line.same=''{0}'' devrait �tre sur la m�me ligne.
+
+ws.followed=Il y a une espace de trop apr�s  ''{0}''.
+ws.notFollowed=Il manque une espace apr�s ''{0}''.
+ws.notPreceded=Il manque une espace avant ''{0}''.
+ws.preceded=Il y a une espace de trop avant ''{0}''.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_ja.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_ja.properties
new file mode 100644
index 0000000..e7c7a0a
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_ja.properties
@@ -0,0 +1,11 @@
+containsTab=\u884c\u306b\u30bf\u30d6\u6587\u5b57\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002
+
+line.alone=''{0}'' \u306f\u72ec\u7acb\u3057\u305f\u884c\u306b\u3042\u308b\u3079\u304d\u3067\u3059\u3002
+line.new=''{0}'' \u306f\u65b0\u3057\u3044\u884c\u306b\u3042\u308b\u3079\u304d\u3067\u3059\u3002
+line.previous=''{0}'' \u306f\u524d\u306e\u884c\u306b\u3042\u308b\u3079\u304d\u3067\u3059\u3002
+line.same=''{0}'' \u306f\u540c\u4e00\u884c\u306b\u3042\u308b\u3079\u304d\u3067\u3059\u3002
+
+ws.followed=''{0}'' \u306e\u5f8c\u306b\u30db\u30ef\u30a4\u30c8\u30b9\u30da\u30fc\u30b9\u304c\u3042\u308a\u307e\u3059\u3002
+ws.notFollowed=''{0}'' \u306e\u5f8c\u306b\u30db\u30ef\u30a4\u30c8\u30b9\u30da\u30fc\u30b9\u304c\u3042\u308a\u307e\u305b\u3093\u3002
+ws.notPreceded=''{0}'' \u306e\u524d\u306b\u30db\u30ef\u30a4\u30c8\u30b9\u30da\u30fc\u30b9\u304c\u3042\u308a\u307e\u305b\u3093\u3002
+ws.preceded=''{0}'' \u306e\u524d\u306b\u30db\u30ef\u30a4\u30c8\u30b9\u30da\u30fc\u30b9\u304c\u3042\u308a\u307e\u3059\u3002
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_pt.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_pt.properties
new file mode 100644
index 0000000..4eb089a
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_pt.properties
@@ -0,0 +1,11 @@
+containsTab=Linha cont�m um caracter de tabula��o.
+
+line.alone=''{0}'' deve estar sozinho numa linha.
+line.new=''{0}'' deve estar numa nova linha.
+line.previous=''{0}'' deve estar na linha anterior.
+line.same=''{0}'' deve estar na mesma linha.
+
+ws.followed=''{0}'' � seguido de espa�o em branco.
+ws.notFollowed=''{0}'' n�o � seguido de espa�o em branco.
+ws.notPreceded=''{0}'' n�o � precedido por espa�o em branco.
+ws.preceded=''{0}'' � precedido por espa�o em branco.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_tr.properties
new file mode 100644
index 0000000..b72bb29
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/messages_tr.properties
@@ -0,0 +1,16 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+containsTab = Sat\u0131r, sekme karakteri i\u00E7ermekte.
+
+file.containsTab = Dosya, sekme karakterleri i\u00E7ermekte (sadece ilk bulunan g\u00F6steriliyor).
+
+line.alone    = ''{0}'' ifadesi sat\u0131rda tek ba\u015F\u0131na olmal\u0131.
+line.new      = ''{0}'' ifadesi yeni bir sat\u0131rda olmal\u0131.
+line.previous = ''{0}'' ifadesi \u00F6nceki sat\u0131rda olmal\u0131.
+line.same     = ''{0}'' ifadesi ayn\u0131 sat\u0131rda olmal\u0131.
+
+ws.followed      = ''{0}'' ifadesinden sonra bo\u015Fluk kullan\u0131lm\u0131\u015F.
+ws.illegalFollow = ''{0}'' ifadesinden sonra ge\u00E7ersiz bir karakter kullan\u0131lm\u0131\u015F.
+ws.notFollowed   = ''{0}'' ifadesinden sonra bo\u015Fluk kullan\u0131lmam\u0131\u015F.
+ws.notPreceded   = ''{0}'' ifadesinden \u00F6nce bo\u015Fluk kullan\u0131lmam\u0131\u015F.
+ws.preceded      = ''{0}'' ifadesinden \u00F6nce bo\u015Fluk kullan\u0131lm\u0131\u015F.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_0.dtd b/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_0.dtd
new file mode 100644
index 0000000..a867462
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_0.dtd
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Add the following to any file that is to be validated against this DTD:
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.0//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_0.dtd">
+
+-->
+
+<!ELEMENT module (module|property)*>
+<!ATTLIST module name NMTOKEN #REQUIRED>
+
+<!ELEMENT property EMPTY>
+<!ATTLIST property
+	name NMTOKEN #REQUIRED
+	value CDATA #REQUIRED
+>
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_1.dtd b/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_1.dtd
new file mode 100644
index 0000000..131c996
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_1.dtd
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Add the following to any file that is to be validated against this DTD:
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+-->
+
+<!ELEMENT module (module|property|metadata)*>
+<!ATTLIST module name NMTOKEN #REQUIRED>
+
+<!ELEMENT property EMPTY>
+<!ATTLIST property
+	name NMTOKEN #REQUIRED
+    value CDATA #REQUIRED
+>
+
+<!--
+
+   Used to store metadata in the Checkstyle configuration file. This
+   information is ignored by Checkstyle. This may be useful if you want to
+   store plug-in specific information.
+
+   To avoid name clashes between different tools/plug-ins you are *strongly*
+   encouraged to prefix all names with your domain name. For example, use the
+   name "com.mycompany.parameter" instead of "parameter".
+
+   The prefix "com.puppycrawl." is reserved for Checkstyle.
+
+-->
+
+<!ELEMENT metadata EMPTY>
+<!ATTLIST metadata
+	name NMTOKEN #REQUIRED
+	value CDATA #REQUIRED
+>
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_2.dtd b/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_2.dtd
new file mode 100644
index 0000000..dbdf803
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_2.dtd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Add the following to any file that is to be validated against this DTD:
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+-->
+
+<!ELEMENT module (module|property|metadata)*>
+<!ATTLIST module name NMTOKEN #REQUIRED>
+
+<!ELEMENT property EMPTY>
+<!ATTLIST property
+	name NMTOKEN #REQUIRED
+    value CDATA #REQUIRED
+    default CDATA #IMPLIED
+>
+
+<!--
+
+   Used to store metadata in the Checkstyle configuration file. This
+   information is ignored by Checkstyle. This may be useful if you want to
+   store plug-in specific information.
+
+   To avoid name clashes between different tools/plug-ins you are *strongly*
+   encouraged to prefix all names with your domain name. For example, use the
+   name "com.mycompany.parameter" instead of "parameter".
+
+   The prefix "com.puppycrawl." is reserved for Checkstyle.
+
+-->
+
+<!ELEMENT metadata EMPTY>
+<!ATTLIST metadata
+	name NMTOKEN #REQUIRED
+	value CDATA #REQUIRED
+>
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_3.dtd b/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_3.dtd
new file mode 100644
index 0000000..9649b17
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_3.dtd
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Add the following to any file that is to be validated against this DTD:
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+-->
+
+<!ELEMENT module (module|property|metadata|message)*>
+<!ATTLIST module name NMTOKEN #REQUIRED>
+
+<!ELEMENT property EMPTY>
+<!ATTLIST property
+	name NMTOKEN #REQUIRED
+    value CDATA #REQUIRED
+    default CDATA #IMPLIED
+>
+
+<!--
+
+   Used to store metadata in the Checkstyle configuration file. This
+   information is ignored by Checkstyle. This may be useful if you want to
+   store plug-in specific information.
+
+   To avoid name clashes between different tools/plug-ins you are *strongly*
+   encouraged to prefix all names with your domain name. For example, use the
+   name "com.mycompany.parameter" instead of "parameter".
+
+   The prefix "com.puppycrawl." is reserved for Checkstyle.
+
+-->
+
+<!ELEMENT metadata EMPTY>
+<!ATTLIST metadata
+	name NMTOKEN #REQUIRED
+	value CDATA #REQUIRED
+>
+
+<!--
+   Can be used to replaced some generic Checkstyle messages with a custom
+   messages.
+
+   The 'key' attribute specifies for which actual Checkstyle message the
+   replacing should occur, look into Checkstyles message.properties for
+   the according message keys.
+
+   The 'value' attribute defines the custom message patterns including
+   message parameter placeholders as defined in the original Checkstyle
+   messages (again see message.properties for reference).
+-->
+<!ELEMENT message EMPTY>
+<!ATTLIST message
+	key NMTOKEN #REQUIRED
+	value CDATA #REQUIRED
+>
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/grammars/java.g b/src/main/resources/com/puppycrawl/tools/checkstyle/grammars/java.g
new file mode 100644
index 0000000..26373b0
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/grammars/java.g
@@ -0,0 +1,2018 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001 - 2007  Oliver Burn
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+////////////////////////////////////////////////////////////////////////////////
+header {
+package com.puppycrawl.tools.checkstyle.grammars;
+
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import java.text.MessageFormat;
+import antlr.CommonToken;
+}
+
+/** Java 1.5 Recognizer
+ *
+ * This grammar is in the PUBLIC DOMAIN
+ */
+class GeneratedJavaRecognizer extends Parser;
+
+options {
+	k = 2;                           // two token lookahead
+	exportVocab=GeneratedJava;       // Call its vocabulary "GeneratedJava"
+	codeGenMakeSwitchThreshold = 2;  // Some optimizations
+	codeGenBitsetTestThreshold = 3;
+	defaultErrorHandler = false;     // Don't generate parser error handlers
+	buildAST = true;
+}
+
+tokens {
+    //Pre-1.4 tokens
+	BLOCK; MODIFIERS; OBJBLOCK; SLIST; CTOR_DEF; METHOD_DEF; VARIABLE_DEF;
+	INSTANCE_INIT; STATIC_INIT; TYPE; CLASS_DEF; INTERFACE_DEF;
+	PACKAGE_DEF; ARRAY_DECLARATOR; EXTENDS_CLAUSE; IMPLEMENTS_CLAUSE;
+	PARAMETERS; PARAMETER_DEF; LABELED_STAT; TYPECAST; INDEX_OP;
+	POST_INC; POST_DEC; METHOD_CALL; METHOD_REF; EXPR; ARRAY_INIT;
+	IMPORT; UNARY_MINUS; UNARY_PLUS; CASE_GROUP; ELIST; FOR_INIT; FOR_CONDITION;
+	FOR_ITERATOR; EMPTY_STAT; FINAL="final"; ABSTRACT="abstract";
+	STRICTFP="strictfp"; SUPER_CTOR_CALL; CTOR_CALL;
+
+	//ANTLR-generated pre-1.4 tokens now listed here to preserve their numerical
+	//order so as to make all future version of this grammar backwardly compatibile
+    LITERAL_package="package";SEMI;LITERAL_import="import";LBRACK;RBRACK;
+    LITERAL_void="void";LITERAL_boolean="boolean";LITERAL_byte="byte";
+    LITERAL_char="char";LITERAL_short="short";LITERAL_int="int";
+    LITERAL_float="float";LITERAL_long="long";LITERAL_double="double";
+    IDENT;DOT;STAR;LITERAL_private="private";LITERAL_public="public";
+    LITERAL_protected="protected";LITERAL_static="static";
+    LITERAL_transient="transient";LITERAL_native="native";
+    LITERAL_synchronized="synchronized";LITERAL_volatile="volatile";
+    LITERAL_class="class";LITERAL_extends="extends";
+    LITERAL_interface="interface";LCURLY;RCURLY;COMMA;
+    LITERAL_implements="implements";LPAREN;RPAREN;LITERAL_this="this";
+    LITERAL_super="super";ASSIGN;LITERAL_throws="throws";COLON;DOUBLE_COLON;
+    LITERAL_if="if";LITERAL_while="while";LITERAL_do="do";
+    LITERAL_break="break";LITERAL_continue="continue";LITERAL_return="return";
+    LITERAL_switch="switch";LITERAL_throw="throw";LITERAL_for="for";
+    LITERAL_else="else";LITERAL_case="case";LITERAL_default="default";
+    LITERAL_try="try";LITERAL_catch="catch";LITERAL_finally="finally";
+    PLUS_ASSIGN;MINUS_ASSIGN;STAR_ASSIGN;DIV_ASSIGN;MOD_ASSIGN;SR_ASSIGN;
+    BSR_ASSIGN;SL_ASSIGN;BAND_ASSIGN;BXOR_ASSIGN;BOR_ASSIGN;QUESTION;
+    LOR;LAND;BOR;BXOR;BAND;NOT_EQUAL;EQUAL;LT;GT;LE;GE;
+    LITERAL_instanceof="instanceof";SL;SR;BSR;PLUS;MINUS;DIV;MOD;
+    INC;DEC;BNOT;LNOT;LITERAL_true="true";LITERAL_false="false";
+    LITERAL_null="null";LITERAL_new="new";NUM_INT;CHAR_LITERAL;
+    STRING_LITERAL;NUM_FLOAT;NUM_LONG;NUM_DOUBLE;WS;SL_COMMENT;
+    ML_COMMENT;ESC;HEX_DIGIT;VOCAB;EXPONENT;FLOAT_SUFFIX;
+
+    //Token for Java 1.4 language enhancements
+    ASSERT;
+
+    //Tokens for Java 1.5 language enhancements
+    STATIC_IMPORT; ENUM; ENUM_DEF; ENUM_CONSTANT_DEF; FOR_EACH_CLAUSE;
+	ANNOTATION_DEF; ANNOTATIONS; ANNOTATION; ANNOTATION_MEMBER_VALUE_PAIR; ANNOTATION_FIELD_DEF;
+	ANNOTATION_ARRAY_INIT; TYPE_ARGUMENTS; TYPE_ARGUMENT; TYPE_PARAMETERS;
+	TYPE_PARAMETER; WILDCARD_TYPE; TYPE_UPPER_BOUNDS; TYPE_LOWER_BOUNDS; AT; ELLIPSIS;
+	GENERIC_START; GENERIC_END; TYPE_EXTENSION_AND;
+
+    // token which was not included to grammar initially
+    // we need to put it to the end to maintain binary compatibility
+    // with previous versions
+    DO_WHILE;
+    
+    //Tokens for Java 1.7 language enhancements
+    RESOURCE_SPECIFICATION; RESOURCES; RESOURCE;
+
+    //TOkens for 1.8
+    LAMBDA;
+}
+
+{
+    /**
+     * Counts the number of LT seen in the typeArguments production.
+     * It is used in semantic predicates to ensure we have seen
+     * enough closing '>' characters; which actually may have been
+     * either GT, SR or BSR tokens.
+     */
+    private int ltCounter = 0;
+
+    /**
+     * Counts the number of '>' characters that have been seen but
+     * have not yet been associated with the end of a typeParameters or
+     * typeArguments production. This is necessary because SR and BSR
+     * tokens have significance (the extra '>' characters) not only for the production
+     * that sees them but also productions higher in the stack (possibly right up to an outer-most
+     * typeParameters production). As the stack of the typeArguments/typeParameters productions unwind,
+     * any '>' characters seen prematurely through SRs or BSRs are reconciled.
+     */
+    private int gtToReconcile = 0;
+
+    /**
+     * The most recently seen gt sequence (GT, SR or BSR)
+     * encountered in any type argument or type parameter production.
+     * We retain this so we can keep manage the synthetic GT tokens/
+     * AST nodes we emit to have '<' & '>' balanced trees when encountering
+     * SR and BSR tokens.
+     */
+    private DetailAST currentGtSequence = null;
+
+    /**
+     * Consume a sequence of '>' characters (GT, SR or BSR)
+     * and match these against the '<' characters seen.
+     */
+    private void consumeCurrentGtSequence(DetailAST gtSequence)
+    {
+        currentGtSequence = gtSequence;
+        gtToReconcile += currentGtSequence.getText().length();
+        ltCounter -= currentGtSequence.getText().length();
+    }
+
+    /**
+     * Emits a single GT AST node with the line and column correctly
+     * set to its position in the source file. This must only
+     * ever be called when a typeParameters or typeArguments production
+     * is ending and there is at least one GT character to be emitted.
+     *
+     * @see #areThereGtsToEmit
+     */
+    private DetailAST emitSingleGt()
+    {
+        gtToReconcile -= 1;
+        CommonToken gtToken = new CommonToken(GENERIC_END, ">");
+        gtToken.setLine(currentGtSequence.getLineNo());
+        gtToken.setColumn(currentGtSequence.getColumnNo() + (currentGtSequence.getText().length() - gtToReconcile));
+        return (DetailAST)astFactory.create(gtToken);
+    }
+
+    /**
+     * @return true if there is at least one '>' seen but
+     * not reconciled with the end of a typeParameters or
+     * typeArguments production; returns false otherwise
+     */
+    private boolean areThereGtsToEmit()
+    {
+        return (gtToReconcile > 0);
+    }
+
+    /**
+     * @return true if there is exactly one '>' seen but
+     * not reconciled with the end of a typeParameters
+     * production; returns false otherwise
+     */
+    private boolean isThereASingleGtToEmit()
+    {
+        return (gtToReconcile == 1);
+    }
+
+    /**
+     * @return true if the '<' and '>' are evenly matched
+     * at the current typeParameters/typeArguments nested depth
+     */
+    private boolean areLtsAndGtsBalanced(int currentLtLevel)
+    {
+        return ((currentLtLevel != 0) || ltCounter == currentLtLevel);
+    }
+}
+
+// Compilation Unit: In Java, this is a single file.  This is the start
+//   rule for this parser
+compilationUnit
+	:	// A compilation unit starts with an optional package definition
+	    // semantic check because package definitions can be annotated
+	    // which causes possible non-determinism in Antrl
+		(	(annotations "package")=> packageDefinition
+		|	/* nothing */
+		)
+
+		// Next we have a series of zero or more import statements
+		( options{generateAmbigWarnings=false;}:importDefinition )*
+
+		// Wrapping things up with any number of class or interface
+		//    definitions
+		( typeDefinition )*
+
+		EOF!
+	;
+
+
+// Package statement: "package" followed by an identifier.
+packageDefinition
+	options {defaultErrorHandler = true;} // let ANTLR handle errors
+	:	annotations p:"package"^ {#p.setType(PACKAGE_DEF);} identifier SEMI
+	;
+
+// Import statement: import followed by a package or class name
+importDefinition
+	options {defaultErrorHandler = true;}
+	:	i:"import"^ {#i.setType(IMPORT);} ( "static" {#i.setType(STATIC_IMPORT);} )? identifierStar SEMI
+	|	SEMI
+	;
+
+// A type definition in a file is either a class, interface, enum of annotation definition
+typeDefinition
+	options {defaultErrorHandler = true;}
+	:	m:modifiers! typeDefinitionInternal[#m]
+	|	SEMI
+	;
+
+// Internal type definition for production reuse
+protected
+typeDefinitionInternal[AST modifiers]
+    : classDefinition[#modifiers]
+	| interfaceDefinition[#modifiers]
+	| enumDefinition[#modifiers]
+	| annotationDefinition[#modifiers]
+	;
+
+// A type specification is a type name with possible brackets afterwards
+//   (which would make it an array type).
+typeSpec[boolean addImagNode]
+	: classTypeSpec[addImagNode]
+	| builtInTypeSpec[addImagNode]
+	;
+
+// A class type specification is a class type with either:
+// - possible brackets afterwards
+//   (which would make it an array type).
+// - generic type arguments after
+classTypeSpec[boolean addImagNode]
+	:   classOrInterfaceType[addImagNode]
+        (options{greedy=true;}: lb:LBRACK^ {#lb.setType(ARRAY_DECLARATOR);} RBRACK)*
+		{
+			if ( addImagNode ) {
+				#classTypeSpec = #(#[TYPE,"TYPE"], #classTypeSpec);
+			}
+		}
+	;
+
+classOrInterfaceType[boolean addImagNode]
+	: ({LA(1) == AT}? annotations
+            | )
+    IDENT (options{warnWhenFollowAmbig=false;}: typeArguments[addImagNode])?
+        (options{greedy=true; }: // match as many as possible
+            DOT^
+            IDENT (options{warnWhenFollowAmbig=false;}: typeArguments[addImagNode])?
+        )*
+    ;
+
+// A generic type argument is a class type, a possibly bounded wildcard type or a built-in type array
+typeArgument[boolean addImagNode]
+:   (   ({LA(1) == AT}? annotations
+         | ) (
+        classTypeSpec[addImagNode]
+	    |   builtInTypeArraySpec[addImagNode]
+	    |   wildcardType[addImagNode])
+	    )
+		{#typeArgument = #(#[TYPE_ARGUMENT,"TYPE_ARGUMENT"], #typeArgument);}
+    ;
+
+wildcardType[boolean addImagNode]
+    :   q:QUESTION {#q.setType(WILDCARD_TYPE);}
+        (("extends" | "super")=> typeArgumentBounds[addImagNode])?
+    ;
+
+typeArguments[boolean addImagNode]
+{int currentLtLevel = 0;}
+    :
+        {currentLtLevel = ltCounter;}
+        lt:LT {#lt.setType(GENERIC_START); ;ltCounter++;}
+        // (Dinesh Bolkensteyn) Added support for Java 7 diamond notation (disabled ambiguous warnings since generated code seems to work)
+        (options{generateAmbigWarnings=false;}:typeArgument[addImagNode]
+        (options{greedy=true;}: // match as many as possible
+            // If there are any '>' to reconcile
+            // (i.e. we've recently encountered a DT, SR or BSR
+            // - the end of one or more type arguments and
+            // possibly an enclosing type parameter)
+            // then further type arguments are not possible
+            {gtToReconcile == 0}? COMMA typeArgument[addImagNode]
+        )*)?
+
+        (   // turn warning off since Antlr generates the right code,
+            // plus we have our semantic predicate below
+            options{generateAmbigWarnings=false;}:
+            typeArgumentsOrParametersEnd
+        )?
+
+        // As we are leaving a typeArguments production, the enclosing '>'
+        // we've just read (and we've possibly seen more than one in the
+        // case of SRs and BSRs) can now be marked as reconciled with a '<'
+        // but we still leave unreconciled the count for any excess '>'
+        // for other typeArguments or typeParameters productions higher in
+        // the stack
+        {
+            if (areThereGtsToEmit())
+            {
+                astFactory.addASTChild(currentAST, emitSingleGt());
+            }
+        }
+        // make sure we have gobbled up enough '>' characters
+        // if we are at the "top level" of nested typeArgument productions
+        {areLtsAndGtsBalanced(currentLtLevel)}?
+
+        {#typeArguments = #(#[TYPE_ARGUMENTS, "TYPE_ARGUMENTS"], #typeArguments);}
+    ;
+
+// this gobbles up *some* amount of '>' characters, and counts how many
+// it gobbled.
+protected typeArgumentsOrParametersEnd!
+    :   g:GT {consumeCurrentGtSequence((DetailAST)#g);}
+    |   sr:SR {consumeCurrentGtSequence((DetailAST)#sr);}
+    |   bsr:BSR {consumeCurrentGtSequence((DetailAST)#bsr);}
+    ;
+
+typeArgumentBounds[boolean addImagNode]
+    :
+        (
+            e:"extends"^ {#e.setType(TYPE_UPPER_BOUNDS); }
+          | s:"super"^ { #s.setType(TYPE_LOWER_BOUNDS); }
+        )
+        (
+            classOrInterfaceType[addImagNode]
+          | builtInType
+        )
+        (options{greedy=true;}: lb:LBRACK^ {#lb.setType(ARRAY_DECLARATOR);} RBRACK)?
+    ;
+
+// A builtin type array specification is a builtin type with brackets afterwards
+builtInTypeArraySpec[boolean addImagNode]
+	:	builtInType
+	    (options{greedy=true;}: lb:LBRACK^ {#lb.setType(ARRAY_DECLARATOR);} RBRACK)+
+		{
+			if ( addImagNode ) {
+				#builtInTypeArraySpec = #(#[TYPE,"TYPE"], #builtInTypeArraySpec);
+			}
+		}
+	;
+
+// A builtin type specification is a builtin type with possible brackets
+// afterwards (which would make it an array type).
+builtInTypeSpec[boolean addImagNode]
+	:	builtInType (lb:LBRACK^ {#lb.setType(ARRAY_DECLARATOR);} RBRACK)*
+		{
+			if ( addImagNode ) {
+				#builtInTypeSpec = #(#[TYPE,"TYPE"], #builtInTypeSpec);
+			}
+		}
+	;
+
+// A type name. which is either a (possibly qualified and parameterized)
+// class name or a primitive (builtin) type
+type
+	:	classOrInterfaceType[false]
+	|	builtInType
+	;
+
+/** A declaration is the creation of a reference or primitive-type variable
+ *  Create a separate Type/Var tree for each var in the var list.
+ */
+declaration!
+	:	m:modifiers t:typeSpec[false] v:variableDefinitions[#m,#t]
+		{#declaration = #v;}
+	;
+
+// The primitive types.
+builtInType
+	:	"void"
+	|	"boolean"
+	|	"byte"
+	|	"char"
+	|	"short"
+	|	"int"
+	|	"float"
+	|	"long"
+	|	"double"
+	;
+
+// A (possibly-qualified) java identifier.  We start with the first IDENT
+//   and expand its name by adding dots and following IDENTS
+identifier
+	:	IDENT  (options{warnWhenFollowAmbig=false;}: DOT^ IDENT )*
+	;
+
+identifierStar
+	:	IDENT
+		( DOT^ IDENT )*
+		( DOT^ STAR  )?
+	;
+
+// A list of zero or more modifiers.  We could have used (modifier)* in
+//   place of a call to modifiers, but I thought it was a good idea to keep
+//   this rule separate so they can easily be collected in a Vector if
+//   someone so desires
+modifiers
+	:
+	    (
+	        //hush warnings since the semantic check for "@interface" solves the non-determinism
+	        options{generateAmbigWarnings=false;}:
+
+		modifier
+	        |
+	        //Semantic check that we aren't matching @interface as this is not an annotation
+	        //A nicer way to do this would be, um, nice
+	        {LA(1)==AT && !LT(2).getText().equals("interface")}? annotation
+            
+            
+	    )*
+
+		{#modifiers = #([MODIFIERS, "MODIFIERS"], #modifiers);}
+	;
+
+// modifiers for Java classes, interfaces, class/instance vars and methods
+modifier
+	:	"private"
+	|	"public"
+	|	"protected"
+	|	"static"
+	|	"transient"
+	|	"final"
+	|	"abstract"
+	|	"native"
+	|	"synchronized"
+//	|	"const"			// reserved word, but not valid
+	|	"volatile"
+	|	"strictfp"
+	|	"default"
+	;
+
+annotation!
+    :   AT i:identifier (options {generateAmbigWarnings=false;}: l:LPAREN ( args:annotationArguments )? r:RPAREN )?
+        {#annotation = #(#[ANNOTATION,"ANNOTATION"], AT, i, l, args, r);}
+    ;
+
+annotations
+    :   (options{generateAmbigWarnings=false;}:annotation)*
+        {#annotations = #(#[ANNOTATIONS,"ANNOTATIONS"], #annotations);}
+    ;
+
+annotationArguments
+    :   annotationMemberValueInitializer | annotationMemberValuePairs
+    ;
+
+annotationMemberValuePairs
+    :   annotationMemberValuePair ( COMMA annotationMemberValuePair )*
+    ;
+
+annotationMemberValuePair!
+    :   i:IDENT a:ASSIGN v:annotationMemberValueInitializer
+        {#annotationMemberValuePair = #(#[ANNOTATION_MEMBER_VALUE_PAIR,"ANNOTATION_MEMBER_VALUE_PAIR"], i, a, v);}
+    ;
+
+annotationMemberValueInitializer
+    :
+        annotationExpression | annotation | annotationMemberArrayInitializer
+    ;
+
+// This is an initializer used to set up an annotation member array.
+annotationMemberArrayInitializer
+	:	lc:LCURLY^ {#lc.setType(ANNOTATION_ARRAY_INIT);}
+			(	annotationMemberArrayValueInitializer
+				(
+					// CONFLICT: does a COMMA after an initializer start a new
+					//           initializer or start the option ',' at end?
+					//           ANTLR generates proper code by matching
+					//			 the comma as soon as possible.
+					options {
+						warnWhenFollowAmbig = false;
+					}
+				:
+					COMMA annotationMemberArrayValueInitializer
+				)*
+				(COMMA)?
+			)?
+		RCURLY
+	;
+
+// The two things that can initialize an annotation array element are a conditional expression
+//   and an annotation (nested annotation array initialisers are not valid)
+annotationMemberArrayValueInitializer
+	:	annotationExpression
+	|   annotation
+	;
+
+annotationExpression
+    :   conditionalExpression
+        {#annotationExpression = #(#[EXPR,"EXPR"],#annotationExpression);}
+    ;
+
+// Definition of a Java class
+classDefinition![AST modifiers]
+	:	c:"class" IDENT
+		// it _might_ have type paramaters
+		(tp:typeParameters)?
+		// it _might_ have a superclass...
+		sc:superClassClause
+		// it might implement some interfaces...
+		ic:implementsClause
+		// now parse the body of the class
+		cb:classBlock
+		{#classDefinition = #(#[CLASS_DEF,"CLASS_DEF"],
+							   modifiers, c, IDENT, tp, sc, ic, cb);}
+    ;
+
+superClassClause
+	:	( e:"extends"^ {#e.setType(EXTENDS_CLAUSE);}
+          c:classOrInterfaceType[false] )?
+	;
+
+// Definition of a Java Interface
+interfaceDefinition![AST modifiers]
+	:	i:"interface" IDENT
+        // it _might_ have type paramaters
+        (tp:typeParameters)?
+		// it might extend some other interfaces
+		ie:interfaceExtends
+		// now parse the body of the interface (looks like a class...)
+		cb:classBlock
+		{#interfaceDefinition = #(#[INTERFACE_DEF,"INTERFACE_DEF"],
+									modifiers, i, IDENT,tp,ie,cb);}
+	;
+
+enumDefinition![AST modifiers]
+	:	e:ENUM IDENT
+		// it might implement some interfaces...
+		ic:implementsClause
+		// now parse the body of the enum
+		eb:enumBlock
+		{#enumDefinition = #(#[ENUM_DEF,"ENUM_DEF"],
+							   modifiers, e, IDENT, ic, eb);}
+    ;
+
+annotationDefinition![AST modifiers]
+	:	a:AT i:"interface" IDENT
+		// now parse the body of the annotation
+		ab:annotationBlock
+		{#annotationDefinition = #(#[ANNOTATION_DEF,"ANNOTATION_DEF"],
+							        modifiers, a, i, IDENT, ab);}
+    ;
+
+typeParameters
+{int currentLtLevel = 0;}
+    :
+        {currentLtLevel = ltCounter;}
+        lt:LT {#lt.setType(GENERIC_START); ltCounter++;}
+        typeParameter (COMMA typeParameter)*
+        (typeArgumentsOrParametersEnd)?
+
+        // There should be only one '>' to reconcile - the enclosing
+        // '>' for the type parameter. Any other adjacent '>' seen should
+        // have been reconciled with type arguments for the last type parameter
+        // hence we can assert here that there is but one unaccounted '>'.
+        {
+        	if (isThereASingleGtToEmit()) {
+            	astFactory.addASTChild(currentAST, emitSingleGt());
+            }
+        }
+        // make sure we have gobbled up enough '>' characters
+        // if we are at the "top level" of nested typeArgument productions
+        {areLtsAndGtsBalanced(currentLtLevel)}?
+
+        {#typeParameters = #(#[TYPE_PARAMETERS, "TYPE_PARAMETERS"], #typeParameters);}
+    ;
+
+typeParameter
+    :
+        // I'm pretty sure Antlr generates the right thing here:
+        (id:IDENT) ( options{generateAmbigWarnings=false;}: typeParameterBounds )?
+		{#typeParameter = #(#[TYPE_PARAMETER,"TYPE_PARAMETER"], #typeParameter);}
+    ;
+
+typeParameterBounds
+    :
+        e:"extends"^ classOrInterfaceType[true]
+        (b:BAND {#b.setType(TYPE_EXTENSION_AND);} classOrInterfaceType[true])*
+        {#e.setType(TYPE_UPPER_BOUNDS);}
+    ;
+
+// This is the body of an annotation. You can have annotation fields and extra semicolons,
+// That's about it (until you see what an annoation field is...)
+annotationBlock
+	:	LCURLY
+	    ( annotationField | SEMI )*
+		RCURLY
+		{#annotationBlock = #([OBJBLOCK, "OBJBLOCK"], #annotationBlock);}
+	;
+
+// An annotation field
+annotationField!
+    :   mods:modifiers
+		(	td:typeDefinitionInternal[#mods]
+			{#annotationField = #td;}
+
+		|   t:typeSpec[false]               // annotation field
+			(	i:IDENT  // the name of the field
+
+				LPAREN RPAREN
+
+				rt:declaratorBrackets[#t]
+
+                ( d:annotationDefault )?
+
+				s:SEMI
+
+				{#annotationField =
+				    #(#[ANNOTATION_FIELD_DEF,"ANNOTATION_FIELD_DEF"],
+                         mods,
+                         #(#[TYPE,"TYPE"],rt),
+                         i,
+                         LPAREN,
+                         RPAREN,
+                         d,
+                         s
+                         );}
+			|	v:variableDefinitions[#mods,#t] s6:SEMI
+				{
+					#annotationField = #v;
+					#v.addChild(#s6);
+				}
+			)
+		)
+    ;
+
+annotationDefault
+    : "default"^ annotationMemberValueInitializer
+    ;
+
+// This is the body of an enum. You can have zero or more enum constants
+// followed by any number of fields like a regular class
+enumBlock
+	:	LCURLY
+	        ( enumConstant ( options{greedy=true;}: COMMA enumConstant )* ( COMMA )? )?
+	        ( SEMI ( field | SEMI )* )?
+		RCURLY
+		{#enumBlock = #([OBJBLOCK, "OBJBLOCK"], #enumBlock);}
+	;
+
+//An enum constant may have optional parameters and may have a
+//a body
+enumConstant!
+    :   an:annotations
+        i:IDENT
+        (	l:LPAREN
+            args:argList
+            r:RPAREN
+        )?
+        ( b:enumConstantBlock )?
+        {#enumConstant = #([ENUM_CONSTANT_DEF, "ENUM_CONSTANT_DEF"], an, i, l, args, r, b);}
+    ;
+
+//The class-like body of an enum constant
+enumConstantBlock
+    :   LCURLY
+        ( enumConstantField | SEMI )*
+        RCURLY
+        {#enumConstantBlock = #([OBJBLOCK, "OBJBLOCK"], #enumConstantBlock);}
+    ;
+
+//An enum constant field is just like a class field but without
+//the posibility of a constructor definition or a static initializer
+enumConstantField!
+    :   mods:modifiers
+		(	td:typeDefinitionInternal[#mods]
+			{#enumConstantField = #td;}
+
+		|	// A generic method has the typeParameters before the return type.
+            // This is not allowed for variable definitions, but this production
+            // allows it, a semantic check could be used if you wanted.
+            (tp:typeParameters)? t:typeSpec[false]  // method or variable declaration(s)
+			(	IDENT  // the name of the method
+
+				// parse the formal parameter declarations.
+				LPAREN param:parameterDeclarationList RPAREN
+
+				rt:declaratorBrackets[#t]
+
+				// get the list of exceptions that this method is
+				// declared to throw
+				(tc:throwsClause)?
+
+				( s2:compoundStatement | s3:SEMI )
+				{#enumConstantField = #(#[METHOD_DEF,"METHOD_DEF"],
+						     mods,
+						     tp,
+							 #(#[TYPE,"TYPE"],rt),
+							 IDENT,
+							 LPAREN,
+							 param,
+							 RPAREN,
+							 tc,
+							 s2,
+							 s3);}
+			|	v:variableDefinitions[#mods,#t] s6:SEMI
+				{
+					#enumConstantField = #v;
+					#v.addChild(#s6);
+				}
+			)
+		)
+
+    // "{ ... }" instance initializer
+	|	s4:compoundStatement
+		{#enumConstantField = #(#[INSTANCE_INIT,"INSTANCE_INIT"], s4);}
+	;
+
+// This is the body of a class.  You can have fields and extra semicolons,
+// That's about it (until you see what a field is...)
+classBlock
+	:	LCURLY
+			( field | SEMI )*
+		RCURLY
+		{#classBlock = #([OBJBLOCK, "OBJBLOCK"], #classBlock);}
+	;
+
+// An interface can extend several other interfaces...
+interfaceExtends
+	:	(
+		e:"extends"^ {#e.setType(EXTENDS_CLAUSE);} 
+        classOrInterfaceType[false] ( COMMA classOrInterfaceType[false] )*
+		)?
+	;
+
+// A class can implement several interfaces...
+implementsClause
+	:	(
+			i:"implements"^ {#i.setType(IMPLEMENTS_CLAUSE);}
+            classOrInterfaceType[false] ( COMMA classOrInterfaceType[false] )*
+		)?
+	;
+
+   // Now the various things that can be defined inside a class or interface...
+   // Note that not all of these are really valid in an interface (constructors,
+   //   for example), and if this grammar were used for a compiler there would
+   //   need to be some semantic checks to make sure we're doing the right thing...
+   field!
+   	:	// method, constructor, or variable declaration
+       		mods:modifiers
+       		(td:typeDefinitionInternal[#mods]
+       			{#field = #td;}
+
+       	    // A generic method/ctor has the typeParameters before the return type.
+               // This is not allowed for variable definitions, but this production
+               // allows it, a semantic check could be used if you wanted.
+               |   (tp:typeParameters)?
+                   (
+                       h:ctorHead s:constructorBody // constructor
+                       {#field = #(#[CTOR_DEF,"CTOR_DEF"], mods, tp, h, s);}
+
+                       |
+                       t:typeSpec[false]  // method or variable declaration(s)
+                       (	IDENT  // the name of the method
+
+                           // parse the formal parameter declarations.
+                           LPAREN param:parameterDeclarationList RPAREN
+
+                           rt:declaratorBrackets[#t]
+
+                           // get the list of exceptions that this method is
+                           // declared to throw
+                           (tc:throwsClause)?
+
+                           ( s2:compoundStatement | s5:SEMI )
+                           {#field = #(#[METHOD_DEF,"METHOD_DEF"],
+                                        mods,
+                                        tp,
+                                        #(#[TYPE,"TYPE"],rt),
+                                        IDENT,
+                                        LPAREN,
+                                        param,
+                                        RPAREN,
+                                        tc,
+                                        s2,
+                                        s5);}
+                       |	v:variableDefinitions[#mods,#t] (s6:SEMI)?
+                           {
+                               #field = #v;
+                               #v.addChild(#s6);
+                           }
+                       )
+                   )
+       		)
+
+           // "static { ... }" class initializer
+       	|	si:"static" s3:compoundStatement
+       		{#si.setType(STATIC_INIT);
+       		 #si.setText("STATIC_INIT");
+       		 #field = #(#si, s3);}
+
+           // "{ ... }" instance initializer
+       	|	s4:compoundStatement
+       		{#field = #(#[INSTANCE_INIT,"INSTANCE_INIT"], s4);}
+   	;
+
+constructorBody
+    :   lc:LCURLY^ {#lc.setType(SLIST);}
+		// Predicate might be slow but only checked once per constructor def
+		// not for general methods.
+		(	(explicitConstructorInvocation) => explicitConstructorInvocation
+		|
+		)
+        (statement)*
+        RCURLY
+    ;
+
+explicitConstructorInvocation
+    :   (	options {
+				// this/super can begin a primaryExpression too; with finite
+				// lookahead ANTLR will think the 3rd alternative conflicts
+				// with 1, 2.  I am shutting off warning since ANTLR resolves
+				// the nondeterminism by correctly matching alts 1 or 2 when
+				// it sees this( or super(
+				generateAmbigWarnings=false;
+			}
+		:
+			(typeArguments[false])?
+			(	t:"this"^ LPAREN argList RPAREN SEMI
+				{#t.setType(CTOR_CALL);}
+
+			|   s:"super"^ LPAREN argList RPAREN SEMI
+                {#s.setType(SUPER_CTOR_CALL);}
+			)
+
+		|	// (new Outer()).super()  (create enclosing instance)
+			primaryExpression DOT (typeArguments[false])? s1:"super"^ LPAREN argList RPAREN SEMI
+			{#s1.setType(SUPER_CTOR_CALL);}
+		)
+    ;
+
+variableDefinitions[AST mods, AST t]
+	:	variableDeclarator[(AST) getASTFactory().dupTree(mods),
+						   (AST) getASTFactory().dupList(t)] //dupList as this also copies siblings (like TYPE_ARGUMENTS)
+		(	COMMA
+			variableDeclarator[(AST) getASTFactory().dupTree(mods),
+							   (AST) getASTFactory().dupList(t)] //dupList as this also copies siblings (like TYPE_ARGUMENTS)
+		)*
+	;
+
+/** Declaration of a variable.  This can be a class/instance variable,
+ *   or a local variable in a method
+ * It can also include possible initialization.
+ */
+variableDeclarator![AST mods, AST t]
+	:	id:IDENT d:declaratorBrackets[t] v:varInitializer
+		{#variableDeclarator = #(#[VARIABLE_DEF,"VARIABLE_DEF"], mods, #(#[TYPE,"TYPE"],d), id, v);}
+	;
+
+declaratorBrackets[AST typ]
+	:	{#declaratorBrackets=typ;}
+		(lb:LBRACK^ {#lb.setType(ARRAY_DECLARATOR);} RBRACK)*
+	;
+
+varInitializer
+	:	( ASSIGN^ initializer )?
+	;
+
+// This is an initializer used to set up an array.
+arrayInitializer
+	:	lc:LCURLY^ {#lc.setType(ARRAY_INIT);}
+			(	initializer
+				(
+					// CONFLICT: does a COMMA after an initializer start a new
+					//           initializer or start the option ',' at end?
+					//           ANTLR generates proper code by matching
+					//			 the comma as soon as possible.
+					options {
+						warnWhenFollowAmbig = false;
+					}
+				:
+					COMMA initializer
+				)*
+			)?
+			(COMMA)?
+		RCURLY
+	;
+
+
+// The two "things" that can initialize an array element are an expression
+//   and another (nested) array initializer.
+initializer
+	:	expression
+	|	arrayInitializer
+	;
+
+// This is the header of a method.  It includes the name and parameters
+//   for the method.
+//   This also watches for a list of exception classes in a "throws" clause.
+ctorHead
+	:	IDENT  // the name of the method
+
+		// parse the formal parameter declarations.
+		LPAREN parameterDeclarationList RPAREN
+
+		// get the list of exceptions that this method is declared to throw
+		(throwsClause)?
+	;
+
+// This is a list of exception classes that the method is declared to throw
+throwsClause
+	:	"throws"^ ({LA(1) == AT}? annotations 
+                    | ) identifier ( COMMA identifier )*
+	;
+
+
+// A list of formal parameters
+//     Zero or more parameters
+//     If a parameter is variable length (e.g. String... myArg) it is the right-most parameter
+parameterDeclarationList
+    // The semantic check in ( .... )* block is flagged as superfluous, and seems superfluous but
+    // is the only way I could make this work. If my understanding is correct this is a known bug in Antlr
+    :   (   ( parameterDeclaration )=> parameterDeclaration
+            ( options {warnWhenFollowAmbig=false;} : ( COMMA parameterDeclaration ) => COMMA parameterDeclaration )*
+            ( COMMA variableLengthParameterDeclaration )?
+        |
+            variableLengthParameterDeclaration
+        )?
+		{#parameterDeclarationList = #(#[PARAMETERS,"PARAMETERS"],
+									#parameterDeclarationList);}
+	;
+
+variableLengthParameterDeclaration!
+	:	pm:parameterModifier t:typeSpec[false] td:ELLIPSIS IDENT
+		pd:declaratorBrackets[#t]
+		{#variableLengthParameterDeclaration = #(#[PARAMETER_DEF,"PARAMETER_DEF"],
+                                                pm, #([TYPE,"TYPE"],pd), td, IDENT);}
+    ;
+
+parameterModifier
+    //final can appear amongst annotations in any order - greedily consume any preceding
+    //annotations to shut nond-eterminism warnings off
+	:	(options{greedy=true;} : annotation)* (f:"final")? (options {warnWhenFollowAmbig=false;}: annotation)*
+		{#parameterModifier = #(#[MODIFIERS,"MODIFIERS"], #parameterModifier);}
+    ;
+
+// A formal parameter.
+parameterDeclaration!
+	:	pm:parameterModifier (t:typeSpec[false])? id:IDENT
+		pd:declaratorBrackets[#t]
+		{#parameterDeclaration = #(#[PARAMETER_DEF,"PARAMETER_DEF"],
+									pm, #([TYPE,"TYPE"],pd), id);}
+	;
+//Added for support Java7's "multi-catch", several types separated by '|'
+catchParameterDeclaration!
+    :   pm:parameterModifier mct:multiCatchTypes id:IDENT
+            {#catchParameterDeclaration = #(#[PARAMETER_DEF,"PARAMETER_DEF"], pm, #([TYPE,"TYPE"],mct), id);}
+    ;
+
+multiCatchTypes
+	: typeSpec[false] (BOR^ typeSpec[false])*;
+
+// Compound statement.  This is used in many contexts:
+//   Inside a class definition prefixed with "static":
+//      it is a class initializer
+//   Inside a class definition without "static":
+//      it is an instance initializer
+//   As the body of a method
+//   As a completely independent braced block of code inside a method
+//      it starts a new scope for variable definitions
+
+compoundStatement
+	:	lc:LCURLY^ {#lc.setType(SLIST);}
+			// include the (possibly-empty) list of statements
+			(statement)*
+		RCURLY
+	;
+
+// overrides the statement production in java.g, adds assertStatement
+statement
+	:	traditionalStatement
+        |	assertStatement
+	;
+
+// assert statement, available since JDK 1.4
+assertStatement
+	:	ASSERT^ expression ( COLON expression )? SEMI
+	;
+
+// a traditional (JDK < 1.4) java statement, assert keyword is not allowed
+traditionalStatement
+	// A list of statements in curly braces -- start a new scope!
+	:	compoundStatement
+
+		// declarations are ambiguous with "ID DOT" relative to expression
+		// statements.  Must backtrack to be sure.  Could use a semantic
+		// predicate to test symbol table to see what the type was coming
+		// up, but that's pretty hard without a symbol table ;)
+		|	(declaration)=> declaration SEMI
+
+		// An expression statement.  This could be a method call,
+		// assignment statement, or any other expression evaluated for
+		// side-effects.
+		|	{LA(2) != COLON}? expression (SEMI)?
+
+		// class definition
+		|	m:modifiers! classDefinition[#m]
+
+		// Attach a label to the front of a statement
+		|	IDENT c:COLON^ {#c.setType(LABELED_STAT);} statement
+
+		// If-else statement
+		|	"if"^ LPAREN expression RPAREN statement
+			(
+				// CONFLICT: the old "dangling-else" problem...
+				//           ANTLR generates proper code matching
+				//			 as soon as possible.  Hush warning.
+				options {
+					warnWhenFollowAmbig = false;
+				}
+			:
+				elseStatement
+		)?
+
+		// For statement
+		|	forStatement
+
+		// While statement
+		|	"while"^ LPAREN expression RPAREN statement
+
+		// do-while statement
+		|	"do"^ statement w:"while" {#w.setType(DO_WHILE);} LPAREN expression RPAREN SEMI
+
+		// get out of a loop (or switch)
+		|	"break"^ (IDENT)? SEMI
+
+		// do next iteration of a loop
+		|	"continue"^ (IDENT)? SEMI
+
+		// Return an expression
+		|	"return"^ (expression)? SEMI
+
+		// switch/case statement
+		|	"switch"^ LPAREN expression RPAREN LCURLY
+				( casesGroup )*
+			RCURLY
+
+		// exception try-catch block
+		|	tryBlock
+
+		// throw an exception
+		|	"throw"^ expression SEMI
+
+		// synchronize a statement
+		|	"synchronized"^ LPAREN expression RPAREN compoundStatement
+
+		// empty statement
+		|	s:SEMI {#s.setType(EMPTY_STAT);}
+	;
+
+forStatement
+    :   f:"for"^
+        LPAREN
+            ( (forInit SEMI)=>traditionalForClause
+              |
+              forEachClause)
+        RPAREN
+        statement                     // statement to loop over
+    ;
+
+traditionalForClause
+    :
+        forInit SEMI   // initializer
+        forCond SEMI   // condition test
+        forIter         // updater
+    ;
+
+forEachClause
+    :
+        forEachDeclarator COLON expression
+        {#forEachClause = #(#[FOR_EACH_CLAUSE,"FOR_EACH_CLAUSE"], #forEachClause);}
+    ;
+
+forEachDeclarator!
+	:	m:modifiers t:typeSpec[false] id:IDENT d:declaratorBrackets[#t]
+		{#forEachDeclarator = #(#[VARIABLE_DEF,"VARIABLE_DEF"], m, #(#[TYPE,"TYPE"],d), id);}
+	;
+
+elseStatement
+    : "else"^ statement
+    ;
+
+casesGroup
+	:	(	// CONFLICT: to which case group do the statements bind?
+			//           ANTLR generates proper code: it groups the
+			//           many "case"/"default" labels together then
+			//           follows them with the statements
+			options {
+				warnWhenFollowAmbig = false;
+			}
+			:
+			aCase
+		)+
+		caseSList
+		{#casesGroup = #([CASE_GROUP, "CASE_GROUP"], #casesGroup);}
+	;
+
+aCase
+	:	("case"^ expression | "default"^) COLON
+	;
+
+caseSList
+	:	
+		(
+			//Here was nondeterministic warnig between default block into switch and default modifier
+			 //on methods (Java8). But we have semantic check for this.
+			options {
+				warnWhenFollowAmbig = false;
+			}
+			:
+			{LA(1)!=LITERAL_default}?
+				statement
+		)*
+		{#caseSList = #(#[SLIST,"SLIST"],#caseSList);}
+	;
+
+// The initializer for a for loop
+forInit
+		// if it looks like a declaration, it is
+	:	(	(declaration)=> declaration
+		// otherwise it could be an expression list...
+		|	expressionList
+		)?
+		{#forInit = #(#[FOR_INIT,"FOR_INIT"],#forInit);}
+	;
+
+forCond
+	:	(expression)?
+		{#forCond = #(#[FOR_CONDITION,"FOR_CONDITION"],#forCond);}
+	;
+
+forIter
+	:	(expressionList)?
+		{#forIter = #(#[FOR_ITERATOR,"FOR_ITERATOR"],#forIter);}
+	;
+
+// an exception handler try/catch block
+// (Dinesh Bolkensteyn): Added support for Java 7 try-with-resources
+tryBlock
+	:	"try"^
+	    
+	    // try-with-resources
+	    (resourceSpecification)?
+	    
+	    compoundStatement
+		(handler)*
+		( finallyHandler )?
+	;
+
+resourceSpecification
+	: LPAREN resources (SEMI)? RPAREN
+	  {#resourceSpecification = #([RESOURCE_SPECIFICATION, "RESOURCE_SPECIFICATION"], #resourceSpecification);}
+	;
+	
+resources
+	: resource (SEMI resource)*
+	  {#resources = #([RESOURCES, "RESOURCES"], #resources);}
+	;
+
+
+resource
+	: modifiers typeSpec[true] IDENT resource_assign
+	  {#resource = #([RESOURCE, "RESOURCE"], #resource);}
+;
+ 
+resource_assign
+	: ASSIGN^ expression
+	;
+
+// an exception handler
+handler
+	:	"catch"^ LPAREN catchParameterDeclaration RPAREN compoundStatement
+	;
+
+finallyHandler
+    : "finally"^ compoundStatement
+    ;
+
+
+// expressions
+// Note that most of these expressions follow the pattern
+//   thisLevelExpression :
+//       nextHigherPrecedenceExpression
+//           (OPERATOR nextHigherPrecedenceExpression)*
+// which is a standard recursive definition for a parsing an expression.
+// The operators in java have the following precedences:
+//    lowest  (13)  = *= /= %= += -= <<= >>= >>>= &= ^= |=
+//            (12)  ?:
+//            (11)  ||
+//            (10)  &&
+//            ( 9)  |
+//            ( 8)  ^
+//            ( 7)  &
+//            ( 6)  == !=
+//            ( 5)  < <= > >=
+//            ( 4)  << >>
+//            ( 3)  +(binary) -(binary)
+//            ( 2)  * / %
+//            ( 1)  ++ -- +(unary) -(unary)  ~  !  (type)
+//                  []   () (method call)  . (dot -- identifier qualification)
+//                  new   ()  (explicit parenthesis)
+//
+// the last two are not usually on a precedence chart; I put them in
+// to point out that new has a higher precedence than '.', so you
+// can validy use
+//     new Frame().show()
+//
+// Note that the above precedence levels map to the rules below...
+// Once you have a precedence chart, writing the appropriate rules as below
+//   is usually very straightfoward
+
+
+
+// the mother of all expressions
+expression
+	:	(lambdaExpression) => lambdaExpression
+    |   {LA(1)!=RPAREN}? assignmentExpression
+		{#expression = #(#[EXPR,"EXPR"],#expression);}
+	;
+
+
+// This is a list of expressions.
+expressionList
+	:	expression (COMMA expression)*
+		{#expressionList = #(#[ELIST,"ELIST"], expressionList);}
+	;
+
+
+// assignment expression (level 13)
+assignmentExpression
+	:	conditionalExpression
+		(	(	ASSIGN^
+            |   PLUS_ASSIGN^
+            |   MINUS_ASSIGN^
+            |   STAR_ASSIGN^
+            |   DIV_ASSIGN^
+            |   MOD_ASSIGN^
+            |   SR_ASSIGN^
+            |   BSR_ASSIGN^
+            |   SL_ASSIGN^
+            |   BAND_ASSIGN^
+            |   BXOR_ASSIGN^
+            |   BOR_ASSIGN^
+            )
+			((lambdaExpression)=>lambdaExpression
+			| assignmentExpression)
+		)?
+	;
+
+
+// conditional test (level 12)
+conditionalExpression
+	:	logicalOrExpression
+		( QUESTION^ 
+            ((lambdaExpression)=>lambdaExpression
+                | assignmentExpression)
+         COLON ((lambdaExpression)=>lambdaExpression
+                | conditionalExpression) )?
+	;
+
+
+// logical or (||)  (level 11)
+logicalOrExpression
+	:	logicalAndExpression (LOR^ logicalAndExpression)*
+	;
+
+
+// logical and (&&)  (level 10)
+logicalAndExpression
+	:	inclusiveOrExpression (LAND^ inclusiveOrExpression)*
+	;
+
+
+// bitwise or non-short-circuiting or (|)  (level 9)
+inclusiveOrExpression
+	:	exclusiveOrExpression (BOR^ exclusiveOrExpression)*
+	;
+
+
+// exclusive or (^)  (level 8)
+exclusiveOrExpression
+	:	andExpression (BXOR^ andExpression)*
+	;
+
+
+// bitwise or non-short-circuiting and (&)  (level 7)
+andExpression
+	:	equalityExpression (BAND^ equalityExpression)*
+	;
+
+
+// equality/inequality (==/!=) (level 6)
+equalityExpression
+	:	relationalExpression ((NOT_EQUAL^ | EQUAL^) relationalExpression)*
+	;
+
+
+// boolean relational expressions (level 5)
+relationalExpression
+	:	shiftExpression ( "instanceof"^ typeSpec[true])?
+		(	(options{warnWhenFollowAmbig=false;} : 	(	LT^
+				|	GT^
+				|	LE^
+				|	GE^
+				)
+				shiftExpression
+			)*
+		
+		)
+	;
+
+
+// bit shift expressions (level 4)
+shiftExpression
+	:	additiveExpression ((SL^ | SR^ | BSR^) additiveExpression)*
+	;
+
+
+// binary addition/subtraction (level 3)
+additiveExpression
+	:	multiplicativeExpression (options{warnWhenFollowAmbig=false;} : (PLUS^ | MINUS^) multiplicativeExpression)*
+	;
+
+
+// multiplication/division/modulo (level 2)
+multiplicativeExpression
+	:	unaryExpression ((STAR^ | DIV^ | MOD^ ) unaryExpression)*
+	;
+
+unaryExpression
+	:	INC^ unaryExpression
+	|	DEC^ unaryExpression
+	|	MINUS^ {#MINUS.setType(UNARY_MINUS);} unaryExpression
+	|	PLUS^  {#PLUS.setType(UNARY_PLUS);} unaryExpression
+	|	unaryExpressionNotPlusMinus
+	;
+
+unaryExpressionNotPlusMinus
+	:	BNOT^ unaryExpression
+	|	LNOT^ unaryExpression
+
+	|	(	// subrule allows option to shut off warnings
+			options {
+				// "(int" ambig with postfixExpr due to lack of sequence
+				// info in linear approximate LL(k).  It's ok.  Shut up.
+				generateAmbigWarnings=false;
+			}
+		:	// If typecast is built in type, must be numeric operand
+			// Also, no reason to backtrack if type keyword like int, float...
+			(LPAREN builtInTypeSpec[true] RPAREN unaryExpression) => 
+            lpb:LPAREN^ {#lpb.setType(TYPECAST);} builtInTypeSpec[true] RPAREN
+			unaryExpression
+
+			// Have to backtrack to see if operator follows.  If no operator
+			// follows, it's a typecast.  No semantic checking needed to parse.
+			// if it _looks_ like a cast, it _is_ a cast; else it's a "(expr)"
+		|	(LPAREN typeCastParameters RPAREN unaryExpressionNotPlusMinus)=>
+			lp:LPAREN^ {#lp.setType(TYPECAST);} typeCastParameters RPAREN
+			unaryExpressionNotPlusMinus
+
+        |   (LPAREN typeCastParameters RPAREN lambdaExpression) =>
+                lpl:LPAREN^ {#lpl.setType(TYPECAST);} typeCastParameters RPAREN
+                lambdaExpression
+
+		|	postfixExpression
+		)
+	;
+
+typeCastParameters
+	: classTypeSpec[true] (BAND^ classTypeSpec[true])*
+	;
+
+// TODO: handle type parameters more effectively - I think this production needs
+// a refactoring like the original Antlr Java grammar got
+// qualified names, array expressions, method invocation, post inc/dec
+postfixExpression
+	:	primaryExpression // start with a primary
+
+		(options{warnWhenFollowAmbig=false;} : 	// qualified id (id.id.id.id...) -- build the name
+			DOT^
+			( (typeArguments[false])?
+			  ( IDENT
+			  | "this"
+			  | "super" // ClassName.super.field
+			  )
+			| "class"
+			| newExpression
+			| annotations
+			)
+
+			//Java 8 method references. For example: List<Integer> numbers = Arrays.asList(1,2,3,4,5,6); numbers.forEach(System.out::println);
+		|
+			dc:DOUBLE_COLON^ {#dc.setType(METHOD_REF);}
+			(
+				(typeArguments[false])?
+					(IDENT
+				| LITERAL_new)
+			)
+
+			// the above line needs a semantic check to make sure "class"
+			// is the _last_ qualifier.
+
+			// allow ClassName[].class or just ClassName[]
+		|	(options{warnWhenFollowAmbig=false;} : lbc:LBRACK^ {#lbc.setType(ARRAY_DECLARATOR);} RBRACK )+
+			//Since java 8 here can be method reference
+			(options{warnWhenFollowAmbig=false;} : DOT^ "class")?
+
+			// an array indexing operation
+		|	lb:LBRACK^ {#lb.setType(INDEX_OP);} expression RBRACK
+
+			// method invocation
+			// The next line is not strictly proper; it allows x(3)(4) or
+			//  x[2](4) which are not valid in Java.  If this grammar were used
+			//  to validate a Java program a semantic check would be needed, or
+			//   this rule would get really ugly...
+			// It also allows ctor invocation like super(3) which is now
+			// handled by the explicit constructor rule, but it would
+			// be hard to syntactically prevent ctor calls here
+		|	lp:LPAREN^ {#lp.setType(METHOD_CALL);}
+				argList
+			RPAREN
+		)*
+
+		// possibly add on a post-increment or post-decrement.
+		// allows INC/DEC on too much, but semantics can check
+		(	in:INC^ {#in.setType(POST_INC);}
+	 	|	de:DEC^ {#de.setType(POST_DEC);}
+		|	// nothing
+		)
+	;
+
+// the basic element of an expression
+primaryExpression
+	:   IDENT ((typeArguments[false] DOUBLE_COLON)=>typeArguments[false])? 
+	|	constant
+	|	"true"
+	|	"false"
+	|	"this"
+	|	"null"
+	|	newExpression
+	|	LPAREN ((lambdaExpression)=>lambdaExpression | assignmentExpression) RPAREN
+	|	"super"
+		// look for int.class and int[].class and int[]
+	|	builtInType
+		(options{warnWhenFollowAmbig=false;} : lbt:LBRACK^ {#lbt.setType(ARRAY_DECLARATOR);} RBRACK )*
+		//Since java 8 here can be method reference
+		(options{warnWhenFollowAmbig=false;} : DOT^ "class")?
+	;
+
+/** object instantiation.
+ *  Trees are built as illustrated by the following input/tree pairs:
+ *
+ *  new T()
+ *
+ *  new
+ *   |
+ *   T --  ELIST
+ *           |
+ *          arg1 -- arg2 -- .. -- argn
+ *
+ *  new int[]
+ *
+ *  new
+ *   |
+ *  int -- ARRAY_DECLARATOR
+ *
+ *  new int[] {1,2}
+ *
+ *  new
+ *   |
+ *  int -- ARRAY_DECLARATOR -- ARRAY_INIT
+ *                                  |
+ *                                EXPR -- EXPR
+ *                                  |      |
+ *                                  1      2
+ *
+ *  new int[3]
+ *  new
+ *   |
+ *  int -- ARRAY_DECLARATOR
+ *                |
+ *              EXPR
+ *                |
+ *                3
+ *
+ *  new int[1][2]
+ *
+ *  new
+ *   |
+ *  int -- ARRAY_DECLARATOR
+ *               |
+ *         ARRAY_DECLARATOR -- EXPR
+ *               |              |
+ *             EXPR             1
+ *               |
+ *               2
+ *
+ */
+newExpression
+	:	"new"^ (typeArguments[false])? type
+		(	LPAREN argList RPAREN (classBlock)?
+
+			//java 1.1
+			// Note: This will allow bad constructs like
+			//    new int[4][][3] {exp,exp}.
+			//    There needs to be a semantic check here...
+			// to make sure:
+			//   a) [ expr ] and [ ] are not mixed
+			//   b) [ expr ] and an init are not used together
+
+		|	newArrayDeclarator (arrayInitializer)?
+		)
+	;
+
+argList
+	:	(	{LA(1)!=RPAREN}? expressionList
+		|	/*nothing*/
+			{#argList = #[ELIST,"ELIST"];}
+		)
+	;
+
+newArrayDeclarator
+	:	(
+			// CONFLICT:
+			// newExpression is a primaryExpression which can be
+			// followed by an array index reference.  This is ok,
+			// as the generated code will stay in this loop as
+			// long as it sees an LBRACK (proper behavior)
+			options {
+				warnWhenFollowAmbig = false;
+			}
+		:
+			lb:LBRACK^ {#lb.setType(ARRAY_DECLARATOR);}
+				(expression)?
+			RBRACK
+		)+
+	;
+
+constant
+	:	NUM_INT
+	|   NUM_LONG
+	|   NUM_FLOAT
+	|   NUM_DOUBLE
+	|	CHAR_LITERAL
+	|	STRING_LITERAL
+	;
+
+lambdaExpression
+	:	lambdaParameters LAMBDA^ lambdaBody
+	;
+
+lambdaParameters
+	:	IDENT
+	|	LPAREN (parameterDeclarationList)? RPAREN
+	|	LPAREN inferredParameterList RPAREN
+	;
+
+lambdaBody
+	:	(options{generateAmbigWarnings=false;}: expression 
+	|	statement)
+	;
+inferredParameterList
+	:	IDENT (COMMA IDENT)*
+	;
+
+
+//----------------------------------------------------------------------------
+// The Java scanner
+//----------------------------------------------------------------------------
+class GeneratedJavaLexer extends Lexer;
+
+options {
+	exportVocab=GeneratedJava; // call the vocabulary "Java"
+	testLiterals=false;        // don't automatically test for literals
+	k=4;                       // four characters of lookahead
+	charVocabulary='\u0000'..'\uFFFE';
+	// without inlining some bitset tests, couldn't do unicode;
+	// I need to make ANTLR generate smaller bitsets; see
+	// bottom of JavaLexer.java
+	codeGenBitsetTestThreshold=20;
+}
+
+// JavaLexer verbatim source code
+{
+
+    // explicitly set tab width to 1 (default in ANTLR 2.7.1)
+    // in ANTLR 2.7.2a2 the default has changed from 1 to 8
+    public void tab()
+    {
+        setColumn( getColumn() + 1 );
+    }
+
+    private CommentListener mCommentListener = null;
+
+    // TODO: Check visibility of this method one parsing is done in central
+    // utility method
+    public void setCommentListener(CommentListener aCommentListener)
+    {
+        mCommentListener = aCommentListener;
+    }
+
+    private boolean mTreatAssertAsKeyword = true;
+
+    public void setTreatAssertAsKeyword(boolean aTreatAsKeyword)
+    {
+        mTreatAssertAsKeyword = aTreatAsKeyword;
+    }
+
+    private boolean mTreatEnumAsKeyword = true;
+
+    public void setTreatEnumAsKeyword(boolean aTreatAsKeyword)
+    {
+        mTreatEnumAsKeyword = aTreatAsKeyword;
+    }
+
+}
+
+
+// OPERATORS
+QUESTION		:	'?'		;
+LPAREN			:	'('		;
+RPAREN			:	')'		;
+LBRACK			:	'['		;
+RBRACK			:	']'		;
+LCURLY			:	'{'		;
+RCURLY			:	'}'		;
+COLON			:	':'		;
+DOUBLE_COLON	:	"::"	;
+COMMA			:	','		;
+//DOT			:	'.'		;
+ASSIGN			:	'='		;
+EQUAL			:	"=="	;
+LNOT			:	'!'		;
+BNOT			:	'~'		;
+NOT_EQUAL		:	"!="	;
+DIV				:	'/'		;
+DIV_ASSIGN		:	"/="	;
+PLUS			:	'+'		;
+PLUS_ASSIGN		:	"+="	;
+INC				:	"++"	;
+MINUS			:	'-'		;
+MINUS_ASSIGN	:	"-="	;
+DEC				:	"--"	;
+STAR			:	'*'		;
+STAR_ASSIGN		:	"*="	;
+MOD				:	'%'		;
+MOD_ASSIGN		:	"%="	;
+SR				:	">>"	;
+SR_ASSIGN		:	">>="	;
+BSR				:	">>>"	;
+BSR_ASSIGN		:	">>>="	;
+GE				:	">="	;
+GT				:	">"		;
+SL				:	"<<"	;
+SL_ASSIGN		:	"<<="	;
+LE				:	"<="	;
+LT				:	'<'		;
+LAMBDA          :   "->"    ;
+BXOR			:	'^'		;
+BXOR_ASSIGN		:	"^="	;
+BOR				:	'|'		;
+BOR_ASSIGN		:	"|="	;
+LOR				:	"||"	;
+BAND			:	'&'		;
+BAND_ASSIGN		:	"&="	;
+LAND			:	"&&"	;
+SEMI			:	';'		;
+
+//token signifying annotations and annotation declaration
+AT
+    :   '@'
+    ;
+
+// Whitespace -- ignored
+WS	:	(	' '
+		|	'\t'
+		|	'\f'
+			// handle newlines
+		|	(	options {generateAmbigWarnings=false;}
+			:	"\r\n"  // Evil DOS
+			|	'\r'    // Macintosh
+			|	'\n'    // Unix (the right way)
+			)
+			{ newline(); }
+		)+
+		{ _ttype = Token.SKIP; }
+	;
+
+// Single-line comments
+SL_COMMENT
+    :	"//"
+        { mCommentListener.reportSingleLineComment("//", getLine(),
+                                                   getColumn() - 3); }
+        (~('\n'|'\r'))* ('\n'|'\r'('\n')?|)
+        {$setType(Token.SKIP); newline();}
+	;
+
+// multiple-line comments
+ML_COMMENT
+{
+   int startLine = -1;
+   int startCol = -1;
+}
+	:	"/*"  { startLine = getLine(); startCol = getColumn() - 3; }
+		(	/*	'\r' '\n' can be matched in one alternative or by matching
+				'\r' in one iteration and '\n' in another.  I am trying to
+				handle any flavor of newline that comes in, but the language
+				that allows both "\r\n" and "\r" and "\n" to all be valid
+				newline is ambiguous.  Consequently, the resulting grammar
+				must be ambiguous.  I'm shutting this warning off.
+			 */
+			options {
+				generateAmbigWarnings=false;
+			}
+		:
+			{ LA(2)!='/' }? '*'
+		|	'\r' '\n'		{newline();}
+		|	'\r'			{newline();}
+		|	'\n'			{newline();}
+		|	~('*'|'\n'|'\r')
+		)*
+		"*/"
+      {
+         mCommentListener.reportBlockComment("/*", startLine, startCol,
+                            getLine(), getColumn() - 2);
+         $setType(Token.SKIP);
+      }
+	;
+
+
+// character literals
+CHAR_LITERAL
+	:	'\'' ( ESC | ~'\'' ) '\''
+	;
+
+// string literals
+STRING_LITERAL
+    :   '"' ( ESC | ~'"' )* '"'
+	;
+
+
+// escape sequence -- note that this is protected; it can only be called
+//   from another lexer rule -- it will not ever directly return a token to
+//   the parser
+// There are various ambiguities hushed in this rule.  The optional
+// '0'...'9' digit matches should be matched here rather than letting
+// them go back to STRING_LITERAL to be matched.  ANTLR does the
+// right thing by matching immediately; hence, it's ok to shut off
+// the FOLLOW ambig warnings.
+protected
+ESC
+	:	'\\'
+		(
+			('u')+
+			(options { generateAmbigWarnings=false; }
+			:	'0' '0' '5' ('c'|'C')
+				(options { generateAmbigWarnings=false; }
+				:	'\\' ('u')+ '0' '0' '5' ('c'|'C')
+				|	STD_ESC
+				)
+			|	HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
+			)
+		|
+			STD_ESC
+		)
+	;
+
+
+protected
+STD_ESC
+	:	'n'
+	|	'r'
+	|	't'
+	|	'b'
+	|	'f'
+	|	'"'
+	|	'\''
+	|	'\\'
+	|	('0'..'3')
+		(
+			options {
+				warnWhenFollowAmbig = false;
+			}
+		:	('0'..'7')
+			(
+				options {
+					warnWhenFollowAmbig = false;
+				}
+			:	'0'..'7'
+			)?
+		)?
+	|	('4'..'7')
+		(
+			options {
+				warnWhenFollowAmbig = false;
+			}
+		:	('0'..'9')
+		)?
+	;
+
+// hexadecimal digit (again, note it's protected!)
+protected
+HEX_DIGIT
+	:	('0'..'9'|'A'..'F'|'a'..'f')
+	;
+	
+// binary digit (again, note it's protected!)
+protected
+BINARY_DIGIT
+	:	('0'|'1')
+	;
+
+
+// a dummy rule to force vocabulary to be all characters (except special
+//   ones that ANTLR uses internally (0 to 2)
+protected
+VOCAB
+	:	'\3'..'\377'
+	;
+
+protected ID_START:
+        '_' | '$' | 
+        (            
+            {Character.isJavaIdentifierStart(LA(1))}?
+            ~(
+                '_' | '$' | '/' | '*' | '0'..'9' | 
+                '.' | '\'' | '\\' | '"' | '\t' | '\n' | 
+                '\r' | ' ' | '\f' | '(' | ')' |
+                '{' | '}' | '[' | ']'| ';' | ',' | '=' |
+                '+' | '~' | '&' | '<' | '>' | '-' | '!' |
+                '^' | '%' | ':' | '?' | '|'| '@'
+            )
+        )
+    ;
+    exception
+    catch[SemanticException ex]
+    {
+            throw new SemanticException(
+                MessageFormat.format(
+                    "Unexpected character {0} in identifier",
+                    new Object[] {"0x" + Integer.toHexString(LA(1))}),
+                getFilename(), getLine(), getColumn());
+    }
+
+protected ID_PART :
+        '_' | '$' | 
+        (
+            {Character.isJavaIdentifierPart(LA(1))}?
+            ~(
+                '_' | '$' | '/' | '*' |
+                '.' | '\'' | '\\' | '"' | '\t' | '\n' | 
+                '\r' | ' ' | '\f' | '(' | ')' |
+                '{' | '}' | '[' | ']'| ';' | ',' | '=' |
+                '+' | '~' | '&' | '<' | '>' | '-' | '!' |
+                '^' | '%' | ':' | '?' | '|' | '@'
+            )
+        )
+        ;
+        exception
+        catch[SemanticException ex]
+        {
+            throw new SemanticException(
+                MessageFormat.format(
+                    "Unexpected character {0} in identifier",
+                    new Object[] {"0x" + Integer.toHexString(LA(1))}),
+                getFilename(), getLine(), getColumn());
+        }
+
+// an identifier.  Note that testLiterals is set to true!  This means
+// that after we match the rule, we look in the literals table to see
+// if it's a literal or really an identifer. As enum and assert
+// are purposefully not part of the literal list, we do manual tests on
+// the ident to test whether this should be an ENUM or ASSERT token.
+// This behaviour is controlled by the treatAssertAsKeyword and
+// treatEnumAsKeyword boolean properties on the lexer
+IDENT
+	options {testLiterals=true;}
+	:   ID_START (ID_PART)*
+        {
+			if (mTreatAssertAsKeyword && "assert".equals($getText)) {
+				$setType(ASSERT);
+			}
+			if (mTreatEnumAsKeyword && "enum".equals($getText)) {
+				$setType(ENUM);
+			}
+        }
+	;
+
+//overriden definition of this lexer rule to recognize the ... token - for
+//variable argument length
+NUM_INT
+      :   (ELLIPSIS)=>ELLIPSIS {$setType(ELLIPSIS);}
+      |   (DOT)=>DOT {$setType(DOT);}
+      |   (DOUBLE_LITERAL)=>DOUBLE_LITERAL {$setType(NUM_DOUBLE);}
+      |   (FLOAT_LITERAL)=>FLOAT_LITERAL {$setType(NUM_FLOAT);}
+      |   (HEX_DOUBLE_LITERAL)=>HEX_DOUBLE_LITERAL {$setType(NUM_DOUBLE);}
+      |   (HEX_FLOAT_LITERAL)=>HEX_FLOAT_LITERAL {$setType(NUM_FLOAT);}
+      |   (LONG_LITERAL)=>LONG_LITERAL {$setType(NUM_LONG);}
+      |   (INT_LITERAL)=>INT_LITERAL {$setType(NUM_INT);}
+      ;
+
+protected INT_LITERAL
+    :   (    '0'
+             (  ('x'|'X')(HEX_DIGIT)((HEX_DIGIT|'_')*(HEX_DIGIT))?              // Hexa
+             |  ('b'|'B')(BINARY_DIGIT)((BINARY_DIGIT|'_')*(BINARY_DIGIT))?     // Binary
+             |  ((('0'..'7')|'_')*('0'..'7'))?                                  // If empty 0, otherwise octal (which may start with an underscore)
+             )
+        |   ('1'..'9') (('0'..'9'|'_')*('0'..'9'))?                             // Non-zero decimal
+        )
+    ;
+
+protected LONG_LITERAL
+    :   (    '0'
+             (  ('x'|'X')(HEX_DIGIT)((HEX_DIGIT|'_')*(HEX_DIGIT))?              // Hexa
+             |  ('b'|'B')(BINARY_DIGIT)((BINARY_DIGIT|'_')*(BINARY_DIGIT))?     // Binary
+             |  ((('0'..'7')|'_')*('0'..'7'))?                                  // If empty 0, otherwise octal (which may start with an underscore)
+             )
+        |   ('1'..'9') (('0'..'9'|'_')*('0'..'9'))?                             // Non-zero decimal
+        )
+        // long signifier
+        ('l'|'L')
+    ;
+
+protected FLOAT_LITERAL
+    :   (
+            ((('0'..'9')(('0'..'9'|'_')*('0'..'9'))?)? '.')=>
+            (   (('0'..'9')(('0'..'9'|'_')*('0'..'9'))?) '.' (('0'..'9')(('0'..'9'|'_')*('0'..'9'))?)?
+            |   '.' (('0'..'9')(('0'..'9'|'_')*('0'..'9'))?)
+            )
+            (EXPONENT)? ('f'|'F')?
+        |
+            (('0'..'9')(('0'..'9'|'_')*('0'..'9'))?) ((EXPONENT ('f'|'F')?) | ('f'|'F'))
+        )
+    ;
+
+protected DOUBLE_LITERAL
+    :   (
+            ((('0'..'9')(('0'..'9'|'_')*('0'..'9'))?)? '.')=>
+            (   (('0'..'9')(('0'..'9'|'_')*('0'..'9'))?) '.' (('0'..'9')(('0'..'9'|'_')*('0'..'9'))?)?
+            |   '.' (('0'..'9')(('0'..'9'|'_')*('0'..'9'))?)
+            )
+        |
+            (('0'..'9')(('0'..'9'|'_')*('0'..'9'))?)
+        )
+        (EXPONENT)? ('d'|'D')
+    ;
+
+protected HEX_FLOAT_LITERAL
+    :   '0' ('x'|'X')
+        (
+            (((HEX_DIGIT)((HEX_DIGIT|'_')*(HEX_DIGIT))?)? '.')=>
+            (   ((HEX_DIGIT)((HEX_DIGIT|'_')*(HEX_DIGIT))?) '.' ((HEX_DIGIT)((HEX_DIGIT|'_')*(HEX_DIGIT))?)?
+            |   '.' ((HEX_DIGIT)((HEX_DIGIT|'_')*(HEX_DIGIT))?)
+            )
+        |
+            ((HEX_DIGIT)((HEX_DIGIT|'_')*(HEX_DIGIT))?)
+        )
+        BINARY_EXPONENT ('f'|'F')?
+    ;
+
+protected HEX_DOUBLE_LITERAL
+    :   '0' ('x'|'X')
+        (
+            (((HEX_DIGIT)((HEX_DIGIT|'_')*(HEX_DIGIT))?)? '.')=>
+            (   ((HEX_DIGIT)((HEX_DIGIT|'_')*(HEX_DIGIT))?) '.' ((HEX_DIGIT)((HEX_DIGIT|'_')*(HEX_DIGIT))?)?
+            |   '.' ((HEX_DIGIT)((HEX_DIGIT|'_')*(HEX_DIGIT))?)
+            )
+        |
+            ((HEX_DIGIT)((HEX_DIGIT|'_')*(HEX_DIGIT))?)
+        )
+        BINARY_EXPONENT ('d'|'D')
+    ;
+
+protected ELLIPSIS
+    :   "..."
+    ;
+
+protected DOT
+    :   '.'
+    ;
+
+// a couple protected methods to assist in matching floating point numbers
+protected
+EXPONENT
+	:	('e'|'E') SIGNED_INTEGER
+	;
+
+protected
+SIGNED_INTEGER
+    :   ('+'|'-')? (('0'..'9')(('0'..'9'|'_')*('0'..'9'))?)
+    ;
+
+protected
+FLOAT_SUFFIX
+	:	'f'|'F'|'d'|'D'
+	;
+
+protected
+BINARY_EXPONENT
+    :   ('p'|'P') SIGNED_INTEGER
+    ;
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/messages.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/messages.properties
new file mode 100644
index 0000000..ef80800
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/messages.properties
@@ -0,0 +1,9 @@
+general.fileNotFound=File not found!
+general.exception=Got an exception - {0}
+
+#
+# for DefaultLogger.java
+#
+DefaultLogger.addException=Error auditing {0}
+DefaultLogger.auditStarted=Starting audit...
+DefaultLogger.auditFinished=Audit done.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/messages_de.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/messages_de.properties
new file mode 100644
index 0000000..db0176f
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/messages_de.properties
@@ -0,0 +1,9 @@
+general.fileNotFound=Datei nicht gefunden!
+general.exception=Folgende Ausnahme ist aufgetreten - {0}
+
+#
+# for DefaultLogger.java
+#
+DefaultLogger.addException=Fehler beim Pr�fen von {0}
+DefaultLogger.auditStarted=Beginne Pr�fung...
+DefaultLogger.auditFinished=Pr�fung beendet.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/messages_es.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/messages_es.properties
new file mode 100644
index 0000000..b3a4870
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/messages_es.properties
@@ -0,0 +1,9 @@
+general.fileNotFound=�Fichero no encontrado!
+general.exception=Ocurri� una excepci�n - {0}
+
+#
+# for DefaultLogger.java
+#
+DefaultLogger.addException=Error auditando {0}
+DefaultLogger.auditStarted=Comenzando auditor�a...
+DefaultLogger.auditFinished=Auditor�a concluida.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/messages_fi.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/messages_fi.properties
new file mode 100644
index 0000000..dd50c20
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/messages_fi.properties
@@ -0,0 +1,9 @@
+general.fileNotFound=Tiedostoa ei löydy!
+general.exception=Poikkeus - {0}
+
+#
+# for DefaultLogger.java
+#
+DefaultLogger.addException=Virhe {0}:n tarkistuksessa
+DefaultLogger.auditStarted=Aloitetaan tarkistus...
+DefaultLogger.auditFinished=Tarkistus valmis.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/messages_fr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/messages_fr.properties
new file mode 100644
index 0000000..d1b143a
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/messages_fr.properties
@@ -0,0 +1,9 @@
+general.fileNotFound=Fichier non trouv� !
+general.exception=Exception lev�e : {0}
+
+#
+# for DefaultLogger.java
+#
+DefaultLogger.addException=Une erreur est survenue {0}
+DefaultLogger.auditStarted=D�but de la v�rification...
+DefaultLogger.auditFinished=V�rification termin�e.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/messages_pt.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/messages_pt.properties
new file mode 100644
index 0000000..1913b42
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/messages_pt.properties
@@ -0,0 +1,9 @@
+general.fileNotFound=Ficheiro não encontrado!
+general.exception=Foi recebida uma excepção - {0}
+
+#
+# for DefaultLogger.java
+#
+DefaultLogger.addException=Erro ao auditar {0}
+DefaultLogger.auditStarted=A iniciar a auditoria...
+DefaultLogger.auditFinished=Auditoria completa.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/messages_tr.properties b/src/main/resources/com/puppycrawl/tools/checkstyle/messages_tr.properties
new file mode 100644
index 0000000..faae902
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/messages_tr.properties
@@ -0,0 +1,8 @@
+#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
+
+DefaultLogger.addException  = {0} denetlenirken hata olu\u015Ftu.
+DefaultLogger.auditFinished = Denetleme tamamland\u0131.
+DefaultLogger.auditStarted  = Denetleme ba\u015Fl\u0131yor...
+
+general.exception    = Bir istisna yakaland\u0131 - {0}
+general.fileNotFound = Dosya bulunamad\u0131!
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/packages_1_0.dtd b/src/main/resources/com/puppycrawl/tools/checkstyle/packages_1_0.dtd
new file mode 100644
index 0000000..d985890
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/packages_1_0.dtd
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!ELEMENT checkstyle-packages (package)*>
+
+<!ELEMENT package (package)*>
+<!ATTLIST package name NMTOKEN #REQUIRED>
\ No newline at end of file
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd b/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd
new file mode 100644
index 0000000..81876ce
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Add the following to any file that is to be validated against this DTD:
+
+<!DOCTYPE suppressions PUBLIC
+    "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+    "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+-->
+
+<!ELEMENT suppressions (suppress*)>
+
+<!ELEMENT suppress EMPTY>
+<!ATTLIST suppress files CDATA #REQUIRED
+                   checks CDATA #REQUIRED
+                   lines CDATA #IMPLIED
+                   columns CDATA #IMPLIED>
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_1.dtd b/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_1.dtd
new file mode 100644
index 0000000..8853860
--- /dev/null
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_1.dtd
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Add the following to any file that is to be validated against this DTD:
+
+<!DOCTYPE suppressions PUBLIC
+    "-//Puppy Crawl//DTD Suppressions 1.1//EN"
+    "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
+-->
+
+<!ELEMENT suppressions (suppress*)>
+
+<!ELEMENT suppress EMPTY>
+<!ATTLIST suppress files CDATA #REQUIRED
+                   checks CDATA #IMPLIED
+                   id CDATA #IMPLIED
+                   lines CDATA #IMPLIED
+                   columns CDATA #IMPLIED>
diff --git a/src/site/resources/css/site.css b/src/site/resources/css/site.css
new file mode 100644
index 0000000..761f563
--- /dev/null
+++ b/src/site/resources/css/site.css
@@ -0,0 +1,25 @@
+h1 {
+  text-transform: capitalize;
+}
+
+h2 {
+  text-transform: capitalize;
+}
+
+h3 {
+  text-transform: capitalize;
+}
+
+h4 {
+  text-transform: capitalize;
+}
+
+div.tip {
+  margin-left : 5%;
+  margin-right : 5%;
+  padding-left: 2%;
+  padding-right: 2%;
+  background-color: Silver;
+  color:Black;
+  border: ridge;
+}
diff --git a/src/site/resources/files/suppressions_none.xml b/src/site/resources/files/suppressions_none.xml
new file mode 100644
index 0000000..2002196
--- /dev/null
+++ b/src/site/resources/files/suppressions_none.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suppressions PUBLIC
+    "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+    "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+<suppressions>
+</suppressions>
diff --git a/src/site/resources/images/AuditListener.gif b/src/site/resources/images/AuditListener.gif
new file mode 100644
index 0000000..fac786f
Binary files /dev/null and b/src/site/resources/images/AuditListener.gif differ
diff --git a/src/site/resources/images/Filter.gif b/src/site/resources/images/Filter.gif
new file mode 100644
index 0000000..c325793
Binary files /dev/null and b/src/site/resources/images/Filter.gif differ
diff --git a/src/site/resources/images/ban_red.png b/src/site/resources/images/ban_red.png
new file mode 100644
index 0000000..54cdf5f
Binary files /dev/null and b/src/site/resources/images/ban_red.png differ
diff --git a/src/site/resources/images/gui_screenshot.png b/src/site/resources/images/gui_screenshot.png
new file mode 100644
index 0000000..7b8c7a3
Binary files /dev/null and b/src/site/resources/images/gui_screenshot.png differ
diff --git a/src/site/resources/images/logo.png b/src/site/resources/images/logo.png
new file mode 100644
index 0000000..2528031
Binary files /dev/null and b/src/site/resources/images/logo.png differ
diff --git a/src/site/resources/images/ok_blue.png b/src/site/resources/images/ok_blue.png
new file mode 100644
index 0000000..a84088f
Binary files /dev/null and b/src/site/resources/images/ok_blue.png differ
diff --git a/src/site/resources/images/ok_green.png b/src/site/resources/images/ok_green.png
new file mode 100644
index 0000000..fa2f8fa
Binary files /dev/null and b/src/site/resources/images/ok_green.png differ
diff --git a/src/site/resources/images/twitter_button.png b/src/site/resources/images/twitter_button.png
new file mode 100644
index 0000000..fb2441a
Binary files /dev/null and b/src/site/resources/images/twitter_button.png differ
diff --git a/src/site/site.xml b/src/site/site.xml
new file mode 100644
index 0000000..2b6dc5f
--- /dev/null
+++ b/src/site/site.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/DECORATION/1.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
+  
+  <bannerLeft>
+    <name>Checkstyle ${projectVersion}</name>
+  </bannerLeft>
+  <bannerRight>
+    <alt>Checkstyle</alt>
+    <href>http://checkstyle.sourceforge.net</href>
+    <src>images/logo.png</src>
+  </bannerRight>
+  
+  <poweredBy>
+    <logo name="GitHub" href="https://github.com/checkstyle/checkstyle" 
+    	img="https://github.com/github/media/blob/master/logos/github_logo_social_coding_outlined.png?raw=true" 
+    	width="120" height="45"/>
+    <logo name="SourceForge"
+          img="http://sflogo.sourceforge.net/sflogo.php?group_id=29721&type=11"
+          href="http://sourceforge.net/projects/checkstyle"
+          />
+    <logo name="Twitter"
+          img="images/twitter_button.png"
+          href="https://twitter.com/checkstyle_java"
+          />
+  </poweredBy>
+  
+  <body>
+    <menu name="About">
+      <item name="Checkstyle" href="index.html"/>
+      <item name="Release Notes" href="releasenotes.html"/>
+    </menu>
+
+    <menu name="Documentation">
+      <item name="Configuration" href="config.html">
+        <item name="Property Types" href="property_types.html"/>
+      </item>
+
+      <item name="Running" href="running.html">
+        <item name="Ant Task" href="anttask.html"/>
+        <item name="Command Line" href="cmdline.html"/>
+      </item>
+
+      <item name="Available Checks" href="availablechecks.html"/>
+      <item name="Standard Checks" href="checks.html">
+        <item name="Annotations"        href="config_annotation.html"/>
+        <item name="Block Checks"       href="config_blocks.html"/>
+        <item name="Class Design"       href="config_design.html"/>
+        <item name="Coding"             href="config_coding.html"/>
+        <item name="Duplicate Code"     href="config_duplicates.html"/>
+        <item name="Headers"            href="config_header.html"/>
+        <item name="Imports"            href="config_imports.html"/>
+        <item name="Javadoc Comments"   href="config_javadoc.html"/>
+        <item name="Metrics"            href="config_metrics.html"/>
+        <item name="Miscellaneous"      href="config_misc.html"/>
+        <item name="Modifiers"          href="config_modifier.html"/>
+        <item name="Naming Conventions" href="config_naming.html"/>
+        <item name="Regexp"             href="config_regexp.html"/>
+        <item name="Size Violations"    href="config_sizes.html"/>
+        <item name="Whitespace"         href="config_whitespace.html"/>
+      </item>
+
+      <item name="Extending Checkstyle" href="extending.html">
+        <item name="Writing checks" href="writingchecks.html"/>
+        <item name="Writing filters" href="writingfilters.html"/>
+        <item name="Writing listeners" href="writinglisteners.html"/>
+      </item>
+      
+      <item name="Style Configurations" href="style_configs.html">
+        <item name="Google's Style" href="google_style.html"/>
+        <item name="Sun's Style" href="sun_style.html"/>
+      </item>
+    </menu>
+
+    <menu name="Developers">
+      <item name="Javadoc" href="apidocs/index.html"/>
+      <item name="Project Page"
+            href="http://sourceforge.net/projects/checkstyle"/>
+      <item name="Contributing" href="contributing.html"/>
+    </menu>
+
+    <menu ref="reports"/>
+  </body>
+</project>
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/BaseCheckTestSupport.java b/src/test/java/com/puppycrawl/tools/checkstyle/BaseCheckTestSupport.java
new file mode 100644
index 0000000..75c99ac
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/BaseCheckTestSupport.java
@@ -0,0 +1,160 @@
+package com.puppycrawl.tools.checkstyle;
+
+import static org.junit.Assert.assertEquals;
+
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+import java.util.Properties;
+
+public abstract class BaseCheckTestSupport
+{
+    /** a brief logger that only display info about errors */
+    protected static class BriefLogger
+        extends DefaultLogger
+    {
+        public BriefLogger(OutputStream out)
+        {
+            super(out, true);
+        }
+        @Override
+        public void auditStarted(AuditEvent evt) {}
+        @Override
+        public void fileFinished(AuditEvent evt) {}
+        @Override
+        public void fileStarted(AuditEvent evt) {}
+    }
+
+    protected final ByteArrayOutputStream mBAOS = new ByteArrayOutputStream();
+    protected final PrintStream mStream = new PrintStream(mBAOS);
+    protected final Properties mProps = new Properties();
+
+    public static DefaultConfiguration createCheckConfig(Class<?> aClazz)
+    {
+        final DefaultConfiguration checkConfig =
+            new DefaultConfiguration(aClazz.getName());
+        return checkConfig;
+    }
+
+    protected Checker createChecker(Configuration aCheckConfig)
+        throws Exception
+    {
+        final DefaultConfiguration dc = createCheckerConfig(aCheckConfig);
+        final Checker c = new Checker();
+        // make sure the tests always run with english error messages
+        // so the tests don't fail in supported locales like german
+        final Locale locale = Locale.ENGLISH;
+        c.setLocaleCountry(locale.getCountry());
+        c.setLocaleLanguage(locale.getLanguage());
+        c.setModuleClassLoader(Thread.currentThread().getContextClassLoader());
+        c.configure(dc);
+        c.addListener(new BriefLogger(mStream));
+        return c;
+    }
+
+    protected DefaultConfiguration createCheckerConfig(Configuration aConfig)
+    {
+        final DefaultConfiguration dc =
+            new DefaultConfiguration("configuration");
+        final DefaultConfiguration twConf = createCheckConfig(TreeWalker.class);
+        // make sure that the tests always run with this charset
+        dc.addAttribute("charset", "iso-8859-1");
+        dc.addChild(twConf);
+        twConf.addChild(aConfig);
+        return dc;
+    }
+
+    protected static String getPath(String aFilename)
+        throws IOException
+    {
+        return new File("src/test/resources/com/puppycrawl/tools/checkstyle/" + aFilename).getCanonicalPath();
+    }
+
+    protected static String getSrcPath(String aFilename) throws IOException
+    {
+        
+        return new File("src/test/java/com/puppycrawl/tools/checkstyle/" + aFilename).getCanonicalPath();
+    }
+
+    protected void verify(Configuration aConfig, String aFileName, String[] aExpected)
+            throws Exception
+    {
+        verify(createChecker(aConfig), aFileName, aFileName, aExpected);
+    }
+
+    protected void verify(Checker aC, String aFileName, String[] aExpected)
+            throws Exception
+    {
+        verify(aC, aFileName, aFileName, aExpected);
+    }
+
+    protected void verify(Checker aC,
+                          String aProcessedFilename,
+                          String aMessageFileName,
+                          String[] aExpected)
+        throws Exception
+    {
+        verify(aC,
+            new File[] {new File(aProcessedFilename)},
+            aMessageFileName, aExpected);
+    }
+
+    protected void verify(Checker aC,
+                          File[] aProcessedFiles,
+                          String aMessageFileName,
+                          String[] aExpected)
+        throws Exception
+    {
+        mStream.flush();
+        final List<File> theFiles = Lists.newArrayList();
+        Collections.addAll(theFiles, aProcessedFiles);
+        final int errs = aC.process(theFiles);
+
+        // process each of the lines
+        final ByteArrayInputStream bais =
+            new ByteArrayInputStream(mBAOS.toByteArray());
+        final LineNumberReader lnr =
+            new LineNumberReader(new InputStreamReader(bais));
+       
+        for (int i = 0; i < aExpected.length; i++) {
+            final String expected = aMessageFileName + ":" + aExpected[i];
+            final String actual = lnr.readLine();
+            assertEquals("error message " + i, expected, actual);
+        }
+
+        assertEquals("unexpected output: " + lnr.readLine(),
+                     aExpected.length, errs);
+        aC.destroy();
+    }
+
+    /**
+     * Gets the check message 'as is' from appropriate 'messages.properties'
+     * file.
+     *
+     * @param messageKey
+     *            the key of message in 'messages.properties' file.
+     */
+    public String getCheckMessage(String messageKey)
+    {
+        Properties pr = new Properties();
+        try {
+            pr.load(getClass().getResourceAsStream("messages.properties"));
+        }
+        catch (IOException e) {
+            return null;
+        }
+        return pr.getProperty(messageKey);
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/BaseFileSetCheckTestSupport.java b/src/test/java/com/puppycrawl/tools/checkstyle/BaseFileSetCheckTestSupport.java
new file mode 100644
index 0000000..915dd85
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/BaseFileSetCheckTestSupport.java
@@ -0,0 +1,15 @@
+package com.puppycrawl.tools.checkstyle;
+
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+
+public class BaseFileSetCheckTestSupport extends BaseCheckTestSupport
+{
+    @Override
+    protected DefaultConfiguration createCheckerConfig(
+        Configuration aCheckConfig)
+    {
+        final DefaultConfiguration dc = new DefaultConfiguration("root");
+        dc.addChild(aCheckConfig);
+        return dc;
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/CheckerTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/CheckerTest.java
new file mode 100644
index 0000000..d4c4183
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/CheckerTest.java
@@ -0,0 +1,236 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.LocalizedMessage;
+import java.io.File;
+import java.util.TreeSet;
+import org.junit.Test;
+
+public class CheckerTest
+{
+    @Test
+    public void testDosBasedir() throws Exception
+    {
+        final Checker c = new Checker();
+
+        c.setBasedir("c:/a\\b/./c\\..\\d");
+        assertEquals("C:\\a\\b\\d", c.getBasedir());
+    }
+
+    @Test
+    public void testOsBasedir() throws Exception
+    {
+        final Checker c = new Checker();
+
+        // we need something to create absolute path
+        // let's take testinputs.dir
+        String testinputs_dir = new File("src/test/resources/com/puppycrawl/tools/checkstyle/").getCanonicalPath();
+
+        if (!testinputs_dir.endsWith(File.separator)) {
+            testinputs_dir += File.separator;
+        }
+
+        final String instr = testinputs_dir + "indentation/./..\\coding\\";
+        c.setBasedir(instr);
+        assertTrue((testinputs_dir + "coding").equalsIgnoreCase(c.getBasedir()));
+    }
+
+    @Test
+    public void testDestroy() throws Exception
+    {
+        final DebugChecker c = new DebugChecker();
+        final DebugAuditAdapter aa = new DebugAuditAdapter();
+        c.addListener(aa);
+        final DebugFilter f = new DebugFilter();
+        c.addFilter(f);
+
+        c.destroy(); // should remove al listeners and filters
+
+        // Let's try fire some events
+        c.fireAuditStarted();
+        c.fireAuditFinished();
+        c.fireFileStarted("Some File Name");
+        c.fireFileFinished("Some File Name");
+
+        final TreeSet<LocalizedMessage> msgs = Sets.newTreeSet();
+        msgs.add(new LocalizedMessage(0, 0, "a Bundle", "message.key",
+                new Object[] {"arg"}, null, getClass(), null));
+        c.fireErrors("Some File Name", msgs);
+
+        assertFalse("Checker.destroy() doesn't remove listeners.", aa.wasCalled());
+        assertFalse("Checker.destroy() doesn't remove filters.", f.wasCalled());
+    }
+
+    @Test
+    public void testAddListener() throws Exception
+    {
+        final DebugChecker c = new DebugChecker();
+        final DebugAuditAdapter aa = new DebugAuditAdapter();
+        c.addListener(aa);
+
+        // Let's try fire some events
+        c.fireAuditStarted();
+        assertTrue("Checker.fireAuditStarted() doesn't call listener", aa.wasCalled());
+
+        aa.resetListener();
+        c.fireAuditFinished();
+        assertTrue("Checker.fireAuditFinished() doesn't call listener", aa.wasCalled());
+
+        aa.resetListener();
+        c.fireFileStarted("Some File Name");
+        assertTrue("Checker.fireFileStarted() doesn't call listener", aa.wasCalled());
+
+        aa.resetListener();
+        c.fireFileFinished("Some File Name");
+        assertTrue("Checker.fireFileFinished() doesn't call listener", aa.wasCalled());
+
+        aa.resetListener();
+        final TreeSet<LocalizedMessage> msgs = Sets.newTreeSet();
+        msgs.add(new LocalizedMessage(0, 0, "a Bundle", "message.key",
+                new Object[] {"arg"}, null, getClass(), null));
+        c.fireErrors("Some File Name", msgs);
+        assertTrue("Checker.fireErrors() doesn't call listener", aa.wasCalled());
+    }
+
+    @Test
+    public void testRemoveListener() throws Exception
+    {
+        final DebugChecker c = new DebugChecker();
+        final DebugAuditAdapter aa = new DebugAuditAdapter();
+        final DebugAuditAdapter aa2 = new DebugAuditAdapter();
+        c.addListener(aa);
+        c.addListener(aa2);
+        c.removeListener(aa);
+
+        // Let's try fire some events
+        c.fireAuditStarted();
+        assertTrue("Checker.fireAuditStarted() doesn't call listener", aa2.wasCalled());
+        assertFalse("Checker.fireAuditStarted() does call removed listener", aa.wasCalled());
+
+        aa2.resetListener();
+        c.fireAuditFinished();
+        assertTrue("Checker.fireAuditFinished() doesn't call listener", aa2.wasCalled());
+        assertFalse("Checker.fireAuditFinished() does call removed listener", aa.wasCalled());
+
+        aa2.resetListener();
+        c.fireFileStarted("Some File Name");
+        assertTrue("Checker.fireFileStarted() doesn't call listener", aa2.wasCalled());
+        assertFalse("Checker.fireFileStarted() does call removed listener", aa.wasCalled());
+
+        aa2.resetListener();
+        c.fireFileFinished("Some File Name");
+        assertTrue("Checker.fireFileFinished() doesn't call listener", aa2.wasCalled());
+        assertFalse("Checker.fireFileFinished() does call removed listener", aa.wasCalled());
+
+        aa2.resetListener();
+        final TreeSet<LocalizedMessage> msgs = Sets.newTreeSet();
+        msgs.add(new LocalizedMessage(0, 0, "a Bundle", "message.key",
+                new Object[] {"arg"}, null, getClass(), null));
+        c.fireErrors("Some File Name", msgs);
+        assertTrue("Checker.fireErrors() doesn't call listener", aa2.wasCalled());
+        assertFalse("Checker.fireErrors() does call removed listener", aa.wasCalled());
+
+    }
+
+    @Test
+    public void testAddFilter() throws Exception
+    {
+        final DebugChecker c = new DebugChecker();
+        final DebugFilter f = new DebugFilter();
+
+        c.addFilter(f);
+
+        // Let's try fire some events
+        // we do not call filter in fireAuditStarted() (fix for 1080343)
+//         c.fireAuditStarted();
+//         assertTrue("Checker.fireAuditStarted() doesn't call filter", f.wasCalled());
+
+        // we do not call filter in fireAuditFinished() (fix for 1080343)
+//         f.resetFilter();
+//         c.fireAuditFinished();
+//         assertTrue("Checker.fireAuditFinished() doesn't call filter", f.wasCalled());
+
+        // we do not call filter in fireFileStarted() (fix for 1080343)
+//         f.resetFilter();
+//         c.fireFileStarted("Some File Name");
+//         assertTrue("Checker.fireFileStarted() doesn't call filter", f.wasCalled());
+
+        // we do not call filter in fireFileFinished() (fix for 1080343)
+//         f.resetFilter();
+//         c.fireFileFinished("Some File Name");
+//         assertTrue("Checker.fireFileFinished() doesn't call filter", f.wasCalled());
+
+        f.resetFilter();
+        final TreeSet<LocalizedMessage> msgs = Sets.newTreeSet();
+        msgs.add(new LocalizedMessage(0, 0, "a Bundle", "message.key",
+                new Object[] {"arg"}, null, getClass(), null));
+        c.fireErrors("Some File Name", msgs);
+        assertTrue("Checker.fireErrors() doesn't call filter", f.wasCalled());
+    }
+
+    @Test
+    public void testRemoveFilter() throws Exception
+    {
+        final DebugChecker c = new DebugChecker();
+        final DebugFilter f = new DebugFilter();
+        final DebugFilter f2 = new DebugFilter();
+        c.addFilter(f);
+        c.addFilter(f2);
+        c.removeFilter(f);
+
+        // Let's try fire some events
+        // we do call filter in fireErrors() only (fix for 1080343)
+//      c.fireAuditStarted();
+//         assertTrue("Checker.fireAuditStarted() doesn't call filter", f2.wasCalled());
+//         assertFalse("Checker.fireAuditStarted() does call removed filter", f.wasCalled());
+
+        // we do call filter in fireErrors() only (fix for 1080343)
+//         f2.resetFilter();
+//         c.fireAuditFinished();
+//         assertTrue("Checker.fireAuditFinished() doesn't call filter", f2.wasCalled());
+//         assertFalse("Checker.fireAuditFinished() does call removed filter", f.wasCalled());
+
+        // we do call filter in fireErrors() only (fix for 1080343)
+//         f2.resetFilter();
+//         c.fireFileStarted("Some File Name");
+//         assertTrue("Checker.fireFileStarted() doesn't call filter", f2.wasCalled());
+//         assertFalse("Checker.fireFileStarted() does call removed filter", f.wasCalled());
+
+        // we do call filter in fireErrors() only (fix for 1080343)
+//         f2.resetFilter();
+//         c.fireFileFinished("Some File Name");
+//         assertTrue("Checker.fireFileFinished() doesn't call filter", f2.wasCalled());
+//         assertFalse("Checker.fireFileFinished() does call removed filter", f.wasCalled());
+
+        f2.resetFilter();
+        final TreeSet<LocalizedMessage> msgs = Sets.newTreeSet();
+        msgs.add(new LocalizedMessage(0, 0, "a Bundle", "message.key",
+                new Object[] {"arg"}, null, getClass(), null));
+        c.fireErrors("Some File Name", msgs);
+        assertTrue("Checker.fireErrors() doesn't call filter", f2.wasCalled());
+        assertFalse("Checker.fireErrors() does call removed filter", f.wasCalled());
+
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/ConfigurationLoaderTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/ConfigurationLoaderTest.java
new file mode 100644
index 0000000..6fd4dbe
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/ConfigurationLoaderTest.java
@@ -0,0 +1,352 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import org.junit.Test;
+
+import java.io.File;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+/**
+ * @author Rick Giles
+ * @author lkuehne
+ */
+public class ConfigurationLoaderTest
+{
+    private Configuration loadConfiguration(String aName)
+        throws CheckstyleException
+    {
+        return loadConfiguration(aName, new Properties());
+    }
+
+    private Configuration loadConfiguration(
+        String aName, Properties aProps) throws CheckstyleException
+    {
+        final String fName =
+            "src/test/resources/com/puppycrawl/tools/checkstyle/configs/" + aName;
+
+        return ConfigurationLoader.loadConfiguration(
+            fName, new PropertiesExpander(aProps));
+    }
+
+
+    @Test
+    public void testResourceLoadConfiguration() throws Exception
+    {
+        // load config that's only found in the classpath
+        final DefaultConfiguration config = (DefaultConfiguration) ConfigurationLoader.loadConfiguration(
+            "/checkstyle/checkstyle_checks.xml", new PropertiesExpander(new Properties()));
+        verifyConfigNode(config, "Checker", 3, new Properties());
+    }
+
+    @Test
+    public void testEmptyConfiguration() throws Exception
+    {
+        final DefaultConfiguration config =
+            (DefaultConfiguration) loadConfiguration("empty_configuration.xml");
+        verifyConfigNode(config, "Checker", 0, new Properties());
+    }
+
+    @Test
+    public void testMissingPropertyName()
+    {
+        try {
+            loadConfiguration("missing_property_name.xml");
+            fail("missing property name");
+        }
+        catch (CheckstyleException ex) {
+            assertTrue(
+                ex.getMessage().endsWith(
+                    "Attribute \"name\" is required and must be specified "
+                        + "for element type \"property\".:8:41"));
+        }
+    }
+
+    @Test
+    public void testMissingPropertyValue()
+    {
+        try {
+            loadConfiguration("missing_property_value.xml");
+            fail("missing property value");
+        }
+        catch (CheckstyleException ex) {
+            assertTrue(
+                ex.getMessage().endsWith(
+                    "Attribute \"value\" is required and must be specified "
+                        + "for element type \"property\".:8:41"));
+        }
+    }
+
+    @Test
+    public void testMissingConfigName()
+    {
+        try {
+            loadConfiguration("missing_config_name.xml");
+            fail("missing module name");
+        }
+        catch (CheckstyleException ex) {
+            assertTrue(
+                ex.getMessage().endsWith(
+                    "Attribute \"name\" is required and must be specified "
+                        + "for element type \"module\".:7:23"));
+        }
+    }
+
+    @Test
+    public void testMissingConfigParent()
+    {
+        try {
+            loadConfiguration("missing_config_parent.xml");
+            fail("missing module parent");
+        }
+        catch (CheckstyleException ex) {
+            assertTrue(
+                ex.getMessage().endsWith(
+                    "Document root element \"property\", must match DOCTYPE "
+                        + "root \"module\".:7:38"));
+        }
+    }
+
+    @Test
+    public void testCheckstyleChecks() throws Exception
+    {
+        final Properties props = new Properties();
+        props.put("checkstyle.basedir", "basedir");
+
+        final DefaultConfiguration config =
+            (DefaultConfiguration) loadConfiguration(
+                "checkstyle_checks.xml", props);
+
+        //verify the root, and property substitution
+        final Properties atts = new Properties();
+        atts.put("tabWidth", "4");
+        atts.put("basedir", "basedir");
+        verifyConfigNode(config, "Checker", 3, atts);
+
+        //verify children
+        final Configuration[] children = config.getChildren();
+        atts.clear();
+        verifyConfigNode(
+            (DefaultConfiguration) children[1], "JavadocPackage", 0, atts);
+        verifyConfigNode(
+            (DefaultConfiguration) children[2], "Translation", 0, atts);
+        atts.put("testName", "testValue");
+        verifyConfigNode(
+            (DefaultConfiguration) children[0],
+            "TreeWalker",
+            8,
+            atts);
+
+        //verify TreeWalker's first, last, NoWhitespaceAfterCheck
+        final Configuration[] grandchildren = children[0].getChildren();
+        atts.clear();
+        verifyConfigNode(
+            (DefaultConfiguration) grandchildren[0],
+            "AvoidStarImport",
+            0,
+            atts);
+        atts.put("format", "System.out.println");
+        verifyConfigNode(
+            (DefaultConfiguration) grandchildren[grandchildren.length - 1],
+            "GenericIllegalRegexp",
+            0,
+            atts);
+        atts.clear();
+        atts.put("tokens", "DOT");
+        atts.put("allowLineBreaks", "true");
+        verifyConfigNode(
+            (DefaultConfiguration) grandchildren[6],
+            "NoWhitespaceAfter",
+            0,
+            atts);
+    }
+
+    @Test
+    public void testCustomMessages() throws CheckstyleException
+    {
+        final Properties props = new Properties();
+        props.put("checkstyle.basedir", "basedir");
+
+        final DefaultConfiguration config =
+            (DefaultConfiguration) loadConfiguration(
+                "custom_messages.xml", props);
+
+        final Configuration[] children = config.getChildren();
+        final Configuration[] grandchildren = children[0].getChildren();
+
+        assertTrue(((DefaultConfiguration) grandchildren[0]).getMessages()
+            .containsKey("name.invalidPattern"));
+    }
+
+
+    private void verifyConfigNode(
+        DefaultConfiguration aConfig, String aName, int aChildrenLength,
+        Properties atts) throws Exception
+    {
+        assertEquals("name.", aName, aConfig.getName());
+        assertEquals(
+            "children.length.",
+            aChildrenLength,
+            aConfig.getChildren().length);
+
+        final String[] attNames = aConfig.getAttributeNames();
+        assertEquals("attributes.length", atts.size(), attNames.length);
+
+        for (int i = 0; i < attNames.length; i++) {
+            assertEquals(
+                "attribute[" + attNames[i] + "]",
+                atts.get(attNames[i]),
+                aConfig.getAttribute(attNames[i]));
+        }
+    }
+
+    @Test
+    public void testReplacePropertiesNoReplace()
+        throws CheckstyleException
+    {
+        final String[] testValues = {null, "", "a", "$a", "{a",
+                                     "{a}", "a}", "$a}", "$", "a$b", };
+        final Properties props = initProperties();
+        for (int i = 0; i < testValues.length; i++) {
+            final String value = ConfigurationLoader.replaceProperties(
+                testValues[i], new PropertiesExpander(props), null);
+            assertEquals("\"" + testValues[i] + "\"", value, testValues[i]);
+        }
+    }
+
+    @Test
+    public void testReplacePropertiesSyntaxError()
+    {
+        final Properties props = initProperties();
+        try {
+            final String value = ConfigurationLoader.replaceProperties(
+                "${a", new PropertiesExpander(props), null);
+            fail("expected to fail, instead got: " + value);
+        }
+        catch (CheckstyleException ex) {
+            assertEquals("Syntax error in property: ${a", ex.getMessage());
+        }
+    }
+
+    @Test
+    public void testReplacePropertiesMissingProperty()
+    {
+        final Properties props = initProperties();
+        try {
+            final String value = ConfigurationLoader.replaceProperties(
+                "${c}", new PropertiesExpander(props), null);
+            fail("expected to fail, instead got: " + value);
+        }
+        catch (CheckstyleException ex) {
+            assertEquals("Property ${c} has not been set", ex.getMessage());
+        }
+    }
+
+    @Test
+    public void testReplacePropertiesReplace()
+        throws CheckstyleException
+    {
+        final String[][] testValues = {
+            {"${a}", "A"},
+            {"x${a}", "xA"},
+            {"${a}x", "Ax"},
+            {"${a}${b}", "AB"},
+            {"x${a}${b}", "xAB"},
+            {"${a}x${b}", "AxB"},
+            {"${a}${b}x", "ABx"},
+            {"x${a}y${b}", "xAyB"},
+            {"${a}x${b}y", "AxBy"},
+            {"x${a}${b}y", "xABy"},
+            {"x${a}y${b}z", "xAyBz"},
+            {"$$", "$"},
+        };
+        final Properties props = initProperties();
+        for (int i = 0; i < testValues.length; i++) {
+            final String value = ConfigurationLoader.replaceProperties(
+                testValues[i][0], new PropertiesExpander(props), null);
+            assertEquals("\"" + testValues[i][0] + "\"",
+                testValues[i][1], value);
+        }
+    }
+
+    private Properties initProperties()
+    {
+        final Properties props = new Properties();
+        props.put("a", "A");
+        props.put("b", "B");
+        return props;
+    }
+
+    @Test
+    public void testExternalEntity() throws Exception
+    {
+        final Properties props = new Properties();
+        props.put("checkstyle.basedir", "basedir");
+
+        final DefaultConfiguration config =
+            (DefaultConfiguration) loadConfiguration(
+                "including.xml", props);
+
+        final Properties atts = new Properties();
+        atts.put("tabWidth", "4");
+        atts.put("basedir", "basedir");
+        verifyConfigNode(config, "Checker", 2, atts);
+    }
+
+    @Test
+    public void testExternalEntitySubdir() throws Exception
+    {
+        final Properties props = new Properties();
+        props.put("checkstyle.basedir", "basedir");
+
+        final DefaultConfiguration config =
+            (DefaultConfiguration) loadConfiguration(
+                "subdir/including.xml", props);
+
+        final Properties atts = new Properties();
+        atts.put("tabWidth", "4");
+        atts.put("basedir", "basedir");
+        verifyConfigNode(config, "Checker", 2, atts);
+    }
+
+    @Test
+    public void testExternalEntityFromURI() throws Exception
+    {
+        final Properties props = new Properties();
+        props.put("checkstyle.basedir", "basedir");
+
+        final File file = new File(
+                "src/test/resources/com/puppycrawl/tools/checkstyle/configs/subdir/including.xml");
+        final DefaultConfiguration config =
+            (DefaultConfiguration) ConfigurationLoader.loadConfiguration(
+                file.toURI().toString(), new PropertiesExpander(props));
+
+        final Properties atts = new Properties();
+        atts.put("tabWidth", "4");
+        atts.put("basedir", "basedir");
+        verifyConfigNode(config, "Checker", 2, atts);
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/DebugAuditAdapter.java b/src/test/java/com/puppycrawl/tools/checkstyle/DebugAuditAdapter.java
new file mode 100644
index 0000000..3a0108d
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/DebugAuditAdapter.java
@@ -0,0 +1,61 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package com.puppycrawl.tools.checkstyle;
+
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.AuditListener;
+
+class DebugAuditAdapter implements AuditListener
+{
+    /** keeps track of the number of errors */
+    private boolean mCalled;
+
+    public boolean wasCalled()
+    {
+        return mCalled;
+    }
+
+    public void resetListener()
+    {
+        mCalled = false;
+    }
+
+    /** @see AuditListener */
+    public void addError(AuditEvent aEvt)
+    {
+        mCalled = true;
+    }
+
+    /** @see AuditListener */
+    public void addException(AuditEvent aEvt, Throwable aThrowable)
+    {
+        mCalled = true;
+    }
+
+    /** @see AuditListener */
+    public void auditStarted(AuditEvent aEvt)
+    {
+        mCalled = true;
+    }
+
+    /** @see AuditListener */
+    public void fileStarted(AuditEvent aEvt)
+    {
+        mCalled = true;
+    }
+
+    /** @see AuditListener */
+    public void auditFinished(AuditEvent aEvt)
+    {
+        mCalled = true;
+    }
+
+    /** @see AuditListener */
+    public void fileFinished(AuditEvent aEvt)
+    {
+        mCalled = true;
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/DebugChecker.java b/src/test/java/com/puppycrawl/tools/checkstyle/DebugChecker.java
new file mode 100644
index 0000000..a97421a
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/DebugChecker.java
@@ -0,0 +1,27 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package com.puppycrawl.tools.checkstyle;
+
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+
+class DebugChecker extends Checker
+{
+    public DebugChecker() throws CheckstyleException
+    {
+    }
+
+    @Override
+    public void fireAuditFinished()
+    {
+        super.fireAuditFinished();
+    }
+
+    @Override
+    public void fireAuditStarted()
+    {
+        super.fireAuditStarted();
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/DebugFilter.java b/src/test/java/com/puppycrawl/tools/checkstyle/DebugFilter.java
new file mode 100644
index 0000000..f9c66e7
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/DebugFilter.java
@@ -0,0 +1,30 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package com.puppycrawl.tools.checkstyle;
+
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.Filter;
+
+class DebugFilter implements Filter
+{
+    private boolean mCalled;
+
+    public boolean accept(AuditEvent aEvent)
+    {
+        mCalled = true;
+        return true;
+    }
+
+    public boolean wasCalled()
+    {
+        return mCalled;
+    }
+
+    public void resetFilter()
+    {
+        mCalled = false;
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/PackageNamesLoaderTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/PackageNamesLoaderTest.java
new file mode 100644
index 0000000..0c132ad
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/PackageNamesLoaderTest.java
@@ -0,0 +1,75 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import static org.junit.Assert.assertEquals;
+import com.google.common.collect.Sets;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import java.util.Arrays;
+import java.util.Set;
+import org.junit.Test;
+
+/**
+ * Enter a description of class PackageNamesLoaderTest.java.
+ * @author Rick Giles
+ * @author lkuehne
+ */
+public class PackageNamesLoaderTest
+{
+    @Test
+    public void testDefault()
+        throws CheckstyleException
+    {
+        final Set<String> packageNames = PackageNamesLoader
+                .getPackageNames(Thread.currentThread()
+                        .getContextClassLoader());
+        validatePackageNames(packageNames);
+    }
+
+    private void validatePackageNames(Set<String> aPkgNames)
+    {
+        final String[] checkstylePackages = {
+            "com.puppycrawl.tools.checkstyle.",
+            "com.puppycrawl.tools.checkstyle.checks.",
+            "com.puppycrawl.tools.checkstyle.checks.annotation.",
+            "com.puppycrawl.tools.checkstyle.checks.blocks.",
+            "com.puppycrawl.tools.checkstyle.checks.coding.",
+            "com.puppycrawl.tools.checkstyle.checks.design.",
+            "com.puppycrawl.tools.checkstyle.checks.duplicates.",
+            "com.puppycrawl.tools.checkstyle.checks.header.",
+            "com.puppycrawl.tools.checkstyle.checks.imports.",
+            "com.puppycrawl.tools.checkstyle.checks.indentation.",
+            "com.puppycrawl.tools.checkstyle.checks.javadoc.",
+            "com.puppycrawl.tools.checkstyle.checks.metrics.",
+            "com.puppycrawl.tools.checkstyle.checks.modifier.",
+            "com.puppycrawl.tools.checkstyle.checks.naming.",
+            "com.puppycrawl.tools.checkstyle.checks.regexp.",
+            "com.puppycrawl.tools.checkstyle.checks.sizes.",
+            "com.puppycrawl.tools.checkstyle.checks.whitespace.",
+            "com.puppycrawl.tools.checkstyle.filters.",
+
+        };
+
+        assertEquals("pkgNames.length.", checkstylePackages.length,
+            aPkgNames.size());
+        final Set<String> checkstylePackagesSet =
+            Sets.newHashSet(Arrays.asList(checkstylePackages));
+        assertEquals("names set.", checkstylePackagesSet, aPkgNames);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/PackageObjectFactoryTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/PackageObjectFactoryTest.java
new file mode 100644
index 0000000..bc718e3
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/PackageObjectFactoryTest.java
@@ -0,0 +1,85 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.checks.naming.ConstantNameCheck;
+import java.util.HashSet;
+import org.junit.Test;
+
+/**
+ * Enter a description of class PackageObjectFactoryTest.java.
+ * @author Rick Giles
+ * @version 8-Dec-2002
+ */
+public class PackageObjectFactoryTest
+{
+
+    private final PackageObjectFactory mFactory = new PackageObjectFactory(
+            new HashSet<String>(), Thread.currentThread().getContextClassLoader());
+
+    @Test
+    public void testMakeObjectFromName()
+        throws CheckstyleException
+    {
+        final Checker checker =
+            (Checker) mFactory.createModule(
+                        "com.puppycrawl.tools.checkstyle.Checker");
+        assertNotNull(checker);
+    }
+
+    @Test
+    public void testMakeCheckFromName()
+        throws CheckstyleException
+    {
+        final ConstantNameCheck check =
+                (ConstantNameCheck) mFactory.createModule(
+                        "com.puppycrawl.tools.checkstyle.checks.naming.ConstantName");
+        assertNotNull(check);
+    }
+
+    @Test
+    public void testMakeObectFromList()
+        throws CheckstyleException
+    {
+        mFactory.addPackage("com.");
+        final Checker checker =
+                (Checker) mFactory.createModule(
+                        "puppycrawl.tools.checkstyle.Checker");
+        assertNotNull(checker);
+    }
+
+    @Test
+    public void testMakeObectNoClass()
+    {
+        try {
+            mFactory.createModule("NoClass");
+            fail("Instantiated non-existant class");
+        }
+        catch (CheckstyleException ex) {
+            assertEquals("CheckstyleException.message",
+                "Unable to instantiate NoClass",
+                ex.getMessage());
+        }
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/UtilsTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/UtilsTest.java
new file mode 100644
index 0000000..e6b18cd
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/UtilsTest.java
@@ -0,0 +1,64 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import static org.junit.Assert.assertEquals;
+
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import java.util.regex.Pattern;
+import org.apache.commons.beanutils.ConversionException;
+import org.junit.Test;
+
+public class UtilsTest
+{
+    /**
+     * Test Utils.countCharInString.
+     */
+    @Test
+    public void testLengthExpandedTabs()
+        throws Exception
+    {
+        final String s1 = "\t";
+        assertEquals(8, Utils.lengthExpandedTabs(s1, s1.length(), 8));
+
+        final String s2 = "  \t";
+        assertEquals(8, Utils.lengthExpandedTabs(s2, s2.length(), 8));
+
+        final String s3 = "\t\t";
+        assertEquals(16, Utils.lengthExpandedTabs(s3, s3.length(), 8));
+
+        final String s4 = " \t ";
+        assertEquals(9, Utils.lengthExpandedTabs(s4, s4.length(), 8));
+
+        assertEquals(0, Utils.lengthMinusTrailingWhitespace(""));
+        assertEquals(0, Utils.lengthMinusTrailingWhitespace(" \t "));
+        assertEquals(3, Utils.lengthMinusTrailingWhitespace(" 23"));
+        assertEquals(3, Utils.lengthMinusTrailingWhitespace(" 23 \t "));
+
+        final Pattern r1 = Utils.getPattern("a");
+        final Pattern r2 = Utils.getPattern("a");
+        assertEquals(r1, r2);
+    }
+
+    @Test(expected = ConversionException.class)
+    public void testBadRegex()
+    {
+        Utils.createPattern("[");
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/XMLLoggerTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/XMLLoggerTest.java
new file mode 100644
index 0000000..9bf12b2
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/XMLLoggerTest.java
@@ -0,0 +1,237 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.LocalizedMessage;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.util.List;
+import java.util.regex.Pattern;
+import org.junit.Test;
+
+/**
+ * Enter a description of class XMLLoggerTest.java.
+ * @author Rick Giles
+ * @version 11-Dec-2002
+ */
+public class XMLLoggerTest
+{
+    private final ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+
+    @Test
+    public void testEncode()
+        throws IOException
+    {
+        final XMLLogger logger = new XMLLogger(outStream, false);
+        final String[][] encodings = {
+            {"<", "<"},
+            {">", ">"},
+            {"'", "'"},
+            {"\"", """},
+            {"&", "&"},
+            {"<", "<"},
+            {"abc;", "abc;"},
+        };
+        for (int i = 0; i < encodings.length; i++) {
+            final String encoded = logger.encode(encodings[i][0]);
+            assertEquals("\"" + encodings[i][0] + "\"", encodings[i][1], encoded);
+        }
+        outStream.close();
+    }
+
+    @Test
+    public void testIsReference()
+        throws IOException
+    {
+        final XMLLogger logger = new XMLLogger(outStream, false);
+        final String[] reference = {
+            "�",
+            "&#x0;",
+        };
+        for (int i = 0; i < reference.length; i++) {
+            assertTrue("reference: " + reference[i],
+                       logger.isReference(reference[i]));
+        }
+        final String[] noReference = {
+            "&",
+            "&;",
+            "&#;",
+            "&#a;",
+            "&#X0;",
+            "&#x;",
+            "&#xg;",
+        };
+        for (int i = 0; i < noReference.length; i++) {
+            assertFalse("no reference: " + noReference[i],
+                       logger.isReference(noReference[i]));
+        }
+
+        outStream.close();
+    }
+
+    @Test
+    public void testCloseStream()
+        throws IOException
+    {
+        final XMLLogger logger = new XMLLogger(outStream, true);
+        logger.auditStarted(null);
+        logger.auditFinished(null);
+        final String[] expectedLines = {};
+        verifyLines(expectedLines);
+    }
+
+    @Test
+    public void testNoCloseStream()
+        throws IOException
+    {
+        final XMLLogger logger = new XMLLogger(outStream, false);
+        logger.auditStarted(null);
+        logger.auditFinished(null);
+        outStream.close();
+        final String[] expectedLines = {};
+        verifyLines(expectedLines);
+    }
+
+    @Test
+    public void testFileStarted()
+        throws IOException
+    {
+        final XMLLogger logger = new XMLLogger(outStream, true);
+        logger.auditStarted(null);
+        final AuditEvent ev = new AuditEvent(this, "Test.java");
+        logger.fileStarted(ev);
+        logger.auditFinished(null);
+        final String[] expectedLines = {"<file name=\"Test.java\">"};
+        verifyLines(expectedLines);
+    }
+
+    @Test
+    public void testFileFinished()
+        throws IOException
+    {
+        final XMLLogger logger = new XMLLogger(outStream, true);
+        logger.auditStarted(null);
+        final AuditEvent ev = new AuditEvent(this, "Test.java");
+        logger.fileFinished(ev);
+        logger.auditFinished(null);
+        final String[] expectedLines = {"</file>"};
+        verifyLines(expectedLines);
+    }
+
+    @Test
+    public void testAddError() throws IOException
+    {
+        final XMLLogger logger = new XMLLogger(outStream, true);
+        logger.auditStarted(null);
+        final LocalizedMessage message =
+            new LocalizedMessage(1, 1,
+                "messages.properties", "key", null, SeverityLevel.ERROR, null,
+                this.getClass(), null);
+        final AuditEvent ev = new AuditEvent(this, "Test.java", message);
+        logger.addError(ev);
+        logger.auditFinished(null);
+        final String[] expectedLines = {
+            "<error line=\"1\" column=\"1\" severity=\"error\" message=\"key\" source=\"com.puppycrawl.tools.checkstyle.XMLLoggerTest\"/>",
+        };
+        verifyLines(expectedLines);
+    }
+
+    @Test
+    public void testAddException()
+        throws IOException
+    {
+        final XMLLogger logger = new XMLLogger(outStream, true);
+        logger.auditStarted(null);
+        final LocalizedMessage message =
+            new LocalizedMessage(1, 1,
+                "messages.properties", null, null, null, this.getClass(), null);
+        final AuditEvent ev = new AuditEvent(this, "Test.java", message);
+        logger.addException(ev, new TestThrowable());
+        logger.auditFinished(null);
+        final String[] expectedLines = {
+            "<exception>",
+            "<![CDATA[",
+            "stackTrace]]>",
+            "</exception>",
+            "",
+        };
+        verifyLines(expectedLines);
+    }
+
+    private String[] getOutStreamLines()
+        throws IOException
+    {
+        final byte[] bytes = outStream.toByteArray();
+        final ByteArrayInputStream inStream =
+            new ByteArrayInputStream(bytes);
+        final BufferedReader reader =
+            new BufferedReader(new InputStreamReader(inStream));
+        final List<String> lineList = Lists.newArrayList();
+        while (true) {
+            final String line = reader.readLine();
+            if (line == null) {
+                break;
+            }
+            lineList.add(line);
+        }
+        reader.close();
+        return lineList.toArray(new String[lineList.size()]);
+    }
+
+    /**
+     * Verify output lines from auditStart to auditEnd.
+     * Take into consideration checkstyle element (first and last lines).
+     * @param aExpectedLines expected error report lines
+     */
+    private void verifyLines(String[] aExpectedLines)
+        throws IOException
+    {
+        final String[] lines = getOutStreamLines();
+        assertEquals("length.", aExpectedLines.length + 3, lines.length);
+        assertEquals("first line.",
+                     "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
+                     lines[0]);
+        Pattern checkstyleOpenTag = Utils.getPattern("^<checkstyle version=\".*\">$");
+        assertTrue("second line.", checkstyleOpenTag.matcher(lines[1]).matches());
+        for (int i = 0; i < aExpectedLines.length; i++) {
+            assertEquals("line " + i + ".", aExpectedLines[i], lines[i + 2]);
+        }
+        assertEquals("last line.", "</checkstyle>", lines[lines.length - 1]);
+    }
+
+    private static class TestThrowable extends Exception
+    {
+        @Override
+        public void printStackTrace(PrintWriter s)
+        {
+            s.print("stackTrace");
+        }
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/api/AbstractViolationReporterTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/api/AbstractViolationReporterTest.java
new file mode 100644
index 0000000..1c40e96
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/api/AbstractViolationReporterTest.java
@@ -0,0 +1,116 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.TreeSet;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Tests to ensure that default messagebundle is determined correctly.
+ *
+ * @author lkuehne
+ */
+public class AbstractViolationReporterTest extends BaseCheckTestSupport
+{
+    private final Check emptyCheck = new Check()
+    {
+        @Override
+        public int[] getDefaultTokens()
+        {
+            return new int[0];
+        }
+    };
+
+    @Test
+    public void testGetMessageBundleWithPackage()
+    {
+        assertEquals("com.mycompany.checks.messages",
+            emptyCheck.getMessageBundle("com.mycompany.checks.MyCoolCheck"));
+    }
+
+    @Test
+    public void testGetMessageBundleWithoutPackage()
+    {
+        assertEquals("messages",
+            emptyCheck.getMessageBundle("MyCoolCheck"));
+    }
+
+    @Test
+    public void testCustomMessage() throws CheckstyleException
+    {
+        DefaultConfiguration config = createCheckConfig(emptyCheck.getClass());
+        config.addMessage("msgKey", "This is a custom message.");
+        emptyCheck.configure(config);
+
+        LocalizedMessages collector = new LocalizedMessages();
+        emptyCheck.setMessages(collector);
+
+        emptyCheck.log(0, "msgKey");
+
+        TreeSet<LocalizedMessage> messages = collector.getMessages();
+        Assert.assertTrue(messages.size() == 1);
+        Assert.assertEquals("This is a custom message.", messages.first()
+                .getMessage());
+    }
+
+    @Test
+    public void testCustomMessageWithParameters() throws CheckstyleException
+    {
+        DefaultConfiguration config = createCheckConfig(emptyCheck.getClass());
+        config.addMessage("msgKey", "This is a custom message with {0}.");
+        emptyCheck.configure(config);
+
+        LocalizedMessages collector = new LocalizedMessages();
+        emptyCheck.setMessages(collector);
+
+        emptyCheck.log(0, "msgKey", "TestParam");
+
+        TreeSet<LocalizedMessage> messages = collector.getMessages();
+        Assert.assertTrue(messages.size() == 1);
+
+        Assert.assertEquals("This is a custom message with TestParam.",
+                messages.first().getMessage());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testCustomMessageWithParametersNegative() throws CheckstyleException
+    {
+        DefaultConfiguration config = createCheckConfig(emptyCheck.getClass());
+        config.addMessage("msgKey", "This is a custom message {0.");
+        emptyCheck.configure(config);
+
+        LocalizedMessages collector = new LocalizedMessages();
+        emptyCheck.setMessages(collector);
+
+        emptyCheck.log(0, "msgKey", "TestParam");
+
+        TreeSet<LocalizedMessage> messages = collector.getMessages();
+        Assert.assertTrue(messages.size() == 1);
+
+        //we expect an exception here because of the bogus custom message
+        //format
+        messages.first().getMessage();
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/api/AutomaticBeanTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/api/AutomaticBeanTest.java
new file mode 100644
index 0000000..2a66946
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/api/AutomaticBeanTest.java
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class AutomaticBeanTest
+{
+    private static class TestBean extends AutomaticBean
+    {
+        public void setName(String aName)
+        {
+        }
+    }
+
+    private final DefaultConfiguration mConf = new DefaultConfiguration(
+            "testConf");
+
+    private final TestBean mTestBean = new TestBean();
+
+    @Test(expected = CheckstyleException.class)
+    public void testNoSuchAttribute() throws CheckstyleException
+    {
+        mConf.addAttribute("NonExisting", "doesn't matter");
+        mTestBean.configure(mConf);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/api/DetailASTTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/api/DetailASTTest.java
new file mode 100644
index 0000000..bd2bbe6
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/api/DetailASTTest.java
@@ -0,0 +1,127 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import com.puppycrawl.tools.checkstyle.TreeWalker;
+import java.io.File;
+import java.io.FileFilter;
+import java.text.MessageFormat;
+import org.junit.Test;
+
+/**
+ * TestCase to check DetailAST.
+ * @author Oliver Burn
+ */
+public class DetailASTTest
+{
+    @Test
+    public void testGetChildCount()
+    {
+        final DetailAST root = new DetailAST();
+        final DetailAST firstLevelA = new DetailAST();
+        final DetailAST firstLevelB = new DetailAST();
+        final DetailAST secondLevelA = new DetailAST();
+
+        root.setFirstChild(firstLevelA);
+
+        firstLevelA.setParent(root);
+        firstLevelA.setFirstChild(secondLevelA);
+        firstLevelA.setNextSibling(firstLevelB);
+
+        firstLevelB.setParent(root);
+
+        secondLevelA.setParent(firstLevelA);
+
+        assertEquals(0, secondLevelA.getChildCount());
+        assertEquals(0, firstLevelB.getChildCount());
+        assertEquals(1, firstLevelA.getChildCount());
+        assertEquals(2, root.getChildCount());
+        assertEquals(2, root.getChildCount());
+
+        assertNull(root.getPreviousSibling());
+        assertNull(firstLevelA.getPreviousSibling());
+        assertNull(secondLevelA.getPreviousSibling());
+        assertEquals(firstLevelA, firstLevelB.getPreviousSibling());
+    }
+
+    @Test
+    public void testTreeStructure() throws Exception
+    {
+        checkDir(new File("src/test/resources/com/puppycrawl/tools/checkstyle"));
+    }
+
+    private void checkDir(File dir) throws Exception
+    {
+        File[] files = dir.listFiles(new FileFilter() {
+                public boolean accept(File file)
+                {
+                    return (file.getName().endsWith(".java")
+                            || file.isDirectory())
+                        && !file.getName().endsWith("InputGrammar.java");
+                }
+            });
+        for (int i = 0; i < files.length; i++) {
+            if (files[i].isFile()) {
+                checkFile(files[i].getCanonicalPath());
+            }
+            else if (files[i].isDirectory()) {
+                checkDir(files[i]);
+            }
+        }
+    }
+
+    private void checkFile(String filename) throws Exception
+    {
+        final FileText text = new FileText(new File(filename),
+                           System.getProperty("file.encoding", "UTF-8"));
+        final FileContents contents = new FileContents(text);
+        final DetailAST rootAST = TreeWalker.parse(contents);
+        checkTree(rootAST, null, null, filename, rootAST);
+    }
+
+    private void checkTree(final DetailAST node,
+                           final DetailAST parent,
+                           final DetailAST prev,
+                           final String filename,
+                           final DetailAST root)
+    {
+        Object[] params = new Object[] {
+            node, parent, prev, filename, root,
+        };
+        String msg = MessageFormat.format(
+            "Bad parent node={0} parent={1} filename={3} root={4}",
+            params);
+        assertEquals(msg, parent, node.getParent());
+        msg = MessageFormat.format(
+            "Bad prev node={0} prev={2} parent={1} filename={3} root={4}",
+            params);
+        assertEquals(msg, prev, node.getPreviousSibling());
+
+        if (node.getFirstChild() != null) {
+            checkTree(node.getFirstChild(), node, null,
+                      filename, root);
+        }
+        if (node.getNextSibling() != null) {
+            checkTree(node.getNextSibling(), parent, node,
+                      filename, root);
+        }
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/api/FastStackTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/api/FastStackTest.java
new file mode 100644
index 0000000..2580a0b
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/api/FastStackTest.java
@@ -0,0 +1,75 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class FastStackTest
+{
+    @Test(expected = IllegalStateException.class)
+    public void testPeek()
+    {
+        new FastStack<String>().peek();
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void testPop()
+    {
+        new FastStack<String>().pop();
+    }
+
+    @Test
+    public void testNormal()
+    {
+        final FastStack<Integer> fs = FastStack.newInstance();
+        assertNotNull(fs);
+        assertTrue(fs.isEmpty());
+        assertEquals(0, fs.size());
+        final int num = 100;
+        for (int i = 0; i < num; i++) {
+            fs.push(i);
+        }
+        assertEquals(num, fs.size());
+        assertFalse(fs.isEmpty());
+        assertEquals(1, fs.peek(1).intValue());
+        assertEquals(num - 1, fs.peek().intValue());
+        assertEquals(num, fs.size());
+        for (int i = 0; i < num; i++) {
+            fs.pop();
+        }
+        assertTrue(fs.isEmpty());
+        assertEquals(0, fs.size());
+
+        fs.push(666);
+        assertEquals(1, fs.size());
+        assertFalse(fs.isEmpty());
+        assertTrue(fs.contains(666));
+        assertFalse(fs.contains(667));
+        fs.clear();
+        assertFalse(fs.contains(666));
+        assertTrue(fs.isEmpty());
+        assertEquals(0, fs.size());
+        assertFalse(fs.iterator().hasNext());
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/api/ScopeTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/api/ScopeTest.java
new file mode 100644
index 0000000..ea6e2ec
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/api/ScopeTest.java
@@ -0,0 +1,115 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import org.junit.Test;
+
+public class ScopeTest
+{
+    @Test(expected = IllegalArgumentException.class)
+    public void testMisc()
+    {
+        final Scope o = Scope.getInstance("public");
+        assertNotNull(o);
+        assertEquals("public", o.toString());
+        assertEquals("public", o.getName());
+
+        Scope.getInstance("unknown"); // will fail
+    }
+
+    @Test
+    public void testMixedCaseSpaces()
+    {
+        Scope.getInstance("NothinG ");
+        Scope.getInstance(" PuBlic");
+        Scope.getInstance(" ProteCted");
+        Scope.getInstance("    PackAge ");
+        Scope.getInstance("privaTe   ");
+        Scope.getInstance("AnonInner");
+    }
+
+    @Test
+    public void testIsInAnonInner()
+    {
+        assertTrue(Scope.NOTHING.isIn(Scope.ANONINNER));
+        assertTrue(Scope.PUBLIC.isIn(Scope.ANONINNER));
+        assertTrue(Scope.PROTECTED.isIn(Scope.ANONINNER));
+        assertTrue(Scope.PACKAGE.isIn(Scope.ANONINNER));
+        assertTrue(Scope.PRIVATE.isIn(Scope.ANONINNER));
+        assertTrue(Scope.ANONINNER.isIn(Scope.ANONINNER));
+    }
+
+    @Test
+    public void testIsInPrivate()
+    {
+        assertTrue(Scope.NOTHING.isIn(Scope.PRIVATE));
+        assertTrue(Scope.PUBLIC.isIn(Scope.PRIVATE));
+        assertTrue(Scope.PROTECTED.isIn(Scope.PRIVATE));
+        assertTrue(Scope.PACKAGE.isIn(Scope.PRIVATE));
+        assertTrue(Scope.PRIVATE.isIn(Scope.PRIVATE));
+        assertTrue(!Scope.ANONINNER.isIn(Scope.PRIVATE));
+    }
+
+    @Test
+    public void testIsInPackage()
+    {
+        assertTrue(Scope.NOTHING.isIn(Scope.PACKAGE));
+        assertTrue(Scope.PUBLIC.isIn(Scope.PACKAGE));
+        assertTrue(Scope.PROTECTED.isIn(Scope.PACKAGE));
+        assertTrue(Scope.PACKAGE.isIn(Scope.PACKAGE));
+        assertTrue(!Scope.PRIVATE.isIn(Scope.PACKAGE));
+        assertTrue(!Scope.ANONINNER.isIn(Scope.PACKAGE));
+    }
+
+    @Test
+    public void testIsInProtected()
+    {
+        assertTrue(Scope.NOTHING.isIn(Scope.PROTECTED));
+        assertTrue(Scope.PUBLIC.isIn(Scope.PROTECTED));
+        assertTrue(Scope.PROTECTED.isIn(Scope.PROTECTED));
+        assertTrue(!Scope.PACKAGE.isIn(Scope.PROTECTED));
+        assertTrue(!Scope.PRIVATE.isIn(Scope.PROTECTED));
+        assertTrue(!Scope.ANONINNER.isIn(Scope.PROTECTED));
+    }
+
+    @Test
+    public void testIsInPublic()
+    {
+        assertTrue(Scope.NOTHING.isIn(Scope.PUBLIC));
+        assertTrue(Scope.PUBLIC.isIn(Scope.PUBLIC));
+        assertTrue(!Scope.PROTECTED.isIn(Scope.PUBLIC));
+        assertTrue(!Scope.PACKAGE.isIn(Scope.PUBLIC));
+        assertTrue(!Scope.PRIVATE.isIn(Scope.PUBLIC));
+        assertTrue(!Scope.ANONINNER.isIn(Scope.PUBLIC));
+    }
+
+    @Test
+    public void testIsInNothing()
+    {
+        assertTrue(Scope.NOTHING.isIn(Scope.NOTHING));
+        assertTrue(!Scope.PUBLIC.isIn(Scope.NOTHING));
+        assertTrue(!Scope.PROTECTED.isIn(Scope.NOTHING));
+        assertTrue(!Scope.PACKAGE.isIn(Scope.NOTHING));
+        assertTrue(!Scope.PRIVATE.isIn(Scope.NOTHING));
+        assertTrue(!Scope.ANONINNER.isIn(Scope.NOTHING));
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/api/SeverityLevelTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/api/SeverityLevelTest.java
new file mode 100644
index 0000000..325231d
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/api/SeverityLevelTest.java
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import org.junit.Test;
+
+public class SeverityLevelTest
+{
+    @Test(expected = IllegalArgumentException.class)
+    public void testMisc()
+    {
+        final SeverityLevel o = SeverityLevel.getInstance("info");
+        assertNotNull(o);
+        assertEquals("info", o.toString());
+        assertEquals("info", o.getName());
+
+        SeverityLevel.getInstance("unknown"); // will fail
+    }
+
+    @Test
+    public void testMixedCaseSpaces()
+    {
+        SeverityLevel.getInstance("IgnoRe ");
+        SeverityLevel.getInstance(" iNfo");
+        SeverityLevel.getInstance(" WarniNg");
+        SeverityLevel.getInstance("    ERROR ");
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/api/TokenTypesTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/api/TokenTypesTest.java
new file mode 100644
index 0000000..0b7e066
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/api/TokenTypesTest.java
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.api;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class TokenTypesTest
+{
+    @Test
+    public void testGetShortDescription()
+    {
+        assertEquals("short description for EQUAL",
+                "The <code>==</code> (equal) operator.", TokenTypes
+                        .getShortDescription("EQUAL"));
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/ArrayTypeStyleCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/ArrayTypeStyleCheckTest.java
new file mode 100644
index 0000000..7860af2
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/ArrayTypeStyleCheckTest.java
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class ArrayTypeStyleCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testJavaStyle()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ArrayTypeStyleCheck.class);
+        final String[] expected = {
+            "14:23: Array brackets at illegal position.",
+            "20:44: Array brackets at illegal position.",
+        };
+        verify(checkConfig, getPath("InputArrayTypeStyle.java"), expected);
+    }
+
+    @Test
+    public void testCStyle()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ArrayTypeStyleCheck.class);
+        checkConfig.addAttribute("javaStyle", "false");
+        final String[] expected = {
+            "13:16: Array brackets at illegal position.",
+            "16:39: Array brackets at illegal position.",
+            "22:18: Array brackets at illegal position.",
+            "30:20: Array brackets at illegal position.",
+        };
+        verify(checkConfig, getPath("InputArrayTypeStyle.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/AvoidEscapedUnicodeCharactersCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/AvoidEscapedUnicodeCharactersCheckTest.java
new file mode 100644
index 0000000..db26055
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/AvoidEscapedUnicodeCharactersCheckTest.java
@@ -0,0 +1,172 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+import org.junit.Test;
+
+public class AvoidEscapedUnicodeCharactersCheckTest extends BaseCheckTestSupport
+{
+
+    private final String MSG = getCheckMessage("forbid.escaped.unicode.char");
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+                createCheckConfig(AvoidEscapedUnicodeCharactersCheck.class);
+        final String[] expected = {
+            "5: " + MSG,
+            "7: " + MSG,
+            "9: " + MSG,
+            "13: " + MSG,
+            "14: " + MSG,
+            "17: " + MSG,
+            "21: " + MSG,
+            "22: " + MSG,
+            "23: " + MSG,
+            "27: " + MSG,
+            "28: " + MSG,
+            "29: " + MSG,
+            "30: " + MSG,
+            "38: " + MSG,
+            "54: " + MSG,
+            "55: " + MSG,
+            "56: " + MSG,
+            "57: " + MSG,
+            "68: " + MSG,
+            "69: " + MSG,
+            "70: " + MSG,
+            "71: " + MSG,
+            "72: " + MSG,
+            "73: " + MSG,
+            "75: " + MSG,
+            "78: " + MSG,
+        };
+        verify(checkConfig, getPath("InputAvoidEscapedUnicodeCharactersCheck.java"), expected);
+    }
+
+    @Test
+    public void testAllowEscapesForControlCharacterst() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+                createCheckConfig(AvoidEscapedUnicodeCharactersCheck.class);
+        checkConfig.addAttribute("allowEscapesForControlCharacters", "true");
+        final String[] expected = {
+            "5: " + MSG,
+            "7: " + MSG,
+            "9: " + MSG,
+            "13: " + MSG,
+            "14: " + MSG,
+            "21: " + MSG,
+            "22: " + MSG,
+            "27: " + MSG,
+            "28: " + MSG,
+            "29: " + MSG,
+            "30: " + MSG,
+            "38: " + MSG,
+            "54: " + MSG,
+            "55: " + MSG,
+            "56: " + MSG,
+            "57: " + MSG,
+            "69: " + MSG,
+            "70: " + MSG,
+            "71: " + MSG,
+            "72: " + MSG,
+            "73: " + MSG,
+            "75: " + MSG,
+            "78: " + MSG,
+        };
+        verify(checkConfig, getPath("InputAvoidEscapedUnicodeCharactersCheck.java"), expected);
+    }
+
+    @Test
+    public void testAllowByTailComment() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+                createCheckConfig(AvoidEscapedUnicodeCharactersCheck.class);
+        checkConfig.addAttribute("allowByTailComment", "true");
+        final String[] expected = {
+            "5: " + MSG,
+            "13: " + MSG,
+            "21: " + MSG,
+            "27: " + MSG,
+            "29: " + MSG,
+            "30: " + MSG,
+            "54: " + MSG,
+            "55: " + MSG,
+            "56: " + MSG,
+            "57: " + MSG,
+            "68: " + MSG,
+            "69: " + MSG,
+            "70: " + MSG,
+            "71: " + MSG,
+            "72: " + MSG,
+            "73: " + MSG,
+            "75: " + MSG,
+            "78: " + MSG,
+        };
+        verify(checkConfig, getPath("InputAvoidEscapedUnicodeCharactersCheck.java"), expected);
+    }
+
+    @Test
+    public void testAllowAllCharactersEscaped() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+                createCheckConfig(AvoidEscapedUnicodeCharactersCheck.class);
+        checkConfig.addAttribute("allowIfAllCharactersEscaped", "true");
+        final String[] expected = {
+            "5: " + MSG,
+            "7: " + MSG,
+            "9: " + MSG,
+            "13: " + MSG,
+            "14: " + MSG,
+            "27: " + MSG,
+            "28: " + MSG,
+            "29: " + MSG,
+            "38: " + MSG,
+        };
+        verify(checkConfig, getPath("InputAvoidEscapedUnicodeCharactersCheck.java"), expected);
+    }
+
+    @Test
+    public void allowNonPrintableEscapes() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+                createCheckConfig(AvoidEscapedUnicodeCharactersCheck.class);
+        checkConfig.addAttribute("allowNonPrintableEscapes", "true");
+        final String[] expected = {
+            "5: " + MSG,
+            "7: " + MSG,
+            "9: " + MSG,
+            "13: " + MSG,
+            "14: " + MSG,
+            "21: " + MSG,
+            "22: " + MSG,
+            "27: " + MSG,
+            "28: " + MSG,
+            "29: " + MSG,
+            "30: " + MSG,
+            "38: " + MSG,
+        };
+        verify(checkConfig, getPath("InputAvoidEscapedUnicodeCharactersCheck.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/ClassResolverTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/ClassResolverTest.java
new file mode 100644
index 0000000..8e02935
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/ClassResolverTest.java
@@ -0,0 +1,69 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+import com.google.common.collect.Sets;
+import java.util.Set;
+import org.junit.Test;
+public class ClassResolverTest
+{
+    @Test
+    public void testMisc() throws ClassNotFoundException
+    {
+        final Set<String> imps = Sets.newHashSet();
+        imps.add("java.io.File");
+        imps.add("nothing.will.match.*");
+        imps.add("java.applet.*");
+        ClassResolver cr =
+            new ClassResolver(Thread.currentThread().getContextClassLoader(),
+                              null, imps);
+        assertNotNull(cr);
+        try {
+            cr.resolve("who.will.win.the.world.cup", "");
+            fail("Should not resolve class");
+        }
+        catch (ClassNotFoundException e) {
+        }
+        cr.resolve("java.lang.String", "");
+        cr.resolve("StringBuffer", "");
+        cr.resolve("AppletContext", "");
+
+        try {
+            cr.resolve("ChoiceFormat", "");
+            fail();
+        }
+        catch (ClassNotFoundException e) {
+        }
+
+        imps.add("java.text.ChoiceFormat");
+        cr.resolve("ChoiceFormat", "");
+
+        cr = new ClassResolver(Thread.currentThread().getContextClassLoader(),
+                               "java.util", imps);
+        cr.resolve("List", "");
+        try {
+            cr.resolve("two.nil.england", "");
+            fail();
+        }
+        catch (ClassNotFoundException e) {
+        }
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheckTest.java
new file mode 100644
index 0000000..f7236e3
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheckTest.java
@@ -0,0 +1,321 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class DescendantTokenCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(DescendantTokenCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("InputIllegalTokens.java"), expected);
+    }
+
+    @Test
+    public void testMaximumNumber()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(DescendantTokenCheck.class);
+        checkConfig.addAttribute("tokens", "LITERAL_NATIVE");
+        checkConfig.addAttribute("limitedTokens", "LITERAL_NATIVE");
+        checkConfig.addAttribute("maximumNumber", "0");
+        final String[] expected = {
+            "20:12: Count of 1 for 'LITERAL_NATIVE' descendant 'LITERAL_NATIVE' exceeds maximum count 0.",
+        };
+        verify(checkConfig, getPath("InputIllegalTokens.java"), expected);
+    }
+
+    @Test
+    public void testMessage()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(DescendantTokenCheck.class);
+        checkConfig.addAttribute("tokens", "LITERAL_NATIVE");
+        checkConfig.addAttribute("limitedTokens", "LITERAL_NATIVE");
+        checkConfig.addAttribute("maximumNumber", "0");
+        checkConfig.addAttribute("maximumMessage", "Using ''native'' is not allowed.");
+        final String[] expected = {
+            "20:12: Using 'native' is not allowed.",
+        };
+        verify(checkConfig, getPath("InputIllegalTokens.java"), expected);
+    }
+
+    @Test
+    public void testMinimumNumber()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(DescendantTokenCheck.class);
+        checkConfig.addAttribute("tokens", "LITERAL_SWITCH");
+        checkConfig.addAttribute("limitedTokens", "LITERAL_DEFAULT");
+        checkConfig.addAttribute("minimumNumber", "2");
+        final String[] expected = {
+            "11:9: Count of 1 for 'LITERAL_SWITCH' descendant 'LITERAL_DEFAULT' is less than minimum count 2.",
+        };
+        verify(checkConfig, getPath("InputIllegalTokens.java"), expected);
+    }
+
+    @Test
+    public void testMinimumDepth()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(DescendantTokenCheck.class);
+        checkConfig.addAttribute("tokens", "LITERAL_SWITCH");
+        checkConfig.addAttribute("limitedTokens", "LITERAL_DEFAULT");
+        checkConfig.addAttribute("maximumNumber", "0");
+        checkConfig.addAttribute("minimumDepth", "3");
+        final String[] expected = {};
+        verify(checkConfig, getPath("InputIllegalTokens.java"), expected);
+    }
+
+    @Test
+    public void testMaximumDepth()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(DescendantTokenCheck.class);
+        checkConfig.addAttribute("tokens", "LITERAL_SWITCH");
+        checkConfig.addAttribute("limitedTokens", "LITERAL_DEFAULT");
+        checkConfig.addAttribute("maximumNumber", "0");
+        checkConfig.addAttribute("maximumDepth", "1");
+        final String[] expected = {};
+        verify(checkConfig, getPath("InputIllegalTokens.java"), expected);
+    }
+
+    @Test
+    public void testEmptyStatements()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(DescendantTokenCheck.class);
+        checkConfig.addAttribute("tokens", "EMPTY_STAT");
+        checkConfig.addAttribute("limitedTokens", "EMPTY_STAT");
+        checkConfig.addAttribute("maximumNumber", "0");
+        checkConfig.addAttribute("maximumDepth", "0");
+        checkConfig.addAttribute("maximumMessage", "Empty statement.");
+
+        final String[] expected = {
+            "12:7: Empty statement.",
+            "17:7: Empty statement.",
+            "22:19: Empty statement.",
+            "26:10: Empty statement.",
+            "29:16: Empty statement.",
+            "33:10: Empty statement.",
+            "43:10: Empty statement.",
+            "49:13: Empty statement.",
+            "51:13: Empty statement.",
+            "54:19: Empty statement.",
+            "58:10: Empty statement.",
+            "61:9: Empty statement.",
+            "66:10: Empty statement.",
+            "72:10: Empty statement.",
+            "76:10: Empty statement.",
+            "80:10: Empty statement.",
+        };
+
+        verify(checkConfig, getPath("InputEmptyStatement.java"), expected);
+    }
+
+    @Test
+    public void testMissingSwitchDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(DescendantTokenCheck.class);
+        checkConfig.addAttribute("tokens", "LITERAL_SWITCH");
+        checkConfig.addAttribute("limitedTokens", "LITERAL_DEFAULT");
+        checkConfig.addAttribute("minimumNumber", "1");
+        checkConfig.addAttribute("maximumDepth", "2");
+        checkConfig.addAttribute("minimumMessage", "switch without \"default\" clause.");
+
+        final String[] expected = {
+            "15:9: switch without \"default\" clause.",
+        };
+
+        verify(checkConfig, getPath("InputMissingSwitchDefault.java"), expected);
+    }
+
+    @Test
+    public void testStringLiteralEquality() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(DescendantTokenCheck.class);
+        checkConfig.addAttribute("tokens", "EQUAL,NOT_EQUAL");
+        checkConfig.addAttribute("limitedTokens", "STRING_LITERAL");
+        checkConfig.addAttribute("maximumNumber", "0");
+        checkConfig.addAttribute("maximumDepth", "1");
+        checkConfig.addAttribute("maximumMessage", "Literal Strings should be compared using equals(), not ''==''.");
+
+        final String[] expected = {
+            "11:18: Literal Strings should be compared using equals(), not '=='.",
+            "16:20: Literal Strings should be compared using equals(), not '=='.",
+            "21:22: Literal Strings should be compared using equals(), not '=='.",
+        };
+        verify(checkConfig, getPath("coding" + File.separator + "InputStringLiteralEquality.java"), expected);
+    }
+
+    @Test
+    public void testIllegalTokenDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(DescendantTokenCheck.class);
+        checkConfig.addAttribute("tokens", "LITERAL_SWITCH, POST_INC, POST_DEC");
+        checkConfig.addAttribute("limitedTokens", "LITERAL_SWITCH, POST_INC, POST_DEC");
+        checkConfig.addAttribute("maximumNumber", "0");
+        checkConfig.addAttribute("maximumDepth", "0");
+        checkConfig.addAttribute("maximumMessage", "Using ''{2}'' is not allowed.");
+
+        final String[] expected = {
+            "11:9: Using 'LITERAL_SWITCH' is not allowed.",
+            "14:18: Using 'POST_DEC' is not allowed.",
+            "15:18: Using 'POST_INC' is not allowed.",
+        };
+        verify(checkConfig, getPath("InputIllegalTokens.java"), expected);
+    }
+
+    @Test
+    public void testIllegalTokenNative() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(DescendantTokenCheck.class);
+        checkConfig.addAttribute("tokens", "LITERAL_NATIVE");
+        checkConfig.addAttribute("limitedTokens", "LITERAL_NATIVE");
+        checkConfig.addAttribute("maximumNumber", "0");
+        checkConfig.addAttribute("maximumDepth", "0");
+        checkConfig.addAttribute("maximumMessage", "Using ''{2}'' is not allowed.");
+
+        final String[] expected = {
+            "20:12: Using 'LITERAL_NATIVE' is not allowed.",
+        };
+        verify(checkConfig, getPath("InputIllegalTokens.java"), expected);
+    }
+
+    @Test
+    public void testReturnFromCatch() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(DescendantTokenCheck.class);
+
+        checkConfig.addAttribute("tokens", "LITERAL_CATCH");
+        checkConfig.addAttribute("limitedTokens", "LITERAL_RETURN");
+        checkConfig.addAttribute("maximumNumber", "0");
+        checkConfig.addAttribute("maximumMessage", "Return from catch is not allowed.");
+
+        String[] expected = {
+            "7:11: Return from catch is not allowed.",
+            "15:11: Return from catch is not allowed.",
+        };
+
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputReturnFromCatchCheck.java"),
+               expected);
+    }
+
+    @Test
+    public void testReturnFromFinally() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(DescendantTokenCheck.class);
+
+        checkConfig.addAttribute("tokens", "LITERAL_FINALLY");
+        checkConfig.addAttribute("limitedTokens", "LITERAL_RETURN");
+        checkConfig.addAttribute("maximumNumber", "0");
+        checkConfig.addAttribute("maximumMessage", "Return from finally is not allowed.");
+
+        String[] expected = {
+            "7:11: Return from finally is not allowed.",
+            "15:11: Return from finally is not allowed.",
+        };
+
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputReturnFromFinallyCheck.java"),
+               expected);
+    }
+
+    @Test
+    public void testNoSum() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(DescendantTokenCheck.class);
+
+        checkConfig.addAttribute("tokens", "NOT_EQUAL,EQUAL");
+        checkConfig.addAttribute("limitedTokens", "LITERAL_THIS,LITERAL_NULL");
+        checkConfig.addAttribute("maximumNumber", "1");
+        checkConfig.addAttribute("maximumMessage", "What are you doing?");
+
+        String[] expected = {
+        };
+
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputReturnFromFinallyCheck.java"),
+               expected);
+    }
+
+    @Test
+    public void testWithSumCustomMsg() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(DescendantTokenCheck.class);
+        checkConfig.addAttribute("tokens", "NOT_EQUAL,EQUAL");
+        checkConfig.addAttribute("limitedTokens", "LITERAL_THIS,LITERAL_NULL");
+        checkConfig.addAttribute("maximumNumber", "1");
+        checkConfig.addAttribute("maximumDepth", "1");
+        checkConfig.addAttribute("maximumMessage", "this cannot be null.");
+        checkConfig.addAttribute("sumTokenCounts", "true");
+
+        String[] expected = {
+            "22:32: this cannot be null.",
+            "22:50: this cannot be null.",
+            "23:33: this cannot be null.",
+            "23:51: this cannot be null.",
+        };
+
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputReturnFromFinallyCheck.java"),
+               expected);
+    }
+
+    @Test
+    public void testWithSumDefaultMsg() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(DescendantTokenCheck.class);
+        checkConfig.addAttribute("tokens", "NOT_EQUAL,EQUAL");
+        checkConfig.addAttribute("limitedTokens", "LITERAL_THIS,LITERAL_NULL");
+        checkConfig.addAttribute("maximumNumber", "1");
+        checkConfig.addAttribute("maximumDepth", "1");
+        checkConfig.addAttribute("sumTokenCounts", "true");
+
+        String[] expected = {
+            "22:32: Total count of 2 exceeds maximum count 1 under 'EQUAL'.",
+            "22:50: Total count of 2 exceeds maximum count 1 under 'EQUAL'.",
+            "23:33: Total count of 2 exceeds maximum count 1 under 'NOT_EQUAL'.",
+            "23:51: Total count of 2 exceeds maximum count 1 under 'NOT_EQUAL'.",
+        };
+
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputReturnFromFinallyCheck.java"),
+               expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/FileSetCheckLifecycleTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/FileSetCheckLifecycleTest.java
new file mode 100644
index 0000000..1809365
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/FileSetCheckLifecycleTest.java
@@ -0,0 +1,75 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import static org.junit.Assert.assertTrue;
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import java.io.File;
+import java.util.List;
+import org.junit.Test;
+
+public class FileSetCheckLifecycleTest
+    extends BaseCheckTestSupport
+{
+    @Override
+    protected DefaultConfiguration createCheckerConfig(
+        Configuration aCheckConfig)
+    {
+        final DefaultConfiguration dc = new DefaultConfiguration("root");
+        dc.addChild(aCheckConfig);
+        return dc;
+    }
+
+    public static class TestFileSetCheck extends AbstractFileSetCheck
+    {
+        private static boolean destroyed;
+
+        @Override
+        public void destroy()
+        {
+            destroyed = true;
+        }
+
+        public static boolean isDestroyed()
+        {
+            return destroyed;
+        }
+
+        @Override
+        protected void processFiltered(File aFile, List<String> aLines)
+        {
+        }
+    }
+
+    @Test
+    public void testTranslation() throws Exception
+    {
+        final Configuration checkConfig =
+            createCheckConfig(TestFileSetCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputScopeAnonInner.java"), expected);
+
+        assertTrue("destroy() not called by Checker", TestFileSetCheck.isDestroyed());
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/FinalParametersCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/FinalParametersCheckTest.java
new file mode 100644
index 0000000..0787949
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/FinalParametersCheckTest.java
@@ -0,0 +1,107 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class FinalParametersCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefaultTokens() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(FinalParametersCheck.class);
+        final String[] expected = {
+            "23:26: Parameter s should be final.",
+            "38:26: Parameter i should be final.",
+            "43:26: Parameter s should be final.",
+            "53:17: Parameter s should be final.",
+            "69:17: Parameter s should be final.",
+            "75:17: Parameter s should be final.",
+            "90:45: Parameter e should be final.",
+            "93:36: Parameter e should be final.",
+            "110:18: Parameter aParam should be final.",
+            "113:18: Parameter args should be final.",
+            "116:18: Parameter args should be final.",
+        };
+        verify(checkConfig, getPath("InputFinalParameters.java"), expected);
+    }
+
+    @Test
+    public void testCtorToken() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(FinalParametersCheck.class);
+        checkConfig.addAttribute("tokens", "CTOR_DEF");
+        final String[] expected = {
+            "23:26: Parameter s should be final.",
+            "38:26: Parameter i should be final.",
+            "43:26: Parameter s should be final.",
+        };
+        verify(checkConfig, getPath("InputFinalParameters.java"), expected);
+    }
+
+    @Test
+    public void testMethodToken() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(FinalParametersCheck.class);
+        checkConfig.addAttribute("tokens", "METHOD_DEF");
+        final String[] expected = {
+            "53:17: Parameter s should be final.",
+            "69:17: Parameter s should be final.",
+            "75:17: Parameter s should be final.",
+            "90:45: Parameter e should be final.",
+            "93:36: Parameter e should be final.",
+            "110:18: Parameter aParam should be final.",
+            "113:18: Parameter args should be final.",
+            "116:18: Parameter args should be final.",
+        };
+        verify(checkConfig, getPath("InputFinalParameters.java"), expected);
+    }
+
+    @Test
+    public void testCatchToken() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(FinalParametersCheck.class);
+        checkConfig.addAttribute("tokens", "LITERAL_CATCH");
+        final String[] expected = {
+            "125:16: Parameter npe should be final.",
+            "131:16: Parameter e should be final.",
+            "134:16: Parameter e should be final.",
+        };
+        verify(checkConfig, getPath("InputFinalParameters.java"), expected);
+    }
+
+    @Test
+    public void testForEachClauseToken() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(FinalParametersCheck.class);
+        checkConfig.addAttribute("tokens", "FOR_EACH_CLAUSE");
+        final String[] expected = {
+            "150:13: Parameter s should be final.",
+            "158:13: Parameter s should be final.",
+        };
+        verify(checkConfig, getPath("InputFinalParameters.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/NewlineAtEndOfFileCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/NewlineAtEndOfFileCheckTest.java
new file mode 100644
index 0000000..ba89e34
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/NewlineAtEndOfFileCheckTest.java
@@ -0,0 +1,91 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import org.junit.Test;
+
+public class NewlineAtEndOfFileCheckTest
+    extends BaseCheckTestSupport
+{
+    @Override
+    protected DefaultConfiguration createCheckerConfig(
+        Configuration aCheckConfig)
+    {
+        final DefaultConfiguration dc = new DefaultConfiguration("root");
+        dc.addChild(aCheckConfig);
+        return dc;
+    }
+
+    @Test
+    public void testNewlineAtEndOfFile() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(NewlineAtEndOfFileCheck.class);
+        checkConfig.addAttribute("lineSeparator", LineSeparatorOption.LF.toString());
+        final String[] expected = {};
+        verify(
+            createChecker(checkConfig),
+            getPath("InputNewlineAtEndOfFile.java"),
+            expected);
+    }
+
+    @Test
+    public void testNoNewlineAtEndOfFile() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(NewlineAtEndOfFileCheck.class);
+        checkConfig.addAttribute("lineSeparator", LineSeparatorOption.LF.toString());
+        final String[] expected = {
+            "0: File does not end with a newline.",
+        };
+        verify(
+            createChecker(checkConfig),
+            getPath("InputNoNewlineAtEndOfFile.java"),
+            expected);
+    }
+
+    @Test(expected = CheckstyleException.class)
+    public void testSetLineSeparatorFailure()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(NewlineAtEndOfFileCheck.class);
+        checkConfig.addAttribute("lineSeparator", "ct");
+        createChecker(checkConfig);
+    }
+
+    @Test
+    public void testEmptyFileFile() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(NewlineAtEndOfFileCheck.class);
+        checkConfig.addAttribute("lineSeparator", LineSeparatorOption.LF.toString());
+        final String[] expected = {
+            "0: File does not end with a newline.",
+        };
+        verify(
+            createChecker(checkConfig),
+            getPath("InputEmptyFile.txt"),
+            expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/OuterTypeFilenameCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/OuterTypeFilenameCheckTest.java
new file mode 100644
index 0000000..fb83293
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/OuterTypeFilenameCheckTest.java
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import org.junit.Test;
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class OuterTypeFilenameCheckTest extends BaseCheckTestSupport
+{
+
+    @Test
+    public void testGood1() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(OuterTypeFilenameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("InputIllegalTokens.java"), expected);
+    }
+    @Test
+    public void testGood2() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(OuterTypeFilenameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("Input15Extensions.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/RegexpCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/RegexpCheckTest.java
new file mode 100644
index 0000000..1841d86
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/RegexpCheckTest.java
@@ -0,0 +1,345 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class RegexpCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testRequiredPass() throws Exception
+    {
+        final String required = "Test case file";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", required);
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testRequiredFail() throws Exception
+    {
+        final String required = "This text is not in the file";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", required);
+        final String[] expected = {
+            "0: Required pattern '" + required + "' missing in file.",
+        };
+        verify(checkConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testRequiredNoDuplicatesPass() throws Exception
+    {
+        final String required = "Test case file";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", required);
+        checkConfig.addAttribute("duplicateLimit", "0");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testRequiredNoDuplicatesFail() throws Exception
+    {
+        final String required = "Boolean x = new Boolean";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", required);
+        checkConfig.addAttribute("duplicateLimit", "0");
+        final String[] expected = {
+            "24: Found duplicate pattern '" + required + "'.",
+        };
+        verify(checkConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testIllegalPass() throws Exception
+    {
+        final String illegal = "This text is not in the file";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", illegal);
+        checkConfig.addAttribute("illegalPattern", "true");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testIllegalFailBelowErrorLimit() throws Exception
+    {
+        final String illegal = "^import";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", illegal);
+        checkConfig.addAttribute("illegalPattern", "true");
+        checkConfig.addAttribute("errorLimit", "4");
+        final String[] expected = {
+            "7: Line matches the illegal pattern '" + illegal + "'.",
+            "8: Line matches the illegal pattern '" + illegal + "'.",
+            "9: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(checkConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testIllegalFailAboveErrorLimit() throws Exception
+    {
+        final String illegal = "^import";
+        final String error = "The error limit has been exceeded, "
+            + "the check is aborting, there may be more unreported errors.";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", illegal);
+        checkConfig.addAttribute("illegalPattern", "true");
+        checkConfig.addAttribute("errorLimit", "3");
+        final String[] expected = {
+            "7: Line matches the illegal pattern '" + illegal + "'.",
+            "8: Line matches the illegal pattern '" + illegal + "'.",
+            "9: Line matches the illegal pattern '" + error + illegal + "'.",
+        };
+        verify(checkConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testMessagePropertyGood()
+        throws Exception
+    {
+        final String illegal = "System\\.(out)|(err)\\.print(ln)?\\(";
+        final String message = "Bad line :(";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", illegal);
+        checkConfig.addAttribute("illegalPattern", "true");
+        checkConfig.addAttribute("message", message);
+        final String[] expected = {
+            "69: Line matches the illegal pattern '" + message + "'.",
+        };
+        verify(checkConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testMessagePropertyBad()
+        throws Exception
+    {
+        final String illegal = "System\\.(out)|(err)\\.print(ln)?\\(";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", illegal);
+        checkConfig.addAttribute("illegalPattern", "true");
+        checkConfig.addAttribute("message", null);
+        final String[] expected = {
+            "69: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(checkConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCaseTrue() throws Exception
+    {
+        final String illegal = "(?i)SYSTEM\\.(OUT)|(ERR)\\.PRINT(LN)?\\(";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", illegal);
+        checkConfig.addAttribute("illegalPattern", "true");
+        final String[] expected = {
+            "69: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(checkConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCaseFalse() throws Exception
+    {
+        final String illegalTrue = "(?i)SYSTEM\\.(OUT)|(ERR)\\.PRINT(LN)?\\(";
+        final DefaultConfiguration checkConfigTrue =
+            createCheckConfig(RegexpCheck.class);
+        checkConfigTrue.addAttribute("format", illegalTrue);
+        checkConfigTrue.addAttribute("illegalPattern", "true");
+        final String[] expectedTrue = {
+            "69: Line matches the illegal pattern '" + illegalTrue + "'.",
+        };
+        verify(checkConfigTrue, getPath("InputSemantic.java"), expectedTrue);
+
+        final String illegalFalse = "SYSTEM\\.(OUT)|(ERR)\\.PRINT(LN)?\\(";
+        final DefaultConfiguration checkConfigFalse =
+            createCheckConfig(RegexpCheck.class);
+        checkConfigFalse.addAttribute("format", illegalFalse);
+        checkConfigFalse.addAttribute("illegalPattern", "true");
+        final String[] expectedFalse = {};
+        verify(checkConfigFalse, getPath("InputSemantic.java"), expectedFalse);
+    }
+
+    @Test
+    public void testIgnoreCommentsCppStyle() throws Exception
+    {
+        // See if the comment is removed properly
+        final String illegal = "don't use trailing comments";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", illegal);
+        checkConfig.addAttribute("illegalPattern", "true");
+        checkConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsFalseCppStyle() throws Exception
+    {
+        // See if the comment is removed properly
+        final String illegal = "don't use trailing comments";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", illegal);
+        checkConfig.addAttribute("illegalPattern", "true");
+        checkConfig.addAttribute("ignoreComments", "false");
+        final String[] expected = {
+            "4: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(checkConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsCStyle() throws Exception
+    {
+        // See if the comment is removed properly
+        final String illegal = "c-style 1";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", illegal);
+        checkConfig.addAttribute("illegalPattern", "true");
+        checkConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsFalseCStyle() throws Exception
+    {
+        final String illegal = "c-style 1";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", illegal);
+        checkConfig.addAttribute("illegalPattern", "true");
+        checkConfig.addAttribute("ignoreComments", "false");
+        final String[] expected = {
+            "19: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(checkConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsMultipleCStyle() throws Exception
+    {
+        // See if a second comment on the same line is removed properly
+        final String illegal = "c-style 2";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", illegal);
+        checkConfig.addAttribute("illegalPattern", "true");
+        checkConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsMultiLine() throws Exception
+    {
+        final String illegal = "Let's check multi-line comments";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", illegal);
+        checkConfig.addAttribute("illegalPattern", "true");
+        checkConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsInlineStart() throws Exception
+    {
+        final String illegal = "long ms /";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", illegal);
+        checkConfig.addAttribute("illegalPattern", "true");
+        checkConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsInlineEnd() throws Exception
+    {
+        final String illegal = "int z";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", illegal);
+        checkConfig.addAttribute("illegalPattern", "true");
+        checkConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+            "22: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(checkConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsInlineMiddle() throws Exception
+    {
+        final String illegal = "int y";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", illegal);
+        checkConfig.addAttribute("illegalPattern", "true");
+        checkConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+            "23: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(checkConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsNoSpaces() throws Exception
+    {
+        // make sure the comment is not turned into spaces
+        final String illegal = "long ms  ";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpCheck.class);
+        checkConfig.addAttribute("format", illegal);
+        checkConfig.addAttribute("illegalPattern", "true");
+        checkConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputTrailingComment.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/TodoCommentCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/TodoCommentCheckTest.java
new file mode 100644
index 0000000..4826ab7
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/TodoCommentCheckTest.java
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class TodoCommentCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(TodoCommentCheck.class);
+        checkConfig.addAttribute("format", "FIXME:");
+        final String[] expected = {
+            "161: Comment matches to-do format 'FIXME:'.",
+            "162: Comment matches to-do format 'FIXME:'.",
+            "163: Comment matches to-do format 'FIXME:'.",
+            "167: Comment matches to-do format 'FIXME:'.",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/TrailingCommentCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/TrailingCommentCheckTest.java
new file mode 100644
index 0000000..1dffec3
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/TrailingCommentCheckTest.java
@@ -0,0 +1,63 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Before;
+import org.junit.Test;
+
+public class TrailingCommentCheckTest extends BaseCheckTestSupport
+{
+    private DefaultConfiguration mCheckConfig;
+
+    @Before
+    public void setUp()
+    {
+        mCheckConfig = createCheckConfig(TrailingCommentCheck.class);
+    }
+
+    @Test
+    public void testDefaults() throws Exception
+    {
+        final String[] expected = {
+            "4: Don't use trailing comments.",
+            "7: Don't use trailing comments.",
+            "8: Don't use trailing comments.",
+            "18: Don't use trailing comments.",
+            "19: Don't use trailing comments.",
+            "29: Don't use trailing comments.",
+        };
+        verify(mCheckConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testLegalComment() throws Exception
+    {
+        mCheckConfig.addAttribute("legalComment", "^NOI18N$");
+        final String[] expected = {
+            "4: Don't use trailing comments.",
+            "7: Don't use trailing comments.",
+            "8: Don't use trailing comments.",
+            "18: Don't use trailing comments.",
+            "19: Don't use trailing comments.",
+        };
+        verify(mCheckConfig, getPath("InputTrailingComment.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheckTest.java
new file mode 100644
index 0000000..f37ebb5
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheckTest.java
@@ -0,0 +1,64 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import java.io.File;
+import org.junit.Test;
+
+public class TranslationCheckTest
+    extends BaseCheckTestSupport
+{
+    @Override
+    protected DefaultConfiguration createCheckerConfig(
+        Configuration aCheckConfig)
+    {
+        final DefaultConfiguration dc = new DefaultConfiguration("root");
+        dc.addChild(aCheckConfig);
+        return dc;
+    }
+
+    @Test
+    public void testTranslation() throws Exception
+    {
+        final Configuration checkConfig = createCheckConfig(TranslationCheck.class);
+        final String[] expected = {
+            "0: Key 'only.english' missing.",
+        };
+        final File[] propertyFiles = new File[] {
+            new File(getPath("messages_test_de.properties")),
+            new File(getPath("messages_test.properties")),
+        };
+        verify(
+            createChecker(checkConfig),
+            propertyFiles,
+            getPath("messages_test_de.properties"),
+            expected);
+    }
+
+    // TODO: test with the same resourcebundle name in different packages
+    // x/messages.properties
+    //     key1=x
+    // y/messages.properties
+    //     key2=y
+    // should not result in error message about key1 missing in the y bundle
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/UncommentedMainCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/UncommentedMainCheckTest.java
new file mode 100644
index 0000000..fcd483b
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/UncommentedMainCheckTest.java
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class UncommentedMainCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefaults()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(UncommentedMainCheck.class);
+        final String[] expected = {
+            "14: Uncommented main method found.",
+            "23: Uncommented main method found.",
+            "32: Uncommented main method found.",
+        };
+        verify(checkConfig, getPath("InputUncommentedMain.java"), expected);
+    }
+
+    @Test
+    public void testExcludedClasses()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(UncommentedMainCheck.class);
+        checkConfig.addAttribute("excludedClasses", "\\.Main$");
+        final String[] expected = {
+            "14: Uncommented main method found.",
+            "32: Uncommented main method found.",
+        };
+        verify(checkConfig, getPath("InputUncommentedMain.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/UniquePropertiesCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/UniquePropertiesCheckTest.java
new file mode 100644
index 0000000..0282987
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/UniquePropertiesCheckTest.java
@@ -0,0 +1,158 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.TreeSet;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseFileSetCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.LocalizedMessage;
+
+/**
+ * JUnit tests for Unique Properties check.
+ */
+public class UniquePropertiesCheckTest extends BaseFileSetCheckTestSupport
+{
+
+    private String msg = getCheckMessage(UniquePropertiesCheck.MSG_KEY);
+    private String ioMsg = getCheckMessage(UniquePropertiesCheck.IO_EXCEPTION_KEY);
+
+    private DefaultConfiguration mCheckConfig;
+
+    @Before
+    public void setUp()
+    {
+        mCheckConfig = createCheckConfig(UniquePropertiesCheck.class);
+    }
+
+    /**
+     * Tests the ordinal work of a check.
+     * @throws Exception
+     *             on error occurres
+     */
+    @Test
+    public void testDefault() throws Exception
+    {
+        final String[] expected =
+        {
+            buildMesssage(3, "general.exception", 2),
+            buildMesssage(5, "DefaultLogger.auditStarted", 2),
+            buildMesssage(11, "onlineManual", 3),
+            buildMesssage(22, "time stamp", 3),
+            buildMesssage(28, "Support Link ", 2),
+            buildMesssage(34, "failed", 2),
+        };
+        verify(mCheckConfig, getPath("InputUniquePropertiesCheck.properties"),
+                expected);
+    }
+
+    /**
+     * Tests the {@link UniquePropertiesCheck#getLineNumber(List, String)}
+     * method return value
+     * @throws Exception
+     *             on error occurs
+     */
+    @Test
+    public void testNotFoundKey() throws Exception
+    {
+        final UniquePropertiesCheck check = new UniquePropertiesCheck();
+        final List<String> testStrings = new ArrayList<String>(3);
+        testStrings.add("");
+        testStrings.add("0 = 0");
+        testStrings.add("445");
+        final int stringNumber =
+                check.getLineNumber(testStrings,
+                        "some key");
+        Assert.assertEquals(stringNumber, 0);
+    }
+
+    /**
+     * Tests IO exception, that can orrur during reading of properties file.
+     * @throws Exception
+     *             on error occurs
+     */
+    @Test
+    public void testIOException() throws Exception
+    {
+        final UniquePropertiesCheck check = new UniquePropertiesCheck();
+        check.configure(mCheckConfig);
+        final String fileName =
+                getPath("InputUniquePropertiesCheckNotExisting.properties");
+        final File file = new File(fileName);
+        final TreeSet<LocalizedMessage> messages =
+                check.process(file, Collections.<String>emptyList());
+        Assert.assertEquals("Wrong messages count: " + messages.size(),
+                messages.size(), 1);
+        final LocalizedMessage message = messages.iterator().next();
+        final String retrievedMessage = messages.iterator().next().getKey();
+        Assert.assertEquals("Message key '" + retrievedMessage
+                + "' is not valid", retrievedMessage,
+                "unable.open.cause");
+        Assert.assertEquals("Message '" + message.getMessage()
+                + "' is not valid", message.getMessage(),
+                buildIOMessage(fileName, getFileNotFoundDetail(file)));
+    }
+
+    /**
+     * Method generates FileNotFound exception details. It tries to open file,
+     * that does not exist.
+     * @param file
+     * @return detail message of {@link FileNotFoundException}
+     * @throws Exception
+     *             on file exists
+     */
+    private String getFileNotFoundDetail(File file) throws Exception
+    {
+        // Create exception to know detail message we should wait in
+        // LocalisedMessage
+        try {
+            final InputStream stream = new FileInputStream(file);
+            stream.close();
+            throw new Exception("File " + file.getPath() + " should not exist");
+        }
+        catch (FileNotFoundException ex) {
+            return ex.getLocalizedMessage();
+        }
+    }
+
+    private String buildMesssage(int lineNumber, String keyName,
+            int nOccurrences)
+    {
+        return lineNumber + ": "
+                + MessageFormat.format(msg, keyName, nOccurrences);
+    }
+
+    private String buildIOMessage(String filename, String exceptionDetails)
+    {
+        return MessageFormat.format(ioMsg, filename, exceptionDetails);
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/UpperEllCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/UpperEllCheckTest.java
new file mode 100644
index 0000000..5cfc0b5
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/UpperEllCheckTest.java
@@ -0,0 +1,39 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class UpperEllCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(UpperEllCheck.class);
+        final String[] expected = {
+            "94:43: Should use uppercase 'L'.",
+        };
+        verify(checkConfig, getPath("InputSemantic.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationUseStyleTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationUseStyleTest.java
new file mode 100644
index 0000000..f9dc369
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationUseStyleTest.java
@@ -0,0 +1,206 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.annotation;
+
+import java.io.File;
+import org.junit.Test;
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class AnnotationUseStyleTest extends BaseCheckTestSupport
+{
+    /**
+     * Test that annotation parens are always present.
+     * @throws Exception
+     */
+    @Test
+    public void testParansAlways() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(AnnotationUseStyleCheck.class);
+        checkConfig.addAttribute("closingParens", "ALWAYS");
+        checkConfig.addAttribute("elementStyle", "ignore");
+        checkConfig.addAttribute("trailingArrayComma", "ignore");
+        final String[] expected = {
+            "3: Annotation must have closing parenthesis.",
+            "18: Annotation must have closing parenthesis.",
+            "23: Annotation must have closing parenthesis.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "DifferentUseStyles.java"), expected);
+    }
+
+    /**
+     * Test that annotation parens are never present.
+     * @throws Exception
+     */
+    @Test
+    public void testParansNever() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(AnnotationUseStyleCheck.class);
+        checkConfig.addAttribute("closingParens", "NEVER");
+        checkConfig.addAttribute("elementStyle", "ignore");
+        checkConfig.addAttribute("trailingArrayComma", "ignore");
+        final String[] expected = {
+            "13: Annotation cannot have closing parenthesis.",
+            "30: Annotation cannot have closing parenthesis.",
+            "33: Annotation cannot have closing parenthesis.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "DifferentUseStyles.java"), expected);
+    }
+
+    @Test
+    public void testStyleExpanded() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(AnnotationUseStyleCheck.class);
+        checkConfig.addAttribute("closingParens", "ignore");
+        checkConfig.addAttribute("elementStyle", "EXPANDED");
+        checkConfig.addAttribute("trailingArrayComma", "ignore");
+        final String[] expected = {
+            "5: Annotation style must be 'EXPANDED'.",
+            "12: Annotation style must be 'EXPANDED'.",
+            "20: Annotation style must be 'EXPANDED'.",
+            "26: Annotation style must be 'EXPANDED'.",
+            "39: Annotation style must be 'EXPANDED'.",
+            "41: Annotation style must be 'EXPANDED'.",
+            "58: Annotation style must be 'EXPANDED'.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "DifferentUseStyles.java"), expected);
+    }
+
+    @Test
+    public void testStyleCompact() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(AnnotationUseStyleCheck.class);
+        checkConfig.addAttribute("closingParens", "ignore");
+        checkConfig.addAttribute("elementStyle", "COMPACT");
+        checkConfig.addAttribute("trailingArrayComma", "ignore");
+        final String[] expected = {
+            "43: Annotation style must be 'COMPACT'.",
+            "47: Annotation style must be 'COMPACT'.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "DifferentUseStyles.java"), expected);
+    }
+
+    @Test
+    public void testStyleCompactNoArray() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(AnnotationUseStyleCheck.class);
+        checkConfig.addAttribute("closingParens", "ignore");
+        checkConfig.addAttribute("elementStyle", "COMPACT_NO_ARRAY");
+        checkConfig.addAttribute("trailingArrayComma", "ignore");
+        final String[] expected = {
+            "5: Annotation style must be 'COMPACT_NO_ARRAY'.",
+            "20: Annotation style must be 'COMPACT_NO_ARRAY'.",
+            "41: Annotation style must be 'COMPACT_NO_ARRAY'.",
+            "43: Annotation style must be 'COMPACT_NO_ARRAY'.",
+            "47: Annotation style must be 'COMPACT_NO_ARRAY'.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "DifferentUseStyles.java"), expected);
+    }
+
+    @Test
+    public void testCommaAlwaysViolations() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(AnnotationUseStyleCheck.class);
+        checkConfig.addAttribute("closingParens", "ignore");
+        checkConfig.addAttribute("elementStyle", "ignore");
+        checkConfig.addAttribute("trailingArrayComma", "ALWAYS");
+        final String[] expected = {
+            "3:20: Annotation array values must contain trailing comma.",
+            "6:30: Annotation array values must contain trailing comma.",
+            "10:40: Annotation array values must contain trailing comma.",
+            "13:44: Annotation array values must contain trailing comma.",
+            "16:54: Annotation array values must contain trailing comma.",
+            "24:37: Annotation array values must contain trailing comma.",
+            "24:65: Annotation array values must contain trailing comma.",
+            "26:21: Annotation array values must contain trailing comma.",
+            "26:30: Annotation array values must contain trailing comma.",
+            "29:39: Annotation array values must contain trailing comma.",
+            "29:49: Annotation array values must contain trailing comma.",
+            "32:21: Annotation array values must contain trailing comma.",
+            "32:56: Annotation array values must contain trailing comma.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "AnnotationUseNoTrailingComma.java"), expected);
+    }
+
+    @Test
+    public void testCommaAlwaysNoViolations() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(AnnotationUseStyleCheck.class);
+        checkConfig.addAttribute("closingParens", "ignore");
+        checkConfig.addAttribute("elementStyle", "ignore");
+        checkConfig.addAttribute("trailingArrayComma", "ALWAYS");
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "AnnotationUseWithTrailingComma.java"), expected);
+    }
+
+    @Test
+    public void testCommaNeverViolations() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(AnnotationUseStyleCheck.class);
+        checkConfig.addAttribute("closingParens", "ignore");
+        checkConfig.addAttribute("elementStyle", "ignore");
+        checkConfig.addAttribute("trailingArrayComma", "NEVER");
+        final String[] expected = {
+            "9:32: Annotation array values cannot contain trailing comma.",
+            "13:42: Annotation array values cannot contain trailing comma.",
+            "16:46: Annotation array values cannot contain trailing comma.",
+            "19:56: Annotation array values cannot contain trailing comma.",
+            "27:38: Annotation array values cannot contain trailing comma.",
+            "27:67: Annotation array values cannot contain trailing comma.",
+            "33:39: Annotation array values cannot contain trailing comma.",
+            "33:50: Annotation array values cannot contain trailing comma.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "AnnotationUseWithTrailingComma.java"), expected);
+    }
+
+    @Test
+    public void testCommaNeverNoViolations() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(AnnotationUseStyleCheck.class);
+        checkConfig.addAttribute("closingParens", "ignore");
+        checkConfig.addAttribute("elementStyle", "ignore");
+        checkConfig.addAttribute("trailingArrayComma", "NEVER");
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "AnnotationUseNoTrailingComma.java"), expected);
+    }
+
+    @Test
+    public void testEverythingMixed() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(AnnotationUseStyleCheck.class);
+        checkConfig.addAttribute("closingParens", "ignore");
+        checkConfig.addAttribute("elementStyle", "ignore");
+        checkConfig.addAttribute("trailingArrayComma", "ignore");
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "DifferentUseStyles.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingDeprecatedTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingDeprecatedTest.java
new file mode 100644
index 0000000..b48b549
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingDeprecatedTest.java
@@ -0,0 +1,119 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.annotation;
+
+import java.io.File;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class MissingDeprecatedTest extends BaseCheckTestSupport
+{
+    /**
+     * Tests that memebers that are only deprecated via javadoc are flagged.
+     */
+    @Test
+    public void testBadDeprecatedAnnotation() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(MissingDeprecatedCheck.class);
+
+        final String[] expected = {
+            "7: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "12: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "19: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "26: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "31: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "38: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "43: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "51: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "56: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "BadDeprecatedAnnotation.java"), expected);
+    }
+
+    /**
+     * Tests that memebers that are only deprecated via the annotation are flagged.
+     */
+    @Test
+    public void testBadDeprecatedJavadoc() throws Exception
+    {
+
+        DefaultConfiguration checkConfig = createCheckConfig(MissingDeprecatedCheck.class);
+
+        final String[] expected = {
+            "5: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "11: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "16: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "23: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "29: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "38: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "40: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "48: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "55: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "BadDeprecatedJavadoc.java"), expected);
+    }
+
+    /**
+     * Tests various special deprecation conditions such as duplicate or empty tags.
+     */
+    @Test
+    public void testSpecialCaseDeprecated() throws Exception
+    {
+
+        DefaultConfiguration checkConfig = createCheckConfig(MissingDeprecatedCheck.class);
+
+        final String[] expected = {
+            "5: Duplicate @deprecated tag.",
+            "12: Duplicate @deprecated tag.",
+            "14: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "17: Missing a Javadoc comment.",
+            "19: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.",
+            "24: Missing a Javadoc comment.",
+            "32: Missing a Javadoc comment.",
+            "33: Duplicate @deprecated tag.",
+            "33: Missing a Javadoc comment.",
+            "42: Duplicate @deprecated tag.",
+            "42: Missing a Javadoc comment.",
+            "50: Missing a Javadoc comment.",
+            "51: Duplicate @deprecated tag.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SpecialCaseDeprecated.java"), expected);
+    }
+
+    /**
+     * Tests that good forms of deprecation are not flagged.
+     */
+    @Test
+    public void testGoodDeprecated() throws Exception
+    {
+
+        DefaultConfiguration checkConfig = createCheckConfig(MissingDeprecatedCheck.class);
+
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "GoodDeprecated.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheckTest.java
new file mode 100644
index 0000000..921a019
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/MissingOverrideCheckTest.java
@@ -0,0 +1,260 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.annotation;
+
+import java.io.File;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+import org.junit.Test;
+
+public class MissingOverrideCheckTest extends BaseCheckTestSupport
+{
+    /**
+     * This tests that classes not extending anything explicitly will be correctly
+     * flagged for only including the inheritDoc tag.
+     * @throws Exception
+     */
+    @Test
+    public void testBadOverrideFromObject() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(MissingOverrideCheck.class);
+        checkConfig.addAttribute("javaFiveCompatibility", "false");
+
+        final String[] expected = {
+            "8: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+            "30: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+            "41: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+            "50: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "BadOverrideFromObject.java"), expected);
+    }
+
+    /**
+     * This tests that classes not extending anything explicitly will be correctly
+     * flagged for only including the inheritDoc tag even in Java 5 compatibility mode.
+     * @throws Exception
+     */
+    @Test
+    public void testBadOverrideFromObjectJ5Compat() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(MissingOverrideCheck.class);
+        checkConfig.addAttribute("javaFiveCompatibility", "true");
+
+        final String[] expected = {
+            "8: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+            "30: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+            "41: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+            "50: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "BadOverrideFromObject.java"), expected);
+    }
+
+    /**
+     * This tests classes that are extending things explicitly will be correctly
+     * flagged for only including the inheritDoc tag.
+     * @throws Exception
+     */
+    @Test
+    public void testBadOverrideFromOther() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(MissingOverrideCheck.class);
+        final String[] expected = {
+            "10: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+            "26: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+            "34: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+            "40: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+            "47: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+            "53: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+            "63: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "BadOverrideFromOther.java"), expected);
+    }
+
+    /**
+     * This tests classes that are extending things explicitly will NOT be flagged while in
+     * Java 5 compatibility mode.
+     * @throws Exception
+     */
+    @Test
+    public void testBadOverrideFromOtherJ5Compat() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(MissingOverrideCheck.class);
+        checkConfig.addAttribute("javaFiveCompatibility", "true");
+
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "BadOverrideFromOther.java"), expected);
+    }
+
+    /**
+     * This tests anonymous inner classes that are overriding methods are correctly flagged
+     * for only including the inheritDoc tag.
+     * @throws Exception
+     */
+    @Test
+    public void testBadAnnonOverride() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(MissingOverrideCheck.class);
+        final String[] expected = {
+            "10: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+            "16: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+            "29: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+            "35: Must include @java.lang.Override annotation when {@inheritDoc} Javadoc tag exists.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "BadAnnonOverride.java"), expected);
+    }
+
+    /**
+     * This tests anonymous inner classes that are overriding methods are NOT flagged while in
+     * Java 5 compatibility mode.
+     * @throws Exception
+     */
+    @Test
+    public void testBadAnnonOverrideJ5Compat() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(MissingOverrideCheck.class);
+        checkConfig.addAttribute("javaFiveCompatibility", "true");
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "BadAnnonOverride.java"), expected);
+    }
+
+    /**
+     * Tests that inheritDoc misuse is properly flagged or missing Javadocs do not cause a problem.
+     * @throws Exception
+     */
+    @Test
+    public void testNotOverride() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(MissingOverrideCheck.class);
+        final String[] expected = {
+            "8: The Javadoc {@inheritDoc} tag is not valid at this location.",
+            "15: The Javadoc {@inheritDoc} tag is not valid at this location.",
+            //this wont be flagged because this check only checks methods.
+            //"22: The Javadoc comment contains an {@inheritDoc} tag. The tag is not valid at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "NotOverride.java"), expected);
+    }
+
+    /**
+     * This tests that classes not extending anything explicitly will be correctly
+     * flagged for only including the inheritDoc tag.
+     * @throws Exception
+     */
+    @Test
+    public void testGoodOverrideFromObject() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(MissingOverrideCheck.class);
+        checkConfig.addAttribute("javaFiveCompatibility", "false");
+
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "GoodOverrideFromObject.java"), expected);
+    }
+
+    /**
+     * This tests that classes not extending anything explicitly will be correctly
+     * flagged for only including the inheritDoc tag even in Java 5 compatibility mode.
+     * @throws Exception
+     */
+    @Test
+    public void testGoodOverrideFromObjectJ5Compat() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(MissingOverrideCheck.class);
+        checkConfig.addAttribute("javaFiveCompatibility", "true");
+
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "GoodOverrideFromObject.java"), expected);
+    }
+
+    /**
+     * This tests classes that are extending things explicitly will be correctly
+     * flagged for only including the inheritDoc tag.
+     * @throws Exception
+     */
+    @Test
+    public void testGoodOverrideFromOther() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(MissingOverrideCheck.class);
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "GoodOverrideFromOther.java"), expected);
+    }
+
+    /**
+     * This tests classes that are extending things explicitly will NOT be flagged while in
+     * Java 5 compatibility mode.
+     * @throws Exception
+     */
+    @Test
+    public void testGoodOverrideFromOtherJ5Compat() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(MissingOverrideCheck.class);
+        checkConfig.addAttribute("javaFiveCompatibility", "true");
+
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "GoodOverrideFromOther.java"), expected);
+    }
+
+    /**
+     * This tests anonymous inner classes that are overriding methods are correctly flagged
+     * for only including the inheritDoc tag.
+     * @throws Exception
+     */
+    @Test
+    public void testGoodAnnonOverride() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(MissingOverrideCheck.class);
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "GoodAnnonOverride.java"), expected);
+    }
+
+    /**
+     * This tests anonymous inner classes that are overriding methods are NOT flagged while in
+     * Java 5 compatibility mode.
+     * @throws Exception
+     */
+    @Test
+    public void testGoodAnnonOverrideJ5Compat() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(MissingOverrideCheck.class);
+        checkConfig.addAttribute("javaFiveCompatibility", "true");
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "GoodAnnonOverride.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/PackageAnnotationTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/PackageAnnotationTest.java
new file mode 100644
index 0000000..0d1c945
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/PackageAnnotationTest.java
@@ -0,0 +1,77 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.annotation;
+
+import java.io.File;
+import org.junit.Test;
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class PackageAnnotationTest extends BaseCheckTestSupport
+{
+    /**
+     * This tests 1 package annotation that is not in the package-info.java file.
+     *
+     * @throws Exception
+     */
+    @Test
+    public void testBadPackageAnnotation1() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(PackageAnnotationCheck.class);
+
+        final String[] expected = {
+            "0: Package annotations must be in the package-info.java info.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "BadPackageAnnotation1.java"), expected);
+    }
+
+    /**
+     * This tests 2 package annotations that are not in the package-info.java file.
+     *
+     * @throws Exception
+     */
+    @Test
+    public void testBadPackageAnnotation2() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(PackageAnnotationCheck.class);
+
+        final String[] expected = {
+            "0: Package annotations must be in the package-info.java info.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "BadPackageAnnotation2.java"), expected);
+    }
+
+    /**
+     * This tests a package annotation that is in the package-info.java file.
+     *
+     * @throws Exception
+     */
+    @Test
+    public void testGoodPackageAnnotation() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(PackageAnnotationCheck.class);
+
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "package-info.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/SuppressWarningsTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/SuppressWarningsTest.java
new file mode 100644
index 0000000..a2c5a9a
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/annotation/SuppressWarningsTest.java
@@ -0,0 +1,825 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.annotation;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class SuppressWarningsTest extends BaseCheckTestSupport
+{
+    /**
+     * Tests SuppressWarnings with default regex.
+     * @throws Exception
+     */
+    @Test
+    public void testSingleDefault() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+
+        final String[] expected = {
+            "8:23: The warning '   ' cannot be suppressed at this location.",
+            "11:27: The warning '' cannot be suppressed at this location.",
+            "53:27: The warning '' cannot be suppressed at this location.",
+            "64:47: The warning '' cannot be suppressed at this location.",
+            "67:37: The warning '' cannot be suppressed at this location.",
+            "72:46: The warning '   ' cannot be suppressed at this location.",
+            "77:60: The warning '   ' cannot be suppressed at this location.",
+            "82:93: The warning '' cannot be suppressed at this location.",
+            "82:106: The warning '    ' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsSingle.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings all warnings disabled on everything.
+     * @throws Exception
+     */
+    @Test
+    public void testSingleAll() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", ".*");
+
+        final String[] expected = {
+            "5:19: The warning 'unchecked' cannot be suppressed at this location.",
+            "8:23: The warning '   ' cannot be suppressed at this location.",
+            "11:27: The warning '' cannot be suppressed at this location.",
+            "17:23: The warning 'unused' cannot be suppressed at this location.",
+            "20:27: The warning 'unforgiven' cannot be suppressed at this location.",
+            "25:31: The warning 'unused' cannot be suppressed at this location.",
+            "29:35: The warning 'unchecked' cannot be suppressed at this location.",
+            "37:23: The warning 'abcun' cannot be suppressed at this location.",
+            "44:23: The warning 'abcun' cannot be suppressed at this location.",
+            "47:27: The warning 'unused' cannot be suppressed at this location.",
+            "53:27: The warning '' cannot be suppressed at this location.",
+            "56:27: The warning 'unchecked' cannot be suppressed at this location.",
+            "59:48: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:33: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:47: The warning '' cannot be suppressed at this location.",
+            "67:37: The warning '' cannot be suppressed at this location.",
+            "67:42: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:46: The warning '   ' cannot be suppressed at this location.",
+            "72:54: The warning 'unused' cannot be suppressed at this location.",
+            "72:65: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:37: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:60: The warning '   ' cannot be suppressed at this location.",
+            "77:68: The warning 'unused' cannot be suppressed at this location.",
+            "82:47: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:93: The warning '' cannot be suppressed at this location.",
+            "82:98: The warning 'foo' cannot be suppressed at this location.",
+            "82:106: The warning '    ' cannot be suppressed at this location.",
+            "82:115: The warning 'unused' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsSingle.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings unchecked warning disabled on everything.
+     * @throws Exception
+     */
+    @Test
+    public void testSingleNoUnchecked() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", "^unchecked$*");
+
+        final String[] expected = {
+            "5:19: The warning 'unchecked' cannot be suppressed at this location.",
+            "29:35: The warning 'unchecked' cannot be suppressed at this location.",
+            "56:27: The warning 'unchecked' cannot be suppressed at this location.",
+            "59:48: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "64:33: The warning 'unchecked' cannot be suppressed at this location.",
+            "67:42: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:65: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:37: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:47: The warning 'unchecked' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsSingle.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings unchecked warning disabled on certain tokens.
+     * @throws Exception
+     */
+    @Test
+    public void testSingleNoUncheckedTokens() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", "^unchecked$*");
+        checkConfig.addAttribute("tokens", "CLASS_DEF,METHOD_DEF");
+
+        final String[] expected = {
+            "5:19: The warning 'unchecked' cannot be suppressed at this location.",
+            "29:35: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "64:33: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:65: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:37: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:47: The warning 'unchecked' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsSingle.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings un* warning disabled on everything.
+     * @throws Exception
+     */
+    @Test
+    public void testSingleNoUnWildcard() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", ".*un.*");
+
+        final String[] expected = {
+            "5:19: The warning 'unchecked' cannot be suppressed at this location.",
+            "17:23: The warning 'unused' cannot be suppressed at this location.",
+            "20:27: The warning 'unforgiven' cannot be suppressed at this location.",
+            "25:31: The warning 'unused' cannot be suppressed at this location.",
+            "29:35: The warning 'unchecked' cannot be suppressed at this location.",
+            "37:23: The warning 'abcun' cannot be suppressed at this location.",
+            "44:23: The warning 'abcun' cannot be suppressed at this location.",
+            "47:27: The warning 'unused' cannot be suppressed at this location.",
+            "56:27: The warning 'unchecked' cannot be suppressed at this location.",
+            "59:48: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "64:33: The warning 'unchecked' cannot be suppressed at this location.",
+            "67:42: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:54: The warning 'unused' cannot be suppressed at this location.",
+            "72:65: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:37: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:68: The warning 'unused' cannot be suppressed at this location.",
+            "82:47: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:115: The warning 'unused' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsSingle.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings unchecked, unused warning disabled on everything.
+     * @throws Exception
+     */
+    @Test
+    public void testSingleNoUncheckedUnused() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", "^unchecked$*|^unused$");
+
+        final String[] expected = {
+            "5:19: The warning 'unchecked' cannot be suppressed at this location.",
+            "17:23: The warning 'unused' cannot be suppressed at this location.",
+            "25:31: The warning 'unused' cannot be suppressed at this location.",
+            "29:35: The warning 'unchecked' cannot be suppressed at this location.",
+            "47:27: The warning 'unused' cannot be suppressed at this location.",
+            "56:27: The warning 'unchecked' cannot be suppressed at this location.",
+            "59:48: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "64:33: The warning 'unchecked' cannot be suppressed at this location.",
+            "67:42: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:54: The warning 'unused' cannot be suppressed at this location.",
+            "72:65: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:37: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:68: The warning 'unused' cannot be suppressed at this location.",
+            "82:47: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:115: The warning 'unused' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsSingle.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings *, unchecked, unused warning disabled on everything.
+     * @throws Exception
+     */
+    @Test
+    public void testSingleNoUncheckedUnusedAll() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", "^unchecked$*|^unused$*|.*");
+
+        final String[] expected = {
+            "5:19: The warning 'unchecked' cannot be suppressed at this location.",
+            "8:23: The warning '   ' cannot be suppressed at this location.",
+            "11:27: The warning '' cannot be suppressed at this location.",
+            "17:23: The warning 'unused' cannot be suppressed at this location.",
+            "20:27: The warning 'unforgiven' cannot be suppressed at this location.",
+            "25:31: The warning 'unused' cannot be suppressed at this location.",
+            "29:35: The warning 'unchecked' cannot be suppressed at this location.",
+            "37:23: The warning 'abcun' cannot be suppressed at this location.",
+            "44:23: The warning 'abcun' cannot be suppressed at this location.",
+            "47:27: The warning 'unused' cannot be suppressed at this location.",
+            "53:27: The warning '' cannot be suppressed at this location.",
+            "56:27: The warning 'unchecked' cannot be suppressed at this location.",
+            "59:48: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:33: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:47: The warning '' cannot be suppressed at this location.",
+            "67:37: The warning '' cannot be suppressed at this location.",
+            "67:42: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:46: The warning '   ' cannot be suppressed at this location.",
+            "72:54: The warning 'unused' cannot be suppressed at this location.",
+            "72:65: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:37: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:60: The warning '   ' cannot be suppressed at this location.",
+            "77:68: The warning 'unused' cannot be suppressed at this location.",
+            "82:47: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:93: The warning '' cannot be suppressed at this location.",
+            "82:98: The warning 'foo' cannot be suppressed at this location.",
+            "82:106: The warning '    ' cannot be suppressed at this location.",
+            "82:115: The warning 'unused' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsSingle.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings with default regex.
+     * @throws Exception
+     */
+    @Test
+    public void testCompactDefault() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+
+        final String[] expected = {
+            "8:24: The warning '   ' cannot be suppressed at this location.",
+            "11:41: The warning '' cannot be suppressed at this location.",
+            "44:23: The warning '' cannot be suppressed at this location.",
+            "53:27: The warning '' cannot be suppressed at this location.",
+
+            "64:48: The warning '' cannot be suppressed at this location.",
+            "64:76: The warning '' cannot be suppressed at this location.",
+
+            "67:38: The warning '' cannot be suppressed at this location.",
+            "72:47: The warning '   ' cannot be suppressed at this location.",
+            "72:98: The warning '   ' cannot be suppressed at this location.",
+            "77:61: The warning '   ' cannot be suppressed at this location.",
+            "82:94: The warning '' cannot be suppressed at this location.",
+            "82:107: The warning '   ' cannot be suppressed at this location.",
+            "82:181: The warning '' cannot be suppressed at this location.",
+            "82:194: The warning '   ' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsCompact.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings all warnings disabled on everything.
+     * @throws Exception
+     */
+    @Test
+    public void testCompactAll() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", ".*");
+
+        final String[] expected = {
+            "5:20: The warning 'unchecked' cannot be suppressed at this location.",
+            "5:33: The warning 'unused' cannot be suppressed at this location.",
+            "8:24: The warning '   ' cannot be suppressed at this location.",
+            "11:28: The warning 'unchecked' cannot be suppressed at this location.",
+            "11:41: The warning '' cannot be suppressed at this location.",
+            "17:24: The warning 'unused' cannot be suppressed at this location.",
+            "20:28: The warning 'unforgiven' cannot be suppressed at this location.",
+            "20:42: The warning '    un' cannot be suppressed at this location.",
+            "25:32: The warning 'unused' cannot be suppressed at this location.",
+            "29:36: The warning 'unchecked' cannot be suppressed at this location.",
+            "37:24: The warning 'abcun' cannot be suppressed at this location.",
+            "44:23: The warning '' cannot be suppressed at this location.",
+            "47:28: The warning 'unused' cannot be suppressed at this location.",
+            "47:38: The warning 'bleh' cannot be suppressed at this location.",
+            "53:27: The warning '' cannot be suppressed at this location.",
+            "56:28: The warning 'unchecked' cannot be suppressed at this location.",
+            "59:49: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "64:34: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:48: The warning '' cannot be suppressed at this location.",
+            "64:62: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:76: The warning '' cannot be suppressed at this location.",
+
+            "67:38: The warning '' cannot be suppressed at this location.",
+            "67:43: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "72:47: The warning '   ' cannot be suppressed at this location.",
+            "72:55: The warning 'unused' cannot be suppressed at this location.",
+            "72:66: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:98: The warning '   ' cannot be suppressed at this location.",
+            "72:106: The warning 'unused' cannot be suppressed at this location.",
+            "72:117: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "77:38: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:61: The warning '   ' cannot be suppressed at this location.",
+            "77:69: The warning 'unused' cannot be suppressed at this location.",
+
+            "82:48: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:94: The warning '' cannot be suppressed at this location.",
+            "82:99: The warning 'foo' cannot be suppressed at this location.",
+            "82:107: The warning '   ' cannot be suppressed at this location.",
+            "82:115: The warning 'unused' cannot be suppressed at this location.",
+            "82:135: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:181: The warning '' cannot be suppressed at this location.",
+            "82:186: The warning 'foo' cannot be suppressed at this location.",
+            "82:194: The warning '   ' cannot be suppressed at this location.",
+            "82:202: The warning 'unused' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsCompact.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings unchecked warning disabled on everything.
+     * @throws Exception
+     */
+    @Test
+    public void testCompactNoUnchecked() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", "^unchecked$*");
+
+        final String[] expected = {
+            "5:20: The warning 'unchecked' cannot be suppressed at this location.",
+            "11:28: The warning 'unchecked' cannot be suppressed at this location.",
+            "29:36: The warning 'unchecked' cannot be suppressed at this location.",
+            "56:28: The warning 'unchecked' cannot be suppressed at this location.",
+            "59:49: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:34: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:62: The warning 'unchecked' cannot be suppressed at this location.",
+            "67:43: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:66: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:117: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:38: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:48: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:135: The warning 'unchecked' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsCompact.java"), expected);
+
+    }
+
+    /**
+     * Tests SuppressWarnings unchecked warning disabled on certain tokens.
+     * @throws Exception
+     */
+    @Test
+    public void testCompactNoUncheckedTokens() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", "^unchecked$*");
+        checkConfig.addAttribute("tokens", "CLASS_DEF");
+
+        final String[] expected = {
+            "5:20: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "64:34: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:62: The warning 'unchecked' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsCompact.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings un* warning disabled on everything.
+     * @throws Exception
+     */
+    @Test
+    public void testCompactNoUnWildcard() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", "un.*");
+
+        final String[] expected = {
+            "5:20: The warning 'unchecked' cannot be suppressed at this location.",
+            "5:33: The warning 'unused' cannot be suppressed at this location.",
+            "11:28: The warning 'unchecked' cannot be suppressed at this location.",
+            "17:24: The warning 'unused' cannot be suppressed at this location.",
+            "20:28: The warning 'unforgiven' cannot be suppressed at this location.",
+            "25:32: The warning 'unused' cannot be suppressed at this location.",
+            "29:36: The warning 'unchecked' cannot be suppressed at this location.",
+            "47:28: The warning 'unused' cannot be suppressed at this location.",
+            "56:28: The warning 'unchecked' cannot be suppressed at this location.",
+            "59:49: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "64:34: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:62: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "67:43: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "72:55: The warning 'unused' cannot be suppressed at this location.",
+            "72:66: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:106: The warning 'unused' cannot be suppressed at this location.",
+            "72:117: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "77:38: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:69: The warning 'unused' cannot be suppressed at this location.",
+
+            "82:48: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:115: The warning 'unused' cannot be suppressed at this location.",
+            "82:135: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:202: The warning 'unused' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsCompact.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings unchecked, unused warning disabled on everything.
+     * @throws Exception
+     */
+    @Test
+    public void testCompactNoUncheckedUnused() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", "^unchecked$*|^unused$");
+
+        final String[] expected = {
+            "5:20: The warning 'unchecked' cannot be suppressed at this location.",
+            "5:33: The warning 'unused' cannot be suppressed at this location.",
+            "11:28: The warning 'unchecked' cannot be suppressed at this location.",
+            "17:24: The warning 'unused' cannot be suppressed at this location.",
+            "25:32: The warning 'unused' cannot be suppressed at this location.",
+            "29:36: The warning 'unchecked' cannot be suppressed at this location.",
+            "47:28: The warning 'unused' cannot be suppressed at this location.",
+            "56:28: The warning 'unchecked' cannot be suppressed at this location.",
+            "59:49: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:34: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:62: The warning 'unchecked' cannot be suppressed at this location.",
+            "67:43: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:55: The warning 'unused' cannot be suppressed at this location.",
+            "72:66: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:106: The warning 'unused' cannot be suppressed at this location.",
+            "72:117: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:38: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:69: The warning 'unused' cannot be suppressed at this location.",
+            "82:48: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:115: The warning 'unused' cannot be suppressed at this location.",
+            "82:135: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:202: The warning 'unused' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsCompact.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings *, unchecked, unused warning disabled on everything.
+     * @throws Exception
+     */
+    @Test
+    public void testCompactNoUncheckedUnusedAll() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", "^unchecked$*|^unused$*|.*");
+
+        final String[] expected = {
+            "5:20: The warning 'unchecked' cannot be suppressed at this location.",
+            "5:33: The warning 'unused' cannot be suppressed at this location.",
+            "8:24: The warning '   ' cannot be suppressed at this location.",
+            "11:28: The warning 'unchecked' cannot be suppressed at this location.",
+            "11:41: The warning '' cannot be suppressed at this location.",
+            "17:24: The warning 'unused' cannot be suppressed at this location.",
+            "20:28: The warning 'unforgiven' cannot be suppressed at this location.",
+            "20:42: The warning '    un' cannot be suppressed at this location.",
+            "25:32: The warning 'unused' cannot be suppressed at this location.",
+            "29:36: The warning 'unchecked' cannot be suppressed at this location.",
+            "37:24: The warning 'abcun' cannot be suppressed at this location.",
+            "44:23: The warning '' cannot be suppressed at this location.",
+            "47:28: The warning 'unused' cannot be suppressed at this location.",
+            "47:38: The warning 'bleh' cannot be suppressed at this location.",
+            "53:27: The warning '' cannot be suppressed at this location.",
+            "56:28: The warning 'unchecked' cannot be suppressed at this location.",
+            "59:49: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "64:34: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:48: The warning '' cannot be suppressed at this location.",
+            "64:62: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:76: The warning '' cannot be suppressed at this location.",
+
+            "67:38: The warning '' cannot be suppressed at this location.",
+            "67:43: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "72:47: The warning '   ' cannot be suppressed at this location.",
+            "72:55: The warning 'unused' cannot be suppressed at this location.",
+            "72:66: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:98: The warning '   ' cannot be suppressed at this location.",
+            "72:106: The warning 'unused' cannot be suppressed at this location.",
+            "72:117: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "77:38: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:61: The warning '   ' cannot be suppressed at this location.",
+            "77:69: The warning 'unused' cannot be suppressed at this location.",
+
+            "82:48: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:94: The warning '' cannot be suppressed at this location.",
+            "82:99: The warning 'foo' cannot be suppressed at this location.",
+            "82:107: The warning '   ' cannot be suppressed at this location.",
+            "82:115: The warning 'unused' cannot be suppressed at this location.",
+            "82:135: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:181: The warning '' cannot be suppressed at this location.",
+            "82:186: The warning 'foo' cannot be suppressed at this location.",
+            "82:194: The warning '   ' cannot be suppressed at this location.",
+            "82:202: The warning 'unused' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsCompact.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings with default regex.
+     * @throws Exception
+     */
+    @Test
+    public void testExpandedDefault() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+
+        final String[] expected = {
+            "8:30: The warning '   ' cannot be suppressed at this location.",
+            "11:47: The warning '' cannot be suppressed at this location.",
+            "44:29: The warning '' cannot be suppressed at this location.",
+            "53:33: The warning '' cannot be suppressed at this location.",
+            "64:54: The warning '' cannot be suppressed at this location.",
+            "64:82: The warning '' cannot be suppressed at this location.",
+            "67:44: The warning '' cannot be suppressed at this location.",
+            "72:53: The warning '   ' cannot be suppressed at this location.",
+            "72:104: The warning '   ' cannot be suppressed at this location.",
+            "77:67: The warning '   ' cannot be suppressed at this location.",
+            "82:100: The warning '' cannot be suppressed at this location.",
+            "82:113: The warning '   ' cannot be suppressed at this location.",
+            "82:187: The warning '' cannot be suppressed at this location.",
+            "82:200: The warning '   ' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsExpanded.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings all warnings disabled on everything.
+     * @throws Exception
+     */
+    @Test
+    public void testExpandedAll() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", ".*");
+
+        final String[] expected = {
+            "5:26: The warning 'unchecked' cannot be suppressed at this location.",
+            "5:39: The warning 'unused' cannot be suppressed at this location.",
+            "8:30: The warning '   ' cannot be suppressed at this location.",
+            "11:34: The warning 'unchecked' cannot be suppressed at this location.",
+            "11:47: The warning '' cannot be suppressed at this location.",
+            "17:30: The warning 'unused' cannot be suppressed at this location.",
+            "20:34: The warning 'unforgiven' cannot be suppressed at this location.",
+            "20:48: The warning '    un' cannot be suppressed at this location.",
+            "25:38: The warning 'unused' cannot be suppressed at this location.",
+            "29:42: The warning 'unchecked' cannot be suppressed at this location.",
+            "37:30: The warning 'abcun' cannot be suppressed at this location.",
+            "44:29: The warning '' cannot be suppressed at this location.",
+            "47:34: The warning 'unused' cannot be suppressed at this location.",
+            "47:44: The warning 'bleh' cannot be suppressed at this location.",
+            "53:33: The warning '' cannot be suppressed at this location.",
+            "56:34: The warning 'unchecked' cannot be suppressed at this location.",
+            "59:55: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "64:40: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:54: The warning '' cannot be suppressed at this location.",
+            "64:68: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:82: The warning '' cannot be suppressed at this location.",
+            "67:44: The warning '' cannot be suppressed at this location.",
+            "67:49: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:53: The warning '   ' cannot be suppressed at this location.",
+            "72:61: The warning 'unused' cannot be suppressed at this location.",
+            "72:72: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:104: The warning '   ' cannot be suppressed at this location.",
+            "72:112: The warning 'unused' cannot be suppressed at this location.",
+            "72:123: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:44: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:67: The warning '   ' cannot be suppressed at this location.",
+            "77:75: The warning 'unused' cannot be suppressed at this location.",
+            "82:54: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:100: The warning '' cannot be suppressed at this location.",
+            "82:105: The warning 'foo' cannot be suppressed at this location.",
+            "82:113: The warning '   ' cannot be suppressed at this location.",
+            "82:121: The warning 'unused' cannot be suppressed at this location.",
+            "82:141: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:187: The warning '' cannot be suppressed at this location.",
+            "82:192: The warning 'foo' cannot be suppressed at this location.",
+            "82:200: The warning '   ' cannot be suppressed at this location.",
+            "82:208: The warning 'unused' cannot be suppressed at this location.",
+
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsExpanded.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings unchecked warning disabled on everything.
+     * @throws Exception
+     */
+    @Test
+    public void testExpandedNoUnchecked() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", "^unchecked$*");
+
+        final String[] expected = {
+            "5:26: The warning 'unchecked' cannot be suppressed at this location.",
+            "11:34: The warning 'unchecked' cannot be suppressed at this location.",
+            "29:42: The warning 'unchecked' cannot be suppressed at this location.",
+            "56:34: The warning 'unchecked' cannot be suppressed at this location.",
+            "59:55: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "64:40: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:68: The warning 'unchecked' cannot be suppressed at this location.",
+            "67:49: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:72: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:123: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:44: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:54: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:141: The warning 'unchecked' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsExpanded.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings unchecked warning disabled on certain tokens.
+     * @throws Exception
+     */
+    @Test
+    public void testExpandedNoUncheckedTokens() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", "^unchecked$*");
+        checkConfig.addAttribute("tokens", "CLASS_DEF");
+
+        final String[] expected = {
+            "5:26: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "64:40: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:68: The warning 'unchecked' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsExpanded.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings un* warning disabled on everything.
+     * @throws Exception
+     */
+    @Test
+    public void testExpandedNoUnWildcard() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", "un.*");
+
+        final String[] expected = {
+            "5:26: The warning 'unchecked' cannot be suppressed at this location.",
+            "5:39: The warning 'unused' cannot be suppressed at this location.",
+            "11:34: The warning 'unchecked' cannot be suppressed at this location.",
+            "17:30: The warning 'unused' cannot be suppressed at this location.",
+            "20:34: The warning 'unforgiven' cannot be suppressed at this location.",
+            "25:38: The warning 'unused' cannot be suppressed at this location.",
+            "29:42: The warning 'unchecked' cannot be suppressed at this location.",
+            "47:34: The warning 'unused' cannot be suppressed at this location.",
+            "56:34: The warning 'unchecked' cannot be suppressed at this location.",
+            "59:55: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "64:40: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:68: The warning 'unchecked' cannot be suppressed at this location.",
+            "67:49: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:61: The warning 'unused' cannot be suppressed at this location.",
+            "72:72: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:112: The warning 'unused' cannot be suppressed at this location.",
+            "72:123: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:44: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:75: The warning 'unused' cannot be suppressed at this location.",
+            "82:54: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:121: The warning 'unused' cannot be suppressed at this location.",
+            "82:141: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:208: The warning 'unused' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsExpanded.java"), expected);
+    }
+
+
+    /**
+     * Tests SuppressWarnings unchecked, unused warning disabled on everything.
+     * @throws Exception
+     */
+    @Test
+    public void testExpandedNoUncheckedUnused() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", "^unchecked$*|^unused$");
+
+        final String[] expected = {
+            "5:26: The warning 'unchecked' cannot be suppressed at this location.",
+            "5:39: The warning 'unused' cannot be suppressed at this location.",
+            "11:34: The warning 'unchecked' cannot be suppressed at this location.",
+            "17:30: The warning 'unused' cannot be suppressed at this location.",
+            "25:38: The warning 'unused' cannot be suppressed at this location.",
+            "29:42: The warning 'unchecked' cannot be suppressed at this location.",
+            "47:34: The warning 'unused' cannot be suppressed at this location.",
+            "56:34: The warning 'unchecked' cannot be suppressed at this location.",
+            "59:55: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "64:40: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:68: The warning 'unchecked' cannot be suppressed at this location.",
+            "67:49: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:61: The warning 'unused' cannot be suppressed at this location.",
+            "72:72: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:112: The warning 'unused' cannot be suppressed at this location.",
+            "72:123: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:44: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:75: The warning 'unused' cannot be suppressed at this location.",
+            "82:54: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:121: The warning 'unused' cannot be suppressed at this location.",
+            "82:141: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:208: The warning 'unused' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsExpanded.java"), expected);
+    }
+
+    /**
+     * Tests SuppressWarnings *, unchecked, unused warning disabled on everything.
+     * @throws Exception
+     */
+    @Test
+    public void testExpandedNoUncheckedUnusedAll() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(SuppressWarningsCheck.class);
+        checkConfig.addAttribute("format", "^unchecked$*|^unused$*|.*");
+
+        final String[] expected = {
+            "5:26: The warning 'unchecked' cannot be suppressed at this location.",
+            "5:39: The warning 'unused' cannot be suppressed at this location.",
+            "8:30: The warning '   ' cannot be suppressed at this location.",
+            "11:34: The warning 'unchecked' cannot be suppressed at this location.",
+            "11:47: The warning '' cannot be suppressed at this location.",
+            "17:30: The warning 'unused' cannot be suppressed at this location.",
+            "20:34: The warning 'unforgiven' cannot be suppressed at this location.",
+            "20:48: The warning '    un' cannot be suppressed at this location.",
+            "25:38: The warning 'unused' cannot be suppressed at this location.",
+            "29:42: The warning 'unchecked' cannot be suppressed at this location.",
+            "37:30: The warning 'abcun' cannot be suppressed at this location.",
+            "44:29: The warning '' cannot be suppressed at this location.",
+            "47:34: The warning 'unused' cannot be suppressed at this location.",
+            "47:44: The warning 'bleh' cannot be suppressed at this location.",
+            "53:33: The warning '' cannot be suppressed at this location.",
+            "56:34: The warning 'unchecked' cannot be suppressed at this location.",
+            "59:55: The warning 'unchecked' cannot be suppressed at this location.",
+
+            "64:40: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:54: The warning '' cannot be suppressed at this location.",
+            "64:68: The warning 'unchecked' cannot be suppressed at this location.",
+            "64:82: The warning '' cannot be suppressed at this location.",
+            "67:44: The warning '' cannot be suppressed at this location.",
+            "67:49: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:53: The warning '   ' cannot be suppressed at this location.",
+            "72:61: The warning 'unused' cannot be suppressed at this location.",
+            "72:72: The warning 'unchecked' cannot be suppressed at this location.",
+            "72:104: The warning '   ' cannot be suppressed at this location.",
+            "72:112: The warning 'unused' cannot be suppressed at this location.",
+            "72:123: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:44: The warning 'unchecked' cannot be suppressed at this location.",
+            "77:67: The warning '   ' cannot be suppressed at this location.",
+            "77:75: The warning 'unused' cannot be suppressed at this location.",
+            "82:54: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:100: The warning '' cannot be suppressed at this location.",
+            "82:105: The warning 'foo' cannot be suppressed at this location.",
+            "82:113: The warning '   ' cannot be suppressed at this location.",
+            "82:121: The warning 'unused' cannot be suppressed at this location.",
+            "82:141: The warning 'unchecked' cannot be suppressed at this location.",
+            "82:187: The warning '' cannot be suppressed at this location.",
+            "82:192: The warning 'foo' cannot be suppressed at this location.",
+            "82:200: The warning '   ' cannot be suppressed at this location.",
+            "82:208: The warning 'unused' cannot be suppressed at this location.",
+        };
+
+        verify(checkConfig, getPath("annotation" + File.separator + "SuppressWarningsExpanded.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/AvoidNestedBlocksCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/AvoidNestedBlocksCheckTest.java
new file mode 100644
index 0000000..47afdcb
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/AvoidNestedBlocksCheckTest.java
@@ -0,0 +1,58 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.blocks;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class AvoidNestedBlocksCheckTest
+        extends BaseCheckTestSupport
+{
+    @Test
+    public void testStrictSettings()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(AvoidNestedBlocksCheck.class);
+        final String[] expected = {
+            "22:9: Avoid nested blocks.",
+            "44:17: Avoid nested blocks.",
+            "50:17: Avoid nested blocks.",
+            "58:17: Avoid nested blocks.",
+        };
+        verify(checkConfig, getPath("InputNestedBlocks.java"), expected);
+    }
+
+    @Test
+    public void testAllowSwitchInCase()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(AvoidNestedBlocksCheck.class);
+        checkConfig.addAttribute("allowInSwitchCase", Boolean.TRUE.toString());
+
+        final String[] expected = {
+            "22:9: Avoid nested blocks.",
+            "44:17: Avoid nested blocks.",
+            "58:17: Avoid nested blocks.",
+        };
+        verify(checkConfig, getPath("InputNestedBlocks.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyBlockCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyBlockCheckTest.java
new file mode 100644
index 0000000..2405ef0
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyBlockCheckTest.java
@@ -0,0 +1,125 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.blocks;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+import org.junit.Test;
+
+public class EmptyBlockCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(EmptyBlockCheck.class);
+        final String[] expected = {
+            "52:65: Must have at least one statement.",
+            "54:41: Must have at least one statement.",
+            "71:38: Must have at least one statement.",
+            "72:52: Must have at least one statement.",
+            "73:45: Must have at least one statement.",
+            "75:13: Must have at least one statement.",
+            "77:17: Must have at least one statement.",
+            "79:13: Must have at least one statement.",
+            "82:17: Must have at least one statement.",
+            "178:5: Must have at least one statement.",
+        };
+        verify(checkConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testText()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(EmptyBlockCheck.class);
+        checkConfig.addAttribute("option", BlockOption.TEXT.toString());
+        final String[] expected = {
+            "52:65: Empty catch block.",
+            "72:52: Empty catch block.",
+            "73:45: Empty catch block.",
+            "75:13: Empty try block.",
+            "77:17: Empty finally block.",
+            "178:5: Empty INSTANCE_INIT block.",
+        };
+        verify(checkConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testStatement()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(EmptyBlockCheck.class);
+        checkConfig.addAttribute("option", BlockOption.STMT.toString());
+        final String[] expected = {
+            "52:65: Must have at least one statement.",
+            "54:41: Must have at least one statement.",
+            "71:38: Must have at least one statement.",
+            "72:52: Must have at least one statement.",
+            "73:45: Must have at least one statement.",
+            "75:13: Must have at least one statement.",
+            "77:17: Must have at least one statement.",
+            "79:13: Must have at least one statement.",
+            "82:17: Must have at least one statement.",
+            "178:5: Must have at least one statement.",
+        };
+        verify(checkConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void allowEmptyLoops() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(EmptyBlockCheck.class);
+        checkConfig.addAttribute("option", BlockOption.STMT.toString());
+        checkConfig.addAttribute("tokens", "LITERAL_TRY, LITERAL_CATCH,"
+                + "LITERAL_FINALLY, LITERAL_DO, LITERAL_IF,"
+                + "LITERAL_ELSE, INSTANCE_INIT, STATIC_INIT, LITERAL_SWITCH");
+        final String[] expected = {
+            "16:29: Must have at least one statement.",
+            "19:42: Must have at least one statement.",
+            "22:29: Must have at least one statement.",
+            "23:28: Must have at least one statement.",
+        };
+        verify(checkConfig, getPath("InputSemantic2.java"), expected);
+    }
+
+    @Test
+    public void allowEmptyLoopsText() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(EmptyBlockCheck.class);
+        checkConfig.addAttribute("option", BlockOption.TEXT.toString());
+        checkConfig.addAttribute("tokens", "LITERAL_TRY, LITERAL_CATCH,"
+                + "LITERAL_FINALLY, LITERAL_DO, LITERAL_IF,"
+                + "LITERAL_ELSE, INSTANCE_INIT, STATIC_INIT, LITERAL_SWITCH");
+        final String[] expected = {
+            "16:29: Empty if block.",
+            "19:42: Empty if block.",
+            "22:29: Empty if block.",
+            "23:28: Empty switch block.",
+        };
+        verify(checkConfig, getPath("InputSemantic2.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheckTest.java
new file mode 100644
index 0000000..9d6b8b0
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheckTest.java
@@ -0,0 +1,226 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.blocks;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Before;
+import org.junit.Test;
+
+public class LeftCurlyCheckTest extends BaseCheckTestSupport
+{
+    private DefaultConfiguration mCheckConfig;
+
+    @Before
+    public void setUp()
+    {
+        mCheckConfig = createCheckConfig(LeftCurlyCheck.class);
+    }
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        final String[] expected = {
+            "8:1: '{' should be on the previous line.",
+            "12:5: '{' should be on the previous line.",
+            "21:5: '{' should be on the previous line.",
+            "30:5: '{' should be on the previous line.",
+            "39:5: '{' should be on the previous line.",
+        };
+        verify(mCheckConfig, getPath("InputScopeInnerInterfaces.java"), expected);
+    }
+
+    @Test
+    public void testNL() throws Exception
+    {
+        mCheckConfig.addAttribute("option", LeftCurlyOption.NL.toString());
+        final String[] expected = {
+            "49:14: '{' should be on a new line.",
+            "53:14: '{' should be on a new line.",
+            "58:18: '{' should be on a new line.",
+            "62:18: '{' should be on a new line.",
+            "67:12: '{' should be on a new line.",
+            "72:18: '{' should be on a new line.",
+        };
+        verify(mCheckConfig, getPath("InputScopeInnerInterfaces.java"), expected);
+    }
+
+    @Test
+    public void testNLOW() throws Exception
+    {
+        mCheckConfig.addAttribute("option", LeftCurlyOption.NLOW.toString());
+        final String[] expected = {
+            "8:1: '{' should be on the previous line.",
+            "12:5: '{' should be on the previous line.",
+            "21:5: '{' should be on the previous line.",
+            "30:5: '{' should be on the previous line.",
+            "39:5: '{' should be on the previous line.",
+            "49:14: '{' should be on a new line.",
+            "53:14: '{' should be on a new line.",
+            "58:18: '{' should be on a new line.",
+            "62:18: '{' should be on a new line.",
+            "67:12: '{' should be on a new line.",
+            "72:18: '{' should be on a new line.",
+        };
+        verify(mCheckConfig, getPath("InputScopeInnerInterfaces.java"), expected);
+    }
+
+    @Test
+    public void testDefault2() throws Exception
+    {
+        final String[] expected = {
+            "12:1: '{' should be on the previous line.",
+            "17:5: '{' should be on the previous line.",
+            "24:5: '{' should be on the previous line.",
+            "31:5: '{' should be on the previous line.",
+            "39:1: '{' should be on the previous line.",
+            "41:5: '{' should be on the previous line.",
+            "46:9: '{' should be on the previous line.",
+            "53:9: '{' should be on the previous line.",
+            "69:5: '{' should be on the previous line.",
+            "77:5: '{' should be on the previous line.",
+            "84:5: '{' should be on the previous line.",
+        };
+        verify(mCheckConfig, getPath("InputLeftCurlyMethod.java"), expected);
+    }
+
+    @Test
+    public void testNL2() throws Exception
+    {
+        mCheckConfig.addAttribute("option", LeftCurlyOption.NL.toString());
+        final String[] expected = {
+            "14:39: '{' should be on a new line.",
+            "21:20: '{' should be on a new line.",
+            "34:31: '{' should be on a new line.",
+            "43:24: '{' should be on a new line.",
+            "56:35: '{' should be on a new line.",
+            "60:24: '{' should be on a new line.",
+            "74:20: '{' should be on a new line.",
+            "87:31: '{' should be on a new line.",
+        };
+        verify(mCheckConfig, getPath("InputLeftCurlyMethod.java"), expected);
+    }
+    @Test
+    public void testDefault3() throws Exception
+    {
+        final String[] expected = {
+            "12:1: '{' should be on the previous line.",
+            "15:5: '{' should be on the previous line.",
+            "19:9: '{' should be on the previous line.",
+            "21:13: '{' should be on the previous line.",
+            "23:17: '{' should be on the previous line.",
+            "30:17: '{' should be on the previous line.",
+            "34:17: '{' should be on the previous line.",
+            "42:13: '{' should be on the previous line.",
+            "46:13: '{' should be on the previous line.",
+            "52:9: '{' should be on the previous line.",
+            "54:13: '{' should be on the previous line.",
+            "63:9: '{' should be on the previous line.",
+            "83:5: '{' should be on the previous line.",
+            "89:5: '{' should be on the previous line.",
+            "97:19: '{' should have line break after.",
+            "106:1: '{' should be on the previous line.",
+            "109:9: '{' should be on the previous line.",
+            "118:1: '{' should be on the previous line.",
+            "120:9: '{' should be on the previous line.",
+            "129:1: '{' should be on the previous line.",
+            "131:9: '{' should be on the previous line.",
+            "133:17: '{' should be on the previous line.",
+            "148:1: '{' should be on the previous line.",
+        };
+        verify(mCheckConfig, getPath("InputLeftCurlyOther.java"), expected);
+    }
+
+    @Test
+    public void testNL3() throws Exception
+    {
+        mCheckConfig.addAttribute("option", LeftCurlyOption.NL.toString());
+        final String[] expected = {
+            "26:33: '{' should be on a new line.",
+            "91:19: '{' should be on a new line.",
+            "97:19: '{' should be on a new line.",
+            "142:36: '{' should be on a new line.",
+        };
+        verify(mCheckConfig, getPath("InputLeftCurlyOther.java"), expected);
+    }
+
+    @Test
+    public void testMissingBraces() throws Exception
+    {
+        final String[] expected = {
+            "12:1: '{' should be on the previous line.",
+            "15:5: '{' should be on the previous line.",
+            "21:5: '{' should be on the previous line.",
+            "34:5: '{' should be on the previous line.",
+            "51:5: '{' should be on the previous line.",
+            "69:5: '{' should be on the previous line.",
+            "105:5: '{' should be on the previous line.",
+        };
+        verify(mCheckConfig, getPath("InputBraces.java"), expected);
+    }
+
+    @Test
+    public void testDefaultWithAnnotations() throws Exception
+    {
+        final String[] expected = {
+            "10:1: '{' should be on the previous line.",
+            "14:5: '{' should be on the previous line.",
+            "21:5: '{' should be on the previous line.",
+        };
+        verify(mCheckConfig, getPath("InputLeftCurlyAnnotations.java"), expected);
+    }
+
+    @Test
+    public void testNLWithAnnotations() throws Exception
+    {
+        mCheckConfig.addAttribute("option", LeftCurlyOption.NL.toString());
+        final String[] expected = {
+            "35:34: '{' should be on a new line.",
+            "38:41: '{' should be on a new line.",
+            "44:27: '{' should be on a new line.",
+            "58:32: '{' should be on a new line.",
+        };
+        verify(mCheckConfig, getPath("InputLeftCurlyAnnotations.java"), expected);
+    }
+
+    @Test
+    public void testLineBreakAfter() throws Exception
+    {
+        mCheckConfig.addAttribute("option", LeftCurlyOption.EOL.toString());
+        mCheckConfig.addAttribute("maxLineLength", "100");
+        final String[] expected = {
+            "9:1: '{' should be on the previous line.",
+            "12:5: '{' should be on the previous line.",
+            "16:9: '{' should be on the previous line.",
+            "18:13: '{' should be on the previous line.",
+            "20:17: '{' should be on the previous line.",
+            "26:22: '{' should have line break after.",
+            "28:17: '{' should be on the previous line.",
+            "35:33: '{' should have line break after.",
+            "36:21: '{' should have line break after.",
+            "39:29: '{' should have line break after.",
+            "39:34: '{' should have line break after.",
+            "45:37: '{' should have line break after.",
+            "53:5: '{' should be on the previous line.",
+            "54:19: '{' should have line break after.",
+            "64:1: '{' should be on the previous line.",
+        };
+        verify(mCheckConfig, getPath("InputLeftCurlyLineBreakAfter.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheckTest.java
new file mode 100644
index 0000000..29fc65f
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheckTest.java
@@ -0,0 +1,53 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.blocks;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class NeedBracesCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(NeedBracesCheck.class);
+        final String[] expected = {
+            "29: 'do' construct must use '{}'s." ,
+            "41: 'while' construct must use '{}'s." ,
+            "42: 'while' construct must use '{}'s." ,
+            "44: 'while' construct must use '{}'s." ,
+            "45: 'if' construct must use '{}'s." ,
+            "58: 'for' construct must use '{}'s." ,
+            "59: 'for' construct must use '{}'s." ,
+            "61: 'for' construct must use '{}'s." ,
+            "63: 'if' construct must use '{}'s." ,
+            "82: 'if' construct must use '{}'s." ,
+            "83: 'if' construct must use '{}'s." ,
+            "85: 'if' construct must use '{}'s." ,
+            "87: 'else' construct must use '{}'s." ,
+            "89: 'if' construct must use '{}'s." ,
+            "97: 'else' construct must use '{}'s." ,
+            "99: 'if' construct must use '{}'s." ,
+            "100: 'if' construct must use '{}'s." ,
+        };
+        verify(checkConfig, getPath("InputBraces.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheckTest.java
new file mode 100644
index 0000000..89c448c
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheckTest.java
@@ -0,0 +1,150 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.blocks;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class RightCurlyCheckTest extends BaseCheckTestSupport
+{
+    private DefaultConfiguration mCheckConfig;
+
+    @Before
+    public void setUp()
+    {
+        mCheckConfig = createCheckConfig(RightCurlyCheck.class);
+    }
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        final String[] expected = {
+            "25:17: '}' should be on the same line.",
+            "28:17: '}' should be on the same line.",
+            "40:13: '}' should be on the same line.",
+            "44:13: '}' should be on the same line.",
+            "93:27: '}' should be alone on a line.",
+            "93:27: '}' should be on a new line.",
+            "93:27: '}' should have line break before.",
+            "97:54: '}' should have line break before.",
+        };
+        verify(mCheckConfig, getPath("InputLeftCurlyOther.java"), expected);
+    }
+    @Test
+    public void testSame() throws Exception
+    {
+        mCheckConfig.addAttribute("option", RightCurlyOption.SAME.toString());
+        final String[] expected = {
+            "25:17: '}' should be on the same line.",
+            "28:17: '}' should be on the same line.",
+            "40:13: '}' should be on the same line.",
+            "44:13: '}' should be on the same line.",
+            "93:27: '}' should be alone on a line.",
+            "93:27: '}' should be on a new line.",
+            "93:27: '}' should have line break before.",
+            "97:54: '}' should have line break before.",
+        };
+        verify(mCheckConfig, getPath("InputLeftCurlyOther.java"), expected);
+    }
+
+    @Test
+    public void testAlone() throws Exception
+    {
+        mCheckConfig.addAttribute("option", RightCurlyOption.ALONE.toString());
+        final String[] expected = {
+            "93:27: '}' should be alone on a line.",
+            "93:27: '}' should be on a new line.",
+        };
+        verify(mCheckConfig, getPath("InputLeftCurlyOther.java"), expected);
+    }
+
+    @Test
+    public void testNewLine() throws Exception
+    {
+        mCheckConfig.addAttribute("option", RightCurlyOption.ALONE.toString());
+        mCheckConfig.addAttribute("tokens", "CLASS_DEF, METHOD_DEF, CTOR_DEF");
+        final String[] expected = {
+            "111:10: '}' should be on a new line.",
+            "122:10: '}' should be on a new line.",
+            "136:10: '}' should be on a new line.",
+        };
+        verify(mCheckConfig, getPath("InputLeftCurlyOther.java"), expected);
+    }
+
+    @Test
+    public void testShouldStartLine() throws Exception
+    {
+        mCheckConfig.addAttribute("option", RightCurlyOption.ALONE.toString());
+        mCheckConfig.addAttribute("shouldStartLine", "false");
+        final String[] expected = {
+            "93:27: '}' should be alone on a line.",
+        };
+        verify(mCheckConfig, getPath("InputLeftCurlyOther.java"), expected);
+    }
+
+    @Test
+    public void testMethodCtorNamedClassClosingBrace() throws Exception
+    {
+        mCheckConfig.addAttribute("option", RightCurlyOption.ALONE.toString());
+        mCheckConfig.addAttribute("shouldStartLine", "false");
+        final String[] expected = {
+            "93:27: '}' should be alone on a line.",
+        };
+        verify(mCheckConfig, getPath("InputLeftCurlyOther.java"), expected);
+    }
+
+    @Test
+    public void testForceLineBreakBefore() throws Exception
+    {
+        mCheckConfig.addAttribute("option", RightCurlyOption.ALONE.toString());
+        mCheckConfig.addAttribute("tokens", "LITERAL_FOR,"
+                + "LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT");
+        final String[] expected = {
+            "35:43: '}' should be alone on a line.",
+            "41:71: '}' should be alone on a line.",
+            "46:25: '}' should be alone on a line.",
+        };
+        verify(mCheckConfig, getPath("InputRightCurlyLineBreakBefore.java"), expected);
+    }
+
+    @Test
+    public void testForceLineBreakBefore2() throws Exception
+    {
+        final String[] expected = {
+            "24:33: '}' should have line break before.",
+            "32:44: '}' should have line break before.",
+            "32:63: '}' should have line break before.",
+            "50:48: '}' should have line break before.",
+        };
+        verify(mCheckConfig, getPath("InputRightCurlyLineBreakBefore.java"), expected);
+    }
+
+    @Test
+    public void testNPE() throws Exception
+    {
+        mCheckConfig.addAttribute("option", RightCurlyOption.ALONE.toString());
+        mCheckConfig.addAttribute("tokens", "CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT");
+        final String[] expected = {
+        };
+        verify(mCheckConfig, getPath("InputRightCurlyEmptyAbstractMethod.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ArrayTrailingCommaCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ArrayTrailingCommaCheckTest.java
new file mode 100644
index 0000000..87761d6
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ArrayTrailingCommaCheckTest.java
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class ArrayTrailingCommaCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ArrayTrailingCommaCheck.class);
+        final String[] expected = {
+            "17: Array should contain trailing comma.",
+            "34: Array should contain trailing comma.",
+            "37: Array should contain trailing comma.",
+        };
+        verify(checkConfig, getPath("InputArrayTrailingComma.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/AvoidInlineConditionalsCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/AvoidInlineConditionalsCheckTest.java
new file mode 100644
index 0000000..77e3903
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/AvoidInlineConditionalsCheckTest.java
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class AvoidInlineConditionalsCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(AvoidInlineConditionalsCheck.class);
+        final String[] expected = {
+            "97:29: Avoid inline conditionals.",
+            "98:20: Avoid inline conditionals.",
+            "150:34: Avoid inline conditionals.",
+        };
+        verify(checkConfig, getPath("InputWhitespace.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/CovariantEqualsCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/CovariantEqualsCheckTest.java
new file mode 100644
index 0000000..955da82
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/CovariantEqualsCheckTest.java
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class CovariantEqualsCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(CovariantEqualsCheck.class);
+        final String[] expected = {
+            "11:24: covariant equals without overriding equals(java.lang.Object).",
+            "30:20: covariant equals without overriding equals(java.lang.Object).",
+            "64:20: covariant equals without overriding equals(java.lang.Object).",
+            "78:28: covariant equals without overriding equals(java.lang.Object).",
+        };
+        verify(checkConfig, getPath("InputCovariant.java"), expected);
+    }
+}
+
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/DeclarationOrderCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/DeclarationOrderCheckTest.java
new file mode 100644
index 0000000..bd4bf02
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/DeclarationOrderCheckTest.java
@@ -0,0 +1,123 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class DeclarationOrderCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(DeclarationOrderCheck.class);
+
+        final String[] expected = {
+            "8:5: Variable access definition in wrong order.",
+            "13:5: Variable access definition in wrong order.",
+            "18:5: Variable access definition in wrong order.",
+            "21:5: Variable access definition in wrong order.",
+            "27:5: Static variable definition in wrong order.",
+            "27:5: Variable access definition in wrong order.",
+            "34:9: Variable access definition in wrong order.",
+            "45:9: Static variable definition in wrong order.",
+            "45:9: Variable access definition in wrong order.",
+            "54:5: Constructor definition in wrong order.",
+            "80:5: Instance variable definition in wrong order.",
+
+            "92:9: Variable access definition in wrong order.",
+            "100:9: Static variable definition in wrong order.",
+            "100:9: Variable access definition in wrong order.",
+            "106:5: Variable access definition in wrong order.",
+            "111:5: Variable access definition in wrong order.",
+            "116:5: Variable access definition in wrong order.",
+            "119:5: Variable access definition in wrong order.",
+            "125:5: Static variable definition in wrong order.",
+            "125:5: Variable access definition in wrong order.",
+            "132:9: Variable access definition in wrong order.",
+            "143:9: Static variable definition in wrong order.",
+            "143:9: Variable access definition in wrong order.",
+            "152:5: Constructor definition in wrong order.",
+            "178:5: Instance variable definition in wrong order.",
+        };
+        verify(checkConfig, getPath("coding/InputDeclarationOrder.java"), expected);
+    }
+
+    @Test
+    public void testOnlyConstructors() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(DeclarationOrderCheck.class);
+        checkConfig.addAttribute("ignoreConstructors", "false");
+        checkConfig.addAttribute("ignoreMethods", "true");
+        checkConfig.addAttribute("ignoreModifiers", "true");
+
+        final String[] expected = {
+            "45:9: Static variable definition in wrong order.",
+            "54:5: Constructor definition in wrong order.",
+            "80:5: Instance variable definition in wrong order.",
+            "100:9: Static variable definition in wrong order.",
+            "143:9: Static variable definition in wrong order.",
+            "152:5: Constructor definition in wrong order.",
+            "178:5: Instance variable definition in wrong order.",
+        };
+        verify(checkConfig, getPath("coding/InputDeclarationOrder.java"), expected);
+    }
+
+    @Test
+    public void testOnlyModifiers() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(DeclarationOrderCheck.class);
+        checkConfig.addAttribute("ignoreConstructors", "true");
+        checkConfig.addAttribute("ignoreMethods", "true");
+        checkConfig.addAttribute("ignoreModifiers", "false");
+
+        final String[] expected = {
+            "8:5: Variable access definition in wrong order.",
+            "13:5: Variable access definition in wrong order.",
+            "18:5: Variable access definition in wrong order.",
+            "21:5: Variable access definition in wrong order.",
+            "27:5: Static variable definition in wrong order.",
+            "27:5: Variable access definition in wrong order.",
+            "34:9: Variable access definition in wrong order.",
+            "45:9: Static variable definition in wrong order.",
+            "45:9: Variable access definition in wrong order.",
+            "80:5: Instance variable definition in wrong order.",
+
+            "92:9: Variable access definition in wrong order.",
+            "100:9: Static variable definition in wrong order.",
+            "100:9: Variable access definition in wrong order.",
+            "106:5: Variable access definition in wrong order.",
+            "111:5: Variable access definition in wrong order.",
+            "116:5: Variable access definition in wrong order.",
+            "119:5: Variable access definition in wrong order.",
+            "125:5: Static variable definition in wrong order.",
+            "125:5: Variable access definition in wrong order.",
+            "132:9: Variable access definition in wrong order.",
+            "143:9: Static variable definition in wrong order.",
+            "143:9: Variable access definition in wrong order.",
+            "178:5: Instance variable definition in wrong order.",
+        };
+        verify(checkConfig, getPath("coding/InputDeclarationOrder.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/DefaultComesLastCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/DefaultComesLastCheckTest.java
new file mode 100644
index 0000000..8a11acd
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/DefaultComesLastCheckTest.java
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import java.io.File;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class DefaultComesLastCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(DefaultComesLastCheck.class);
+        final String[] expected = {
+            "24:9: Default should be last label in the switch.",
+        };
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputDefaultComesLast.java"),
+               expected);
+    }
+
+    @Test
+    public void testDefaultMethodsInJava8()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(DefaultComesLastCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig,
+                getPath("coding" + File.separator
+                        + "InputDefaultComesLast2.java"),
+                expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/EmptyStatementCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/EmptyStatementCheckTest.java
new file mode 100644
index 0000000..ff713a1
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/EmptyStatementCheckTest.java
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+
+public class EmptyStatementCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testEmptyStatements()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(EmptyStatementCheck.class);
+        final String[] expected = {
+            "12:7: Empty statement.",
+            "17:7: Empty statement.",
+            "22:19: Empty statement.",
+            "26:10: Empty statement.",
+            "29:16: Empty statement.",
+            "33:10: Empty statement.",
+            "43:10: Empty statement.",
+            "49:13: Empty statement.",
+            "51:13: Empty statement.",
+            "54:19: Empty statement.",
+            "58:10: Empty statement.",
+            "61:9: Empty statement.",
+            "66:10: Empty statement.",
+            "72:10: Empty statement.",
+            "76:10: Empty statement.",
+            "80:10: Empty statement.",
+        };
+
+        verify(checkConfig, getPath("InputEmptyStatement.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsAvoidNullTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsAvoidNullTest.java
new file mode 100644
index 0000000..c1304a7
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsAvoidNullTest.java
@@ -0,0 +1,86 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class EqualsAvoidNullTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testEqualsWithDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(EqualsAvoidNullCheck.class);
+
+        final String[] expected = {
+            "18:17: String literal expressions should be on the left side of an equals comparison.",
+            "20:17: String literal expressions should be on the left side of an equals comparison.",
+            "22:17: String literal expressions should be on the left side of an equals comparison.",
+            "24:17: String literal expressions should be on the left side of an equals comparison.",
+            "26:17: String literal expressions should be on the left side of an equals comparison.",
+            "28:17: String literal expressions should be on the left side of an equals comparison.",
+            "37:27: String literal expressions should be on the left side of an equalsIgnoreCase comparison.",
+            "39:27: String literal expressions should be on the left side of an equalsIgnoreCase comparison.",
+            "41:27: String literal expressions should be on the left side of an equalsIgnoreCase comparison.",
+            "43:27: String literal expressions should be on the left side of an equalsIgnoreCase comparison.",
+            "45:27: String literal expressions should be on the left side of an equalsIgnoreCase comparison.",
+            "47:27: String literal expressions should be on the left side of an equalsIgnoreCase comparison.",
+            "57:17: String literal expressions should be on the left side of an equals comparison.",
+            "59:17: String literal expressions should be on the left side of an equals comparison.",
+            "61:17: String literal expressions should be on the left side of an equals comparison.",
+            "63:17: String literal expressions should be on the left side of an equals comparison.",
+            "65:17: String literal expressions should be on the left side of an equals comparison.",
+            "67:17: String literal expressions should be on the left side of an equals comparison.",
+            "69:27: String literal expressions should be on the left side of an equalsIgnoreCase comparison.",
+            "71:27: String literal expressions should be on the left side of an equalsIgnoreCase comparison.",
+            "73:27: String literal expressions should be on the left side of an equalsIgnoreCase comparison.",
+            "75:27: String literal expressions should be on the left side of an equalsIgnoreCase comparison.",
+            "77:27: String literal expressions should be on the left side of an equalsIgnoreCase comparison.",
+            "79:27: String literal expressions should be on the left side of an equalsIgnoreCase comparison.",
+        };
+        verify(checkConfig, getPath("coding" + File.separator + "InputEqualsAvoidNull.java"), expected);
+    }
+
+    @Test
+    public void testEqualsWithoutEqualsIgnoreCase() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(EqualsAvoidNullCheck.class);
+        checkConfig.addAttribute("ignoreEqualsIgnoreCase", "true");
+
+        final String[] expected = {
+            "18:17: String literal expressions should be on the left side of an equals comparison.",
+            "20:17: String literal expressions should be on the left side of an equals comparison.",
+            "22:17: String literal expressions should be on the left side of an equals comparison.",
+            "24:17: String literal expressions should be on the left side of an equals comparison.",
+            "26:17: String literal expressions should be on the left side of an equals comparison.",
+            "28:17: String literal expressions should be on the left side of an equals comparison.",
+            "57:17: String literal expressions should be on the left side of an equals comparison.",
+            "59:17: String literal expressions should be on the left side of an equals comparison.",
+            "61:17: String literal expressions should be on the left side of an equals comparison.",
+            "63:17: String literal expressions should be on the left side of an equals comparison.",
+            "65:17: String literal expressions should be on the left side of an equals comparison.",
+            "67:17: String literal expressions should be on the left side of an equals comparison.",
+        };
+        verify(checkConfig, getPath("coding" + File.separator + "InputEqualsAvoidNull.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsHashCodeCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsHashCodeCheckTest.java
new file mode 100644
index 0000000..3b6a37d
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/EqualsHashCodeCheckTest.java
@@ -0,0 +1,40 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class EqualsHashCodeCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(EqualsHashCodeCheck.class);
+        final String[] expected = {
+            "126:9: Definition of 'equals()' without corresponding definition of 'hashCode()'.",
+            "163:13: Definition of 'equals()' without corresponding definition of 'hashCode()'.",
+            "191:9: Definition of 'equals()' without corresponding definition of 'hashCode()'.",
+        };
+        verify(checkConfig, getPath("InputSemantic.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ExplicitInitializationCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ExplicitInitializationCheckTest.java
new file mode 100644
index 0000000..c5637b3
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ExplicitInitializationCheckTest.java
@@ -0,0 +1,58 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class ExplicitInitializationCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ExplicitInitializationCheck.class);
+        final String[] expected = {
+            "4:17: Variable 'x' explicitly initialized to '0' (default value for its type).",
+            "5:20: Variable 'bar' explicitly initialized to 'null' (default value for its type).",
+            "9:18: Variable 'y4' explicitly initialized to '0' (default value for its type).",
+            "10:21: Variable 'b1' explicitly initialized to 'false' (default value for its type).",
+            "14:22: Variable 'str1' explicitly initialized to 'null' (default value for its type).",
+            "14:35: Variable 'str3' explicitly initialized to 'null' (default value for its type).",
+            "15:9: Variable 'ar1' explicitly initialized to 'null' (default value for its type).",
+            "18:11: Variable 'f1' explicitly initialized to '0' (default value for its type).",
+            "19:12: Variable 'd1' explicitly initialized to '0' (default value for its type).",
+            "22:17: Variable 'ch1' explicitly initialized to '\\0' (default value for its type).",
+            "23:17: Variable 'ch2' explicitly initialized to '\\0' (default value for its type).",
+            "39:25: Variable 'bar' explicitly initialized to 'null' (default value for its type).",
+            "40:27: Variable 'barArray' explicitly initialized to 'null' (default value for its type).",
+            "47:21: Variable 'x' explicitly initialized to '0' (default value for its type).",
+            "48:29: Variable 'bar' explicitly initialized to 'null' (default value for its type).",
+            "49:31: Variable 'barArray' explicitly initialized to 'null' (default value for its type).",
+            "52:17: Variable 'x' explicitly initialized to '0' (default value for its type).",
+            "53:25: Variable 'bar' explicitly initialized to 'null' (default value for its type).",
+            "54:27: Variable 'barArray' explicitly initialized to 'null' (default value for its type).",
+        };
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputExplicitInit.java"),
+               expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/FallThroughCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/FallThroughCheckTest.java
new file mode 100644
index 0000000..de5eab0
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/FallThroughCheckTest.java
@@ -0,0 +1,117 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class FallThroughCheckTest extends BaseCheckTestSupport
+{
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(FallThroughCheck.class);
+        final String[] expected = {
+            "14:13: Fall through from previous branch of the switch statement.",
+            "38:13: Fall through from previous branch of the switch statement.",
+            "53:13: Fall through from previous branch of the switch statement.",
+            "70:13: Fall through from previous branch of the switch statement.",
+            "87:13: Fall through from previous branch of the switch statement.",
+            "105:13: Fall through from previous branch of the switch statement.",
+            "123:13: Fall through from previous branch of the switch statement.",
+            "369:11: Fall through from previous branch of the switch statement.",
+            "372:11: Fall through from previous branch of the switch statement.",
+            "374:40: Fall through from previous branch of the switch statement.",
+        };
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputFallThrough.java"),
+               expected);
+    }
+
+    @Test
+    public void testLastCaseGroup() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(FallThroughCheck.class);
+        checkConfig.addAttribute("checkLastCaseGroup", "true");
+        final String[] expected = {
+            "14:13: Fall through from previous branch of the switch statement.",
+            "38:13: Fall through from previous branch of the switch statement.",
+            "53:13: Fall through from previous branch of the switch statement.",
+            "70:13: Fall through from previous branch of the switch statement.",
+            "87:13: Fall through from previous branch of the switch statement.",
+            "105:13: Fall through from previous branch of the switch statement.",
+            "123:13: Fall through from previous branch of the switch statement.",
+            "123:13: Fall through from the last branch of the switch statement.",
+            "369:11: Fall through from previous branch of the switch statement.",
+            "372:11: Fall through from previous branch of the switch statement.",
+            "374:40: Fall through from previous branch of the switch statement.",
+            "376:11: Fall through from the last branch of the switch statement.",
+        };
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputFallThrough.java"),
+               expected);
+    }
+
+    @Test
+    public void testOwnPattern() throws Exception
+    {
+        final String ownPattern = "Continue with next case";
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(FallThroughCheck.class);
+        checkConfig.addAttribute("reliefPattern", ownPattern);
+
+        final String[] expected = {
+            "14:13: Fall through from previous branch of the switch statement.",
+            "38:13: Fall through from previous branch of the switch statement.",
+            "53:13: Fall through from previous branch of the switch statement.",
+            "70:13: Fall through from previous branch of the switch statement.",
+            "87:13: Fall through from previous branch of the switch statement.",
+            "105:13: Fall through from previous branch of the switch statement.",
+            "123:13: Fall through from previous branch of the switch statement.",
+            "145:11: Fall through from previous branch of the switch statement.",
+            "170:11: Fall through from previous branch of the switch statement.",
+            "186:11: Fall through from previous branch of the switch statement.",
+            "204:11: Fall through from previous branch of the switch statement.",
+            "222:11: Fall through from previous branch of the switch statement.",
+            "241:11: Fall through from previous branch of the switch statement.",
+            "252:26: Fall through from previous branch of the switch statement.",
+            "266:11: Fall through from previous branch of the switch statement.",
+            "281:11: Fall through from previous branch of the switch statement.",
+            "284:11: Fall through from previous branch of the switch statement.",
+            "288:11: Fall through from previous branch of the switch statement.",
+            "290:25: Fall through from previous branch of the switch statement.",
+            "306:11: Fall through from previous branch of the switch statement.",
+            "309:11: Fall through from previous branch of the switch statement.",
+            "311:25: Fall through from previous branch of the switch statement.",
+            "327:11: Fall through from previous branch of the switch statement.",
+            "330:11: Fall through from previous branch of the switch statement.",
+            "332:23: Fall through from previous branch of the switch statement.",
+            "348:11: Fall through from previous branch of the switch statement.",
+            "351:11: Fall through from previous branch of the switch statement.",
+            "353:30: Fall through from previous branch of the switch statement.",
+        };
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputFallThrough.java"),
+               expected);
+
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheckTest.java
new file mode 100644
index 0000000..a1c3fcf
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheckTest.java
@@ -0,0 +1,72 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class FinalLocalVariableCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(FinalLocalVariableCheck.class);
+
+        final String[] expected = {
+            "9:13: Variable 'i' should be declared final.",
+            "9:16: Variable 'j' should be declared final.",
+            "10:18: Variable 'runnable' should be declared final.",
+            "20:13: Variable 'i' should be declared final.",
+            "24:13: Variable 'z' should be declared final.",
+            "26:16: Variable 'obj' should be declared final.",
+            "30:16: Variable 'x' should be declared final.",
+            "36:18: Variable 'runnable' should be declared final.",
+            "40:21: Variable 'q' should be declared final.",
+            "56:13: Variable 'i' should be declared final.",
+            "60:13: Variable 'z' should be declared final.",
+            "62:16: Variable 'obj' should be declared final.",
+            "66:16: Variable 'x' should be declared final.",
+            "74:21: Variable 'w' should be declared final.",
+            "75:26: Variable 'runnable' should be declared final.",
+            "88:18: Variable 'i' should be declared final.",
+            "96:17: Variable 'weird' should be declared final.",
+            "97:17: Variable 'j' should be declared final.",
+            "98:17: Variable 'k' should be declared final.",
+        };
+        verify(checkConfig, getPath("coding/InputFinalLocalVariable.java"), expected);
+    }
+
+    @Test
+    public void testParameter() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(FinalLocalVariableCheck.class);
+        checkConfig.addAttribute("tokens", "PARAMETER_DEF");
+
+        final String[] expected = {
+            "45:28: Variable 'aArg' should be declared final.",
+            "149:36: Variable '_o' should be declared final.",
+            "154:37: Variable '_o1' should be declared final.",
+        };
+        verify(checkConfig, getPath("coding/InputFinalLocalVariable.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheckTest.java
new file mode 100644
index 0000000..5ceeeed
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/HiddenFieldCheckTest.java
@@ -0,0 +1,294 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class HiddenFieldCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testNoParameters()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HiddenFieldCheck.class);
+        checkConfig.addAttribute("tokens", "VARIABLE_DEF");
+        final String[] expected = {
+            "18:13: 'hidden' hides a field.",
+            "27:13: 'hidden' hides a field.",
+            "32:18: 'hidden' hides a field.",
+            "46:17: 'innerHidden' hides a field.",
+            "55:17: 'innerHidden' hides a field.",
+            "56:17: 'hidden' hides a field.",
+            "61:22: 'innerHidden' hides a field.",
+            "64:22: 'hidden' hides a field.",
+            "76:17: 'innerHidden' hides a field.",
+            "77:17: 'hidden' hides a field.",
+            "82:13: 'hidden' hides a field.",
+            "138:13: 'hidden' hides a field.",
+            "143:13: 'hidden' hides a field.",
+            "148:13: 'hidden' hides a field.",
+            "152:13: 'hidden' hides a field.",
+            "200:17: 'hidden' hides a field.",
+            "217:13: 'hidden' hides a field.",
+            "223:13: 'hiddenStatic' hides a field.",
+        };
+        verify(checkConfig, getPath("InputHiddenField.java"), expected);
+    }
+
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HiddenFieldCheck.class);
+        final String[] expected = {
+            "18:13: 'hidden' hides a field.",
+            "21:33: 'hidden' hides a field.",
+            "27:13: 'hidden' hides a field.",
+            "32:18: 'hidden' hides a field.",
+            "36:33: 'hidden' hides a field.",
+            "46:17: 'innerHidden' hides a field.",
+            "49:26: 'innerHidden' hides a field.",
+            "55:17: 'innerHidden' hides a field.",
+            "56:17: 'hidden' hides a field.",
+            "61:22: 'innerHidden' hides a field.",
+            "64:22: 'hidden' hides a field.",
+            "69:17: 'innerHidden' hides a field.",
+            "70:17: 'hidden' hides a field.",
+            "76:17: 'innerHidden' hides a field.",
+            "77:17: 'hidden' hides a field.",
+            "82:13: 'hidden' hides a field.",
+            "100:29: 'prop' hides a field.",
+            "106:29: 'prop' hides a field.",
+            "112:29: 'prop' hides a field.",
+            "124:28: 'prop' hides a field.",
+            "138:13: 'hidden' hides a field.",
+            "143:13: 'hidden' hides a field.",
+            "148:13: 'hidden' hides a field.",
+            "152:13: 'hidden' hides a field.",
+            "179:23: 'y' hides a field.",
+            "200:17: 'hidden' hides a field.",
+            "210:20: 'hidden' hides a field.",
+            "217:13: 'hidden' hides a field.",
+            "223:13: 'hiddenStatic' hides a field.",
+            "230:41: 'x' hides a field.",
+            "236:30: 'xAxis' hides a field.",
+        };
+        verify(checkConfig, getPath("InputHiddenField.java"), expected);
+    }
+
+    /** tests ignoreFormat property */
+    @Test
+    public void testIgnoreFormat()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HiddenFieldCheck.class);
+        checkConfig.addAttribute("ignoreFormat", "^i.*$");
+        final String[] expected = {
+            "18:13: 'hidden' hides a field.",
+            "21:33: 'hidden' hides a field.",
+            "27:13: 'hidden' hides a field.",
+            "32:18: 'hidden' hides a field.",
+            "36:33: 'hidden' hides a field.",
+            "56:17: 'hidden' hides a field.",
+            "64:22: 'hidden' hides a field.",
+            "70:17: 'hidden' hides a field.",
+            "77:17: 'hidden' hides a field.",
+            "82:13: 'hidden' hides a field.",
+            "100:29: 'prop' hides a field.",
+            "106:29: 'prop' hides a field.",
+            "112:29: 'prop' hides a field.",
+            "124:28: 'prop' hides a field.",
+            "138:13: 'hidden' hides a field.",
+            "143:13: 'hidden' hides a field.",
+            "148:13: 'hidden' hides a field.",
+            "152:13: 'hidden' hides a field.",
+            "179:23: 'y' hides a field.",
+            "200:17: 'hidden' hides a field.",
+            "210:20: 'hidden' hides a field.",
+            "217:13: 'hidden' hides a field.",
+            "223:13: 'hiddenStatic' hides a field.",
+            "230:41: 'x' hides a field.",
+            "236:30: 'xAxis' hides a field.",
+        };
+        verify(checkConfig, getPath("InputHiddenField.java"), expected);
+    }
+
+    /** tests ignoreSetter property */
+    @Test
+    public void testIgnoreSetter()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HiddenFieldCheck.class);
+        checkConfig.addAttribute("ignoreSetter", "true");
+        final String[] expected = {
+            "18:13: 'hidden' hides a field.",
+            "21:33: 'hidden' hides a field.",
+            "27:13: 'hidden' hides a field.",
+            "32:18: 'hidden' hides a field.",
+            "36:33: 'hidden' hides a field.",
+            "46:17: 'innerHidden' hides a field.",
+            "49:26: 'innerHidden' hides a field.",
+            "55:17: 'innerHidden' hides a field.",
+            "56:17: 'hidden' hides a field.",
+            "61:22: 'innerHidden' hides a field.",
+            "64:22: 'hidden' hides a field.",
+            "69:17: 'innerHidden' hides a field.",
+            "70:17: 'hidden' hides a field.",
+            "76:17: 'innerHidden' hides a field.",
+            "77:17: 'hidden' hides a field.",
+            "82:13: 'hidden' hides a field.",
+            "106:29: 'prop' hides a field.",
+            "112:29: 'prop' hides a field.",
+            "124:28: 'prop' hides a field.",
+            "138:13: 'hidden' hides a field.",
+            "143:13: 'hidden' hides a field.",
+            "148:13: 'hidden' hides a field.",
+            "152:13: 'hidden' hides a field.",
+            "179:23: 'y' hides a field.",
+            "200:17: 'hidden' hides a field.",
+            "210:20: 'hidden' hides a field.",
+            "217:13: 'hidden' hides a field.",
+            "223:13: 'hiddenStatic' hides a field.",
+            "230:41: 'x' hides a field.",
+        };
+        verify(checkConfig, getPath("InputHiddenField.java"), expected);
+    }
+
+    /** tests ignoreConstructorParameter property */
+    @Test
+    public void testIgnoreConstructorParameter()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HiddenFieldCheck.class);
+        checkConfig.addAttribute("ignoreConstructorParameter", "true");
+        final String[] expected = {
+            "18:13: 'hidden' hides a field.",
+            "27:13: 'hidden' hides a field.",
+            "32:18: 'hidden' hides a field.",
+            "36:33: 'hidden' hides a field.",
+            "46:17: 'innerHidden' hides a field.",
+            "55:17: 'innerHidden' hides a field.",
+            "56:17: 'hidden' hides a field.",
+            "61:22: 'innerHidden' hides a field.",
+            "64:22: 'hidden' hides a field.",
+            "69:17: 'innerHidden' hides a field.",
+            "70:17: 'hidden' hides a field.",
+            "76:17: 'innerHidden' hides a field.",
+            "77:17: 'hidden' hides a field.",
+            "82:13: 'hidden' hides a field.",
+            "100:29: 'prop' hides a field.",
+            "106:29: 'prop' hides a field.",
+            "112:29: 'prop' hides a field.",
+            "124:28: 'prop' hides a field.",
+            "138:13: 'hidden' hides a field.",
+            "143:13: 'hidden' hides a field.",
+            "148:13: 'hidden' hides a field.",
+            "152:13: 'hidden' hides a field.",
+            "179:23: 'y' hides a field.",
+            "200:17: 'hidden' hides a field.",
+            "217:13: 'hidden' hides a field.",
+            "223:13: 'hiddenStatic' hides a field.",
+            "230:41: 'x' hides a field.",
+            "236:30: 'xAxis' hides a field.",
+        };
+        verify(checkConfig, getPath("InputHiddenField.java"), expected);
+    }
+
+    /** Test against a class with field declarations in different order */
+    @Test
+    public void testReordered()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HiddenFieldCheck.class);
+        final String[] expected = {
+            "18:13: 'hidden' hides a field.",
+            "21:40: 'hidden' hides a field.",
+            "27:13: 'hidden' hides a field.",
+            "32:18: 'hidden' hides a field.",
+            "36:33: 'hidden' hides a field.",
+            "46:17: 'innerHidden' hides a field.",
+            "49:26: 'innerHidden' hides a field.",
+            "55:17: 'innerHidden' hides a field.",
+            "56:17: 'hidden' hides a field.",
+            "61:22: 'innerHidden' hides a field.",
+            "64:22: 'hidden' hides a field.",
+            "69:17: 'innerHidden' hides a field.",
+            "70:17: 'hidden' hides a field.",
+            "76:17: 'innerHidden' hides a field.",
+            "77:17: 'hidden' hides a field.",
+            "83:13: 'hidden' hides a field.",
+            "105:17: 'hidden' hides a field.",
+            "118:21: 'hidden' hides a field.",
+            "125:13: 'hidden' hides a field.",
+            "131:13: 'hiddenStatic' hides a field.",
+        };
+        verify(checkConfig, getPath("InputHiddenFieldReorder.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreAbstractMethods() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HiddenFieldCheck.class);
+        checkConfig.addAttribute("ignoreAbstractMethods", "true");
+
+        final String[] expected = {
+            "18:13: 'hidden' hides a field.",
+            "21:33: 'hidden' hides a field.",
+            "27:13: 'hidden' hides a field.",
+            "32:18: 'hidden' hides a field.",
+            "36:33: 'hidden' hides a field.",
+            "46:17: 'innerHidden' hides a field.",
+            "49:26: 'innerHidden' hides a field.",
+            "55:17: 'innerHidden' hides a field.",
+            "56:17: 'hidden' hides a field.",
+            "61:22: 'innerHidden' hides a field.",
+            "64:22: 'hidden' hides a field.",
+            "69:17: 'innerHidden' hides a field.",
+            "70:17: 'hidden' hides a field.",
+            "76:17: 'innerHidden' hides a field.",
+            "77:17: 'hidden' hides a field.",
+            "82:13: 'hidden' hides a field.",
+            "100:29: 'prop' hides a field.",
+            "106:29: 'prop' hides a field.",
+            "112:29: 'prop' hides a field.",
+            "124:28: 'prop' hides a field.",
+            "138:13: 'hidden' hides a field.",
+            "143:13: 'hidden' hides a field.",
+            "148:13: 'hidden' hides a field.",
+            "152:13: 'hidden' hides a field.",
+            "179:23: 'y' hides a field.",
+            "200:17: 'hidden' hides a field.",
+            "210:20: 'hidden' hides a field.",
+            "217:13: 'hidden' hides a field.",
+            "223:13: 'hiddenStatic' hides a field.",
+            "236:30: 'xAxis' hides a field.",
+        };
+        verify(checkConfig, getPath("InputHiddenField.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalCatchCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalCatchCheckTest.java
new file mode 100644
index 0000000..d96e39f
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalCatchCheckTest.java
@@ -0,0 +1,78 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import java.io.File;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class IllegalCatchCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(IllegalCatchCheck.class);
+
+        String[] expected = {
+            "6:11: Catching 'RuntimeException' is not allowed.",
+            "7:11: Catching 'Exception' is not allowed.",
+            "8:11: Catching 'Throwable' is not allowed.",
+            "14:11: Catching 'java.lang.RuntimeException' is not allowed.",
+            "15:11: Catching 'java.lang.Exception' is not allowed.",
+            "16:11: Catching 'java.lang.Throwable' is not allowed.",
+        };
+
+        verify(checkConfig, getPath("coding" + File.separator + "InputIllegalCatchCheck.java"), expected);
+    }
+
+    @Test
+    public void testIllegalClassNames() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(IllegalCatchCheck.class);
+        checkConfig.addAttribute("illegalClassNames",
+                                 "java.lang.Error, java.lang.Exception, java.lang.Throwable");
+
+        String[] expected = {
+            "7:11: Catching 'Exception' is not allowed.",
+            "8:11: Catching 'Throwable' is not allowed.",
+            "15:11: Catching 'java.lang.Exception' is not allowed.",
+            "16:11: Catching 'java.lang.Throwable' is not allowed.",
+        };
+
+        verify(checkConfig, getPath("coding" + File.separator + "InputIllegalCatchCheck.java"), expected);
+    }
+
+    @Test
+    public void testMultipleTypes() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(IllegalCatchCheck.class);
+
+        String[] expected = {
+            "6:11: Catching 'RuntimeException' is not allowed.",
+            "8:11: Catching 'RuntimeException' is not allowed.",
+            "10:11: Catching 'RuntimeException' is not allowed.",
+            "12:11: Catching 'RuntimeException' is not allowed.",
+        };
+
+        verify(checkConfig, getPath("coding" + File.separator + "InputIllegalCatchCheck2.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheckTest.java
new file mode 100644
index 0000000..3bea98a
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheckTest.java
@@ -0,0 +1,66 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import java.io.File;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class IllegalInstantiationCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(IllegalInstantiationCheck.class);
+        checkConfig.addAttribute(
+            "classes",
+            "java.lang.Boolean,"
+                + "com.puppycrawl.tools.checkstyle.InputModifier,"
+                + "java.io.File,"
+                + "java.awt.Color");
+        final String[] expected = {
+            "19:21: Instantiation of java.lang.Boolean should be avoided.",
+            "24:21: Instantiation of java.lang.Boolean should be avoided.",
+            "31:16: Instantiation of java.lang.Boolean should be avoided.",
+            "38:21: Instantiation of "
+                + "com.puppycrawl.tools.checkstyle.InputModifier "
+                + "should be avoided.",
+            "41:18: Instantiation of java.io.File should be avoided.",
+            "44:21: Instantiation of java.awt.Color should be avoided.",
+        };
+        verify(checkConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testJava8() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(IllegalInstantiationCheck.class);
+        final String[] expected = {};
+        verify(checkConfig,
+                getPath("coding" + File.separator
+                        + "InputIllegalInstantiationCheckTest2.java"),
+                expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalThrowsCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalThrowsCheckTest.java
new file mode 100644
index 0000000..ae54c62
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalThrowsCheckTest.java
@@ -0,0 +1,95 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+import java.io.File;
+
+public class IllegalThrowsCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(IllegalThrowsCheck.class);
+
+        String[] expected = {
+            "9:51: Throwing 'RuntimeException' is not allowed.",
+            "14:45: Throwing 'java.lang.RuntimeException' is not allowed.",
+            "14:73: Throwing 'java.lang.Error' is not allowed.",
+        };
+
+        verify(checkConfig, getPath("coding" + File.separator + "InputIllegalThrowsCheck.java"), expected);
+    }
+
+    @Test
+    public void testIllegalClassNames() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(IllegalThrowsCheck.class);
+        checkConfig.addAttribute("illegalClassNames",
+                                 "java.lang.Error, java.lang.Exception, NullPointerException");
+
+        String[] expected = {
+            "5:33: Throwing 'NullPointerException' is not allowed.",
+            "14:73: Throwing 'java.lang.Error' is not allowed.",
+        };
+
+        verify(checkConfig, getPath("coding" + File.separator + "InputIllegalThrowsCheck.java"), expected);
+    }
+
+    /**
+     * Test to validate the IllegalThrowsCheck with ignoredMethodNames attribute
+     * @throws Exception
+     */
+    @Test
+    public void testIgnoreMethodNames() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(IllegalThrowsCheck.class);
+        checkConfig.addAttribute("ignoredMethodNames", "methodTwo");
+
+        String[] expected = {
+            "9:51: Throwing 'RuntimeException' is not allowed.",
+            "18:35: Throwing 'Throwable' is not allowed.",
+        };
+
+        verify(checkConfig, getPath("coding" + File.separator + "InputIllegalThrowsCheck.java"), expected);
+    }
+
+    /**
+     * Test to validate the IllegalThrowsCheck with both the attributes specified
+     * @throws Exception
+     */
+    @Test
+    public void testIllegalClassNamesWithIgnoreMethodNames() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(IllegalThrowsCheck.class);
+        checkConfig.addAttribute("illegalClassNames",
+                                 "java.lang.Error, java.lang.Exception, NullPointerException, Throwable");
+        checkConfig.addAttribute("ignoredMethodNames", "methodTwo");
+
+        String[] expected = {
+            "5:33: Throwing 'NullPointerException' is not allowed.",
+            "18:35: Throwing 'Throwable' is not allowed.",
+        };
+
+        verify(checkConfig, getPath("coding" + File.separator + "InputIllegalThrowsCheck.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTokenCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTokenCheckTest.java
new file mode 100644
index 0000000..5fb125c
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTokenCheckTest.java
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class IllegalTokenCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(IllegalTokenCheck.class);
+        final String[] expected = {
+            "11:9: Using 'switch' is not allowed.",
+            "14:18: Using '--' is not allowed.",
+            "15:18: Using '++' is not allowed.",
+        };
+        verify(checkConfig, getPath("InputIllegalTokens.java"), expected);
+    }
+
+    @Test
+    public void testNative() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(IllegalTokenCheck.class);
+        checkConfig.addAttribute("tokens", "LITERAL_NATIVE");
+        final String[] expected = {
+            "20:12: Using 'native' is not allowed.",
+        };
+        verify(checkConfig, getPath("InputIllegalTokens.java"), expected);
+    }
+
+}
+
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTokenTextCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTokenTextCheckTest.java
new file mode 100644
index 0000000..33aa16d
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTokenTextCheckTest.java
@@ -0,0 +1,58 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class IllegalTokenTextCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testCaseSensitive()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(IllegalTokenTextCheck.class);
+        checkConfig.addAttribute("tokens", "STRING_LITERAL");
+        checkConfig.addAttribute("format", "a href");
+        final String[] expected = {
+            "24:28: Token text matches the illegal pattern 'a href'.",
+        };
+        verify(checkConfig, getPath("InputIllegalTokens.java"), expected);
+    }
+
+    @Test
+    public void testCaseInSensitive()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(IllegalTokenTextCheck.class);
+        checkConfig.addAttribute("tokens", "STRING_LITERAL");
+        checkConfig.addAttribute("format", "a href");
+        checkConfig.addAttribute("ignoreCase", "true");
+        final String[] expected = {
+            "24:28: Token text matches the illegal pattern 'a href'.",
+            "25:32: Token text matches the illegal pattern 'a href'.",
+        };
+        verify(checkConfig, getPath("InputIllegalTokens.java"), expected);
+    }
+}
+
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheckTest.java
new file mode 100644
index 0000000..0e83e7b
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalTypeCheckTest.java
@@ -0,0 +1,96 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Before;
+import org.junit.Test;
+
+public class IllegalTypeCheckTest extends BaseCheckTestSupport
+{
+    private DefaultConfiguration mCheckConfig;
+
+    @Before
+    public void setUp()
+    {
+        mCheckConfig = createCheckConfig(IllegalTypeCheck.class);
+    }
+
+    @Test
+    public void testDefaults() throws Exception
+    {
+        String[] expected = {
+            "6:13: Declaring variables, return values or parameters of type 'AbstractClass' is not allowed.",
+            "9:13: Declaring variables, return values or parameters of type "
+                + "'com.puppycrawl.tools.checkstyle.coding.InputIllegalType.AbstractClass'"
+                + " is not allowed.",
+            "16:13: Declaring variables, return values or parameters of type 'java.util.Hashtable' is not allowed.",
+            "17:13: Declaring variables, return values or parameters of type 'Hashtable' is not allowed.",
+        };
+
+        verify(mCheckConfig, getPath("coding" + File.separator + "InputIllegalType.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreMethodNames() throws Exception
+    {
+        mCheckConfig.addAttribute("ignoredMethodNames", "table2");
+
+        String[] expected = {
+            "6:13: Declaring variables, return values or parameters of type 'AbstractClass' is not allowed.",
+            "9:13: Declaring variables, return values or parameters of type "
+                + "'com.puppycrawl.tools.checkstyle.coding.InputIllegalType.AbstractClass'"
+                + " is not allowed.",
+            "16:13: Declaring variables, return values or parameters of type 'java.util.Hashtable' is not allowed.",
+        };
+
+        verify(mCheckConfig, getPath("coding" + File.separator + "InputIllegalType.java"), expected);
+    }
+
+    @Test
+    public void testFormat() throws Exception
+    {
+        mCheckConfig.addAttribute("format", "^$");
+
+        String[] expected = {
+            "16:13: Declaring variables, return values or parameters of type 'java.util.Hashtable' is not allowed.",
+            "17:13: Declaring variables, return values or parameters of type 'Hashtable' is not allowed.",
+        };
+
+        verify(mCheckConfig, getPath("coding" + File.separator + "InputIllegalType.java"), expected);
+    }
+
+    @Test
+    public void testLegalAbstractClassNames() throws Exception
+    {
+        mCheckConfig.addAttribute("legalAbstractClassNames", "AbstractClass");
+
+        String[] expected = {
+            "9:13: Declaring variables, return values or parameters of type "
+                + "'com.puppycrawl.tools.checkstyle.coding.InputIllegalType.AbstractClass'"
+                + " is not allowed.",
+            "16:13: Declaring variables, return values or parameters of type 'java.util.Hashtable' is not allowed.",
+            "17:13: Declaring variables, return values or parameters of type 'Hashtable' is not allowed.",
+        };
+
+        verify(mCheckConfig, getPath("coding" + File.separator + "InputIllegalType.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheckTest.java
new file mode 100644
index 0000000..a9297f2
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/InnerAssignmentCheckTest.java
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class InnerAssignmentCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(InnerAssignmentCheck.class);
+        final String[] expected = {
+            "16:15: Inner assignments should be avoided.",
+            "16:19: Inner assignments should be avoided.",
+            "18:39: Inner assignments should be avoided.",
+            "20:35: Inner assignments should be avoided.",
+
+            "38:16: Inner assignments should be avoided.",
+            "39:24: Inner assignments should be avoided.",
+            "40:19: Inner assignments should be avoided.",
+            "41:17: Inner assignments should be avoided.",
+            "42:29: Inner assignments should be avoided.",
+            "43:20: Inner assignments should be avoided.",
+            "44:17: Inner assignments should be avoided.",
+            "44:31: Inner assignments should be avoided.",
+            "44:41: Inner assignments should be avoided.",
+            "45:16: Inner assignments should be avoided.",
+            "45:27: Inner assignments should be avoided.",
+            "46:32: Inner assignments should be avoided.",
+        };
+        verify(checkConfig, getPath("coding" + File.separator + "InputInnerAssignment.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/JUnitTestCaseCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/JUnitTestCaseCheckTest.java
new file mode 100644
index 0000000..030216b
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/JUnitTestCaseCheckTest.java
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class JUnitTestCaseCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(JUnitTestCaseCheck.class);
+
+        String[] expected = {
+            "14:5: The method 'setUp' must be public or protected.",
+            "15:5: The method 'tearDown' shouldn't be static.",
+            "16:5: The method 'suite' must be declared static.",
+            "21:5: The method 'SetUp' should be named 'setUp'.",
+            "22:5: The method 'tearDown' must be declared with a void return type.",
+            "23:5: The method 'suite' must be declared with a junit.framework.Test return type.",
+            "28:5: The method 'setUp' must be declared with no parameters.",
+            "30:5: The method 'suite' must be declared static.",
+            "31:5: The method 'tearDown' must be declared with no parameters.",
+        };
+
+        verify(checkConfig, getPath("coding" + File.separator + "InputJUnitTest.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheckTest.java
new file mode 100644
index 0000000..c204b59
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheckTest.java
@@ -0,0 +1,334 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class MagicNumberCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MagicNumberCheck.class);
+        final String[] expected = {
+            "41:26: '3_000' is a magic number.",
+            "42:32: '1.5_0' is a magic number.",
+            "43:27: '3' is a magic number.",
+            "43:31: '4' is a magic number.",
+            "45:29: '3' is a magic number.",
+            "47:23: '3' is a magic number.",
+            "48:26: '1.5' is a magic number.",
+            "50:22: '3' is a magic number.",
+            "50:29: '5' is a magic number.",
+            "50:37: '3' is a magic number.",
+            "54:26: '3' is a magic number.",
+            "55:39: '3' is a magic number.",
+            "60:25: '010' is a magic number.",
+            "61:25: '011' is a magic number.",
+            "63:30: '0_10L' is a magic number.",
+            "64:30: '011l' is a magic number.",
+            "68:24: '0x10' is a magic number.",
+            "69:24: '0X011' is a magic number.",
+            "71:29: '0x10L' is a magic number.",
+            "72:29: '0X11l' is a magic number.",
+            "85:28: '3' is a magic number.",
+            "92:14: '0xffffffffL' is a magic number.",
+            "100:30: '+3' is a magic number.",
+            "101:29: '-2' is a magic number.",
+            "102:35: '+3.5' is a magic number.",
+            "103:36: '-2.5' is a magic number.",
+            "111:35: '0x80000000' is a magic number.",
+            "112:36: '0x8000000000000000L' is a magic number.",
+            "115:37: '020000000000' is a magic number.",
+            "116:38: '01000000000000000000000L' is a magic number.",
+            "131:20: '378' is a magic number.",
+            "160:16: '31' is a magic number.",
+            "165:16: '42' is a magic number.",
+            "170:16: '13' is a magic number.",
+            "174:15: '21' is a magic number.",
+            "178:15: '37' is a magic number.",
+            "182:15: '101' is a magic number.",
+            "185:26: '42' is a magic number.",
+        };
+        verify(checkConfig, getPath("InputMagicNumber.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreSome()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MagicNumberCheck.class);
+        checkConfig.addAttribute("ignoreNumbers", "0, 1, 3.0, 8, 16, 3000");
+        checkConfig.addAttribute("ignoreAnnotation", "true");
+        final String[] expected = {
+            "22:25: '2' is a magic number.",
+            "28:35: '2' is a magic number.",
+            "30:24: '2' is a magic number.",
+            "32:29: '2.0' is a magic number.",
+            "34:29: '2' is a magic number.",
+            "36:17: '2' is a magic number.",
+            "38:19: '2.0' is a magic number.",
+            "42:32: '1.5_0' is a magic number.",
+            "43:31: '4' is a magic number.",
+            "48:26: '1.5' is a magic number.",
+            "50:29: '5' is a magic number.",
+            "61:25: '011' is a magic number.",
+            "64:30: '011l' is a magic number.",
+            "69:24: '0X011' is a magic number.",
+            "72:29: '0X11l' is a magic number.",
+            "92:14: '0xffffffffL' is a magic number.",
+            "101:29: '-2' is a magic number.",
+            "102:35: '+3.5' is a magic number.",
+            "103:36: '-2.5' is a magic number.",
+            "109:34: '0xffffffff' is a magic number.",
+            "110:36: '0xffffffffffffffffL' is a magic number.",
+            "111:35: '0x80000000' is a magic number.",
+            "112:36: '0x8000000000000000L' is a magic number.",
+            "113:36: '037777777777' is a magic number.",
+            "114:38: '01777777777777777777777L' is a magic number.",
+            "115:37: '020000000000' is a magic number.",
+            "116:38: '01000000000000000000000L' is a magic number.",
+            "131:20: '378' is a magic number.",
+            "160:16: '31' is a magic number.",
+            "165:16: '42' is a magic number.",
+            "170:16: '13' is a magic number.",
+            "174:15: '21' is a magic number.",
+            "178:15: '37' is a magic number.",
+            "182:15: '101' is a magic number.",
+        };
+        verify(checkConfig, getPath("InputMagicNumber.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreNone()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MagicNumberCheck.class);
+        checkConfig.addAttribute("ignoreNumbers", "");
+        checkConfig.addAttribute("ignoreAnnotation", "true");
+        final String[] expected = {
+            "21:24: '1' is a magic number.",
+            "22:25: '2' is a magic number.",
+            "23:26: '0L' is a magic number.",
+            "24:26: '0l' is a magic number.",
+            "25:30: '0D' is a magic number.",
+            "26:30: '0d' is a magic number.",
+            "28:35: '2' is a magic number.",
+            "30:20: '1' is a magic number.",
+            "30:24: '2' is a magic number.",
+            "31:21: '1' is a magic number.",
+            "32:23: '1.0' is a magic number.",
+            "32:29: '2.0' is a magic number.",
+            "34:22: '0' is a magic number.",
+            "34:29: '2' is a magic number.",
+            "36:13: '1' is a magic number.",
+            "36:17: '2' is a magic number.",
+            "38:13: '1.0' is a magic number.",
+            "38:19: '2.0' is a magic number.",
+            "41:26: '3_000' is a magic number.",
+            "42:32: '1.5_0' is a magic number.",
+            "43:27: '3' is a magic number.",
+            "43:31: '4' is a magic number.",
+            "45:29: '3' is a magic number.",
+            "47:23: '3' is a magic number.",
+            "48:26: '1.5' is a magic number.",
+            "50:22: '3' is a magic number.",
+            "50:29: '5' is a magic number.",
+            "50:37: '3' is a magic number.",
+            "54:26: '3' is a magic number.",
+            "55:39: '3' is a magic number.",
+            "59:25: '00' is a magic number.",
+            "60:25: '010' is a magic number.",
+            "61:25: '011' is a magic number.",
+            "63:30: '0_10L' is a magic number.",
+            "64:30: '011l' is a magic number.",
+            "67:23: '0x0' is a magic number.",
+            "68:24: '0x10' is a magic number.",
+            "69:24: '0X011' is a magic number.",
+            "70:28: '0x0L' is a magic number.",
+            "71:29: '0x10L' is a magic number.",
+            "72:29: '0X11l' is a magic number.",
+            "85:28: '3' is a magic number.",
+            "92:14: '0xffffffffL' is a magic number.",
+            "100:30: '+3' is a magic number.",
+            "101:29: '-2' is a magic number.",
+            "102:35: '+3.5' is a magic number.",
+            "103:36: '-2.5' is a magic number.",
+            "109:34: '0xffffffff' is a magic number.",
+            "110:36: '0xffffffffffffffffL' is a magic number.",
+            "111:35: '0x80000000' is a magic number.",
+            "112:36: '0x8000000000000000L' is a magic number.",
+            "113:36: '037777777777' is a magic number.",
+            "114:38: '01777777777777777777777L' is a magic number.",
+            "115:37: '020000000000' is a magic number.",
+            "116:38: '01000000000000000000000L' is a magic number.",
+            "131:20: '378' is a magic number.",
+            "160:16: '31' is a magic number.",
+            "165:16: '42' is a magic number.",
+            "170:16: '13' is a magic number.",
+            "174:15: '21' is a magic number.",
+            "178:15: '37' is a magic number.",
+            "182:15: '101' is a magic number.",
+        };
+        verify(checkConfig, getPath("InputMagicNumber.java"), expected);
+    }
+
+    @Test
+    public void testIntegersOnly()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MagicNumberCheck.class);
+        checkConfig.addAttribute("tokens", "NUM_INT, NUM_LONG");
+        checkConfig.addAttribute("ignoreAnnotation", "true");
+        final String[] expected = {
+            "41:26: '3_000' is a magic number.",
+            "43:27: '3' is a magic number.",
+            "43:31: '4' is a magic number.",
+            "45:29: '3' is a magic number.",
+            "47:23: '3' is a magic number.",
+            "50:22: '3' is a magic number.",
+            "50:29: '5' is a magic number.",
+            "50:37: '3' is a magic number.",
+            "54:26: '3' is a magic number.",
+            "55:39: '3' is a magic number.",
+            "60:25: '010' is a magic number.",
+            "61:25: '011' is a magic number.",
+            "63:30: '0_10L' is a magic number.",
+            "64:30: '011l' is a magic number.",
+            "68:24: '0x10' is a magic number.",
+            "69:24: '0X011' is a magic number.",
+            "71:29: '0x10L' is a magic number.",
+            "72:29: '0X11l' is a magic number.",
+            "85:28: '3' is a magic number.",
+            "92:14: '0xffffffffL' is a magic number.",
+            "100:30: '+3' is a magic number.",
+            "101:29: '-2' is a magic number.",
+            "111:35: '0x80000000' is a magic number.",
+            "112:36: '0x8000000000000000L' is a magic number.",
+            "115:37: '020000000000' is a magic number.",
+            "116:38: '01000000000000000000000L' is a magic number.",
+            "131:20: '378' is a magic number.",
+            "160:16: '31' is a magic number.",
+            "165:16: '42' is a magic number.",
+            "170:16: '13' is a magic number.",
+            "174:15: '21' is a magic number.",
+            "178:15: '37' is a magic number.",
+            "182:15: '101' is a magic number.",
+        };
+        verify(checkConfig, getPath("InputMagicNumber.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreNegativeOctalHex() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MagicNumberCheck.class);
+        checkConfig.addAttribute("ignoreNumbers", "-9223372036854775808, -2147483648, -1, 0, 1, 2");
+        checkConfig.addAttribute("tokens", "NUM_INT, NUM_LONG");
+        checkConfig.addAttribute("ignoreAnnotation", "true");
+        final String[] expected = {
+            "41:26: '3_000' is a magic number.",
+            "43:27: '3' is a magic number.",
+            "43:31: '4' is a magic number.",
+            "45:29: '3' is a magic number.",
+            "47:23: '3' is a magic number.",
+            "50:22: '3' is a magic number.",
+            "50:29: '5' is a magic number.",
+            "50:37: '3' is a magic number.",
+            "54:26: '3' is a magic number.",
+            "55:39: '3' is a magic number.",
+            "60:25: '010' is a magic number.",
+            "61:25: '011' is a magic number.",
+            "63:30: '0_10L' is a magic number.",
+            "64:30: '011l' is a magic number.",
+            "68:24: '0x10' is a magic number.",
+            "69:24: '0X011' is a magic number.",
+            "71:29: '0x10L' is a magic number.",
+            "72:29: '0X11l' is a magic number.",
+            "85:28: '3' is a magic number.",
+            "92:14: '0xffffffffL' is a magic number.",
+            "100:30: '+3' is a magic number.",
+            "101:29: '-2' is a magic number.",
+            "131:20: '378' is a magic number.",
+            "160:16: '31' is a magic number.",
+            "165:16: '42' is a magic number.",
+            "170:16: '13' is a magic number.",
+            "174:15: '21' is a magic number.",
+            "178:15: '37' is a magic number.",
+            "182:15: '101' is a magic number.",
+        };
+        verify(checkConfig, getPath("InputMagicNumber.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreHashCodeMethod() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MagicNumberCheck.class);
+        checkConfig.addAttribute("ignoreHashCodeMethod", "true");
+        checkConfig.addAttribute("ignoreAnnotation", "true");
+        final String[] expected = {
+            "41:26: '3_000' is a magic number.",
+            "42:32: '1.5_0' is a magic number.",
+            "43:27: '3' is a magic number.",
+            "43:31: '4' is a magic number.",
+            "45:29: '3' is a magic number.",
+            "47:23: '3' is a magic number.",
+            "48:26: '1.5' is a magic number.",
+            "50:22: '3' is a magic number.",
+            "50:29: '5' is a magic number.",
+            "50:37: '3' is a magic number.",
+            "54:26: '3' is a magic number.",
+            "55:39: '3' is a magic number.",
+            "60:25: '010' is a magic number.",
+            "61:25: '011' is a magic number.",
+            "63:30: '0_10L' is a magic number.",
+            "64:30: '011l' is a magic number.",
+            "68:24: '0x10' is a magic number.",
+            "69:24: '0X011' is a magic number.",
+            "71:29: '0x10L' is a magic number.",
+            "72:29: '0X11l' is a magic number.",
+            "85:28: '3' is a magic number.",
+            "92:14: '0xffffffffL' is a magic number.",
+            "100:30: '+3' is a magic number.",
+            "101:29: '-2' is a magic number.",
+            "102:35: '+3.5' is a magic number.",
+            "103:36: '-2.5' is a magic number.",
+            "111:35: '0x80000000' is a magic number.",
+            "112:36: '0x8000000000000000L' is a magic number.",
+            "115:37: '020000000000' is a magic number.",
+            "116:38: '01000000000000000000000L' is a magic number.",
+            "131:20: '378' is a magic number.",
+            "165:16: '42' is a magic number.",
+            "170:16: '13' is a magic number.",
+            "174:15: '21' is a magic number.",
+            "178:15: '37' is a magic number.",
+            "182:15: '101' is a magic number.",
+        };
+        verify(checkConfig, getPath("InputMagicNumber.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MissingCtorCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MissingCtorCheckTest.java
new file mode 100644
index 0000000..5b4d6d2
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MissingCtorCheckTest.java
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class MissingCtorCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testMissingSwitchDefault() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+            createCheckConfig(MissingCtorCheck.class);
+
+        final String[] expected = {
+            "3:1: Class should define a constructor.",
+        };
+
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputMissingCtor.java"),
+               expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MissingSwitchDefaultCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MissingSwitchDefaultCheckTest.java
new file mode 100644
index 0000000..fd0fe0a
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MissingSwitchDefaultCheckTest.java
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Before;
+import org.junit.Test;
+
+public class MissingSwitchDefaultCheckTest
+    extends BaseCheckTestSupport
+{
+    private DefaultConfiguration mCheckConfig;
+
+    @Before
+    public void setUp()
+    {
+        mCheckConfig = createCheckConfig(MissingSwitchDefaultCheck.class);
+    }
+
+    @Test
+    public void testMissingSwitchDefault() throws Exception
+    {
+        final String[] expected = {
+            "15:9: switch without \"default\" clause.",
+        };
+        verify(
+            mCheckConfig,
+            getPath("InputMissingSwitchDefault.java"),
+            expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ModifiedControlVariableCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ModifiedControlVariableCheckTest.java
new file mode 100644
index 0000000..b80d0f3
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ModifiedControlVariableCheckTest.java
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class ModifiedControlVariableCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testModifiedControlVariable() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ModifiedControlVariableCheck.class);
+        final String[] expected = {
+            "14:14: Control variable 'i' is modified.",
+            "17:15: Control variable 'i' is modified.",
+            "20:37: Control variable 'i' is modified.",
+            "21:17: Control variable 'i' is modified.",
+            "25:14: Control variable 'j' is modified.",
+            "49:15: Control variable 's' is modified.",
+        };
+        verify(checkConfig, getPath("coding/InputModifiedControl.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleStringLiteralsCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleStringLiteralsCheckTest.java
new file mode 100644
index 0000000..d8c7071
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleStringLiteralsCheckTest.java
@@ -0,0 +1,98 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class MultipleStringLiteralsCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+            createCheckConfig(MultipleStringLiteralsCheck.class);
+        checkConfig.addAttribute("allowedDuplicates", "2");
+        checkConfig.addAttribute("ignoreStringsRegexp", "");
+
+        final String[] expected = {
+            "5:16: The String \"StringContents\" appears 3 times in the file.",
+            "8:17: The String \"\" appears 4 times in the file.",
+            "10:23: The String \", \" appears 3 times in the file.",
+        };
+
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputMultipleStringLiterals.java"),
+               expected);
+    }
+
+    @Test
+    public void testItIgnoreEmpty() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+            createCheckConfig(MultipleStringLiteralsCheck.class);
+        checkConfig.addAttribute("allowedDuplicates", "2");
+
+        final String[] expected = {
+            "5:16: The String \"StringContents\" appears 3 times in the file.",
+            "10:23: The String \", \" appears 3 times in the file.",
+        };
+
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputMultipleStringLiterals.java"),
+               expected);
+    }
+
+    @Test
+    public void testItIgnoreEmptyAndComaSpace() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+            createCheckConfig(MultipleStringLiteralsCheck.class);
+        checkConfig.addAttribute("allowedDuplicates", "2");
+        checkConfig.addAttribute("ignoreStringsRegexp", "^((\"\")|(\", \"))$");
+
+        final String[] expected = {
+            "5:16: The String \"StringContents\" appears 3 times in the file.",
+        };
+
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputMultipleStringLiterals.java"),
+               expected);
+    }
+
+    @Test
+    public void testItWithoutIgnoringAnnotations() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+            createCheckConfig(MultipleStringLiteralsCheck.class);
+        checkConfig.addAttribute("allowedDuplicates", "3");
+        checkConfig.addAttribute("ignoreOccurrenceContext", "");
+
+        final String[] expected = {
+            "19:23: The String \"unchecked\" appears 4 times in the file.",
+        };
+
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputMultipleStringLiterals.java"),
+               expected);
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleVariableDeclarationsCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleVariableDeclarationsCheckTest.java
new file mode 100644
index 0000000..d504f3b
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleVariableDeclarationsCheckTest.java
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+import java.io.File;
+
+public class MultipleVariableDeclarationsCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+            createCheckConfig(MultipleVariableDeclarationsCheck.class);
+
+        final String[] expected = {
+            "3:5: Each variable declaration must be in its own statement.",
+            "4:5: Only one variable definition per line allowed.",
+            "7:9: Each variable declaration must be in its own statement.",
+            "8:9: Only one variable definition per line allowed.",
+            "12:5: Only one variable definition per line allowed.",
+            "15:5: Only one variable definition per line allowed.",
+        };
+
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputMultipleVariableDeclarations.java"),
+               expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedForDepthCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedForDepthCheckTest.java
new file mode 100644
index 0000000..34f866a
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedForDepthCheckTest.java
@@ -0,0 +1,79 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+/**
+ * The unit-test for the <code>NestedForDepthCheck</code>-checkstyle enhancement.
+ * @see com.puppycrawl.tools.checkstyle.checks.coding.NestedForDepthCheck
+ */
+public class NestedForDepthCheckTest extends BaseCheckTestSupport
+{
+    /**
+     * Call the check allowing 2 layers of nested for-statements. This
+     * means the top-level for can contain up to 2 levels of nested for
+     * statements. As the testinput has 4 layers of for-statements below
+     * the top-level for statement, this must cause 2 error-messages.
+     *
+     * @throws Exception necessary to fulfill JUnit's
+     * interface-requirements for test-methods
+     */
+    @Test
+    public void testNestedTooDeep() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(NestedForDepthCheck.class);
+        checkConfig.addAttribute("max", "2");
+
+        final String[] expected = {
+            "43:11: Nested for depth is 3 (max allowed is 2).",
+            "44:13: Nested for depth is 4 (max allowed is 2).",
+        };
+
+        verify(checkConfig, getPath("coding/InputNestedForDepth.java"),
+               expected);
+    }
+
+    /**
+     * Call the check allowing 4 layers of nested for-statements. This
+     * means the top-level for can contain up to 4 levels of nested for
+     * statements. As the testinput has 4 layers of for-statements below
+     * the top-level for statement, this must not cause an
+     * error-message.
+     *
+     * @throws Exception necessary to fulfill JUnit's
+     * interface-requirements for test-methods
+     */
+    @Test
+    public void testNestedOk() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(NestedForDepthCheck.class);
+        checkConfig.addAttribute("max", "4");
+
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("coding/InputNestedForDepth.java"),
+               expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedIfDepthCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedIfDepthCheckTest.java
new file mode 100644
index 0000000..1daebe0
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedIfDepthCheckTest.java
@@ -0,0 +1,54 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class NestedIfDepthCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(NestedIfDepthCheck.class);
+
+        final String[] expected = {
+            "17:17: Nested if-else depth is 2 (max allowed is 1).",
+            "43:17: Nested if-else depth is 2 (max allowed is 1).",
+        };
+
+        verify(checkConfig, getPath("coding/InputNestedIfDepth.java"), expected);
+    }
+    //        checkConfig.addAttribute("max", "2");
+
+    @Test
+    public void testCustomNestingDepth() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(NestedIfDepthCheck.class);
+        checkConfig.addAttribute("max", "2");
+
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("coding/InputNestedIfDepth.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedTryDepthCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedTryDepthCheckTest.java
new file mode 100644
index 0000000..b021122
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedTryDepthCheckTest.java
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class NestedTryDepthCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(NestedTryDepthCheck.class);
+
+        final String[] expected = {
+            "22:17: Nested try depth is 2 (max allowed is 1).",
+            "33:17: Nested try depth is 2 (max allowed is 1).",
+            "34:21: Nested try depth is 3 (max allowed is 1).",
+        };
+
+        verify(checkConfig, getPath("coding/InputNestedTryDepth.java"), expected);
+    }
+
+    @Test
+    public void testCustomNestingDepth() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(NestedTryDepthCheck.class);
+        checkConfig.addAttribute("max", "2");
+
+        final String[] expected = {
+            "34:21: Nested try depth is 3 (max allowed is 2).",
+        };
+
+        verify(checkConfig, getPath("coding/InputNestedTryDepth.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/NoCloneCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/NoCloneCheckTest.java
new file mode 100644
index 0000000..fbd4dbf
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/NoCloneCheckTest.java
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+/**
+ * NoCloneCheck test.
+ */
+public class NoCloneCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testHasClone()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(NoCloneCheck.class);
+        final String[] expected = {
+            "10: Avoid using clone method.",
+            "27: Avoid using clone method.",
+            "35: Avoid using clone method.",
+            "39: Avoid using clone method.",
+            "52: Avoid using clone method.",
+            "60: Avoid using clone method.",
+        };
+        verify(checkConfig, getPath("coding" + File.separator + "InputClone.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/NoFinalizerCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/NoFinalizerCheckTest.java
new file mode 100644
index 0000000..8fad6bd
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/NoFinalizerCheckTest.java
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+/**
+ * NoFinalizerCheck test.
+ *
+ * @author smckay at google.com (Steve McKay)
+ */
+public class NoFinalizerCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testHasFinalizer()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(NoFinalizerCheck.class);
+        final String[] expected = {
+            "5: Avoid using finalizer method.",
+        };
+        verify(checkConfig, getPath("coding/InputHasFinalizer.java"), expected);
+    }
+
+    @Test
+    public void testHasNoFinalizer()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(NoFinalizerCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("coding/InputFallThrough.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/OneStatementPerLineCheckInput.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/OneStatementPerLineCheckInput.java
new file mode 100644
index 0000000..ae9dacc
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/OneStatementPerLineCheckInput.java
@@ -0,0 +1,149 @@
+////////////////////////////////////////////////////////////////////////////////
+//checkstyle: Checks Java source code for adherence to a set of rules.
+//Copyright (C) 2001-2004  Oliver Burn
+//
+//This library is free software; you can redistribute it and/or
+//modify it under the terms of the GNU Lesser General Public
+//License as published by the Free Software Foundation; either
+//version 2.1 of the License, or (at your option) any later version.
+//
+//This library is distributed in the hope that it will be useful,
+//but WITHOUT ANY WARRANTY; without even the implied warranty of
+//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//Lesser General Public License for more details.
+//
+//You should have received a copy of the GNU Lesser General Public
+//License along with this library; if not, write to the Free Software
+//Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+/**
+ * This Class contains no logic, but serves as test-input for the unit tests for the 
+ * <code>OneStatementPerLineCheck</code>-checkstyle enhancement.
+ * @author Alexander Jesse
+ * @see com.puppycrawl.tools.checkstyle.checks.coding.OneStatementPerLineCheck
+ */
+public class OneStatementPerLineCheckInput {
+  /**
+   * Dummy innerclass to test the behaviour in the case of a smalltalk-style
+   * statements (<code>myObject.firstMethod().secondMethod().thirdMethod()</code>).
+   * For this programming style each method must return the obejct itself <code>this</code>.
+   */
+  class SmallTalkStyle {
+    SmallTalkStyle doSomething1() {
+      return this;
+    }
+
+    SmallTalkStyle doSomething2() {
+      return this;
+    }
+
+    SmallTalkStyle doSomething3() {
+      return this;
+    }
+  }
+
+  /**
+   * Dummy variable to work on.
+   */
+  private int one = 0;
+
+  /**
+   * Dummy variable to work on.
+   */
+  private int two = 0;
+
+  /**
+   * Simple legal method
+   */
+  public void doLegal() {
+    one = 1;
+    two = 2;
+  }
+
+  /**
+   * The illegal format is used in a coment. Therefor the whole method is legal.
+   */
+  public void doLegalComment() {
+    one = 1;
+    //one = 1; two = 2;
+    two = 2;
+    /*
+     * one = 1; two = 2;
+     */
+  }
+
+  /**
+   * The illegal format is used within a String. Therefor the whole method is legal.
+   */
+  public void doLegalString() {
+    one = 1;
+    two = 2;
+    System.out.println("one = 1; two = 2");
+  }
+
+  /**
+   * Within the for-header there are 3 Statements, but this is legal.
+   */
+  public void doLegalForLoop() {
+    for (int i = 0; i < 20; i++) {
+      one = i;
+    }
+  }
+
+  /**
+   * Simplest form a an illegal layout.
+   */
+  public void doIllegal() {
+    one = 1; two = 2;
+  }
+
+  
+  /**
+   * Smalltalk-style is considered as one statement.
+   */
+  public void doIllegalSmallTalk() {
+    SmallTalkStyle smalltalker = new SmallTalkStyle();
+    smalltalker.doSomething1().doSomething2().doSomething3();
+  }
+
+  /**
+   * Smalltalk-style is considered as one statement.
+   */
+  public void doIllegalSmallTalk2() {
+    SmallTalkStyle smalltalker = new SmallTalkStyle();
+    smalltalker.doSomething1()
+               .doSomething2()
+               .doSomething3();
+  }
+  
+  /**
+   * While theoretically being distributed over two lines, this is a sample
+   * of 2 statements on one line.
+   */
+  public void doIllegal2() {
+    one = 1
+    ; two = 2;
+  }
+  
+  /**
+   * The StringBuffer is a Java-API-class that permits smalltalk-style concatenation
+   * on the <code>append</code>-method.
+   */
+  public void doStringBuffer() {
+    StringBuffer sb = new StringBuffer();
+    sb.append("test ");
+    sb.append("test2 ").append("test3 ");
+    appendToSpringBuffer(sb, "test4");
+  }
+  
+  /**
+   * indirect stringbuffer-method. Used only internally.
+   * @param sb The stringbuffer we want to append something
+   * @param text The text to append
+   */
+  private void appendToSpringBuffer(StringBuffer sb, String text) {
+    sb.append(text);
+  }
+}
\ No newline at end of file
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/OneStatementPerLineCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/OneStatementPerLineCheckTest.java
new file mode 100644
index 0000000..2815b24
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/OneStatementPerLineCheckTest.java
@@ -0,0 +1,40 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class OneStatementPerLineCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testMultiCaseClass() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(OneStatementPerLineCheck.class);
+        final String[] expected = {
+            "99:18: Only one statement per line allowed.",
+            "127:11: Only one statement per line allowed.",
+        };
+
+        verify(checkConfig,
+            getSrcPath("checks/coding/OneStatementPerLineCheckInput.java"),
+            expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/OverloadMethodsDeclarationOrderCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/OverloadMethodsDeclarationOrderCheckTest.java
new file mode 100644
index 0000000..9cd2b41
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/OverloadMethodsDeclarationOrderCheckTest.java
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class OverloadMethodsDeclarationOrderCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(OverloadMethodsDeclarationOrderCheck.class);
+
+        final String[] expected = {
+            "28: Overload methods should not be split. Previous overloaded method located at line '17'.",
+            "56: Overload methods should not be split. Previous overloaded method located at line '45'.",
+            "68: Overload methods should not be split. Previous overloaded method located at line '66'.",
+            "111: Overload methods should not be split. Previous overloaded method located at line '100'.",
+        };
+        verify(checkConfig, getPath("coding/InputOverloadMethodsDeclarationOrder.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/PackageDeclarationCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/PackageDeclarationCheckTest.java
new file mode 100644
index 0000000..0a71fb2
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/PackageDeclarationCheckTest.java
@@ -0,0 +1,65 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class PackageDeclarationCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(PackageDeclarationCheck.class);
+
+        String[] expected = {
+            "4: Missing package declaration.",
+        };
+
+        verify(checkConfig, getPath("coding" + File.separator + "InputNoPackage.java"), expected);
+    }
+
+    @Test
+    public void testDefault1() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(PackageDeclarationCheck.class);
+        final String dname = "com/puppycrawl/tools/checkstyle/checks/coding"
+            .replace('/', File.separatorChar);
+
+        String[] expected = {
+            "1:9: Package declaration does not match directory '" + dname + "'.",
+        };
+
+        verify(checkConfig, getPath("coding" + File.separator + "InputIllegalCatchCheck.java"), expected);
+    }
+
+    @Test
+    public void testQuiet() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(PackageDeclarationCheck.class);
+        checkConfig.addAttribute("ignoreDirectoryName", "true");
+
+        String[] expected = {
+        };
+
+        verify(checkConfig, getPath("coding" + File.separator + "InputIllegalCatchCheck.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ParameterAssignmentCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ParameterAssignmentCheckTest.java
new file mode 100644
index 0000000..4a7ef1a
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ParameterAssignmentCheckTest.java
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class ParameterAssignmentCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ParameterAssignmentCheck.class);
+        final String[] expected = {
+            "9:15: Assignment of parameter 'field' is not allowed.",
+            "10:15: Assignment of parameter 'field' is not allowed.",
+            "12:14: Assignment of parameter 'field' is not allowed.",
+            "20:30: Assignment of parameter 'field1' is not allowed.",
+        };
+        verify(checkConfig, getPath("coding" + File.separator + "InputParameterAssignment.java"),
+               expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/RedundantThrowsCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/RedundantThrowsCheckTest.java
new file mode 100644
index 0000000..548af1b
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/RedundantThrowsCheckTest.java
@@ -0,0 +1,140 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Before;
+import org.junit.Test;
+
+public class RedundantThrowsCheckTest extends BaseCheckTestSupport
+{
+    private DefaultConfiguration mCheckConfig;
+
+    @Before
+    public void setUp()
+    {
+        mCheckConfig = createCheckConfig(RedundantThrowsCheck.class);
+    }
+
+    @Test
+    public void testDefaults() throws Exception
+    {
+        final String[] expected = {
+            "9:37: Redundant throws: 'java.io.FileNotFoundException' is subclass of 'java.io.IOException'.",
+            "15:16: Redundant throws: 'RuntimeException' is unchecked exception.",
+            "21:29: Redundant throws: 'java.io.IOException' listed more then one time.",
+            "41:27: Redundant throws: 'NullPointerException' is subclass of 'RuntimeException'.",
+            "41:27: Redundant throws: 'NullPointerException' is unchecked exception.",
+            "41:49: Redundant throws: 'RuntimeException' is unchecked exception.",
+        };
+        verify(mCheckConfig, getPath("InputRedundantThrows.java"), expected);
+    }
+
+    @Test
+    public void testAllowUnchecked() throws Exception
+    {
+        mCheckConfig.addAttribute("allowUnchecked", "true");
+        final String[] expected = {
+            "9:37: Redundant throws: 'java.io.FileNotFoundException' is subclass of 'java.io.IOException'.",
+            "21:29: Redundant throws: 'java.io.IOException' listed more then one time.",
+//             "35:27: Unable to get class information for WrongException.",
+            "41:27: Redundant throws: 'NullPointerException' is subclass of 'RuntimeException'.",
+        };
+        verify(mCheckConfig, getPath("InputRedundantThrows.java"), expected);
+    }
+
+    @Test
+    public void testAllowSubclasses() throws Exception
+    {
+        mCheckConfig.addAttribute("allowSubclasses", "true");
+        final String[] expected = {
+            "15:16: Redundant throws: 'RuntimeException' is unchecked exception.",
+            "21:29: Redundant throws: 'java.io.IOException' listed more then one time.",
+            "41:27: Redundant throws: 'NullPointerException' is unchecked exception.",
+            "41:49: Redundant throws: 'RuntimeException' is unchecked exception.",
+        };
+        verify(mCheckConfig, getPath("InputRedundantThrows.java"), expected);
+    }
+
+    @Test
+    public void testRejectDuplicatesOnly() throws Exception
+    {
+        mCheckConfig.addAttribute("allowSubclasses", "true");
+        mCheckConfig.addAttribute("allowUnchecked", "true");
+        final String[] expected = {
+            "21:29: Redundant throws: 'java.io.IOException' listed more then one time.",
+        };
+        verify(mCheckConfig, getPath("InputRedundantThrows.java"), expected);
+    }
+
+    @Test
+    public void test_1168408_1() throws Exception
+    {
+        final String[] expected = {};
+        verify(mCheckConfig, getSrcPath("checks/javadoc/Input_01.java"), expected);
+    }
+
+    @Test
+    public void test_1168408_2() throws Exception
+    {
+        final String[] expected = {};
+        verify(mCheckConfig, getSrcPath("checks/javadoc/Input_02.java"), expected);
+    }
+
+    @Test
+    public void test_1168408_3() throws Exception
+    {
+        final String[] expected = {};
+        verify(mCheckConfig, getSrcPath("checks/javadoc/Input_03.java"), expected);
+    }
+
+    @Test
+    public void test_1220726() throws Exception
+    {
+        final String[] expected = {};
+        verify(mCheckConfig, getSrcPath("checks/javadoc/BadCls.java"), expected);
+    }
+
+    @Test
+    public void test_generics_params() throws Exception
+    {
+        final String[] expected = {
+            "17:34: Redundant throws: 'RE' is unchecked exception.",
+            "25:37: Redundant throws: 'RE' is subclass of 'E'.",
+            "25:37: Redundant throws: 'RE' is unchecked exception.",
+            "33:69: Redundant throws: 'NPE' is subclass of 'RE'.",
+            "33:69: Redundant throws: 'NPE' is unchecked exception.",
+            "33:74: Redundant throws: 'RE' is unchecked exception.",
+            "43:38: Redundant throws: 'RuntimeException' is subclass of 'RE'.",
+            "43:38: Redundant throws: 'RuntimeException' is unchecked exception.",
+            "43:56: Redundant throws: 'RE' is unchecked exception.",
+            "44:13: Redundant throws: 'java.lang.RuntimeException' is unchecked exception.",
+            "44:13: Redundant throws: 'java.lang.RuntimeException' listed more then one time.",
+        };
+        verify(mCheckConfig, getPath("javadoc/TestGenerics.java"), expected);
+    }
+
+    @Test
+    public void test_1379666() throws Exception
+    {
+        final String[] expected = {};
+        verify(mCheckConfig, getSrcPath("checks/javadoc/Input_1379666.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheckTest.java
new file mode 100644
index 0000000..261d7ef
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheckTest.java
@@ -0,0 +1,100 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class RequireThisCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RequireThisCheck.class);
+        final String[] expected = {
+            "8:9: Reference to instance variable 'i' needs \"this.\".",
+            "14:9: Method call to 'method1' needs \"this.\".",
+            "28:9: Reference to instance variable 'i' needs \"this.\".",
+            "46:13: Reference to instance variable 'z' needs \"this.\".",
+            "53:9: Reference to instance variable 'z' needs \"this.\".",
+//              "13:9: Unable find where 'j' is declared.",
+        };
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputRequireThis.java"),
+               expected);
+    }
+
+    @Test
+    public void testMethodsOnly() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RequireThisCheck.class);
+        checkConfig.addAttribute("checkFields", "false");
+        final String[] expected = {
+            "14:9: Method call to 'method1' needs \"this.\".",
+        };
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputRequireThis.java"),
+               expected);
+    }
+
+    @Test
+    public void testFieldsOnly() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RequireThisCheck.class);
+        checkConfig.addAttribute("checkMethods", "false");
+        final String[] expected = {
+            "8:9: Reference to instance variable 'i' needs \"this.\".",
+            "28:9: Reference to instance variable 'i' needs \"this.\".",
+            "46:13: Reference to instance variable 'z' needs \"this.\".",
+            "53:9: Reference to instance variable 'z' needs \"this.\".",
+//              "13:9: Unable find where 'j' is declared.",
+        };
+        verify(checkConfig,
+               getPath("coding" + File.separator + "InputRequireThis.java"),
+               expected);
+    }
+
+    @Test
+    public void testGenerics() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RequireThisCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("Input15Extensions.java"), expected);
+    }
+
+    @Test
+    public void testGithubIssue41() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(RequireThisCheck.class);
+        final String[] expected = {
+            "7:19: Reference to instance variable 'number' needs \"this.\".",
+            "8:16: Method call to 'other' needs \"this.\".",
+        };
+        verify(checkConfig,
+                getPath("coding" + File.separator + "InputRequireThis2.java"),
+                expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheckTest.java
new file mode 100644
index 0000000..a23894d
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheckTest.java
@@ -0,0 +1,53 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class ReturnCountCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ReturnCountCheck.class);
+        final String[] expected = {
+            "18:5: Return count is 7 (max allowed is 2).",
+            "35:17: Return count is 6 (max allowed is 2).",
+        };
+        verify(checkConfig, getPath("coding" + File.separator + "InputReturnCount.java"), expected);
+    }
+
+    @Test
+    public void testFormat() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ReturnCountCheck.class);
+        checkConfig.addAttribute("format", "^$");
+        final String[] expected = {
+            "5:5: Return count is 7 (max allowed is 2).",
+            "18:5: Return count is 7 (max allowed is 2).",
+            "35:17: Return count is 6 (max allowed is 2).",
+        };
+        verify(checkConfig, getPath("coding" + File.separator + "InputReturnCount.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanExpressionCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanExpressionCheckTest.java
new file mode 100644
index 0000000..90fc9af
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanExpressionCheckTest.java
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class SimplifyBooleanExpressionCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(SimplifyBooleanExpressionCheck.class);
+        final String[] expected = {
+            "20:18: Expression can be simplified.",
+            "41:36: Expression can be simplified.",
+            "42:36: Expression can be simplified.",
+            "43:16: Expression can be simplified.",
+            "43:32: Expression can be simplified.",
+        };
+        verify(checkConfig, getPath("InputSimplifyBoolean.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanReturnCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanReturnCheckTest.java
new file mode 100644
index 0000000..6222ebe
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/SimplifyBooleanReturnCheckTest.java
@@ -0,0 +1,39 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class SimplifyBooleanReturnCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(SimplifyBooleanReturnCheck.class);
+        final String[] expected = {
+            "20:9: Conditional logic can be removed.",
+            "33:9: Conditional logic can be removed.",
+        };
+        verify(checkConfig, getPath("InputSimplifyBoolean.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/StringLiteralEqualityCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/StringLiteralEqualityCheckTest.java
new file mode 100644
index 0000000..c8566f2
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/StringLiteralEqualityCheckTest.java
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class StringLiteralEqualityCheckTest
+        extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(StringLiteralEqualityCheck.class);
+        final String[] expected = {
+            "11:18: Literal Strings should be compared using equals(), not '=='.",
+            "16:20: Literal Strings should be compared using equals(), not '=='.",
+            "21:22: Literal Strings should be compared using equals(), not '=='.",
+        };
+        verify(checkConfig, getPath("coding" + File.separator + "InputStringLiteralEquality.java"), expected);
+    }
+}
+
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/SuperCloneCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/SuperCloneCheckTest.java
new file mode 100644
index 0000000..84f7eed
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/SuperCloneCheckTest.java
@@ -0,0 +1,40 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class SuperCloneCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(SuperCloneCheck.class);
+        final String[] expected = {
+            "27:19: Method 'clone' should call 'super.clone'.",
+            "35:19: Method 'clone' should call 'super.clone'.",
+            "60:23: Method 'clone' should call 'super.clone'.",
+        };
+        verify(checkConfig, getPath("coding/InputClone.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/SuperFinalizeCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/SuperFinalizeCheckTest.java
new file mode 100644
index 0000000..719b462
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/SuperFinalizeCheckTest.java
@@ -0,0 +1,39 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class SuperFinalizeCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(SuperFinalizeCheck.class);
+        final String[] expected = {
+            "27:17: Method 'finalize' should call 'super.finalize'.",
+            "34:17: Method 'finalize' should call 'super.finalize'.",
+        };
+        verify(checkConfig, getPath("coding/InputFinalize.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheckTest.java
new file mode 100644
index 0000000..9e4f1de
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheckTest.java
@@ -0,0 +1,99 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+/**
+ * Test fixture for the UnnecessaryParenthesesCheck.
+ *
+ * @author  Eric K. Roe
+ */
+public class UnnecessaryParenthesesCheckTest extends BaseCheckTestSupport
+{
+    private static final String TEST_FILE = "coding" + File.separator
+        + "InputUnnecessaryParentheses.java";
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(UnnecessaryParenthesesCheck.class);
+
+        final String[] expected = {
+            "4:22: Unnecessary parentheses around assignment right-hand side.",
+            "4:29: Unnecessary parentheses around expression.",
+            "4:31: Unnecessary parentheses around identifier 'i'.",
+            "4:46: Unnecessary parentheses around assignment right-hand side.",
+            "5:15: Unnecessary parentheses around assignment right-hand side.",
+            "6:14: Unnecessary parentheses around identifier 'x'.",
+            "6:17: Unnecessary parentheses around assignment right-hand side.",
+            "7:15: Unnecessary parentheses around assignment right-hand side.",
+            "8:14: Unnecessary parentheses around identifier 'x'.",
+            "8:17: Unnecessary parentheses around assignment right-hand side.",
+            "11:22: Unnecessary parentheses around assignment right-hand side.",
+            "11:30: Unnecessary parentheses around identifier 'i'.",
+            "11:46: Unnecessary parentheses around assignment right-hand side.",
+            "15:17: Unnecessary parentheses around literal '0'.",
+            "25:11: Unnecessary parentheses around assignment right-hand side.",
+            "29:11: Unnecessary parentheses around assignment right-hand side.",
+            "31:11: Unnecessary parentheses around assignment right-hand side.",
+            "33:11: Unnecessary parentheses around assignment right-hand side.",
+            "34:16: Unnecessary parentheses around identifier 'a'.",
+            "35:14: Unnecessary parentheses around identifier 'a'.",
+            "35:20: Unnecessary parentheses around identifier 'b'.",
+            "35:26: Unnecessary parentheses around literal '600'.",
+            "35:40: Unnecessary parentheses around literal '12.5f'.",
+            "35:56: Unnecessary parentheses around identifier 'arg2'.",
+            "36:14: Unnecessary parentheses around string \"this\".",
+            "36:25: Unnecessary parentheses around string \"that\".",
+            "37:11: Unnecessary parentheses around assignment right-hand side.",
+            "37:14: Unnecessary parentheses around string \"this is a really, really...\".",
+            "39:16: Unnecessary parentheses around return value.",
+            "43:21: Unnecessary parentheses around literal '1'.",
+            "43:26: Unnecessary parentheses around literal '13.5'.",
+            "44:22: Unnecessary parentheses around literal 'true'.",
+            "45:17: Unnecessary parentheses around identifier 'b'.",
+            "49:17: Unnecessary parentheses around assignment right-hand side.",
+            "51:11: Unnecessary parentheses around assignment right-hand side.",
+            "53:16: Unnecessary parentheses around return value.",
+            "63:13: Unnecessary parentheses around expression.",
+            "67:16: Unnecessary parentheses around expression.",
+            "72:19: Unnecessary parentheses around expression.",
+            "73:23: Unnecessary parentheses around literal '4000'.",
+            "78:19: Unnecessary parentheses around assignment right-hand side.",
+            "80:11: Unnecessary parentheses around assignment right-hand side.",
+            "80:16: Unnecessary parentheses around literal '3'.",
+            "81:27: Unnecessary parentheses around assignment right-hand side.",
+        };
+
+        verify(checkConfig, getPath(TEST_FILE), expected);
+    }
+
+    @Test
+    public void test15Extensions() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(UnnecessaryParenthesesCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("Input15Extensions.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/VariableDeclarationUsageDistanceCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/VariableDeclarationUsageDistanceCheckTest.java
new file mode 100644
index 0000000..a9db2be
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/VariableDeclarationUsageDistanceCheckTest.java
@@ -0,0 +1,217 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import static com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck.MSG_KEY;
+import static com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck.MSG_KEY_EXT;
+
+import static java.text.MessageFormat.format;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class VariableDeclarationUsageDistanceCheckTest extends
+        BaseCheckTestSupport
+{
+    @Test
+    public void testGeneralLogic() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(VariableDeclarationUsageDistanceCheck.class);
+        checkConfig.addAttribute("allowedDistance", "1");
+        checkConfig.addAttribute("ignoreVariablePattern", "");
+        checkConfig.addAttribute("validateBetweenScopes", "true");
+        checkConfig.addAttribute("ignoreFinal", "false");
+        final String[] expected = {
+            "30: " + getCheckMessage(MSG_KEY, "a", 2, 1),
+            "38: " + getCheckMessage(MSG_KEY, "temp", 2, 1),
+            "44: " + getCheckMessage(MSG_KEY, "temp", 2, 1),
+            "57: " + getCheckMessage(MSG_KEY, "count", 2, 1),
+            "71: " + getCheckMessage(MSG_KEY, "count", 4, 1),
+            "96: " + getCheckMessage(MSG_KEY, "arg", 2, 1),
+            "144: " + getCheckMessage(MSG_KEY, "m", 3, 1),
+            "145: " + getCheckMessage(MSG_KEY, "n", 2, 1),
+            "184: " + getCheckMessage(MSG_KEY, "result", 2, 1),
+            "219: " + getCheckMessage(MSG_KEY, "t", 5, 1),
+            "222: " + getCheckMessage(MSG_KEY, "c", 3, 1),
+            "223: " + getCheckMessage(MSG_KEY, "d2", 3, 1),
+            "260: " + getCheckMessage(MSG_KEY, "selected", 2, 1),
+            "261: " + getCheckMessage(MSG_KEY, "model", 2, 1),
+            "287: " + getCheckMessage(MSG_KEY, "sw", 2, 1),
+            "300: " + getCheckMessage(MSG_KEY, "wh", 2, 1),
+            "343: " + getCheckMessage(MSG_KEY, "green", 2, 1),
+            "344: " + getCheckMessage(MSG_KEY, "blue", 3, 1),
+            "367: " + getCheckMessage(MSG_KEY, "intervalMs", 2, 1),
+            "454: " + getCheckMessage(MSG_KEY, "aOpt", 3, 1),
+            "455: " + getCheckMessage(MSG_KEY, "bOpt", 2, 1),
+            "471: " + getCheckMessage(MSG_KEY, "l1", 3, 1),
+            "471: " + getCheckMessage(MSG_KEY, "l2", 2, 1),
+            "479: " + getCheckMessage(MSG_KEY, "myOption", 7, 1),
+            "491: " + getCheckMessage(MSG_KEY, "myOption", 6, 1),
+            "504: " + getCheckMessage(MSG_KEY, "count", 4, 1),
+            "505: " + getCheckMessage(MSG_KEY, "files", 2, 1),
+            "540: " + getCheckMessage(MSG_KEY, "id", 2, 1),
+            "542: " + getCheckMessage(MSG_KEY, "parentId", 3, 1),
+        };
+        verify(checkConfig, getPath("coding/InputVariableDeclarationUsageDistanceCheck.java"), expected);
+    }
+
+    @Test
+    public void testDistance() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(VariableDeclarationUsageDistanceCheck.class);
+        checkConfig.addAttribute("allowedDistance", "3");
+        checkConfig.addAttribute("ignoreVariablePattern", "");
+        checkConfig.addAttribute("validateBetweenScopes", "true");
+        checkConfig.addAttribute("ignoreFinal", "false");
+        final String[] expected = {
+            "71: " + getCheckMessage(MSG_KEY, "count", 4, 3),
+            "219: " + getCheckMessage(MSG_KEY, "t", 5, 3),
+            "479: " + getCheckMessage(MSG_KEY, "myOption", 7, 3),
+            "491: " + getCheckMessage(MSG_KEY, "myOption", 6, 3),
+            "504: " + getCheckMessage(MSG_KEY, "count", 4, 3),
+        };
+        verify(checkConfig, getPath("coding/InputVariableDeclarationUsageDistanceCheck.java"), expected);
+    }
+
+    @Test
+    public void testVariableRegExp() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(VariableDeclarationUsageDistanceCheck.class);
+        checkConfig.addAttribute("allowedDistance", "1");
+        checkConfig.addAttribute("ignoreVariablePattern",
+                "a|b|c|d|block|dist|t|m");
+        checkConfig.addAttribute("validateBetweenScopes", "true");
+        checkConfig.addAttribute("ignoreFinal", "false");
+        final String[] expected = {
+            "38: " + getCheckMessage(MSG_KEY, "temp", 2, 1),
+            "44: " + getCheckMessage(MSG_KEY, "temp", 2, 1),
+            "57: " + getCheckMessage(MSG_KEY, "count", 2, 1),
+            "71: " + getCheckMessage(MSG_KEY, "count", 4, 1),
+            "96: " + getCheckMessage(MSG_KEY, "arg", 2, 1),
+            "145: " + getCheckMessage(MSG_KEY, "n", 2, 1),
+            "184: " + getCheckMessage(MSG_KEY, "result", 2, 1),
+            "223: " + getCheckMessage(MSG_KEY, "d2", 3, 1),
+            "260: " + getCheckMessage(MSG_KEY, "selected", 2, 1),
+            "261: " + getCheckMessage(MSG_KEY, "model", 2, 1),
+            "287: " + getCheckMessage(MSG_KEY, "sw", 2, 1),
+            "300: " + getCheckMessage(MSG_KEY, "wh", 2, 1),
+            "343: " + getCheckMessage(MSG_KEY, "green", 2, 1),
+            "344: " + getCheckMessage(MSG_KEY, "blue", 3, 1),
+            "367: " + getCheckMessage(MSG_KEY, "intervalMs", 2, 1),
+            "454: " + getCheckMessage(MSG_KEY, "aOpt", 3, 1),
+            "455: " + getCheckMessage(MSG_KEY, "bOpt", 2, 1),
+            "471: " + getCheckMessage(MSG_KEY, "l1", 3, 1),
+            "471: " + getCheckMessage(MSG_KEY, "l2", 2, 1),
+            "479: " + getCheckMessage(MSG_KEY, "myOption", 7, 1),
+            "491: " + getCheckMessage(MSG_KEY, "myOption", 6, 1),
+            "504: " + getCheckMessage(MSG_KEY, "count", 4, 1),
+            "505: " + getCheckMessage(MSG_KEY, "files", 2, 1),
+            "540: " + getCheckMessage(MSG_KEY, "id", 2, 1),
+            "542: " + getCheckMessage(MSG_KEY, "parentId", 3, 1),
+        };
+        verify(checkConfig, getPath("coding/InputVariableDeclarationUsageDistanceCheck.java"), expected);
+    }
+
+    @Test
+    public void testValidateBetweenScopesOption() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(VariableDeclarationUsageDistanceCheck.class);
+        checkConfig.addAttribute("allowedDistance", "1");
+        checkConfig.addAttribute("ignoreVariablePattern", "");
+        checkConfig.addAttribute("validateBetweenScopes", "false");
+        checkConfig.addAttribute("ignoreFinal", "false");
+        final String[] expected = {
+            "30: " + getCheckMessage(MSG_KEY, "a", 2, 1),
+            "38: " + getCheckMessage(MSG_KEY, "temp", 2, 1),
+            "44: " + getCheckMessage(MSG_KEY, "temp", 2, 1),
+            "71: " + getCheckMessage(MSG_KEY, "count", 4, 1),
+            "96: " + getCheckMessage(MSG_KEY, "arg", 2, 1),
+            "219: " + getCheckMessage(MSG_KEY, "t", 5, 1),
+            "222: " + getCheckMessage(MSG_KEY, "c", 3, 1),
+            "223: " + getCheckMessage(MSG_KEY, "d2", 3, 1),
+            "300: " + getCheckMessage(MSG_KEY, "wh", 2, 1),
+            "343: " + getCheckMessage(MSG_KEY, "green", 2, 1),
+            "344: " + getCheckMessage(MSG_KEY, "blue", 3, 1),
+            "367: " + getCheckMessage(MSG_KEY, "intervalMs", 2, 1),
+            "454: " + getCheckMessage(MSG_KEY, "aOpt", 3, 1),
+            "455: " + getCheckMessage(MSG_KEY, "bOpt", 2, 1),
+            "471: " + getCheckMessage(MSG_KEY, "l1", 3, 1),
+            "471: " + getCheckMessage(MSG_KEY, "l2", 2, 1),
+            "479: " + getCheckMessage(MSG_KEY, "myOption", 7, 1),
+            "491: Distance between variable 'myOption' declaration and its first usage is 6, but allowed 1.",
+            "505: Distance between variable 'files' declaration and its first usage is 2, but allowed 1.",
+            "540: Distance between variable 'id' declaration and its first usage is 2, but allowed 1.",
+            "542: Distance between variable 'parentId' declaration and its first usage is 4, but allowed 1.",
+        };
+        verify(checkConfig, getPath("coding/InputVariableDeclarationUsageDistanceCheck.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreFinalOption() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(VariableDeclarationUsageDistanceCheck.class);
+        checkConfig.addAttribute("allowedDistance", "1");
+        checkConfig.addAttribute("ignoreVariablePattern", "");
+        checkConfig.addAttribute("validateBetweenScopes", "true");
+        checkConfig.addAttribute("ignoreFinal", "true");
+        final String[] expected = {
+            "30: " + getCheckMessage(MSG_KEY_EXT, "a", 2, 1),
+            "38: " + getCheckMessage(MSG_KEY_EXT, "temp", 2, 1),
+            "44: " + getCheckMessage(MSG_KEY_EXT, "temp", 2, 1),
+            "57: " + getCheckMessage(MSG_KEY_EXT, "count", 2, 1),
+            "71: " + getCheckMessage(MSG_KEY_EXT, "count", 4, 1),
+            "96: " + getCheckMessage(MSG_KEY_EXT, "arg", 2, 1),
+            "144: " + getCheckMessage(MSG_KEY_EXT, "m", 3, 1),
+            "145: " + getCheckMessage(MSG_KEY_EXT, "n", 2, 1),
+            "184: " + getCheckMessage(MSG_KEY_EXT, "result", 2, 1),
+            "219: " + getCheckMessage(MSG_KEY_EXT, "t", 5, 1),
+            "222: " + getCheckMessage(MSG_KEY_EXT, "c", 3, 1),
+            "223: " + getCheckMessage(MSG_KEY_EXT, "d2", 3, 1),
+            "260: " + getCheckMessage(MSG_KEY_EXT, "selected", 2, 1),
+            "261: " + getCheckMessage(MSG_KEY_EXT, "model", 2, 1),
+            "287: " + getCheckMessage(MSG_KEY_EXT, "sw", 2, 1),
+            "300: " + getCheckMessage(MSG_KEY_EXT, "wh", 2, 1),
+            "343: " + getCheckMessage(MSG_KEY_EXT, "green", 2, 1),
+            "344: " + getCheckMessage(MSG_KEY_EXT, "blue", 3, 1),
+            "454: " + getCheckMessage(MSG_KEY_EXT, "aOpt", 3, 1),
+            "455: " + getCheckMessage(MSG_KEY_EXT, "bOpt", 2, 1),
+            "471: " + getCheckMessage(MSG_KEY_EXT, "l1", 3, 1),
+            "471: " + getCheckMessage(MSG_KEY_EXT, "l2", 2, 1),
+            "479: " + getCheckMessage(MSG_KEY_EXT, "myOption", 7, 1),
+            "491: " + getCheckMessage(MSG_KEY_EXT, "myOption", 6, 1),
+            "504: " + getCheckMessage(MSG_KEY_EXT, "count", 4, 1),
+            "505: " + getCheckMessage(MSG_KEY_EXT, "files", 2, 1),
+            "540: " + getCheckMessage(MSG_KEY_EXT, "id", 2, 1),
+            "542: " + getCheckMessage(MSG_KEY_EXT, "parentId", 3, 1),
+        };
+        verify(checkConfig, getPath("coding/InputVariableDeclarationUsageDistanceCheck.java"), expected);
+    }
+
+    /**
+     * Gets the check message 'as is' from appropriate 'messages.properties' file.
+     * @param messageKey the key of message in 'messages.properties' file.
+     * @param arguments the arguments of message in 'messages.properties' file.
+     */
+    public String getCheckMessage(String messageKey, Object ... arguments)
+    {
+        return format(getCheckMessage(messageKey), arguments);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/DesignForExtensionCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/DesignForExtensionCheckTest.java
new file mode 100644
index 0000000..03d95b6
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/DesignForExtensionCheckTest.java
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class DesignForExtensionCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(DesignForExtensionCheck.class);
+        final String[] expected = {
+            "46:5: Method 'doh' is not designed for extension - needs to be abstract, final or empty.",
+            "54:5: Method 'aNativeMethod' is not designed for extension - needs to be abstract, final or empty.",
+        };
+        verify(checkConfig, getPath("InputDesignForExtension.java"), expected);
+
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheckTest.java
new file mode 100644
index 0000000..5f6201e
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/FinalClassCheckTest.java
@@ -0,0 +1,40 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class FinalClassCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testFianlClass() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(FinalClassCheck.class);
+        final String[] expected = {
+            "7: Class InputFinalClass should be declared as final.",
+            "15: Class test4 should be declared as final.",
+            "109: Class someinnerClass should be declared as final.",
+        };
+        verify(checkConfig, getPath("InputFinalClass.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheckTest.java
new file mode 100644
index 0000000..2626473
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/HideUtilityClassConstructorCheckTest.java
@@ -0,0 +1,102 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class HideUtilityClassConstructorCheckTest
+    extends BaseCheckTestSupport
+{
+    /** only static methods and no constructor - default ctor is visible */
+    @Test
+    public void testUtilClass() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HideUtilityClassConstructorCheck.class);
+        final String[] expected = {
+            "11:1: Utility classes should not have a public or default constructor.",
+        };
+        verify(checkConfig, getPath("InputArrayTypeStyle.java"), expected);
+    }
+
+    /** nonstatic methods - always OK */
+    @Test
+    public void testNonUtilClass() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HideUtilityClassConstructorCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputDesignForExtension.java"), expected);
+    }
+
+    @Test
+    public void testDerivedNonUtilClass() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HideUtilityClassConstructorCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("design" + File.separator + "InputNonUtilityClass.java"), expected);
+    }
+
+    @Test
+    public void testOnlyNonstaticFieldNonUtilClass() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HideUtilityClassConstructorCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("design" + File.separator + "InputRegression1762702.java"), expected);
+    }
+
+    @Test
+    public void testEmptyAbstractClass() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HideUtilityClassConstructorCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("design" + File.separator + "HideUtilityClassContructor3041574_1.java"), expected);
+    }
+
+    @Test
+    public void testEmptyClassWithOnlyPrivateFields() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HideUtilityClassConstructorCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("design" + File.separator + "HideUtilityClassContructor3041574_2.java"), expected);
+    }
+
+    @Test
+    public void testClassWithStaticInnerClass() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HideUtilityClassConstructorCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("design" + File.separator + "HideUtilityClassContructor3041574_3.java"), expected);
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/InnerTypeLastCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/InnerTypeLastCheckTest.java
new file mode 100644
index 0000000..895317f
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/InnerTypeLastCheckTest.java
@@ -0,0 +1,49 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class InnerTypeLastCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testMembersBeforeInner() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(InnerTypeLastCheck.class);
+        final String[] expected = {
+            "15:17: Fields and methods should be before inner classes.",
+            "25:17: Fields and methods should be before inner classes.",
+            "26:17: Fields and methods should be before inner classes.",
+            "39:25: Fields and methods should be before inner classes.",
+            "40:25: Fields and methods should be before inner classes.",
+            "44:9: Fields and methods should be before inner classes.",
+            "60:25: Fields and methods should be before inner classes.",
+            "61:25: Fields and methods should be before inner classes.",
+            "65:9: Fields and methods should be before inner classes.",
+            "69:9: Fields and methods should be before inner classes.",
+            "78:5: Fields and methods should be before inner classes.",
+        };
+        verify(checkConfig, getPath("design" + File.separator
+                                    + "InputInnerClassCheck.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/InterfaceIsTypeCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/InterfaceIsTypeCheckTest.java
new file mode 100644
index 0000000..9310bf6
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/InterfaceIsTypeCheckTest.java
@@ -0,0 +1,54 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class InterfaceIsTypeCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(InterfaceIsTypeCheck.class);
+        final String[] expected = {
+            "25: interfaces should describe a type and hence have methods.",
+        };
+        verify(checkConfig, getPath("InputInterfaceIsType.java"), expected);
+    }
+
+    @Test
+    public void testAllowMarker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(InterfaceIsTypeCheck.class);
+        checkConfig.addAttribute("allowMarkerInterfaces", "false");
+        final String[] expected = {
+            "20: interfaces should describe a type and hence have methods.",
+            "25: interfaces should describe a type and hence have methods.",
+        };
+        verify(checkConfig, getPath("InputInterfaceIsType.java"), expected);
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/MutableExceptionCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/MutableExceptionCheckTest.java
new file mode 100644
index 0000000..ef63ded
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/MutableExceptionCheckTest.java
@@ -0,0 +1,40 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class MutableExceptionCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void test() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(MutableExceptionCheck.class);
+
+        String[] expected = {
+            "6:9: The field '_errorCode' must be declared final.",
+            "23:9: The field '_errorCode' must be declared final.",
+        };
+
+        verify(checkConfig, getPath("design" + File.separator + "InputMutableException.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/OneTopLevelClassCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/OneTopLevelClassCheckTest.java
new file mode 100644
index 0000000..5326d49
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/OneTopLevelClassCheckTest.java
@@ -0,0 +1,66 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import java.io.File;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class OneTopLevelClassCheckTest extends BaseCheckTestSupport
+{
+
+    @Test
+    public void testFileWithOneTopLevelClass() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(OneTopLevelClassCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("design" + File.separator + "InputOneTopLevelClass.java"), expected);
+    }
+
+    @Test
+    public void testFileWithFewTopLevelClasses() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(OneTopLevelClassCheck.class);
+        final String[] expected = {
+            "25: Top-level class NoSuperClone has to reside in its own source file.",
+            "33: Top-level class InnerClone has to reside in its own source file.",
+            "50: Top-level class CloneWithTypeArguments has to reside in its own source file.",
+            "58: Top-level class CloneWithTypeArgumentsAndNoSuper has to reside in its own source file.",
+            "67: Top-level class MyClassWithGenericSuperMethod has to reside in its own source file.",
+            "84: Top-level class AnotherClass has to reside in its own source file.",
+        };
+        verify(checkConfig, getPath("coding" + File.separator + "InputClone.java"), expected);
+    }
+
+    @Test
+    public void testFileWithSecondEnumTopLevelClass() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(OneTopLevelClassCheck.class);
+        final String[] expected = {
+            "83: Top-level class InputDeclarationOrderEnum has to reside in its own source file.",
+        };
+        verify(checkConfig, getPath("coding" + File.separator + "InputDeclarationOrder.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/ThrowsCountCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/ThrowsCountCheckTest.java
new file mode 100644
index 0000000..f57d9bb
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/ThrowsCountCheckTest.java
@@ -0,0 +1,54 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class ThrowsCountCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(ThrowsCountCheck.class);
+
+        String[] expected = {
+            "14:20: Throws count is 2 (max allowed is 1).",
+            "18:20: Throws count is 2 (max allowed is 1).",
+            "22:20: Throws count is 3 (max allowed is 1).",
+        };
+
+        verify(checkConfig, getPath("design" + File.separator + "InputThrowsCount.java"), expected);
+    }
+
+    @Test
+    public void testMax() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(ThrowsCountCheck.class);
+        checkConfig.addAttribute("max", "2");
+
+        String[] expected = {
+            "22:20: Throws count is 3 (max allowed is 2).",
+        };
+
+        verify(checkConfig, getPath("design" + File.separator + "InputThrowsCount.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/VisibilityModifierCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/VisibilityModifierCheckTest.java
new file mode 100644
index 0000000..7ac447a
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/VisibilityModifierCheckTest.java
@@ -0,0 +1,92 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.Checker;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class VisibilityModifierCheckTest
+    extends BaseCheckTestSupport
+{
+    private Checker getChecker() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(VisibilityModifierCheck.class);
+        checkConfig.addAttribute("publicMemberPattern", "^f[A-Z][a-zA-Z0-9]*$");
+        return createChecker(checkConfig);
+    }
+
+    @Test
+    public void testInner()
+        throws Exception
+    {
+        final String[] expected = {
+            "30:24: Variable 'rData' must be private and have accessor methods.",
+            "33:27: Variable 'protectedVariable' must be private and have accessor methods.",
+            "36:17: Variable 'packageVariable' must be private and have accessor methods.",
+            "41:29: Variable 'sWeird' must be private and have accessor methods.",
+            "43:19: Variable 'sWeird2' must be private and have accessor methods.",
+            "77:20: Variable 'someValue' must be private and have accessor methods.",
+        };
+        verify(getChecker(), getPath("InputInner.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreAccess()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(VisibilityModifierCheck.class);
+        checkConfig.addAttribute("publicMemberPattern", "^r[A-Z]");
+        checkConfig.addAttribute("protectedAllowed", "true");
+        checkConfig.addAttribute("packageAllowed", "true");
+        final String[] expected = {
+            "17:20: Variable 'fData' must be private and have accessor methods.",
+            "77:20: Variable 'someValue' must be private and have accessor methods.",
+        };
+        verify(checkConfig, getPath("InputInner.java"), expected);
+    }
+
+    @Test
+    public void testSimple() throws Exception
+    {
+        final String[] expected = {
+            "39:19: Variable 'mNumCreated2' must be private and have accessor methods.",
+            "49:23: Variable 'sTest1' must be private and have accessor methods.",
+            "51:26: Variable 'sTest3' must be private and have accessor methods.",
+            "53:16: Variable 'sTest2' must be private and have accessor methods.",
+            "56:9: Variable 'mTest1' must be private and have accessor methods.",
+            "58:16: Variable 'mTest2' must be private and have accessor methods.",
+        };
+        verify(getChecker(), getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testStrictJavadoc() throws Exception
+    {
+        final String[] expected = {
+            "44:9: Variable 'mLen' must be private and have accessor methods.",
+            "45:19: Variable 'mDeer' must be private and have accessor methods.",
+            "46:16: Variable 'aFreddo' must be private and have accessor methods.",
+        };
+        verify(getChecker(), getPath("InputPublicOnly.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/duplicates/StrictDuplicateCodeCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/duplicates/StrictDuplicateCodeCheckTest.java
new file mode 100644
index 0000000..0c4105e
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/duplicates/StrictDuplicateCodeCheckTest.java
@@ -0,0 +1,106 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.duplicates;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.Checker;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import java.io.File;
+import org.junit.Test;
+
+public class StrictDuplicateCodeCheckTest extends BaseCheckTestSupport
+{
+
+    @Override
+    protected DefaultConfiguration createCheckerConfig(
+            Configuration aCheckConfig)
+    {
+        final DefaultConfiguration dc = new DefaultConfiguration("root");
+        dc.addChild(aCheckConfig);
+        return dc;
+    }
+
+    @Test
+    public void testDefaultSettings() throws Exception
+    {
+        final Configuration checkConfig = createCheckConfig(StrictDuplicateCodeCheck.class);
+        final String innerDupPath = getPath("duplicates/InnerDup.java");
+        final String[] expected = {
+            "6: Found duplicate of 13 lines in " + innerDupPath + ", starting from line 22",
+        };
+        final File[] checkedFiles = new File[] {
+            new File(innerDupPath),
+            new File(getPath("duplicates/Shorty.java")),
+        };
+        verify(createChecker(checkConfig), checkedFiles, innerDupPath, expected);
+    }
+
+    @Test
+    public void testSmallMin() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(StrictDuplicateCodeCheck.class);
+        checkConfig.addAttribute("min", "3");
+        final String aPath = getPath("duplicates/A.java");
+        final String bPath = getPath("duplicates/B.java");
+        final String[] expected = {
+            // imports should not be marked because developer cannot avoid them
+            // same constant def should not be marked because order is important for this check
+        };
+        final File[] checkedFiles = new File[] {
+            new File(aPath),
+            new File(bPath),
+        };
+        verify(createChecker(checkConfig), checkedFiles, aPath, expected);
+    }
+
+    @Test
+    public void testOverlapping() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(StrictDuplicateCodeCheck.class);
+        checkConfig.addAttribute("min", "3");
+        final String path = getPath("duplicates/Overlapping.java");
+        final String[] expected = {
+            "6: Found duplicate of 3 lines in " + path + ", starting from line 13",
+            "6: Found duplicate of 5 lines in " + path + ", starting from line 25",
+            "7: Found duplicate of 5 lines in " + path + ", starting from line 19",
+            "13: Found duplicate of 3 lines in " + path + ", starting from line 25",
+            "19: Found duplicate of 4 lines in " + path + ", starting from line 26",
+        };
+        final File[] checkedFiles = new File[] {
+            new File(path),
+        };
+        final Checker checker = createChecker(checkConfig);
+        verify(checker, checkedFiles, path, expected);
+    }
+
+    @Test
+    public void testWhitespaceIsIgnored() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(StrictDuplicateCodeCheck.class);
+        final String path = getPath("duplicates/LotsOfEmptyLines.java");
+        final String[] expected = {
+        };
+        final File[] checkedFiles = new File[] {
+            new File(path),
+        };
+        final Checker checker = createChecker(checkConfig);
+        verify(checker, checkedFiles, path, expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/header/HeaderCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/header/HeaderCheckTest.java
new file mode 100644
index 0000000..c3ac685
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/header/HeaderCheckTest.java
@@ -0,0 +1,244 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.header;
+
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.net.URI;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseFileSetCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+
+public class HeaderCheckTest extends BaseFileSetCheckTestSupport
+{
+    @Test
+    public void testStaticHeader() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HeaderCheck.class);
+        checkConfig.addAttribute("headerFile", getPath("java.header"));
+        checkConfig.addAttribute("ignoreLines", "");
+        final String[] expected = {
+            "1: Missing a header - not enough lines in file.",
+        };
+        verify(checkConfig, getPath("inputHeader.java"), expected);
+    }
+
+    @Test
+    public void testRegexpHeader() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpHeaderCheck.class);
+        checkConfig.addAttribute("headerFile", getPath("regexp.header"));
+        final String[] expected = {
+            "3: Line does not match expected header line of '// Created: 2002'.",
+        };
+        verify(checkConfig, getPath("InputScopeAnonInner.java"), expected);
+    }
+
+    @Test
+    public void testRegexpHeaderURL() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpHeaderCheck.class);
+        URI uri = (new File(getPath("regexp.header"))).toURI();
+        checkConfig.addAttribute("headerFile", uri.toString());
+        final String[] expected = {
+            "3: Line does not match expected header line of '// Created: 2002'.",
+        };
+        verify(checkConfig, getPath("InputScopeAnonInner.java"), expected);
+    }
+
+    @Test
+    public void testInlineRegexpHeader() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpHeaderCheck.class);
+        checkConfig.addAttribute("header", "^/*$\\n// .*\\n// Created: 2002\\n^//.*\\n^//.*");
+        final String[] expected = {
+            "3: Line does not match expected header line of '// Created: 2002'.",
+        };
+        verify(checkConfig, getPath("InputScopeAnonInner.java"), expected);
+    }
+
+    @Test
+    public void testFailureForMultilineRegexp() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpHeaderCheck.class);
+        checkConfig.addAttribute("header", "^(.*\\n.*)");
+        try {
+            createChecker(checkConfig);
+            fail("Checker creation should not succeed when regexp spans multiple lines");
+        }
+        catch (CheckstyleException ex) {
+            // expected exception
+        }
+    }
+
+    @Test
+    public void testRegexpHeaderIgnore() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpHeaderCheck.class);
+        checkConfig.addAttribute("headerFile", getPath("regexp.header1"));
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputScopeAnonInner.java"), expected);
+    }
+
+    @Test
+    public void testRegexpHeaderMulti1() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpHeaderCheck.class);
+        checkConfig.addAttribute("headerFile", getPath("regexp.header2"));
+        checkConfig.addAttribute("multiLines", "3, 6");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputRegexpHeader1.java"), expected);
+    }
+
+    @Test
+    public void testRegexpHeaderMulti2() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpHeaderCheck.class);
+        checkConfig.addAttribute("headerFile", getPath("regexp.header2"));
+        checkConfig.addAttribute("multiLines", "3, 6");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputRegexpHeader2.java"), expected);
+    }
+
+    @Test
+    public void testRegexpHeaderMulti3() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpHeaderCheck.class);
+        checkConfig.addAttribute("headerFile", getPath("regexp.header2"));
+        checkConfig.addAttribute("multiLines", "3, 7");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputRegexpHeader1.java"), expected);
+    }
+
+    @Test
+    public void testRegexpHeaderMulti4() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpHeaderCheck.class);
+        checkConfig.addAttribute("headerFile", getPath("regexp.header2"));
+        checkConfig.addAttribute("multiLines", "3, 5, 6, 7");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputRegexpHeader3.java"), expected);
+    }
+
+    @Test
+    public void testRegexpHeaderMulti5() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpHeaderCheck.class);
+        checkConfig.addAttribute("headerFile", getPath("regexp.header2"));
+        checkConfig.addAttribute("multiLines", "3");
+        final String[] expected = {
+            "1: Missing a header - not enough lines in file.",
+        };
+        verify(checkConfig, getPath("InputRegexpHeader4.java"), expected);
+    }
+
+    @Test
+    public void testRegexpHeaderSmallHeader() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RegexpHeaderCheck.class);
+        checkConfig.addAttribute("headerFile", getPath("regexp.header2"));
+        checkConfig.addAttribute("multiLines", "3, 6");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputRegexpSmallHeader.java"), expected);
+    }
+
+    @Test
+    public void testNoHeader()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HeaderCheck.class);
+        // No header file specified
+        try {
+            createChecker(checkConfig);
+            fail();
+        }
+        catch (CheckstyleException ex) {
+            // expected exception
+        }
+    }
+
+    @Test
+    public void testNonExistingHeaderFile() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HeaderCheck.class);
+        checkConfig.addAttribute("headerFile", getPath("nonexisting.file"));
+        try {
+            createChecker(checkConfig);
+            fail();
+        }
+        catch (CheckstyleException ex) {
+            // expected exception
+        }
+    }
+
+    @Test
+    public void testInvalidCharset() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HeaderCheck.class);
+        checkConfig.addAttribute("headerFile", getPath("java.header"));
+        checkConfig.addAttribute("charset", "XSO-8859-1");
+        try {
+            createChecker(checkConfig);
+            fail();
+        }
+        catch (CheckstyleException ex) {
+            // expected exception
+        }
+    }
+
+    @Test
+    public void testEmptyFilename() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(HeaderCheck.class);
+        checkConfig.addAttribute("headerFile", "");
+        try {
+            createChecker(checkConfig);
+            fail("Checker creation should not succeed with invalid headerFile");
+        }
+        catch (CheckstyleException ex) {
+            // expected exception
+        }
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStarImportTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStarImportTest.java
new file mode 100644
index 0000000..75b1a54
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStarImportTest.java
@@ -0,0 +1,76 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class AvoidStarImportTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefaultOperation()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(AvoidStarImportCheck.class);
+        final String[] expected = {
+            "7: Using the '.*' form of import should be avoided - com.puppycrawl.tools.checkstyle.imports.*.",
+            "9: Using the '.*' form of import should be avoided - java.io.*.",
+            "10: Using the '.*' form of import should be avoided - java.lang.*.",
+            "25: Using the '.*' form of import should be avoided - javax.swing.WindowConstants.*.",
+            "26: Using the '.*' form of import should be avoided - javax.swing.WindowConstants.*.",
+            "28: Using the '.*' form of import should be avoided - sun.net.ftpclient.FtpClient.*.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator + "InputImport.java"), expected);
+    }
+
+    @Test
+    public void testExcludes()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(AvoidStarImportCheck.class);
+        checkConfig.addAttribute("excludes",
+            "java.io,java.lang,javax.swing.WindowConstants.*, javax.swing.WindowConstants");
+        // allow the java.io/java.lang,javax.swing.WindowConstants star imports
+        final String[] expected2 = new String[] {
+            "7: Using the '.*' form of import should be avoided - com.puppycrawl.tools.checkstyle.imports.*.",
+            "28: Using the '.*' form of import should be avoided - sun.net.ftpclient.FtpClient.*.",
+        };
+        verify(checkConfig, getPath("imports" + File.separator + "InputImport.java"), expected2);
+    }
+
+    @Test
+    public void testAllowClassImports() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(AvoidStarImportCheck.class);
+        checkConfig.addAttribute("allowClassImports", "true");
+        // allow all class star imports
+        final String[] expected2 = new String[] {
+            "25: Using the '.*' form of import should be avoided - javax.swing.WindowConstants.*.",
+            "26: Using the '.*' form of import should be avoided - javax.swing.WindowConstants.*.",
+            "28: Using the '.*' form of import should be avoided - sun.net.ftpclient.FtpClient.*.", };
+        verify(checkConfig, getPath("imports" + File.separator
+            + "InputImport.java"), expected2);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStaticImportTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStaticImportTest.java
new file mode 100644
index 0000000..6df1449
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStaticImportTest.java
@@ -0,0 +1,98 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class AvoidStaticImportTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefaultOperation()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(AvoidStaticImportCheck.class);
+        final String[] expected = {
+            "23: Using a static member import should be avoided - java.io.File.listRoots.",
+            "25: Using a static member import should be avoided - javax.swing.WindowConstants.*.",
+            "26: Using a static member import should be avoided - javax.swing.WindowConstants.*.",
+            "27: Using a static member import should be avoided - java.io.File.createTempFile.",
+            "28: Using a static member import should be avoided - sun.net.ftpclient.FtpClient.*.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator + "InputImport.java"), expected);
+    }
+
+    @Test
+    public void testStarExcludes()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(AvoidStaticImportCheck.class);
+        checkConfig.addAttribute("excludes", "java.io.File.*,sun.net.ftpclient.FtpClient.*");
+        // allow the java.io.File.*/sun.net.ftpclient.FtpClient.* star imports
+        final String[] expected = {
+            "25: Using a static member import should be avoided - javax.swing.WindowConstants.*.",
+            "26: Using a static member import should be avoided - javax.swing.WindowConstants.*.",
+        };
+        verify(checkConfig, getPath("imports" + File.separator + "InputImport.java"), expected);
+    }
+
+    @Test
+    public void testMemberExcludes()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(AvoidStaticImportCheck.class);
+        checkConfig.addAttribute("excludes", "java.io.File.listRoots");
+        // allow the java.io.File.listRoots member imports
+        final String[] expected = {
+            "25: Using a static member import should be avoided - javax.swing.WindowConstants.*.",
+            "26: Using a static member import should be avoided - javax.swing.WindowConstants.*.",
+            "27: Using a static member import should be avoided - java.io.File.createTempFile.",
+            "28: Using a static member import should be avoided - sun.net.ftpclient.FtpClient.*.",
+        };
+        verify(checkConfig, getPath("imports" + File.separator + "InputImport.java"), expected);
+    }
+
+    @Test
+    public void testBogusMemberExcludes()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(AvoidStaticImportCheck.class);
+        checkConfig.addAttribute(
+            "excludes",
+            "java.io.File.listRoots.listRoots, javax.swing.WindowConstants,"
+            + "sun.net.ftpclient.FtpClient.*FtpClient, sun.net.ftpclient.FtpClientjunk, java.io.File.listRootsmorejunk");
+        // allow the java.io.File.listRoots member imports
+        final String[] expected = {
+            "23: Using a static member import should be avoided - java.io.File.listRoots.",
+            "25: Using a static member import should be avoided - javax.swing.WindowConstants.*.",
+            "26: Using a static member import should be avoided - javax.swing.WindowConstants.*.",
+            "27: Using a static member import should be avoided - java.io.File.createTempFile.",
+            "28: Using a static member import should be avoided - sun.net.ftpclient.FtpClient.*.",
+        };
+        verify(checkConfig, getPath("imports" + File.separator + "InputImport.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/CustomImportOrderCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/CustomImportOrderCheckTest.java
new file mode 100644
index 0000000..e6ef4db
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/CustomImportOrderCheckTest.java
@@ -0,0 +1,234 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class CustomImportOrderCheckTest extends BaseCheckTestSupport
+{
+    /**
+     * @throws Exception
+     */
+    @Test
+    public void testCustom() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(CustomImportOrderCheck.class);
+        checkConfig.addAttribute("standardPackageRegExp", "java|javax");
+        checkConfig.addAttribute("thirdPartyPackageRegExp", "com|org");
+        checkConfig
+                .addAttribute("customImportOrderRules",
+                        "STATIC###SAME_PACKAGE(3)###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE");
+        checkConfig.addAttribute("sortImportsInGroupAlphabetically", "true");
+        final String[] expected = {
+            "4: Wrong lexicographical order for 'java.awt.Button.ABORT' import.",
+            "7: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
+            "8: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
+            "9: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
+            "10: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
+            "11: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
+            "12: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
+            "13: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
+            "14: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
+            "15: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
+            "16: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputCustomImportOrder.java"), expected);
+    }
+
+    /**
+     * Checks different group orderings and imports which are out of those ones
+     * specified in the configuration.
+     * @throws Exception
+     */
+    @Test
+    public void testDefaultPackage() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(CustomImportOrderCheck.class);
+        checkConfig.addAttribute("thirdPartyPackageRegExp", "com.|org.");
+        checkConfig.addAttribute("customImportOrderRules",
+                "STATIC###STANDARD_JAVA_PACKAGE###THIRD_PARTY_PACKAGE");
+        checkConfig.addAttribute("sortImportsInGroupAlphabetically", "true");
+        final String[] expected = {
+            "4: Wrong lexicographical order for 'java.awt.Button.ABORT' import.",
+            "9: Wrong lexicographical order for 'java.awt.Dialog' import.",
+            "13: Wrong lexicographical order for 'java.io.File' import.",
+            "15: Wrong lexicographical order for 'java.io.InputStream' import.",
+            "20: Wrong lexicographical order for 'com.google.common.*' import.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputCustomImportOrder.java"), expected);
+    }
+
+    /**
+     * Checks different combinations for same_package group.
+     * @throws Exception
+     */
+    @Test
+    public void testNonSpecifiedImports() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(CustomImportOrderCheck.class);
+        checkConfig.addAttribute("thirdPartyPackageRegExp", "org.");
+        checkConfig
+                .addAttribute("customImportOrderRules",
+                        "STATIC###STANDARD_JAVA_PACKAGE###THIRD_PARTY_PACKAGE###SAME_PACKAGE(3)");
+        checkConfig.addAttribute("sortImportsInGroupAlphabetically", "true");
+        final String[] expected = {
+            "4: Wrong lexicographical order for 'java.awt.Button.ABORT' import.",
+            "9: Wrong lexicographical order for 'java.awt.Dialog' import.",
+            "13: Wrong lexicographical order for 'java.io.File' import.",
+            "15: Wrong lexicographical order for 'java.io.InputStream' import.",
+            "18: Import statement is in the wrong order. Should be in the 'SAME_PACKAGE' group.",
+            "20: Imports without groups should be placed at the end of the import list.",
+            "21: 'org.apache.*'should be separated from previous import group.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputCustomImportOrder.java"), expected);
+    }
+
+    @Test
+    public void testOrderRuleWithOneGroup() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(CustomImportOrderCheck.class);
+        checkConfig.addAttribute("thirdPartyPackageRegExp", "org.");
+        checkConfig.addAttribute("customImportOrderRules",
+                "STANDARD_JAVA_PACKAGE");
+        checkConfig.addAttribute("sortImportsInGroupAlphabetically", "true");
+        final String[] expected = {
+            "7: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
+            "8: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
+            "9: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
+            "10: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
+            "11: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputCustomImportOrder2.java"), expected);
+    }
+
+    @Test
+    public void testSamePackageAndStatic() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(CustomImportOrderCheck.class);
+        checkConfig.addAttribute("thirdPartyPackageRegExp", "org.");
+        checkConfig.addAttribute("customImportOrderRules",
+                "STATIC###SAME_PACKAGE(3)");
+        checkConfig.addAttribute("sortImportsInGroupAlphabetically", "true");
+        final String[] expected = {
+            "4: Import statement is in the wrong order. Should be in the 'SAME_PACKAGE' group.",
+            "5: Import statement is in the wrong order. Should be in the 'SAME_PACKAGE' group.",
+            "6: Import statement is in the wrong order. Should be in the 'SAME_PACKAGE' group.",
+            "7: Import statement is in the wrong order. Should be in the 'STATIC' group.",
+            "8: Import statement is in the wrong order. Should be in the 'STATIC' group.",
+            "10: Import statement is in the wrong order. Should be in the 'SAME_PACKAGE' group.",
+            "11: Import statement is in the wrong order. Should be in the 'STATIC' group.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputCustomImportOrderSamePackage.java"), expected);
+    }
+
+    @Test
+    public void testOnlySamePackage() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(CustomImportOrderCheck.class);
+        checkConfig.addAttribute("customImportOrderRules", "SAME_PACKAGE(3)");
+        checkConfig.addAttribute("sortImportsInGroupAlphabetically", "true");
+        final String[] expected = {
+            "4: Import statement is in the wrong order. Should be in the 'SAME_PACKAGE' group.",
+            "6: Import statement is in the wrong order. Should be in the 'SAME_PACKAGE' group.",
+            "7: Import statement is in the wrong order. Should be in the 'SAME_PACKAGE' group.",
+            "8: Import statement is in the wrong order. Should be in the 'SAME_PACKAGE' group.",
+            "9: Import statement is in the wrong order. Should be in the 'SAME_PACKAGE' group.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputCustomImportOrderSamePackage2.java"), expected);
+    }
+
+    @Test
+    public void testWithoutLineSeparator() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(CustomImportOrderCheck.class);
+        checkConfig.addAttribute("thirdPartyPackageRegExp", "org.");
+        checkConfig.addAttribute("separateLineBetweenGroups", "false");
+        checkConfig.addAttribute("customImportOrderRules",
+                "STATIC###SAME_PACKAGE(3)");
+        checkConfig.addAttribute("sortImportsInGroupAlphabetically", "true");
+        final String[] expected = {
+            "4: Import statement is in the wrong order. Should be in the 'SAME_PACKAGE' group.",
+            "5: Import statement is in the wrong order. Should be in the 'SAME_PACKAGE' group.",
+            "6: Import statement is in the wrong order. Should be in the 'SAME_PACKAGE' group.",
+            "7: Import statement is in the wrong order. Should be in the 'STATIC' group.",
+            "8: Import statement is in the wrong order. Should be in the 'STATIC' group.",
+            "10: Import statement is in the wrong order. Should be in the 'SAME_PACKAGE' group.",
+            "11: Import statement is in the wrong order. Should be in the 'STATIC' group.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputCustomImportOrderSamePackage.java"), expected);
+    }
+
+    @Test
+    public void testNoValid() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(CustomImportOrderCheck.class);
+        checkConfig.addAttribute("thirdPartyPackageRegExp", ".*");
+        checkConfig.addAttribute("specialImportsRegExp", "com.google");
+        checkConfig.addAttribute("sortImportsInGroupAlphabetically", "true");
+        checkConfig.addAttribute("customImportOrderRules",
+                "STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE");
+        final String[] expected = {};
+
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputCustomImportOrderNoValid.java"), expected);
+    }
+
+    @Test
+    public void testPossibleIndexOutOfBoundsException() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(CustomImportOrderCheck.class);
+        checkConfig.addAttribute("thirdPartyPackageRegExp", ".*");
+        checkConfig.addAttribute("specialImportsRegExp", "com.google");
+        checkConfig.addAttribute("sortImportsInGroupAlphabetically", "true");
+        checkConfig.addAttribute("customImportOrderRules",
+                "STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE");
+        final String[] expected = {
+            "5: Import statement is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator
+                + "DOMSource.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/GuardTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/GuardTest.java
new file mode 100644
index 0000000..3484b42
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/GuardTest.java
@@ -0,0 +1,149 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+
+public class GuardTest
+{
+    @Test
+    public void testPkgGuard1()
+    {
+        final Guard g = new Guard(true, false, "pkg", false, false);
+        assertNotNull(g);
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("asda"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("p"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkga"));
+        assertEquals(AccessResult.ALLOWED, g.verifyImport("pkg.a"));
+        assertEquals(AccessResult.ALLOWED, g.verifyImport("pkg.a.b"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkg"));
+    }
+
+    @Test
+    public void testPkgGuard2()
+    {
+        final Guard g = new Guard(true, false, "pkg", true, false);
+        assertNotNull(g);
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("asda"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("p"));
+        assertEquals(AccessResult.ALLOWED, g.verifyImport("pkg.a"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkg.a.b"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkg"));
+    }
+
+    @Test
+    public void testClassGuard()
+    {
+        final Guard g = new Guard(true, false, "pkg.a", false);
+        assertNotNull(g);
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("asda"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("p"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkga"));
+        assertEquals(AccessResult.ALLOWED, g.verifyImport("pkg.a"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkg.a.b"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkg"));
+    }
+
+    @Test
+    public void testPkgGuard1re()
+    {
+        final Guard g = new Guard(true, false, "pkg", false, true);
+        assertNotNull(g);
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("asda"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("p"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkga"));
+        assertEquals(AccessResult.ALLOWED, g.verifyImport("pkg.a"));
+        assertEquals(AccessResult.ALLOWED, g.verifyImport("pkg.a.b"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkg"));
+    }
+
+    @Test
+    public void testPkgGuard2re()
+    {
+        final Guard g = new Guard(true, false, "pkg", true, true);
+        assertNotNull(g);
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("asda"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("p"));
+        assertEquals(AccessResult.ALLOWED, g.verifyImport("pkg.a"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkg.a.b"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkg"));
+    }
+
+    @Test
+    public void testClassGuardre()
+    {
+        final Guard g = new Guard(true, false, "pkg.a", true);
+        assertNotNull(g);
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("asda"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("p"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkga"));
+        assertEquals(AccessResult.ALLOWED, g.verifyImport("pkg.a"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkg.a.b"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkg"));
+    }
+
+    @Test
+    public void testPkgGuard1re2()
+    {
+        final Guard g = new Guard(true, false, "(pkg|hallo)", false, true);
+        assertNotNull(g);
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("asda"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("p"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkga"));
+        assertEquals(AccessResult.ALLOWED, g.verifyImport("pkg.a"));
+        assertEquals(AccessResult.ALLOWED, g.verifyImport("pkg.a.b"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkg"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("halloa"));
+        assertEquals(AccessResult.ALLOWED, g.verifyImport("hallo.a"));
+        assertEquals(AccessResult.ALLOWED, g.verifyImport("hallo.a.b"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("hallo"));
+    }
+
+    @Test
+    public void testPkgGuard2re2()
+    {
+        final Guard g = new Guard(true, false, "(pkg|hallo)", true, true);
+        assertNotNull(g);
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("asda"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("p"));
+        assertEquals(AccessResult.ALLOWED, g.verifyImport("pkg.a"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkg.a.b"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkg"));
+        assertEquals(AccessResult.ALLOWED, g.verifyImport("hallo.a"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("hallo.a.b"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("hallo"));
+    }
+
+    @Test
+    public void testClassGuardre2()
+    {
+        final Guard g = new Guard(true, false, "pk[gx]\\.a", true);
+        assertNotNull(g);
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("asda"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("p"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkga"));
+        assertEquals(AccessResult.ALLOWED, g.verifyImport("pkg.a"));
+        assertEquals(AccessResult.ALLOWED, g.verifyImport("pkx.a"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkg.a.b"));
+        assertEquals(AccessResult.UNKNOWN, g.verifyImport("pkg"));
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/IllegalImportCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/IllegalImportCheckTest.java
new file mode 100644
index 0000000..9143b10
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/IllegalImportCheckTest.java
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class IllegalImportCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testWithSupplied()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(IllegalImportCheck.class);
+        checkConfig.addAttribute("illegalPkgs", "java.io");
+        final String[] expected = {
+            "9:1: Import from illegal package - java.io.*.",
+            "23:1: Import from illegal package - java.io.File.listRoots.",
+            "27:1: Import from illegal package - java.io.File.createTempFile.",
+        };
+        verify(checkConfig, getPath("imports" + File.separator + "InputImport.java"), expected);
+    }
+
+    @Test
+    public void testWithDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(IllegalImportCheck.class);
+        final String[] expected = {
+            "15:1: Import from illegal package - sun.net.ftpclient.FtpClient.",
+            "28:1: Import from illegal package - sun.net.ftpclient.FtpClient.*.",
+        };
+        verify(checkConfig, getPath("imports" + File.separator + "InputImport.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlCheckRegExTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlCheckRegExTest.java
new file mode 100644
index 0000000..c4e19f2
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlCheckRegExTest.java
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class ImportControlCheckRegExTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testOne() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(ImportControlCheck.class);
+        checkConfig.addAttribute("file",
+                "src/test/resources/com/puppycrawl/tools/checkstyle/import-control_one-re.xml");
+        final String[] expected = {"5:1: Disallowed import - java.io.File."};
+
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputImportControl.java"), expected);
+    }
+
+    @Test
+    public void testTwo() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(ImportControlCheck.class);
+        checkConfig.addAttribute("file",
+                "src/test/resources/com/puppycrawl/tools/checkstyle/import-control_two-re.xml");
+        final String[] expected = {
+            "3:1: Disallowed import - java.awt.Image.",
+            "4:1: Disallowed import - javax.swing.border.*.",
+            "6:1: Disallowed import - java.awt.Button.ABORT.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputImportControl.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlCheckTest.java
new file mode 100644
index 0000000..b3eaf5f
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlCheckTest.java
@@ -0,0 +1,120 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import static org.junit.Assert.fail;
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import java.io.File;
+import org.junit.Test;
+
+public class ImportControlCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testOne() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(ImportControlCheck.class);
+        checkConfig.addAttribute("file", "src/test/resources/com/puppycrawl/tools/checkstyle/import-control_one.xml");
+        final String[] expected = {"5:1: Disallowed import - java.io.File."};
+
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputImportControl.java"), expected);
+    }
+
+    @Test
+    public void testTwo() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(ImportControlCheck.class);
+        checkConfig.addAttribute("file",
+                "src/test/resources/com/puppycrawl/tools/checkstyle/import-control_two.xml");
+        final String[] expected = {
+            "3:1: Disallowed import - java.awt.Image.",
+            "4:1: Disallowed import - javax.swing.border.*.",
+            "6:1: Disallowed import - java.awt.Button.ABORT.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputImportControl.java"), expected);
+    }
+
+    @Test
+    public void testWrong() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(ImportControlCheck.class);
+        checkConfig.addAttribute("file",
+                "src/test/resources/com/puppycrawl/tools/checkstyle/import-control_wrong.xml");
+        final String[] expected = {"1:40: Import control file does not handle this package."};
+
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputImportControl.java"), expected);
+    }
+
+    @Test
+    public void testMissing() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(ImportControlCheck.class);
+        final String[] expected = {"1:40: Missing an import control file."};
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputImportControl.java"), expected);
+    }
+
+    @Test
+    public void testEmpty() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(ImportControlCheck.class);
+        checkConfig.addAttribute("file", "   ");
+        final String[] expected = {"1:40: Missing an import control file."};
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputImportControl.java"), expected);
+    }
+
+    @Test
+    public void testUnknown() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(ImportControlCheck.class);
+        checkConfig.addAttribute("file", "unknown-file");
+        final String[] expected = {};
+        try {
+            verify(checkConfig, getPath("imports" + File.separator
+                    + "InputImportControl.java"), expected);
+            fail("should fail");
+        }
+        catch (CheckstyleException ex) {
+            ;
+        }
+    }
+
+    @Test
+    public void testBroken() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(ImportControlCheck.class);
+        checkConfig.addAttribute("file",
+                "src/test/resources/com/puppycrawl/tools/checkstyle/import-control_broken.xml");
+        final String[] expected = {};
+        try {
+            verify(checkConfig, getPath("imports" + File.separator
+                    + "InputImportControl.java"), expected);
+            fail("should fail");
+        }
+        catch (CheckstyleException ex) {
+            ;
+        }
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlLoaderTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlLoaderTest.java
new file mode 100644
index 0000000..82f51e5
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlLoaderTest.java
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import static org.junit.Assert.assertNotNull;
+
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import java.io.File;
+import org.junit.Test;
+
+public class ImportControlLoaderTest
+{
+    @Test
+    public void testLoad() throws CheckstyleException
+    {
+        final PkgControl root =
+                ImportControlLoader.load(new File(
+                        "src/test/resources/com/puppycrawl/tools/checkstyle/import-control_complete.xml").toURI());
+        assertNotNull(root);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheckTest.java
new file mode 100644
index 0000000..a198d6a
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheckTest.java
@@ -0,0 +1,226 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class ImportOrderCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ImportOrderCheck.class);
+        final String[] expected = {
+            "5: Wrong order for 'java.awt.Dialog' import.",
+            "9: Wrong order for 'javax.swing.JComponent' import.",
+            "11: Wrong order for 'java.io.File' import.",
+            "13: Wrong order for 'java.io.IOException' import.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator + "InputImportOrder.java"), expected);
+    }
+
+    @Test
+    public void testGroups() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(ImportOrderCheck.class);
+        checkConfig.addAttribute("groups", "java.awt");
+        checkConfig.addAttribute("groups", "javax.swing");
+        checkConfig.addAttribute("groups", "java.io");
+        final String[] expected = {
+            "5: Wrong order for 'java.awt.Dialog' import.",
+            "13: Wrong order for 'java.io.IOException' import.",
+            "16: Wrong order for 'javax.swing.WindowConstants.*' import.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator + "InputImportOrder.java"), expected);
+    }
+
+    @Test
+    public void testGroupsRegexp() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(ImportOrderCheck.class);
+        checkConfig.addAttribute("groups", "java, /^javax?\\.(awt|swing)\\./");
+        checkConfig.addAttribute("ordered", "false");
+        final String[] expected = {
+            "11: Wrong order for 'java.io.File' import.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator + "InputImportOrder.java"), expected);
+    }
+
+    @Test
+    public void testSeparated() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(ImportOrderCheck.class);
+        checkConfig.addAttribute("groups", "java.awt, javax.swing, java.io");
+        checkConfig.addAttribute("separated", "true");
+        checkConfig.addAttribute("ordered", "false");
+        final String[] expected = {
+            "9: 'javax.swing.JComponent' should be separated from previous imports.",
+            "11: 'java.io.File' should be separated from previous imports.",
+            "16: Wrong order for 'javax.swing.WindowConstants.*' import.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator + "InputImportOrder.java"), expected);
+    }
+
+    @Test
+    public void testCaseInsensitive() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(ImportOrderCheck.class);
+        checkConfig.addAttribute("caseSensitive", "false");
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator + "InputImportOrderCaseInsensitive.java"), expected);
+    }
+
+    @Test
+    public void testTop() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ImportOrderCheck.class);
+        checkConfig.addAttribute("option", "top");
+        final String[] expected = {
+            "4: Wrong order for 'java.awt.Button.ABORT' import.",
+            "18: Wrong order for 'java.io.File.*' import.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator + "InputImportOrder_Top.java"), expected);
+    }
+
+    @Test
+    public void testAbove() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ImportOrderCheck.class);
+        checkConfig.addAttribute("option", "above");
+        final String[] expected = {
+            "5: Wrong order for 'java.awt.Button.ABORT' import.",
+            "8: Wrong order for 'java.awt.Dialog' import.",
+            "13: Wrong order for 'java.io.File' import.",
+            "14: Wrong order for 'java.io.File.createTempFile' import.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator + "InputImportOrder_Above.java"), expected);
+    }
+
+    @Test
+    public void testInFlow() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ImportOrderCheck.class);
+        checkConfig.addAttribute("option", "inflow");
+        final String[] expected = {
+            "6: Wrong order for 'java.awt.Dialog' import.",
+            "11: Wrong order for 'javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE' import.",
+            "12: Wrong order for 'javax.swing.WindowConstants.*' import.",
+            "13: Wrong order for 'javax.swing.JTable' import.",
+            "15: Wrong order for 'java.io.File.createTempFile' import.",
+            "16: Wrong order for 'java.io.File' import.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator + "InputImportOrder_InFlow.java"), expected);
+    }
+
+    @Test
+    public void testUnder() throws Exception
+    {
+        // is default (testDefault)
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ImportOrderCheck.class);
+        checkConfig.addAttribute("option", "under");
+        final String[] expected = {
+            "5: Wrong order for 'java.awt.Dialog' import.",
+            "11: Wrong order for 'java.awt.Button.ABORT' import.",
+            "14: Wrong order for 'java.io.File' import.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator + "InputImportOrder_Under.java"), expected);
+    }
+
+    @Test
+    public void testBottom() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ImportOrderCheck.class);
+        checkConfig.addAttribute("option", "bottom");
+        final String[] expected = {
+            "15: Wrong order for 'java.io.File' import.",
+            "18: Wrong order for 'java.awt.Button.ABORT' import.",
+            "21: Wrong order for 'java.io.Reader' import.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator + "InputImportOrder_Bottom.java"), expected);
+    }
+
+    @Test
+    public void testHonorsTokenProperty() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ImportOrderCheck.class);
+        checkConfig.addAttribute("tokens", "IMPORT");
+        final String[] expected = {
+            "6: Wrong order for 'java.awt.Button' import.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator + "InputImportOrder_HonorsTokensProperty.java"), expected);
+    }
+
+    @Test
+    public void testWildcard() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(ImportOrderCheck.class);
+        checkConfig.addAttribute("groups", "com,*,java");
+        final String[] expected = {
+            "9: Wrong order for 'javax.crypto.Cipher' import.",
+        };
+
+        verify(checkConfig, getPath("imports" + File.separator + "InputImportOrder_Wildcard.java"), expected);
+    }
+
+    @Test
+    public void testWildcardUnspecified() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(ImportOrderCheck.class);
+
+        /*
+        <property name="ordered" value="true"/>
+        <property name="separated" value="true"/>
+        */
+        checkConfig.addAttribute("groups", "java,javax,org");
+        final String[] expected = {};
+
+        verify(checkConfig, getPath("imports" + File.separator + "InputImportOrder_WildcardUnspecified.java"), expected);
+    }
+
+    @Test
+    public void testNoFailureForRedundantImports() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ImportOrderCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("imports" + File.separator + "InputImportOrder_NoFailureForRedundantImports.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgControlRegExpTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgControlRegExpTest.java
new file mode 100644
index 0000000..7a35fc0
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgControlRegExpTest.java
@@ -0,0 +1,97 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class PkgControlRegExpTest
+{
+    private final PkgControl pcRoot = new PkgControl("com.kazgroup.courtlink");
+    private final PkgControl pcCommon = new PkgControl(pcRoot, "common");
+
+    @Before
+    public void setUp() throws Exception
+    {
+        pcRoot.addGuard(new Guard(false, false, ".*\\.(spring|lui)framework", false, true));
+        pcRoot.addGuard(new Guard(false, false, "org\\.hibernate", false, true));
+        pcRoot.addGuard(new Guard(true, false, "org\\.(apache|lui)\\.commons", false, true));
+
+        pcCommon.addGuard(new Guard(true, false, "org\\.h.*", false, true));
+    }
+
+    @Test
+    public void testFullPkg()
+    {
+        assertEquals("com.kazgroup.courtlink", pcRoot.getFullPackage());
+        assertEquals("com.kazgroup.courtlink.common", pcCommon.getFullPackage());
+    }
+
+    @Test
+    public void testLocateFinest()
+    {
+        assertEquals(pcRoot, pcRoot
+                .locateFinest("com.kazgroup.courtlink.domain"));
+        assertEquals(pcCommon, pcRoot
+                .locateFinest("com.kazgroup.courtlink.common.api"));
+        assertNull(pcRoot.locateFinest("com"));
+    }
+
+    @Test
+    public void testCheckAccess()
+    {
+        assertEquals(AccessResult.DISALLOWED, pcCommon.checkAccess(
+                "org.springframework.something",
+                "com.kazgroup.courtlink.common"));
+        assertEquals(AccessResult.DISALLOWED, pcCommon.checkAccess(
+                "org.luiframework.something",
+                "com.kazgroup.courtlink.common"));
+        assertEquals(AccessResult.DISALLOWED, pcCommon.checkAccess(
+                "de.springframework.something",
+                "com.kazgroup.courtlink.common"));
+        assertEquals(AccessResult.DISALLOWED, pcCommon.checkAccess(
+                "de.luiframework.something",
+                "com.kazgroup.courtlink.common"));
+        assertEquals(AccessResult.ALLOWED, pcCommon
+                .checkAccess("org.apache.commons.something",
+                        "com.kazgroup.courtlink.common"));
+        assertEquals(AccessResult.ALLOWED, pcCommon
+                .checkAccess("org.lui.commons.something",
+                        "com.kazgroup.courtlink.common"));
+        assertEquals(AccessResult.DISALLOWED, pcCommon.checkAccess(
+                "org.apache.commons", "com.kazgroup.courtlink.common"));
+        assertEquals(AccessResult.DISALLOWED, pcCommon.checkAccess(
+                "org.lui.commons", "com.kazgroup.courtlink.common"));
+        assertEquals(AccessResult.ALLOWED, pcCommon.checkAccess(
+                "org.hibernate.something", "com.kazgroup.courtlink.common"));
+        assertEquals(AccessResult.DISALLOWED, pcCommon.checkAccess(
+                "com.badpackage.something", "com.kazgroup.courtlink.common"));
+        assertEquals(AccessResult.DISALLOWED, pcRoot.checkAccess(
+                "org.hibernate.something", "com.kazgroup.courtlink"));
+    }
+
+    @Test
+    public void testUnknownPkg()
+    {
+        assertNull(pcRoot.locateFinest("net.another"));
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgControlTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgControlTest.java
new file mode 100644
index 0000000..1cf9bc4
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/PkgControlTest.java
@@ -0,0 +1,83 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class PkgControlTest
+{
+    private final PkgControl pcRoot = new PkgControl("com.kazgroup.courtlink");
+    private final PkgControl pcCommon = new PkgControl(pcRoot, "common");
+
+    @Before
+    public void setUp() throws Exception
+    {
+        pcRoot.addGuard(new Guard(false, false, "org.springframework", false, false));
+        pcRoot.addGuard(new Guard(false, false, "org.hibernate", false, false));
+        pcRoot.addGuard(new Guard(true, false, "org.apache.commons", false, false));
+
+        pcCommon.addGuard(new Guard(true, false, "org.hibernate", false, false));
+    }
+
+    @Test
+    public void testFullPkg()
+    {
+        assertEquals("com.kazgroup.courtlink", pcRoot.getFullPackage());
+        assertEquals("com.kazgroup.courtlink.common", pcCommon.getFullPackage());
+    }
+
+    @Test
+    public void testLocateFinest()
+    {
+        assertEquals(pcRoot, pcRoot
+                .locateFinest("com.kazgroup.courtlink.domain"));
+        assertEquals(pcCommon, pcRoot
+                .locateFinest("com.kazgroup.courtlink.common.api"));
+        assertNull(pcRoot.locateFinest("com"));
+    }
+
+    @Test
+    public void testCheckAccess()
+    {
+        assertEquals(AccessResult.DISALLOWED, pcCommon.checkAccess(
+                "org.springframework.something",
+                "com.kazgroup.courtlink.common"));
+        assertEquals(AccessResult.ALLOWED, pcCommon
+                .checkAccess("org.apache.commons.something",
+                        "com.kazgroup.courtlink.common"));
+        assertEquals(AccessResult.DISALLOWED, pcCommon.checkAccess(
+                "org.apache.commons", "com.kazgroup.courtlink.common"));
+        assertEquals(AccessResult.ALLOWED, pcCommon.checkAccess(
+                "org.hibernate.something", "com.kazgroup.courtlink.common"));
+        assertEquals(AccessResult.DISALLOWED, pcCommon.checkAccess(
+                "com.badpackage.something", "com.kazgroup.courtlink.common"));
+        assertEquals(AccessResult.DISALLOWED, pcRoot.checkAccess(
+                "org.hibernate.something", "com.kazgroup.courtlink"));
+    }
+
+    @Test
+    public void testUnknownPkg()
+    {
+        assertNull(pcRoot.locateFinest("net.another"));
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/RedundantImportCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/RedundantImportCheckTest.java
new file mode 100644
index 0000000..8a36c87
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/RedundantImportCheckTest.java
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class RedundantImportCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RedundantImportCheck.class);
+        final String[] expected = {
+            "7:1: Redundant import from the same package - com.puppycrawl.tools.checkstyle.imports.*.",
+            "8:38: Redundant import from the same package - com.puppycrawl.tools.checkstyle.imports.GlobalProperties.",
+            "10:1: Redundant import from the java.lang package - java.lang.*.",
+            "11:1: Redundant import from the java.lang package - java.lang.String.",
+            "14:1: Duplicate import to line 13 - java.util.List.",
+            "26:1: Duplicate import to line 25 - javax.swing.WindowConstants.*.",
+        };
+        verify(checkConfig, getPath("imports" + File.separator + "InputImport.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheckTest.java
new file mode 100644
index 0000000..25bbc2b
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/UnusedImportsCheckTest.java
@@ -0,0 +1,101 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.imports;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class UnusedImportsCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(UnusedImportsCheck.class);
+        final String[] expected = {
+            "8:45: Unused import - com.puppycrawl.tools.checkstyle.imports.GlobalProperties.",
+            "11:8: Unused import - java.lang.String.",
+            "13:8: Unused import - java.util.List.",
+            "14:8: Unused import - java.util.List.",
+            "17:8: Unused import - java.util.Enumeration.",
+            "20:8: Unused import - javax.swing.JToggleButton.",
+            "22:8: Unused import - javax.swing.BorderFactory.",
+            "27:15: Unused import - java.io.File.createTempFile.",
+            //"29:8: Unused import - java.awt.Component.", // Should be detected
+            "30:8: Unused import - java.awt.Graphics2D.",
+            "31:8: Unused import - java.awt.HeadlessException.",
+            "32:8: Unused import - java.awt.Label.",
+            "33:8: Unused import - java.util.Date.",
+            "34:8: Unused import - java.util.Calendar.",
+            "35:8: Unused import - java.util.BitSet.",
+            "37:8: Unused import - com.test.TestClass1.",
+            "38:8: Unused import - com.test.TestClass2.",
+            "39:8: Unused import - com.test.TestClass3.",
+            "40:8: Unused import - com.test.TestClass4.",
+            "41:8: Unused import - com.test.TestClass5.",
+            "42:8: Unused import - com.test.TestClass6.",
+            "43:8: Unused import - com.test.TestClass7.",
+            "44:8: Unused import - com.test.TestClass8.",
+            "45:8: Unused import - com.test.TestClass9.",
+        };
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputImport.java"), expected);
+    }
+
+    @Test
+    public void testProcessJavadoc() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(UnusedImportsCheck.class);
+        checkConfig.addAttribute("processJavadoc", "true");
+        final String[] expected = {
+            "8:45: Unused import - com.puppycrawl.tools.checkstyle.imports.GlobalProperties.",
+            "11:8: Unused import - java.lang.String.",
+            "13:8: Unused import - java.util.List.",
+            "14:8: Unused import - java.util.List.",
+            "17:8: Unused import - java.util.Enumeration.",
+            "20:8: Unused import - javax.swing.JToggleButton.",
+            "22:8: Unused import - javax.swing.BorderFactory.",
+            "27:15: Unused import - java.io.File.createTempFile.",
+            //"29:8: Unused import - java.awt.Component.", // Should be detected
+            "32:8: Unused import - java.awt.Label.",
+            "45:8: Unused import - com.test.TestClass9.",
+        };
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputImport.java"), expected);
+    }
+
+    @Test
+    public void testAnnotations() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(UnusedImportsCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("imports" + File.separator
+                + "package-info.java"), expected);
+    }
+
+    @Test
+    public void testBug() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(UnusedImportsCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("imports" + File.separator
+                + "InputImportBug.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java
new file mode 100644
index 0000000..cfea2ef
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java
@@ -0,0 +1,869 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.Checker;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class IndentationCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testAnonClassesFromGuava() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        checkConfig.addAttribute("basicOffset", "2");
+        checkConfig.addAttribute("lineWrappingIndentation", "4");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("indentation/FromGuava2.java"), expected);
+    }
+
+    @Test
+    public void testAnnotatins() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        checkConfig.addAttribute("basicOffset", "2");
+        checkConfig.addAttribute("lineWrappingIndentation", "4");
+        final String[] expected = {};
+        verify(checkConfig, getPath("indentation/FromGuava.java"), expected);
+    }
+
+    @Test
+    public void testCorrectIfAndParameters() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        checkConfig.addAttribute("basicOffset", "2");
+        checkConfig.addAttribute("lineWrappingIndentation", "4");
+        final String[] expected = {};
+        verify(checkConfig, getPath("indentation/IndentationCorrectIfAndParameterInput.java"), expected);
+    }
+
+    @Test
+    public void testAnonymousClasses() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        checkConfig.addAttribute("basicOffset", "2");
+        checkConfig.addAttribute("lineWrappingIndentation", "4");
+        final String[] expected = {};
+        verify(checkConfig, getPath("indentation/InputAnonymousClasses.java"), expected);
+    }
+
+    @Test
+    public void testArrays() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        checkConfig.addAttribute("basicOffset", "2");
+        checkConfig.addAttribute("lineWrappingIndentation", "4");
+        checkConfig.addAttribute("arrayInitIndent", "2");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("indentation/InputArrays.java"), expected);
+    }
+
+    @Test
+    public void testLables() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        checkConfig.addAttribute("basicOffset", "2");
+        checkConfig.addAttribute("lineWrappingIndentation", "4");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("indentation/InputLabels.java"), expected);
+    }
+
+    @Test
+    public void testClassesAndMethods() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        checkConfig.addAttribute("basicOffset", "2");
+        checkConfig.addAttribute("lineWrappingIndentation", "4");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("indentation/InputClassesMethods.java"), expected);
+    }
+
+    @Test
+    public void testMembers() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        checkConfig.addAttribute("basicOffset", "2");
+        checkConfig.addAttribute("lineWrappingIndentation", "4");
+        final String[] expected = {
+            "10: '=' have incorrect indentation level 5, expected level should be 6.",
+            "45: 'class def rcurly' have incorrect indentation level 3, expected level should be 2.",
+        };
+
+        verify(checkConfig, getPath("indentation/InputMembers.java"), expected);
+    }
+
+    @Test
+    public void testInvalidLabel() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final String[] expected = {
+            "20: 'label' child have incorrect indentation level 10, expected level should be one of the following: 8, 12.",
+            "29: 'label' child have incorrect indentation level 2, expected level should be one of the following: 4, 8.",
+            "32: 'label' child have incorrect indentation level 18, expected level should be one of the following: 8, 12.",
+            "33: 'ctor def' child have incorrect indentation level 18, expected level should be 8.",
+            "35: 'label' child have incorrect indentation level 6, expected level should be one of the following: 8, 12.",
+            "37: 'label' child have incorrect indentation level 6, expected level should be one of the following: 8, 12.",
+        };
+        verify(checkConfig, getPath("indentation/InputInvalidLabelIndent.java"), expected);
+    }
+
+    @Test
+    public void testValidLabel() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("indentation/InputValidLabelIndent.java"), expected);
+    }
+
+    @Test
+    public void testValidIfWithChecker() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputValidIfIndent.java");
+        final String[] expected = {
+            "229: '(' have incorrect indentation level 8, expected level should be 12.",
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testValidDotWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputValidDotIndent.java");
+        final String[] expected = {
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testValidMethodWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputValidMethodIndent.java");
+        final String[] expected = {
+            "125: 'void' have incorrect indentation level 4, expected level should be 8.",
+            "126: 'method5' have incorrect indentation level 4, expected level should be 8.",
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testInvalidMethodWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputInvalidMethodIndent.java");
+        final String[] expected = {
+            "17: 'ctor def rcurly' have incorrect indentation level 6, expected level should be 4.",
+            "20: 'ctor def modifier' have incorrect indentation level 6, expected level should be 4.",
+            "21: 'ctor def lcurly' have incorrect indentation level 2, expected level should be 4.",
+            "22: 'ctor def rcurly' have incorrect indentation level 6, expected level should be 4.",
+            "25: 'method def modifier' have incorrect indentation level 2, expected level should be 4.",
+            "26: 'method def rcurly' have incorrect indentation level 6, expected level should be 4.",
+            "63: 'method def modifier' have incorrect indentation level 5, expected level should be 4.",
+            "64: 'final' have incorrect indentation level 5, expected level should be 9.",
+            "65: 'void' have incorrect indentation level 5, expected level should be 9.",
+            "66: 'method5' have incorrect indentation level 4, expected level should be 9.",
+            "74: 'method def modifier' have incorrect indentation level 3, expected level should be 4.",
+            "75: 'final' have incorrect indentation level 3, expected level should be 7.",
+            "76: 'void' have incorrect indentation level 3, expected level should be 7.",
+            "77: 'method6' have incorrect indentation level 5, expected level should be 7.",
+            "87: 'ctor def' child have incorrect indentation level 4, expected level should be 8.",
+            "87: 'method call' child have incorrect indentation level 4, expected level should be 8.",
+            "92: 'member def type' have incorrect indentation level 6, expected level should be 8.",
+            "92: 'method def' child have incorrect indentation level 6, expected level should be 8.",
+            "93: 'if' have incorrect indentation level 6, expected level should be 8.",
+            "94: 'if' child have incorrect indentation level 10, expected level should be 12.",
+            "94: 'method call' child have incorrect indentation level 10, expected level should be 12.",
+            "95: 'if rcurly' have incorrect indentation level 6, expected level should be 8.",
+            "98: 'Arrays' have incorrect indentation level 10, expected level should be 12.",
+            "107: '+' have incorrect indentation level 10, expected level should be 12.",
+            "107: 'method call' child have incorrect indentation level 10, expected level should be 12.",
+            "116: 'new' have incorrect indentation level 10, expected level should be 12.",
+            "120: 'new' have incorrect indentation level 10, expected level should be 12.",
+            "121: ')' have incorrect indentation level 6, expected level should be 8.",
+            "125: 'method call rparen' have incorrect indentation level 6, expected level should be 8.",
+            "139: '6' have incorrect indentation level 10, expected level should be 12.",
+            "139: 'method call' child have incorrect indentation level 10, expected level should be 12.",
+            "142: '6' have incorrect indentation level 10, expected level should be 12.",
+            "142: 'method call' child have incorrect indentation level 10, expected level should be 12.",
+            "152: 'method call' child have incorrect indentation level 6, expected level should be 12.",
+            "164: 'method def' child have incorrect indentation level 4, expected level should be 8.",
+            "169: 'method def' child have incorrect indentation level 4, expected level should be 8.",
+            "173: 'int' have incorrect indentation level 0, expected level should be 8.",
+            "174: 'method9' have incorrect indentation level 4, expected level should be 8.",
+            "184: 'method def' child have incorrect indentation level 12, expected level should be 8.",
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testInvalidSwitchWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputInvalidSwitchIndent.java");
+        final String[] expected = {
+            "26: 'switch' have incorrect indentation level 6, expected level should be 8.",
+            "28: 'case' child have incorrect indentation level 10, expected level should be 12.",
+            "29: 'block' child have incorrect indentation level 14, expected level should be 16.",
+            "29: 'method call' child have incorrect indentation level 14, expected level should be 16.",
+            "33: 'block' child have incorrect indentation level 14, expected level should be 16.",
+            "35: 'case' child have incorrect indentation level 14, expected level should be 12.",
+            "36: 'case' child have incorrect indentation level 10, expected level should be 12.",
+            "39: 'case' child have incorrect indentation level 10, expected level should be 12.",
+            "40: 'block' child have incorrect indentation level 14, expected level should be 16.",
+            "40: 'method call' child have incorrect indentation level 14, expected level should be 16.",
+            "41: 'block' child have incorrect indentation level 14, expected level should be 16.",
+            "49: 'block' child have incorrect indentation level 14, expected level should be 16.",
+            "49: 'method call' child have incorrect indentation level 14, expected level should be 16.",
+            "50: 'block' child have incorrect indentation level 18, expected level should be 16.",
+            "51: 'block rcurly' have incorrect indentation level 10, expected level should be 12.",
+            "55: 'block lcurly' have incorrect indentation level 10, expected level should be 12.",
+            "58: 'block rcurly' have incorrect indentation level 14, expected level should be 12.",
+            "62: 'block lcurly' have incorrect indentation level 14, expected level should be 12.",
+            "65: 'block rcurly' have incorrect indentation level 10, expected level should be 12.",
+            "72: 'case' child have incorrect indentation level 14, expected level should be 16.",
+            "77: 'case' child have incorrect indentation level 14, expected level should be 16.",
+            "85: 'switch rcurly' have incorrect indentation level 6, expected level should be 8.",
+            "88: 'switch lcurly' have incorrect indentation level 6, expected level should be 8.",
+            "89: 'switch rcurly' have incorrect indentation level 10, expected level should be 8.",
+            "91: 'switch lcurly' have incorrect indentation level 10, expected level should be 8.",
+            "92: 'switch rcurly' have incorrect indentation level 6, expected level should be 8.",
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testValidSwitchWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputValidSwitchIndent.java");
+        final String[] expected = {
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testValidArrayInitDefaultIndentWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputValidArrayInitDefaultIndent.java");
+        final String[] expected = {
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testValidArrayInitWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        checkConfig.addAttribute("arrayInitIndent", Integer.valueOf(8).toString());
+
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputValidArrayInitIndent.java");
+        final String[] expected = {};
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testInvalidArrayInitWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputInvalidArrayInitIndent.java");
+        final String[] expected = {
+            "17: 'member def type' have incorrect indentation level 2, expected level should be 4.",
+            "18: 'member def type' have incorrect indentation level 6, expected level should be 4.",
+            "20: 'member def type' have incorrect indentation level 2, expected level should be 4.",
+            "24: 'member def type' have incorrect indentation level 6, expected level should be 4.",
+            "25: 'array initialization' child have incorrect indentation level 8, expected level should be 10.",
+            "26: 'array initialization rcurly' have incorrect indentation level 4, expected level should be one of the following: 6, 10.",
+            "29: 'array initialization' child have incorrect indentation level 9, expected level should be 8.",
+            "30: 'array initialization' child have incorrect indentation level 7, expected level should be 8.",
+            "31: 'array initialization' child have incorrect indentation level 9, expected level should be 8.",
+            "36: 'array initialization lcurly' have incorrect indentation level 2, expected level should be 4.",
+            "40: 'array initialization rcurly' have incorrect indentation level 6, expected level should be one of the following: 4, 8.",
+            "44: 'array initialization lcurly' have incorrect indentation level 2, expected level should be 4.",
+            "48: 'array initialization' child have incorrect indentation level 20, expected level should be one of the following: 8, 31, 33.",
+            "49: 'array initialization' child have incorrect indentation level 4, expected level should be one of the following: 8, 31, 33.",
+            "54: 'array initialization' child have incorrect indentation level 6, expected level should be 8.",
+            "59: 'member def type' have incorrect indentation level 2, expected level should be 4.",
+            "61: 'member def type' have incorrect indentation level 6, expected level should be 4.",
+            "62: 'array initialization rcurly' have incorrect indentation level 2, expected level should be one of the following: 6, 10.",
+            "65: 'array initialization' child have incorrect indentation level 6, expected level should be 8.",
+            "72: 'array initialization' child have incorrect indentation level 10, expected level should be 12.",
+            "85: '1' have incorrect indentation level 8, expected level should be 12.",
+            "85: 'array initialization' child have incorrect indentation level 8, expected level should be 12.",
+            "96: 'array initialization' child have incorrect indentation level 10, expected level should be 12.",
+            "97: 'array initialization' child have incorrect indentation level 14, expected level should be 12.",
+            "100: 'array initialization' child have incorrect indentation level 10, expected level should be 12.",
+            "101: 'array initialization' child have incorrect indentation level 14, expected level should be 12.",
+            "102: 'array initialization rcurly' have incorrect indentation level 6, expected level should be one of the following: 8, 12.",
+            "105: 'array initialization lcurly' have incorrect indentation level 6, expected level should be 8.",
+            "106: 'array initialization' child have incorrect indentation level 14, expected level should be 12.",
+            "107: 'array initialization' child have incorrect indentation level 10, expected level should be 12.",
+            "108: 'array initialization rcurly' have incorrect indentation level 6, expected level should be one of the following: 8, 12.",
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testValidTryWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputValidTryIndent.java");
+        final String[] expected = {
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testInvalidTryWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputInvalidTryIndent.java");
+        final String[] expected = {
+            "21: 'try' have incorrect indentation level 9, expected level should be 8.",
+            "22: 'try rcurly' have incorrect indentation level 7, expected level should be 8.",
+            "24: 'catch rcurly' have incorrect indentation level 7, expected level should be 8.",
+            "26: 'try' have incorrect indentation level 4, expected level should be 8.",
+            "27: 'method call' child have incorrect indentation level 8, expected level should be 12.",
+            "27: 'try' child have incorrect indentation level 8, expected level should be 12.",
+            "28: 'try rcurly' have incorrect indentation level 4, expected level should be 8.",
+            "29: 'finally' child have incorrect indentation level 8, expected level should be 12.",
+            "29: 'method call' child have incorrect indentation level 8, expected level should be 12.",
+            "34: 'catch' child have incorrect indentation level 8, expected level should be 12.",
+            "34: 'method call' child have incorrect indentation level 8, expected level should be 12.",
+            "39: 'try rcurly' have incorrect indentation level 10, expected level should be 8.",
+            "41: 'catch rcurly' have incorrect indentation level 6, expected level should be 8.",
+            "48: 'catch rcurly' have incorrect indentation level 5, expected level should be 8.",
+            "55: 'catch' child have incorrect indentation level 10, expected level should be 12.",
+            "55: 'method call' child have incorrect indentation level 10, expected level should be 12.",
+            "56: 'catch' child have incorrect indentation level 14, expected level should be 12.",
+            "57: 'catch' child have incorrect indentation level 10, expected level should be 12.",
+            "57: 'method call' child have incorrect indentation level 10, expected level should be 12.",
+            "59: 'catch' have incorrect indentation level 6, expected level should be 8.",
+            "66: 'try lcurly' have incorrect indentation level 10, expected level should be 8.",
+            "68: 'try rcurly' have incorrect indentation level 10, expected level should be 8.",
+            "70: 'catch lcurly' have incorrect indentation level 6, expected level should be 8.",
+            "73: 'catch rcurly' have incorrect indentation level 10, expected level should be 8.",
+            "76: 'catch' child have incorrect indentation level 10, expected level should be 12.",
+            "76: 'method call' child have incorrect indentation level 10, expected level should be 12.",
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testInvalidClassDefWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputInvalidClassDefIndent.java");
+        final String[] expected = {
+            "19: 'class def modifier' have incorrect indentation level 2, expected level should be 0.",
+            "25: 'class def lcurly' have incorrect indentation level 2, expected level should be 0.",
+            "28: 'class def rcurly' have incorrect indentation level 2, expected level should be 0.",
+            "31: 'class def ident' have incorrect indentation level 2, expected level should be 0.",
+            "35: 'class def rcurly' have incorrect indentation level 2, expected level should be 0.",
+            "40: 'extends' have incorrect indentation level 2, expected level should be 4.",
+            "41: 'implements' have incorrect indentation level 2, expected level should be 4.",
+            "47: 'extends' have incorrect indentation level 2, expected level should be 4.",
+            "55: 'implements' have incorrect indentation level 2, expected level should be 4.",
+            "56: 'java' have incorrect indentation level 2, expected level should be 4.",
+            "61: 'class def modifier' have incorrect indentation level 2, expected level should be 0.",
+            "62: 'class def lcurly' have incorrect indentation level 2, expected level should be 0.",
+            "70: 'class def rcurly' have incorrect indentation level 2, expected level should be 0.",
+            "74: 'extends' have incorrect indentation level 2, expected level should be 4.",
+            "83: 'class def ident' have incorrect indentation level 2, expected level should be 4.",
+            "85: 'class def ident' have incorrect indentation level 6, expected level should be 4.",
+            "88: 'class def ident' have incorrect indentation level 2, expected level should be 4.",
+            "92: 'member def modifier' have incorrect indentation level 6, expected level should be 8.",
+            "98: 'int' have incorrect indentation level 10, expected level should be 12.",
+            "103: 'member def modifier' have incorrect indentation level 6, expected level should be 8.",
+            "108: 'class def rcurly' have incorrect indentation level 6, expected level should be 4.",
+            "110: 'class def ident' have incorrect indentation level 6, expected level should be 4.",
+            "116: 'class def ident' have incorrect indentation level 6, expected level should be 8.",
+            "119: 'class def ident' have incorrect indentation level 10, expected level should be 8.",
+            "121: 'class def rcurly' have incorrect indentation level 10, expected level should be 8.",
+            "124: 'member def type' have incorrect indentation level 10, expected level should be 12.",
+            "129: 'method def' child have incorrect indentation level 10, expected level should be 8.",
+            "130: 'object def lcurly' have incorrect indentation level 8, expected level should be one of the following: 10, 14.",
+            "134: 'object def rcurly' have incorrect indentation level 8, expected level should be one of the following: 10, 14.",
+            "138: 'object def lcurly' have incorrect indentation level 6, expected level should be one of the following: 8, 12.",
+
+            "139: 'method def modifier' have incorrect indentation level 12, expected level should be 10.",
+            "141: 'method def rcurly' have incorrect indentation level 12, expected level should be 10.",
+
+            "142: 'object def rcurly' have incorrect indentation level 6, expected level should be one of the following: 8, 12.",
+            "147: 'method def modifier' have incorrect indentation level 10, expected level should be 12.",
+            "149: 'method def rcurly' have incorrect indentation level 10, expected level should be 12.",
+            "185: 'class' have incorrect indentation level 0, expected level should be 4.",
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testInvalidBlockWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputInvalidBlockIndent.java");
+        final String[] expected = {
+            "22: 'block lcurly' have incorrect indentation level 7, expected level should be 8.",
+            "23: 'block lcurly' have incorrect indentation level 9, expected level should be 8.",
+            "25: 'block lcurly' have incorrect indentation level 9, expected level should be 8.",
+            "26: 'block rcurly' have incorrect indentation level 7, expected level should be 8.",
+            "28: 'block lcurly' have incorrect indentation level 6, expected level should be 8.",
+            "30: 'block rcurly' have incorrect indentation level 6, expected level should be 8.",
+            "31: 'block lcurly' have incorrect indentation level 6, expected level should be 8.",
+            "34: 'block lcurly' have incorrect indentation level 9, expected level should be 8.",
+            "35: 'block' child have incorrect indentation level 13, expected level should be 12.",
+            "35: 'member def type' have incorrect indentation level 13, expected level should be 12.",
+            "37: 'block' child have incorrect indentation level 13, expected level should be 12.",
+            "38: 'block rcurly' have incorrect indentation level 9, expected level should be 8.",
+            "41: 'block lcurly' have incorrect indentation level 6, expected level should be 8.",
+            "42: 'block' child have incorrect indentation level 10, expected level should be 12.",
+            "42: 'member def type' have incorrect indentation level 10, expected level should be 12.",
+            "44: 'block' child have incorrect indentation level 10, expected level should be 12.",
+            "45: 'block rcurly' have incorrect indentation level 6, expected level should be 8.",
+            "48: 'block lcurly' have incorrect indentation level 6, expected level should be 8.",
+            "51: 'block' child have incorrect indentation level 10, expected level should be 12.",
+            "51: 'member def type' have incorrect indentation level 10, expected level should be 12.",
+            "55: 'block lcurly' have incorrect indentation level 10, expected level should be 12.",
+            "59: 'block rcurly' have incorrect indentation level 10, expected level should be 12.",
+            "64: 'block' child have incorrect indentation level 10, expected level should be 12.",
+            "66: 'block lcurly' have incorrect indentation level 10, expected level should be 12.",
+            "67: 'block' child have incorrect indentation level 14, expected level should be 16.",
+            "67: 'member def type' have incorrect indentation level 14, expected level should be 16.",
+            "82: 'block rcurly' have incorrect indentation level 10, expected level should be 12.",
+            "91: 'static initialization' have incorrect indentation level 2, expected level should be 4.",
+            "92: 'static initialization' have incorrect indentation level 6, expected level should be 4.",
+            "96: 'member def type' have incorrect indentation level 7, expected level should be 8.",
+            "96: 'static initialization' child have incorrect indentation level 7, expected level should be 8.",
+            "99: 'static initialization' have incorrect indentation level 6, expected level should be 4.",
+            "101: 'static initialization rcurly' have incorrect indentation level 2, expected level should be 4.",
+            "103: 'static initialization' have incorrect indentation level 2, expected level should be 4.",
+            "105: 'static initialization rcurly' have incorrect indentation level 6, expected level should be 4.",
+            "107: 'static initialization' have incorrect indentation level 2, expected level should be 4.",
+            "109: 'member def type' have incorrect indentation level 6, expected level should be 8.",
+            "109: 'static initialization' child have incorrect indentation level 6, expected level should be 8.",
+            "112: 'static initialization lcurly' have incorrect indentation level 2, expected level should be 4.",
+            "113: 'member def type' have incorrect indentation level 6, expected level should be 8.",
+            "113: 'static initialization' child have incorrect indentation level 6, expected level should be 8.",
+            "114: 'static initialization rcurly' have incorrect indentation level 6, expected level should be 4.",
+            "119: 'member def type' have incorrect indentation level 6, expected level should be 8.",
+            "119: 'static initialization' child have incorrect indentation level 6, expected level should be 8.",
+            "124: 'member def type' have incorrect indentation level 4, expected level should be 8.",
+            "124: 'static initialization' child have incorrect indentation level 4, expected level should be 8.",
+            "125: 'static initialization rcurly' have incorrect indentation level 2, expected level should be 4.",
+            "130: 'static initialization rcurly' have incorrect indentation level 6, expected level should be 4.",
+            "133: 'block lcurly' have incorrect indentation level 2, expected level should be 4.",
+            "134: 'block lcurly' have incorrect indentation level 6, expected level should be 4.",
+            "137: 'block lcurly' have incorrect indentation level 2, expected level should be 4.",
+            "139: 'block rcurly' have incorrect indentation level 6, expected level should be 4.",
+            "141: 'block lcurly' have incorrect indentation level 6, expected level should be 4.",
+            "143: 'block rcurly' have incorrect indentation level 2, expected level should be 4.",
+            "146: 'block' child have incorrect indentation level 6, expected level should be 8.",
+            "146: 'member def type' have incorrect indentation level 6, expected level should be 8.",
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testInvalidIfWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputInvalidIfIndent.java");
+        final String[] expected = {
+            "50: 'if' have incorrect indentation level 1, expected level should be 8.",
+            "55: 'if' have incorrect indentation level 9, expected level should be 8.",
+            "56: 'if lcurly' have incorrect indentation level 9, expected level should be 8.",
+            "57: 'if rcurly' have incorrect indentation level 7, expected level should be 8.",
+            "59: 'if' have incorrect indentation level 6, expected level should be 8.",
+            "60: 'if lcurly' have incorrect indentation level 5, expected level should be 8.",
+            "61: 'if rcurly' have incorrect indentation level 5, expected level should be 8.",
+            "65: 'if rcurly' have incorrect indentation level 10, expected level should be 8.",
+            "66: 'else rcurly' have incorrect indentation level 7, expected level should be 8.",
+            "69: 'if' have incorrect indentation level 9, expected level should be 8.",
+            "70: 'if lcurly' have incorrect indentation level 7, expected level should be 8.",
+            "72: 'else' have incorrect indentation level 9, expected level should be 8.",
+            "74: 'else rcurly' have incorrect indentation level 9, expected level should be 8.",
+            "77: 'if' have incorrect indentation level 10, expected level should be 8.",
+            "78: 'if rcurly' have incorrect indentation level 7, expected level should be 8.",
+            "79: 'else' have incorrect indentation level 9, expected level should be 8.",
+            "80: 'else lcurly' have incorrect indentation level 7, expected level should be 8.",
+            "81: 'else rcurly' have incorrect indentation level 9, expected level should be 8.",
+            "85: 'if' have incorrect indentation level 9, expected level should be 8.",
+            "86: 'if lcurly' have incorrect indentation level 9, expected level should be 8.",
+            "87: 'if rcurly' have incorrect indentation level 9, expected level should be 8.",
+            "88: 'else lcurly' have incorrect indentation level 7, expected level should be 8.",
+            "89: 'else rcurly' have incorrect indentation level 10, expected level should be 8.",
+            "92: 'if' have incorrect indentation level 6, expected level should be 8.",
+            "93: 'if lcurly' have incorrect indentation level 10, expected level should be 8.",
+            "94: 'if rcurly' have incorrect indentation level 10, expected level should be 8.",
+            "95: 'else rcurly' have incorrect indentation level 7, expected level should be 8.",
+            "98: 'if' have incorrect indentation level 5, expected level should be 8.",
+            "99: 'if rcurly' have incorrect indentation level 11, expected level should be 8.",
+            "100: 'else' have incorrect indentation level 5, expected level should be 8.",
+            "101: 'else rcurly' have incorrect indentation level 11, expected level should be 8.",
+            "121: 'if' child have incorrect indentation level 14, expected level should be 12.",
+            "126: 'if lcurly' have incorrect indentation level 10, expected level should be 8.",
+            "127: 'if' child have incorrect indentation level 10, expected level should be 12.",
+            "127: 'method call' child have incorrect indentation level 10, expected level should be 12.",
+            "132: 'if' child have incorrect indentation level 14, expected level should be 12.",
+            "133: 'method call' child have incorrect indentation level 10, expected level should be 12.",
+            "135: 'else' child have incorrect indentation level 10, expected level should be 12.",
+            "135: 'method call' child have incorrect indentation level 10, expected level should be 12.",
+            "136: 'method call' child have incorrect indentation level 8, expected level should be 12.",
+            "143: 'if' child have incorrect indentation level 16, expected level should be 12.",
+            "144: 'if rcurly' have incorrect indentation level 9, expected level should be 8.",
+            "147: 'else' child have incorrect indentation level 16, expected level should be 12.",
+            "153: 'if' child have incorrect indentation level 0, expected level should be 12.",
+            "153: 'method call' child have incorrect indentation level 0, expected level should be 12.",
+            "157: 'else' child have incorrect indentation level 40, expected level should be 12.",
+            "164: 'if' child have incorrect indentation level 14, expected level should be 12.",
+            "167: 'else' child have incorrect indentation level 14, expected level should be 12.",
+            "173: 'if' child have incorrect indentation level 10, expected level should be 12.",
+            "173: 'method call' child have incorrect indentation level 10, expected level should be 12.",
+            "175: 'else' child have incorrect indentation level 10, expected level should be 12.",
+            "175: 'method call' child have incorrect indentation level 10, expected level should be 12.",
+            "179: 'if' have incorrect indentation level 10, expected level should be 8.",
+            "180: 'if' child have incorrect indentation level 14, expected level should be 12.",
+            "181: 'if rcurly' have incorrect indentation level 10, expected level should be 8.",
+            "182: 'else' have incorrect indentation level 10, expected level should be 8.",
+            "183: 'else' child have incorrect indentation level 14, expected level should be 12.",
+            "184: 'else rcurly' have incorrect indentation level 10, expected level should be 8.",
+            "187: '&&' have incorrect indentation level 9, expected level should be 12.",
+            "187: 'if' child have incorrect indentation level 9, expected level should be 12.",
+            "188: '&&' have incorrect indentation level 11, expected level should be 12.",
+            "188: 'if' child have incorrect indentation level 11, expected level should be 12.",
+            "192: 'if' child have incorrect indentation level 10, expected level should be 12.",
+            "195: 'if rcurly' have incorrect indentation level 7, expected level should be 8.",
+            "202: 'if' child have incorrect indentation level 10, expected level should be 12.",
+            "202: 'method call' child have incorrect indentation level 10, expected level should be 12.",
+            "204: 'if' child have incorrect indentation level 10, expected level should be 12.",
+            "204: 'method call' child have incorrect indentation level 10, expected level should be 12.",
+            "220: 'if' have incorrect indentation level 10, expected level should be 12.",
+            "224: 'if' child have incorrect indentation level 18, expected level should be 20.",
+            "224: 'method call' child have incorrect indentation level 18, expected level should be 20.",
+            "228: 'if rcurly' have incorrect indentation level 40, expected level should be 8.",
+            "235: 'if rparen' have incorrect indentation level 10, expected level should be 8.",
+            "240: 'if rparen' have incorrect indentation level 6, expected level should be 8.",
+            "246: '(' have incorrect indentation level 6, expected level should be 12.",
+            "246: 'if lparen' have incorrect indentation level 6, expected level should be 8.",
+            "248: 'if rparen' have incorrect indentation level 6, expected level should be 8.",
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testInvalidWhileWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputInvalidWhileIndent.java");
+        final String[] expected = {
+            "21: 'while' have incorrect indentation level 9, expected level should be 8.",
+            "22: 'while rcurly' have incorrect indentation level 7, expected level should be 8.",
+            "24: 'while' have incorrect indentation level 7, expected level should be 8.",
+            "25: 'while lcurly' have incorrect indentation level 9, expected level should be 8.",
+            "26: 'while rcurly' have incorrect indentation level 9, expected level should be 8.",
+            "28: 'while' have incorrect indentation level 9, expected level should be 8.",
+            "29: 'while lcurly' have incorrect indentation level 6, expected level should be 8.",
+            "30: 'while' child have incorrect indentation level 14, expected level should be 12.",
+            "31: 'while rcurly' have incorrect indentation level 6, expected level should be 8.",
+            "33: 'while' have incorrect indentation level 10, expected level should be 8.",
+            "35: 'while rcurly' have incorrect indentation level 10, expected level should be 8.",
+            "37: 'while' have incorrect indentation level 10, expected level should be 8.",
+            "40: 'while rcurly' have incorrect indentation level 10, expected level should be 8.",
+            "42: 'while' have incorrect indentation level 6, expected level should be 8.",
+            "43: 'while lcurly' have incorrect indentation level 10, expected level should be 8.",
+            "46: 'while rcurly' have incorrect indentation level 6, expected level should be 8.",
+            "49: 'if' have incorrect indentation level 14, expected level should be 12.",
+            "50: 'if' child have incorrect indentation level 18, expected level should be 16.",
+            "51: 'if rcurly' have incorrect indentation level 14, expected level should be 12.",
+            "52: 'while' child have incorrect indentation level 14, expected level should be 12.",
+            "53: 'while rcurly' have incorrect indentation level 10, expected level should be 8.",
+            "56: 'while' child have incorrect indentation level 10, expected level should be 12.",
+            "62: 'while' child have incorrect indentation level 10, expected level should be 12.",
+            "67: 'while' child have incorrect indentation level 10, expected level should be 12.",
+            "74: 'while rparen' have incorrect indentation level 5, expected level should be 8.",
+            "81: 'while rparen' have incorrect indentation level 10, expected level should be 8.",
+            "88: 'while rparen' have incorrect indentation level 10, expected level should be 8.",
+            "95: 'while' child have incorrect indentation level 8, expected level should be 12.",
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testInvalidForWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputInvalidForIndent.java");
+        final String[] expected = {
+            "22: 'for' have incorrect indentation level 6, expected level should be 8.",
+            "23: 'for rcurly' have incorrect indentation level 10, expected level should be 8.",
+            "25: 'for' have incorrect indentation level 9, expected level should be 8.",
+            "26: 'for lcurly' have incorrect indentation level 6, expected level should be 8.",
+            "27: 'for rcurly' have incorrect indentation level 6, expected level should be 8.",
+            "31: 'for' child have incorrect indentation level 10, expected level should be 12.",
+            "31: 'method call' child have incorrect indentation level 10, expected level should be 12.",
+            "32: 'for rcurly' have incorrect indentation level 10, expected level should be 8.",
+            "35: 'for lcurly' have incorrect indentation level 10, expected level should be 8.",
+            "36: 'for' child have incorrect indentation level 10, expected level should be 12.",
+            "36: 'member def type' have incorrect indentation level 10, expected level should be 12.",
+            "44: 'for' child have incorrect indentation level 10, expected level should be 12.",
+            "44: 'i' have incorrect indentation level 10, expected level should be 12.",
+            "50: 'for' have incorrect indentation level 7, expected level should be 8.",
+            "51: 'for' child have incorrect indentation level 10, expected level should be 12.",
+            "51: 'int' have incorrect indentation level 10, expected level should be 11.",
+            "51: 'member def type' have incorrect indentation level 10, expected level should be 12.",
+            "60: 'for' child have incorrect indentation level 7, expected level should be 12.",
+            "60: 'i' have incorrect indentation level 7, expected level should be 12.",
+            "65: 'for' have incorrect indentation level 6, expected level should be 8.",
+            "66: 'for' child have incorrect indentation level 10, expected level should be 12.",
+            "67: 'for' child have incorrect indentation level 14, expected level should be 16.",
+            "68: 'for' child have incorrect indentation level 10, expected level should be 12.",
+            "73: 'for rcurly' have incorrect indentation level 39, expected level should be 8.",
+            "77: 'for rparen' have incorrect indentation level 12, expected level should be 8.",
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testValidForWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputValidForIndent.java");
+        final String[] expected = {
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testValidDoWhileWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputValidDoWhileIndent.java");
+        final String[] expected = {
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testValidBlockWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputValidBlockIndent.java");
+        final String[] expected = {
+        };
+        verify(c, fname, expected);
+    }
+
+
+    @Test
+    public void testValidWhileWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputValidWhileIndent.java");
+        final String[] expected = {
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testValidClassDefWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputValidClassDefIndent.java");
+        final String[] expected = {
+            "46: 'class' have incorrect indentation level 0, expected level should be 4.",
+            "68: 'int' have incorrect indentation level 8, expected level should be 12.",
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testValidInterfaceDefWithChecker()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputValidInterfaceDefIndent.java");
+        final String[] expected = {
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testValidCommaWithChecker()
+        throws Exception
+    {
+
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final Checker c = createChecker(checkConfig);
+        final String fname = getPath("indentation/InputValidCommaIndent.java");
+        final String[] expected = {
+        };
+        verify(c, fname, expected);
+    }
+
+    @Test
+    public void testTabs() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        checkConfig.addAttribute("basicOffset", Integer.valueOf(4).toString());
+        checkConfig.addAttribute("tabWidth", Integer.valueOf(4).toString());
+        final String[] expected = {
+            "25: 'ctor def' child have incorrect indentation level 9, expected level should be 8.",
+        };
+        verify(checkConfig, getPath("indentation/InputUseTabs.java"), expected);
+    }
+
+    @Test
+    public void testIndentationLevel() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        checkConfig.addAttribute("basicOffset", Integer.valueOf(2).toString());
+        checkConfig.addAttribute("lineWrappingIndentation", Integer.valueOf(2).toString());
+        final String[] expected = {
+            "25: 'ctor def' child have incorrect indentation level 5, expected level should be 4.",
+        };
+        verify(checkConfig, getPath("indentation/InputUseTwoSpaces.java"), expected);
+    }
+
+    @Test
+    public void testThrowsIndentationLevel() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        checkConfig.addAttribute("throwsIndent", Integer.valueOf(8).toString());
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("indentation/InvalidInputThrowsIndent.java"), expected);
+    }
+
+    @Test
+    public void testCaseLevel() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        checkConfig.addAttribute("caseIndent", Integer.valueOf(0).toString());
+        final String[] expected = {
+            "23: 'case' child have incorrect indentation level 10, expected level should be 8.",
+        };
+        verify(checkConfig, getPath("indentation/InputCaseLevel.java"), expected);
+    }
+
+    @Test
+    public void testBraceAdjustment() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        checkConfig.addAttribute("braceAdjustment", Integer.valueOf(2).toString());
+        final String[] expected = {
+            "24: 'if rcurly' have incorrect indentation level 8, expected level should be 10.",
+        };
+        verify(checkConfig, getPath("indentation/InputBraceAdjustment.java"), expected);
+    }
+
+    @Test
+    public void testInvalidAssignWithChecker() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final String[] expected = {
+            "8: 'getLineNo' have incorrect indentation level 10, expected level should be 12.",
+            "10: 'getLine' have incorrect indentation level 10, expected level should be 12.",
+            "14: '=' have incorrect indentation level 9, expected level should be 12.",
+            "15: '1' have incorrect indentation level 10, expected level should be 12.",
+        };
+        verify(checkConfig, getPath("indentation/InputInvalidAssignIndent.java"), expected);
+    }
+
+    @Test
+    public void testValidAssignWithChecker() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("indentation/InputValidAssignIndent.java"), expected);
+    }
+
+    @Test
+    public void test15Extensions() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("Input15Extensions.java"), expected);
+    }
+
+    @Test
+    public void testTryResources() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(IndentationCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("indentation/InputValidTryResourcesIndent.java"),
+               expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/NewHandlerTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/NewHandlerTest.java
new file mode 100644
index 0000000..06537f6
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/NewHandlerTest.java
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.indentation;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+/**
+ * @author Ilja Dubinin
+ */
+public class NewHandlerTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testInvalidLabel() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(IndentationCheck.class);
+        final String[] expected = {
+
+        };
+        verify(checkConfig, getPath("indentation/NewHandlerTestInput.java"),
+                expected);
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/BadCls.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/BadCls.java
new file mode 100644
index 0000000..a7e834e
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/BadCls.java
@@ -0,0 +1,6 @@
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+class BadCls {
+    class X extends Exception {}
+    void m() throws X {}
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/InputTags.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/InputTags.java
new file mode 100644
index 0000000..41c817c
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/InputTags.java
@@ -0,0 +1,368 @@
+////////////////////////////////////////////////////////////////////////////////
+//Test case file for checkstyle.
+//Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+import java.io.IOException;
+// Tests for Javadoc tags.
+class InputTags1
+{
+    // Invalid - should be Javadoc
+    private int mMissingJavadoc;
+
+    // Invalid - should be Javadoc
+    void method1()
+    {
+    }
+
+    /** @param unused asd **/
+    void method2()
+    {
+    }
+
+    /** missing return **/
+    int method3()
+    {
+        return 3;
+    }
+
+    /**
+     * <p>missing return
+     * @param aOne ignored
+     **/
+    int method4(int aOne)
+    {
+        return aOne;
+    }
+
+    /** missing throws **/
+    void method5()
+        throws Exception
+    {
+    }
+
+    /**
+     * @see missing throws
+     * @see need to see tags to avoid shortcut logic
+     **/
+    void method6()
+        throws Exception
+    {
+    }
+
+    /** @throws WrongException error **/
+    void method7()
+        throws Exception, NullPointerException
+    {
+    }
+
+    /** missing param **/
+    void method8(int aOne)
+    {
+    }
+
+    /**
+     * @see missing param
+     * @see need to see tags to avoid shortcut logic
+     **/
+    void method9(int aOne)
+    {
+    }
+
+    /** @param WrongParam error **/
+    void method10(int aOne, int aTwo)
+    {
+    }
+
+    /**
+     * @param Unneeded parameter
+     * @return also unneeded
+     **/
+    void method11()
+    {
+    }
+
+    /**
+     * @return first one
+     * @return duplicate
+     **/
+    int method12()
+    {
+        return 0;
+    }
+
+    /**
+     * @param aOne
+     * @param aTwo
+     *
+     *     This is a multiline piece of javadoc
+     *     Unlike the previous one, it actually has content
+     * @param aThree
+     *
+     *
+     *     This also has content
+     * @param aFour
+
+     *
+     * @param aFive
+     **/
+    void method13(int aOne, int aTwo, int aThree, int aFour, int aFive)
+    {
+    }
+
+    /** @param aOne Perfectly legal **/
+    void method14(int aOne)
+    {
+    }
+
+    /** @throws java.io.IOException
+     *               just to see if this is also legal **/
+    void method14()
+       throws java.io.IOException
+    {
+    }
+
+
+
+    // Test static initialiser
+    static
+    {
+        int x = 1; // should not require any javadoc
+    }
+
+    // test initialiser
+    {
+        int z = 2; // should not require any javadoc
+    }
+
+    /** handle where variable declaration over several lines **/
+    private static final int
+        ON_SECOND_LINE = 2;
+
+
+    /**
+     * Documenting different causes for the same exception
+     * in separate tags is OK (bug 540384).
+     *
+     * @throws java.io.IOException if A happens
+     * @throws java.io.IOException if B happens
+     **/
+    void method15()
+       throws java.io.IOException
+    {
+    }
+
+    /** {@inheritDoc} **/
+    public String toString()
+    {
+        return super.toString();
+    }
+
+    /** getting code coverage up **/
+    static final int serialVersionUID = 666;
+
+    //**********************************************************************/
+    // Method Name: method16
+    /**
+     * handle the case of an elaborate header surrounding javadoc comments
+     *
+     * @param aOne valid parameter content
+     */
+    //**********************************************************************/
+    void method16(int aOne)
+    {
+    }
+
+
+    /**
+     * @throws ThreadDeath although bad practice, should be silently ignored
+     * @throws ArrayStoreException another r/t subclass
+     * @throws IllegalMonitorStateException should be told to remove from throws
+     */
+    void method17()
+        throws IllegalMonitorStateException
+    {
+    }
+
+    /**
+     * declaring the imported version of an Exception and documenting
+     * the full class name is OK (bug 658805).
+     * @throws java.io.IOException if bad things happen.
+     */
+    void method18()
+        throws IOException
+    {
+        throw new IOException("to make compiler happy");
+    }
+
+    /**
+     * reverse of bug 658805.
+     * @throws IOException if bad things happen.
+     */
+    void method19()
+        throws java.io.IOException
+    {
+        throw new IOException("to make compiler happy");
+    }
+
+    /**
+     * Bug 579190, "expected return tag when one is there".
+     *
+     * Linebreaks after return tag should be legal.
+     *
+     * @return
+     *   the bug that states that linebreak should be legal
+     */
+    int method20()
+    {
+        return 579190;
+    }
+
+    /**
+     * Bug XXX, "two tags for the same exception"
+     *
+     * @exception java.io.IOException for some reasons
+     * @exception IOException for another reason
+     */
+    void method21()
+       throws IOException
+    {
+    }
+
+    /**
+     * RFE 540383, "Unused throws tag for exception subclass"
+     *
+     * @exception IOException for some reasons
+     * @exception java.io.FileNotFoundException for another reasons
+     */
+    void method22()
+       throws IOException
+    {
+    }
+
+    /**
+     * @exception WrongException exception w/o class info but matched by name
+     */
+    void method23() throws WrongException
+    {
+    }
+
+    /**
+     * Bug 803577, "allowThrowsTagsForSubclasses/allowMissingThrowsTag interfere"
+     *
+     * no exception tag for IOException, but here is a tag for its subclass.
+     * @exception java.io.FileNotFoundException for another reasons
+     */
+    void method24() throws IOException
+    {
+    }
+
+    /**
+     * Bug 841942, "ArrayIndexOutOfBounds in JavadocStyle".
+     * @param aParam there is no such param in the method.
+     * The problem should be reported with correct line number.
+     */
+
+    void method25()
+    {
+    }
+
+    /** {@inheritDoc} */
+    int method26()
+    { return 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     * @return something very important.
+     */
+    int method27(int aParam)
+    { return 0;
+    }
+
+    /**
+     * @return something very important.
+     * {@inheritDoc}
+     */
+    int method28(int aParam)
+    { return 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @return 1
+     */
+    public int foo(Object _arg) {
+
+        return 1;
+    }
+}
+
+enum InputTagsEnum
+{
+    CONSTANT_A,
+
+    /**
+     *
+     */
+    CONSTANT_B,
+
+    CONSTANT_C
+    {
+        /**
+         *
+         */
+        public void someMethod()
+        {
+        }
+
+        public void someOtherMethod()
+        {
+
+        }
+    }
+}
+
+ at interface InputTagsAnnotation
+{
+    String someField();
+    int A_CONSTANT = 0;
+    /** Some javadoc. */
+    int B_CONSTANT = 1;
+    /** @return This tag is not valid here */
+    String someField2();
+}
+
+/**
+ * Some javadoc.
+ */
+public class InputTags {
+
+    /**
+     * Constructor.
+     */
+    public InputTags() {
+    }
+
+   /**
+    * Sample method.
+    * @param arg1   first argument
+    * @param arg2   second argument
+    * @return java.lang.String      the result string
+    * @throws java.lang.Exception   in case of problem
+    */
+    public final String myMethod(final String arg1,
+                                 final Object arg2)
+      throws Exception
+    {
+        return null;
+    }
+}
+
+/**
+ *  Added to make this file compilable.
+ */
+class WrongException extends RuntimeException
+{
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/Input_01.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/Input_01.java
new file mode 100644
index 0000000..0d24394
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/Input_01.java
@@ -0,0 +1,43 @@
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+
+/** Test 1. */
+public class Input_01 {
+
+    /** Do 1.
+     * @throws TestException1 when error occurrs.
+     */
+    public void doStuff1() throws TestException1 {
+        try {
+            doStuff2();
+        } catch (final TestException2 e) { }
+        throw new Input_01().new TestException1("");
+    }
+    /** Do 2.
+     * @throws TestException2 when error occurrs.
+     */
+    private static void doStuff2() throws TestException2 {
+        throw new TestException2("");
+    }
+    /** Exception 1.
+     */
+    class TestException1 extends Exception {
+        /** Exception 1.
+         * @param messg message
+         */
+        TestException1(String messg) {
+            super(messg);
+        }
+    }
+    /** Exception 2.
+     */
+    public static class TestException2 extends Exception {
+        /** Exception 2.
+         * @param messg message
+         */
+        TestException2(String messg) {
+            super(messg);
+        }
+    }
+}
+
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/Input_02.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/Input_02.java
new file mode 100644
index 0000000..8a0326d
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/Input_02.java
@@ -0,0 +1,40 @@
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+/** Test 2. */
+public class Input_02 {
+
+    /** Exception 1.
+     */
+    class TestException1 extends Exception {
+        /** Exception 1.
+         * @param messg message
+         */
+        TestException1(String messg) {
+            super(messg);
+        }
+    }
+    /** Exception 2.
+     */
+    public static class TestException2 extends Exception {
+        /** Exception 2.
+         * @param messg message
+         */
+        TestException2(String messg) {
+            super(messg);
+        }
+    }
+    /** Do 1.
+     * @throws TestException1 when error occurrs.
+     */
+    public void doStuff1() throws TestException1 {
+        try {
+            doStuff2();
+        } catch (final TestException2 e) { }
+        throw new Input_02().new TestException1("");
+    }
+    /** Do 2.
+     * @throws TestException2 when error occurrs.
+     */
+    private static void doStuff2() throws TestException2 {
+        throw new TestException2("");
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/Input_03.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/Input_03.java
new file mode 100644
index 0000000..257ab03
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/Input_03.java
@@ -0,0 +1,41 @@
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+/** Test 3. */
+public class Input_03 {
+
+    /** Do 1.
+     * @throws TestException1 when error occurrs.
+     * @throws TestException2 when error occurrs.
+     */
+    public void doStuff1() throws TestException1, TestException2 {
+        try {
+            doStuff2();
+        } catch (final TestException2 e) { }
+        throw new Input_03().new TestException1("");
+    }
+    /** Do 2.
+     * @throws TestException2 when error occurrs.
+     */
+    private static void doStuff2() throws TestException2 {
+        throw new TestException2("");
+    }
+    /** Exception 1.
+     */
+    class TestException1 extends Exception {
+        /** Exception 1.
+         * @param messg message
+         */
+        TestException1(String messg) {
+            super(messg);
+        }
+    }
+    /** Exception 2.
+     */
+    public static class TestException2 extends Exception {
+        /** Exception 2.
+         * @param messg message
+         */
+        TestException2(String messg) {
+            super(messg);
+        }
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/Input_1379666.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/Input_1379666.java
new file mode 100644
index 0000000..8d21841
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/Input_1379666.java
@@ -0,0 +1,40 @@
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+/**
+ * comment.
+ */
+public class Input_1379666 {
+    /**
+     * @throws BadStringFormat some text
+     */
+    public void ok() throws BadStringFormat {
+    }
+
+    /**
+     * @throws Input_1379666.BadStringFormat some text
+     */
+    public void error1()
+        throws com.puppycrawl.tools.checkstyle.checks.javadoc.Input_1379666.BadStringFormat
+    {
+    }
+
+    /**
+     * Some comment.
+     * @throws com.puppycrawl.tools.checkstyle.checks.javadoc.Input_1379666.BadStringFormat some text
+     */
+    public void error2() throws Input_1379666.BadStringFormat {
+    }
+
+    /**
+     * Some exception class.
+     */
+    public static class BadStringFormat extends Exception {
+        /**
+         * Some comment.
+         * @param s string.
+         */
+        BadStringFormat(String s) {
+            super(s);
+        }
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheckTest.java
new file mode 100644
index 0000000..04baeec
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheckTest.java
@@ -0,0 +1,464 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import java.io.File;
+import org.junit.Before;
+import org.junit.Test;
+
+public class JavadocMethodCheckTest extends BaseCheckTestSupport
+{
+    private DefaultConfiguration mCheckConfig;
+
+    @Before
+    public void setUp()
+    {
+        mCheckConfig = createCheckConfig(JavadocMethodCheck.class);
+    }
+
+    @Test
+    public void testTags() throws Exception
+    {
+        final String[] expected = {
+            "14:5: Missing a Javadoc comment.",
+            "18:9: Unused @param tag for 'unused'.",
+            "24: Expected an @return tag.",
+            "33: Expected an @return tag.",
+            "40:16: Expected @throws tag for 'Exception'.",
+            "49:16: Expected @throws tag for 'Exception'.",
+            "53:9: Unused @throws tag for 'WrongException'.",
+            "55:16: Expected @throws tag for 'Exception'.",
+            "55:27: Expected @throws tag for 'NullPointerException'.",
+            "60:22: Expected @param tag for 'aOne'.",
+            "68:22: Expected @param tag for 'aOne'.",
+            "72:9: Unused @param tag for 'WrongParam'.",
+            "73:23: Expected @param tag for 'aOne'.",
+            "73:33: Expected @param tag for 'aTwo'.",
+            "78:8: Unused @param tag for 'Unneeded'.",
+            "79: Unused Javadoc tag.",
+            "87:8: Duplicate @return tag.",
+            "109:23: Expected @param tag for 'aOne'.",
+            "109:55: Expected @param tag for 'aFour'.",
+            "109:66: Expected @param tag for 'aFive'.",
+            "178:8: Unused @throws tag for 'ThreadDeath'.",
+            "179:8: Unused @throws tag for 'ArrayStoreException'.",
+            "236:8: Unused @throws tag for 'java.io.FileNotFoundException'.",
+            "254:8: Unused @throws tag for 'java.io.FileNotFoundException'.",
+            "256:28: Expected @throws tag for 'IOException'.",
+            "262:8: Unused @param tag for 'aParam'.",
+            "320:9: Missing a Javadoc comment.",
+            "329:5: Missing a Javadoc comment.",
+            "333: Unused Javadoc tag.",
+        };
+
+        verify(mCheckConfig, getSrcPath("checks/javadoc/InputTags.java"), expected);
+    }
+
+    @Test
+    public void testTagsWithResolver() throws Exception
+    {
+        mCheckConfig.addAttribute("allowUndeclaredRTE", "true");
+        final String[] expected = {
+            "14:5: Missing a Javadoc comment.",
+            "18:9: Unused @param tag for 'unused'.",
+            "24: Expected an @return tag.",
+            "33: Expected an @return tag.",
+            "40:16: Expected @throws tag for 'Exception'.",
+            "49:16: Expected @throws tag for 'Exception'.",
+            "55:16: Expected @throws tag for 'Exception'.",
+            "55:27: Expected @throws tag for 'NullPointerException'.",
+            "60:22: Expected @param tag for 'aOne'.",
+            "68:22: Expected @param tag for 'aOne'.",
+            "72:9: Unused @param tag for 'WrongParam'.",
+            "73:23: Expected @param tag for 'aOne'.",
+            "73:33: Expected @param tag for 'aTwo'.",
+            "78:8: Unused @param tag for 'Unneeded'.",
+            "79: Unused Javadoc tag.",
+            "87:8: Duplicate @return tag.",
+            "109:23: Expected @param tag for 'aOne'.",
+            "109:55: Expected @param tag for 'aFour'.",
+            "109:66: Expected @param tag for 'aFive'.",
+            "236:8: Unused @throws tag for 'java.io.FileNotFoundException'.",
+            "254:8: Unused @throws tag for 'java.io.FileNotFoundException'.",
+            "256:28: Expected @throws tag for 'IOException'.",
+            "262:8: Unused @param tag for 'aParam'.",
+            "320:9: Missing a Javadoc comment.",
+            "329:5: Missing a Javadoc comment.",
+            "333: Unused Javadoc tag.", };
+        verify(mCheckConfig, getSrcPath("checks/javadoc/InputTags.java"), expected);
+    }
+
+    @Test
+    public void testStrictJavadoc() throws Exception
+    {
+        final String[] expected = {
+            "12:9: Missing a Javadoc comment.",
+            "18:13: Missing a Javadoc comment.",
+            "25:13: Missing a Javadoc comment.",
+            "38:9: Missing a Javadoc comment.",
+            "49:5: Missing a Javadoc comment.",
+            "54:5: Missing a Javadoc comment.",
+            "59:5: Missing a Javadoc comment.",
+            "64:5: Missing a Javadoc comment.",
+            "69:5: Missing a Javadoc comment.",
+            "74:5: Missing a Javadoc comment.",
+            "79:5: Missing a Javadoc comment.",
+            "84:5: Missing a Javadoc comment.",
+            "94:32: Expected @param tag for 'aA'.",
+        };
+        verify(mCheckConfig, getPath("InputPublicOnly.java"), expected);
+    }
+
+    @Test
+    public void testNoJavadoc() throws Exception
+    {
+        mCheckConfig.addAttribute("scope", Scope.NOTHING.getName());
+        final String[] expected = {};
+        verify(mCheckConfig, getPath("InputPublicOnly.java"), expected);
+    }
+
+    // pre 1.4 relaxed mode is roughly equivalent with check=protected
+    @Test
+    public void testRelaxedJavadoc() throws Exception
+    {
+        mCheckConfig.addAttribute("scope", Scope.PROTECTED.getName());
+        final String[] expected = {
+            "59:5: Missing a Javadoc comment.",
+            "64:5: Missing a Javadoc comment.",
+            "79:5: Missing a Javadoc comment.",
+            "84:5: Missing a Javadoc comment.",
+        };
+        verify(mCheckConfig, getPath("InputPublicOnly.java"), expected);
+    }
+
+    @Test
+    public void testScopeInnerInterfacesPublic() throws Exception
+    {
+        mCheckConfig.addAttribute("scope", Scope.PUBLIC.getName());
+        final String[] expected = {
+            "43:9: Missing a Javadoc comment.",
+            "44:9: Missing a Javadoc comment.",
+        };
+        verify(mCheckConfig, getPath("InputScopeInnerInterfaces.java"), expected);
+    }
+
+    @Test
+    public void testScopeAnonInnerPrivate() throws Exception
+    {
+        mCheckConfig.addAttribute("scope", Scope.PRIVATE.getName());
+        final String[] expected = {};
+        verify(mCheckConfig, getPath("InputScopeAnonInner.java"), expected);
+    }
+
+    @Test
+    public void testScopeAnonInnerAnonInner() throws Exception
+    {
+        mCheckConfig.addAttribute("scope", Scope.ANONINNER.getName());
+        final String[] expected = {
+            "26:9: Missing a Javadoc comment.",
+            "39:17: Missing a Javadoc comment.",
+            "53:17: Missing a Javadoc comment.", };
+        verify(mCheckConfig, getPath("InputScopeAnonInner.java"), expected);
+    }
+
+    @Test
+    public void testScopeAnonInnerWithResolver() throws Exception
+    {
+        mCheckConfig.addAttribute("allowUndeclaredRTE", "true");
+        final String[] expected = {};
+        verify(mCheckConfig, getPath("InputScopeAnonInner.java"), expected);
+    }
+
+    @Test
+    public void testTagsWithSubclassesAllowed() throws Exception
+    {
+        mCheckConfig.addAttribute("allowThrowsTagsForSubclasses", "true");
+        final String[] expected = {
+            "14:5: Missing a Javadoc comment.",
+            "18:9: Unused @param tag for 'unused'.",
+            "24: Expected an @return tag.",
+            "33: Expected an @return tag.",
+            "40:16: Expected @throws tag for 'Exception'.",
+            "49:16: Expected @throws tag for 'Exception'.",
+            "55:16: Expected @throws tag for 'Exception'.",
+            "55:27: Expected @throws tag for 'NullPointerException'.",
+            "60:22: Expected @param tag for 'aOne'.",
+            "68:22: Expected @param tag for 'aOne'.",
+            "72:9: Unused @param tag for 'WrongParam'.",
+            "73:23: Expected @param tag for 'aOne'.",
+            "73:33: Expected @param tag for 'aTwo'.",
+            "78:8: Unused @param tag for 'Unneeded'.",
+            "79: Unused Javadoc tag.",
+            "87:8: Duplicate @return tag.",
+            "109:23: Expected @param tag for 'aOne'.",
+            "109:55: Expected @param tag for 'aFour'.",
+            "109:66: Expected @param tag for 'aFive'.",
+            "178:8: Unused @throws tag for 'ThreadDeath'.",
+            "179:8: Unused @throws tag for 'ArrayStoreException'.",
+            "256:28: Expected @throws tag for 'IOException'.",
+            "262:8: Unused @param tag for 'aParam'.",
+            "320:9: Missing a Javadoc comment.",
+            "329:5: Missing a Javadoc comment.",
+            "333: Unused Javadoc tag.", };
+        verify(mCheckConfig, getSrcPath("checks/javadoc/InputTags.java"), expected);
+    }
+
+    @Test
+    public void testScopes() throws Exception
+    {
+        final String[] expected = {
+            "10:5: Missing a Javadoc comment.",
+            "11:5: Missing a Javadoc comment.",
+            "12:5: Missing a Javadoc comment.",
+            "13:5: Missing a Javadoc comment.",
+            "21:9: Missing a Javadoc comment.",
+            "22:9: Missing a Javadoc comment.",
+            "23:9: Missing a Javadoc comment.",
+            "24:9: Missing a Javadoc comment.",
+            "33:9: Missing a Javadoc comment.",
+            "34:9: Missing a Javadoc comment.",
+            "35:9: Missing a Javadoc comment.",
+            "36:9: Missing a Javadoc comment.",
+            "45:9: Missing a Javadoc comment.",
+            "46:9: Missing a Javadoc comment.",
+            "47:9: Missing a Javadoc comment.",
+            "48:9: Missing a Javadoc comment.",
+            "58:5: Missing a Javadoc comment.",
+            "59:5: Missing a Javadoc comment.",
+            "60:5: Missing a Javadoc comment.",
+            "61:5: Missing a Javadoc comment.",
+            "69:9: Missing a Javadoc comment.",
+            "70:9: Missing a Javadoc comment.",
+            "71:9: Missing a Javadoc comment.",
+            "72:9: Missing a Javadoc comment.",
+            "81:9: Missing a Javadoc comment.",
+            "82:9: Missing a Javadoc comment.",
+            "83:9: Missing a Javadoc comment.",
+            "84:9: Missing a Javadoc comment.",
+            "93:9: Missing a Javadoc comment.",
+            "94:9: Missing a Javadoc comment.",
+            "95:9: Missing a Javadoc comment.",
+            "96:9: Missing a Javadoc comment.",
+            "105:9: Missing a Javadoc comment.",
+            "106:9: Missing a Javadoc comment.",
+            "107:9: Missing a Javadoc comment.",
+            "108:9: Missing a Javadoc comment.", };
+        verify(mCheckConfig, getPath("javadoc" + File.separator
+                                    + "InputNoJavadoc.java"), expected);
+    }
+
+    @Test
+    public void testScopes2() throws Exception
+    {
+        mCheckConfig.addAttribute("scope", Scope.PROTECTED.getName());
+        final String[] expected = {
+            "10:5: Missing a Javadoc comment.",
+            "11:5: Missing a Javadoc comment.",
+            "21:9: Missing a Javadoc comment.",
+            "22:9: Missing a Javadoc comment.", };
+        verify(mCheckConfig, getPath("javadoc" + File.separator
+                                    + "InputNoJavadoc.java"), expected);
+    }
+
+    @Test
+    public void testExcludeScope() throws Exception
+    {
+        mCheckConfig.addAttribute("scope", Scope.PRIVATE.getName());
+        mCheckConfig.addAttribute("excludeScope", Scope.PROTECTED.getName());
+        final String[] expected = {
+            "12:5: Missing a Javadoc comment.",
+            "13:5: Missing a Javadoc comment.",
+            "23:9: Missing a Javadoc comment.",
+            "24:9: Missing a Javadoc comment.",
+            "33:9: Missing a Javadoc comment.",
+            "34:9: Missing a Javadoc comment.",
+            "35:9: Missing a Javadoc comment.",
+            "36:9: Missing a Javadoc comment.",
+            "45:9: Missing a Javadoc comment.",
+            "46:9: Missing a Javadoc comment.",
+            "47:9: Missing a Javadoc comment.",
+            "48:9: Missing a Javadoc comment.",
+            "58:5: Missing a Javadoc comment.",
+            "59:5: Missing a Javadoc comment.",
+            "60:5: Missing a Javadoc comment.",
+            "61:5: Missing a Javadoc comment.",
+            "69:9: Missing a Javadoc comment.",
+            "70:9: Missing a Javadoc comment.",
+            "71:9: Missing a Javadoc comment.",
+            "72:9: Missing a Javadoc comment.",
+            "81:9: Missing a Javadoc comment.",
+            "82:9: Missing a Javadoc comment.",
+            "83:9: Missing a Javadoc comment.",
+            "84:9: Missing a Javadoc comment.",
+            "93:9: Missing a Javadoc comment.",
+            "94:9: Missing a Javadoc comment.",
+            "95:9: Missing a Javadoc comment.",
+            "96:9: Missing a Javadoc comment.",
+            "105:9: Missing a Javadoc comment.",
+            "106:9: Missing a Javadoc comment.",
+            "107:9: Missing a Javadoc comment.",
+            "108:9: Missing a Javadoc comment.", };
+        verify(mCheckConfig, getPath("javadoc" + File.separator
+                                    + "InputNoJavadoc.java"), expected);
+    }
+
+    @Test
+    public void testAllowMissingJavadoc() throws Exception
+    {
+        mCheckConfig.addAttribute("allowMissingJavadoc", "true");
+        final String[] expected = {};
+        verify(mCheckConfig, getPath("javadoc" + File.separator
+                                    + "InputNoJavadoc.java"), expected);
+    }
+
+    @Test
+    public void testSetterGetterOff() throws Exception
+    {
+        final String[] expected = {
+            "7:5: Missing a Javadoc comment.",
+            "12:5: Missing a Javadoc comment.",
+            "17:5: Missing a Javadoc comment.",
+            "22:5: Missing a Javadoc comment.",
+            "28:5: Missing a Javadoc comment.",
+            "32:5: Missing a Javadoc comment.",
+            "37:5: Missing a Javadoc comment.",
+            "43:5: Missing a Javadoc comment.",
+            "48:5: Missing a Javadoc comment.",
+            "53:5: Missing a Javadoc comment.", };
+        verify(mCheckConfig, getPath("javadoc" + File.separator
+                                    + "InputSetterGetter.java"), expected);
+    }
+
+    @Test
+    public void testSetterGetterOn() throws Exception
+    {
+        mCheckConfig.addAttribute("allowMissingPropertyJavadoc", "true");
+        final String[] expected = {
+            "17:5: Missing a Javadoc comment.",
+            "22:5: Missing a Javadoc comment.",
+            "28:5: Missing a Javadoc comment.",
+            "32:5: Missing a Javadoc comment.",
+            "37:5: Missing a Javadoc comment.",
+            "43:5: Missing a Javadoc comment.",
+            "53:5: Missing a Javadoc comment.", };
+        verify(mCheckConfig, getPath("javadoc" + File.separator
+                                    + "InputSetterGetter.java"), expected);
+    }
+
+    @Test
+    public void testTypeParamsTags() throws Exception
+    {
+        final String[] expected = {
+            "26:8: Unused @param tag for '<BB>'.",
+            "28:13: Expected @param tag for '<Z>'.", };
+        verify(mCheckConfig, getPath("InputTypeParamsTags.java"), expected);
+    }
+
+    @Test
+    public void test_1168408_1() throws Exception
+    {
+        final String[] expected = {};
+        verify(mCheckConfig, getSrcPath("checks/javadoc/Input_01.java"), expected);
+    }
+
+    @Test
+    public void test_1168408_2() throws Exception
+    {
+        final String[] expected = {};
+        verify(mCheckConfig, getSrcPath("checks/javadoc/Input_02.java"), expected);
+    }
+
+    @Test
+    public void test_1168408_3() throws Exception
+    {
+        mCheckConfig.addAttribute("allowThrowsTagsForSubclasses", "true");
+        mCheckConfig.addAttribute("allowUndeclaredRTE", "true");
+        final String[] expected = {};
+        verify(mCheckConfig, getSrcPath("checks/javadoc/Input_03.java"), expected);
+    }
+
+    @Test
+    public void test_generics_1() throws Exception
+    {
+        mCheckConfig.addAttribute("allowThrowsTagsForSubclasses", "true");
+        mCheckConfig.addAttribute("allowUndeclaredRTE", "true");
+        final String[] expected = {
+            "17:34: Expected @throws tag for 'RE'.",
+            "33:13: Expected @param tag for '<NPE>'.",
+            "40:12: Unused @throws tag for 'E'.",
+            "43:38: Expected @throws tag for 'RuntimeException'.",
+            "44:13: Expected @throws tag for 'java.lang.RuntimeException'.",
+        };
+        verify(mCheckConfig, getPath("javadoc/TestGenerics.java"), expected);
+    }
+
+    @Test
+    public void test_generics_2() throws Exception
+    {
+        mCheckConfig.addAttribute("allowThrowsTagsForSubclasses", "true");
+        final String[] expected = {
+            "17:34: Expected @throws tag for 'RE'.",
+            "33:13: Expected @param tag for '<NPE>'.",
+            "40:12: Unused @throws tag for 'E'.",
+            "43:38: Expected @throws tag for 'RuntimeException'.",
+            "44:13: Expected @throws tag for 'java.lang.RuntimeException'.",
+        };
+        verify(mCheckConfig, getPath("javadoc/TestGenerics.java"), expected);
+    }
+
+    @Test
+    public void test_generics_3() throws Exception
+    {
+        final String[] expected = {
+            "8:8: Unused @throws tag for 'RE'.",
+            "17:34: Expected @throws tag for 'RE'.",
+            "33:13: Expected @param tag for '<NPE>'.",
+            "40:12: Unused @throws tag for 'E'.",
+            "43:38: Expected @throws tag for 'RuntimeException'.",
+            "44:13: Expected @throws tag for 'java.lang.RuntimeException'.",
+        };
+        verify(mCheckConfig, getPath("javadoc/TestGenerics.java"), expected);
+    }
+
+    @Test
+    public void test_1379666() throws Exception
+    {
+        mCheckConfig.addAttribute("allowThrowsTagsForSubclasses", "true");
+        mCheckConfig.addAttribute("allowUndeclaredRTE", "true");
+        final String[] expected = {};
+        verify(mCheckConfig, getSrcPath("checks/javadoc/Input_1379666.java"), expected);
+    }
+
+    @Test
+    public void testInheritDoc() throws Exception
+    {
+        final String[] expected = {
+            "6:5: Invalid use of the {@inheritDoc} tag.",
+            "11:5: Invalid use of the {@inheritDoc} tag.",
+            "31:5: Invalid use of the {@inheritDoc} tag.",
+            "36:5: Invalid use of the {@inheritDoc} tag.",
+            "41:5: Invalid use of the {@inheritDoc} tag.",
+            "46:5: Invalid use of the {@inheritDoc} tag.",
+        };
+        verify(mCheckConfig, getPath("javadoc/InputInheritDoc.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocPackageCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocPackageCheckTest.java
new file mode 100644
index 0000000..b081749
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocPackageCheckTest.java
@@ -0,0 +1,97 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import org.junit.Test;
+
+
+public class JavadocPackageCheckTest
+    extends BaseCheckTestSupport
+{
+    @Override
+    protected DefaultConfiguration createCheckerConfig(
+        Configuration aCheckConfig)
+    {
+        final DefaultConfiguration dc = new DefaultConfiguration("root");
+        dc.addChild(aCheckConfig);
+        return dc;
+    }
+
+    @Test
+    public void testMissing() throws Exception
+    {
+        final Configuration checkConfig = createCheckConfig(JavadocPackageCheck.class);
+        final String[] expected = {
+            "0: Missing package-info.java file.",
+        };
+        verify(
+            createChecker(checkConfig),
+            getSrcPath("checks/javadoc/BadCls.java"),
+            getSrcPath("checks/javadoc/BadCls.java"),
+            expected);
+    }
+
+    @Test
+    public void testBoth() throws Exception
+    {
+        final Configuration checkConfig = createCheckConfig(JavadocPackageCheck.class);
+        final String[] expected = {
+            "0: Legacy package.html file should be removed.",
+        };
+        verify(createChecker(checkConfig),
+            getPath("javadoc/bothfiles/Ignored.java"),
+            getPath("javadoc/bothfiles/Ignored.java"), expected);
+    }
+
+    @Test
+    public void testHtmlDisallowed() throws Exception
+    {
+        final Configuration checkConfig = createCheckConfig(JavadocPackageCheck.class);
+        final String[] expected = {
+            "0: Missing package-info.java file.",
+        };
+        verify(createChecker(checkConfig),
+            getPath("javadoc/pkghtml/Ignored.java"),
+            getPath("javadoc/pkghtml/Ignored.java"), expected);
+    }
+
+    @Test
+    public void testHtmlAllowed() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(JavadocPackageCheck.class);
+        checkConfig.addAttribute("allowLegacy", "true");
+        final String[] expected = {};
+        verify(createChecker(checkConfig),
+            getPath("javadoc/pkghtml/Ignored.java"),
+            getPath("javadoc/pkghtml/package-info.java"), expected);
+    }
+
+    @Test
+    public void testAnnotation() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(JavadocPackageCheck.class);
+        final String[] expected = {};
+        verify(createChecker(checkConfig),
+            getPath("javadoc/pkginfo/annotation/package-info.java"),
+            getPath("javadoc/pkginfo/annotation/package-info.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheckTest.java
new file mode 100644
index 0000000..516a037
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheckTest.java
@@ -0,0 +1,353 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import java.io.File;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+
+public class JavadocStyleCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefaultSettings()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocStyleCheck.class);
+        final String[] expected =
+        {
+            "20: First sentence should end with a period.",
+            "53: First sentence should end with a period.",
+            "63:11: Unclosed HTML tag found: <b>This guy is missing end of bold tag",
+            "66:7: Extra HTML tag found: </td>Extra tag shouldn't be here",
+            "68:19: Unclosed HTML tag found: <code>dummy.",
+            "74: First sentence should end with a period.",
+            "75:23: Unclosed HTML tag found: <b>should fail",
+            "81: First sentence should end with a period.",
+            "82:31: Unclosed HTML tag found: <b>should fail",
+            "88: First sentence should end with a period.",
+            "89:31: Extra HTML tag found: </code>",
+            "90: Incomplete HTML tag found:     * should fail <",
+            "109:39: Extra HTML tag found: </img>",
+            "186:8: Unclosed HTML tag found: <blockquote>",
+            "193: First sentence should end with a period.",
+            "238: First sentence should end with a period.",
+            "335:33: Extra HTML tag found: </string>",
+        };
+
+        verify(checkConfig, getPath("InputJavadocStyleCheck.java"), expected);
+    }
+
+    @Test
+    public void testFirstSentence() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocStyleCheck.class);
+        checkConfig.addAttribute("checkFirstSentence", "true");
+        checkConfig.addAttribute("checkHtml", "false");
+        final String[] expected =
+        {
+            "20: First sentence should end with a period.",
+            "53: First sentence should end with a period.",
+            "74: First sentence should end with a period.",
+            "81: First sentence should end with a period.",
+            "88: First sentence should end with a period.",
+            "193: First sentence should end with a period.",
+            "238: First sentence should end with a period.",
+        };
+
+        verify(checkConfig, getPath("InputJavadocStyleCheck.java"), expected);
+    }
+
+    @Test
+    public void testFirstSentenceFormat() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocStyleCheck.class);
+        checkConfig.addAttribute("checkFirstSentence", "true");
+        checkConfig.addAttribute("checkHtml", "false");
+        checkConfig.addAttribute("endOfSentenceFormat",
+                "([.][ \t\n\r\f<])|([.]$)");
+        final String[] expected =
+        {
+            "20: First sentence should end with a period.",
+            "32: First sentence should end with a period.",
+            "39: First sentence should end with a period.",
+            "53: First sentence should end with a period.",
+            "74: First sentence should end with a period.",
+            "81: First sentence should end with a period.",
+            "88: First sentence should end with a period.",
+            "193: First sentence should end with a period.",
+            "238: First sentence should end with a period.",
+        };
+
+        verify(checkConfig, getPath("InputJavadocStyleCheck.java"), expected);
+    }
+
+    @Test
+    public void testHtml() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(JavadocStyleCheck.class);
+        checkConfig.addAttribute("checkFirstSentence", "false");
+        checkConfig.addAttribute("checkHtml", "true");
+        final String[] expected =
+        {
+            "63:11: Unclosed HTML tag found: <b>This guy is missing end of bold tag",
+            "66:7: Extra HTML tag found: </td>Extra tag shouldn't be here",
+            "68:19: Unclosed HTML tag found: <code>dummy.",
+            "75:23: Unclosed HTML tag found: <b>should fail",
+            "82:31: Unclosed HTML tag found: <b>should fail",
+            "89:31: Extra HTML tag found: </code>",
+            "90: Incomplete HTML tag found:     * should fail <",
+            "109:39: Extra HTML tag found: </img>",
+            "186:8: Unclosed HTML tag found: <blockquote>",
+            "335:33: Extra HTML tag found: </string>",
+        };
+
+        verify(checkConfig, getPath("InputJavadocStyleCheck.java"), expected);
+    }
+
+    @Test
+    public void testHtmlComment() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(JavadocStyleCheck.class);
+        checkConfig.addAttribute("checkFirstSentence", "false");
+        checkConfig.addAttribute("checkHtml", "true");
+        final String[] expected =
+        {
+        };
+
+        verify(checkConfig, getPath("InputJavadocStyleCheckHtmlComment.java"), expected);
+    }
+
+    @Test
+    public void testScopePublic()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocStyleCheck.class);
+        checkConfig.addAttribute("checkFirstSentence", "true");
+        checkConfig.addAttribute("checkHtml", "true");
+        checkConfig.addAttribute("checkEmptyJavadoc", "true");
+        checkConfig.addAttribute("scope", "public");
+        final String[] expected =
+        {
+            "88: First sentence should end with a period.",
+            "89:31: Extra HTML tag found: </code>",
+            "90: Incomplete HTML tag found:     * should fail <",
+            "205: Javadoc has empty description section.",
+            "230: Javadoc has empty description section.",
+            "238: First sentence should end with a period.",
+            "335:33: Extra HTML tag found: </string>",
+        };
+
+        verify(checkConfig, getPath("InputJavadocStyleCheck.java"), expected);
+    }
+
+    @Test
+    public void testScopeProtected()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocStyleCheck.class);
+        checkConfig.addAttribute("checkFirstSentence", "true");
+        checkConfig.addAttribute("checkHtml", "true");
+        checkConfig.addAttribute("checkEmptyJavadoc", "true");
+        checkConfig.addAttribute("scope", "protected");
+        final String[] expected =
+        {
+            "74: First sentence should end with a period.",
+            "75:23: Unclosed HTML tag found: <b>should fail",
+            "88: First sentence should end with a period.",
+            "89:31: Extra HTML tag found: </code>",
+            "90: Incomplete HTML tag found:     * should fail <",
+            "205: Javadoc has empty description section.",
+            "211: Javadoc has empty description section.",
+            "230: Javadoc has empty description section.",
+            "238: First sentence should end with a period.",
+            "335:33: Extra HTML tag found: </string>",
+        };
+
+        verify(checkConfig, getPath("InputJavadocStyleCheck.java"), expected);
+    }
+
+    @Test
+    public void testScopePackage()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocStyleCheck.class);
+        checkConfig.addAttribute("checkFirstSentence", "true");
+        checkConfig.addAttribute("checkHtml", "true");
+        checkConfig.addAttribute("checkEmptyJavadoc", "true");
+        checkConfig.addAttribute("scope", "package");
+        final String[] expected =
+        {
+            "74: First sentence should end with a period.",
+            "75:23: Unclosed HTML tag found: <b>should fail",
+            "81: First sentence should end with a period.",
+            "82:31: Unclosed HTML tag found: <b>should fail",
+            "88: First sentence should end with a period.",
+            "89:31: Extra HTML tag found: </code>",
+            "90: Incomplete HTML tag found:     * should fail <",
+            "205: Javadoc has empty description section.",
+            "211: Javadoc has empty description section.",
+            "218: Javadoc has empty description section.",
+            "230: Javadoc has empty description section.",
+            "238: First sentence should end with a period.",
+            "335:33: Extra HTML tag found: </string>",
+        };
+
+        verify(checkConfig, getPath("InputJavadocStyleCheck.java"), expected);
+    }
+
+    @Test
+    public void testEmptyJavadoc() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(JavadocStyleCheck.class);
+        checkConfig.addAttribute("checkFirstSentence", "false");
+        checkConfig.addAttribute("checkHtml", "false");
+        checkConfig.addAttribute("checkEmptyJavadoc", "true");
+        final String[] expected =
+        {
+            "205: Javadoc has empty description section.",
+            "211: Javadoc has empty description section.",
+            "218: Javadoc has empty description section.",
+            "225: Javadoc has empty description section.",
+            "230: Javadoc has empty description section.",
+        };
+
+        verify(checkConfig, getPath("InputJavadocStyleCheck.java"), expected);
+    }
+
+    @Test
+    public void testExcludeScope()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocStyleCheck.class);
+        checkConfig.addAttribute("scope", "private");
+        checkConfig.addAttribute("excludeScope", "protected");
+        final String[] expected =
+        {
+            "20: First sentence should end with a period.",
+            "53: First sentence should end with a period.",
+            "63:11: Unclosed HTML tag found: <b>This guy is missing end of bold tag",
+            "66:7: Extra HTML tag found: </td>Extra tag shouldn't be here",
+            "68:19: Unclosed HTML tag found: <code>dummy.",
+            "81: First sentence should end with a period.",
+            "82:31: Unclosed HTML tag found: <b>should fail",
+            "109:39: Extra HTML tag found: </img>",
+            "186:8: Unclosed HTML tag found: <blockquote>",
+            "193: First sentence should end with a period.",
+        };
+
+        verify(checkConfig, getPath("InputJavadocStyleCheck.java"), expected);
+    }
+
+    @Test
+    public void packageInfoInheritDoc() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocStyleCheck.class);
+        final String[] expected =
+        {
+            "1: First sentence should end with a period.",
+        };
+
+        String basePath = "javadoc" + File.separator
+            + "pkginfo" + File.separator + "invalidinherit" + File.separator;
+
+        verify(createChecker(checkConfig),
+               getPath(basePath + "package-info.java"),
+               expected);
+    }
+
+    @Test
+    public void packageInfoInvalid() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocStyleCheck.class);
+        final String[] expected =
+        {
+            "1: First sentence should end with a period.",
+        };
+
+        String basePath = "javadoc" + File.separator
+            + "pkginfo" + File.separator + "invalidformat" + File.separator;
+
+        verify(createChecker(checkConfig),
+               getPath(basePath + "package-info.java"),
+               expected);
+    }
+
+    @Test
+    public void packageInfoAnnotation() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocStyleCheck.class);
+        final String[] expected =
+        {
+        };
+
+        String basePath = "javadoc" + File.separator
+            + "pkginfo" + File.separator + "annotation" + File.separator;
+
+        verify(createChecker(checkConfig),
+               getPath(basePath + "package-info.java"),
+               expected);
+    }
+
+    @Test
+    public void packageInfoMissing() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocStyleCheck.class);
+        final String[] expected = {
+            "1: Missing a Javadoc comment.",
+        };
+
+        String basePath = "javadoc" + File.separator
+            + "bothfiles" + File.separator;
+
+        verify(createChecker(checkConfig),
+               getPath(basePath + "package-info.java"),
+               expected);
+    }
+
+    @Test
+    public void packageInfoValid() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocStyleCheck.class);
+        final String[] expected = {};
+
+        String basePath = "javadoc" + File.separator
+            + "pkginfo" + File.separator + "valid" + File.separator;
+
+        verify(createChecker(checkConfig),
+               getPath(basePath + "package-info.java"),
+               expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheckTest.java
new file mode 100644
index 0000000..8865a47
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheckTest.java
@@ -0,0 +1,363 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import java.io.File;
+import org.junit.Test;
+
+/**
+ * @author Oliver.Burn
+ *
+ * To change this generated comment edit the template variable "typecomment":
+ * Window>Preferences>Java>Templates.
+ * To enable and disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
+ */
+public class JavadocTypeCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testTags() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        final String[] expected =
+        {
+            "8: Missing a Javadoc comment.",
+            "302: Missing a Javadoc comment.",
+            "327: Missing a Javadoc comment.",
+        };
+        verify(checkConfig, getSrcPath("checks/javadoc/InputTags.java"), expected);
+    }
+
+    @Test
+    public void testInner() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        final String[] expected =
+        {
+            "14: Missing a Javadoc comment.",
+            "21: Missing a Javadoc comment.",
+            "27: Missing a Javadoc comment.",
+        };
+        verify(checkConfig, getPath("InputInner.java"), expected);
+    }
+
+    @Test
+    public void testStrict() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        final String[] expected =
+        {
+            "7: Missing a Javadoc comment.",
+            "9: Missing a Javadoc comment.",
+            "14: Missing a Javadoc comment.",
+            "34: Missing a Javadoc comment.",
+        };
+        verify(checkConfig, getPath("InputPublicOnly.java"), expected);
+    }
+
+    @Test
+    public void testProtected() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        checkConfig.addAttribute("scope", Scope.PROTECTED.getName());
+        final String[] expected =
+        {
+            "7: Missing a Javadoc comment.",
+        };
+        verify(checkConfig, getPath("InputPublicOnly.java"), expected);
+    }
+
+    @Test
+    public void testPublic() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        checkConfig.addAttribute("scope", Scope.PUBLIC.getName());
+        final String[] expected =
+        {
+            "7: Missing a Javadoc comment.",
+            "38: Missing a Javadoc comment.",
+        };
+        verify(checkConfig, getPath("InputScopeInnerInterfaces.java"), expected);
+    }
+
+    @Test
+    public void testProtest() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        checkConfig.addAttribute("scope", Scope.PROTECTED.getName());
+        final String[] expected =
+        {
+            "7: Missing a Javadoc comment.",
+            "29: Missing a Javadoc comment.",
+            "38: Missing a Javadoc comment.",
+            "65: Missing a Javadoc comment.",
+        };
+        verify(checkConfig, getPath("InputScopeInnerInterfaces.java"), expected);
+    }
+
+    @Test
+    public void testPkg() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        checkConfig.addAttribute(
+            "scope",
+            Scope.getInstance("package").getName());
+        final String[] expected =
+        {
+            "18: Missing a Javadoc comment.",
+            "20: Missing a Javadoc comment.",
+            "22: Missing a Javadoc comment.",
+        };
+        verify(checkConfig, getPath("InputScopeInnerClasses.java"), expected);
+    }
+
+    @Test
+    public void testEclipse() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        checkConfig.addAttribute(
+            "scope",
+            Scope.getInstance("public").getName());
+        final String[] expected =
+        {
+            "18: Missing a Javadoc comment.",
+        };
+        verify(checkConfig, getPath("InputScopeInnerClasses.java"), expected);
+    }
+
+    @Test
+    public void testAuthorRequired() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        checkConfig.addAttribute("authorFormat", "\\S");
+        final String[] expected =
+        {
+            "13: Type Javadoc comment is missing an @author tag.",
+        };
+        verify(checkConfig, getPath("InputWhitespace.java"), expected);
+    }
+
+    @Test
+    public void testAuthorRegularEx()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        checkConfig.addAttribute("authorFormat", "0*");
+        final String[] expected = {
+            "22: Type Javadoc comment is missing an @author tag.",
+            "58: Type Javadoc comment is missing an @author tag.",
+            "94: Type Javadoc comment is missing an @author tag.",
+        };
+        verify(checkConfig, getPath("InputJavadoc.java"), expected);
+    }
+
+    @Test
+    public void testAuthorRegularExError()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        checkConfig.addAttribute("authorFormat", "ABC");
+        final String[] expected = {
+            "13: Type Javadoc tag @author must match pattern 'ABC'.",
+            "22: Type Javadoc comment is missing an @author tag.",
+            "31: Type Javadoc tag @author must match pattern 'ABC'.",
+            "49: Type Javadoc tag @author must match pattern 'ABC'.",
+            "58: Type Javadoc comment is missing an @author tag.",
+            "67: Type Javadoc tag @author must match pattern 'ABC'.",
+            "85: Type Javadoc tag @author must match pattern 'ABC'.",
+            "94: Type Javadoc comment is missing an @author tag.",
+            "103: Type Javadoc tag @author must match pattern 'ABC'.",
+        };
+        verify(checkConfig, getPath("InputJavadoc.java"), expected);
+    }
+
+    @Test
+    public void testVersionRequired()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        checkConfig.addAttribute("versionFormat", "\\S");
+        final String[] expected = {
+            "13: Type Javadoc comment is missing an @version tag.",
+        };
+        verify(checkConfig, getPath("InputWhitespace.java"), expected);
+    }
+
+    @Test
+    public void testVersionRegularEx()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        checkConfig.addAttribute("versionFormat", "^\\p{Digit}+\\.\\p{Digit}+$");
+        final String[] expected = {
+            "22: Type Javadoc comment is missing an @version tag.",
+            "58: Type Javadoc comment is missing an @version tag.",
+            "94: Type Javadoc comment is missing an @version tag.",
+        };
+        verify(checkConfig, getPath("InputJavadoc.java"), expected);
+    }
+
+    @Test
+    public void testVersionRegularExError()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        checkConfig.addAttribute("versionFormat", "\\$Revision.*\\$");
+        final String[] expected = {
+            "13: Type Javadoc tag @version must match pattern '\\$Revision.*\\$'.",
+            "22: Type Javadoc comment is missing an @version tag.",
+            "31: Type Javadoc tag @version must match pattern '\\$Revision.*\\$'.",
+            "40: Type Javadoc tag @version must match pattern '\\$Revision.*\\$'.",
+            "49: Type Javadoc tag @version must match pattern '\\$Revision.*\\$'.",
+            "58: Type Javadoc comment is missing an @version tag.",
+            "67: Type Javadoc tag @version must match pattern '\\$Revision.*\\$'.",
+            "76: Type Javadoc tag @version must match pattern '\\$Revision.*\\$'.",
+            "85: Type Javadoc tag @version must match pattern '\\$Revision.*\\$'.",
+            "94: Type Javadoc comment is missing an @version tag.",
+            "103: Type Javadoc tag @version must match pattern '\\$Revision.*\\$'.",
+            "112: Type Javadoc tag @version must match pattern '\\$Revision.*\\$'.",
+        };
+        verify(checkConfig, getPath("InputJavadoc.java"), expected);
+    }
+
+    @Test
+    public void testScopes() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        final String[] expected = {
+            "3: Missing a Javadoc comment.",
+            "15: Missing a Javadoc comment.",
+            "27: Missing a Javadoc comment.",
+            "39: Missing a Javadoc comment.",
+            "52: Missing a Javadoc comment.",
+            "63: Missing a Javadoc comment.",
+            "75: Missing a Javadoc comment.",
+            "87: Missing a Javadoc comment.",
+            "99: Missing a Javadoc comment.",
+            "111: Missing a Javadoc comment.",
+        };
+        verify(checkConfig,
+               getPath("javadoc" + File.separator + "InputNoJavadoc.java"),
+               expected);
+    }
+
+    @Test
+    public void testScopes2() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        checkConfig.addAttribute("scope", Scope.PROTECTED.getName());
+        final String[] expected = {
+            "3: Missing a Javadoc comment.",
+            "15: Missing a Javadoc comment.",
+        };
+        verify(checkConfig,
+               getPath("javadoc" + File.separator + "InputNoJavadoc.java"),
+               expected);
+    }
+
+    @Test
+    public void testExcludeScope() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        checkConfig.addAttribute("scope", Scope.PRIVATE.getName());
+        checkConfig.addAttribute("excludeScope", Scope.PROTECTED.getName());
+        final String[] expected = {
+            "27: Missing a Javadoc comment.",
+            "39: Missing a Javadoc comment.",
+            "52: Missing a Javadoc comment.",
+            "63: Missing a Javadoc comment.",
+            "75: Missing a Javadoc comment.",
+            "87: Missing a Javadoc comment.",
+            "99: Missing a Javadoc comment.",
+            "111: Missing a Javadoc comment.",
+        };
+        verify(checkConfig,
+               getPath("javadoc" + File.separator + "InputNoJavadoc.java"),
+               expected);
+    }
+
+    @Test
+    public void testTypeParameters() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        final String[] expected = {
+            "7:4: Unused @param tag for '<D123>'.",
+            "11: Type Javadoc comment is missing an @param <C456> tag.",
+        };
+        verify(checkConfig, getPath("InputTypeParamsTags.java"), expected);
+    }
+    @Test
+    public void testAllowMissingTypeParameters() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        checkConfig.addAttribute("allowMissingParamTags", "true");
+        final String[] expected = {
+            "7:4: Unused @param tag for '<D123>'.",
+        };
+        verify(checkConfig, getPath("InputTypeParamsTags.java"), expected);
+    }
+
+    @Test
+    public void testBadTag() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        final String[] expected = {
+            "5:4: Unknown tag 'mytag'.",
+        };
+        verify(checkConfig,
+               getPath("javadoc" + File.separator + "InputBadTag.java"),
+               expected);
+    }
+
+    @Test
+    public void testBadTagSuppress() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocTypeCheck.class);
+        checkConfig.addAttribute("allowUnknownTags", "true");
+        final String[] expected = {
+        };
+        verify(checkConfig,
+               getPath("javadoc" + File.separator + "InputBadTag.java"),
+               expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocUtilsTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocUtilsTest.java
new file mode 100644
index 0000000..a61b617
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocUtilsTest.java
@@ -0,0 +1,129 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import com.puppycrawl.tools.checkstyle.api.Comment;
+import com.puppycrawl.tools.checkstyle.api.JavadocTagInfo;
+import java.util.List;
+import org.junit.Test;
+
+public class JavadocUtilsTest
+{
+
+    @Test
+    public void testTags()
+    {
+        final String [] text = {
+            "/** @see elsewhere ",
+            " * {@link List }, {@link  List link text }",
+            "   {@link List#add(Object) link text}",
+            " * {@link Class link text}",
+        };
+        final Comment comment = new Comment(text, 1, 4, text[3].length());
+        final JavadocTags allTags =
+            JavadocUtils.getJavadocTags(comment, JavadocUtils.JavadocTagType.ALL);
+        assertEquals(5, allTags.getValidTags().size());
+    }
+
+    @Test
+    public void testTagType()
+    {
+        final String [] text = {
+            "/** @see block",
+            " * {@link List inline}, {@link List#add(Object)}",
+        };
+        final Comment comment = new Comment(text, 1, 2, text[1].length());
+        final JavadocTags blockTags =
+            JavadocUtils.getJavadocTags(comment, JavadocUtils.JavadocTagType.BLOCK);
+        final JavadocTags inlineTags =
+            JavadocUtils.getJavadocTags(comment, JavadocUtils.JavadocTagType.INLINE);
+        assertEquals(1, blockTags.getValidTags().size());
+        assertEquals(2, inlineTags.getValidTags().size());
+    }
+
+    @Test
+    public void testInlineTagLinkText()
+    {
+        final String [] text = {
+            "/** {@link  List link text }",
+        };
+        final Comment comment = new Comment(text, 1, 1, text[0].length());
+        final List<JavadocTag> tags = JavadocUtils.getJavadocTags(
+            comment, JavadocUtils.JavadocTagType.ALL).getValidTags();
+        assertEquals("List link text", tags.get(0).getArg1());
+    }
+
+    @Test
+    public void testInlineTagMethodRef()
+    {
+        final String [] text = {
+            "/** {@link  List#add(Object)}",
+        };
+        final Comment comment = new Comment(text, 1, 1, text[0].length());
+        final List<JavadocTag> tags = JavadocUtils.getJavadocTags(
+            comment, JavadocUtils.JavadocTagType.ALL).getValidTags();
+        assertEquals("List#add(Object)", tags.get(0).getArg1());
+    }
+
+    @Test
+    public void testTagPositions()
+    {
+        final String [] text = {
+            "/** @see elsewhere",
+            "    also {@link Name value} */",
+        };
+        final Comment comment = new Comment(text, 1, 2, text[1].length());
+
+        final List<JavadocTag> tags = JavadocUtils.getJavadocTags(
+            comment, JavadocUtils.JavadocTagType.ALL).getValidTags();
+
+        assertEquals(2, tags.size());
+        for (final JavadocTag tag : tags) {
+            if (JavadocTagInfo.SEE.getName().equals(tag.getTagName())) {
+                assertEquals(1, tag.getLineNo());
+                assertEquals(5, tag.getColumnNo());
+            }
+            else if (JavadocTagInfo.LINK.getName().equals(tag.getTagName())) {
+                assertEquals(2, tag.getLineNo());
+                assertEquals(10, tag.getColumnNo());
+            }
+            else {
+                fail("Unexpected tag: " + tag);
+            }
+        }
+    }
+
+    @Test
+    public void testInvalidTags()
+    {
+        final String [] text = {
+            "/** @fake block",
+            " * {@bogus inline}",
+            " * {@link List valid}",
+        };
+        final Comment comment = new Comment(text, 1, 3, text[2].length());
+        final JavadocTags allTags =
+            JavadocUtils.getJavadocTags(comment, JavadocUtils.JavadocTagType.ALL);
+        assertEquals(2, allTags.getInvalidTags().size());
+        assertEquals(1, allTags.getValidTags().size());
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheckTest.java
new file mode 100644
index 0000000..b55f500
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheckTest.java
@@ -0,0 +1,264 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.Scope;
+import java.io.File;
+import org.junit.Test;
+
+public class JavadocVariableCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocVariableCheck.class);
+        final String[] expected = {
+            "11:5: Missing a Javadoc comment.",
+            "304:5: Missing a Javadoc comment.",
+            "311:5: Missing a Javadoc comment.",
+            "330:5: Missing a Javadoc comment.",
+        };
+        verify(checkConfig, getSrcPath("checks/javadoc/InputTags.java"), expected);
+    }
+
+    @Test
+    public void testAnother()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocVariableCheck.class);
+        final String[] expected = {
+            "17:9: Missing a Javadoc comment.",
+            "24:9: Missing a Javadoc comment.",
+            "30:13: Missing a Javadoc comment.",
+        };
+        verify(checkConfig, getPath("InputInner.java"), expected);
+    }
+
+    @Test
+    public void testAnother2()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocVariableCheck.class);
+        checkConfig.addAttribute("scope", Scope.PUBLIC.getName());
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputInner.java"), expected);
+    }
+
+    @Test
+    public void testAnother3()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocVariableCheck.class);
+        final String[] expected = {
+            "11:9: Missing a Javadoc comment.",
+            "16:13: Missing a Javadoc comment.",
+            "36:9: Missing a Javadoc comment.",
+            "43:5: Missing a Javadoc comment.",
+            "44:5: Missing a Javadoc comment.",
+            "45:5: Missing a Javadoc comment.",
+            "46:5: Missing a Javadoc comment.",
+        };
+        verify(checkConfig, getPath("InputPublicOnly.java"), expected);
+    }
+    @Test
+    public void testAnother4()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocVariableCheck.class);
+        checkConfig.addAttribute("scope", Scope.PUBLIC.getName());
+        final String[] expected = {
+            "46:5: Missing a Javadoc comment.",
+        };
+        verify(checkConfig, getPath("InputPublicOnly.java"), expected);
+    }
+
+    @Test
+    public void testScopes() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocVariableCheck.class);
+        final String[] expected = {
+            "5:5: Missing a Javadoc comment.",
+            "6:5: Missing a Javadoc comment.",
+            "7:5: Missing a Javadoc comment.",
+            "8:5: Missing a Javadoc comment.",
+            "16:9: Missing a Javadoc comment.",
+            "17:9: Missing a Javadoc comment.",
+            "18:9: Missing a Javadoc comment.",
+            "19:9: Missing a Javadoc comment.",
+            "28:9: Missing a Javadoc comment.",
+            "29:9: Missing a Javadoc comment.",
+            "30:9: Missing a Javadoc comment.",
+            "31:9: Missing a Javadoc comment.",
+            "40:9: Missing a Javadoc comment.",
+            "41:9: Missing a Javadoc comment.",
+            "42:9: Missing a Javadoc comment.",
+            "43:9: Missing a Javadoc comment.",
+            "53:5: Missing a Javadoc comment.",
+            "54:5: Missing a Javadoc comment.",
+            "55:5: Missing a Javadoc comment.",
+            "56:5: Missing a Javadoc comment.",
+            "64:9: Missing a Javadoc comment.",
+            "65:9: Missing a Javadoc comment.",
+            "66:9: Missing a Javadoc comment.",
+            "67:9: Missing a Javadoc comment.",
+            "76:9: Missing a Javadoc comment.",
+            "77:9: Missing a Javadoc comment.",
+            "78:9: Missing a Javadoc comment.",
+            "79:9: Missing a Javadoc comment.",
+            "88:9: Missing a Javadoc comment.",
+            "89:9: Missing a Javadoc comment.",
+            "90:9: Missing a Javadoc comment.",
+            "91:9: Missing a Javadoc comment.",
+            "100:9: Missing a Javadoc comment.",
+            "101:9: Missing a Javadoc comment.",
+            "102:9: Missing a Javadoc comment.",
+            "103:9: Missing a Javadoc comment.",
+            "113:9: Missing a Javadoc comment.",
+        };
+        verify(checkConfig,
+               getPath("javadoc" + File.separator + "InputNoJavadoc.java"),
+               expected);
+    }
+
+    @Test
+    public void testScopes2() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocVariableCheck.class);
+        checkConfig.addAttribute("scope", Scope.PROTECTED.getName());
+        final String[] expected = {
+            "5:5: Missing a Javadoc comment.",
+            "6:5: Missing a Javadoc comment.",
+            "16:9: Missing a Javadoc comment.",
+            "17:9: Missing a Javadoc comment.",
+        };
+        verify(checkConfig,
+               getPath("javadoc" + File.separator + "InputNoJavadoc.java"),
+               expected);
+    }
+
+    @Test
+    public void testExcludeScope() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(JavadocVariableCheck.class);
+        checkConfig.addAttribute("scope", Scope.PRIVATE.getName());
+        checkConfig.addAttribute("excludeScope", Scope.PROTECTED.getName());
+        final String[] expected = {
+            "7:5: Missing a Javadoc comment.",
+            "8:5: Missing a Javadoc comment.",
+            "18:9: Missing a Javadoc comment.",
+            "19:9: Missing a Javadoc comment.",
+            "28:9: Missing a Javadoc comment.",
+            "29:9: Missing a Javadoc comment.",
+            "30:9: Missing a Javadoc comment.",
+            "31:9: Missing a Javadoc comment.",
+            "40:9: Missing a Javadoc comment.",
+            "41:9: Missing a Javadoc comment.",
+            "42:9: Missing a Javadoc comment.",
+            "43:9: Missing a Javadoc comment.",
+            "53:5: Missing a Javadoc comment.",
+            "54:5: Missing a Javadoc comment.",
+            "55:5: Missing a Javadoc comment.",
+            "56:5: Missing a Javadoc comment.",
+            "64:9: Missing a Javadoc comment.",
+            "65:9: Missing a Javadoc comment.",
+            "66:9: Missing a Javadoc comment.",
+            "67:9: Missing a Javadoc comment.",
+            "76:9: Missing a Javadoc comment.",
+            "77:9: Missing a Javadoc comment.",
+            "78:9: Missing a Javadoc comment.",
+            "79:9: Missing a Javadoc comment.",
+            "88:9: Missing a Javadoc comment.",
+            "89:9: Missing a Javadoc comment.",
+            "90:9: Missing a Javadoc comment.",
+            "91:9: Missing a Javadoc comment.",
+            "100:9: Missing a Javadoc comment.",
+            "101:9: Missing a Javadoc comment.",
+            "102:9: Missing a Javadoc comment.",
+            "103:9: Missing a Javadoc comment.",
+            "113:9: Missing a Javadoc comment.",
+        };
+        verify(checkConfig,
+               getPath("javadoc" + File.separator + "InputNoJavadoc.java"),
+               expected);
+    }
+
+    @Test
+    public void testIgnoredVariableNames()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(JavadocVariableCheck.class);
+        checkConfig.addAttribute("ignoreNamePattern", "log|logger");
+        final String[] expected = {
+            "5:5: Missing a Javadoc comment.",
+            "6:5: Missing a Javadoc comment.",
+            "7:5: Missing a Javadoc comment.",
+            "8:5: Missing a Javadoc comment.",
+            "16:9: Missing a Javadoc comment.",
+            "17:9: Missing a Javadoc comment.",
+            "18:9: Missing a Javadoc comment.",
+            "19:9: Missing a Javadoc comment.",
+            "28:9: Missing a Javadoc comment.",
+            "29:9: Missing a Javadoc comment.",
+            "30:9: Missing a Javadoc comment.",
+            "31:9: Missing a Javadoc comment.",
+            "40:9: Missing a Javadoc comment.",
+            "41:9: Missing a Javadoc comment.",
+            "42:9: Missing a Javadoc comment.",
+            "43:9: Missing a Javadoc comment.",
+            "53:5: Missing a Javadoc comment.",
+            "54:5: Missing a Javadoc comment.",
+            "55:5: Missing a Javadoc comment.",
+            "56:5: Missing a Javadoc comment.",
+            "64:9: Missing a Javadoc comment.",
+            "65:9: Missing a Javadoc comment.",
+            "66:9: Missing a Javadoc comment.",
+            "67:9: Missing a Javadoc comment.",
+            "76:9: Missing a Javadoc comment.",
+            "77:9: Missing a Javadoc comment.",
+            "78:9: Missing a Javadoc comment.",
+            "79:9: Missing a Javadoc comment.",
+            "88:9: Missing a Javadoc comment.",
+            "89:9: Missing a Javadoc comment.",
+            "90:9: Missing a Javadoc comment.",
+            "91:9: Missing a Javadoc comment.",
+            "100:9: Missing a Javadoc comment.",
+            "101:9: Missing a Javadoc comment.",
+            "102:9: Missing a Javadoc comment.",
+            "103:9: Missing a Javadoc comment.",
+        };
+        verify(checkConfig,
+                getPath("javadoc" + File.separator + "InputNoJavadoc.java"),
+                expected);
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/WriteTagCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/WriteTagCheckTest.java
new file mode 100644
index 0000000..3089682
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/WriteTagCheckTest.java
@@ -0,0 +1,240 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.javadoc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.Checker;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
+import java.util.Collections;
+import java.util.List;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * @author Daniel Grenner
+ */
+public class WriteTagCheckTest extends BaseCheckTestSupport
+{
+    private DefaultConfiguration mCheckConfig;
+
+    @Before
+    public void setUp()
+    {
+        mCheckConfig = createCheckConfig(WriteTagCheck.class);
+    }
+
+    @Test
+    public void testDefaultSettings() throws Exception
+    {
+        final String[] expected =
+        {
+        };
+        verify(mCheckConfig, getPath("InputWriteTag.java"), expected);
+    }
+
+    @Test
+    public void testTag() throws Exception
+    {
+        mCheckConfig.addAttribute("tag", "@author");
+        mCheckConfig.addAttribute("tagFormat", "\\S");
+        final String[] expected =
+        {
+            "10: @author=Daniel Grenner",
+        };
+        verify(mCheckConfig, getPath("InputWriteTag.java"), expected);
+    }
+
+    @Test
+    public void testMissingFormat() throws Exception
+    {
+        mCheckConfig.addAttribute("tag", "@author");
+        final String[] expected =
+        {
+            "10: @author=Daniel Grenner",
+        };
+        verify(mCheckConfig, getPath("InputWriteTag.java"), expected);
+    }
+
+    @Test
+    public void testTagSeverity() throws Exception
+    {
+        mCheckConfig.addAttribute("tag", "@incomplete");
+        mCheckConfig.addAttribute("tagFormat", "\\S");
+        mCheckConfig.addAttribute("tagSeverity", "warning");
+        final String[] expected =
+        {
+            "11: warning: @incomplete=This class needs more code...",
+        };
+        verify(mCheckConfig, getPath("InputWriteTag.java"), expected);
+    }
+
+    @Test
+    public void testDoubleTag() throws Exception
+    {
+        mCheckConfig.addAttribute("tag", "@doubletag");
+        mCheckConfig.addAttribute("tagFormat", "\\S");
+        final String[] expected = {
+            "12: @doubletag=first text",
+            "13: @doubletag=second text",
+        };
+        verify(mCheckConfig, getPath("InputWriteTag.java"), expected);
+    }
+
+    @Test
+    public void testEmptyTag() throws Exception
+    {
+        mCheckConfig.addAttribute("tag", "@emptytag");
+        mCheckConfig.addAttribute("tagFormat", "");
+        final String[] expected = {
+            "14: @emptytag=",
+        };
+        verify(mCheckConfig, getPath("InputWriteTag.java"), expected);
+    }
+
+
+    @Test
+    public void testMissingTag() throws Exception
+    {
+        mCheckConfig.addAttribute("tag", "@missingtag");
+        final String[] expected =
+        {
+            "16: Type Javadoc comment is missing an @missingtag tag.",
+        };
+        verify(mCheckConfig, getPath("InputWriteTag.java"), expected);
+    }
+
+    @Test
+    public void testMethod() throws Exception
+    {
+        mCheckConfig.addAttribute("tag", "@todo");
+        mCheckConfig.addAttribute("tagFormat", "\\S");
+        mCheckConfig.addAttribute("tokens",
+            "INTERFACE_DEF, CLASS_DEF, METHOD_DEF, CTOR_DEF");
+        mCheckConfig.addAttribute("severity", "ignore");
+        final String[] expected = {
+            "19: @todo=Add a constructor comment",
+            "30: @todo=Add a comment",
+        };
+        verify(mCheckConfig, getPath("InputWriteTag.java"), expected);
+    }
+
+    @Test
+    public void testSeverity() throws Exception
+    {
+        mCheckConfig.addAttribute("tag", "@author");
+        mCheckConfig.addAttribute("tagFormat", "\\S");
+        mCheckConfig.addAttribute("severity", "ignore");
+        final String[] expected =
+        {
+            "10: @author=Daniel Grenner",
+        };
+        verify(mCheckConfig, getPath("InputWriteTag.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreMissing() throws Exception
+    {
+        mCheckConfig.addAttribute("tag", "@todo2");
+        mCheckConfig.addAttribute("tagFormat", "\\S");
+        mCheckConfig.addAttribute("severity", "ignore");
+        final String[] expected =
+        {
+        };
+        verify(mCheckConfig, getPath("InputWriteTag.java"), expected);
+    }
+
+    @Test
+    public void testRegularEx()
+        throws Exception
+    {
+        mCheckConfig.addAttribute("tag", "@author");
+        mCheckConfig.addAttribute("tagFormat", "0*");
+        final String[] expected = {
+        };
+        verify(mCheckConfig, getPath("InputWriteTag.java"), expected);
+    }
+
+    @Test
+    public void testRegularExError()
+        throws Exception
+    {
+        mCheckConfig.addAttribute("tag", "@author");
+        mCheckConfig.addAttribute("tagFormat", "ABC");
+        final String[] expected = {
+            "10: Type Javadoc tag @author must match pattern 'ABC'.",
+        };
+        verify(mCheckConfig, getPath("InputWriteTag.java"), expected);
+    }
+
+    @Test
+    public void testEnumsAndAnnotations() throws Exception
+    {
+        mCheckConfig.addAttribute("tag", "@incomplete");
+        mCheckConfig.addAttribute("tagFormat", ".*");
+        mCheckConfig.addAttribute("severity", "ignore");
+        mCheckConfig.addAttribute("tagSeverity", "error");
+        mCheckConfig.addAttribute("tokens",
+            "ANNOTATION_DEF, ENUM_DEF, ANNOTATION_FIELD_DEF, ENUM_CONSTANT_DEF");
+        final String[] expected =
+        {
+            "9: @incomplete=This enum needs more code...",
+            "13: @incomplete=This enum constant needs more code...",
+            "19: @incomplete=This annotation needs more code...",
+            "23: @incomplete=This annotation field needs more code...",
+        };
+        verify(mCheckConfig, getPath("InputWriteTag2.java"), expected);
+    }
+
+    @Override
+    protected void verify(Checker aC,
+                          File[] aProcessedFiles,
+                          String aMessageFileName,
+                          String[] aExpected)
+        throws Exception
+    {
+        mStream.flush();
+        final List<File> theFiles = Lists.newArrayList();
+        Collections.addAll(theFiles, aProcessedFiles);
+        final int errs = aC.process(theFiles);
+
+        // process each of the lines
+        final ByteArrayInputStream bais =
+            new ByteArrayInputStream(mBAOS.toByteArray());
+        final LineNumberReader lnr =
+            new LineNumberReader(new InputStreamReader(bais));
+
+        for (int i = 0; i < aExpected.length; i++) {
+            final String expected = aMessageFileName + ":" + aExpected[i];
+            final String actual = lnr.readLine();
+            assertEquals("error message " + i, expected, actual);
+        }
+
+        assertTrue("unexpected output: " + lnr.readLine(),
+                   aExpected.length >= errs);
+
+        aC.destroy();
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/BooleanExpressionComplexityCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/BooleanExpressionComplexityCheckTest.java
new file mode 100644
index 0000000..b4f563e
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/BooleanExpressionComplexityCheckTest.java
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.metrics;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class BooleanExpressionComplexityCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void test() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+            createCheckConfig(BooleanExpressionComplexityCheck.class);
+
+        String[] expected = {
+            "13:9: Boolean expression complexity is 4 (max allowed is 3).",
+            "32:9: Boolean expression complexity is 6 (max allowed is 3).",
+        };
+
+        verify(checkConfig, getPath("metrics" + File.separator + "BooleanExpressionComplexityCheckTestInput.java"), expected);
+    }
+
+    @Test
+    public void testNoBitwise() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+            createCheckConfig(BooleanExpressionComplexityCheck.class);
+        checkConfig.addAttribute("max", "5");
+        checkConfig.addAttribute("tokens", "BXOR,LAND,LOR");
+
+        String[] expected = {
+        };
+
+        verify(checkConfig, getPath("metrics" + File.separator + "BooleanExpressionComplexityCheckTestInput.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/ClassDataAbstractionCouplingCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/ClassDataAbstractionCouplingCheckTest.java
new file mode 100644
index 0000000..292c26b
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/ClassDataAbstractionCouplingCheckTest.java
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.metrics;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class ClassDataAbstractionCouplingCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void test() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+            createCheckConfig(ClassDataAbstractionCouplingCheck.class);
+
+        checkConfig.addAttribute("max", "0");
+        checkConfig.addAttribute("excludedClasses", "InnerClass");
+
+        String[] expected = {
+            "6:1: Class Data Abstraction Coupling is 4 (max allowed is 0) classes [AnotherInnerClass, HashMap, HashSet, int].",
+            "7:5: Class Data Abstraction Coupling is 1 (max allowed is 0) classes [ArrayList].",
+            "27:1: Class Data Abstraction Coupling is 2 (max allowed is 0) classes [HashMap, HashSet].",
+        };
+
+        verify(checkConfig,
+               getPath("metrics" + File.separator + "ClassCouplingCheckTestInput.java"),
+               expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/ClassFanOutComplexityCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/ClassFanOutComplexityCheckTest.java
new file mode 100644
index 0000000..840e2c9
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/ClassFanOutComplexityCheckTest.java
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.metrics;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class ClassFanOutComplexityCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void test() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(ClassFanOutComplexityCheck.class);
+
+        checkConfig.addAttribute("max", "0");
+
+        String[] expected = {
+            "6:1: Class Fan-Out Complexity is 3 (max allowed is 0).",
+        };
+
+        verify(checkConfig,
+               getPath("metrics" + File.separator + "ClassCouplingCheckTestInput.java"),
+               expected);
+    }
+
+    @Test
+    public void test15() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(ClassFanOutComplexityCheck.class);
+
+        checkConfig.addAttribute("max", "0");
+
+        String[] expected = {
+        };
+
+        verify(checkConfig, getPath("Input15Extensions.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/CyclomaticComplexityCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/CyclomaticComplexityCheckTest.java
new file mode 100644
index 0000000..f528de3
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/CyclomaticComplexityCheckTest.java
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.metrics;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class CyclomaticComplexityCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void test() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(CyclomaticComplexityCheck.class);
+
+        checkConfig.addAttribute("max", "0");
+
+        final String[] expected = {
+            "4:5: Cyclomatic Complexity is 2 (max allowed is 0).",
+            "7:17: Cyclomatic Complexity is 2 (max allowed is 0).",
+            "17:5: Cyclomatic Complexity is 6 (max allowed is 0).",
+            "27:5: Cyclomatic Complexity is 3 (max allowed is 0).",
+            "34:5: Cyclomatic Complexity is 5 (max allowed is 0).",
+            "48:5: Cyclomatic Complexity is 3 (max allowed is 0).",
+            "58:5: Cyclomatic Complexity is 3 (max allowed is 0).",
+            "67:5: Cyclomatic Complexity is 3 (max allowed is 0).",
+            "76:5: Cyclomatic Complexity is 1 (max allowed is 0).",
+            "79:13: Cyclomatic Complexity is 2 (max allowed is 0).",
+        };
+
+        verify(checkConfig, getPath("ComplexityCheckTestInput.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/JavaNCSSCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/JavaNCSSCheckTest.java
new file mode 100644
index 0000000..439c664
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/JavaNCSSCheckTest.java
@@ -0,0 +1,58 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.metrics;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+/**
+ * Testcase for the JavaNCSS-Check.
+ *
+ * @author Lars K�dderitzsch
+ */
+public class JavaNCSSCheckTest extends BaseCheckTestSupport
+{
+
+    @Test
+    public void test() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(JavaNCSSCheck.class);
+
+        checkConfig.addAttribute("methodMaximum", "0");
+        checkConfig.addAttribute("classMaximum", "1");
+        checkConfig.addAttribute("fileMaximum", "2");
+
+        String[] expected = {
+            "2:1: NCSS for this file is 35 (max allowed is 2).",
+            "9:1: NCSS for this class is 22 (max allowed is 1).",
+            "14:5: NCSS for this method is 2 (max allowed is 0).",
+            "21:5: NCSS for this method is 4 (max allowed is 0).",
+            "30:5: NCSS for this method is 12 (max allowed is 0).",
+            "42:13: NCSS for this method is 2 (max allowed is 0).",
+            "49:5: NCSS for this class is 2 (max allowed is 1).",
+            "56:1: NCSS for this class is 10 (max allowed is 1).",
+            "61:5: NCSS for this method is 8 (max allowed is 0).",
+        };
+
+        verify(checkConfig, getPath("metrics" + File.separator
+                + "JavaNCSSCheckTestInput.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/NPathComplexityCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/NPathComplexityCheckTest.java
new file mode 100644
index 0000000..9b1ec68
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/metrics/NPathComplexityCheckTest.java
@@ -0,0 +1,69 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.metrics;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.text.NumberFormat;
+import org.junit.Test;
+
+public class NPathComplexityCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testCalculation() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+            createCheckConfig(NPathComplexityCheck.class);
+
+        checkConfig.addAttribute("max", "0");
+        String[] expected = {
+            "4:5: NPath Complexity is 2 (max allowed is 0).",
+            "7:17: NPath Complexity is 2 (max allowed is 0).",
+            "17:5: NPath Complexity is 5 (max allowed is 0).",
+            "27:5: NPath Complexity is 3 (max allowed is 0).",
+            "34:5: NPath Complexity is 7 (max allowed is 0).",
+            "48:5: NPath Complexity is 3 (max allowed is 0).",
+            "58:5: NPath Complexity is 3 (max allowed is 0).",
+            "67:5: NPath Complexity is 3 (max allowed is 0).",
+            "76:5: NPath Complexity is 1 (max allowed is 0).",
+            "79:13: NPath Complexity is 2 (max allowed is 0).",
+        };
+
+        verify(checkConfig, getPath("ComplexityCheckTestInput.java"), expected);
+    }
+
+    @Test
+    public void testIntegerOverflow() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+            createCheckConfig(NPathComplexityCheck.class);
+
+        checkConfig.addAttribute("max", "0");
+
+        final long largerThanMaxInt = 3486784401L;
+        // use i18n for number formatting so test wont fail in non-english environments
+        final String expectedComplexity = NumberFormat.getInstance().format(largerThanMaxInt);
+
+        String[] expected = {
+            "9:5: NPath Complexity is " + expectedComplexity + " (max allowed is 0).",
+        };
+
+        verify(checkConfig, getPath("ComplexityOverflow.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheckTest.java
new file mode 100644
index 0000000..903cc9a
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheckTest.java
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.modifier;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class ModifierOrderCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ModifierOrderCheck.class);
+        final String[] expected = {
+            "14:10: 'final' modifier out of order with the JLS suggestions.",
+            "18:12: 'private' modifier out of order with the JLS suggestions.",
+            "24:14: 'private' modifier out of order with the JLS suggestions.",
+            "34:13: '@MyAnnotation2' annotation modifier does not preceed non-annotation modifiers.",
+            "39:13: '@MyAnnotation2' annotation modifier does not preceed non-annotation modifiers.",
+            "49:35: '@MyAnnotation4' annotation modifier does not preceed non-annotation modifiers.",
+        };
+        verify(checkConfig, getPath("InputModifier.java"), expected);
+    }
+
+    @Test
+    public void testDefaultMethods()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(ModifierOrderCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputModifier2.java"), expected);
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierTest.java
new file mode 100644
index 0000000..5069268
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/modifier/RedundantModifierTest.java
@@ -0,0 +1,65 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.modifier;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class RedundantModifierTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(RedundantModifierCheck.class);
+        final String[] expected = {
+            "54:12: Redundant 'static' modifier.",
+            "57:9: Redundant 'public' modifier.",
+            "63:9: Redundant 'abstract' modifier.",
+            "66:9: Redundant 'public' modifier.",
+            //"69:9: Redundant 'abstract' modifier.",
+            "72:9: Redundant 'final' modifier.",
+            "79:13: Redundant 'final' modifier.",
+            "88:12: Redundant 'final' modifier.",
+            "99:1: Redundant 'abstract' modifier.",
+            "116:5: Redundant 'public' modifier.",
+            "117:5: Redundant 'final' modifier.",
+            "118:5: Redundant 'static' modifier.",
+            "120:5: Redundant 'public' modifier.",
+            "121:5: Redundant 'abstract' modifier.",
+        };
+        verify(checkConfig, getPath("InputModifier.java"), expected);
+    }
+
+    @Test
+    public void testStaticMethodInInterface()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(RedundantModifierCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig,
+                getPath("InputStaticModifierInInterface.java"),
+                expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheckTest.java
new file mode 100644
index 0000000..86949ad
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheckTest.java
@@ -0,0 +1,327 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import static com.puppycrawl.tools.checkstyle.checks.naming.AbbreviationAsWordInNameCheck.MSG_KEY;
+import static java.text.MessageFormat.format;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class AbbreviationAsWordInNameCheckTest extends BaseCheckTestSupport
+{
+
+    /** Warning message*/
+    private String warningMessage;
+
+    @Test
+    public void testTypeNamesForThreePermitedCapitalLetters() throws Exception
+    {
+
+        final DefaultConfiguration checkConfig = createCheckConfig(AbbreviationAsWordInNameCheck.class);
+        final int expectedCapitalCount = 3;
+        warningMessage = getCheckMessage(MSG_KEY, expectedCapitalCount);
+        checkConfig.addAttribute("allowedAbbreviationLength", String.valueOf(expectedCapitalCount));
+        checkConfig.addAttribute("allowedAbbreviations", "III");
+        checkConfig.addAttribute("tokens", "CLASS_DEF");
+        checkConfig.addAttribute("ignoreOverriddenMethods", "true");
+
+        final String[] expected = {
+            "9: " + warningMessage,
+            "12: " + warningMessage,
+            "32: " + warningMessage,
+            "37: " + warningMessage,
+        };
+
+        verify(checkConfig, getPath("naming/InputAbbreviationAsWordInTypeNameCheck.java"), expected);
+    }
+
+    @Test
+    public void testTypeNamesForFourPermitedCapitalLetters() throws Exception
+    {
+
+        final int expectedCapitalCount = 4;
+        warningMessage = getCheckMessage(MSG_KEY, expectedCapitalCount);
+        final DefaultConfiguration checkConfig = createCheckConfig(AbbreviationAsWordInNameCheck.class);
+        checkConfig.addAttribute("allowedAbbreviationLength", String.valueOf(expectedCapitalCount));
+        checkConfig.addAttribute("allowedAbbreviations", "CLASS,FACTORY");
+        checkConfig.addAttribute("tokens", "CLASS_DEF");
+        checkConfig.addAttribute("ignoreOverriddenMethods", "true");
+
+        final String[] expected = {
+            "32: " + warningMessage,
+        };
+
+        verify(checkConfig, getPath("naming/InputAbbreviationAsWordInTypeNameCheck.java"), expected);
+    }
+
+    @Test
+    public void testTypeNamesForFivePermitedCapitalLetters() throws Exception
+    {
+
+        final int expectedCapitalCount = 5;
+        warningMessage = getCheckMessage(MSG_KEY, expectedCapitalCount);
+        final DefaultConfiguration checkConfig = createCheckConfig(AbbreviationAsWordInNameCheck.class);
+        checkConfig.addAttribute("allowedAbbreviationLength", String.valueOf(expectedCapitalCount));
+        checkConfig.addAttribute("allowedAbbreviations", "CLASS");
+        checkConfig.addAttribute("tokens", "CLASS_DEF");
+        checkConfig.addAttribute("ignoreOverriddenMethods", "true");
+        final String[] expected = {
+            "32: " + warningMessage,
+            "37: " + warningMessage,
+        };
+
+        verify(checkConfig, getPath("naming/InputAbbreviationAsWordInTypeNameCheck.java"), expected);
+    }
+
+    @Test
+    public void testTypeAndVariablesAndMethodNames() throws Exception
+    {
+
+        final int expectedCapitalCount = 5;
+        warningMessage = getCheckMessage(MSG_KEY, expectedCapitalCount);
+        final DefaultConfiguration checkConfig = createCheckConfig(AbbreviationAsWordInNameCheck.class);
+        checkConfig.addAttribute("allowedAbbreviationLength", String.valueOf(expectedCapitalCount));
+        checkConfig.addAttribute("allowedAbbreviations", "CLASS");
+        checkConfig.addAttribute("tokens", "CLASS_DEF"
+            + ",VARIABLE_DEF"
+            + ",METHOD_DEF,ENUM_DEF,ENUM_CONSTANT_DEF"
+            + ",PARAMETER_DEF,INTERFACE_DEF,ANNOTATION_DEF");
+        checkConfig.addAttribute("ignoreOverriddenMethods", "true");
+
+        final String[] expected = {
+            "32: " + warningMessage,
+            "37: " + warningMessage,
+            "38: " + warningMessage,
+            "39: " + warningMessage,
+            "40: " + warningMessage,
+            "58: " + warningMessage,
+        };
+
+        verify(checkConfig, getPath("naming/InputAbbreviationAsWordInTypeNameCheck.java"), expected);
+    }
+
+    @Test
+    public void testTypeAndVariablesAndMethodNamesWithNoIgnores() throws Exception
+    {
+
+        final int expectedCapitalCount = 5;
+        warningMessage = getCheckMessage(MSG_KEY, expectedCapitalCount);
+        final DefaultConfiguration checkConfig = createCheckConfig(AbbreviationAsWordInNameCheck.class);
+        checkConfig.addAttribute("allowedAbbreviationLength", String.valueOf(expectedCapitalCount));
+        checkConfig.addAttribute("allowedAbbreviations", "NUMBER,MARAZMATIC,VARIABLE");
+        checkConfig.addAttribute("ignoreStatic", "false");
+        checkConfig.addAttribute("ignoreFinal", "false");
+        checkConfig.addAttribute("tokens", "CLASS_DEF"
+            + ",VARIABLE_DEF"
+            + ",METHOD_DEF,ENUM_DEF,ENUM_CONSTANT_DEF"
+            + ",PARAMETER_DEF,INTERFACE_DEF,ANNOTATION_DEF");
+        checkConfig.addAttribute("ignoreOverriddenMethods", "true");
+
+        final String[] expected = {
+            "32: " + warningMessage,
+            "37: " + warningMessage,
+            "38: " + warningMessage,
+            "66: " + warningMessage,
+            "72: " + warningMessage,
+            "78: " + warningMessage,
+            "84: " + warningMessage,
+        };
+
+        verify(checkConfig, getPath("naming/InputAbbreviationAsWordInTypeNameCheck.java"), expected);
+    }
+
+    @Test
+    public void testTypeAndVariablesAndMethodNamesWithIgnores() throws Exception
+    {
+
+        final int expectedCapitalCount = 5;
+        warningMessage = getCheckMessage(MSG_KEY, expectedCapitalCount);
+        final DefaultConfiguration checkConfig = createCheckConfig(AbbreviationAsWordInNameCheck.class);
+        checkConfig.addAttribute("allowedAbbreviationLength", String.valueOf(expectedCapitalCount));
+        checkConfig.addAttribute("allowedAbbreviations", "NUMBER,MARAZMATIC,VARIABLE");
+        checkConfig.addAttribute("ignoreStatic", "true");
+        checkConfig.addAttribute("ignoreFinal", "true");
+        checkConfig.addAttribute("tokens", "CLASS_DEF"
+            + ",VARIABLE_DEF"
+            + ",METHOD_DEF,ENUM_DEF,ENUM_CONSTANT_DEF"
+            + ",PARAMETER_DEF,INTERFACE_DEF,ANNOTATION_DEF");
+        checkConfig.addAttribute("ignoreOverriddenMethods", "true");
+
+        final String[] expected = {
+            "32: " + warningMessage,
+            "37: " + warningMessage,
+            "38: " + warningMessage,
+        };
+
+        verify(checkConfig, getPath("naming/InputAbbreviationAsWordInTypeNameCheck.java"), expected);
+    }
+
+    @Test
+    public void testTypeAndVariablesAndMethodNamesWithIgnoresFinal() throws Exception
+    {
+
+        final int expectedCapitalCount = 4;
+        warningMessage = getCheckMessage(MSG_KEY, expectedCapitalCount);
+        final DefaultConfiguration checkConfig = createCheckConfig(AbbreviationAsWordInNameCheck.class);
+        checkConfig.addAttribute("allowedAbbreviationLength", String.valueOf(expectedCapitalCount));
+        checkConfig.addAttribute("allowedAbbreviations", "MARAZMATIC,VARIABLE");
+        checkConfig.addAttribute("ignoreStatic", "false");
+        checkConfig.addAttribute("ignoreFinal", "true");
+        checkConfig.addAttribute("tokens", "CLASS_DEF"
+            + ",VARIABLE_DEF"
+            + ",METHOD_DEF,ENUM_DEF,ENUM_CONSTANT_DEF"
+            + ",PARAMETER_DEF,INTERFACE_DEF,ANNOTATION_DEF");
+        checkConfig.addAttribute("ignoreOverriddenMethods", "true");
+
+        final String[] expected = {
+            "12: " + warningMessage,
+            "32: " + warningMessage,
+            "37: " + warningMessage,
+            "38: " + warningMessage,
+            "58: " + warningMessage, // not in ignore list
+            "60: " + warningMessage, // no ignore for static
+        };
+
+        verify(checkConfig, getPath("naming/InputAbbreviationAsWordInTypeNameCheck.java"), expected);
+    }
+
+    @Test
+    public void testTypeAndVariablesAndMethodNamesWithIgnoresStatic() throws Exception
+    {
+
+        final int expectedCapitalCount = 5;
+        warningMessage = getCheckMessage(MSG_KEY, expectedCapitalCount);
+        final DefaultConfiguration checkConfig = createCheckConfig(AbbreviationAsWordInNameCheck.class);
+        checkConfig.addAttribute("allowedAbbreviationLength", String.valueOf(expectedCapitalCount));
+        checkConfig.addAttribute("allowedAbbreviations", "MARAZMATIC,VARIABLE");
+        checkConfig.addAttribute("ignoreStatic", "true");
+        checkConfig.addAttribute("ignoreFinal", "false");
+        checkConfig.addAttribute("tokens", "CLASS_DEF"
+            + ",VARIABLE_DEF"
+            + ",METHOD_DEF,ENUM_DEF,ENUM_CONSTANT_DEF"
+            + ",PARAMETER_DEF,INTERFACE_DEF,ANNOTATION_DEF");
+        checkConfig.addAttribute("ignoreOverriddenMethods", "true");
+
+        final String[] expected = {
+            "32: " + warningMessage,
+            "37: " + warningMessage,
+            "38: " + warningMessage,
+            "58: " + warningMessage, // not in ignore list
+            "59: " + warningMessage, // no ignore for final
+        };
+
+        verify(checkConfig, getPath("naming/InputAbbreviationAsWordInTypeNameCheck.java"), expected);
+    }
+
+    @Test
+    public void testTypeNamesForThreePermitedCapitalLettersWithOverridenMethod() throws Exception
+    {
+
+        final DefaultConfiguration checkConfig = createCheckConfig(AbbreviationAsWordInNameCheck.class);
+        final int expectedCapitalCount = 3;
+        warningMessage = getCheckMessage(MSG_KEY, expectedCapitalCount);
+        checkConfig.addAttribute("allowedAbbreviationLength", String.valueOf(expectedCapitalCount));
+        checkConfig.addAttribute("allowedAbbreviations", "");
+        checkConfig.addAttribute("tokens", "CLASS_DEF, METHOD_DEF");
+        checkConfig.addAttribute("ignoreOverriddenMethods", "true");
+
+        final String[] expected = {
+            "22: " + warningMessage,
+        };
+
+        verify(checkConfig,
+                getPath("naming/InputAbbreviationAsWordInTypeNameCheckOverridableMethod.java"), expected);
+    }
+
+    @Test
+    public void testTypeNamesForZeroPermitedCapitalLetter() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(AbbreviationAsWordInNameCheck.class);
+        final int expectedCapitalCount = 0;
+        warningMessage = getCheckMessage(MSG_KEY, expectedCapitalCount);
+        checkConfig.addAttribute("allowedAbbreviationLength",
+                String.valueOf(expectedCapitalCount));
+        checkConfig.addAttribute("allowedAbbreviations", "");
+        checkConfig.addAttribute("ignoreStatic", "false");
+        checkConfig.addAttribute("ignoreFinal", "false");
+        checkConfig.addAttribute("ignoreOverriddenMethods", "false");
+        checkConfig.addAttribute("tokens", "CLASS_DEF,INTERFACE_DEF,ENUM_DEF,"
+            + "ANNOTATION_DEF,ANNOTATION_FIELD_DEF,ENUM_CONSTANT_DEF,"
+            + "PARAMETER_DEF,VARIABLE_DEF,METHOD_DEF");
+        final String[] expected = {
+            "3: " + warningMessage,
+            "6: " + warningMessage,
+            "9: " + warningMessage,
+            "12: " + warningMessage,
+            "32: " + warningMessage,
+            "37: " + warningMessage,
+            "38: " + warningMessage,
+            "39: " + warningMessage,
+            "40: " + warningMessage,
+            "46: " + warningMessage,
+            "47: " + warningMessage,
+            "48: " + warningMessage,
+            "49: " + warningMessage,
+            "57: " + warningMessage,
+            "58: " + warningMessage,
+            "59: " + warningMessage,
+            "60: " + warningMessage,
+            "61: " + warningMessage,
+            "66: " + warningMessage,
+            "72: " + warningMessage,
+            "78: " + warningMessage,
+            "84: " + warningMessage,
+            "88: " + warningMessage,
+            "90: " + warningMessage,
+            "98: " + warningMessage,
+        };
+        verify(checkConfig,
+                getPath("naming/InputAbbreviationAsWordInTypeNameCheck.java"), expected);
+    }
+
+    @Test
+    public void testNPE() throws Exception
+    {
+
+        final DefaultConfiguration checkConfig = createCheckConfig(AbbreviationAsWordInNameCheck.class);
+        final int expectedCapitalCount = 1;
+        warningMessage = getCheckMessage(MSG_KEY, expectedCapitalCount);
+        checkConfig.addAttribute("allowedAbbreviationLength", String.valueOf(expectedCapitalCount));
+        checkConfig.addAttribute("ignoreFinal", "false");
+
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("naming/AbstractMultisetSetCountTester.java"), expected);
+    }
+
+    /**
+     * Gets the check message 'as is' from appropriate 'messages.properties' file.
+     * @param messageKey the key of message in 'messages.properties' file.
+     * @param arguments the arguments of message in 'messages.properties' file.
+     */
+    public String getCheckMessage(String messageKey, Object ... arguments)
+    {
+        return format(getCheckMessage(messageKey), arguments);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheckTest.java
new file mode 100644
index 0000000..f953ab0
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheckTest.java
@@ -0,0 +1,83 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class AbstractClassNameCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testIllegalAbstractClassName() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(AbstractClassNameCheck.class);
+        checkConfig.addAttribute("ignoreName", "false");
+        checkConfig.addAttribute("ignoreModifier", "true");
+
+        final String[] expected = {
+            "3:1: Name 'InputAbstractClassName' must match pattern '^Abstract.*$|^.*Factory$'.",
+            "6:1: Name 'NonAbstractClassName' must match pattern '^Abstract.*$|^.*Factory$'.",
+            "9:1: Name 'FactoryWithBadName' must match pattern '^Abstract.*$|^.*Factory$'.",
+            "13:5: Name 'NonAbstractInnerClass' must match pattern '^Abstract.*$|^.*Factory$'.",
+        };
+
+        verify(checkConfig, getPath("naming" + File.separator + "InputAbstractClassName.java"), expected);
+    }
+
+    @Test
+    public void testIllegalClassType() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(AbstractClassNameCheck.class);
+        checkConfig.addAttribute("ignoreName", "true");
+        checkConfig.addAttribute("ignoreModifier", "false");
+
+        final String[] expected = {
+            "26:1: Class 'AbstractClass' must be declared as 'abstract'.",
+            "29:1: Class 'Class1Factory' must be declared as 'abstract'.",
+            "33:5: Class 'AbstractInnerClass' must be declared as 'abstract'.",
+            "38:5: Class 'WellNamedFactory' must be declared as 'abstract'.",
+        };
+
+        verify(checkConfig, getPath("naming" + File.separator + "InputAbstractClassName.java"), expected);
+    }
+
+    @Test
+    public void testAllVariants() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(AbstractClassNameCheck.class);
+        checkConfig.addAttribute("ignoreName", "false");
+        checkConfig.addAttribute("ignoreModifier", "false");
+
+        final String[] expected = {
+            "3:1: Name 'InputAbstractClassName' must match pattern '^Abstract.*$|^.*Factory$'.",
+            "6:1: Name 'NonAbstractClassName' must match pattern '^Abstract.*$|^.*Factory$'.",
+            "9:1: Name 'FactoryWithBadName' must match pattern '^Abstract.*$|^.*Factory$'.",
+            "13:5: Name 'NonAbstractInnerClass' must match pattern '^Abstract.*$|^.*Factory$'.",
+            "26:1: Class 'AbstractClass' must be declared as 'abstract'.",
+            "29:1: Class 'Class1Factory' must be declared as 'abstract'.",
+            "33:5: Class 'AbstractInnerClass' must be declared as 'abstract'.",
+            "38:5: Class 'WellNamedFactory' must be declared as 'abstract'.",
+        };
+
+        verify(checkConfig, getPath("naming" + File.separator + "InputAbstractClassName.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/ConstantNameCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/ConstantNameCheckTest.java
new file mode 100644
index 0000000..c2abc96
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/ConstantNameCheckTest.java
@@ -0,0 +1,129 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import static org.junit.Assert.fail;
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import java.io.File;
+import org.junit.Test;
+
+public class ConstantNameCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testIllegalRegexp()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ConstantNameCheck.class);
+        checkConfig.addAttribute("format", "\\");
+        try {
+            createChecker(checkConfig);
+            fail();
+        }
+        catch (CheckstyleException ex) {
+            // expected exception
+        }
+    }
+
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ConstantNameCheck.class);
+        final String[] expected = {
+            "25:29: Name 'badConstant' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+            "142:30: Name 'BAD__NAME' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testAccessControlTuning()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ConstantNameCheck.class);
+        checkConfig.addAttribute("applyToPublic", "false");
+        checkConfig.addAttribute("applyToProtected", "false");
+        checkConfig.addAttribute("applyToPackage", "false");
+        final String[] expected = {
+            "142:30: Name 'BAD__NAME' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testInterfaceAndAnnotation()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ConstantNameCheck.class);
+        final String[] expected = {
+            "24:16: Name 'data' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+            "64:16: Name 'data' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+        };
+        verify(checkConfig, getPath("InputInner.java"), expected);
+    }
+
+    @Test
+    public void testDefault1()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ConstantNameCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("naming" + File.separator + "InputConstantNames.java"), expected);
+    }
+
+    @Test
+    public void testIntoInterface() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(ConstantNameCheck.class);
+        final String[] expected = {
+            "45:16: Name 'mPublic' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+            "46:9: Name 'mProtected' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+            "47:9: Name 'mPackage' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+            "48:9: Name 'mPrivate' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+            "50:16: Name '_public' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+            "51:9: Name '_protected' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+            "52:9: Name '_package' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+            "53:9: Name '_private' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+        };
+        verify(checkConfig, getPath("naming" + File.separator + "InputMemberNameExtended.java"), expected);
+    }
+
+    @Test
+    public void testStaticMethodInInterface()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(ConstantNameCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig,
+                getPath("InputStaticModifierInInterface.java"),
+                expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalFinalVariableNameCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalFinalVariableNameCheckTest.java
new file mode 100644
index 0000000..cb536fd
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalFinalVariableNameCheckTest.java
@@ -0,0 +1,63 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class LocalFinalVariableNameCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(LocalFinalVariableNameCheck.class);
+        final String[] expected = {
+            "123:19: Name 'CDE' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testSet()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(LocalFinalVariableNameCheck.class);
+        checkConfig.addAttribute("format", "[A-Z]+");
+        final String[] expected = {
+            "122:19: Name 'cde' must match pattern '[A-Z]+'.",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testInnerClass()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(LocalFinalVariableNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("InputInner.java"), expected);
+    }
+}
+
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalVariableNameCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalVariableNameCheckTest.java
new file mode 100644
index 0000000..59fc924
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalVariableNameCheckTest.java
@@ -0,0 +1,82 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class LocalVariableNameCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(LocalVariableNameCheck.class);
+        final String[] expected = {
+            "119:13: Name 'ABC' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "130:18: Name 'I' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "132:20: Name 'InnerBlockVariable' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "207:21: Name 'O' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testInnerClass()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(LocalVariableNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("InputInner.java"), expected);
+    }
+
+    @Test
+    public void testCatchParameter()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(LocalVariableNameCheck.class);
+        checkConfig.addAttribute("tokens", "PARAMETER_DEF");
+        checkConfig.addAttribute("format", "^e$");
+        final String[] expected = {
+            "74:24: Name 'ex' must match pattern '^e$'.",
+        };
+        verify(checkConfig, getPath("InputEmptyStatement.java"), expected);
+    }
+
+    @Test
+    public void testLoopVariables()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(LocalVariableNameCheck.class);
+        checkConfig.addAttribute("format", "^[a-z]{2,}[a-zA-Z0-9]*$");
+        checkConfig.addAttribute("allowOneCharVarInForLoop", "true");
+        final String[] expected = {
+            "19:21: Name 'i' must match pattern '^[a-z]{2,}[a-zA-Z0-9]*$'.",
+            "25:17: Name 'Index' must match pattern '^[a-z]{2,}[a-zA-Z0-9]*$'.",
+        };
+        verify(checkConfig, getPath("InputOneCharInintVarName.java"), expected);
+    }
+}
+
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/MemberNameCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/MemberNameCheckTest.java
new file mode 100644
index 0000000..ab1d580
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/MemberNameCheckTest.java
@@ -0,0 +1,217 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.io.File;
+import org.junit.Test;
+
+public class MemberNameCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testSpecified()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        checkConfig.addAttribute("format", "^m[A-Z][a-zA-Z0-9]*$");
+        final String[] expected = {
+            "35:17: Name 'badMember' must match pattern '^m[A-Z][a-zA-Z0-9]*$'.",
+            "224:17: Name 'someMember' must match pattern '^m[A-Z][a-zA-Z0-9]*$'.",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testInnerClass()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {
+            "56:25: Name 'ABC' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+        verify(checkConfig, getPath("InputInner.java"), expected);
+    }
+
+    @Test
+    public void testDefaults() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {
+            "10:16: Name '_public' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "11:19: Name '_protected' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "12:9: Name '_package' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "13:17: Name '_private' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+        verify(checkConfig,
+               getPath("naming" + File.separator + "InputMemberName.java"),
+               expected);
+    }
+
+    @Test
+    public void testUnderlined() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        checkConfig.addAttribute("format", "^_[a-z]*$");
+        final String[] expected = {
+            "5:16: Name 'mPublic' must match pattern '^_[a-z]*$'.",
+            "6:19: Name 'mProtected' must match pattern '^_[a-z]*$'.",
+            "7:9: Name 'mPackage' must match pattern '^_[a-z]*$'.",
+            "8:17: Name 'mPrivate' must match pattern '^_[a-z]*$'.",
+        };
+        verify(checkConfig,
+               getPath("naming" + File.separator + "InputMemberName.java"),
+               expected);
+    }
+
+    @Test
+    public void testPublicOnly() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        checkConfig.addAttribute("format", "^_[a-z]*$");
+        checkConfig.addAttribute("applyToProtected", "false");
+        checkConfig.addAttribute("applyToPackage", "false");
+        checkConfig.addAttribute("applyToPrivate", "false");
+        final String[] expected = {
+            "5:16: Name 'mPublic' must match pattern '^_[a-z]*$'.",
+        };
+        verify(checkConfig,
+               getPath("naming" + File.separator + "InputMemberName.java"),
+               expected);
+    }
+
+    @Test
+    public void testProtectedOnly() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        checkConfig.addAttribute("format", "^_[a-z]*$");
+        checkConfig.addAttribute("applyToPublic", "false");
+        checkConfig.addAttribute("applyToPackage", "false");
+        checkConfig.addAttribute("applyToPrivate", "false");
+        final String[] expected = {
+            "6:19: Name 'mProtected' must match pattern '^_[a-z]*$'.",
+        };
+        verify(checkConfig,
+               getPath("naming" + File.separator + "InputMemberName.java"),
+               expected);
+    }
+
+    @Test
+    public void testPackageOnly() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        checkConfig.addAttribute("format", "^_[a-z]*$");
+        checkConfig.addAttribute("applyToPublic", "false");
+        checkConfig.addAttribute("applyToProtected", "false");
+        checkConfig.addAttribute("applyToPrivate", "false");
+        final String[] expected = {
+            "7:9: Name 'mPackage' must match pattern '^_[a-z]*$'.",
+        };
+        verify(checkConfig,
+               getPath("naming" + File.separator + "InputMemberName.java"),
+               expected);
+    }
+
+    @Test
+    public void testPrivateOnly() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        checkConfig.addAttribute("format", "^_[a-z]*$");
+        checkConfig.addAttribute("applyToPublic", "false");
+        checkConfig.addAttribute("applyToProtected", "false");
+        checkConfig.addAttribute("applyToPackage", "false");
+        final String[] expected = {
+            "8:17: Name 'mPrivate' must match pattern '^_[a-z]*$'.",
+        };
+        verify(checkConfig,
+               getPath("naming" + File.separator + "InputMemberName.java"),
+               expected);
+    }
+
+    @Test
+    public void testNotPrivate() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        checkConfig.addAttribute("applyToPrivate", "false");
+        final String[] expected = {
+            "10:16: Name '_public' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "11:19: Name '_protected' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "12:9: Name '_package' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+        verify(checkConfig,
+               getPath("naming" + File.separator + "InputMemberName.java"),
+               expected);
+    }
+
+    @Test
+    public void memberNameExtended() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        checkConfig.addAttribute("format", "^[a-z][a-z0-9][a-zA-Z0-9]*$");
+        final String[] expected = {
+            "8:16: Name 'mPublic' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "9:19: Name 'mProtected' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "10:9: Name 'mPackage' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "11:17: Name 'mPrivate' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "13:16: Name '_public' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "14:19: Name '_protected' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "15:9: Name '_package' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "16:17: Name '_private' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "19:20: Name 'mPublic' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "20:23: Name 'mProtected' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "21:13: Name 'mPackage' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "22:21: Name 'mPrivate' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "24:20: Name '_public' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "25:23: Name '_protected' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "26:13: Name '_package' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "27:21: Name '_private' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "31:20: Name 'mPublic' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "32:23: Name 'mProtected' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "33:13: Name 'mPackage' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "34:21: Name 'mPrivate' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "36:20: Name '_public' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "37:23: Name '_protected' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "38:13: Name '_package' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "39:21: Name '_private' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "63:16: Name 'mPublic' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "64:9: Name 'mProtected' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "65:9: Name 'mPackage' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "66:9: Name 'mPrivate' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "68:16: Name '_public' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "69:9: Name '_protected' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "70:9: Name '_package' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+            "71:9: Name '_private' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.",
+        };
+        verify(checkConfig,
+              getPath("naming" + File.separator + "InputMemberNameExtended.java"),
+              expected);
+    }
+}
+
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodNameCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodNameCheckTest.java
new file mode 100644
index 0000000..6a0070c
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/MethodNameCheckTest.java
@@ -0,0 +1,114 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class MethodNameCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MethodNameCheck.class);
+        final String[] expected = {
+            "137:10: Name 'ALL_UPPERCASE_METHOD' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testMethodEqClass() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MethodNameCheck.class);
+
+        final String[] expected = {
+            "12:16: Method Name 'InputMethNameEqualClsName' must not equal the enclosing class name.",
+            "12:16: Name 'InputMethNameEqualClsName' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "17:17: Name 'PRIVATEInputMethNameEqualClsName' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "23:20: Method Name 'Inner' must not equal the enclosing class name.",
+            "23:20: Name 'Inner' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "28:20: Name 'InputMethNameEqualClsName' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "37:24: Method Name 'InputMethNameEqualClsName' must not equal the enclosing class name.",
+            "37:24: Name 'InputMethNameEqualClsName' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "47:9: Method Name 'SweetInterface' must not equal the enclosing class name.",
+            "47:9: Name 'SweetInterface' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "53:17: Method Name 'Outter' must not equal the enclosing class name.",
+            "53:17: Name 'Outter' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+
+        verify(checkConfig, getPath("InputMethNameEqualClsName.java"), expected);
+    }
+
+    @Test
+    public void testMethodEqClassAllow() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MethodNameCheck.class);
+        checkConfig.addAttribute("allowClassName", "true"); //allow method names and class names to equal
+
+        final String[] expected = {
+            "12:16: Name 'InputMethNameEqualClsName' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "17:17: Name 'PRIVATEInputMethNameEqualClsName' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "23:20: Name 'Inner' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "28:20: Name 'InputMethNameEqualClsName' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "37:24: Name 'InputMethNameEqualClsName' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "47:9: Name 'SweetInterface' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "53:17: Name 'Outter' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+
+        verify(checkConfig, getPath("InputMethNameEqualClsName.java"), expected);
+    }
+
+    @Test
+    public void testAccessTuning() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MethodNameCheck.class);
+        checkConfig.addAttribute("allowClassName", "true"); //allow method names and class names to equal
+        checkConfig.addAttribute("applyToPrivate", "false"); //allow method names and class names to equal
+        final String[] expected = {
+            "12:16: Name 'InputMethNameEqualClsName' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "23:20: Name 'Inner' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "28:20: Name 'InputMethNameEqualClsName' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "37:24: Name 'InputMethNameEqualClsName' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "47:9: Name 'SweetInterface' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "53:17: Name 'Outter' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+
+        verify(checkConfig, getPath("InputMethNameEqualClsName.java"), expected);
+    }
+
+    @Test
+    public void testForNpe() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MethodNameCheck.class);
+
+        final String[] expected = {
+        };
+
+        verify(checkConfig, getPath("naming/InputMethodNameExtra.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/PackageNameCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/PackageNameCheckTest.java
new file mode 100644
index 0000000..f777a2c
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/PackageNameCheckTest.java
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class PackageNameCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testSpecified()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(PackageNameCheck.class);
+        checkConfig.addAttribute("format", "[A-Z]+");
+        final String[] expected = {
+            "6:9: Name 'com.puppycrawl.tools.checkstyle' must match pattern '[A-Z]+'.",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(PackageNameCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/ParameterNameCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/ParameterNameCheckTest.java
new file mode 100644
index 0000000..8dac4e5
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/ParameterNameCheckTest.java
@@ -0,0 +1,65 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class ParameterNameCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testCatch()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ParameterNameCheck.class);
+        checkConfig.addAttribute("format", "^NO_WAY_MATEY$");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputLeftCurlyOther.java"), expected);
+    }
+
+    @Test
+    public void testSpecified()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ParameterNameCheck.class);
+        checkConfig.addAttribute("format", "^a[A-Z][a-zA-Z0-9]*$");
+        final String[] expected = {
+            "71:19: Name 'badFormat1' must match pattern '^a[A-Z][a-zA-Z0-9]*$'.",
+            "71:34: Name 'badFormat2' must match pattern '^a[A-Z][a-zA-Z0-9]*$'.",
+            "72:25: Name 'badFormat3' must match pattern '^a[A-Z][a-zA-Z0-9]*$'.",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ParameterNameCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/StaticVariableNameCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/StaticVariableNameCheckTest.java
new file mode 100644
index 0000000..e587bee
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/StaticVariableNameCheckTest.java
@@ -0,0 +1,54 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class StaticVariableNameCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testSpecified()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(StaticVariableNameCheck.class);
+        checkConfig.addAttribute("format", "^s[A-Z][a-zA-Z0-9]*$");
+        final String[] expected = {
+            "30:24: Name 'badStatic' must match pattern '^s[A-Z][a-zA-Z0-9]*$'.",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testAccessTuning()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(StaticVariableNameCheck.class);
+        checkConfig.addAttribute("format", "^s[A-Z][a-zA-Z0-9]*$");
+        checkConfig.addAttribute("applyToPrivate", "false"); // allow method names and class names to equal
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+}
+
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/TypeNameCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/TypeNameCheckTest.java
new file mode 100644
index 0000000..e8fe1d2
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/TypeNameCheckTest.java
@@ -0,0 +1,142 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.MessageFormat;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+public class TypeNameCheckTest
+    extends BaseCheckTestSupport
+{
+
+    /**
+     * Localized error message from @link {@link TypeNameCheck}.
+     */
+    private final String msg = getCheckMessage(AbstractNameCheck.MSG_INVALID_PATTERN);
+
+    private final String inputFilename;
+
+    public TypeNameCheckTest() throws IOException
+    {
+        inputFilename = getPath("naming" + File.separator
+                + "InputTypeName.java");
+    }
+
+    @Test
+    public void testSpecified()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(TypeNameCheck.class);
+        checkConfig.addAttribute("format", "^inputHe");
+        final String[] expected = {
+        };
+        verify(checkConfig, inputFilename, expected);
+    }
+
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(TypeNameCheck.class);
+        final String[] expected = {
+                buildMesssage(3, 7, "inputHeaderClass",
+                        TypeNameCheck.DEFAULT_PATTERN),
+                buildMesssage(5, 22, "inputHeaderInterface",
+                        TypeNameCheck.DEFAULT_PATTERN),
+                buildMesssage(7, 17, "inputHeaderEnum",
+                        TypeNameCheck.DEFAULT_PATTERN),
+                buildMesssage(9, 23, "inputHeaderAnnotation",
+                    TypeNameCheck.DEFAULT_PATTERN),
+        };
+        verify(checkConfig, inputFilename, expected);
+    }
+
+    @Test
+    public void testClassSpecific()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(TypeNameCheck.class);
+        checkConfig.addAttribute("tokens", TokenTypes.getTokenName(TokenTypes.CLASS_DEF));
+        final String[] expected = {
+                buildMesssage(3, 7, "inputHeaderClass",
+                        TypeNameCheck.DEFAULT_PATTERN),
+        };
+        verify(checkConfig, inputFilename, expected);
+    }
+
+    @Test
+    public void testInterfaceSpecific()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(TypeNameCheck.class);
+        checkConfig.addAttribute("tokens", TokenTypes.getTokenName(TokenTypes.INTERFACE_DEF));
+        final String[] expected = {
+                buildMesssage(5, 22, "inputHeaderInterface",
+                        TypeNameCheck.DEFAULT_PATTERN),
+        };
+        verify(checkConfig, inputFilename, expected);
+    }
+
+    @Test
+    public void testEnumSpecific()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(TypeNameCheck.class);
+        checkConfig.addAttribute("tokens", TokenTypes.getTokenName(TokenTypes.ENUM_DEF));
+        final String[] expected = {
+                buildMesssage(7, 17, "inputHeaderEnum",
+                        TypeNameCheck.DEFAULT_PATTERN),
+        };
+        verify(checkConfig, inputFilename, expected);
+    }
+
+    @Test
+    public void testAnnotationSpecific()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(TypeNameCheck.class);
+        checkConfig.addAttribute("tokens", TokenTypes.getTokenName(TokenTypes.ANNOTATION_DEF));
+        final String[] expected = {
+            buildMesssage(9, 23, "inputHeaderAnnotation",
+                        TypeNameCheck.DEFAULT_PATTERN),
+        };
+        verify(checkConfig, inputFilename, expected);
+    }
+
+    private String buildMesssage(int lineNumber, int colNumber, String name,
+            String pattern)
+    {
+        return lineNumber + ":" + colNumber + ": "
+                + MessageFormat.format(msg, name, pattern);
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/TypeParameterNameTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/TypeParameterNameTest.java
new file mode 100644
index 0000000..856881c
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/TypeParameterNameTest.java
@@ -0,0 +1,122 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+import java.io.File;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class TypeParameterNameTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testClassDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ClassTypeParameterNameCheck.class);
+        final String[] expected = {
+            "5:38: Name 't' must match pattern '^[A-Z]$'.",
+            "13:14: Name 'foo' must match pattern '^[A-Z]$'.",
+            "27:24: Name 'foo' must match pattern '^[A-Z]$'.",
+        };
+        verify(checkConfig, getPath("naming" + File.separator + "InputTypeParameterName.java"), expected);
+    }
+
+    @Test
+    public void testMethodDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MethodTypeParameterNameCheck.class);
+        final String[] expected = {
+            "7:13: Name 'TT' must match pattern '^[A-Z]$'.",
+            "9:6: Name 'e_e' must match pattern '^[A-Z]$'.",
+            "19:6: Name 'Tfo$o2T' must match pattern '^[A-Z]$'.",
+            "23:6: Name 'foo' must match pattern '^[A-Z]$'.",
+            "28:10: Name '_fo' must match pattern '^[A-Z]$'.",
+        };
+        verify(checkConfig, getPath("naming" + File.separator + "InputTypeParameterName.java"), expected);
+    }
+
+    @Test
+    public void testInterfaceDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(InterfaceTypeParameterNameCheck.class);
+        final String[] expected = {
+            "48:15: Name 'Input' must match pattern '^[A-Z]$'.",
+        };
+        verify(checkConfig, getPath("naming" + File.separator + "InputTypeParameterName.java"), expected);
+    }
+
+    @Test
+    public void testClassFooName()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ClassTypeParameterNameCheck.class);
+        checkConfig.addAttribute("format", "^foo$");
+
+        final String[] expected = {
+            "5:38: Name 't' must match pattern '^foo$'.",
+            "33:18: Name 'T' must match pattern '^foo$'.",
+        };
+        verify(checkConfig, getPath("naming" + File.separator + "InputTypeParameterName.java"), expected);
+    }
+
+    @Test
+    public void testMethodFooName()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MethodTypeParameterNameCheck.class);
+        checkConfig.addAttribute("format", "^foo$");
+
+        final String[] expected = {
+            "7:13: Name 'TT' must match pattern '^foo$'.",
+            "9:6: Name 'e_e' must match pattern '^foo$'.",
+            "19:6: Name 'Tfo$o2T' must match pattern '^foo$'.",
+            "28:10: Name '_fo' must match pattern '^foo$'.",
+            "35:6: Name 'E' must match pattern '^foo$'.",
+            "37:14: Name 'T' must match pattern '^foo$'.",
+            //"40:14: Name 'EE' must match pattern '^foo$'.",
+        };
+        verify(checkConfig, getPath("naming" + File.separator + "InputTypeParameterName.java"), expected);
+    }
+
+    @Test
+    public void testInterfaceFooName()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(InterfaceTypeParameterNameCheck.class);
+        checkConfig.addAttribute("format", "^foo$");
+
+        final String[] expected = {
+            "48:15: Name 'Input' must match pattern '^foo$'.",
+            "52:24: Name 'T' must match pattern '^foo$'.",
+        };
+        verify(checkConfig, getPath("naming" + File.separator + "InputTypeParameterName.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpMultilineCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpMultilineCheckTest.java
new file mode 100644
index 0000000..a126269
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpMultilineCheckTest.java
@@ -0,0 +1,112 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.regexp;
+
+import com.puppycrawl.tools.checkstyle.BaseFileSetCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+public class RegexpMultilineCheckTest extends BaseFileSetCheckTestSupport
+{
+    private DefaultConfiguration mCheckConfig;
+
+    @Before
+    public void setUp()
+    {
+        mCheckConfig = createCheckConfig(RegexpMultilineCheck.class);
+    }
+
+    @Test
+    public void testIt() throws Exception
+    {
+        final String illegal = "System\\.(out)|(err)\\.print(ln)?\\(";
+        mCheckConfig.addAttribute("format", illegal);
+        final String[] expected = {
+            "69: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(mCheckConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testMessageProperty()
+        throws Exception
+    {
+        final String illegal = "System\\.(out)|(err)\\.print(ln)?\\(";
+        final String message = "Bad line :(";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("message", message);
+        final String[] expected = {
+            "69: " + message,
+        };
+        verify(mCheckConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCaseTrue() throws Exception
+    {
+        final String illegal = "SYSTEM\\.(OUT)|(ERR)\\.PRINT(LN)?\\(";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreCase", "true");
+        final String[] expected = {
+            "69: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(mCheckConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCaseFalse() throws Exception
+    {
+        final String illegal = "SYSTEM\\.(OUT)|(ERR)\\.PRINT(LN)?\\(";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreCase", "false");
+        final String[] expected = {};
+        verify(mCheckConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testIllegalFailBelowErrorLimit() throws Exception
+    {
+        final String illegal = "^import";
+        mCheckConfig.addAttribute("format", illegal);
+        final String[] expected = {
+            "7: Line matches the illegal pattern '" + illegal + "'.",
+            "8: Line matches the illegal pattern '" + illegal + "'.",
+            "9: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(mCheckConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    // Need to fix the line endings in the input file
+    @Ignore @Test
+    public void testCarriageReturn() throws Exception
+    {
+        final String illegal = "\\r";
+        mCheckConfig.addAttribute("format", illegal);
+        final String[] expected = {
+            "14: Line matches the illegal pattern '" + illegal + "'.",
+            "16: Line matches the illegal pattern '" + illegal + "'.",
+            "19: Line matches the illegal pattern '" + illegal + "'.",
+            "21: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(mCheckConfig, getPath("InputLineBreaks.java"), expected);
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineCheckTest.java
new file mode 100644
index 0000000..80dd4e4
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineCheckTest.java
@@ -0,0 +1,82 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.regexp;
+
+import com.puppycrawl.tools.checkstyle.BaseFileSetCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Before;
+import org.junit.Test;
+
+public class RegexpSinglelineCheckTest extends BaseFileSetCheckTestSupport
+{
+    private DefaultConfiguration mCheckConfig;
+
+    @Before
+    public void setUp()
+    {
+        mCheckConfig = createCheckConfig(RegexpSinglelineCheck.class);
+    }
+
+    @Test
+    public void testIt() throws Exception
+    {
+        final String illegal = "System\\.(out)|(err)\\.print(ln)?\\(";
+        mCheckConfig.addAttribute("format", illegal);
+        final String[] expected = {
+            "69: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(mCheckConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testMessageProperty()
+        throws Exception
+    {
+        final String illegal = "System\\.(out)|(err)\\.print(ln)?\\(";
+        final String message = "Bad line :(";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("message", message);
+        final String[] expected = {
+            "69: " + message,
+        };
+        verify(mCheckConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCaseTrue() throws Exception
+    {
+        final String illegal = "SYSTEM\\.(OUT)|(ERR)\\.PRINT(LN)?\\(";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreCase", "true");
+        final String[] expected = {
+            "69: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(mCheckConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCaseFalse() throws Exception
+    {
+        final String illegal = "SYSTEM\\.(OUT)|(ERR)\\.PRINT(LN)?\\(";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreCase", "false");
+        final String[] expected = {};
+        verify(mCheckConfig, getPath("InputSemantic.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineJavaCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineJavaCheckTest.java
new file mode 100644
index 0000000..4408c3a
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/regexp/RegexpSinglelineJavaCheckTest.java
@@ -0,0 +1,250 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.regexp;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Before;
+import org.junit.Test;
+
+public class RegexpSinglelineJavaCheckTest extends BaseCheckTestSupport
+{
+    private DefaultConfiguration mCheckConfig;
+
+    @Before
+    public void setUp()
+    {
+        mCheckConfig = createCheckConfig(RegexpSinglelineJavaCheck.class);
+    }
+
+    @Test
+    public void testIt() throws Exception
+    {
+        final String illegal = "System\\.(out)|(err)\\.print(ln)?\\(";
+        mCheckConfig.addAttribute("format", illegal);
+        final String[] expected = {
+            "69: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(mCheckConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testMessageProperty()
+        throws Exception
+    {
+        final String illegal = "System\\.(out)|(err)\\.print(ln)?\\(";
+        final String message = "Bad line :(";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("message", message);
+        final String[] expected = {
+            "69: " + message,
+        };
+        verify(mCheckConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCaseTrue() throws Exception
+    {
+        final String illegal = "SYSTEM\\.(OUT)|(ERR)\\.PRINT(LN)?\\(";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreCase", "true");
+        final String[] expected = {
+            "69: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(mCheckConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCaseFalse() throws Exception
+    {
+        final String illegal = "SYSTEM\\.(OUT)|(ERR)\\.PRINT(LN)?\\(";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreCase", "false");
+        final String[] expected = {};
+        verify(mCheckConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsCppStyle() throws Exception
+    {
+        // See if the comment is removed properly
+        final String illegal = "don't use trailing comments";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+        };
+        verify(mCheckConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsFalseCppStyle() throws Exception
+    {
+        // See if the comment is removed properly
+        final String illegal = "don't use trailing comments";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreComments", "false");
+        final String[] expected = {
+            "4: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(mCheckConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsCStyle() throws Exception
+    {
+        // See if the comment is removed properly
+        final String illegal = "c-style 1";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+        };
+        verify(mCheckConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsFalseCStyle() throws Exception
+    {
+        final String illegal = "c-style 1";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreComments", "false");
+        final String[] expected = {
+            "19: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(mCheckConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsMultipleCStyle() throws Exception
+    {
+        // See if a second comment on the same line is removed properly
+        final String illegal = "c-style 2";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+        };
+        verify(mCheckConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsMultiLine() throws Exception
+    {
+        final String illegal = "Let's check multi-line comments";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+        };
+        verify(mCheckConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsInlineStart() throws Exception
+    {
+        final String illegal = "long ms /";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+        };
+        verify(mCheckConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsInlineEnd() throws Exception
+    {
+        final String illegal = "int z";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+            "22: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(mCheckConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsInlineMiddle() throws Exception
+    {
+        final String illegal = "int y";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+            "23: Line matches the illegal pattern '" + illegal + "'.",
+        };
+        verify(mCheckConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testIgnoreCommentsNoSpaces() throws Exception
+    {
+        // make sure the comment is not turned into spaces
+        final String illegal = "long ms  ";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+        };
+        verify(mCheckConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void test1371588() throws Exception
+    {
+        // StackOverflowError with trailing space and ignoreComments
+        final String illegal = "\\s+$";
+        mCheckConfig.addAttribute("format", illegal);
+        mCheckConfig.addAttribute("ignoreComments", "true");
+        final String[] expected = {
+        };
+        verify(mCheckConfig, getPath("InputTrailingComment.java"), expected);
+    }
+
+    @Test
+    public void testExistingInDoc() throws Exception
+    {
+        final String required = "Test case file";
+        mCheckConfig.addAttribute("format", required);
+        mCheckConfig.addAttribute("minimum", "1");
+        mCheckConfig.addAttribute("maximum", "1000");
+        final String[] expected = {
+        };
+        verify(mCheckConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testExistingInCode() throws Exception
+    {
+        final String required = "package";
+        mCheckConfig.addAttribute("format", required);
+        mCheckConfig.addAttribute("minimum", "1");
+        mCheckConfig.addAttribute("maximum", "1000");
+        final String[] expected = {
+        };
+        verify(mCheckConfig, getPath("InputSemantic.java"), expected);
+    }
+
+    @Test
+    public void testMissing() throws Exception
+    {
+        final String required = "This text is not in the file";
+        mCheckConfig.addAttribute("format", required);
+        mCheckConfig.addAttribute("minimum", "1");
+        mCheckConfig.addAttribute("maximum", "1000");
+        final String[] expected = {
+            "0: File does not contain at least 1 matches for pattern '" + required + "'.",
+        };
+        verify(mCheckConfig, getPath("InputSemantic.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/AnonInnerLengthCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/AnonInnerLengthCheckTest.java
new file mode 100644
index 0000000..31948f8
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/AnonInnerLengthCheckTest.java
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+/**
+ * @author Rob Worth
+ * @author Lars K�hne
+ */
+public class AnonInnerLengthCheckTest extends BaseCheckTestSupport
+{
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(AnonInnerLengthCheck.class);
+        final String[] expected = {
+            "50:35: Anonymous inner class length is 21 lines (max allowed is 20).",
+        };
+        verify(checkConfig, getPath("InputAnonInnerLength.java"), expected);
+    }
+
+    @Test
+    public void testNonDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(AnonInnerLengthCheck.class);
+        checkConfig.addAttribute("max", "6");
+        final String[] expected = {
+            "50:35: Anonymous inner class length is 21 lines (max allowed is 6).",
+            "75:35: Anonymous inner class length is 20 lines (max allowed is 6).",
+        };
+        verify(checkConfig, getPath("InputAnonInnerLength.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/ExecutableStatementCountCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/ExecutableStatementCountCheckTest.java
new file mode 100644
index 0000000..82edf57
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/ExecutableStatementCountCheckTest.java
@@ -0,0 +1,121 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class ExecutableStatementCountCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testMaxZero() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ExecutableStatementCountCheck.class);
+
+        checkConfig.addAttribute("max", "0");
+
+        final String[] expected = {
+            "4:5: Executable statement count is 3 (max allowed is 0).",
+            "7:17: Executable statement count is 1 (max allowed is 0).",
+            "17:5: Executable statement count is 2 (max allowed is 0).",
+            "27:5: Executable statement count is 1 (max allowed is 0).",
+            "34:5: Executable statement count is 3 (max allowed is 0).",
+            "48:5: Executable statement count is 2 (max allowed is 0).",
+            "58:5: Executable statement count is 2 (max allowed is 0).",
+            "67:5: Executable statement count is 2 (max allowed is 0).",
+            "76:5: Executable statement count is 2 (max allowed is 0).",
+            "79:13: Executable statement count is 1 (max allowed is 0).",
+        };
+
+        verify(checkConfig, getPath("ComplexityCheckTestInput.java"), expected);
+    }
+
+    @Test
+    public void testMethodDef() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ExecutableStatementCountCheck.class);
+
+        checkConfig.addAttribute("max", "0");
+        checkConfig.addAttribute("tokens", "METHOD_DEF");
+
+        final String[] expected = {
+            "4:5: Executable statement count is 3 (max allowed is 0).",
+            "7:17: Executable statement count is 1 (max allowed is 0).",
+            "17:5: Executable statement count is 2 (max allowed is 0).",
+            "27:5: Executable statement count is 1 (max allowed is 0).",
+            "34:5: Executable statement count is 3 (max allowed is 0).",
+            "79:13: Executable statement count is 1 (max allowed is 0).",
+        };
+
+        verify(checkConfig, getPath("ComplexityCheckTestInput.java"), expected);
+    }
+
+    @Test
+    public void testCtorDef() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ExecutableStatementCountCheck.class);
+
+        checkConfig.addAttribute("max", "0");
+        checkConfig.addAttribute("tokens", "CTOR_DEF");
+
+        final String[] expected = {
+            "48:5: Executable statement count is 2 (max allowed is 0).",
+            "76:5: Executable statement count is 2 (max allowed is 0).",
+        };
+
+        verify(checkConfig, getPath("ComplexityCheckTestInput.java"), expected);
+    }
+
+    @Test
+    public void testStaticInit() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ExecutableStatementCountCheck.class);
+
+        checkConfig.addAttribute("max", "0");
+        checkConfig.addAttribute("tokens", "STATIC_INIT");
+
+        final String[] expected = {
+            "58:5: Executable statement count is 2 (max allowed is 0).",
+        };
+
+        verify(checkConfig, getPath("ComplexityCheckTestInput.java"), expected);
+    }
+
+    @Test
+    public void testInstanceInit() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ExecutableStatementCountCheck.class);
+
+        checkConfig.addAttribute("max", "0");
+        checkConfig.addAttribute("tokens", "INSTANCE_INIT");
+
+        final String[] expected = {
+            "67:5: Executable statement count is 2 (max allowed is 0).",
+        };
+
+        verify(checkConfig, getPath("ComplexityCheckTestInput.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/FileLengthCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/FileLengthCheckTest.java
new file mode 100644
index 0000000..887012c
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/FileLengthCheckTest.java
@@ -0,0 +1,84 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+import static org.junit.Assert.fail;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import org.junit.Test;
+
+public class FileLengthCheckTest
+    extends BaseCheckTestSupport
+{
+    @Override
+    protected DefaultConfiguration createCheckerConfig(
+        Configuration aCheckConfig)
+    {
+        DefaultConfiguration dc = new DefaultConfiguration("root");
+        dc.addChild(aCheckConfig);
+        return dc;
+    }
+
+    @Test
+    public void testAlarm() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+            createCheckConfig(FileLengthCheck.class);
+        checkConfig.addAttribute("max", "20");
+        final String[] expected = {
+            "1: File length is 225 lines (max allowed is 20).",
+        };
+        verify(createChecker(checkConfig),
+                getPath("InputSimple.java"),
+                getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testOK() throws Exception
+    {
+        DefaultConfiguration checkConfig =
+            createCheckConfig(FileLengthCheck.class);
+        checkConfig.addAttribute("max", "2000");
+        final String[] expected = {
+        };
+        verify(createChecker(checkConfig),
+                getPath("InputSimple.java"),
+                getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testArgs() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(FileLengthCheck.class);
+        try {
+            checkConfig.addAttribute("max", "abc");
+            createChecker(checkConfig);
+            fail("Should indicate illegal args");
+        }
+        catch (CheckstyleException ex) {
+            // Expected Exception because of illegal argument for "max"
+        }
+    }
+
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheckTest.java
new file mode 100644
index 0000000..f3adc44
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheckTest.java
@@ -0,0 +1,57 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class LineLengthCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testSimple()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(LineLengthCheck.class);
+        checkConfig.addAttribute("max", "80");
+        checkConfig.addAttribute("ignorePattern",  "^.*is OK.*regexp.*$");
+        final String[] expected = {
+            "18: Line is longer than 80 characters (found 81).",
+            "145: Line is longer than 80 characters (found 83).",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void shouldLogActualLineLength()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(LineLengthCheck.class);
+        checkConfig.addAttribute("max", "80");
+        checkConfig.addAttribute("ignorePattern", "^.*is OK.*regexp.*$");
+        checkConfig.addMessage("maxLineLen", "{0},{1}");
+        final String[] expected = {
+            "18: 80,81",
+            "145: 80,83",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheckInput.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheckInput.java
new file mode 100644
index 0000000..200f710
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheckInput.java
@@ -0,0 +1,191 @@
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+public class MethodCountCheckInput {
+
+  /**
+   * Dummy inner class to check that the inner-classes methods are not counted
+   * for the outer class.
+   */
+  public class PublicMethodsInnerclassInnerclass {
+    /**
+     * Dummy method doing nothing
+     */
+    public void doNothing50() {
+    }
+
+    /**
+     * Dummy method doing nothing
+     */
+    public void doNothing51() {
+    }
+
+    /**
+     * Dummy method doing nothing
+     */
+    public void doNothing52() {
+    }
+
+    /**
+     * Dummy method doing nothing
+     */
+    public void doNothing53() {
+    }
+
+    /**
+     * Dummy method doing nothing
+     */
+    public void doNothing54() {
+    }
+  }
+
+  /**
+   * Dummy inner class to check that the inner-classes methods are not counted
+   * for the outer class.
+   */
+  public interface PublicMethodsInnerInterface {
+    /**
+     * Dummy method doing nothing
+     */
+    public void doNothing60();
+
+    /**
+     * Dummy method doing nothing
+     */
+    public void doNothing61();
+
+    /**
+     * Dummy method doing nothing
+     */
+    public abstract void doNothing62();
+
+    /**
+     * Dummy method doing nothing
+     */
+    abstract void doNothing63();
+
+    /**
+     * Dummy method doing nothing
+     */
+    void doNothing64();
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  public void doNothing00() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  public void doNothing01() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  public void doNothing02() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  public void doNothing03() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  public void doNothing04() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  protected void doNothing10() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  protected void doNothing11() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  protected void doNothing12() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  protected void doNothing13() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  protected void doNothing14() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  void doNothing20() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  void doNothing21() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  void doNothing22() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  void doNothing23() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  void doNothing24() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  private void doNothing30() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  private void doNothing31() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  private void doNothing32() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  private void doNothing33() {
+  }
+
+  /**
+   * Dummy method doing nothing
+   */
+  private void doNothing34() {
+  }
+}
\ No newline at end of file
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheckInput2.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheckInput2.java
new file mode 100644
index 0000000..45e18ba
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheckInput2.java
@@ -0,0 +1,18 @@
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+public enum MethodCountCheckInput2 {
+
+    RED {
+        @Override void something() {};
+    },
+
+    BLUE {
+        @Override void something() {};
+        protected void other1() {};
+        private void other2() {};
+    };
+
+    @Override public String toString() { return ""; };
+
+    abstract void something();
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheckTest.java
new file mode 100644
index 0000000..d24cd60
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodCountCheckTest.java
@@ -0,0 +1,84 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class MethodCountCheckTest extends BaseCheckTestSupport
+{
+
+    @Test
+    public void testDefaults() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MethodCountCheck.class);
+
+        final String[] expected = {
+        };
+
+        verify(checkConfig,
+            getSrcPath("checks/sizes/MethodCountCheckInput.java"), expected);
+    }
+
+    @Test
+    public void testThrees() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MethodCountCheck.class);
+        checkConfig.addAttribute("maxPrivate", "3");
+        checkConfig.addAttribute("maxPackage", "3");
+        checkConfig.addAttribute("maxProtected", "3");
+        checkConfig.addAttribute("maxPublic", "3");
+        checkConfig.addAttribute("maxTotal", "3");
+
+        final String[] expected = {
+            "3: Number of package methods is 5 (max allowed is 3).",
+            "3: Number of private methods is 5 (max allowed is 3).",
+            "3: Number of protected methods is 5 (max allowed is 3).",
+            "3: Number of public methods is 5 (max allowed is 3).",
+            "3: Total number of methods is 20 (max allowed is 3).",
+            "9: Number of public methods is 5 (max allowed is 3).",
+            "9: Total number of methods is 5 (max allowed is 3).",
+            "45: Number of public methods is 5 (max allowed is 3).",
+            "45: Total number of methods is 5 (max allowed is 3).",
+        };
+
+        verify(checkConfig,
+            getSrcPath("checks/sizes/MethodCountCheckInput.java"), expected);
+    }
+
+    @Test
+    public void testEnum() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MethodCountCheck.class);
+        checkConfig.addAttribute("maxPrivate", "0");
+        checkConfig.addAttribute("maxTotal", "2");
+
+        final String[] expected = {
+            "9: Number of private methods is 1 (max allowed is 0).",
+            "9: Total number of methods is 3 (max allowed is 2).",
+        };
+
+        verify(checkConfig,
+            getSrcPath("checks/sizes/MethodCountCheckInput2.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheckTest.java
new file mode 100644
index 0000000..b5d17ac
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/MethodLengthCheckTest.java
@@ -0,0 +1,60 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class MethodLengthCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testIt() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MethodLengthCheck.class);
+        checkConfig.addAttribute("max", "19");
+        final String[] expected = {
+            "79:5: Method length is 20 lines (max allowed is 19).",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testcountEmpty() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MethodLengthCheck.class);
+        checkConfig.addAttribute("max", "19");
+        checkConfig.addAttribute("countEmpty", "false");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testAbstract() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MethodLengthCheck.class);
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputModifier.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/OuterTypeNumberCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/OuterTypeNumberCheckTest.java
new file mode 100644
index 0000000..176bc5a
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/OuterTypeNumberCheckTest.java
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class OuterTypeNumberCheckTest extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(OuterTypeNumberCheck.class);
+        final String[] expected = {
+            "6:1: Outer types defined is 3 (max allowed is 1).",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testMax30() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(OuterTypeNumberCheck.class);
+        checkConfig.addAttribute("max", "30");
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/ParameterNumberCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/ParameterNumberCheckTest.java
new file mode 100644
index 0000000..7d293f2
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/ParameterNumberCheckTest.java
@@ -0,0 +1,66 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.sizes;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class ParameterNumberCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ParameterNumberCheck.class);
+        final String[] expected = {
+            "194:10: More than 7 parameters (found 9).",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testNum()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ParameterNumberCheck.class);
+        checkConfig.addAttribute("max", "2");
+        final String[] expected = {
+            "71:9: More than 2 parameters (found 3).",
+            "194:10: More than 2 parameters (found 9).",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void shouldLogActualParameterNumber()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ParameterNumberCheck.class);
+        checkConfig.addMessage("maxParam", "{0},{1}");
+        final String[] expected = {
+            "194:10: 7,9",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForInitializerPadCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForInitializerPadCheckTest.java
new file mode 100644
index 0000000..0d9cd08
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForInitializerPadCheckTest.java
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Before;
+import org.junit.Test;
+
+public class EmptyForInitializerPadCheckTest
+    extends BaseCheckTestSupport
+{
+    private DefaultConfiguration mCheckConfig;
+
+    @Before
+    public void setUp()
+    {
+        mCheckConfig = createCheckConfig(EmptyForInitializerPadCheck.class);
+    }
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        final String[] expected = {
+            "48:14: ';' is preceded with whitespace.",
+        };
+        verify(mCheckConfig, getPath("InputForWhitespace.java"), expected);
+    }
+
+    @Test
+    public void testSpaceOption() throws Exception
+    {
+        mCheckConfig.addAttribute("option", PadOption.SPACE.toString());
+        final String[] expected = {
+            "51:13: ';' is not preceded with whitespace.",
+        };
+        verify(mCheckConfig, getPath("InputForWhitespace.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForIteratorPadCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForIteratorPadCheckTest.java
new file mode 100644
index 0000000..7938dda
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyForIteratorPadCheckTest.java
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Before;
+import org.junit.Test;
+
+public class EmptyForIteratorPadCheckTest
+    extends BaseCheckTestSupport
+{
+    private DefaultConfiguration mCheckConfig;
+
+    @Before
+    public void setUp()
+    {
+        mCheckConfig = createCheckConfig(EmptyForIteratorPadCheck.class);
+    }
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        final String[] expected = {
+            "27:31: ';' is followed by whitespace.",
+            "43:32: ';' is followed by whitespace.",
+        };
+        verify(mCheckConfig, getPath("InputForWhitespace.java"), expected);
+    }
+
+    @Test
+    public void testSpaceOption() throws Exception
+    {
+        mCheckConfig.addAttribute("option", PadOption.SPACE.toString());
+        final String[] expected = {
+            "23:31: ';' is not followed by whitespace.",
+        };
+        verify(mCheckConfig, getPath("InputForWhitespace.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyLineSeparatorCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyLineSeparatorCheckTest.java
new file mode 100644
index 0000000..1eac7af
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/EmptyLineSeparatorCheckTest.java
@@ -0,0 +1,69 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class EmptyLineSeparatorCheckTest
+    extends BaseCheckTestSupport
+{
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(EmptyLineSeparatorCheck.class);
+
+        final String[] expected = {
+            "20: 'import' should be separated from previous statement.",
+            "33: 'CLASS_DEF' should be separated from previous statement.",
+            "36: 'VARIABLE_DEF' should be separated from previous statement.",
+            "37: 'STATIC_INIT' should be separated from previous statement.",
+            "75: 'INTERFACE_DEF' should be separated from previous statement.",
+        };
+        verify(checkConfig, getPath("whitespace/InputEmptyLineSeparatorCheck.java"), expected);
+    }
+
+    @Test
+    public void testAllowNoEmptyLineBetweenFields() throws Exception
+    {
+
+        DefaultConfiguration checkConfig = createCheckConfig(EmptyLineSeparatorCheck.class);
+        checkConfig.addAttribute("allowNoEmptyLineBetweenFields", "true");
+
+        final String[] expected = {
+            "20: 'import' should be separated from previous statement.",
+            "33: 'CLASS_DEF' should be separated from previous statement.",
+            "37: 'STATIC_INIT' should be separated from previous statement.",
+            "75: 'INTERFACE_DEF' should be separated from previous statement.",
+        };
+        verify(checkConfig, getPath("whitespace/InputEmptyLineSeparatorCheck.java"), expected);
+    }
+
+    @Test
+    public void testHeader() throws Exception
+    {
+        DefaultConfiguration checkConfig = createCheckConfig(EmptyLineSeparatorCheck.class);
+        final String[] expected = {
+            "19: 'package' should be separated from previous statement.",
+        };
+        verify(checkConfig, getPath("whitespace/InputEmptyLineSeparatorCheckHeader.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/FileTabCharacterCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/FileTabCharacterCheckTest.java
new file mode 100644
index 0000000..14c4d4a
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/FileTabCharacterCheckTest.java
@@ -0,0 +1,99 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import java.io.File;
+import org.junit.Test;
+
+public class FileTabCharacterCheckTest
+    extends BaseCheckTestSupport
+{
+    @Override
+    protected DefaultConfiguration createCheckerConfig(
+        Configuration aCheckConfig)
+    {
+        final DefaultConfiguration dc = new DefaultConfiguration("root");
+        dc.addChild(aCheckConfig);
+        return dc;
+    }
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createConfig(false);
+        final String[] expected = {
+            "19:25: File contains tab characters (this is the first instance).",
+        };
+        final File[] files = {
+            new File(getPath("InputSimple.java")),
+        };
+        verify(createChecker(checkConfig), files, getPath("InputSimple.java"),
+            expected);
+    }
+
+    @Test
+    public void testVerbose() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createConfig(true);
+        final String[] expected = {
+            "19:25: Line contains a tab character.",
+            "145:35: Line contains a tab character.",
+            "146:64: Line contains a tab character.",
+            "154:9: Line contains a tab character.",
+            "155:10: Line contains a tab character.",
+            "156:1: Line contains a tab character.",
+            "157:3: Line contains a tab character.",
+            "158:3: Line contains a tab character.",
+        };
+        final File[] files = {
+            new File(getPath("InputSimple.java")),
+        };
+        verify(createChecker(checkConfig), files, getPath("InputSimple.java"),
+            expected);
+    }
+
+    @Test
+    public void testBadFile() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createConfig(false);
+        final String path = getPath("Claira");
+        final String[] expected = {
+            "0: File not found!",
+        };
+        final File[] files = {
+            new File(path),
+        };
+        verify(createChecker(checkConfig), files, path, expected);
+    }
+
+    /**
+     * Creates a configuration that is functionally close to that in the docs.
+     * @param verbose TODO
+     */
+    private DefaultConfiguration createConfig(boolean verbose)
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(FileTabCharacterCheck.class);
+        checkConfig.addAttribute("eachLine", Boolean.toString(verbose));
+        return checkConfig;
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheckTest.java
new file mode 100644
index 0000000..7460696
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/GenericWhitespaceCheckTest.java
@@ -0,0 +1,86 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.google.common.collect.Maps;
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import java.util.Map;
+import org.junit.Before;
+import org.junit.Test;
+
+public class GenericWhitespaceCheckTest
+    extends BaseCheckTestSupport
+{
+    private DefaultConfiguration mCheckConfig;
+
+    @Before
+    public void setUp()
+    {
+        mCheckConfig = createCheckConfig(GenericWhitespaceCheck.class);
+        Map<Class<?>, Integer> x = Maps.newHashMap();
+        for (final Map.Entry<Class<?>, Integer> entry : x.entrySet()) {
+            entry.getValue();
+        }
+        //for (final Entry<Class<?>, Integer> entry : entrySet())
+    }
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        final String[] expected = {
+            "16:13: '<' is preceded with whitespace.",
+            "16:15: '<' is followed by whitespace.",
+            "16:23: '>' is preceded with whitespace.",
+            "16:43: '<' is preceded with whitespace.",
+            "16:45: '<' is followed by whitespace.",
+            "16:53: '>' is preceded with whitespace.",
+            "17:13: '<' is preceded with whitespace.",
+            "17:15: '<' is followed by whitespace.",
+            "17:20: '<' is preceded with whitespace.",
+            "17:22: '<' is followed by whitespace.",
+            "17:30: '>' is preceded with whitespace.",
+            "17:32: '>' is followed by whitespace.",
+            "17:32: '>' is preceded with whitespace.",
+            "17:52: '<' is preceded with whitespace.",
+            "17:54: '<' is followed by whitespace.",
+            "17:59: '<' is preceded with whitespace.",
+            "17:61: '<' is followed by whitespace.",
+            "17:69: '>' is preceded with whitespace.",
+            "17:71: '>' is followed by whitespace.",
+            "17:71: '>' is preceded with whitespace.",
+            "30:17: '<' is not preceded with whitespace.",
+            "30:21: '>' is followed by an illegal character.",
+            "42:21: '<' is preceded with whitespace.",
+            "42:30: '>' is followed by whitespace.",
+            "60:60: '&' is not preceded with whitespace.",
+            "63:60: '>' is followed by whitespace.",
+        };
+        verify(mCheckConfig,
+                getPath("whitespace/InputGenericWhitespaceCheck.java"),
+                expected);
+    }
+
+    @Test
+    public void testGh47() throws Exception
+    {
+        final String[] expected = {};
+        verify(mCheckConfig, getPath("whitespace/Gh47.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/MethodParamPadCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/MethodParamPadCheckTest.java
new file mode 100644
index 0000000..662774f
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/MethodParamPadCheckTest.java
@@ -0,0 +1,117 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Before;
+import org.junit.Test;
+
+public class MethodParamPadCheckTest
+    extends BaseCheckTestSupport
+{
+    private DefaultConfiguration checkConfig;
+
+    @Before
+    public void setUp()
+    {
+        checkConfig = createCheckConfig(MethodParamPadCheck.class);
+    }
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        final String[] expected = {
+            "11:32: '(' is preceded with whitespace.",
+            "13:15: '(' is preceded with whitespace.",
+            "17:9: '(' should be on the previous line.",
+            "20:13: '(' should be on the previous line.",
+            "27:24: '(' is preceded with whitespace.",
+            "32:9: '(' should be on the previous line.",
+            "36:39: '(' is preceded with whitespace.",
+            "38:13: '(' should be on the previous line.",
+            "42:16: '(' is preceded with whitespace.",
+            "44:13: '(' should be on the previous line.",
+            "50:21: '(' is preceded with whitespace.",
+            "52:13: '(' should be on the previous line.",
+            "56:18: '(' is preceded with whitespace.",
+            "58:13: '(' should be on the previous line.",
+            "61:36: '(' is preceded with whitespace.",
+            "63:13: '(' should be on the previous line.",
+        };
+        verify(checkConfig, getPath("whitespace/InputMethodParamPad.java"), expected);
+    }
+
+    @Test
+    public void testAllowLineBreaks() throws Exception
+    {
+        checkConfig.addAttribute("allowLineBreaks", "true");
+        final String[] expected = {
+            "11:32: '(' is preceded with whitespace.",
+            "13:15: '(' is preceded with whitespace.",
+            "27:24: '(' is preceded with whitespace.",
+            "36:39: '(' is preceded with whitespace.",
+            "42:16: '(' is preceded with whitespace.",
+            "50:21: '(' is preceded with whitespace.",
+            "56:18: '(' is preceded with whitespace.",
+            "61:36: '(' is preceded with whitespace.",
+        };
+        verify(checkConfig, getPath("whitespace/InputMethodParamPad.java"), expected);
+    }
+
+    @Test
+    public void testSpaceOption() throws Exception
+    {
+        checkConfig.addAttribute("option", "space");
+        final String[] expected = {
+            "6:31: '(' is not preceded with whitespace.",
+            "8:14: '(' is not preceded with whitespace.",
+            "17:9: '(' should be on the previous line.",
+            "20:13: '(' should be on the previous line.",
+            "23:23: '(' is not preceded with whitespace.",
+            "32:9: '(' should be on the previous line.",
+            "35:58: '(' is not preceded with whitespace.",
+            "38:13: '(' should be on the previous line.",
+            "41:15: '(' is not preceded with whitespace.",
+            "44:13: '(' should be on the previous line.",
+            "47:28: '(' is not preceded with whitespace.",
+            "49:20: '(' is not preceded with whitespace.",
+            "52:13: '(' should be on the previous line.",
+            "54:56: '(' is not preceded with whitespace.",
+            "55:17: '(' is not preceded with whitespace.",
+            "58:13: '(' should be on the previous line.",
+            "60:35: '(' is not preceded with whitespace.",
+            "63:13: '(' should be on the previous line.",
+            "66:25: '(' is not preceded with whitespace.",
+            "69:66: '(' is not preceded with whitespace.",
+            "70:57: '(' is not preceded with whitespace.",
+        };
+        verify(checkConfig, getPath("whitespace/InputMethodParamPad.java"), expected);
+    }
+
+    @Test
+    public void test1322879() throws Exception
+    {
+        checkConfig.addAttribute("option", PadOption.SPACE.toString());
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("whitespace/InputWhitespaceAround.java"),
+               expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoLineWrapCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoLineWrapCheckTest.java
new file mode 100644
index 0000000..a4562d1
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoLineWrapCheckTest.java
@@ -0,0 +1,61 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class NoLineWrapCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testCaseWithoutLineWrapping() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(NoLineWrapCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("whitespace/NoLineWrapGoodInput.java"), expected);
+    }
+
+    @Test
+    public void testDefaultTokensLineWrapping() throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(NoLineWrapCheck.class);
+        final String[] expected = {
+            "1: package statement should not be line-wrapped.",
+            "6: import statement should not be line-wrapped.",
+        };
+        verify(checkConfig, getPath("whitespace/NoLineWrapBadInput.java"), expected);
+    }
+
+    @Test
+    public void testCustomTokensLineWrapping()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig = createCheckConfig(NoLineWrapCheck.class);
+        checkConfig.addAttribute("tokens", "IMPORT, CLASS_DEF, METHOD_DEF, ENUM_DEF");
+        final String[] expected = {
+            "6: import statement should not be line-wrapped.",
+            "10: CLASS_DEF statement should not be line-wrapped.",
+            "13: METHOD_DEF statement should not be line-wrapped.",
+            "20: ENUM_DEF statement should not be line-wrapped.",
+        };
+        verify(checkConfig, getPath("whitespace/NoLineWrapBadInput.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceAfterCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceAfterCheckTest.java
new file mode 100644
index 0000000..360ff31
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceAfterCheckTest.java
@@ -0,0 +1,81 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Before;
+import org.junit.Test;
+
+public class NoWhitespaceAfterCheckTest
+    extends BaseCheckTestSupport
+{
+    private DefaultConfiguration checkConfig;
+
+    @Before
+    public void setUp()
+    {
+        checkConfig = createCheckConfig(NoWhitespaceAfterCheck.class);
+    }
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        checkConfig.addAttribute("allowLineBreaks", "false");
+        final String[] expected = {
+            "5:14: '.' is followed by whitespace.",
+            "6:12: '.' is followed by whitespace.",
+            "29:14: '-' is followed by whitespace.",
+            "29:21: '+' is followed by whitespace.",
+            "31:15: '++' is followed by whitespace.",
+            "31:22: '--' is followed by whitespace.",
+            "111:22: '!' is followed by whitespace.",
+            "112:23: '~' is followed by whitespace.",
+            "129:24: '.' is followed by whitespace.",
+            "132:11: '.' is followed by whitespace.",
+            "136:12: '.' is followed by whitespace.",
+        };
+        verify(checkConfig, getPath("InputWhitespace.java"), expected);
+    }
+
+    @Test
+    public void testDotAllowLineBreaks() throws Exception
+    {
+        checkConfig.addAttribute("tokens", "DOT");
+        final String[] expected = {
+            "5:14: '.' is followed by whitespace.",
+            "129:24: '.' is followed by whitespace.",
+            "136:12: '.' is followed by whitespace.",
+        };
+        verify(checkConfig, getPath("InputWhitespace.java"), expected);
+    }
+
+    @Test
+    public void testTypecast() throws Exception
+    {
+        checkConfig.addAttribute("tokens", "TYPECAST");
+        final String[] expected = {
+            "87:28: ')' is followed by whitespace.",
+            "89:23: ')' is followed by whitespace.",
+            "241:22: ')' is followed by whitespace.",
+        };
+        verify(checkConfig, getPath("InputWhitespace.java"), expected);
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCheckTest.java
new file mode 100644
index 0000000..81bbd20
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/NoWhitespaceBeforeCheckTest.java
@@ -0,0 +1,79 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Before;
+import org.junit.Test;
+
+public class NoWhitespaceBeforeCheckTest
+    extends BaseCheckTestSupport
+{
+    private DefaultConfiguration checkConfig;
+
+    @Before
+    public void setUp()
+    {
+        checkConfig = createCheckConfig(NoWhitespaceBeforeCheck.class);
+    }
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        final String[] expected = {
+            "30:14: '++' is preceded with whitespace.",
+            "30:21: '--' is preceded with whitespace.",
+            "176:18: ';' is preceded with whitespace.",
+            "178:23: ';' is preceded with whitespace.",
+            "185:18: ';' is preceded with whitespace.",
+            "187:27: ';' is preceded with whitespace.",
+            "195:26: ';' is preceded with whitespace.",
+            "211:15: ';' is preceded with whitespace.",
+        };
+        verify(checkConfig, getPath("InputWhitespace.java"), expected);
+    }
+
+    @Test
+    public void testDot() throws Exception
+    {
+        checkConfig.addAttribute("tokens", "DOT");
+        final String[] expected = {
+            "5:12: '.' is preceded with whitespace.",
+            "6:4: '.' is preceded with whitespace.",
+            "129:17: '.' is preceded with whitespace.",
+            "135:12: '.' is preceded with whitespace.",
+            "136:10: '.' is preceded with whitespace.",
+        };
+        verify(checkConfig, getPath("InputWhitespace.java"), expected);
+    }
+
+    @Test
+    public void testDotAllowLineBreaks() throws Exception
+    {
+        checkConfig.addAttribute("tokens", "DOT");
+        checkConfig.addAttribute("allowLineBreaks", "yes");
+        final String[] expected = {
+            "5:12: '.' is preceded with whitespace.",
+            "129:17: '.' is preceded with whitespace.",
+            "136:10: '.' is preceded with whitespace.",
+        };
+        verify(checkConfig, getPath("InputWhitespace.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/OperatorWrapCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/OperatorWrapCheckTest.java
new file mode 100644
index 0000000..4d4bc1e
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/OperatorWrapCheckTest.java
@@ -0,0 +1,75 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Before;
+import org.junit.Test;
+
+public class OperatorWrapCheckTest
+    extends BaseCheckTestSupport
+{
+    private DefaultConfiguration checkConfig;
+
+    @Before
+    public void setUp()
+    {
+        checkConfig = createCheckConfig(OperatorWrapCheck.class);
+    }
+
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final String[] expected = {
+            "15:19: '+' should be on a new line.",
+            "16:15: '-' should be on a new line.",
+            "24:18: '&&' should be on a new line.",
+            "39:30: '&' should be on a new line.",
+            "52:29: '&' should be on a new line.",
+        };
+        verify(checkConfig, getPath("InputOpWrap.java"), expected);
+    }
+
+    @Test
+    public void testOpWrapEOL()
+        throws Exception
+    {
+        checkConfig.addAttribute("option", WrapOption.EOL.toString());
+        final String[] expected = {
+            "18:13: '-' should be on the previous line.",
+            "22:13: '&&' should be on the previous line.",
+            "27:13: '&&' should be on the previous line.",
+        };
+        verify(checkConfig, getPath("InputOpWrap.java"), expected);
+    }
+
+    @Test
+    public void testAssignEOL()
+        throws Exception
+    {
+        checkConfig.addAttribute("tokens", "ASSIGN");
+        checkConfig.addAttribute("option", WrapOption.EOL.toString());
+        final String[] expected = {
+            "33:13: '=' should be on the previous line.",
+        };
+        verify(checkConfig, getPath("InputOpWrap.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadCheckTest.java
new file mode 100644
index 0000000..9e71f1b
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadCheckTest.java
@@ -0,0 +1,133 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class ParenPadCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ParenPadCheck.class);
+        final String[] expected = {
+            "58:12: '(' is followed by whitespace.",
+            "58:36: ')' is preceded with whitespace.",
+            "74:13: '(' is followed by whitespace.",
+            "74:18: ')' is preceded with whitespace.",
+            "232:27: ')' is preceded with whitespace.",
+            "241:24: '(' is followed by whitespace.",
+            "241:30: ')' is preceded with whitespace.",
+        };
+        verify(checkConfig, getPath("InputWhitespace.java"), expected);
+    }
+
+    @Test
+    public void testSpace()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ParenPadCheck.class);
+        checkConfig.addAttribute("option", PadOption.SPACE.toString());
+        final String[] expected = {
+            "29:20: '(' is not followed by whitespace.",
+            "29:23: ')' is not preceded with whitespace.",
+            "37:22: '(' is not followed by whitespace.",
+            "37:26: ')' is not preceded with whitespace.",
+            "41:15: '(' is not followed by whitespace.",
+            "41:33: ')' is not preceded with whitespace.",
+            "76:20: '(' is not followed by whitespace.",
+            "76:21: ')' is not preceded with whitespace.",
+            "97:22: '(' is not followed by whitespace.",
+            "97:28: ')' is not preceded with whitespace.",
+            "98:14: '(' is not followed by whitespace.",
+            "98:18: ')' is not preceded with whitespace.",
+            "150:28: '(' is not followed by whitespace.",
+            "150:32: ')' is not preceded with whitespace.",
+            "153:16: '(' is not followed by whitespace.",
+            "153:20: ')' is not preceded with whitespace.",
+            "160:21: '(' is not followed by whitespace.",
+            "160:34: ')' is not preceded with whitespace.",
+            "162:20: '(' is not followed by whitespace.",
+            "165:10: ')' is not preceded with whitespace.",
+            "178:14: '(' is not followed by whitespace.",
+            "178:36: ')' is not preceded with whitespace.",
+            "225:14: '(' is not followed by whitespace.",
+            "235:14: '(' is not followed by whitespace.",
+            "235:39: ')' is not preceded with whitespace.",
+        };
+        verify(checkConfig, getPath("InputWhitespace.java"), expected);
+    }
+
+    @Test
+    public void testDefaultForIterator()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ParenPadCheck.class);
+        final String[] expected = {
+            "17:34: ')' is preceded with whitespace.",
+            "20:35: ')' is preceded with whitespace.",
+            "40:14: '(' is followed by whitespace.",
+            "40:36: ')' is preceded with whitespace.",
+            "43:14: '(' is followed by whitespace.",
+            "48:27: ')' is preceded with whitespace.",
+            "51:26: ')' is preceded with whitespace.",
+        };
+        verify(checkConfig, getPath("InputForWhitespace.java"), expected);
+    }
+
+    @Test
+    public void testSpaceEmptyForIterator()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ParenPadCheck.class);
+        checkConfig.addAttribute("option", PadOption.SPACE.toString());
+        final String[] expected = {
+            "11:14: '(' is not followed by whitespace.",
+            "11:35: ')' is not preceded with whitespace.",
+            "14:14: '(' is not followed by whitespace.",
+            "14:34: ')' is not preceded with whitespace.",
+            "17:14: '(' is not followed by whitespace.",
+            "20:14: '(' is not followed by whitespace.",
+            "23:14: '(' is not followed by whitespace.",
+            "27:14: '(' is not followed by whitespace.",
+            "32:14: '(' is not followed by whitespace.",
+        };
+        verify(checkConfig, getPath("InputForWhitespace.java"), expected);
+    }
+
+    @Test
+    public void test1322879() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(ParenPadCheck.class);
+        checkConfig.addAttribute("option", PadOption.SPACE.toString());
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("whitespace/ParenPadWithSpace.java"),
+               expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SeparatorWrapCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SeparatorWrapCheckTest.java
new file mode 100644
index 0000000..6c35988
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/SeparatorWrapCheckTest.java
@@ -0,0 +1,59 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Before;
+import org.junit.Test;
+
+public class SeparatorWrapCheckTest
+    extends BaseCheckTestSupport
+{
+    private DefaultConfiguration checkConfig;
+
+    @Before
+    public void setUp()
+    {
+        checkConfig = createCheckConfig(SeparatorWrapCheck.class);
+    }
+
+    @Test
+    public void testDot()
+        throws Exception
+    {
+        checkConfig.addAttribute("option", "NL");
+        checkConfig.addAttribute("tokens", "DOT");
+        final String[] expected = {
+            "31:10: '.' should be on a new line.",
+        };
+        verify(checkConfig, getPath("whitespace/InputSeparatorWrap.java"), expected);
+    }
+
+    @Test
+    public void testComma() throws Exception
+    {
+        checkConfig.addAttribute("option", "EOL");
+        checkConfig.addAttribute("tokens", "COMMA");
+        final String[] expected = {
+            "39:17: ',' should be on the previous line.",
+        };
+        verify(checkConfig, getPath("whitespace/InputSeparatorWrap.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypecastParenPadCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypecastParenPadCheckTest.java
new file mode 100644
index 0000000..bdd5585
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/TypecastParenPadCheckTest.java
@@ -0,0 +1,72 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Test;
+
+public class TypecastParenPadCheckTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testDefault()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(TypecastParenPadCheck.class);
+        final String[] expected = {
+            "89:14: '(' is followed by whitespace.",
+            "89:21: ')' is preceded with whitespace.",
+        };
+        verify(checkConfig, getPath("InputWhitespace.java"), expected);
+    }
+
+    @Test
+    public void testSpace()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(TypecastParenPadCheck.class);
+        checkConfig.addAttribute("option", PadOption.SPACE.toString());
+        final String[] expected = {
+            "87:21: '(' is not followed by whitespace.",
+            "87:27: ')' is not preceded with whitespace.",
+            "88:14: '(' is not followed by whitespace.",
+            "88:20: ')' is not preceded with whitespace.",
+            "90:14: '(' is not followed by whitespace.",
+            "90:20: ')' is not preceded with whitespace.",
+            "241:18: '(' is not followed by whitespace.",
+            "241:21: ')' is not preceded with whitespace.",
+        };
+        verify(checkConfig, getPath("InputWhitespace.java"), expected);
+    }
+
+    @Test
+    public void test1322879() throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(TypecastParenPadCheck.class);
+        checkConfig.addAttribute("option", PadOption.SPACE.toString());
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("whitespace/InputWhitespaceAround.java"),
+               expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAfterCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAfterCheckTest.java
new file mode 100644
index 0000000..931b2de
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAfterCheckTest.java
@@ -0,0 +1,96 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Before;
+import org.junit.Test;
+
+public class WhitespaceAfterCheckTest
+    extends BaseCheckTestSupport
+{
+    private DefaultConfiguration mCheckConfig;
+
+    @Before
+    public void setUp()
+    {
+        mCheckConfig = createCheckConfig(WhitespaceAfterCheck.class);
+    }
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        final String[] expected = {
+            "42:40: ',' is not followed by whitespace.",
+            "71:30: ',' is not followed by whitespace.",
+        };
+        verify(mCheckConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testCast() throws Exception
+    {
+        final String[] expected = {
+            "88:21: 'cast' is not followed by whitespace.",
+        };
+        verify(mCheckConfig, getPath("InputWhitespace.java"), expected);
+    }
+
+    @Test
+    public void testSemi() throws Exception
+    {
+        final String[] expected = {
+            "58:23: ';' is not followed by whitespace.",
+            "58:29: ';' is not followed by whitespace.",
+            "107:19: ';' is not followed by whitespace.",
+        };
+        verify(mCheckConfig, getPath("InputBraces.java"), expected);
+    }
+
+    @Test
+    public void testEmptyForIterator() throws Exception
+    {
+        final String[] expected = {
+            "14:31: ';' is not followed by whitespace.",
+            "17:31: ';' is not followed by whitespace.",
+        };
+        verify(mCheckConfig, getPath("InputForWhitespace.java"), expected);
+    }
+
+    @Test
+    public void testTypeArgumentAndParameterCommas() throws Exception
+    {
+        final String[] expected = {
+            "11:21: ',' is not followed by whitespace.",
+            "11:23: ',' is not followed by whitespace.",
+            "11:41: ',' is not followed by whitespace.",
+        };
+        verify(mCheckConfig, getPath("InputGenerics.java"), expected);
+    }
+
+    @Test
+    public void test1322879() throws Exception
+    {
+        final String[] expected = {
+        };
+        verify(mCheckConfig, getPath("whitespace/InputWhitespaceAround.java"),
+               expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundTest.java
new file mode 100644
index 0000000..90c44bb
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundTest.java
@@ -0,0 +1,224 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import org.junit.Before;
+import org.junit.Test;
+
+public class WhitespaceAroundTest
+    extends BaseCheckTestSupport
+{
+    private DefaultConfiguration checkConfig;
+
+    @Before
+    public void setUp()
+    {
+        checkConfig = createCheckConfig(WhitespaceAroundCheck.class);
+    }
+
+    @Test
+    public void testIt()
+        throws Exception
+    {
+        final String[] expected = {
+            "16:22: '=' is not preceded with whitespace.",
+            "16:23: '=' is not followed by whitespace.",
+            "18:24: '=' is not followed by whitespace.",
+            "26:14: '=' is not preceded with whitespace.",
+            "27:10: '=' is not preceded with whitespace.",
+            "27:11: '=' is not followed by whitespace.",
+            "28:10: '+=' is not preceded with whitespace.",
+            "28:12: '+=' is not followed by whitespace.",
+            "29:13: '-=' is not followed by whitespace.",
+            "37:21: 'synchronized' is not followed by whitespace.",
+            "39:12: 'try' is not followed by whitespace.",
+            "39:12: '{' is not preceded with whitespace.",
+            "41:14: 'catch' is not followed by whitespace.",
+            "41:34: '{' is not preceded with whitespace.",
+            "58:11: 'if' is not followed by whitespace.",
+            "76:19: 'return' is not followed by whitespace.",
+            "97:29: '?' is not preceded with whitespace.",
+            "97:30: '?' is not followed by whitespace.",
+            "97:34: ':' is not preceded with whitespace.",
+            "97:35: ':' is not followed by whitespace.",
+            "98:15: '==' is not preceded with whitespace.",
+            "98:17: '==' is not followed by whitespace.",
+            "104:20: '*' is not followed by whitespace.",
+            "104:21: '*' is not preceded with whitespace.",
+            "119:18: '%' is not preceded with whitespace.",
+            "120:20: '%' is not followed by whitespace.",
+            "121:18: '%' is not preceded with whitespace.",
+            "121:19: '%' is not followed by whitespace.",
+            "123:18: '/' is not preceded with whitespace.",
+            "124:20: '/' is not followed by whitespace.",
+            "125:18: '/' is not preceded with whitespace.",
+            "125:19: '/' is not followed by whitespace.",
+            "153:15: 'assert' is not followed by whitespace.",
+            "156:20: ':' is not preceded with whitespace.",
+            "156:21: ':' is not followed by whitespace.",
+        };
+        verify(checkConfig, getPath("InputWhitespace.java"), expected);
+    }
+
+    @Test
+    public void testIt2()
+        throws Exception
+    {
+        final String[] expected = {
+            "153:27: '=' is not followed by whitespace.",
+            "154:27: '=' is not followed by whitespace.",
+            "155:27: '=' is not followed by whitespace.",
+            "156:27: '=' is not followed by whitespace.",
+            "157:27: '=' is not followed by whitespace.",
+            "158:27: '=' is not followed by whitespace.",
+        };
+        verify(checkConfig, getPath("InputSimple.java"), expected);
+    }
+
+    @Test
+    public void testIt3()
+        throws Exception
+    {
+        final String[] expected = {
+            "41:14: 'while' is not followed by whitespace.",
+            "58:12: 'for' is not followed by whitespace.",
+            // + ":58:23: ';' is not followed by whitespace.",
+            //  + ":58:29: ';' is not followed by whitespace.",
+            "115:27: '{' is not followed by whitespace.",
+            "115:27: '}' is not preceded with whitespace.",
+            "118:40: '{' is not followed by whitespace.",
+            "118:40: '}' is not preceded with whitespace.",
+        };
+        verify(checkConfig, getPath("InputBraces.java"), expected);
+    }
+
+    @Test
+    public void testIt4()
+        throws Exception
+    {
+        checkConfig.addAttribute("allowEmptyMethods", "true");
+        checkConfig.addAttribute("allowEmptyConstructors", "true");
+        final String[] expected = {
+            "41:14: 'while' is not followed by whitespace.",
+            "58:12: 'for' is not followed by whitespace.",
+        };
+        verify(checkConfig, getPath("InputBraces.java"), expected);
+    }
+
+    @Test
+    public void testGenericsTokensAreFlagged()
+        throws Exception
+    {
+        final String[] expected = {
+            "6:67: '&' is not preceded with whitespace.",
+            "6:68: '&' is not followed by whitespace.",
+        };
+        verify(checkConfig, getPath("InputGenerics.java"), expected);
+    }
+
+    @Test
+    public void test1322879And1649038() throws Exception
+    {
+        final String[] expected = {
+        };
+        verify(checkConfig, getPath("whitespace/InputWhitespaceAround.java"),
+               expected);
+    }
+
+    @Test
+    public void testIgnoreEnhancedForColon() throws Exception
+    {
+        checkConfig.addAttribute("ignoreEnhancedForColon", "false");
+        final String[] expected = {
+            "19:20: ':' is not preceded with whitespace.",
+        };
+        verify(checkConfig, getPath("whitespace/InputWhitespaceAround.java"),
+               expected);
+    }
+
+    @Test
+    public void testEmptyTypes() throws Exception
+    {
+        checkConfig.addAttribute("allowEmptyTypes", "true");
+        final String[] expected = {
+            "14:91: '{' is not followed by whitespace.",
+            "14:91: '}' is not preceded with whitespace.",
+            "15:32: '{' is not followed by whitespace.",
+            "15:32: '}' is not preceded with whitespace.",
+            "16:21: '{' is not followed by whitespace.",
+            "16:21: '}' is not preceded with whitespace.",
+        };
+        verify(checkConfig, getPath("whitespace/InputEmptyTypesAndCycles.java"),
+               expected);
+    }
+
+    @Test
+    public void testEmptyLoops() throws Exception
+    {
+        checkConfig.addAttribute("allowEmptyLoops", "true");
+        final String[] expected = {
+            "20:65: '{' is not followed by whitespace.",
+            "20:65: '}' is not preceded with whitespace.",
+            "22:17: '{' is not followed by whitespace.",
+            "22:17: '}' is not preceded with whitespace.",
+            "24:20: '{' is not followed by whitespace.",
+            "24:20: '}' is not preceded with whitespace.",
+            "30:44: '{' is not followed by whitespace.",
+            "30:44: '}' is not preceded with whitespace.",
+            "44:25: '{' is not followed by whitespace.",
+            "44:25: '}' is not preceded with whitespace.",
+        };
+        verify(checkConfig, getPath("whitespace/InputEmptyTypesAndCycles.java"),
+               expected);
+    }
+
+    @Test
+    public void testSwitchWhitespaceAround() throws Exception
+    {
+        final String[] expected = {
+            "6:15: 'switch' is not followed by whitespace.",
+        };
+        verify(checkConfig,
+               getPath("whitespace/InputSwitchWhitespaceAround.java"),
+               expected);
+    }
+
+    @Test
+    public void testDoWhileWhitespaceAround() throws Exception
+    {
+        final String[] expected = {
+            "9:16: 'while' is not followed by whitespace.",
+        };
+        verify(checkConfig,
+               getPath("whitespace/InputDoWhileWhitespaceAround.java"),
+               expected);
+    }
+
+    @Test
+    public void allowEmptyMethods() throws Exception
+    {
+        checkConfig.addAttribute("allowEmptyMethods", "true");
+        final String[] expected = {};
+        verify(checkConfig,
+               getPath("whitespace/InputWhitespaceAround.java"),
+               expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/filters/CSVFilterTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/filters/CSVFilterTest.java
new file mode 100644
index 0000000..de000bd
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/filters/CSVFilterTest.java
@@ -0,0 +1,80 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import org.junit.Test;
+
+/** Tests CSVFilter */
+public class CSVFilterTest
+{
+    @Test
+    public void testDecideSingle()
+    {
+        final IntFilter filter = new CSVFilter("0");
+        assertFalse("less than", filter.accept(Integer.valueOf(-1)));
+        assertTrue("equal", filter.accept(Integer.valueOf(0)));
+        assertFalse("greater than", filter.accept(Integer.valueOf(1)));
+    }
+
+    @Test
+    public void testDecidePair()
+    {
+        final IntFilter filter = new CSVFilter("0, 2");
+        assertFalse("less than", filter.accept(Integer.valueOf(-1)));
+        assertTrue("equal 0", filter.accept(Integer.valueOf(0)));
+        assertFalse("greater than", filter.accept(Integer.valueOf(1)));
+        assertTrue("equal 2", filter.accept(Integer.valueOf(2)));
+    }
+
+    @Test
+    public void testDecideRange()
+    {
+        final IntFilter filter = new CSVFilter("0-2");
+        assertFalse("less than", filter.accept(Integer.valueOf(-1)));
+        assertTrue("equal 0", filter.accept(Integer.valueOf(0)));
+        assertTrue("equal 1", filter.accept(Integer.valueOf(1)));
+        assertTrue("equal 2", filter.accept(Integer.valueOf(2)));
+        assertFalse("greater than", filter.accept(Integer.valueOf(3)));
+    }
+
+    @Test
+    public void testDecideEmptyRange()
+    {
+        final IntFilter filter = new CSVFilter("2-0");
+        assertFalse("less than", filter.accept(Integer.valueOf(-1)));
+        assertFalse("equal 0", filter.accept(Integer.valueOf(0)));
+        assertFalse("equal 1", filter.accept(Integer.valueOf(1)));
+        assertFalse("equal 2", filter.accept(Integer.valueOf(2)));
+        assertFalse("greater than", filter.accept(Integer.valueOf(3)));
+    }
+
+    @Test
+    public void testDecideRangePlusValue()
+    {
+        final IntFilter filter = new CSVFilter("0-2, 10");
+        assertFalse("less than", filter.accept(Integer.valueOf(-1)));
+        assertTrue("equal 0", filter.accept(Integer.valueOf(0)));
+        assertTrue("equal 1", filter.accept(Integer.valueOf(1)));
+        assertTrue("equal 2", filter.accept(Integer.valueOf(2)));
+        assertFalse("greater than", filter.accept(Integer.valueOf(3)));
+        assertTrue("equal 10", filter.accept(Integer.valueOf(10)));
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/filters/FilterSetTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/filters/FilterSetTest.java
new file mode 100644
index 0000000..384714d
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/filters/FilterSetTest.java
@@ -0,0 +1,62 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import org.junit.Before;
+import org.junit.Test;
+
+/** Tests SuppressElementFilter */
+// TODO: this test should be removed/rewritten
+public class FilterSetTest
+{
+    private CSVFilter filter;
+
+    @Before
+    public void setUp()
+    {
+        filter = new CSVFilter("");
+    }
+
+    @Test
+    public void testEmptyChain()
+    {
+        assertFalse("0", filter.accept(Integer.valueOf(0)));
+    }
+
+    @Test
+    public void testOneFilter()
+    {
+        filter.addFilter(new IntMatchFilter(0));
+        assertTrue("0", filter.accept(Integer.valueOf(0)));
+        assertFalse("1", filter.accept(Integer.valueOf(1)));
+    }
+
+    @Test
+    public void testMultipleFilter()
+    {
+        filter.addFilter(new IntMatchFilter(0));
+        filter.addFilter(new IntRangeFilter(0, 2));
+        assertTrue("0", filter.accept(Integer.valueOf(0)));
+        assertTrue("1", filter.accept(Integer.valueOf(1)));
+        filter.addFilter(new IntRangeFilter(3, 4));
+        assertTrue("0 is in [3,4]", filter.accept(Integer.valueOf(0)));
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/filters/IntMatchFilterTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/filters/IntMatchFilterTest.java
new file mode 100644
index 0000000..039fe5f
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/filters/IntMatchFilterTest.java
@@ -0,0 +1,49 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import org.junit.Test;
+
+/** Tests IntMatchFilter */
+public class IntMatchFilterTest
+{
+    @Test
+    public void testDecide()
+    {
+        final IntFilter filter = new IntMatchFilter(0);
+        assertFalse("less than", filter.accept(Integer.valueOf(-1)));
+        assertTrue("equal", filter.accept(Integer.valueOf(0)));
+        assertFalse("greater than", filter.accept(Integer.valueOf(1)));
+    }
+
+    @Test
+    public void testEquals()
+    {
+        final IntFilter filter = new IntMatchFilter(0);
+        final IntFilter filter2 = new IntMatchFilter(0);
+        final IntFilter filter3 = new IntMatchFilter(1);
+        assertEquals("0", filter, filter2);
+        assertFalse("0 != 1", filter.equals(filter3));
+        assertFalse("0 != this", filter.equals(this));
+        assertFalse("0 != null", filter.equals(null));
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/filters/IntRangeFilterTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/filters/IntRangeFilterTest.java
new file mode 100644
index 0000000..3157e4f
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/filters/IntRangeFilterTest.java
@@ -0,0 +1,73 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import org.junit.Test;
+
+/** Tests IntRangeFilter */
+public class IntRangeFilterTest
+{
+    @Test
+    public void testDecide()
+    {
+        final IntFilter filter = new IntRangeFilter(0, 10);
+        assertFalse("less than", filter.accept(Integer.valueOf(-1)));
+        assertTrue("in range", filter.accept(Integer.valueOf(0)));
+        assertTrue("in range", filter.accept(Integer.valueOf(5)));
+        assertTrue("in range", filter.accept(Integer.valueOf(10)));
+        assertFalse("greater than", filter.accept(Integer.valueOf(11)));
+    }
+
+    @Test
+    public void testDecideSingle()
+    {
+        final IntFilter filter = new IntRangeFilter(0, 0);
+        assertFalse("less than", filter.accept(Integer.valueOf(-1)));
+        assertTrue("in range", filter.accept(Integer.valueOf(0)));
+        assertFalse("greater than", filter.accept(Integer.valueOf(1)));
+    }
+
+    @Test
+    public void testDecideEmpty()
+    {
+        final IntFilter filter = new IntRangeFilter(10, 0);
+        assertFalse("out", filter.accept(Integer.valueOf(-1)));
+        assertFalse("out", filter.accept(Integer.valueOf(0)));
+        assertFalse("out", filter.accept(Integer.valueOf(5)));
+        assertFalse("out", filter.accept(Integer.valueOf(10)));
+        assertFalse("out", filter.accept(Integer.valueOf(11)));
+    }
+
+    @Test
+    public void testEquals()
+    {
+        final IntFilter filter = new IntRangeFilter(0, 2);
+        final IntFilter filter2 = new IntRangeFilter(0, 2);
+        final IntFilter filter3 = new IntRangeFilter(0, 1);
+        final IntFilter filter4 = new IntRangeFilter(1, 2);
+        assertEquals("[0,2] == [0,2]", filter, filter2);
+        assertFalse("[0,2] != [0,1]", filter.equals(filter3));
+        assertFalse("[0,2] != [1,2]", filter.equals(filter4));
+        assertFalse("[0,2] != this", filter.equals(this));
+        assertFalse("[0,2] != null", filter.equals(null));
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/filters/SeverityMatchFilterTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/filters/SeverityMatchFilterTest.java
new file mode 100644
index 0000000..20d548e
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/filters/SeverityMatchFilterTest.java
@@ -0,0 +1,92 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.LocalizedMessage;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+import org.junit.Test;
+
+/** Tests SeverityMatchFilter */
+public class SeverityMatchFilterTest
+{
+    private final SeverityMatchFilter filter = new SeverityMatchFilter();
+
+    @Test
+    public void testDefault()
+    {
+        final AuditEvent ev = new AuditEvent(this, "Test.java");
+        assertFalse("no message", filter.accept(ev));
+        SeverityLevel level = SeverityLevel.ERROR;
+        LocalizedMessage message =
+            new LocalizedMessage(0, 0, "", "", null,
+                level, null, this.getClass(), null);
+        final AuditEvent ev2 = new AuditEvent(this, "ATest.java", message);
+        assertTrue("level:" + level, filter.accept(ev2));
+        level = SeverityLevel.INFO;
+        message = new LocalizedMessage(0, 0, "", "", null, level, null, this
+                .getClass(), null);
+        final AuditEvent ev3 = new AuditEvent(this, "ATest.java", message);
+        assertFalse("level:" + level, filter.accept(ev3));
+    }
+
+    @Test
+    public void testSeverity()
+    {
+        filter.setSeverity("info");
+        final AuditEvent ev = new AuditEvent(this, "Test.java");
+        // event with no message has severity level INFO
+        assertTrue("no message", filter.accept(ev));
+        SeverityLevel level = SeverityLevel.ERROR;
+        LocalizedMessage message =
+            new LocalizedMessage(0, 0, "", "", null,
+                level, null, this.getClass(), null);
+        final AuditEvent ev2 = new AuditEvent(this, "ATest.java", message);
+        assertFalse("level:" + level, filter.accept(ev2));
+        level = SeverityLevel.INFO;
+        message = new LocalizedMessage(0, 0, "", "", null, level, null, this
+                .getClass(), null);
+        final AuditEvent ev3 = new AuditEvent(this, "ATest.java", message);
+        assertTrue("level:" + level, filter.accept(ev3));
+    }
+
+    @Test
+    public void testAcceptOnMatch()
+    {
+        filter.setSeverity("info");
+        filter.setAcceptOnMatch(false);
+        final AuditEvent ev = new AuditEvent(this, "Test.java");
+        // event with no message has severity level INFO
+        assertFalse("no message", filter.accept(ev));
+        SeverityLevel level = SeverityLevel.ERROR;
+        LocalizedMessage message =
+            new LocalizedMessage(0, 0, "", "", null,
+                level, null, this.getClass(), null);
+        final AuditEvent ev2 = new AuditEvent(this, "ATest.java", message);
+        assertTrue("level:" + level, filter.accept(ev2));
+        level = SeverityLevel.INFO;
+        message = new LocalizedMessage(0, 0, "", "", null, level, null, this
+                .getClass(), null);
+        final AuditEvent ev3 = new AuditEvent(this, "ATest.java", message);
+        assertFalse("level:" + level, filter.accept(ev3));
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressElementTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressElementTest.java
new file mode 100644
index 0000000..1fa160e
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressElementTest.java
@@ -0,0 +1,112 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.LocalizedMessage;
+import java.util.regex.PatternSyntaxException;
+import org.junit.Before;
+import org.junit.Test;
+
+/** Tests SuppressElementFilter */
+public class SuppressElementTest
+{
+    private SuppressElement filter;
+
+    @Before
+    public void setUp()
+        throws PatternSyntaxException
+    {
+        filter = new SuppressElement("Test");
+        filter.setChecks("Test");
+    }
+
+    @Test
+    public void testDecideDefault()
+    {
+        final AuditEvent ev = new AuditEvent(this, "Test.java");
+        assertTrue(ev.getFileName(), filter.accept(ev));
+    }
+
+    @Test
+    public void testDecideLocalizedMessage()
+    {
+        LocalizedMessage message =
+            new LocalizedMessage(0, 0, "", "", null, null, this.getClass(), null);
+        final AuditEvent ev = new AuditEvent(this, "ATest.java", message);
+        //deny because there are matches on file and check names
+        assertFalse("Names match", filter.accept(ev));
+    }
+
+    @Test
+    public void testDecideByLine()
+    {
+        LocalizedMessage message =
+            new LocalizedMessage(10, 10, "", "", null, null, this.getClass(), null);
+        final AuditEvent ev = new AuditEvent(this, "ATest.java", message);
+        //deny because there are matches on file name, check name, and line
+        filter.setLines("1-10");
+        assertFalse("In range 1-10", filter.accept(ev));
+        filter.setLines("1-9, 11");
+        assertTrue("Not in 1-9, 11", filter.accept(ev));
+    }
+
+    @Test
+    public void testDecideByColumn()
+    {
+        LocalizedMessage message =
+            new LocalizedMessage(10, 10, "", "", null, null, this.getClass(), null);
+        final AuditEvent ev = new AuditEvent(this, "ATest.java", message);
+        //deny because there are matches on file name, check name, and column
+        filter.setColumns("1-10");
+        assertFalse("In range 1-10", filter.accept(ev));
+        filter.setColumns("1-9, 11");
+        assertTrue("Not in 1-9, 1)", filter.accept(ev));
+    }
+
+    @Test
+    public void testEquals() throws PatternSyntaxException
+    {
+        final SuppressElement filter2 = new SuppressElement("Test");
+        filter2.setChecks("Test");
+        assertEquals("filter, filter2", filter, filter2);
+        final SuppressElement filter3 = new SuppressElement("Test");
+        filter3.setChecks("Test3");
+        assertFalse("filter, filter3", filter.equals(filter3));
+        filter.setColumns("1-10");
+        assertFalse("filter, filter2", filter.equals(filter2));
+        filter2.setColumns("1-10");
+        assertEquals("filter, filter2", filter, filter2);
+        filter.setColumns(null);
+        assertFalse("filter, filter2", filter.equals(filter2));
+        filter2.setColumns(null);
+        filter.setLines("3,4");
+        assertFalse("filter, filter2", filter.equals(filter2));
+        filter2.setLines("3,4");
+        assertEquals("filter, filter2", filter, filter2);
+        filter.setColumns("1-10");
+        assertFalse("filter, filter2", filter.equals(filter2));
+        filter2.setColumns("1-10");
+        assertEquals("filter, filter2", filter, filter2);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressWarningsFilterTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressWarningsFilterTest.java
new file mode 100644
index 0000000..47d4f56
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressWarningsFilterTest.java
@@ -0,0 +1,133 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import com.google.common.collect.Lists;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.Checker;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.TreeWalker;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import com.puppycrawl.tools.checkstyle.checks.SuppressWarningsHolder;
+import com.puppycrawl.tools.checkstyle.checks.coding.IllegalCatchCheck;
+import com.puppycrawl.tools.checkstyle.checks.naming.ConstantNameCheck;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+import com.puppycrawl.tools.checkstyle.checks.sizes.ParameterNumberCheck;
+
+import org.junit.Test;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Locale;
+
+public class SuppressWarningsFilterTest
+    extends BaseCheckTestSupport
+{
+    private static String[] sAllMessages =
+    {
+        "22:45: Name 'I' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "24:17: Name 'J' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "25:17: Name 'K' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "29:17: Name 'L' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "29:32: Name 'X' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "33:30: Name 'm' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+        "34:30: Name 'n' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+        "39:17: More than 7 parameters (found 8).",
+        "45:9: Catching 'Exception' is not allowed.",
+        "56:9: Catching 'Exception' is not allowed.",
+    };
+
+    @Test
+    public void testNone() throws Exception
+    {
+        final DefaultConfiguration filterConfig = null;
+        final String[] suppressed = {};
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration filterConfig =
+            createFilterConfig(SuppressWarningsFilter.class);
+        final String[] suppressed = {
+            "24:17: Name 'J' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "29:17: Name 'L' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "33:30: Name 'm' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+            "39:17: More than 7 parameters (found 8).",
+            "56:9: Catching 'Exception' is not allowed.",
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    public static DefaultConfiguration createFilterConfig(Class<?> aClass)
+    {
+        return new DefaultConfiguration(aClass.getName());
+    }
+
+    protected void verifySuppressed(Configuration aFilterConfig,
+        String[] aSuppressed) throws Exception
+    {
+        verify(createChecker(aFilterConfig),
+            getPath("filters/InputSuppressWarningsFilter.java"),
+            removeSuppressed(sAllMessages, aSuppressed));
+    }
+
+    @Override
+    protected Checker createChecker(Configuration aFilterConfig)
+        throws Exception
+    {
+        final DefaultConfiguration checkerConfig =
+            new DefaultConfiguration("configuration");
+        final DefaultConfiguration checksConfig =
+            createCheckConfig(TreeWalker.class);
+        final DefaultConfiguration holderConfig =
+            createCheckConfig(SuppressWarningsHolder.class);
+        holderConfig.addAttribute("aliasList",
+            "com.puppycrawl.tools.checkstyle.checks.sizes."
+                + "ParameterNumberCheck=paramnum");
+        checksConfig.addChild(holderConfig);
+        checksConfig.addChild(createCheckConfig(MemberNameCheck.class));
+        checksConfig.addChild(createCheckConfig(ConstantNameCheck.class));
+        checksConfig.addChild(createCheckConfig(ParameterNumberCheck.class));
+        checksConfig.addChild(createCheckConfig(IllegalCatchCheck.class));
+        checkerConfig.addChild(checksConfig);
+        if (aFilterConfig != null) {
+            checkerConfig.addChild(aFilterConfig);
+        }
+        final Checker checker = new Checker();
+        final Locale locale = Locale.ENGLISH;
+        checker.setLocaleCountry(locale.getCountry());
+        checker.setLocaleLanguage(locale.getLanguage());
+        checker.setModuleClassLoader(Thread.currentThread()
+            .getContextClassLoader());
+        checker.configure(checkerConfig);
+        checker.addListener(new BriefLogger(mStream));
+        return checker;
+    }
+
+    private String[] removeSuppressed(String[] aFrom, String[] aRemove)
+    {
+        final Collection<String> coll =
+            Lists.newArrayList(Arrays.asList(aFrom));
+        coll.removeAll(Arrays.asList(aRemove));
+        return coll.toArray(new String[coll.size()]);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilterTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilterTest.java
new file mode 100644
index 0000000..17c42e7
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilterTest.java
@@ -0,0 +1,228 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.Checker;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.TreeWalker;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import com.puppycrawl.tools.checkstyle.checks.FileContentsHolder;
+import com.puppycrawl.tools.checkstyle.checks.coding.IllegalCatchCheck;
+import com.puppycrawl.tools.checkstyle.checks.naming.ConstantNameCheck;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Locale;
+import org.junit.Test;
+
+public class SuppressWithNearbyCommentFilterTest
+    extends BaseCheckTestSupport
+{
+    private static String[] sAllMessages = {
+        "14:17: Name 'A1' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "15:17: Name 'A2' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "16:59: Name 'A3' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "18:17: Name 'B1' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "19:17: Name 'B2' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "20:59: Name 'B3' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "22:17: Name 'C1' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "24:17: Name 'C2' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "25:17: Name 'C3' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "27:17: Name 'D1' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "28:17: Name 'D2' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "30:17: Name 'D3' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "32:30: Name 'e1' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+        "33:17: Name 'E2' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "34:17: Name 'E3' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "35:30: Name 'e4' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+        "36:17: Name 'E5' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "37:30: Name 'e6' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+        "38:17: Name 'E7' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "39:17: Name 'E8' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "40:30: Name 'e9' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+        "64:23: Catching 'Exception' is not allowed.",
+        "66:23: Catching 'Throwable' is not allowed.",
+        "73:11: Catching 'Exception' is not allowed.",
+    };
+
+    @Test
+    public void testNone() throws Exception
+    {
+        final DefaultConfiguration filterConfig = null;
+        final String[] suppressed = {
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    @Test
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration filterConfig =
+            createFilterConfig(SuppressWithNearbyCommentFilter.class);
+        final String[] suppressed = {
+            "14:17: Name 'A1' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "15:17: Name 'A2' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "16:59: Name 'A3' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "18:17: Name 'B1' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "19:17: Name 'B2' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "20:59: Name 'B3' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    @Test
+    public void testCheckC() throws Exception
+    {
+        final DefaultConfiguration filterConfig =
+            createFilterConfig(SuppressWithNearbyCommentFilter.class);
+        filterConfig.addAttribute("checkC", "false");
+        final String[] suppressed = {
+            "14:17: Name 'A1' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "18:17: Name 'B1' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    @Test
+    public void testCheckCPP() throws Exception
+    {
+        final DefaultConfiguration filterConfig =
+            createFilterConfig(SuppressWithNearbyCommentFilter.class);
+        filterConfig.addAttribute("checkCPP", "false");
+        final String[] suppressed = {
+            "15:17: Name 'A2' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "16:59: Name 'A3' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "19:17: Name 'B2' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "20:59: Name 'B3' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    @Test
+    public void testUsingAVariableMessage() throws Exception
+    {
+        final DefaultConfiguration filterConfig =
+            createFilterConfig(SuppressWithNearbyCommentFilter.class);
+        filterConfig.addAttribute("commentFormat", "ALLOW CATCH (\\w+) BECAUSE");
+        filterConfig.addAttribute("checkFormat", "IllegalCatchCheck");
+        filterConfig.addAttribute("messageFormat", "$1");
+        filterConfig.addAttribute("influenceFormat", "-1");
+        final String[] suppressed = {
+            "66:23: Catching 'Throwable' is not allowed.",
+            "73:11: Catching 'Exception' is not allowed.",
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    @Test
+    public void testUsingAVariableCheckOnNextLine() throws Exception
+    {
+        final DefaultConfiguration filterConfig =
+            createFilterConfig(SuppressWithNearbyCommentFilter.class);
+        filterConfig.addAttribute("commentFormat", "ALLOW (\\w+) ON NEXT LINE");
+        filterConfig.addAttribute("checkFormat", "$1");
+        filterConfig.addAttribute("influenceFormat", "1");
+        final String[] suppressed = {
+            "24:17: Name 'C2' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    @Test
+    public void testUsingAVariableCheckOnPreviousLine() throws Exception
+    {
+        final DefaultConfiguration filterConfig =
+            createFilterConfig(SuppressWithNearbyCommentFilter.class);
+        filterConfig.addAttribute("commentFormat", "ALLOW (\\w+) ON PREVIOUS LINE");
+        filterConfig.addAttribute("checkFormat", "$1");
+        filterConfig.addAttribute("influenceFormat", "-1");
+        final String[] suppressed = {
+            "28:17: Name 'D2' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    @Test
+    public void testVariableCheckOnVariableNumberOfLines() throws Exception
+    {
+        final DefaultConfiguration filterConfig =
+            createFilterConfig(SuppressWithNearbyCommentFilter.class);
+        filterConfig.addAttribute("commentFormat", "ALLOW (\\w+) UNTIL THIS LINE([+-]\\d+)");
+        filterConfig.addAttribute("checkFormat", "$1");
+        filterConfig.addAttribute("influenceFormat", "$2");
+        final String[] suppressed = {
+            "35:30: Name 'e4' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+            "36:17: Name 'E5' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "38:17: Name 'E7' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "39:17: Name 'E8' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+
+    public static DefaultConfiguration createFilterConfig(Class<?> aClass)
+    {
+        return new DefaultConfiguration(aClass.getName());
+    }
+
+    protected void verifySuppressed(Configuration aFilterConfig,
+                                    String[] aSuppressed)
+        throws Exception
+    {
+        verify(createChecker(aFilterConfig),
+               getPath("filters/InputSuppressWithNearbyCommentFilter.java"),
+               removeSuppressed(sAllMessages, aSuppressed));
+    }
+
+    @Override
+    protected Checker createChecker(Configuration aFilterConfig)
+        throws CheckstyleException
+    {
+        final DefaultConfiguration checkerConfig =
+            new DefaultConfiguration("configuration");
+        final DefaultConfiguration checksConfig = createCheckConfig(TreeWalker.class);
+        checksConfig.addChild(createCheckConfig(FileContentsHolder.class));
+        checksConfig.addChild(createCheckConfig(MemberNameCheck.class));
+        checksConfig.addChild(createCheckConfig(ConstantNameCheck.class));
+        checksConfig.addChild(createCheckConfig(IllegalCatchCheck.class));
+        checkerConfig.addChild(checksConfig);
+        if (aFilterConfig != null) {
+            checkerConfig.addChild(aFilterConfig);
+        }
+        final Checker checker = new Checker();
+        final Locale locale = Locale.ENGLISH;
+        checker.setLocaleCountry(locale.getCountry());
+        checker.setLocaleLanguage(locale.getLanguage());
+        checker.setModuleClassLoader(Thread.currentThread().getContextClassLoader());
+        checker.configure(checkerConfig);
+        checker.addListener(new BriefLogger(mStream));
+        return checker;
+    }
+
+    private String[] removeSuppressed(String[] aFrom, String[] aRemove)
+    {
+        final Collection<String> coll =
+            Lists.newArrayList(Arrays.asList(aFrom));
+        coll.removeAll(Arrays.asList(aRemove));
+        return coll.toArray(new String[coll.size()]);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilterTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilterTest.java
new file mode 100644
index 0000000..25db9f4
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilterTest.java
@@ -0,0 +1,234 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import com.google.common.collect.Lists;
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.Checker;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.TreeWalker;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.Configuration;
+import com.puppycrawl.tools.checkstyle.checks.FileContentsHolder;
+import com.puppycrawl.tools.checkstyle.checks.coding.IllegalCatchCheck;
+import com.puppycrawl.tools.checkstyle.checks.naming.ConstantNameCheck;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Locale;
+import org.junit.Test;
+
+public class SuppressionCommentFilterTest
+    extends BaseCheckTestSupport
+{
+    private static String[] sAllMessages = {
+        "13:17: Name 'I' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "16:17: Name 'J' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "19:17: Name 'K' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "22:17: Name 'L' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "23:30: Name 'm' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+        "27:17: Name 'M2' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "28:30: Name 'n' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+        "32:17: Name 'P' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "35:17: Name 'Q' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "38:17: Name 'R' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "39:30: Name 's' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+        "43:17: Name 'T' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        "64:23: Catching 'Exception' is not allowed.",
+        "71:11: Catching 'Exception' is not allowed.",
+        "77:11: Catching 'RuntimeException' is not allowed.",
+        "78:11: Catching 'Exception' is not allowed.",
+    };
+
+    @Test
+    public void testNone() throws Exception
+    {
+        final DefaultConfiguration filterConfig = null;
+        final String[] suppressed = {
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    //Suppress all checks between default comments
+    @Test
+    public void testDefault() throws Exception
+    {
+        final DefaultConfiguration filterConfig =
+            createFilterConfig(SuppressionCommentFilter.class);
+        final String[] suppressed = {
+            "16:17: Name 'J' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "43:17: Name 'T' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "64:23: Catching 'Exception' is not allowed.",
+            "71:11: Catching 'Exception' is not allowed.",
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    @Test
+    public void testCheckC() throws Exception
+    {
+        final DefaultConfiguration filterConfig =
+            createFilterConfig(SuppressionCommentFilter.class);
+        filterConfig.addAttribute("checkC", "false");
+        final String[] suppressed = {
+            "43:17: Name 'T' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "64:23: Catching 'Exception' is not allowed.",
+            "71:11: Catching 'Exception' is not allowed.",
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    @Test
+    public void testCheckCPP() throws Exception
+    {
+        final DefaultConfiguration filterConfig =
+            createFilterConfig(SuppressionCommentFilter.class);
+        filterConfig.addAttribute("checkCPP", "false");
+        final String[] suppressed = {
+            "16:17: Name 'J' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    //Suppress all checks between CS_OFF and CS_ON
+    @Test
+    public void testOffFormat() throws Exception
+    {
+        final DefaultConfiguration filterConfig =
+            createFilterConfig(SuppressionCommentFilter.class);
+        filterConfig.addAttribute("offCommentFormat", "CS_OFF");
+        filterConfig.addAttribute("onCommentFormat", "CS_ON");
+        final String[] suppressed = {
+            "32:17: Name 'P' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "38:17: Name 'R' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "39:30: Name 's' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+            "42:17: Name 'T' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    //Test suppression of checks of only one type
+    //Suppress only ConstantNameCheck between CS_OFF and CS_ON
+    @Test
+    public void testOffFormatCheck() throws Exception
+    {
+        final DefaultConfiguration filterConfig =
+            createFilterConfig(SuppressionCommentFilter.class);
+        filterConfig.addAttribute("offCommentFormat", "CS_OFF");
+        filterConfig.addAttribute("onCommentFormat", "CS_ON");
+        filterConfig.addAttribute("checkFormat", "ConstantNameCheck");
+        final String[] suppressed = {
+            "39:30: Name 's' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    @Test
+    public void testArgumentSuppression() throws Exception
+    {
+        final DefaultConfiguration filterConfig =
+            createFilterConfig(SuppressionCommentFilter.class);
+        filterConfig.addAttribute("offCommentFormat", "IllegalCatchCheck OFF\\: (\\w+)");
+        filterConfig.addAttribute("onCommentFormat", "IllegalCatchCheck ON\\: (\\w+)");
+        filterConfig.addAttribute("checkFormat", "IllegalCatchCheck");
+        filterConfig.addAttribute("messageFormat", "^Catching '$1' is not allowed.*$");
+        final String[] suppressed = {
+            "78:11: Catching 'Exception' is not allowed.",
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    @Test
+    public void testExpansion() throws Exception
+    {
+        final DefaultConfiguration filterConfig =
+            createFilterConfig(SuppressionCommentFilter.class);
+        filterConfig.addAttribute("offCommentFormat", "CSOFF\\: ([\\w\\|]+)");
+        filterConfig.addAttribute("onCommentFormat", "CSON\\: ([\\w\\|]+)");
+        filterConfig.addAttribute("checkFormat", "$1");
+        final String[] suppressed = {
+            "22:17: Name 'L' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
+            "23:30: Name 'm' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+            "28:30: Name 'n' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    @Test
+    public void testMessage() throws Exception
+    {
+        final DefaultConfiguration filterConfig =
+            createFilterConfig(SuppressionCommentFilter.class);
+        filterConfig.addAttribute("onCommentFormat", "UNUSED ON\\: (\\w+)");
+        filterConfig.addAttribute("offCommentFormat", "UNUSED OFF\\: (\\w+)");
+        filterConfig.addAttribute("checkFormat", "Unused");
+        filterConfig.addAttribute("messageFormat", "^Unused \\w+ '$1'.$");
+        final String[] suppressed = {
+            "47:34: Unused parameter 'aInt'.",
+        };
+        verifySuppressed(filterConfig, suppressed);
+    }
+
+    public static DefaultConfiguration createFilterConfig(Class<?> aClass)
+    {
+        return new DefaultConfiguration(aClass.getName());
+    }
+
+    protected void verifySuppressed(Configuration aFilterConfig,
+                                    String[] aSuppressed)
+        throws Exception
+    {
+        verify(createChecker(aFilterConfig),
+               getPath("filters/InputSuppressionCommentFilter.java"),
+               removeSuppressed(sAllMessages, aSuppressed));
+    }
+
+    @Override
+    protected Checker createChecker(Configuration aFilterConfig)
+        throws CheckstyleException
+    {
+        final DefaultConfiguration checkerConfig =
+            new DefaultConfiguration("configuration");
+        final DefaultConfiguration checksConfig = createCheckConfig(TreeWalker.class);
+        checksConfig.addChild(createCheckConfig(FileContentsHolder.class));
+        checksConfig.addChild(createCheckConfig(MemberNameCheck.class));
+        checksConfig.addChild(createCheckConfig(ConstantNameCheck.class));
+        checksConfig.addChild(createCheckConfig(IllegalCatchCheck.class));
+        checkerConfig.addChild(checksConfig);
+        if (aFilterConfig != null) {
+            checkerConfig.addChild(aFilterConfig);
+        }
+        final Checker checker = new Checker();
+        final Locale locale = Locale.ENGLISH;
+        checker.setLocaleCountry(locale.getCountry());
+        checker.setLocaleLanguage(locale.getLanguage());
+        checker.setModuleClassLoader(Thread.currentThread().getContextClassLoader());
+        checker.configure(checkerConfig);
+        checker.addListener(new BriefLogger(mStream));
+        return checker;
+    }
+
+    private String[] removeSuppressed(String[] aFrom, String[] aRemove)
+    {
+        final Collection<String> coll =
+            Lists.newArrayList(Arrays.asList(aFrom));
+        coll.removeAll(Arrays.asList(aRemove));
+        return coll.toArray(new String[coll.size()]);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionsLoaderTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionsLoaderTest.java
new file mode 100644
index 0000000..f699f99
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionsLoaderTest.java
@@ -0,0 +1,174 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.filters;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.regex.PatternSyntaxException;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import com.puppycrawl.tools.checkstyle.api.FilterSet;
+
+/**
+ * Tests SuppressionsLoader.
+ * @author Rick Giles
+ */
+public class SuppressionsLoaderTest
+{
+    @Test
+    public void testResourceLoadSuppressions()
+        throws CheckstyleException
+    {
+        final FilterSet fc =
+            SuppressionsLoader.loadSuppressions(
+                "/checkstyle/suppressions.xml");
+        final FilterSet fc2 = new FilterSet();
+        assertEquals(fc, fc2);
+    }
+
+    @Test
+    public void testNoSuppressions()
+        throws CheckstyleException
+    {
+        final FilterSet fc =
+            SuppressionsLoader.loadSuppressions(
+                    "src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_none.xml");
+        final FilterSet fc2 = new FilterSet();
+        assertEquals(fc, fc2);
+    }
+
+    @Test
+    public void testLoadFromURL()
+        throws CheckstyleException, InterruptedException
+    {
+        FilterSet fc = null;
+
+        int attemptCount = 0;
+        final int attemptLimit = 5;
+        while (attemptCount <= attemptLimit) {
+            try {
+
+                fc = SuppressionsLoader
+                        .loadSuppressions("http://checkstyle.sourceforge.net/files/suppressions_none.xml");
+                break;
+
+            }
+            catch (CheckstyleException ex) {
+                // for some reason Travis CI failed some times(unstable) on reading this file
+                if (attemptCount < attemptLimit
+                        && ex.getMessage().contains("unable to read"))
+                {
+                    attemptCount++;
+                    // wait for bad/disconnection time to pass
+                    Thread.sleep(1000);
+                }
+                else {
+                    throw ex;
+                }
+            }
+        }
+
+        final FilterSet fc2 = new FilterSet();
+        assertEquals(fc, fc2);
+    }
+
+    @Test(expected = CheckstyleException.class)
+    public void testLoadFromMalformedURL() throws CheckstyleException
+    {
+        SuppressionsLoader.loadSuppressions("http");
+    }
+
+    @Test(expected = CheckstyleException.class)
+    public void testLoadFromNonExistingURL() throws CheckstyleException
+    {
+        SuppressionsLoader.loadSuppressions("http://^%$^* %&% %^&");
+    }
+
+    @Test
+    public void testMultipleSuppression()
+        throws CheckstyleException, PatternSyntaxException
+    {
+        final FilterSet fc =
+            SuppressionsLoader.loadSuppressions(
+                    "src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_multiple.xml");
+        final FilterSet fc2 = new FilterSet();
+        SuppressElement se0 = new SuppressElement("file0");
+        se0.setChecks("check0");
+        fc2.addFilter(se0);
+        SuppressElement se1 = new SuppressElement("file1");
+        se1.setChecks("check1");
+        se1.setLines("1,2-3");
+        fc2.addFilter(se1);
+        SuppressElement se2 = new SuppressElement("file2");
+        se2.setChecks("check2");
+        se2.setColumns("1,2-3");
+        fc2.addFilter(se2);
+        SuppressElement se3 = new SuppressElement("file3");
+        se3.setChecks("check3");
+        se3.setLines("1,2-3");
+        se3.setColumns("1,2-3");
+        fc2.addFilter(se3);
+        assertEquals(fc, fc2);
+    }
+
+    @Test
+    public void testNoFile()
+    {
+        final String fn = "src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_no_file.xml";
+        try {
+            SuppressionsLoader.loadSuppressions(fn);
+        }
+        catch (CheckstyleException ex) {
+            assertEquals(
+                "unable to parse " + fn + " - Attribute \"files\" is required and must be specified for element type \"suppress\".",
+                ex.getMessage());
+        }
+    }
+
+    @Test
+    public void testNoCheck()
+    {
+        final String fn = "src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_no_check.xml";
+        try {
+            SuppressionsLoader.loadSuppressions(fn);
+        }
+        catch (CheckstyleException ex) {
+            assertEquals(
+                "unable to parse " + fn + " - Attribute \"checks\" is required and must be specified for element type \"suppress\".",
+                ex.getMessage());
+        }
+    }
+
+    @Test
+    public void testBadInt()
+    {
+        final String fn = "src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_bad_int.xml";
+        try {
+            SuppressionsLoader.loadSuppressions(fn);
+        }
+        catch (CheckstyleException ex) {
+            assertTrue(
+                ex.getMessage(),
+                ex.getMessage().startsWith("number format exception " + fn + " - "));
+        }
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/EmbeddedNullCharTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/EmbeddedNullCharTest.java
new file mode 100644
index 0000000..c9afb86
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/EmbeddedNullCharTest.java
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.grammars;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+import org.junit.Test;
+
+/**
+ * Tests that embedded nulls in string literals does not halt parsing.
+ * @author Michael Studman
+ */
+public class EmbeddedNullCharTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testCanParse()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/InputEmbeddedNullChar.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/GeneratedJava14LexerTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/GeneratedJava14LexerTest.java
new file mode 100644
index 0000000..d69b89e
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/GeneratedJava14LexerTest.java
@@ -0,0 +1,26 @@
+package com.puppycrawl.tools.checkstyle.grammars;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+import java.io.IOException;
+import org.junit.Test;
+
+/**
+ * Tests GeneratedJava14Lexer.
+ * @author Rick Giles
+ */
+public class GeneratedJava14LexerTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testUnexpectedChar() throws IOException, Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {
+            "8:10: Got an exception - Unexpected character 0xa9 in identifier",
+        };
+        verify(checkConfig, getPath("grammars/InputGrammar.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/HexFloatsTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/HexFloatsTest.java
new file mode 100644
index 0000000..84e4f09
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/HexFloatsTest.java
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.grammars;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+import org.junit.Test;
+
+/**
+ * Tests hex floats and doubles can be parsed.
+ * @author Michael Studman
+ */
+public class HexFloatsTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testCanParse()
+        throws Exception
+
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/InputHexFloat.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/Java7DiamondTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/Java7DiamondTest.java
new file mode 100644
index 0000000..3345820
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/Java7DiamondTest.java
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.grammars;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+
+import org.junit.Test;
+
+/**
+ * Tests Java 7 diamond can be parsed.
+ * @author Dinesh Bolkensteyn (SonarSource)
+ */
+public class Java7DiamondTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testCanParse()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/InputJava7Diamond.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/Java7MultiCatchTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/Java7MultiCatchTest.java
new file mode 100644
index 0000000..4d61543
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/Java7MultiCatchTest.java
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.grammars;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+
+import org.junit.Test;
+
+/**
+ * Tests Java 7 multi-catch can be parsed.
+ * @author Dinesh Bolkensteyn (SonarSource)
+ */
+public class Java7MultiCatchTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testCanParse()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/InputJava7MultiCatch.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/Java7NumericalLiteralsTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/Java7NumericalLiteralsTest.java
new file mode 100644
index 0000000..4923ff6
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/Java7NumericalLiteralsTest.java
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.grammars;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+import org.junit.Test;
+
+/**
+ * Tests Java 7 numerical literals can be parsed.
+ * @author Dinesh Bolkensteyn (SonarSource)
+ */
+public class Java7NumericalLiteralsTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testCanParse()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/InputJava7NumericalLiterals.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/Java7StringSwitchTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/Java7StringSwitchTest.java
new file mode 100644
index 0000000..cd3159f
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/Java7StringSwitchTest.java
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.grammars;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+import org.junit.Test;
+
+/**
+ * Tests Java 7 String in switch can be parsed.
+ * @author Dinesh Bolkensteyn (SonarSource)
+ */
+public class Java7StringSwitchTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testCanParse()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/InputJava7StringSwitch.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/Java7TryWithResourcesTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/Java7TryWithResourcesTest.java
new file mode 100644
index 0000000..97b8730
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/Java7TryWithResourcesTest.java
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.grammars;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+
+import org.junit.Test;
+
+/**
+ * Tests Java 7 try-with-resources can be parsed.
+ * @author Dinesh Bolkensteyn (SonarSource)
+ */
+public class Java7TryWithResourcesTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testCanParse()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/InputJava7TryWithResources.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/LineCommentAtTheEndOfFileTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/LineCommentAtTheEndOfFileTest.java
new file mode 100644
index 0000000..3ae9a4d
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/LineCommentAtTheEndOfFileTest.java
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.grammars;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+import org.junit.Test;
+
+/**
+ * Checks that file can be parsed, when it ends on line-comment but without
+ * new-line.
+ *
+ * @author Evgeny Mandrikov
+ */
+public class LineCommentAtTheEndOfFileTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testCanParse()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/LineCommentAtTheEndOfFile.java"),
+            expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/UnicodeEscapeTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/UnicodeEscapeTest.java
new file mode 100644
index 0000000..d5b8d36
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/UnicodeEscapeTest.java
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.grammars;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+
+import org.junit.Test;
+
+/**
+ * Tests that extended unicode escapes can be parsed.
+ * @author Dinesh Bolkensteyn (SonarSource)
+ */
+public class UnicodeEscapeTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testCanParse()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/UnicodeEscape.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/VarargTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/VarargTest.java
new file mode 100644
index 0000000..7a5efa3
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/VarargTest.java
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.grammars;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+import org.junit.Test;
+
+/**
+ * Tests varargs can be parsed.
+ * @author Michael Studman
+ */
+public class VarargTest
+    extends BaseCheckTestSupport
+{
+    @Test
+    public void testCanParse()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+            createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/InputVararg.java"), expected);
+    }
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/java8/AnnotationTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/java8/AnnotationTest.java
new file mode 100644
index 0000000..a685377
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/java8/AnnotationTest.java
@@ -0,0 +1,150 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+
+public class AnnotationTest extends BaseCheckTestSupport
+{
+
+    @Test
+    public void testSimpleTypeAnnotation()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig,
+                getPath("grammars/java8/InputAnnotationsTest1.java"), expected);
+
+    }
+
+    @Test
+    public void testAnnotationOnClass()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig,
+                getPath("grammars/java8/InputAnnotationsTest2.java"), expected);
+
+    }
+
+    @Test
+    public void testClassCastTypeAnnotation()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig,
+                getPath("grammars/java8/InputAnnotationsTest3.java"), expected);
+
+    }
+
+    @Test
+    public void testMethodParametersTypeAnnotation()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig,
+                getPath("grammars/java8/InputAnnotationsTest4.java"), expected);
+
+    }
+
+    @Test
+    public void testAnnotationInThrows()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig,
+                getPath("grammars/java8/InputAnnotationsTest5.java"), expected);
+
+    }
+
+    @Test
+    public void testAnnotationInGeneric()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig,
+                getPath("grammars/java8/InputAnnotationsTest6.java"), expected);
+
+    }
+
+    @Test
+    public void testAnnotationOnConstructorCall()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig,
+                getPath("grammars/java8/InputAnnotationsTest7.java"), expected);
+
+    }
+
+    @Test
+    public void testAnnotationNestedCall()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig,
+                getPath("grammars/java8/InputAnnotationsTest8.java"), expected);
+
+    }
+
+    @Test
+    public void testAnnotationOnWildcards()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig,
+                getPath("grammars/java8/InputAnnotationsTest9.java"), expected);
+
+    }
+
+    @Test
+    public void testAnnotationInCatchParameters()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig,
+                getPath("grammars/java8/InputAnnotationsTest10.java"), expected);
+
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/java8/DefaulMethodsTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/java8/DefaulMethodsTest.java
new file mode 100644
index 0000000..706228a
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/java8/DefaulMethodsTest.java
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+
+public class DefaulMethodsTest extends BaseCheckTestSupport
+{
+
+    @Test
+    public void testCanParse()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig,
+                getPath("grammars/java8/InputDefaultMethodsTest.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testSwitch()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig,
+                getPath("grammars/java8/InputDefaultMethodsTest2.java"),
+                expected);
+
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/java8/LambdaTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/java8/LambdaTest.java
new file mode 100644
index 0000000..ddfe29f
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/java8/LambdaTest.java
@@ -0,0 +1,246 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+
+public class LambdaTest extends BaseCheckTestSupport
+{
+
+    @Test
+    public void testLambdaInVariableInitialization()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest1.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testWithoutArgsOneLineLambdaBody()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest2.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testWithoutArgsFullLambdaBody()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest3.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testWithOneArgWithOneLineBody()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest4.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testWithOneArgWithFullBody()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest5.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testWithOneArgWIthoutTypeOneLineBody()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest6.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testWithOneArgWIthoutTypeFullBody()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest7.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testWithFewArgsWithoutTypeOneLineBody()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest8.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testWithFewArgsWithoutTypeFullBody()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest9.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testWithOneArgWIthoutParenthesesWithoutTypeOneLineBody()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest10.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testWithOneArgWIthoutParenthesesWithoutTypeFullBody()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest11.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testWithFewArgWIthTypeOneLine()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest12.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testWithFewArgWithTypeFullBody()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest13.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testWIthMultilineBody()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest14.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testCasesFromSpec()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest15.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testWithTypecast()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest16.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testInAssignment()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest17.java"),
+                expected);
+
+    }
+
+    @Test
+    public void testInTernary()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputLambdaTest18.java"),
+                expected);
+
+    }
+
+}
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/grammars/java8/MethodReferencesTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/java8/MethodReferencesTest.java
new file mode 100644
index 0000000..84d6abf
--- /dev/null
+++ b/src/test/java/com/puppycrawl/tools/checkstyle/grammars/java8/MethodReferencesTest.java
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+import com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck;
+
+public class MethodReferencesTest extends BaseCheckTestSupport
+{
+
+    @Test
+    public void testCanParse()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputMethodReferencesTest.java"), expected);
+
+    }
+
+    @Test
+    public void testFromSpec()
+        throws Exception
+    {
+        final DefaultConfiguration checkConfig =
+                createCheckConfig(MemberNameCheck.class);
+        final String[] expected = {};
+        verify(checkConfig, getPath("grammars/java8/InputMethodReferencesTest2.java"), expected);
+
+    }
+}
diff --git a/src/test/resources/checkstyle/checkstyle_checks.xml b/src/test/resources/checkstyle/checkstyle_checks.xml
new file mode 100644
index 0000000..de933d9
--- /dev/null
+++ b/src/test/resources/checkstyle/checkstyle_checks.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<module name="Checker">
+    <module name="TreeWalker">
+        <module name="AvoidStarImport"/>
+        <module name="MemberName">
+            <property name="format" value="^m_[a-zA-Z0-9]*$"/>
+        </module>
+        <property name="testName" value="testValue" />
+        <module name="ConstantName"/>
+        <module name="EmptyBlock"/>
+        <module name="EqualsHashCode"/>
+        <module name="FileLength"/>
+        <module name="NoWhitespaceAfter">
+            <property name="tokens" value="DOT"/>
+            <property name="allowLineBreaks" value="true"/>
+        </module>
+        <module name="GenericIllegalRegexp">
+            <property name="format" value="System.out.println"/>
+        </module>
+    </module>
+    <module name="JavadocPackage"/>
+    <module name="Translation"/>
+</module>
diff --git a/src/test/resources/checkstyle/suppressions.xml b/src/test/resources/checkstyle/suppressions.xml
new file mode 100644
index 0000000..2002196
--- /dev/null
+++ b/src/test/resources/checkstyle/suppressions.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suppressions PUBLIC
+    "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+    "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+<suppressions>
+</suppressions>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/ComplexityCheckTestInput.java b/src/test/resources/com/puppycrawl/tools/checkstyle/ComplexityCheckTestInput.java
new file mode 100644
index 0000000..da054e6
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/ComplexityCheckTestInput.java
@@ -0,0 +1,86 @@
+package com.puppycrawl.tools.checkstyle;
+
+public class ComplexityCheckTestInput {
+    public void foo() {
+        while (true) {
+            Runnable runnable = new Runnable() {
+                public void run() {
+                    while (true) {
+                    }
+                }
+            };
+
+            new Thread(runnable).start();
+        }
+    }
+
+    public void bar() {
+        if (System.currentTimeMillis() == 0) {
+            if (System.currentTimeMillis() == 0 && System.currentTimeMillis() == 0) {
+            }
+
+            if (System.currentTimeMillis() == 0 || System.currentTimeMillis() == 0) {
+            }
+        }
+    }
+
+    public void simpleElseIf() {
+        if (System.currentTimeMillis() == 0) {
+        } else if (System.currentTimeMillis() == 0) {
+        } else {
+        }
+    }
+
+    public void stupidElseIf() {
+        if (System.currentTimeMillis() == 0) {
+        } else {
+            if (System.currentTimeMillis() == 0) {
+            } else {
+                if (System.currentTimeMillis() == 0) {
+                }
+            }
+
+            if (System.currentTimeMillis() == 0) {
+            }
+        }
+    }
+
+    public ComplexityCheckTestInput()
+    {
+        int i = 1;
+        if (System.currentTimeMillis() == 0) {
+        } else if (System.currentTimeMillis() == 0) {
+        } else {
+        }
+    }
+    
+    // STATIC_INIT   
+    static {
+        int i = 1;
+        if (System.currentTimeMillis() == 0) {
+        } else if (System.currentTimeMillis() == 0) {
+        } else {
+        }
+    }
+    
+    // INSTANCE_INIT   
+    {
+        int i = 1;
+        if (System.currentTimeMillis() == 0) {
+        } else if (System.currentTimeMillis() == 0) {
+        } else {
+        }
+    }
+    
+    /** Inner */
+    public ComplexityCheckTestInput(int aParam)
+    {
+        Runnable runnable = new Runnable() {
+            public void run() {
+                while (true) {
+                }
+            }
+        };
+        new Thread(runnable).start();       
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/ComplexityOverflow.java b/src/test/resources/com/puppycrawl/tools/checkstyle/ComplexityOverflow.java
new file mode 100644
index 0000000..c55a998
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/ComplexityOverflow.java
@@ -0,0 +1,172 @@
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * This class has methods that have an NPath complexity larger than MAXINT.
+ * Test case for bug 1654769.  
+ */
+public class ComplexityOverflow {
+
+    public void provokeNpathIntegerOverflow()
+    {
+        if (true) {
+            if (true) {
+                if (true) {
+                    if (true) {
+                        if (true) {
+                            if (true) {
+                                if (true) {
+                                    if (true) {
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        if (true) {
+            if (true) {
+                if (true) {
+                    if (true) {
+                        if (true) {
+                            if (true) {
+                                if (true) {
+                                    if (true) {
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        if (true) {
+            if (true) {
+                if (true) {
+                    if (true) {
+                        if (true) {
+                            if (true) {
+                                if (true) {
+                                    if (true) {
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        if (true) {
+            if (true) {
+                if (true) {
+                    if (true) {
+                        if (true) {
+                            if (true) {
+                                if (true) {
+                                    if (true) {
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        if (true) {
+            if (true) {
+                if (true) {
+                    if (true) {
+                        if (true) {
+                            if (true) {
+                                if (true) {
+                                    if (true) {
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        if (true) {
+            if (true) {
+                if (true) {
+                    if (true) {
+                        if (true) {
+                            if (true) {
+                                if (true) {
+                                    if (true) {
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        if (true) {
+            if (true) {
+                if (true) {
+                    if (true) {
+                        if (true) {
+                            if (true) {
+                                if (true) {
+                                    if (true) {
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        if (true) {
+            if (true) {
+                if (true) {
+                    if (true) {
+                        if (true) {
+                            if (true) {
+                                if (true) {
+                                    if (true) {
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        if (true) {
+            if (true) {
+                if (true) {
+                    if (true) {
+                        if (true) {
+                            if (true) {
+                                if (true) {
+                                    if (true) {
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        if (true) {
+            if (true) {
+                if (true) {
+                    if (true) {
+                        if (true) {
+                            if (true) {
+                                if (true) {
+                                    if (true) {
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/Input15Extensions.java b/src/test/resources/com/puppycrawl/tools/checkstyle/Input15Extensions.java
new file mode 100644
index 0000000..73a1148
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/Input15Extensions.java
@@ -0,0 +1,38 @@
+// someexamples of 1.5 extensions
+package com.puppycrawl.tools.checkstyle;
+
+ at interface MyAnnotation1 {
+    String name();
+    int version();
+}
+
+ at MyAnnotation1(name = "ABC", version = 1)
+public class Input15Extensions
+{
+
+}
+
+enum Enum1
+{
+    A, B, C;
+    Enum1() {}
+    public String toString() {
+        return ""; //some custom implementation
+    }
+}
+
+interface TestRequireThisEnum
+{
+    enum DAY_OF_WEEK
+    {
+        SUNDAY,
+        MONDAY,
+        TUESDAY,
+        WEDNESDAY,
+        THURSDAY,
+        FRIDAY,
+        SATURDAY
+    }
+}
+
+
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputAnonInnerLength.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputAnonInnerLength.java
new file mode 100644
index 0000000..301ab40
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputAnonInnerLength.java
@@ -0,0 +1,123 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2002
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseAdapter;
+import javax.swing.JButton;
+
+/**
+ * Tests for length of anonymous inner types
+ * @author Rob Worth
+ * @author Lars K�hne
+ **/
+public class InputAnonInnerLength
+{
+    /**
+     * Check that instantiations of normal classes work OK.
+     */
+    private JButton mButton = new JButton();
+
+    private class MyInner
+    {
+        private MyInner(int[] anArray)
+        {
+        }
+    }
+
+    /**
+     * the AnonInnerLengthCheck works with 'new' and RCURLY - check that
+     * it will not confuse constructors calls with array params with
+     * anon inners.
+     */
+    private MyInner myInner = new MyInner(new int[]{
+            // make the array span multiple lines
+            1,
+            2,
+            3,
+            4,
+            5,
+            6,
+            7,
+            }
+    );
+
+    /**
+       anon inner in member variable initialization which is 21 lines long
+    */
+    private Runnable mRunnable1 = new Runnable() {
+        public void run() // should not have to be documented, class is anon.
+        {
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+        }
+    };
+
+    /**
+       anon inner in member variable initialization which is 20 lines long
+    */
+    private Runnable mRunnable2 = new Runnable() {
+        public void run() // should not have to be documented, class is anon.
+        {
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+            System.out.println("running");
+        }
+    };
+
+    /**
+       anon inner in constructor.
+    */
+    InputAnonInnerLength()
+    {
+        mButton.addMouseListener( new MouseAdapter()
+            {
+                public void mouseClicked( MouseEvent aEv )
+                {
+                    System.out.println("click");
+                }
+            } );
+    }
+
+    /**
+       anon inner in method
+    */
+    public void addInputAnonInner()
+    {
+        mButton.addMouseListener( new MouseAdapter()
+            {
+                public void mouseClicked( MouseEvent aEv )
+                {
+                    System.out.println("click");
+                }
+            } );
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputArrayTrailingComma.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputArrayTrailingComma.java
new file mode 100644
index 0000000..fbe35ff
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputArrayTrailingComma.java
@@ -0,0 +1,41 @@
+package com.puppycrawl.tools.checkstyle;
+
+public class InputArrayTrailingComma
+{
+    int[] a1 = new int[] 
+    {
+        1,
+        2,
+        3,
+    };
+
+    int[] a2 = new int[] 
+    {
+        1,
+        2,
+        3
+    };
+
+    int[] b1 = new int[] {1, 2, 3,};
+    int[] b2 = new int[] {1, 2, 3};
+
+    int[][] c1 = new int[][] {{1, 2,}, {3, 3,}, {5, 6,},};
+    int[][] c2 = new int[][] {{1, 2}, {3, 3,}, {5, 6,}};
+
+    int[][] d1 = new int[][] 
+    {
+        {1, 2,},
+        {3, 3,},
+        {5, 6,},
+    };
+    int[][] d2 = new int[][] 
+    {
+        {1, 
+         2}, 
+        {3, 3,}, 
+        {5, 6,}
+    };
+
+    int[] e1 = new int[] {
+    };
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputArrayTypeStyle.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputArrayTypeStyle.java
new file mode 100644
index 0000000..5477591
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputArrayTypeStyle.java
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test case for ArrayTypeStyle (Java vs C)
+ * @author lkuehne
+ **/
+public class InputArrayTypeStyle
+{
+    private int[] javaStyle = new int[0];
+    private int cStyle[] = new int[0];
+
+    public static void mainJava(String[] aJavaStyle)
+    {
+    }
+
+    public static void mainC(String aCStyle[])
+    {
+        final int[] blah = new int[0];
+        final boolean isOK1 = aCStyle instanceof String[];
+        final boolean isOK2 = aCStyle instanceof java.lang.String[];
+        final boolean isOK3 = blah instanceof int[];
+    }
+
+    public class Test
+    {
+        public Test[]
+            variable;
+
+        public Test[]
+            getTests()
+        { // we shouldn't check methods because there is no alternatives.
+            return null;
+        }
+
+        public Test[] getNewTest()
+        {
+            return null;
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputAvoidEscapedUnicodeCharactersCheck.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputAvoidEscapedUnicodeCharactersCheck.java
new file mode 100644
index 0000000..48180a3
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputAvoidEscapedUnicodeCharactersCheck.java
@@ -0,0 +1,81 @@
+package com.puppycrawl.tools.checkstyle;
+
+public class InputForbidEscapedUnicodeCharactersCheck {
+
+	private String unitAbbrev2 = "\u03bcs";
+
+	private String unitAbbrev3 = "\u03bcs"; // Greek letter mu
+
+	private String unitAbbrev3 = "\u03bcs"; // Greek letter mu
+
+	public Object fooString() {
+		String unitAbbrev = "μs";
+		String unitAbbrev2 = "\u03bcs";
+		String unitAbbrev3 = "\u03bcs"; // Greek letter mu, "s"
+		String fakeUnicode = "asd\tsasd";
+		String fakeUnicode2 = "\\u23\\u123i\\u";
+		return "\ufeff" + content; // byte order mark
+	}
+
+	public Object fooChar() {
+		char unitAbbrev2 = '\u03bc';
+		char unitAbbrev3 = '\u03bc'; // Greek letter mu, "s"
+		return '\ufeff' + content; // byte order mark
+	}
+
+	public void multiplyString() {
+		String unitAbbrev2 = "asd\u03bcsasd";
+		String unitAbbrev3 = "aBc\u03bcssdf\u03bc"; /* Greek letter mu, "s" */
+		String unitAbbrev4 = "\u03bcaBc\u03bcssdf\u03bc";
+		String allCharactersEscaped = "\u03bc\u03bc";
+	}
+
+	private static String abbreviate(TimeUnit unit) {
+		switch (unit) {
+		case NANOSECONDS:
+			return "ns";
+		case MICROSECONDS:
+			return "\u03bcs"; // μs
+		case MILLISECONDS:
+			return "ms";
+		case SECONDS:
+			return "s";
+		case MINUTES:
+			return "min";
+		case HOURS:
+			return "h";
+		case DAYS:
+			return "d";
+		default:
+			throw new AssertionError();
+		}
+
+		static final String WHITESPACE_TABLE = ""
+				+ "\u2002\u3000\r\u0085\u200A\u2005\u2000\u3000\\"
+				+ "\u2029\u000B\u3000\u2008\u2003\u205F\u3000\u1680"
+				+ "\u0009\u0020\u2006\u2001\u202F\u00A0\u000C\u2009"
+				+ "\u3000\u2004\u3000\u3000\u2028\n\u2007\u3000";
+	    }
+	
+	      public boolean matches(char c) {
+	        switch (c) {
+	          case '\t':
+	          case '\n':
+	          case '\013':
+	          case '\f':
+	          case '\r':
+	          case ' ':
+	          case '\u0085':
+	          case '\u1680':
+	          case '\u2028':
+	          case '\u2029':
+	          case '\u205f':
+	          case '\u3000':
+	            return true;
+	          case '\u2007':
+	            return false;
+	          default:
+	          return c >= '\u2000' && c <= '\u200a';
+	      }
+	 }
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputBraces.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputBraces.java
new file mode 100644
index 0000000..762a571
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputBraces.java
@@ -0,0 +1,119 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test case for correct use of braces.
+ * @author Oliver Burn
+ **/
+class InputBraces
+{
+    /** @return helper func **/
+    boolean condition()
+    {
+        return false;
+    }
+
+    /** Test do/while loops **/
+    void testDoWhile()
+    {
+        // Valid
+        do {
+            testDoWhile();
+        }
+        while (condition());
+
+        // Invalid
+        do testDoWhile(); while (condition());
+    }
+
+    /** Test while loops **/
+    void testWhile()
+    {
+        // Valid
+        while (condition()) {
+            testWhile();
+        }
+
+        // Invalid
+        while(condition());
+        while (condition())
+            testWhile();
+        while (condition())
+            if (condition())
+                testWhile();
+    }
+
+    /** Test for loops **/
+    void testFor()
+    {
+        // Valid
+        for (int i = 1; i < 5; i++) {
+            testFor();
+        }
+
+        // Invalid
+        for(int i = 1;i < 5;i++);
+        for (int i = 1; i < 5; i++)
+            testFor();
+        for (int i = 1; i < 5;
+             i++)
+            if (i > 2)
+                testFor();
+    }
+
+    /** Test if constructs **/
+    public void testIf()
+    {
+        // Valid
+        if (condition()) {
+            testIf();
+        }
+        else if (condition()) {
+            testIf();
+        }
+        else {
+            testIf();
+        }
+
+        // Invalid
+        if (condition());
+        if (condition())
+            testIf();
+        if (condition())
+            testIf();
+        else
+            testIf();
+        if (condition())
+            testIf();
+        else {
+            testIf();
+        }
+        if (condition()) {
+            testIf();
+        }
+        else
+            testIf();
+        if (condition())
+            if (condition())
+                testIf();
+    }
+
+    void whitespaceAfterSemi()
+    {
+        //reject
+        int i = 1;int j = 2;
+
+        //accept
+        for (;;) {
+        }
+    }
+
+    /** Empty constructor block. **/
+    public InputBraces() {}
+    
+    /** Empty method block. **/
+    public void emptyImplementation() {}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputCovariant.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputCovariant.java
new file mode 100644
index 0000000..c634728
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputCovariant.java
@@ -0,0 +1,129 @@
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test file for covariant equals methods.
+ * @author Rick Giles
+ */
+public class InputCovariant
+{
+    private class Inner
+    {
+        public boolean equals(Inner aInner)
+        {
+            return false;
+        }
+    }
+
+    private class Inner2
+    {
+        public boolean equals(Inner2 aInner2)
+        {
+            return false;
+        }
+        
+        public boolean equals(Object aObj)
+        {
+            return false;       
+        }
+    }
+
+    public boolean equals(InputCovariant aInputCovariant)
+    {
+        return false;
+    }
+}
+
+class InputCovariant2
+{   
+    public boolean equals(InputCovariant2 aInputCovariant2)
+    {
+        return false;
+    }
+    
+    public boolean equals(Object aObject)
+    {
+        return false;
+    }
+}
+
+class InputCovariant3
+{   
+    public boolean equals(InputCovariant3 aInputCovariant3)
+    {
+        return false;
+    }
+    
+    public boolean equals(java.lang.Object aObject)
+    {
+        return false;
+    }
+}
+
+class InputCovariant4
+{
+    public boolean equals(int i)
+    {
+        return false;
+    }
+}
+
+class Anonymous
+{
+    Comparable comp = new Comparable()
+        {
+            public int compareTo(Object aObject)
+            {
+                return 0;
+            }
+            public boolean equals(String aString)
+            {
+                return false;
+            }
+        };
+    
+    public boolean equals(Object aObject)
+    {
+        return false;
+    }
+    
+    public void method()
+    {
+        Double d = new Double(1);
+    }
+}
+
+abstract class InputCovariant5
+{
+    public abstract boolean equals(InputCovariant4 aInputCovariant4);
+}
+
+interface InputCovariant6
+{
+    public boolean equals(InputCovariant5 aInputCovariant5);
+}
+
+class InputGenericCovariant7
+{
+    public <A> boolean equals(InputGenericCovariant7 aInputCovariant7)
+    {
+        return true;
+    }
+
+    public <A> boolean equals(Object aObject)
+    {
+        return false;
+    }
+}
+
+class InputGenericCovariant8
+{
+    public <A> boolean equals(InputGenericCovariant8 aInputCovariant8)
+    {
+        return true;
+    }
+
+    public boolean equals(Object aObject)
+    {
+        return false;
+    }
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputDesignForExtension.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputDesignForExtension.java
new file mode 100644
index 0000000..6dd163d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputDesignForExtension.java
@@ -0,0 +1,84 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test case for the "design for inheritance" check.
+ * @author Lars K�hne
+ **/
+public abstract class InputDesignForExtension
+{
+    // some methods that are OK
+
+    public interface InterfaceOK
+    {
+        void implicitlyAbstract();
+    }
+
+    final class ClassOK
+    {
+        protected void finalThroughClassDef()
+        {
+            System.out.println("no way to override");
+        }
+    }
+
+    protected void nonFinalButEmpty()
+    {
+    }
+
+    public void nonFinalButEmpty2()
+    {
+        // comments don't count as content...
+    }
+
+    private void aPrivateMethod()
+    {
+        System.out.println("no way to override");
+    }
+
+    protected abstract void nonFinalButAbstract();
+
+    // this one is bad: neither abstract, final, or empty
+
+    protected void doh()
+    {
+        System.out.println("nonempty and overriding possible");
+    }
+
+    // has a potentially complex implementation in native code.
+    // We can't check that, so to be safe DesignForExtension requires
+    // native methods to also be final
+    public native void aNativeMethod();
+
+    // tries to trigger bug #884035
+    // MyComparator is a private class, so there cannot be subclasses
+    // and it should not be neccessary to declare compare() as final
+    private class MyComparator implements java.util.Comparator
+    {
+        public int compare(Object o1, Object o2)
+        {
+            // some complex stuff that would normally trigger an error report
+            if (o1.hashCode() > o2.hashCode()) {
+                return -1;
+            }
+            else {
+                return 1;
+            }
+        }
+    }
+}
+
+// enums should be skipped
+enum TEnum
+{
+    FIRST,
+    SECOND;
+
+    public int value()
+    {
+        return 3;
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputEmptyFile.txt b/src/test/resources/com/puppycrawl/tools/checkstyle/InputEmptyFile.txt
new file mode 100644
index 0000000..e69de29
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputEmptyStatement.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputEmptyStatement.java
new file mode 100644
index 0000000..0083250
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputEmptyStatement.java
@@ -0,0 +1,83 @@
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Input class for testing EmptyStatementCheck
+ * @author Rick Giles
+ * @version 5-May-2003
+ */
+public class InputEmptyStatement
+{
+   public InputEmptyStatement()
+   {
+      ;
+   }
+
+   public void EmptyMethod()
+   {
+      ;
+   }
+
+   public void EmptyStatements(boolean cond)
+   {
+      for (;cond;);
+
+      for (;cond;)
+      {
+         ;
+      }
+
+      if (true);
+
+      if (true)
+      {
+         ;
+      }
+
+      if (cond)
+      {
+         int i;
+      }
+
+      else
+      {
+         ;
+      }
+
+      switch (1)
+      {
+         case 1 :
+            ;
+         default :
+            ;
+      }
+
+      while (cond);
+
+      while (cond)
+      {
+         ;
+      }
+
+      do;
+      while (cond);
+
+      do
+      {
+         ;
+      }
+      while (cond);
+
+      try
+      {
+         ;
+      }
+      catch (Exception ex)
+      {
+         ;
+      }
+      finally
+      {
+         ;
+      }
+   }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputFinalClass.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputFinalClass.java
new file mode 100644
index 0000000..50d4fdd
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputFinalClass.java
@@ -0,0 +1,113 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2003
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+public class InputFinalClass 
+{
+    private InputFinalClass() {}
+}
+
+class test2 {}
+class test3 
+{
+   class test4 
+   {
+       private test4() {}
+   }
+}
+
+class test5
+{
+    private test5() {}
+    test5(int i) {}
+}
+
+class test6 
+{
+    public test6() {}
+}
+
+// Typesafe enum with operation
+// abstract classes cannot be final, see bug #837012
+abstract class Operation
+{
+    abstract double eval(double a, double b);
+    
+    public static final Operation PLUS =
+	new Operation("+")
+	{
+	    double eval(double a, double b)
+	    {
+		return a + b;
+	    }
+	};
+    
+    public static final Operation MINUS =
+	new Operation("-")
+	{
+	    double eval(double a, double b)
+	    {
+		return a - b;
+	    }
+	};
+    
+    private String _name;
+    private Operation(String name)
+    {
+	this._name = name;
+    }
+}
+
+// Typesafe enum with operation
+// abstract classes cannot be final, see bug #837012
+interface Evaluatable
+{
+    double eval(double a, double b);
+}
+
+// abstract class without it's own abstract method decl
+abstract class Operation2 implements Evaluatable 
+{
+    
+    public static final Operation2 PLUS =
+	new Operation2("+")
+	{
+	    public double eval(double a, double b)
+	    {
+		return a + b;
+	    }
+	};
+    
+    public static final Operation2 MINUS =
+	new Operation2("-")
+	{
+	    public double eval(double a, double b)
+	    {
+		return a - b;
+	    }
+	};
+    
+    private String _name;
+    private Operation2(String name)
+    {
+	this._name = name;
+    }
+}
+
+enum testenum1
+{
+    A, B;
+    testenum1() {}
+}
+
+enum testenum2
+{
+    A, B;
+
+    public static class someinnerClass
+    {
+        private someinnerClass() {}
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputFinalParameters.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputFinalParameters.java
new file mode 100644
index 0000000..6b8badf
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputFinalParameters.java
@@ -0,0 +1,175 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2003
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import java.awt.event.ActionEvent;
+
+/**
+ * Test case for detecting missing final parameters.
+ * @author Lars K�hne
+ **/
+class InputFinalParameters
+{
+    /** no param constructor */
+    InputFinalParameters()
+    {
+    }
+
+    /** non final param constructor */
+    InputFinalParameters(String s)
+    {
+    }
+
+    /** non final param constructor */
+    InputFinalParameters(final Integer i)
+    {
+    }
+
+    /** final param constructor with annotation */
+    InputFinalParameters(final @MyAnnotation3 Class i)
+    {
+    }
+
+    /** non-final param constructor with annotation*/
+    InputFinalParameters(@MyAnnotation3 Boolean i)
+    {
+    }
+
+    /** mixed */
+    InputFinalParameters(String s, final Integer i)
+    {
+    }
+
+    /** no param method */
+    void method()
+    {
+    }
+
+    /** non final param method */
+    void method(String s)
+    {
+    }
+
+    /** final param method */
+    void method(final Integer i)
+    {
+    }
+
+    /** final param method with annotation **/
+    void method(@MyAnnotation3 final Object s)
+    {
+
+    }
+
+    /** non-final param method with annotation **/
+    void method(@MyAnnotation3 Class s)
+    {
+
+    }
+
+    /** mixed */
+    void method(String s, final Integer i)
+    {
+    }
+
+    /** interface methods should not be flagged. */
+    interface TestInterface
+    {
+        void method(String s);
+    }
+
+    /** methods in anonymous inner classes */
+    void holder()
+    {
+        Action a = new AbstractAction()
+            {
+                public void actionPerformed(ActionEvent e)
+                {
+                }
+                void somethingElse(@MyAnnotation3 ActionEvent e)
+                {
+                }
+            };
+
+        Action b = new AbstractAction()
+            {
+                public void actionPerformed(final ActionEvent e)
+                {
+                }
+                void somethingElse(@MyAnnotation3 final ActionEvent e)
+                {
+                }
+            };
+    }
+
+    /** methods with complicated types of the parameters. */
+    void methodA(java.lang.String aParam) {
+    }
+
+    void methodB(String[] args) {
+    }
+
+    void methodC(java.lang.String[] args) {
+    }
+
+    /** some catch blocks */
+    void method1()
+    {
+        try {
+            System.err.println("");
+        }
+        catch (java.lang.NullPointerException npe) {
+            npe.printStackTrace();
+        }
+        catch (@MyAnnotation3 final ClassCastException e) {
+            e.printStackTrace();
+        }
+        catch (RuntimeException e) {
+            e.printStackTrace();
+        }
+        catch (@MyAnnotation3 NoClassDefFoundError e) {
+            e.printStackTrace();
+        }
+    }
+}
+
+abstract class AbstractClass
+{
+    public abstract void abstractMethod(int aParam);
+}
+
+class Foo
+{
+    /* Some for-each clauses */
+    public void Bar()
+    {
+        for(String s : someExpression())
+        {
+
+        }
+        for(final String s : someExpression())
+        {
+
+        }
+        for(@MyAnnotation3 String s : someExpression())
+        {
+
+        }
+        for(@MyAnnotation3 final String s : someExpression())
+        {
+
+        }
+    }
+
+    private String[] someExpression()
+    {
+        return null;
+    }
+}
+
+ at interface MyAnnotation3 {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputForWhitespace.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputForWhitespace.java
new file mode 100644
index 0000000..0c1a2d8
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputForWhitespace.java
@@ -0,0 +1,54 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for FOR_ITERATION and whitespace.
+// Created: 2003
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+class InputForWhitespace
+{
+    void method1()
+    {
+        for (int i = 0; i < 1; i++) {
+        }
+        
+        for (int i = 0; i < 1;i++) {
+        }
+
+        for (int i = 0; i < 1;i++ ) {
+        }
+
+        for (int i = 0; i < 1; i++ ) {
+        }
+
+        for (int i = 0; i < 1;) {
+            i++;
+        }
+
+        for (int i = 0; i < 1; ) {
+            i++;
+        }
+        
+        // test eol, there is no space after second SEMI
+        for (int i = 0; i < 1;
+            ) {
+            i++;
+        }
+    }
+
+    void method2()
+    {
+        for ( int i = 0; i < 1; i++ ) {
+        }
+        
+        for ( int i = 0; i < 1; ) {
+            i++;
+        }
+
+        int i = 0;
+        for ( ; i < 1; i++ ) {
+        }
+
+        for (; i < 2; i++ ) {
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputGenerics.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputGenerics.java
new file mode 100644
index 0000000..0361c0f
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputGenerics.java
@@ -0,0 +1,30 @@
+package com.puppycrawl.tools.checkstyle;
+
+import java.util.Collection;
+import java.util.Map;
+
+public class InputGenerics<A, B extends Collection<?>, C extends D&E, F extends Collection<? extends InputGenerics[]>>
+{
+}
+
+//No whitespace after commas
+class BadCommas < A,B,C extends Map < A,String > >
+{
+    private java.util.Hashtable < Integer, D > p =
+        new java.util.Hashtable < Integer, D > ();
+}
+
+class Wildcard
+{
+    public static void foo(Collection < ? extends Wildcard[] > collection) {
+        // A statement is important in this method to flush out any
+        // issues with parsing the wildcard in the signature
+        collection.size();
+    }
+}
+
+// we need these interfaces for generics
+interface D {
+}
+interface E {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputHiddenField.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputHiddenField.java
new file mode 100644
index 0000000..9d16bfd
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputHiddenField.java
@@ -0,0 +1,239 @@
+package com.puppycrawl.tools.checkstyle;
+
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2002
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Test case for hidden fields
+ * @author Rick Giles
+ **/
+class InputHiddenField
+{
+    private int hidden = 0;
+    
+    public InputHiddenField()
+    {
+        int hidden = 0; //shadows field
+    }
+    
+    public InputHiddenField(int hidden) //parameter shadows field
+    {
+    }
+    
+    public void shadow()
+    {
+        int hidden = 0; //shadows field
+    }
+    
+    public void shadowFor()
+    {
+        for (int hidden = 0; hidden < 1; hidden++) { //shadows field
+        }
+    }
+    
+    public void shadowParam(int hidden) //parameter shadows field
+    {
+    }
+    
+    public class Inner
+    {
+        private int innerHidden = 0;
+        
+        public Inner()
+        {
+            int innerHidden = 0; //shadows field
+        }
+    
+        public Inner(int innerHidden) //shadows field
+        {
+        }
+        
+        private void innerShadow()
+        {
+            int innerHidden = 0; //shadows inner field
+            int hidden = 0; //shadows outer field
+        }
+        
+        private void innerShadowFor()
+        {
+            for (int innerHidden = 0; innerHidden < 1; innerHidden++) {
+            }
+            //shadows outer field
+            for (int hidden = 0; hidden < 1; hidden++) {
+            }
+        }
+        
+        private void shadowParam(
+            int innerHidden, //parameter shadows inner field
+            int hidden //parameter shadows outer field
+        )
+        {
+        }
+        
+        {
+            int innerHidden = 0;//shadows inner field
+            int hidden = 0; //shadows outer field
+        }
+    }
+
+    {
+        int hidden = 0;//shadows field
+    }       
+}
+    
+interface NothingHidden
+{
+    public static int notHidden = 0;
+    
+    // not an error
+    public void noShadow(int notHidden);
+}
+
+/** tests ignoring the parameter of a property setter method */
+class PropertySetter
+{
+    private int prop;
+    
+    /** setter */
+    public void setProp(int prop)
+    {
+        this.prop = prop;
+    }
+
+    /** error - incorrect method name */
+    public void setprop(int prop)
+    {
+        this.prop = prop;
+    }
+
+    /** error - more than one parameter */
+    public void setProp(int prop, int extra)
+    {
+        this.prop = prop;
+    }
+}
+
+/** tests a non-void method */
+class PropertySetter2
+{
+    private int prop;
+    
+    /** error - not a void method */
+    public int setProp(int prop)
+    {
+        this.prop = prop;
+        return 0;
+    }
+}
+
+/** tests for static fields */
+class StaticFields
+{
+    private static int hidden;
+    
+    public static void staticMethod()
+    {
+        int hidden;
+    }
+    
+    public void method()
+    {
+        int hidden;
+    }
+    
+    static
+    {
+        int hidden;
+    }
+    
+    {
+        int hidden;
+    }
+}
+
+/** tests static methods & initializers */
+class StaticMethods
+{
+    private int notHidden;
+    
+    public static void method()
+    {
+        // local variables of static methods don't hide instance fields.
+        int notHidden;
+    }
+    
+    static
+    {
+        // local variables of static initializers don't hide instance fields.
+        int notHidden;
+    }
+
+    private int x;
+    private static int y;
+    static class Inner {
+        void useX(int x) {
+            x++;
+        }
+        void useY(int y) {
+            y++;
+        }
+    }
+}
+
+enum HiddenEnum
+{
+    A(129),
+    B(283),
+    C(1212)
+    {
+        /**
+         * Should not be flagged as error as we don't check
+         * hidden class level fields
+         */
+        int hidden;
+
+        public void doSomething()
+        {
+            //Should be flagged as hiding enum constant member
+            int hidden = 0;
+        }
+    };
+
+    int hidden;
+    static int hiddenStatic;
+
+    /**
+     * ctor parameter hides member
+     */
+    HiddenEnum(int hidden)
+    {
+    }
+
+    public void doSomething()
+    {
+        //Should be flagged as hiding static member
+        int hidden = 0;
+    }
+
+    public static void doSomethingStatic()
+    {
+        //Should be flagged as hiding static member
+        int hiddenStatic = 0;
+    }
+}
+
+// we should ignore this if user wants (ignoreAbstractMethods is true)
+abstract class InputHiddenFieldBug1084512 {
+    String x;
+    public abstract void methodA(String x);
+}
+
+class Bug3370946 {
+    private int xAxis;
+
+    public void setxAxis(int xAxis) {
+        this.xAxis = xAxis;
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputHiddenFieldReorder.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputHiddenFieldReorder.java
new file mode 100644
index 0000000..c1193c5
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputHiddenFieldReorder.java
@@ -0,0 +1,136 @@
+package com.puppycrawl.tools.checkstyle;
+
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2002
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Test case for hidden fields
+ * @author Rick Giles
+ **/
+class InputHiddenFieldReorder
+{
+
+    
+    public InputHiddenFieldReorder()
+    {
+        int hidden = 0; //shadows field
+    }
+    
+    public InputHiddenFieldReorder(int hidden) //parameter shadows field
+    {
+    }
+    
+    public void shadow()
+    {
+        int hidden = 0; //shadows field
+    }
+    
+    public void shadowFor()
+    {
+        for (int hidden = 0; hidden < 1; hidden++) { //shadows field
+        }
+    }
+    
+    public void shadowParam(int hidden) //parameter shadows field
+    {
+    }
+    
+    public class Inner
+    {
+//        private int innerHidden = 0;
+        
+        public Inner()
+        {
+            int innerHidden = 0; //shadows field
+        }
+    
+        public Inner(int innerHidden) //shadows field
+        {
+        }
+        
+        private void innerShadow()
+        {
+            int innerHidden = 0; //shadows inner field
+            int hidden = 0; //shadows outer field
+        }
+        
+        private void innerShadowFor()
+        {
+            for (int innerHidden = 0; innerHidden < 1; innerHidden++) {
+            }
+            //shadows outer field
+            for (int hidden = 0; hidden < 1; hidden++) {
+            }
+        }
+        
+        private void shadowParam(
+            int innerHidden, //parameter shadows inner field
+            int hidden //parameter shadows outer field
+        )
+        {
+        }
+        
+        {
+            int innerHidden = 0;//shadows inner field
+            int hidden = 0; //shadows outer field
+        }
+        private int innerHidden = 0;
+    }
+
+    {
+        int hidden = 0;//shadows field
+    }
+    private int hidden = 0;       
+}
+    
+interface NothingHiddenReorder
+{
+    public static int notHidden = 0;
+    
+    // not an error
+    public void noShadow(int notHidden);
+}
+
+enum HiddenEnum1
+{
+    A(129),
+    B(283),
+    C(1212)
+    {
+        public void doSomething()
+        {
+            //Should be flagged as hiding enum constant member
+            int hidden = 0;
+        }
+
+        /**
+         * Should not be flagged as error as we don't check
+         * hidden class level fields
+         */
+        int hidden;
+    };
+
+    /**
+     * ctor parameter hides member
+     */
+    HiddenEnum1(int hidden)
+    {
+    }
+
+    public void doSomething()
+    {
+        //Should be flagged as hiding static member
+        int hidden = 0;
+    }
+
+    public static void doSomethingStatic()
+    {
+        //Should be flagged as hiding static member
+        int hiddenStatic = 0;
+    }
+
+    int hidden;
+    static int hiddenStatic;
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputIllegalTokens.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputIllegalTokens.java
new file mode 100644
index 0000000..f1a01ff
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputIllegalTokens.java
@@ -0,0 +1,27 @@
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test for illegal tokens
+ */
+public class InputIllegalTokens
+{
+    public void defaultMethod()
+    {
+        int i = 0;
+        switch (i)
+        {
+            default:
+                i--;
+                i++;
+                break;
+        }
+    }
+    
+    public native void nativeMethod();
+    
+    public void methodWithLiterals()
+    {
+        final String ref = "<a href=\"";
+        final String refCase = "<A hReF=\"";
+    }
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputInner.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputInner.java
new file mode 100644
index 0000000..7215db9
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputInner.java
@@ -0,0 +1,79 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Tests having inner types
+ * @author Oliver Burn
+ **/
+class InputInner
+{
+    // Ignore - two errors
+    class InnerInner2
+    {
+        // Ignore
+        public int fData;
+    }
+
+    // Ignore - 2 errors
+    interface InnerInterface2
+    {
+        // Ignore - should be all upper case
+        String data = "zxzc";
+
+        // Ignore
+        class InnerInterfaceInnerClass
+        {
+            // Ignore - need Javadoc and made private
+            public int rData;
+
+            /** needs to be made private unless allowProtected. */
+            protected int protectedVariable;
+
+            /** needs to be made private unless allowPackage. */
+            int packageVariable;
+        }
+    }
+
+    /** demonstrate bug in handling static final **/
+    protected static Object sWeird = new Object();
+    /** demonstrate bug in handling static final **/
+    static Object sWeird2 = new Object();
+    
+    /** demonstrate bug in local final variable */
+    public interface Inter
+    {
+    }
+    
+     public static void main()
+     {
+        Inter m = new Inter()
+        {
+            private static final int CDS = 1;
+            
+            private int ABC;
+        };
+     }
+
+    /** annotation field incorrectly named. */
+    @interface InnerAnnotation
+    {
+        /** Ignore - should be all upper case. */
+        String data = "zxzc";
+    }
+
+    /** enum with public member variable */
+    enum InnerEnum
+    {
+        /** First constant */
+        A,
+
+        /** Second constant */
+        B;
+
+        /** Should be private */
+        public int someValue;
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputInterfaceIsType.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputInterfaceIsType.java
new file mode 100644
index 0000000..d8a2b23
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputInterfaceIsType.java
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test input for InterfaceIsTypeCheck
+ * @author lkuehne
+ **/
+class InputInterfaceIsType
+{
+    // OK, has method, so is a type
+    interface OK
+    {
+        void method();
+    }
+
+    // Marker interface, OK for some configurations
+    interface Marker
+    {
+    }
+
+    // Always flagged
+    interface ConstantPool
+    {
+        boolean BAD = true;
+    }
+
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputJavadoc.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputJavadoc.java
new file mode 100644
index 0000000..af42ac6
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputJavadoc.java
@@ -0,0 +1,114 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Testing  author and version tag patterns
+ ****    @author Oliver Burn
+ * @version 1.0
+ */
+class InputJavadoc
+{
+}
+
+/**
+ * Testing  author and version tag patterns (there are not tags :)
+ * SomeText @author Oliver Burn
+ * *@version 1.0
+ */
+class InputJavadoc1
+{
+}
+
+/**
+ * Testing  author and version tag patterns.
+ * tags are multi line ones
+ * @author Oliver Burn
+ * @version 1.0 */
+class InputJavadoc2
+{
+}
+
+//Testing tag on first comment line
+/**
+* @author ABC
+* @version 1.1
+*/
+class InputJavadocType
+{
+}
+
+/**
+ * Testing  author and version tag patterns
+ ****    @author Oliver Burn
+ * @version 1.0
+ */
+enum InputJavadocEnum
+{
+}
+
+/**
+ * Testing  author and version tag patterns (there are not tags :)
+ * SomeText @author Oliver Burn
+ * *@version 1.0
+ */
+enum InputJavadocEnum1
+{
+}
+
+/**
+ * Testing  author and version tag patterns.
+ * tags are multi line ones
+ * @author Oliver Burn
+ * @version 1.0 */
+enum InputJavadocEnum2
+{
+}
+
+//Testing tag on first comment line
+/**
+* @author ABC
+* @version 1.1
+*/
+ at interface InputJavadocInterfaceType
+{
+}
+
+/**
+ * Testing  author and version tag patterns
+ ****    @author Oliver Burn
+ * @version 1.0
+ */
+ at interface InputJavadocInterface
+{
+}
+
+/**
+ * Testing  author and version tag patterns (there are not tags :)
+ * SomeText @author Oliver Burn
+ * *@version 1.0
+ */
+ at interface InputJavadocInterface1
+{
+}
+
+/**
+ * Testing  author and version tag patterns.
+ * tags are multi line ones
+ * @author Oliver Burn
+ * @version 1.0 */
+ at interface InputJavadocInterface2
+{
+}
+
+//Testing tag on first comment line
+/**
+* @author ABC
+* @version 1.1
+*/
+ at interface InputJavadocInterfaceType1
+{
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputJavadocStyleCheck.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputJavadocStyleCheck.java
new file mode 100644
index 0000000..5d4f67a
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputJavadocStyleCheck.java
@@ -0,0 +1,341 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2003
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test input for the JavadocStyleCheck.  This check is used to perform 
+ * some additional Javadoc validations.  
+ * 
+ * @author Chris Stillwell
+ * @version 1.0
+ */
+public class InputJavadocStyleCheck
+{
+   // This is OK. We don't flag missing javadoc.  That's left for other checks.
+   private String first;
+   
+   /** This Javadoc is missing an ending period */
+   private String second;
+   
+   /**
+    * We don't want {@link com.puppycrawl.tools.checkstyle.checks.JavadocStyleCheck} 
+    * tags to stop the scan for the end of sentence. 
+    * @see Somthing
+    */
+   public InputJavadocStyleCheck()
+   {
+   }
+   
+   /**
+    * This is ok!
+    */
+   private void method1()
+   {
+   }
+   
+   /**
+    * This is ok?
+    */
+   private void method2()
+   {
+   }
+   
+   /**
+    * And This is ok.<br>
+    */
+   private void method3()
+   {
+   }
+   
+   /**
+    * This should fail even.though.there are embedded periods
+    */
+   private void method4()
+   {
+   }
+   
+   /**
+    * Test HTML in Javadoc comment
+    * <dl>
+    * <dt><b>This guy is missing end of bold tag
+    * <dd>The dt and dd don't require end tags.
+    * </dl>
+    * </td>Extra tag shouldn't be here
+    * 
+    * @param arg1 <code>dummy.
+    */
+   private void method5(int arg1)
+   {
+   }
+   
+   /**
+    * Protected check <b>should fail
+    */
+   protected void method6()
+   {
+   }
+   
+   /**
+    * Package protected check <b>should fail
+    */
+   void method7()
+   {
+   }
+   
+   /**
+    * Public check should fail</code>
+    * should fail <
+    */
+   public void method8()
+   {
+   }
+   
+   /** {@inheritDoc} **/
+   public void method9()
+   {
+   }
+
+    
+    // Testcases to excercize the Tag parser (bug 843887)
+
+    /**
+     * Real men don't use XHTML.
+     * <br />
+     * <hr/>
+     * < br/>
+     * <img src="schattenparker.jpg"/></img>
+     */
+    private void method10()
+    { // </img> should be the only error
+    }
+
+    /**
+     * Tag content can be really mean.
+     * <p>
+     * Sometimes a p tag is closed.
+     * </p>
+     * <p>
+     * Sometimes it's not.
+     * 
+     * <span style="font-family:'Times New Roman',Times,serif;font-size:200%">
+     * Attributes can contain spaces and nested quotes.
+     * </span>
+     * <img src="slashesCanOccurWithin/attributes.jpg"/>
+     * <img src="slashesCanOccurWithin/attributes.jpg">
+     * <!-- comments <div> should not be checked. -->
+     */
+    private void method11()
+    { // JavadocStyle should not report any error for this method
+    }
+
+    /**
+     * Tags for two lines.
+     * <a href="some_link"
+     * >Link Text</a>
+     */
+    private void method12()
+    {// JavadocStyle should not report any error for this method
+    }
+
+    /**
+     * First sentence.
+     * <pre>
+     * +--LITERAL_DO (do)
+     *     |
+     *     +--SLIST ({)
+     *         |
+     *         +--EXPR
+     *             |
+     *             +--ASSIGN (=)
+     *                 |
+     *                 +--IDENT (x)
+     *                 +--METHOD_CALL (()
+     *                     |
+     *                     +--DOT (.)
+     *                         |
+     *                         +--IDENT (rand)
+     *                         +--IDENT (nextInt)
+     *                     +--ELIST
+     *                         |
+     *                         +--EXPR
+     *                             |
+     *                             +--NUM_INT (10)
+     *                     +--RPAREN ())
+     *         +--SEMI (;)
+     *         +--RCURLY (})
+     *     +--LPAREN (()
+     *     +--EXPR
+     *         |
+     *         +--LT (<)
+     *             |
+     *             +--IDENT (x)
+     *             +--NUM_INT (5)
+     *     +--RPAREN ())
+     *     +--SEMI (;)
+     * </pre>
+     */
+    private void method13()
+    {// JavadocStyle should not report any error for this method
+    }
+
+    /**
+     * Some problematic javadoc. Sample usage:
+     * <blockquote>
+     */
+
+    private void method14()
+    { // empty line between javadoc and method is critical (bug 841942)
+    }
+
+    /**
+     * Empty line between javadoc and method declaration cause wrong
+     * line number for reporting error (bug 841942)
+     */
+
+    private void method15()
+    { // should report unended first sentance (check line number of the error)
+    }
+
+    /** Description of field: {@value}. */
+    public static final int dummy = 4911;
+
+    /**
+     */
+    public void method16()
+    { // should report empty javadoc
+    }
+
+    /**
+     * @param a A parameter
+     */
+    protected void method17(String a)
+    { // should report empty javadoc (no text before parameter)
+    }
+
+    /**
+     * @exception RuntimeException shoul be thrown
+     */
+    void method18(String a)
+    { // should report empty javadoc (no text before exception)
+    }
+
+    /** 
+     */
+    private static int ASDF = 0;
+    // should report empty javdoc
+
+    /** @see java.lang.Object */
+    public void method19()
+    {  // should report empty javadoc (no text before see tag)
+    }
+
+    public enum Test
+        //Should complain about no javadoc
+    {
+        /**
+         * Value 1 without a period
+         */
+        value1,
+
+        /**
+         * Value 2 with a period.
+         */
+        value2,
+    }
+
+    /**
+    * A test class.
+    * @param <T1> this is NOT an unclosed T1 tag
+    * @param <KEY_T> for bug 1649020.
+    * @author <a href="mailto:foo at nomail.com">Foo Bar</a>
+    */
+    public class TestClass<T1, KEY_T>
+    {
+        /**
+        * Retrieves X.
+        * @return a value
+        */
+        public T1 getX()
+        {
+            return null;
+        }
+
+        /**
+        * Retrieves Y.
+        * @param <V> this is not an unclosed V tag
+        * @return a value
+        */
+        public <V> V getY()
+        {
+            return null;
+        }
+        
+        /**
+         * Retrieves Z.
+         * 
+         * @param <KEY_T1> this is not an unclosed KEY_T tag
+         * @return a value
+         */
+        public <KEY_T1> KEY_T getZ_1649020_1()
+        {
+            return null;
+        }
+        
+        /**
+         * Retrieves something.
+         * 
+         * @param <KEY_T_$_1_t> strange type
+         * @return a value
+         */
+        public <KEY_T_$_1_t> KEY_T_$_1_t getEh_1649020_2() {
+            return null;
+        }
+        
+        /**
+         * Retrieves more something.
+         * 
+         * @param <$_12_xY_z> strange type
+         * @return a value
+         */
+        public <$_12_xY_z> $_12_xY_z getUmmm_1649020_3() {
+            return null;
+        }
+    }
+
+    /**
+     * Checks if the specified IClass needs to be
+     * annotated with the @Type annotation.
+     */
+    public void foo_1291847_1() {
+    }
+
+    /**
+     * Returns the string containing the properties of
+     * <code>@Type</code> annotation.
+     */
+    public void foo_1291847_2() {
+    }
+
+		/**
+		 * Checks generics javadoc.
+		 * 
+		 * @param strings this is a List<String>
+		 * @param test Map<String, List<String>> a map indexed on String of Lists of Strings.
+		 */
+		public void method20() {
+		}
+
+		/**
+		 * Checks HTML tags in javadoc.
+		 * 
+		 * HTML no good tag
+		 * <string>Tests</string>
+		 *
+		 */
+		public void method21() {
+		}
+
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputJavadocStyleCheckHtmlComment.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputJavadocStyleCheckHtmlComment.java
new file mode 100644
index 0000000..74b8aa6
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputJavadocStyleCheckHtmlComment.java
@@ -0,0 +1,77 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2014
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test input for the JavadocStyleCheck.  This check is used to perform 
+ * some additional Javadoc validations.  
+ * 
+ * @author Tobias Geyer
+ * @version 1.0
+ */
+public class InputJavadocStyleCheckHtmlComment
+{
+    /**
+     * sometimes a tag starts
+     * <pre>
+     * somewhere and has a comment in the middle
+     * <!-- ignore this -->
+     * and ends afterwards
+     * </pre>
+     */
+    private void method1()
+    { // JavadocStyle should not report any error for this method
+    }
+
+    /**
+     * sometimes a tag starts
+     * <pre>
+     * somewhere and has a multiline comment in the middle
+     * <!-- ignore this 
+     * spanning
+     * multiple lines -->
+     * and ends afterwards
+     * </pre>
+     */
+    private void method2()
+    { // JavadocStyle should not report any error for this method
+    }
+
+    /**
+     * sometimes a tag starts
+     * <pre>
+     * somewhere and has a multiline comment in the middle
+     * <!-- ignore this 
+     * spanning
+     * multiple lines --></pre>
+     * and ends on the same line
+     */
+    private void method3()
+    { // JavadocStyle should not report any error for this method
+    }
+    
+    /**
+     * sometimes a tag starts
+     * <pre>
+     * somewhere and has a comment in the middle
+     * <!-- ignore this --> with text following
+     * and ends afterwards
+     * </pre>
+     */
+    private void method4()
+    { // JavadocStyle should not report any error for this method
+    }
+    
+    /**
+     * sometimes a tag starts
+     * <pre><!-- ignore this --></pre>
+     * and ends with a comment in the middle
+     */
+    private void method5()
+    { // JavadocStyle should not report any error for this method
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputLeftCurlyAnnotations.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputLeftCurlyAnnotations.java
new file mode 100644
index 0000000..03429a0
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputLeftCurlyAnnotations.java
@@ -0,0 +1,59 @@
+package com.puppycrawl.tools.checkstyle;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.ArrayList;
+import java.util.List;
+
+ at TestClassAnnotation
+class InputLeftCurlyAnnotations 
+{
+    private static final int X = 10;
+    @Override
+    public boolean equals(Object other)
+    {
+        return false;
+    }
+    
+    @Override
+    @SuppressWarnings("unused")
+    public int hashCode() 
+    {
+        int a = 10;
+        return 1;
+    }
+    
+    @Override @SuppressWarnings({"unused", "unchecked", "static-access"}) public String toString()
+    {
+        Integer i = this.X;
+        List<String> l = new ArrayList();
+        return "SomeString";
+    }
+}
+
+ at TestClassAnnotation
+class InputLeftCurlyAnnotations2 {
+    private static final int X = 10;
+    @Override
+    public boolean equals(Object other) {
+        return false;
+    }
+    
+    @Override
+    @SuppressWarnings("unused")
+    public int hashCode() {
+        int a = 10;
+        return 1;
+    }
+    
+    @Override @SuppressWarnings({"unused", "unchecked", "static-access"}) public String toString()
+    {
+        Integer i = this.X;
+        List<String> l = new ArrayList();
+        return "SomeString";
+    }
+}
+
+ at Target(ElementType.TYPE)
+ at interface TestClassAnnotation {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputLeftCurlyLineBreakAfter.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputLeftCurlyLineBreakAfter.java
new file mode 100644
index 0000000..7aa6d75
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputLeftCurlyLineBreakAfter.java
@@ -0,0 +1,72 @@
+package com.puppycrawl.tools.checkstyle;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.ArrayList;
+import java.util.List;
+
+class InputLeftCurlyOther
+{
+    /** @see test method **/
+    int foo() throws InterruptedException
+    {
+        int x = 1;
+        int a = 2;
+        while (true)
+        {
+            try
+            {
+                if (x > 0)
+                {
+                    break;
+                }
+                else if (x < 0) {
+                    ;
+                }
+                else { break; }
+                switch (a)
+                {
+                case 0:
+                    break;
+                default:
+                    break;
+                }
+            }
+            catch (Exception e) { break; }
+            finally { break; }
+        }
+
+        synchronized (this) { do { x = 2; } while (x == 2); }
+        
+        synchronized (this) {
+            do {} while (x == 2);
+        }
+
+        for (int k = 0; k < 1; k++) { String innerBlockVariable = ""; }
+
+        for (int k = 0; k < 1; k++) {}
+    }
+
+    static { int x = 1; }
+
+    void method2()
+    {
+        if (flag) { System.err.println("foo"); }
+    }
+}
+
+class Absent_CustomFieldSerializer {
+
+    public static void serialize() {} 
+}
+
+class Absent_CustomFieldSerializer
+{
+    public Absent_CustomFieldSerializer() {}
+}
+
+class EmptyClass {}
+
+interface EmptyInterface {}
+
+enum KnownOrder { KNOWN_ORDER, UNKNOWN_ORDER }
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputLeftCurlyMethod.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputLeftCurlyMethod.java
new file mode 100644
index 0000000..576c1bc
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputLeftCurlyMethod.java
@@ -0,0 +1,90 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test case for correct use of braces.
+ * @author Oliver Burn
+ **/
+class InputLeftCurlyMethod
+{
+    InputLeftCurlyMethod() {}
+    InputLeftCurlyMethod(String aOne) {
+    }
+    InputLeftCurlyMethod(int aOne)
+    {
+    }
+
+    void method1() {}
+    void method2() {
+    }
+    void method3()
+    {
+    }
+    void                                                               method4()
+    {
+    }
+    void method5(String aOne,
+                 String aTwo)
+    {
+    }
+    void method6(String aOne,
+                 String aTwo) {
+    }
+}
+
+enum InputLeftCurlyMethodEnum
+{
+    CONSTANT1("hello")
+    {
+        void method1() {}
+        void method2() {
+        }
+        void method3()
+        {
+        }
+        void                                                               method4()
+        {
+        }
+        void method5(String aOne,
+                     String aTwo)
+        {
+        }
+        void method6(String aOne,
+                     String aTwo) {
+        }
+    },
+
+    CONSTANT2("hello") {
+
+    },
+    
+    CONSTANT3("hellohellohellohellohellohellohellohellohellohellohellohellohellohello")
+    {
+    };
+
+    private InputLeftCurlyMethodEnum(String value)
+    {
+
+    }
+
+    void method1() {}
+    void method2() {
+    }
+    void method3()
+    {
+    }
+    void                                                               method4()
+    {
+    }
+    void method5(String aOne,
+                 String aTwo)
+    {
+    }
+    void method6(String aOne,
+                 String aTwo) {
+    }
+}
+
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputLeftCurlyOther.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputLeftCurlyOther.java
new file mode 100644
index 0000000..f05dba9
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputLeftCurlyOther.java
@@ -0,0 +1,154 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test case for correct use of braces.
+ * @author Oliver Burn
+ **/
+class InputLeftCurlyOther
+{
+    /** @see test method **/
+    int foo() throws InterruptedException
+    {
+        int x = 1;
+        int a = 2;
+        while (true)
+        {
+            try
+            {
+                if (x > 0)
+                {
+                    break;
+                }
+                else if (x < 0) {
+                    ;
+                }
+                else
+                {
+                    break;
+                }
+                switch (a)
+                {
+                case 0:
+                    break;
+                default:
+                    break;
+                }
+            }
+            catch (Exception e)
+            {
+                break;
+            }
+            finally
+            {
+                break;
+            }
+        }
+
+        synchronized (this)
+        {
+            do
+            {
+                x = 2;
+            } while (x == 2);
+        }
+
+        this.wait(666
+                 ); // Bizarre, but legal
+
+        for (int k = 0; k < 1; k++)
+        {
+            String innerBlockVariable = "";
+        }
+
+        // test input for bug reported by Joe Comuzzi
+        if (System.currentTimeMillis() > 1000)
+            return 1;
+        else
+            return 2;
+    }
+
+    // Test static initialiser
+    static
+    {
+        int x = 1; // should not require any javadoc
+    }
+
+
+
+    public enum GreetingsEnum
+    {
+        HELLO,
+        GOODBYE
+    };
+
+    void method2()
+    {
+        boolean flag = true;
+        if (flag) {
+            System.out.println("heh");
+            flag = !flag; } System.err.
+              println("Xe-xe");
+        // it is ok to have rcurly on the same line as previous
+        // statement if lcurly on the same line.
+        if (flag) { System.err.println("it is ok."); }
+    }
+}
+
+/**
+ * Test input for closing brace if that brace terminates 
+ * a statement or the body of a constructor. 
+ */
+class FooCtor
+{
+	int i;
+	public Foo()
+	{
+		i = 1;
+	}}
+
+/**
+* Test input for closing brace if that brace terminates 
+* a statement or the body of a method. 
+*/
+class FooMethod
+{
+	public void fooMethod()
+	{
+		int i = 1;
+	}}
+
+/**
+* Test input for closing brace if that brace terminates 
+* a statement or the body of a named class. 
+*/
+class FooInner
+{
+	class InnerFoo
+	{
+		public void fooInnerMethod ()
+		{
+			
+		}
+	}}
+
+/**
+ * False positive 
+ *
+ */
+class Absent_CustomFieldSerializer {
+
+    public static void serialize() {} //false positive. Expected nothing but was "'}' should be alone on a line." 
+}
+
+class Absent_CustomFieldSerializer
+{
+    public Absent_CustomFieldSerializer() {}
+}
+
+class EmptyClass {}
+
+interface EmptyInterface {}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputLineBreaks.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputLineBreaks.java
new file mode 100644
index 0000000..4ae669d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputLineBreaks.java
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2009
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test case for dealing with various line termination schemes.
+ * @author Martin von Gagern
+ **/
+class InputLineBreaks
+{
+    int firstLine;
+    int cr;
+    int oneQuearter;
+    int crlf;
+    int middleLine;
+    int lfcr;
+
+    int threeQuarters;
+    int cr2;
+    int lastLine;
+}
+/* When splitting on \r\n, \r and \n, the lines should be numbered thus:
+     13     int firstLine;\n
+     14     int cr;\r
+     15     int oneQuearter;\n
+     16     int crlf;\r\n
+     17     int middleLine;\n
+     18     int lfcr;\n
+     19 \r
+     20     int threeQuarters;\n
+     21     int cr2;\r
+     22     int lastLine;\n
+*/
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputMagicNumber.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputMagicNumber.java
new file mode 100644
index 0000000..3674b57
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputMagicNumber.java
@@ -0,0 +1,189 @@
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Describe class InputMagicNumber
+ * @author Rick Giles
+ * @version 6-May-2003
+ */
+public class InputMagicNumber {
+    public void magicMethod() {
+        //constants, ignore
+        final int INT_CONST = 101_000;
+        final long LONG_CONST1 = 100_000L;
+        final long LONG_CONST2 = 100l;
+        final float FLOAT_CONST1 = 1.500_0F;
+        final float FLOAT_CONST2 = 1.5f;
+        final double DOUBLE_CONST1 = 1.500_0D;
+        final double DOUBLE_CONST2 = 1.5d;
+        final double DOUBLE_CONST3 = 1.5;
+
+        //ignore by default
+        int int_var1 = 1;
+        int int_var2 = (2);
+        long long_var1 = 0L;
+        long long_var2 = 0l;
+        double double_var1 = 0D;
+        double double_var2 = 0d;
+
+        int[] int_array = new int[2];
+
+        int_var1 = 1 + 2;
+        int_var1 += 1;
+        double_var1 = 1.0 + 2.0;
+
+        for (int i = 0; i < 2; i++);
+
+        if (1 < 2);
+
+        if (1.0 < 2.0);
+
+        //magic numbers
+        int int_magic1 = 3_000;
+        double double_magic1 = 1.5_0;
+        int int_magic2 = (3 + 4);
+
+        int_array = new int[3];
+
+        int_magic1 += 3;
+        double_magic1 *= 1.5;
+
+        for (int j = 3; j < 5; j += 3) {
+            int_magic1++;
+        }
+
+        if (int_magic1 < 3) {
+            int_magic1 = int_magic1 + 3;
+        }
+
+        //octal
+        int octalVar0 = 00;
+        int octalVar8 = 010;
+        int octalVar9 = 011;
+
+        long longOctalVar8 = 0_10L;
+        long longOctalVar9 = 011l;
+
+        //hex
+        int hexVar0 = 0x0;
+        int hexVar16 = 0x10;
+        int hexVar17 = 0X011;
+        long longHexVar0 = 0x0L;
+        long longHexVar16 = 0x10L;
+        long longHexVar17 = 0X11l;
+    }
+}
+
+interface Blah
+{
+  int LOW = 5;
+  int HIGH = 78;
+}
+
+class ArrayMagicTest
+{
+    private static final int[] NONMAGIC = {3};
+    private int[] magic = {3};
+    private static final int[][] NONMAGIC2 = {{1}, {2}, {3}};
+}
+
+/** test long hex */
+class LongHex
+{
+    long l = 0xffffffffL;
+}
+
+/** test signed values */
+class Signed
+{
+    public static final int CONST_PLUS_THREE = +3;
+    public static final int CONST_MINUS_TWO = -2;
+    private int mPlusThree = +3;
+    private int mMinusTwo = -2;
+    private double mPlusDecimal = +3.5;
+    private double mMinusDecimal = -2.5;
+}
+
+/** test octal and hex negative values */
+class NegativeOctalHex
+{
+    private int hexIntMinusOne = 0xffffffff;
+    private long hexLongMinusOne = 0xffffffffffffffffL;
+    private long hexIntMinValue = 0x80000000;
+    private long hexLongMinValue = 0x8000000000000000L;
+    private int octalIntMinusOne = 037777777777;
+    private long octalLongMinusOne = 01777777777777777777777L;
+    private long octalIntMinValue = 020000000000;
+    private long octalLongMinValue = 01000000000000000000000L;
+}
+
+class Cast
+{
+    public static final int TESTINTVAL = (byte) 0x80;
+}
+
+class ComplexAndFlagged
+{
+    public static final java.util.List MYLIST = new java.util.ArrayList()
+    {
+        public int size()
+        {
+            // should be flagged although technically inside const definition
+            return 378;
+        }
+    };
+}
+
+class ComplexButNotFlagged
+{
+    // according to user feedback this is typical code that should not be flagged
+    // (at least in the default configuration of MagicNumberCheck)
+    public static final Integer DEFAULT_INT = new Integer(27);
+    public static final int SECS_PER_DAY = 24 * 60 * 60;
+    public static final javax.swing.border.Border STD_BORDER =
+        javax.swing.BorderFactory.createEmptyBorder(3, 3, 3, 3);
+}
+
+enum MyEnum
+{
+    A(3),
+    B(54);
+
+    private MyEnum(int value)
+    {
+
+    }
+}
+
+class TestHashCodeMethod {
+    // valid hash code method
+    public int hashCode() {
+        return 31;
+    }
+
+    // invalid hash code method: has parameters
+    public int hashCode(int val) {
+        return 42;
+    }
+
+    // invalid hash code method: misspelled
+    public int hashcode() {
+        return 13;
+    }
+
+    static {
+        int x=21;
+    }
+
+    {
+        int y=37;
+    }
+
+    public TestHashCodeMethod() {
+        int z=101;
+    }
+
+    @IntMethodAnnotation(42)
+    public void another() {
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputMethNameEqualClsName.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputMethNameEqualClsName.java
new file mode 100644
index 0000000..5a59dbc
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputMethNameEqualClsName.java
@@ -0,0 +1,56 @@
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test input for MethodNameCheck specifically
+ * whether the method name equals the class name.
+ *
+ * @author Travis Schneeberger
+ */
+public class InputMethNameEqualClsName {
+
+	//illegal name
+    public int InputMethNameEqualClsName() {
+        return 0;
+    }
+
+    //illegal name
+    private int PRIVATEInputMethNameEqualClsName() {
+        return 0;
+    }
+
+    class Inner {
+		//illegal name
+        public int Inner() {
+			return 0;
+		}
+
+		//OK name - name of the outter class's ctor
+        public int InputMethNameEqualClsName() {
+			return 0;
+		}
+	}
+
+	public void anotherMethod() {
+		new InputMethNameEqualClsName() {
+
+			//illegal name
+            public int InputMethNameEqualClsName() {
+				return 1;
+			}
+		};
+	}
+}
+
+interface SweetInterface {
+	
+	//illegal name
+    int SweetInterface();
+}
+
+class Outter {
+	
+	//illegal name
+    public void Outter() {
+		
+	}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputMissingSwitchDefault.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputMissingSwitchDefault.java
new file mode 100644
index 0000000..30e8bd5
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputMissingSwitchDefault.java
@@ -0,0 +1,20 @@
+public class InputMissingSwitchDefault {
+    public void foo() {
+        int i = 1;
+        switch (i) {
+        case 1: i++; break;
+        case 2: i--; break;
+        default: return;
+        }
+    }
+}
+
+class bad_test {
+    public void foo() {
+        int i = 1;
+        switch (i) {
+        case 1: i++; break;
+        case 2: i--; break;
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputModifier.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputModifier.java
new file mode 100644
index 0000000..10e37f7
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputModifier.java
@@ -0,0 +1,128 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test case for Modifier checks:
+ * - order of modifiers
+ * - use of 'public' in interface definition
+ * @author lkuehne
+ */
+strictfp final class InputModifier // illegal order of modifiers for class
+{
+
+    /** Illegal order of modifiers for variables */
+    static private boolean sModifierOrderVar = false;
+
+    /**
+     * Illegal order of modifiers for methods. Make sure that the
+     * first and last modifier from the JLS sequence is used.
+     */
+    strictfp private void doStuff()
+    {
+    }
+
+    /** Single annotation without other modifiers */
+    @MyAnnotation2 void someMethod()
+    {
+    }
+
+    /** Illegal order of annotation - must come first */
+    private @MyAnnotation2 void someMethod2()
+    {
+    }
+
+    /** Annotation in middle of other modifiers otherwise in correct order */
+    private @MyAnnotation2 strictfp void someMethod3()
+    {
+    }
+
+    /** Correct order */
+    @MyAnnotation2 private strictfp void someMethod4()
+    {
+    }
+
+    /** Annotation in middle of other modifiers otherwise in correct order */
+    @MyAnnotation2 private static @MyAnnotation4 strictfp void someMethod5()
+    {
+    }
+
+    /** holder for redundant 'public' modifier check. */
+    public static interface InputRedundantPublicModifier
+    {
+        /** redundant 'public' modifier */
+        public void a();
+
+        /** all OK */
+        void b();
+
+        /** redundant abstract modifier */
+        abstract void c();
+
+        /** redundant 'public' modifier */
+        public float PI_PUBLIC = (float) 3.14;
+
+        /** redundant 'abstract' modifier (field can not be abstract) */
+//        abstract float PI_ABSTRACT = (float) 3.14;
+
+        /** redundant 'final' modifier */
+        final float PI_FINAL = (float) 3.14;
+
+        /** all OK */
+        float PI_OK = (float) 3.14;
+    }
+
+    /** redundant 'final' modifier */
+    private final void method()
+    {
+    }
+}
+
+/** Holder for redundant 'final' check. */
+final class RedundantFinalClass
+{
+    /** redundant 'final' modifier */
+    public final void finalMethod()
+    {
+    }
+
+    /** OK */
+    public void method()
+    {
+    }
+}
+
+/** Holder for redundant modifiers of inner implementation */
+abstract interface InnerImplementation
+{
+    InnerImplementation inner =
+        new InnerImplementation()
+        {
+            /** compiler requires 'public' modifier */
+            public void method()
+            {
+            }
+        };
+    
+    void method();
+}
+
+/** Holder for redundant modifiers of annotation fields/variables */
+ at interface Annotation
+{
+    public String s1 = "";
+    final String s2 = "";
+    static String s3 = "";
+    String s4 = "";
+    public String blah();
+    abstract String blah2();
+}
+
+ at interface MyAnnotation2 {
+}
+
+ at interface MyAnnotation4 {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputModifier2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputModifier2.java
new file mode 100644
index 0000000..9516999
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputModifier2.java
@@ -0,0 +1,8 @@
+package com.puppycrawl.tools.checkstyle;
+
+public interface InputModifier2 extends Comparator<Integer> {
+    @Override
+    default int compare(Integer a, Integer b) {
+     return 0;
+    }
+  }
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputNestedBlocks.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputNestedBlocks.java
new file mode 100644
index 0000000..f12cdb3
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputNestedBlocks.java
@@ -0,0 +1,63 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test case for finding nested blocks.
+ * @author lkuehne
+ **/
+class InputNestedBlocks
+{
+    static
+    { // OK
+    }
+
+    public void method()
+    {
+        int x = 0;
+
+        // if (condition that is not important anymore)
+        { // nested block, should be marked
+            int z = 1;
+            int y = z;
+        }
+
+        if (x == 1)
+        { // OK
+            x = 2;
+        }
+
+        // case statements are a bit complicated,
+        // they do not have its own variable scope by default.
+        // Hence it may be OK in some development teams to allow
+        // nested blocks if they are the complete case body.
+        switch (x)
+        {
+            case 0:
+                // OK
+                x = 3;
+                break;
+            case 1:
+                // Not OK, SLIST is not complete case body
+                {
+                    x = 1;
+                }
+                break;
+            case 2:
+                // OK if allowInSwitchCase is true, SLIST is complete case body
+                {
+                    x = 1;
+                    break;
+                }
+            case 3: // test fallthrough
+            default:
+                // Not OK, SLIST is not complete case body
+                System.out.println("Hello");
+                {
+                    x = 2;
+                }
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputNewlineAtEndOfFile.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputNewlineAtEndOfFile.java
new file mode 100644
index 0000000..e2d492c
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputNewlineAtEndOfFile.java
@@ -0,0 +1,14 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2003
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test case for detection of an existing newline at EOF, using the 
+ * NewlineAtEndOfFileCheck.
+ * @author Christopher Lenz
+ **/
+public interface InputNewlineAtEndOfFile
+{
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputNoNewlineAtEndOfFile.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputNoNewlineAtEndOfFile.java
new file mode 100644
index 0000000..cad9930
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputNoNewlineAtEndOfFile.java
@@ -0,0 +1,14 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2003
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test case for detection of missing newlines at EOF, using the
+ * NewlineAtEndOfFileCheck.
+ * @author Christopher Lenz
+ **/
+public interface InputNoNewlineAtEndOfFile
+{
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputOneCharInintVarName.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputOneCharInintVarName.java
new file mode 100644
index 0000000..329e3c2
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputOneCharInintVarName.java
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: Feb-2001
+// Ignore error
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+import java.io.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class InputOneCharInintVarName
+{
+	public void fooMethod()
+	{
+		for(int i = 1; i <10; i++) {
+			//come code
+		}
+		
+		int i = 0;
+		
+        for(int index = 1; index < 10; index++) {
+			//come code
+		}
+        
+        for(int Index = 1; Index < 10; Index++) {
+			//come code
+		}
+        
+        int index = 1;
+
+		for(; index < 10; index++) {
+			//come code
+		}
+		
+		for(; i < 12; i++) {
+			//come code
+		}
+		
+		Map<String, String> map = new HashMap<String, String>();
+		
+		for (Map.Entry<String, String> e : map.entrySet()) {
+			//some code
+		}
+	}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputOpWrap.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputOpWrap.java
new file mode 100644
index 0000000..04f259f
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputOpWrap.java
@@ -0,0 +1,57 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test case for detecting operator wrapping.
+ * @author Lars K�hne
+ **/
+class InputOpWrap
+{
+    void test()
+    {
+        int x = 1 +
+            2 -
+            3
+            -
+            4;
+        x = x + 2;
+        boolean y = true
+            &&
+            false;
+        y = true &&
+            false;
+        y = false
+            && true;
+    }
+    
+    void testAssignment()
+    {
+        int x
+            = 0; //error when checking assignment operators with EOL wrap option
+        int y =
+            0;
+    }
+    
+    <
+        T extends Comparable &
+        java.io.Serializable
+    >
+    void testGenerics1()
+    {
+        Comparable
+            <
+            String
+            >
+            c = new String(); 
+    }
+}
+
+class badCase<T extends Foo &
+    Bar> {
+}
+
+class goodCase<T extends Foo & Bar> {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputPublicOnly.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputPublicOnly.java
new file mode 100644
index 0000000..5f2002e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputPublicOnly.java
@@ -0,0 +1,117 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+public class InputPublicOnly // ignore - need javadoc
+{
+    private interface InnerInterface // ignore - when not relaxed about Javadoc
+    {
+        String CONST = "InnerInterface"; // ignore - w.n.r.a.j
+        void method(); // ignore - when not relaxed about Javadoc
+
+        class InnerInnerClass // ignore - when not relaxed about Javadoc
+        {
+            private int mData; // ignore - when not relaxed about Javadoc
+
+            private InnerInnerClass()
+            {
+                final Runnable r = new Runnable() {
+                        public void run() {};
+                    };
+            }
+
+            void method2() // ignore - when not relaxed about Javadoc
+            {
+                final Runnable r = new Runnable() {
+                        public void run() {};
+                    };
+            }
+        }
+    }
+
+    private class InnerClass // ignore
+    {
+        private int mDiff; // ignore - when not relaxed about Javadoc
+
+        void method() // ignore - when not relaxed about Javadoc
+        {
+        }
+    }
+
+    private int mSize; // ignore - when not relaxed about Javadoc
+    int mLen; // ignore - when not relaxed about Javadoc
+    protected int mDeer; // ignore
+    public int aFreddo; // ignore
+
+    // ignore - need Javadoc
+    private InputPublicOnly(int aA)
+    {
+    }
+
+    // ignore - need Javadoc when not relaxed
+    InputPublicOnly(String aA)
+    {
+    }
+
+    // ignore - always need javadoc
+    protected InputPublicOnly(Object aA)
+    {
+    }
+
+    // ignore - always need javadoc
+    public InputPublicOnly(Class aA)
+    {
+    }
+
+    // ignore - when not relaxed about Javadoc
+    private void method(int aA)
+    {
+    }
+
+    // ignore - when not relaxed about Javadoc
+    void method(Long aA)
+    {
+    }
+
+    // ignore - need javadoc
+    protected void method(Class aA)
+    {
+    }
+
+    // ignore - need javadoc
+    public void method(StringBuffer aA)
+    {
+    }
+
+
+    /**
+       A param tag should not be required here when relaxed about Javadoc.
+       Writing a little documentation should not be worse than not
+       writing any documentation at all.
+     */
+    private void method(String aA)
+    {
+    }
+
+    /**
+       This inner class has no author tag, which is OK.
+     */
+    public class InnerWithoutAuthor
+    {
+
+    }
+
+    /** {@inheritDoc} */
+    public String toString()
+    {
+        return super.toString();
+    }
+
+    @Deprecated @Override
+    public int hashCode()
+    {
+        return super.hashCode();
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputRedundantThrows.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputRedundantThrows.java
new file mode 100644
index 0000000..39eb528
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputRedundantThrows.java
@@ -0,0 +1,44 @@
+package com.puppycrawl.tools.checkstyle;
+
+import java.io.IOException;
+
+public class InputRedundantThrows
+{
+    // wrong contains subclasses
+    InputRedundantThrows()
+        throws java.io.IOException, java.io.FileNotFoundException
+    {
+    }
+
+    // wrong uncheck exception
+    void method1()
+        throws RuntimeException
+    {
+    }
+
+    // wrong - duplicate
+    void method2()
+        throws IOException, java.io.IOException
+    {
+    }
+
+    // bad - no information for checking exception
+//     void method3()
+//         throws WrongException // we will throw exception here, thus I remove it from the test input
+//     {
+//     }
+
+    // right
+    void method4()
+        throws IOException, ClassNotFoundException
+    {
+    }
+
+    void method5() throws /* WrongException, */ IOException
+    {
+    }
+
+    void method6() throws NullPointerException, RuntimeException
+    {
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpHeader1.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpHeader1.java
new file mode 100644
index 0000000..9a3045f
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpHeader1.java
@@ -0,0 +1,11 @@
+package com.puppycrawl.tools.checkstyle;
+
+import java.awt.*;
+
+/**
+ * Some doc.
+ */
+
+public class InputRegexpHeader1
+{
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpHeader2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpHeader2.java
new file mode 100644
index 0000000..250b03b
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpHeader2.java
@@ -0,0 +1,14 @@
+package com.puppycrawl.tools.checkstyle;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.io.*;
+
+/**
+ *
+ * blah blah
+ * @see foo
+ */
+public class InputRegexpHeader2
+{
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpHeader3.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpHeader3.java
new file mode 100644
index 0000000..717e005
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpHeader3.java
@@ -0,0 +1,7 @@
+package com.puppycrawl.tools.checkstyle;
+
+import java.awt.*;
+
+public class InputRegexpHeader3
+{
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpHeader4.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpHeader4.java
new file mode 100644
index 0000000..7a2a73d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpHeader4.java
@@ -0,0 +1,6 @@
+package com.puppycrawl.tools.checkstyle;
+
+import java.awt.*;
+import java.awt.*;
+import java.awt.*;
+import java.awt.*;
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpSmallHeader.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpSmallHeader.java
new file mode 100644
index 0000000..767a7a4
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputRegexpSmallHeader.java
@@ -0,0 +1,6 @@
+package com.puppycrawl.tools.checkstyle;
+
+
+/**
+ */
+public class InputRegexpSmallHeader {}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputRightCurlyEmptyAbstractMethod.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputRightCurlyEmptyAbstractMethod.java
new file mode 100644
index 0000000..c581027
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputRightCurlyEmptyAbstractMethod.java
@@ -0,0 +1,8 @@
+abstract class CharSequenceReader{
+    
+    abstract void moveTo(double deltaX, double deltaY);
+    
+    void foo() {
+        while (true);        
+    }
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputRightCurlyLineBreakBefore.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputRightCurlyLineBreakBefore.java
new file mode 100644
index 0000000..96858fc
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputRightCurlyLineBreakBefore.java
@@ -0,0 +1,66 @@
+package com.puppycrawl.tools.checkstyle;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.ArrayList;
+import java.util.List;
+
+class InputLeftCurlyOther
+{
+    /** @see test method **/
+    int foo() throws InterruptedException
+    {
+        int x = 1;
+        int a = 2;
+        while (true)
+        {
+            try
+            {
+                if (x > 0)
+                {
+                    break;
+                } else if (x < 0) {
+                    ;
+                } else { break; }
+                switch (a)
+                {
+                case 0:
+                    break;
+                default:
+                    break;
+                }
+            } catch (Exception e) { break; } finally { break; }
+        }
+
+        synchronized (this) { do { x = 2; } while (x == 2); }
+        
+        synchronized (this) {
+            do {} while (x == 2);
+        }
+
+        for (int k = 0; k < 1; k++) { String innerBlockVariable = ""; }
+
+        for (int k = 0; k < 1; k++) {}
+    }
+
+    static { int x = 1; }
+
+    void method2()
+    {
+        if (flag) { System.err.println("foo"); }
+    }
+}
+
+class Absent_CustomFieldSerializer {
+
+    public static void serialize() {} 
+}
+
+class Absent_CustomFieldSerializer
+{
+    public Absent_CustomFieldSerializer() {}
+}
+
+class EmptyClass {}
+
+interface EmptyInterface {}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputScopeAnonInner.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputScopeAnonInner.java
new file mode 100644
index 0000000..ac76059
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputScopeAnonInner.java
@@ -0,0 +1,59 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseAdapter;
+import javax.swing.JButton;
+
+/**
+ * Tests for anonymous inner types
+ * @author Lars K�hne
+ **/
+public class InputScopeAnonInner
+{
+    /**
+       button.
+    */
+    private JButton mButton = new JButton();
+
+    /**
+       anon inner in member variable initialization.
+    */
+    private Runnable mRunnable = new Runnable() {
+        public void run() // should not have to be documented, class is anon.
+        {
+            System.out.println("running");
+        }
+    };
+
+    /**
+       anon inner in constructor.
+    */
+    InputScopeAnonInner()
+    {
+        mButton.addMouseListener( new MouseAdapter()
+            {
+                public void mouseClicked( MouseEvent aEv )
+                {
+                    System.out.println("click");
+                }
+            } );
+    }
+
+    /**
+       anon inner in method
+    */
+    public void addInputAnonInner()
+    {
+        mButton.addMouseListener( new MouseAdapter()
+            {
+                public void mouseClicked( MouseEvent aEv )
+                {
+                    System.out.println("click");
+                }
+            } );
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputScopeInnerClasses.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputScopeInnerClasses.java
new file mode 100644
index 0000000..3f359fd
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputScopeInnerClasses.java
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+/**
+   Checks javadoc scoping for inner classes.
+
+   Once the Javadoc Check Scope has been left,
+   all inner elements should not be reported as error,
+   even if they belong to the checkscope if isolated.
+
+   @author lkuehne
+ */
+public class InputScopeInnerClasses
+{
+    public class InnerPublic
+    {
+        protected class InnerProtected
+        {
+            class InnerPackage
+            {
+                private class InnerPrivate
+                {
+                    // no javadoc required for package scope
+                    class PrivateHiddenPackage
+                    {
+                    }
+
+                    protected class PrivateHiddenProtected
+                    {
+                    }
+
+                    public class PrivateHiddenPublic
+                    {
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputScopeInnerInterfaces.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputScopeInnerInterfaces.java
new file mode 100644
index 0000000..c3f89f8
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputScopeInnerInterfaces.java
@@ -0,0 +1,74 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+public class InputScopeInnerInterfaces
+{
+    // inner interfaces with different scopes
+
+    private interface PrivateInterface
+    {
+        public String CA = "CONST A";
+        String CB = "CONST b";
+
+        public void ma();
+        void mb();
+    }
+
+    interface PackageInnerInterface
+    {
+        public String CA = "CONST A";
+        String CB = "CONST b";
+
+        public void ma();
+        void mb();
+    }
+
+    protected interface ProtectedInnerInterface
+    {
+        public String CA = "CONST A";
+        String CB = "CONST b";
+
+        public void ma();
+        void mb();
+    }
+
+    public interface PublicInnerInterface
+    {
+        public String CA = "CONST A";
+        String CB = "CONST b";
+
+        public void ma();
+        void mb();
+    }
+
+    private
+    class 
+    MyClass1 {
+    }
+
+    class 
+    MyClass2 {
+    }
+
+    private
+    interface
+    MyInterface1 {
+    }
+
+    interface
+    MyInterface2 {
+    }
+
+    protected
+    enum
+    MyEnum {
+    }
+    
+    private
+    @interface
+    MyAnnotation {
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputSemantic.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputSemantic.java
new file mode 100644
index 0000000..00cd598
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputSemantic.java
@@ -0,0 +1,197 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import java.io.*; // star import for instantiation tests
+import java.awt.Dimension; // explicit import for instantiation tests
+import java.awt.Color;
+
+/**
+ * Test case for detecting simple semantic errors.
+ * @author Lars K�hne
+ **/
+class InputSemantic
+{
+    /* Boolean instantiation in a static initializer */
+    static {
+        Boolean x = new Boolean(true);
+    }
+
+    /* Boolean instantiation in a non-static initializer */
+    {
+        Boolean x = new Boolean(true);
+        Boolean[] y = new Boolean[]{Boolean.TRUE, Boolean.FALSE};
+    }
+
+    /** fully qualified Boolean instantiation in a method. **/
+    Boolean getBoolean()
+    {
+        return new java.lang.Boolean(true);
+    }
+
+    void otherInstantiations()
+    {
+        // instantiation of classes in the same package
+        Object o1 = new InputBraces();
+        Object o2 = new InputModifier();
+        // classes in another package with .* import
+        ByteArrayOutputStream s = new ByteArrayOutputStream();
+        File f = new File("/tmp");
+        // classes in another package with explicit import
+        Dimension dim = new Dimension();
+        Color col = new Color(0, 0, 0);
+    }
+
+    void exHandlerTest()
+    {
+        try {
+            ; // do stuff and don't handle exceptions in some cases
+        }
+        catch (IllegalStateException emptyCatchIsAlwaysAnError) {
+        }
+        catch (NullPointerException ex) {
+            // can never happen, but only commentig this is currently an error
+            // Possible future enhancement: allowEmptyCatch="commented"
+        }
+        catch (ArrayIndexOutOfBoundsException ex) {
+            ;
+            // can never happen, semicolon makes checkstyle happy
+            // this is a workaround for above problem
+        }
+        catch (NegativeArraySizeException ex) {
+            {
+            }
+            // can never happen, empty compound statement is another workaround
+        }
+        catch (UnsupportedOperationException handledException) {
+            System.out.println(handledException.getMessage());
+        }
+        catch (SecurityException ex) { /* hello */ }
+        catch (StringIndexOutOfBoundsException ex) {}
+        catch (IllegalArgumentException ex) { }
+
+        try {
+        }
+        finally {
+        }
+        try {
+        // something
+        }
+        finally {
+            // something
+        }
+        try {
+            ; // something
+        }
+        finally {
+            ; // statement
+        }
+    }
+
+    /** test **/
+    private static final long IGNORE = 666l + 666L;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    public class EqualsVsHashCode1
+    {
+        public boolean equals(int a) // wrong arg type, don't flag
+        {
+            return a == 1;
+        }
+    }
+
+    public class EqualsVsHashCode2
+    {
+        public boolean equals(String a) // flag
+        {
+            return true;
+        }
+    }
+
+    public class EqualsVsHashCode3
+    {
+        public boolean equals(Object a) // don't flag
+        {
+            return true;
+        }
+
+        public int hashCode()
+        {
+            return 0;
+        }
+    }
+
+    public class EqualsVsHashCode4
+    {
+        // in anon inner class
+        ByteArrayOutputStream bos1 = new ByteArrayOutputStream()
+        {
+            public boolean equals(Object a) // don't flag
+            {
+                return true;
+            }
+
+            public int hashCode()
+            {
+                return 0;
+            }
+        };
+
+        ByteArrayOutputStream bos2 = new ByteArrayOutputStream()
+        {
+            public boolean equals(Object a) // flag
+            {
+                return true;
+            }
+        };
+    }
+
+    public void triggerEmptyBlockWithoutBlock()
+    {
+        // an if statement without a block to increase test coverage
+        if (true)
+            return;
+    }
+    
+    // empty instance initializer
+    {
+    }
+
+    public class EqualsVsHashCode5
+    {
+        public <A> boolean equals(int a) // wrong arg type, don't flag even with generics
+        {
+            return a == 1;
+        }
+    }
+
+    public class EqualsVsHashCode6
+    {
+        public <A> boolean equals(Comparable<A> a) // flag, weven with generics
+        {
+            return true;
+        }
+    }
+
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputSemantic2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputSemantic2.java
new file mode 100644
index 0000000..36d9db3
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputSemantic2.java
@@ -0,0 +1,38 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import java.io.*; // star import for instantiation tests
+import java.awt.Dimension; // explicit import for instantiation tests
+import java.awt.Color;
+
+class UpdateClass
+{
+	public void fooMethod()
+	{
+		int a = 1;
+		if (a == 1) {} //is not OK 
+		char[] s = {'1', '2'};
+		int index = 2;
+		if (doSideEffect() == 1) {} //is not OK, 
+		while ((r = in.read()) != 0) {} // is OK 
+		for (; index < s.length && s[index] != 'x'; index++) {} // is OK
+		if (a == 1) {} else {System.out.println("a");} // is not OK
+		switch (a) {} //warn
+		switch (a) { //ok
+        case 1:
+            a = 2;
+        case 2:
+            a = 3;
+        default:
+            a = 0;
+        }
+	}
+	
+	public int doSideEffect()
+	{
+		return 1;
+	}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputSimple.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputSimple.java
new file mode 100644
index 0000000..94201c2
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputSimple.java
@@ -0,0 +1,225 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: Feb-2001
+// Ignore error
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+import java.io.*;
+/**
+ * Contains simple mistakes:
+ * - Long lines
+ * - Tabs
+ * - Format of variables and parameters
+ * - Order of modifiers
+ * @author Oliver Burn
+ **/
+final class InputSimple
+{
+    // Long line ----------------------------------------------------------------
+    // Contains a tab ->	<-
+    // Contains trailing whitespace ->
+
+    // Name format tests
+    //
+    /** Invalid format **/
+    public static final int badConstant = 2;
+    /** Valid format **/
+    public static final int MAX_ROWS = 2;
+
+    /** Invalid format **/
+    private static int badStatic = 2;
+    /** Valid format **/
+    private static int sNumCreated = 0;
+
+    /** Invalid format **/
+    private int badMember = 2;
+    /** Valid format **/
+    private int mNumCreated1 = 0;
+    /** Valid format **/
+    protected int mNumCreated2 = 0;
+
+    /** commas are wrong **/
+    private int[] mInts = new int[] {1,2, 3,
+                                     4};
+
+    //
+    // Accessor tests
+    //
+    /** should be private **/
+    public static int sTest1;
+    /** should be private **/
+    protected static int sTest3;
+    /** should be private **/
+    static int sTest2;
+
+    /** should be private **/
+    int mTest1;
+    /** should be private **/
+    public int mTest2;
+
+    //
+    // Parameter name format tests
+    //
+
+    /**
+     * @return hack
+     * @param badFormat1 bad format
+     * @param badFormat2 bad format
+     * @param badFormat3 bad format
+     * @throws java.lang.Exception abc
+     **/
+    int test1(int badFormat1,int badFormat2,
+              final int badFormat3)
+        throws java.lang.Exception
+    {
+        return 0;
+    }
+
+    /** method that is 20 lines long **/
+    private void longMethod()
+    {
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+    }
+
+    /** constructor that is 10 lines long **/
+    private InputSimple()
+    {
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+        // a line
+    }
+
+    /** test local variables */
+    private void localVariables()
+    {
+        // normal decl
+        int abc = 0;
+        int ABC = 0;
+
+        // final decls
+        final int cde = 0;
+        final int CDE = 0;
+
+        // decl in for loop init statement
+        for (int k = 0; k < 1; k++)
+        {
+            String innerBlockVariable = "";
+        }
+        for (int I = 0; I < 1; I++)
+        {
+            String InnerBlockVariable = "";
+        }
+    }
+
+    /** test method pattern */
+    void ALL_UPPERCASE_METHOD()
+    {
+    }
+
+    /** test illegal constant **/
+    private static final int BAD__NAME = 3;
+
+    // A very, very long line that is OK because it matches the regexp "^.*is OK.*regexp.*$"
+    // long line that has a tab ->	<- and would be OK if tab counted as 1 char
+    // tabs that count as one char because of their position ->	<-   ->	<-, OK
+ 
+    /** some lines to test the error column after tabs */
+    void errorColumnAfterTabs()
+    {
+        // with tab-width 8 all statements below start at the same column,
+        // with different combinations of ' ' and '\t' before the statement
+                int tab0 =1;
+        	int tab1 =1;
+         	int tab2 =1;
+		int tab3 =1;
+  	  	int tab4 =1;
+  	        int tab5 =1;
+    }
+
+    // FIXME:
+    /* FIXME: a
+     * FIXME:
+     * TODO
+     */
+    /* NOTHING */
+    /* YES */ /* FIXME: x */ /* YES!! */
+
+    /** test long comments **/
+    void veryLong()
+    {
+        /*
+          blah blah blah blah
+          blah blah blah blah
+          blah blah blah blah
+          blah blah blah blah
+          blah blah blah blah
+          blah blah blah blah
+          blah blah blah blah
+          blah blah blah blah
+          blah blah blah blah
+          blah blah blah blah
+          blah blah blah blah
+          blah blah blah blah
+          blah blah blah blah
+          blah blah blah blah
+          blah blah blah blah
+          enough talk */
+    }
+
+    /**
+     * @see to lazy to document all args. Testing excessive # args
+     **/
+    void toManyArgs(int aArg1, int aArg2, int aArg3, int aArg4, int aArg5,
+                    int aArg6, int aArg7, int aArg8, int aArg9)
+    {
+    }
+}
+
+/** Test class for variable naming in for each clauses. */
+class InputSimple2
+{
+    /** Some more Javadoc. */
+    public void doSomething()
+    {
+        //"O" should be named "o"
+        for (Object O : new java.util.ArrayList())
+        {
+
+        }
+    }
+}
+
+/** Test enum for member naming check */
+enum MyEnum1
+{
+    /** ABC constant */
+    ABC,
+
+    /** XYZ constant */
+    XYZ;
+
+    /** Should be mSomeMemeber */
+    private int someMember;
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputSimplifyBoolean.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputSimplifyBoolean.java
new file mode 100644
index 0000000..026e61e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputSimplifyBoolean.java
@@ -0,0 +1,68 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+/**
+   Contains boolean logic that can be simplified.
+
+   @author lkuehne
+ */
+public class InputSimplifyBoolean
+{
+
+    public static boolean isOddMillis()
+    {
+        boolean even = System.currentTimeMillis() % 2 == 0;
+
+        // can be simplified to "if (even)"
+        if (even == true) {
+            return false;
+        }
+        else {
+            return true;
+        }
+        // return can be simplified to "return !even"
+    }
+
+    public static boolean isOddMillis2()
+    {
+        boolean even = System.currentTimeMillis() % 2 == 0;
+        // can be simplified to "return !even"
+        if (!even)
+            return true;
+        else
+            return false;
+    }
+
+    public static boolean giveMeTrue()
+    {
+        boolean tt = isOddMillis() || true;
+        boolean ff = isOddMillis() && false;
+        return !false || (true != false);
+    }
+
+    public void tryToProvokeNPE()
+    {
+        if (true) {
+        }
+        else {
+        }
+
+        if (true) {
+            return;
+        }
+        else {
+            return;
+        }
+    }
+
+    public boolean ifNoElse()
+    {
+        if (isOddMillis()) {
+            return true;
+        }
+        return false;
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputStaticModifierInInterface.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputStaticModifierInInterface.java
new file mode 100644
index 0000000..8111fef
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputStaticModifierInInterface.java
@@ -0,0 +1,8 @@
+public interface InputStaticModifierInInterface
+{
+    static int f()
+    {
+        int someName = 5;
+        return someName;
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputTrailingComment.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputTrailingComment.java
new file mode 100644
index 0000000..45c1812
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputTrailingComment.java
@@ -0,0 +1,30 @@
+package com.puppycrawl.tools.checkstyle;
+
+public class InputTrailingComment {
+    int i; // don't use trailing comments :)
+    // it fine to have comment w/o any statement
+    /* good c-style comment. */
+    int j; /* bad c-style comment. */
+    void method1() { /* some c-style multi-line
+                        comment*/
+        Runnable r = (new Runnable() {
+                public void run() {
+                }
+            }); /* we should allow this */
+    } // we should allow this
+    /*
+      Let's check multi-line comments.
+    */
+    /* c-style */ // cpp-style
+    /* c-style 1 */ /*c-style 2 */
+
+    void method2(long ms /* we should ignore this */) {
+        /* comment before text */int z;
+        /* int y */int y/**/;
+    }
+
+    /**
+     * comment with trailing space 
+     */
+    final static public String NAME="Some Name"; // NOI18N
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputTypeParamsTags.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputTypeParamsTags.java
new file mode 100644
index 0000000..acabdec
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputTypeParamsTags.java
@@ -0,0 +1,40 @@
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Some explanation.
+ * @param <A> A type param
+ * @param <B1> Another type param
+ * @param <D123> The wrong type param
+ * @author Nobody
+ * @version 1.0
+ */
+public class InputTypeParamsTags<A,B1,C456 extends Comparable>
+{
+    /**
+     * Some explanation.
+     * @param <X> A type param
+     * @param <Y1> Another type param
+     * @return a string
+     */
+    public <X, Y1> String doSomething()
+    {
+        return null;
+    }
+
+    /**
+     * Some explanation.
+     * @param <BB> The wrong type param
+     */
+    public <Z> void doSomethingElse()
+    {
+    }
+
+    /**
+     * Some explanation.
+     * @param aAnEl A parameter
+     * @param <L> A type parameter
+     */
+    public <L> void doSomethingElse2(L aAnEl)
+    {
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputUncommentedMain.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputUncommentedMain.java
new file mode 100644
index 0000000..9fbf835
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputUncommentedMain.java
@@ -0,0 +1,91 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2003
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Test case for UncommentedMainCheck
+ * @author o_sukhodolsky
+ */
+public class InputUncommentedMain
+{
+    // uncommented main
+    public static void main(String[] args)
+    {
+        System.out.println("InputUncommentedMain.main()");
+    }
+}
+
+class Main
+{
+    // uncommented main in class Main
+    public static void main(String[] args)
+    {
+        System.out.println("Main.main()");
+    }
+}
+
+class UncommentedMainTest1
+{
+    // one more uncommented main
+    public static void main(java.lang.String[] args)
+    {
+        System.out.println("test1.main()");
+    }
+}
+
+class UncommentedMainTest2
+{
+    // wrong arg type
+    public static void main(int args)
+    {
+        System.out.println("test2.main()");
+    }
+}
+
+class UncommentedMainTest3
+{
+    // no-public main
+    static void main(String[] args)
+    {
+        System.out.println("test3.main()");
+    }
+}
+
+class UncommentedMainTest4
+{
+    // non-static main
+    public void main(String[] args)
+    {
+        System.out.println("test4.main()");
+    }
+}
+
+class UncommentedMainTest5
+{
+    // wrong return type
+    public static int main(String[] args)
+    {
+        System.out.println("test5.main()");
+        return 1;
+    }
+}
+
+class UncommentedMainTest6
+{
+    // too many params
+    public static void main(String[] args, int param)
+    {
+        System.out.println("test6.main()");
+    }
+}
+
+class UncommentedMainTest7
+{
+    // main w/o params
+    public static void main()
+    {
+        System.out.println("test7.main()");
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputUniquePropertiesCheck.properties b/src/test/resources/com/puppycrawl/tools/checkstyle/InputUniquePropertiesCheck.properties
new file mode 100644
index 0000000..c65722e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputUniquePropertiesCheck.properties
@@ -0,0 +1,51 @@
+# Simple duplications
+general.fileNotFound=File not found!
+general.exception=Got an exception - {0}
+DefaultLogger.addException=Error auditing {0}
+DefaultLogger.auditStarted=Starting audit...
+DefaultLogger.auditFinished=Audit done.
+general.exception=Got an exception - {0}
+DefaultLogger.auditStarted=Starting new audit...
+
+# Different properties types
+onlineManual=Online Manual
+onlineManual Online Manual
+onlineManual:Online Manual
+
+# Different comments types
+!succeeded=Succeeded
+#succeeded=Succeeded
+# succeeded=Succeeded
+succeeded=Succeeded
+
+# Spaces
+time\ stamp=Time Stamp
+time\ stamp:Time Stamp
+time\ stamp Time Stamp
+in\ Progress=In progress
+in Progress=In progress
+in\ Progress\ In progress
+Support\ Link\ =Support Link
+Support\ Link\  Support Link
+About\ Menu\ Item\ =About (menu)
+About\ Menu\ Item\ About (menu)
+
+# Empty values
+failed=Failed
+failed=
+
+# Other ("normal") properties
+partially\ Failed=Partially Failed
+actionMenu=Action
+helpMenu=Help
+next=Next
+back=Back
+change=Change
+print=Print
+finish=Finish
+aboutMenuItem=About...
+About=About
+Installation=Installation
+delete=Delete
+undelete=Undelete
+edit=Edit...
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputWhitespace.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputWhitespace.java
new file mode 100644
index 0000000..1dfc039
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputWhitespace.java
@@ -0,0 +1,251 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com . puppycrawl
+    .tools.
+    checkstyle;
+
+/**
+ * Class for testing whitespace issues.
+ * error missing author tag
+ **/
+class InputWhitespace
+{
+    /** ignore assignment **/
+    private int mVar1=1;
+    /** ignore assignment **/
+    private int mVar2 =1;
+    /** Should be ok **/
+    private int mVar3 = 1;
+
+    /** method **/
+    void method1()
+    {
+        final int a = 1;
+        int b= 1; // Ignore 1
+        b=1; // Ignore 1
+        b+=1; // Ignore 1
+        b -=- 1 + (+ b); // Ignore 2
+        b = b ++ + b --; // Ignore 1
+        b = ++ b - -- b; // Ignore 1
+    }
+
+    /** method **/
+    void method2()
+    {
+        synchronized(this) {
+        }
+        try{
+        }
+        catch(RuntimeException e){
+        }
+    }
+
+    /**
+       skip blank lines between comment and code,
+       should be ok
+    **/
+
+
+    private int mVar4 = 1;
+
+
+    /** test WS after void return */
+    private void fastExit()
+    {
+        boolean complicatedStuffNeeded = true;
+        if( !complicatedStuffNeeded )
+        {
+            return; // should not complain about missing WS after return
+        }
+        else
+        {
+            // do complicated stuff
+        }
+    }
+
+
+    /** test WS after non void return
+     @return 2
+    */
+    private int nonVoid()
+    {
+        if ( true )
+        {
+            return(2); // should complain about missing WS after return
+        }
+        else
+        {
+            return 2; // this is ok
+        }
+    }
+
+    /** test casts **/
+    private void testCasts()
+    {
+        Object o = (Object) new Object(); // ok
+        o = (Object)o; // error
+        o = ( Object ) o; // ok
+        o = (Object)
+            o; // ok
+    }
+
+    /** test questions **/
+    private void testQuestions()
+    {
+        boolean b = (1 == 2)?true:false;
+        b = (1==2) ? false : true;
+    }
+
+    /** star test **/
+    private void starTest()
+    {
+        int x = 2 *3* 4;
+    }
+
+    /** boolean test **/
+    private void boolTest()
+    {
+        boolean a = true;
+        boolean x = ! a;
+        int z = ~1 + ~ 2;
+    }
+
+    /** division test **/
+    private void divTest()
+    {
+        int a = 4 % 2;
+        int b = 4% 2;
+        int c = 4 %2;
+        int d = 4%2;
+        int e = 4 / 2;
+        int f = 4/ 2;
+        int g = 4 /2;
+        int h = 4/2;
+    }
+
+    /** @return dot test **/
+    private java .lang.  String dotTest()
+    {
+        Object o = new java.lang.Object();
+        o.
+            toString();
+        o
+            .toString();
+        o . toString();
+        return o.toString();
+    }
+
+    /** assert statement test */
+    public void assertTest()
+    {
+        // OK
+        assert true;
+
+        // OK
+        assert true : "Whups";
+
+        // evil colons, should be OK
+        assert "OK".equals(null) ? false : true : "Whups";
+
+        // missing WS around assert
+        assert(true);
+
+        // missing WS around colon
+        assert true:"Whups";
+    }
+
+    /** another check */
+    void donBradman(Runnable aRun)
+    {
+        donBradman(new Runnable() {
+            public void run() {
+            }
+        });
+
+        final Runnable r = new Runnable() {
+            public void run() {
+            }
+        };
+    }
+
+    /** rfe 521323, detect whitespace before ';' */
+    void rfe521323()
+    {
+        doStuff() ;
+        //       ^ whitespace
+        for (int i = 0 ; i < 5; i++) {
+            //        ^ whitespace
+        }
+    }
+
+    
+    /** bug  806243 (NoWhitespaceBeforeCheck error for anonymous inner class) */
+    private int i ;
+    //           ^ whitespace
+    private int i1, i2, i3 ;
+    //                    ^ whitespace
+    private int i4, i5, i6;
+
+    /** bug  806243 (NoWhitespaceBeforeCheck error for anonymous inner class) */
+    void bug806243()
+    {
+        Object o = new InputWhitespace() {
+            private int j ;
+            //           ^ whitespace
+        };
+    }
+
+    void doStuff() {
+    }
+}
+
+/**
+ * Bug 806242 (NoWhitespaceBeforeCheck error with an interface).
+ * @author o_sukhodolsky
+ * @version 1.0
+ */
+interface IFoo
+{
+    void foo() ;
+    //        ^ whitespace
+}
+
+/**
+ * Avoid Whitespace errors in for loop.
+ * @author lkuehne
+ * @version 1.0
+ */
+class SpecialCasesInForLoop
+{
+    void forIterator()
+    {
+        // avoid conflict between WhiteSpaceAfter ';' and ParenPad(nospace)
+        for (int i = 0; i++ < 5;) {
+	    //                  ^ no whitespace
+	}
+
+        // bug 895072
+	// avoid confilct between ParenPad(space) and NoWhiteSpace before ';'
+	int i = 0;
+	for ( ; i < 5; i++ ) {
+	//   ^ whitespace
+	}
+        for (int anInt : getSomeInts()) {
+            //Should be ignored
+        }
+    }
+
+    int[] getSomeInts() {
+        int i = (int) ( 2 / 3 );
+        return null;
+    }
+
+    public myMethod() {
+        new Thread() {
+            public void run() {
+            }
+        }.start();
+    }
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputWriteTag.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputWriteTag.java
new file mode 100644
index 0000000..94ccba8
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputWriteTag.java
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2004
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * Testing tag writing
+ * @author Daniel Grenner
+ * @incomplete This class needs more code...
+ * @doubletag first text
+ * @doubletag second text
+ * @emptytag
+ */
+class InputWriteTag
+{
+	/**
+	 * @todo Add a constructor comment
+	 */
+	public InputWriteTag()
+	{	
+	}
+	
+    public void method()
+    {
+    }
+
+    /**
+     * @todo Add a comment
+     */
+    public void anotherMethod()
+    {
+    }
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/InputWriteTag2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/InputWriteTag2.java
new file mode 100644
index 0000000..14628b5
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/InputWriteTag2.java
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2004
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle;
+
+/**
+ * @incomplete This enum needs more code...
+ */
+enum InputWriteTag2 {
+    /**
+     * @incomplete This enum constant needs more code...
+     */
+    FOO;
+}
+
+/**
+ * @incomplete This annotation needs more code...
+ */
+ at interface InputWriteTag3 {
+    /**
+     * @incomplete This annotation field needs more code...
+     */
+    int foo() default 0;
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/IntMethodAnnotation.java b/src/test/resources/com/puppycrawl/tools/checkstyle/IntMethodAnnotation.java
new file mode 100644
index 0000000..b176087
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/IntMethodAnnotation.java
@@ -0,0 +1,12 @@
+package com.puppycrawl.tools.checkstyle;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+ at Retention(RetentionPolicy.RUNTIME)
+ at Target(ElementType.METHOD)
+public @interface IntMethodAnnotation{
+	int value();
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/MyAnnotation.java b/src/test/resources/com/puppycrawl/tools/checkstyle/MyAnnotation.java
new file mode 100644
index 0000000..7e16ed4
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/MyAnnotation.java
@@ -0,0 +1,17 @@
+////////////////////////////////////////////////////////////////////////////////
+// Annotation for use by package definitions
+// Created: 2005
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Annotation for use by package definitions
+ * @author Michael Studman
+ */
+ at Target(value=ElementType.PACKAGE)
+public @interface MyAnnotation
+{
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/AnnotationUseNoTrailingComma.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/AnnotationUseNoTrailingComma.java
new file mode 100644
index 0000000..43ad2a0
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/AnnotationUseNoTrailingComma.java
@@ -0,0 +1,47 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+
+ at SuppressWarnings({})
+public class AnnotationUseNoTrailingComma
+{
+  @SuppressWarnings({"common"})
+  public void foo() {
+      
+      
+      @SuppressWarnings({"common","foo"})
+      Object o = new Object() {
+        
+          @SuppressWarnings(value={"common"})
+          public String toString() {
+              
+              @SuppressWarnings(value={"leo","herbie"})
+              final String pooches = "leo.herbie";
+              
+              return pooches;
+          }
+      };
+  }
+  
+  @Test2(value={(false) ? "" : "foo"}, more={(true) ? "" : "bar"})
+
+  @Pooches2(tokens={},other={})
+  enum P {
+      
+      @Pooches2(tokens={Pooches2.class},other={1})
+      L,
+      
+      @Test2(value={}, more={(false) ? "" : "unchecked"})
+      Y;
+  }
+  
+}
+
+ at interface Test2 {
+  String[] value();
+  String[] more() default {};
+}
+
+ at interface Pooches2 {
+  
+  Class<?>[] tokens();
+  int[] other();
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/AnnotationUseWithTrailingComma.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/AnnotationUseWithTrailingComma.java
new file mode 100644
index 0000000..bcc021a
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/AnnotationUseWithTrailingComma.java
@@ -0,0 +1,57 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+//this file compiles in eclipse 3.4 but not with Sun's JDK 1.6.0.11
+
+/** FIXME: CheckStyle's ANTL grammar cannot handle this syntax
+ at SuppressWarnings({,})
+*/
+public class AnnotationUseWithTrailingComma
+{
+    @SuppressWarnings({"common",})
+    public void foo() {
+        
+        
+        @SuppressWarnings({"common","foo",})
+        Object o = new Object() {
+          
+            @SuppressWarnings(value={"common",})
+            public String toString() {
+                
+                @SuppressWarnings(value={"leo","herbie",})
+                final String pooches = "leo.herbie";
+                
+                return pooches;
+            }
+        };
+    }
+    
+    @Test(value={(false) ? "" : "foo",}, more={(true) ? "" : "bar",})
+    /** FIXME: CheckStyle's ANTL grammar cannot handle this syntax
+    @Pooches(tokens={,},other={,})
+    */
+    enum P {
+        
+        @Pooches(tokens={Pooches.class,},other={1,})
+        L,
+        
+        /** FIXME: CheckStyle's ANTL grammar cannot handle this syntax
+        @Test(value={,}, more={(false) ? "" : "unchecked",})
+        */
+        Y;
+    }
+    
+}
+
+ at interface Test {
+    String[] value();
+    String[] more() default {};
+    /** FIXME: CheckStyle's ANTL grammar cannot handle this syntax
+    String[] moreAr() default {,};
+    */
+}
+
+ at interface Pooches {
+    
+    Class<?>[] tokens();
+    int[] other();
+}
+
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadAnnonOverride.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadAnnonOverride.java
new file mode 100644
index 0000000..d178938
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadAnnonOverride.java
@@ -0,0 +1,42 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+
+public class BadAnnonOverride
+{
+    Runnable r = new Runnable() {
+
+        /**
+         * {@inheritDoc}
+         */
+        public void run() {
+            Throwable t = new Throwable() {
+
+                /**
+                 * {@inheritDoc}
+                 */
+                public String toString() {
+                    return "junk";
+                }
+            };
+        }
+    };
+
+    void doFoo(Runnable r) {
+        doFoo(new Runnable() {
+
+            /**
+             * {@inheritDoc}
+             */
+            public void run() {
+                Throwable t = new Throwable() {
+
+                    /**
+                     * {@inheritDoc}
+                     */
+                    public String toString() {
+                        return "junk";
+                    }
+                };
+            }
+        });
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadDeprecatedAnnotation.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadDeprecatedAnnotation.java
new file mode 100644
index 0000000..7935ccc
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadDeprecatedAnnotation.java
@@ -0,0 +1,58 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+
+/**
+ * @deprecated
+ *  stuff
+ */
+public class BadDeprecatedAnnotation
+{
+    /**
+     * @deprecated        stuff
+     */
+    protected BadDeprecatedAnnotation() {
+
+    }
+
+    /**
+     * @deprecated stuff
+     */
+    public String toString() {
+        return "";
+    }
+
+    /**
+     * @deprecated stuff
+     */
+    enum Rock {
+
+        /**
+         * @deprecated stuff
+         */
+        Metallica
+    }
+}
+
+/**
+ * @deprecated stuff
+ */
+interface Foo {
+
+    /**
+     * @deprecated stuff
+     */
+    interface Bar {
+
+    }
+}
+
+/**
+ * @deprecated stuff
+ */
+ at interface Bleh {
+
+    /**
+     * @deprecated stuff
+     */
+    int bleh();
+}
+
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadDeprecatedJavadoc.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadDeprecatedJavadoc.java
new file mode 100644
index 0000000..a42b735
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadDeprecatedJavadoc.java
@@ -0,0 +1,57 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+
+import java.lang.annotation.Inherited;
+
+ at Deprecated
+public class BadDeprecatedJavadoc
+{
+    /**
+     * @Deprecated this is not the same
+     */
+    @Deprecated
+    protected BadDeprecatedJavadoc() {
+
+    }
+
+    @Deprecated
+    @Override
+    public String toString() {
+        return "";
+    }
+
+
+    @Deprecated
+    enum Rock {
+
+        /**
+         * 
+         */
+        @Bleh2(bleh=1)
+        @Deprecated
+        Metallica
+    }
+}
+
+/**
+ *
+ */
+ at Deprecated
+interface Foo2 {
+    @Deprecated
+    interface Bar {
+
+    }
+}
+
+/**
+ */
+ at Deprecated
+ at interface Bleh2 {
+
+    /**
+     * 
+     * @return
+     */
+    @Deprecated
+    int bleh();
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadOverrideFromObject.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadOverrideFromObject.java
new file mode 100644
index 0000000..aaeed23
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadOverrideFromObject.java
@@ -0,0 +1,53 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+
+public class BadOverrideFromObject
+{
+    /**
+     * {@inheritDoc}
+     */
+    public boolean equals(Object obj)
+    {
+        return false;
+    }
+
+    /**
+     * {@inheritDoc no violation}
+     *
+     * @inheritDocs}
+     *
+     * {@inheritDoc
+     */
+    public int hashCode()
+    {
+        return 1;
+    }
+
+    class Junk {
+
+        /**
+         * {@inheritDoc}
+         */
+        protected void finalize() throws Throwable
+        {
+        }
+    }
+}
+
+interface HashEq2 {
+
+    /**
+     * {@inheritDoc}
+     */
+    public int hashCode();
+}
+
+enum Bleh3 {
+    B;
+
+    /**
+     * {@inheritDoc}
+     */
+    public String toString() {
+        return "B";
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadOverrideFromOther.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadOverrideFromOther.java
new file mode 100644
index 0000000..c7a4cbf
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadOverrideFromOther.java
@@ -0,0 +1,68 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+
+import java.io.Serializable;
+
+public class BadOverrideFromOther implements IFoo2
+{
+    /**
+     * {@inheritDoc}
+     */
+    public void doFoo() { }
+
+    public void doFoo2() { }
+
+}
+
+interface IFoo2 {
+
+    void doFoo();
+}
+
+interface IBar2 extends IFoo2 {
+
+    /**
+     * {@inheritDoc}
+     */
+    public void doFoo();
+}
+
+class MoreJunk2 extends BadOverrideFromOther {
+
+    /**
+     * {@inheritDoc}
+     */
+    public void doFoo() {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void doFoo2() { }
+
+    class EvenMoreJunk extends MoreJunk2 implements Serializable {
+
+        /**
+         * {@inheritDoc}
+         */
+        public void doFoo() {
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        public void doFoo2() { }
+    }
+}
+
+enum Football2 implements IFoo2, IBar2 {
+    Detroit_Lions;
+
+    /**
+     * {@inheritDoc}
+     */
+    public void doFoo()
+    {
+
+    }
+}
+
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadPackageAnnotation1.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadPackageAnnotation1.java
new file mode 100644
index 0000000..2594092
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadPackageAnnotation1.java
@@ -0,0 +1,12 @@
+ at GunNRoses //this will not compile in Sun's compiler as of 1.6.0.11
+package com.puppycrawl.tools.checkstyle.annotation;
+
+
+public class BadPackageAnnotation1
+{
+
+}
+
+ at interface GunNRoses {
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadPackageAnnotation2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadPackageAnnotation2.java
new file mode 100644
index 0000000..c148e2e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/BadPackageAnnotation2.java
@@ -0,0 +1,16 @@
+ at Package//this will not compile in Sun's compiler as of 1.6.0.11
+ at Metallica
+package com.puppycrawl.tools.checkstyle.annotation;
+
+
+public class BadPackageAnnotation2
+{
+
+}
+ at interface Package {
+    
+}
+
+ at interface Metallica {
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/DifferentUseStyles.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/DifferentUseStyles.java
new file mode 100644
index 0000000..675d326
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/DifferentUseStyles.java
@@ -0,0 +1,60 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+
+ at Deprecated
+ at SomeArrays(pooches={DOGS.LEO})
+ at SuppressWarnings({""})
+public class DifferentUseStyles
+{
+    
+}
+
+ at SomeArrays(pooches={DOGS.LEO}, um={}, duh={"bleh"})
+ at SuppressWarnings("") //compact_no_array
+ at Deprecated()
+class Dep {
+    
+}
+
+ at Deprecated
+ at SomeArrays(pooches={DOGS.LEO})
+ at SuppressWarnings({""})
+enum SON {
+    
+    @Deprecated
+    @SomeArrays(pooches={DOGS.LEO}, um={""}, duh={"bleh"})
+    @APooch(dog=DOGS.HERBIE)
+    @Another("") //compact_no_array
+    ETHAN
+}
+
+ at Deprecated()
+enum DOGS {
+    
+    @Deprecated()
+    LEO,
+    HERBIE
+}
+
+ at interface SomeArrays {
+    @Another("") //compact
+    String[] um() default {};
+    @Another({""}) //compact
+    String[] duh() default {};
+    @Another(value={""}) //expanded
+    DOGS[] pooches();
+}
+
+ at Another(value={""}) //expanded
+enum E {
+    
+}
+
+ at interface APooch {
+    DOGS dog();
+}
+
+ at interface Another {
+    String[] value();
+    @Another({"foo", "bar"}) //compact style
+    String value1() default "";
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/GoodAnnonOverride.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/GoodAnnonOverride.java
new file mode 100644
index 0000000..ab8577d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/GoodAnnonOverride.java
@@ -0,0 +1,56 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+
+public class GoodAnnonOverride
+{
+    Runnable r = new Runnable() {
+
+        public void run() {
+            Throwable t = new Throwable() {
+
+                /**
+                 * {@inheritDoc}
+                 */
+                @Override
+                public String toString() {
+                    return "junk";
+                }
+            };
+        }
+    };
+
+    void doFoo(Runnable r) {
+        doFoo(new Runnable() {
+
+            public void run() {
+                Throwable t = new Throwable() {
+
+                    /**
+                     * {@inheritDoc}
+                     */
+                    @Override
+                    public String toString() {
+                        return "junk";
+                    }
+                };
+            }
+        });
+    }
+    
+    void doFoo2(Runnable r) {
+        doFoo(new Runnable() {
+
+            public void run() {
+                Throwable t = new Throwable() {
+
+                    /**
+                     * {@inheritDoc}
+                     */
+                    @java.lang.Override
+                    public String toString() {
+                        return "junk";
+                    }
+                };
+            }
+        });
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/GoodDeprecated.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/GoodDeprecated.java
new file mode 100644
index 0000000..2ccfc3a
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/GoodDeprecated.java
@@ -0,0 +1,80 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+
+/**
+ * @deprecated
+ * bleh
+ */
+ at Deprecated
+public class GoodDeprecated
+{
+    /**
+     * @deprecated           bleh
+     */
+    @Deprecated
+    protected GoodDeprecated() {
+    }
+
+    /**
+     * @deprecated bleh
+     */
+    @Deprecated
+    @Override
+    public String toString() {
+        return "";
+    }
+
+    /**
+     * @deprecated bleh
+     */
+    @Deprecated
+    enum Rock {
+
+        /**
+         * @deprecated bleh
+         */
+        @Bleh2(bleh=2)
+        @Deprecated
+        Metallica
+    }
+}
+
+/**
+ * @deprecated bleh
+ */
+ at Deprecated
+interface Foo5 {
+
+    /**
+     * @deprecated bleh
+     */
+    @Deprecated
+    interface Bar {
+
+    }
+}
+
+/**
+ * @deprecated bleh
+ */
+ at Deprecated
+ at interface Bleh6 {
+
+    /**
+     * @deprecated bleh
+     */
+    @Deprecated
+    int bleh();
+}
+
+/**
+ * @deprecated bleh
+ */
+ at java.lang.Deprecated
+ at interface FullName {
+
+    /**
+     * @deprecated bleh
+     */
+    @java.lang.Deprecated
+    int bleh();
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/GoodOverrideFromObject.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/GoodOverrideFromObject.java
new file mode 100644
index 0000000..0a1c529
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/GoodOverrideFromObject.java
@@ -0,0 +1,70 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+
+public class GoodOverrideFromObject
+{
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean equals(Object obj)
+    {
+        return false;
+    }
+
+    /**
+     * {@inheritDoc no violation}
+     *
+     * @inheritDocs}
+     *
+     * {@inheritDoc
+     */
+    @Override
+    public int hashCode()
+    {
+        return 1;
+    }
+
+    class Junk {
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        protected void finalize() throws Throwable
+        {
+        }
+    }
+}
+
+interface HashEq {
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public int hashCode();
+}
+
+enum Bleh1 {
+    B;
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String toString() {
+        return "B";
+    }
+}
+
+enum Bleh22 {
+    B;
+
+    /**
+     * {@inheritDoc}
+     */
+    @java.lang.Override
+    public String toString() {
+        return "B";
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/GoodOverrideFromOther.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/GoodOverrideFromOther.java
new file mode 100644
index 0000000..7669b68
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/GoodOverrideFromOther.java
@@ -0,0 +1,78 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+
+import java.io.Serializable;
+
+public class GoodOverrideFromOther implements IFoo
+{
+    public void doFoo() { }
+
+    public void doFoo2() { }
+
+}
+
+interface IFoo {
+
+    void doFoo();
+}
+
+interface IBar extends IFoo {
+
+    public void doFoo();
+}
+
+class MoreJunk extends GoodOverrideFromOther {
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void doFoo() {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void doFoo2() { }
+
+    class EvenMoreJunk extends MoreJunk implements Serializable {
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void doFoo() {
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void doFoo2() { }
+    }
+    
+    class EvenMoreMoreJunk extends MoreJunk implements Serializable {
+
+        /**
+         * {@inheritDoc}
+         */
+        @java.lang.Override
+        public void doFoo() {
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        @java.lang.Override
+        public void doFoo2() { }
+    }
+}
+
+enum Football implements IFoo, IBar {
+    Detroit_Lions;
+
+    public void doFoo()
+    {
+
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/NotOverride.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/NotOverride.java
new file mode 100644
index 0000000..f9a067f
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/NotOverride.java
@@ -0,0 +1,25 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+
+public class NotOverride
+{
+    /**
+     * {@inheritDoc}
+     */
+    private void bleh() {
+
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public static void eh() {
+
+    }
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String junk = "";
+    
+    void dodoo() {}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/SpecialCaseDeprecated.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/SpecialCaseDeprecated.java
new file mode 100644
index 0000000..7397def
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/SpecialCaseDeprecated.java
@@ -0,0 +1,88 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+
+/**
+ * @deprecated bleh
+ * @deprecated boo
+ */
+ at Deprecated
+public class SpecialCaseDeprecated
+{
+    /**
+     * @deprecated bleh
+     * @deprecated boo
+     */
+    public int i;
+
+    /**
+     * @deprecated
+     */
+    public void foo() {
+
+    }
+
+    /**
+     * @deprecated
+     */
+    @Deprecated
+    public void foo2() {
+
+    }
+
+    /**
+     * @deprecated
+     * @deprecated
+     */
+    @Deprecated
+    public void foo3() {
+
+    }
+    
+    /**
+     * @deprecated bleh
+     * @deprecated
+     */
+    @Deprecated
+    public void foo4() {
+
+    }
+    
+    /**
+     * @deprecated
+     * @deprecated bleh
+     */
+    @Deprecated
+    public void foo5() {
+
+    }
+    
+    void local(@Deprecated String s) {
+
+    }
+
+    void local2(
+        /** @deprecated bleh*/
+        String s) {
+
+    }
+
+    void local3(/** @deprecated */ @Deprecated String s) {
+
+    }
+    
+    /**
+     * @Deprecated
+     */
+    void dontUse() {
+        
+    }
+    
+    /**
+     * @Deprecated
+     * @deprecated
+     *  because I said.
+     */
+    @Deprecated
+    void dontUse2() {
+        
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/SuppressWarningsCompact.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/SuppressWarningsCompact.java
new file mode 100644
index 0000000..5baad29
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/SuppressWarningsCompact.java
@@ -0,0 +1,87 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+
+import java.lang.annotation.Documented;
+
+ at SuppressWarnings({"unchecked", "unused"})
+public class SuppressWarningsCompact
+{   
+    @SuppressWarnings({"   "})
+    class Empty {
+        
+        @SuppressWarnings({"unchecked", ""})
+        public Empty() {
+            
+        }
+    }
+    
+    @SuppressWarnings({"unused"})
+    enum Duh {
+        
+        @SuppressWarnings({"unforgiven", "    un"})
+        D;
+        
+        public static void foo() {
+            
+            @SuppressWarnings({"unused"})
+            Object o = new SuppressWarningsCompact() {
+                
+                @Override
+                @SuppressWarnings({"unchecked"})
+                public String toString() {
+                    return "";
+                }
+            };
+        }
+    }
+    
+    @SuppressWarnings({"abcun"})
+    @Documented
+    @interface Sweet {
+        int cool();
+    }
+    
+    @Documented
+    @SuppressWarnings({})
+    @interface MoreSweetness {
+        
+        @SuppressWarnings({"unused", "bleh"})
+        int cool();
+    }
+    
+    public class Junk {
+        
+        @SuppressWarnings({})
+        int a = 1;
+        
+        @SuppressWarnings({"unchecked"})
+        @Deprecated
+        int b = 1;
+        void doFoo(String s, @SuppressWarnings({"unchecked"})String y) {
+            
+        }
+    }
+    
+    @SuppressWarnings({(false) ? "unchecked" : "", (false) ? "unchecked" : ""})
+    class Cond {
+        
+        @SuppressWarnings({(false) ? "" : "unchecked"})
+        public Cond() {
+            
+        }
+        
+        @SuppressWarnings({(false) ? (true) ? "   " : "unused" : "unchecked", (false) ? (true) ? "   " : "unused" : "unchecked"})
+        public void aCond1() {
+            
+        }
+        
+        @SuppressWarnings({(false) ? "unchecked" : (true) ? "   " : "unused"})
+        public void aCond2() {
+            
+        }
+        
+        @java.lang.SuppressWarnings({(false) ? "unchecked" : ("" == "") ? (false) ? (true) ? "" : "foo" : "   " : "unused", (false) ? "unchecked" : ("" == "") ? (false) ? (true) ? "" : "foo" : "   " : "unused"})
+        public void seriously() {
+            
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/SuppressWarningsExpanded.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/SuppressWarningsExpanded.java
new file mode 100644
index 0000000..cd6682f
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/SuppressWarningsExpanded.java
@@ -0,0 +1,87 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+
+import java.lang.annotation.Documented;
+
+ at SuppressWarnings(value={"unchecked", "unused"})
+public class SuppressWarningsExpanded
+{   
+    @SuppressWarnings(value={"   "})
+    class Empty {
+        
+        @SuppressWarnings(value={"unchecked", ""})
+        public Empty() {
+            
+        }
+    }
+    
+    @SuppressWarnings(value={"unused"})
+    enum Duh {
+        
+        @SuppressWarnings(value={"unforgiven", "    un"})
+        D;
+        
+        public static void foo() {
+            
+            @SuppressWarnings(value={"unused"})
+            Object o = new SuppressWarningsExpanded() {
+                
+                @Override
+                @SuppressWarnings(value={"unchecked"})
+                public String toString() {
+                    return "";
+                }
+            };
+        }
+    }
+    
+    @SuppressWarnings(value={"abcun"})
+    @Documented
+    @interface Sweet {
+        int cool();
+    }
+    
+    @Documented
+    @SuppressWarnings(value={})
+    @interface MoreSweetness {
+        
+        @SuppressWarnings(value={"unused", "bleh"})
+        int cool();
+    }
+    
+    public class Junk {
+        
+        @SuppressWarnings(value={})
+        int a = 1;
+        
+        @SuppressWarnings(value={"unchecked"})
+        @Deprecated
+        int b = 1;
+        void doFoo(String s, @SuppressWarnings(value={"unchecked"})String y) {
+            
+        }
+    }
+    
+    @SuppressWarnings(value={(false) ? "unchecked" : "", (false) ? "unchecked" : ""})
+    class Cond {
+        
+        @SuppressWarnings(value={(false) ? "" : "unchecked"})
+        public Cond() {
+            
+        }
+        
+        @SuppressWarnings(value={(false) ? (true) ? "   " : "unused" : "unchecked", (false) ? (true) ? "   " : "unused" : "unchecked"})
+        public void aCond1() {
+            
+        }
+        
+        @SuppressWarnings(value={(false) ? "unchecked" : (true) ? "   " : "unused"})
+        public void aCond2() {
+            
+        }
+        
+        @java.lang.SuppressWarnings(value={(false) ? "unchecked" : ("" == "") ? (false) ? (true) ? "" : "foo" : "   " : "unused", (false) ? "unchecked" : ("" == "") ? (false) ? (true) ? "" : "foo" : "   " : "unused"})
+        public void seriously() {
+            
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/SuppressWarningsSingle.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/SuppressWarningsSingle.java
new file mode 100644
index 0000000..e9740af
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/SuppressWarningsSingle.java
@@ -0,0 +1,87 @@
+package com.puppycrawl.tools.checkstyle.annotation;
+
+import java.lang.annotation.Documented;
+
+ at SuppressWarnings("unchecked")
+public class SuppressWarningsSingle
+{   
+    @SuppressWarnings("   ")
+    class Empty {
+        
+        @SuppressWarnings("")
+        public Empty() {
+            
+        }
+    }
+    
+    @SuppressWarnings("unused")
+    enum Duh {
+        
+        @SuppressWarnings("unforgiven")
+        D;
+        
+        public static void foo() {
+            
+            @SuppressWarnings("unused")
+            Object o = new SuppressWarningsSingle() {
+                
+                @Override
+                @SuppressWarnings("unchecked")
+                public String toString() {
+                    return "";
+                }
+            };
+        }
+    }
+    
+    @SuppressWarnings("abcun")
+    @Documented
+    @interface Sweet {
+        int cool();
+    }
+    
+    @Documented
+    @SuppressWarnings("abcun")
+    @interface MoreSweetness {
+        
+        @SuppressWarnings("unused")
+        int cool();
+    }
+    
+    public class Junk {
+        
+        @SuppressWarnings("")
+        int a = 1;
+        
+        @SuppressWarnings("unchecked")
+        @Deprecated
+        int b = 1;
+        void doFoo(String s, @SuppressWarnings("unchecked")String y) {
+            
+        }
+    }
+    
+    @SuppressWarnings((false) ? "unchecked" : "")
+    class Cond {
+        
+        @SuppressWarnings((false) ? "" : "unchecked")
+        public Cond() {
+            
+        }
+        
+        @SuppressWarnings((false) ? (true) ? "   " : "unused" : "unchecked")
+        public void aCond1() {
+            
+        }
+        
+        @SuppressWarnings((false) ? "unchecked" : (true) ? "   " : "unused")
+        public void aCond2() {
+            
+        }
+        
+        @java.lang.SuppressWarnings((false) ? "unchecked" : ("" == "") ? (false) ? (true) ? "" : "foo" : "    " : "unused")
+        public void seriously() {
+            
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/package-info.java b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/package-info.java
new file mode 100644
index 0000000..0badc42
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/annotation/package-info.java
@@ -0,0 +1,3 @@
+ at Deprecated
+package com.puppycrawl.tools.checkstyle.annotation;
+
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputClone.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputClone.java
new file mode 100644
index 0000000..1cd6a95
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputClone.java
@@ -0,0 +1,95 @@
+package com.puppycrawl.tools.checkstyle.coding;
+public class InputClone
+{
+    public InputClone() throws CloneNotSupportedException
+    {
+        super.equals(new String());
+        super.clone();
+    }
+    
+    public Object clone() throws CloneNotSupportedException
+    {
+        return super.clone();
+    }
+    
+    public void method() throws CloneNotSupportedException
+    {
+        super.clone();
+    }
+    
+    {
+        super.clone();
+    }
+}
+
+class NoSuperClone
+{
+    public Object clone()
+    {
+        return null;
+    }
+}
+
+class InnerClone
+{
+    public Object clone()
+    {
+        class Inner
+        {
+            public Object clone() throws CloneNotSupportedException
+            {
+                return super.clone();
+            }
+        }
+        return null;
+    }
+}
+
+// This could not pass as valid semantically but tests that
+// type arguments are ignored when checking super calls
+class CloneWithTypeArguments
+{
+    public <T> Object clone()
+    {
+        return super.<T>clone();
+    }
+}
+
+class CloneWithTypeArgumentsAndNoSuper
+{
+    public <T> Object clone()
+    {
+        return null;
+    }
+}
+
+//Check that super keword isn't snagged here
+class MyClassWithGenericSuperMethod
+{
+    void someMethod(java.util.List<? super java.util.Map> l)
+    {
+
+    }
+    
+    /**
+     * Not a valid clone override. Should not get flagged.
+     * @param o some object
+     * @return a cloned Object?
+     */
+    public static Object clone(Object o) {
+	return null;
+    }
+}
+
+class AnotherClass {
+    
+    /**
+     * Not a valid clone override. Should not get flagged.
+     * @param t some type
+     * @param <T> a type
+     * @return a cloned type?
+     */
+    public <T> T clone(T t) {
+	return null;
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputDeclarationOrder.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputDeclarationOrder.java
new file mode 100644
index 0000000..5027499
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputDeclarationOrder.java
@@ -0,0 +1,179 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+public class InputDeclarationOrder
+{
+    static final int FOO2 = 3;
+
+    // error public before package
+    public static final int FOO = 3;
+    
+    private static final int FOO3 = 3;
+   
+    // eror public before package and private
+    public static final int FOO4 = 3;
+
+    private static final String ERROR = "error";
+
+    // error protected before private
+    protected static final String ERROR1 = "error";
+   
+    // error public before private
+    public static final String WARNING = "warning";
+    
+    private int mMaxInitVars = 3;
+    
+    // error statics should be before instance members
+    // error publics before private
+    public static final int MAX_ITER_VARS = 3;
+
+    private class InnerClass
+    {
+        private static final int INNER_FOO = 2;
+       
+        // error public before private
+        public static final int INNER_FOO2 = 2;
+
+        public InnerClass()
+        {
+            int foo = INNER_FOO;
+            foo += INNER_FOO2;
+            foo += INNER_FOO3;
+        }
+
+        // error member variables should be before methods or ctors
+        // error public before private
+        public static final int INNER_FOO3 = 2;
+    }
+
+    public int getFoo1()
+    {
+        return mFoo;
+    }
+
+    //  error ctors before methods
+    public InputDeclarationOrder()
+    {
+        String foo = ERROR;
+        foo += ERROR1;
+        foo += WARNING;
+        int fooInt = mMaxInitVars;
+        fooInt += MAX_ITER_VARS;
+        fooInt += mFoo;
+    }
+
+    public static int getFoo2()
+    {
+        return 13;
+    }
+
+    public int getFoo()
+    {
+        return mFoo;
+    }
+
+    private static int getFoo21()
+    {
+        return 14;
+    }
+
+    // error member variables should be before methods or ctors
+    private int mFoo = 0;
+}
+
+enum InputDeclarationOrderEnum
+{
+    ENUM_VALUE_1,
+    ENUM_VALUE_2,
+    ENUM_VALUE_3
+    {
+        private static final int INNER_FOO = 2;
+
+        // error public before private
+        public static final int INNER_FOO2 = 2;
+
+        public void doIt()
+        {
+        }
+
+        // error member variables should be before methods or ctors
+        // error public before private
+        public static final int INNER_FOO3 = 2;
+    };
+
+    static final int FOO2 = 3;
+
+    // error public before package
+    public static final int FOO = 3;
+
+    private static final int FOO3 = 3;
+
+    // eror public before package and private
+    public static final int FOO4 = 3;
+
+    private static final String ERROR = "error";
+
+    // error protected before private
+    protected static final String ERROR1 = "error";
+
+    // error public before private
+    public static final String WARNING = "warning";
+
+    private int mMaxInitVars = 3;
+
+    // error statics should be before instance members
+    // error publics before private
+    public static final int MAX_ITER_VARS = 3;
+
+    private class InnerClass
+    {
+        private static final int INNER_FOO = 2;
+
+        // error public before private
+        public static final int INNER_FOO2 = 2;
+
+        public InnerClass()
+        {
+            int foo = INNER_FOO;
+            foo += INNER_FOO2;
+            foo += INNER_FOO3;
+        }
+
+        // error member variables should be before methods or ctors
+        // error public before private
+        public static final int INNER_FOO3 = 2;
+    }
+
+    public int getFoo1()
+    {
+        return mFoo;
+    }
+
+    //  error ctors before methods
+    InputDeclarationOrderEnum()
+    {
+        String foo = ERROR;
+        foo += ERROR1;
+        foo += WARNING;
+        int fooInt = mMaxInitVars;
+        fooInt += MAX_ITER_VARS;
+        fooInt += mFoo;
+    }
+
+    public static int getFoo2()
+    {
+        return 2;
+    }
+
+    public int getFoo()
+    {
+        return mFoo;
+    }
+
+    private static int getFoo21()
+    {
+        return 1;
+    }
+
+    // error member variables should be before methods or ctors
+    private int mFoo = 0;
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputDefaultComesLast.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputDefaultComesLast.java
new file mode 100644
index 0000000..c0d7c74
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputDefaultComesLast.java
@@ -0,0 +1,35 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+public class InputDefaultComesLast
+{
+    void method(int i) {
+        // switch with last default
+        switch (i) {
+        case 1: break;
+        case 2: break;
+        default: 
+            // do something :)
+        }
+
+        // switch w/o default (not a problem)
+        switch (i) {
+        case 1: break;
+        case 2: break;
+        }
+
+        // VIOLATION!!! default is not the last one.
+        switch (i) {
+        case 1:
+            break;
+        default:
+            break;
+        case 2:
+            break;
+        }
+    }
+}
+
+ at interface InputDefaultComesLastAnnotation
+{
+    int blag() default 1;
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputDefaultComesLast2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputDefaultComesLast2.java
new file mode 100644
index 0000000..ee2a9b7
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputDefaultComesLast2.java
@@ -0,0 +1,16 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+public interface JsonTranslator {
+
+    String toJson(Response one, Response two, Response three);
+
+    String toJson(Document document);
+
+    default String toJson(Response one) {
+      return toJson(one, one, one);
+    }
+
+    default String toJson(Response one, Response two) {
+      return toJson(one, one, two);
+    }
+  }
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputEqualsAvoidNull.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputEqualsAvoidNull.java
new file mode 100644
index 0000000..0a6e1e8
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputEqualsAvoidNull.java
@@ -0,0 +1,202 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+public class InputEqualsAvoidNull {
+
+    public boolean equals(Object o) {
+    return false;
+    }
+
+    /**
+     * methods that should get flagged
+     * @return
+     */
+    public void flagForEquals() {
+
+        Object o = new Object();
+        String s = "pizza";
+
+        o.equals("hot pizza");
+
+        o.equals(s = "cold pizza");
+
+        o.equals(((s = "cold pizza")));
+
+        o.equals("cheese" + "ham" + "sauce");
+
+        o.equals(("cheese" + "ham") + "sauce");
+
+        o.equals((("cheese" + "ham")) + "sauce");
+    }
+
+    /**
+     * methods that should get flagged
+     */
+    public void flagForEqualsIgnoreCase() {
+        String s = "pizza";
+
+        s.equalsIgnoreCase("hot pizza");
+
+        s.equalsIgnoreCase(s = "cold pizza");
+
+        s.equalsIgnoreCase(((s = "cold pizza")));
+
+        s.equalsIgnoreCase("cheese" + "ham" + "sauce");
+
+        s.equalsIgnoreCase(("cheese" + "ham") + "sauce");
+
+        s.equalsIgnoreCase((("cheese" + "ham")) + "sauce");
+    }
+
+    /**
+     * methods that should get flagged
+     */
+    public void flagForBoth() {
+        Object o = new Object();
+        String s = "pizza";
+
+        o.equals("hot pizza");
+
+        o.equals(s = "cold pizza");
+
+        o.equals(((s = "cold pizza")));
+
+        o.equals("cheese" + "ham" + "sauce");
+
+        o.equals(("cheese" + "ham") + "sauce");
+
+        o.equals((("cheese" + "ham")) + "sauce");
+
+        s.equalsIgnoreCase("hot pizza");
+
+        s.equalsIgnoreCase(s = "cold pizza");
+
+        s.equalsIgnoreCase(((s = "cold pizza")));
+
+        s.equalsIgnoreCase("cheese" + "ham" + "sauce");
+
+        s.equalsIgnoreCase(("cheese" + "ham") + "sauce");
+
+        s.equalsIgnoreCase((("cheese" + "ham")) + "sauce");
+    }
+
+
+    /**
+     * methods that should not get flagged
+     *
+     * @return
+     */
+    public void noFlagForEquals() {
+        Object o = new Object();
+        String s = "peperoni";
+
+        o.equals(s += "mushrooms");
+
+        (s = "thin crust").equals("thick crust");
+
+        (s += "garlic").equals("basil");
+
+        ("Chicago Style" + "NY Style").equals("California Style" + "Any Style");
+
+        equals("peppers");
+
+        "onions".equals(o);
+
+        o.equals(new Object());
+
+        o.equals(equals(o));
+
+        equals("yummy");
+
+        new Object().equals("more cheese");
+
+        InputEqualsAvoidNullOutter outter = new InputEqualsAvoidNullOutter();
+
+        outter.new InputEqualsAvoidNullInner().equals("eat pizza and enjoy inner classes");
+    }
+
+    /**
+     * methods that should not get flagged
+     */
+    public void noFlagForEqualsIgnoreCase() {
+        String s = "peperoni";
+        String s1 = "tasty";
+
+        s.equalsIgnoreCase(s += "mushrooms");
+
+        s1.equalsIgnoreCase(s += "mushrooms");
+
+        (s = "thin crust").equalsIgnoreCase("thick crust");
+
+        (s += "garlic").equalsIgnoreCase("basil");
+
+        ("Chicago Style" + "NY Style").equalsIgnoreCase("California Style" + "Any Style");
+
+        "onions".equalsIgnoreCase(s);
+
+        s.equalsIgnoreCase(new String());
+
+        s.equals(s1);
+
+        new String().equalsIgnoreCase("more cheese");
+
+    }
+
+    public void noFlagForBoth() {
+        Object o = new Object();
+        String s = "peperoni";
+        String s1 = "tasty";
+
+        o.equals(s += "mushrooms");
+
+        (s = "thin crust").equals("thick crust");
+
+        (s += "garlic").equals("basil");
+
+        ("Chicago Style" + "NY Style").equals("California Style" + "Any Style");
+
+        equals("peppers");
+
+        "onions".equals(o);
+
+        o.equals(new Object());
+
+        o.equals(equals(o));
+
+        equals("yummy");
+
+        new Object().equals("more cheese");
+
+        InputEqualsAvoidNullOutter outter = new InputEqualsAvoidNullOutter();
+
+        outter.new InputEqualsAvoidNullInner().equals("eat pizza and enjoy inner classes");
+
+        s.equalsIgnoreCase(s += "mushrooms");
+
+        s1.equalsIgnoreCase(s += "mushrooms");
+
+        (s = "thin crust").equalsIgnoreCase("thick crust");
+
+        (s += "garlic").equalsIgnoreCase("basil");
+
+        ("Chicago Style" + "NY Style").equalsIgnoreCase("California Style" + "Any Style");
+
+        "onions".equalsIgnoreCase(s);
+
+        s.equalsIgnoreCase(new String());
+
+        s.equals(s1);
+
+        new String().equalsIgnoreCase("more cheese");
+
+
+    }
+
+}
+
+class InputEqualsAvoidNullOutter {
+    public class InputEqualsAvoidNullInner {
+	public boolean equals(Object o) {
+	    return true;
+	}
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputExplicitInit.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputExplicitInit.java
new file mode 100644
index 0000000..6973933
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputExplicitInit.java
@@ -0,0 +1,75 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+public class InputExplicitInit {
+    private int x = 0;
+    private Object bar = null;
+    private int y = 1;
+    private long y1 = 1 - 1;
+    private long y3;
+    private long y4 = 0L;
+    private boolean b1 = false;
+    private boolean b2 = true;
+    private boolean b3;
+    private String str = "";
+    java.lang.String str1 = null, str3 = null;
+    int ar1[] = null;
+    int ar2[] = new int[1];
+    int ar3[];
+    float f1 = 0f;
+    double d1 = 0.0;
+
+    static char ch;
+    static char ch1 = 0;
+    static char ch2 = '\0';
+    static char ch3 = '\1';
+
+    void method() {
+        int xx = 0;
+        String s = null;
+    }
+}
+
+interface interface1{
+    int TOKEN_first = 0x00;
+    int TOKEN_second = 0x01;
+    int TOKEN_third = 0x02;
+}
+
+class InputExplicitInit2 {
+    private Bar<String> bar = null;
+    private Bar<String>[] barArray = null;
+}
+
+enum InputExplicitInit3 {
+    A,
+    B
+    {
+        private int x = 0;
+        private Bar<String> bar = null;
+        private Bar<String>[] barArray = null;
+        private int y = 1;
+    };
+    private int x = 0;
+    private Bar<String> bar = null;
+    private Bar<String>[] barArray = null;
+    private int y = 1;
+}
+
+ at interface annotation1{
+    int TOKEN_first = 0x00;
+    int TOKEN_second = 0x01;
+    int TOKEN_third = 0x02;
+}
+
+class ForEach {
+    public ForEach(java.util.Collection<String> strings)
+    {
+        for(String s : strings) //this should not even be checked
+        {
+
+        }
+    }
+}
+
+class Bar<T> {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputFallThrough.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputFallThrough.java
new file mode 100644
index 0000000..4326b95
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputFallThrough.java
@@ -0,0 +1,409 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+public class InputFallThrough
+{
+    void method(int i, int j, boolean cond) {
+        while (true) {
+            switch (i) {
+            case 0: // no problem
+            case 1:
+                i++;
+                break;
+            case 2:
+                i++;
+            case 3: //fall through!!!
+                i++;
+                break;
+            case 4:
+                return;
+            case 5:
+                throw new RuntimeException("");
+            case 6:
+                continue;
+            case 7: {
+                break;
+            }
+            case 8: {
+                return;
+            }
+            case 9: {
+                throw new RuntimeException("");
+            }
+            case 10: {
+                continue;
+            }
+            case 11: {
+                i++;
+            }
+            case 12: //fall through!!!
+                if (false)
+                    break;
+                else
+                    break;
+            case 13:
+                if (true) {
+                    return;
+                }
+            case 14:
+                if (true) {
+                    return;
+                } else {
+                    //do nothing
+                }
+            case 15: //fall through!!!
+                do {
+                    System.out.println("something");
+                    return;
+                } while(true);
+            case 16:
+                for (int j1 = 0; j1 < 10; j1++) {
+                    System.err.println("something");
+                    return;
+                }
+            case 17:
+                while (true)
+                    throw new RuntimeException("");
+            case 18:
+                while(cond) {
+                    break;
+                }
+            case 19: //fall through!!!
+                try {
+                    i++;
+                    break;
+                } catch (RuntimeException e) {
+                    break;
+                } catch (Error e) {
+                    return;
+                }
+            case 20:
+                try {
+                    i++;
+                    break;
+                } catch (RuntimeException e) {
+                } catch (Error e) {
+                    return;
+                }
+            case 21: //fall through!!!
+                try {
+                    i++;
+                } catch (RuntimeException e) {
+                    i--;
+                } finally {
+                    break;
+                }
+            case 22:
+                try {
+                    i++;
+                    break;
+                } catch (RuntimeException e) {
+                    i--;
+                    break;
+                } finally {
+                    i++;
+                }
+            case 23: //fall through!!!
+                switch (j) {
+                case 1:
+                    continue;
+                case 2:
+                    return;
+                default:
+                    return;
+                }
+            case 24:
+                switch (j) {
+                case 1:
+                    continue;
+                case 2:
+                    break;
+                default:
+                    return;
+                }
+            default: //fall through!!!
+                // this is the last label
+                i++;
+            }
+        }
+    }
+    
+    
+    
+    /* Like above, but all fall throughs with relief comment */
+    void methodFallThru(int i, int j, boolean cond) {
+      while (true) {
+          switch (i) {
+          case -1: // FALLTHRU
+              
+          case 0: // no problem
+          case 1:
+              i++;
+              break;
+          case 2:
+              i++;
+              // fallthru
+          case 3: 
+              i++;
+              break;
+          case 4:
+              return;
+          case 5:
+              throw new RuntimeException("");
+          case 6:
+              continue;
+          case 7: {
+              break;
+          }
+          case 8: {
+              return;
+          }
+          case 9: {
+              throw new RuntimeException("");
+          }
+          case 10: {
+              continue;
+          }
+          case 11: {
+              i++;
+          }
+          // fallthru
+          case 12: 
+              if (false)
+                  break;
+              else
+                  break;
+          case 13:
+              if (true) {
+                  return;
+              }
+          case 14:
+              if (true) {
+                  return;
+              } else {
+                  //do nothing
+              }
+              // fallthru
+          case 15:
+              do {
+                  System.out.println("something");
+                  return;
+              } while(true);
+          case 16:
+              for (int j1 = 0; j1 < 10; j1++) {
+                  System.err.println("something");
+                  return;
+              }
+          case 17:
+              while (cond)
+                  throw new RuntimeException("");
+          case 18:
+              while(cond) {
+                  break;
+              }
+              // fallthru
+          case 19:
+              try {
+                  i++;
+                  break;
+              } catch (RuntimeException e) {
+                  break;
+              } catch (Error e) {
+                  return;
+              }
+          case 20:
+              try {
+                  i++;
+                  break;
+              } catch (RuntimeException e) {
+              } catch (Error e) {
+                  return;
+              }
+              // fallthru
+          case 21:
+              try {
+                  i++;
+              } catch (RuntimeException e) {
+                  i--;
+              } finally {
+                  break;
+              }
+          case 22:
+              try {
+                  i++;
+                  break;
+              } catch (RuntimeException e) {
+                  i--;
+                  break;
+              } finally {
+                  i++;
+              }
+              /* fallthru */
+          case 23:
+              switch (j) {
+              case 1:
+                  continue;
+              case 2:
+                  return;
+              default:
+                  return;
+              }        
+          case 24:
+              i++;
+          /* fallthru */ case 25: 
+              i++;
+              break;
+
+          case 26:
+              switch (j) {
+              case 1:
+                  continue;
+              case 2:
+                  break;
+              default:
+                  return;
+              } 
+              // fallthru
+          default:
+              // this is the last label
+              i++;
+          // fallthru
+         }
+      }
+   }
+    
+   /* Test relief comment. */
+   void methodFallThruCC(int i, int j, boolean cond) {
+      while (true) {
+          switch (i){
+          case 0:
+              i++; // fallthru
+
+          case 1:
+              i++;
+          // fallthru
+          case 2: {
+              i++;
+          }
+          // fallthru
+          case 3:
+              i++;
+          /* fallthru */case 4:
+                break;
+          case 5:
+              i++;
+          // fallthru
+          }
+      }
+   }
+    
+   /* Like above, but C-style comments. */
+   void methodFallThruC(int i, int j, boolean cond) {
+      while (true) {
+          switch (i){
+          case 0:
+              i++; /* fallthru */
+
+          case 1:
+              i++;
+          /* fallthru */
+          case 2:
+              i++;
+          /* fallthru */case 3:
+                break;
+          case 4:
+              i++;
+          /* fallthru */
+          }
+      }
+   }
+
+   /* Like above, but C-style comments with no spaces. */
+   void methodFallThruC2(int i, int j, boolean cond) {
+      while (true) {
+          switch (i){
+          case 0:
+              i++; /*fallthru*/
+
+          case 1:
+              i++;
+          /*fallthru*/
+          case 2:
+              i++;
+          /*fallthru*/case 3:
+                break;
+          case 4:
+              i++;
+          /*fallthru*/
+          }
+      }
+   }
+    
+   /* C-style comments with other default fallthru-comment. */
+   void methodFallThruCOtherWords(int i, int j, boolean cond) {
+      while (true) {
+          switch (i){
+          case 0:
+              i++; /* falls through */
+
+          case 1:
+              i++;
+          /* falls through */
+          case 2:
+              i++;
+          /* falls through */case 3:
+                break;
+          case 4:
+              i++;
+          /* falls through */
+          }
+      }
+   }
+    
+   /* C-style comments with custom fallthru-comment. */
+   void methodFallThruCCustomWords(int i, int j, boolean cond) {
+      while (true) {
+          switch (i){
+          case 0:
+              i++; /* Continue with next case */
+
+          case 1:
+              i++;
+          /* Continue with next case */
+          case 2:
+              i++;
+          /* Continue with next case */case 3:
+                break;
+          case 4:
+              i++;
+          /* Continue with next case */
+          }
+      }
+   }
+   
+   void methodFallThruLastCaseGroup(int i, int j, boolean cond) {
+       while (true) {
+           switch (i){
+           case 0:
+               i++; // fallthru
+           }
+           switch (i){
+           case 0:
+               i++; 
+               // fallthru
+           }
+           switch (i){
+           case 0:
+               i++; 
+           /* fallthru */ }
+       }
+    }
+
+    void method1472228(int i) {
+        switch(i) {
+        case 2:
+            // do nothing
+            break;
+        default:
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputFinalLocalVariable.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputFinalLocalVariable.java
new file mode 100644
index 0000000..c6beff9
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputFinalLocalVariable.java
@@ -0,0 +1,158 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+public class InputFinalLocalVariable
+{
+    private int m_ClassVariable = 0;
+
+    static
+    {
+        int i, j = 0;
+        Runnable runnable = new Runnable()
+        {
+            public void run()
+            {
+            }
+        };
+    }
+
+    public InputFinalLocalVariable()
+    {
+        int i = 0;
+
+        final int j = 2;
+
+        int z;
+
+        Object obj = new Object();
+
+        int k = 0;
+
+        String x = obj.toString();
+
+        k++;
+
+        k = 2;
+
+        Runnable runnable = new Runnable()
+        {
+            public void run()
+            {
+                int q = 0;
+            }
+        };
+    }
+
+    public void method(int aArg, final int aFinal, int aArg2)
+    {
+        int z = 0;
+
+        z++;
+
+        aArg2++;
+    }
+
+    public void aMethod()
+    {
+        int i = 0;
+
+        final int j = 2;
+
+        int z;
+
+        Object obj = new Object();
+
+        int k = 0;
+
+        String x = obj.toString();
+
+        k++;
+
+        final class Inner
+        {
+            public Inner()
+            {
+                int w = 0;
+                Runnable runnable = new Runnable()
+                {
+                    public void run()
+                    {
+                    }
+                };
+            }
+        }
+    }
+
+    public void anotherMethod()
+    {
+        boolean aBool = true;
+        for (int i = 0, j = 1, k = 1; j < 10 ; j++)
+        {
+            k++;
+            aBool = false;
+        }
+
+        int l = 0;
+        {
+            int weird = 0;
+            int j = 0;
+            int k = 0;
+            {
+               l++;
+            }
+        }
+
+        int weird = 0;
+        weird++;
+
+        final InnerClass ic = new InnerClass();
+
+        ic.mInner2 = 1;
+    }
+
+    class InnerClass
+    {
+        private int mInner = 0;
+
+        public int mInner2 = 0;
+    }
+}
+
+interface Inter
+{
+    void method(int aParam);
+}
+
+abstract class AbstractClass
+{
+    public abstract void abstractMethod(int aParam);
+}
+
+class Blah
+{
+    static
+    {
+        for(int a : getInts())
+        {
+
+        }
+    }
+
+    static int[] getInts() {
+        return null;
+    }
+}
+
+class test_1241722
+{
+    private Object o_;
+
+    public void doSomething(Object _o)
+    {
+        System.out.println(_o);
+    }
+
+    public void doSomething2(Object _o1)
+    {
+        o_ = _o1;
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputFinalize.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputFinalize.java
new file mode 100644
index 0000000..535208e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputFinalize.java
@@ -0,0 +1,53 @@
+package com.puppycrawl.tools.checkstyle.coding;
+public class InputFinalize
+{
+    public InputFinalize() throws Throwable
+    {
+        super.equals(new String());
+        super.finalize();
+    }
+    
+    public void finalize() throws Throwable
+    {
+        super.finalize();
+    }
+    
+    public void method() throws Throwable
+    {
+        super.finalize();
+    }
+    
+    {
+        super.finalize();
+    }
+}
+
+class NoSuperFinalize
+{
+    public void finalize()
+    {
+    }
+}
+
+class InnerFinalize
+{
+    public void finalize()
+    {
+        class Inner
+        {
+            public void finalize() throws Throwable
+            {
+                super.finalize();
+            }
+        }
+    }
+}
+
+//Check that super keword isn't snagged here
+class MyClassWithGenericSuperMethod1
+{
+    void someMethod(java.util.List<? super java.util.Map> l)
+    {
+
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputHasFinalizer.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputHasFinalizer.java
new file mode 100644
index 0000000..df18827
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputHasFinalizer.java
@@ -0,0 +1,27 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+public class InputHasFinalizer
+{
+    public void finalize()
+    {
+        // It's not enough to check if the METHOD_DEF branch contains a PARAMETER_DEF, as that would
+        // treat this method as having a parameter.
+        Runnable runnable = new Runnable() {
+        
+            public void run() {
+                reallyFinalize("hi");
+            }
+
+            // generates a PARAMETER_DEF AST inside the METHOD_DEF of finalize()
+            private void reallyFinalize(String s)
+            {
+            }
+        };
+        runnable.run();
+    }
+    
+    // should not be reported by NoFinalizer check
+    public void finalize(String x)
+    {
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalCatchCheck.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalCatchCheck.java
new file mode 100644
index 0000000..6440e4f
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalCatchCheck.java
@@ -0,0 +1,19 @@
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+public class InputIllegalCatchCheck {
+    public void foo() {
+        try {
+        } catch (RuntimeException e) {
+        } catch (Exception e) {
+        } catch (Throwable e) {
+        }
+    }
+
+    public void bar() {
+        try {
+        } catch (java.lang.RuntimeException e) {
+        } catch (java.lang.Exception e) {
+        } catch (java.lang.Throwable e) {
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalCatchCheck2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalCatchCheck2.java
new file mode 100644
index 0000000..8f63750
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalCatchCheck2.java
@@ -0,0 +1,17 @@
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+public class InputIllegalCatchCheck2 {
+    public void foo() {
+        try {
+        } catch (RuntimeException | SQLException e) {
+
+        } catch (RuntimeException | SQLException | OneMoreException e) {
+
+        } catch (OneMoreException | RuntimeException | SQLException e) {
+
+        } catch (OneMoreException | SQLException | RuntimeException e) {
+
+        }
+
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalInstantiationCheckTest2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalInstantiationCheckTest2.java
new file mode 100644
index 0000000..27f21e8
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalInstantiationCheckTest2.java
@@ -0,0 +1,22 @@
+import java.util.function.Function;
+import java.util.function.Supplier;
+
+import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
+
+public class InputIllegalInstantiationCheckTest2
+{
+
+    public static void main(String[] args)
+    {
+
+        Supplier<InputMethodReferencesTest2> supplier = InputMethodReferencesTest2::new;
+        Supplier<InputMethodReferencesTest2> suppl = InputMethodReferencesTest2::<Integer> new;
+        Function<Integer, Message[]> messageArrayFactory = Message[]::new;
+
+    }
+
+    private class Bar<T>
+    {
+
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalThrowsCheck.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalThrowsCheck.java
new file mode 100644
index 0000000..1098ad4
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalThrowsCheck.java
@@ -0,0 +1,21 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+public class InputIllegalThrowsCheck {
+
+    public void method() throws NullPointerException
+    {
+    }
+
+    public java.lang.Throwable methodOne() throws RuntimeException
+    {
+        return null;
+    }
+
+    public void methodTwo() throws java.lang.RuntimeException, java.lang.Error
+    {
+    }
+
+    public void finalize() throws Throwable {
+
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalType.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalType.java
new file mode 100644
index 0000000..909c23e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputIllegalType.java
@@ -0,0 +1,18 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+import java.util.Hashtable;
+
+public class InputIllegalType {
+    private AbstractClass a = null;
+    private NotAnAbstractClass b = null;
+
+    private com.puppycrawl.tools.checkstyle.coding.InputIllegalType.AbstractClass c = null;
+    private com.puppycrawl.tools.checkstyle.coding.InputIllegalType.NotAnAbstractClass d = null;
+
+    private abstract class AbstractClass {}
+
+    private class NotAnAbstractClass {}
+
+    private java.util.Hashtable table1() { return null; }
+    private Hashtable table2() { return null; }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputInnerAssignment.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputInnerAssignment.java
new file mode 100644
index 0000000..6eadb09
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputInnerAssignment.java
@@ -0,0 +1,102 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.jar.JarInputStream;
+import java.util.jar.Manifest;
+
+public class InputInnerAssignment
+{
+    void innerAssignments()
+    {
+        int a;
+        int b;
+        int c;
+
+        a = b = c = 1; // flag two inner assignments
+
+        String s = Integer.toString(b = 2); // flag inner assignment
+
+        Integer i = new Integer(a += 5); // flag inner assigment
+
+        c = b++; // common practice, don't flag
+                 // even though technically an assigment to b
+
+        for (int j = 0; j < 6; j += 2) { // common practice, don't flag
+            a += j;
+        }
+    }
+
+    public void demoBug1195047Comment3()
+    {
+        // inner assignment should flag all assignments to b or bb but none of those to i or j
+        int y = 1;
+        int b = 0;
+        boolean bb;
+        int i;
+
+        if (bb = false) {}
+        for (i = 0; bb = false; i = i + 1) {}
+        while (bb = false) {}
+        if ((bb = false)) {}
+        for (int j = 0; (bb = false); j += 1) {}
+        while ((bb = false)) {}
+        i = (bb = false) ? (b = 2) : (b += 1);
+        i = (b += 1) + (b -= 1);
+        do {i += 1;} while (bb = false);
+    }
+
+    public static void demoInputStreamIdiom(java.io.InputStream is) throws java.io.IOException
+    {
+        int b;
+        while ((b = is.read()) != -1) // common idiom to avoid clumsy loop control logic, don't flag (make configurable later)
+        {
+            // work with b
+        }
+    }
+
+    public static void demoNoBrace()
+    {
+        // code that doesn't contain braces around conditional code
+        // results in a parse tree without SLISTs
+        // no assignement should be flagged here
+        int sum = 0;
+
+        for (int i = 0; i < 3; i++)
+            sum = sum + i;
+
+        if (sum > 4)
+            sum += 2;
+        else if (sum < 2)
+            sum += 1;
+        else
+            sum += 100;
+
+        while (sum > 4)
+            sum -= 1;
+
+        do
+            sum = sum + 1;
+        while (sum < 6);
+    }
+
+    @SuppressWarnings(value = "unchecked")
+    public java.util.Collection<Object> allParams() {
+        java.util.ArrayList params = new java.util.ArrayList();
+        params.add("one");
+        params.add("two");
+        return params;
+    }
+
+    // Taken from JDK7 java.lang.Package src code.
+    private static Manifest loadManifest(String fn) {
+        try (FileInputStream fis = new FileInputStream(fn);
+	     JarInputStream jis = new JarInputStream(fis, false))
+        {
+            return jis.getManifest();
+        } catch (IOException e)
+        {
+            return null;
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputJUnitTest.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputJUnitTest.java
new file mode 100644
index 0000000..31cd9c8
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputJUnitTest.java
@@ -0,0 +1,32 @@
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+import junit.framework.*;
+
+public class InputJUnitTest extends TestCase
+{
+    public static Test suite() { return new TestSuite(""); } // correct
+    protected void setUp() {} // correct
+    public void tearDown() {} // correct
+}
+
+class BadTest1 extends TestCase
+{
+    private void setUp() {} // private!!!
+    public static void tearDown() {} // static!!!
+    static Test suite() { return new TestSuite(""); } // non-public
+}
+
+class BadTest2 extends TestCase
+{
+    public void SetUp() {} // wrong name
+    public int tearDown() {} // wrong return type
+    public static Test[] suite() {} // wrong return type
+}
+
+class BadTest3 extends TestCase
+{
+    public void setUp(int i) {} // too many args
+    public void tear_down() {}  // correct (unchecked)
+    public Test suite() { return new TestSuite(""); } // non-static
+    public void tearDown(int i) {} // too many args
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputMissingCtor.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputMissingCtor.java
new file mode 100644
index 0000000..e111a45
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputMissingCtor.java
@@ -0,0 +1,14 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+public class InputMissingCtor
+{
+}
+// we shouln't flag abstract classes
+abstract class AbstactClass {
+}
+
+// this class has ctor
+class CorrectClass {
+    CorrectClass() {
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputModifiedControl.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputModifiedControl.java
new file mode 100644
index 0000000..2f763a8
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputModifiedControl.java
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for FOR_ITERATION and whitespace.
+// Created: 2003
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle;
+import java.io.Serializable;
+class InputModifiedControl
+{
+    int k;
+    void method1()
+    {
+        //Violations:
+        for (int i = 0; i < 1; i++) {
+            i++;
+        }
+        for (int i = 0; i < 1; i++) {
+            i = i + 1;
+        }
+        for (int i = 0; i < 1; i++) {
+            for (int j = 0; j < 1; i++) {
+                --i;
+            }
+        }
+        for (int i = 0, j = 0; i < 1; i++) {
+            j++;
+        }
+
+        // Ok:
+        for (int i = 0; i < 1; i++) {
+        }
+        for (int i = 0; i < 1; i++) {
+            int x = i;
+        }
+        for (int i = 0; i < 1; i++) {
+            Serializable s = new Serializable() {
+                int i = 3;
+                void a() {
+                    System.out.println(i++);
+                }
+            };
+        }
+        for (int k = 0; k < 1; k++) {
+            this.k++;   
+        }
+
+        String[] sa = {"a", "b"};
+        for(String s:sa) {}
+        for(String s:sa) {
+            s = "new string";
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputMultipleStringLiterals.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputMultipleStringLiterals.java
new file mode 100644
index 0000000..7c76c55
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputMultipleStringLiterals.java
@@ -0,0 +1,30 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+public class InputMultipleStringLiterals
+{
+    String m = "StringContents";
+    String m1 = "SingleString";
+    String m2 = "DoubleString" + "DoubleString";
+    String m3 = "" + "";
+    String m4 = "" + "";
+    String debugStr = ", " + ", " + ", ";
+
+    void method1() {
+        String a1 = "StringContents";
+        System.out.println("StringContents");
+        // The following is not reported, since it is two string literals.
+        String a2 = "String" + "Contents";
+    }
+
+    @SuppressWarnings("unchecked")
+    void method2(){}
+
+    @SuppressWarnings("unchecked")
+    void method3(){}
+
+    @SuppressWarnings("unchecked")
+    void method4(){}
+
+    @SuppressWarnings("unchecked")
+    void method5(){}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputMultipleVariableDeclarations.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputMultipleVariableDeclarations.java
new file mode 100644
index 0000000..8c8d025
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputMultipleVariableDeclarations.java
@@ -0,0 +1,27 @@
+public class InputMultipleVariableDeclarations
+{
+    int i, j;
+    int i1; int j1;
+
+    void method1() {
+        String str, str1;
+        java.lang.Object obj; Object obj1;
+    }
+    // second definition is wrapped
+    // line of VARIABLE_DEF is not the same as first line of the definition
+    java.lang.String string; java.lang.String
+        strings[];
+    //both definitions is wrapped
+    java.lang.
+        String string1; java.lang.String
+            strings1[];
+
+    void method2() {
+        for (int i=0, j=0; i < 10; i++, j--) {
+        }
+
+        for(int i=0; i<4;i++) {
+            
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputNestedForDepth.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputNestedForDepth.java
new file mode 100644
index 0000000..ef061a0
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputNestedForDepth.java
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+//checkstyle: Checks Java source code for adherence to a set of rules.
+//Copyright (C) 2001-2004  Oliver Burn
+//
+//This library is free software; you can redistribute it and/or
+//modify it under the terms of the GNU Lesser General Public
+//License as published by the Free Software Foundation; either
+//version 2.1 of the License, or (at your option) any later version.
+//
+//This library is distributed in the hope that it will be useful,
+//but WITHOUT ANY WARRANTY; without even the implied warranty of
+//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//Lesser General Public License for more details.
+//
+//You should have received a copy of the GNU Lesser General Public
+//License along with this library; if not, write to the Free Software
+//Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.testinput.coding;
+
+/**
+ * This Class contains no logic, but serves as test-input for the unit tests for the
+ * <code>NestedForDepthCheck</code>-checkstyle enhancement.
+ * @author Alexander Jesse
+ * @see com.puppycrawl.tools.checkstyle.checks.coding.NestedForDepthCheck
+ */
+public class InputNestedForDepth {
+
+  /**
+   * Dummy method containing 5 layers of for-statements.
+   */
+  public void nestedForFiveLevel() {
+    int i = 0;
+    int i1 = 0;
+    int i2 = 0;
+    int i3 = 0;
+    int i4 = 0;
+    int i5 = 0;
+
+    for (i1 = 0; i1 < 10; i1++) {
+      for (i2 = 0; i2 < 10; i2++) {
+        for (i3 = 0; i3 < 10; i3++) {
+          for (i4 = 0; i4 < 10; i4++) {
+            for (i5 = 0; i5 < 10; i5++) {
+              i += 1;
+            }
+          }
+        }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputNestedIfDepth.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputNestedIfDepth.java
new file mode 100644
index 0000000..afe1451
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputNestedIfDepth.java
@@ -0,0 +1,63 @@
+public class InputNestedIfDepth
+{
+    void foo() {
+        // nesting == 0
+        if (true) {
+        }
+
+        // nesting == 1
+        if (true) {
+            if (true) {
+            }
+        }
+
+        // nesting == 2
+        if (true) {
+            if (true) {
+                if (true) {
+                }
+            }
+        }
+    }
+
+    void fooWithElse() {
+        // nesting == 0
+        if (true) {
+        } else {
+        }
+
+        // nesting == 1
+        if (true) {
+            if (true) {
+            } else {
+            }
+        } else {
+            if (false) {
+            } else {
+            }
+        }
+
+        // nesting == 2
+        if (true) {
+            if (true) {
+                if (true) {
+                } else {
+                }
+            } else {
+                if (false) {
+                } else {
+                }
+            }
+        } else {
+            if (true) {
+                if (true) {
+                } else {
+                }
+            } else {
+                if (false) {
+                } else {
+                }
+            }
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputNestedTryDepth.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputNestedTryDepth.java
new file mode 100644
index 0000000..9097d0c
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputNestedTryDepth.java
@@ -0,0 +1,44 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+public class InputNestedTryDepth
+{
+    void foo() {
+        // nesting == 0
+        try {
+        } catch (Exception e) {
+        }
+
+        // nesting == 1
+        try {
+            try {
+            } catch (Exception e) {
+            }
+        } catch (Exception e) {
+        }
+
+        // nesting == 2
+        try {
+            try {
+                try {
+                } catch (Exception e) {
+                }
+            } catch (Exception e) {
+            }
+        } catch (Exception e) {
+        }
+
+        // nesting == 3
+        try {
+            try {
+                try {
+                    try {
+                    } catch (Exception e) {
+                    }
+                } catch (Exception e) {
+                }
+            } catch (Exception e) {
+            }
+        } catch (Exception e) {
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputNoPackage.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputNoPackage.java
new file mode 100644
index 0000000..b791af5
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputNoPackage.java
@@ -0,0 +1,5 @@
+/**
+ * No package here.
+ */
+public class InputNoPackage {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputOverloadMethodsDeclarationOrder.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputOverloadMethodsDeclarationOrder.java
new file mode 100644
index 0000000..c48aa8e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputOverloadMethodsDeclarationOrder.java
@@ -0,0 +1,116 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+import test.OverloadInput;
+
+class OverloadInput
+{
+    public void overloadMethod(int i)
+    {
+        //some foo code
+    }
+
+    public void overloadMethod(String s)
+    {
+        //some foo code
+    }
+
+    public void overloadMethod(boolean b)
+    {
+        //some foo code
+    }
+
+    public void fooMethod()
+    {
+
+    }
+
+    //error because overloads never split
+    public void overloadMethod(String s, Boolean b, int i) //warn
+    {
+        //some foo code
+    }
+    
+    OverloadInput anonynous = new OverloadInput()
+    {
+        public void overloadMethod(int i)
+        {
+            //some foo code
+        }
+
+        public void overloadMethod(String s)
+        {
+            //some foo code
+        }
+
+        public void overloadMethod(boolean b)
+        {
+            //some foo code
+        }
+
+        public void fooMethod()
+        {
+
+        }
+
+        //error because overloads never split
+        public void overloadMethod(String s, Boolean b, int i) //warn
+        {
+            //some foo code
+        }
+    };
+}
+
+interface Fooable
+{
+    public abstract void foo(int i);
+    public abstract void foo(String s);
+    public abstract void noFoo();
+    public abstract void foo(String s, Boolean b, int i); //warn
+}
+
+enum FooType {
+    Strategy(""),
+    Shooter(""),
+    RPG("");
+ 
+    private String description;
+ 
+    private FooType(String description) {
+        this.description = description;
+    }
+ 
+    public String getDescription() {
+        return description;
+    }
+ 
+    public void setDescription(String description) {
+        this.description = description;
+    }
+    
+    public void overloadMethod(int i)
+    {
+        //some foo code
+    }
+
+    public void overloadMethod(String s)
+    {
+        //some foo code
+    }
+
+    public void overloadMethod(boolean b)
+    {
+        //some foo code
+    }
+
+    public void fooMethod()
+    {
+
+    }
+
+    //error because overloads never split
+    public void overloadMethod(String s, Boolean b, int i) //warn
+    {
+        //some foo code
+    }
+}
+
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputParameterAssignment.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputParameterAssignment.java
new file mode 100644
index 0000000..3a55c01
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputParameterAssignment.java
@@ -0,0 +1,22 @@
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+public class InputParameterAssignment {
+    int field;
+    void foo1(int field) {
+        int i = field;
+        this.field = field;
+        i++;
+        field = 0;
+        field += 1;
+        this.field++;
+        field--;
+    }
+
+    void foo2() {
+        field = 0;
+    }
+
+    void foo3(String field, int field1) {
+        this.field = (field1 += field.length());
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputRequireThis.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputRequireThis.java
new file mode 100644
index 0000000..4d62f2f
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputRequireThis.java
@@ -0,0 +1,94 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+import java.awt.Toolkit;
+
+public class InputRequireThis {
+    int i;
+    void method1() {
+        i = 3;
+    }
+
+    void method2(int i) {
+        i++;
+        this.i = i;
+        method1();
+        try {
+            this.method1();
+        }
+        catch (RuntimeException e) {
+            e.printStackTrace();
+        }
+        this.i--;
+
+        Integer.toString(10);
+    }
+
+    <T> void method3()
+    {
+        i = 3;
+    }
+
+    void method4() {
+        this.<String>method3();
+        this.<I>method3();
+    }
+    int I = 0;
+    private class I {}
+}
+
+enum MyEnum
+{
+    A,
+    B
+    {
+        void doSomething()
+        {
+            z = 1;
+        }
+    };
+
+    int z;
+    private MyEnum()
+    {
+        z = 0;
+    }
+}
+
+class Bug2123003 {
+    @Rock(band = "GnR")
+    private String band;
+    
+    class Inner {
+        @Rock(band = {"GnR"})
+        private String band;
+    }
+    
+    class Inner2 {
+        @Rock(band = {(true) ? "GnR" : "Tool"})
+        private String band;
+    }
+    
+    @interface Rock {
+        String[] band() default "Metallica";
+    }
+}
+
+class Bug1155921 {
+    private static int CONST = 1;
+    private static int static_method() {
+        return 1;
+    }
+
+    private int method1() {
+        return CONST;
+    }
+
+    private int method2() {
+        return static_method();
+    }
+}
+
+interface Issue155 {
+    String BASE = "A";
+    String EXT = BASE + "B";
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputRequireThis2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputRequireThis2.java
new file mode 100644
index 0000000..8de7043
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputRequireThis2.java
@@ -0,0 +1,15 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+public class InputRequireThis2 {
+	private final int number = 1;
+
+    public int check() {
+        int sum = number;
+        sum += other();
+        return sum;
+    }
+
+    private int other() {
+    	return 0;
+    }
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputReturnCount.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputReturnCount.java
new file mode 100644
index 0000000..674dcdd
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputReturnCount.java
@@ -0,0 +1,53 @@
+package com.puppycrawl.tools.checkstyle.checks.coding;
+
+public class InputReturnCount
+{
+    public boolean equals(Object obj) {
+        int i = 1;
+        switch (i) {
+        case 1: return true;
+        case 2: return true;
+        case 3: return true;
+        case 4: return true;
+        case 5: return true;
+        case 6: return true;
+        }
+        return false;
+    }
+
+    void foo(int i) {
+        switch (i) {
+        case 1: return;
+        case 2: return;
+        case 3: return;
+        case 4: return;
+        case 5: return;
+        case 6: return;
+        }
+        return;
+    }
+
+    void foo1(int i) {
+        if (i == 1) {
+            return;
+        }
+        Object obj = new Object() {
+                void method1(int i) {
+                    switch (i) {
+                    case 1: return;
+                    case 2: return;
+                    case 3: return;
+                    case 4: return;
+                    case 5: return;
+                    }
+                    return;
+                }
+            };
+        return;
+    }
+}
+
+class Test {
+
+    public Test() {}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputReturnFromCatchCheck.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputReturnFromCatchCheck.java
new file mode 100644
index 0000000..d0519a0
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputReturnFromCatchCheck.java
@@ -0,0 +1,21 @@
+package  com.puppycrawl.tools.checkstyle.coding;
+
+public class InputReturnFromCatchCheck {
+    public void foo() {
+        try {
+            System.currentTimeMillis();
+        } catch (Exception e) {
+            return;
+        }
+    }
+
+    public void bar() {
+        try {
+            System.currentTimeMillis();
+        } catch (Exception e) {
+            if (System.currentTimeMillis() == 0) {
+                return;
+            }
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputReturnFromFinallyCheck.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputReturnFromFinallyCheck.java
new file mode 100644
index 0000000..27e2b3a
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputReturnFromFinallyCheck.java
@@ -0,0 +1,26 @@
+package  com.puppycrawl.tools.checkstyle.coding;
+
+public class InputReturnFromFinallyCheck {
+    public void foo() {
+        try {
+            System.currentTimeMillis();
+        } finally {
+            return;
+        }
+    }
+
+    public void bar() {
+        try {
+            System.currentTimeMillis();
+        } finally {
+            if (System.currentTimeMillis() == 0) {
+                return;
+            }
+        }
+    }
+    public void thisNull() {
+        boolean result = (this == null) || (null == this);
+        boolean result2 = (this != null) && (null != this);
+        boolean result3 = (this.getClass().getName() == String.valueOf(null == System.getProperty("abc")));
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputStringLiteralEquality.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputStringLiteralEquality.java
new file mode 100644
index 0000000..0b008c2
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputStringLiteralEquality.java
@@ -0,0 +1,47 @@
+package com.puppycrawl.tools.checkstyle.coding;
+
+/**
+ * Input file for the StringLiteralEqualityCheck
+ * @author Lars Kühne
+ */
+public class InputStringLiteralEquality
+{
+    void foo(String name)
+    {
+        if (name == "Lars")
+        {
+            // flagged, should use equals
+        }
+
+        if ("Oleg" == name)
+        {
+            // flagged, should use equals
+        }
+
+        if ("Oliver" == "Oliver")
+        {
+            // doesn't make much sense because this can be evaluated
+            // to true at compile time, but is flagged anyway
+        }
+
+        String compare = "Rick";
+        if (name == compare)
+        {
+            // currently not flagged.
+            //
+            // Implementing this is very complicated, we would need
+            // - type info on the == operands
+            // - prevent false alarms where the user explicitly wants
+            //   to compare object identities
+            //
+            // My current feeling is that we should leave finding
+            // this one to manual code inspections. After all MCI is
+            // what some of us get paid for :-)
+        }
+
+        if ("Rick".toUpperCase() == "Rick".toLowerCase())
+        {
+            // completly dynamic, don't flag
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputUnnecessaryParentheses.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputUnnecessaryParentheses.java
new file mode 100644
index 0000000..a1ddb8d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputUnnecessaryParentheses.java
@@ -0,0 +1,93 @@
+public class InputUnnecessaryParentheses {
+    int f1() {
+        int x = 0;
+        for (int i = (0+1); ((i) < (6+6)); i += (1+0)) {
+            x += (i + 100);
+            (x) += (i + 100);
+            x = (x + i + 100);
+            (x) = (x + i + 100);
+        }
+
+        for (int i = (0+1); (i) < ((6+6)); i += (1+0)) {
+            System.out.println("hi");
+        }
+
+        return (0);
+    }
+
+    private int f2(int arg1, double arg2) {
+        int x, a, b, c, d;
+        String e, f;
+
+        x = 0;
+        a = 0;
+        b = 0;
+        c = (a + b);
+        d = c - 1;
+
+        int i = (int) arg2;
+        i = ((int) arg2);
+
+        x += (i + 100 + arg1);
+        a = (a + b) * (c + d);
+        b = ((((a + b) * (c + d))));
+        c = (((a) <= b)) ? 0 : 1;
+        d = (a) + (b) * (600) / (int) (12.5f) + (int) (arg2);
+        e = ("this") + ("that") + ("is" + "other");
+        f = ("this is a really, really long string that should be truncated.");
+
+        return (x + a + b + d);
+    }
+
+    private boolean f3() {
+        int x = f2((1), (13.5));
+        boolean b = (true);
+        return (b);
+    }
+
+    public static int f4(int z, int a) {
+        int r = (z * a);
+        r = (a > z) ? a : z;
+        r = ((a > z) ? a : z);
+        r = (a > z) ? a : (z + z);
+        return (r * r - 1);
+    }
+
+    public void f5() {
+        int x, y;
+        x = 0;
+        y = 0;
+        if (x == y) {
+            print(x);
+        }
+        if ((x > y)) {
+            print(y);
+        }
+
+        while ((x < 10)) {
+            print(x++);
+        }
+
+        do {
+            print((y+=100));
+        } while (y < (4000));
+    }
+
+    private void f6(TypeA a) {
+        TypeB b = (TypeB) a;
+        TypeC c = ((TypeC) a);
+        int r = 12345;
+        r <<= (3);
+        TypeD<String> d = ((TypeD<String>) a);
+    }
+
+    private void print(int arg)
+    {
+        System.out.println("arg = " + arg);
+    }
+
+    static class TypeA {}
+    static class TypeB extends TypeA {}
+    static class TypeC extends TypeA {}
+    static class TypeD<T> extends TypeA {}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputVariableDeclarationUsageDistanceCheck.java b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputVariableDeclarationUsageDistanceCheck.java
new file mode 100644
index 0000000..d8c400d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/coding/InputVariableDeclarationUsageDistanceCheck.java
@@ -0,0 +1,567 @@
+package com.puppycrawl.tools.checkstyle.design;
+
+public class InputVariableDeclarationUsageDistanceCheck {
+
+	private static final int test1;
+
+	static {
+		int b;
+		int d;
+		{
+			d = ++b;
+		}
+	}
+
+	static {
+		int c;
+		int a = 3;
+		int b = 2;
+		{
+			a = a + b;
+			c = b;
+		}
+		{
+			c--;
+		}
+		a = 7;
+	}
+
+	static {
+		int a = -1;
+		int b = 2;
+		b++;
+		int c = --b;
+		a = b; // DECLARATION OF VARIABLE 'a' SHOULD BE HERE (distance = 2)
+	}
+
+	public InputVariableDeclarationUsageDistanceCheck(int test1) {
+		int temp = -1;
+		this.test1 = test1;
+		temp = test1; // DECLARATION OF VARIABLE 'temp' SHOULD BE HERE (distance = 2)
+	}
+
+	public boolean testMethod() {
+		int temp = 7;
+		new InputVariableDeclarationUsageDistanceCheck(2);
+		InputVariableDeclarationUsageDistanceCheck(temp); // DECLARATION OF VARIABLE 'temp' SHOULD BE HERE (distance = 2)
+		boolean result = false;
+		String str = "";
+		if (test1 > 1) {
+			str = "123";
+			result = true;
+		}
+		return result;
+	}
+
+	public void testMethod2() {
+		int count;
+		int a = 3;
+		int b = 2;
+		{
+			a = a
+					+ b
+					- 5
+					+ 2
+					* a;
+			count = b; // DECLARATION OF VARIABLE 'count' SHOULD BE HERE (distance = 2)
+		}
+	}
+
+	public void testMethod3() {
+		int count;
+		int a = 3;
+		int b = 3;
+		a = a + b;
+		b = a + a;
+		testMethod2();
+		count = b; // DECLARATION OF VARIABLE 'count' SHOULD BE HERE (distance = 4)
+	}
+
+	public void testMethod4(int arg) {
+		int d;
+		for (int i = 0; i < 10; i++) {
+			d++;
+			if (i > 5) {
+				d += arg;
+			}
+		}
+
+		String ar[] = { "1", "2" };
+		for (String st : ar) {
+			System.out.println(st);
+		}
+	}
+
+	public void testMethod5() {
+		int arg = 7;
+		boolean b = true;
+		boolean bb = false;
+		if (b)
+			if (!bb)
+				b = false;
+		testMethod4(arg); // DECLARATION OF VARIABLE 'arg' SHOULD BE HERE (distance = 2)
+	}
+
+	public void testMethod6() {
+		int blockNumWithSimilarVar = 3;
+		int dist = 0;
+		int index = 0;
+		int block = 0;
+
+		if (blockNumWithSimilarVar <= 1) {
+			do {
+				dist++;
+				if (block > 4) {
+					break;
+				}
+				index++;
+				block++;
+			} while (index < 7);
+		} else {
+			while (index < 8) {
+				dist += block;
+				index++;
+				block++;
+			}
+		}
+	}
+
+	public boolean testMethod7(int a) {
+		boolean res;
+		switch (a) {
+		case 1:
+			res = true;
+			break;
+		default:
+			res = false;
+		}
+		return res;
+	}
+
+	public void testMethod8() {
+		int b;
+		int c;
+		int m;
+		int n;
+		{
+			c++;
+			b++;
+		}
+		{
+			n++; // DECLARATION OF VARIABLE 'n' SHOULD BE HERE (distance = 2)
+			m++; // DECLARATION OF VARIABLE 'm' SHOULD BE HERE (distance = 3)
+			b++;
+		}
+	}
+
+	public void testMethod9() {
+		boolean result = false;
+		boolean b1 = true;
+		boolean b2 = false;
+		if (b1) {
+			if (!b2) {
+				result = true;
+			}
+			result = true;
+		}
+	}
+
+	public boolean testMethod10() {
+		boolean result;
+		try {
+			result = true;
+		} catch (IOException e) {
+			result = false;
+		} finally {
+			result = false;
+		}
+		return result;
+	}
+
+	public void testMethod11() {
+		int a = 0;
+		int b = 10;
+		boolean result;
+		try {
+			b--;
+		} catch (IOException e) {
+			b++;
+			result = false; // DECLARATION OF VARIABLE 'result' SHOULD BE HERE (distance = 2)
+		} finally {
+			a++;
+		}
+	}
+
+	public void testMethod12() {
+		boolean result = false;
+		boolean b3 = true;
+		boolean b1 = true;
+		boolean b2 = false;
+		if (b1) {
+			if (b3) {
+				if (!b2) {
+					result = true;
+				}
+				result = true;
+			}
+		}
+	}
+
+	public void testMethod13() {
+		int i = 9;
+		int j = 6;
+		int g = i + 8;
+		int k = j + 10;
+	}
+
+	public void testMethod14() {
+		Session s = openSession();
+		Transaction t = s.beginTransaction();
+		A a = new A();
+		E d1 = new E();
+		C1 c = new C1();
+		E d2 = new E();
+		a.setForward(d1);
+		d1.setReverse(a);
+		c.setForward(d2); // DECLARATION OF VARIABLE 'c' SHOULD BE HERE (distance = 3)
+							// DECLARATION OF VARIABLE 'd2' SHOULD BE HERE (distance = 3)
+		d2.setReverse(c);
+		Serializable aid = s.save(a);
+		Serializable d2id = s.save(d2);
+		t.commit(); // DECLARATION OF VARIABLE 't' SHOULD BE HERE (distance = 5)
+		s.close();
+	}
+
+	public boolean isCheckBoxEnabled(TreePath path) {
+		DataLabelModel model = (DataLabelModel) getModel();
+		if (recursiveState) {
+			for (int index = 0; index < path.getPathCount(); ++index) {
+				int nodeIndex = model.getNodeIndex(path.getPathComponent(index));
+				if (disabled.contains(nodeIndex)) {
+					return false;
+				}
+			}
+		} else {
+			int nodeIndex = model.getNodeIndex(path.getLastPathComponent());
+			if (disabled.contains(nodeIndex)) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	public Object readObject(IObjectInputStream in) throws IOException {
+		SimpleDay startDay = new SimpleDay(in.readInt());
+		SimpleDay endDay = new SimpleDay(in.readInt());
+		return new SimplePeriod(startDay, endDay);
+	}
+
+	public int[] getSelectedIndices() {
+		int[] selected = new int[paths.length];
+		DataLabelModel model = (DataLabelModel) getModel();
+		int a = 0;
+		a++;
+		for (int index = 0; index < paths.length; ++index) {
+			selected[index] = model.getNodeIndex(paths[index].getLastPathComponent()); // DECLARATION OF VARIABLE 'selected' SHOULD BE HERE (distance = 2)
+																						// DECLARATION OF VARIABLE 'model' SHOULD BE HERE (distance = 2)
+		}
+		return selected;
+	}
+
+	public void testMethod15() {
+		String confDebug = subst(element.getAttribute(CONFIG_DEBUG_ATTR));
+		if (!confDebug.equals("") && !confDebug.equals("null")) {
+			LogLog.warn("The \"" + CONFIG_DEBUG_ATTR + "\" attribute is deprecated.");
+			LogLog.warn("Use the \"" + INTERNAL_DEBUG_ATTR + "\" attribute instead.");
+			LogLog.setInternalDebugging(OptionConverter.toBoolean(confDebug, true));
+		}
+
+		int i = 0;
+		int k = 7;
+		boolean b = false;
+		for (; i < k; i++) {
+			b = true;
+			k++;
+		}
+
+		int sw;
+		switch (i) {
+		case 0:
+			k++;
+			sw = 0; // DECLARATION OF VARIABLE 'sw' SHOULD BE HERE (distance = 2)
+			break;
+		case 1:
+			b = false;
+			break;
+		default:
+			b = true;
+		}
+
+		int wh;
+		b = true;
+		do {
+			k--;
+			i++;
+		} while (wh > 0); // DECLARATION OF VARIABLE 'wh' SHOULD BE HERE (distance = 2)
+
+		if (wh > 0) {
+			k++;
+		} else if (!b) {
+			i++;
+		} else {
+			i--;
+		}
+	}
+
+	public void testMethod16() {
+		int wh = 1;
+		if (i > 0) {
+			k++;
+		} else if (wh > 0) {
+			i++;
+		} else {
+			i--;
+		}
+	}
+	
+	protected JMenuItem createSubMenuItem(LogLevel level) {
+	    final JMenuItem result = new JMenuItem(level.toString());
+	    final LogLevel logLevel = level;
+	    result.setMnemonic(level.toString().charAt(0));
+	    result.addActionListener(new ActionListener() {
+	      public void actionPerformed(ActionEvent e) {
+	        showLogLevelColorChangeDialog(result, logLevel); // DECLARATION OF VARIABLE 'logLevel' SHOULD BE HERE (distance = 2)
+	      }
+	    });
+
+	    return result;
+
+	  }
+	
+	public static Color darker(Color color, double fraction) {
+        int red = (int) Math.round(color.getRed() * (1.0 - fraction));
+        int green = (int) Math.round(color.getGreen() * (1.0 - fraction));
+        int blue = (int) Math.round(color.getBlue() * (1.0 - fraction));
+
+        if (red < 0) {
+            red = 0;
+        } else if (red > 255) {
+            red = 255;
+        }
+        if (green < 0) { // DECLARATION OF VARIABLE 'green' SHOULD BE HERE (distance = 2)
+            green = 0;
+        } else if (green > 255) {
+            green = 255;
+        }
+        if (blue < 0) { // DECLARATION OF VARIABLE 'blue' SHOULD BE HERE (distance = 3)
+            // blue = 0;
+        }
+
+        int alpha = color.getAlpha();
+
+        return new Color(red, green, blue, alpha);
+    }
+	
+	public void testFinal() {
+		AuthUpdateTask authUpdateTask = null;
+		final long intervalMs = 30 * 60000L; // 30 min
+
+        authUpdateTask = new AuthUpdateTask(authCheckUrl, authInfo, new IAuthListener() {
+            @Override
+            public void authTokenChanged(String cookie, String token) {
+                fireAuthTokenChanged(cookie, token);
+            }
+        });
+
+        Timer authUpdateTimer = new Timer("Auth Guard", true);
+        authUpdateTimer.schedule(authUpdateTask, intervalMs / 2, intervalMs); // DECLARATION OF VARIABLE 'intervalMs' SHOULD BE HERE (distance = 2)
+	}
+	
+	public void testForCycle() {
+		int filterCount = 0;
+		for (int i = 0; i < 10; i++, filterCount++) {
+			int abc = 0;
+			System.out.println(abc);
+
+			for (int j = 0; j < 10; j++) {
+				abc = filterCount;
+				System.out.println(abc);
+			}
+		}
+	}
+	
+	public void testIssue32_1()
+    {
+        Option srcDdlFile = OptionBuilder.create("f");
+        Option logDdlFile = OptionBuilder.create("o");
+        Option help = OptionBuilder.create("h");
+
+        Options options = new Options();
+        options.something();
+        options.something();
+        options.something();
+        options.something();
+        options.addOption(srcDdlFile, logDdlFile, help); // distance=1
+    }
+
+    public void testIssue32_2()
+    {
+        int mm = Integer.parseInt(time.substring(div + 1).trim());
+
+        Calendar cal = Calendar.getInstance();
+        cal.setTimeInMillis(timeNow);
+        cal.set(Calendar.SECOND, 0);
+        cal.set(Calendar.MILLISECOND, 0);
+        cal.set(Calendar.HOUR_OF_DAY, hh);
+        cal.set(Calendar.MINUTE, mm); // distance=1
+    }
+    
+    public void testIssue32_3(MyObject[] objects) {
+        Calendar cal = Calendar.getInstance();
+        for(int i=0; i<objects.length; i++) {
+            objects[i].setEnabled(true);
+            objects[i].setColor(0x121212);
+            objects[i].setUrl("http://google.com");
+            objects[i].setSize(789);
+            objects[i].setCalendar(cal); // distance=1
+        }
+    }
+    
+    public void testIssue32_4(boolean flag) {
+        StringBuilder builder = new StringBuilder();
+        builder.append("flag is ");
+        builder.append(flag);
+        final String line = ast.getLineNo();
+        if(flag) {
+            builder.append("line of AST is:");
+            builder.append("\n");
+            builder.append(String.valueOf(line)); //distance=1
+            builder.append("\n");
+        }
+        return builder.toString();
+    }
+    
+    public void testIssue32_5() {
+        Option a;
+        Option b;
+        Option c;
+        boolean isCNull = isNull(c); // distance=1
+        boolean isBNull = isNull(b); // distance=1
+        boolean isANull = isNull(a); // distance=1
+    }
+    
+    public void testIssue32_6() {
+        Option aOpt;
+        Option bOpt;
+        Option cOpt;
+        isNull(cOpt); // distance = 1
+        isNull(bOpt); // distance = 2
+        isNull(aOpt); // distance = 3
+    }
+    
+    public void testIssue32_7() {
+        String line = "abc";
+        writer.write(line);
+        line.charAt(1);
+        builder.append(line);
+        test(line, line, line);
+    }
+    
+    public void testIssue32_8(Writer w1, Writer w2, Writer w3) {
+        String l1="1", l2="2", l3="3";
+        w1.write(l3); //distance=1
+        w2.write(l2); //distance=2
+        w3.write(l1); //distance=3
+    }
+    
+    public void testIssue32_9() {
+        Options options = new Options();
+        Option myOption = null;
+        options.addBindFile(null);
+        options.addBindFile(null);
+        options.addBindFile(null);
+        options.addBindFile(null);
+        options.addBindFile(null);
+        System.out.println("message");
+        myOption.setArgName("abc"); // distance=7
+    }
+    
+    public void testIssue32_10() {
+        Options options = new Options();
+        Option myOption = null;
+        options.addBindFile(null);
+        options.addBindFile(null);
+        options.addBindFile(null);
+        options.addBindFile(null);
+        options.addBindFile(null);
+        myOption.setArgName("q"); // distance=6
+    }
+    
+    public int testIssue32_11(File toDir)
+            throws IOException, FTPException,
+            ParseException, InterruptedException
+    {
+        int count = 0;
+        FTPFile[] files = client.dirDetails(".");
+
+        log.info("Data archivation started");
+        archiveOldData(archDir, files);
+        log.info("Data archivation finished");
+
+        if (files == null || files.length == 0) {
+            warn("No files on a remote site");
+        }
+        else {
+            log.debug("Files on remote site: " + files.length);
+
+            for (FTPFile ftpFile : files) {
+                if (!file.exists()) {
+                    getFile(client, ftpFile, file);
+                    file.setLastModified(ftpFile.lastModified().getTime());
+                    count++;
+                }
+            }
+        }
+
+        client.quit();
+
+        return count;
+    }
+    
+    //////////////////////////////////////////////////
+    // False positive. Will be fixed in future.
+    //////////////////////////////////////////////////
+    private TreeMapNode buildTree(List<Object[]> tree)
+    {
+        state.clear();
+        revState.clear();
+        TreeMapNode root = null;
+        for (Object[] s : tree) {
+            Integer id = (Integer) s[0];
+            String label = (String) s[1];
+            Integer parentId = (Integer) s[2]; ///!!!!!!!!
+            Number weight = (Number) s[3];
+            Number value = (Number) s[4];
+            Integer childCount = (Integer) s[5];
+            TreeMapNode node;
+            if (childCount == 0) {
+                node = new TreeMapNode(label,
+                        weight != null ? weight.doubleValue() : 0.0,
+                        new DefaultValue(value != null ? value.doubleValue()
+                                : 0.0));
+            }
+            else {
+                node = new TreeMapNode(label);
+            }
+            state.put(id, node);
+            revState.put(node, id);
+            if (parentId == null || parentId == -1) { ///!!!!!!!
+                root = node;
+            }
+            else {
+                state.get(parentId).add(node);
+            }
+        }
+        return root;
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/configs/checkstyle_checks.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/checkstyle_checks.xml
new file mode 100644
index 0000000..96737f5
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/checkstyle_checks.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<module name="Checker">
+    <property name="tabWidth" value="4" />
+    <property name="basedir" value="${checkstyle.basedir}" />
+    <module name="TreeWalker">
+        <module name="AvoidStarImport"/>
+        <module name="MemberName">
+            <property name="format" value="^m_[a-zA-Z0-9]*$"/>
+        </module>
+        <property name="testName" value="testValue" />
+        <module name="ConstantName"/>
+        <module name="EmptyBlock"/>
+        <module name="EqualsHashCode"/>
+        <module name="FileLength"/>
+        <module name="NoWhitespaceAfter">
+            <property name="tokens" value="DOT"/>
+            <property name="allowLineBreaks" value="true"/>
+        </module>
+        <module name="GenericIllegalRegexp">
+            <property name="format" value="System.out.println"/>
+        </module>
+    </module>
+    <module name="JavadocPackage"/>
+    <module name="Translation"/>
+</module>
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/configs/custom_messages.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/custom_messages.xml
new file mode 100644
index 0000000..13d0c20
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/custom_messages.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+
+<module name="Checker">
+    <property name="tabWidth" value="4" />
+    <property name="basedir" value="${checkstyle.basedir}" />
+    <module name="TreeWalker">
+        <module name="MemberName">
+            <property name="format" value="^m[a-zA-Z0-9]*$"/>
+            <message key="name.invalidPattern"
+                     value="Member ''{0}'' must start with a lowercase ''m'' (checked pattern ''{1}'')."
+                     />
+        </module>
+    </module>
+</module>
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/configs/empty_configuration.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/empty_configuration.xml
new file mode 100644
index 0000000..7077da0
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/empty_configuration.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<module name="Checker">
+</module>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/configs/included.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/included.xml
new file mode 100644
index 0000000..11a9f07
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/included.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- this is an XML fragment, not valid XML by itself. -->
+<module name="JavadocPackage"/>
+<module name="Translation"/>
+<property name="basedir" value="${checkstyle.basedir}" />
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/configs/including.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/including.xml
new file mode 100644
index 0000000..40604d5
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/including.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd" [
+  <!ENTITY includedConfig SYSTEM "included.xml">
+]>
+
+<module name="Checker">
+    <property name="tabWidth" value="4" />
+    &includedConfig;
+</module>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/configs/missing_config_name.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/missing_config_name.xml
new file mode 100644
index 0000000..8582b33
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/missing_config_name.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<module nam="Checker">
+    <property name="tabWidth" value="4"/>
+</module>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/configs/missing_config_parent.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/missing_config_parent.xml
new file mode 100644
index 0000000..4ab4de3
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/missing_config_parent.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<property name="tabWidth" value="4"/>
+
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/configs/missing_property_name.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/missing_property_name.xml
new file mode 100644
index 0000000..77d219e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/missing_property_name.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<module name="Checker">
+    <property nam="tabWidth" value="4"/>
+</module>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/configs/missing_property_value.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/missing_property_value.xml
new file mode 100644
index 0000000..4f61132
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/missing_property_value.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<module name="Checker">
+    <property name="tabWidth" valu="4"/>
+</module>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/configs/subdir/including.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/subdir/including.xml
new file mode 100644
index 0000000..b4f2b00
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/configs/subdir/including.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd" [
+  <!ENTITY includedConfig SYSTEM "../included.xml">
+]>
+
+<module name="Checker">
+    <property name="tabWidth" value="4" />
+    &includedConfig;
+</module>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/design/HideUtilityClassContructor3041574_1.java b/src/test/resources/com/puppycrawl/tools/checkstyle/design/HideUtilityClassContructor3041574_1.java
new file mode 100644
index 0000000..dc80fb3
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/design/HideUtilityClassContructor3041574_1.java
@@ -0,0 +1,8 @@
+package com.puppycrawl.tools.checkstyle.design;
+
+import java.io.Serializable;
+
+public abstract class HideUtilityClassContructor3041574_1 implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/design/HideUtilityClassContructor3041574_2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/design/HideUtilityClassContructor3041574_2.java
new file mode 100644
index 0000000..af76f0d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/design/HideUtilityClassContructor3041574_2.java
@@ -0,0 +1,8 @@
+package com.puppycrawl.tools.checkstyle.design;
+
+import java.io.Serializable;
+
+public class HideUtilityClassContructor3041574_2 implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/design/HideUtilityClassContructor3041574_3.java b/src/test/resources/com/puppycrawl/tools/checkstyle/design/HideUtilityClassContructor3041574_3.java
new file mode 100644
index 0000000..2fc8da0
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/design/HideUtilityClassContructor3041574_3.java
@@ -0,0 +1,48 @@
+package com.puppycrawl.tools.checkstyle.design;
+
+import java.io.Serializable;
+
+public class HideUtilityClassContructor3041574_3 implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    public HideUtilityClassContructor3041574_3(int i) {
+        // no code
+    }
+
+    public String getValue() {
+        return "";
+    }
+    
+    // It is NOT Utility Inner class
+    @SuppressWarnings("unused")
+    public static class Event {
+        // Top level class have access to fields - no need in public getters
+        private String ind;
+        private String ind1;
+        
+        public Event(String value){
+            // do a lot of calculations
+        }
+        
+        // static because this method is utility
+        public static String getEmptyString() {
+            return "";
+        }
+    }
+    
+    // It is Utility Inner class
+    @SuppressWarnings("unused")
+    public static class Event1 {
+        private String ind;
+        private String ind1;
+        
+        private Event1(){
+            // do a lot of calculations
+        }
+        
+        // static because this method is utility
+        public static String getEmptyString() {
+            return "";
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputInnerClassCheck.java b/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputInnerClassCheck.java
new file mode 100644
index 0000000..fdc92c7
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputInnerClassCheck.java
@@ -0,0 +1,82 @@
+package com.puppycrawl.tools.checkstyle.design;
+
+public class InputInnerClassCheck {
+	public int test1 = 100;
+
+	public void methodTestInner1() {
+		double test2 = 200;
+
+		class InnerInMethod1 {
+			void methodTest1() {
+				System.out.println("test1");
+			}
+		}
+
+		int test3 = 300; //error
+	}
+
+	public void methodTestInner2() {
+		int test5 = 500;
+
+		class InnerInMethod2 {
+			int test6 = 500;
+		}
+
+		int test6 = 600; //error
+		int test8 = 800; //error
+	}
+
+	class Inner1 {
+		int test4 = 400;
+
+		public void methodTestInner3() {
+			int test9 = 500;
+
+			class InnerInMethod3 {
+				int test10 = 500;
+			}
+
+			int test11 = 600; //error
+			int test12 = 800; //error
+		}
+	}
+
+	void methodTest2() { //error
+		System.out.println("test2");
+	}
+}
+
+class Temp2 {
+	class Inner1 {
+		int test4 = 400;
+
+		public void methodTestInner3() {
+			int test9 = 500;
+
+			class InnerInMethod3 {
+				int test10 = 500;
+			}
+
+			int test11 = 600; //error
+			int test12 = 800; //error
+		}
+	}
+
+	void methodTest2() { //error
+		System.out.println("test2");
+	}
+
+	private int i = 0; //error
+}
+
+class Temp3 {
+    
+    class InnerCheck {
+        private int I = 0;
+    }
+    
+    public int[] getDefaultTokens()
+    {
+        return new int[]{1, };
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputMutableException.java b/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputMutableException.java
new file mode 100644
index 0000000..d2a85eb
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputMutableException.java
@@ -0,0 +1,25 @@
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+public class InputMutableException {
+    public class FooException {
+        private final int _finalErrorCode;
+        private int _errorCode = 1;
+
+        public FooException() {
+            _finalErrorCode = 1;
+        }
+
+        public class FooExceptionThisIsNot {
+            private final int _finalErrorCode;
+            private int _errorCode = 1;
+
+            public FooExceptionThisIsNot() {
+                _finalErrorCode = 1;
+            }
+        }
+    }
+
+    public class FooError {
+        private int _errorCode;
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputNonUtilityClass.java b/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputNonUtilityClass.java
new file mode 100644
index 0000000..57fa5e0
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputNonUtilityClass.java
@@ -0,0 +1,21 @@
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import java.awt.Dimension;
+import javax.swing.JPanel;
+
+/**
+ * Not a util class because it's not directly derived from java.lang.Object.
+ */
+public class InputNonUtilityClass extends JPanel
+{
+    /** HideUtilityClassConstructorCheck should not report this */
+    public InputNonUtilityClass()
+    {
+	this.setPreferredSize(new Dimension(100, 100));
+    }
+
+    public static void utilMethod()
+    {
+	System.out.println("I'm a utility method");
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputOneTopLevelClass.java b/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputOneTopLevelClass.java
new file mode 100644
index 0000000..bd68fb9
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputOneTopLevelClass.java
@@ -0,0 +1,81 @@
+package net.ubiquity.tools.checkstyle.tests;
+
+public class InputOneTopLevelClass
+{
+    static final int FOO2 = 3;
+
+    // error public before package
+    public static final int FOO = 3;
+    
+    private static final int FOO3 = 3;
+   
+    // eror public before package and private
+    public static final int FOO4 = 3;
+
+    private static final String ERROR = "error";
+
+    // error protected before private
+    protected static final String ERROR1 = "error";
+   
+    // error public before private
+    public static final String WARNING = "warning";
+    
+    private int mMaxInitVars = 3;
+    
+    // error statics should be before instance members
+    // error publics before private
+    public static final int MAX_ITER_VARS = 3;
+
+    private class InnerClass
+    {
+        private static final int INNER_FOO = 2;
+       
+        // error public before private
+        public static final int INNER_FOO2 = 2;
+
+        public InnerClass()
+        {
+            int foo = INNER_FOO;
+            foo += INNER_FOO2;
+            foo += INNER_FOO3;
+        }
+
+        // error member variables should be before methods or ctors
+        // error public before private
+        public static final int INNER_FOO3 = 2;
+    }
+
+    public int getFoo1()
+    {
+        return mFoo;
+    }
+
+    //  error ctors before methods
+    public InputDeclarationOrder()
+    {
+        String foo = ERROR;
+        foo += ERROR1;
+        foo += WARNING;
+        int fooInt = mMaxInitVars;
+        fooInt += MAX_ITER_VARS;
+        fooInt += mFoo;
+    }
+
+    public static int getFoo2()
+    {
+        return 13;
+    }
+
+    public int getFoo()
+    {
+        return mFoo;
+    }
+
+    private static int getFoo21()
+    {
+        return 14;
+    }
+
+    // error member variables should be before methods or ctors
+    private int mFoo = 0;
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputRegression1762702.java b/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputRegression1762702.java
new file mode 100644
index 0000000..58cb58d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputRegression1762702.java
@@ -0,0 +1,16 @@
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+/**
+ * Input for HideUtilityClassConstructorCheck, a non utility class that has 
+ * 
+ * @author lkuehne
+ */
+public class InputRegression1762702
+{
+    public long constructionTime = System.currentTimeMillis();
+
+    public static InputRegression1762702 create()
+    {
+        return new InputRegression1762702();
+    }
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputThrowsCount.java b/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputThrowsCount.java
new file mode 100644
index 0000000..cdd5116
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/design/InputThrowsCount.java
@@ -0,0 +1,28 @@
+package com.puppycrawl.tools.checkstyle.checks.design;
+
+import java.awt.AWTException;
+
+public class InputThrowsCount {
+    void method1() throws Exception
+    {
+    }
+
+    void methdo2() throws java.awt.AWTException
+    {
+    }
+
+    void method3() throws Exception, AWTException
+    {
+    }
+
+    void method4() throws Exception, java.awt.AWTException
+    {
+    }
+
+    void method5() throws Exception, AWTException, Throwable
+    {
+    }
+
+    void method6() {
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/A.java b/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/A.java
new file mode 100644
index 0000000..f52e6a3
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/A.java
@@ -0,0 +1,10 @@
+import java.util.List;
+import java.util.ArrayList;
+import java.util.LinkedList;
+
+public class A
+{
+    public static final int X = 0;
+    public static final int Y = 1;
+    public static final int Z = 2;
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/B.java b/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/B.java
new file mode 100644
index 0000000..251400d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/B.java
@@ -0,0 +1,10 @@
+import java.util.List;
+import java.util.ArrayList;
+import java.util.LinkedList;
+
+public class B
+{
+    public static final int Y = 1;
+    public static final int X = 0;
+    public static final int Z = 2;
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/InnerDup.java b/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/InnerDup.java
new file mode 100644
index 0000000..bb5bbd0
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/InnerDup.java
@@ -0,0 +1,53 @@
+public class InnerDup
+{
+    int x = 0;
+    
+    public void m1()
+    {
+        x += 1;
+        x += 2;
+        x += 3;
+        x += 4;
+        x += 5;
+        x += 6;
+        x += 7;
+        x += 8;
+        x += 9;
+        x += 10;
+        x += 11;
+        x += 12;
+    }
+
+    public void m2()
+    {
+        x += 1;
+        x += 2;
+        x += 3;
+        x += 4;
+        x += 5;
+        x += 6;
+        x += 7;
+        x += 8;
+        x += 9;
+        x += 10;
+        x += 11;
+        x += 12;
+        x += 13;
+        x += 14;
+    }
+
+    public void m3()
+    {
+        x += 1;
+        x += 2;
+        x += 3;
+        x += 4;
+        x += 5;
+        x += 6;
+        x += 7;
+        x += 8;
+        x += 9;
+        x += 10;
+    }
+
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/LotsOfEmptyLines.java b/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/LotsOfEmptyLines.java
new file mode 100644
index 0000000..9952583
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/LotsOfEmptyLines.java
@@ -0,0 +1,36 @@
+// A class that contains lots of empty lines
+// such files frequently occur in the JDK source code, most notably the machine generated nio Buffer variants
+
+public class LotsOfEmptyLines {
+// 15 empty lines
+    
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
+// 15 empty lines below
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/Overlapping.java b/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/Overlapping.java
new file mode 100644
index 0000000..423965f
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/Overlapping.java
@@ -0,0 +1,30 @@
+// A class that has overlapping areas of duplication (min=3)
+
+public class Overlapping {
+
+    public void m1() {
+        int a = 0;
+        int b = 0;
+        int c = 0;
+        int d = 0;
+    }
+
+    public void m2() {
+        int a = 0;
+        int b = 0;
+        int c = 0;
+    }
+
+    public void m3() {
+        int b = 0;
+        int c = 0;
+        int d = 0;
+    }
+
+    public void m4() {
+        int a = 0;
+        int b = 0;
+        int c = 0;
+        int d = 0;
+    }
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/Shorty.java b/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/Shorty.java
new file mode 100644
index 0000000..f586a3e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/duplicates/Shorty.java
@@ -0,0 +1,4 @@
+// A class that is shorter than the number of lines considered a duplicate
+
+public class Shorty {
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/filters/InputSuppressWarningsFilter.java b/src/test/resources/com/puppycrawl/tools/checkstyle/filters/InputSuppressWarningsFilter.java
new file mode 100644
index 0000000..fce47a8
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/filters/InputSuppressWarningsFilter.java
@@ -0,0 +1,60 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.filters;
+
+/**
+ * Test input for using comments to suppress errors.
+ *
+ * @author Trevor Robinson
+ **/
+ at SuppressWarnings("foo") // coverage: no following AST
+class InputSuppressWarningsFilter
+{
+    // AST coverage
+    @SuppressWarnings("foo") interface I { }
+    @SuppressWarnings("foo") enum E { }
+    @SuppressWarnings("foo") InputSuppressWarningsFilter() { }
+    @SuppressWarnings("foo") @interface A { }
+
+    // include a non-checkstyle suppression; suppression on same line
+    @SuppressWarnings("unused") private int I; // should fail MemberNameCheck
+    @SuppressWarnings({"membername"})
+    private int J; // should NOT fail MemberNameCheck
+    private int K; // should fail MemberNameCheck
+
+    // DO NOT REFORMAT: L and X should be on the same line
+    @SuppressWarnings(value="membername")
+    private int L; private int X; // L should NOT fail, X should
+
+    // test "checkstyle:" prefix
+    @SuppressWarnings("checkstyle:constantname")
+    private static final int m = 0; // should NOT fail ConstantNameCheck
+    private static final int n = 0; // should fail ConstantNameCheck
+
+    // test explicit warning alias
+    @SuppressWarnings("paramnum")
+    // should NOT fail ParameterNumberCheck
+    public void needsLotsOfParameters(@SuppressWarnings("unused") int a,
+        int b, int c, int d, int e, int f, int g, int h)
+    {
+        @SuppressWarnings("unused") int z;
+        try {
+        }
+        catch (Exception ex) {
+            // should fail IllegalCatchCheck
+        }
+    }
+
+    // test fully qualified annotation name
+    @java.lang.SuppressWarnings("illegalcatch")
+    public void needsToCatchException()
+    {
+        try {
+        }
+        catch (Exception ex) {
+            // should NOT fail IllegalCatchCheck
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/filters/InputSuppressWithNearbyCommentFilter.java b/src/test/resources/com/puppycrawl/tools/checkstyle/filters/InputSuppressWithNearbyCommentFilter.java
new file mode 100644
index 0000000..0223827
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/filters/InputSuppressWithNearbyCommentFilter.java
@@ -0,0 +1,77 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.filters;
+
+/**
+ * Test input for using comments to suppress errors.
+ * 
+ * @author Mick Killianey
+ */
+class InputSuppressWithNearbyCommentFilter
+{
+    private int A1;  // SUPPRESS CHECKSTYLE MemberNameCheck
+    private int A2;  /* SUPPRESS CHECKSTYLE MemberNameCheck */
+    /* SUPPRESS CHECKSTYLE MemberNameCheck */ private int A3;  
+    
+    private int B1;  // SUPPRESS CHECKSTYLE MemberNameCheck
+    private int B2;  /* SUPPRESS CHECKSTYLE MemberNameCheck */
+    /* SUPPRESS CHECKSTYLE MemberNameCheck */ private int B3;  
+    
+    private int C1;
+    // ALLOW MemberName ON NEXT LINE
+    private int C2;
+    private int C3;  
+    
+    private int D1;
+    private int D2;
+    // ALLOW MemberName ON PREVIOUS LINE
+    private int D3;  
+    
+    private static final int e1 = 0;
+    private int E2;
+    private int E3;    // ALLOW ConstantName UNTIL THIS LINE+2
+    private static final int e4 = 0;
+    private int E5;
+    private static final int e6 = 0;
+    private int E7;
+    private int E8;    /* ALLOW MemberName UNTIL THIS LINE-3 */
+    private static final int e9 = 0;
+    
+    // ALLOW Unused UNTIL THIS LINE+5
+    public static void doit1(int aInt) // this is +1
+    {
+    }
+
+    public static void doit2(int aInt) // this is +5
+    {
+    }
+
+    public static void doit3(int aInt) // this is +9
+    {
+    }
+
+    public void doit4()
+    {
+        try {
+            // blah blah blah
+            for(int i = 0; i < 10; i++) {
+                // blah blah blah
+                while(true) {
+                    try {
+                        // blah blah blah
+                    } catch(Exception e) {
+                        // bad bad bad
+                    } catch (Throwable t) {
+                    	// ALLOW CATCH Throwable BECAUSE I threw this together.
+                    }
+                }
+                // blah blah blah
+            }
+            // blah blah blah
+        } catch(Exception ex) {
+            // ALLOW CATCH Exception BECAUSE I am an exceptional person.
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/filters/InputSuppressionCommentFilter.java b/src/test/resources/com/puppycrawl/tools/checkstyle/filters/InputSuppressionCommentFilter.java
new file mode 100644
index 0000000..de8dc67
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/filters/InputSuppressionCommentFilter.java
@@ -0,0 +1,83 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+////////////////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.filters;
+
+/**
+ * Test input for using comments to suppress errors.
+ * @author Rick Giles
+ **/
+class InputSuppressionCommentFilter
+{
+    private int I;
+    
+    /* CHECKSTYLE:OFF */
+    private int J;
+    /* CHECKSTYLE:ON */
+    
+    private int K;
+
+    //CSOFF: MemberNameCheck|ConstantNameCheck
+    private int L;
+    private static final int m = 0;
+    /*
+     * CSON: MemberNameCheck
+     */
+    private int M2;
+    private static final int n = 0;
+    //CSON: ConstantNameCheck
+    
+    //CS_OFF
+    private int P;
+    //CS_ON
+    
+    private int Q;
+    
+    //CS_OFF: ConstantNameCheck
+    private int R;
+    private static final int s = 0;
+    //CS_ON
+    
+    //CHECKSTYLE:OFF
+    private int T;
+    //CHECKSTYLE:ON
+
+    //UNUSED OFF: aInt
+    public static void doit1(int aInt)
+    {
+    }
+    //UNUSED ON: aInt
+    public static void doit2(int aInt)
+    {
+    }
+
+    public void doit3()
+    {
+        try {
+            // lots of code omitted
+            for(int i = 0; i < 10; i++) {
+                // more code omitted
+                while(true) {
+                    try {
+                        //CHECKSTYLE:OFF
+                    } catch(Exception e) {
+                       //CHECKSTYLE:ON
+                    }
+                }
+                // code omitted
+            }
+            //CHECKSTYLE:OFF
+        } catch(Exception ex) {
+            //CHECKSTYLE:ON
+        }
+
+        try{
+            //IllegalCatchCheck OFF: Exception
+        } catch(RuntimeException ex){
+        } catch(Exception ex){
+            //IllegalCatchCheck ON: Exception
+        }
+    }
+
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/Bug3553541.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/Bug3553541.java
new file mode 100644
index 0000000..18758d8
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/Bug3553541.java
@@ -0,0 +1,17 @@
+package com.puppycrawl.tools.checkstyle.grammars;
+
+import java.util.List;
+import java.util.ArrayList;
+
+// Demonstrates the bug #3553541
+class Bug3553541
+{
+    List<? super long[]> a;
+    {
+        a = new ArrayList<long[]>();
+    }
+    List<? super Integer[]> b;
+    {
+        b = new ArrayList<Integer[]>();
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/EofBug1667137.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/EofBug1667137.java
new file mode 100644
index 0000000..266895b
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/EofBug1667137.java
@@ -0,0 +1,14 @@
+package com.puppycrawl.tools.checkstyle.grammars;
+
+// Demonstrates the bug #1667137
+class EofBug1667137 {
+
+    void checkstyleIsBroken() {
+        EofBug1667137 borkage = new EofBug1667137() {
+
+                <T extends EofBug1667137> T borked(T brokenness) {
+                    return brokenness;
+                }
+            };
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputEmbeddedNullChar.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputEmbeddedNullChar.java
new file mode 100644
index 0000000..6c318eb
Binary files /dev/null and b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputEmbeddedNullChar.java differ
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputGrammar.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputGrammar.java
new file mode 100644
index 0000000..c743ce2
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputGrammar.java
@@ -0,0 +1,9 @@
+package com.puppycrawl.tools.checkstyle.grammars;
+
+/**
+ * Input for grammar test.
+ */
+public class InputGrammar
+{
+    int é = 1; // illegal, unless UTF-8
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputHexFloat.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputHexFloat.java
new file mode 100644
index 0000000..e02ec58
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputHexFloat.java
@@ -0,0 +1,16 @@
+package com.puppycrawl.tools.checkstyle.grammars;
+
+/**
+ * Input for hex float and double test.
+ */
+public class InputHexFloat
+{
+    double f1 = 0x.0P10;
+    double f2 = 0x1.P-1;
+    double f3 = 0Xab1P0;
+    double f4 = 0Xab1ap+20;
+    double f5 = 0Xab1ap+20D;
+    double f6 = 0Xab1ap+20d;
+    double f7 = 0Xab1ap+20f;
+    double f8 = 0Xab1ap+20F;
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7Diamond.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7Diamond.java
new file mode 100644
index 0000000..8b220bc
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7Diamond.java
@@ -0,0 +1,10 @@
+package com.puppycrawl.tools.checkstyle.grammars;
+
+import java.util.*;
+
+public class InputJava7Diamond {
+	HashMap<String, Integer> map = new HashMap<String, Integer>();
+	HashMap<String, Integer> map2 = new HashMap<>();
+	HashMap<String, HashMap<Integer, Integer>> map3 = new HashMap<>();
+	ArrayList<String> list = new ArrayList<>();
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7MultiCatch.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7MultiCatch.java
new file mode 100644
index 0000000..b6afe5e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7MultiCatch.java
@@ -0,0 +1,30 @@
+package com.puppycrawl.tools.checkstyle.grammars;
+
+import java.io.*;
+
+/**
+ * Input for Java 7 multi-catch.
+ */
+public class InputJava7MultiCatch
+{
+    public static class CustomException extends Exception { }
+    public static class AnotherCustomException extends RuntimeException { }
+
+    public static void logException(Exception e) { }
+
+    public static void main(String[] args) {
+        try {
+            FileInputStream in = new FileInputStream("InputJava7MultiCatch.java");
+            throw new CustomException(); 
+        } catch (FileNotFoundException | CustomException e) {
+            logException(e);
+        }
+
+        try {
+            FileInputStream in = new FileInputStream("InputJava7MultiCatch.java");
+            throw new CustomException(); 
+        } catch (final FileNotFoundException | CustomException | com.puppycrawl.tools.checkstyle.grammars.InputJava7MultiCatch.AnotherCustomException e) {
+            logException(e);
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7NumericalLiterals.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7NumericalLiterals.java
new file mode 100644
index 0000000..813256a
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7NumericalLiterals.java
@@ -0,0 +1,84 @@
+package com.puppycrawl.tools.checkstyle.grammars;
+
+/**
+ * Input for Java 7 numerical literals.
+ */
+public class InputJava7NumericalLiterals
+{
+    int i1 = 0b00011110;
+    int i2 = 0B00011110;
+    int i3 = 0xA;
+    int i4 = 0x1___A_F;
+    int i5 = 0b1;
+    int i6 = 0b1___1_0;
+    int i7 = 0;
+    int i8 = 02;
+    int i9 = 0_123;
+    int i10 = 1;
+    int i11 = 1___3;
+    int i12 = 1_43_43598_7;
+    
+    long l1 = 0b00011110L;
+    long l2 = 0B00011110l;
+    long l3 = 0xAL;
+    long l4 = 0x1___A_FL;
+    long l5 = 0b1L;
+    long l6 = 0b1___1_0L;
+    long l7 = 0l;
+    long l8 = 02L;
+    long l9 = 0_123l;
+    long l10 = 1l;
+    long l11 = 1___3l;
+    long l12 = 1_43_43598_7L;
+    long l13 = 1_43_43598_7; // int promoted to long
+    
+    // the grammar considers floating point values to be of type "float" by default which is wrong, it should be "double".
+    
+    float f1 = .1f;
+    float f2 = (float) 1.; // double "downgraded" to float
+    float f3 = 0f;
+    float f4 = (float) 1e0; // double "downgraded" to float
+    float f5 = 1e0f;
+    float f6 = 12.345F;
+    float f7 = (float) .5____2_1; // double "downgraded" to float
+    float f8 = (float) 1__42__3.; // double "downgraded" to float
+    float f9 = 0__2_4__324f;
+    float f10 = (float) 1_34e0; // double "downgraded" to float
+    float f11 = 1__1_2e0f;
+    float f12 = 2_1___2.3__4_5F;
+    float f13 = (float) 1_34e0__4__3; // double "downgraded" to float
+    float f14 = 1__1_2e00__000_4f;
+    float f15 = 2_1___2.3__4_5e00______0_5F;
+    
+    double d1 = .1d;
+    double d2 = 1.D;
+    double d3 = 0d;
+    double d4 = 1e0D;
+    double d5 = 1e0d;
+    double d6 = 12.345D;
+    double d7 = .5____2_1d;
+    double d8 = 1__42__3.D;
+    double d9 = 0__2_4__324d;
+    double d10 = 1_34e0d;
+    double d11 = 1__1_2e0d;
+    double d12 = 2_1___2.3__4_5D;
+    double d13 = 1_34e0__4__3d;
+    double d14 = 1__1_2e00__000_4d;
+    double d15 = 2_1___2.3__4_5e00______0_5D;
+    double d16 = 0.12___34; // "float" promoted to double
+    
+    float hf1 = (float) 0x.1___AFp1; // double "downgraded" to float
+    float hf2 = 0x.1___AFp0__0__0f;
+    float hf3 = 0x2__3_34.4___AFP00_00f;
+    
+    double hd1 = 0x.1___AFp1;
+    double hd2 = 0x.1___AFp0__0__0d;
+    double hd3 = 0x2__3_34.4___AFP00_00d;
+    
+    int doc1 = 1234_5678;
+    long doc2 = 1_2_3_4__5_6_7_8L;
+    int doc3 = 0b0001_0010_0100_1000;
+    double doc4 = 3.141_592_653_589_793d;
+    double doc5 = 0x1.ffff_ffff_ffff_fP1_023; // Double.MAX_VALUE
+
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7StringSwitch.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7StringSwitch.java
new file mode 100644
index 0000000..e4cbf36
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7StringSwitch.java
@@ -0,0 +1,20 @@
+package com.puppycrawl.tools.checkstyle.grammars;
+
+/**
+ * Input for Java 7 String in Switch.
+ */
+public class InputJava7StringSwitch
+{
+    public static void main(String[] args) {
+        String mystr = "value" + "2";
+
+        switch (mystr) {
+            case "value1":
+                break;
+            case "value2":
+                break;
+            default:
+                break;
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7TryWithResources.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7TryWithResources.java
new file mode 100644
index 0000000..caeed9c
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputJava7TryWithResources.java
@@ -0,0 +1,39 @@
+package com.puppycrawl.tools.checkstyle.grammars;
+
+/**
+ * Input for Java 7 try-with-resources.
+ */
+public class InputJava7TryWithResources
+{
+    public static class MyResource implements AutoCloseable {
+        @Override
+        public void close() throws Exception { }
+    }
+
+    public static void main(String[] args) throws Exception {
+        try (MyResource resource = new MyResource()) { }
+
+        try (MyResource resource = new MyResource()) { }
+        finally { }
+
+        try (MyResource resource = new MyResource();) { }
+        catch (Exception e) { }
+
+        try (MyResource resource = new MyResource();) { }
+        catch (Exception e) { }
+        catch (Throwable t) { }
+        finally { }
+       
+        try (MyResource resource = new MyResource(); MyResource resource2 = new MyResource()) { }
+        catch (Exception e) { }
+        catch (Throwable t) { }
+        finally { }
+       
+        try (MyResource resource = new MyResource(); MyResource resource2 = new MyResource();) { }
+        catch (Exception e) { }
+        catch (Throwable t) { }
+        finally { }
+
+        try (@SuppressWarnings("all") final MyResource resource = new MyResource()) { }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputVararg.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputVararg.java
new file mode 100644
index 0000000..6469f07
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/InputVararg.java
@@ -0,0 +1,11 @@
+package com.puppycrawl.tools.checkstyle.grammars;
+
+/**
+ * Input for vararg test.
+ */
+public class InputVararg
+{
+    public static void main(String... args)
+    {
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/LineCommentAtTheEndOfFile.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/LineCommentAtTheEndOfFile.java
new file mode 100644
index 0000000..87697ea
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/LineCommentAtTheEndOfFile.java
@@ -0,0 +1,5 @@
+package com.puppycrawl.tools.checkstyle.grammars;
+
+public class LineCommentAtTheEndOfFile
+{
+} // EOF on this line
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/SemicolonBetweenImports.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/SemicolonBetweenImports.java
new file mode 100644
index 0000000..79a64e5
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/SemicolonBetweenImports.java
@@ -0,0 +1,9 @@
+package com.puppycrawl.tools.checkstyle.grammars;
+
+import java.util.Arrays;
+;
+import java.util.ArrayList;
+
+public class SemicolonBetweenImports
+{
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/UnicodeEscape.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/UnicodeEscape.java
new file mode 100644
index 0000000..945ba16
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/UnicodeEscape.java
@@ -0,0 +1,32 @@
+package com.puppycrawl.tools.checkstyle.grammars;
+
+/**
+ * Input for unicode escapes.
+ */
+public class UnicodeEscape
+{
+    char a = '\u005cr';
+    char b = '\u005cn';
+    char c = '\u005ct';
+    char d = '\uuuu005cn';
+    char e = '\u005c\u005c';
+    char f = '\u005c'';
+    char g = '"';
+    String h = "\u005c"";
+    String i = "'";
+    char j = '\"';
+    String k = "\'";
+    char l = '\u005C'';
+    char m = '\uABCD';
+    char n = '\u00AB';
+    char o = '\u005B';
+    char p = '\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu005cr'; // Tests the lookahead
+    char q = '\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu005D';
+    
+    char wtf1 = '\u005c\u005c'; // This is a legal backslash
+    String wtf2 = "\\u005c";    // = "\u005c", with a single backslash, and != a backslash!
+                                // There is an ambiguity in the grammar, the interpretation is done as "\\" + "u005c"
+    //char wtf3 = '\\u005c';    // This is therefore, illegal
+
+    //char z = '\u005cu005c'; /* This is illegal */
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest1.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest1.java
new file mode 100644
index 0000000..e17bd3e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest1.java
@@ -0,0 +1,14 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import java.util.List;
+
+public class InputAnnotationsTest1 {
+	
+	@NonNull
+	List<Integer> numbers;
+
+	@interface NonNull {
+
+	}
+	
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest10.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest10.java
new file mode 100644
index 0000000..0783b13
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest10.java
@@ -0,0 +1,23 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+public class InputAnnotationsTest10 {
+	public static Object methodName(Object str) {
+		try {
+            return null;
+            
+        } catch (@MyAnnotation1(name = "ABC", version = 1) Exception ex) {
+            return "";
+        }
+	}
+	
+	@Target(ElementType.TYPE_USE)
+	@interface MyAnnotation1 {
+		
+	String name();
+	int version();
+	}
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest2.java
new file mode 100644
index 0000000..672f0f1
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest2.java
@@ -0,0 +1,15 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+ at Schedule
+public class InputAnnotationsTest2 {
+	
+	
+}
+
+ at Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+ at interface Schedule { 
+
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest3.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest3.java
new file mode 100644
index 0000000..fbd9e8b
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest3.java
@@ -0,0 +1,18 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+
+
+public class InputAnnotationsTest3 {
+	
+	public static void methodName(Object str) {
+		String myString = (@NonNull String) str;
+	}
+	
+	@Target(ElementType.TYPE_USE)
+	@interface NonNull {
+	}
+	
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest4.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest4.java
new file mode 100644
index 0000000..fab0f7b
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest4.java
@@ -0,0 +1,17 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+
+public class InputAnnotationsTest4 {
+	
+	public static void methodName(@NotNull String args) {
+		
+	}
+	
+	@Target(ElementType.TYPE_USE)
+	@interface NotNull {
+
+	}
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest5.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest5.java
new file mode 100644
index 0000000..fc03931
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest5.java
@@ -0,0 +1,16 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+
+public class InputAnnotationsTest5 {
+	
+	
+	void monitorTemperature() throws @Critical Exception {  }
+
+	@Target(ElementType.TYPE_USE)
+	@interface Critical {
+
+	}
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest6.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest6.java
new file mode 100644
index 0000000..30f3e24
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest6.java
@@ -0,0 +1,17 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.List;
+
+public class InputAnnotationsTest6 {
+
+	abstract class UnmodifiableList<T> implements @Readonly List<@Readonly T> {
+	}
+
+	@Target(ElementType.TYPE_USE)
+	@interface Readonly {
+
+	}	
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest7.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest7.java
new file mode 100644
index 0000000..6c26e93
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest7.java
@@ -0,0 +1,19 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.List;
+
+public class InputAnnotationsTest7 {
+	
+	public static void main(String[] args) {
+		Object object = new @Interned Object();
+		
+	}
+	
+	@Target(ElementType.TYPE_USE)
+	@interface Interned {
+
+	}	
+	
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest8.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest8.java
new file mode 100644
index 0000000..c882d14
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest8.java
@@ -0,0 +1,34 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.Map;
+
+public class InputAnnotationsTest8 {
+	
+	public void main(String[] args) {
+		Map. at NotNull Entry entry;
+		MyObject myObject = new MyObject();
+		myObject.<@NotBlank String>myMethod();
+		myObject.new @NotNull MyObject2();
+		
+	}
+	
+	@Target(ElementType.TYPE_USE)
+	@interface NotNull {
+
+	}
+	
+	@Target(ElementType.TYPE_USE)
+	@interface NotBlank {
+
+	}
+	
+	class MyObject{
+		
+		public void myMethod(){};
+		
+		class MyObject2{}
+	}
+	
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest9.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest9.java
new file mode 100644
index 0000000..f91a553
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputAnnotationsTest9.java
@@ -0,0 +1,15 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.List;
+
+public class InputAnnotationsTest9 {
+	public static <T> void methodName(Object str) {
+		List<@Immutable ? extends Comparable<T>> unchangeable;
+	}
+	
+	@Target(ElementType.TYPE_USE)
+	@interface Immutable {
+	}
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputDefaultMethodsTest.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputDefaultMethodsTest.java
new file mode 100644
index 0000000..97030fb
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputDefaultMethodsTest.java
@@ -0,0 +1,11 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+public interface InputDefaultMethodsTest {
+	
+	default public void doSomething(){
+		System.out.println("Something done.");
+	}
+	
+	public void doOneMoreThing();
+	
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputDefaultMethodsTest2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputDefaultMethodsTest2.java
new file mode 100644
index 0000000..e5f7574
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputDefaultMethodsTest2.java
@@ -0,0 +1,19 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+public class InputDefaultMethodsTest2 {
+	
+	public void doSomething(){
+		int a = 5;
+        switch (a)
+        {
+        case 0:
+            break;
+        
+        default:
+            break;
+        
+        }
+
+	}
+
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest1.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest1.java
new file mode 100644
index 0000000..4cd1894
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest1.java
@@ -0,0 +1,12 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+public class InputLambdaTest1 {
+	
+	static Runnable r1 = ()->System.out.println("Hello world one!");
+	static Runnable r2 = () -> System.out.println("Hello world two!");
+	
+	public static void main(String[] args) {
+		r1.run();
+		r2.run();
+	}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest10.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest10.java
new file mode 100644
index 0000000..e5620c8
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest10.java
@@ -0,0 +1,20 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+public class InputLambdaTest10 {
+
+	public static void testVoidLambda(TestOfVoidLambdas test) {
+		System.out.println("Method called");
+		test.doSmth("fef");
+	}
+	
+	
+	public static void main(String[] args) {
+		
+		testVoidLambda(s1 -> System.out.println(s1));
+	}
+
+	private interface TestOfVoidLambdas {
+
+		public void doSmth(String first);
+	}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest11.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest11.java
new file mode 100644
index 0000000..2bb8429
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest11.java
@@ -0,0 +1,20 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+public class InputLambdaTest11 {
+
+	public static void testVoidLambda(TestOfVoidLambdas test) {
+		System.out.println("Method called");
+		test.doSmth("fef");
+	}
+	
+	
+	public static void main(String[] args) {
+		
+		testVoidLambda(s1 -> {System.out.println(s1);});
+	}
+
+	private interface TestOfVoidLambdas {
+
+		public void doSmth(String first);
+	}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest12.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest12.java
new file mode 100644
index 0000000..1f91cf7
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest12.java
@@ -0,0 +1,20 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+public class InputLambdaTest12 {
+
+	public static void testVoidLambda(TestOfVoidLambdas test) {
+		System.out.println("Method called");
+		test.doSmth("fef", 5);
+	}
+	
+	
+	public static void main(String[] args) {
+		
+		testVoidLambda((String s1, Integer i2) -> System.out.println(s1));
+	}
+
+	private interface TestOfVoidLambdas {
+
+		public void doSmth(String first, Integer second);
+	}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest13.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest13.java
new file mode 100644
index 0000000..afa3ffe
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest13.java
@@ -0,0 +1,22 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+public class InputLambdaTest13 {
+
+	public static void testVoidLambda(TestOfVoidLambdas test) {
+		System.out.println("Method called");
+		test.doSmth("fef", 5);
+	}
+	
+	
+	public static void main(String[] args) {
+		
+		testVoidLambda((String s1, Integer i2) -> {
+			System.out.println(s1);
+		});
+	}
+
+	private interface TestOfVoidLambdas {
+
+		public void doSmth(String first, Integer second);
+	}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest14.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest14.java
new file mode 100644
index 0000000..ec67efa
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest14.java
@@ -0,0 +1,18 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+public class InputLambdaTest14 {
+	
+	public static void main(String args[]) {
+		List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5);
+		
+		numbers.forEach(first -> {
+			System.out.println("first");
+			System.out.println("second");
+			System.out.println("third");
+		});
+	}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest15.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest15.java
new file mode 100644
index 0000000..94925e3
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest15.java
@@ -0,0 +1,50 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+import java.util.function.Function;
+
+public class InputLambdaTest15
+{
+
+    public static void main(String[] args) {
+        InputLambdaTest15 ex = new InputLambdaTest15();
+        Function<Double, Double> sin = d -> ex.sin(d);
+        Function<Double, Double> log = d -> ex.log(d);
+        Function<Double, Double> exp = d -> ex.exp(d);
+        InputLambdaTest15 compose = new InputLambdaTest15();
+        System.out.println(compose.calculate(sin.compose(log), 0.8));
+        // prints log:sin:-0.22
+        System.out.println(compose.calculate(sin.andThen(log), 0.8));
+        // prints sin:log:-0.33
+        System.out.println(compose.calculate(sin.compose(log).andThen(exp), 0.8));
+        //log:sin:exp:0.80
+        System.out.println(compose.calculate(sin.compose(log).compose(exp), 0.8));
+        //exp:log:sin:0.71
+        System.out.println(compose.calculate(sin.andThen(log).compose(exp), 0.8));
+        //exp:sin:log:-0.23
+        System.out.println(compose.calculate(sin.andThen(log).andThen(exp), 0.8));
+        //sin:log:exp:0.71
+ 
+    }
+
+    public Double calculate(Function<Double, Double> operator, Double d)
+    {
+        return operator.apply(d);
+    }
+
+    public Double sin(Double d)
+    {
+        System.out.print("sin:");
+        return Math.sin(d);
+    }
+
+    public Double log(Double d)
+    {
+        System.out.print("log:");
+        return Math.log(d);
+    }
+
+    public Double exp(Double d)
+    {
+        System.out.print("exp:");
+        return Math.exp(d);
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest16.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest16.java
new file mode 100644
index 0000000..82d4f12
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest16.java
@@ -0,0 +1,22 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.ChronoLocalDateTime;
+import java.util.Comparator;
+
+
+public class InputLambdaTest16 {
+
+	static final Comparator<ChronoLocalDateTime<? extends ChronoLocalDate>> DATE_TIME_ORDER =
+         (Comparator<ChronoLocalDateTime<? extends ChronoLocalDate>>) (dateTime1, dateTime2) -> {
+             int cmp = Long.compare(dateTime1.toLocalDate().toEpochDay(), dateTime2.toLocalDate().toEpochDay());
+             if (cmp == 0) {
+                 cmp = Long.compare(dateTime1.toLocalTime().toNanoOfDay(), dateTime2.toLocalTime().toNanoOfDay());
+             }
+             return cmp;
+         };
+	
+	public static void main(String args[]) {
+		
+	}
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest17.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest17.java
new file mode 100644
index 0000000..17c4b1a
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest17.java
@@ -0,0 +1,28 @@
+import java.util.function.Supplier;
+
+public class InputLambdaTest17{
+
+    void initPartialTraversalState() {
+            SpinedBuffer<P_OUT> b = new SpinedBuffer<>();
+            
+        P_OUT spliterator = new P_OUT();
+        Supplier pusher = () -> spliterator.tryAdvance(b);
+        }
+
+    private class P_OUT
+    {
+
+        public Object tryAdvance(SpinedBuffer<P_OUT> b)
+        {
+            // TODO Auto-generated method stub
+            return null;
+        }
+
+    }
+
+    class SpinedBuffer<T>
+    {
+
+    }
+
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest18.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest18.java
new file mode 100644
index 0000000..ccd9497
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest18.java
@@ -0,0 +1,10 @@
+import java.util.function.Predicate;
+
+public class InputLambdaTest19 {
+
+    static <T> Predicate<T> isEqual(Object targetRef) {
+        return (null == targetRef)
+                ? null
+                : object -> targetRef.equals(object);
+    }
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest2.java
new file mode 100644
index 0000000..3cf588e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest2.java
@@ -0,0 +1,19 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+public class InputLambdaTest2 {
+
+	public static void testVoidLambda(TestOfVoidLambdas test) {
+		System.out.println("Method called");
+		test.doSmth();
+	}
+	
+	
+	public static void main(String[] args) {
+		testVoidLambda(() -> System.out.println("Method in interface called"));
+	}
+
+	private interface TestOfVoidLambdas {
+
+		public void doSmth();
+	}
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest3.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest3.java
new file mode 100644
index 0000000..49e60cd
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest3.java
@@ -0,0 +1,21 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+public class InputLambdaTest3 {
+	
+	public static void testVoidLambda(TestOfVoidLambdas test) {
+		System.out.println("Method called");
+		test.doSmth();
+	}
+	
+	
+	public static void main(String[] args) {
+		testVoidLambda(() -> {
+			System.out.println("Method in interface called");
+		});
+	}
+
+	private interface TestOfVoidLambdas {
+
+		public void doSmth();
+	}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest4.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest4.java
new file mode 100644
index 0000000..e97c749
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest4.java
@@ -0,0 +1,13 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class InputLambdaTest4 {
+	
+	public void doSomething() {
+		List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5, 6);
+		
+		numbers.forEach((Integer value) -> System.out.println(value));
+	}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest5.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest5.java
new file mode 100644
index 0000000..24ab146
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest5.java
@@ -0,0 +1,14 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+public class InputLambdaTest5 {
+	
+	public void doSomething() {
+		List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5, 6);
+		
+		numbers.forEach((Integer value) -> {System.out.println(value);});
+	}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest6.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest6.java
new file mode 100644
index 0000000..8639d49
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest6.java
@@ -0,0 +1,13 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class InputLambdaTest6 {
+
+	public void doSomething() {
+		List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5, 6);
+		
+		numbers.forEach((value) -> System.out.println(value));
+	}
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest7.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest7.java
new file mode 100644
index 0000000..e9ac1d9
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest7.java
@@ -0,0 +1,15 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class InputLambdaTest7 {
+
+	public void doSomething() {
+		List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5, 6);
+
+		numbers.forEach((value) -> {
+			System.out.println(value);
+		});
+	}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest8.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest8.java
new file mode 100644
index 0000000..69ffd04
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest8.java
@@ -0,0 +1,19 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+public class InputLambdaTest8 {
+	public static void testVoidLambda(TestOfVoidLambdas test) {
+		System.out.println("Method called");
+		test.doSmth("fef", 2);
+	}
+	
+	
+	public static void main(String[] args) {
+		
+		testVoidLambda((s1, s2) -> System.out.println(s1 + s2));
+	}
+
+	private interface TestOfVoidLambdas {
+
+		public void doSmth(String first, Integer second);
+	}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest9.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest9.java
new file mode 100644
index 0000000..8e5741a
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputLambdaTest9.java
@@ -0,0 +1,19 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+public class InputLambdaTest9 {
+	public static void testVoidLambda(TestOfVoidLambdas test) {
+		System.out.println("Method called");
+		test.doSmth("fef", 2);
+	}
+	
+	
+	public static void main(String[] args) {
+		
+		testVoidLambda((s1, s2) -> {System.out.println(s1 + s2);});
+	}
+
+	private interface TestOfVoidLambdas {
+
+		public void doSmth(String first, Integer second);
+	}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputMethodReferencesTest.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputMethodReferencesTest.java
new file mode 100644
index 0000000..3aaddfb
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputMethodReferencesTest.java
@@ -0,0 +1,39 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.function.Supplier;
+
+import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
+
+public class InputMethodReferencesTest<T> extends ParentClass
+{
+
+    public void main(String[] args) {
+		
+		List<Integer> numbers = Arrays.asList(1,2,3,4,5,6);
+		
+		numbers.forEach(System.out::println);
+		InputMethodReferencesTest tl = new InputMethodReferencesTest();
+
+		String roster = new String();
+		Supplier<InputMethodReferencesTest> supplier = InputMethodReferencesTest<String>::new;
+
+		numbers.forEach(this::println);
+		
+		numbers.forEach(super::println);
+        Supplier<InputMethodReferencesTest2> supplier = InputMethodReferencesTest2::new;
+        Supplier<InputMethodReferencesTest2> suppl = InputMethodReferencesTest2::<Integer> new;
+        Function<Integer, Message[]> messageArrayFactory = Message[]::new;
+		
+	}
+}
+
+class ParentClass
+{
+
+    public String println(Integer i)
+    {
+        return null;
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputMethodReferencesTest2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputMethodReferencesTest2.java
new file mode 100644
index 0000000..b31482b
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/grammars/java8/InputMethodReferencesTest2.java
@@ -0,0 +1,23 @@
+package com.puppycrawl.tools.checkstyle.grammars.java8;
+import java.util.function.Function;
+import java.util.function.Supplier;
+
+import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
+
+public class InputMethodReferencesTest2
+{
+
+    public static void main(String[] args)
+    {
+
+        Supplier<InputMethodReferencesTest2> supplier = InputMethodReferencesTest2::new;
+        Supplier<InputMethodReferencesTest2> suppl = InputMethodReferencesTest2::<Integer> new;
+        Function<Integer, Message[]> messageArrayFactory = Message[]::new;
+
+    }
+
+    private class Bar<T>
+    {
+
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/header/H1.java b/src/test/resources/com/puppycrawl/tools/checkstyle/header/H1.java
new file mode 100644
index 0000000..36e6178
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/header/H1.java
@@ -0,0 +1,9 @@
+/*
+ * (C) 2006 correct header
+ */
+
+package com.puppycrawl.tools.checkstyle.header;
+
+public class H1
+{
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/header/H1.properties b/src/test/resources/com/puppycrawl/tools/checkstyle/header/H1.properties
new file mode 100644
index 0000000..e7b2fe0
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/header/H1.properties
@@ -0,0 +1,4 @@
+#
+# (C) 2006 correct header
+#
+x=y
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/header/H1.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/header/H1.xml
new file mode 100644
index 0000000..475d5b6
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/header/H1.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<!-- 
+  (C) 2006 correct header
+ -->
+
+<root>
+</root>
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/header/H2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/header/H2.java
new file mode 100644
index 0000000..0f0cc2a
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/header/H2.java
@@ -0,0 +1,9 @@
+/*
+ * (C) '06 incorrect header
+ */
+
+package com.puppycrawl.tools.checkstyle.header;
+
+public class H2
+{
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/header/H2.properties b/src/test/resources/com/puppycrawl/tools/checkstyle/header/H2.properties
new file mode 100644
index 0000000..08ddc0c
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/header/H2.properties
@@ -0,0 +1 @@
+x=y
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/header/H2.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/header/H2.xml
new file mode 100644
index 0000000..e93f505
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/header/H2.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<!-- (C) '06 incorrect header -->
+
+<root>
+</root>
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_broken.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_broken.xml
new file mode 100644
index 0000000..02f9b15
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_broken.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<!DOCTYPE import-control PUBLIC
+    "-//Puppy Crawl//DTD Import Control 1.0//EN"
+    "http://www.puppycrawl.com/dtds/import_control_1_0.dtd">
+
+<import-control>
+</import-control>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_complete.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_complete.xml
new file mode 100644
index 0000000..3bdfcad
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_complete.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<!DOCTYPE import-control PUBLIC
+    "-//Puppy Crawl//DTD Import Control 1.0//EN"
+    "http://www.puppycrawl.com/dtds/import_control_1_0.dtd">
+
+<import-control pkg="com">
+  <allow class="some.class"/>
+  <disallow class="another.class" local-only="true"/>
+  <allow pkg="some.pkg"/>
+  <disallow pkg="another.pkg" local-only="true"/>
+  <disallow pkg="and.another.pkg" exact-match="true"/>
+  <subpackage name="puppycrawl">
+    <disallow pkg="some.pkg"/>
+    <disallow class="some.class"/>
+  </subpackage>
+</import-control>
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_one-re.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_one-re.xml
new file mode 100644
index 0000000..422652a
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_one-re.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!DOCTYPE import-control PUBLIC
+    "-//Puppy Crawl//DTD Import Control 1.1//EN"
+    "http://www.puppycrawl.com/dtds/import_control_1_1.dtd">
+
+<import-control pkg="com.puppycrawl.tools.checkstyle">
+  <allow class="java\.awt.Image" regex="true"/>
+  <allow class="java..*.Button.ABORT" regex="true"/>
+  <allow class="java.(io|lui).File" local-only="true" regex="true"/>
+  <subpackage name="imports">
+    <allow pkg="javax.swing" regex="true"/>
+  </subpackage>
+</import-control>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_one.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_one.xml
new file mode 100644
index 0000000..c3f3223
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_one.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!DOCTYPE import-control PUBLIC
+    "-//Puppy Crawl//DTD Import Control 1.0//EN"
+    "http://www.puppycrawl.com/dtds/import_control_1_0.dtd">
+
+<import-control pkg="com.puppycrawl.tools.checkstyle">
+  <allow class="java.awt.Image"/>
+  <allow class="java.awt.Button.ABORT"/>
+  <allow class="java.io.File" local-only="true"/>
+  <subpackage name="imports">
+    <allow pkg="javax.swing"/>
+  </subpackage>
+</import-control>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_two-re.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_two-re.xml
new file mode 100644
index 0000000..1ffe4b0
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_two-re.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!DOCTYPE import-control PUBLIC
+    "-//Puppy Crawl//DTD Import Control 1.1//EN"
+    "http://www.puppycrawl.com/dtds/import_control_1_1.dtd">
+
+<import-control pkg="com.puppycrawl.tools.checkstyle">
+  <allow class="java\.awt\.Image" regex="true"/>
+  <allow class="java\..*\.File" local-only="true" regex="true"/>
+  <subpackage name="imports">
+    <disallow class="java\..*\.Image" local-only="true" regex="true"/>
+    <allow pkg="javax\.swing" exact-match="true" regex="true"/>
+    <allow pkg="java\.io" exact-match="true" local-only="true" regex="true"/>
+  </subpackage>
+</import-control>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_two.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_two.xml
new file mode 100644
index 0000000..a8293c7
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_two.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!DOCTYPE import-control PUBLIC
+    "-//Puppy Crawl//DTD Import Control 1.0//EN"
+    "http://www.puppycrawl.com/dtds/import_control_1_0.dtd">
+
+<import-control pkg="com.puppycrawl.tools.checkstyle">
+  <allow class="java.awt.Image"/>
+  <allow class="java.io.File" local-only="true"/>
+  <subpackage name="imports">
+    <disallow class="java.awt.Image" local-only="true"/>
+    <allow pkg="javax.swing" exact-match="true"/>
+    <allow pkg="java.io" exact-match="true" local-only="true"/>
+  </subpackage>
+</import-control>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_wrong.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_wrong.xml
new file mode 100644
index 0000000..76cac8c
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/import-control_wrong.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<!DOCTYPE import-control PUBLIC
+    "-//Puppy Crawl//DTD Import Control 1.0//EN"
+    "http://www.puppycrawl.com/dtds/import_control_1_0.dtd">
+
+<import-control pkg="wrong">
+</import-control>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/DOMSource.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/DOMSource.java
new file mode 100644
index 0000000..58edbbf
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/DOMSource.java
@@ -0,0 +1,7 @@
+package com.puppycrawl.tools.checkstyle.imports;
+
+import javax.xml.transform.Source;
+
+import org.w3c.dom.Node;
+
+class DOMSource {}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrder.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrder.java
new file mode 100644
index 0000000..86ef7a6
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrder.java
@@ -0,0 +1,24 @@
+package com.puppycrawl.tools.checkstyle.imports;
+
+import static java.io.File.createTempFile;
+import static java.awt.Button.ABORT;
+import static javax.swing.WindowConstants.*;
+
+import java.awt.Button;
+import java.awt.Frame;
+import java.awt.Dialog;
+import java.awt.event.ActionEvent;
+import javax.swing.JComponent;
+import javax.swing.JTable;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+
+import com.puppycrawl.tools.*;
+
+import com.google.common.*;
+import org.apache.*;
+
+public class InputImportOrder {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrder2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrder2.java
new file mode 100644
index 0000000..0954e20
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrder2.java
@@ -0,0 +1,20 @@
+package com.puppycrawl.tools.checkstyle.imports;
+
+import static java.io.File.createTempFile;
+import static java.awt.Button.ABORT;
+import static javax.swing.WindowConstants.*;
+
+import java.util.List;
+import java.util.StringTokenizer;
+import java.util.*;
+import java.util.concurrent.AbstractExecutorService;
+import java.util.concurrent.*;
+
+import com.puppycrawl.tools.*;
+import com.*;
+
+import com.google.common.*;
+import org.apache.*;
+
+public class InputImportOrder {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrder3.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrder3.java
new file mode 100644
index 0000000..80c5cee
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrder3.java
@@ -0,0 +1,20 @@
+package com.puppycrawl.tools.checkstyle.imports;
+
+import static java.io.File.createTempFile;
+import static java.awt.Button.ABORT;
+import static javax.swing.WindowConstants.*;
+
+import com.puppycrawl.tools.*;
+import java.util.StringTokenizer;
+import java.util.*;
+import java.util.concurrent.AbstractExecutorService;
+import java.util.concurrent.*;
+
+import com.puppycrawl.tools.*;
+import com.*;
+
+import com.google.common.*;
+import org.apache.*;
+
+public class InputImportOrder {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderNoValid.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderNoValid.java
new file mode 100644
index 0000000..a672c66
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderNoValid.java
@@ -0,0 +1,8 @@
+package com.google.common.cache;
+
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.NoSuchElementException;
+
+public class InputImportOrder {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderSamePackage.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderSamePackage.java
new file mode 100644
index 0000000..00452ce
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderSamePackage.java
@@ -0,0 +1,16 @@
+package java.util.concurrent;
+
+import com.google.common.*;
+import java.util.StringTokenizer;
+import java.util.*;
+import java.util.concurrent.*;
+import static java.awt.Button.ABORT;
+import static javax.swing.WindowConstants.*;
+import com.puppycrawl.tools.*;
+import java.util.concurrent.AbstractExecutorService;
+import static java.io.File.createTempFile;
+import com.*;
+import org.apache.*;
+
+public class InputImportOrder {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderSamePackage2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderSamePackage2.java
new file mode 100644
index 0000000..6e2d8f5
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderSamePackage2.java
@@ -0,0 +1,12 @@
+package java.util.concurrent;
+ 
+import java.util.regex.Pattern;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.StringTokenizer;
+import java.util.*;
+import java.util.concurrent.AbstractExecutorService;
+import java.util.concurrent.*;
+
+public class InputImportOrder {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderTemp.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderTemp.java
new file mode 100644
index 0000000..1bdb51d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputCustomImportOrderTemp.java
@@ -0,0 +1,18 @@
+package com.google.common.base;
+
+import com.google.common.annotations.VisibleForTesting;
+
+import java.io.Closeable;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.lang.ref.PhantomReference;
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class InputImportOrder {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputDefaultPackage.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputDefaultPackage.java
new file mode 100644
index 0000000..9d15b4f
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputDefaultPackage.java
@@ -0,0 +1,25 @@
+//////////////////////////////////////////
+//Some header
+//////////////////////////////////////////
+import static java.io.File.createTempFile;
+import static java.awt.Button.ABORT;
+import static javax.swing.WindowConstants.*;
+
+import java.awt.Button;
+import java.awt.Frame;
+import java.awt.Dialog;
+import java.awt.event.ActionEvent;
+import javax.swing.JComponent;
+import javax.swing.JTable;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+
+import com.puppycrawl.tools.*;
+
+import com.google.common.*;
+import org.apache.*;
+
+public class InputImportOrder {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImport.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImport.java
new file mode 100644
index 0000000..0988431
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImport.java
@@ -0,0 +1,110 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.imports;
+
+import com.puppycrawl.tools.checkstyle.imports.*;
+                                     import com.puppycrawl.tools.checkstyle.imports.GlobalProperties;
+import java.io.*;
+import java.lang.*;
+import java.lang.String;
+import java.sql.Connection;
+import java.util.List;
+import java.util.List;
+import sun.net.ftpclient.FtpClient;
+import java.util.Iterator;
+import java.util.Enumeration;
+import java.util.Arrays;
+import javax.swing.JToolBar;
+import javax.swing.JToggleButton;
+import javax.swing.ScrollPaneLayout;
+import javax.swing.BorderFactory;
+import static java.io.File.listRoots;
+
+import static javax.swing.WindowConstants.*;
+import static javax.swing.WindowConstants.*;
+import static java.io.File.createTempFile;
+import static sun.net.ftpclient.FtpClient.*;
+import java.awt.Component;
+import java.awt.Graphics2D;
+import java.awt.HeadlessException;
+import java.awt.Label;
+import java.util.Date;
+import java.util.Calendar;
+import java.util.BitSet;
+
+import com.test.TestClass1;
+import com.test.TestClass2;
+import com.test.TestClass3;
+import com.test.TestClass4;
+import com.test.TestClass5;
+import com.test.TestClass6;
+import com.test.TestClass7;
+import com.test.TestClass8;
+import com.test.TestClass9;
+
+/**
+ * Test case for imports
+ * Here's an import used only by javadoc: {@link Date}.
+ * @author Oliver Burn
+ * @author lkuehne
+ * @author Michael Studman
+ * @see Calendar Should avoid unused import for Calendar
+ **/
+class InputImport
+{
+    /** ignore **/
+    private Class mUse1 = Connection.class;
+    /** ignore **/
+    private Class mUse2 = java.io.File.class;
+    /** ignore **/
+    private Class mUse3 = Iterator[].class;
+    /** ignore **/
+    private Class mUse4 = java.util.Enumeration[].class;
+    /** usage of illegal import **/
+    private FtpClient ftpClient = null;
+
+    /** usage via static method, both normal and fully qualified */
+    {
+        int[] x = {};
+        Arrays.sort(x);
+        Object obj = javax.swing.BorderFactory.createEmptyBorder();
+        File[] files = listRoots();
+    }
+
+    /** usage of inner class as type */
+    private JToolBar.Separator mSep = null;
+
+    /** usage of inner class in Constructor */
+    private Object mUse5 = new ScrollPaneLayout.UIRessource();
+
+    /** usage of inner class in constructor, fully qualified */
+    private Object mUse6 = new javax.swing.JToggleButton.ToggleButtonModel();
+
+    /** we use class name as member's name.
+     *  also an inline JavaDoc-only import {@link Vector linkText} */
+    private int Component;
+
+    /**
+     * method comment with JavaDoc-only import {@link BitSet#aMethod()}
+     */
+    public void Label() {}
+    
+    /**
+     * Renders to a {@linkplain Graphics2D graphics context}.
+     * @throws HeadlessException if no graphis environment can be found.
+     * @exception HeadlessException if no graphis environment can be found.
+     */
+    public void render() {}
+
+    /**
+     * First is a class with a method with arguments {@link TestClass1#method1(TestClass2)}.
+     * Next is a class with typed method {@link TestClass3#method2(TestClass4, TestClass5)}.
+     *
+     * @param param1  with a link {@link TestClass6}
+     * @throws TestClass7 when broken
+     * @deprecated in 1 for removal in 2. Use {@link TestClass8}
+     */
+    public void aMethodWithManyLinks() {}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportBug.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportBug.java
new file mode 100644
index 0000000..62e6e8d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportBug.java
@@ -0,0 +1,12 @@
+package com.puppycrawl.tools.checkstyle.imports;
+
+import java.net.URL;
+
+public class InputImportBug {
+
+   private static String URL = "This is a String object";
+
+   public InputImportBug() throws Exception {
+       URL url = new URL("file://this.is.a.url.object");
+   }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportControl.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportControl.java
new file mode 100644
index 0000000..addb243
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportControl.java
@@ -0,0 +1,11 @@
+package com.puppycrawl.tools.checkstyle.imports;
+
+import java.awt.Image;
+import javax.swing.border.*;
+import java.io.File;
+import static java.awt.Button.ABORT;
+
+public class InputImportControl
+{
+
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder.java
new file mode 100644
index 0000000..1ad380e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder.java
@@ -0,0 +1,19 @@
+package com.puppycrawl.tools.checkstyle.imports;
+
+import java.awt.Button;
+import java.awt.Frame;
+import java.awt.Dialog;
+import java.awt.event.ActionEvent;
+import static java.awt.Button.ABORT
+;
+import javax.swing.JComponent;
+import javax.swing.JTable;
+import java.io.File;
+import static java.io.File.createTempFile;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import static javax.swing.WindowConstants.*;
+
+public class InputImportOrder {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrderCaseInsensitive.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrderCaseInsensitive.java
new file mode 100644
index 0000000..8b04c55
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrderCaseInsensitive.java
@@ -0,0 +1,11 @@
+package com.puppycrawl.tools.checkstyle.imports;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.Reader;
+import static java.io.InputStream.*;
+import static java.io.IOException.*;
+
+public class InputImportOrderCaseInsensitive {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_Above.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_Above.java
new file mode 100644
index 0000000..e1da502
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_Above.java
@@ -0,0 +1,20 @@
+package com.puppycrawl.tools.checkstyle.imports;
+
+import static java.awt.Button.ABORT;
+import static javax.swing.WindowConstants.*;
+import static java.awt.Button.ABORT;
+import java.awt.Button;
+import java.awt.Frame;
+import java.awt.Dialog;
+import java.awt.event.ActionEvent;
+import javax.swing.JComponent;
+import javax.swing.JTable;
+
+import java.io.File;
+import static java.io.File.createTempFile;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+
+public class InputImportOrder_Above {
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_Bottom.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_Bottom.java
new file mode 100644
index 0000000..9b05271
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_Bottom.java
@@ -0,0 +1,24 @@
+package com.puppycrawl.tools.checkstyle.imports;
+
+import java.awt.Button;
+import java.awt.Dialog;
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.swing.JComponent;
+import javax.swing.JTable;
+
+import static java.io.File.*;
+import java.io.File;
+
+import static java.io.File.createTempFile;
+import static java.awt.Button.ABORT;
+import static javax.swing.WindowConstants.*;
+
+import java.io.Reader;
+
+public class InputImportOrder_Bottom {
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_HonorsTokensProperty.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_HonorsTokensProperty.java
new file mode 100644
index 0000000..5d65ac8
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_HonorsTokensProperty.java
@@ -0,0 +1,9 @@
+package com.puppycrawl.tools.checkstyle.imports;
+
+import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE;
+import static java.awt.Button.ABORT;
+import java.awt.Dialog;
+import java.awt.Button;
+
+public class InputImportOrder_HonorsTokensProperty {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_InFlow.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_InFlow.java
new file mode 100644
index 0000000..17f9f7a
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_InFlow.java
@@ -0,0 +1,22 @@
+package com.puppycrawl.tools.checkstyle.imports;
+
+import java.awt.Button;
+import static java.awt.Button.ABORT;
+import java.awt.Frame;
+import java.awt.Dialog;
+import java.awt.event.ActionEvent;
+
+import javax.swing.JComponent;
+import static javax.swing.WindowConstants.HIDE_ON_CLOSE;
+import static javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE;
+import static javax.swing.WindowConstants.*;
+import javax.swing.JTable;
+
+import static java.io.File.createTempFile;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+
+public class InputImportOrder_InFlow {
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_NoFailureForRedundantImports.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_NoFailureForRedundantImports.java
new file mode 100644
index 0000000..26a5ae9
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_NoFailureForRedundantImports.java
@@ -0,0 +1,8 @@
+package com.puppycrawl.tools.checkstyle.imports;
+
+import java.awt.Button;
+import java.awt.Button;
+
+public class InputImportOrder_NoFailureForRedundantImports {
+}
+
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_Top.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_Top.java
new file mode 100644
index 0000000..c98058f
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_Top.java
@@ -0,0 +1,23 @@
+package com.puppycrawl.tools.checkstyle.imports;
+
+import static java.io.File.createTempFile;
+import static java.awt.Button.ABORT;
+import static javax.swing.WindowConstants.*;
+
+import java.awt.Button;
+import java.awt.Dialog;
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.swing.JComponent;
+import javax.swing.JTable;
+
+import static java.io.File.*;
+import java.io.File;
+import java.io.Reader;
+
+public class InputImportOrder_Top {
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_Under.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_Under.java
new file mode 100644
index 0000000..935427f
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_Under.java
@@ -0,0 +1,20 @@
+package com.puppycrawl.tools.checkstyle.imports;
+
+import java.awt.Button;
+import java.awt.Frame;
+import java.awt.Dialog;
+import java.awt.event.ActionEvent;
+import javax.swing.JComponent;
+import javax.swing.JTable;
+import static java.awt.Button.ABORT;
+import static javax.swing.WindowConstants.*;
+import static java.awt.Button.ABORT;
+
+import static java.io.File.createTempFile;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+
+public class InputImportOrder_Under {
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_Wildcard.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_Wildcard.java
new file mode 100644
index 0000000..9d1c0ef
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_Wildcard.java
@@ -0,0 +1,12 @@
+package com.puppycrawl.tools.checkstyle.imports;
+// groups are configured as follows
+// com.puppycrawl,*,java
+// the trailing javax.crypto.Cipher; should be flagged as an error.
+
+import com.puppycrawl.tools.checkstyle.imports.InputImportOrder_Above;
+import javax.crypto.BadPaddingException;
+import java.util.List;
+import javax.crypto.Cipher;
+
+public class InputImportOrder_Wildcard {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_WildcardUnspecified.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_WildcardUnspecified.java
new file mode 100644
index 0000000..d31a348
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/InputImportOrder_WildcardUnspecified.java
@@ -0,0 +1,14 @@
+package com.puppycrawl.tools.checkstyle.imports;
+
+// groups are configured as follows
+// com.puppycrawl,*,java
+// the trailing javax.crypto.Cipher; should be flagged as an error.
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Iterator;
+
+import com.puppycrawl.tools.checkstyle.imports.InputImportBug;
+
+public class InputImportOrder_WildcardUnspecified {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/imports/package-info.java b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/package-info.java
new file mode 100644
index 0000000..bb6c66e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/imports/package-info.java
@@ -0,0 +1,8 @@
+////////////////////////////////////////////////////////////////////////////////
+// Annotated package definition to check if import is declared unused
+// Created: 2005
+////////////////////////////////////////////////////////////////////////////////
+ at MyAnnotation
+package com.puppycrawl.tools.checkstyle.imports;
+
+import com.puppycrawl.tools.checkstyle.MyAnnotation;
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/FromGuava.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/FromGuava.java
new file mode 100644
index 0000000..875c043
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/FromGuava.java
@@ -0,0 +1,183 @@
+ at GwtCompatible(emulated = true)
+class LocalCache<K, V> extends AbstractMap<K, V> implements ConcurrentMap<K, V> {
+
+  enum Strength {
+    /*
+     * TODO(kevinb): If we strongly reference the value and aren't loading, we needn't wrap the
+     * value. This could save ~8 bytes per entry.
+     */
+
+    STRONG {
+      @Override
+      <K, V> ValueReference<K, V> referenceValue(
+          Segment<K, V> segment, ReferenceEntry<K, V> entry, V value, int weight) {
+        return (weight == 1)
+            ? new StrongValueReference<K, V>(value)
+            : new WeightedStrongValueReference<K, V>(value, weight);
+      }
+
+      @Override
+      Equivalence<Object> defaultEquivalence() {
+        return Equivalence.equals();
+      }
+    },
+
+    SOFT {
+      @Override
+      <K, V> ValueReference<K, V> referenceValue(
+          Segment<K, V> segment, ReferenceEntry<K, V> entry, V value, int weight) {
+        return (weight == 1)
+            ? new SoftValueReference<K, V>(segment.valueReferenceQueue, value, entry)
+            : new WeightedSoftValueReference<K, V>(
+                segment.valueReferenceQueue, value, entry, weight);
+      }
+
+      @Override
+      Equivalence<Object> defaultEquivalence() {
+        return Equivalence.identity();
+      }
+    },
+
+    WEAK {
+      @Override
+      <K, V> ValueReference<K, V> referenceValue(
+          Segment<K, V> segment, ReferenceEntry<K, V> entry, V value, int weight) {
+        return (weight == 1)
+            ? new WeakValueReference<K, V>(segment.valueReferenceQueue, value, entry)
+            : new WeightedWeakValueReference<K, V>(
+                segment.valueReferenceQueue, value, entry, weight);
+      }
+
+      @Override
+      Equivalence<Object> defaultEquivalence() {
+        return Equivalence.identity();
+      }
+    };
+
+    /**
+     * Creates a reference for the given value according to this value strength.
+     */
+    abstract <K, V> ValueReference<K, V> referenceValue(
+        Segment<K, V> segment, ReferenceEntry<K, V> entry, V value, int weight);
+
+    /**
+     * Returns the default equivalence strategy used to compare and hash keys or values referenced
+     * at this strength. This strategy will be used unless the user explicitly specifies an
+     * alternate strategy.
+     */
+    abstract Equivalence<Object> defaultEquivalence();
+  }
+
+  /**
+   * Creates new entries.
+   */
+  enum EntryFactory {
+    STRONG {
+      @Override
+      <K, V> ReferenceEntry<K, V> newEntry(
+          Segment<K, V> segment, K key, int hash, @Nullable ReferenceEntry<K, V> next) {
+        return new StrongEntry<K, V>(key, hash, next);
+      }
+    },
+    STRONG_ACCESS {
+      @Override
+      <K, V> ReferenceEntry<K, V> newEntry(
+          Segment<K, V> segment, K key, int hash, @Nullable ReferenceEntry<K, V> next) {
+        return new StrongAccessEntry<K, V>(key, hash, next);
+      }
+
+      @Override
+      <K, V> ReferenceEntry<K, V> copyEntry(
+          Segment<K, V> segment, ReferenceEntry<K, V> original, ReferenceEntry<K, V> newNext) {
+        ReferenceEntry<K, V> newEntry = super.copyEntry(segment, original, newNext);
+        copyAccessEntry(original, newEntry);
+        return newEntry;
+      }
+    },
+    STRONG_WRITE {
+      @Override
+      <K, V> ReferenceEntry<K, V> newEntry(
+          Segment<K, V> segment, K key, int hash, @Nullable ReferenceEntry<K, V> next) {
+        return new StrongWriteEntry<K, V>(key, hash, next);
+      }
+
+      @Override
+      <K, V> ReferenceEntry<K, V> copyEntry(
+          Segment<K, V> segment, ReferenceEntry<K, V> original, ReferenceEntry<K, V> newNext) {
+        ReferenceEntry<K, V> newEntry = super.copyEntry(segment, original, newNext);
+        copyWriteEntry(original, newEntry);
+        return newEntry;
+      }
+    },
+    STRONG_ACCESS_WRITE {
+      @Override
+      <K, V> ReferenceEntry<K, V> newEntry(
+          Segment<K, V> segment, K key, int hash, @Nullable ReferenceEntry<K, V> next) {
+        return new StrongAccessWriteEntry<K, V>(key, hash, next);
+      }
+
+      @Override
+      <K, V> ReferenceEntry<K, V> copyEntry(
+          Segment<K, V> segment, ReferenceEntry<K, V> original, ReferenceEntry<K, V> newNext) {
+        ReferenceEntry<K, V> newEntry = super.copyEntry(segment, original, newNext);
+        copyAccessEntry(original, newEntry);
+        copyWriteEntry(original, newEntry);
+        return newEntry;
+      }
+    },
+
+    WEAK {
+      @Override
+      <K, V> ReferenceEntry<K, V> newEntry(
+          Segment<K, V> segment, K key, int hash, @Nullable ReferenceEntry<K, V> next) {
+        return new WeakEntry<K, V>(segment.keyReferenceQueue, key, hash, next);
+      }
+    },
+    WEAK_ACCESS {
+      @Override
+      <K, V> ReferenceEntry<K, V> newEntry(
+          Segment<K, V> segment, K key, int hash, @Nullable ReferenceEntry<K, V> next) {
+        return new WeakAccessEntry<K, V>(segment.keyReferenceQueue, key, hash, next);
+      }
+
+      @Override
+      <K, V> ReferenceEntry<K, V> copyEntry(
+          Segment<K, V> segment, ReferenceEntry<K, V> original, ReferenceEntry<K, V> newNext) {
+        ReferenceEntry<K, V> newEntry = super.copyEntry(segment, original, newNext);
+        copyAccessEntry(original, newEntry);
+        return newEntry;
+      }
+    },
+    WEAK_WRITE {
+      @Override
+      <K, V> ReferenceEntry<K, V> newEntry(
+          Segment<K, V> segment, K key, int hash, @Nullable ReferenceEntry<K, V> next) {
+        return new WeakWriteEntry<K, V>(segment.keyReferenceQueue, key, hash, next);
+      }
+
+      @Override
+      <K, V> ReferenceEntry<K, V> copyEntry(
+          Segment<K, V> segment, ReferenceEntry<K, V> original, ReferenceEntry<K, V> newNext) {
+        ReferenceEntry<K, V> newEntry = super.copyEntry(segment, original, newNext);
+        copyWriteEntry(original, newEntry);
+        return newEntry;
+      }
+    },
+    WEAK_ACCESS_WRITE {
+      @Override
+      <K, V> ReferenceEntry<K, V> newEntry(
+          Segment<K, V> segment, K key, int hash, @Nullable ReferenceEntry<K, V> next) {
+        return new WeakAccessWriteEntry<K, V>(segment.keyReferenceQueue, key, hash, next);
+      }
+
+      @Override
+      <K, V> ReferenceEntry<K, V> copyEntry(
+          Segment<K, V> segment, ReferenceEntry<K, V> original, ReferenceEntry<K, V> newNext) {
+        ReferenceEntry<K, V> newEntry = super.copyEntry(segment, original, newNext);
+        copyAccessEntry(original, newEntry);
+        copyWriteEntry(original, newEntry);
+        return newEntry;
+      }
+    };
+  }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/FromGuava2.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/FromGuava2.java
new file mode 100644
index 0000000..9ff820b
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/FromGuava2.java
@@ -0,0 +1,55 @@
+public class ImmutableRangeMap<K extends Comparable<?>, V> implements RangeMap<K, V> {
+
+  @Override
+  public ImmutableRangeMap<K, V> subRangeMap(final Range<K> range) {
+    if (checkNotNull(range).isEmpty()) {
+      return ImmutableRangeMap.of();
+    } else if (ranges.isEmpty() || range.encloses(span())) {
+      return this;
+    }
+    int lowerIndex = SortedLists.binarySearch(
+        ranges, Range.<K>upperBoundFn(), range.lowerBound,
+        KeyPresentBehavior.FIRST_AFTER, KeyAbsentBehavior.NEXT_HIGHER);
+    int upperIndex = SortedLists.binarySearch(ranges, 
+        Range.<K>lowerBoundFn(), range.upperBound,
+        KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_HIGHER);
+    if (lowerIndex >= upperIndex) {
+      return ImmutableRangeMap.of();
+    }
+    final int off = lowerIndex;
+    final int len = upperIndex - lowerIndex;
+    ImmutableList<Range<K>> subRanges = new ImmutableList<Range<K>>() {
+      @Override
+      public int size() {
+        return len;
+      }
+
+      @Override
+      public Range<K> get(int index) {
+        checkElementIndex(index, len);
+        if (index == 0 || index == len - 1) {
+          return ranges.get(index + off).intersection(range);
+        } else {
+          return ranges.get(index + off);
+        }
+      }
+
+      @Override
+      boolean isPartialView() {
+        return true;
+      }
+    };
+    final ImmutableRangeMap<K, V> outer = this;
+    return new ImmutableRangeMap<K, V>(
+        subRanges, values.subList(lowerIndex, upperIndex)) {
+          @Override
+          public ImmutableRangeMap<K, V> subRangeMap(Range<K> subRange) {
+            if (range.isConnected(subRange)) {
+              return outer.subRangeMap(subRange.intersection(range));
+            } else {
+              return ImmutableRangeMap.of();
+            }
+          }
+    };
+  }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/IndentationCorrectIfAndParameterInput.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/IndentationCorrectIfAndParameterInput.java
new file mode 100644
index 0000000..b77abfe
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/IndentationCorrectIfAndParameterInput.java
@@ -0,0 +1,143 @@
+package com.google.checkstyle.test.chapter4formatting.rule4841indentation; // indent:0 ; exp:0; ok
+
+class FooIfClass { // indent:0 ; exp:0; ok
+    
+  String getString(int someInt, String someString) { // indent:2 ; exp:2; ok
+    return "String"; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+
+  void fooMethodWithIf() { // indent:2 ; exp:2; ok
+
+    if (conditionFirst("Loooooooooooooooooong", new // indent:4 ; exp:4; ok
+        SecondClassWithVeryVeryVeryLongName("Loooooooooooooooooog"). // indent:8 ; exp:8; ok
+        getInteger(new FooIfClass(), "Loooooooooooooooooog"), // indent:8 ; exp:8; ok
+        new InnerClassFoo())) {}
+    
+    if (conditionSecond(10000000000.0, new // indent:4 ; exp:4; ok
+        SecondClassWithVeryVeryVeryLongName("Looooooooooooo" // indent:8 ; exp:8; ok
+        + "oooooooooooong").getString(new FooIfClass(), // indent:8 ; exp:8; ok
+        new SecondClassWithVeryVeryVeryLongName("loooooooooong"). // indent:8 ; exp:8; ok
+        getInteger(new FooIfClass(), "loooooooooooooong")), "loooooooooooong") // indent:8 ; exp:8; ok
+        || conditionThird(2048) || conditionFourth(new // indent:8 ; exp:8; ok
+        SecondClassWithVeryVeryVeryLongName("Looooooooooooooo" // indent:8 ; exp:8; ok
+        + "ooooooooooooong").getBoolean(new FooIfClass(), false)) || // indent:8 ; exp:8; ok
+        conditionFifth(true, new SecondClassWithVeryVeryVeryLongName(getString(2048, "Looo" // indent:8 ; exp:8; ok
+        + "ooooooooooooooooooooooooooooooooooooooooooong")).getBoolean( // indent:8 ; exp:8; ok
+        new FooIfClass(), true)) || conditionSixth(false, new // indent:8 ; exp:8; ok
+        SecondClassWithVeryVeryVeryLongName(getString(100000, "Loooooong" // indent:8 ; exp:8; ok
+        + "Fooooooo><"))) || conditionNoArg() // indent:8 ; exp:8; ok
+        || conditionNoArg() || // indent:8 ; exp:8; ok
+        conditionNoArg() || conditionNoArg()) {} // indent:8 ; exp:8; ok
+  } // indent:2 ; exp:2; ok
+
+  private boolean conditionFirst(String longString, int // indent:2 ; exp:2; ok
+      integer, InnerClassFoo someInstance) { // indent:6 ; exp:6; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  private boolean conditionSecond(double longLongLongDoubleValue, // indent:2 ; exp:2; ok
+      String longLongLongString, String secondLongLongString) { // indent:6 ; exp:6; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  private boolean conditionThird(long veryLongValue) { // indent:2 ; exp:2; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+
+  private boolean conditionFourth(boolean flag) { // indent:2 ; exp:2; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  private boolean conditionFifth(boolean flag1, boolean flag2) { // indent:2 ; exp:2; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  private boolean conditionSixth(boolean flag, // indent:2 ; exp:2; ok
+      SecondClassWithVeryVeryVeryLongName instance) { // indent:6 ; exp:6; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  private boolean conditionNoArg() { // indent:2 ; exp:2; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  class InnerClassFoo { // indent:2 ; exp:2; ok
+
+    void fooMethodWithIf() { // indent:4 ; exp:4; ok
+      if (conditionFirst("Loooooooooooooooooong", new // indent:6 ; exp:6; ok
+          SecondClassWithVeryVeryVeryLongName("Loooooooooooooooooog"). // indent:10 ; exp:10; ok
+              getInteger(new FooIfClass(), "Loooooooooooooooooog"), // indent:14 ; exp:>10; ok
+              new InnerClassFoo())) {} // indent:14 ; exp:>10; ok
+
+      if (conditionSecond(10000000000.0, new // indent:6 ; exp:6; ok
+          SecondClassWithVeryVeryVeryLongName("Looooooooooooo" // indent:10 ; exp:10; ok
+          + "oooooooooooong").getString(new FooIfClass(), // indent:10 ; exp:10; ok
+          new SecondClassWithVeryVeryVeryLongName("loooooooooong"). // indent:10 ; exp:10; ok
+          getInteger(new FooIfClass(), "loooooooooooooong")), "loooooooooooong") // indent:10 ; exp:10; ok
+          || conditionThird(2048) || conditionFourth(new // indent:10 ; exp:10; ok
+          SecondClassWithVeryVeryVeryLongName("Looooooooooooooo" // indent:10 ; exp:10; ok
+            + "ooooooooooooong").getBoolean(new FooIfClass(), false)) || // indent:12 ; exp:>10; ok
+            conditionFifth(true, new SecondClassWithVeryVeryVeryLongName(getString(2048, "Looo" // indent:12 ; exp:>10; ok
+            + "ooooooooooooooooooooooooooooooooooooooooooong")).getBoolean( // indent:12 ; exp:>10; ok
+            new FooIfClass(), true)) || conditionSixth(false, new // indent:12 ; exp:>10; ok
+              SecondClassWithVeryVeryVeryLongName(getString(100000, "Loooooong" // indent:14 ; exp:>10; ok
+              + "Fooooooo><"))) || conditionNoArg() // indent:14 ; exp:>10; ok
+              || conditionNoArg() || // indent:14 ; exp:>10; ok
+              conditionNoArg() || conditionNoArg()) {} // indent:14 ; exp:>10; ok
+    } // indent:4 ; exp:4; ok
+
+    FooIfClass anonymousClass = new FooIfClass() { // indent:4 ; exp:4; ok
+
+      void fooMethodWithIf(String stringStringStringStringLooooongString, // indent:6 ; exp:6; ok
+          int intIntIntVeryLongNameForIntVariable, boolean // indent:10 ; exp:10; ok
+              fooooooooobooleanBooleanVeryLongName) { // indent:14 ; exp:>10; ok
+
+        if (conditionFirst("Loooooooooooooooooong", new // indent:8 ; exp:8; ok
+            SecondClassWithVeryVeryVeryLongName("Loooooooooooooooooog"). // indent:12 ; exp:12; ok
+                getInteger(new FooIfClass(), "Loooooooooooooooooog"), // indent:16 ; exp:>12; ok
+                   new InnerClassFoo())) {} // indent:19 ; exp:>12; ok
+
+        if (conditionSecond(10000000000.0, new // indent:8 ; exp:8; ok
+            SecondClassWithVeryVeryVeryLongName("Looooooooooooo" // indent:12 ; exp:12; ok
+            + "oooooooooooong").getString(new FooIfClass(), // indent:12 ; exp:12; ok
+            new SecondClassWithVeryVeryVeryLongName("loooooooooong"). // indent:12 ; exp:12; ok
+            getInteger(new FooIfClass(), "loooooooooooooong")), "loooooooooooong") // indent:12 ; exp:12; ok
+            || conditionThird(2048) || conditionFourth(new // indent:12 ; exp:12; ok
+            SecondClassWithVeryVeryVeryLongName("Looooooooooooooo" // indent:12 ; exp:12; ok
+              + "ooooooooooooong").getBoolean(new FooIfClass(), false)) || // indent:14 ; exp:>12; ok
+              conditionFifth(true, new SecondClassWithVeryVeryVeryLongName(getString(2048, "Looo" // indent:14 ; exp:>12; ok
+              + "ooooooooooooooooooooooooooooooooooooooooooong")).getBoolean( // indent:14 ; exp:>12; ok
+              new FooIfClass(), true)) || conditionSixth(false, new // indent:14 ; exp:>12; ok
+                SecondClassWithVeryVeryVeryLongName(getString(100000, "Loooooong" // indent:16 ; exp:>12; ok
+                + "Fooooooo><"))) || conditionNoArg() // indent:16 ; exp:>12; ok
+                || conditionNoArg() || // indent:16 ; exp:>12; ok
+                  conditionNoArg() || conditionNoArg() // indent:18 ; exp:>12; ok
+                     && fooooooooobooleanBooleanVeryLongName) {} // indent:21 ; exp:>12; ok
+      } // indent:6 ; exp:6; ok
+    }; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+}
+
+class SecondClassWithVeryVeryVeryLongName { // indent:0 ; exp:0; ok
+    
+  public SecondClassWithVeryVeryVeryLongName(String string) { // indent:2 ; exp:2; ok
+    
+  } // indent:2 ; exp:2; ok
+    
+  String getString(FooIfClass instance, int integer) { // indent:2 ; exp:2; ok
+    return "String"; // indent:4 ; exp:4; ok  
+  } // indent:2 ; exp:2; ok
+  
+  int getInteger(FooIfClass instance, String string) { // indent:2 ; exp:2; ok
+    return -1;   // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  boolean getBoolean(FooIfClass instance, boolean flag) { // indent:2 ; exp:2; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  SecondClassWithVeryVeryVeryLongName getInstanse() { // indent:2 ; exp:2; ok
+    return new SecondClassWithVeryVeryVeryLongName("VeryLoooooooooo" // indent:4 ; exp:4; ok
+        + "oongString"); // indent:8 ; exp:8; ok
+  } // indent:2 ; exp:2; ok
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/IndentationCorrectWhileDoWhileAndParameterInput.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/IndentationCorrectWhileDoWhileAndParameterInput.java
new file mode 100644
index 0000000..823657c
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/IndentationCorrectWhileDoWhileAndParameterInput.java
@@ -0,0 +1,220 @@
+package com.google.checkstyle.test.chapter4formatting.rule4841indentation; // indent:0 ; exp:0; ok
+
+class FooWhileClass { // indent:0 ; exp:0; ok
+    
+  String getString(int someInt, String someString) { // indent:2 ; exp:2; ok
+    return "String"; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+
+  void fooMethodWithIf() { // indent:2 ; exp:2; ok
+
+    while (conditionFirst("Loooooooooooooooooong", new // indent:4 ; exp:4; ok
+        SecondWhileClassWithVeryVeryVeryLongName("Loooooooooooooooooog"). // indent:8 ; exp:8; ok
+           getInteger(new FooWhileClass(), "Loooooooooooooooooog"), // indent:11 ; exp:>8; ok
+          new InnerClassFoo())) {} // indent:10 ; exp:>8; ok
+    
+    do { // indent:4 ; exp:4; ok
+    	
+    } while (conditionFirst("Loooooooooooooooooong", new // indent:4 ; exp:4; ok
+         SecondWhileClassWithVeryVeryVeryLongName("Loooooooooooooooooog"). // indent:9 ; exp:>8; ok
+               getInteger(new FooWhileClass(), "Loooooooooooooooooog"), // indent:15 ; exp:>8; ok
+         new InnerClassFoo())); // indent:10 ; exp:>8; ok
+    
+    while (conditionSecond(10000000000.0, new // indent:4 ; exp:4; ok
+         SecondWhileClassWithVeryVeryVeryLongName("Looooooooooooo" // indent:9 ; exp:>8; ok
+        + "oooooooooooong").getString(new FooWhileClass(), // indent:8 ; exp:8; ok
+           new SecondWhileClassWithVeryVeryVeryLongName("loooooooooong"). // indent:11 ; exp:>8; ok
+        getInteger(new FooWhileClass(), "loooooooooooooong")), "loooooooooooong") // indent:8 ; exp:8; ok
+              || conditionThird(2048) || conditionFourth(new // indent:14 ; exp:>8; ok
+        SecondWhileClassWithVeryVeryVeryLongName("Looooooooooooooo" // indent:8 ; exp:8; ok
+        + "ooooooooooooong").getBoolean(new FooWhileClass(), false)) || // indent:8 ; exp:8; ok
+            conditionFifth(true, new SecondWhileClassWithVeryVeryVeryLongName( // indent:12 ; exp:>8; ok
+            getString(2048, "Looo" // indent:12 ; exp:>8; ok
+        + "ooooooooooooooooooooooooooooooooooooooooooong")).getBoolean( // indent:8 ; exp:8; ok
+        new FooWhileClass(), true)) || conditionSixth(false, new // indent:8 ; exp:8; ok
+           SecondWhileClassWithVeryVeryVeryLongName(getString(100000, "Loooooong" // indent:11 ; exp:>8; ok
+        + "Fooooooo><"))) || conditionNoArg() // indent:8 ; exp:8; ok
+          || conditionNoArg() || // indent:10 ; exp:>8; ok
+          conditionNoArg() || conditionNoArg()) {} // indent:8 ; exp:8; ok
+    
+    do { // indent:4 ; exp:4; ok
+    	
+    } while (conditionSecond(10000000000.0, new // indent:4 ; exp:4; ok
+          SecondWhileClassWithVeryVeryVeryLongName("Looooooooooooo" // indent:10 ; exp:>8; ok
+          + "oooooooooooong").getString(new FooWhileClass(), // indent:10 ; exp:>8; ok
+        new SecondWhileClassWithVeryVeryVeryLongName("loooooooooong"). // indent:8 ; exp:8; ok
+             getInteger(new FooWhileClass(), "loooooooooooooong")), "loooooooooooong") // indent:13 ; exp:>8; ok
+        || conditionThird(2048) || conditionFourth(new // indent:8 ; exp:8; ok
+           SecondWhileClassWithVeryVeryVeryLongName("Looooooooooooooo" // indent:11 ; exp:>8; ok
+        + "ooooooooooooong").getBoolean(new FooWhileClass(), false)) || // indent:8 ; exp:8; ok
+        conditionFifth(true, new SecondWhileClassWithVeryVeryVeryLongName(getString(2048, "Looo" // indent:8 ; exp:8; ok
+        + "ooooooooooooooooooooooooooooooooooooooooooong")).getBoolean( // indent:8 ; exp:8; ok
+        new FooWhileClass(), true)) || conditionSixth(false, new // indent:8 ; exp:8; ok
+           SecondWhileClassWithVeryVeryVeryLongName(getString(100000, "Loooooong" // indent:11 ; exp:>8; ok
+        + "Fooooooo><"))) || conditionNoArg() // indent:8 ; exp:8; ok
+             || conditionNoArg() || // indent:13 ; exp:>8; ok
+        conditionNoArg() || conditionNoArg()); // indent:8 ; exp:8; ok
+  } // indent:2 ; exp:2; ok
+
+  private boolean conditionFirst(String longString, int // indent:2 ; exp:2; ok
+      integer, InnerClassFoo someInstance) { // indent:6 ; exp:6; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  private boolean conditionSecond(double longLongLongDoubleValue, // indent:2 ; exp:2; ok
+      String longLongLongString, String secondLongLongString) { // indent:6 ; exp:6; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  private boolean conditionThird(long veryLongValue) { // indent:2 ; exp:2; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+
+  private boolean conditionFourth(boolean flag) { // indent:2 ; exp:2; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  private boolean conditionFifth(boolean flag1, boolean flag2) { // indent:2 ; exp:2; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  private boolean conditionSixth(boolean flag, // indent:2 ; exp:2; ok
+      SecondWhileClassWithVeryVeryVeryLongName instance) { // indent:6 ; exp:6; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  private boolean conditionNoArg() { // indent:2 ; exp:2; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  class InnerClassFoo { // indent:2 ; exp:2; ok
+
+    void fooMethodWithIf() { // indent:4 ; exp:4; ok
+      while (conditionFirst("Loooooooooooooooooong", new // indent:6 ; exp:6; ok
+          SecondWhileClassWithVeryVeryVeryLongName("Loooooooooooooooooog"). // indent:10 ; exp:10; ok
+              getInteger(new FooWhileClass(), "Loooooooooooooooooog"), // indent:14 ; exp:>10; ok
+              new InnerClassFoo())) {} // indent:14 ; exp:>10; ok
+
+      do { // indent:6 ; exp:6; ok
+        /* Do somethig*/
+      } while (conditionFirst("Loooooooooooooooooong", new // indent:6 ; exp:6; ok
+          SecondWhileClassWithVeryVeryVeryLongName("Loooooooooooooooooog"). // indent:10 ; exp:10; ok
+              getInteger(new FooWhileClass(), "Loooooooooooooooooog"), // indent:14 ; exp:>10; ok
+              new InnerClassFoo())); // indent:14 ; exp:>10; ok
+
+      while (conditionSecond(10000000000.0, new // indent:6 ; exp:6; ok
+          SecondWhileClassWithVeryVeryVeryLongName("Looooooooooooo" // indent:10 ; exp:10; ok
+          + "oooooooooooong").getString(new FooWhileClass(), // indent:10 ; exp:10; ok
+          new SecondWhileClassWithVeryVeryVeryLongName("loooooooooong"). // indent:10 ; exp:10; ok
+          getInteger(new FooWhileClass(), "loooooooooooooong")), "loooooooooooong") // indent:10 ; exp:10; ok
+          || conditionThird(2048) || conditionFourth(new // indent:10 ; exp:10; ok
+          SecondWhileClassWithVeryVeryVeryLongName("Looooooooooooooo" // indent:10 ; exp:10; ok
+            + "ooooooooooooong").getBoolean(new FooWhileClass(), false)) || // indent:12 ; exp:>10; ok
+            conditionFifth(true, new SecondWhileClassWithVeryVeryVeryLongName(getString(2048, "Looo" // indent:12 ; exp:>10; ok
+            + "ooooooooooooooooooooooooooooooooooooooooooong")).getBoolean( // indent:12 ; exp:>10; ok
+            new FooWhileClass(), true)) || conditionSixth(false, new // indent:12 ; exp:>10; ok
+              SecondWhileClassWithVeryVeryVeryLongName(getString(100000, "Loooooong" // indent:14 ; exp:>10; ok
+              + "Fooooooo><"))) || conditionNoArg() // indent:14 ; exp:>10; ok
+              || conditionNoArg() || // indent:14 ; exp:>10; ok
+              conditionNoArg() || conditionNoArg()) {} // indent:14 ; exp:>10; ok
+      
+      do {
+    	/* Do smth*/
+      } while (conditionSecond(10000000000.0, new // indent:6 ; exp:6; ok
+          SecondWhileClassWithVeryVeryVeryLongName("Looooooooooooo" // indent:10 ; exp:10; ok
+          + "oooooooooooong").getString(new FooWhileClass(), // indent:10 ; exp:10; ok
+          new SecondWhileClassWithVeryVeryVeryLongName("loooooooooong"). // indent:10 ; exp:10; ok
+          getInteger(new FooWhileClass(), "loooooooooooooong")), "loooooooooooong") // indent:10 ; exp:10; ok
+          || conditionThird(2048) || conditionFourth(new // indent:10 ; exp:10; ok
+          SecondWhileClassWithVeryVeryVeryLongName("Looooooooooooooo" // indent:10 ; exp:10; ok
+            + "ooooooooooooong").getBoolean(new FooWhileClass(), false)) || // indent:12 ; exp:>10; ok
+            conditionFifth(true, new SecondWhileClassWithVeryVeryVeryLongName(getString(2048, "Looo" // indent:12 ; exp:>10; ok
+            + "ooooooooooooooooooooooooooooooooooooooooooong")).getBoolean( // indent:12 ; exp:>10; ok
+            new FooWhileClass(), true)) || conditionSixth(false, new // indent:12 ; exp:>10; ok
+              SecondWhileClassWithVeryVeryVeryLongName(getString(100000, "Loooooong" // indent:14 ; exp:>10; ok
+              + "Fooooooo><"))) || conditionNoArg() // indent:14 ; exp:>10; ok
+              || conditionNoArg() || // indent:14 ; exp:>10; ok
+              conditionNoArg() || conditionNoArg()); // indent:14 ; exp:>10; ok
+    } // indent:4 ; exp:4; ok
+
+    FooWhileClass anonymousClass = new FooWhileClass() { // indent:4 ; exp:4; ok
+
+      void fooMethodWithIf(String stringStringStringStringLooooongString, // indent:6 ; exp:6; ok
+          int intIntIntVeryLongNameForIntVariable, boolean // indent:10 ; exp:10; ok
+              fooooooooobooleanBooleanVeryLongName) { // indent:14 ; exp:>10; ok
+
+        while (conditionFirst("Loooooooooooooooooong", new // indent:8 ; exp:8; ok
+            SecondWhileClassWithVeryVeryVeryLongName("Loooooooooooooooooog"). // indent:12 ; exp:12; ok
+                getInteger(new FooWhileClass(), "Loooooooooooooooooog"), // indent:16 ; exp:>12; ok
+                   new InnerClassFoo())) {} // indent:19 ; exp:>12; ok
+        
+        do { // indent:8 ; exp:8; ok
+          /* Do smth*/
+        } while (conditionFirst("Loooooooooooooooooong", new // indent:8 ; exp:8; ok
+            SecondWhileClassWithVeryVeryVeryLongName("Loooooooooooooooooog"). // indent:12 ; exp:12; ok
+                getInteger(new FooWhileClass(), "Loooooooooooooooooog"), // indent:16 ; exp:>12; ok
+                   new InnerClassFoo())); // indent:19 ; exp:>12; ok
+
+        while (conditionSecond(10000000000.0, new // indent:8 ; exp:8; ok
+            SecondWhileClassWithVeryVeryVeryLongName("Looooooooooooo" // indent:12 ; exp:12; ok
+            + "oooooooooooong").getString(new FooWhileClass(), // indent:12 ; exp:12; ok
+            new SecondWhileClassWithVeryVeryVeryLongName("loooooooooong"). // indent:12 ; exp:12; ok
+            getInteger(new FooWhileClass(), "loooooooooooooong")), "loooooooooooong") // indent:12 ; exp:12; ok
+            || conditionThird(2048) || conditionFourth(new // indent:12 ; exp:12; ok
+            SecondWhileClassWithVeryVeryVeryLongName("Looooooooooooooo" // indent:12 ; exp:12; ok
+              + "ooooooooooooong").getBoolean(new FooWhileClass(), false)) || // indent:14 ; exp:>12; ok
+              conditionFifth(true, new SecondWhileClassWithVeryVeryVeryLongName(getString(2048, "Looo" // indent:14 ; exp:>12; ok
+              + "ooooooooooooooooooooooooooooooooooooooooooong")).getBoolean( // indent:14 ; exp:>12; ok
+              new FooWhileClass(), true)) || conditionSixth(false, new // indent:14 ; exp:>12; ok
+                SecondWhileClassWithVeryVeryVeryLongName(getString(100000, "Loooooong" // indent:16 ; exp:>12; ok
+                + "Fooooooo><"))) || conditionNoArg() // indent:16 ; exp:>12; ok
+                || conditionNoArg() || // indent:16 ; exp:>12; ok
+                  conditionNoArg() || conditionNoArg() // indent:18 ; exp:>12; ok
+                     && fooooooooobooleanBooleanVeryLongName) {} // indent:21 ; exp:>12; ok
+        
+        do { // indent:8 ; exp:8; ok
+          /* Do smth*/
+        } while (conditionSecond(10000000000.0, new // indent:8 ; exp:8; ok
+            SecondWhileClassWithVeryVeryVeryLongName("Looooooooooooo" // indent:12 ; exp:12; ok
+            + "oooooooooooong").getString(new FooWhileClass(), // indent:12 ; exp:12; ok
+            new SecondWhileClassWithVeryVeryVeryLongName("loooooooooong"). // indent:12 ; exp:12; ok
+            getInteger(new FooWhileClass(), "loooooooooooooong")), "loooooooooooong") // indent:12 ; exp:12; ok
+            || conditionThird(2048) || conditionFourth(new // indent:12 ; exp:12; ok
+            SecondWhileClassWithVeryVeryVeryLongName("Looooooooooooooo" // indent:12 ; exp:12; ok
+              + "ooooooooooooong").getBoolean(new FooWhileClass(), false)) || // indent:14 ; exp:>12; ok
+              conditionFifth(true, new SecondWhileClassWithVeryVeryVeryLongName(getString(2048, "Looo" // indent:14 ; exp:>12; ok
+              + "ooooooooooooooooooooooooooooooooooooooooooong")).getBoolean( // indent:14 ; exp:>12; ok
+              new FooWhileClass(), true)) || conditionSixth(false, new // indent:14 ; exp:>12; ok
+                SecondWhileClassWithVeryVeryVeryLongName(getString(100000, "Loooooong" // indent:16 ; exp:>12; ok
+                + "Fooooooo><"))) || conditionNoArg() // indent:16 ; exp:>12; ok
+                || conditionNoArg() || // indent:16 ; exp:>12; ok
+                  conditionNoArg() || conditionNoArg() // indent:18 ; exp:>12; ok
+                     && fooooooooobooleanBooleanVeryLongName);// indent:21 ; exp:>12; ok
+      } // indent:6 ; exp:6; ok
+    }; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+}
+
+class SecondWhileClassWithVeryVeryVeryLongName { // indent:0 ; exp:0; ok
+    
+  public SecondWhileClassWithVeryVeryVeryLongName(String string) { // indent:2 ; exp:2; ok
+    
+  } // indent:2 ; exp:2; ok
+    
+  String getString(FooWhileClass instance, int integer) { // indent:2 ; exp:2; ok
+    return "String"; // indent:4 ; exp:4; ok  
+  } // indent:2 ; exp:2; ok
+  
+  int getInteger(FooWhileClass instance, String string) { // indent:2 ; exp:2; ok
+    return -1;   // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  boolean getBoolean(FooWhileClass instance, boolean flag) { // indent:2 ; exp:2; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  SecondWhileClassWithVeryVeryVeryLongName getInstanse() { // indent:2 ; exp:2; ok
+    return new SecondWhileClassWithVeryVeryVeryLongName("VeryLoooooooooo" // indent:4 ; exp:4; ok
+        + "oongString"); // indent:8 ; exp:8; ok
+  } // indent:2 ; exp:2; ok
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputAnonymousClasses.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputAnonymousClasses.java
new file mode 100644
index 0000000..8d16fa4
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputAnonymousClasses.java
@@ -0,0 +1,46 @@
+package InputAnonymousClasses;
+
+import InputAnonymousClasses.StrangeInstance;
+import InputAnonymousClasses.InputAnonymousClasses;
+
+ at MyAnnotation
+public class
+    InputAnonymousClasses { // indent:0 ; exp:0; ok
+  public InputAnonymousClasses(String longString, String secondLongString) { // indent:2 ; exp:2; ok
+    
+  } // indent:2 ; exp:2; ok
+  public boolean foo() { // indent:2 ; exp:2; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  void foo2(StrangeInstance instance) {} // indent:2 ; exp:2; ok
+} // indent:0 ; exp:0; ok
+
+class WithAnonnymousClass {
+  public static final InputAnonymousClasses anon = new InputAnonymousClasses("Looooooooooooooooong", // indent:2 ; exp:2; ok
+      "SecondLoooooooooooong") { // indent:6 ; exp:6; ok
+    @Override public boolean foo() { // indent:4 ; exp:4; ok
+      return false; // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+  }; // indent:2 ; exp:2; ok
+  
+  InputAnonymousClasses foo() { // indent:2 ; exp:2; ok
+    return new InputAnonymousClasses(
+        "Loooooooooooooooong", "SecondLoooooooooong") { // indent:4 ; exp:4; ok
+          @Override public boolean foo() { // indent:6 ; exp:6; ok
+            InputAnonymousClasses InputAnonymousClasses = new InputAnonymousClasses("", ""); // indent:8 ; exp:8; ok
+            InputAnonymousClasses.equals(new StrangeInstance(new InputAnonymousClasses("", "")) { // indent:8 ; exp:8; ok
+              @Override void foo (String loongString, String secondLongString) {} // indent:10 ; exp:10; ok
+            }); // indent:8 ; exp:8; ok
+            return false; // indent:8 ; exp:8; ok
+          } // indent:6 ; exp:6; ok
+        }; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+}
+
+class StrangeInstance { // indent:0 ; exp:0; ok
+  public StrangeInstance(InputAnonymousClasses InputAnonymousClasses) {} // indent:2 ; exp:2; ok
+  void foo (String loongString, String secondLongString) {} // indent:2 ; exp:2; ok
+} // indent:0 ; exp:0; ok
+
+ at interface MyAnnotation {}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputArrays.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputArrays.java
new file mode 100644
index 0000000..9cbe56d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputArrays.java
@@ -0,0 +1,57 @@
+package InputAnonymousClasses;
+
+class InputArrays { // indent:0 ; exp:0; ok
+  /**
+   * Look-up table for factories.
+   */
+  static final int[] factories = { 666666, 666666, // indent:2 ; exp:2; ok
+    666666, 666666, 666666, // indent:4 ; exp:4; ok
+    666666, 666666, 666666, // indent:4 ; exp:4; ok
+  }; // indent:2 ; exp:2; ok
+
+  static final int[][] factories1 = { // indent:2 ; exp:2; ok
+    { 666666, 666666, 666666, 666666 }, // indent:4 ; exp:4; ok
+    {}, // no support for SOFT keys // indent:4 ; exp:4; ok
+    { 666666, 666666, 666666, 666666 } // indent:4 ; exp:4; ok
+  }; // indent:2 ; exp:2; ok
+
+  // binomial(biggestBinomials[k], k) fits in an int, but not
+  // binomial(biggestBinomials[k]+1,k).
+  static int[] biggestBinomials = { // indent:2 ; exp:2; ok
+    Integer.MAX_VALUE, // indent:4 ; exp:4; ok
+    Integer.MAX_VALUE, // indent:4 ; exp:4; ok
+    65536, // indent:4 ; exp:4; ok
+    2345, // indent:4 ; exp:4; ok
+    477, // indent:4 ; exp:4; ok
+    193, // indent:4 ; exp:4; ok
+    110, // indent:4 ; exp:4; ok
+    75, // indent:4 ; exp:4; ok
+    58, // indent:4 ; exp:4; ok
+    49, // indent:4 ; exp:4; ok
+    43, // indent:4 ; exp:4; ok
+    39, // indent:4 ; exp:4; ok
+    37, // indent:4 ; exp:4; ok
+    35, // indent:4 ; exp:4; ok
+    34, // indent:4 ; exp:4; ok
+    34, // indent:4 ; exp:4; ok
+    33 // indent:4 ; exp:4; ok
+  }; // indent:2 ; exp:2; ok
+
+  @VisibleForTesting static final int[] halfPowersOf10 =
+      {3, 31, 316, 3162, 31622, 316227, 3162277, 31622776, 316227766, Integer.MAX_VALUE};
+  
+  @Override
+  public byte[] asBytes() {
+    return new byte[] {
+        (byte) hash,
+        (byte) (hash >> 8),
+        (byte) (hash >> 16),
+        (byte) (hash >> 24),
+        (byte) (hash >> 32),
+        (byte) (hash >> 40),
+        (byte) (hash >> 48),
+        (byte) (hash >> 56)};
+  }
+}
+
+ at interface VisibleForTesting {}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputBraceAdjustment.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputBraceAdjustment.java
new file mode 100644
index 0000000..2de96ce
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputBraceAdjustment.java
@@ -0,0 +1,27 @@
+/*
+ * InputBraceAdjustment.java
+ *
+ * Created on February 21, 2003, 11:21 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputBraceAdjustment 
+  {
+    
+    /** Creates a new instance of InputBraceAdjustment */
+    public InputBraceAdjustment() 
+      {
+        // sorry about the religious commentary... :)
+        boolean uglyGnuStyle = true;
+        if (uglyGnuStyle)
+          {
+            System.out.println("ugly GNU style braces");
+        }
+      }
+    
+  }
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputCaseLevel.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputCaseLevel.java
new file mode 100644
index 0000000..6969fda
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputCaseLevel.java
@@ -0,0 +1,30 @@
+/*
+ * InputCaseLevel.java
+ *
+ * Created on February 21, 2003, 11:15 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputCaseLevel {
+    
+    /** Creates a new instance of InputCaseLevel */
+    public InputCaseLevel() {
+        int test = 4;
+        switch (test) {
+        case 4: 
+            break;
+        case 2:
+            break;
+          default:
+            break;
+        }
+        
+        
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputClassesMethods.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputClassesMethods.java
new file mode 100644
index 0000000..450daaa
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputClassesMethods.java
@@ -0,0 +1,60 @@
+import java.util.Iterator;  // indent:0 ; exp:0; ok
+
+import IndentationCorrectClassInput.InnerClass;
+
+class IndentationCorrectClassInput  // indent:0 ; exp:0; ok
+    implements Runnable, Cloneable {  // indent:4 ; exp:4; ok
+    
+  class InnerClass implements  // indent:2 ; exp:2; ok
+          Iterable<String>,  // indent:11 ; exp:>6; ok
+             Cloneable {  // indent:13 ; exp:>6; ok
+    @Override  // indent:4 ; exp:4; ok
+    public Iterator<String> iterator() {  // indent:4 ; exp:4; ok
+      return null;  // indent:6 ; exp:6; ok
+    }  // indent:4 ; exp:4; ok
+  }  // indent:2 ; exp:2; ok
+  
+  class InnerClass2  // indent:2 ; exp:2; ok
+       extends  // indent:7 ; exp:>6; ok
+         SecondClassWithLongLongLongLongName {  // indent:10 ; exp:>6; ok
+    public InnerClass2(String string) {  // indent:4 ; exp:4; ok
+    }  // indent:4 ; exp:4; ok
+  }  // indent:2 ; exp:2; ok
+
+  @Override  // indent:2 ; exp:2; ok
+  public void run() {  // indent:2 ; exp:2; ok
+    SecondClassWithLongLongLongLongName anon =  // indent:4 ; exp:4; ok
+        new SecondClassWithLongLongLongLongName() {  // indent:8 ; exp:8; ok
+          @MyAnnotation
+          @Override
+          String longLongLongLongLongMethodName() {  // indent:14 ; exp:14; ok
+            return "String";  // indent:12 ; exp:12; ok
+          }  // indent:10 ; exp:10; ok
+        };  // indent:8 ; exp:8; ok
+    
+    SecondClassWithLongLongLongLongName anon2 = new  // indent:4 ; exp:4; ok
+          SecondClassWithLongLongLongLongName() {  // indent:10 ; exp:>8; ok
+
+    };  // indent:4 ; exp:4; ok
+  }  // indent:2 ; exp:2; ok
+}
+
+class SecondClassWithLongLongLongLongName  // indent:0 ; exp:0; ok
+    extends  // indent:4 ; exp:4; ok
+         IndentationCorrectClassInput{  // indent:9 ; exp:>4; ok
+  private boolean conditionFirst(String longString, int // indent:2 ; exp:2; ok
+      integer, InnerClass someInstance) { // indent:6 ; exp:6; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  private boolean conditionFirst1(String longString, int // indent:2 ; exp:2; ok
+      integer, InnerClass someInstance) // indent:6 ; exp:6; ok
+          throws Exception { // indent:10 ; exp:>6; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+}  // indent:0 ; exp:0; ok
+
+ at interface MyAnnotation {}
+
+ at MyAnnotation
+class Foo {}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidArrayInitIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidArrayInitIndent.java
new file mode 100644
index 0000000..fc4b308
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidArrayInitIndent.java
@@ -0,0 +1,112 @@
+/*
+ * InputInvalidArrayInitIndent.java
+ *
+ * Created on December 9, 2002, 9:57 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputInvalidArrayInitIndent {
+    
+    int[] array = new int[] {1, 2, 3};
+
+  int[] arrayb = new int[] {1, 2, 3};
+      int[] arrayc = new int[] {1, 2, 3};
+
+  int[] array2 = new int[] {
+      1, 2, 3
+      };
+
+      int[] array2b = new int[] {
+        1, 2, 3
+    };
+    
+    int[] array3 = new int[] {
+         1, 
+       2, 
+         3
+    };
+
+    
+    int[] array4 = new int[] 
+  {
+        1, 
+        2, 
+        3
+      };
+    
+
+    int[] array5 = new int[] 
+  {1, 2, 3};
+    
+
+    int[] array6 = new int[] { 1, 2,
+                    3,
+    4,};
+
+
+        
+    int[] array7 = new int[] { 
+      1, 2, 
+        3
+    };
+
+    
+  int[] array8 = new int[] { };
+
+      int[] array9 = new int[] { 
+  };
+
+    int[][] array10 = new int[][] { 
+      new int[] { 1, 2, 3},
+        new int[] { 1, 2, 3},
+    };
+
+    
+    int[][] array10b
+        = new int[][] { 
+          new int[] { 1, 2, 3},
+            new int[] { 1, 2, 3},
+        };
+    
+    private void func1(int[] arg) {
+        
+    }
+    
+        
+    /** Creates a new instance of InputValidArrayInitIndent */
+    public InputInvalidArrayInitIndent() {
+        
+        func1(new int[] {
+        1, 2, 3
+        });
+    }
+    
+    private static char[] sHexChars = {
+        '0', '1', '2', '3', '4', '5', '6', '7',
+        '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+
+    private void myFunc3() 
+    {
+        char[] sHexChars2 = {
+          '0', '1', '2', '3', '4', '5', '6', '7',
+              '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+        
+        char[] sHexChars3 = {
+          '0', '1', '2', '3', '4', '5', '6', '7',
+              '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' 
+      };
+        
+        char[] sHexChars4 = 
+      {
+              '0', '1', '2', '3', '4', '5', '6', '7',
+          '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' 
+      };
+        
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidAssignIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidAssignIndent.java
new file mode 100644
index 0000000..71c5ad3
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidAssignIndent.java
@@ -0,0 +1,29 @@
+package com.puppycrawl.tools.checkstyle.indentation;
+
+public class InputInvalidAssignIndent
+{
+    void foo(String[] args)
+    {
+        String line = mIndentCheck[
+          getLineNo()];
+        String line1 =
+          getLine();
+        line1 =
+          getLine();
+        int i 
+         =
+          1;
+        // TODO: this should be illegal.
+        i =
+            3;
+        // TODO: add more testing
+    }
+
+    private String[] mIndentCheck = null;
+    int getLineNo() {
+        return 1;
+    }
+    String getLine() {
+        return "";
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidBlockIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidBlockIndent.java
new file mode 100644
index 0000000..e456dc5
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidBlockIndent.java
@@ -0,0 +1,149 @@
+/*
+ * InputValidBlockIndent.java
+ *
+ * Created on December 8, 2002, 12:06 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputInvalidBlockIndent {
+    
+    /** Creates a new instance of InputValidBlockIndent */
+    public InputInvalidBlockIndent() {
+    }
+    
+    public void method1() {
+        
+        { }
+       { }
+         { }
+       
+         {
+       }
+         
+      {
+            
+      }
+      {
+        }
+      
+         {
+             int var = 3;
+            
+             var += 3;
+         }
+
+        
+      {
+          int var = 3;
+            
+          var += 3;
+      }
+        
+        
+      {  int var = 5; }
+    
+        {
+          int var = 3;
+            
+            var += 3;
+            
+          {
+                int innerVar = 4;
+                
+                innerVar += var;
+          }
+        }
+        {
+            int var = 3;
+            
+          var += 3;
+            
+          {
+              int innerVar = 4;
+                
+                innerVar += var;
+            }
+        }
+        
+        {
+            int var = 3;
+            
+            var += 3;
+            
+            {
+                int innerVar = 4;
+                
+                innerVar += var;
+          }
+        }
+    
+    }
+
+
+//  static init at beginning of line is broken for now
+ 
+    
+  static { int var = 4; }
+      static { int var = 4; }
+
+    
+    static {
+       int var = 4; 
+    }
+
+      static {
+        int var = 4; 
+  }
+    
+  static {
+        int var = 4; 
+      }
+    
+  static 
+    {
+      int var = 4; 
+    }
+    static 
+  {
+      int var = 4; 
+      }
+
+
+    static 
+    {
+      int var = 4; 
+    }
+
+    static 
+    {
+    int var = 4; 
+  }
+
+    static 
+    {
+        int var = 4; 
+      }
+
+ 
+  { int var = 4; }
+      { int var = 4; }
+
+    
+  {
+        int var = 4; 
+      }
+    
+      {
+        int var = 4; 
+  }
+    
+    {
+      int var = 4; 
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidClassDefIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidClassDefIndent.java
new file mode 100644
index 0000000..95ae37a
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidClassDefIndent.java
@@ -0,0 +1,192 @@
+/*
+ * InputValidMethodIndent.java
+ *
+ * Created on November 11, 2002, 10:13 PM
+ */
+
+
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import javax.swing.JButton;
+
+/**
+ *
+ * @author  jrichard
+ */
+  public class InputInvalidClassDefIndent extends java.awt.event.MouseAdapter implements java.awt.event.MouseListener {
+    
+
+}
+
+class InputInvalidClassDefIndentB extends java.awt.event.MouseAdapter implements java.awt.event.MouseListener 
+  {
+    
+
+  }
+
+
+  class InputInvalidClassDefIndentC 
+{
+    
+
+  }
+
+
+
+class InputValidClassDefIndent2 
+  extends java.awt.event.MouseAdapter 
+  implements java.awt.event.MouseListener 
+{
+
+}
+
+class InputValidClassDefIndent3
+  extends java.awt.event.MouseAdapter 
+    implements java.awt.event.MouseListener 
+{
+
+}
+
+final class InputValidClassDefIndent4
+    extends java.awt.event.MouseAdapter 
+  implements 
+  java.awt.event.MouseListener 
+{
+
+}
+
+  final class InputValidClassDefIndent5 extends java.awt.event.MouseAdapter implements java.awt.event.MouseListener 
+  {
+
+}
+
+  
+final class InputValidClassDefIndent5b extends java.awt.event.MouseAdapter implements java.awt.event.MouseListener 
+{
+
+  }
+
+
+class InputInvalidClassDefIndentc
+  extends java.awt.event.MouseAdapter implements java.awt.event.MouseListener {
+    
+
+}
+  
+
+
+final class InputValidClassDefIndent6 extends java.awt.event.MouseAdapter implements java.awt.event.MouseListener {
+
+  class foo { }
+  
+      class fooBS { }
+
+    
+  class foo2 { public int x; }
+
+    
+    class foo3 { 
+      public 
+            int x; 
+    }
+
+    class foo3b { 
+        public 
+          int x; 
+    }
+
+    
+    class foo4 { 
+      public int x; 
+    }
+    
+    class foo4c { 
+        public int x; 
+      }
+    
+      class foo4b { 
+        public int x; 
+    }
+
+      
+    private void myMethod() {
+      class localFoo {
+            
+        }
+          class localFoo1 {
+            
+          }
+
+        class localFoo2 {
+          int x;
+            
+            int func() { return 3; }
+        }
+
+          new JButton().addActionListener(new ActionListener()
+        {
+            public void actionPerformed(ActionEvent e) {
+                
+            }
+        });
+
+        
+        new JButton().addActionListener(new ActionListener() 
+      {
+            public void actionPerformed(ActionEvent e) {
+                
+            }
+      });
+        
+
+        new JButton().addActionListener(new ActionListener() 
+        {
+          public void actionPerformed(ActionEvent e) {
+                
+          }
+        });
+      
+      
+        new JButton().addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                int i = 2;
+            }
+        });
+        
+        Object o = new ActionListener() 
+        {
+            public void actionPerformed(ActionEvent e) {
+                
+            }
+        };
+
+        myfunc2(10, 10, 10,
+            myfunc3(11, 11,
+                11, 11),
+            10, 10,
+            10);
+          
+        
+    }
+    
+    private void myfunc2(int a, int b, int c, int d, int e, int f, int g) {
+    }
+    
+    private int myfunc3(int a, int b, int c, int d) {
+        return 1;
+    }
+}
+
+
+final 
+class InputValidClassDefIndent4d
+    extends 
+        java.awt.event.MouseAdapter 
+    implements 
+        java.awt.event.MouseListener 
+{
+
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidForIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidForIndent.java
new file mode 100644
index 0000000..1bb10df
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidForIndent.java
@@ -0,0 +1,82 @@
+/*
+ * InputValidForIndent.java
+ *
+ * Created on November 10, 2002, 10:04 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputInvalidForIndent {
+    
+    /** Creates a new instance of InputValidForIndent */
+    public InputInvalidForIndent() {
+    }
+    
+    
+    private void method1()
+    {
+      for (int i=0; i<10; i++) {
+          }
+
+         for (int i=0; i<10; i++) 
+      {
+      }
+
+        for (int i=0; i<10; i++) 
+        {
+          System.getProperty("foo");
+          }
+
+        for (int i=0; i<10; i++) 
+          {
+          boolean test = true;
+            if (test) { // mixed styles are OK
+                System.getProperty("foo");
+            }
+        }
+
+        for (
+            int i=0; 
+          i<10; 
+            i++) 
+        {
+            
+        }
+      
+       for (
+          int i=0; 
+            i<10; 
+            i++) 
+        {
+            
+        }
+      
+        for (int i=0; 
+            i<10; 
+       i++) 
+        {
+            
+        }
+
+      for (int i=0; 
+          i<10 && 4<5
+              && 7<8; 
+          i++) 
+        {
+        }
+      
+        for (int i=0; i<10; i++) {
+            System.getProperty("foo"); }
+
+        for (int i=0; 
+            i<10; i++
+            ) {
+            System.getProperty("foo");
+        }
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidIfIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidIfIndent.java
new file mode 100644
index 0000000..700d85d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidIfIndent.java
@@ -0,0 +1,254 @@
+/*
+ * ValidIndent.java
+ *
+ * Created on November 6, 2002, 9:39 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputInvalidIfIndent {
+        
+    // ctor with rcurly on same line
+    public InputInvalidIfIndent() {
+    }
+
+    // ctor with rcurly on next line
+    public InputInvalidIfIndent(int dummy)
+    {
+    }
+
+    // method with rcurly on same line
+    public void method() {
+    }
+
+    // method with rcurly on next line
+    public void method2()
+    {
+    }
+    
+    // method with a bunch of params
+    public void method2(int x, int y, int w, int h)
+    {
+    }
+    
+    // params on multiple lines
+    public void method2(int x, int y, int w, int h,
+        int x1, int y1, int w1, int h1)
+    {
+    }
+
+    // test ifs
+    public void emptyIfTest()
+    {
+        boolean test = true;
+                
+        // lcurly on same line
+ if (test) {
+        }
+        
+        // lcurly on next line -- if, rcurly indented too far, lcurly not far enough
+        // 
+         if (test) 
+         {
+       }
+        
+      if (test) 
+     {
+     }
+                
+        // lcurly for if and else on same line -- too much space after if on same line -- ALLOWED
+        if (test)      {
+          } else {      // this is not allowed
+       }
+        
+        // lcurly for if and else on same line
+         if (test) 
+       {
+        } 
+         else 
+        {
+         }
+
+        // lcurly for if and else on same line -- mixed braces
+          if (test) {
+       } 
+         else 
+       {
+         }
+        
+
+        // lcurly for if and else on same line -- mixed braces
+         if (test) 
+         {
+         } else 
+       {
+          }
+        
+        // lcurly for if and else on same line -- mixed braces
+      if (test) 
+          {
+          } else {
+       }
+        
+        // lcurly for if and else on same line -- mixed braces, unnested
+     if (test) {
+           } 
+     else {
+           }
+    }
+
+    /////  same as above, with statements
+    public void  populatedIfTest()
+    {
+        boolean test = false;
+        // no braces if
+        if (test)
+              System.getProperty("blah");
+
+        // no braces if/else
+        if (test)
+            System.getProperty("blah");
+        else
+            System.getProperty("blah");
+
+        
+        // lcurly on same line, and stmt
+        if (test) {
+              System.getProperty("blah");
+        }
+        
+        // lcurly on next line and stmt
+        if (test) 
+          {
+          System.getProperty("blah");
+        }
+        // lcurly for if and else on same line
+        if (test) {
+
+              System.
+          getProperty("blah");
+        } else {
+          System.
+        getProperty("blah");
+        }
+        
+        // lcurly for if and else on same line
+        if (test) 
+        {
+            System.getProperty("blah");
+                System.getProperty("blah");
+         } 
+        else 
+        {
+                System.getProperty("blah");
+            System.getProperty("blah");
+        }
+
+        // lcurly for if and else on same line -- mixed braces
+        if (test) {
+System.getProperty("blah");
+        } 
+        else 
+        {
+                                        System.getProperty("blah");
+        }
+        
+
+        // lcurly for if and else on same line -- mixed braces
+        if (test) 
+        {
+              System.getProperty("blah");
+        } else 
+        {
+              System.getProperty("blah");
+        }
+        
+        // lcurly for if and else on same line -- mixed braces
+        if (test) 
+        {
+          System.getProperty("blah");
+        } else {
+          System.getProperty("blah");
+        }
+        
+        // lcurly for if and else on same line -- mixed braces, unnested
+          if (test) {
+              System.getProperty("blah");
+          } 
+          else {
+              System.getProperty("blah");
+          }
+        
+        if (test
+         && 7 < 8 && 8 < 9
+           && 10 < 11) {
+        }
+        
+        if (test)
+          return;
+        
+        if (test) {
+       } else if (7 < 8) {
+        } else if (8 < 9) {
+        }
+
+        if (test) {
+            System.getProperty("blah"); 
+        } else if (7 < 8) {
+          System.getProperty("blah"); 
+        } else if (8 < 9) {
+          System.getProperty("blah"); 
+        }
+
+        
+        if (test)
+            System.getProperty("blah"); 
+        else if (7 < 8)
+          System.getProperty("blah"); 
+        else if (8 < 9)
+            System.getProperty("blah"); 
+        
+        
+        // TODO: bother to support this style?
+        if (test) {
+            System.getProperty("blah"); 
+        } else 
+          if (7 < 8) {
+                System.getProperty("blah"); 
+            } else 
+                if (8 < 9) {
+                  System.getProperty("blah"); 
+                }
+        
+        if (test) {
+            System.getProperty("blah"); }
+    }
+    
+    public void  parenIfTest() {
+        boolean test = true;
+        
+        if (test
+          ) {
+            System.getProperty("blah"); 
+        }
+
+        if (test
+      ) 
+        {
+            System.getProperty("blah"); 
+        }
+        
+        if 
+      (
+            test
+      ) {
+            System.getProperty("blah"); 
+        }
+        
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidLabelIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidLabelIndent.java
new file mode 100644
index 0000000..6069a13
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidLabelIndent.java
@@ -0,0 +1,42 @@
+/*
+ * InputInvalidLabelIndent.java
+ *
+ * Created on February 22, 2003, 12:11 AM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputInvalidLabelIndent {
+    
+    /** Creates a new instance of InputInvalidLabelIndent */
+    public InputInvalidLabelIndent() {
+        boolean test = true;
+        
+        while (test) {
+          label:
+            System.out.println("label test");
+            
+            if (test) {
+                unusedLabel:
+                System.out.println("more testing");
+            }
+            
+        }
+  label2:
+        System.out.println("toplevel");
+    label3:
+                  System.out.println("toplevel");
+                  System.out.println("toplevel");
+    label4:
+      System.out.println("toplevel");
+    label5:
+      System
+            .out.
+                println("toplevel");
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidMethodIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidMethodIndent.java
new file mode 100644
index 0000000..5b8bf20
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidMethodIndent.java
@@ -0,0 +1,186 @@
+/*
+ * InputInalidMethodIndent.java
+ *
+ * Created on November 11, 2002, 10:14 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+import java.util.Arrays;
+/**
+ *
+ * @author  jrichard
+ */
+public class InputInvalidMethodIndent {
+    
+    /** Creates a new instance of InputInalidMethodIndent */
+    public InputInvalidMethodIndent() {
+      }
+    
+    // ctor with rcurly on next line
+      public InputInvalidMethodIndent(int dummy)
+  {
+      }
+      
+    // method with rcurly on same line
+  public void method() {
+      }
+
+    // method with rcurly on next line
+    public void method2()
+    {
+    }
+    
+    // method with a bunch of params
+    public int method2(int x, int y, int w, int h) {
+        return 1;
+    }
+    
+    // params on multiple lines
+    public void method2(int x, int y, int w, int h,
+        int x1, int y1, int w1, int h1)
+    {
+    }
+
+    // params on multiple lines
+    public void method3(int x, int y, int w, int h,
+        int x1, int y1, int w1, int h1)
+    {
+        System.getProperty("foo");
+    }
+
+    
+    
+    // params on multiple lines
+    public void method4(int x, int y, int w, int h,
+        int x1, int y1, int w1, int h1)
+    {
+        boolean test = true;
+        if (test) {
+            System.getProperty("foo");
+        }
+    }
+    
+     public 
+     final
+     void 
+    method5()
+    {
+        boolean test = true;
+        if (test) {
+            System.getProperty("foo");
+        }
+    }
+    
+   public 
+   final
+   void 
+     method6()
+    {
+        boolean test = true;
+        if (test) {
+            System.getProperty("foo");
+        }
+    }
+   
+    public InputInvalidMethodIndent(int dummy, int dummy2)
+    {
+    System.getProperty("foo");
+    }
+      
+    void method6a()
+    {
+      boolean test = true;
+      if (test) {
+          System.getProperty("foo");
+      }
+      
+        System.out.println("methods are: " + 
+          Arrays.asList(
+                new String[] {"method"}).toString());
+
+                
+        System.out.println("methods are: " + 
+            Arrays.asList(
+              new String[] {"method"}).toString());
+                
+        System.out.println("methods are: " 
+          + Arrays.asList(
+                new String[] {"method"}).toString());
+                
+        System.out.println("methods are: " 
+            + Arrays.asList(
+              new String[] {"method"}).toString());
+                
+
+        String blah = (String) System.getProperty(
+          new String("type"));
+
+        
+        String blah1 = (String) System.getProperty(
+          new String("type")
+      );
+        
+        System.out.println("methods are: " + Arrays.asList(
+            new String[] {"method"}).toString()
+      );
+    }
+
+    
+    private void myfunc2(int a, int b, int c, int d, int e, int f, int g) {
+    }
+    
+    private int myfunc3(int a, int b, int c, int d) {
+        return 1;
+    }
+    
+    private void myMethod()
+    {
+        myfunc2(3, 4, 5, 
+          6, 7, 8, 9);
+            
+        myfunc2(3, 4, method2(3, 4, 5, 6) + 5, 
+          6, 7, 8, 9);
+        
+
+// TODO: this is not illegal, but probably should be
+//        myfunc3(11, 11, Integer.
+//            getInteger("mytest").intValue(),
+//            11);
+
+
+        System.out.toString()
+      .equals("blah");
+        
+     
+    }
+    
+    private void myFunc()
+      throws Exception
+    {
+    }
+
+    void method7() {
+        // return incorrectly indented
+    return;
+    }
+
+    void method8() {
+        // thow invorrectly indented
+    throw new RuntimeException("");
+    }
+
+    public
+int[]
+    method9()
+    {
+        return null;
+    }
+
+    private int[] getArray() {
+        return new int[] {1};
+    }
+
+    private void indexTest() {
+            getArray()[0] = 2;
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidSwitchIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidSwitchIndent.java
new file mode 100644
index 0000000..0ce5224
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidSwitchIndent.java
@@ -0,0 +1,96 @@
+/*
+ * InputValidSwitchIndent.java
+ *
+ * Created on November 27, 2002, 11:40 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputInvalidSwitchIndent {
+    
+    private static final int CONST = 5;
+    private static final int CONST2 = 2;
+    private static final int CONST3 = 3;
+    
+    /** Creates a new instance of InputInvalidSwitchIndent */
+    public InputInvalidSwitchIndent() {
+    }
+    
+    private void method1() {
+        int s = 3;
+        
+      switch (s) {
+            
+          case 4:
+              System.out.println("");
+                break;
+
+            case CONST:
+              break;
+
+              case CONST2:
+          case CONST3:
+                break;
+
+          default:
+              System.out.println("");
+              break;
+        }
+        
+
+        // some people like to add curlys to their cases:
+        switch (s) {
+            
+            case 4: {
+              System.out.println("");
+                  break;
+          }
+
+            case CONST2:
+            case CONST3:
+          {
+                System.out.println("");
+                break;
+              }
+
+            
+            case 22:
+              {
+                System.out.println("");
+                break;
+          }            
+        }
+         
+        // check broken 'case' lines
+        switch (s) {
+            
+            case 
+              CONST:
+                break;
+
+            case CONST2:
+            case 
+              CONST3:
+            {
+                System.out.println("");
+                break;
+            }
+        }        
+
+        switch (s) {
+      }
+
+        switch (s) 
+      {
+          }
+        switch (s) 
+          {
+      }
+        
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidTryIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidTryIndent.java
new file mode 100644
index 0000000..1bbf58d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidTryIndent.java
@@ -0,0 +1,84 @@
+/*
+ * InputInvalidTryIndent.java
+ *
+ * Created on December 31, 2002, 7:18 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputInvalidTryIndent {
+    
+    /** Creates a new instance of InputInvalidTryIndent */
+    public InputInvalidTryIndent() {
+    }
+    
+    public void method() {
+        
+         try {
+       } catch (Throwable t) {
+            System.out.println("err");
+       }
+
+    try {
+        System.out.println("test");
+    } finally {
+        System.out.println("finally");
+        }
+
+        try {
+        } catch (Throwable t) {
+        System.out.println("err");
+        } finally {
+        }
+
+        try {
+          } catch (Exception t) {
+            System.out.println("err");
+      } catch (Throwable t) {
+            System.out.println("err");
+        }
+
+        try {
+        } catch (Exception t) {
+        } catch (Throwable t) {
+     }
+
+        
+        try {
+            System.out.println("try");
+        } 
+        catch (Exception t) {
+          System.out.println("err");
+              System.out.println("err");
+          System.out.println("err");
+        } 
+      catch (Throwable t) {
+            System.out.println("err");
+        } 
+        finally {
+        }
+        
+        try 
+          {
+            System.out.println("try");
+          } 
+        catch (Exception t) 
+      {
+            System.out.println("err");
+            System.out.println("err");
+          } 
+        catch (Throwable t) 
+        {
+          System.out.println("err");
+        }
+        finally 
+        {
+        }
+        
+        
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidWhileIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidWhileIndent.java
new file mode 100644
index 0000000..f57f9a0
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputInvalidWhileIndent.java
@@ -0,0 +1,99 @@
+/*
+ * InputValidWhileIndent.java
+ *
+ * Created on November 10, 2002, 9:16 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputInvalidWhileIndent {
+    
+    /** Creates a new instance of InputValidWhileIndent */
+    public InputInvalidWhileIndent() {
+    }
+    private void method1()
+    {
+        boolean test = true;
+         while (test) {
+       }
+
+       while (test) 
+         {
+         }
+
+         while (test) 
+      {
+              System.getProperty("foo");
+      }
+
+          while (test)  {
+            System.getProperty("foo");
+          }
+        
+          while (test)  {
+            System.getProperty("foo");
+            System.getProperty("foo");
+          }
+        
+      while (test)  
+          {
+            System.getProperty("foo");
+            System.getProperty("foo");
+      }
+
+        while (test)      {        // TODO: this is allowed
+              if (test) {
+                  System.getProperty("foo");
+              }
+              System.getProperty("foo");
+          }
+        
+        while (test 
+          && 4 < 7 && 8 < 9
+            && 3 < 4) {
+        }
+
+        while (test 
+            && 4 < 7 && 8 < 9
+          && 3 < 4) {
+        }
+
+        while (test 
+            && 4 < 7 && 8 < 9
+          && 3 < 4) 
+        {
+        }
+        
+        while (test 
+            && 4 < 7 && 8 < 9
+            && 3 < 4
+     ) {
+            
+        }
+        
+        while (test 
+            && 4 < 7 && 8 < 9
+            && 3 < 4
+          ) {
+            
+        }
+
+        while (test 
+            && 4 < 7 && 8 < 9
+            && 3 < 4
+          ) 
+        {
+            
+        }
+
+        while (true)
+        {
+        continue;
+        }
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputLabels.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputLabels.java
new file mode 100644
index 0000000..1ecfe74
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputLabels.java
@@ -0,0 +1,151 @@
+package InputLabels; // indent:0 ; exp:0; ok
+
+class InputLabels { // indent:0 ; exp:0; ok
+  void foo() { // indent:2 ; exp:2; ok
+//    OUT: // indent:4 ; exp:4; ok
+    while (true) { // indent:4 ; exp:4; ok
+    } // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  void foo2() { // indent:2 ; exp:2; ok
+    positions: while (true) { // indent:4 ; exp:4; ok
+    } // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  void foo3() { // indent:2 ; exp:2; ok
+    OUT1: // indent:4 ; exp:4; warn
+    for (;;) { // indent:4 ; exp:4; ok
+      if (true){ // indent:6 ; exp:6; ok
+        break OUT1; // indent:8 ; exp:8; ok
+      } // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  void foo4() { // indent:2 ; exp:2; ok
+    OUT1: for (;;) { // indent:4 ; exp:4; ok
+      if (true){ // indent:6 ; exp:6; ok
+        break OUT1; // indent:8 ; exp:8; ok
+      } // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  void fooo() { // indent:2 ; exp:2; ok
+    IN: if (true) { // indent:4 ; exp:4; ok
+    } // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  void fooo1() { // indent:2 ; exp:2; ok
+    IN: // indent:4 ; exp:4; ok
+    if (true) { // indent:4 ; exp:4; ok
+    } // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  void foooo() { // indent:2 ; exp:2; ok
+    IN: do {} while (true); // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  void foooo1() { // indent:2 ; exp:2; ok
+    IN: // indent:4 ; exp:4; ok
+    do {} while (true); // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+
+  class Inner { // indent:2 ; exp:2; ok
+    void foo() { // indent:4 ; exp:4; ok
+      OUT: while (true) { // indent:6 ; exp:6; ok
+      } // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+
+    void foo2() { // indent:4 ; exp:4; ok
+      positions: // indent:6 ; exp:6; ok
+      while (true) { // indent:6 ; exp:6; ok
+      } // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+    
+    void foo5() { // indent:4 ; exp:4; ok
+      OUT1: // indent:6 ; exp:6; ok
+      for (;;) { // indent:6 ; exp:6; ok
+        if (true){ // indent:8 ; exp:8; ok
+          break OUT1; // indent:10 ; exp:10; ok
+        } // indent:8 ; exp:8; ok
+      } // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+    
+    void foo6() { // indent:4 ; exp:4; ok
+      OUT1: for (;;) { // indent:6 ; exp:6; ok
+        if (true){ // indent:8 ; exp:8; ok
+          break OUT1; // indent:10 ; exp:10; ok
+        } // indent:8 ; exp:8; ok
+      } // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+    
+    void fooo11() { // indent:4 ; exp:4; ok
+      IN: if (true) { // indent:6 ; exp:6; ok
+      } // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+    
+    void fooo12() { // indent:4 ; exp:4; ok
+      IN: // indent:6 ; exp:6; ok
+      if (true) { // indent:6 ; exp:6; ok
+      } // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+    
+    void foooo3() { // indent:4 ; exp:4; ok
+      IN: do {} while (true); // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+      
+    void foooo4() { // indent:4 ; exp:4; ok
+      IN: // indent:6 ; exp:6; ok
+      do {} while (true); // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  InputLabels anon = new InputLabels() { // indent:2 ; exp:2; ok
+    void foo() { // indent:4 ; exp:4; ok
+      OUT: while (true) { // indent:6 ; exp:6; ok
+      } // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+
+    void foo2() { // indent:4 ; exp:4; ok
+      positions:
+      while (true) { // indent:6 ; exp:6; ok
+      } // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+    
+    void foo5() { // indent:4 ; exp:4; ok
+      OUT1: // indent:6 ; exp:6; ok
+      for (;;) { // indent:6 ; exp:6; ok
+        if (true){ // indent:8 ; exp:8; ok
+          break OUT1; // indent:10 ; exp:10; ok
+        } // indent:8 ; exp:8; ok
+      } // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+      
+    void foo6() { // indent:4 ; exp:4; ok
+      OUT1: for (;;) { // indent:6 ; exp:6; ok
+        if (true){ // indent:8 ; exp:8; ok
+          break OUT1; // indent:10 ; exp:10; ok
+        } // indent:8 ; exp:8; ok
+      } // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+      
+    void fooo11() { // indent:4 ; exp:4; ok
+      IN: if (true) { // indent:6 ; exp:6; ok
+      } // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+      
+    void fooo12() { // indent:4 ; exp:4; ok
+      IN: // indent:6 ; exp:6; ok
+      if (true) { // indent:6 ; exp:6; ok
+      } // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+    
+    void foooo3() { // indent:4 ; exp:4; ok
+      IN: do {} while (true); // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+        
+    void foooo4() { // indent:4 ; exp:4; ok
+      IN: // indent:6 ; exp:6; ok
+      do {} while (true); // indent:6 ; exp:6; ok
+    } // indent:4 ; exp:4; ok
+  }; // indent:2 ; exp:2; ok
+} // indent:0 ; exp:0; ok
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputMembers.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputMembers.java
new file mode 100644
index 0000000..f1cfb8b
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputMembers.java
@@ -0,0 +1,100 @@
+import java.util.HashMap;
+
+
+/**
+ * Some Javadoc.
+ */
+class FooFieldClass { // indent:0 ; exp:0; ok
+    
+  boolean flag // indent:2 ; exp:2; ok
+     = conditionFirst("Loooooooooooooooooong", new  // indent:5 ; exp:6; warn
+      SecondFieldClassWithVeryVeryVeryLongName("Loooooooooooooooooog"). // indent:6 ; exp:6; ok
+      getInteger(new FooFieldClass(), "Loooooooooooooooooog"), new InnerClassFoo()); // indent:6 ; exp:6; ok
+  
+  
+  String getString(int someInt, String someString) { // indent:2 ; exp:2; ok
+    return "String"; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+
+  private boolean conditionFirst(String longString, int // indent:2 ; exp:2; ok
+      integer, InnerClassFoo someInstance) { // indent:6 ; exp:6; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  private boolean conditionSecond(double longLongLongDoubleValue, // indent:2 ; exp:2; ok
+      String longLongLongString, String secondLongLongString) { // indent:6 ; exp:6; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  class InnerClassFoo { // indent:2 ; exp:2; ok
+      
+    boolean flag // indent:4 ; exp:4; ok
+        = conditionFirst("Loooooooooooooooooong", new // indent:8 ; exp:8; ok
+        SecondFieldClassWithVeryVeryVeryLongName("Loooooooooooooooooog"). // indent:8 ; exp:8; ok
+            getInteger(new FooFieldClass(), "Loooooooooooooooooog"), // indent:12 ; exp:>8; ok
+             new InnerClassFoo()); // indent:13 ; exp:>8; ok
+          
+    FooFieldClass anonymousClass =
+        new FooFieldClass() { // indent:4 ; exp:4; ok
+          boolean secondFlag = conditionSecond(10000000000.0, new // indent:6 ; exp:6; ok
+              SecondFieldClassWithVeryVeryVeryLongName("Looooooooooooo" // indent:10 ; exp:10; ok
+                + "oooooooooooong").getString(new FooFieldClass(), // indent:12 ; exp:>10; ok
+                   new SecondFieldClassWithVeryVeryVeryLongName("loooooooooong"). // indent:15 ; exp:>10; ok
+                 getInteger(new FooFieldClass(), "loooooooooooooong")), "loooooooooooong"); // indent:13 ; exp:>10; ok
+        }; // indent:8 ; exp:8; ok
+   } // indent:3 ; exp:2; warn
+}
+
+class SecondFieldClassWithVeryVeryVeryLongName { // indent:0 ; exp:0; ok
+    
+  public SecondFieldClassWithVeryVeryVeryLongName(String string) { // indconditionTenthent:2 ; exp:2; ok
+    
+  } // indent:2 ; exp:2; ok
+    
+  String getString(FooFieldClass instance, int integer) { // indent:2 ; exp:2; ok
+    return "String"; // indent:4 ; exp:4; ok  
+  } // indent:2 ; exp:2; ok
+  
+  int getInteger(FooFieldClass instance, String string) { // indent:2 ; exp:2; ok
+    return -1;   // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  boolean getBoolean(FooFieldClass instance, boolean flag) { // indent:2 ; exp:2; ok
+    return false; // indent:4 ; exp:4; ok
+  } // indent:2 ; exp:2; ok
+  
+  SecondFieldClassWithVeryVeryVeryLongName getInstanse() { // indent:2 ; exp:2; ok
+    return new SecondFieldClassWithVeryVeryVeryLongName("VeryLoooooooooo" // indent:4 ; exp:4; ok
+        + "oongString"); // indent:8 ; exp:8; ok
+  } // indent:2 ; exp:2; ok
+} // indent:0 ; exp:0; ok
+
+abstract class WithAnnotations { // indent:0 ; exp:0; ok
+  @GwtIncompatible("Non-UTF-8" // indent:2 ; exp:2; ok
+       + "Charset") // indent:6 ; exp:6; ok
+  public static final int FOO_CONSTANT = 111; // indent:2 ; exp:2; ok
+  
+  @Override
+  private void foo34() {}
+  final Map<String, String> // indent:2 ; exp:2; ok
+      comeMapWithLongName = new HashMap // indent:6 ; exp:6; ok
+      <String, String>(); // indent:6 ; exp:6; ok
+
+  @MyAnnotation
+  byte[] getBytesInternal() {
+    return new byte[] {};
+  }
+  
+  @MyAnnotation public abstract ImmutableMap<R, Map<C, V>> rowMap();
+} // indent:0 ; exp:0; ok
+
+ at interface GwtIncompatible { // indent:0 ; exp:0; ok
+  String value(); // indent:2 ; exp:2; ok
+} // indent:0 ; exp:0; ok
+
+ at interface MyAnnotation {}
+
+ at MyAnnotation
+enum MyEnum{
+	
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputUseTabs.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputUseTabs.java
new file mode 100644
index 0000000..e13631e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputUseTabs.java
@@ -0,0 +1,28 @@
+/*
+ * InputUseTabs.java
+ *
+ * Created on December 24, 2002, 10:28 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputUseTabs {
+    
+	/** Creates a new instance of InputUseTabs */
+	public InputUseTabs() {
+		boolean test = true;
+		if (test)
+		{
+			while (
+				test == false) {
+				System.exit(2);
+			}
+		}
+		 System.exit(3);
+	}
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputUseTwoSpaces.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputUseTwoSpaces.java
new file mode 100644
index 0000000..9983896
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputUseTwoSpaces.java
@@ -0,0 +1,46 @@
+/*
+ * InputUseTabs.java
+ *
+ * Created on December 24, 2002, 10:28 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputUseTwoSpaces {
+    
+  /** Creates a new instance of InputUseTabs */
+  public InputUseTwoSpaces() {
+    boolean test = true;
+    if (test)
+    {
+      while (
+        test == false) {
+        System.exit(2);
+      }
+    }
+     System.exit(3);
+  }
+    
+}
+
+class Test {
+  public static void main(String[] args) {
+    System.out.println(" Hello" +
+      new Object() {
+        public String toString() {
+          return "World";
+        }
+      });
+
+    new Object()
+      .toString()
+      .toString()
+      .toString()
+      .toString()
+      .toString();
+  }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidArrayInitDefaultIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidArrayInitDefaultIndent.java
new file mode 100644
index 0000000..8167db4
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidArrayInitDefaultIndent.java
@@ -0,0 +1,105 @@
+/*
+ * InputValidArrayInitIndent.java
+ *
+ * Created on December 9, 2002, 9:57 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+public class InputValidArrayInitIndent {
+
+    private static char[] sHexChars = {
+        '0', '1', '2', '3', '4', '5', '6', '7',
+        '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+
+    int[] array = new int[] {1, 2, 3};
+
+    int[] array2 = new int[] {
+        1, 2, 3
+    };
+
+    int[] array3 = new int[] {
+        1,
+        2,
+        3
+    };
+
+    int[] array4 = new int[]
+    {
+        1,
+        2,
+        3
+    };
+
+    int[] array5 = new int[]
+    {1, 2, 3};
+
+    // check nesting on first line
+    int[] array6 = new int[] { 1, 2,
+        3
+    };
+
+    int[] array6a = new int[] { 1, 2,
+                                3, 4};
+
+    // nesting
+    int[] array7 = new int[] {
+        1, 2,
+        3
+    };
+
+    String[][] mStuff = new String[][] {
+        { "key", "value" }
+    };
+
+    String[][] mStuff1 = new String[][]
+    {
+        { "key", "value" }
+    };
+
+    int[] array8 = new int[] { };
+
+    int[] array9 = new int[] {
+    };
+
+    int[][] array10 = new int[][] {
+        new int[] { 1, 2, 3},
+        new int[] { 1, 2, 3},
+    };
+
+    int[][] array10b
+        = new int[][] {
+            new int[] { 1, 2, 3},
+            new int[] { 1, 2, 3},
+        };
+
+    private void func1(int[] arg) {
+
+        char[] sHexChars2 = {
+            '0', '1', '2', '3', '4', '5', '6', '7',
+            '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+
+        char[] sHexChars3 = {
+            '0', '1', '2', '3', '4', '5', '6', '7',
+            '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
+        };
+
+        char[] sHexChars4 =
+        {
+            '0', '1', '2', '3', '4', '5', '6', '7',
+            '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
+        };
+
+    }
+
+    /** Creates a new instance of InputValidArrayInitIndent */
+    public InputValidArrayInitIndent() {
+
+        func1(new int[] {1, 2});
+        func1(new int[] {});
+        func1(new int[] {
+            1, 2, 3
+        });
+    }
+
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidArrayInitIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidArrayInitIndent.java
new file mode 100644
index 0000000..c95deb4
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidArrayInitIndent.java
@@ -0,0 +1,113 @@
+/*
+ * InputValidArrayInitIndent.java
+ *
+ * Created on December 9, 2002, 9:57 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputValidArrayInitIndent {
+    
+    private static char[] sHexChars = {
+            '0', '1', '2', '3', '4', '5', '6', '7',
+            '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+
+    int[] array = new int[] {1, 2, 3};
+
+    int[] array2 = new int[] {
+            1, 2, 3
+    };
+    
+    int[] array3 = new int[] {
+            1,
+            2,
+            3
+    };
+
+    
+    int[] array4 = new int[] 
+    {
+            1,
+            2,
+            3
+    };
+    
+    int[] array5 = new int[] 
+    {1, 2, 3};
+    
+
+    // check nesting on first line
+    int[] array6 = new int[] { 1, 2, 
+            3
+    };
+
+    int[] array6a = new int[] { 1, 2,
+                                3, 4};
+        
+    // nesting
+    int[] array7 = new int[] { 
+            1, 2,
+            3
+    };
+
+    String[][] mStuff = new String[][] {
+            { "key", "value" }
+    };
+    
+    String[][] mStuff1 = new String[][]
+    {
+            { "key", "value" }
+    };
+    
+    int[] array8 = new int[] { };
+
+    int[] array9 = new int[] { 
+    };
+
+    int[][] array10 = new int[][] { 
+            new int[] { 1, 2, 3},
+            new int[] { 1, 2, 3},
+    };
+
+    
+    int[][] array10b
+        = new int[][] { 
+                new int[] { 1, 2, 3},
+                new int[] { 1, 2, 3},
+        };
+    
+    private void func1(int[] arg) {
+
+        char[] sHexChars2 = {
+                '0', '1', '2', '3', '4', '5', '6', '7',
+                '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+        
+        char[] sHexChars3 = {
+                '0', '1', '2', '3', '4', '5', '6', '7',
+                '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
+        };
+        
+        char[] sHexChars4 = 
+        {
+                '0', '1', '2', '3', '4', '5', '6', '7',
+                '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
+        };
+        
+    }
+    
+        
+    /** Creates a new instance of InputValidArrayInitIndent */
+    public InputValidArrayInitIndent() {
+        
+        func1(new int[] {1, 2});
+        func1(new int[] {});
+        func1(new int[] {
+                1, 2, 3
+        });
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidAssignIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidAssignIndent.java
new file mode 100644
index 0000000..acfc6f4
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidAssignIndent.java
@@ -0,0 +1,62 @@
+package com.puppycrawl.tools.checkstyle.indentation;
+
+public class InputValidAssignIndent
+{
+    void foo(String[] args)
+    {
+        int i = 1 +
+            2 +
+            3;
+        String line = mIndentCheck[
+            getLineNo()];
+        String line1 =
+            getLine();
+        line1 =
+            getLine();
+        int i1 
+            =
+            1;
+        i = 3;
+
+        Integer brace =
+            (candidate == SLIST)
+            ? candidate : null;
+
+        AnInterfaceFooWithALongName f =
+            new AnInterfaceFooWithALongName() {
+                public void bar() {
+                }
+            };
+
+        AnInterfaceFooWithALongName f1
+            = new AnInterfaceFooWithALongName() {
+                public void bar() {
+                }
+            };
+// XXX: need to be fixed
+//         function.lastArgument().candidate = parameters;
+//         function.lastArgument().candidate
+//             =
+//             parameters;
+        // TODO: add more testing
+    }
+
+    private interface AnInterfaceFooWithALongName {
+        void bar();
+    }
+
+    private static final int SLIST = 1;
+    private static final int parameters = 1;
+    int candidate = 0;
+    private String[] mIndentCheck = null;
+    private InputValidAssignIndent function = null;
+    int getLineNo() {
+        return 1;
+    }
+    String getLine() {
+        return "";
+    }
+    InputValidAssignIndent lastArgument() {
+        return this;
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidBinaryOpIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidBinaryOpIndent.java
new file mode 100644
index 0000000..7824cac
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidBinaryOpIndent.java
@@ -0,0 +1,83 @@
+/*
+ * InputValidBinaryOpIndent.java
+ *
+ * Created on December 2, 2002, 10:24 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputValidBinaryOpIndent {
+    
+    /** Creates a new instance of InputValidBinaryOpIndent */
+    public InputValidBinaryOpIndent() {
+    }
+    
+    private void method1() {
+        boolean test = true;
+        int i, j, k = 4;
+        int x = 4;
+        int y = 7;
+        
+        i = x + k;
+        
+        j = y + x
+            + k;
+        
+        int one = 1, two = 2, three = 3, four = 4;
+        int answer;
+        
+        answer = (one + one) / 2;
+        
+        answer = (one
+            + one) / 2;
+        
+        answer = (one + one) 
+            / 2;
+        
+        answer = 
+            (one + one)
+            / 2;
+        
+        answer = 
+            ((one + one)
+                / 2) + 4;
+        
+        
+        if (one + one == two) {
+            System.out.println("true");
+        }
+        
+        if (one + one
+            == two) {
+        }
+        
+        if (one + one == two && 1 + 1 == two) {
+        }
+
+        if (one + one == two 
+            && 1 + 1 == two) {
+        }
+        
+        if ((one 
+            + one) == two && (1 + 1) == two) {
+        }
+
+        if ((one + one) 
+            == two 
+            && (1 + 1) == two) {
+        }
+
+        if ((one + one) 
+            == two 
+            && 
+            (1 + 1) == two) {
+        }
+        
+        
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidBlockIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidBlockIndent.java
new file mode 100644
index 0000000..787d555
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidBlockIndent.java
@@ -0,0 +1,165 @@
+/*
+ * InputValidBlockIndent.java
+ *
+ * Created on December 8, 2002, 12:06 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputValidBlockIndent {
+    
+    /** Creates a new instance of InputValidBlockIndent */
+    public InputValidBlockIndent() {
+    }
+    
+    public void method1() {
+        
+        { }
+        {
+        }
+        {
+            int var = 3;
+            
+            var += 3;
+        }
+
+        
+        {  int var = 5; }
+    
+        {
+            int var = 3;
+            
+            var += 3;
+            
+            {
+                int innerVar = 4;
+                
+                innerVar += var;
+            }
+        }
+    
+    }
+    
+    static { int var = 4; }
+
+    
+    static {
+        int var = 4; 
+    }
+    
+    static 
+    {
+        int var = 4; 
+    }
+
+    { int var = 4; }
+
+    
+    {
+        int var = 4; 
+    }
+    
+    {
+        int var = 4; 
+    }
+    
+    
+}
+
+enum EquivalenceTester {
+    /**
+     * An equivalence tester that decides based on {@link Object#equals(Object) equals}.
+     */
+    OBJECT_ATTRIBUTES {
+        /**
+         * {@inheritDoc}
+         */
+        public boolean areEqual( final Object first, final Object second ) {
+            return true;
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        public int hashCode( final Object target ) {
+            return 1;
+        }
+    },
+
+    /**
+     * An equivalence tester that decides based on {@code ==}.
+     */
+    OBJECT_IDENTITIES
+    {
+        /**
+         * {@inheritDoc}
+         */
+        public boolean areEqual( final Object first, final Object second ) {
+            return first == second;
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        public int hashCode( final Object target ) {
+            return System.identityHashCode( target );
+        }
+    };
+
+    /**
+     * Tells whether the two given objects are considered equivalent.
+     *
+     * @param first first comparand
+     * @param second second comparand
+     * @return whether {@code first} and {@code second} are considered equivalent
+     */
+    public abstract boolean areEqual( Object first, Object second );
+
+    /**
+     * Computes a hash code for the given object.
+     *
+     * @param target object to compute a hash for
+     * @return the computed hash
+     */
+    public abstract int hashCode( Object target );
+}
+
+class bug1251988
+{
+    private int a;
+
+    // non static initializer
+    {
+        if (a == 1)
+        {
+        }
+    }
+}
+
+class bug1260079
+{
+    public bug1260079()
+    {
+        new Thread()
+        {
+            public void run()
+            {
+                System.out.println("ran");
+            }
+        }.start();
+    }
+}
+
+class bug1336737 {
+    private static enum Command {
+        IMPORT("import"),
+        LIST("list");
+        private final String c;
+        Command(String c) { this.c = c; }
+        public String toString() { return c; }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidClassDefIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidClassDefIndent.java
new file mode 100644
index 0000000..6bd2f85
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidClassDefIndent.java
@@ -0,0 +1,162 @@
+/*
+ * InputValidMethodIndent.java
+ *
+ * Created on November 11, 2002, 10:13 PM
+ */
+
+
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import javax.swing.JButton;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputValidClassDefIndent 
+    extends java.awt.event.MouseAdapter implements java.awt.event.MouseListener {
+    
+
+}
+
+class InputValidClassDefIndent2 
+    extends java.awt.event.MouseAdapter implements java.awt.event.MouseListener 
+{
+
+}
+
+class InputValidClassDefIndent3
+    extends java.awt.event.MouseAdapter 
+    implements java.awt.event.MouseListener 
+{
+
+}
+
+final class InputValidClassDefIndent4
+    extends java.awt.event.MouseAdapter 
+    implements java.awt.event.MouseListener 
+{
+
+}
+
+final 
+class InputValidClassDefIndent4a
+    extends java.awt.event.MouseAdapter 
+    implements java.awt.event.MouseListener 
+{
+
+}
+
+final class InputValidClassDefIndent5 extends java.awt.event.MouseAdapter implements java.awt.event.MouseListener 
+{
+
+}
+
+final class InputValidClassDefIndent6 extends java.awt.event.MouseAdapter implements java.awt.event.MouseListener {
+
+    class foo { }
+
+    
+    class foo2 { public int x; }
+
+    
+    class foo3 { 
+        public 
+        int x; 
+    }
+
+    
+    class foo4 { 
+        public int x; 
+    }
+    
+    
+    private void myMethod() {
+        class localFoo {
+            
+        }
+
+        class localFoo2 {
+            int x;
+            
+            int func() { return 3; }
+        }
+
+        
+        // TODO: this is broken right now:
+        //   1) this is both an expression and an OBJBLOCK
+        //   2) methods aren't yet parsed
+        //   3) only CLASSDEF is handled now, not OBJBLOCK
+        new JButton().addActionListener(new ActionListener() 
+        {
+            public void actionPerformed(ActionEvent e) {
+                
+            }
+        });
+
+        
+        new JButton().addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                int i = 2;
+            }
+        });
+        
+        Object o = new ActionListener() 
+        {
+            public void actionPerformed(ActionEvent e) {
+                
+            }
+        };
+
+        myfunc2(10, 10, 10,
+            myfunc3(11, 11,
+                11, 11),
+            10, 10,
+            10);
+    }
+
+    private void myfunc2(int a, int b, int c, int d, int e, int f, int g) {
+    }
+
+    private int myfunc3(int a, int b, int c, int d) {
+        return 1;
+    }
+
+    /** The less than or equal operator. */
+    public static final Operator LT_OR_EQUAL =
+        new Operator(
+            "<=",
+            new OperatorHelper()
+            {
+                public boolean compare(int value1, int value2)
+                {
+                    return (value1 <= value2);
+                }
+
+                public boolean compare(Comparable obj1, Comparable obj2)
+                {
+                    return (obj1.compareTo(obj2) <= 0);
+                }
+            });
+}
+
+class HashingContainer<K, V> {
+    @Deprecated
+    public Object[] table;
+
+    @Override
+    public String toString() {
+        return "";
+    }
+}
+
+class Operator {
+    public Operator(String str, OperatorHelper handler) {
+    }
+}
+
+class OperatorHelper {
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidCommaIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidCommaIndent.java
new file mode 100644
index 0000000..3c80a9c
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidCommaIndent.java
@@ -0,0 +1,42 @@
+/*
+ * InputValidCommaIndent.java
+ *
+ * Created on December 1, 2002, 2:20 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputValidCommaIndent {
+    
+    /** Creates a new instance of InputValidCommaIndent */
+    public InputValidCommaIndent() {
+    }
+   
+    public void method1(int x, int y, int z) {
+        boolean test = true;        
+        int i, j = 2, 
+            k = 4,
+            l,
+            m = 4;
+
+        boolean longVarName = true;
+        boolean myotherLongVariableName = false;
+        if (j == 2 || longVarName == true || myotherLongVariableName == true || myotherLongVariableName == false || longVarName == true) {
+        }
+        
+        if ((j == 2 && k == 3)
+              || test) {
+            System.out.println("test");
+        }
+        
+        
+    }
+    
+    public void method1(int a, int x, 
+        int y, int z) {
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidDoWhileIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidDoWhileIndent.java
new file mode 100644
index 0000000..65a5d22
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidDoWhileIndent.java
@@ -0,0 +1,85 @@
+/*
+ * InputvalidDoWhileIndent.java
+ *
+ * Created on December 8, 2002, 9:05 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputValidDoWhileIndent {
+    
+    public InputValidDoWhileIndent() {
+    }
+
+    
+    public void method1() {
+        boolean test = true;
+        
+        do System.getProperty("foo"); while (test) ;
+
+        do System.getProperty("foo");
+        while (test);
+        
+        do {
+        } while (test);
+
+        do 
+        {
+        }
+        while (test);
+
+        do 
+        {
+            System.getProperty("foo");
+        }
+        while (test);
+
+        do 
+        { System.getProperty("foo"); }
+        while (test);
+
+        do {
+            System.getProperty("foo");
+        } while (test);
+        
+        do {
+            System.getProperty("foo");
+            System.getProperty("foo");
+        } while (test);
+        
+        do  
+        {
+            System.getProperty("foo");
+            System.getProperty("foo");
+        }
+        while (test);
+        
+        do {
+            if (test) {
+                System.getProperty("foo");
+            }
+            System.getProperty("foo");
+        } while (test);
+        
+        do
+            System.getProperty("foo");
+        while (test);
+
+        if (test) {
+            do
+                System.getProperty("foo");
+            while (test);
+        }
+        
+        do 
+        {
+        }
+        while (test
+            && 7 < 8 && 5 < 6
+            && 9 < 10);
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidDotIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidDotIndent.java
new file mode 100644
index 0000000..473b451
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidDotIndent.java
@@ -0,0 +1,96 @@
+/*
+ * InputValidDotIndent.java
+ *
+ * Created on November 24, 2002, 1:22 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+import javax.
+    swing.
+        border.
+            AbstractBorder;
+
+import javax
+    .swing
+        .border
+            .BevelBorder;
+import javax.swing.plaf.metal.MetalButtonUI;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputValidDotIndent {
+    
+    /** Creates a new instance of InputValidDotIndent */
+    public InputValidDotIndent() {
+        
+        System.out.println();
+
+        System.
+            out.println();
+        
+        System.out.
+            println();
+        
+        System.
+            out.
+                println();
+        
+        System
+            .out
+                .println();
+        
+        BevelBorder border = new javax.swing.border.BevelBorder(BevelBorder.LOWERED);
+        border = new javax.swing.border.
+            BevelBorder(BevelBorder.LOWERED);
+        
+
+        border = new javax.swing.border.BevelBorder(
+            BevelBorder.LOWERED);
+        border = new javax.
+            swing.
+                border.
+                    BevelBorder(BevelBorder.LOWERED);
+        border = 
+            new javax.
+                swing
+                    .border
+                        .BevelBorder(BevelBorder.LOWERED);
+        border = 
+            new javax.
+                swing
+                    .border
+                        .BevelBorder(BevelBorder.
+                            LOWERED);
+        
+        Class c = javax.swing.
+            plaf.metal.MetalButtonUI.class;
+        
+        Class c1 = javax.swing
+            .plaf.metal.MetalButtonUI.class;
+        
+        Class c2 = javax.swing
+            .plaf.metal.
+                MetalButtonUI.class;
+
+        Class c3 = javax.swing
+            .plaf.metal
+                .MetalButtonUI.class;
+
+        Class c4 = javax.
+            swing.plaf.metal.
+                MetalButtonUI.class;
+
+        
+        
+        border = 
+            new javax.
+                swing
+                    .border.BevelBorder(BevelBorder.
+                        LOWERED);
+        
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidForIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidForIndent.java
new file mode 100644
index 0000000..e80a6ac
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidForIndent.java
@@ -0,0 +1,85 @@
+/*
+ * InputValidForIndent.java
+ *
+ * Created on November 10, 2002, 10:04 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputValidForIndent {
+    
+    /** Creates a new instance of InputValidForIndent */
+    public InputValidForIndent() {
+    }
+    
+    
+    private void method1(int[] indices)
+    {
+        for (int i=0; i<10; i++) 
+            System.getProperty("foo");
+        
+        for (int i=0; i<10; i++) System.getProperty("foo");
+
+        for (int i=0; i<10; i++) {
+        }
+
+        for (int i=0; i<10; i++) 
+        {
+        }
+
+        for (int i=0; i<10; i++) 
+        {
+            System.getProperty("foo");
+        }
+
+        for (int i=0; i<10; i++) 
+        {
+            boolean test = true;
+            if (test) { // mixed styles are OK
+                System.getProperty("foo");
+            }
+        }
+        
+        for (
+            int i=0; 
+            i<10; 
+            i++) 
+        {
+        }
+        
+        for (int i=0; 
+            i<10 && 4<5
+                && 7<8; 
+            i++) 
+        {
+        }
+        
+        for (int i=0; i<10 && 4<5
+                && 7<8; 
+            i++) {
+        }
+
+        for (int i=0; i<10 && 4<5 && 7<8; 
+            i++) {
+        }
+
+        
+        for (int i=0; 
+            i<10; i++
+        ) {
+            System.getProperty("foo");
+        }
+
+        for ( final int index : indices ) {
+            System.err.println(index);
+        }
+        for ( final int index : indices )
+        {
+            System.err.println(index);
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidIfIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidIfIndent.java
new file mode 100644
index 0000000..50d1ffe
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidIfIndent.java
@@ -0,0 +1,257 @@
+/*
+ * ValidIndent.java
+ *
+ * Created on November 6, 2002, 9:39 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputValidIfIndent {
+
+
+    // test ifs
+    public void emptyIfTest()
+    {
+        boolean test = true;
+
+        // lcurly on same line
+        if (test) {
+        }
+
+        // lcurly on next line
+        if (test)
+        {
+        }
+
+        // lcurly for if and else on same line
+        if (test) {
+        } else {
+        }
+
+        // lcurly for if and else on same line
+        if (test)
+        {
+        }
+        else
+        {
+        }
+
+        // lcurly for if and else on same line -- mixed braces
+        if (test) {
+        }
+        else
+        {
+        }
+
+
+        // lcurly for if and else on same line -- mixed braces
+        if (test)
+        {
+        } else
+        {
+        }
+
+        // lcurly for if and else on same line -- mixed braces
+        if (test)
+        {
+        } else {
+        }
+
+        // lcurly for if and else on same line -- mixed braces, unnested
+        if (test) {
+        }
+        else {
+        }
+
+        if (foo()
+            || test
+            || test)
+        {
+        }
+
+    }
+
+    /////  same as above, with statements
+    public void  populatedIfTest()
+    {
+        boolean test = false;
+        // no braces if
+        if (test)
+            System.getProperty("blah");
+
+        // no braces if/else
+        if (test)
+            System.getProperty("blah");
+        else
+            System.getProperty("blah");
+
+
+        // lcurly on same line, and stmt
+        if (test) {
+            System.getProperty("blah");
+        }
+
+        // lcurly on next line and stmt
+        if (test)
+        {
+            System.getProperty("blah");
+        }
+        // lcurly for if and else on same line
+        if (test) {
+            System.getProperty("blah");
+        } else {
+            System.
+                getProperty("blah");
+        }
+
+        // lcurly for if and else on same line
+        if (test)
+        {
+            System.getProperty("blah");
+            System.getProperty("blah");
+        }
+        else
+        {
+            System.getProperty("blah");
+        }
+
+        // lcurly for if and else on same line -- mixed braces
+        if (test) {
+            System.getProperty("blah");
+        }
+        else
+        {
+            System.getProperty("blah");
+        }
+
+
+        // lcurly for if and else on same line -- mixed braces
+        if (test)
+        {
+            System.getProperty("blah");
+        } else
+        {
+            System.getProperty("blah");
+        }
+
+        // lcurly for if and else on same line -- mixed braces
+        if (test)
+        {
+            System.getProperty("blah");
+        } else {
+            System.getProperty("blah");
+        }
+
+        // lcurly for if and else on same line -- mixed braces, unnested
+        if (test) {
+            System.getProperty("blah");
+        }
+        else {
+            System.getProperty("blah");
+        }
+
+        if (test) System.getProperty("blah");
+
+        if (test) System.getProperty("blah");
+        else System.getProperty("foo");
+
+        if (test) System.getProperty("blah");
+        else
+            System.getProperty("foo");
+
+        if (test)
+            System.getProperty("blah");
+        else System.getProperty("foo");
+
+        if (test
+            && 7 < 8 && 8 < 9
+            && 10 < 11) {
+        }
+
+        if (test)
+            return;
+
+
+        if (test) {
+        } else if (7 < 8) {
+        } else if (8 < 9) {
+        }
+
+        if (test) {
+            System.getProperty("blah");
+        } else if (7 < 8) {
+            System.getProperty("blah");
+        } else if (8 < 9) {
+            System.getProperty("blah");
+        }
+
+
+        if (test)
+            System.getProperty("blah");
+        else if (7 < 8)
+            System.getProperty("blah");
+        else if (8 < 9)
+            System.getProperty("blah");
+
+
+        // TODO: bother to support this style?
+        if (test) {
+            System.getProperty("blah");
+        } else
+            if (7 < 8) {
+                System.getProperty("blah");
+            } else
+                if (8 < 9) {
+                    System.getProperty("blah");
+                }
+
+    }
+
+    public void  parenIfTest() {
+        boolean test = true;
+
+        if (test
+        ) {
+            System.getProperty("blah");
+        }
+//
+        if (test
+        )
+        {
+            System.getProperty("blah");
+        }
+
+        if
+        (
+            test
+        ) {
+            System.getProperty("blah");
+        }
+
+        if (test
+            )
+        {
+        }
+    }
+
+    boolean foo() {
+        return true;
+    }
+}
+
+class FooFoo {
+    void foo42() {
+        if (test) {
+            System.getProperty("blah");
+        } else if (7 < 8
+            && 8 < 9) {
+            System.getProperty("blah");
+        } else if (8 < 9) {
+            System.getProperty("blah");
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidInterfaceDefIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidInterfaceDefIndent.java
new file mode 100644
index 0000000..78755ef
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidInterfaceDefIndent.java
@@ -0,0 +1,30 @@
+/*
+ * InputValidInterfaceDefIndent.java
+ *
+ * Created on December 12, 2002, 12:05 AM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public interface InputValidInterfaceDefIndent {
+
+    void myfunc();
+
+    
+    interface myInterface2 {
+    }
+
+    public interface myInterface3 extends myInterface2 { }
+    
+    public interface myInterface4 
+        extends myInterface2 
+    { 
+        void myFunc2();
+    }
+
+
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidLabelIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidLabelIndent.java
new file mode 100644
index 0000000..929445c
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidLabelIndent.java
@@ -0,0 +1,33 @@
+/*
+ * InputValidLabelIndent.java
+ *
+ * Created on February 21, 2003, 11:28 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputValidLabelIndent {
+    
+    /** Creates a new instance of InputValidLabelIndent */
+    public InputValidLabelIndent() {
+        boolean test = true;
+        
+        while (test) {
+        label:
+            System.out.println("label test");
+            
+            if (test) {
+            unusedLabel:
+                System.out.println("more testing");
+            }
+            
+        }
+    label2:
+        System.out.println("toplevel");
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidMethodIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidMethodIndent.java
new file mode 100644
index 0000000..a6be239
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidMethodIndent.java
@@ -0,0 +1,193 @@
+/*
+ * InputValidMethodIndent.java
+ *
+ * Created on November 11, 2002, 10:13 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+import java.util.Arrays;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputValidMethodIndent extends java.awt.event.MouseAdapter implements java.awt.event.MouseListener {
+    
+    // ctor with rcurly on same line
+    public InputValidMethodIndent() {
+    }
+
+    private InputValidMethodIndent(boolean test) {
+        boolean test2 = true;
+        
+        int i = 4 + 
+            4;
+    }
+
+    
+    private InputValidMethodIndent(boolean test,
+        boolean test2) {
+        boolean test3 = true;
+        
+        int i = 4 + 
+            4;
+    }
+
+    
+    private InputValidMethodIndent(boolean test,
+        boolean test2, boolean test3) 
+    {
+        boolean test4 = true;
+        
+        int i = 4 + 
+            4;
+    }
+    
+    // ctor with rcurly on next line
+    public InputValidMethodIndent(int dummy)
+    {
+    }
+
+    // method with rcurly on same line
+    public String method1() {
+        return "hi";
+    }
+
+    // method with rcurly on next line
+    public void method2()
+    {
+    }
+    
+    // method with a bunch of params
+    public int method2(int x, int y, int w, int h)
+    {
+        return 1;
+    }
+    
+    // params on multiple lines
+    public void method2(int x, int y, int w, int h,
+        int x1, int y1, int w1, int h1)
+    {
+    }
+
+    // params on multiple lines
+    public void method3(int x, int y, int w, int h,
+        int x1, int y1, int w1, int h1)
+    {
+        System.getProperty("foo");
+    }
+
+    // params on multiple lines
+    public void method4(int x, int y, int w, int h,
+        int x1, int y1, int w1, int h1)
+    {
+        boolean test = true;
+        
+        int i = 4 + 
+            4;
+        
+        i += 5;
+        i += 5 
+            + 4;
+        if (test) 
+        {
+            System.getProperty("foo");
+        } else {
+            System.getProperty("foo");
+        }
+        
+        for (int j=0;j<10; j++) {
+            System.getProperty("foo");
+        }
+
+        
+        myfunc2(10, 10, 10,
+            myfunc3(11, 11,
+                11, 11),
+            10, 10,
+            10);
+        
+
+        myfunc3(11, 11, Integer.
+                getInteger("mytest").intValue(),
+            11);
+        
+        myfunc3(
+            1,
+            2, 
+                3, 
+                4);
+    }
+
+    // strange IMHO, but I suppose this should be allowed
+    public
+    void
+    method5() {
+    }
+    
+          
+    private void myfunc2(int a, int b, int c, int d, int e, int f, int g) {
+    }
+    
+    private int myfunc3(int a, int b, int c, int d) {
+        return 1;
+    }
+    
+    
+    void method6() {
+        System.out.println("methods are: " + Arrays.asList(
+            new String[] {"method"}).toString());
+
+        System.out.println("methods are: " + Arrays.asList(
+            new String[] {"method"}
+        ).toString());
+
+        System.out.println("methods are: " + Arrays.asList(
+            new String[] {"method"}).toString()
+        );
+
+            
+        myfunc2(3, 4, 5, 
+            6, 7, 8, 9);
+            
+        myfunc2(3, 4, method2(3, 4, 5, 6) + 5, 
+            6, 7, 8, 9);
+            
+        System.out.println("methods are: " + 
+            Arrays.asList(
+                new String[] {"method"}).toString());
+        
+        System.out.println("methods are: " 
+            + Arrays.asList(
+                new String[] {"method"}).toString());
+                
+
+        String blah = (String) System.getProperty(
+            new String("type"));
+        
+        System.out.println(method1() + "mytext" 
+            + " at indentation level not at correct indentation, " 
+            + method1());
+
+        System.out.println(
+            method1() + "mytext" 
+                + " at indentation level not at correct indentation, " 
+                + method1());
+
+        System.out.toString()
+            .equals("blah");
+
+
+   
+    }
+
+    private int[] getArray() {
+        return new int[] {1};
+    }
+
+    private void indexTest() {
+        getArray()[0] = 2;
+    }
+        
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidSwitchIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidSwitchIndent.java
new file mode 100644
index 0000000..1e637fc
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidSwitchIndent.java
@@ -0,0 +1,104 @@
+/*
+ * InputValidSwitchIndent.java
+ *
+ * Created on November 27, 2002, 11:40 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputValidSwitchIndent {
+    
+    private static final int CONST = 5;
+    private static final int CONST2 = 2;
+    private static final int CONST3 = 3;
+    
+    /** Creates a new instance of InputValidSwitchIndent */
+    public InputValidSwitchIndent() {
+    }
+    
+    private void method1() {
+        int s = 3;
+        
+        switch (s) {
+            
+            case 4:
+                System.out.println("");
+                break;
+
+            case CONST:
+                break;
+
+            case CONST2:
+            case CONST3:
+                break;
+
+            default:
+                System.out.println("");
+                break;
+        }
+        
+
+        // some people like to add curlys to their cases:
+        switch (s) {
+            
+            case 4: {
+                System.out.println("");
+                break;
+            }
+
+            case CONST:
+                break;
+
+            case CONST2:
+            case CONST3:
+            {
+                System.out.println("");
+                break;
+            }
+
+            default:
+                break;
+        }
+         
+        // check broken 'case' lines
+        switch (s) {
+            
+            case 
+                4: {
+                System.out.println("");
+                break;
+            }
+
+            case 
+                CONST:
+                break;
+
+            case CONST2:
+            case 
+                CONST3:
+            {
+                System.out.println("");
+                break;
+            }
+
+            default:
+                break;
+        }        
+
+        switch (s) {
+        }
+
+        
+        switch (s) {
+            default:
+                System.out.println("");
+                break;
+        }
+        
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidTryIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidTryIndent.java
new file mode 100644
index 0000000..cefe754
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidTryIndent.java
@@ -0,0 +1,84 @@
+/*
+ * InputValidTryIndent.java
+ *
+ * Created on December 31, 2002, 6:56 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputValidTryIndent {
+    
+    /** Creates a new instance of InputValidTryIndent */
+    public InputValidTryIndent() {
+    }
+    
+    public void method() {
+        
+        try {
+        } catch (Throwable t) {
+            System.out.println("err");
+        }
+
+        try {
+            System.out.println("test");
+        } finally {
+            System.out.println("finally");
+        }
+
+        try {
+        } catch (Throwable t) {
+            System.out.println("err");
+        } finally {
+        }
+
+        try {
+        } catch (Exception t) {
+            System.out.println("err");
+        } catch (Throwable t) {
+            System.out.println("err");
+        }
+
+        try {
+        } catch (Exception t) {
+        } catch (Throwable t) {
+        }
+
+        
+        try {
+            System.out.println("try");
+        } 
+        catch (Exception t) {
+            System.out.println("err");
+            System.out.println("err");
+        } 
+        catch (Throwable t) {
+            System.out.println("err");
+        } 
+        finally {
+        }
+        
+        try 
+        {
+            System.out.println("try");
+        } 
+        catch (Exception t) 
+        {
+            System.out.println("err");
+            System.out.println("err");
+        } 
+        catch (Throwable t) 
+        {
+            System.out.println("err");
+        }
+        finally 
+        {
+        }
+        
+        
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidTryResourcesIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidTryResourcesIndent.java
new file mode 100644
index 0000000..5b5fd93
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidTryResourcesIndent.java
@@ -0,0 +1,23 @@
+package com.puppycrawl.tools.checkstyle.indentation;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.jar.JarInputStream;
+import java.util.jar.Manifest;
+
+// Forcing a commit
+class InputValidTryResourcesIndent
+{
+    // Taken from JDK7 java.lang.Package src code.
+    private static Manifest loadManifest(String fn) {
+        try (FileInputStream fis = new FileInputStream(fn);
+    // This should be an error
+    JarInputStream jis = new JarInputStream(fis, false))
+        {
+            return jis.getManifest();
+        } catch (IOException e)
+        {
+            return null;
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidWhileIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidWhileIndent.java
new file mode 100644
index 0000000..e6cc878
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InputValidWhileIndent.java
@@ -0,0 +1,77 @@
+/*
+ * InputValidWhileIndent.java
+ *
+ * Created on November 10, 2002, 9:16 PM
+ */
+
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  jrichard
+ */
+public class InputValidWhileIndent {
+    
+    /** Creates a new instance of InputValidWhileIndent */
+    public InputValidWhileIndent() {
+    }
+    
+    private void method1()
+    {
+        boolean test = true;
+        
+        while (test) System.getProperty("foo");
+
+        while (test) 
+            System.getProperty("foo");
+        
+        while (test) {
+        }
+
+        while (test) 
+        {
+        }
+
+        while (test) 
+        {
+            System.getProperty("foo");
+        }
+
+        while (test)  {
+            System.getProperty("foo");
+        }
+        
+        while (test)  {
+            System.getProperty("foo");
+            System.getProperty("foo");
+        }
+        
+        while (test)  
+        {
+            System.getProperty("foo");
+            System.getProperty("foo");
+        }
+
+        while (test)  {
+            if (test) {
+                System.getProperty("foo");
+            }
+            System.getProperty("foo");
+        }
+        
+        while (test)
+            System.getProperty("foo");
+
+        if (test) {
+            while (test)
+                System.getProperty("foo");
+        }
+        
+        while (test 
+            && 4 < 7 && 8 < 9
+            && 3 < 4) {
+        }
+        
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InvalidInputThrowsIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InvalidInputThrowsIndent.java
new file mode 100644
index 0000000..c3d4f6d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/InvalidInputThrowsIndent.java
@@ -0,0 +1,21 @@
+package com.puppycrawl.tools.checkstyle.indentation;
+
+public class InvalidInputThrowsIndent {
+
+    public InvalidInputThrowsIndent()
+    {
+    }
+
+    // This should pass for our reconfigured throwsIndent test.
+    private void myFunc()
+            throws Exception
+    {
+    }
+
+    // This is the out of the box default configuration, but should fail
+    // for our reconfigured test.
+    private void myFunc2()
+        throws Exception
+    {
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/NewHandlerTestInput.java b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/NewHandlerTestInput.java
new file mode 100644
index 0000000..fe72b0b
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/indentation/NewHandlerTestInput.java
@@ -0,0 +1,14 @@
+package com.puppycrawl.tools.checkstyle.indentation;
+
+/**
+ *
+ * @author  IljaDubinin
+ */
+public class NewHandlerTestInput 
+{
+    
+    public static void test() {
+        method(ArrayList::new);
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/inputHeader.java b/src/test/resources/com/puppycrawl/tools/checkstyle/inputHeader.java
new file mode 100644
index 0000000..90db343
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/inputHeader.java
@@ -0,0 +1 @@
+package com.puppycrawl.tools.checkstyle; class inputHeader {} // One line test
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/java.header b/src/test/resources/com/puppycrawl/tools/checkstyle/java.header
new file mode 100644
index 0000000..d127bc8
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/java.header
@@ -0,0 +1,4 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputBadTag.java b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputBadTag.java
new file mode 100644
index 0000000..7a8431d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputBadTag.java
@@ -0,0 +1,9 @@
+package com.puppycrawl.tools.checkstyle.javadoc;
+
+/**
+ * The following is a bad tag.
+ * @mytag Hello
+ */
+public class InputBadTag
+{
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputInheritDoc.java b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputInheritDoc.java
new file mode 100644
index 0000000..87c02cf
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputInheritDoc.java
@@ -0,0 +1,49 @@
+package com.puppycrawl.tools.checkstyle.javadoc;
+
+public class InputInheritDoc
+{
+    /** {@inheritDoc} */
+    InputInheritDoc()
+    {
+    }
+
+    /** {@inheritDoc} */
+    private void privateMethod()
+    {
+    }
+
+    /** {@inheritDoc} */
+    void packageMethod()
+    {
+    }
+
+    /** {@inheritDoc} */
+    protected void protectedMethod()
+    {
+    }
+
+    /** {@inheritDoc} */
+    public void publicMethod()
+    {
+    }
+    
+    /** {@inheritDoc} */
+    private static void privateStaticMethod()
+    {
+    }
+
+    /** {@inheritDoc} */
+    static void packageStaticMethod()
+    {
+    }
+
+    /** {@inheritDoc} */
+    protected static void protectedStaticMethod()
+    {
+    }
+
+    /** {@inheritDoc} */
+    public static void publicStaticMethod()
+    {
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputNoJavadoc.java b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputNoJavadoc.java
new file mode 100644
index 0000000..498a550
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputNoJavadoc.java
@@ -0,0 +1,115 @@
+package com.puppycrawl.tools.checkstyle.javadoc;
+
+public class InputNoJavadoc
+{
+    public int i1;
+    protected int i2;
+    int i3;
+    private int i4;
+
+    public void foo1() {}
+    protected void foo2() {}
+    void foo3() {}
+    private void foo4() {}
+
+    protected class ProtectedInner {
+        public int i1;
+        protected int i2;
+        int i3;
+        private int i4;
+
+        public void foo1() {}
+        protected void foo2() {}
+        void foo3() {}
+        private void foo4() {}
+    }
+
+    class PackageInner {
+        public int i1;
+        protected int i2;
+        int i3;
+        private int i4;
+
+        public void foo1() {}
+        protected void foo2() {}
+        void foo3() {}
+        private void foo4() {}
+    }
+
+    private class PrivateInner {
+        public int i1;
+        protected int i2;
+        int i3;
+        private int i4;
+
+        public void foo1() {}
+        protected void foo2() {}
+        void foo3() {}
+        private void foo4() {}
+    }
+}
+
+class PackageClass {
+    public int i1;
+    protected int i2;
+    int i3;
+    private int i4;
+
+    public void foo1() {}
+    protected void foo2() {}
+    void foo3() {}
+    private void foo4() {}
+
+    public class PublicInner {
+        public int i1;
+        protected int i2;
+        int i3;
+        private int i4;
+
+        public void foo1() {}
+        protected void foo2() {}
+        void foo3() {}
+        private void foo4() {}
+    }
+
+    protected class ProtectedInner {
+        public int i1;
+        protected int i2;
+        int i3;
+        private int i4;
+
+        public void foo1() {}
+        protected void foo2() {}
+        void foo3() {}
+        private void foo4() {}
+    }
+
+    class PackageInner {
+        public int i1;
+        protected int i2;
+        int i3;
+        private int i4;
+
+        public void foo1() {}
+        protected void foo2() {}
+        void foo3() {}
+        private void foo4() {}
+    }
+
+    private class PrivateInner {
+        public int i1;
+        protected int i2;
+        int i3;
+        private int i4;
+
+        public void foo1() {}
+        protected void foo2() {}
+        void foo3() {}
+        private void foo4() {}
+    }
+
+    class IgnoredName {
+        // ignore by name
+        private int logger;
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputSetterGetter.java b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputSetterGetter.java
new file mode 100644
index 0000000..996c795
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/InputSetterGetter.java
@@ -0,0 +1,54 @@
+package com.puppycrawl.tools.checkstyle.javadoc;
+
+public class InputSetterGetter
+{
+    private int mNumber;
+
+    public void setNumber(final int number)
+    {
+        mNumber = number;
+    }
+
+    public int getNumber()
+    {
+        return mNumber;
+    }
+
+    public void setNumber1()
+    {
+        mNumber = mNumber;
+    }
+
+    public void setNumber2(int number)
+    {
+        mNumber = number;
+        firePropertyChanged();
+    }
+
+    public void getNumber2()
+    {
+    }
+
+    public int getCost1(int forMe)
+    {
+        return 666;
+    }
+
+    public int getCost2()
+    {
+    	mNumber = 4;
+        return 666;
+    }
+
+    public int getCost3() throws Exception
+    {
+        return 666;
+    }
+
+    public boolean isSomething()
+    {
+        return false;
+    }
+    
+    private void firePropertyChanged(){}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/TestGenerics.java b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/TestGenerics.java
new file mode 100644
index 0000000..28ae00f
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/TestGenerics.java
@@ -0,0 +1,63 @@
+package com.puppycrawl.tools.checkstyle.javadoc;
+
+public class TestGenerics <E extends java.lang.Exception,
+                           RE extends RuntimeException & java.io.Serializable>
+{
+    /**
+     * @throws E in some cases
+     * @throws RE in some cases
+     */
+    public void method1() throws E
+    {
+    }
+
+    /**
+     * RuntimeException is not declared.
+     */
+    public void method2() throws RE
+    {
+    }
+
+    /**
+     * @throws E in some cases
+     * @throws RE in other cases
+     */
+    public void method3() throws E, RE
+    {
+    }
+
+    /**
+     * @throws RE in some cases
+     * @throws NPE in some other cases
+     */
+    public <NPE extends NullPointerException> void method4() throws NPE, RE
+    {
+    }
+
+    public class InnerClass <RuntimeException extends ClassCastException>
+    {
+        /**
+         * @throws E in some case
+         * @throws RE in some other cases
+         */
+        public void method1() throws RuntimeException, RE,
+            java.lang.RuntimeException
+        {
+        }
+    }
+
+    /**
+     * @param <T> some parameter
+     * @param <E2> some exception parameter
+     */
+    public interface InnerInterface<T, E2 extends Throwable> {
+        /**
+         * Some javadoc.
+         * @param t a parameter
+         * @throws E2 in some case.
+         * @return some string
+         */
+        public abstract String doStuff(T t) throws E2;
+    }
+}
+
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/bothfiles/Ignored.java b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/bothfiles/Ignored.java
new file mode 100644
index 0000000..62247a0
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/bothfiles/Ignored.java
@@ -0,0 +1,5 @@
+package com.puppycrawl.tools.checkstyle.javadoc.bothfiles;
+
+class Ignored
+{
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/bothfiles/package-info.java b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/bothfiles/package-info.java
new file mode 100644
index 0000000..2c38f9f
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/bothfiles/package-info.java
@@ -0,0 +1 @@
+package com.puppycrawl.tools.checkstyle.javadoc.bothfiles;
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/bothfiles/package.html b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/bothfiles/package.html
new file mode 100644
index 0000000..bf65270
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/bothfiles/package.html
@@ -0,0 +1 @@
+Ignored
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkghtml/Ignored.java b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkghtml/Ignored.java
new file mode 100644
index 0000000..7a4e3e8
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkghtml/Ignored.java
@@ -0,0 +1,5 @@
+package com.puppycrawl.tools.checkstyle.javadoc.pkghtml;
+
+class Ignored
+{
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkghtml/package.html b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkghtml/package.html
new file mode 100644
index 0000000..bf65270
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkghtml/package.html
@@ -0,0 +1 @@
+Ignored
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkginfo/annotation/package-info.java b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkginfo/annotation/package-info.java
new file mode 100644
index 0000000..264cf9d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkginfo/annotation/package-info.java
@@ -0,0 +1,12 @@
+/**
+ * This is a valid package documentation.  <--- See the period after the
+ * first sentence.
+ *
+ * <p>
+ * hurray for javadocs in html
+ * <br>
+ * with a legacy non-closed br element
+ * </p>
+ */
+ at java.lang.annotation.Documented
+package com.puppycrawl.tools.checkstyle.javadoc.pkginfo.annotation;
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkginfo/invalidformat/package-info.java b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkginfo/invalidformat/package-info.java
new file mode 100644
index 0000000..fccef5d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkginfo/invalidformat/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * blah blah
+ */
+package com.puppycrawl.tools.checkstyle.javadoc.pkginfo.invalidformat;
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkginfo/invalidinherit/package-info.java b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkginfo/invalidinherit/package-info.java
new file mode 100644
index 0000000..51f0fe4
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkginfo/invalidinherit/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * {@inheritDoc} Where are we inheriting from
+ */
+package com.puppycrawl.tools.checkstyle.javadoc.pkginfo.invalidinherit;
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkginfo/valid/package-info.java b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkginfo/valid/package-info.java
new file mode 100644
index 0000000..c8c25b0
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/javadoc/pkginfo/valid/package-info.java
@@ -0,0 +1,11 @@
+/**
+ * This is a valid package documentation.  <--- See the period after the
+ * first sentence.
+ * 
+ * <p>
+ * hurray for javadocs in html
+ * <br>
+ * with a legacy non-closed br element
+ * </p>
+ */
+package com.puppycrawl.tools.checkstyle.javadoc.pkginfo.valid;
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/messages_test.properties b/src/test/resources/com/puppycrawl/tools/checkstyle/messages_test.properties
new file mode 100644
index 0000000..a82290c
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/messages_test.properties
@@ -0,0 +1,12 @@
+# input file for TranslationCheck
+
+# a key that is available in all translations
+hello=Hello
+
+# whitespace at end of key should be trimmed before comparing.
+# the german translation does not contain whitespace, no error should
+# be reported here
+cancel = Cancel
+
+# a key that is missing in german translation
+only.english=only english
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/messages_test_de.properties b/src/test/resources/com/puppycrawl/tools/checkstyle/messages_test_de.properties
new file mode 100644
index 0000000..9a7ae07
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/messages_test_de.properties
@@ -0,0 +1,12 @@
+# input file for TranslationCheck
+
+# a key that is available in all translations
+hello=Hallo
+
+# whitespace at end of key should be trimmed before comparing.
+# the german translation does not contain whitespace, no error should
+# be reported here
+cancel=Abbrechen
+
+# a key that is missing in german translation
+#only.english=only english
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/metrics/BooleanExpressionComplexityCheckTestInput.java b/src/test/resources/com/puppycrawl/tools/checkstyle/metrics/BooleanExpressionComplexityCheckTestInput.java
new file mode 100644
index 0000000..92b23f5
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/metrics/BooleanExpressionComplexityCheckTestInput.java
@@ -0,0 +1,34 @@
+package com.puppycrawl.tools.checkstyle.metrics;
+
+public class BooleanExpressionComplexityCheckTestInput {
+    private boolean _a = false;
+    private boolean _b = false;
+    private boolean _c = false;
+    private boolean _d = false;
+
+    public void foo() {
+        if (_a && _b || _c ^ _d) {
+        }
+
+        if (((_a && (_b & _c)) || (_c ^ _d))) {
+        }
+
+        if (_a && _b && _c) {
+        }
+
+        if (_a & _b) {
+        }
+
+        if (_a) {
+        }
+    }
+
+    public boolean equals(Object object) {
+        return (((_a && (_b & _c)) || (_c ^ _d) || (_a && _d)));
+    }
+    
+    public boolean bitwise()
+    {
+        return (((_a & (_b & _c)) | (_c ^ _d) | (_a & _d)));
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/metrics/ClassCouplingCheckTestInput.java b/src/test/resources/com/puppycrawl/tools/checkstyle/metrics/ClassCouplingCheckTestInput.java
new file mode 100644
index 0000000..bf954b6
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/metrics/ClassCouplingCheckTestInput.java
@@ -0,0 +1,36 @@
+package com.puppycrawl.tools.checkstyle.metrics;
+
+import javax.naming.*;
+import java.util.*;
+
+public class ClassCouplingCheckTestInput {
+    private class InnerClass {
+        public List _list = new ArrayList();
+    }
+
+    private class AnotherInnerClass {
+        public String _string = "";
+    }
+
+    public Set _set = new HashSet();
+    public Map _map = new HashMap();
+    public String _string = "";
+    public int[] _intArray = new int[0];
+    public InnerClass _innerClass = new InnerClass();
+    public AnotherInnerClass _anotherInnerClass = new AnotherInnerClass();
+
+    public void foo() throws NamingException {
+    }
+
+}
+
+enum InnerEnum {
+    VALUE1;
+
+    private InnerEnum()
+    {
+        map2 = new HashMap();
+    }
+    private Set map1 = new HashSet();
+    private Map map2;
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/metrics/JavaNCSSCheckTestInput.java b/src/test/resources/com/puppycrawl/tools/checkstyle/metrics/JavaNCSSCheckTestInput.java
new file mode 100644
index 0000000..e0fc96d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/metrics/JavaNCSSCheckTestInput.java
@@ -0,0 +1,78 @@
+// should give an ncss of 35
+package com.puppycrawl.tools.checkstyle.metrics;
+
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+
+
+//should give an ncss of 22
+public class JavaNCSSCheckTestInput {
+    
+    private Object mObject;
+    
+    //should count as 2
+    private void testMethod1() {
+        
+        //should count as 1
+        int x = 1, y = 2;
+    }
+    
+    //should count as 4
+    private void testMethod2() {
+        
+        int abc = 0;
+        
+        //should count as 2
+        testLabel: abc = 1;  
+    }    
+     
+    //should give an ncss of 12
+    private void testMethod3() {
+        
+        int a = 0;
+        switch (a) {
+            case 1: //falls through
+            case 2: System.out.println("Hello"); break;
+            default: break;
+        }
+        
+        ItemListener lis = new ItemListener() {
+
+            //should give an ncss of 2
+            public void itemStateChanged(ItemEvent e) {          
+                System.out.println("Hello");
+            }
+        };  
+    }
+    
+    //should give an ncss of 2
+    private class TestInnerClass {
+        
+        private Object test;
+    } 
+}
+
+//should give an ncss of 10
+class TestTopLevelNestedClass {
+    
+    private Object mObject;
+    
+    //should give an ncss of 8
+    private void testMethod() {
+        
+        for (int i=0; i<10; i++) {
+            
+            if (i==0) {
+                
+                //should count as 1
+                int x = 1, y = 2;
+            }
+            else {
+                int abc = 0;
+                
+                //should count as 2
+                testLabel: abc = 1;      
+            }
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/naming/AbstractMultisetSetCountTester.java b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/AbstractMultisetSetCountTester.java
new file mode 100644
index 0000000..4d0f12c
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/AbstractMultisetSetCountTester.java
@@ -0,0 +1,16 @@
+public abstract class CronExpression<E> {
+
+  private static final String SUPPORTS_REMOVE = "";
+
+ at CollectionFeature.Require(absent = SUPPORTS_REMOVE)
+  public void testSetCount_negative_removeUnsupported() {
+  }
+}
+
+ at interface CollectionFeature {
+
+    public @interface Require
+    {
+        String absent();
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputAbbreviationAsWordInTypeNameCheck.java b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputAbbreviationAsWordInTypeNameCheck.java
new file mode 100644
index 0000000..89d4a0d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputAbbreviationAsWordInTypeNameCheck.java
@@ -0,0 +1,105 @@
+package com.puppycrawl.tools.checkstyle.naming;
+
+abstract public class IIIInputAbstractClassName {
+}
+
+abstract class NonAAAAbstractClassName {
+}
+
+abstract class FactoryWithBADNAme {
+}
+
+abstract class AbstractCLASSName {
+    abstract class NonAbstractInnerClass {
+    }
+}
+
+abstract class ClassFactory {
+    abstract class WellNamedFactory {
+    }
+}
+
+class NonAbstractClass {
+}
+
+class AbstractClass {
+}
+
+class Class1Factory {
+}
+
+abstract class AbstractClassName2 {
+    class AbstractINNERRClass {
+    }
+}
+
+abstract class Class2Factory {
+    class WellNamedFACTORY {
+    	public void marazmaticMETHODName() {
+    		int marazmaticVARIABLEName = 2;
+    		int MARAZMATICVariableName = 1;
+    	}
+    }
+}
+
+public interface Directions {
+  int RIGHT=1;
+  int LEFT=2;
+  int UP=3;
+  int DOWN=4;
+}
+
+interface BadNameForInterfeis
+{
+   void interfaceMethod();
+}
+
+abstract class NonAAAAbstractClassName1 {
+	public int serialNUMBER = 6;
+	public final int s1erialNUMBER = 6;
+	private static int s2erialNUMBER = 6;
+	private static final int s3erialNUMBER = 6;
+}
+
+interface Interface1 {
+	
+	String VALUEEEE = "value"; // in interface this is final/static
+	
+}
+
+interface Interface2 {
+	
+	static String VALUEEEE = "value"; // in interface this is final/static
+	
+}
+
+interface Interface3 {
+	
+	final String VALUEEEE = "value"; // in interface this is final/static
+	
+}
+
+interface Interface4 {
+	
+	final static String VALUEEEE = "value"; // in interface this is final/static
+	
+}
+
+public class FIleNameFormatException extends Exception {
+
+    private static final long serialVersionUID = 1L;
+
+    public FIleNameFormatException(Exception e) {
+        super(e);
+    }
+}
+
+class StateX {
+    int userID;
+    int scaleX, scaleY, scaleZ;
+    
+    int getScaleX() {
+        return this.scaleX;
+    }
+}
+
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputAbbreviationAsWordInTypeNameCheckOverridableMethod.java b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputAbbreviationAsWordInTypeNameCheckOverridableMethod.java
new file mode 100644
index 0000000..98ebb75
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputAbbreviationAsWordInTypeNameCheckOverridableMethod.java
@@ -0,0 +1,39 @@
+package com.puppycrawl.tools.checkstyle.naming;
+
+import org.junit.Before;
+
+abstract class NonAAAAbstractClassName1 {
+	public int serialNUMBER = 6;
+	public final int s1erialNUMBER = 6;
+	private static int s2erialNUMBER = 6;
+	private static final int s3erialNUMBER = 6;
+	
+	@Override
+	@SuppressWarnings
+	@Before
+	private void oveRRRRRrriddenMethod(){
+	    int a = 0;
+	    // blah-blah
+	}
+}
+
+class Class1 {
+    
+    private void oveRRRRRrriddenMethod(){
+        int a = 0;
+        // blah-blah
+    }
+    
+}
+
+class Class2 extends Class1 {
+    
+    @Override
+    @SuppressWarnings
+    @Before
+    private void oveRRRRRrriddenMethod(){
+        int a = 0;
+        // blah-blah
+    }
+    
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputAbstractClassName.java b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputAbstractClassName.java
new file mode 100644
index 0000000..4087923
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputAbstractClassName.java
@@ -0,0 +1,40 @@
+package com.puppycrawl.tools.checkstyle.naming;
+
+abstract public class InputAbstractClassName {
+}
+// abstract --> ^Abstract.*$|^.*Factory$
+abstract class NonAbstractClassName {
+}
+
+abstract class FactoryWithBadName {
+}
+
+abstract class AbstractClassName {
+    abstract class NonAbstractInnerClass {
+    }
+}
+
+abstract class ClassFactory {
+    abstract class WellNamedFactory {
+    }
+}
+
+class NonAbstractClass {
+}
+
+//^Abstract.*$|^.*Factory$ --> abstract
+class AbstractClass {
+}
+
+class Class1Factory {
+}
+
+abstract class AbstractClassName2 {
+    class AbstractInnerClass {
+    }
+}
+
+abstract class Class2Factory {
+    class WellNamedFactory {
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputConstantNames.java b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputConstantNames.java
new file mode 100644
index 0000000..0b0778d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputConstantNames.java
@@ -0,0 +1,9 @@
+package com.puppycrawl.tools.checkstyle.naming;
+
+import java.io.ObjectStreamField;
+
+public class InputConstantNames
+{
+    private static final long serialVersionUID = 1L; //should be ignored
+    private static final ObjectStreamField[] serialPersistentFields = {}; // should be ignored too
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputMemberName.java b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputMemberName.java
new file mode 100644
index 0000000..6ae0513
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputMemberName.java
@@ -0,0 +1,14 @@
+package com.puppycrawl.tools.checkstyle.naming;
+
+public class InputMemberName
+{
+    public int mPublic;
+    protected int mProtected;
+    int mPackage;
+    private int mPrivate;
+
+    public int _public;
+    protected int _protected;
+    int _package;
+    private int _private;
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputMemberNameExtended.java b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputMemberNameExtended.java
new file mode 100644
index 0000000..6989e4a
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputMemberNameExtended.java
@@ -0,0 +1,84 @@
+package com.puppycrawl.tools.checkstyle.naming;
+
+import test.Direction;
+import test.InputMemberName.Inner;
+
+public class InputMemberName
+{
+    public int mPublic;
+    protected int mProtected;
+    int mPackage;
+    private int mPrivate;
+
+    public int _public;
+    protected int _protected;
+    int _package;
+    private int _private;
+    
+    class Inner {
+        public int mPublic;
+        protected int mProtected;
+        int mPackage;
+        private int mPrivate;
+
+        public int _public;
+        protected int _protected;
+        int _package;
+        private int _private;
+    }
+
+    Inner anon = new Inner() {
+        public int mPublic;
+        protected int mProtected;
+        int mPackage;
+        private int mPrivate;
+
+        public int _public;
+        protected int _protected;
+        int _package;
+        private int _private;  
+    };
+}
+
+interface In
+{
+    public int mPublic = 0;
+    int mProtected = 0;
+    int mPackage = 0;
+    int mPrivate = 0;
+
+    public int _public = 0;
+    int _protected = 0;
+    int _package = 0;
+    int _private = 0;
+}
+
+enum Direction {
+
+    NORTH(1),
+    SOUTH(-1),
+    EAST(-2),
+    WEST(2);
+
+    public int mPublic = 0;
+    int mProtected = 0;
+    int mPackage = 0;
+    int mPrivate = 0;
+
+    public int _public = 0;
+    int _protected = 0;
+    int _package = 0;
+    int _private = 0;
+
+    Direction(int code){
+        this.code=code;
+    }
+    protected int code;
+    public int getCode() {
+          return this.code;
+    }
+    static Direction getOppositeDirection(Direction d){
+          return null;
+    }
+}
+
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputMethodNameExtra.java b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputMethodNameExtra.java
new file mode 100644
index 0000000..79a722e
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputMethodNameExtra.java
@@ -0,0 +1,16 @@
+package com.puppycrawl.tools.checkstyle.naming;
+
+public class InputMethodNameExtra
+{
+    public void doit()
+    {
+        createNameHistoryDetails(historyDetails, previousNameService, entityId,
+            new More.ViewChangeHistoryBaseAction.ChangeHistoryDisplayName(agencyName)
+            {
+                String getDisplayName()
+                {
+                    return getPreviousName(TypeOfName.AGENCY_NAME);
+                }
+            });
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputTypeName.java b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputTypeName.java
new file mode 100644
index 0000000..cbcfac9
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputTypeName.java
@@ -0,0 +1,11 @@
+package com.puppycrawl.tools.checkstyle.naming;
+
+class inputHeaderClass {
+
+    public interface inputHeaderInterface {};
+
+    public enum inputHeaderEnum { one, two };
+
+    public @interface inputHeaderAnnotation {};
+
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputTypeParameterName.java b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputTypeParameterName.java
new file mode 100644
index 0000000..7cec4f0
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/naming/InputTypeParameterName.java
@@ -0,0 +1,62 @@
+package com.puppycrawl.tools.checkstyle.naming;
+
+import java.io.Serializable;
+
+public class InputTypeParameterName <t>
+{
+    public <TT> void foo() { }
+    
+    <e_e> void foo(int i) {
+    }
+}
+
+class Other <foo extends Serializable & Cloneable> {
+    
+    foo getOne() {
+	return null;
+    }
+    
+    <Tfo$o2T extends foo> Tfo$o2T getTwo(Tfo$o2T a) {
+	return null;
+    }
+    
+    <foo extends Runnable> foo getShadow() {
+	return null;
+    }
+    
+    static class Junk <foo> {
+        <_fo extends foo> void getMoreFoo() {
+	}
+    }
+}
+
+class MoreOther <T extends Cloneable> {
+    
+    <E extends T> void getMore() {
+        new Other() {
+            <T> void getMoreFoo() {
+	    }
+	};
+	
+//        Other o = new Other() {
+//            <EE> void getMoreFoo() {
+//            }
+//        };
+    }
+}
+
+interface Boo<Input> {
+    Input boo();
+}
+
+interface FooInterface<T> {
+    T foo();
+}
+
+interface FooInterface2 {
+    Input foo();
+}
+
+class Input {
+
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/regexp.header b/src/test/resources/com/puppycrawl/tools/checkstyle/regexp.header
new file mode 100644
index 0000000..1c7f998
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/regexp.header
@@ -0,0 +1,5 @@
+^/*$
+// .*
+// Created: 2002
+^.*$
+^.*$
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/regexp.header1 b/src/test/resources/com/puppycrawl/tools/checkstyle/regexp.header1
new file mode 100644
index 0000000..6a2ee45
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/regexp.header1
@@ -0,0 +1,5 @@
+^/*$
+// .*
+^.*$
+^.*$
+^.*$
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/regexp.header2 b/src/test/resources/com/puppycrawl/tools/checkstyle/regexp.header2
new file mode 100644
index 0000000..075455c
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/regexp.header2
@@ -0,0 +1,7 @@
+^package
+^$
+^import
+^$
+^/\*\*
+^ \*([^/]|$)
+^ \*/
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_bad_int.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_bad_int.xml
new file mode 100644
index 0000000..2e72f25
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_bad_int.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suppressions PUBLIC
+    "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+    "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+<suppressions>
+  <suppress files="file0" checks="check0" lines="a" />
+</suppressions>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_multiple.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_multiple.xml
new file mode 100644
index 0000000..47f28cf
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_multiple.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suppressions PUBLIC
+    "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+    "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+<suppressions>
+  <suppress files="file0" checks="check0"/>
+  <suppress files="file1" checks="check1" lines="1,2-3"/>
+  <suppress files="file2" checks="check2" columns="1,2-3"/>
+  <suppress files="file3" checks="check3" lines="1,2-3" columns="1,2-3"/>
+</suppressions>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_no_check.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_no_check.xml
new file mode 100644
index 0000000..c3d468c
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_no_check.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suppressions PUBLIC
+    "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+    "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+<suppressions>
+  <suppress files="file0"/>
+</suppressions>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_no_file.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_no_file.xml
new file mode 100644
index 0000000..a402e84
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_no_file.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suppressions PUBLIC
+    "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+    "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+<suppressions>
+  <suppress checks="check0"/>
+</suppressions>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_none.xml b/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_none.xml
new file mode 100644
index 0000000..2002196
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_none.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suppressions PUBLIC
+    "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+    "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+<suppressions>
+</suppressions>
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/Gh47.java b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/Gh47.java
new file mode 100644
index 0000000..f465d79
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/Gh47.java
@@ -0,0 +1,9 @@
+package com.puppycrawl.tools.checkstyle.whitespace;
+
+import java.util.List;
+
+public class Gh47
+{
+    public List<List<String>[]> listOfListOFArrays;
+}
+
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputDoWhileWhitespaceAround.java b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputDoWhileWhitespaceAround.java
new file mode 100644
index 0000000..c500336
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputDoWhileWhitespaceAround.java
@@ -0,0 +1,11 @@
+package com.puppycrawl.tools.checkstyle.whitespace;
+
+public class InputDoWhileWhitespaceAround {
+
+    public void doWhileTest(int n) {
+        int k = 0;
+        do {
+            ++k;
+        } while(k < n);
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputEmptyLineSeparatorCheck.java b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputEmptyLineSeparatorCheck.java
new file mode 100644
index 0000000..b5101e5
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputEmptyLineSeparatorCheck.java
@@ -0,0 +1,93 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.Callable;
+import java.util.Collections;
+import com.google.common.base.CharMatcher;
+import com.google.common.io.CharSource;
+
+import javax.swing.AbstractAction;
+
+import org.apache.commons.beanutils.locale.converters.ByteLocaleConverter;
+import org.apache.commons.io.FilenameUtils;
+class InputEmptyLineSeparatorCheck
+{
+	public static final double FOO_PI = 3.1415;
+	private boolean flag = true; 
+	static {
+        //empty static initializer
+	}
+	//separator blank line
+	{
+		//empty instance initializer
+	}
+	//separator blank line
+	/**
+	 * 
+	 * 
+	 * 
+	 */
+	private InputEmptyLineSeparatorCheck()
+	{
+		//empty
+	}
+	//separator blank line
+    public int compareTo(InputGenericWhitespaceCheck aObject)
+    {
+    	int number = 0;
+        return 0;
+    }
+    /**
+     * 
+     * @param task
+     * @param result
+     * @return
+     */
+    public static <T> Callable<T> callable(Runnable task, T result)
+    {
+        return null;
+    }
+    //separator blank line
+    public int getBeastNumber()
+    {
+        return 666;
+    }
+    interface IntEnum {
+    }
+    //separator blank line
+    class InnerClass {
+    	
+    	public static final double FOO_PI_INNER = 3.1415;
+    	//separator blank line
+    	private boolean flagInner = true; 
+    	//separator blank line
+    	{
+    		//empty instance initializer
+    	}
+    	//separator blank line
+    	private InnerClass()
+    	{
+    		//empty
+    	}
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputEmptyLineSeparatorCheckHeader.java b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputEmptyLineSeparatorCheckHeader.java
new file mode 100644
index 0000000..5321982
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputEmptyLineSeparatorCheckHeader.java
@@ -0,0 +1,21 @@
+////////////////////////////////////////////////////////////////////////////////
+// checkstyle: Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2001-2014  Oliver Burn
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.whitespace;
+
+class InputEmptyLineSeparatorCheck {}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputEmptyTypesAndCycles.java b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputEmptyTypesAndCycles.java
new file mode 100644
index 0000000..d58e3b0
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputEmptyTypesAndCycles.java
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////
+// Test case file for checkstyle.
+// Created: 2001
+////////////////////////////////////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.checks.whitespace;
+
+class myFoo
+{
+	@MapFeature.Require({ALLOWS_NULL_KEYS, ALLOWS_NULL_VALUES})
+	private void foo()
+	{
+		int i = 0;
+		String[][] x = {{"foo"}};
+		for (first = 0; first < len && matches(sequence.charAt(first)); first++) {}
+		while (i = 1) {}
+		do {} while (i == 1);
+	}
+}
+
+interface SupplierFunction<T> extends Function<Supplier<T>, T> {}
+
+class EmptyFoo {}
+
+enum EmptyFooEnum {}
+
+class WithEmptyAnonymous
+{
+	private void foo()
+	{
+		MyClass c = new MyClass() {};
+	}
+}
+
+
+ at Retention(RetentionPolicy.CLASS)
+ at Target({
+    ElementType.ANNOTATION_TYPE,
+    ElementType.CONSTRUCTOR,
+    ElementType.FIELD,
+    ElementType.METHOD,
+    ElementType.TYPE})
+ at Documented
+ at GwtCompatible
+public @interface Beta {}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputGenericWhitespaceCheck.java b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputGenericWhitespaceCheck.java
new file mode 100644
index 0000000..8af8626
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputGenericWhitespaceCheck.java
@@ -0,0 +1,65 @@
+package com.puppycrawl.tools.checkstyle.whitespace;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.Callable;
+import java.util.Collections;
+class InputGenericWhitespaceCheck implements Comparable<InputGenericWhitespaceCheck>, Serializable
+{
+    void meth()
+    {
+        List<Integer> x = new ArrayList<Integer>();
+        List<List<Integer>> y = new ArrayList<List<Integer>>();
+        List < Integer > a = new ArrayList < Integer > ();
+        List < List < Integer > > b = new ArrayList < List < Integer > > ();
+    }
+
+    public int compareTo(InputGenericWhitespaceCheck aObject)
+    {
+        return 0;
+    }
+
+    public static <T> Callable<T> callable(Runnable task, T result)
+    {
+        return null;
+    }
+
+    public static<T>Callable<T> callable2(Runnable task, T result)
+    {
+        Map<Class<?>, Integer> x = new HashMap<Class<?>, Integer>();
+        for (final Map.Entry<Class<?>, Integer> entry : x.entrySet()) {
+            entry.getValue();
+        }
+        Class<?>[] parameterClasses = new Class<?>[0];
+        return null;
+    }
+    public int getConstructor(Class<?>... parameterTypes)
+    {
+        Collections.<Object>emptySet();
+        Collections. <Object> emptySet();
+        return 666;
+    }
+    
+    <T> InputGenericWhitespaceCheck(List<T> things, int i)
+    {
+    }
+
+    public <T> InputGenericWhitespaceCheck(List<T> things)
+    {
+    }
+
+    public interface IntEnum {
+    }
+
+    public static class IntEnumValueType<E extends Enum<E> & IntEnum> {
+    }
+
+    public static class IntEnumValueType2<E extends Enum<E>& IntEnum> {
+    }
+
+    public static class IntEnumValueType3<E extends Enum<E>  & IntEnum> {
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputMethodParamPad.java b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputMethodParamPad.java
new file mode 100644
index 0000000..7b9f980
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputMethodParamPad.java
@@ -0,0 +1,72 @@
+package com.puppycrawl.tools.checkstyle.whitespace;
+import java.util.Vector;
+/** Test input for MethodDefPadCheck */
+public class InputMethodParamPad
+{
+    public InputMethodParamPad()
+    {
+        super();
+    }
+    
+    public InputMethodParamPad (int aParam)
+    {
+        super ();
+    }
+    
+    public InputMethodParamPad
+        (double aParam)
+    {
+        super
+            ();
+    }    
+
+    public void method()
+    {
+    }
+    
+    public void method (int aParam)
+    {
+    }
+    
+    public void method
+        (double aParam)
+    {
+        // invoke constructor
+        InputMethodParamPad pad = new InputMethodParamPad();
+        pad = new InputMethodParamPad ();
+        pad = new InputMethodParamPad
+            ();
+
+        // call method
+        method();
+        method ();
+        method
+            ();
+    }
+    
+    public void dottedCalls()
+    {
+        this.method();
+        this.method ();
+        this.method
+            ();
+        
+        InputMethodParamPad p = new InputMethodParamPad();
+        p.method();
+        p.method ();
+        p.method
+            ();
+
+        java.lang.Integer.parseInt("0");
+        java.lang.Integer.parseInt ("0");
+        java.lang.Integer.parseInt
+            ("0");    
+    }
+    
+    public void newArray()
+    {
+        int[] a = new int[]{0, 1};
+        java.util.Vector<String> v = new java.util.Vector<String>();
+        java.util.Vector<String> v1 = new Vector<String>();
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputSeparatorWrap.java b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputSeparatorWrap.java
new file mode 100644
index 0000000..dca0b68
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputSeparatorWrap.java
@@ -0,0 +1,49 @@
+package com.puppycrawl.tools.checkstyle.whitespace;
+
+public class InputSeparatorWrap<T extends Foo 
+                    & Bar> { 
+    public void goodCase() 
+    {
+        int i = 0;
+        String s = "ffffooooString";
+        s
+            .isEmpty(); //good wrapping
+        s.isEmpty();
+        try {
+            
+        } catch (FooException |
+                BarException e) {} 
+        foo(i,
+                s); //good wrapping
+    }
+    public static void foo(int i, String s) 
+    {
+        
+    }
+}
+
+class badCase<T extends Foo &  Bar> {
+    
+	@Override
+    public void goodCase(int... aFoo) 
+    {
+        String s = "ffffooooString";
+        s.
+            isEmpty(); //bad wrapping
+        try {
+
+        } catch (FooException 
+            | BarException e) {}
+        
+        foo(i
+                ,s);  //bad wrapping
+        int[] i;        
+    }
+    public static void foo(int i, String s) 
+    {
+        return new StringBuilder(maxLength)
+        .append(seq, 0, truncationLength)
+        .append(truncationIndicator)
+        .toString();
+    }
+}
\ No newline at end of file
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputSwitchWhitespaceAround.java b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputSwitchWhitespaceAround.java
new file mode 100644
index 0000000..4dfb961
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputSwitchWhitespaceAround.java
@@ -0,0 +1,11 @@
+package com.puppycrawl.tools.checkstyle.whitespace;
+
+public class InputSwitchWhitespaceAround {
+
+    public void switchTest(int k) {
+        switch(k) {
+        default:
+            break;
+        }
+    }
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputWhitespaceAround.java b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputWhitespaceAround.java
new file mode 100644
index 0000000..514b7dd
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/InputWhitespaceAround.java
@@ -0,0 +1,31 @@
+package com.puppycrawl.tools.checkstyle.whitespace;
+
+ at SuppressWarnings({"this", "that"})
+public class InputWhitespaceAround
+{
+    protected InputWhitespaceAround ( int i )
+    {
+        this ();
+        toString ();
+    }
+    protected InputWhitespaceAround ()
+    {
+        super ();
+    }
+    
+    public void enhancedFor ()
+    {
+        int[] i = new int[2];
+        for ( int j: i ) {
+            System.out.println ( j );
+        }
+    }
+}
+
+ at interface CronExpression {
+	Class<?>[] groups() default {}; 
+}
+
+ at interface CronExpression {
+	Class<?>[] groups() default { }; // extra space
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/NoLineWrapBadInput.java b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/NoLineWrapBadInput.java
new file mode 100644
index 0000000..85457e1
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/NoLineWrapBadInput.java
@@ -0,0 +1,27 @@
+package com.puppycrawl.tools.
+    checkstyle;
+
+import com.google.common.annotations.Beta;
+
+import javax.accessibility.
+    AccessibleAttributeSequence;
+import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
+
+public class
+    BadLineWrapInput {
+    
+	public void
+	    fooMethod() {
+		final int
+		    foo = 0;
+	}
+}
+
+enum
+    FooFoo {
+}
+
+interface
+    InterFoo {}
+
+
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/NoLineWrapGoodInput.java b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/NoLineWrapGoodInput.java
new file mode 100644
index 0000000..d78bd4f
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/NoLineWrapGoodInput.java
@@ -0,0 +1,13 @@
+package com.puppycrawl.tools.checkstyle;
+
+import com.google.common.annotations.Beta;
+
+import javax.accessibility.AccessibleAttributeSequence;
+import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
+
+public class GoodLineWrapInput {
+    
+	public void fooMethod() {
+		//
+	}
+}
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/ParenPadWithSpace.java b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/ParenPadWithSpace.java
new file mode 100644
index 0000000..07b452d
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/whitespace/ParenPadWithSpace.java
@@ -0,0 +1,22 @@
+package com.puppycrawl.tools.checkstyle.whitespace;
+
+public class ParenPadWithSpace
+{
+    protected ParenPadWithSpace ( int i )
+    {
+        this ();
+        toString ();
+    }
+    protected ParenPadWithSpace ()
+    {
+        super ();
+    }
+    
+    public void enhancedFor ()
+    {
+        int[] i = new int[2];
+        for ( int j: i ) {
+            System.out.println ( j );
+        }
+    }
+}
diff --git a/src/xdocs/anttask.xml.vm b/src/xdocs/anttask.xml.vm
new file mode 100644
index 0000000..54ef68e
--- /dev/null
+++ b/src/xdocs/anttask.xml.vm
@@ -0,0 +1,399 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Ant Task</title>
+    <author>Oliver Burn</author>
+  </properties>
+
+  <body>
+
+    <section name="Description">
+
+      <p>
+        This task runs Checkstyle over specified Java files. The task has been
+        tested using ANT 1.5.  The latest version of checkstyle can be found
+        at
+        <a href="http://checkstyle.sourceforge.net/">http://checkstyle.sourceforge.net/</a>.
+
+        This task is included in the checkstyle distribution.
+      </p>
+
+    </section>
+
+    <section name="Installation">
+
+      <p>
+        The easiest way is to include
+        <code>checkstyle-${projectVersion}-all.jar</code> in the
+        classpath. This contains all the classes required to run
+        Checkstyle. Alternatively, you must include the
+        <code>compile</code> third party dependencies listed in <a
+        href="dependencies.html">Project Dependencies</a> in the
+        classpath.
+      </p>
+
+      <p>
+        To use the task in a build file, you will need the following
+        <code>taskdef</code> declaration:
+      </p>
+
+      <source>
+<taskdef resource="checkstyletask.properties"
+         classpath="/path/to/checkstyle-${projectVersion}-all.jar"/>
+      </source>
+
+      <p>
+        Or, assuming that Checkstyle is in the global classpath (not
+        recommended), then you will need the following <code>taskdef</code>
+        declaration:
+      </p>
+
+      <source>
+<taskdef resource="checkstyletask.properties"/>
+      </source>
+
+      <p>
+        Or if you use Ant 1.6 and later and assuming that Checkstyle
+        is in the library search path, then you may use antlib feature
+        of Ant (see <a
+        href="http://ant.apache.org/manual/Types/antlib.html"
+        >http://ant.apache.org/manual/Types/antlib.html</a>
+        for more details).  For example:
+      </p>
+
+      <source>
+<project name="foo" ...
+         xmlns:cs="antlib:com.puppycrawl.tools.checkstyle">
+...
+  <cs:checkstyle>
+  ...
+  </cs:checkstyle>
+...
+</project>
+      </source>
+
+    </section>
+
+    <section name="Parameters">
+
+      <table summary="parameters">
+
+        <tr>
+          <td><b>Attribute</b></td>
+          <td><b>Description</b></td>
+          <td><b>Required</b></td>
+        </tr>
+
+        <tr>
+          <td>file</td>
+          <td>File to run checkstyle on.</td>
+          <td>
+            One of either <i>file</i> or at least one nested <i>fileset</i>
+            element
+          </td>
+        </tr>
+
+        <tr>
+          <td>config</td>
+          <td>
+            Specifies the location of the file that defines the configuration
+            modules. The location can either be a filesystem location, or a
+            name passed to the ClassLoader.getResource() method.
+            <br/>
+            <a href="config.html">See here</a> for a description of how to
+            define a configuration.
+          </td>
+          <td>Exactly one of config or configURL</td>
+        </tr>
+
+        <tr>
+          <td>configURL</td>
+          <td>
+            Specifies a URL that defines the configuration modules. <a
+            href="config.html">See here</a> for a description of how to define
+            a configuration.
+          </td>
+          <td>Exactly one of config or configURL</td>
+        </tr>
+
+        <tr>
+          <td>properties</td>
+          <td>
+            Specifies a file that contains properties for <a
+            href="config.html#Properties"> expanded property values</a> of the
+            configuration.  Ant properties (like ${basedir}) and nested
+            property elements override the properties in this file.
+          </td>
+          <td>No</td>
+        </tr>
+
+        <tr>
+          <td>failOnViolation</td>
+          <td>
+            Specifies whether the build will continue even if there are
+            violations. Defaults to <code>"true"</code>.
+          </td>
+          <td>No</td>
+        </tr>
+
+        <tr>
+          <td>failureProperty</td>
+          <td>The name of a property to set in the event of a violation.</td>
+          <td>No</td>
+        </tr>
+
+        <tr>
+          <td>maxErrors</td>
+          <td>
+            The maximum number of errors that are tolerated before
+            breaking the build or setting the failure property. Defaults
+            to <code>"0"</code>.
+          </td>
+          <td>No</td>
+        </tr>
+
+        <tr>
+          <td>maxWarnings</td>
+          <td>
+            The maximum number of warnings that are tolerated before
+            breaking the build or setting the failure property. Defaults
+            to <code>"2147483647"</code>, i.e.
+
+            <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Integer.html#MAX_VALUE">Integer.MAX_VALUE</a>.
+          </td>
+          <td>No</td>
+        </tr>
+
+        <tr>
+          <td>classpath</td>
+          <td>
+            The classpath to use when looking up classes. Defaults to the
+            current classpath.
+          </td>
+          <td>No</td>
+        </tr>
+
+        <tr>
+          <td>classpathref</td>
+          <td>
+            The classpath to use when looking up classes, given as a reference
+            to a path defined elsewhere.
+          </td>
+          <td>No</td>
+        </tr>
+
+        <tr>
+          <td>omitIgnoredModules</td>
+          <td>
+            For efficiency, Checkstyle does not invoke modules with a configured severity of "ignore"
+            (since their output would be ignored anyway). A small number of modules may choose to log above their
+            configured severity level and so always need to be invoked. This settings specifies that behaviour.
+            Defaults to <code>"true"</code>.
+          </td>
+          <td>No</td>
+        </tr>
+      </table>
+
+      <p>
+        Note that the <code>packageNamesFile</code>
+        parameter has been dropped for Checkstyle 5.0, because of
+        significant changes regarding package name file handling. See <a
+        href="config.html#Packages"/> for details.
+      </p>
+    </section>
+
+    <section name="Nested Elements">
+
+      <p>
+        This task supports the nested elements <a
+        href="http://ant.apache.org/manual/Types/fileset.html"><fileset></a>,
+        <a
+        href="http://ant.apache.org/manual/using.html#path"><classpath></a>,
+        <code><formatter></code>, and <code><property></code>.
+      </p>
+
+      <p>
+        The parameters for the <code><formatter></code>
+        element are:
+      </p>
+
+      <table summary="nested elements">
+        <tr>
+          <td><b>Attribute</b></td>
+          <td><b>Description</b></td>
+          <td><b>Required</b></td>
+        </tr>
+
+        <tr>
+          <td>type</td>
+          <td>
+            <p>The type of output to generate. The valid values are:</p>
+            <ul>
+              <li>
+                <code>plain</code> - specifies the <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/DefaultLogger.html">DefaultLogger</a>
+              </li>
+              <li>
+                <code>xml</code> - specifies the <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/XMLLogger.html">XMLLogger</a>
+              </li>
+            </ul>
+            <p>Defaults to <code>"plain"</code>.</p>
+          </td>
+          <td>No</td>
+        </tr>
+
+        <tr>
+          <td>toFile</td>
+          <td>
+            The file to write output to. Defaults to standard output. Note,
+            there is no way to explicitly specify standard output.
+          </td>
+          <td>No</td>
+        </tr>
+        <tr>
+          <td>useFile</td>
+          <td>Boolean that determines whether output should be sent to
+          a file.  Default is <code>true</code>.</td>
+          <td>No</td>
+        </tr>
+      </table>
+
+      <p>
+        A <code><property></code> element provides a property for
+        <a href="config.html#Properties">expanded property values</a> of
+        the configuration.  The parameters for the
+        <code><property></code> element are:
+      </p>
+
+      <table summary="nested elements">
+        <tr>
+          <td><b>Attribute</b></td>
+          <td><b>Description</b></td>
+          <td><b>Required</b></td>
+        </tr>
+        <tr>
+          <td>key</td>
+          <td><p>The key for the property.</p></td>
+          <td>Yes</td>
+        </tr>
+
+        <tr>
+          <td>value</td>
+          <td>The value of the property specified as a string.</td>
+          <td>Either <i>value</i> or <i>file</i></td>
+        </tr>
+
+        <tr>
+          <td>file</td>
+          <td>
+            The value of the property specified as a file. This is great for
+            specifying file names relative to the ANT build file.
+          </td>
+          <td>Either <i>value</i> or <i>file</i></td>
+        </tr>
+      </table>
+
+    </section>
+
+    <section name="Examples">
+
+      <p>
+        <b>
+          Run checkstyle with configuration file
+          <code>docs/sun_checks.xml</code> on a single file
+        </b>
+      </p>
+
+      <source>
+<checkstyle config="docs/sun_checks.xml" file="Check.java"/>
+      </source>
+
+      <p>
+        <b>
+          Run checkstyle on a set of Java files using site-wide configuration
+          and an expanded property value
+        </b>
+      </p>
+      <source>
+<checkstyle config="/path/to/site/sun_checks.xml">
+  <fileset dir="src/checkstyle" includes="**/*.java"/>
+
+  <!-- Location of cache-file. Something that is project specific -->
+  <property key="checkstyle.cache.file" file="target/cachefile"/>
+</checkstyle>
+      </source>
+
+      <p>
+        <b>
+          Run checkstyle on a set of files and output messages to standard
+          output in plain format, and a file in XML format
+        </b>
+      </p>
+      <source>
+<checkstyle config="docs/sun_checks.xml">
+  <fileset dir="src/checkstyle" includes="**/*.java"/>
+  <formatter type="plain"/>
+  <formatter type="xml" toFile="build/checkstyle_errors.xml"/>
+</checkstyle>
+      </source>
+
+      <p>
+        <b>
+          Run checkstyle with configuration file
+          <code>docs/sun_checks.xml</code> on a file and provide a package
+          names file
+        </b>
+      </p>
+      <source>
+<checkstyle config="docs/sun_checks.xml"
+            packageNamesFile="myPackageNames.xml"
+            file="Check.java"/>
+      </source>
+
+      <p>
+        <b>
+          Run checkstyle in an automated build and send an email report if
+          style violations are detected
+        </b>
+      </p>
+      <source>
+<target name="checkstyle"
+        description="Generates a report of code convention violations.">
+
+  <checkstyle config="docs/sun_checks.xml"
+              failureProperty="checkstyle.failure"
+              failOnViolation="false">
+    <formatter type="xml" tofile="checkstyle_report.xml"/>
+    <fileset dir="src" includes="**/*.java"/>
+  </checkstyle>
+
+  <style in="checkstyle_report.xml" out="checkstyle_report.html" style="checkstyle.xsl"/>
+
+</target>
+
+<!-- run this target as part of automated build -->
+<target name="checkstyle-nightly"
+        depends="checkstyle"
+        if="checkstyle.failure"
+        description="Sends email if checkstyle detected code conventions violations.">
+
+  <!-- use your own server and email addresses below. See Ant documentation for details -->
+
+  <mail from="qa at some.domain"
+        tolist="someone at some.domain,someoneelse at some.domain"
+        mailhost="mailbox.some.domain"
+        subject="Checkstyle violation(s) in project ${ant.project.name}"
+        files="checkstyle_report.html"/>
+
+</target>
+      </source>
+
+    </section>
+  </body>
+</document>
+
diff --git a/src/xdocs/availablechecks.xml b/src/xdocs/availablechecks.xml
new file mode 100644
index 0000000..2cd61ef
--- /dev/null
+++ b/src/xdocs/availablechecks.xml
@@ -0,0 +1,750 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+
+  <properties>
+    <title>Available Checks</title>
+    <author email="checkstyle-devel at lists.sourceforge.net">Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+<section name="Available Checks">
+    <p>
+      Checkstyle provides many checks that you can apply to your
+      source code. Below is an alphabetical reference, the site
+      navigation menu provides a reference organized by functionality.
+    </p>
+    <table>
+      <tr>
+        <td><a href="config_naming.html#AbbreviationAsWordInName">AbbreviationAsWordInName</a></td>
+        <td>The Check validate abbreviations(consecutive capital letters)
+         length in identifier name, it also allow in enforce camel case naming.</td>
+      </tr>
+      <tr>
+        <td><a href="config_naming.html#AbstractClassName">AbstractClassName</a></td>
+        <td>
+          Ensures that the names of abstract classes conforming to some
+          regular expression.
+        </td>
+      </tr>
+      <tr>
+        <td><a href="config_annotation.html#AnnotationUseStyle">AnnotationUseStyle</a></td>
+        <td>This check controls the style with the usage of annotations.</td>
+      </tr>
+      <tr>
+        <td><a href="config_sizes.html#AnonInnerLength">AnonInnerLength</a></td>
+        <td>Checks for long anonymous inner classes.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#ArrayTrailingComma">ArrayTrailingComma</a></td>
+        <td>Checks if array initialization contains optional trailing comma.</td>
+      </tr>
+      <tr>
+        <td><a href="config_misc.html#ArrayTypeStyle">ArrayTypeStyle</a></td>
+        <td>Checks the style of array type definitions.</td>
+      </tr>
+      <tr>
+        <td><a href="config_misc.html#AvoidEscapedUnicodeCharacters">AvoidEscapedUnicodeCharacters</a></td>
+        <td>Restrict using Unicode escapes.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#AvoidInlineConditionals">AvoidInlineConditionals</a></td>
+        <td>Detects inline conditionals.</td>
+      </tr>
+      <tr>
+        <td><a href="config_blocks.html#AvoidNestedBlocks">AvoidNestedBlocks</a></td>
+        <td>Finds nested blocks.</td>
+      </tr>
+      <tr>
+        <td><a href="config_imports.html#AvoidStarImport">AvoidStarImport</a></td>
+        <td>Check that finds import statements that use the * notation.</td>
+      </tr>
+      <tr>
+        <td><a href="config_imports.html#AvoidStaticImport">AvoidStaticImport</a></td>
+        <td>Check that finds static imports.</td>
+      </tr>
+      <tr>
+        <td><a href="config_metrics.html#BooleanExpressionComplexity">BooleanExpressionComplexity</a></td>
+        <td>
+          Restricts nested boolean operators (&&, ||, &, |
+          and ^) to a specified depth (default = 3).
+        </td>
+      </tr>
+      <tr>
+        <td><a href="config_metrics.html#ClassDataAbstractionCoupling">ClassDataAbstractionCoupling</a></td>
+        <td>This metric measures the number of instantiations of other classes within the given class.</td>
+      </tr>
+      <tr>
+        <td><a href="config_metrics.html#ClassFanOutComplexity">ClassFanOutComplexity</a></td>
+        <td>The number of other classes a given class relies on.</td>
+      </tr>
+      <tr>
+        <td><a href="config_naming.html#ClassTypeParameterName">ClassTypeParameterName</a></td>
+        <td>
+          Checks that class type parameter names conform to a format
+          specified by the format property.
+        </td>
+      </tr>
+      <tr>
+        <td><a href="config_naming.html#ConstantName">ConstantName</a></td>
+        <td>Checks that constant names conform to a format specified by the format property.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#CovariantEquals">CovariantEquals</a></td>
+        <td>
+          Checks that if a class defines a covariant method equals, then
+          it defines method equals(java.lang.Object).
+        </td>
+      </tr>
+      <tr>
+        <td><a href="config_imports.html#CustomImportOrder">CustomImportOrder</a></td>
+        <td>
+          Checks that the groups of import declarations appear in the order specified
+          by the user.
+        </td>
+      </tr>
+      <tr>
+        <td><a href="config_metrics.html#CyclomaticComplexity">CyclomaticComplexity</a></td>
+        <td>Checks cyclomatic complexity against a specified limit.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#DeclarationOrder">DeclarationOrder</a></td>
+        <td>
+          Checks that the parts of a class or interface declaration
+          appear in the order suggested by the <a
+          href="http://java.sun.com/docs/codeconv/html/CodeConventions.doc2.html#1852"
+          >Code Conventions for the Java Programming Language</a>.
+        </td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#DefaultComesLast">DefaultComesLast</a></td>
+        <td>
+          Check that the <code>default</code> is after all the
+          <code>case</code>s in a <code>switch</code> statement.
+        </td>
+      </tr>
+      <tr>
+        <td><a href="config_misc.html#DescendantToken">DescendantToken</a></td>
+        <td>Checks for restricted tokens beneath other tokens.</td>
+      </tr>
+      <tr>
+        <td><a href="config_design.html#DesignForExtension">DesignForExtension</a></td>
+        <td>Checks that classes are designed for inheritance.</td>
+      </tr>
+      <tr>
+        <td><a href="config_blocks.html#EmptyBlock">EmptyBlock</a></td>
+        <td>Checks for empty blocks.</td>
+      </tr>
+      <tr>
+        <td><a href="config_whitespace.html#EmptyForInitializerPad">EmptyForInitializerPad</a></td>
+        <td>Checks the padding of an empty for initializer; that is whether a
+        space is required at an empty for initializer, or such spaces are
+        forbidden.</td>
+      </tr>
+      <tr>
+        <td><a href="config_whitespace.html#EmptyForIteratorPad">EmptyForIteratorPad</a></td>
+        <td>Checks the padding of an empty for iterator; that is whether a
+        space is required at an empty for iterator, or such spaces are
+        forbidden.</td>
+      </tr>
+      <tr>
+        <td><a href="config_whitespace.html#EmptyLineSeparator">EmptyLineSeparator</a></td>
+        <td>Checks for blank line separators.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#EmptyStatement">EmptyStatement</a></td>
+        <td>
+        Detects empty statements (standalone ';').</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#EqualsAvoidNull">EqualsAvoidNull</a></td>
+        <td>
+          Checks that any combination of String literals with optional
+        assignment is on the left side of an equals() comparison.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#EqualsHashCode">EqualsHashCode</a></td>
+        <td>
+        Checks that classes that override equals() also override hashCode().</td>
+      </tr>
+      <tr>
+        <td><a href="config_sizes.html#ExecutableStatementCount">ExecutableStatementCount</a></td>
+        <td>
+          Restricts the number of executable statements to a specified
+          limit (default = 30).
+        </td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#ExplicitInitialization">ExplicitInitialization</a></td>
+        <td>
+          Checks if any class or object member explicitly initialized
+          to default for its type value (<code>null</code> for object
+          references, zero for numeric types and <code>char</code>
+          and <code>false</code> for <code>boolean</code>.
+        </td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#FallThrough">FallThrough</a></td>
+        <td>Checks for fall through in switch statements
+        Finds locations where a case contains Java code -
+        but lacks a break, return, throw or continue statement.</td>
+      </tr>
+      <tr>
+        <td><a href="config_sizes.html#FileLength">FileLength</a></td>
+        <td>
+        Checks for long source files.</td>
+      </tr>
+      <tr>
+        <td><a href="config_whitespace.html#FileTabCharacter">FileTabCharacter</a></td>
+        <td>Checks to see if a file contains a tab character.</td>
+      </tr>
+      <tr>
+        <td><a href="config_design.html#FinalClass">FinalClass</a></td>
+        <td>
+          Checks that class which has only private ctors
+        is declared as final.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#FinalLocalVariable">FinalLocalVariable</a></td>
+        <td>
+          Ensures that local variables that never get their values changed,
+        must be declared final.</td>
+      </tr>
+      <tr>
+        <td><a href="config_misc.html#FinalParameters">FinalParameters</a></td>
+        <td>Check that method/constructor/catch/foreach parameters are final.</td>
+      </tr>
+      <tr>
+        <td><a href="config_whitespace.html#GenericWhitespace">GenericWhitespace</a></td>
+        <td>Checks that the whitespace around the Generic tokens < and > are
+        correct to the <i>typical</i> convention.</td>
+      </tr>
+      <tr>
+        <td><a href="config_header.html#Header">Header</a></td>
+        <td>Checks the header of the source against a fixed header file.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#HiddenField">HiddenField</a></td>
+        <td>Checks that a local variable or a parameter does not shadow
+        a field that is defined in the same class.</td>
+      </tr>
+      <tr>
+        <td><a href="config_design.html#HideUtilityClassConstructor">HideUtilityClassConstructor</a></td>
+        <td>Make sure that utility classes (classes that contain only static methods)
+        do not have a public constructor.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#IllegalCatch">IllegalCatch</a></td>
+        <td>Catching java.lang.Exception, java.lang.Error or java.lang.RuntimeException
+        is almost never acceptable.</td>
+      </tr>
+      <tr>
+        <td><a href="config_imports.html#IllegalImport">IllegalImport</a></td>
+        <td>
+        Checks for imports from a set of illegal packages.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#IllegalInstantiation">IllegalInstantiation</a></td>
+        <td>
+        Checks for illegal instantiations where a factory method is preferred.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#IllegalThrows">IllegalThrows</a></td>
+        <td>Throwing java.lang.Error or java.lang.RuntimeException
+        is almost never acceptable.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#IllegalToken">IllegalToken</a></td>
+        <td>
+        Checks for illegal tokens.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#IllegalTokenText">IllegalTokenText</a></td>
+        <td>
+        Checks for illegal token text.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#IllegalType">IllegalType</a></td>
+        <td>
+          Checks that particular class are never used as types in variable
+        declarations, return values or parameters.</td>
+      </tr>
+      <tr>
+        <td><a href="config_imports.html#ImportControl">ImportControl</a></td>
+        <td>Check that controls what packages can be imported in each package.</td>
+      </tr>
+      <tr>
+        <td><a href="config_imports.html#ImportOrder">ImportOrder</a></td>
+        <td>Ensures that groups of imports come in a specific order.</td>
+      </tr>
+      <tr>
+        <td><a href="config_misc.html#Indentation">Indentation</a></td>
+        <td>Checks correct indentation of Java Code.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#InnerAssignment">InnerAssignment</a></td>
+        <td>
+          Checks for assignments in subexpressions, such as in
+        <code>String s = Integer.toString(i = 2);</code>.</td>
+      </tr>
+      <tr>
+        <td><a href="config_design.html#InnerTypeLast">InnerTypeLast</a></td>
+        <td>
+          Check nested (internal) classes/interfaces are declared at the bottom of the
+        class after all method and field declarations.</td>
+      </tr>
+      <tr>
+        <td><a href="config_design.html#InterfaceIsType">InterfaceIsType</a></td>
+        <td>Implements Bloch, Effective Java, Item 17 -
+        Use Interfaces only to define types.</td>
+      </tr>
+      <tr>
+        <td><a href="config_naming.html#InterfaceTypeParameterName">InterfaceTypeParameterName</a></td>
+        <td>
+          Checks that interface type parameter names conform to a format specified
+        by the format property.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#JUnitTestCase">JUnitTestCase</a></td>
+        <td>Ensures that the setUp(), tearDown()methods are named correctly,
+        have no arguments, return void and are either public or protected.</td>
+      </tr>
+      <tr>
+        <td><a href="config_metrics.html#JavaNCSS">JavaNCSS</a></td>
+        <td>This check calculates the Non Commenting Source Statements (NCSS) metric for
+        Java source files and methods.</td>
+      </tr>
+      <tr>
+        <td><a href="config_javadoc.html#JavadocMethod">JavadocMethod</a></td>
+        <td>Checks the Javadoc of a method or constructor.</td>
+      </tr>
+      <tr>
+        <td><a href="config_javadoc.html#JavadocPackage">JavadocPackage</a></td>
+        <td>Checks that all packages have a package documentation.</td>
+      </tr>
+      <tr>
+        <td><a href="config_javadoc.html#JavadocStyle">JavadocStyle</a></td>
+        <td>Custom Checkstyle Check to validate Javadoc.</td>
+      </tr>
+      <tr>
+        <td><a href="config_javadoc.html#JavadocType">JavadocType</a></td>
+        <td>Checks the Javadoc of a type.</td>
+      </tr>
+      <tr>
+        <td><a href="config_javadoc.html#JavadocVariable">JavadocVariable</a></td>
+        <td>Checks that a variable has Javadoc comment.</td>
+      </tr>
+      <tr>
+        <td><a href="config_blocks.html#LeftCurly">LeftCurly</a></td>
+        <td>
+          Checks the placement of left curly braces on types, methods and
+          other blocks:
+        </td>
+      </tr>
+      <tr>
+        <td><a href="config_sizes.html#LineLength">LineLength</a></td>
+        <td>Checks for long lines.</td>
+      </tr>
+      <tr>
+        <td><a href="config_naming.html#LocalFinalVariableName">LocalFinalVariableName</a></td>
+        <td>
+          Checks that local final variable names conform to a format specified
+        by the format property.</td>
+      </tr>
+      <tr>
+        <td><a href="config_naming.html#LocalVariableName">LocalVariableName</a></td>
+        <td>
+          Checks that local, non-final variable names conform to a format specified
+        by the format property.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#MagicNumber">MagicNumber</a></td>
+        <td>
+        Checks for magic numbers.</td>
+      </tr>
+      <tr>
+        <td><a href="config_naming.html#MemberName">MemberName</a></td>
+        <td>
+          Checks that instance variable names conform to a format specified
+        by the format property.</td>
+      </tr>
+      <tr>
+        <td><a href="config_sizes.html#MethodCount">MethodCount</a></td>
+        <td>Checks the number of methods declared in each type.</td>
+      </tr>
+      <tr>
+        <td><a href="config_sizes.html#MethodLength">MethodLength</a></td>
+        <td>
+        Checks for long methods.</td>
+      </tr>
+      <tr>
+        <td><a href="config_naming.html#MethodName">MethodName</a></td>
+        <td>
+          Checks that method names conform to a format specified
+        by the format property.</td>
+      </tr>
+      <tr>
+        <td><a href="config_whitespace.html#MethodParamPad">MethodParamPad</a></td>
+        <td>
+          Checks the padding between the identifier of a method definition,
+          constructor definition, method call, or constructor invocation;
+        and the left parenthesis of the parameter list.</td>
+      </tr>
+      <tr>
+        <td><a href="config_naming.html#MethodTypeParameterName">MethodTypeParameterName</a></td>
+        <td>
+          Checks that class type parameter names conform to a format specified
+        by the format property.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#MissingCtor">MissingCtor</a></td>
+        <td>
+          Checks that classes (except abstract one) define a ctor and don't rely
+        on the default one.</td>
+      </tr>
+      <tr>
+        <td><a href="config_annotation.html#MissingDeprecated">MissingDeprecated</a></td>
+        <td>
+          This class is used to verify that both the
+        </td>
+      </tr>
+      <tr>
+        <td><a href="config_annotation.html#MissingOverride">MissingOverride</a></td>
+        <td>
+        This class is used to verify that the </td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#MissingSwitchDefault">MissingSwitchDefault</a></td>
+        <td>
+        Checks that switch statement has "default" clause.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#ModifiedControlVariable">ModifiedControlVariable</a></td>
+        <td>Check for ensuring that for loop control variables are not modified
+        inside the for block.</td>
+      </tr>
+      <tr>
+        <td><a href="config_modifier.html#ModifierOrder">ModifierOrder</a></td>
+        <td>
+          Checks that the order of modifiers conforms to the suggestions in the
+          <a
+              href="http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html">
+        Java Language specification, sections 8.1.1, 8.3.1 and 8.4.3</a>.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#MultipleStringLiterals">MultipleStringLiterals</a></td>
+        <td>Checks for multiple occurrences of the same string literal within a
+        single file.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#MultipleVariableDeclarations">MultipleVariableDeclarations</a></td>
+        <td>
+          Checks that each variable declaration is in its own statement
+        and on its own line.</td>
+      </tr>
+      <tr>
+        <td><a href="config_design.html#MutableException">MutableException</a></td>
+        <td> Ensures that exceptions (defined as any class name conforming
+        to some regular expression) are immutable.</td>
+      </tr>
+      <tr>
+        <td><a href="config_metrics.html#NPathComplexity">NPathComplexity</a></td>
+        <td>Checks the npath complexity against a specified limit (default = 200).</td>
+      </tr>
+      <tr>
+        <td><a href="config_blocks.html#NeedBraces">NeedBraces</a></td>
+        <td>
+        Checks for braces around code blocks.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#NestedForDepth">NestedForDepth</a></td>
+        <td>Restricts nested <code>for</code> blocks to a specified depth (default = 1).</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#NestedIfDepth">NestedIfDepth</a></td>
+        <td>Restricts nested if-else blocks to a specified depth (default = 1).</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#NestedTryDepth">NestedTryDepth</a></td>
+        <td>Restricts nested try-catch-finally blocks to a specified depth (default = 1).</td>
+      </tr>
+      <tr>
+        <td><a href="config_misc.html#NewlineAtEndOfFile">NewlineAtEndOfFile</a></td>
+        <td>
+        Checks that there is a newline at the end of each file.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#NoClone">NoClone</a></td>
+        <td>
+          Checks that the clone method is not overridden from the
+        Object class.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#NoFinalizer">NoFinalizer</a></td>
+        <td>Checks that no method having zero parameters is defined
+        using the name <em>finalize</em>.</td>
+      </tr>
+      <tr>
+        <td><a href="config_whitespace.html#NoLineWrap">NoLineWrap</a></td>
+        <td>
+        Checks that chosen statements are not line-wrapped.</td>
+      </tr>
+      <tr>
+        <td><a href="config_whitespace.html#NoWhitespaceAfter">NoWhitespaceAfter</a></td>
+        <td>
+        Checks that there is no whitespace after a token.</td>
+      </tr>
+      <tr>
+        <td><a href="config_whitespace.html#NoWhitespaceBefore">NoWhitespaceBefore</a></td>
+        <td>
+        Checks that there is no whitespace before a token.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#OneStatementPerLine">OneStatementPerLine</a></td>
+        <td>Checks there is only one statement per line.</td>
+      </tr>
+      <tr>
+        <td><a href="config_design.html#OneTopLevelClass">OneTopLevelClass</a></td>
+        <td>Checks that each top-level class, interfaces or enum resides in a source file of its own.</td>
+      </tr>
+      <tr>
+        <td><a href="config_whitespace.html#OperatorWrap">OperatorWrap</a></td>
+        <td>
+        Checks line wrapping for operators.</td>
+      </tr>
+      <tr>
+        <td><a href="config_misc.html#OuterTypeFilename">OuterTypeFilename</a></td>
+        <td>Checks that the outer type name and the file name match.</td>
+      </tr>
+      <tr>
+        <td><a href="config_sizes.html#OuterTypeNumber">OuterTypeNumber</a></td>
+        <td>Checks for the number of defined types at the "outer" level.</td>
+      </tr>
+      <tr>
+        <td><a href="config_annotation.html#PackageAnnotation">PackageAnnotation</a></td>
+        <td>This check makes sure that all package annotations are in the
+        package-info.java file.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#PackageDeclaration">PackageDeclaration</a></td>
+        <td>Ensures there is a package declaration and (optionally) in the correct directory.</td>
+      </tr>
+      <tr>
+        <td><a href="config_naming.html#PackageName">PackageName</a></td>
+        <td>
+          Checks that package names conform to a format specified
+        by the format property.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#ParameterAssignment">ParameterAssignment</a></td>
+        <td>
+        Disallow assignment of parameters.</td>
+      </tr>
+      <tr>
+        <td><a href="config_naming.html#ParameterName">ParameterName</a></td>
+        <td>
+          Checks that parameter names conform to a format specified
+        by the format property.</td>
+      </tr>
+      <tr>
+        <td><a href="config_sizes.html#ParameterNumber">ParameterNumber</a></td>
+        <td>
+        Checks the number of parameters that a method or constructor has.</td>
+      </tr>
+      <tr>
+        <td><a href="config_whitespace.html#ParenPad">ParenPad</a></td>
+        <td>Checks the padding of parentheses; that is whether a space is required
+        after a left parenthesis and before a right parenthesis, or such spaces are
+        forbidden, with the exception that it does
+        not check for padding of the right parenthesis  at an empty for iterator.</td>
+      </tr>
+      <tr>
+        <td><a href="config_imports.html#RedundantImport">RedundantImport</a></td>
+        <td>
+        Checks for imports that are redundant.</td>
+      </tr>
+      <tr>
+        <td><a href="config_modifier.html#RedundantModifier">RedundantModifier</a></td>
+        <td>Checks for redundant modifiers in interface and annotation definitions.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#RedundantThrows">RedundantThrows</a></td>
+        <td>Checks for redundant exceptions declared in throws clause
+        such as duplicates, unchecked exceptions or subclasses of
+        another declared exception.</td>
+      </tr>
+      <tr>
+        <td><a href="config_misc.html#Regexp">Regexp</a></td>
+        <td>
+        A check that makes sure that a specified pattern exists (or not) in the file.</td>
+      </tr>
+      <tr>
+        <td><a href="config_header.html#RegexpHeader">RegexpHeader</a></td>
+        <td>Checks the header of the source against a header file that contains a
+        </td>
+      </tr>
+      <tr>
+        <td><a href="config_regexp.html#RegexpMultiline">RegexpMultiline</a></td>
+        <td>Implementation of a check that looks that matches across multiple lines in
+        any file type.</td>
+      </tr>
+      <tr>
+        <td><a href="config_regexp.html#RegexpSingleline">RegexpSingleline</a></td>
+        <td>Implementation of a check that looks for a single line in any file type.</td>
+      </tr>
+      <tr>
+        <td><a href="config_regexp.html#RegexpSinglelineJava">RegexpSinglelineJava</a></td>
+        <td>Implementation of a check that looks for a single line in Java files.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#RequireThis">RequireThis</a></td>
+        <td>Checks that code doesn't rely on the "this" default.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#ReturnCount">ReturnCount</a></td>
+        <td>
+        Restricts return statements to a specified count (default = 2).</td>
+      </tr>
+      <tr>
+        <td><a href="config_blocks.html#RightCurly">RightCurly</a></td>
+        <td>
+        Checks the placement of right curly braces.</td>
+      </tr>
+      <tr>
+        <td><a href="config_whitespace.html#SeparatorWrap">SeparatorWrap</a></td>
+        <td>
+        Checks line wrapping with separators.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#SimplifyBooleanExpression">SimplifyBooleanExpression</a></td>
+        <td>
+        Checks for overly complicated boolean expressions.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#SimplifyBooleanReturn">SimplifyBooleanReturn</a></td>
+        <td>
+        Checks for overly complicated boolean return statements.</td>
+      </tr>
+      <tr>
+        <td><a href="config_naming.html#StaticVariableName">StaticVariableName</a></td>
+        <td>
+          Checks that static, non-final variable names conform to a format specified
+        by the format property.</td>
+      </tr>
+      <tr>
+        <td><a href="config_duplicates.html#StrictDuplicateCode">StrictDuplicateCode</a></td>
+        <td>Performs a line-by-line comparison of all code lines and reports
+        duplicate code if a sequence of lines differs only in
+        indentation.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#StringLiteralEquality">StringLiteralEquality</a></td>
+        <td>Checks that string literals are not used with
+        <code>==</code> or <code>!=</code>.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#SuperClone">SuperClone</a></td>
+        <td>
+        Checks that an overriding clone() method invokes super.clone().</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#SuperFinalize">SuperFinalize</a></td>
+        <td>
+        Checks that an overriding finalize() method invokes super.finalize().</td>
+      </tr>
+      <tr>
+        <td><a href="config_annotation.html#SuppressWarnings">SuppressWarnings</a></td>
+        <td>
+          This check allows you to specify what warnings that
+        </td>
+      </tr>
+      <tr>
+        <td><a href="config_annotation.html#SuppressWarningsHolder">SuppressWarningsHolder</a></td>
+        <td>
+          This check allows for finding code that should not be reported by Checkstyle
+        </td>
+      </tr>
+      <tr>
+        <td><a href="config_design.html#ThrowsCount">ThrowsCount</a></td>
+        <td>
+        Restricts throws statements to a specified count (default = 1).</td>
+      </tr>
+      <tr>
+        <td><a href="config_misc.html#TodoComment">TodoComment</a></td>
+        <td>
+        A check for TODO comments.</td>
+      </tr>
+      <tr>
+        <td><a href="config_misc.html#TrailingComment">TrailingComment</a></td>
+        <td>
+        The check to ensure that requires that comments be the only thing on a line.</td>
+      </tr>
+      <tr>
+        <td><a href="config_misc.html#Translation">Translation</a></td>
+        <td>
+          The TranslationCheck class helps to ensure the correct translation of code by
+        checking property files for consistency regarding their keys.</td>
+      </tr>
+      <tr>
+        <td><a href="config_naming.html#TypeName">TypeName</a></td>
+        <td>
+          Checks that type names conform to a format specified
+        by the format property.</td>
+      </tr>
+      <tr>
+        <td><a href="config_whitespace.html#TypecastParenPad">TypecastParenPad</a></td>
+        <td>Checks the padding of parentheses for typecasts.</td>
+      </tr>
+      <tr>
+        <td><a href="config_misc.html#UncommentedMain">UncommentedMain</a></td>
+        <td>Detects uncommented main methods.</td>
+      </tr>
+      <tr>
+        <td><a href="config_misc.html#UniqueProperties">UniqueProperties</a></td>
+        <td>Detects duplicated keys in properties files.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#UnnecessaryParentheses">UnnecessaryParentheses</a></td>
+        <td>
+        Checks if unnecessary parentheses are used in a statement or expression.</td>
+      </tr>
+      <tr>
+        <td><a href="config_imports.html#UnusedImports">UnusedImports</a></td>
+        <td>
+        Checks for unused import statements.</td>
+      </tr>
+      <tr>
+        <td><a href="config_misc.html#UpperEll">UpperEll</a></td>
+        <td>Checks that long constants are defined with an upper ell.</td>
+      </tr>
+      <tr>
+        <td><a href="config_coding.html#VariableDeclarationUsageDistance">VariableDeclarationUsageDistance</a></td>
+        <td>Checks the distance between declaration of variable and its first usage.</td>
+      </tr>
+      <tr>
+        <td><a href="config_design.html#VisibilityModifier">VisibilityModifier</a></td>
+        <td>Checks visibility of class members.</td>
+      </tr>
+      <tr>
+        <td><a href="config_whitespace.html#WhitespaceAfter">WhitespaceAfter</a></td>
+        <td>
+          Checks that a token is followed by whitespace, with the exception that it
+        does not check for whitespace after the semicolon of an empty for iterator.</td>
+      </tr>
+      <tr>
+        <td><a href="config_whitespace.html#WhitespaceAround">WhitespaceAround</a></td>
+        <td>
+        Checks that a token is surrounded by whitespace.</td>
+      </tr>
+      <tr>
+        <td><a href="config_javadoc.html#WriteTag">WriteTag</a></td>
+        <td>
+        Outputs a JavaDoc tag as information.</td>
+      </tr>
+    </table>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/checks.xml b/src/xdocs/checks.xml
new file mode 100644
index 0000000..922d016
--- /dev/null
+++ b/src/xdocs/checks.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Standard Checks</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+    <section name="Standard Checks">
+    <p>
+      The Standard Checkstyle Checks are applicable to general Java coding style
+      and require no external libraries. The standard checks are included in
+      the base distribution.
+    </p>
+
+    <p>
+      The site navigation menu lets you browse the individual checks by functionality.
+    </p>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/cmdline.xml.vm b/src/xdocs/cmdline.xml.vm
new file mode 100644
index 0000000..a823abb
--- /dev/null
+++ b/src/xdocs/cmdline.xml.vm
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Command Line</title>
+    <author>Oliver Burn</author>
+  </properties>
+
+  <body>
+
+    <section name="Description">
+      <p>
+        This document describes how to run Checkstyle using the command line
+        tool. The latest version of Checkstyle can be found at <a
+        href="http://checkstyle.sourceforge.net">http://checkstyle.sourceforge.net</a>.
+        This command line tool is included in the Checkstyle distribution.
+      </p>
+    </section>
+
+    <section name="Command line usage">
+      <p>
+
+      <source>
+java -D<property>=<value>  \
+     com.puppycrawl.tools.checkstyle.Main \
+     -c <configurationFile> \
+     [-f <format>] [-p <propertiesFile>] [-o <file>] \
+     [-r <dir>] file...
+      </source>
+      </p>
+
+      <p>
+        Checkstyle will process the specified files and by default report
+        errors to standard out in plain format. Checkstyle requires a <a
+        href="config.html">configuration XML file</a> that configures the
+        checks to apply. Command line options are:
+      </p>
+
+      <ul>
+        <li>
+          <code>-c configurationFile</code> - specifies the location of the
+          file that defines the configuration modules. The location can either
+          be a filesystem location, or a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/lang/resources.html#res_names">name</a> passed to the
+          ClassLoader.getResource() method.
+        </li>
+        <li>
+          <code>-f format</code> - specify the output
+          format. Options are <code> "plain"</code> for the <a
+          href="apidocs/com/puppycrawl/tools/checkstyle/DefaultLogger.html">DefaultLogger</a>
+          and <code>"xml"</code> for the <a
+          href="apidocs/com/puppycrawl/tools/checkstyle/XMLLogger.html">XMLLogger</a>.
+          Defaults to <code>"plain"</code>.
+        </li>
+        <li>
+          <code>-p propertiesFile</code> - specify a
+          properties file to use.
+        </li>
+        <li>
+          <code>-o file</code> - specify the file to output
+          to.
+        </li>
+        <li>
+          <code>-r dir</code> - specify the directory to
+          traverse for Java source files.
+        </li>
+      </ul>
+
+      <p>
+        Note that the <code>-n packageNamesFile</code>
+        option has been dropped for Checkstyle 5.0, because of
+        significant changes regarding package name file handling. See <a
+        href="config.html#Packages"/> for details.
+      </p>
+
+      <p>
+        Set the properties for <a href="config.html#Properties">expanded
+        property values</a> by either by assigning system properties using the
+        <code>-D<property>=<value></code> arguments to java or
+        specifying a property file using the <code>-p</code> option.  If a
+        property file is specified, the system properties are ignored.
+      </p>
+    </section>
+
+    <section name="Download and Run">
+      <p>
+          It is possible to run Checkstyle directly from the JAR file using
+          the <code>-jar</code> option. Download latest <a href="http://sourceforge.net/projects/checkstyle/files/checkstyle/${projectVersion}/checkstyle-${projectVersion}-all.jar/download">
+          checkstyle-${projectVersion}-all.jar</a>.
+          An example of run would be:
+        <source>
+java -jar checkstyle-${projectVersion}-all.jar -c docs/sun_checks.xml Check.java
+        </source>
+        Official configuration files:
+        <a href="https://raw.githubusercontent.com/checkstyle/checkstyle/master/sun_checks.xml">sun_checks.xml</a>
+        <a href="https://raw.githubusercontent.com/checkstyle/checkstyle/master/google_checks.xml">google_checks.xml</a>
+      </p>
+    </section>
+
+    <section name="Run after compilation">
+      <p>
+        Download and compile:
+        <source>
+git clone https://github.com/checkstyle/checkstyle.git
+cd checkstyle
+mvn clean compile
+        </source>
+
+        Run validation with arguments:
+        <source>
+mvn exec:java -Dexec.mainClass="com.puppycrawl.tools.checkstyle.Main" \
+              -Dexec.args="-c sun_checks.xml -r src/main/java "
+        </source>
+        Run UI application for file :
+        <source>
+ mvn exec:java -Dexec.mainClass="com.puppycrawl.tools.checkstyle.gui.Main" \
+               -Dexec.args="src/main/java/com/puppycrawl/tools/checkstyle/Checker.java"
+        </source>
+      </p>
+    </section>
+
+    <section name="Usage by Classpath update">
+      <p>
+        The easiest way is to include
+        <a href="http://sourceforge.net/projects/checkstyle/files/checkstyle/${projectVersion}/checkstyle-${projectVersion}-all.jar/download">checkstyle-${projectVersion}-all.jar</a> in the
+        <a href="http://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html#sthref10">classpath</a>. Alternatively, you must include the
+        <code>compile</code> third party dependencies listed in
+
+        <a href="dependencies.html">Project Dependencies</a> in the
+        classpath.
+
+        <br/>
+        <br/>
+        <b>
+          Run checkstyle with configuration file
+          <code>docs/sun_checks.xml</code> on a file
+        </b>
+      </p>
+      <source>
+java com.puppycrawl.tools.checkstyle.Main -c docs/sun_checks.xml \
+     Check.java
+      </source>
+
+      <p>
+        <b>
+          Run checkstyle with configuration file
+          <code>docs/sun_checks.xml</code> on all Java files in a directory
+        </b>
+      </p>
+      <source>
+java com.puppycrawl.tools.checkstyle.Main -c docs/sun_checks.xml \
+     -r src/
+      </source>
+
+      <p>
+        <b>
+          Run checkstyle with configuration file
+          <code>docs/sun_checks.xml</code> on a file and provide a system
+          property
+        </b>
+      </p>
+      <source>
+java -Dcheckstyle.cache.file=target/cachefile \
+     com.puppycrawl.tools.checkstyle.Main -c docs/sun_checks.xml \
+     Check.java
+      </source>
+
+      <p>
+        <b>
+          Run checkstyle with configuration file
+          <code>docs/sun_checks.xml</code> on a file and use properties in a
+          file
+        </b>
+      </p>
+      <source>
+java com.puppycrawl.tools.checkstyle.Main -c docs/sun_checks.xml \
+     -p myCheckstyle.properties Check.java
+      </source>
+
+      <p>
+        <b>
+          Run checkstyle with configuration file
+          <code>docs/sun_checks.xml</code> on a file and output to a file in
+          XML format
+        </b>
+      </p>
+      <source>
+java com.puppycrawl.tools.checkstyle.Main -c docs/sun_checks.xml \
+     -f xml -o build/checkstyle_errors.xml Check.java
+      </source>
+
+    </section>
+  </body>
+</document>
+
diff --git a/src/xdocs/config.xml b/src/xdocs/config.xml
new file mode 100644
index 0000000..e7b2f69
--- /dev/null
+++ b/src/xdocs/config.xml
@@ -0,0 +1,1355 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Configuration</title>
+    <author>Lars K�hne</author>
+  </properties>
+
+  <body>
+
+    <section name="Overview">
+      <p>
+        A Checkstyle configuration specifies which <em>modules</em> to
+        plug in and apply to Java source files. Modules are structured
+        in a tree whose root is the <em>Checker</em> module. The next
+        level of modules contains:
+      </p>
+
+      <ul>
+
+        <li><em>FileSetChecks</em> - modules that take a set of input
+        files and fire error messages.</li>
+
+        <li><em>Filters</em>
+
+        - modules that filter audit events,
+        including error messages, for acceptance.</li>
+
+        <li><em>AuditListeners</em> - modules that report accepted events.</li>
+
+      </ul>
+
+      <p>
+        Many checks are submodules of the <em>TreeWalker</em>
+        FileSetCheck module. The TreeWalker operates by separately
+        transforming each of the Java source files into an abstract
+        syntax tree and then handing the result over to each of its
+        submodules which in turn have a look at certain aspects of the
+        tree.
+      </p>
+
+      <p>
+        Checkstyle obtains a configuration from an XML document whose
+        elements specify the configuration's hierarchy of modules and
+        their properties. You provide a file that contains the
+        configuration document when you invoke Checkstyle at the <a
+        href="cmdline.html">command line</a>, and when you run a <a
+        href="anttask.html">Checkstyle task</a> in ant. The
+        documentation directory of the Checkstyle distribution contains
+        a sample configuration file <em>sun_checks.xml</em> which
+        configures Checkstyle to check for the Sun coding conventions.
+      </p>
+    </section>
+
+    <section name="Modules">
+      <p>
+        A <code>module</code> element in the configuration
+        XML document specifies a module identified by the element's
+        <code>name</code> attribute.
+      </p>
+
+      <p>
+        Here is a fragment of a typical configuration document:
+      </p>
+
+      <source>
+<module name="Checker">
+    <module name="JavadocPackage"/>
+    <module name="TreeWalker">
+        <module name="AvoidStarImport"/>
+        <module name="ConstantName"/>
+        <module name="EmptyBlock"/>
+    </module>
+</module>
+      </source>
+
+      <p>
+        In this configuration:
+      </p>
+
+      <ul>
+        <li>
+          Root module <code>Checker</code> has child
+          FileSetChecks <code>JavadocPackage</code> and <code>TreeWalker</code>. (Module <a
+          href="config_javadoc.html"> <code>JavadocPackage</code></a> checks that all packages
+          have package documentation.)
+        </li>
+        <li>
+          Module <code>TreeWalker</code> has submodules
+          <code>AvoidStarImport</code>, <code>ConstantName</code>, and <code>EmptyBlock</code>.  (Modules <a
+          href="config_imports.html"><code>AvoidStarImport</code></a>, <a
+          href="config_naming.html"><code>ConstantName</code></a>, and <a
+          href="config_blocks.html"><code>EmptyBlock</code></a> check that a Java source
+          file has no star imports, has valid constant names, and has no
+          empty blocks, respectively.)
+        </li>
+      </ul>
+
+      <p>
+        For each configuration module, Checkstyle loads a class
+        identified by the <code>name</code> attribute of
+        the <code>module</code>.  There are several rules
+        for loading a module's class:
+      </p>
+
+      <ol>
+        <li>
+          Load a class directly according to a package-qualified <code>name</code>, such as loading class <code>com.puppycrawl.tools.checkstyle.TreeWalker</code>
+          for element:
+
+          <source>
+<module name="com.puppycrawl.tools.checkstyle.TreeWalker">
+          </source>
+
+          This is useful for plugging third-party modules into a configuration.
+        </li>
+
+        <li>
+          Load a class of a pre-specified package, such as loading class
+          <code>com.puppycrawl.tools.checkstyle.checks.AvoidStarImport</code>
+          for element
+          <source>
+<module name="AvoidStarImport"/>
+          </source>
+
+          Checkstyle applies packages <code>
+          com.puppycrawl.tools.checkstyle</code>, <code>
+          com.puppycrawl.tools.checkstyle.filters</code>, and <code> com.puppycrawl.tools.checkstyle.checks</code>
+          and its sub-packages (only those included in the Checkstyle
+          distribution). You can specify other packages in a <a
+          href="#Packages"><em>package names XML document</em></a>
+          when you invoke Checkstyle at the <a
+          href="cmdline.html">command line</a>, and when you run a <a
+          href="anttask.html">Checkstyle task</a> in ant.
+        </li>
+
+        <li>
+          Apply the above rules to <code>name</code>
+          concatenated with <code>"Check"</code>,
+          such as loading class <code>com.puppycrawl.tools.checkstyle.checks.ConstantNameCheck</code>
+          for element
+          <source>
+<module name="ConstantName"/>
+          </source>
+        </li>
+      </ol>
+    </section>
+
+    <section name="Properties">
+      <p>
+        Properties of a module control how the module performs its task.
+        Each module property has a default value, and you are not
+        required to define a property in the configuration document if
+        the default value is satisfactory.  To assign a non-default
+        value to a module's property, define a child <code>property</code> element of the <code>module</code> element in the configuration XML
+        document. Also provide appropriate <code>name</code> and <code>value</code>
+        attributes for the <code>property</code> element.
+        For example, property <code>max</code> of module
+        <code>MethodLength</code> specifies the maximum
+        allowable number of lines in a method or constructor, and has
+        default value <code>150</code>.  Here is a
+        configuration of module <code>MethodLength</code>
+        so that the check reports methods and constructors with more
+        than <code>60</code> lines:
+      </p>
+
+      <source>
+<module name="MethodLength">
+    <property name="max" value="60"/>
+</module>
+      </source>
+
+      <p>
+        <a href="cmdline.html">Command line</a> properties and ant <a
+        href="anttask.html">Checkstyle task</a> properties apply to the
+        root <code>Checker</code> module. Also, properties
+        are inherited in the module hierarchy. These features make it
+        easy to define one property value that applies to many
+        modules. For example, the following configuration fragment
+        specifies that a <code>tabWidth</code> of <code>4</code> applies to <code>TreeWalker</code> and its submodules:
+      </p>
+
+      <source>
+<module name="Checker">
+    <module name="JavadocPackage"/>
+    <module name="TreeWalker">
+        <property name="tabWidth" value="4"/>
+        <module name="AvoidStarImport"/>
+        <module name="ConstantName"/>
+        ...
+    </module>
+</module>
+      </source>
+
+      <p>
+        The value of a module property can be specified through
+        <em>property expansion</em> with the <code>${<em>property_name</em>}</code> notation, where
+        <code><em>property_name</em></code> is a <a
+        href="cmdline.html">command line</a> property or an ant <a
+        href="anttask.html">Checkstyle task</a> property.  For example,
+        the following configuration document element gives property
+        <code>headerFile</code> the value of command line
+        property <code>checkstyle.header.file</code>:
+     </p>
+
+      <source>
+<property name="headerFile" value="${checkstyle.header.file}"/>
+      </source>
+
+      <p>
+        You can use property expansion to re-specify a module property
+        value without changing the configuration document.
+      </p>
+
+      <p>
+        The property element provides an optional <code>default</code> attribute which is used when a
+        property in the value cannot be resolved. For example this
+        configuration snippet from a central configuration file checks
+        that methods have javadoc, but allows individual projects to
+        override the severity by specifying their desired value in the
+        command line property <code>checkstyle.javadoc.severity</code>:
+      </p>
+
+      <source>
+<module name="JavaDocMethod">
+  <property name="severity"
+               value="${checkstyle.javadoc.severity}"
+               default="error"/>
+</module>
+      </source>
+
+      <p>
+        This feature is a great help when setting up a centralized
+        configuration file (e.g. one file for the whole company) to
+        lower configuration maintenance costs.  Projects that are happy
+        with the default can simply use that configuration file as is,
+        but individual projects with special needs have the flexibility
+        to adjust a few settings to fit their needs without having to
+        copy and maintain the whole configuration.
+      </p>
+
+    </section>
+
+    <section name="Checker">
+
+      <p>
+        All configurations have root module <code>Checker</code>.  <code>Checker</code>
+        contains:
+      </p>
+
+      <ul>
+        <li><em>FileSetCheck</em> children: modules that check sets of
+        files.</li>
+        <li><em>Filter</em> children: modules that filter audit
+        events.</li>
+        <li><em>AuditListener</em> children: modules that report
+        filtered events.</li>
+      </ul>
+
+      <p>
+        <code>Checker</code> also defines properties that are
+        inherited by all other modules of a configuration.
+      </p>
+
+      <h4>Properties</h4>
+      <table>
+        <tr>
+          <th>name</th>
+          <th>description</th>
+          <th>type</th>
+          <th>default value</th>
+        </tr>
+        <tr>
+          <td>basedir</td>
+          <td>base directory name; stripped off in messages about files</td>
+          <td><a href="property_types.html#string">string</a></td>
+          <td><code>null</code></td>
+        </tr>
+        <tr>
+          <td>localeCountry</td>
+          <td>locale country for messages</td>
+          <td><a href="property_types.html#string">string</a>: either
+          the empty string or an uppercase ISO 3166 2-letter code</td>
+          <td>default locale country for the Java Virtual Machine</td>
+        </tr>
+        <tr>
+          <td>localeLanguage</td>
+          <td>locale language for messages</td>
+          <td><a href="property_types.html#string">string</a>: either
+          the empty string or a lowercase ISO 639 code</td>
+          <td>default locale language for the Java Virtual Machine</td>
+        </tr>
+        <tr>
+          <td>charset</td>
+          <td>name of the file charset</td>
+          <td><a href="property_types.html#string">String</a></td>
+          <td>System property "file.encoding"</td>
+        </tr>
+      </table>
+
+      <p>
+        For example, the following configuration fragment specifies base
+        directory <code>src/checkstyle</code> and German
+        locale for all modules:
+      </p>
+
+      <source>
+<module name="Checker">
+    <property name="basedir" value="src/checkstyle"/>
+    <property name="localeCountry" value="DE"/>
+    <property name="localeLanguage" value="de"/>
+    <module name="JavadocPackage"/>
+    <module name="TreeWalker">
+        ...
+    </module>
+</module>
+      </source>
+
+      <p>
+        To configure a <code>Checker</code> so that it
+        handles files with the <code>UTF-8</code> charset:
+      </p>
+
+      <source>
+<module name="Checker">
+    <property name="charset" value="UTF-8"/>
+    ...
+</module>
+      </source>
+
+    </section>
+
+    <section name="TreeWalker">
+      <p>
+        FileSetCheck <code>TreeWalker</code> checks
+        individual Java source files and defines properties that are
+        applicable to checking such files.
+      </p>
+
+      <h4>Properties</h4>
+      <table>
+        <tr>
+          <th>name</th>
+          <th>description</th>
+          <th>type</th>
+          <th>default value</th>
+        </tr>
+        <tr>
+          <td>cacheFile</td>
+          <td>caches information about files that have checked OK; used
+          to avoid repeated checks of the same files</td>
+          <td><a href="property_types.html#string">string</a></td>
+          <td><code>null</code> (no cache file)</td>
+        </tr>
+        <tr>
+          <td>tabWidth</td>
+          <td>number of expanded spaces for a tab character (<code>'\t'</code>); used in messages and Checks that
+          require a tab width, such as <a
+          href="config_sizes.html#LineLength"><code>LineLength</code></a></td>
+          <td><a href="property_types.html#integer">integer</a></td>
+          <td><code>8</code></td>
+        </tr>
+        <tr>
+          <td>fileExtensions</td>
+          <td>file type extension to identify Java files. Setting this
+          property is typically only required if your Java source code
+          is preprocessed before compilation and the original files do
+          not have the extension <code>.java</code></td>
+          <td><a href="property_types.html#stringSet">String Set</a></td>
+          <td><code>java</code></td>
+        </tr>
+      </table>
+
+      <p>
+        For example, the following configuration fragment specifies
+        <code>TreeWalker</code> cache file <code>target/cachefile</code>, and a <code>tabWidth</code> of <code>4</code>:
+      </p>
+
+      <source>
+<module name="Checker">
+    <module name="TreeWalker">
+        <property name="cacheFile" value="target/cachefile"/>
+        <property name="tabWidth" value="4"/>
+        ...
+    </module>
+</module>
+      </source>
+
+      <p>
+        <!--
+          thanks to Paul King for this example, see
+          https://sourceforge.net/tracker/?func=detail&aid=865610&group_id=29721&atid=397078
+        -->
+        To integrate Checkstyle with BEA Weblogic Workshop 8.1:
+      </p>
+
+      <source>
+<module name="Checker">
+    <module name="TreeWalker">
+        <property name="fileExtensions" value="java,ejb,jpf"/>
+        ...
+      </source>
+    </section>
+
+    <section name="TreeWalker Checks">
+
+      <p>
+        The <code>TreeWalker</code> module creates a syntax
+        tree for a Java source file and invokes its submodules, called
+        <em>Checks</em>, during a walk, or traversal, of the nodes of
+        the tree.  Every node of the syntax tree has a token. A visit to
+        a node during the traversal triggers all Checks that are
+        configured for its token.  For example, if Check <code>MethodLength</code> has been configured as a
+        submodule of <code>TreeWalker</code>, then a visit
+        to a node with a method or a constructor definition token
+        triggers <code>MethodLength</code> to check the
+        number of lines of the node's code block.
+      </p>
+
+      <p>
+        Some Checks, such as <code>FileLength</code> and
+        <code>LineLength</code>, apply directly to the
+        source file and do not involve tokens of the syntax tree.  Other
+        Checks are associated with configurable sets of tokens that
+        trigger the Checks.  For example, this element configures Check
+        <code>MethodLength</code>:
+      </p>
+
+      <source>
+<module name="MethodLength"/>
+      </source>
+
+      <p>
+        The default token set for <code>MethodLength</code>
+        is <code>{METHOD_DEF, CTOR_DEF}</code>, method
+        definition and constructor definition tokens, so <code>TreeWalker</code> invokes <code>MethodLength</code> whenever it visits a node with
+        a <code>METHOD_DEF</code> or a <code>CTOR_DEF</code> token.
+      </p>
+
+      <p>
+        You specify the trigger tokens for a Check with property <code>tokens</code>.  The value of <code>tokens</code> is a list that denotes a subset of
+        the Check's tokens, as in the following element that configures
+        Check <code>MethodLength</code> to check the number
+        of lines of methods only:
+      </p>
+
+      <source>
+<module name="MethodLength">
+    <property name="tokens" value="METHOD_DEF"/>
+</module>
+      </source>
+
+      <p>
+        To apply particular properties to different subsets of tokens
+        for a Check, repeat the Check.  For example, to check that the
+        length of each method is at most 150 lines (the default value of
+        <code>MethodLength</code> property <code>max</code>) and the length of each constructor is
+        at most 60 lines, include the following in the <code>TreeWalker</code> configuration:
+      </p>
+
+      <source>
+<module name="MethodLength">
+    <property name="tokens" value="METHOD_DEF"/>
+</module>
+        <module name="MethodLength">
+    <property name="tokens" value="CTOR_DEF"/>
+    <property name="max" value="60"/>
+</module>
+      </source>
+
+      <p>
+        Configurations of the Checks are specified in the pages under <a
+        href="checks.html">here</a>.
+      </p>
+
+    </section>
+
+    <section name="Severity">
+      <p>
+        Each check has a <a
+        href="property_types.html#severity">severity</a> property that a
+        Checkstyle audit assigns to all violations of the check. The
+        default severity level of a check is <code>error</code>.
+      </p>
+
+      <p>
+        You can use the severity property to control the output of the
+        plain formatter for the <a href="cmdline.html">command line
+        tool</a> and the <a href="anttask.html">ANT task</a>. The plain
+        formatter does not report violations with severity level <code>ignore</code>, and notes violations with
+        severity level <code>warning</code>. For
+        example, according to the following configuration fragment, the
+        plain formatter outputs warnings for translation violations:
+      </p>
+
+      <source>
+<module name="Translation">
+    <property name="severity" value="warning"/>
+</module>
+      </source>
+
+      <p>
+        The XML formatter reports the severity level of every violation
+        as an attribute of the violation's <code>error</code> element.
+      </p>
+    </section>
+
+    <section name="Custom messages">
+      <p>
+        As of Checkstyle 5 all checks can be configured to report
+        custom, configuration specific messages instead of the
+        Checkstyle default messages.  This can be useful in cases where
+        the check message should reference corresponding sections in a
+        coding style document or the default is too generic for
+        developers to understand.
+      </p>
+
+      <p>An example usage is:</p>
+
+      <source>
+<module name="MemberName">
+    <property name="format" value="^m[a-zA-Z0-9]*$"/>
+    <message key="name.invalidPattern"
+             value="Member ''{0}'' must start with a lowercase ''m'' (checked pattern ''{1}'')."
+             />
+</module>
+      </source>
+
+      <p>
+        Each check configuration element can zero or more <code>message</code> elements. Every check uses one or
+        more distinct message keys to log violations. If you want to
+        customize a certain message you need to specify the message key
+        in the <code>key</code> attribute of the <code>message</code> element.
+      </p>
+
+      <p>
+        The <code>value</code> attribute specifies the
+        custom message pattern, as shown in the example above.
+        Placeholders used in the default message can also be used in the
+        custom message.  Note that the message pattern must be a valid
+        <code>java.text.MessageFormat</code> style pattern,
+        so be careful about curly braces outside a placeholder
+        definition.
+      </p>
+
+      <p>
+        The obvious question is how do you know which message keys a
+        Check uses, so that you can override them? Well, that is the
+        tricky part. To find out which keys a Check uses you currently
+        need to look into the Check's source code, in conjunction with
+        the Check's <code>messages.properties</code> file.
+        Tools/plugins might come to the rescue on this topic, so have a
+        look there.
+      </p>
+    </section>
+
+    <section name="Filters">
+
+      <p>
+        A Checker module has a set of Filter submodules to filter audit
+        events, including the error messages fired by Checks.  A Filter
+        can accept or reject an audit event. If all Filters accept an
+        audit event, then the Checker reports the event.  If any Filter
+        rejects an event, then the Checker does not report the
+        event.
+      </p>
+
+      <subsection name="SeverityMatchFilter">
+        <p>
+          Filter <code>SeverityMatchFilter</code> decides
+          audit events according to the <a href="#Severity">severity
+          level</a> of the event.
+        </p>
+
+        <h5>SeverityMatchFilter Properties</h5>
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>severity</td>
+            <td>the severity level of this filter</td>
+            <td><a href="property_types.html#severity">severity</a></td>
+            <td><code>error</code></td>
+          </tr>
+          <tr>
+            <td>acceptOnMatch</td>
+            <td>
+              If acceptOnMatch is <code>true</code>, then
+              the filter accepts an audit event if and only if there is
+              a match between the event's severity level and property
+              severity. If acceptOnMatch
+              is <code>false</code>, then the filter
+              accepts an audit event if and only if there is not a match
+              between the event's severity level and property severity.
+            </td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+        </table>
+
+        <p>
+          For example, the following configuration fragment directs the
+          Checker to not report audit events with severity
+          level <code>info</code>:
+        </p>
+
+        <source>
+<module name="SeverityMatchFilter">
+    <property name="severity" value="info"/>
+    <property name="acceptOnMatch" value="false"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="SuppressionFilter">
+        <p>
+          Filter <code>SuppressionFilter</code> rejects
+          audit events for Check errors according to
+          a <a href="#XML_Details"><em>suppressions XML
+          document</em></a> in a file. If there is no configured
+          suppressions file, the Filter accepts all audit events.
+        </p>
+
+        <h5>SuppressionFilter Properties</h5>
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>file</td>
+            <td>
+              the location of the <em>suppressions XML document</em> file.
+              The order the location is checked is:
+              <ol>
+                <li>as a filesystem location</li>
+                <li>
+                  if no file found, and the location starts with either
+                  <code>http://</code> or <code>https://</code>, then it
+                  is interpreted as a URL
+                </li>
+                <li>
+                  if no file found, then passed to the
+                  <code>ClassLoader.getResource()</code> method.
+                </li>
+              </ol>
+            </td>
+            <td><a href="property_types.html#string">string</a></td>
+            <td><code>none</code></td>
+          </tr>
+        </table>
+
+        <p>
+          For example, the following configuration fragment directs the
+          Checker to use a <code>SuppressionFilter</code>
+          with suppressions
+          file <code>docs/suppressions.xml</code>:
+        </p>
+
+        <source>
+<module name="SuppressionFilter">
+    <property name="file" value="docs/suppressions.xml"/>
+</module>
+        </source>
+
+        <p>
+          A <a href="#XML_Details"><em>suppressions XML
+          document</em></a> contains a set
+          of <code>suppress</code> elements, where
+          each <code>suppress</code> element can have the
+          following attributes:
+        </p>
+
+        <ul>
+          <li>
+            <code>files</code> -
+            a <a href="property_types.html#regexp">regular expression</a>
+            matched against the file name associated with an audit
+            event. It is mandatory.
+          </li>
+          <li>
+            <code>checks</code> -
+            a <a href="property_types.html#regexp">regular expression</a>
+            matched against the name of the check associated with an audit
+            event. Optional if <code>id</code> is specified.
+          </li>
+          <li>
+            <code>id</code> -
+            a <a href="property_types.html#string">string</a>
+            matched against the ID of the check associated with an audit
+            event. Optional if <code>checks</code> is specified.
+          </li>
+          <li>
+            <code>lines</code> - a comma-separated list of
+            values, where each value is
+            an <a href="property_types.html#integer">integer</a> or a
+            range of integers denoted by integer-integer. It is optional.
+          </li>
+          <li>
+            <code>columns</code> - a comma-separated list of
+            values, where each value is
+            an <a href="property_types.html#integer">integer</a> or a
+            range of integers denoted by integer-integer. It is optional.
+          </li>
+        </ul>
+
+        <p>
+          Each audit event is checked against
+          each <code>suppress</code> element. It is
+          suppressed if all specified attributes match against the audit
+          event.
+        </p>
+
+        <h5>Examples</h5>
+
+        <p> You can download template of empty suppression filter <a href="files/suppressions_none.xml">here</a>.</p>
+
+        <p>
+          The following suppressions XML document directs
+          a <code>SuppressionFilter</code> to
+          reject <code>JavadocStyleCheck</code> errors for
+          lines 82 and 108 to 122 of
+          file <code>AbstractComplexityCheck.java</code>,
+          and <code>MagicNumberCheck</code> errors for line
+          221 of file <code>JavadocStyleCheck.java</code>:
+        </p>
+
+        <source>
+<?xml version="1.0"?>
+
+<!DOCTYPE suppressions PUBLIC
+    "-//Puppy Crawl//DTD Suppressions 1.1//EN"
+    "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
+
+<suppressions>
+    <suppress checks="JavadocStyleCheck"
+              files="AbstractComplexityCheck.java"
+              lines="82,108-122"/>
+    <suppress checks="MagicNumberCheck"
+              files="JavadocStyleCheck.java"
+              lines="221"/>
+</suppressions>
+        </source>
+
+        <p>
+          As another example, imagine that a configuration contains the
+          following:
+        </p>
+
+        <source>
+<module name="DescendantToken">
+    <property name="id" value="stringEqual"/>
+    <property name="tokens" value="EQUAL,NOT_EQUAL"/>
+    <property name="limitedTokens" value="STRING_LITERAL"/>
+    <property name="maximumNumber" value="0"/>
+    <property name="maximumDepth" value="1"/>
+</module>
+
+<module name="DescendantToken">
+    <property name="id" value="switchNoDefault"/>
+    <property name="tokens" value="LITERAL_SWITCH"/>
+    <property name="maximumDepth" value="2"/>
+    <property name="limitedTokens" value="LITERAL_DEFAULT"/>
+    <property name="minimumNumber" value="1"/>
+</module>
+        </source>
+
+        <p>
+          Then the following can be used to suppress only the first
+          check and not the second by using
+          the <code>id</code> attribute:
+        </p>
+
+        <source>
+<suppress id="stringEqual" files="SomeTestCode.java"/>
+        </source>
+
+      </subsection>
+
+      <subsection name="SuppressionCommentFilter">
+      <h4>SuppressionCommentFilter</h4>
+
+      <p>
+        Filter <code>SuppressionCommentFilter</code> uses
+        pairs of comments to suppress audit events.
+      </p>
+
+      <p>
+        Rationale: Sometimes there are legitimate reasons for violating
+        a check.  When this is a matter of the code in question and not
+        personal preference, the best place to override the policy is in
+        the code itself.  Semi-structured comments can be associated
+        with the check.  This is sometimes superior to a separate
+        suppressions file, which must be kept up-to-date as the source
+        file is edited.
+      </p>
+
+      <p>
+        Usage: This filter only works in conjunction with a <code>FileContentsHolder</code>, since that check makes
+        the suppression comments in the Java files available. A configuration that includes this filter must
+        configure <code>FileContentsHolder</code> as a
+        child module of <code>TreeWalker</code>.
+      </p>
+
+      <h5>SuppressionCommentFilter Properties</h5>
+      <table>
+        <tr>
+          <th>name</th>
+          <th>description</th>
+          <th>type</th>
+          <th>default value</th>
+        </tr>
+        <tr>
+          <td>offCommentFormat</td>
+          <td>comment pattern to trigger filter to begin suppression</td>
+          <td><a href="property_types.html#regexp">regular expression</a></td>
+          <td><code>CHECKSTYLE\:OFF</code></td>
+        </tr>
+        <tr>
+          <td>onCommentFormat</td>
+          <td>comment pattern to trigger filter to end suppression</td>
+          <td><a href="property_types.html#regexp">regular expression</a></td>
+          <td><code>CHECKSTYLE\:ON</code></td>
+        </tr>
+        <tr>
+          <td>checkFormat</td>
+          <td>check pattern to suppress</td>
+          <td><a href="property_types.html#regexp">regular expression</a></td>
+          <td><code>.*</code> (all checks)</td>
+        </tr>
+        <tr>
+          <td>messageFormat</td>
+          <td>message pattern to suppress</td>
+          <td><a href="property_types.html#regexp">regular expression</a></td>
+          <td>none</td>
+        </tr>
+        <tr>
+          <td>checkCPP</td>
+          <td>whether to check C++ style comments (<code>//</code>)</td>
+          <td><a href="property_types.html#boolean">boolean</a></td>
+          <td><code>true</code></td>
+        </tr>
+        <tr>
+          <td>checkC</td>
+          <td>whether to check C style comments (<code>/* ... */</code>)</td>
+          <td><a href="property_types.html#boolean">boolean</a></td>
+          <td><code>true</code></td>
+        </tr>
+      </table>
+
+      <h5>Restrictions</h5>
+      <p>
+        offCommentFormat and onCommentFormat must have equal <a
+        href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Matcher.html#groupCount()">paren counts</a>.
+      </p>
+
+      <h5>Examples</h5>
+      <p>
+        Make sure that comments are available to the filter by enabling FileContentsHolder:
+      </p>
+
+      <source>
+<module name="TreeWalker">
+    ...
+    <module name="FileContentsHolder"/>
+    ...
+</module>
+      </source>
+
+      <p>
+        To configure a filter to suppress audit events between a comment
+        containing <code>CHECKSTYLE:OFF</code> and a comment containing
+        <code>CHECKSTYLE:ON</code>:
+      </p>
+
+      <source>
+<module name="Checker">
+    ...
+    <module name="SuppressionCommentFilter"/>
+    ...
+</module>
+      </source>
+
+      <p>
+        To configure a filter to suppress audit events between a comment
+        containing line <code>BEGIN GENERATED CODE</code> and a comment
+        containing line <code>END GENERATED CODE</code>:
+      </p>
+
+      <source>
+<module name="SuppressionCommentFilter">
+    <property name="offCommentFormat" value="BEGIN GENERATED CODE"/>
+    <property name="onCommentFormat" value="END GENERATED CODE"/>
+</module>
+      </source>
+
+      <p>
+        To configure a filter so that <code>// stop constant
+        check</code> and <code>// resume constant check</code> marks
+        legitimate constant names:
+      </p>
+
+      <source>
+<module name="SuppressionCommentFilter">
+    <property name="offCommentFormat" value="stop constant check"/>
+    <property name="onCommentFormat" value="resume constant check"/>
+    <property name="checkFormat" value="ConstantNameCheck"/>
+</module>
+      </source>
+
+      <p>
+        To configure a filter so that <code>UNUSED OFF:
+        <i>var</i></code> and <code>UNUSED ON: <i>var</i></code> marks a
+        variable or parameter known not to be used by the code by
+        matching the variable name in the message:
+      </p>
+
+      <source>
+<module name="SuppressionCommentFilter">
+    <property name="offCommentFormat" value="UNUSED OFF\: (\w+)"/>
+    <property name="onCommentFormat" value="UNUSED ON\: (\w+)"/>
+    <property name="checkFormat" value="Unused"/>
+    <property name="messageFormat" value="^Unused \w+ '$1'.$"/>
+</module>
+      </source>
+
+      <p>
+        To configure a filter so that <code>CSOFF: <i>regexp</i></code>
+        and <code>CSN: <i>regexp</i></code> mark a matching check:
+      </p>
+
+      <source>
+<module name="SuppressionCommentFilter">
+    <property name="offCommentFormat" value="CSOFF\: ([\w\|]+)"/>
+    <property name="onCommentFormat" value="CSON\: ([\w\|]+)"/>
+    <property name="checkFormat" value="$1"/>
+</module>
+      </source>
+
+      <p>
+        To configure a filter to suppress all audit events between a comment
+        containing <code>CHECKSTYLE_OFF: ALL</code> and a comment containing
+        <code>CHECKSTYLE_OFF: ALL</code> except for the <em>EqualsHashCode</em> check:
+      </p>
+
+      <source>
+<module name="SuppressionCommentFilter">
+    <property name="offCommentFormat" value="CHECKSTYLE_OFF: ALL"/>
+    <property name="onCommentFormat" value="CHECKSTYLE_ON: ALL"/>
+    <property name="checkFormat" value="^((?!(EqualsHashCode)).)*$"/>
+</module>
+      </source>
+      </subsection>
+
+      <subsection name="SuppressWithNearbyCommentFilter">
+      <h4>SuppressWithNearbyCommentFilter</h4>
+
+      <p>
+        Filter <code>SuppressWithNearbyCommentFilter</code> uses
+        individual comments to suppress audit events.
+      </p>
+
+      <p>
+        Rationale: Same as <code>SuppressionCommentFilter</code>.
+        Whereas the SuppressionCommentFilter uses matched pairs of
+        filters to turn on/off comment matching,
+        <code>SuppressWithNearbyCommentFilter</code> uses
+        single comments.  This requires fewer lines to mark a region, and
+        may be aesthetically preferable in some contexts.
+      </p>
+
+      <p>
+        Usage: This filter only works in conjunction with a <code>FileContentsHolder</code>, since that check makes
+        the suppression comments in the Java files available. A configuration that includes this filter must
+        configure <code>FileContentsHolder</code> as a
+        child module of <code>TreeWalker</code>.
+      </p>
+
+      <h5>SuppressWithNearbyCommentFilter Properties</h5>
+      <table>
+        <tr>
+          <th>name</th>
+          <th>description</th>
+          <th>type</th>
+          <th>default value</th>
+        </tr>
+        <tr>
+          <td>commentFormat</td>
+          <td>comment pattern to trigger filter to begin suppression</td>
+          <td><a href="property_types.html#regexp">regular expression</a></td>
+          <td><code>SUPPRESS CHECKSTYLE (\w+)</code></td>
+        </tr>
+        <tr>
+          <td>checkFormat</td>
+          <td>check pattern to suppress</td>
+          <td><a href="property_types.html#regexp">regular expression</a></td>
+          <td><code>.*</code></td>
+        </tr>
+        <tr>
+          <td>messageFormat</td>
+          <td>message pattern to suppress</td>
+          <td><a href="property_types.html#regexp">regular expression</a></td>
+          <td>none</td>
+        </tr>
+        <tr>
+          <td>influenceFormat</td>
+          <td>a negative/zero/positive value that defines the number of
+          lines preceding/at/following the suppression comment</td>
+          <td><a href="property_types.html#regexp">regular expression</a></td>
+          <td><code>0</code> (the line containing the comment)</td>
+        </tr>
+        <tr>
+          <td>checkCPP</td>
+          <td>whether to check C++ style comments (<code>//</code>)</td>
+          <td><a href="property_types.html#boolean">boolean</a></td>
+          <td><code>true</code></td>
+        </tr>
+        <tr>
+          <td>checkC</td>
+          <td>whether to check C style comments (<code>/* ... */</code>)</td>
+          <td><a href="property_types.html#boolean">boolean</a></td>
+          <td><code>true</code></td>
+        </tr>
+      </table>
+
+      <h5>Examples</h5>
+      <p>
+        To configure the check that makes comments available to the filter:
+      </p>
+
+      <source>
+<module name="TreeWalker">
+    ...
+    <module name="FileContentsHolder"/>
+    ...
+</module>
+      </source>
+
+      <p>
+        To configure a filter to suppress audit events for <i>check</i>
+        on any line with a comment <code>SUPPRESS CHECKSTYLE <i>check</i></code>:
+      </p>
+
+      <source>
+<module name="SuppressWithNearbyCommentFilter"/>
+      </source>
+
+      <p>
+        To configure a filter to suppress all audit events on any line
+        containing the comment <code>CHECKSTYLE IGNORE THIS LINE</code>:
+      </p>
+
+      <source>
+<module name="SuppressWithNearbyCommentFilter">
+    <property name="commentFormat" value="CHECKSTYLE IGNORE THIS LINE"/>
+    <property name="checkFormat" value=".*"/>
+    <property name="influenceFormat" value="0"/>
+</module>
+      </source>
+
+      <p>
+        To configure a filter so that
+        <code>// OK to catch (Throwable|Exception|RuntimeException) here</code>
+        permits the current and previous line to avoid generating an IllegalCatch
+        audit event:
+      </p>
+
+      <source>
+<module name="SuppressWithNearbyCommentFilter">
+    <property name="commentFormat" value="OK to catch (\w+) here"/>
+    <property name="checkFormat" value="IllegalCatchCheck"/>
+    <property name="messageFormat" value="$1"/>
+    <property name="influenceFormat" value="-1"/>
+</module>
+      </source>
+
+      <p>
+        To configure a filter so that <code>CHECKSTYLE IGNORE <i>check</i> FOR NEXT <i>var</i> LINES</code>
+        avoids triggering any audits for the given check for the current line and the next <i>var</i> lines
+        (for a total of <i>var</i>+1 lines):
+      </p>
+
+      <source>
+<module name="SuppressWithNearbyCommentFilter">
+    <property name="commentFormat" value="CHECKSTYLE IGNORE (\w+) FOR NEXT (\d+) LINES"/>
+    <property name="checkFormat" value="$1"/>
+    <property name="influenceFormat" value="$2"/>
+</module>
+      </source>
+
+      </subsection>
+
+      <subsection name="SuppressWarningsFilter">
+        <h4>SuppressWarningsFilter</h4>
+        <p>
+          Filter <code>SuppressWarningsFilter</code> uses annotations to
+          suppress audit events.
+        </p>
+
+        <p>
+          Rationale: Same as for
+          <code>SuppressionCommentFilter</code>. In the contrary to it
+          here, comments are not used comments but the builtin syntax of
+          <code>@SuppressWarnings</code>. This can be perceived as a
+          more elegant solution than using comments. Also this approach
+          maybe supported by various IDE.
+        </p>
+        <p>
+          Usage: This filter only works in conjunction with a
+          <code>SuppressWarningsHolder</code>, since that check finds
+          the annotations in the Java files and makes them available for
+          the filter. Because of that, a configuration that includes
+          this filter must also include
+          <code>SuppressWarningsHolder</code> as a child module of the
+          <code>TreeWalker</code>.
+        </p>
+
+        <h5>SuppressWarningsFilter Properties</h5>
+        <p>This filter does not expose any properties</p>
+
+        <h5>Examples</h5>
+        <p>
+          To configure the check that makes tha annotations available to
+          the filter.
+        </p>
+        <source>
+          <module name="TreeWalker">
+            ...
+              <module name="SuppressWarningsHolder" />
+            ...
+          </module>
+        </source>
+
+        <p>To configure filter to suppress audit events for annotations add:</p>
+        <source>
+          <module name="SuppressWarningsFilter" />
+        </source>
+
+      </subsection>
+
+    </section>
+
+    <section name="AuditListeners">
+
+      <p>
+        In addition to an audit reporter for text or XML output, a
+        Checker can have <a href="writinglisteners.html">custom
+        AuditListeners</a> that handle audit events. In order to use a
+        custom listener, add a <code>Checker</code> submodule for the
+        listener and its properties.  For example, to configure a <code>Checker</code> so that it uses custom listener <a
+        href="writinglisteners.html#Writing_Listeners">VerboseListener</a> to
+        print audit messages to a file named "audit.txt",
+        include the following module in the configuration file:
+      </p>
+
+      <source>
+<module name="com.mycompany.listeners.VerboseListener">
+    <property name="file" value="audit.txt"/>
+</module>
+      </source>
+
+    </section>
+
+    <section name="Packages">
+      <p>
+        Checkstyle loads a module class according to the <code>name</code> of a <code>module</code>
+        element, and automatically appends pre-specified package
+        prefixes to that <code>name</code> in its search
+        for a loadable class.  By default, Checkstyle applies packages
+        <code> com.puppycrawl.tools.checkstyle</code>,
+        <code>
+        com.puppycrawl.tools.checkstyle.filters</code>, and <code> com.puppycrawl.tools.checkstyle.checks</code> as
+        well as any sub-packages of <code>com.puppycrawl.tools.checkstyle.checks</code> that
+        are distributed with Checkstyle.
+      </p>
+      <p>
+        To specify other packages to apply,
+        create a <em>package names XML document</em> in a file
+        named <code>checkstyle_packages.xml</code>,
+        and provide that file in the root of the .jar containing your
+        custom checks.
+      </p>
+      <p>
+        Note that the support for providing a <em>package names XML document</em>
+        via <a href="cmdline.html">command line</a> option or as a attribute
+        of an <a href="anttask.html">ant Checkstyle task</a> has been dropped
+        with Checkstyle 5.0.
+      </p>
+
+      <p>
+        A <em>package names XML document</em> specifies a list of
+        package names. Here is a sample package names XML document for
+        packages <code>
+        com.puppycrawl.tools.checkstyle</code> and <code>
+        com.puppycrawl.tools.checkstyle.checks</code>:
+      </p>
+
+      <source>
+<checkstyle-packages>
+  <package name="com.puppycrawl.tools.checkstyle">
+    <package name="checks"/>
+  </package>
+</checkstyle-packages>
+      </source>
+
+      <p>
+        Notice that the packages are specified recursively - a child
+        <code>package</code> element is a subpackage of its
+        parent <code>package</code> element.
+      </p>
+
+      <p>
+        For example, to incorporate modules from package <code>com.mycompany.checks</code> with Checkstyle
+        modules, create the XML file below and put this file into the
+        <b>root of the jar</b> file which contains your custom check modules.
+        The XML file must be named exactly <code>checkstyle_packages.xml</code>:
+      </p>
+
+      <source>
+<?xml version="1.0" encoding="UTF-8"?>
+
+    <!DOCTYPE checkstyle-packages PUBLIC
+    "-//Puppy Crawl//DTD Package Names 1.0//EN"
+    "http://www.puppycrawl.com/dtds/packages_1_0.dtd">
+
+<checkstyle-packages>
+  <package name="com.mycompany.checks"/>
+</checkstyle-packages>
+      </source>
+
+      <p>
+        Now you can configure a module of package <code>com.mycompany.checks</code>, say <code>com.mycompany.checks.MethodLimitCheck</code>, with
+        a shortened <code>module</code> element in the
+        configuration document:
+      </p>
+
+      <source>
+<module name="MethodLimit"/>
+      </source>
+
+      <div class="tip">
+        <h4>Note</h4>
+        <p>
+          As of Checkstyle 5.0 it is unnecessary to repeat the
+          <code>package</code> elements for Checkstyle's packages in
+          your custom <code>checkstyle_packages.xml</code> file.
+        </p>
+      </div>
+
+    </section>
+
+    <section name="XML Details">
+
+      <h4>Configuration XML Document</h4>
+      <p>
+        The following DTD for a configuration XML document specifies the
+        hierarchy of modules and their properties:
+      </p>
+
+      <source>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!ELEMENT module (module|property)*>
+<!ATTLIST module name NMTOKEN #REQUIRED>
+
+<!ELEMENT property EMPTY>
+<!ATTLIST property
+        name NMTOKEN #REQUIRED
+        value CDATA #REQUIRED
+>
+      </source>
+
+      <p>
+        Checkstyle validates a configuration XML document when it loads
+        the document.  To validate against the above configuration DTD,
+        include the following document type declaration in your
+        configuration XML document:
+      </p>
+
+      <source>
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+      </source>
+
+      <p>
+        Checkstyle also strictly enforces the encoding attribute of an
+        XML declaration.  If Checkstyle rejects your configuration
+        document's encoding, correct the value of the encoding
+        attribute, or remove the encoding attribute entirely.
+      </p>
+
+      <p>
+        For a complete example of a configuration XML document, examine
+        file <code>docs/sun_checks.xml</code> that checks the Sun coding
+        conventions.
+      </p>
+
+      <h4>Package Names XML Document</h4>
+      <p>
+        This is a DTD for a package names XML document:
+      </p>
+
+      <source>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!ELEMENT checkstyle-packages (package)*>
+
+<!ELEMENT package (package)*>
+<!ATTLIST package name NMTOKEN #REQUIRED>
+      </source>
+
+      <p>
+        Checkstyle also validates a package names XML document when it
+        loads the document.  To validate against the above package names
+        DTD, include the following document type declaration in your
+        package names XML document:
+      </p>
+
+      <source>
+<!DOCTYPE checkstyle-packages PUBLIC
+"-//Puppy Crawl//DTD Package Names 1.1//EN"
+"http://www.puppycrawl.com/dtds/packages_1_1.dtd">
+      </source>
+
+      <h4>Suppressions XML Document</h4>
+      <p>
+        This is a DTD for a suppressions XML document:
+      </p>
+
+      <source>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!ELEMENT suppressions (suppress*)>
+
+<!ELEMENT suppress EMPTY>
+<!ATTLIST suppress files CDATA #REQUIRED
+                   checks CDATA #IMPLIED
+                   id CDATA #IMPLIED
+                   lines CDATA #IMPLIED
+                   columns CDATA #IMPLIED>
+      </source>
+
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/config_annotation.xml b/src/xdocs/config_annotation.xml
new file mode 100644
index 0000000..5c3160b
--- /dev/null
+++ b/src/xdocs/config_annotation.xml
@@ -0,0 +1,420 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Annotations</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+    <section name="AnnotationUseStyle">
+      <subsection name="Description">
+        <p> This check controls the style with the usage of annotations.
+        </p>
+      </subsection>
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>elementStyle</td>
+            <td>
+              <p>
+                Defines the annotation element styles.
+              </p>
+            </td>
+            <td>
+              <a href="property_types.html#elementStyle">element style</a>
+            </td>
+            <td>
+              <code>compact_no_array</code>
+            </td>
+          </tr>
+          <tr>
+            <td>closingParens</td>
+            <td>
+              Defines the policy for ending parenthesis.
+            </td>
+            <td>
+              <a href="property_types.html#closingParens">closing parens</a>
+            </td>
+            <td>
+              <code>never</code>
+            </td>
+          </tr>
+          <tr>
+            <td>trailingArrayComma</td>
+            <td>
+              Defines the policy for trailing comma in arrays.
+            </td>
+            <td>
+              <a href="property_types.html#trailingArrayComma">trailing comma</a>
+            </td>
+            <td>
+              <code>never</code>
+            </td>
+          </tr>
+        </table>
+      </subsection>
+      <subsection name="Examples">
+        <p> To configure the check:</p>
+        <source> <module name="AnnotationUseStyle"/>
+        </source>
+
+        <p>
+          To configure the check to enforce an
+          <code>expanded</code> style, with a
+          trailing array comma set to <code>never</code>
+          and always including the closing
+          parenthesis.
+        </p>
+        <source>
+ <module name="AnnotationUseStyle">
+     <property name="ElementStyle"
+         value="expanded"/>
+      <property name="TrailingArrayComma"
+          value="never"/>
+     <property name="ClosingParens"
+         value="always"/>
+  </module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p> com.puppycrawl.tools.checkstyle.checks.annotation </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p> <a href="config.html#TreeWalker">TreeWalker</a> </p>
+      </subsection>
+    </section>
+
+
+    <section name="MissingDeprecated">
+      <subsection name="Description">
+        <p> Verifies that both the java.lang.Deprecated annotation is
+            present and the @deprecated Javadoc tag is present when
+            either is present.</p>
+      </subsection>
+      <subsection name="Examples">
+        <p> To configure the check:</p>
+        <source> <module name="MissingDeprecated"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p> com.puppycrawl.tools.checkstyle.checks.annotation </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p> <a href="config.html#TreeWalker">TreeWalker</a> </p>
+      </subsection>
+    </section>
+
+    <section name="MissingOverride">
+      <subsection name="Description">
+        <p> Verifies that the java.lang.Override annotation is present
+          when the {@inheritDoc} javadoc tag is present.</p>
+      </subsection>
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>javaFiveCompatibility</td>
+            <td>
+              When this property is true this check will only check
+              classes, interfaces, etc. that do not contain the extends
+              or implements keyword or are not anonymous classes. This
+              means it only checks methods overridden from
+              <code>java.lang.Object</code>
+              <b>Java 5 Compatibility mode severely limits this
+                check. It is recommended to only use it on Java 5 source </b>
+            </td>
+            <td>
+              <a href="property_types.html#boolean">boolean</a>
+            </td>
+            <td>
+              <code>false</code>
+            </td>
+          </tr>
+        </table>
+      </subsection>
+      <subsection name="Examples">
+        <p> To configure the check:</p>
+        <source> <module name="MissingOverride"/>
+        </source>
+
+        <p>
+          To configure the check for the <code>javaFiveCompatibility</code>
+          mode:
+        </p>
+        <source>
+   <module name="MissingOverride">
+      <property name="javaFiveCompatibility"
+          value="true"/>
+   </module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p> com.puppycrawl.tools.checkstyle.checks.annotation </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p> <a href="config.html#TreeWalker">TreeWalker</a> </p>
+      </subsection>
+    </section>
+
+    <section name="PackageAnnotation">
+      <subsection name="Description">
+        <p>  This check makes sure that all package annotations are in the
+             package-info.java file.
+        </p>
+        <p>
+             According to the Java JLS 3rd ed.
+        </p>
+
+        <p>
+            The JLS does not enforce the placement of package annotations.
+            This placement may vary based on implementation.  The JLS
+            does highly recommend that all package annotations are
+            placed in the package-info.java file.
+
+            See <a
+            href="http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html">
+            Java Language specification, sections 7.4.1.1</a>.
+        </p>
+      </subsection>
+      <subsection name="Examples">
+        <p> To configure the check:</p>
+        <source> <module name="PackageAnnotation"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p> com.puppycrawl.tools.checkstyle.checks.annotation </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p> <a href="config.html#TreeWalker">TreeWalker</a> </p>
+      </subsection>
+    </section>
+
+    <section name="SuppressWarnings">
+      <subsection name="Description">
+        <p> This check allows you to specify what warnings that
+        SuppressWarnings is not allowed to suppress.
+        You can also specify a list of TokenTypes that
+        the configured warning(s) cannot be suppressed on.</p>
+
+        <p>
+        Limitations:  This check does not consider conditionals
+        inside the SuppressWarnings annotation. <br/>
+        For example: @SuppressWarnings((false) ? (true) ? "unchecked" : "foo" : "unused")
+        According to the above example, the "unused" warning is being suppressed
+        not the "unchecked" or "foo" warnings.  All of these warnings will be
+        considered and matched against regardless of what the conditional
+        evaluates to.
+        </p>
+      </subsection>
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>format</td>
+            <td>
+               The warnings property is a regex pattern.  Any warning
+               being suppressed matching this pattern will be flagged.
+            </td>
+            <td>
+              <a href="property_types.html#regexp">regexp</a>
+            </td>
+            <td>
+              <code>^$|^\s+$</code>
+            </td>
+          </tr>
+
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+
+            <td>
+              subset of tokens
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">CLASS_DEF</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">INTERFACE_DEF</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_DEF">ENUM_DEF</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_DEF">ANNOTATION_DEF</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_FIELD_DEF">ANNOTATION_FIELD_DEF</a>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_CONSTANT_DEF">ENUM_CONSTANT_DEF</a>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PARAMETER_DEF">PARAMETER_DEF</a>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>
+            </td>
+
+            <td>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">CLASS_DEF</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">INTERFACE_DEF</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_DEF">ENUM_DEF</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_DEF">ANNOTATION_DEF</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_FIELD_DEF">ANNOTATION_FIELD_DEF</a>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_CONSTANT_DEF">ENUM_CONSTANT_DEF</a>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PARAMETER_DEF">PARAMETER_DEF</a>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>
+            </td>
+          </tr>
+
+        </table>
+      </subsection>
+      <subsection name="Examples">
+        <p> To configure the check:</p>
+        <source> <module name="SuppressWarnings"/>
+        </source>
+
+        <p>
+          To configure the check so that the "unchecked" and "unused"
+          warnings cannot be suppressed on anything
+          but variable and parameter declarations.
+        </p>
+        <source>
+   <module name="SuppressWarnings">
+      <property name="format"
+          value="^unchecked$|^unused$"/>
+      <property name="tokens"
+          value="
+          CLASS_DEF,INTERFACE_DEF,ENUM_DEF,
+          ANNOTATION_DEF,ANNOTATION_FIELD_DEF,
+          ENUM_CONSTANT_DEF,METHOD_DEF,CTOR_DEF
+          "/>
+   </module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p> com.puppycrawl.tools.checkstyle.checks.annotation </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p> <a href="config.html#TreeWalker">TreeWalker</a> </p>
+      </subsection>
+    </section>
+
+    <section name="SuppressWarningsHolder">
+      <subsection name="Description">
+        <p>
+          Maintains a set of check suppressions from
+          <code>@SuppressWarnings</code> annotations. It allows to
+          prevent Checkstyle from reporting errors from parts of code
+          that were annotated with <code>@SuppressWarnings</code> and
+          using name of the check to be excluded. You can also define
+          aliases for check names that need to be suppressed.
+         </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>aliasList</td>
+            <td>Aliases for check names that can be used in code within <code>SuppressWarnings</code></td>
+            <td><a href="property_types.html#string">String</a> in a format of comma separated attribute=value entries.
+            The attribute is the fully qualified name of the Check and value is its alias.</td>
+            <td>null</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>To prevent <code>FooCheck</code> errors from being reported write:</p>
+        <source>
+        @SuppressWarnings("foo") interface I { }
+        @SuppressWarnings("foo") enum E { }
+        @SuppressWarnings("foo") InputSuppressWarningsFilter() { }
+        </source>
+        <br />
+        <p>Some real check examples:</p>
+        <p>This will prevent from invocation of the MemberNameCheck:
+          <source>
+         @SuppressWarnings({"membername"})
+         private int J;
+           </source>
+        </p>
+
+        <p>You can also use a <code>checkstyle</code> prefix to prevent compiler from processing this annotations.
+        For example this will prevent ConstantNameCheck
+          <source>
+            @SuppressWarnings("checkstyle:constantname")
+            private static final int m = 0;
+          </source>
+        </p>
+
+        <p>The general rule is that the argument of the <code>@SuppressWarnings</code> will be matched against class name of the checker in lower case
+          and without <code>Check</code> suffix if present</p>
+          <p>If <code>aliasList</code> property was provided you can use your own names e.g below code will work if there was provided a <code>ParameterNumberCheck=paramnum</code> in the <code>aliasList</code>
+          <source>
+            @SuppressWarnings("paramnum")
+            public void needsLotsOfParameters(@SuppressWarnings("unused") int a,
+              int b, int c, int d, int e, int f, int g, int h) {
+              ...
+            }
+          </source>
+      </p>
+
+      </subsection>
+
+
+      <subsection name="Package">
+        <p> com.puppycrawl.tools.checkstyle.checks </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p> <a href="config.html#TreeWalker">TreeWalker</a> </p>
+      </subsection>
+
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/config_blocks.xml b/src/xdocs/config_blocks.xml
new file mode 100644
index 0000000..26d4e21
--- /dev/null
+++ b/src/xdocs/config_blocks.xml
@@ -0,0 +1,457 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Block Checks</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+
+    <section name="EmptyBlock">
+      <subsection name="Description">
+        <p> Checks for empty blocks. </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>option</td>
+            <td>policy on block contents</td>
+            <td><a href="property_types.html#block">block policy</a></td>
+            <td><code>stmt</code></td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>blocks to check</td>
+
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_CATCH">LITERAL_CATCH</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_DO">LITERAL_DO</a>,
+               <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_ELSE">LITERAL_ELSE</a>,
+                <a
+                 href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_FINALLY">LITERAL_FINALLY</a>,
+                 <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_IF">LITERAL_IF</a>,
+                  <a
+                   href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_FOR">LITERAL_FOR</a>,
+                   <a
+                    href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_TRY">LITERAL_TRY</a>,
+                    <a
+                     href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_WHILE">LITERAL_WHILE</a>,
+                     <a
+                     href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INSTANCE_INIT">INSTANCE_INIT</a>,
+                     <a
+                     href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STATIC_INIT">STATIC_INIT</a>,
+                     <a
+                     href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_SWITCH">LITERAL_SWITCH</a>.
+            </td>
+
+            <td>all tokens</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p> To configure the check: </p>
+        <source>
+<module name="EmptyBlock"/>
+        </source>
+
+        <p>
+          To configure the check for the <code>text</code>
+          policy and only <code> catch</code> blocks:
+        </p>
+        <source>
+<module name="EmptyBlock">
+    <property name="option" value="text"/>
+    <property name="tokens" value="LITERAL_CATCH"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p> com.puppycrawl.tools.checkstyle.checks.blocks </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p> <a href="config.html#TreeWalker">TreeWalker</a> </p>
+      </subsection>
+    </section>
+
+    <section name="LeftCurly">
+      <subsection name="Description">
+        <p>
+          Checks for the placement of left curly braces
+          (<code>'{'</code>) for code blocks.  The policy to verify is
+          specified using the property <code>option</code>.  Policies
+          <code>eol</code> and <code> nlow</code> take into account
+          the property <code>maxLineLength</code>.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>option</td>
+            <td>policy on placement of a left curly brace (<code>'{'</code>)</td>
+            <td><a href="property_types.html#lcurly">left curly brace policy</a></td>
+            <td><code>eol</code></td>
+          </tr>
+          <tr>
+            <td>ignoreEnums</td>
+            <td>If true, Check will ignore enums</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td>true</td>
+          </tr>
+          <tr>
+            <td>maxLineLength</td>
+            <td>maximum number of characters in a line</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td><code>80</code></td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>blocks to check</td>
+
+            <td>subset of tokens
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_DEF">ANNOTATION_DEF</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">CLASS_DEF</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_DEF">ENUM_DEF</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_CONSTANT_DEF">ENUM_CONSTANT_DEF</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">INTERFACE_DEF</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_CATCH">LITERAL_CATCH</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_DO">LITERAL_DO</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_ELSE">LITERAL_ELSE</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_FINALLY">LITERAL_FINALLY</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_FOR">LITERAL_FOR</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_IF">LITERAL_IF</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_SWITCH">LITERAL_SWITCH</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_SYNCHRONIZED">LITERAL_SYNCHRONIZED</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_TRY">LITERAL_TRY</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_WHILE">LITERAL_WHILE</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>
+            </td>
+
+            <td>all tokens</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p> To configure the check: </p>
+        <source>
+<module name="LeftCurly"/>
+        </source>
+        <p>
+          To configure the check to apply the <code>nl</code> policy to
+          type blocks:
+        </p>
+        <source>
+<module name="LeftCurly">
+    <property name="option" value="nl"/>
+    <property name="tokens" value="CLASS_DEF,INTERFACE_DEF"/>
+</module>
+        </source>
+        <p>
+          An example of how to configure the check to validate enum definitions:
+        </p>
+        <source>
+<module name="LeftCurly">
+    <property name="ignoreEnums" value="false"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p> com.puppycrawl.tools.checkstyle.checks.blocks </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p> <a href="config.html#TreeWalker">TreeWalker</a> </p>
+      </subsection>
+    </section>
+
+    <section name="NeedBraces">
+      <subsection name="Description">
+        <p> Checks for braces around code blocks. </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>blocks to check</td>
+
+            <td>subset of tokens <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_DO">LITERAL_DO</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_ELSE">LITERAL_ELSE</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_IF">LITERAL_IF</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_FOR">LITERAL_FOR</a>,
+               <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_WHILE">LITERAL_WHILE</a></td>
+
+            <td>all tokens</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p> To configure the check: </p>
+        <source>
+<module name="NeedBraces"/>
+        </source>
+
+        <p>
+          To configure the check for <code>if</code> and
+          <code> else</code> blocks:
+        </p>
+        <source>
+<module name="NeedBraces">
+    <property name="tokens" value="LITERAL_IF, LITERAL_ELSE"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p> com.puppycrawl.tools.checkstyle.checks.blocks </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p> <a href="config.html#TreeWalker">TreeWalker</a> </p>
+      </subsection>
+    </section>
+
+    <section name="RightCurly">
+      <subsection name="Description">
+        <p>
+          Checks the placement of right curly braces (<code>'}'</code>)
+          for <code> else</code>, <code>try</code>, and
+          <code>catch</code> tokens. The policy to verify is specified
+          using the property <code> option</code>.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>option</td>
+            <td>policy on placement of a right curly brace (<code>'}'</code>)</td>
+            <td><a href="property_types.html#rcurly">right curly brace policy</a></td>
+            <td><code>same</code></td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>blocks to check</td>
+
+            <td>subset of tokens <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_TRY">LITERAL_TRY</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_CATCH">LITERAL_CATCH</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_FINALLY">LITERAL_FINALLY</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_IF">LITERAL_IF</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_ELSE">LITERAL_ELSE</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">CLASS_DEF</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>,
+             <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_FOR">LITERAL_FOR</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_WHILE">LITERAL_WHILE</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_DO">LITERAL_DO</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STATIC_INIT">STATIC_INIT</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INSTANCE_INIT">INSTANCE_INIT</a>.</td>
+
+            <td><a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_TRY">LITERAL_TRY</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_CATCH">LITERAL_CATCH</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_FINALLY">LITERAL_FINALLY</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_IF">LITERAL_IF</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_ELSE">LITERAL_ELSE</a></td>
+          </tr>
+          <tr>
+            <td>shouldStartLine</td>
+            <td>should we check if <code>'}'</code>
+            starts line.</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p> To configure the check: </p>
+        <source>
+<module name="RightCurly"/>
+        </source>
+
+        <p>
+          To configure the check with policy <code>alone</code> for <code> else</code> and <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>
+          tokens:
+        </p>
+        <source>
+<module name="RightCurly">
+    <property name="option" value="alone"/>
+    <property name="tokens" value="LITERAL_ELSE, METHOD_DEF"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p> com.puppycrawl.tools.checkstyle.checks.blocks </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p> <a href="config.html#TreeWalker">TreeWalker</a> </p>
+      </subsection>
+    </section>
+
+    <section name="AvoidNestedBlocks">
+      <subsection name="Description">
+        <p>
+          Finds nested blocks, i.e. blocks that are used freely in the code.
+        </p>
+
+        <p>
+          Rationale: Nested blocks are often leftovers from the
+          debugging process, they confuse the reader.
+        </p>
+
+        <p>
+          For example this Check finds the obsolete braces in
+        </p>
+        <source>
+public void guessTheOutput()
+{
+    int whichIsWhich = 0;
+    {
+        int whichIsWhich = 2;
+    }
+    System.out.println("value = " + whichIsWhich);
+}
+        </source>
+
+        <p> and debugging / refactoring leftovers such as </p>
+        <source>
+// if (conditionThatIsNotUsedAnyLonger)
+{
+    System.out.println("unconditional");
+}
+        </source>
+
+        <p>
+          A case in a switch statement does not implicitly form a block.
+          Thus to be able to introduce local variables that have case
+          scope it is necessary to open a nested block. This is
+          supported, set the allowInSwitchCase property to true and
+          include all statements of the case in the block.
+        </p>
+        <source>
+switch (a)
+{
+    case 0:
+        // Never OK, break outside block
+        {
+            x = 1;
+        }
+        break;
+    case 1:
+        // Never OK, statement outside block
+        System.out.println("Hello");
+        {
+            x = 2;
+            break;
+        }
+    case 1:
+        // OK if allowInSwitchCase is true
+        {
+            System.out.println("Hello");
+            x = 2;
+            break;
+        }
+}
+        </source>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>allowInSwitchCase</td>
+            <td>Allow nested blocks in case statements</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p> To configure the check: </p>
+        <source>
+<module name="AvoidNestedBlocks"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p> com.puppycrawl.tools.checkstyle.checks.blocks </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p> <a href="config.html#TreeWalker">TreeWalker</a> </p>
+      </subsection>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/config_coding.xml b/src/xdocs/config_coding.xml
new file mode 100644
index 0000000..42ab2a5
--- /dev/null
+++ b/src/xdocs/config_coding.xml
@@ -0,0 +1,2719 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Coding</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+    <section name="ArrayTrailingComma">
+      <subsection name="Description">
+        <p>
+          Checks that array initialization contains a trailing comma.
+        </p>
+        <source>
+int[] a = new int[]
+{
+    1,
+    2,
+    3,
+};
+        </source>
+
+        <p>
+          The check allows leaving out the comma at the end if both the left and right curly brackets
+          are on the same line.
+        </p>
+        <source>
+return new int[] { 0 };
+        </source>
+
+        <p>
+          Rationale: Putting this comma in makes it easier to change the order
+          of the elements or add new elements on the end.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="ArrayTrailingComma"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="AvoidInlineConditionals">
+      <subsection name="Description">
+        <p>
+          Detects inline conditionals. Here is one example of an inline conditional:
+        </p>
+        <source>
+String a = getParameter("a");
+String b = (a==null || a.length<1) ? null : a.substring(1);
+        </source>
+
+        <p>
+          Rationale: Some developers find inline conditionals hard to read, so
+          their employer's coding standards forbid them.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="AvoidInlineConditionals"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="CovariantEquals">
+      <subsection name="Description">
+        <p>
+          Checks that classes that define a covariant <code>equals()</code> method also override method <code>equals(java.lang.Object)</code>.  Inspired by <a
+          href="http://www.cs.umd.edu/~pugh/java/bugs/docs/findbugsPaper.pdf">findbugs</a>.
+        </p>
+
+        <p>
+          Rationale: Mistakenly defining a covariant <code>equals()</code> method without overriding method <code>equals(java.lang.Object)</code> can produce unexpected
+          runtime behaviour.
+        </p>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="CovariantEquals"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="EmptyStatement">
+      <subsection name="Description">
+        <p>
+          Detects empty statements (standalone ";" semicolon).
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="EmptyStatement"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="EqualsAvoidNull">
+      <subsection name="Description">
+        <p>
+          Checks that any combination of String literals with optional
+          assignment is on the left side of an <code>equals()</code> comparison.
+          The check also processes <code>String.equalsIgnoreCase()</code>
+          invocations (which can be suppressed).
+        </p>
+
+        <p>
+          Rationale: Calling the <code>equals()</code>
+          method on String literals will avoid a potential
+          NullPointerException.  Also, it is pretty common to see null
+          checks right before equals comparisons, which is not necessary
+          in the example below.
+        </p>
+
+        <p>
+          For example, this code:
+        </p>
+        <source>
+String nullString = null;
+nullString.equals("My_Sweet_String");
+        </source>
+
+        <p>should be refactored to:</p>
+
+        <source>
+String nullString = null;
+"My_Sweet_String".equals(nullString);
+        </source>
+
+        <p>
+          Limitations: If the equals method is overridden or a covariant
+          equals method is defined and the implementation is incorrect
+          (where <code>s.equals(t)</code> does not return
+          the same result as <code>t.equals(s)</code>) then
+          rearranging the called on object and parameter may have
+          unexpected results.
+        </p>
+
+        <p>
+          Java's autoboxing feature affects how this check is
+          implemented. Before Java 5, concatenations of two objects by name would not cause a NullPointerException
+          even if either object is null.  Those situations could have been included in this
+          check.  They would simply act as if they were surrounded by <code>String.valueOf()</code>
+          which would concatenate
+          the String null.
+        </p>
+        <p>
+          The following example will cause a NullPointerException as a
+          result of what autoboxing does.
+        </p>
+
+        <source>
+Integer i = null, j = null;
+String number = "5"
+number.equals(i + j);
+        </source>
+
+        <p>
+          Since it is difficult to determine what kind of Object is
+          being concatenated, all concatenations of two objects by name are considered
+          unsafe.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>ignoreEqualsIgnoreCase</td>
+            <td>whether to ignore <code>String.equalsIgnoreCase()</code> invocations</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td>false</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="EqualsAvoidNull"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="EqualsHashCode">
+      <subsection name="Description">
+        <p>
+          Checks that classes that override <code>equals()</code>
+          also override <code>hashCode()</code>.
+        </p>
+
+        <p>
+          Rationale: The contract of <code>equals()</code> and
+          <code>hashCode()</code> requires that equal objects
+          have the same hashCode. Therefore, whenever you override <code>equals()</code> you must override <code>
+          hashCode()</code> to ensure that your class can be used in
+          hash-based collections.
+        </p>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="EqualsHashCode"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="FinalLocalVariable">
+      <subsection name="Description">
+        <p>
+          Checks that local variables that never have their values changed are
+          declared final. The check can be configured to also check that
+          unchanged parameters are declared final.
+        </p>
+      </subsection>
+
+      <subsection name="Notes">
+        <p>
+          When configured to check parameters, the check ignores parameters of
+          interface methods and abstract methods.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr class="header">
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PARAMETER_DEF">PARAMETER_DEF</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>
+            </td>
+            <td>
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="FinalLocalVariable"/>
+        </source>
+
+        <p>
+          To configure the check so that it checks local variables and
+          parameters:
+        </p>
+        <source>
+<module name="FinalLocalVariable">
+    <property name="tokens" value="VARIABLE_DEF,PARAMETER_DEF"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="HiddenField">
+      <subsection name="Description">
+        <p>
+          Checks that a local variable or a parameter does not shadow a field
+          that is defined in the same class.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PARAMETER_DEF">PARAMETER_DEF</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>
+            </td>
+
+            <td>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PARAMETER_DEF">PARAMETER_DEF</a>,
+               <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>
+            </td>
+          </tr>
+
+          <tr>
+            <td>ignoreFormat</td>
+            <td>pattern for names to ignore</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td>(not applied)</td>
+          </tr>
+
+          <tr>
+            <td>ignoreConstructorParameter</td>
+            <td>Controls whether to ignore constructor parameters.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+
+          <tr>
+            <td>ignoreSetter</td>
+            <td>
+              Controls whether to ignore the parameter of a property setter
+              method, where the property setter method for field
+              "xyz" has name "setXyz", one parameter named
+              "xyz", and return type <code>void</code>.
+            </td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+
+          <tr>
+            <td>ignoreAbstractMethods</td>
+            <td>Controls whether to ignore parameters of abstract methods.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="HiddenField"/>
+        </source>
+
+        <p>
+          To configure the check so that it checks local variables but not
+          parameters:
+        </p>
+        <source>
+<module name="HiddenField">
+    <property name="tokens" value="VARIABLE_DEF"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check so that it ignores the name
+          "rcsid":
+        </p>
+        <source>
+<module name="HiddenField">
+    <property name="ignoreFormat" value="^rcsid$"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check so that it ignores constructor parameters:
+        </p>
+        <source>
+<module name="HiddenField">
+    <property name="ignoreConstructorParameter" value="true"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check so that it ignores the parameter of setter
+          methods:
+        </p>
+        <source>
+<module name="HiddenField">
+    <property name="ignoreSetter" value="true"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="IllegalInstantiation">
+      <subsection name="Description">
+        <p>
+          Checks for illegal instantiations where a factory method is
+          preferred.
+        </p>
+
+        <p>
+          Rationale: Depending on the project, for some classes it might be
+          preferable to create instances through factory methods rather than
+          calling the constructor.
+        </p>
+
+        <p>
+          A simple example is the <code>java.lang.Boolean</code>
+          class. For performance reasons, it is preferable to
+          use the predefined constants <code> TRUE</code> and
+          <code>FALSE</code>. Constructor invocations should be
+          replaced by calls to <code>Boolean.valueOf()</code>.
+        </p>
+
+        <p>
+          Some extremely performance sensitive projects may require the use of
+          factory methods for other classes as well, to enforce the usage of
+          number caches or object pools.
+        </p>
+      </subsection>
+
+      <subsection name="Notes">
+        <p>
+          There is a limitation that it is currently not possible to specify
+          array classes.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>classes</td>
+            <td>classes that should not be instantiated</td>
+            <td><a href="property_types.html#stringSet">String Set</a></td>
+            <td>{}</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check to find instantiations of java.lang.Boolean:
+        </p>
+        <source>
+<module name="IllegalInstantiation">
+    <property name="classes" value="java.lang.Boolean"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="IllegalToken">
+      <subsection name="Description">
+        <p>
+          Checks for illegal tokens.
+        </p>
+
+        <p>
+          Rational: Certain language features often lead to hard-to-maintain
+          code or are not obvious to novice developers. Other features may be
+          discouraged in certain frameworks, such as not having native methods
+          in Enterprise JavaBeans components.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+            <td>
+              subset of <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html">TokenTypes</a>,
+            </td>
+            <td>
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_SWITCH">LITERAL_SWITCH</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#POST_INC">POST_INC</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#POST_DEC">POST_DEC</a>
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check to find token LITERAL_NATIVE:
+        </p>
+        <source>
+<module name="IllegalToken">
+    <property name="tokens" value="LITERAL_NATIVE"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="IllegalTokenText">
+      <subsection name="Description">
+        <p>
+          Checks for illegal token text.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+            <td>subset of <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html">TokenTypes</a>
+            </td>
+            <td>empty</td>
+          </tr>
+          <tr>
+            <td>format</td>
+            <td>illegal pattern</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>^$</code> (empty)</td>
+          </tr>
+          <tr>
+            <td>ignoreCase</td>
+            <td>Controls whether to ignore case when matching.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>message</td>
+            <td>Message which is used to notify about violations;
+            if empty then the default message is used.</td>
+            <td><a href="property_types.html#string">String</a></td>
+            <td><code>""</code>(empty)</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check to forbid String literals containing <code>"a href"</code>:
+        </p>
+        <source>
+<module name="IllegalTokenText">
+    <property name="tokens" value="STRING_LITERAL"/>
+    <property name="format" value="a href"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check to forbid leading zeros in an integer
+          literal, other than zero and a hex literal:
+        </p>
+        <source>
+<module name="IllegalTokenText">
+    <property name="tokens" value="NUM_INT,NUM_LONG"/>
+    <property name="format" value="^0[^lx]"/>
+    <property name="ignoreCase" value="true"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="InnerAssignment">
+      <subsection name="Description">
+        <p>
+          Checks for assignments in subexpressions, such as in <code>String s = Integer.toString(i = 2);</code>.
+        </p>
+
+        <p>
+          Rationale: With the exception of <code>for</code>
+          iterators, all assignments should occur in their own top-level
+          statement to increase readability.  With inner assignments like the
+          one given above, it is difficult to see all places where a variable is set.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>assignments to check</td>
+            <td>subset of tokens <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ASSIGN">ASSIGN</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BAND_ASSIGN">BAND_ASSIGN</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BOR_ASSIGN">BOR_ASSIGN</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BSR_ASSIGN">BSR_ASSIGN</a>,
+               <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BXOR_ASSIGN">BXOR_ASSIGN</a>,
+                <a
+                 href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DIV_ASSIGN">DIV_ASSIGN</a>,
+                 <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MINUS_ASSIGN">MINUS_ASSIGN</a>,
+                  <a
+                   href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MOD_ASSIGN">MOD_ASSIGN</a>,
+                   <a
+                    href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PLUS_ASSIGN">PLUS_ASSIGN</a>,
+                    <a
+                     href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SL_ASSIGN">SL_ASSIGN</a>,
+                     <a
+                      href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SR_ASSIGN">SR_ASSIGN</a>,
+                      <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STAR_ASSIGN">STAR_ASSIGN</a></td>
+            <td>all tokens</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="InnerAssignment"/>
+        </source>
+
+        <p>
+          To configure the check for only <code>=</code>, <code> +=</code>, and <code>-=</code> operators:
+        </p>
+        <source>
+<module name="InnerAssignment">
+    <property name="tokens" value="ASSIGN,PLUS_ASSIGN,MINUS_ASSIGN"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="MagicNumber">
+      <subsection name="Description">
+        <p>
+          Checks that there are no "magic numbers", where a magic
+          number is a numeric literal that is not defined as a constant. By
+          default, -1, 0, 1, and 2 are not considered to be magic numbers.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+            <td>subset of tokens NUM_DOUBLE, NUM_FLOAT, NUM_INT, NUM_LONG</td>
+            <td>all tokens</td>
+          </tr>
+          <tr>
+            <td>ignoreNumbers</td>
+            <td>non-magic numbers</td>
+            <td>list of numbers</td>
+            <td>-1, 0, 1, 2</td>
+          </tr>
+          <tr>
+            <td>ignoreHashCodeMethod</td>
+            <td>ignore magic numbers in hashCode methods</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><span class="default">false</span></td>
+          </tr>
+          <tr>
+            <td>ignoreAnnotation</td>
+            <td>ignore magic numbers in annotation declarations.</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><span class="default">false</span></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="MagicNumber"/>
+        </source>
+
+        <p>
+          To configure the check so that it checks floating-point numbers
+          that are not 0, 0.5, or 1:
+        </p>
+        <source>
+<module name="MagicNumber">
+    <property name="tokens" value="NUM_DOUBLE, NUM_FLOAT"/>
+    <property name="ignoreNumbers" value="0, 0.5, 1"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="MissingSwitchDefault">
+      <subsection name="Description">
+        <p>
+          Checks that switch statement has a "default" clause.
+        </p>
+
+        <p>
+          Rationale: It's usually a good idea to introduce a default case in
+          every switch statement. Even if the developer is sure that all
+          currently possible cases are covered, this should be expressed in
+          the default branch, e.g. by using an assertion. This way the code is
+          protected against later changes, e.g. introduction of new types in an
+          enumeration type.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="MissingSwitchDefault"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="ModifiedControlVariable">
+      <subsection name="Description">
+        <p>
+          Check for ensuring that for loop control variables are not
+          modified inside the for block. An example is:
+        </p>
+
+        <source>
+for (int i = 0; i < 1; i++) {
+    i++;
+}
+        </source>
+
+        <p>
+          Rationale: If the control variable is modified inside the loop
+          body, the program flow becomes more difficult to follow. An option
+          is to replace the for loop with a while loop.
+        </p>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="ModifiedControlVariable"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="RedundantThrows">
+      <subsection name="Description">
+        <p>
+          Checks for redundant exceptions declared in a <code>throws</code> clause such as
+          duplicates, unchecked exceptions or subclasses of another declared
+          exception.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>allowUnchecked</td>
+            <td>whether unchecked exceptions in throws are allowed or not</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>allowSubclasses</td>
+            <td> whether subclasses of another declared exception
+            are allowed in throws clause </td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>logLoadErrors</td>
+            <td>This check may need to load exception classes mentioned in
+            the @throws tag to check whether they are RuntimeExceptions.
+            If loading the class fails, this property allows controlling
+            Checkstyle's error handling. If set to <code>false</code> a
+            classpath configuration problem is assumed and the TreeWalker
+            stops operating on the class completely.
+            If set to <code>true</code> (the default), Checkstyle assumes a
+            typo or refactoring problem in the
+            javadoc and logs the problem in the normal Checkstyle report
+            (potentially masking a configuration error).</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+          <tr>
+            <td>suppressLoadErrors</td>
+            <td>When logLoadErrors is set to true, the TreeWalker completely
+            processes a class and displays any problems with loading exceptions
+            as Checkstyle violations.
+            When this property is set to true, the violations generated when
+            logLoadErrors is true are suppressed from being reported as
+            violations in the Checkstyle report.
+            </td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the default check:
+        </p>
+        <source>
+<module name="RedundantThrows"/>
+        </source>
+
+        <p>
+          To configure the check to allow unchecked exception in throws clause
+        </p>
+        <source>
+<module name="RedundantThrows">
+    <property name="allowUnchecked" value="true"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Note">
+        <p>
+          The classpath should be configured to locate the class
+          information. The classpath configuration is dependent on the
+          mechanism used to invoke Checkstyle.
+        </p>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="SimplifyBooleanExpression">
+      <subsection name="Description">
+        <p>
+          Checks for over-complicated boolean expressions. Currently finds
+          code like <code> if (b == true)</code>, <code>b || true</code>, <code>!false</code>,
+          etc.
+        </p>
+
+        <p>
+          Rationale: Complex boolean logic makes code hard to understand and
+          maintain.
+        </p>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="SimplifyBooleanExpression"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="SimplifyBooleanReturn">
+      <subsection name="Description">
+        <p>
+          Checks for over-complicated boolean return statements. For example
+          the following code
+        </p>
+        <source>
+if (valid())
+    return false;
+else
+    return true;
+        </source>
+
+        <p>
+          could be written as
+        </p>
+        <source>
+return !valid();
+        </source>
+
+        <p>
+          The idea for this Check has been shamelessly stolen from the
+          equivalent <a href="http://pmd.sourceforge.net">PMD</a> rule.
+        </p>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="SimplifyBooleanReturn"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="StringLiteralEquality">
+      <subsection name="Description">
+        <p>
+          Checks that string literals are not used with <code>==</code> or
+          <code>!=</code>.
+        </p>
+
+        <p>
+          Rationale: Novice Java programmers often use code like:
+        </p>
+        <source>
+if (x == "something")
+        </source>
+
+        <p>when they mean</p>
+        <source>
+if ("something".equals(x))
+        </source>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="StringLiteralEquality"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="NestedForDepth">
+      <subsection name="Description">
+        <p>
+          Restricts nested <code>for</code> blocks to a specified depth
+          (default = 1).
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>allowed nesting depth</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td><span class="default">1</span></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="NestedForDepth"/>
+        </source>
+
+        <p>
+          To configure the check to allow nesting depth 3:
+        </p>
+        <source>
+<module name="NestedForDepth">
+    <property name="max" value="3"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="NestedIfDepth">
+      <subsection name="Description">
+        <p>
+          Restricts nested if-else blocks to a specified depth (default = 1).
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>allowed nesting depth</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td><code>1</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="NestedIfDepth"/>
+        </source>
+
+        <p>
+          To configure the check to allow nesting depth 3:
+        </p>
+        <source>
+<module name="NestedIfDepth">
+    <property name="max" value="3"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="NestedTryDepth">
+      <subsection name="Description">
+        <p>
+          Restricts nested try blocks to a specified depth (default = 1).
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>allowed nesting depth</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td><code>1</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="NestedTryDepth"/>
+        </source>
+
+        <p>
+          To configure the check to allow nesting depth 3:
+        </p>
+        <source>
+<module name="NestedTryDepth">
+    <property name="max" value="3"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+
+    <section name="NoClone">
+      <subsection name="Description">
+       <p>
+       Checks that the clone method is not overridden from the
+       Object class.
+       </p>
+
+       <p>
+       Rationale: The clone method relies on strange, hard to follow rules that
+       are difficult to get right and do not work in all situations.
+       In some cases, either a copy constructor
+       or a static factory method can be used instead of the clone method
+       to return copies of an object.
+       For more information on rules for the clone method and its issues, see Effective Java:
+       Programming Language Guide First Edition by Joshua Bloch
+       pages 45-52.
+       </p>
+
+       <p>
+       This check is almost exactly the same as the {@link NoFinalizerCheck}
+       </p>
+      </subsection>
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="NoClone"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="NoFinalizer">
+      <subsection name="Description">
+        <p>
+          Verifies there are no <code>finalize()</code> methods
+          defined in a class.
+        </p>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="NoFinalizer"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="SuperClone">
+      <subsection name="Description">
+        <p>
+          Checks that an overriding <code>clone()</code> method
+          invokes <code>super.clone()</code>.
+        </p>
+
+        <p>
+          Reference: <a
+          href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#clone()">Object.clone()</a>.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="SuperClone"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="SuperFinalize">
+      <subsection name="Description">
+        <p>
+          Checks that an overriding <code>finalize()</code>
+          method invokes <code>super.finalize()</code>.
+        </p>
+
+        <p>
+          Reference: <a
+          href="http://java.sun.com/docs/books/tutorial/java/data/garbagecollection.html">Cleaning
+          Up Unused Objects</a>.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="SuperFinalize"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="IllegalCatch">
+      <subsection name="Description">
+        <p>
+        Checks that certain exception types do not appear in a <code>catch</code> statement.
+        </p>
+
+        <p>
+          Rationale:
+          Catching java.lang.Exception, java.lang.Error or
+          java.lang.RuntimeException is almost never acceptable.
+          Novice developers often simply catch Exception in an
+          attempt to handle multiple exception classes. This unfortunately
+          leads to code that inadvertently catches NullPointerException, OutOfMemoryError, etc.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>illegalClassNames</td>
+            <td>exception class names to reject</td>
+            <td><a href="property_types.html#stringSet">list of strings</a></td>
+            <td><code>"java.lang.Exception,
+            java.lang.Throwable, java.lang.RuntimeException"</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="IllegalCatch"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="IllegalThrows">
+      <subsection name="Description">
+        <p>
+          This check can be used to ensure that types are not declared
+          to be thrown. Declaring that a method throws java.lang.Error or
+          java.lang.RuntimeException is almost never acceptable.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>illegalClassNames</td>
+            <td>throw class names to reject</td>
+            <td><a href="property_types.html#stringSet">list of strings</a></td>
+            <td>
+              <code>"java.lang.Throwable,
+              java.lang.Error, java.lang.RuntimeException"</code>
+            </td>
+          </tr>
+          <tr>
+            <td>ignoredMethodNames</td>
+            <td>names of methods to ignore</td>
+            <td><a href="property_types.html#stringSet">list of strings</a></td>
+            <td><code>finalize</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="IllegalThrows"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="PackageDeclaration">
+      <subsection name="Description">
+        <p>
+          Ensures that a class has a package declaration, and (optionally) whether
+          the package name matches the directory name for the source file.
+        </p>
+
+        <p>
+          Rationale: Classes that live in the null package cannot be
+          imported. Many novice developers are not aware of this.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>ignoreDirectoryName</td>
+            <td>
+              whether to ignore checking that the package declaration matches
+              the source directory name
+            </td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="PackageDeclaration"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="JUnitTestCase">
+      <subsection name="Description">
+        <p>
+          Ensures that the <code>setUp()</code> and <code>tearDown()</code> methods are named correctly,
+          have no arguments, return void and are either public or
+          protected.
+        </p>
+
+        <p>
+          Also ensures that <code>suite()</code> is named correctly, has no arguments,
+          returns junit.framework.Test, and is public and static.
+        </p>
+
+        <p>
+          Rationale: Developers will often misname one or more of these
+          methods and not realise that the method is not being called.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="JUnitTestCase"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="ReturnCount">
+      <subsection name="Description">
+        <p>
+          Restricts the number of return statements (2 by default).  Ignores
+          specified methods (<code>equals()</code> by default).
+        </p>
+
+        <p>
+          Rationale: Too many return points can mean that code is
+          attempting to do too much or may be difficult to understand.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>maximum allowed number of return statements</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td><code>2</code></td>
+          </tr>
+          <tr>
+            <td>format</td>
+            <td>method names to ignore</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>^equals$</code> (empty)</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check so that it doesn't allow more than three
+          return statements per method (ignoring the <code>equals()</code>
+          method):
+        </p>
+        <source>
+<module name="ReturnCount">
+    <property name="max" value="3"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check so that it doesn't allow more than three
+          return statements per method for all methods:
+        </p>
+        <source>
+<module name="ReturnCount">
+    <property name="max" value="3"/>
+    <property name="format" value="^$"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="IllegalType">
+      <subsection name="Description">
+        <p>
+          Checks that particular classes are never used as types in variable
+          declarations, return values or parameters. Includes a pattern check
+          that by default disallows abstract classes.
+        </p>
+
+        <p>
+          Rationale: Helps reduce coupling on concrete classes. In addition
+          abstract classes should be thought of as convenient base class
+          implementations of interfaces, and as such, are not types themselves.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PARAMETER_DEF">PARAMETER_DEF</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>
+            </td>
+
+            <td>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PARAMETER_DEF">PARAMETER_DEF</a>,
+               <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>
+               <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>
+            </td>
+          </tr>
+          <tr>
+            <td>illegalClassNames</td>
+            <td>Classes that should not be used as types in variable
+            declarations, return values or parameters</td>
+            <td><a href="property_types.html#stringSet">String Set</a></td>
+            <td>"java.util.GregorianCalendar, java.util.Hashtable,
+            java.util.HashSet, java.util.HashMap, java.util.ArrayList,
+            java.util.LinkedList, java.util.LinkedHashMap,
+            java.util.LinkedHashSet, java.util.TreeSet,
+            java.util.TreeMap, java.util.Vector"</td>
+          </tr>
+          <tr>
+          <td>legalAbstractClassNames</td>
+          <td>Abstract classes that may be used as types. </td>
+          <td><a href="property_types.html#stringSet">String Set</a></td>
+          <td></td>
+        </tr>
+        <tr>
+            <td>ignoredMethodNames</td>
+            <td>Methods that should not be checked.</td>
+            <td><a href="property_types.html#stringSet">String Set</a></td>
+            <td>"getInitialContext, getEnvironment" </td>
+          </tr>
+          <tr>
+            <td>format</td>
+            <td>Pattern for illegal class names.</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>^(.*[\\.])?Abstract.*$</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check so that it ignores getInstance() methods:
+        </p>
+        <source>
+<module name="IllegalType">
+    <property name="ignoredMethodNames" value="getInstance"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="DeclarationOrder">
+      <subsection name="Description">
+        <p>
+          According to <a
+          href="http://java.sun.com/docs/codeconv/html/CodeConventions.doc2.html#1852">
+          Code Conventions for the Java Programming Language</a> , the parts
+          of a class or interface declaration should appear in the following
+          order:
+        </p>
+
+        <ol>
+          <li>
+            Class (static) variables. First the public class variables, then
+             protected, then package level (no access modifier), and then
+             private.
+          </li>
+          <li>
+            Instance variables. First the public class variables, then
+            protected, then package level (no access modifier), and then
+            private.
+          </li>
+          <li> Constructors </li>
+          <li> Methods </li>
+        </ol>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>ignoreConstructors</td>
+            <td>whether to ignore constructors</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>ignoreMethods</td>
+            <td>whether to ignore methods</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>ignoreModifiers</td>
+            <td>whether to ignore modifiers</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="DeclarationOrder"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="ParameterAssignment">
+      <subsection name="Description">
+        <p> Disallows assignment of parameters.</p>
+        <p>
+          Rationale: Parameter assignment is often considered poor programming
+          practice. Forcing developers to declare parameters as final is often
+          onerous. Having a check ensure that parameters are never assigned
+          would give the best of both worlds.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="ParameterAssignment"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="ExplicitInitialization">
+      <subsection name="Description">
+        <p>
+          Checks if any class or object member is explicitly initialized to
+          default for its type value (<code>null</code> for
+          object references, zero for numeric types and <code>char</code> and <code>false</code> for
+          <code>boolean</code>.
+        </p>
+
+        <p>
+          Rationale: Each instance variable gets initialized twice, to the
+          same value.  Java initializes each instance variable to its default
+          value (0 or null) before performing any initialization specified in
+          the code.  So in this case, x gets initialized to 0 twice, and bar
+          gets initialized to null twice.  So there is a minor inefficiency.
+          This style of coding is a holdover from C/C++ style coding, and it
+          shows that the developer isn't really confident that Java
+          initializes instance variables to default values.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="ExplicitInitialization"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="DefaultComesLast">
+      <subsection name="Description">
+        <p>
+          Check that the <code>default</code> is after all the
+          <code>case</code>s in a <code>switch</code> statement.
+        </p>
+
+        <p>
+          Rationale: Java allows <code>default</code> anywhere
+          within the <code>switch</code> statement. But it is
+          more readable if it comes after the last <code>case</code>.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="DefaultComesLast"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="MissingCtor">
+      <subsection name="Description">
+        <p>
+          Checks that classes (except abstract ones) define a constructor and don't
+          rely on the default one.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="MissingCtor"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="FallThrough">
+      <subsection name="Description">
+        <p>
+          Checks for fall-through in <code>switch</code>
+          statements. Finds locations where a <code>case</code>
+          contains Java code but lacks a <code>break</code>, <code>return</code>,
+          <code>throw</code> or <code>continue</code>
+          statement.
+        </p>
+        <p>
+          The check honors special comments to suppress the warning. By
+          default the text "fallthru", "fall through", "fallthrough",
+          "falls through" and "fallsthrough" are recognized (case
+          sensitive). The comment containing these words must be all on one line, and must
+          be on the last non-empty line before the
+          <code>case</code> triggering the warning or on
+          the same line before the <code>case</code>
+          (ugly, but possible).
+        </p>
+        <source>
+switch (i){
+case 0:
+    i++; // fall through
+
+case 1:
+    i++;
+    // falls through
+case 2: {
+    i++;
+}
+// fallthrough
+case 3:
+    i++;
+/* fallthru */case 4:
+    i++
+    break;
+}
+        </source>
+        <p>
+          Note: The check assumes that there is no unreachable
+          code in the <code>case</code>.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>checkLastCaseGroup</td>
+            <td>
+              Whether the last case group must be checked.
+            </td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>reliefPattern</td>
+            <td>
+              Regular expression to match the relief comment that suppresses
+              the warning about a fall through.
+            </td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>fallthru|falls? ?through</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="FallThrough"/>
+        </source>
+        <p>
+          or
+        </p>
+        <source>
+<module name="FallThrough">
+    <property name="reliefPattern" value="continue in next case"/>
+<module name="FallThrough"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="MultipleStringLiterals">
+      <subsection name="Description">
+        <p>
+          Checks for multiple occurrences of the same string literal within a
+          single file.
+        </p>
+
+        <p>
+          Rationale: Code duplication makes maintenance more difficult, so it
+          can be better to replace the multiple occurrences with a constant.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>allowedDuplicates</td>
+            <td>
+              The maximum number of occurrences to allow without generating a
+              warning
+            </td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td>1</td>
+          </tr>
+          <tr>
+            <td>ignoreStringsRegexp</td>
+            <td>
+              Regular expression pattern for ignored strings (with quotation marks)
+            </td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>^""$</code> (ignore empty strings)</td>
+          </tr>
+          <tr>
+            <td>ignoreOccurrenceContext</td>
+            <td>
+              Token type names where duplicate strings are ignored even if they don't match
+              ignoredStringsRegexp. This allows you to exclude syntactical contexts like
+              annotations or static initializers from the check.
+            </td>
+            <td>
+              <a href="property_types.html#stringSet">list</a> of
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html">token type</a>
+              names
+            </td>
+            <td>
+              <code>ANNOTATION</code>
+              (ignore strings inside the context of an annotation)
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="MultipleStringLiterals"/>
+        </source>
+
+        <p>
+          To configure the check so that it allows two occurrences of each
+          string:
+        </p>
+        <source>
+<module name="MultipleStringLiterals">
+    <property name="allowedDuplicates" value="2"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check so that it ignores ", " and empty strings:
+        </p>
+        <source>
+<module name="MultipleStringLiterals">
+    <property name="ignoreStringsRegexp" value='^(("")|(", "))$'/>
+</module>
+        </source>
+
+        <p>
+          To configure the check so that it flags duplicate strings in all
+          syntactical contexts, even in annotations like
+          <code>@SuppressWarnings("unchecked")</code>:
+        </p>
+        <source>
+<module name="MultipleStringLiterals">
+    <property name="ignoreOccurrenceContext" value=""/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="MultipleVariableDeclarations">
+      <subsection name="Description">
+        <p>
+          Checks that each variable declaration is in its own statement and on
+          its own line.
+        </p>
+
+        <p>
+          Rationale: <a
+          href="http://java.sun.com/docs/codeconv/html/CodeConventions.doc5.html#2991">
+          the Java code conventions chapter 6.1</a> recommends that
+          declarations should be one per line/statement.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="MultipleVariableDeclarations"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="RequireThis">
+      <subsection name="Description">
+        <p>
+          Checks that references to instance variables and methods of the present
+          object are explicitly of the form "this.varName" or
+          "this.methodName(args)" and that those references don't
+          rely on the default behavior when "this." is absent.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>checkFields</td>
+            <td>Whether to check references to fields.</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+          <tr>
+            <td>checkMethods</td>
+            <td>Whether to check references to methods.</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the default check:
+        </p>
+        <source>
+<module name="RequireThis"/>
+        </source>
+
+        <p>
+          To configure to check the <code>this</code> qualifier for fields only:
+        </p>
+        <source>
+<module name="RequireThis">
+    <property name="checkMethods" value="false"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="UnnecessaryParentheses">
+      <subsection name="Description">
+        <p>
+          Checks for the use of unnecessary parentheses.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="UnnecessaryParentheses"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="OneStatementPerLine">
+      <subsection name="Description">
+        <p>
+          Checks that there is only one statement per line. The following line
+          will be flagged as an error:
+        </p>
+
+        <source>    x = 1; y = 2; // Two statements on a single line.</source>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="OneStatementPerLine"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="VariableDeclarationUsageDistance">
+      <subsection name="Description">
+        <p>
+          Checks the distance between declaration of variable and its first usage.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+
+          <tr>
+            <td>allowedDistance</td>
+            <td>A distance between declaration of variable and its first usage</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td>3</td>
+          </tr>
+
+          <tr>
+            <td>ignoreVariablePattern</td>
+            <td>pattern for ignoring the distance calculation</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td>(not applied)</td>
+          </tr>
+
+          <tr>
+            <td>validateBetweenScopes</td>
+            <td>Allows to calculate the distance between declaration of variable and its first usage in the different scopes.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+
+          <tr>
+            <td>ignoreFinal</td>
+            <td>Allows to ignore variables with a 'final' modifier.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          Example #1:
+        </p>
+        <source>
+int count;
+a = a + b;
+b = a + a;
+count = b; // DECLARATION OF VARIABLE 'count'
+           // SHOULD BE HERE (distance = 3)
+        </source>
+        <p>
+          Example #2:
+        </p>
+        <source>
+int count;
+{
+     a = a + b;
+     count = b; // DECLARATION OF VARIABLE 'count'
+                // SHOULD BE HERE (distance = 2)
+}
+        </source>
+        <p>
+          Check can detect a block of initialization methods. If a variable is used in
+          such a block and there is no other statements after this variable then distance=1.
+        </p>
+        <p>
+          Case #1:
+        </p>
+        <source>
+int minutes = 5;
+Calendar cal = Calendar.getInstance();
+cal.setTimeInMillis(timeNow);
+cal.set(Calendar.SECOND, 0);
+cal.set(Calendar.MILLISECOND, 0);
+cal.set(Calendar.HOUR_OF_DAY, hh);
+cal.set(Calendar.MINUTE, minutes);
+        </source>
+        <p>
+          The distance for the variable minutes is 1 even
+          though this variable is used in the fifth method's call.
+        </p>
+        <p>
+          Case #2:
+        </p>
+        <source>
+int minutes = 5;
+Calendar cal = Calendar.getInstance();
+cal.setTimeInMillis(timeNow);
+cal.set(Calendar.SECOND, 0);
+cal.set(Calendar.MILLISECOND, 0);
+System.out.println(cal);
+cal.set(Calendar.HOUR_OF_DAY, hh);
+cal.set(Calendar.MINUTE, minutes);
+         </source>
+         <p>
+           The distance for the variable minutes is 6 because there is one more expression
+           (except the initialization block) between the declaration of this variable and its usage.
+         </p>
+         <p>
+           An example how to configure this Check:
+         </p>
+         <source>
+<module name="VariableDeclarationUsageDistance"/>
+         </source>
+         <p>
+           An example of how to configure this Check:
+            - to set the allowed distance to 4;
+            - to ignore variables with prefix '^temp';
+            - to force the validation between scopes;
+            - to check the final variables;
+         </p>
+         <source>
+<module name="VariableDeclarationUsageDistance">
+    <property name="allowedDistance" value="4">
+    <property name="ignoreVariablePattern" value="^temp.*">
+    <property name="validateBetweenScopes" value="true">
+    <property name="mIgnoreFinal" value="false">
+</module>
+         </source>
+      </subsection>
+      <subsection name="Note">
+        <p>
+          ATTENTION!! (Not supported cases)
+        </p>
+        <source>
+ Case #1:
+ {
+ int c;
+ int a = 3;
+ int b = 2;
+     {
+     a = a + b;
+     c = b;
+     }
+ }
+        </source>
+        <p>
+          Distance for variable 'a' = 1;
+          Distance for variable 'b' = 1;
+          Distance for variable 'c' = 2.
+         </p>
+         <p>
+           As distance by default is 1 the Check doesn't raise warning for
+           variables 'a' and 'b' to move them into the block.
+         </p>
+         <p>
+           Case #2:
+         </p>
+         <source>
+ int sum = 0;
+ for (int i = 0; i < 20; i++) {
+     a++;
+     b--;
+     sum++;
+     if (sum > 10) {
+         res = true;
+     }
+ }
+         </source>
+         <p>
+           Distance for variable 'sum' = 3.
+         </p>
+         <p>
+           As the distance is more then the default one, the Check
+           raises warning for variable 'sum' to move it into the 'for(...)' block.
+           But there is situation when variable 'sum' hasn't to be 0 within each iteration.
+           So, to avoid such warnings you can use Suppression Filter, provided by
+           Checkstyle, for the whole class.
+         </p>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+        <section name="OverloadMethodsDeclarationOrder">
+      <subsection name="Description">
+        <p>
+          Checks that overload methods are grouped together.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          Example of incorrect grouping overload methods:
+        </p>
+        <source>
+public void foo(int i) {}
+public void foo(String s) {}
+public void notFoo() {} // Have to be after foo(int i, String s)
+public void foo(int i, String s) {}
+        </source>
+        <p>
+          An example of how to configure the check is:
+        </p>
+        <source>
+<module name="OverloadMethodsDeclarationOrder"/>
+        </source>
+        </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.coding
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+  </body>
+</document>
diff --git a/src/xdocs/config_design.xml b/src/xdocs/config_design.xml
new file mode 100644
index 0000000..dac5c56
--- /dev/null
+++ b/src/xdocs/config_design.xml
@@ -0,0 +1,541 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Class Design</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+    <section name="VisibilityModifier">
+      <subsection name="Description">
+        <p>
+          Checks visibility of class members. Only static final members
+          may be public; other class members must be private unless the
+          property <code>protectedAllowed</code> or <code>packageAllowed</code> is set.
+        </p>
+
+        <p>
+          Public members are not flagged if the name matches the public
+          member regular expression (contains <code>"^serialVersionUID$"</code> by default).
+        </p>
+        <p>Note that
+          Checkstyle 2 used to include <code>"^f[A-Z][a-zA-Z0-9]*$"</code> in the default
+          pattern to allow names used in container-managed persistence for Enterprise JavaBeans (EJB) 1.1 with the default settings.
+          With EJB 2.0 it is no longer necessary to have public access
+          for persistent fields, so the default has been changed.
+        </p>
+
+        <p>
+          Rationale: Enforce encapsulation.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>packageAllowed</td>
+            <td>whether package visible members are allowed</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>protectedAllowed</td>
+            <td>whether protected members are allowed</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>publicMemberPattern</td>
+            <td>pattern for public members that should be ignored</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>^serialVersionUID$</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="VisibilityModifier"/>
+        </source>
+
+        <p>
+          To configure the check so that it allows package visible members:
+        </p>
+        <source>
+<module name="VisibilityModifier">
+    <property name="packageAllowed" value="true"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check so that it allows no public members:
+        </p>
+        <source>
+<module name="VisibilityModifier">
+    <property name="publicMemberPattern" value="^$"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.design
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="FinalClass">
+      <subsection name="Description">
+        <p>
+          Checks that a class which has only private constructors is declared
+          as final.
+        </p>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="FinalClass"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.design
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="InterfaceIsType">
+      <subsection name="Description">
+        <p>
+          Implements Joshua Bloch, Effective Java, Item 17 - Use Interfaces only to
+          define types.
+        </p>
+
+        <p>
+          According to Bloch, an interface should describe a <em>type</em>.
+          It is therefore inappropriate to define an interface that does not
+          contain any methods but only constants. The Standard class <a
+          href="http://java.sun.com/j2se/1.4.1/docs/api/javax/swing/SwingConstants.html">javax.swing.SwingConstants</a>
+          is an example of a class that would be flagged by this check.
+        </p>
+
+        <p>
+          The check can be configured to also disallow marker interfaces like
+          <code>java.io.Serializable</code>, that do not contain methods or
+          constants at all.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>allowMarkerInterfaces</td>
+            <td>
+              Controls whether marker interfaces like Serializable are
+              allowed.
+            </td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="InterfaceIsType"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.design
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="HideUtilityClassConstructor">
+      <subsection name="Description">
+        <p>
+          Makes sure that utility classes (classes that contain only static
+          methods or fields in their API) do not have a public constructor.
+        </p>
+
+        <p>
+          Rationale: Instantiating utility classes does not make sense.  Hence
+          the constructors should either be private or (if you want to allow
+          subclassing) protected. A common mistake is forgetting to hide the
+          default constructor.
+        </p>
+
+        <p>
+          If you make the constructor protected you may want to consider the
+          following constructor implementation technique to disallow
+          instantiating subclasses:
+        </p>
+
+        <source>
+public class StringUtils // not final to allow subclassing
+{
+    protected StringUtils() {
+        // prevents calls from subclass
+        throw new UnsupportedOperationException();
+    }
+
+    public static int count(char c, String s) {
+        // ...
+    }
+}
+        </source>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="HideUtilityClassConstructor"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.design
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="DesignForExtension">
+      <subsection name="Description">
+        <p>
+          Checks that classes are designed for extension.  More specifically,
+          it enforces a programming style where superclasses provide empty
+          "hooks" that can be implemented by subclasses.
+        </p>
+
+        <p>
+          The exact rule is that nonprivate, nonstatic methods of classes that
+          can be subclassed must
+        </p>
+
+        <ul>
+          <li>be abstract or</li>
+          <li>be final or</li>
+          <li>have an empty implementation.</li>
+        </ul>
+
+        <p>
+          Rationale: This API design style protects superclasses against
+          being broken by subclasses. The downside is that subclasses are
+          limited in their flexibility, in particular they cannot prevent
+          execution of code in the superclass, but that also means that
+          subclasses cannot corrupt the state of the superclass by forgetting
+          to call the superclass's method.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <p> None.</p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+
+        <source>
+<module name="DesignForExtension"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.design
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="MutableException">
+      <subsection name="Description">
+        <p>
+          Ensures that exception classes (classes with names conforming to
+          some regular expression) are immutable, that is, that they have only final
+          fields.
+        </p>
+
+        <p>
+          The current algorithm is very simple: it checks that all members of
+          exception are final.  The user can still mutate an exception's instance
+          (e.g. Throwable has a method called <code>setStackTrace</code>
+          which changes the exception's stack trace).  But, at least, all information
+          provided by this exception type is unchangable.
+        </p>
+
+        <p>
+          Rationale: Exception instances should represent an error
+          condition. Having non final fields not only allows the state to be
+          modified by accident and therefore mask the original condition but
+          also allows developers to accidentally forget to set the initial state.
+          In both cases, code catching the exception could draw incorrect
+          conclusions based on the state.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>format</td>
+            <td>pattern for exception class names</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>^.*Exception$|^.*Error$</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="MutableException"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.design
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="ThrowsCount">
+      <subsection name="Description">
+        <p>
+          Restricts throws statements to a specified count (1 by default).
+        </p>
+
+        <p>
+          Rationale: Exceptions form part of a method's interface. Declaring a
+          method to throw too many differently rooted exceptions makes
+          exception handling onerous and leads to poor programming practices
+          such as writing code like <code>catch(Exception ex)</code>. This check forces developers to put
+          exceptions into a hierarchy such that in the simplest case, only one
+          type of exception need be checked for by a caller but any
+          subclasses can be caught specifically if necessary.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>maximum allowed number of throws statements</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td><code>1</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check so that it doesn't allow more than two throws
+          per method:
+        </p>
+        <source>
+<module name="ThrowsCount">
+    <property name="max" value="2"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.design
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="InnerTypeLast">
+      <subsection name="Description">
+        <p>
+          Check nested (inner) classes/interfaces are declared at the
+          bottom of the class after all method and field declarations.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="InnerTypeLast"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.design
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="OneTopLevelClass">
+      <subsection name="Description">
+        <p>
+          Checks that each top-level class, interface or
+          enum resides in a source file of its own.
+          Official description of a 'top-level' term:<a
+          href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-7.html#jls-7.6">7.6. Top Level Type Declarations</a>.
+          If file doesn't contains public class, enum or interface,
+          top-level type is the first type in file.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          An example of check's configuration:
+        </p>
+        <source>
+<module name="OneTopLevelClass"/>
+        </source>
+        <p>
+          An example of check's configuration applied only to classes:
+        </p>
+        <source>
+<module name="OneTopLevelClass">
+    <property name="tokens" value="CLASS_DEF">
+</module>
+        </source>
+        <p>
+          An example of code with violations:
+        </p>
+        <source>
+public class Foo{
+    //methods
+}
+
+class Foo2{
+    //methods
+}
+        </source>
+        <p>
+          An example of code without public top-level type:
+        </p>
+        <source>
+class Foo{ // top-level class
+    //methods
+}
+
+class Foo2{
+    //methods
+}
+        </source>
+        <p>
+          An example of code without violations:
+        </p>
+        <source>
+public class Foo{
+    //methods
+}
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.design
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/config_duplicates.xml b/src/xdocs/config_duplicates.xml
new file mode 100644
index 0000000..d1d7c5f
--- /dev/null
+++ b/src/xdocs/config_duplicates.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+<properties>
+<title>Duplicate code</title>
+<author>Checkstyle Development Team</author>
+</properties>
+<body>
+<section name="Duplicate code">
+<p>
+Duplicate code detection allows you to find
+code that has been generated by Copy/Paste programming. Duplicate code typically
+leads to higher maintenance costs because bugs will need to be fixed twice,
+more code needs to be tested, and so on.
+</p>
+<p>
+There are many trade-offs when writing a duplicate code detection tool.
+Some of the conflicting goals are:
+</p>
+<ul>
+<li>Speed</li>
+<li>Low memory usage</li>
+<li>Avoiding false alarms</li>
+<li>Support for arbitrary programming languages (Java, JSP, C++, ...)</li>
+<li>Support for fuzzy matches (comments, whitespace, linebreaks, variable renaming, etc.)</li>
+</ul>
+
+<p>
+The check provided here, StrictDuplicateCode, is fast enough to facilitate checking very large code
+bases in acceptable time (minutes). It consumes very little memory, false
+alarms are impossible. While it supports multiple
+languages, it does not support fuzzy matches (that's why it's called Strict).
+</p>
+<p>
+Note that there are brilliant commercial implementations of duplicate code
+detection tools. One that is particularly noteworthy is
+<a href="http://www.redhillconsulting.com.au/products/simian/">Simian</a>
+from RedHill Consulting, Inc.
+Simian has managed to find a very good balance of the above tradeoffs.
+It is superior to the checks in this package in many respects.
+Simian is reasonably priced (free for noncommercial projects)
+and includes a Checkstyle plugin. We encourage all users of Checkstyle to evaluate Simian as an
+alternative to the Checks we offer in our distribution.
+</p>
+<p>
+The following table summarizes the characteristics of the available
+Checkstyle plugins for duplicate code detection:
+</p>
+
+<table>
+  <tr>
+    <th>Name</th>
+    <th>Speed</th>
+    <th>Memory Usage</th>
+    <th>False Alarms</th>
+    <th>Supported languages</th>
+    <th>Fuzzy matches</th>
+  </tr>
+  <tr>
+    <td>StrictDuplicateCode</td>
+    <td>High</td>
+    <td>Very Low</td>
+    <td>Impossible</td>
+    <td>any language</td>
+    <td>No</td>
+  </tr>
+  <tr>
+    <td>Simian</td>
+    <td>Very high</td>
+    <td>Low</td>
+    <td>Possible but very unlikely</td>
+    <td>many languages, including Java and C/C++/C#</td>
+    <td>Limited support</td>
+  </tr>
+</table>
+
+<p>
+</p>
+</section>
+<section name="StrictDuplicateCode">
+<p>
+ Performs a line-by-line comparison of all code lines and reports
+ duplicate code if a sequence of lines differs only in
+ indentation.  All import statements in Java code are ignored, any
+ other line - including javadoc, whitespace lines between methods,
+ etc. - is considered (which is why the check is called
+ <em>strict</em>).
+ </p>
+
+ <subsection name="Properties">
+ <table>
+   <tr>
+     <th>name</th>
+     <th>description</th>
+     <th>type</th>
+     <th>default value</th>
+   </tr>
+   <tr>
+     <td>min</td>
+     <td>how many lines must be equal to be considered a duplicate</td>
+     <td><a href="property_types.html#integer">int</a></td>
+     <td><code>12</code></td>
+   </tr>
+   <tr>
+     <td>fileExtensions</td>
+     <td>file type extension of files to process</td>
+     <td><a href="property_types.html#stringSet">String Set</a></td>
+     <td><code>{}</code></td>
+   </tr>
+ </table>
+ </subsection>
+
+ <subsection name="Examples">
+ <p> To configure the check: </p>
+ <source>
+ <module name="StrictDuplicateCode"/>
+ </source>
+
+ <p>
+ To configure the check so that it allows larger equivalent blocks:
+ </p>
+ <source>
+ <module name="StrictDuplicateCode">
+   <property name="min" value="15"/>
+ </module>
+ </source>
+ </subsection>
+
+ <subsection name="Package">
+ <p>com.puppycrawl.tools.checkstyle.checks.duplicates</p>
+ </subsection>
+
+ <subsection name="Parent Module">
+ <p>
+ <a href="config.html#Checker">Checker</a>
+ </p>
+ </subsection>
+</section>
+
+</body>
+</document>
diff --git a/src/xdocs/config_header.xml b/src/xdocs/config_header.xml
new file mode 100644
index 0000000..b8a5d44
--- /dev/null
+++ b/src/xdocs/config_header.xml
@@ -0,0 +1,306 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Headers</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+    <section name="Header">
+      <subsection name="Description">
+        <p>
+          Checks that a source file begins with a specified header. Property
+          <code> headerFile</code> specifies a file that contains
+          the required header.  Alternatively, the header specification can be
+          set directly in the <code>header</code> property
+          without the need for an external file.
+        </p>
+
+        <p>
+          Property <code>ignoreLines</code> specifies the line
+          numbers to ignore when matching lines in a header file. This
+          property is very useful for supporting headers that contain
+          copyright dates. For example, consider the following header:
+        </p>
+
+        <source>
+line 1: ////////////////////////////////////////////////////////////////////
+line 2: // checkstyle:
+line 3: // Checks Java source code for adherence to a set of rules.
+line 4: // Copyright (C) 2002  Oliver Burn
+line 5: ////////////////////////////////////////////////////////////////////
+        </source>
+
+        <p>
+          Since the year information will change over time, you can tell
+          Checkstyle to ignore line 4 by setting property <code>ignoreLines</code> to <code> 4</code>.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>headerFile</td>
+            <td>name of the file containing the required header</td>
+            <td><a href="property_types.html#string">string</a></td>
+            <td><code>null</code></td>
+          </tr>
+          <tr>
+            <td>charset</td>
+            <td>character encoding to use when reading the headerFile</td>
+            <td><a href="property_types.html#string">string</a></td>
+            <td>the charset property of the parent
+            <a href="config.html#Checker">Checker</a> module</td>
+          </tr>
+          <tr>
+            <td>header</td>
+            <td>
+              the required header specified inline. Individual header lines
+              must be separated by the string <code>"\n"</code> (even on platforms with a
+              different line separator), see examples below.
+            </td>
+            <td><a href="property_types.html#string">string</a></td>
+            <td><code>null</code></td>
+          </tr>
+          <tr>
+            <td>ignoreLines</td>
+            <td>line numbers to ignore</td>
+            <td><a href="property_types.html#intSet">list of integers</a></td>
+            <td><code>{}</code></td>
+          </tr>
+          <tr>
+            <td>fileExtensions</td>
+            <td>file type extension of files to process</td>
+            <td><a href="property_types.html#stringSet">String Set</a></td>
+            <td><code>{}</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check to use header file <code>"java.header"</code> and ignore lines <code>2</code>, <code>3</code>, and <code> 4</code> and only process Java files:
+        </p>
+
+        <source>
+<module name="Header">
+    <property name="headerFile" value="java.header"/>
+    <property name="ignoreLines" value="2, 3, 4"/>
+    <property name="fileExtensions" value="java"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check to verify that each file starts with the
+          header
+        </p>
+        <source>
+// Copyright (C) 2004 MyCompany
+// All rights reserved
+        </source>
+
+        <p>
+          without the need for an external header file:
+        </p>
+        <source>
+<module name="Header">
+    <property name="header"
+              value="// Copyright (C) 2004 MyCompany\n// All rights reserved"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p> com.puppycrawl.tools.checkstyle.checks.header </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#Checker">Checker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="RegexpHeader">
+      <subsection name="Description">
+        <p>
+          Checks the header of a source file against a header that contains a
+          <a
+          href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">regular
+          expression</a> for each line of the source header.
+        </p>
+
+        <p>
+          Rationale: In some projects <a href="#Header">checking against a
+          fixed header</a> is not sufficient, e.g. the header might require a
+          copyright line where the year information is not static.
+        </p>
+
+        <p>
+          For example, consider the following header:
+        </p>
+        <source>
+line  1: ^/{71}$
+line  2: ^// checkstyle:$
+line  3: ^// Checks Java source code for adherence to a set of rules\.$
+line  4: ^// Copyright \(C\) \d\d\d\d  Oliver Burn$
+line  5: ^// Last modification by \$Author.*\$$
+line  6: ^/{71}$
+line  7:
+line  8: ^package
+line  9:
+line 10: ^import
+line 11:
+line 12: ^/\*\*
+line 13: ^ \*([^/]|$)
+line 14: ^ \*/
+        </source>
+
+        <p>
+          Lines 1 and 6 demonstrate a more compact notation for 71 '/'
+          characters. Line 4 enforces that the copyright notice includes a
+          four digit year. Line 5 is an example how to enforce revision
+          control keywords in a file header. Lines 12-14 is a template for
+          javadoc (line 13 is so complicated to remove conflict with and of
+          javadoc comment).
+        </p>
+
+        <p>
+          Different programming languages have different comment syntax
+          rules, but all of them start a comment with a non-word
+          character. Hence you can often use the non-word character
+          class to abstract away the concrete comment syntax and allow
+          checking the header for different languages with a single
+          header definition.  For example, consider the following header
+          specification (note that this is not the full Apache license
+          header):
+        </p>
+        <source>
+line 1: ^#!
+line 2: ^<\?xml.*>$
+line 3: ^\W*$
+line 4: ^\W*Copyright 2006 The Apache Software Foundation or its licensors, as applicable\.$
+line 5: ^\W*Licensed under the Apache License, Version 2\.0 \(the "License"\);$
+line 6: ^\W*$
+        </source>
+
+        <p>
+          Lines 1 and 2 leave room for technical header lines, e.g. the
+          "#!/bin/sh" line in Unix shell scripts, or the XML file header
+          of XML files.  Set the multiline property to "1, 2" so these
+          lines can be ignored for file types where they do no apply.
+          Lines 3 through 6 define the actual header content. Note how
+          lines 2, 4 and 5 use escapes for characters that have special
+          regexp semantics.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>headerFile</td>
+            <td>name of the file containing the required header</td>
+            <td><a href="property_types.html#string">string</a></td>
+            <td><code>null</code></td>
+          </tr>
+          <tr>
+            <td>charset</td>
+            <td>character encoding to use when reading the headerFile</td>
+            <td><a href="property_types.html#string">string</a></td>
+            <td>the charset property of the parent
+            <a href="config.html#Checker">Checker</a> module</td>
+          </tr>
+          <tr>
+            <td>header</td>
+            <td>
+              the required header specified inline. Individual header lines
+              must be separated by the string <code>"\n"</code> (even on platforms with a
+              different line separator), and regular expressions must not span
+              multiple lines.
+            </td>
+            <td><a href="property_types.html#string">string</a></td>
+            <td><code>null</code></td>
+          </tr>
+          <tr>
+            <td>multiLines</td>
+            <td>line numbers to repeat (zero or more times)</td>
+            <td><a href="property_types.html#intSet">list of integers</a></td>
+            <td><code>{}</code></td>
+          </tr>
+          <tr>
+            <td>fileExtensions</td>
+            <td>file type extension of files to process</td>
+            <td><a href="property_types.html#stringSet">String Set</a></td>
+            <td><code>{}</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check to use header file <code>"java.header"</code> and <code>10</code> and <code>13</code> muli-lines:
+        </p>
+        <source>
+<module name="RegexpHeader">
+    <property name="headerFile" value="java.header"/>
+    <property name="multiLines" value="10, 13"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check to verify that each file starts with the
+          header
+        </p>
+        <source>
+^// Copyright \(C\) (\d\d\d\d -)? 2004 MyCompany$
+^// All rights reserved$
+        </source>
+
+        <p>
+          without the need for an external header file:
+        </p>
+        <source>
+<module name="RegexpHeader">
+  <property
+    name="header"
+    value="^// Copyright \(C\) (\d\d\d\d -)? 2004 MyCompany$\n^// All rights reserved$"/>
+</module>
+        </source>
+
+        <p>
+          <u>Note</u>: <code>ignoreLines</code> property has been
+          removed from this check to simplify it.  To make some line optional
+          use "^.*$" regexp for this line.
+        </p>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.header
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#Checker">Checker</a>
+        </p>
+      </subsection>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/config_imports.xml b/src/xdocs/config_imports.xml
new file mode 100644
index 0000000..1642cbd
--- /dev/null
+++ b/src/xdocs/config_imports.xml
@@ -0,0 +1,716 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Imports</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+    <section name="AvoidStarImport">
+      <subsection name="Description">
+        <p>
+          Checks that there are no import statements that use the * notation.
+        </p>
+
+        <p>
+          Rationale: Importing all classes from a package or static
+          members from a class leads to tight coupling between packages
+          or classes and might lead to problems when a new version of a
+          library introduces name clashes.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>excludes</td>
+            <td>
+              packages where star imports are allowed. Note that this property
+              is not recursive, subpackages of excluded packages are not
+              automatically excluded.
+            </td>
+            <td><a href="property_types.html#stringSet">list of strings</a></td>
+            <td><code>empty list</code></td>
+          </tr>
+          <tr>
+            <td>allowClassImports</td>
+            <td>
+              whether to allow starred class imports like
+              <code>import java.util.*;</code>.
+            </td>
+            <td><a href="property_types.html#Boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>allowStaticMemberImports</td>
+            <td>
+              whether to allow starred static member imports like
+              <code>import static org.junit.Assert.*;</code>
+            </td>
+            <td><a href="property_types.html#Boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          An example how to configure the check so that star imports from
+          packages java.io and java.net as well as static members from class
+          from java.lang.Math are allowed:
+        </p>
+
+        <source>
+<module name="AvoidStarImport">
+   <property name="excludes" value="java.io,java.net,java.lang.Math"/>
+   <property name="allowClassImports" value="false"/>
+   <property name="allowStaticMemberImports" value="false"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p> com.puppycrawl.tools.checkstyle.checks.imports </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="AvoidStaticImport">
+      <subsection name="Description">
+        <p>
+          Checks that there are no static import statements.
+        </p>
+
+        <p>
+          Rationale: Importing static members can lead to naming
+          conflicts between class' members. It may lead to poor code
+          readability since it may no longer be clear what class a
+          member resides in (without looking at the import statement).
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>excludes</td>
+            <td>
+              Allows for certain classes via a star notation to be
+              excluded such as <code>java.lang.Math.*</code> or specific static
+              members to be excluded like <code>java.lang.System.out</code> for a variable or
+              <code>java.lang.Math.random</code> for a
+              method.
+              <br/>
+              If you exclude a starred import on a class this automatically
+              excludes each member individually.
+              <br/>
+              For example: Excluding <code>java.lang.Math.*</code>. will allow the
+              import of each static member in the Math class
+              individually like <code>java.lang.Math.PI</code>.
+            </td>
+            <td><a href="property_types.html#stringSet">list of strings</a></td>
+            <td><code>empty list</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          An example of how to configure the check so that the <code>java.lang.System.out</code> member and all
+          members from <code>java.lang.Math</code> are
+          allowed:
+        </p>
+
+        <source>
+         <module name="AvoidStaticImport">
+           <property name="excludes" value="java.lang.System.out,java.lang.Math.*"/>
+         </module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p> com.puppycrawl.tools.checkstyle.checks.imports </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="IllegalImport">
+      <subsection name="Description">
+        <p>
+          Checks for imports from a set of illegal packages. By default, the
+          check rejects all <code>sun.*</code> packages since
+          programs that contain direct calls to the <code>sun.*</code> packages are <a
+          href="http://java.sun.com/products/jdk/faq/faq-sun-packages.html">"not guaranteed
+          to work on all Java-compatible platforms"</a>. To reject other packages, set property <code> illegalPkgs</code> to a list of the illegal packages.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>illegalPkgs</td>
+            <td>packages to reject</td>
+            <td><a href="property_types.html#stringSet">list of strings</a></td>
+            <td><code>sun</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="IllegalImport"/>
+        </source>
+
+        <p>
+          To configure the check so that it rejects packages <code>java.io.*</code> and <code>java.sql.*</code>:
+        </p>
+        <source>
+<module name="IllegalImport">
+    <property name="illegalPkgs" value="java.io, java.sql"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.imports
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="RedundantImport">
+      <subsection name="Description">
+        <p>
+          Checks for redundant import statements. An import statement is
+          considered redundant if:
+        </p>
+
+        <ul>
+          <li>
+            It is a duplicate of another import. This is, when a class is
+            imported more than once.
+          </li>
+          <li>
+            The class imported is from the <code>java.lang</code>
+            package, e.g.  importing <code>java.lang.String</code>.
+          </li>
+          <li>
+            The class imported is from the same package.
+          </li>
+        </ul>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="RedundantImport"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.imports
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="UnusedImports">
+      <subsection name="Description">
+        <p>
+          Checks for unused import statements. Checkstyle uses a simple but
+          very reliable algorithm to report on unused import statements. An
+          import statement is considered unused if:
+        </p>
+
+        <ul>
+          <li>
+            It is not referenced in the file. The algorithm does not support
+            wild-card imports like <code>import
+            java.io.*;</code>. Most IDE's provide very sophisticated checks
+            for imports that handle wild-card imports.
+          </li>
+
+          <li>
+            It is a duplicate of another import. This is when a class is
+            imported more than once.
+          </li>
+
+          <li>
+            The class imported is from the <code>java.lang</code>
+            package. For example importing <code>java.lang.String</code>.
+          </li>
+
+          <li>
+            The class imported is from the same package.
+          </li>
+          <li>
+            <b>Optionally:</b> it is referenced in Javadoc comments. This check
+            is off by default, as it is considered bad practice to introduce
+            a compile time dependency for documentation purposes only.
+            As an example, the import <code>java.util.Date</code> would be
+            considered referenced with the Javadoc comment
+            <code>{@link Date}</code>. The alternative to avoid introducing a
+            compile time dependency would be to write the Javadoc comment as
+            <code>{@link java.util.Date}</code>.
+          </li>
+        </ul>
+        <p>
+          The main limitation of this check is handling the case where
+          an imported type has the same name as a declaration, such as a
+          member variable.
+        </p>
+        <p>
+          For example, in the following case the import <code>java.awt.Component</code> will not be flagged as
+          unused:
+        </p>
+        <source>
+import java.awt.Component;
+class FooBar {
+    private Object Component; // a bad practice in my opinion
+    ...
+}
+        </source>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>processJavadoc</td>
+            <td>whether to process Javadoc</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="UnusedImports"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.imports
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="ImportOrder">
+      <subsection name="Description">
+        <p>Checks the ordering/grouping of imports. Features are:</p>
+        <ul>
+          <li>groups imports: ensures that groups of imports come in a
+          specific order (e.g., java. comes first, javax. comes second,
+          then everything else)</li>
+          <li>adds a separation between groups : ensures that a blank
+          line sit between each group</li>
+          <li>sorts imports inside each group: ensures that imports
+          within each group are in lexicographic order</li>
+          <li>sorts according to case: ensures that the comparison
+          between imports is case sensitive</li>
+          <li>groups static imports: ensures the relative order between
+          regular imports and static imports (see
+          <a href="property_types.html#importOrder">import orders</a>)</li>
+         </ul>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>option</td>
+            <td>policy on the relative order between regular imports and static imports</td>
+            <td><a href="property_types.html#importOrder">import order</a></td>
+            <td><code>under</code></td>
+          </tr>
+          <tr>
+            <td>groups</td>
+            <td>
+              list of imports groups (every group identified either by a
+              common prefix string, or by a regular expression enclosed
+              in forward slashes (e.g. <code>/regexp/</code>)
+            </td>
+            <td><a href="property_types.html#stringSet">list of strings</a></td>
+            <td><code>empty list</code></td>
+          </tr>
+          <tr>
+            <td>ordered</td>
+            <td>whether imports within group should be sorted</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td>true</td>
+          </tr>
+          <tr>
+            <td>separated</td>
+            <td>
+              whether imports groups should be separated by, at least, one
+              blank line
+            </td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td>false</td>
+          </tr>
+          <tr>
+            <td>caseSensitive</td>
+            <td>whether string comparison should be case sensitive or not</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td>true</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p>To configure the check so that it requires that:</p>
+        <ul>
+          <li>"java" and "javax" packages together first, then "org" and then all other imports</li>
+          <li>imports will be sorted in the groups</li>
+          <li>groups are separated by, at least, one blank line</li>
+          <li>static imports are above each local groups</li>
+        </ul>
+
+        <source>
+<module name="ImportOrder">
+    <property name="groups" value="/^javax?\./,org"/>
+    <property name="ordered" value="true"/>
+    <property name="separated" value="true"/>
+    <property name="option" value="above"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.imports
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="ImportControl">
+      <subsection name="Description">
+        <p>
+          Controls what can be imported in each package. Useful for
+          ensuring that application layering rules are not violated,
+          especially on large projects.
+        </p>
+
+        <p>
+          The DTD for a import control XML document is at <a
+          href="http://www.puppycrawl.com/dtds/import_control_1_1.dtd">http://www.puppycrawl.com/dtds/import_control_1_1.dtd</a>. It
+          contains documentation on each of the elements and attributes.
+        </p>
+
+        <p>
+          The check validates a XML document when it loads the document.
+          To validate against the above DTD, include the following
+          document type declaration in your XML document:
+        </p>
+
+        <pre>
+<!DOCTYPE import-control PUBLIC
+    "-//Puppy Crawl//DTD Import Control 1.1//EN"
+    "http://www.puppycrawl.com/dtds/import_control_1_1.dtd">
+        </pre>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>file</td>
+            <td>
+              name of the file containing the import control configuration.
+            </td>
+            <td><a href="property_types.html#string">string</a></td>
+            <td><code>null</code></td>
+          </tr>
+          <tr>
+            <td>url</td>
+            <td>
+              URL of the file containing the import control configuration.
+            </td>
+            <td><a href="property_types.html#string">string</a></td>
+            <td><code>null</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check using a import control file called
+          "import-control.xml", then have the following:
+        </p>
+
+        <source>
+<module name="ImportControl">
+    <property name="file" value="import-control.xml"/>
+</module>
+        </source>
+
+        <p>
+          In the example below, all classes beginning with an I in the package
+          java.awt are allowed. In the package java.io only the classes File
+          and InputStream are allowed.
+        </p>
+
+        <source>
+<import-control pkg="com.puppycrawl.tools.checkstyle">
+    <allow class="java\.awt\.I.*" regex="true"/>
+    <allow class="java\.io\.(File|InputStream)" local-only="true"
+        regex="true"/>
+</import-control>
+        </source>
+
+        <p>
+          For an example import control file, look at the file called <a
+          href="https://github.com/checkstyle/checkstyle/blob/master/import-control.xml">import-control.xml</a>
+          which is part of the Checkstyle distribution.
+        </p>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.imports
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="CustomImportOrder">
+      <subsection name="Description">
+        <p>
+          Checks that the groups of import declarations appear in the order specified
+          by the user. If there is an import but its group is not specified in the
+          configuration such an import should be placed at the end of the import list.
+        </p>
+      </subsection>
+
+      <subsection name="RuleDescription">
+        <p>
+          The rule consists of:
+        </p>
+        <p>
+         1) STATIC group. This group sets the ordering of static imports.
+        </p>
+        <p>
+          2) SAME_PACKAGE(n) group. This group sets the ordering of the same package imports.
+          n' - a number of the first package domains. For example:
+        </p>
+        <source>
+ package java.util.concurrent;
+
+ import java.util.regex.Pattern;
+ import java.util.List;
+ import java.util.StringTokenizer;
+ import java.util.regex.Pattern;
+ import java.util.*;
+ import java.util.concurrent.AbstractExecutorService;
+ import java.util.concurrent.*;
+        </source>
+        <p>
+          And we have such configuration: SAME_PACKAGE (3).
+          Same package imports are java.util.*, java.util.concurrent.*,
+          java.util.concurrent.AbstractExecutorService,
+          java.util.List and java.util.StringTokenizer
+        </p>
+        <p>
+          3) THIRD_PARTY_PACKAGE group. This group sets ordering of third party imports.
+          Third party imports are all imports except STATIC,
+          SAME_PACKAGE(n) and STANDARD_JAVA_PACKAGE.
+        </p>
+        <p>
+          4) STANDARD_JAVA_PACKAGE group. This group sets ordering of standard java (java|javax) imports.
+        </p>
+        <p>
+          5) SPECIAL_IMPORTS group. This group may contains some imports
+          that have particular meaning for the user.
+        </p>
+      </subsection>
+
+      <subsection name="Note">
+        <p>
+          Use the separator '###' between rules.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>customImportOrderRules</td>
+            <td>List of order declaration customizing by user.</td>
+            <td><a href="property_types.html#string">string</a></td>
+            <td><code>null</code></td>
+          </tr>
+          <tr>
+            <td>standardPackageRegExp</td>
+            <td>RegExp for STANDARD_JAVA_PACKAGE group imports.</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>java|javax</code></td>
+          </tr>
+          <tr>
+            <td>thirdPartyPackageRegExp</td>
+            <td>RegExp for THIRDPARTY_PACKAGE group imports.</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>^$</code></td>
+          </tr>
+          <tr>
+            <td>specialImportsRegExp</td>
+            <td>RegExp for SPECIAL_IMPORTS group imports.</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>^$</code></td>
+          </tr>
+          <tr>
+            <td>samePackageMatchingDepth</td>
+            <td>Number of first domains for SAME_PACKAGE group.</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td><code>2</code></td>
+          </tr>
+          <tr>
+            <td>separateLineBetweenGroup</td>
+            <td>Force empty line separator between import groups.</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+          <tr>
+            <td>sortImportsInGroupAlphabetically</td>
+            <td>Force grouping alphabetically.</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To set RegExps for THIRD_PARTY_PACKAGE and STANDARD_JAVA_PACKAGE groups use
+          thirdPartyPackageRegExp and standardPackageRegExp options.
+        </p>
+        <source>
+<module name="CustomImportOrder">
+    <property name="customImportOrderRules"
+    value="STATIC###SAME_PACKAGE(3)###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
+    <property name="thirdPartyPackageRegExp" value="com|org"/>
+    <property name="standardPackageRegExp" value="java|javax"/>
+</module>
+        </source>
+        <p>
+          Also, this check can be configured to force empty line separator between
+          import groups. For example.
+        </p>
+        <source>
+<module name="CustomImportOrder">
+    <property name="separateLineBetweenGroups" value="true"/>
+</module>
+        </source>
+        <p>
+          By the option it is possible to force alphabetically sorting.
+        </p>
+       <source>
+<module name="CustomImportOrder">
+    <property name="sortImportsInGroupAlphabetically" value="true"/>
+</module>
+       </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.imports
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/config_javadoc.xml b/src/xdocs/config_javadoc.xml
new file mode 100644
index 0000000..d857903
--- /dev/null
+++ b/src/xdocs/config_javadoc.xml
@@ -0,0 +1,833 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Javadoc Comments</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+    <section name="JavadocPackage">
+      <subsection name="Description">
+        <p>
+          Checks that each Java package has a Javadoc file used for
+          commenting.  By default it only allows a <code>package-info.java</code> file, but can be
+          configured to allow a <code>package.html</code>
+          file.
+        </p>
+        <p>
+          An error will be reported if both files exist as this is not
+          allowed by the Javadoc tool.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>allowLegacy</td>
+            <td>
+              If set then allow the use of a
+              <code>package.html</code> file.
+            </td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="JavadocPackage"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.javadoc
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#Checker">Checker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="JavadocType">
+      <subsection name="Description">
+        <p>
+          Checks Javadoc comments for class and interface definitions.
+          By default, does not check for author or version tags.  The
+          scope to verify is specified using the <code>Scope</code>
+          class and defaults to <code>Scope.PRIVATE</code>. To verify
+          another scope, set property scope to one of the
+          <code>Scope</code> constants.  To define the format for an
+          author tag or a version tag, set property authorFormat or
+          versionFormat respectively to a
+          <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">
+            regular expression</a>.
+        </p>
+        <p>
+          Error messages about type parameters for which no param tags are
+          present can be suppressed by defining property
+          <code>allowMissingParamTags</code>.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>scope</td>
+            <td>visibility scope where Javadoc comments are checked</td>
+            <td><a href="property_types.html#scope">scope</a></td>
+            <td><code>private</code></td>
+          </tr>
+          <tr>
+            <td>excludeScope</td>
+            <td>visibility scope where Javadoc comments are not checked</td>
+            <td><a href="property_types.html#scope">scope</a></td>
+            <td><code>null</code></td>
+          </tr>
+          <tr>
+            <td>authorFormat</td>
+            <td>pattern for @author tag</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>null</code> (tag not required)</td>
+          </tr>
+          <tr>
+            <td>versionFormat</td>
+            <td>pattern for @version tag</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>null</code> (tag not required)</td>
+          </tr>
+          <tr>
+            <td>allowMissingParamTags</td>
+            <td>whether to ignore errors when a class has type parameters
+                but does not have matching param tags in the javadoc.</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>allowUnknownTags</td>
+            <td>whether to ignore errors when a Javadoc tag is not recognised.</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>definitions to check</td>
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">INTERFACE_DEF</a>,
+              <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">CLASS_DEF</a>
+            </td>
+            <td>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">INTERFACE_DEF</a>,
+               <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">CLASS_DEF</a>,
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the default check:
+        </p>
+        <source>
+<module name="JavadocType"/>
+        </source>
+
+        <p>
+          To configure the check for <code>public</code> scope:
+        </p>
+        <source>
+<module name="JavadocType">
+   <property name="scope" value="public"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check for an @author tag:
+        </p>
+        <source>
+<module name="JavadocType">
+   <property name="authorFormat" value="\S"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check for a CVS revision version tag:
+        </p>
+        <source>
+<module name="JavadocType">
+   <property name="versionFormat" value="\$Revision.*\$"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check for <code>private</code> classes only:
+        </p>
+        <source>
+<module name="JavadocType">
+   <property name="scope" value="private"/>
+   <property name="excludescope" value="package"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.javadoc
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="JavadocMethod">
+      <subsection name="Description">
+        <p>
+          Checks the Javadoc of a method or constructor. By default,
+          does not check for unused throws. To allow documented
+          <code>java.lang.RuntimeException</code>s that are not
+          declared, set property allowUndeclaredRTE to true. The scope
+          to verify is specified using the <code>Scope</code> class and
+          defaults to <code>Scope.PRIVATE</code>. To verify another
+          scope, set property scope to a different
+          <a href="property_types.html#scope">scope</a>.
+        </p>
+
+        <p>
+          Error messages about parameters and type parameters
+          for which no param tags are
+          present can be suppressed by defining property
+          <code>allowMissingParamTags</code>. Error messages about
+          exceptions which are declared to be thrown, but for which no
+          throws tag is present can be suppressed by defining property
+          <code>allowMissingThrowsTags</code>. Error messages about
+          methods which return non-void but for which no return tag is
+          present can be suppressed by defining property
+          <code>allowMissingReturnTag</code>.
+        </p>
+
+        <p>
+          Javadoc is not required on a method that is tagged with the
+          <code>@Override</code> annotation. However under
+          Java 5 it is not possible to mark a method required for an
+          interface (this was <i>corrected</i> under Java 6). Hence
+          Checkstyle supports using the convention of using a single
+          <code>{@inheritDoc}</code> tag instead of all the
+          other tags.
+        </p>
+
+        <p>
+          Note that only inheritable items will allow the
+          <code>{@inheritDoc}</code> tag to be used in place
+          of comments.  Static methods at all visibilities, private non-static
+          methods and constructors are not inheritable.
+        </p>
+
+        <p>
+          For example, if the following method is
+          implementing a method required by an interface, then the
+          Javadoc could be done as:
+        </p>
+
+        <pre>
+/** {@inheritDoc} */
+public int checkReturnTag(final int aTagIndex,
+                          JavadocTag[] aTags,
+                          int aLineNo)</pre>
+
+        <p>
+          The classpath may need to be configured to locate the class
+          information. The classpath configuration is dependent on the
+          mechanism used to invoke Checkstyle.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>scope</td>
+            <td>visibility scope where Javadoc comments are checked</td>
+            <td><a href="property_types.html#scope">scope</a></td>
+            <td><code>private</code></td>
+          </tr>
+          <tr>
+            <td>excludeScope</td>
+            <td>visibility scope where Javadoc comments are not checked</td>
+            <td><a href="property_types.html#scope">scope</a></td>
+            <td><code>null</code></td>
+          </tr>
+          <tr>
+            <td>allowUndeclaredRTE</td>
+            <td>whether to allow documented exceptions that
+            are not declared if they are a subclass of <code>java.lang.RuntimeException</code></td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>allowThrowsTagsForSubclasses</td>
+            <td>whether to allow documented exceptions that
+            are subclass of one of declared exception.</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>allowMissingParamTags</td>
+            <td>whether to ignore errors when a method has parameters
+            but does not have matching param tags in the javadoc.</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>allowMissingThrowsTags</td>
+            <td>whether to ignore errors when a method declares
+            that it throws exceptions but does have matching throws tags
+            in the javadoc.</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>allowMissingReturnTag</td>
+            <td>whether to ignore errors when a method returns
+            non-void type does have a return tag in the javadoc.</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+
+          <tr>
+            <td>allowMissingJavadoc</td>
+            <td>whether to ignore errors when a method javadoc is missed.</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+
+          <tr>
+            <td>allowMissingPropertyJavadoc</td>
+            <td>
+              Whether to allow missing Javadoc on accessor methods for
+              properties (setters and getters). The setter and getter
+              methods must match exactly the structures below.
+
+              <pre>
+public void setNumber(final int number)
+{
+    mNumber = number;
+}
+
+public int getNumber()
+{
+    return mNumber;
+}
+
+public boolean isSomething()
+{
+    return false;
+}
+              </pre>
+            </td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>logLoadErrors</td>
+            <td>This check may need to load exception classes mentioned in
+            the @throws tag to check whether they are RuntimeExceptions.
+            If loading the class fails, this property allows to control
+            checkstyle's error handling. If set to <code>false</code> a
+            classpath configuration problem is assumed and the TreeWalker
+            stops operating on the class completely.
+            If set to <code>true</code> (the default) , checkstyle assumes a
+            typo or refactoring problem in the
+            javadoc and logs the problem in the normal checkstyle report
+            (potentially masking a configuration error).</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+          <tr>
+            <td>suppressLoadErrors</td>
+            <td>When logLoadErrors is set to true, the TreeWalker completely
+            processes a class and displays any problems with loading exceptions
+            as checkstyle violations.
+            When this property is set to true, the violations generated when
+            logLoadErrors is set true are suppressed from being reported as
+            violations in the checkstyle report.
+            </td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>definitions to check</td>
+
+            <td>subset of tokens <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+            <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a></td>
+
+            <td><a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+            <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a></td>
+
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the default check:
+        </p>
+        <source>
+<module name="JavadocMethod"/>
+        </source>
+
+        <p>
+          To configure the check for <code>public</code>
+          scope and to allow documentation of undeclared
+          RuntimeExceptions:
+        </p>
+        <source>
+<module name="JavadocMethod">
+   <property name="scope" value="public"/>
+   <property name="allowUndeclaredRTE" value="true"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check for for <code>public</code>
+          scope, to allow documentation of undeclared RuntimeExceptions,
+          while ignoring any missing param tags is:
+        </p>
+
+        <source>
+<module name="JavadocMethod">
+  <property name="scope" value="public"/>
+  <property name="allowUndeclaredRTE" value="true"/>
+  <property name="allowMissingParamTags" value="true"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check for methods which are in <code>private</code> , but not in <code>protected</code> scope:
+        </p>
+        <source>
+<module name="JavadocMethod">
+   <property name="scope" value="private"/>
+   <property name="excludeScope" value="protected"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.javadoc
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="JavadocVariable">
+      <subsection name="Description">
+        <p>
+          Checks that variables have Javadoc comments.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>scope</td>
+            <td>visibility scope where Javadoc comments are checked</td>
+            <td><a href="property_types.html#scope">scope</a></td>
+            <td><code>private</code></td>
+          </tr>
+          <tr>
+            <td>excludeScope</td>
+            <td>visibility scope where Javadoc comments are not checked</td>
+            <td><a href="property_types.html#scope">scope</a></td>
+            <td><code>null</code></td>
+          </tr>
+          <tr>
+              <td>ignoreNamePattern</td>
+              <td>regexp to define variable names to ignore</td>
+              <td><a href="property_types.html#regexp">regular expression</a></td>
+              <td><code>null</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the default check:
+        </p>
+        <source>
+<module name="JavadocVariable"/>
+        </source>
+
+        <p>
+          To configure the check for <code>public</code>
+          scope:
+        </p>
+
+        <source>
+<module name="JavadocVariable">
+   <property name="scope" value="public"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check for members which are in <code>private</code>, but not in <code>protected</code> scope:
+        </p>
+
+        <source>
+<module name="JavadocVariable">
+   <property name="scope" value="private"/>
+   <property name="excludeScope" value="protected"/>
+</module>
+        </source>
+
+        <p>
+            To ignore absence of Javadoc comments for variables with names <code>log</code> or <code>logger</code>:
+        </p>
+
+        <source>
+<module name="JavadocVariable">
+    <property name="ignoreNamePattern" value="log|logger"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.javadoc
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="JavadocStyle">
+      <subsection name="Description">
+        <p>
+          Validates Javadoc comments to help ensure they are well
+          formed.  The following checks are performed:
+        </p>
+
+        <ul>
+          <li>
+            Ensures the first sentence ends with proper punctuation
+            (That is a period, question mark, or exclamation mark, by default).
+            Javadoc automatically places the first sentence in the
+            method summary table and index.  Without proper punctuation
+            the Javadoc may be malformed.  All items eligible for the
+            <code>{@inheritDoc}</code> tag are exempt from this
+            requirement.
+          </li>
+
+          <li>
+            Check text for Javadoc statements that do not have any
+            description.  This includes both completely empty Javadoc,
+            and Javadoc with only tags such as @param and @return.
+          </li>
+
+          <li>
+            Check text for incomplete HTML tags.  Verifies that HTML
+            tags have corresponding end tags and issues an "Unclosed
+            HTML tag found:" error if not.  An "Extra HTML tag found:"
+            error is issued if an end tag is found without a previous
+            open tag.
+          </li>
+          <li>
+           Check that a package Javadoc comment is well-formed (as
+           described above) and NOT missing from any package-info.java files.
+          </li>
+          <li>
+            Check for allowed HTML tags. The list of allowed HTML tags
+            is "a", "abbr", "acronym", "address", "area", "b", "bdo",
+            "big", "blockquote", "br", "caption", "cite", "code",
+            "colgroup", "dd", "del", "div", "dfn", "dl", "dt", "em",
+            "fieldset", "font", "h1" to "h6", "hr", "i", "img", "ins",
+            "kbd", "li", "ol", "p", "pre", "q", "samp", "small", "span",
+            "strong", "sub", "sup", "table", "tbody", "td", "tfoot", "th",
+            "thread", "tr", "tt", "u", "ul".
+          </li>
+        </ul>
+
+        <p>
+          These checks were patterned after the checks made by the <a
+          href="http://java.sun.com/j2se/javadoc/doccheck/index.html">DocCheck</a>
+          doclet available from Sun.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>scope</td>
+            <td>visibility scope where Javadoc comments are checked</td>
+            <td><a href="property_types.html#scope">scope</a></td>
+            <td><code>private</code></td>
+          </tr>
+          <tr>
+            <td>excludeScope</td>
+            <td>visibility scope where Javadoc comments are not checked</td>
+            <td><a href="property_types.html#scope">scope</a></td>
+            <td><code>null</code></td>
+          </tr>
+          <tr>
+            <td>checkFirstSentence</td>
+            <td>
+              Whether to check the first sentence for proper end of sentence.
+            </td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+          <tr>
+            <td>endOfSentenceFormat</td>
+            <td>
+              Format for matching the end of a sentence.
+            </td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>([.?!][ \t\n\r\f<])|([.?!]$)</code></td>
+          </tr>
+          <tr>
+            <td>checkEmptyJavadoc</td>
+            <td>
+              Whether to check if the Javadoc is missing a describing text.
+            </td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>checkHtml</td>
+            <td>Whether to check for incomplete HTML tags.</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>definitions to check</td>
+
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">INTERFACE_DEF</a>,
+              <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">CLASS_DEF</a>,
+              <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+              <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>,
+              <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>
+            </td>
+
+            <td>
+              <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">INTERFACE_DEF</a>,
+              <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">CLASS_DEF</a>,
+              <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+              <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>,
+              <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the default check:
+        </p>
+
+        <source>
+<module name="JavadocStyle"/>
+        </source>
+
+        <p>
+          To configure the check for <code>public</code>
+          scope:
+        </p>
+
+        <source>
+<module name="JavadocStyle">
+   <property name="scope" value="public"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check for javadoc which is in <code>private</code>, but not in <code>package</code> scope:
+        </p>
+
+        <source>
+<module name="JavadocStyle">
+   <property name="scope" value="private"/>
+   <property name="excludeScope" value="package"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check to turn off first sentence checking:
+        </p>
+
+        <source>
+<module name="JavadocStyle">
+   <property name="checkFirstSentence" value="false"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="WriteTag">
+      <subsection name="Description">
+        <p>
+         Outputs a JavaDoc tag as information. Can be used e.g. with the
+         stylesheets that sort the report by author name.  To define the
+         format for a tag, set property tagFormat to a regular
+         expression.  This check uses two different severity levels. The
+         normal one is used for reporting when the tag is missing. The
+         additional one (tagSeverity) is used for the level of reporting
+         when the tag exists.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>tag</td>
+            <td>Name of tag</td>
+            <td><a href="property_types.html#string">String</a></td>
+           <td><code>null</code></td>
+          </tr>
+          <tr>
+            <td>tagFormat</td>
+            <td>Format of tag</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>null</code></td>
+          </tr>
+          <tr>
+            <td>tagSeverity</td>
+            <td>Severity level when tag is found and printed</td>
+            <td><a href="property_types.html#severity">severity</a></td>
+            <td><code>info</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+        An example of how to configure the check for printing author name is:
+        </p>
+
+        <source>
+<module name="WriteTag">
+   <property name="tag" value="@author"/>
+   <property name="tagFormat" value="\S"/>
+</module>
+        </source>
+
+        <p>
+         An example of how to configure the check to print warnings if an
+         "@incomplete" tag is found, and not print anything if it is not found:
+        </p>
+
+        <source>
+<module name="WriteTag">
+   <property name="tag" value="@incomplete"/>
+   <property name="tagFormat" value="\S"/>
+   <property name="severity" value="ignore"/>
+   <property name="tagSeverity" value="warning"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/config_metrics.xml b/src/xdocs/config_metrics.xml
new file mode 100644
index 0000000..150ed1b
--- /dev/null
+++ b/src/xdocs/config_metrics.xml
@@ -0,0 +1,498 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Metrics</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+
+    <section name="BooleanExpressionComplexity">
+      <subsection name="Description">
+        <p>
+          Restrict the number of number of <code>&#x26;&#x26;</code>, <code>||</code>,
+          <code>&#x26;</code>, <code>|</code>
+          and <code>^</code> in an expression.
+        </p>
+
+        <p>
+          Rationale: Too many conditions leads to code that is difficult
+          to read and hence debug and maintain.
+        </p>
+
+        <p>
+          Note that the operators <code>&#x26;</code> and
+          <code>|</code> are not only integer bitwise operators, they are also the
+          <a href="http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.22.2">
+          non-shortcut versions</a> of the boolean operators
+          <code>&#x26;&#x26;</code> and <code>||</code>.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>
+              the maximum allowed number of boolean operations in one
+              expression.
+            </td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td><code>3</code></td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+            <td>
+              subset of tokens
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LAND">LAND</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BAND">BAND</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LOR">LOR</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BOR">BOR</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BXOR">BXOR</a>
+            </td>
+            <td>
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LAND">LAND</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BAND">BAND</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LOR">LOR</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BOR">BOR</a>,
+              <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BXOR">BXOR</a>
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="BooleanExpressionComplexity"/>
+        </source>
+
+        <p>
+          To configure the check with 7 allowed operation in boolean
+          expression:
+        </p>
+        <source>
+<module name="BooleanExpressionComplexity">
+    <property name="max" value="7"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check to ignore <code>&#x26;</code> and
+          <code>|</code>:
+        </p>
+        <source>
+<module name="BooleanExpressionComplexity">
+    <property name="tokens" value="BXOR,LAND,LOR"/>
+</module>
+        </source>
+
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.metrics
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="ClassDataAbstractionCoupling">
+      <subsection name="Description">
+        <p>
+          This metric measures the number of instantiations of other
+          classes within the given class. This type of coupling is not
+          caused by inheritance or the object oriented
+          paradigm. Generally speaking, any abstract data type with
+          other abstract data types as members has data abstraction
+          coupling; therefore, if a class has a local variable that is
+          an instantiation (object) of another class, there is data
+          abstraction coupling. The higher the DAC, the more complex the
+          data structure (classes) of the system.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>the maximum threshold allowed</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td><code>7</code></td>
+          </tr>
+          <tr>
+            <td>excludedClasses</td>
+            <td>User-configured class names to ignore</td>
+            <td><a href="property_types.html#stringSet">String Set</a></td>
+            <td>boolean, byte, char, double, float, int,
+                long, short, void, Boolean, Byte, Character, Double, Float,
+                Integer, Long, Short, Void,
+                Object, Class, String, StringBuffer, StringBuilder,
+                ArrayIndexOutOfBoundsException, Exception,
+                RuntimeException, IllegalArgumentException,
+                IllegalStateException, IndexOutOfBoundsException,
+                NullPointerException, Throwable, SecurityException,
+                UnsupportedOperationException,
+                List, ArrayList, Deque, Queue, LinkedList,
+                Set, HashSet, SortedSet, TreeSet,
+                Map, HashMap, SortedMap, TreeMap</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="ClassDataAbstractionCoupling"/>
+        </source>
+
+        <p>
+          To configure the check with a threshold of 5:
+        </p>
+        <source>
+<module name="ClassDataAbstractionCoupling">
+    <property name="max" value="5"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.metrics
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="ClassFanOutComplexity">
+      <subsection name="Description">
+        <p>
+          The number of other classes a given class relies on. Also the
+          square of this has been shown to indicate the amount of
+          maintenance required in functional programs (on a file basis)
+          at least.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>the maximum threshold allowed</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td><code>20</code></td>
+          </tr>
+          <tr>
+            <td>excludedClasses</td>
+            <td>User-configured class names to ignore</td>
+            <td><a href="property_types.html#stringSet">String Set</a></td>
+            <td>boolean, byte, char, double, float, int,
+                long, short, void, Boolean, Byte, Character, Double, Float,
+                Integer, Long, Short, Void,
+                Object, Class, String, StringBuffer, StringBuilder,
+                ArrayIndexOutOfBoundsException, Exception,
+                RuntimeException, IllegalArgumentException,
+                IllegalStateException, IndexOutOfBoundsException,
+                NullPointerException, Throwable, SecurityException,
+                UnsupportedOperationException,
+                List, ArrayList, Deque, Queue, LinkedList,
+                Set, HashSet, SortedSet, TreeSet,
+                Map, HashMap, SortedMap, TreeMap</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="ClassFanOutComplexity"/>
+        </source>
+
+        <p>
+          To configure the check with a threshold of 10:
+        </p>
+        <source>
+<module name="ClassFanOutComplexity">
+    <property name="max" value="10"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.metrics
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="CyclomaticComplexity">
+      <subsection name="Description">
+        <p>
+          Checks cyclomatic complexity against a specified limit. The
+          complexity is measured by the number of <code>if</code>, <code>while</code>, <code>do</code>, <code>for</code>, <code>?:</code>, <code>catch</code>, <code>switch</code>, <code>case</code>
+          statements, and operators <code>&#x26;&#x26;</code> and <code>||</code> (plus one) in the body of a
+          constructor, method, static initializer, or instance
+          initializer.  It is a measure of the minimum number of
+          possible paths through the source and therefore the number of
+          required tests. Generally 1-4 is considered good, 5-7 OK, 8-10
+          consider re-factoring, and 11+ re-factor now!
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>the maximum threshold allowed</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td><code>10</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="CyclomaticComplexity"/>
+        </source>
+
+        <p>
+          To configure the check with a threshold of 7:
+        </p>
+        <source>
+<module name="CyclomaticComplexity">
+    <property name="max" value="7"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.metrics
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="NPathComplexity">
+      <subsection name="Description">
+        <p>
+          The NPATH metric computes the number of possible execution
+          paths through a function. It takes into account the nesting of
+          conditional statements and multi-part boolean expressions
+          (e.g., A && B, C || D, etc.).
+        </p>
+
+        <p>
+          Rationale: Nejmeh says that his group had an informal NPATH
+          limit of 200 on individual routines; functions that exceeded
+          this value were candidates for further decomposition - or at
+          least a closer look.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>the maximum threshold allowed</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td><code>200</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="NPathComplexity"/>
+        </source>
+
+        <p>
+          To configure the check with a threshold of 20:
+        </p>
+        <source>
+<module name="NPathComplexity">
+    <property name="max" value="20"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.metrics
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="JavaNCSS">
+      <subsection name="Description">
+        <p>
+          Determines complexity of methods, classes and files by
+          counting the Non Commenting Source Statements (NCSS).  This
+          check adheres to the <a
+          href="http://www.kclee.de/clemens/java/javancss/#specification">
+          specification</a> for the
+          <a href="http://www.kclee.de/clemens/java/javancss/">JavaNCSS-Tool</a>
+          written by <b>Chr. Clemens Lee</b>.<br/>
+          Rougly said the NCSS metric is calculated by
+          counting the source lines which are not comments, (nearly)
+          equivalent to counting the semicolons and opening curly
+          braces.<br/> The NCSS for a class is summarized from the NCSS
+          of all its methods, the NCSS of its nested classes and the
+          number of member variable declarations.<br/> The NCSS for a
+          file is summarized from the ncss of all its top level classes,
+          the number of imports and the package declaration.
+        </p>
+
+        <p>
+          Rationale: Too large methods and classes are hard to read and
+          costly to maintain. A large NCSS number often means that a
+          method or class has too many responsibilities and/or
+          functionalities which should be decomposed into smaller units.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>methodMaximum</td>
+            <td>
+              the maximum allowed number of non commenting lines in a
+              method.
+            </td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td><code>50</code></td>
+          </tr>
+          <tr>
+            <td>classMaximum</td>
+            <td>
+              the maximum allowed number of non commenting lines in a
+              class.
+            </td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td><code>1500</code></td>
+          </tr>
+          <tr>
+            <td>fileMaximum</td>
+            <td>
+              the maximum allowed number of non commenting lines in a
+              file including all top level and nested classes.
+            </td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td><code>2000</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="JavaNCSS"/>
+        </source>
+
+        <p>
+          To configure the check with 40 allowed non commenting lines
+          for a method:
+        </p>
+        <source>
+<module name="JavaNCSS">
+    <property name="methodMaximum" value="40"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.metrics
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/config_misc.xml b/src/xdocs/config_misc.xml
new file mode 100755
index 0000000..83898b9
--- /dev/null
+++ b/src/xdocs/config_misc.xml
@@ -0,0 +1,1695 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Miscellaneous</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+    <section name="NewlineAtEndOfFile">
+      <subsection name="Description">
+        <p>
+          Checks whether files end with a line separator.
+        </p>
+
+        <p>
+          Rationale: Any source files and text files in general should
+          end with a line separator, especially when using source control management
+          systems such as CVS. CVS will even print a warning when it
+          encounters a file that doesn't end with a line separator.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>lineSeparator</td>
+            <td>type of line separator</td>
+            <td>
+              One of "system" (system default),
+              "crlf" (Windows-style), "cr"
+              (Mac-style) and "lf" (Unix-style)
+            </td>
+            <td>"system"</td>
+          </tr>
+          <tr>
+            <td>fileExtensions</td>
+            <td>file type extension of the files to check.</td>
+            <td><a href="property_types.html#stringSet">String Set</a></td>
+            <td>all files</td>
+          </tr>
+
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="NewlineAtEndOfFile"/>
+        </source>
+
+        <p>
+          To configure the check to always use Unix-style line separators:
+        </p>
+        <source>
+<module name="NewlineAtEndOfFile">
+    <property name="lineSeparator" value="lf"/>
+</module>
+        </source>
+
+          <p>
+            To configure the check to work only on Java, XML and Python files:
+          </p>
+          <source>
+<module name="NewlineAtEndOfFile">
+    <property name="fileExtensions" value="java, xml, py"/>
+</module>
+          </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#Checker">Checker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="TodoComment">
+      <subsection name="Description">
+        <p>
+          A check for <code>TODO:</code> comments. Actually
+          it is a generic <a
+          href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">regular
+          expression</a> matcher on Java comments. To check for other
+          patterns in Java comments, set the <code>format</code> property.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>format</td>
+            <td>Pattern to match comments against</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>TODO:</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Notes">
+        <p>
+          Using <code>TODO:</code> comments is a great way
+          to keep track of tasks that need to be done. Having them
+          reported by Checkstyle makes it very hard to forget about
+          them.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="TodoComment"/>
+        </source>
+
+        <p>
+          To configure the check for comments that contain <code>WARNING</code>:
+        </p>
+        <source>
+<module name="TodoComment">
+    <property name="format" value="WARNING"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="Translation">
+      <subsection name="Description">
+        <p>
+          A <a href="config.html#Overview">FileSetCheck</a> that ensures
+          the correct translation of code by checking property files for
+          consistency regarding their keys. Two property files
+          describing one and the same context are consistent if they
+          contain the same keys.
+        </p>
+
+        <p>
+          Consider the following properties file in the same directory:
+        </p>
+        <source>
+#messages.properties
+hello=Hello
+cancel=Cancel
+
+#messages_de.properties
+hell=Hallo
+ok=OK
+        </source>
+
+        <p>
+          The Translation check will find the typo in the German <code>hello</code>
+          key, the missing <code>ok</code> key in the default resource file and the
+          missing <code>cancel</code> key in the German resource file:
+        </p>
+        <source>
+messages_de.properties: Key 'hello' missing.
+messages_de.properties: Key 'cancel' missing.
+messages.properties: Key 'hell' missing.
+messages.properties: Key 'ok' missing.
+        </source>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>fileExtensions</td>
+            <td>
+              file type extension to identify translation files. Setting
+              this property is typically only required if your
+              translation files are preprocessed and the original files
+              do not have the extension <code>.properties</code>
+            </td>
+            <td><a href="property_types.html#stringSet">String Set</a></td>
+            <td><code>properties</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="Translation"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#Checker">Checker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="UncommentedMain">
+      <subsection name="Description">
+        <p>
+          Checks for uncommented main() methods.
+        </p>
+
+        <p>
+          Rationale: A main() method is often used for debugging
+          purposes. When debugging is finished, developers often forget
+          to remove the method, which changes the API and increases the
+          size of the resulting class or JAR file. With the exception of
+          the real program entry points, all main() methods should be
+          removed or commented out of the sources.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>excludedClasses</td>
+            <td>Pattern for qualified names of classes which are allowed
+            to have a main method.</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>^$</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="UncommentedMain"/>
+        </source>
+
+        <p>
+          To configure the check to allow the <code>main</code> method for all classes
+          with "Main" name:
+        </p>
+        <source>
+<module name="UncommentedMain">
+    <property name="excludedClasses" value="\.Main$"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="UpperEll">
+      <subsection name="Description">
+        <p>
+          Checks that long constants are defined with an upper ell. That
+          is <code>' L'</code> and not <code>'l'</code>. This is in accordance with the Java
+          Language Specification, <a
+          href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#48282">
+          Section 3.10.1</a>.
+        </p>
+
+        <p>
+          The capital L looks a lot like <code>1</code>.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="UpperEll"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="ArrayTypeStyle">
+      <subsection name="Description">
+        <p>
+          Checks the style of array type definitions.  Some like Java style:
+          <code>public static void main(String[] args)</code> and some like
+          C style: public static void main(String args[])
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>javaStyle</td>
+            <td>
+              Controls whether to enforce Java style (true) or C style (false).
+            </td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check to enforce Java style:
+        </p>
+        <source>
+<module name="ArrayTypeStyle"/>
+        </source>
+
+        <p>
+          To configure the check to enforce C style:
+        </p>
+        <source>
+<module name="ArrayTypeStyle">
+    <property name="javaStyle" value="false"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="FinalParameters">
+      <subsection name="Description">
+        <p>
+          Check that parameters for methods, constructors, and catch blocks are
+          final. Interface and abstract methods are not checked: the final
+          keyword does not make sense for interface and abstract method
+          parameters as there is no code that could modify the parameter.
+        </p>
+
+        <p>
+          Rationale: Changing the value of parameters during the execution of
+          the method's algorithm can be confusing and should be avoided. A
+          great way to let the Java compiler prevent this coding style is to
+          declare parameters final.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>blocks to check</td>
+
+            <td>subset of tokens <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>,
+             <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_CATCH">LITERAL_CATCH</a></td>
+
+            <td><a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+            <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a></td>
+
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check to enforce final parameters for methods and
+          constructors:
+        </p>
+        <source>
+<module name="FinalParameters"/>
+        </source>
+
+        <p>
+          To configure the check to enforce final parameters only for
+          constructors:
+        </p>
+        <source>
+<module name="FinalParameters">
+    <property name="tokens" value="CTOR_DEF"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="DescendantToken">
+      <subsection name="Description">
+        <p>
+          Checks for restricted tokens beneath other tokens.
+        </p>
+
+        <p>
+          WARNING: This is a very powerful and flexible check, but, at the
+          same time, it is low-level and very implementation-dependent because
+          its results depend on the grammar we use to build abstract syntax
+          trees. Thus we recommend using other checks when they provide the
+          desired functionality. Essentially, this check just works on the level
+          of an abstract syntax tree and knows nothing about language structures.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>token types to check</td>
+            <td>subset of tokens declared in <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html">TokenTypes</a></td>
+            <td>empty set</td>
+          </tr>
+          <tr>
+            <td>limitedTokens</td>
+            <td>set of tokens with limited occurrences as descendants</td>
+            <td>subset of tokens declared in <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html">TokenTypes</a></td>
+            <td>empty set</td>
+          </tr>
+          <tr>
+            <td>minimumDepth</td>
+            <td>the minimum depth for descendant counts</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td>0</td>
+          </tr>
+          <tr>
+            <td>maximumDepth</td>
+            <td>the maximum depth for descendant counts</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td>java.lang.Integer.MAX_VALUE</td>
+          </tr>
+          <tr>
+            <td>minimumNumber</td>
+            <td>a minimum count for descendants</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td>0</td>
+          </tr>
+          <tr>
+            <td>maximumNumber</td>
+            <td>a maximum count for descendants</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td>java.lang.Integer.MAX_VALUE</td>
+          </tr>
+          <tr>
+            <td>sumTokenCounts</td>
+            <td>
+              whether the number of tokens found should be calculated
+              from the sum of the individual token counts
+            </td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>minimumMessage</td>
+            <td>error message when the minimum count is not reached</td>
+            <td><a href="property_types.html#string">String</a></td>
+            <td>"descendant.token.min"</td>
+          </tr>
+          <tr>
+            <td>maximumMessage</td>
+            <td>error message when the maximum count is exceeded</td>
+            <td><a href="property_types.html#string">String</a></td>
+            <td>"descendant.token.max"</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          Comparing <code>this</code> with <code>null</code> (i.e. <code>this ==
+          null</code> and <code>this != null</code>):
+        </p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="EQUAL,NOT_EQUAL"/>
+    <property name="limitedTokens" value="LITERAL_THIS,LITERAL_NULL"/>
+    <property name="maximumNumber" value="1"/>
+    <property name="maximumDepth" value="1"/>
+    <property name="sumTokenCounts" value="true"/>
+</module>
+        </source>
+
+        <p>String literal equality check:</p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="EQUAL,NOT_EQUAL"/>
+    <property name="limitedTokens" value="STRING_LITERAL"/>
+    <property name="maximumNumber" value="0"/>
+    <property name="maximumDepth" value="1"/>
+</module>
+        </source>
+
+        <p>Switch with no default:</p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="LITERAL_SWITCH"/>
+    <property name="maximumDepth" value="2"/>
+    <property name="limitedTokens" value="LITERAL_DEFAULT"/>
+    <property name="minimumNumber" value="1"/>
+</module>
+        </source>
+
+        <p>
+          Assert statement may have side effects (formatted for browser
+          display):
+        </p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="LITERAL_ASSERT"/>
+    <property name="limitedTokens" value="ASSIGN,DEC,INC,POST_DEC,
+        POST_INC,PLUS_ASSIGN,MINUS_ASSIGN,STAR_ASSIGN,DIV_ASSIGN,MOD_ASSIGN,
+        BSR_ASSIGN,SR_ASSIGN,SL_ASSIGN,BAND_ASSIGN,BXOR_ASSIGN,BOR_ASSIGN,
+        METHOD_CALL"/>
+    <property name="maximumNumber" value="0"/>
+</module>
+        </source>
+
+        <p>
+          The initialiser in <code>for</code> performs no setup (where a <code>while</code> statement could be used instead):
+        </p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="FOR_INIT"/>
+    <property name="limitedTokens" value="EXPR"/>
+    <property name="minimumNumber" value="1"/>
+</module>
+        </source>
+
+        <p>
+          The condition in <code>for</code> performs no check:
+        </p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="FOR_CONDITION"/>
+    <property name="limitedTokens" value="EXPR"/>
+    <property name="minimumNumber" value="1"/>
+</module>
+        </source>
+
+        <p>
+          A switch within a switch:
+        </p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="LITERAL_SWITCH"/>
+    <property name="limitedTokens" value="LITERAL_SWITCH"/>
+    <property name="maximumNumber" value="0"/>
+    <property name="minimumDepth" value="1"/>
+</module>
+        </source>
+
+        <p>A return statement from within a catch or finally block:</p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="LITERAL_FINALLY,LITERAL_CATCH"/>
+    <property name="limitedTokens" value="LITERAL_RETURN"/>
+    <property name="maximumNumber" value="0"/>
+</module>
+        </source>
+
+        <p>A try statement within a catch or finally block:</p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="LITERAL_CATCH,LITERAL_FINALLY"/>
+    <property name="limitedTokens" value="LITERAL_TRY"/>
+    <property name="maximumNumber" value="0"/>
+</module>
+        </source>
+
+        <p>Too many cases within a switch:</p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="LITERAL_SWITCH"/>
+    <property name="limitedTokens" value="LITERAL_CASE"/>
+    <property name="maximumDepth" value="2"/>
+    <property name="maximumNumber" value="10"/>
+</module>
+        </source>
+
+        <p>Too many local variables within a method:</p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="METHOD_DEF"/>
+    <property name="limitedTokens" value="VARIABLE_DEF"/>
+    <property name="maximumDepth" value="2"/>
+    <property name="maximumNumber" value="10"/>
+</module>
+        </source>
+
+        <p>Too many returns from within a method:</p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="METHOD_DEF"/>
+    <property name="limitedTokens" value="LITERAL_RETURN"/>
+    <property name="maximumNumber" value="3"/>
+</module>
+        </source>
+
+        <p>Too many fields within an interface:</p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="INTERFACE_DEF"/>
+    <property name="limitedTokens" value="VARIABLE_DEF"/>
+    <property name="maximumDepth" value="2"/>
+    <property name="maximumNumber" value="0"/>
+</module>
+        </source>
+
+        <p>Limits the number of exceptions a method can throw:</p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="LITERAL_THROWS"/>
+    <property name="limitedTokens" value="IDENT"/>
+    <property name="maximumNumber" value="1"/>
+</module>
+        </source>
+
+        <p>Limits the number of expressions in a method:</p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="METHOD_DEF"/>
+    <property name="limitedTokens" value="EXPR"/>
+    <property name="maximumNumber" value="200"/>
+</module>
+        </source>
+
+        <p>Disallows empty statements:</p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="EMPTY_STAT"/>
+    <property name="limitedTokens" value="EMPTY_STAT"/>
+    <property name="maximumNumber" value="0"/>
+    <property name="maximumDepth" value="0"/>
+    <property name="maximumMessage"
+        value="Empty statement is not allowed."/>
+</module>
+        </source>
+
+        <p>Too many fields within a class:</p>
+        <source>
+<module name="DescendantToken">
+    <property name="tokens" value="CLASS_DEF"/>
+    <property name="limitedTokens" value="VARIABLE_DEF"/>
+    <property name="maximumDepth" value="2"/>
+    <property name="maximumNumber" value="10"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="Indentation">
+      <subsection name="Description">
+        <p>
+          Checks correct indentation of Java code.
+        </p>
+
+        <p>
+          The idea behind this is that while pretty printers are
+          sometimes convenient for bulk reformats of legacy code, they often
+          either aren't configurable enough or just can't anticipate how
+          format should be done.  Sometimes this is personal preference, other
+          times it is practical experience.  In any case, this check should
+          just ensure that a minimal set of indentation rules is followed.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>basicOffset</td>
+            <td>how many spaces to use for new indentation level</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td>4</td>
+          </tr>
+          <tr>
+            <td>braceAdjustment</td>
+            <td>how far braces should be indented when on the next line</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td>0</td>
+          </tr>
+          <tr>
+            <td>caseIndent</td>
+            <td>how much to indent a case label</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td>4</td>
+          </tr>
+          <tr>
+            <td>throwsIndent</td>
+            <td>how far a throws clause should be indented when on next line</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td>4</td>
+          </tr>
+          <tr>
+            <td>arrayInitIndent</td>
+            <td>how much to indent an array initialisation when on next line</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td>4</td>
+          </tr>
+          <tr>
+            <td>lineWrappingIndentation</td>
+            <td>how far continuation line should be indented when line-wrapping is present</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td>4</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="Indentation"/>
+        </source>
+
+        <p>
+          To configure the check to enforce the indentation style recommended by
+          Oracle:
+        </p>
+
+        <source>
+<module name="Indentation">
+    <property name="caseIndent" value="0"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.indentation
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="TrailingComment">
+      <subsection name="Description">
+        <p>
+          The check to ensure that requires that comments be the only thing on
+          a line.  For the case of <code>//</code> comments that means that the only thing
+          that should precede it is whitespace.  It doesn't check comments if
+          they do not end a line; for example, it accepts the following:
+          <code>Thread.sleep( 10 <some comment here> );</code> Format
+          property is intended to deal with the "} // while" example.
+        </p>
+
+        <p>
+          Rationale: Steve McConnel in <cite>Code Complete</cite> suggests that
+          endline comments are a bad practice. An end line comment would be
+          one that is on the same line as actual code. For example:
+        </p>
+
+        <source>
+a = b + c;      // Some insightful comment
+d = e / f;        // Another comment for this line
+        </source>
+
+        <p>
+          Quoting <cite>Code Complete</cite> for the justification:
+        </p>
+
+        <ul>
+          <li> "The comments have to be aligned so that they do not
+          interfere with the visual structure of the code. If you don't align
+          them neatly, they'll make your listing look like it's been through a
+          washing machine."
+          </li>
+          <li> "Endline comments tend to be hard to format...It takes
+          time to align them. Such time is not spent learning more about the
+          code; it's dedicated solely to the tedious task of pressing the
+          spacebar or tab key."
+          </li>
+          <li> "Endline comments are also hard to maintain. If the code
+          on any line containing an endline comment grows, it bumps the
+          comment farther out, and all the other endline comments will have to
+          bumped out to match. Styles that are hard to maintain aren't
+          maintained...."
+          </li>
+          <li> "Endline comments also tend to be cryptic. The right side
+          of the line doesn't offer much room and the desire to keep the
+          comment on one line means the comment must be short.  Work then goes
+          into making the line as short as possible instead of as clear as
+          possible. The comment usually ends up as cryptic as
+          possible...."
+          </li>
+          <li> "A systemic problem with endline comments is that it's
+          hard to write a meaningful comment for one line of code. Most
+          endline comments just repeat the line of code, which hurts more than
+          it helps."
+          </li>
+        </ul>
+
+        <p>
+          McConnel's comments on being hard to maintain when the size of the line
+          changes are even more important in the age of automated
+          refactorings.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>format</td>
+            <td>pattern for strings allowed before the comment</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>^[\\s\\}\\);]*$</code></td>
+          </tr>
+          <tr>
+            <td>legalComment</td>
+            <td>pattern for text allowed in trailing comments. (This
+                pattern will not be applied to multiline comments and the text of the
+                comment will be trimmed before matching.)</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td>(not set)</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="TrailingComment"/>
+        </source>
+
+        <p>
+          To configure the check so it enforces only comment on a line:
+        </p>
+        <source>
+<module name="TrailingComment">
+    <property name="format" value="^\\s*$"/>
+ </module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.indentation
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="Regexp">
+      <subsection name="Description">
+        <p>
+          A check that makes sure that a specified pattern exists, exists less
+          than a set number of times, or does not exist in the file.
+        </p>
+        <p>
+          This check combines all the functionality provided by
+          <a href="config_header.html#RegexpHeader">RegexpHeader</a>,
+          <a href="config_misc.html#GenericIllegalRegexp">GenericIllegalRegexp</a>
+          and <a href="config_misc.html#RequiredRegexp">RequiredRegexp</a>,
+          except supplying the regular expression from a file.
+        </p>
+        <p>
+          It differs from them in that it works in multiline mode.
+          Its regular expression can span multiple lines and it checks this
+          against the whole file at once.
+          The others work in singleline mode.
+          Their single or multiple regular expressions can only span one line.
+          They check each of these against each line in the file in turn.
+        </p>
+        <p>
+          <b>Note:</b> Because of the different mode of operation there may be
+          some changes in the regular expressions used to achieve a particular end.
+        </p>
+        <p>In multiline mode...</p>
+        <ul>
+          <li> <code>^</code> means the beginning of a line, as opposed to beginning of the input.</li>
+          <li> For beginning of the input use <code>\A</code>.</li>
+          <li> <code>$</code> means the end of a line, as opposed to the end of the input.</li>
+          <li> For end of input use <code>\Z</code>.</li>
+          <li> Each line in the file is terminated with a line feed character.</li>
+        </ul>
+        <p>
+          <b>Note:</b> Not all regular expression engines are created equal. Some provide extra
+          functions that others do not and some elements of the syntax may vary.
+          This check makes use of the <a
+          href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/package-summary.html">
+          java.util.regex package</a>; please check its documentation for
+          details of how to construct a regular expression to achieve a particular
+          goal.
+        </p>
+        <p>
+          <b>Note:</b> When entering a regular expression as a parameter in the
+          XML config file you must also take into account the XML rules. e.g. if
+          you want to match a < symbol you need to enter &lt;. The regular
+          expression should be entered on one line.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>format</td>
+            <td>pattern</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>$^</code> (empty)</td>
+          </tr>
+          <tr>
+            <td>message</td>
+            <td>message which is used to notify about violations,
+            if empty then the default (hard-coded) message is used.</td>
+            <td><a href="property_types.html#string">String</a></td>
+            <td><code>""</code>(empty)</td>
+          </tr>
+          <tr>
+            <td>illegalPattern</td>
+            <td>Controls whether the pattern is required or illegal.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>duplicateLimit</td>
+            <td>Controls whether to check for duplicates of a required pattern,
+            any negative value means no checking for duplicates, any positive
+            value is used as the maximum number of allowed duplicates, if the
+            limit is exceeded errors will be logged.</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td><code>-1</code></td>
+          </tr>
+          <tr>
+            <td>errorLimit</td>
+            <td>Controls the maximum number of errors before the check will abort.</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td><code>100</code></td>
+          </tr>
+          <tr>
+            <td>ignoreComments</td>
+            <td>Controls whether to ignore matches found within comments.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          The following examples are mainly copied from the other 3 checks
+          mentioned above, to show how the same results can be achieved using
+          this check in place of them.
+        </p>
+        <p>
+          <b>To use like <a
+          href="config_misc.html#RequiredRegexp">RequiredRegexp
+          </a>:</b>
+        </p>
+        <p>
+          An example of how to configure the check to make sure a copyright
+          statement is included in the file:
+        </p>
+        <p> The statement. </p>
+        <source>
+// This code is copyrighted
+        </source>
+        <p> The check. </p>
+        <source>
+<module name="Regexp">
+   <property name="format" value="// This code is copyrighted"/>
+</module>
+        </source>
+        <p> Your statement may be multiline. </p>
+        <source>
+// This code is copyrighted
+// (c) MyCompany
+        </source>
+        <p> Then the check would be. </p>
+        <source>
+<module name="Regexp">
+   <property name="format" value="// This code is copyrighted\n// \(c\) MyCompany"/>
+</module>
+        </source>
+        <p><b>Note:</b> To search for parentheses () in a regular expression
+          you must escape them like \(\). This is required by the regexp engine,
+          otherwise it will think they are special instruction characters.
+        </p>
+        <p>
+          And to make sure it appears only once:
+        </p>
+        <source>
+<module name="Regexp">
+   <property name="format" value="// This code is copyrighted\n// \(c\) MyCompany"/>
+   <property name="duplicateLimit" value="0"/>
+</module>
+        </source>
+        <p>
+          It can also be useful to attach a meaningful message to the check:
+        </p>
+        <source>
+<module name="Regexp">
+   <property name="format" value="// This code is copyrighted\n// \(c\) MyCompany"/>
+   <property name="message" value="Copyright"/>
+</module>
+        </source>
+        <p>
+          <b>To use like <a
+          href="config_misc.html#GenericIllegalRegexp">GenericIllegalRegexp
+          </a>:</b>
+        </p>
+        <p>
+          An example of how to configure the check to make sure there are no
+          calls to <code>System.out.println</code>:
+        </p>
+        <source>
+<module name="Regexp">
+    <!-- . matches any character, so we need to escape it and use \. to match dots. -->
+    <property name="format" value="System\.out\.println"/>
+    <property name="illegalPattern" value="true"/>
+</module>
+        </source>
+        <p>
+          You may want to make the above check ignore comments, like this:
+        </p>
+        <source>
+<module name="Regexp">
+    <property name="format" value="System\.out\.println"/>
+    <property name="illegalPattern" value="true"/>
+    <property name="ignoreComments" value="true"/>
+</module>
+        </source>
+        <p>
+          An example of how to configure the check to find trailing whitespace
+          at the end of a line:
+        </p>
+        <source>
+<module name="Regexp">
+    <property name="format" value="[ \t]+$"/>
+    <property name="illegalPattern" value="true"/>
+    <property name="message" value="Trailing whitespace"/>
+</module>
+        </source>
+        <p>
+          <b>Note:</b> The difference between this and the example given for
+          <a href="config_misc.html#genericIllegalRegexp">GenericIllegalRegexp</a>
+          is necessary because \s and $ both match the newline character ("\n").
+        </p>
+        <p>
+          An example of how to configure the check to find case-insensitive
+          occurrences of "debug":
+        </p>
+        <source>
+<module name="Regexp">
+    <property name="format" value="(?i)debug"/>
+    <property name="illegalPattern" value="true"/>
+</module>
+        </source>
+        <p>
+          <b>Note:</b> The (?i) at the beginning of the regular expression
+          tells the regexp engine to ignore the case.
+        </p>
+        <p>
+          There is also a feature to limit the number of errors reported.
+          When the limit is reached the check aborts with a message
+          reporting that the limit has been reached.
+          The default limit setting is 100, but this can be change as shown in
+          the following example.
+        </p>
+        <source>
+<module name="Regexp">
+    <property name="format" value="(?i)debug"/>
+    <property name="illegalPattern" value="true"/>
+    <property name="errorLimit" value="1000"/>
+</module>
+        </source>
+        <p>
+          <b>To use like <a
+          href="config_misc.html#RegexpHeader">RegexpHeader
+          </a>:</b>
+        </p>
+        <p>
+          To configure the check to verify that each file starts with the
+          following multiline header.
+        </p>
+        <p>Note the following:</p>
+        <ul>
+          <li>\A means the start of the file.</li>
+          <li>The date can be any 4 digit number.</li>
+        </ul>
+
+        <source>
+// Copyright (C) 2004 MyCompany
+// All rights reserved
+        </source>
+        <source>
+<module name="Regexp">
+  <property
+    name="format"
+    value="\A// Copyright \(C\) \d\d\d\d MyCompany\n// All rights reserved"/>
+</module>
+        </source>
+        <p>
+          A more complex example. Note how the import and javadoc multilines are
+          handled, there can be any number of them.
+        </p>
+        <source>
+///////////////////////////////////////////////////////////////////////
+// checkstyle:
+// Checks Java source code for adherence to a set of rules.
+// Copyright (C) 2004  Oliver Burn
+// Last modification by $Author A.N.Other$
+///////////////////////////////////////////////////////////////////////
+
+package com.puppycrawl.checkstyle;
+
+import java.util.thing1;
+import java.util.thing2;
+import java.util.thing3;
+
+/**
+ * javadoc line 1
+ * javadoc line 2
+ * javadoc line 3
+ */
+        </source>
+        <source>
+<module name="Regexp">
+  <property
+    name="format"
+    value="\A/{71}\n// checkstyle:\n// Checks Java source code for
+    adherence to a set of rules\.\n// Copyright \(C\) \d\d\d\d  Oliver Burn\n
+    // Last modification by \$Author.*\$\n/{71}\n\npackage [\w\.]*;\n\n
+    (import [\w\.]*;\n)*\n/\*\*\n( \*[^/]*\n)* \*/"/>
+</module>
+        </source>
+        <p>
+          <b>More examples:</b>
+        </p>
+        <p>
+          The next 2 examples deal with the following example Java source file:
+        </p>
+        <source>
+/*
+ * PID.java
+ *
+ * Copyright (c) 2001 ACME
+ * 123 Some St.
+ * Somewhere.
+ *
+ * This software is the confidential and proprietary information of ACME.
+ * ("Confidential Information"). You shall not disclose such
+ * Confidential Information and shall use it only in accordance with
+ * the terms of the license agreement you entered into with ACME.
+ *
+ * $Log: config_misc.xml,v $
+ * Revision 1.7  2007/01/16 12:16:35  oburn
+ * Removing all reference to mailing lists
+ *
+ * Revision 1.6  2005/12/25 16:13:10  o_sukhodolsky
+ * Fix for rfe 1248106 (TYPECAST is now accepted by NoWhitespaceAfter)
+ *
+ * Fix for rfe 953266 (thanks to Paul Guyot (pguyot) for submitting patch)
+ * IllegalType can be configured to accept some abstract classes which
+ * matches to regexp of illegal type names (property legalAbstractClassNames)
+ *
+ * TrailingComment now can be configured to accept some trailing comments
+ * (such as NOI18N) (property legalComment, rfe 1385344).
+ *
+ * Revision 1.5  2005/11/06 11:54:12  oburn
+ * Incorporate excellent patch [ 1344344 ] Consolidation of regexp checks.
+ *
+ * Revision 1.3.8.1  2005/10/11 14:26:32  someone
+ * Fix for bug 251.  The broken bit is fixed
+ */
+
+package com.acme.tools;
+
+import com.acme.thing1;
+import com.acme.thing2;
+import com.acme.thing3;
+
+/**
+ *
+ * <P>
+ *   <I>This software is the confidential and proprietary information of
+ *   ACME (<B>"Confidential Information"</B>). You shall not
+ *   disclose such Confidential Information and shall use it only in
+ *   accordance with the terms of the license agreement you entered into
+ *   with ACME.</I>
+ * </P>
+ *
+ * &#169; copyright 2002 ACME
+ *
+ * @author   Some Body
+ */
+public class PID extends StateMachine implements WebObject.Constants {
+
+    /** javadoc. */
+    public static final int A_SETPOINT = 1;
+    .
+    .
+    .
+} // class PID
+        </source>
+        <p>
+          This checks for the presence of the header, the first 16 lines.
+        </p>
+        <p>Note the following:</p>
+        <ul>
+          <li>Line 2 and 13 contain the file name. These are checked to
+          make sure they are the same, and that they match the class name.</li>
+          <li>The date can be any 4 digit number.</li>
+        </ul>
+
+        <source>
+<module name="Regexp">
+        <property
+                name="format"
+                value="\A/\*\n \* (\w*)\.java\n \*\n \* Copyright \(c\)
+                \d\d\d\d ACME\n \* 123 Some St\.\n \* Somewhere\.\n \*\n
+                \* This software is the confidential and proprietary information
+                of ACME\.\n \* \("Confidential Information"\)\. You
+                shall not disclose such\n \* Confidential Information and shall
+                use it only in accordance with\n \* the terms of the license
+                agreement you entered into with ACME\.\n \*\n
+                \* \$Log: config_misc.xml,v $
+                \* \Revision 1.7  2007/01/16 12:16:35  oburn
+                \* \Removing all reference to mailing lists
+                \* \
+                \* \Revision 1.6  2005/12/25 16:13:10  o_sukhodolsky
+                \* \Fix for rfe 1248106 (TYPECAST is now accepted by NoWhitespaceAfter)
+                \* \
+                \* \Fix for rfe 953266 (thanks to Paul Guyot (pguyot) for submitting patch)
+                \* \IllegalType can be configured to accept some abstract classes which
+                \* \matches to regexp of illegal type names (property legalAbstractClassNames)
+                \* \
+                \* \TrailingComment now can be configured to accept some trailing comments
+                \* \(such as NOI18N) (property legalComment, rfe 1385344).
+                \* \
+                \* \Revision 1.5  2005/11/06 11:54:12  oburn
+                \* \Incorporate excellent patch [ 1344344 ] Consolidation of regexp checks.
+                \* \\n(.*\n)*([\w|\s]*( class | interface )\1)"/>
+        <property name="message" value="Correct header not found"/>
+</module>
+        </source>
+        <p>
+          This checks for the presence of a copyright notice within the class
+          javadoc, lines 24 to 37.
+        </p>
+        <source>
+<module name="Regexp">
+        <property
+                name="format"
+                value="(/\*\*\n)( \*.*\n)*( \* &lt;P&gt;\n \*   &lt;I&gt;
+                This software is the confidential and proprietary information of\n
+                \*   ACME \(&lt;B&gt;&quot;Confidential Information&quot;&lt;/B&gt;
+                \)\. You shall not\n \*   disclose such Confidential Information
+                and shall use it only in\n \*   accordance with the terms of the
+                license agreement you entered into\n \*   with ACME\.&lt;/I&gt;\n
+                 \* &lt;/P&gt;\n \*\n \* &#169; copyright \d\d\d\d ACME\n
+                  \*\n \* @author .*)(\n\s\*.*)*/\n[\w|\s]*( class | interface )"/>
+        <property name="message" value="Copyright in class/interface Javadoc"/>
+        <property name="duplicateLimit" value="0"/>
+</module>
+        </source>
+        <p>
+          <b>Note:</b> To search for things that mean something in XML, like
+          < you need to escape them like &lt;. This is required so the
+          XML parser does not act on them, but instead passes the correct
+          character to the regexp engine.
+        </p>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="OuterTypeFilename">
+      <subsection name="Description">
+        <p>
+          Checks that the outer type name and the file name match. For example,
+          the class <code>Foo</code> must be in a file named
+          <code>Foo.java</code>.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <p>None.</p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="OuterTypeFilename"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="UniqueProperties">
+      <subsection name="Description">
+        <p>
+          Checks properties file for a duplicated properties.
+        </p>
+        <p>
+          Rationale: Multiple property keys usualy appears after merge
+          or rebase of several branches. While there is no errors in
+          runtime, there can be a confusion on having different values
+          for the duplicated properties.
+        </p>
+
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>fileExtensions</td>
+            <td>file type extension of the files to check.</td>
+            <td><a href="property_types.html#stringSet">String Set</a></td>
+            <td>properties</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="UniqueProperties">
+    <property name="fileExtensions" value="properties" />
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#Checker">Checker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="AvoidEscapedUnicodeCharacters">
+      <subsection name="Description">
+        <p>
+          Restrict using <a href = "http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.3">
+          Unicode escapes</a> (e.g. \u221e).
+          It is possible to allow using escapes for
+          <a href="http://en.wiktionary.org/wiki/Appendix:Control_characters"> non-printable(control) characters</a>.
+          Also, this check can be configured to allow using escapes
+          if trail comment is present. By the option it is possible to
+          allow using escapes if literal contains only them.
+        </p>
+      </subsection>
+
+       <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>allowEscapesForControlCharacters</td>
+            <td>Allow use escapes for non-printable(control) characters.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td>false</td>
+          </tr>
+          <tr>
+            <td>allowByTailComment</td>
+            <td>Allow use escapes if trail comment is present.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td>false</td>
+          </tr>
+          <tr>
+            <td>allowIfAllCharactersEscaped</td>
+            <td>Allow if all characters in literal are excaped.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td>false</td>
+          </tr>
+          <tr>
+            <td>allowNonPrintableEscapes</td>
+            <td>Allow non-printable escapes.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td>false</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+       <p>
+          Examples of using Unicode:
+        </p>
+        <source>
+String unitAbbrev = "μs"; //Best: perfectly clear even without a comment.
+String unitAbbrev = "\u03bcs"; //Poor: the reader has no idea what this is.
+        </source>
+        <p>
+          An example of how to configure the check is:
+        </p>
+        <source>
+<module name="AvoidEscapedUnicodeCharacters"/>
+        </source>
+        <p>
+          An example of non-printable(control) characters.
+        </p>
+        <source>
+return '\ufeff' + content; // byte order mark
+        </source>
+        <p>
+          An example of how to configure the check to allow using escapes
+          for non-printable(control) characters:
+        </p>
+        <source>
+<module name="AvoidEscapedUnicodeCharacters">
+    <property name="allowEscapesForControlCharacters" value="true"/>
+</module>
+        </source>
+        <p>
+          Example of using escapes with trail comment:
+        </p>
+        <source>
+String unitAbbrev = "\u03bcs"; // Greek letter mu, "s"
+        </source>
+        <p>
+          An example of how to configure the check to allow using escapes
+          if trail comment is present:
+        </p>
+        <source>
+<module name="AvoidEscapedUnicodeCharacters">
+    <property name="allowByTailComment" value="true"/>
+</module>
+        </source>
+        <p>
+          Example of using escapes if literal contains only them:
+        </p>
+        <source>
+String unitAbbrev = "\u03bc\u03bc\u03bc";
+        </source>
+        <p>
+          An example of how to configure the check to allow escapes
+          if literal contains only them:
+        </p>
+        <source>
+<module name="AvoidEscapedUnicodeCharacters">
+    <property name="allowIfAllCharactersEscaped" value="true"/>
+</module>
+        </source>
+        <p>
+          An example of how to configure the check to allow non-printable escapes:
+        </p>
+        <source>
+<module name="AvoidEscapedUnicodeCharacters">
+    <property name="allowNonPrintableEscapes" value="true"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="UniqueProperties">
+      <subsection name="Description">
+        <p>
+          Checks properties file for a duplicated properties.
+        </p>
+        <p>
+          Rationale: Multiple property keys usualy appears after merge
+          or rebase of several branches. While there is no errors in
+          runtime, there can be a confusion on having different values
+          for the duplicated properties.
+        </p>
+
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>fileExtensions</td>
+            <td>file type extension of the files to check.</td>
+            <td><a href="property_types.html#stringSet">String Set</a></td>
+            <td>properties</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="UniqueProperties">
+    <property name="fileExtensions" value="properties" />
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#Checker">Checker</a>
+        </p>
+      </subsection>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/config_modifier.xml b/src/xdocs/config_modifier.xml
new file mode 100644
index 0000000..3b60f68
--- /dev/null
+++ b/src/xdocs/config_modifier.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Modifiers</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+    <section name="ModifierOrder">
+      <subsection name="Description">
+        <p>
+          Checks that the order of modifiers conforms to the suggestions in
+          the <a
+          href="http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html">Java
+          Language specification, sections 8.1.1, 8.3.1 and 8.4.3</a>. The
+          correct order is:
+        </p>
+
+        <ol>
+          <li>
+            <code>public</code>
+          </li>
+          <li>
+            <code>protected</code>
+          </li>
+          <li>
+            <code>private</code>
+          </li>
+          <li>
+            <code>abstract</code>
+          </li>
+          <li>
+            <code>static</code>
+          </li>
+          <li>
+            <code>final</code>
+          </li>
+          <li>
+            <code>transient</code>
+          </li>
+          <li>
+            <code>volatile</code>
+          </li>
+          <li>
+            <code>synchronized</code>
+          </li>
+          <li>
+            <code>native</code>
+          </li>
+          <li>
+            <code>strictfp</code>
+          </li>
+        </ol>
+      </subsection>
+
+      <subsection name="Example">
+        <p> To configure the check: </p>
+        <source>
+<module name="ModifierOrder"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p> com.puppycrawl.tools.checkstyle.checks.modifier </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="RedundantModifier">
+
+      <subsection name="Description">
+        <p>
+          Checks for redundant modifiers in:
+        </p>
+        <ol>
+          <li>interface and annotation definitions,</li>
+          <li>the final modifier on methods of final classes, and </li>
+          <li>
+            inner <code>interface</code> declarations that are declared
+            as <code>static</code>.
+          </li>
+        </ol>
+        <p>
+          Rationale: The Java Language Specification strongly
+          discourages the usage of <code>public</code> and <code>abstract</code> for method
+          declarations in interface definitions as a matter of style.
+        </p>
+
+        <p>
+          Interfaces by definition are abstract so the <code>abstract</code>
+          modifier on the interface is redundant.
+        </p>
+
+        <p>
+          Variables in interfaces and annotations are automatically
+          public, static and final, so these modifiers are redundant as
+          well.
+        </p>
+
+        <p>
+          As annotations are a form of interface, their fields are also
+          automatically public, static and final just as their
+          annotation fields are automatically public and abstract.
+        </p>
+
+        <p>
+          Final classes by definition cannot be extended so the <code>final</code>
+          modifier on the method of a final class is redundant.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_FIELD_DEF">ANNOTATION_FIELD_DEF</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">INTERFACE_DEF</a>
+            </td>
+            <td>
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_FIELD_DEF">ANNOTATION_FIELD_DEF</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">INTERFACE_DEF</a>
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p> To configure the check: </p>
+        <source>
+<module name="RedundantModifier"/>
+        </source>
+
+        <p>
+          To configure the check to check only methods and not variables:
+        </p>
+        <source>
+<module name="RedundantModifier">
+  <property name="tokens" value="METHOD_DEF"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p> com.puppycrawl.tools.checkstyle.checks.modifier </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/config_naming.xml b/src/xdocs/config_naming.xml
new file mode 100644
index 0000000..df1192b
--- /dev/null
+++ b/src/xdocs/config_naming.xml
@@ -0,0 +1,436 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Naming Conventions</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+
+    <section name="Overview">
+      <p>
+        Each of these naming modules validates identifiers for particular code
+        elements. Valid identifiers for a naming module are specified by its
+        <code> format</code> property. The value of <code>format</code> is a <a
+        href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html">
+        regular expression</a> for valid identifiers.  This is an example of a
+        configuration of the <code>MemberName</code> module to
+        ensure that member identifiers begin with
+        <code>'m'</code>, followed
+        by an upper case letter, and then letters and digits:
+      </p>
+
+      <source>
+<module name="MemberName">
+  <property name="format" value="^m[A-Z][a-zA-Z0-9]*$"/>
+</module>
+      </source>
+
+      <p>
+        All naming modules belong to package <code>com.puppycrawl.tools.checkstyle.checks.naming</code> and
+        are submodules of <a href="config.html#TreeWalker"><code>TreeWalker</code></a>.
+      </p>
+    </section>
+
+    <section name="Modules">
+      <table>
+        <tr>
+          <th>module</th>
+          <th>validates identifiers for</th>
+          <th>default value of <code>format</code></th>
+        </tr>
+        <tr>
+          <td><code>AbstractClassName</code></td>
+          <td><code>abstract</code> classes</td>
+          <td><code>^Abstract.*$|^.*Factory$</code></td>
+        </tr>
+        <tr>
+          <td><code>ClassTypeParameterName</code></td>
+          <td>class type parameters</td>
+          <td><code>^[A-Z]$</code></td>
+        </tr>
+        <tr>
+          <td><code>ConstantName</code></td>
+          <td>
+            constants (<code>static</code>, <code>
+            final</code> fields)
+          </td>
+          <td><code>^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$</code></td>
+        </tr>
+        <tr>
+          <td><code>LocalFinalVariableName</code></td>
+          <td>local, <code>final</code> variables, including
+              <code>catch</code> parameters</td>
+          <td><code>^[a-z][a-zA-Z0-9]*$</code></td>
+        </tr>
+        <tr>
+          <td><code>LocalVariableName</code></td>
+          <td>
+            local, non-<code>final</code> variables, including
+            <code>catch</code> parameters
+          </td>
+          <td><code>^[a-z][a-zA-Z0-9]*$</code></td>
+        </tr>
+        <tr>
+          <td><code>MemberName</code></td>
+          <td>non-<code>static</code> fields</td>
+          <td><code>^[a-z][a-zA-Z0-9]*$</code></td>
+        </tr>
+        <tr>
+          <td><code>MethodName</code></td>
+          <td>methods</td>
+          <td><code>^[a-z][a-zA-Z0-9]*$</code></td>
+        </tr>
+        <tr>
+          <td><code>MethodTypeParameterName</code></td>
+          <td>method type parameters</td>
+          <td><code>^[A-Z]$</code></td>
+        </tr>
+        <tr>
+          <td><code>InterfaceTypeParameterName</code></td>
+          <td>interface type parameters</td>
+          <td><code>^[A-Z]$</code></td>
+        </tr>
+        <tr>
+          <td><code>PackageName</code></td>
+          <td>packages</td>
+          <td>
+            <code>^[a-z]+(\.[a-zA-Z_][a-zA-Z0-9_]*)*$</code>
+          </td>
+        </tr>
+        <tr>
+          <td><code>ParameterName</code></td>
+          <td>parameters</td>
+          <td><code>^[a-z][a-zA-Z0-9]*$</code></td>
+        </tr>
+        <tr>
+          <td><code>StaticVariableName</code></td>
+          <td>
+            <code>static</code>, non-<code>final</code> fields
+          </td>
+          <td><code>^[a-z][a-zA-Z0-9]*$</code></td>
+        </tr>
+        <tr>
+          <td><code>TypeName</code></td>
+          <td>classes, interfaces, enums, and annotations</td>
+          <td><code>^[A-Z][a-zA-Z0-9]*$</code></td>
+        </tr>
+      </table>
+    </section>
+
+    <section name="Enhancements">
+      <subsection name="LocalVariableName">
+        <p>
+          Module <code>LocalVariableName</code> also has property
+          <code>tokens</code> which can be used to control whether the
+          check applies to variable declarations or <code>catch</code>
+          clause parameters through tokens <code>VARIABLE_DEF</code> and
+          <code>PARAMETER_DEF</code>.  For example, the following
+          configuration element ensures that <code>catch</code> clause
+          parameters begin with <code>"e"</code>, followed by letters
+          and digits:
+        </p>
+
+        <source>
+<module name="LocalVariableName">
+    <property name="format" value="^e[a-zA-Z0-9]*$"/>
+    <property name="tokens" value="PARAMETER_DEF"/>
+</module>
+        </source>
+        <p>
+          The check provides the following properties:
+        </p>
+      </subsection>
+
+      <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>allowOneCharVarInForLoop</td>
+            <td>
+            Allow one character variable name in <a href="http://docs.oracle.com/javase/tutorial/java/nutsandbolts/for.html"> initialization expressions</a> in FOR loop. For example:
+              <pre>
+for (int i = 1; i < 10; i++) {}
+              </pre>
+            </td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+        </table>
+        <p>
+          An example of how to configure the check to allow one character variable name in
+          <a href="http://docs.oracle.com/javase/tutorial/java/nutsandbolts/for.html">
+          initialization expressions</a> in FOR loop:
+        </p>
+        <source>
+<module name="LocalVariableName">
+    <property name="allowOneCharVarInForLoop" value="true"/>
+</module>
+        </source>
+      <subsection name="TypeName">
+        <p>
+          Module <code>TypeName</code> also has property
+          <code>tokens</code>, which can be used to control the kind of type
+          that the check applies to. The value of the <code>tokens</code>
+          property is a comma-separated list of one or more of the following
+          tokens: <code>CLASS_DEF</code>, <code>INTERFACE_DEF</code>,
+          <code>ENUM_DEF</code>, <code>ANNOTATION_DEF</code>.<br/>
+          For example, the following configuration element ensures that
+          interface names begin with <code>"I_"</code>, followed by
+          letters and digits:
+        </p>
+
+        <source>
+<module name="TypeName">
+    <property name="format"
+              value="^I_[a-zA-Z0-9]*$"/>
+    <property name="tokens"
+              value="INTERFACE_DEF"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="MethodName">
+        <p>
+          Module <code>MethodName</code> also has the following
+          properties:
+        </p>
+
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>allowClassName</td>
+            <td>
+              Controls whether to allow a method name to have the same
+              name as the residing class name.  This is not to be confused
+              with a constructor.  An easy mistake is to place a return
+              type on a constructor declaration which turns it into a
+              method. For example:
+              <pre>
+class MyClass {
+    public void MyClass() {} //this is a method
+    public MyClass() {} //this is a constructor
+}
+              </pre>
+            </td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="AbstractClassName">
+        <p>
+          Module <code>AbstractClassName</code> also has the following
+          properties:
+        </p>
+
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>ignoreModifier</td>
+            <td>
+              Controls whether to ignore checking for the
+              <code>abstract</code> modifier on classes that match the
+              name.
+            </td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>ignoreName</td>
+            <td>
+              Controls whether to ignore checking the name. Realistically
+              only useful if using the check to identify that match name
+              and do not have the <code>abstract</code> modifier.  name.
+            </td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+        </table>
+
+        <p>
+          The following example shows how to configure the
+          <code>AbstractClassName</code> to checks names, but ignore
+          missing <code>abstract</code> modifiers:
+        </p>
+        <source>
+<module name="AbstractClassName">
+  <property name="ignoreModifier" value="true"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="...">
+        <p>
+          The modules <code>ConstantName</code>,
+          <code>MemberName</code>, <code>StaticVariableName</code> and
+          <code>TypeName</code> also have the following properties:
+        </p>
+
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>applyToPublic</td>
+            <td>Controls whether to apply the check to public member.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+          <tr>
+            <td>applyToProtected</td>
+            <td>Controls whether to apply the check to protected member.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+          <tr>
+            <td>applyToPackage</td>
+            <td>
+              Controls whether to apply the check to package-private member.
+            </td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+          <tr>
+            <td>applyToPrivate</td>
+            <td>Controls whether to apply the check to private member.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+        </table>
+      </subsection>
+    </section>
+
+    <section name="Notes">
+      <p>
+        The default value of <code>format</code> for module <code>PackageName</code> has been chosen to match the
+        requirements in the <a
+        href="http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html#40169">Java
+        Language specification</a> and the Sun coding conventions. However
+        both underscores and uppercase letters are rather uncommon, so most
+        configurations should probably assign value <code>^[a-z]+(\.[a-z][a-z0-9]*)*$</code> to <code>format</code> for module <code>PackageName</code>, as in
+      </p>
+
+      <source>
+<module name="PackageName">
+    <property name="format"
+              value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
+</module>
+      </source>
+    </section>
+
+    <section name="AbbreviationAsWordInName">
+      <subsection name="Description">
+        <p>
+         The Check validate abbreviations(consecutive capital letters)
+         length in identifier name, it also allows to enforce camel case naming. Please read more at
+         <a href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.3-camel-case">
+         Google Style Guide</a>
+         to get to know how to avoid long abbreviations in names.
+        </p>
+      </subsection>
+
+       <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>allowedAbbreviationLength</td>
+            <td> indicates on the allowed amount of capital letters in targeted identifiers
+             (abbreviations in the classes, interfaces, variables and methods names, ... ).</td>
+            <td><a href="property_types.html#integer">3</a></td>
+            <td>true</td>
+          </tr>
+          <tr>
+            <td>allowedAbbreviations</td>
+            <td>list of abbreviations that must be skipped for checking.
+            Abbreviations should be separated by comma, no spaces are allowed.</td>
+            <td><a href="property_types.html#StringSet">stringSet</a></td>
+            <td>null</td>
+          </tr>
+          <tr>
+            <td>ignoreFinal</td>
+            <td>allow to skip variables with final modifier.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td>true</td>
+          </tr>
+          <tr>
+            <td>ignoreStatic</td>
+            <td>allow to skip variables with static modifier.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td>true</td>
+          </tr>
+          <tr>
+            <td>ignoreOverriddenMethod</td>
+            <td>Allows to ignore methods tagged with @Override annotation
+            (that usually mean inherited name).</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td>true</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+       <p>
+         Default configuration
+         <source>
+<module name="AbbreviationAsWordInName"/>
+         </source>
+       </p>
+       <p>
+          To configure to check variables and classes identifiers,
+          do not ignore variables with static modifier and allow
+          no abbreviations (enforce camel case phrase) and
+          allow no abbreviations to use (camel case phrase) and allow XML and URL abbreviations.
+        </p>
+        <source>
+<module name="AbbreviationAsWordInName">
+    <property name="tokens" value="VARIABLE_DEF,CLASS_DEF"/>
+    <property name="ignoreStatic" value="false"/>
+    <property name="allowedAbbreviationLength" value="1"/>
+    <property name="allowedAbbreviation" value="XML,URL"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.naming
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+  </body>
+</document>
diff --git a/src/xdocs/config_regexp.xml b/src/xdocs/config_regexp.xml
new file mode 100644
index 0000000..2861b8d
--- /dev/null
+++ b/src/xdocs/config_regexp.xml
@@ -0,0 +1,311 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Regexp</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+    <section name="RegexpSingleline">
+      <subsection name="Description">
+        <p>
+          A check for detecting single lines that match a supplied
+          regular expression. Works with any file type.
+        </p>
+
+        <p>
+          Rationale: This check can be used to prototype checks and to
+          find common bad practice such as calling <code>ex.printStacktrace()</code>, <code>
+          System.out.println()</code>, <code>System.exit()</code>, etc.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>format</td>
+            <td>illegal pattern</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>^$</code> (empty)</td>
+          </tr>
+          <tr>
+            <td>message</td>
+            <td>message which is used to notify about violations,
+            if empty then default(hard-coded) message is used.</td>
+            <td><a href="property_types.html#string">String</a></td>
+            <td><code>""</code>(empty)</td>
+          </tr>
+          <tr>
+            <td>ignoreCase</td>
+            <td>Controls whether to ignore case when searching.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>minimum</td>
+            <td>The minimum number of matches required in each file.</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td><code>0</code></td>
+          </tr>
+          <tr>
+            <td>maximum</td>
+            <td>The maximum number of matches required in each file.</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td><code>0</code></td>
+          </tr>
+          <tr>
+            <td>fileExtensions</td>
+            <td>file type extension of files to process</td>
+            <td><a href="property_types.html#stringSet">String Set</a></td>
+            <td><code>{}</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check to find trailing whitespace at the end
+          of a line:
+        </p>
+        <source>
+<module name="RegexpSingleline">
+  <!-- \s matches whitespace character, $ matches end of line. -->
+  <property name="format" value="\s+$"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check to find trailing whitespace at the end
+          of a line, with some <i>slack</i> of allowing two occurrences
+          per file:
+        </p>
+        <source>
+<module name="RegexpSingleline">
+  <property name="format" value="\s+$"/>
+  <!-- next line not required as 0 is the default -->
+  <property name="minimum" value="0"/>
+  <property name="maximum" value="2"/>
+</module>
+        </source>
+
+        <p>
+          An example of how to configure the check to make sure a copyright
+          statement is included in the file:
+        </p>
+        <source>
+<module name="RegexpSingleline">
+  <property name="format" value="This file is copyrighted"/>
+  <property name="minimum" value="1"/>
+  <!--  Need to specify a maximum, so 10 times is more than enough. -->
+  <property name="maximum" value="10"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.regexp
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#Checker">Checker</a>
+        </p>
+      </subsection>
+    </section>
+
+
+    <section name="RegexpMultiline">
+      <subsection name="Description">
+        <p>
+          A check for detecting that matches across multiple lines.
+          Works with any file type.
+        </p>
+
+        <p>
+          Rationale: This check can be used to when the regular
+          expression can be span multiple lines.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>format</td>
+            <td>illegal pattern</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>^$</code> (empty)</td>
+          </tr>
+          <tr>
+            <td>message</td>
+            <td>message which is used to notify about violations,
+            if empty then default(hard-coded) message is used.</td>
+            <td><a href="property_types.html#string">String</a></td>
+            <td><code>""</code>(empty)</td>
+          </tr>
+          <tr>
+            <td>ignoreCase</td>
+            <td>Controls whether to ignore case when searching.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>minimum</td>
+            <td>The minimum number of matches required in each file.</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td><code>0</code></td>
+          </tr>
+          <tr>
+            <td>maximum</td>
+            <td>The maximum number of matches required in each file.</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td><code>0</code></td>
+          </tr>
+          <tr>
+            <td>fileExtensions</td>
+            <td>file type extension of files to process</td>
+            <td><a href="property_types.html#stringSet">String Set</a></td>
+            <td><code>{}</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check to find calls to print to the console:
+        </p>
+        <source>
+<module name="RegexpMultiline">
+  <property name="format"
+   value="System\.(out)|(err)\.print(ln)?\("/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.regexp
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#Checker">Checker</a>
+        </p>
+      </subsection>
+    </section>
+
+
+    <section name="RegexpSinglelineJava">
+      <subsection name="Description">
+        <p>
+          This class is variation on <a
+          href="#RegexpSingleline">RegexpSingleline</a> for detecting
+          single lines that match a supplied regular expression in Java files. It supports suppressing matches in Java comments.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>format</td>
+            <td>illegal pattern</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td><code>^$</code> (empty)</td>
+          </tr>
+          <tr>
+            <td>message</td>
+            <td>message which is used to notify about violations,
+            if empty then default(hard-coded) message is used.</td>
+            <td><a href="property_types.html#string">String</a></td>
+            <td><code>""</code>(empty)</td>
+          </tr>
+          <tr>
+            <td>ignoreCase</td>
+            <td>Controls whether to ignore case when searching.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>minimum</td>
+            <td>The minimum number of matches required in each file.</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td><code>0</code></td>
+          </tr>
+          <tr>
+            <td>maximum</td>
+            <td>The maximum number of matches required in each file.</td>
+            <td><a href="property_types.html#integer">Integer</a></td>
+            <td><code>0</code></td>
+          </tr>
+          <tr>
+            <td>ignoreComments</td>
+            <td>Controls whether to ignore text in comments when searching.</td>
+            <td><a href="property_types.html#boolean">Boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check for calls to <code>System.out.println</code>, except in comments:
+        </p>
+        <source>
+<module name="RegexpSinglelineJava">
+    <!-- . matches any character, so we need to
+         escape it and use \. to match dots. -->
+  <property name="format" value="System\.out\.println"/>
+  <property name="ignoreComments" value="true"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check to find case-insensitive occurrences of
+          "debug":
+        </p>
+        <source>
+<module name="RegexpSinglelineJava">
+    <property name="format" value="debug"/>
+    <property name="ignoreCase" value="true"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.regexp
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/config_reporting.xml b/src/xdocs/config_reporting.xml
new file mode 100644
index 0000000..b6e3e80
--- /dev/null
+++ b/src/xdocs/config_reporting.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Reporting Configuration</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+    <section name="Caching Support">
+      <p>
+        The property <code>checkstyle.cache.file</code>
+        specifies the name of a file that can be used to cache details
+        of files that pass Checkstyle. This can <i>significantly</i>
+        increase the speed of checkstyle on successive runs. The
+        property type is <a href="property_types.html#string">string</a>
+        and defaults to an empty string (which means no caching is done).
+      </p>
+    </section>
+
+    <section name="Localisation Support">
+      <p>
+        Checkstyle supports a mechanism for localising the output
+        messages. If your language is not supported, please consider
+        translating the messages in the <code>messages.properties</code> file. Please let us
+        know if you translate the file.
+      </p>
+
+      <p>
+        The property <code>checkstyle.locale.language</code> specifies the
+        language to use in localising the output messages. The property
+        type is <a href="property_types.html#string">string</a> and
+        defaults to the default system locale language.
+      </p>
+
+      <p>
+        The property <code>checkstyle.locale.country</code>
+        specifies the country to use in localising the output
+        messages. The property type is <a
+        href="property_types.html#string">string</a> and defaults to the
+        default system locale country.
+      </p>
+    </section>
+
+    <section name="Base directory support">
+      <p>
+        The property <code>checkstyle.basedir</code>
+        specifies a base directory which files are then reported
+        relative to. For example, if a base directory is specified as
+        <code>c:\projects\checkstyle</code>, then an error
+        in the file <code>c:\projects\checkstyle\src\dir\subdir\File.java</code>
+        will be reported as <code>src\dir\subdir\File.java</code>. The property type
+        is <a href="property_types.html#string">string</a> and defaults
+        to an empty string.
+      </p>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/config_sizes.xml b/src/xdocs/config_sizes.xml
new file mode 100644
index 0000000..5ece323
--- /dev/null
+++ b/src/xdocs/config_sizes.xml
@@ -0,0 +1,612 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Size Violations</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+
+    <section name="ExecutableStatementCount">
+      <subsection name="Description">
+        <p>
+          Restricts the number of executable statements to a specified limit.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>the maximum threshold allowed</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td><code>30</code></td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>members to check</td>
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+               <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INSTANCE_INIT">INSTANCE_INIT</a>,
+                <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STATIC_INIT">STATIC_INIT</a>
+            </td>
+            <td>all tokens</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="ExecutableStatementCount"/>
+        </source>
+
+        <p>
+          To configure the check with a threshold of 20 for constructor and
+          method definitions:
+        </p>
+        <source>
+<module name="ExecutableStatementCount">
+    <property name="max" value="20"/>
+    <property name="tokens" value="CTOR_DEF,METHOD_DEF"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.sizes
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="FileLength">
+      <subsection name="Description">
+        <p>
+          Checks for long source files.
+        </p>
+
+        <p>
+          Rationale: If a source file becomes very long it is hard to
+          understand.  Therefore long classes should usually be refactored
+          into several individual classes that focus on a specific task.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>maximum allowable number of lines</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td>2000</td>
+          </tr>
+          <tr>
+            <td>fileExtensions</td>
+            <td>file type extension of files to process</td>
+            <td><a href="property_types.html#stringSet">String Set</a></td>
+            <td><code>{}</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check to accept files with up to 1500 lines:
+        </p>
+        <source>
+<module name="FileLength">
+      <property name="max" value="1500"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.sizes
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#Checker">Checker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="LineLength">
+      <subsection name="Description">
+        <p>
+          Checks for long lines.
+        </p>
+
+        <p>
+          Rationale: Long lines are hard to read in printouts or if developers
+          have limited screen space for the source code, e.g. if the IDE
+          displays additional information like project tree, class hierarchy,
+          etc.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>ignorePattern</td>
+            <td>pattern for lines to ignore</td>
+            <td><a href="property_types.html#regexp">regular expression</a></td>
+            <td>^$</td>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>maximum allowable line length</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td>80</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check to accept lines up to 120 characters long:
+        </p>
+        <source>
+<module name="LineLength">
+    <property name="max" value="120"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check to ignore lines that begin with " *
+          ", followed by just one word, such as within a Javadoc comment:
+        </p>
+        <source>
+<module name="LineLength">
+   <property name="ignorePattern" value="^ *\* *[^ ]+$"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Notes">
+        <ul>
+          <li>
+            The calculation of the length of a line takes into account the
+            number of expanded spaces for a tab character (<code>'\t'</code>). The default number of spaces is <code>8</code>.  To specify a different number of spaces,
+            the user can set <a href="config.html#TreeWalker"><code>TreeWalker</code></a> property <code>tabWidth</code> which applies to all Checks,
+            including <code>LineLength</code>; or can set
+            property <code>tabWidth</code> for <code>LineLength</code> alone.
+          </li>
+          <li>
+            Support for the special handling of imports in CheckStyle Version
+            2 has been dropped as it is a special case of regexp: The user can
+            set property <code>ignorePattern</code> to <code>^import</code> and achieve the same effect.
+          </li>
+        </ul>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.sizes
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="MethodLength">
+      <subsection name="Description">
+        <p>
+          Checks for long methods and constructors.
+        </p>
+
+        <p>
+          Rationale: If a method becomes very long it is hard to
+          understand. Therefore long methods should usually be refactored into
+          several individual methods that focus on a specific task.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>maximum allowable number of lines</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td>150</td>
+          </tr>
+          <tr>
+            <td>countEmpty</td>
+            <td>
+              whether to count empty lines and single line comments of the
+              form <code>//</code>
+            </td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>blocks to check</td>
+
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>
+            </td>
+
+            <td>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+               <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="MethodLength"/>
+        </source>
+
+        <p>
+          To configure the check so that it accepts methods with at most 60
+          lines:
+        </p>
+        <source>
+<module name="MethodLength">
+   <property name="tokens" value="METHOD_DEF"/>
+   <property name="max" value="60"/>
+</module>
+        </source>
+
+        <p>
+          To configure the check so that it accepts methods with at most 60
+          lines, not counting empty lines and single line comments:
+        </p>
+        <source>
+<module name="MethodLength">
+   <property name="tokens" value="METHOD_DEF"/>
+   <property name="max" value="60"/>
+   <property name="countEmpty" value="false"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.sizes
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="AnonInnerLength">
+      <subsection name="Description">
+        <p>
+          Checks for long anonymous inner classes.
+        </p>
+
+        <p>
+          Rationale: If an anonymous inner class becomes very long it is hard
+          to understand and to see the flow of the method where the class is
+          defined. Therefore long anonymous inner classes should usually be
+          refactored into a named inner class.  See also Bloch, Effective
+          Java, p. 93.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>maximum allowable number of lines</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td>20</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check to accept files with up to 60 lines:
+        </p>
+        <source>
+<module name="AnonInnerLength">
+      <property name="max" value="60"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.sizes
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="ParameterNumber">
+      <subsection name="Description">
+        <p>
+          Checks the number of parameters of a method or constructor.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>maximum allowable number of parameters</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td>7</td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>declarations to check</td>
+
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>
+            </td>
+
+            <td>
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="ParameterNumber"/>
+        </source>
+
+        <p>
+          To configure the check to allow 10 parameters for a method:
+        </p>
+        <source>
+<module name="ParameterNumber">
+   <property name="max" value="10"/>
+   <property name="tokens" value="METHOD_DEF"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.sizes
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="OuterTypeNumber">
+      <subsection name="Description">
+        <p>
+          Checks for the number of types declared at the <i>outer</i>
+          (or <i>root</i>) level in a file.
+        </p>
+
+        <p>
+          Rationale: It is considered good practice to only define one outer
+          type per file.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>max</td>
+            <td>maximum allowable number of outer types</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td>1</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check to accept 1 outer type per file:
+        </p>
+        <source>
+<module name="OuterTypeNumber"/>
+        </source>
+
+        <p>
+          To configure the check to accept 2 outer types per file:
+        </p>
+        <source>
+<module name="OuterTypeNumber">
+      <property name="max" value="2"/>
+</module>
+        </source>
+
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.sizes
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="MethodCount">
+      <subsection name="Description">
+        <p>
+          Checks the number of methods declared in each type. This
+          includes the number of each scope (<code>private</code>,
+          <code>package</code>, <code>protected</code> and
+          <code>public</code>) as well as an overall total.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>maxTotal</td>
+            <td>maximum allowable number of methods at all scope levels</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td>100</td>
+          </tr>
+          <tr>
+            <td>maxPrivate</td>
+            <td>maximum allowable number of <code>private</code> methods</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td>100</td>
+          </tr>
+          <tr>
+            <td>maxPackage</td>
+            <td>maximum allowable number of <code>package</code> methods</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td>100</td>
+          </tr>
+          <tr>
+            <td>maxProtected</td>
+            <td>maximum allowable number of <code>protected</code> methods</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td>100</td>
+          </tr>
+          <tr>
+            <td>maxPublic</td>
+            <td>maximum allowable number of <code>public</code> methods</td>
+            <td><a href="property_types.html#integer">integer</a></td>
+            <td>100</td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check with defaults:
+        </p>
+        <source>
+<module name="MethodCount"/>
+        </source>
+
+        <p>
+          To configure the check to allow at most 30 methods per type:
+        </p>
+        <source>
+<module name="MethodCount">
+      <property name="maxTotal" value="30"/>
+</module>
+        </source>
+
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.sizes
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+  </body>
+</document>
diff --git a/src/xdocs/config_whitespace.xml b/src/xdocs/config_whitespace.xml
new file mode 100644
index 0000000..0757de1
--- /dev/null
+++ b/src/xdocs/config_whitespace.xml
@@ -0,0 +1,1535 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Whitespace</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+    <section name="GenericWhitespace">
+      <subsection name="Description">
+        <p>
+          Checks that the whitespace around the Generic tokens (angle brackets)
+          "<" and ">" are correct to the <i>typical</i> convention.
+          The convention is not configurable.
+        </p>
+        <p>
+          Left angle bracket ("<"):
+        </p>
+        <ul>
+          <li> should be preceded with whitespace only in generic methods definitions.</li>
+          <li> should not be preceded with whitespace when it is precede method name or following type name.</li>
+          <li> should not be followed with whitespace in all cases.</li>
+        </ul>
+        <p>
+          Right angle bracket (">"):
+        </p>
+        <ul>
+          <li> should not be preceded with whitespace in all cases.</li>
+          <li> should be followed with whitespace in almost all cases, except diamond operators and when preceding method name.</li>
+        </ul>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          Examples with correct spacing:
+        </p>
+        <source>
+public void <K, V extends Number> boolean foo(K, V) {} // Generic methods definitions
+class name<T1, T2, ..., Tn> {}                         // Generic type definition
+OrderedPair<String, Box<Integer>> p;                   // Generic type reference
+boolean same = Util.<Integer, String>compare(p1, p2);  // Generic preceded method name
+Pair<Integer, String> p1 = new Pair<>(1, "apple");     // Diamond operator
+        </source>
+      </subsection>
+
+      <subsection name="Properties">
+
+        <p>
+          None.
+        </p>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="GenericWhitespace"/>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.whitespace
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="EmptyForInitializerPad">
+      <subsection name="Description">
+        <p>
+          Checks the padding of an empty for initializer; that is whether
+          white space is required at an empty for initializer, or such white
+          space is forbidden.  No check occurs if there is a line wrap at the
+          initializer, as in
+        </p>
+
+        <source>
+for (
+      ; i < j; i++, j--)
+        </source>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>option</td>
+            <td>policy on how to pad an empty for iterator</td>
+            <td><a href="property_types.html#parenPad">pad policy</a></td>
+            <td><code>nospace</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="EmptyForInitializerPad"/>
+        </source>
+
+        <p>
+          To configure the check to require white space at an empty for
+          iterator:
+        </p>
+        <source>
+<module name="EmptyForInitializerPad">
+    <property name="option" value="space"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.whitespace
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="EmptyForIteratorPad">
+      <subsection name="Description">
+        <p>
+          Checks the padding of an empty for iterator; that is whether white
+          space is required at an empty for iterator, or such white space is
+          forbidden.  No check occurs if there is a line wrap at the iterator,
+          as in
+        </p>
+        <source>
+for (Iterator foo = very.long.line.iterator();
+      foo.hasNext();
+     )
+        </source>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>option</td>
+            <td>policy on how to pad an empty for iterator</td>
+            <td><a href="property_types.html#parenPad">pad policy</a></td>
+            <td><code>nospace</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="EmptyForIteratorPad"/>
+        </source>
+
+        <p>
+          To configure the check to require white space at an empty for
+          iterator:
+        </p>
+        <source>
+<module name="EmptyForIteratorPad">
+    <property name="option" value="space"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.whitespace
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="MethodParamPad">
+      <subsection name="Description">
+        <p>
+          Checks the padding between the identifier of a method definition,
+          constructor definition, method call, or constructor invocation; and
+          the left parenthesis of the parameter list.  That is, if the
+          identifier and left parenthesis are on the same line, checks whether
+          a space is required immediately after the identifier or such a space
+          is forbidden.  If they are not on the same line, reports an error,
+          unless configured to allow line breaks.  To allow linebreaks after
+          the identifier, set property <code>allowLineBreaks</code> to <code>
+          true</code>.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>allowLineBreaks</td>
+            <td>
+              whether a line break between the identifier and left parenthesis
+              is allowed
+            </td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>option</td>
+            <td>policy on how to pad method parameter</td>
+            <td>
+              <a href="property_types.html#parenPad">pad policy</a>
+            </td>
+            <td><code>nospace</code></td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_NEW">LITERAL_NEW</a>,
+               <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_CALL">METHOD_CALL</a>,
+                <a
+                 href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+                 <a
+                 href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SUPER_CTOR_CALL">SUPER_CTOR_CALL</a>
+            </td>
+
+            <td>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>,
+               <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_NEW">LITERAL_NEW</a>,
+                <a
+                 href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_CALL">METHOD_CALL</a>,
+                 <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+                  <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SUPER_CTOR_CALL">SUPER_CTOR_CALL</a>
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="MethodParamPad"/>
+        </source>
+
+        <p>
+          To configure the check to require a space after the identifier of a
+          method definition, except if the left parenthesis occurs on a new
+          line:
+        </p>
+        <source>
+<module name="MethodParamPad">
+    <property name="tokens" value="METHOD_DEF"/>
+    <property name="option" value="space"/>
+    <property name="allowLineBreaks" value="true"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.whitespace
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="NoWhitespaceAfter">
+      <subsection name="Description">
+        <p>
+          Checks that there is no whitespace after a token. More specifically,
+          it checks that it is not followed by whitespace, or (if linebreaks
+          are allowed) all characters on the line after are whitespace. To
+          forbid linebreaks after a token, set property <code>allowLineBreaks</code> to <code>
+          false</code>.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>allowLineBreaks</td>
+            <td>
+              whether whitespace is allowed if the token is at a linebreak
+            </td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ARRAY_INIT">ARRAY_INIT</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BNOT">BNOT</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DEC">DEC</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DOT">DOT</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INC">INC</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LNOT">LNOT</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#UNARY_MINUS">UNARY_MINUS</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#UNARY_PLUS">UNARY_PLUS</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#TYPECAST">TYPECAST</a>
+            </td>
+
+            <td>
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ARRAY_INIT">ARRAY_INIT</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BNOT">BNOT</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DEC">DEC</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DOT">DOT</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INC">INC</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LNOT">LNOT</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#UNARY_MINUS">UNARY_MINUS</a>,
+              <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#UNARY_PLUS">UNARY_PLUS</a>
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="NoWhitespaceAfter"/>
+        </source>
+
+        <p>
+          To configure the check to forbid linebreaks after a DOT token:
+        </p>
+        <source>
+<module name="NoWhitespaceAfter">
+    <property name="tokens" value="DOT"/>
+    <property name="allowLineBreaks" value="false"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.whitespace
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="NoWhitespaceBefore">
+      <subsection name="Description">
+        <p>
+          Checks that there is no whitespace before a token. More
+          specifically, it checks that it is not preceded with whitespace, or
+          (if linebreaks are allowed) all characters on the line before are
+          whitespace. To allow linebreaks before a token, set property <code>allowLineBreaks</code> to <code>
+          true</code>.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>allowLineBreaks</td>
+            <td>
+              whether whitespace is allowed if the token is at a linebreak
+            </td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SEMI">SEMI</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DOT">DOT</a>,
+               <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#POST_DEC">POST_DEC</a>,
+                <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#POST_INC">POST_INC</a>
+            </td>
+
+            <td>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SEMI">SEMI</a>,
+               <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#POST_DEC">POST_DEC</a>,
+                <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#POST_INC">POST_INC</a>
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="NoWhitespaceBefore"/>
+        </source>
+
+        <p>
+          To configure the check to allow linebreaks before a DOT token:
+        </p>
+        <source>
+<module name="NoWhitespaceBefore">
+    <property name="tokens" value="DOT"/>
+    <property name="allowLineBreaks" value="true"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.whitespace
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="OperatorWrap">
+      <subsection name="Description">
+        <p>
+          Checks the policy on how to wrap lines on operators.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>option</td>
+            <td>policy on how to wrap lines</td>
+            <td>
+              <a href="property_types.html#wrapOp">wrap operator policy</a>
+            </td>
+            <td><code>nl</code></td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ASSIGN">ASSIGN</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BAND">BAND</a>,
+               <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BAND_ASSIGN">BAND_ASSIGN</a>,
+                <a
+                 href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BOR">BOR</a>,
+                 <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BOR_ASSIGN">BOR_ASSIGN</a>,
+                  <a
+                   href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BSR">BSR</a>,
+                   <a
+                    href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BSR_ASSIGN">BSR_ASSIGN</a>,
+                    <a
+                     href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BXOR">BXOR</a>,
+                     <a
+                      href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BXOR_ASSIGN">BXOR_ASSIGN</a>,
+                      <a
+                       href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COLON">COLON</a>,
+                       <a
+                        href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DIV">DIV</a>,
+                        <a
+                         href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DIV_ASSIGN">DIV_ASSIGN</a>,
+                         <a
+                          href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#EQUAL">EQUAL</a>,
+                          <a
+                           href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#GE">GE</a>,
+                           <a
+                            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#GT">GT</a>,
+                            <a
+                             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LAND">LAND</a>,
+                             <a
+                              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LE">LE</a>,
+                              <a
+                               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_INSTANCEOF">LITERAL_INSTANCEOF</a>,
+                               <a
+                                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LOR">LOR</a>,
+                                <a
+                                 href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LT">LT</a>,
+                                 <a
+                                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MINUS">MINUS</a>,
+                                  <a
+                                   href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MINUS_ASSIGN">MINUS_ASSIGN</a>,
+                                   <a
+                                    href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MOD">MOD</a>,
+                                    <a
+                                     href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MOD_ASSIGN">MOD_ASSIGN</a>,
+                                     <a
+                                      href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NOT_EQUAL">NOT_EQUAL</a>,
+                                      <a
+                                       href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PLUS">PLUS</a>,
+                                       <a
+                                        href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PLUS_ASSIGN">PLUS_ASSIGN</a>,
+                                        <a
+                                         href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#QUESTION">QUESTION</a>,
+                                         <a
+                                          href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SL">SL</a>,
+                                          <a
+                                           href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SL_ASSIGN">SL_ASSIGN</a>,
+                                           <a
+                                            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SR">SR</a>,
+                                            <a
+                                             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SR_ASSIGN">SR_ASSIGN</a>,
+                                             <a
+                                              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STAR">STAR</a>,
+                                              <a
+                                              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STAR_ASSIGN">STAR_ASSIGN</a>
+            </td>
+
+            <td>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BAND">BAND</a>,
+               <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BOR">BOR</a>,
+                <a
+                 href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BSR">BSR</a>,
+                 <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BXOR">BXOR</a>,
+                  <a
+                   href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COLON">COLON</a>,
+                   <a
+                    href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DIV">DIV</a>,
+                    <a
+                     href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#EQUAL">EQUAL</a>,
+                     <a
+                      href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#GE">GE</a>,
+                      <a
+                       href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#GT">GT</a>,
+                       <a
+                        href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LAND">LAND</a>,
+                        <a
+                         href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LE">LE</a>,
+                         <a
+                          href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_INSTANCEOF">LITERAL_INSTANCEOF</a>,
+                          <a
+                           href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LOR">LOR</a>,
+                           <a
+                            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LT">LT</a>,
+                            <a
+                             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MINUS">MINUS</a>,
+                             <a
+                              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MOD">MOD</a>,
+                              <a
+                               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NOT_EQUAL">NOT_EQUAL</a>,
+                               <a
+                                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PLUS">PLUS</a>,
+                                <a
+                                 href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#QUESTION">QUESTION</a>,
+                                 <a
+                                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SL">SL</a>,
+                                  <a
+                                   href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SR">SR</a>,
+                                   <a
+                                   href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STAR">STAR</a>
+            (all tokens except assignment operators)
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="OperatorWrap"/>
+        </source>
+
+        <p>
+          To configure the check for the assignment operator, <code>=</code>, at the end of a line:
+        </p>
+        <source>
+<module name="OperatorWrap">
+    <property name="tokens" value="ASSIGN"/>
+    <property name="option" value="eol"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.whitespace
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="ParenPad">
+      <subsection name="Description">
+        <p>
+          Checks the policy on the padding of parentheses; i.e. whether a
+          space is required after a left parenthesis and before a right
+          parenthesis, or such spaces are forbidden.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>option</td>
+            <td>policy on how to pad parentheses</td>
+            <td><a href="property_types.html#parenPad">pad policy</a></td>
+            <td><code>nospace</code></td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_CALL">CTOR_CALL</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LPAREN">LPAREN</a>,
+               <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_CALL">METHOD_CALL</a>,
+                <a
+                 href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RPAREN">RPAREN</a>,
+                 <a
+                 href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SUPER_CTOR_CALL">SUPER_CTOR_CALL</a>
+            </td>
+
+            <td>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_CALL">CTOR_CALL</a>,
+               <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LPAREN">LPAREN</a>,
+                <a
+                 href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_CALL">METHOD_CALL</a>,
+                 <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RPAREN">RPAREN</a>,
+                  <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SUPER_CTOR_CALL">SUPER_CTOR_CALL</a>
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="ParenPad"/>
+        </source>
+
+        <p>
+          To configure the check to require spaces for the parentheses of
+          constructor, method, and super constructor calls:
+        </p>
+        <source>
+<module name="ParenPad">
+    <property name="tokens" value="CTOR_CALL, METHOD_CALL,
+    SUPER_CTOR_CALL"/>
+    <property name="option" value="space"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.whitespace
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="TypecastParenPad">
+      <subsection name="Description">
+        <p>
+          Checks the policy on the padding of parentheses for typecasts. That
+          is, whether a space is required after a left parenthesis and before
+          a right parenthesis, or such spaces are forbidden.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>option</td>
+            <td>policy on how to pad parentheses</td>
+            <td><a href="property_types.html#parenPad">pad policy</a></td>
+            <td><code>nospace</code></td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+
+            <td>
+              Must have tokens
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#TYPECAST">TYPECAST</a>,
+               <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RPAREN">RPAREN</a>
+            </td>
+
+            <td>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#TYPECAST">TYPECAST</a>,
+               <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RPAREN">RPAREN</a>
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="TypecastParenPad"/>
+        </source>
+
+        <p>
+          To configure the check to require spaces:
+        </p>
+        <source>
+<module name="TypecastParenPad">
+    <property name="option" value="space"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.whitespace
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="FileTabCharacter">
+      <subsection name="Description">
+        <p>
+          Checks that there are no tab characters (<code>'\t'</code>) in the source code.
+        </p>
+
+        <p>
+          Rationale:
+        </p>
+
+        <ul>
+          <li>
+            Developers should not need to configure the tab width of their
+            text editors in order to be able to read source code.
+          </li>
+          <li>
+            From the Apache jakarta coding standards: In a distributed
+            development environment, when the commit messages get sent
+            to a mailing list, they are almost impossible to read if you
+            use tabs.
+          </li>
+        </ul>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>eachLine</td>
+            <td>whether to report on each line containing a tab, or just the first instance</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>fileExtensions</td>
+            <td>file type extension of files to process</td>
+            <td><a href="property_types.html#stringSet">String Set</a></td>
+            <td><code>{}</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Example">
+        <p>
+          To configure the check to report on the first instance in each
+          file:
+        </p>
+        <source>
+<module name="FileTabCharacter"/>
+        </source>
+        <p>
+          To configure the check to report on each line in each file:
+        </p>
+        <source>
+<module name="FileTabCharacter">
+    <property name="eachLine" value="true"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.whitespace
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#Checker">Checker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="WhitespaceAfter">
+      <subsection name="Description">
+        <p>
+          Checks that a token is followed by whitespace.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COMMA">COMMA</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SEMI">SEMI</a>,
+               <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#TYPECAST">TYPECAST</a>
+            </td>
+
+            <td>
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COMMA">COMMA</a>,
+               <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SEMI">SEMI</a>,
+                <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#TYPECAST">TYPECAST</a>
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="WhitespaceAfter"/>
+        </source>
+
+        <p>
+          To configure the check for whitespace only after COMMA and SEMI
+          tokens:
+        </p>
+        <source>
+<module name="WhitespaceAfter">
+    <property name="tokens" value="COMMA, SEMI"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.whitespace
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="WhitespaceAround">
+      <subsection name="Description">
+        <p>
+        Checks that a token is surrounded by whitespace.  Empty constructor,
+        method, class, enum, interface, loop bodies (blocks) of the form
+        </p>
+
+        <source>public MyClass() {}      // empty constructor
+public void func() {}    // empty method
+public interface Foo {} // empty interface
+public class Foo {} // empty class
+public enum Foo {} // empty enum
+MyClass c = new MyClass() {}; // empty anonymous class
+while (i = 1) {} // empty while loop
+for (int i = 1; i > 1; i++) {} // empty for loop
+do {} while (i = 1); // empty do-while loop
+public @interface Beta {} // empty annotation type
+        </source>
+
+        <p>
+        may optionally be exempted from the policy using the <code>
+        allowEmptyMethods</code>, <code>allowEmptyConstructors
+        </code>, <code>allowEmptyTypes</code> and <code>allowEmptyLoops</code> properties.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ASSIGN">ASSIGN</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BAND">BAND</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BAND_ASSIGN">BAND_ASSIGN</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BOR">BOR</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BOR_ASSIGN">BOR_ASSIGN</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BSR">BSR</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BSR_ASSIGN">BSR_ASSIGN</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BXOR">BXOR</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BXOR_ASSIGN">BXOR_ASSIGN</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COLON">COLON</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DIV">DIV</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DIV_ASSIGN">DIV_ASSIGN</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DO_WHILE">DO_WHILE</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#EQUAL">EQUAL</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#GE">GE</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#GT">GT</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LAND">LAND</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LCURLY">LCURLY</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LE">LE</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_ASSERT">LITERAL_ASSERT</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_CATCH">LITERAL_CATCH</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_DO">LITERAL_DO</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_ELSE">LITERAL_ELSE</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_FINALLY">LITERAL_FINALLY</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_FOR">LITERAL_FOR</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_IF">LITERAL_IF</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_RETURN">LITERAL_RETURN</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_SWITCH">LITERAL_SWITCH</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_SYNCHRONIZED">LITERAL_SYNCHRONIZED</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_TRY">LITERAL_TRY</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_WHILE">LITERAL_WHILE</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LOR">LOR</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LT">LT</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MINUS">MINUS</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MINUS_ASSIGN">MINUS_ASSIGN</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MOD">MOD</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MOD_ASSIGN">MOD_ASSIGN</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NOT_EQUAL">NOT_EQUAL</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PLUS">PLUS</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PLUS_ASSIGN">PLUS_ASSIGN</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#QUESTION">QUESTION</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RCURLY">RCURLY</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SL">SL</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SLIST">SLIST</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SL_ASSIGN">SL_ASSIGN</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SR">SR</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SR_ASSIGN">SR_ASSIGN</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STAR">STAR</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STAR_ASSIGN">STAR_ASSIGN</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#TYPE_EXTENSION_AND">TYPE_EXTENSION_AND</a>
+            </td>
+            <td>all tokens</td>
+          </tr>
+          <tr>
+            <td>allowEmptyConstructors</td>
+            <td>allow empty constructor bodies</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>allowEmptyMethods</td>
+            <td>allow empty method bodies</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>allowEmptyTypes</td>
+            <td>allow empty class, interface and enum bodies</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>allowEmptyLoops</td>
+            <td>allow empty loop bodies</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>false</code></td>
+          </tr>
+          <tr>
+            <td>ignoreEnhancedForColon</td>
+            <td>ignore whitespace around colon in for-each loops</td>
+            <td><a href="property_types.html#boolean">boolean</a></td>
+            <td><code>true</code></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          To configure the check:
+        </p>
+        <source>
+<module name="WhitespaceAround"/>
+        </source>
+
+        <p>
+          To configure the check for whitespace around the assignment
+          operator, <code>=</code>:
+        </p>
+        <source>
+<module name="WhitespaceAround">
+    <property name="tokens" value="ASSIGN"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.whitespace
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="NoLineWrap">
+      <subsection name="Description">
+        <p>
+          Checks that chosen statements are not line-wrapped. By default this
+          Check restricts wrapping import and package statements, but it's possible to check
+          any statement.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>assignments to check</td>
+            <td>subset of tokens <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PACKAGE_DEF">PACKAGE_DEF</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#IMPORT">IMPORT</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">CLASS_DEF</a>,
+              <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_DEF">ENUM_DEF</a>
+               <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">INTERFACE_DEF</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>,
+               <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+               </td>
+            <td><a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PACKAGE_DEF">PACKAGE_DEF</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#IMPORT">IMPORT</a></td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+      <p>
+        Examples of line-wrapped statements (bad case):
+      </p>
+      <source>
+package com.puppycrawl.
+    tools.checkstyle.checks;
+
+import com.puppycrawl.tools.
+    checkstyle.api.Check;
+      </source>
+      <p>
+        To configure the check to force no line-wrapping
+        in package and import statements (default values):
+      </p>
+      <source>
+<module name="NoLineWrap"/>
+      </source>
+      <p>
+        To configure the check to force no line-wrapping only
+        in import statements:
+      </p>
+      <source>
+<module name="NoLineWrap">
+    <property name="tokens" value="IMPORT">
+</module>
+      </source>
+      <p>
+        Examples of not line-wrapped statements (good case):
+      </p>
+      <source>
+import com.puppycrawl.tools.checkstyle.api.Check;
+      </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.whitespace
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+    <section name="EmptyLineSeparator">
+      <subsection name="Description">
+        <p>
+          Checks for empty line separators after header, package, all import declarations,
+          fields, constructors, methods, nested classes,
+          static initializers and instance initializers.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>assignments to check</td>
+            <td>subset of tokens <a
+            href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PACKAGE_DEF">PACKAGE_DEF</a>,
+            <a
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#IMPORT">IMPORT</a>,
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">CLASS_DEF</a>,
+              <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_DEF">ENUM_DEF</a>
+               <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">INTERFACE_DEF</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>,
+               <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
+                <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">STATIC_INIT</a>,
+                <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INSTANCE_INIT">INSTANCE_INIT</a>,
+               <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>
+               </td>
+            <td>All subset of tokens</td>
+          </tr>
+          <tr>
+            <th>allowNoEmptyLineBetweenFields</th>
+            <th>Allow no empty line between fields</th>
+            <th><a href="property_types.html#boolean">boolean</a></th>
+            <th>false</th>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+      <p>
+        Example of declarations without empty line separator:
+      </p>
+      <source>
+///////////////////////////////////////////////////
+//HEADER
+///////////////////////////////////////////////////
+package com.puppycrawl.tools.checkstyle.whitespace;
+import java.io.Serializable;
+class Foo
+{
+    public static final int FOO_CONST = 1;
+    public void foo() {} //should be separated from previous statement.
+}
+      </source>
+      <p>
+        An example of how to configure the check with default parameters is:
+      </p>
+      <source>
+<module name="EmptyLineSeparator"/>
+      </source>
+      <p>
+        Example of declarations with empty line separator that is expected by the Check by default:
+      </p>
+      <source>
+///////////////////////////////////////////////////
+//HEADER
+///////////////////////////////////////////////////
+
+package com.puppycrawl.tools.checkstyle.whitespace;
+
+import java.io.Serializable;
+
+class Foo
+{
+    public static final int FOO_CONST = 1;
+
+    public void foo() {} //should be separated from previous statement.
+}
+      </source>
+      <p>
+        An example how to check empty line after  <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a> and <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>:
+      </p>
+      <source>
+<module name="EmptyLineSeparator">
+    <property name="tokens" value="VARIABLE_DEF, METHOD_DEF"/>
+</module>
+      </source>
+      <p>
+        An example how to allow no empty line between fields:
+      </p>
+      <source>
+<module name="EmptyLineSeparator">
+    <property name="allowNoEmptyLineBetweenFields" value="true"/>
+</module>
+      </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.whitespace
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+    <section name="SeparatorWrap">
+      <subsection name="Description">
+        <p>
+          Checks line wrapping with separators.
+        </p>
+      </subsection>
+
+      <subsection name="Properties">
+        <table>
+          <tr>
+            <th>name</th>
+            <th>description</th>
+            <th>type</th>
+            <th>default value</th>
+          </tr>
+          <tr>
+            <td>option</td>
+            <td>policy on how to wrap lines</td>
+            <td>
+              <a href="property_types.html#wrapOp">wrap operator policy</a>
+            </td>
+            <td><code>eol</code></td>
+          </tr>
+          <tr>
+            <td>tokens</td>
+            <td>tokens to check</td>
+
+            <td>
+              subset of tokens <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DOT">DOT</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COMMA">COMMA</a>,
+               <a
+                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SEMI">SEMI</a>,
+                <a
+                 href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ELLIPSIS">ELLIPSIS</a>,
+                 <a
+                  href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#AT">AT</a>,
+                  <a
+                   href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LPAREN">LPAREN</a>,
+                   <a
+                    href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RPAREN">RPAREN</a>,
+                    <a
+                     href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ARRAY_DECLARATOR">ARRAY_DECLARATOR</a>,
+                     <a
+                      href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RBRACK">RBRACK</a>
+            </td>
+
+            <td>
+             <a
+              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DOT">DOT</a>,
+              <a
+               href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COMMA">COMMA</a>
+            </td>
+          </tr>
+        </table>
+      </subsection>
+
+      <subsection name="Examples">
+        <p>
+          Code example for comma and dot at the new line:
+        </p>
+        <source>
+s
+    .isEmpty();
+foo(i
+    ,s);
+        </source>
+        <p>
+          An example of how to configure the check is:
+        </p>
+        <source>
+<module name="SeparatorWrap"/>
+        </source>
+        <p>
+          Code example for comma and dot at the previous line:
+        </p>
+        <source>
+s.
+    isEmpty();
+foo(i.
+    s);
+        </source>
+        <p>
+          An example of how to configure the check for comma at the new line is:
+        </p>
+        <source>
+<module name="SeparatorWrap">
+    <property name="tokens" value="COMMA"/>
+    <property name="option" value="nl"/>
+</module>
+        </source>
+      </subsection>
+
+      <subsection name="Package">
+        <p>
+          com.puppycrawl.tools.checkstyle.checks.whitespace
+        </p>
+      </subsection>
+
+      <subsection name="Parent Module">
+        <p>
+          <a href="config.html#TreeWalker">TreeWalker</a>
+        </p>
+      </subsection>
+    </section>
+
+  </body>
+</document>
diff --git a/src/xdocs/contributing.xml b/src/xdocs/contributing.xml
new file mode 100644
index 0000000..37797ce
--- /dev/null
+++ b/src/xdocs/contributing.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Contributing</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+
+    <section name="Introduction">
+
+      <p>
+        Hey, good to see you on this page. It means that you are
+        considering a contribution of your own work to the Checkstyle
+        project. We welcome anything: bugfixes, new check modules, unit
+        tests, documentation improvements, build process simplification,
+        etc.
+      </p>
+
+      <p>
+        This document assumes you are working with the GIT version of
+        checkstyle and that you are familiar with some standard
+        development tools (
+
+        <a href="http://git-scm.com/">GIT</a>,
+        <a href="http://maven.apache.org">Maven</a>,
+        <a href="http://www.junit.org">JUnit</a>).
+      </p>
+      <p>
+        <b>ATTENTION:</b> if you have idea how to improve Checkstyle please create issue on
+        our <a href="https://github.com/checkstyle/checkstyle/issues">tracking system</a>.
+        As soon as one of admins of our project approved your idea you are good to start
+        implementation and you will be welcome with final code contribution.
+        Please do not expect that we will accept any code that you send to us.
+      </p>
+      <p>
+        <b>ATTENTION:</b> any new Check that you are going to introduce you need to contribute to our
+        sanbox project <a href="https://github.com/sevntu-checkstyle/sevntu.checkstyle">sevntu.checkstyle</a>.
+        We are receiving only bug fixes for now to our main project, here is a
+        <a href="https://groups.google.com/forum/#!topic/checkstyle-devel/JbhfiiSqKsQ">reason</a>.
+      </p>
+    </section>
+
+    <section name="Quality matters">
+
+      <p>
+        The developer team of checkstyle is really a lazy bunch of
+        people.  We try to avoid work as best as we can, but most of all
+        we try to avoid working on bugs that are reported by end users.
+      </p>
+
+      <p>
+        To that end, we use a set of development tools that ensure that
+        the quality of our code is kept at a fairly high level. Like
+        most projects today, we use JUnit to test our code. However we
+        do take this one step further and measure the coverage of our
+        unit tests using
+
+        <a href="http://cobertura.sourceforge.net/">Cobertura</a>.
+
+        This means it is not sufficient to pass all tests, but the tests
+        should ideally execute each line in the code. To generate the
+        Cobertura report, run the Maven command
+
+        <code>mvn cobertura:cobertura</code>.
+
+        Check results on report target/site/cobertura/index.html in project home folder.
+      </p>
+
+      <p>
+        Besides using unit testing, we obviously also use checkstyle to
+        check it's own code.
+      </p>
+
+      <p>
+        The Maven command <code>mvn clean verify</code> must pass
+        without any errors.
+      </p>
+
+      <p>
+        If you add new end user features (Check, Filter, ....), remember to document
+        them in JavaDoc of java classes and xdoc files that used to generate that site.
+        Please recheck site and all bundles generation by <code>mvn -Pdistro package</code>
+      </p>
+
+      <p>
+        The last step of verification that all works fine please do testing of your
+        functionality on any open-source project (Spring, Hibernate, ....).
+        Here is how to do it from <a href="http://checkstyle.sourceforge.net/cmdline.html">command line</a>
+      </p>
+    </section>
+
+    <section name="Submitting your contribution">
+
+      <p>
+        Once you have made sure that your changes pass the Maven command
+        <code>mvn clean verify</code>, the code coverage is of high
+        standard and everything is documented, then you are ready to
+        submit your work.
+      </p>
+
+      <p>
+        Please use <a href="http://help.github.com/articles/using-pull-requests">Pull Request</a>
+        feature of <a href="http://github.com/">Github</a>.<br/>
+        Please provide wide description of update with detailed explanation of problem
+        and how you propose to resolve it.
+      </p>
+
+      <p>
+        After you do Pull Request please recheck that our where is no problem from our build system:
+        <a href="https://travis-ci.org/checkstyle/checkstyle">Travis</a> and
+        <a href="https://coveralls.io/r/checkstyle/checkstyle">Coveralls</a>.
+        You will see that your Pull Request on Github is marked by that jobs automatically in few minutes.
+      </p>
+
+      <p>
+        We are not only lazy but at times we are also busy with our day
+        jobs.  This means that you might not always get an immediate
+        answer. You are not being ignored, and we value your work - we
+        might just be too busy to review your code, especially if it is
+        a bit complex. If you don't get a response within two weeks,
+        feel free to send a reminder email about your tracker item.
+      </p>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/extending.xml b/src/xdocs/extending.xml
new file mode 100644
index 0000000..5887ee1
--- /dev/null
+++ b/src/xdocs/extending.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Extending Checkstyle</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+    <section name="Extending Checkstyle">
+      <p>
+        This section covers the ways that Checkstyle's behaviour can be
+        extended, including writing your own checks.
+      </p>
+    </section>
+  </body>
+</document>
+
+
+
+
+
diff --git a/src/xdocs/google_style.xml b/src/xdocs/google_style.xml
new file mode 100644
index 0000000..f90c1f2
--- /dev/null
+++ b/src/xdocs/google_style.xml
@@ -0,0 +1,1301 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+    <properties>
+        <title>Google's Style</title>
+        <author>Checkstyle Development Team</author>
+    </properties>
+
+    <body>
+        <section name="Google's Java Style Checkstyle Coverage ">
+            <subsection name="Useful information">
+                <p>
+                    This coverage report was created for
+                    <a
+                        href="https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html">Google Java Style</a>
+                    , version of March 21, 2014
+                </p>
+
+                <p>
+                    <a href="http://maxvetrenko.github.io/">Checkstyle's html report for Guava library</a>
+                </p>
+                <p>
+                    <a
+                        href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml">
+                    Checkstyle configuration for 'Google Java Style'</a>
+                </p>
+            </subsection>
+            <subsection name="Legend">
+                <p>
+                    "--" - There is no rule in this paragraph.
+                    <br />
+                    "↓" - This paragraph is the high-level point of some group.
+                    <br />
+                    <img
+                        src="images/ok_green.png"
+                        alt="" />
+                    - Exiting Check covers all requirements from Google.
+                    <br />
+                    <img
+                        src="images/ok_blue.png"
+                        alt="" />
+                    - Exiting Check covers some part of requirements from Google.
+                    <br />
+                    <img
+                        src="images/ban_red.png"
+                        alt="" />
+                    - Requirements are not possible to check by Checkstyle at all.
+                    <br />
+                </p>
+            </subsection>
+            <subsection name="Coverage table">
+                <table>
+                    <thead>
+                        <tr>
+                            <th>Google's Java Style Rule</th>
+                            <th>Checkstyle Check</th>
+                            <th>Applied to config</th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr>
+                            <td>
+                                <a
+                                    href="https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html#s1-introduction">
+                                    <strong>1 Introduction</strong>
+                                </a>
+                            </td>
+                            <td>--</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html#s1.1-terminology">1.1 Terminology notes</a>
+                            </td>
+                            <td>--</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html#s1.2-guide-notes">1.2 Guide notes</a>
+                            </td>
+                            <td>--</td>
+                            <td>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s2-source-file-basics">
+                                    <strong>2 Source file basics</strong>
+                                </a>
+                            </td>
+                            <td>↓</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s2.1-file-name">2.1 File name</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_misc.html#OuterTypeFilename">OuterTypeFilename</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L36">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter2filebasic/rule21filename/OuterTypeFilenameTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                 href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s2.2-file-encoding">
+                                 2.2 File encoding: UTF-8
+                                </a>
+                            </td>
+                            <td>
+                                <img
+                                src="images/ban_red.png"
+                                alt="" />
+                                <a href="https://github.com/checkstyle/checkstyle/issues/265"> explanation</a>
+                            </td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s2.3.1-whitespace-characters">2.3.1 Whitespace characters</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_whitespace.html#FileTabCharacter">FileTabCharacter</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L31">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter2filebasic/rule231filetab/FileTabCharacterTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s2.3.2-special-escape-sequences">2.3.2 Special escape sequences</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_coding.html#IllegalTokenText">IllegalTokenText</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L37">config</a><br/>
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter2filebasic/rule232specialescape/IllegalTokenTextTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s2.3.3-non-ascii-characters">2.3.3 Non-ASCII characters</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_misc.html#AvoidEscapedUnicodeCharacters">AvoidEscapedUnicodeCharactersCheck</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L42">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter2filebasic/rule233nonascii/AvoidEscapedUnicodeCharactersCheckTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s3-source-file-structure">
+                                    <strong>3 Source file structure</strong>
+                                </a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_whitespace.html#EmptyLineSeparator">EmptyLineSeparatorCheck</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L84">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule461verticalwhitespace/EmptyLineSeparatorTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s3.1-copyright-statement">3.1 License or copyright information, if present</a>
+                            </td>
+                            <td>--</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s3.2-package-statement">3.2 Package statement</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_sizes.html#LineLength">LineLength</a>
+                                <br />
+                                <br />
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_whitespace.html#NoLineWrap">NoLineWrapCheck</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L47">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter3filestructure/rule32packagestate/LineLengthTest.java">test</a>
+                                <br />
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L53">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter3filestructure/rule332nolinewrap/NoLineWrapTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s3.3-import-statements">
+                                    3.3 Import statements
+                                </a>
+                            </td>
+                            <td>↓</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s3.3.1-wildcard-imports">3.3.1 No wildcard imports</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_imports.html#AvoidStarImport">AvoidStarImport</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L51">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/tree/master/src/test/java/com/google/checkstyle/test/chapter3filestructure/rule331nowildcard">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s3.3.2-import-line-wrapping">3.3.2 No line-wrapping</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_sizes.html#LineLength">LineLength</a>
+                                <br />
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_whitespace.html#NoLineWrap">NoLineWrapCheck</a>
+                                <br />
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L47">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter3filestructure/rule32packagestate/LineLengthTest.java">test</a>
+                                <br />
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L53">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter3filestructure/rule332nolinewrap/NoLineWrapTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s3.3.3-import-ordering-and-spacing">3.3.3 Ordering and spacing</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_imports.html#CustomImportOrder">CustomImportOrderCheck</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L154">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter3filestructure/rule333orderingandsoacing/CustomImportOrderTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s3.4-class-declaration">
+                                    3.4 Class declaration
+                                </a>
+                            </td>
+                            <td>↓</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s3.4.1-one-top-level-class">3.4.1 Exactly one top-level class declaration</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_design.html#OneTopLevelClass">OneTopLevelClass</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L52">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter3filestructure/rule341onetoplevel/OneTopLevelClassTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s3.4.2-class-member-ordering">3.4.2 Class member ordering</a>
+                            </td>
+                            <td>--</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s3.4.2.1-overloads-never-split">3.4.2.1 Overloads: never split</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_coding.html#OverloadMethodsDeclarationOrder">OverloadMethodsDeclarationOrderCheck</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L152">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter3filestructure/rule3421overloadsplit/OverloadMethodsDeclarationOrderTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4-formatting">
+                                    <strong>4 Formatting</strong>
+                                </a>
+                            </td>
+                            <td>--</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.1-braces">
+                                    4.1 Braces
+                                </a>
+                            </td>
+                            <td>↓</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.1.1-braces-always-used">4.1.1 Braces are used where optional</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_blocks.html#NeedBraces">NeedBraces</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L58">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule411bracesareused/NeedBracesTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.1.2-blocks-k-r-style">4.1.2 Nonempty blocks: K & R style</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_blocks.html#LeftCurly">LeftCurly</a>
+                                <br/>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_blocks.html#RightCurly">RightCurly</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L59">config</a>
+                                <br/>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L62">config</a>
+                                <br/>
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule412nonemptyblocks/LeftCurlyRightCurlyTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.1.3-braces-empty-blocks">4.1.3 Empty blocks: may be concise</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_blocks.html#EmptyBlock">EmptyBlock</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L54">config</a><br/>
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule413emptyblocks/EmptyBlockTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.2-block-indentation">4.2 Block indentation: +2 spaces</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_misc.html#Indentation">Indentation</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L142">config</a><br/>
+                                [test(will provided later)]
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.3-one-statement-per-line">4.3 One statement per line</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_coding.html#OneStatementPerLine">OneStatementPerLine</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L77">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule43onestatement/OneStatementPerLineTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.4-column-limit">4.4 Column limit: 80 or 100</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_blue.png"
+                                    alt="" />
+                                <a
+                                    href="config_sizes.html#LineLength">LineLength</a>
+                                <br />
+                                We can detect URL with protocol type as http://, https:// etc.
+                                <br />
+                                <a href="https://developers.google.com/eclipse/docs/gwt_jsni">JSNI</a>
+                                could not be detected right now, but might be possible after comments and
+                                javadoc support appear in Checkstyle
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L47">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter3filestructure/rule32packagestate/LineLengthTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.5-line-wrapping">
+                                    4.5 Line-wrapping
+                                </a>
+                            </td>
+                            <td>--</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.5.1-line-wrapping-where-to-break">4.5.1 Where to break</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_whitespace.html#OperatorWrap">OperatorWrap</a>
+                                <br />
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_whitespace.html#SeparatorWrap">SeparatorWrap</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L161">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/OperatorWrapTest.java">test</a>
+                                <br />
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L87">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule451wheretobreack/SeparatorWrapTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.5.2-line-wrapping-indent">4.5.2 Indent continuation lines at least +4 spaces</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_misc.html#Indentation">Indentation</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L142">config</a><br/>
+                                [test(will provided later)]
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.6-whitespace">
+                                    4.6 Whitespace
+                                </a>
+                            </td>
+                            <td>↓</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.6.1-vertical-whitespace">4.6.1 Vertical Whitespace</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_whitespace.html#EmptyLineSeparator">EmptyLineSeparatorCheck</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L84">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule461verticalwhitespace/EmptyLineSeparatorTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.6.2-horizontal-whitespace">4.6.2 Horizontal whitespace</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_whitespace.html#WhitespaceAround">WhitespaceAround</a>
+                                <br />
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_whitespace.html#GenericWhitespace">GenericWhitespace</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L67">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule462horizontalwhitespace/WhitespaceAroundTest.java">test</a>
+                                <br />
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L132">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule462horizontalwhitespace/WhitespaceAroundTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.6.3-horizontal-alignment">4.6.3 Horizontal alignment: never required</a>
+                            </td>
+                            <td>--</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.7-grouping-parentheses">4.7 Grouping parentheses: recommended</a>
+                            </td>
+                            <td>--</td>
+                            <td></td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8-specific-constructs">
+                                    4.8 Specific constructs
+                                </a>
+                            </td>
+                            <td>↓</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.1-enum-classes">4.8.1 Enum classes</a>
+                            </td>
+                            <td>--</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.2-variable-declarations">4.8.2 Variable declarations</a>
+                            </td>
+                            <td>↓</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.2.1-variables-per-declaration">4.8.2.1 One variable per declaration</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_coding.html#MultipleVariableDeclarations">MultipleVariableDeclarations</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L78">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule4821onevariablepreline/MultipleVariableDeclarationsTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.2.2-variables-limited-scope">4.8.2.2 Declared when needed, initialized as soon as
+                                    possible
+                                </a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="https://github.com/maxvetrenko/sevntu.checkstyle/blob/master/sevntu-checks/src/main/java/com/github/sevntu/checkstyle/checks/design/VariableDeclarationUsageDistanceCheck.java">VariableDeclarationUsageDistance</a>
+                                <br />
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L153">config</a><br/>
+                                [test]
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.3-arrays">4.8.3 Arrays</a>
+                            </td>
+                            <td>↓</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.3.1-array-initializers">4.8.3.1 Array initializers: can be "block-like"</a>
+                            </td>
+                            <td>--</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.3.2-array-declarations">4.8.3.2 No C-style array declarations</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_misc.html#ArrayTypeStyle">ArrayTypeStyle</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L79">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule4832nocstylearray/ArrayTypeStyleTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.4-switch">4.8.4 Switch statements</a>
+                            </td>
+                            <td>--</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.4.1-switch-indentation">4.8.4.1 Indentation</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_misc.html#Indentation">Indentation</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L142">config</a><br/>
+                                [test(will provided later)]
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.4.2-switch-fall-through">4.8.4.2 Fall-through: commented</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_coding.html#FallThrough">FallThrough</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L81">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule4842fallthrow/FallThroughTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.4.3-switch-default">4.8.4.3 The default case is present</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_coding.html#MissingSwitchDefault">MissingSwitchDefault</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L80">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule4843defaultcasepresent/MissingSwitchDefaultTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.5-annotations">4.8.5 Annotations</a>
+                            </td>
+                            <td>
+                                <a href="https://github.com/maxvetrenko/checkstyle/issues/19">AnnotationIndentation</a>
+                            </td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.6-comments">4.8.6 Comments</a>
+                            </td>
+                            <td>↓</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.6.1-block-comment-style">4.8.6.1 Block comment style</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ban_red.png"
+                                    alt="" />
+                            </td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.7-modifiers">4.8.7 Modifiers</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_modifier.html#ModifierOrder">ModifierOrder</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L83">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule487modifiers/ModifierOrderTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.8-numeric-literals">4.8.8 Numeric Literals</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_misc.html#UpperEll">UpperEll</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L82">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule488numericliterals/UpperEllTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5-naming">
+                                    <strong>5 Naming</strong>
+                                </a>
+                            </td>
+                            <td>↓</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.1-identifier-names">5.1 Rules common to all identifiers</a>
+                            </td>
+                            <td>"5.2 Rules of identifier type" already includes this rule.
+                            </td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2-specific-identifier-names">
+                                    5.2 Rules by identifier type
+                                </a>
+                            </td>
+                            <td>↓</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2.1-package-names">5.2.1 Package names</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_naming.html">PackageName</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L95">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter5naming/rule521packagenames/PackageNameTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2.2-class-names">5.2.2 Class names</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_blue.png"
+                                    alt="" />
+                                <a href="config_naming.html">TypeName</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L100">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter5naming/rule522typenames/TypeNameTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2.3-method-names">5.2.3 Method names</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ban_red.png"
+                                    alt="" />
+                            </td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2.4-constant-names">5.2.4 Constant names</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ban_red.png"
+                                    alt="" />
+                                Every constant is a static final field,
+                                <br />
+                                but not all static final fields are
+                                <br />
+                                constants - impossible to check such rule.
+                            </td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2.5-non-constant-field-names">5.2.5 Non-constant field names</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_naming.html">MemberName</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L104">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter5naming/rule525nonconstantfieldnames/MemberNameTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2.6-parameter-names">5.2.6 Parameter names</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_naming.html">ParameterName</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L109">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter5naming/rule526parameternames/ParameterNameTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2.7-local-variable-names">5.2.7 Local variable names</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_naming.html#LocalVariableName">LocalVariableName</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L114">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter5naming/rule527localvariablenames/LocalVariableNameTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2.8-type-variable-names">5.2.8 Type variable names</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_naming.html">MethodTypeParameterName</a>
+                                <br/>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_naming.html">ClassTypeParameterName</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L121">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L126">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter5naming/rule528typevariablenames/ClassMethodTypeParameterNameTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.3-camel-case">5.3 Camel case: defined</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_blue.png"
+                                    alt="" />
+                                <a href="config_naming.html#AbbreviationAsWordInName">AbbreviationAsWordInName</a>
+                                <br />
+                                Non covered: Some words are ambiguously hyphenated in the English language. No way to
+                                distinguish "YouTubeImporter" or "YoutubeImporter".
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L148">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter5naming/rule53camelcase/AbbreviationAsWordInNameTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s6-programming-practices">
+                                    <strong>6 Programming Practices</strong>
+                                </a>
+                            </td>
+                            <td>↓</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s6.1-override-annotation">6.1 @Override: always used</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ban_red.png"
+                                    alt="" />
+                                That validation could not be checked by Checkstyle. It's
+                                need to
+                                take a look as parent class. But Checkstyle have no way
+                                open or
+                                look at another Class file.
+                            </td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s6.2-caught-exceptions">6.2 Caught exceptions: not ignored</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a href="config_blocks.html#EmptyBlock">EmptyBlock</a>
+                                with option=text.
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L54">config</a><br/>
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter4formatting/rule413emptyblocks/EmptyBlockTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s6.3-static-members">6.3 Static members: qualified using class</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ban_red.png"
+                                    alt="" />
+                            </td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s6.4-finalizers">6.4 Finalizers: not used</a>
+                            </td>
+                            <td>
+                                <img
+                                    src="images/ok_green.png"
+                                    alt="" />
+                                <a
+                                    href="config_coding.html#NoFinalizer">NoFinalizer</a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/checkstyle/checkstyle/blob/master/google_checks.xml#L131">config</a>
+                                <br />
+                                <a
+                                    href="https://github.com/maxvetrenko/testproject/blob/master/src/test/java/com/google/checkstyle/test/chapter6programpractice/rule64finalizers/NoFinalizerTest.java">test</a>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s7-javadoc">
+                                    <strong>7 Javadoc</strong>
+                                </a>
+                            </td>
+                            <td>↓</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s7.1-javadoc-formatting">
+                                    7.1 Formatting
+                                </a>
+                            </td>
+                            <td>↓</td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s7.1.1-javadoc-multi-line">7.1.1 General form</a>
+                            </td>
+                            <td>
+                                <a href="https://github.com/maxvetrenko/checkstyle/issues/18">SingleLineJavaDoc</a>
+                            </td>
+                            <td>[]</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s7.1.2-javadoc-paragraphs">7.1.2 Paragraphs</a>
+                            </td>
+                            <td>
+                                <a href="https://github.com/maxvetrenko/checkstyle/issues/3">JavaDocParagraph</a>
+                            </td>
+                            <td>[]</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s7.1.3-javadoc-at-clauses">7.1.3 At-clauses</a>
+                            </td>
+                            <td>
+                                <a href="https://github.com/maxvetrenko/checkstyle/issues/7">AtClauseOrder</a>
+                                <br/>
+                                <a href="https://github.com/maxvetrenko/checkstyle/issues/8">JavaDocTagCuntionuousIndentation</a>
+                                <br/>
+                                <a href="https://github.com/maxvetrenko/checkstyle/issues/9">NonEmptyAtClauseDescription</a>
+                            </td>
+                            <td>[]</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s7.2-summary-fragment">7.2 The summary fragment</a>
+                            </td>
+                            <td>
+                                <a href="https://github.com/maxvetrenko/checkstyle/issues/17">SummaryJavaDocCheck</a>
+                                (check for text before any at-clause).
+                                <br />
+                                additionally we need to have list of forbidden phrases
+                                <br />
+                                in the beginning of summary (regexp).
+                            </td>
+                            <td>[]</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s7.3-javadoc-where-required">
+                                    7.3 Where Javadoc is used
+                                </a>
+                            </td>
+                            <td>
+                                <a
+                                    href="https://github.com/sevntu-checkstyle/sevntu.checkstyle/issues/70">JavadocMethod</a>
+                            </td>
+                            <td>[]</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s7.3.1-javadoc-exception-self-explanatory">7.3.1 Exception: self-explanatory methods</a>
+                            </td>
+                            <td>
+                                <a href="https://github.com/maxvetrenko/checkstyle/issues/11">JavadocSelfExplanatoryMethod</a>
+                            </td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <a
+                                    href="http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s7.3.2-javadoc-exception-overrides">7.3.2 Exception: overrides</a>
+                            </td>
+                            <td>
+                                <a href="https://github.com/maxvetrenko/checkstyle/issues/35">JavadocMethodCheck</a> Overrides are checked by presense of "@Override" annotation on method.
+                            </td>
+                            <td></td>
+                        </tr>
+                    </tbody>
+                </table>
+            </subsection>
+        </section>
+    </body>
+</document>
diff --git a/src/xdocs/index.xml.vm b/src/xdocs/index.xml.vm
new file mode 100644
index 0000000..cf89c8c
--- /dev/null
+++ b/src/xdocs/index.xml.vm
@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+
+  <properties>
+    <title>Checkstyle ${projectVersion}</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+
+    <section name="Overview">
+      <p>
+        Checkstyle is a development tool to help programmers write Java code
+        that adheres to a coding standard. It automates the process of
+        checking Java code to spare humans of this boring (but important)
+        task. This makes it ideal for projects that want to enforce a coding
+        standard.
+      </p>
+
+      <p>
+        Checkstyle is highly configurable and can be made to support almost
+        any coding standard. An example configuration file is supplied
+        supporting the <a href="http://java.sun.com/docs/codeconv/">Sun Code
+        Conventions</a>. As well, other sample configuration files are
+        supplied for other well known conventions.
+      </p>
+
+      <p>
+        A good example of a report that can be produced using Checkstyle and
+        <a href="http://maven.apache.org/">Maven</a> can be <a
+        href="http://maven.apache.org/plugins/maven-checkstyle-plugin/checkstyle.html">seen here</a>.
+      </p>
+    </section>
+
+    <section name="Important Development Changes">
+      <p>
+        As of September 2013, the Checkstyle project is using GitHub for
+        hosting the following:
+      </p>
+      <ul>
+        <li>
+          <a href="https://github.com/checkstyle/checkstyle">Source
+          code repository</a> - replacing the Mercurial repository on
+          SourceForge.
+        </li>
+        <li>
+          <a
+          href="https://github.com/checkstyle/checkstyle/issues">Issue
+          management</a> - replacing the Bugs/Feature/Patches on
+          SourceForge. All new issues should be raised at GitHub, and
+          pull requests are now the preferred way to submit patches.
+        </li>
+      </ul>
+
+      <p>
+        SourceForge will still be used for website hosting, binary
+        downloads and mailing lists.
+      </p>
+
+      <p>
+        These changes are being made to breathe new life into the
+        development of Checkstyle. The following developers have been added
+        as committers of the Checkstyle project:
+      </p>
+      <ul>
+        <li><a href="https://github.com/romani">Roman Ivanov</a></li>
+        <li><a href="https://github.com/isopov">Ivan Sopov</a></li>
+      </ul>
+    </section>
+
+    <section name="Features">
+      <p>
+        Checkstyle can check many aspects of your source code. Historically
+        its main functionality has been to check code layout issues, but
+        since the internal architecture was changed in version 3, more and
+        more checks for other purposes have been added.  Now Checkstyle
+        provides checks that find class design problems, duplicate code, or
+        bug patterns like double checked locking.
+      </p>
+
+      <p>
+        For a detailed list of available checks please refer to the <a
+        href="checks.html">Standard Checks</a> page.
+      </p>
+    </section>
+
+    <section name="Download">
+      <p>
+        The latest release of Checkstyle can be downloaded from <a
+        href="http://sourceforge.net/project/showfiles.php?group_id=29721">the
+        SourceForge download page</a>.
+      </p>
+
+      <p>
+        If you want to live on the bleeding edge, you can <a
+        href="https://github.com/checkstyle/checkstyle">checkout</a>
+        the current development code from GitHub and compile
+        yourself.
+      </p>
+
+    </section>
+
+    <section name="Related Tools">
+      <p>
+        Checkstyle is most useful if you integrate it in your build process or
+        your development environment. The distribution includes:
+      </p>
+
+      <ul>
+        <li>An <a href="http://ant.apache.org/index.html">Ant</a> task.</li>
+        <li>A command line tool.</li>
+      </ul>
+
+      <p>
+        Additionally plug-ins are written by third-parties. Some of them are
+        still based on the Checkstyle 2.4 release, although there have been
+        many improvements since then. The known plug-ins are:
+      </p>
+
+      <table>
+        <tr>
+          <th>IDE / Build tool</th>
+          <th>Main/Initial Author</th>
+          <th>Available from</th>
+          <th>Remarks</th>
+        </tr>
+        <tr>
+          <td><a href="http://www.scm-manager.org/">SCM-Manager</a></td>
+          <td></td>
+          <td><a href="http://plugins.scm-manager.org/scm-plugin-backend/page/index.html">SCM-Manager Plugin Page</a></td>
+          <td></td>
+        </tr>
+        <tr>
+          <td><a href="http://www.jgrasp.org/">jGRASP</a></td>
+          <td>Larry Barowski</td>
+          <td><a href="http://www.jgrasp.org/">jGRASP Home Page</a></td>
+          <td></td>
+        </tr>
+        <tr>
+          <td><a href="http://www.sonarsource.org/">Sonar</a></td>
+          <td>Freddy Mallet (initial author)</td>
+          <td><a href="http://www.sonarsource.org/">Sonar Home Page</a></td>
+          <td><a href="http://nemo.sonarsource.org/">Demo site</a></td>
+        </tr>
+        <tr>
+          <td><a href="http://www.eclipse.org">Eclipse/RAD/RDz</a></td>
+          <td>David Schneider</td>
+          <td>
+            <a href="http://eclipse-cs.sourceforge.net/">Eclipse-CS Home
+            Page</a>
+          </td>
+          <td>
+            In 2007 was awarded
+            <a href="http://www.eclipse.org/org/press-release/20070306eclipsecommunityawards.php">
+              Best Open Source Eclipse-based Developer tool
+            </a>.
+          </td>
+        </tr>
+        <tr>
+          <td><a href="www.eclipse.org">Eclipse/RAD/RDz</a></td>
+          <td>Roman Ivanov</td>
+          <td>
+            <a href="https://github.com/sevntu-checkstyle">Project Page</a>
+          </td>
+          <td>
+            Extension for Eclipse-CS plugin and also an incubator for
+            Checkstyle checks that are not present in main stream of
+            Checkstyle. See the
+            <a href="https://github.com/sevntu-checkstyle/sevntu.checkstyle/wiki">Wiki</a>
+            and
+            <a href="http://sevntu-checkstyle.github.com/sevntu.checkstyle/">Blog</a>
+            .
+          </td>
+        </tr>
+        <tr>
+          <td><a href="http://www.eclipse.org">Eclipse/RAD/RDz</a></td>
+          <td>Marco van Meegen</td>
+          <td>
+            <a
+            href="http://www.mvmsoft.de/content/plugins/checkclipse/checkclipse.htm">Checklipse
+            Home Page</a>
+          </td>
+          <td></td>
+        </tr>
+        <tr>
+          <td><a href="http://www.intellij.com/idea/">IntelliJ IDEA</a></td>
+          <td>Jakub Slawinski</td>
+          <td>
+            <a href="http://www.qaplug.com/">QAPlug</a>
+          </td>
+          <td>Provides quality assurance features.</td>
+        </tr>
+
+        <tr>
+          <td><a href="http://www.intellij.com/idea/">IntelliJ IDEA</a></td>
+          <td>James Shiell</td>
+          <td>
+            <a href="https://github.com/jshiell/checkstyle-idea">Checkstyle-idea Project Page</a>
+          </td>
+          <td>Provides real-time and on-demand scanning.</td>
+        </tr>
+        <tr>
+          <td><a href="http://www.intellij.com/idea/">IntelliJ IDEA</a></td>
+          <td>Mark Lussier</td>
+          <td>
+            <a href="http://jetstyle.sourceforge.net/">JetStyle
+            Project Page</a>
+          </td>
+          <td></td>
+        </tr>
+        <tr>
+          <td><a href="http://www.netbeans.org">NetBeans</a></td>
+          <td>Petr Hejl</td>
+          <td>
+            <a href="http://www.sickboy.cz/checkstyle/">Checkstyle Beans</a>
+          </td>
+          <td>
+            Problems with source code are displayed as annotations of
+            the source
+          </td>
+        </tr>
+        <tr>
+          <td><a href="http://www.netbeans.org">NetBeans</a></td>
+          <td>Paul Goulbourn</td>
+          <td>
+            <a href="http://nbcheckstyle.sourceforge.net">nbCheckStyle</a>
+          </td>
+          <td></td>
+        </tr>
+        <tr>
+          <td><a href="http://www.netbeans.org">NetBeans</a></td>
+          <td></td>
+          <td>
+            <a href="http://java.net/projects/sqe/">Software Quality Environment (SQE)</a>
+          </td>
+          <td></td>
+        </tr>
+        <tr>
+          <td></td>
+          <td><a href="http://www.jcoderz.org/">jCoderZ</a></td>
+          <td>
+            <a href="http://www.jcoderz.org/fawkez/">fawkeZ</a>
+          </td>
+          <td>Combines multiple tools (CheckStyle, findbugs, PMD, Cobertura, etc.)</td>
+        </tr>
+        <tr>
+          <td><a href="http://www.bluej.org">BlueJ</a></td>
+          <td>Rick Giles</td>
+          <td><a href="http://bluejcheckstyle.sourceforge.net/">bluejcheckstyle
+            home page</a></td>
+          <td></td>
+        </tr>
+        <tr>
+          <td><a href="http://tide.olympe-network.com/">tIDE</a></td>
+          <td></td>
+          <td>Built in</td>
+          <td></td>
+        </tr>
+        <tr>
+          <td><a href="http://jdee.sourceforge.net/">Emacs JDE</a></td>
+          <td>Markus Mohnen</td>
+          <td>Part of the standard JDEE distribution</td>
+          <td></td>
+        </tr>
+        <tr>
+          <td><a href="http://www.jedit.org/">jEdit</a></td>
+          <td>Todd Papaioannou</td>
+          <td><a
+              href="http://plugins.jedit.org/plugins/?CheckStylePlugin">JEdit CheckStylePlugin</a></td>
+          <td></td>
+        </tr>
+        <tr>
+          <td><a href="http://www.vim.org">Vim editor</a></td>
+          <td>Xandy Johnson</td>
+          <td><a
+              href="http://vim.sourceforge.net/script.php?script_id=448">Plugin Homepage</a></td>
+          <td>Vim file-type plug-in</td>
+        </tr>
+        <tr>
+          <td><a href="http://maven.apache.org/">Maven</a></td>
+          <td>Vincent Massol</td>
+          <td>Checkstyle supported out of the box</td>
+          <td><a href="http://maven.apache.org/plugins/maven-checkstyle-plugin/checkstyle.html">example report</a></td>
+        </tr>
+        <tr>
+          <td><a href="http://qalab.sourceforge.net/">QALab</a></td>
+          <td>Benoit Xhenseval</td>
+          <td><a href="http://qalab.sourceforge.net/">QALab Home Page</a></td>
+          <td>Supports tracking Checkstyle statistics over time.</td>
+        </tr>
+      </table>
+
+      <p>
+        If you have written a plugin for other IDEs, please let us know, so we
+        can provide a link here.
+      </p>
+
+    </section>
+
+  </body>
+</document>
diff --git a/src/xdocs/property_types.xml b/src/xdocs/property_types.xml
new file mode 100644
index 0000000..6b72f03
--- /dev/null
+++ b/src/xdocs/property_types.xml
@@ -0,0 +1,535 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Property Types</title>
+    <author>Oliver Burn</author>
+  </properties>
+
+  <body>
+    <section name="Property Types">
+    <p>
+      Checkstyle is configured using properties, which are string
+      representations. This document describes how these string
+      representations are mapped to typed properties.
+    </p>
+
+    <subsection name="integer">
+      <p>
+        This property represents an integer. The string representation is
+        parsed using the <code>java.lang.Integer</code> class.
+      </p>
+    </subsection>
+
+    <subsection name="string">
+      <p>
+        This property represents a string. The literal string representation
+        is used.
+      </p>
+    </subsection>
+
+    <subsection name="boolean">
+      <p>
+        This property represents a boolean. The default value is <code>false</code>. The following string representations will
+        map to <code>true</code>:
+      </p>
+
+      <ul>
+        <li><code>yes</code></li>
+        <li><code>true</code></li>
+        <li><code>on</code></li>
+      </ul>
+
+      <p>Anything else will map to <code>false</code>.</p>
+    </subsection>
+
+    <subsection name="stringSet">
+      <p>
+        This property represents a set of strings. The string representation
+        is parsed as a set of comma (',') separated strings.
+      </p>
+      <p>
+        Alternatively, this property can be supplied multiple times which
+        is equivalent to a set of comma separated strings. For example, the
+        following:
+      </p>
+      <source>
+<property name="tokens" value="DIV_ASSIGN,PLUS_ASSIGN"/>
+      </source>
+      <p>can instead be expressed as:</p>
+      <source>
+<property name="tokens" value="DIV_ASSIGN"/>
+<property name="tokens" value="PLUS_ASSIGN"/>
+      </source>
+    </subsection>
+
+    <subsection name="intSet">
+      <p>
+        This property represents a set of integers. The string representation
+        is parsed as a set of comma (',') separated integers that are parsed
+        using the <code>java.lang.Integer</code> class.
+      </p>
+      <p>
+        Alternatively, this property can be supplied multiple times which
+        is equivalent to a set of comma separated integers. For example, the
+        following:
+      </p>
+      <source>
+<property name="tokens" value="42,666"/>
+      </source>
+      <p>can instead be expressed as:</p>
+      <source>
+<property name="tokens" value="42"/>
+<property name="tokens" value="666"/>
+      </source>
+    </subsection>
+
+    <subsection name="regexp">
+      <p>
+        This property represents a regular expression. The string
+        representation is parsed using <a
+        href="http://docs.oracle.com/javase/7/docs/api/index.html?java/util/regex/package-summary.html">java.util.regex
+        package</a>.
+      </p>
+    </subsection>
+
+    <subsection name="parenPad">
+      <p>
+        This property represents the policy for padding with white space. The
+        following table describes the valid options:
+      </p>
+
+      <table summary="padding options">
+        <tr>
+          <td>Option</td>
+          <td>Definition</td>
+        </tr>
+        <tr>
+          <td><code>nospace</code></td>
+          <td>
+            Do not pad. For example, <code>method(a, b);</code>
+          </td>
+        </tr>
+        <tr>
+          <td><code>space</code></td>
+          <td>
+            Ensure padding. For example,
+            <code>method( a, b );</code>
+          </td>
+        </tr>
+      </table>
+    </subsection>
+
+    <subsection name="wrapOp">
+      <p>
+        This property represents the policy for wrapping lines.
+        The following table describes the valid options:
+      </p>
+
+      <table summary="wrap options">
+        <tr>
+          <td>Option</td>
+          <td>Definition</td>
+        </tr>
+        <tr>
+          <td><code>nl</code></td>
+          <td>
+            The token must be on a new line. For example:
+            <pre>
+    someVariable = aBigVariableNameToMakeThings + "this may work"
+                   + lookVeryInteresting;
+            </pre>
+          </td>
+        </tr>
+        <tr>
+          <td><code>eol</code></td>
+          <td>
+            The token must be at the end of the line. For example:
+            <pre>
+    someVariable = aBigVariableNameToMakeThings + "this may work" +
+                   lookVeryInteresting;
+            </pre>
+          </td>
+        </tr>
+      </table>
+    </subsection>
+
+    <subsection name="block">
+      <p>
+        This property represents the policy for checking block statements. The
+        following table describes the valid options:
+      </p>
+
+      <table summary="block options">
+        <tr>
+          <td>Option</td>
+          <td>Definition</td>
+        </tr>
+        <tr>
+          <td><code>text</code></td>
+          <td>
+            Require that there is some text in the block. For example:
+            <pre>
+    catch (Exception ex) {
+        // This is a bad coding practice
+    }
+            </pre>
+          </td>
+        </tr>
+        <tr>
+          <td><code>stmt</code></td>
+          <td>
+            Require that there is a statement in the block. For example:
+            <pre>
+    finally {
+        lock.release();
+    }
+            </pre>
+          </td>
+        </tr>
+      </table>
+    </subsection>
+
+    <subsection name="lcurly">
+      <p>
+        This property represents the policy for checking the placement of a
+        left curly brace (<code>'{'</code>). The following table
+        describes the valid options:
+      </p>
+
+      <table summary="left curly options">
+        <tr>
+          <td>Option</td>
+          <td>Definition</td>
+        </tr>
+
+        <tr>
+          <td><code>eol</code></td>
+          <td>
+            The brace must always be on the end of the line. For example:
+            <pre>
+    if (condition) {
+        ...
+            </pre>
+          </td>
+        </tr>
+
+        <tr>
+          <td><code>nl</code></td>
+          <td>
+            The brace must always be on a new line. For example:
+            <pre>
+    if (condition)
+    {
+        ...
+            </pre>
+          </td>
+        </tr>
+
+        <tr>
+          <td><code>nlow</code></td>
+          <td>
+            If the brace will fit on the first line of the statement, taking
+            into account maximum line length, then apply <code>eol</code> rule. Otherwise apply the <code>nl</code> rule. <code>nlow</code> is a
+            mnemonic for "new line on wrap". For the example above Checkstyle
+            will enforce:
+            <pre>
+    if (condition) {
+        ...
+            </pre>
+            But for a statement spanning multiple lines, Checkstyle will
+            enforce:
+            <pre>
+    if (condition1 && condition2 &&
+        condition3 && condition4)
+    {
+        ...
+            </pre>
+          </td>
+        </tr>
+      </table>
+    </subsection>
+
+    <subsection name="rcurly">
+      <p>
+        This property represents the policy for checking the placement of a
+        right curly brace (<code>'}'</code>). The following table
+        describes the valid options:
+      </p>
+
+      <table summary="right curly options">
+        <tr>
+          <td>Option</td>
+          <td>Definition</td>
+        </tr>
+
+        <tr>
+          <td><code>same</code></td>
+          <td>
+            The brace must be on the same line as the next statement. For
+            example:
+            <pre>
+    try {
+        ...
+    } finally {
+            </pre>
+          </td>
+        </tr>
+
+        <tr>
+          <td><code>alone</code></td>
+          <td>
+            The brace must be alone on the line. For example:
+            <pre>
+    try {
+        ...
+    }
+    finally {
+            </pre>
+          </td>
+        </tr>
+      </table>
+    </subsection>
+
+    <subsection name="scope">
+      <p>This property represents a Java scope. The scope is treated
+      inclusively (as javadoc does): 'package' means all 'package', 'protected'
+      and 'public' methods/fields/classes. The valid options are:</p>
+
+      <ul>
+        <li><code>nothing</code></li>
+        <li><code>public</code></li>
+        <li><code>protected</code></li>
+        <li><code>package</code></li>
+        <li><code>private</code></li>
+        <li><code>anoninner</code></li>
+      </ul>
+    </subsection>
+
+    <subsection name="severity">
+      <p>
+        This property represents the severity level of a check violation. The
+        valid options are:
+      </p>
+
+      <ul>
+        <li><code>ignore</code></li>
+        <li><code>info</code></li>
+        <li><code>warning</code></li>
+        <li><code>error</code></li>
+      </ul>
+    </subsection>
+
+    <subsection name="importOrder">
+      <p>
+        This property represents the policy for checking imports order.
+        The following table describes the valid options:
+      </p>
+
+      <table summary="import order options">
+        <tr>
+          <td>Option</td>
+          <td>Definition</td>
+        </tr>
+
+        <tr>
+          <td><code>top</code></td>
+          <td>All static imports are at the top. For example:
+              <pre>
+    import static a.b.C.*;
+    import static x.y.Z.*;
+
+    import a.b.D;
+    import x.y.Z;</pre>
+          </td>
+        </tr>
+
+        <tr>
+          <td><code>above</code></td>
+          <td>All static imports are above the local group. For example:
+            <pre>
+    import static a.b.C.*;
+    import a.b.D;
+
+    import static x.y.Z.*;
+    import x.y.Z;</pre>
+          </td>
+        </tr>
+
+        <tr>
+          <td><code>inflow</code></td>
+          <td>All static imports are processed like non static
+              imports. For example:
+              <pre>
+    import static a.b.C.*;
+    import a.b.D;
+
+    import x.y.Z;
+    import static x.y.Z.*;</pre>
+          </td>
+        </tr>
+
+        <tr>
+          <td><code>under</code></td>
+          <td>All static imports are under the local group. For example:
+              <pre>
+    import a.b.D;
+    import static a.b.C.*;
+
+    import x.y.Z;
+    import static x.y.Z.*;</pre>
+          </td>
+        </tr>
+
+        <tr>
+          <td><code>bottom</code></td>
+          <td>All static imports are at the bottom. For example:
+              <pre>
+    import a.b.D;
+    import x.y.Z;
+
+    import static a.b.C.*;
+    import static x.y.Z.*;</pre>
+          </td>
+        </tr>
+      </table>
+    </subsection>
+
+
+    <subsection name="elementStyle">
+      <p>
+        This property represents the policy for the styles for defining
+        elements in an annotation. The following table
+        describes the valid options:
+      </p>
+
+      <table summary="elementStyle options">
+        <tr>
+          <td>Option</td>
+          <td>Definition</td>
+        </tr>
+
+        <tr>
+          <td><code>expanded</code></td>
+          <td>
+            The expanded version is sometimes referred to as "named parameters"
+            in other languages. Example:
+            <pre>@SuppressWarnings(value={"unchecked","unused",})</pre>
+          </td>
+        </tr>
+
+        <tr>
+          <td><code>compact</code></td>
+          <td>
+            This style can only be used when there is an element called 'value'
+            which is either the sole element or all other elements have default
+            values. Examples:
+            <pre>@SuppressWarnings({"unchecked","unused",})</pre>
+            and:
+            <pre>@SuppressWarnings("unchecked")</pre>
+          </td>
+        </tr>
+
+        <tr>
+          <td><code>compact_no_array</code></td>
+          <td>
+            It is similar to the <code>compact</code> style but
+            single value arrays are flagged. With annotations a single value
+            array does not need to be placed in an array initializer.
+            This style can only be used when there is an element called 'value'
+            which is either the sole element or all other elements have
+            default values.
+            Example: <pre>@SuppressWarnings("unchecked")</pre>
+          </td>
+        </tr>
+
+        <tr>
+          <td><code>ignore</code></td>
+          <td>
+            Anything goes.
+          </td>
+        </tr>
+      </table>
+    </subsection>
+
+
+    <subsection name="closingParens">
+      <p>
+        This property represents the policy for the styles for the ending
+        parenthesis. The following table describes the valid options:
+      </p>
+
+      <table summary="closingParens options">
+        <tr>
+          <td>Option</td>
+          <td>Definition</td>
+        </tr>
+
+        <tr>
+          <td><code>always</code></td>
+          <td>
+            Example:
+            <pre>@Deprecated()</pre>
+          </td>
+        </tr>
+
+        <tr>
+          <td><code>never</code></td>
+          <td>
+            Example:
+            <pre>@Deprecated</pre>
+          </td>
+        </tr>
+
+        <tr>
+          <td><code>ignore</code></td>
+          <td>
+            Anything goes.
+          </td>
+        </tr>
+      </table>
+    </subsection>
+
+
+    <subsection name="trailingArrayComma">
+      <p>
+        This property represents the policy for the styles for the trailing
+        array comma. The following table describes the valid options:
+      </p>
+
+      <table summary="trailingArrayComma options">
+        <tr>
+          <td>Option</td>
+          <td>Definition</td>
+        </tr>
+
+        <tr>
+          <td><code>always</code></td>
+          <td>
+            Example:
+            <pre>@SuppressWarnings(value={"unchecked","unused",})</pre>
+          </td>
+        </tr>
+
+        <tr>
+          <td><code>never</code></td>
+          <td>
+            Example:
+            <pre>@SuppressWarnings(value={"unchecked","unused"})</pre>
+          </td>
+        </tr>
+
+        <tr>
+          <td><code>ignore</code></td>
+          <td>
+            Anything goes.
+          </td>
+        </tr>
+      </table>
+    </subsection>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/releasenotes.xml b/src/xdocs/releasenotes.xml
new file mode 100644
index 0000000..7f40e60
--- /dev/null
+++ b/src/xdocs/releasenotes.xml
@@ -0,0 +1,2697 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Release Notes</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+    <section name="Release 5.9">
+      <p>New features:</p>
+      <ul>
+        <li>
+          Support of Java8 syntax. Author: Ilja Dubinin. <a href="https://github.com/checkstyle/checkstyle/issues/10">#10</a>
+        </li>
+      </ul>
+      <p>Bug fixes:</p>
+      <ul>
+        <li>
+          Enourmous update on Indentation Check. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/294">#294</a>
+        </li>
+        <li>
+          Fixed IllegalInstantiationCheck, so it won't recognize a constructor reference (Java8) as instantiation. Author: Ryszard Wisniewski.
+        </li>
+        <li>
+          Since Java 8 we can have methods body in interfaces. Author: Ilja Dubinin. <a href="https://github.com/checkstyle/checkstyle/issues/282">#282</a>
+        </li>
+        <li>
+          Default modifier has been added to modifier list. Author: Ilja Dubinin. <a href="https://github.com/checkstyle/checkstyle/issues/284">#284</a>
+        </li>
+        <li>
+          Fixed bug in DefaultComesLast check. Now it supports java 8 default methods. Author: Ilja Dubinin. <a href="https://github.com/checkstyle/checkstyle/issues/297">#297</a>
+        </li>
+        <li>
+          Fixed IndexOutOfBoundsException in CustomImportOrderCheck. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/296">#296</a>
+        </li>
+      </ul>
+      <p>Notes:</p>
+      <ul>
+        <li>
+          Correct OverloadMethodsDeclarationOrder name in documentation. Author: Andrew Gaul.
+        </li>
+      </ul>
+    </section>
+
+      <section name="Release 5.8">
+      <p>New features:</p>
+      <ul>
+        <li>
+          Google Java Style <a href="google_style.html">xml configuration</a> was added. Author: Max Vetrenko.
+        </li>
+        <li>
+          New: AbbreviationAsWordInName check. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/212">#212</a>
+        </li>
+        <li>
+          Added enum processing to TypeNameCheck . Author: Pavel Baranchikov
+        </li>
+        <li>
+          Added method to clear cache to LocalizedMessage. Author: Joni Salmi. <a href="https://github.com/checkstyle/checkstyle/pull/156">#156</a>
+        </li>
+        <li>
+          New: AvoidEscapedUnicodeCharacters check. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/194">#194</a>
+        </li>
+        <li>
+          New: CustomImportOrder check. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/194">#194</a>
+        </li>
+        <li>
+          New: EmptyLineSeparator check. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/186">#186</a>
+        </li>
+        <li> Enable array initialisation indentation settings. Author: Vaclav Chalupa. </li>
+        <li> Enhance WhitespaceAroundCheck to ignore Annotation Array Initialization curlies as it does for Array Initialization outside of annotations. . Author: Jacob Tomaw </li>
+        <li>
+          ignore option to the JavadocVariable check. Author: ychulovskyy. <a href="https://github.com/checkstyle/checkstyle/issues/98">#98</a>
+        </li>
+        <li>
+          New: InterfaceTypeParameterName check. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/202">#202</a>
+        </li>
+        <li>
+          New grammar rule was added only for catch types. IllegalCatchCheck has been extended to use catch with few
+          exception types. . Author: Ilja Dubinin <a href="https://github.com/checkstyle/checkstyle/issues/165">#165</a>
+        </li>
+        <li>
+          LocalVariableName. Allowed one char variables in initialization expressions in FOR loop . Author: Max Vetrenko <a href="https://github.com/checkstyle/checkstyle/issues/192">#192</a>
+        </li>
+        <li>
+          New: NoLineWrap check. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/173">#173</a>
+        </li>
+        <li>
+          New: OneTopLevelClass check. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/172">#173</a>
+        </li>
+        <li>
+          New: OverloadMethodsDeclarationOrder check. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/pull/32">#32</a>
+        </li>
+        <li>
+          New option to allow no empty line between fields at EmptyLineSeparatorCheck check. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/227">#227</a>
+        </li>
+        <li>
+          New option to allow that force overload methods are grouped together at DeclarationOrder check. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/pull/163">#163</a>
+        </li>
+        <li>
+          New option to allow empty classes, enums and interfaces, empty loops are allowed at WhitespaceAround check. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/pull/163">#163</a>
+        </li>
+        <li>
+          New: VariableDeclarationUsageDistance check. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/223">#223</a>
+        </li>
+      </ul>
+      <p>Bug fixes:</p>
+      <ul>
+        <li>
+          Update for EmptyBlock to allow empty loops. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/190">#190</a>
+        </li>
+        <li>
+          EmptyLineSeparatorCheck was updated to validate empty line after header. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/218">#218</a>
+        </li>
+        <li>
+          LeftCurly Check was updated to force line break. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/247">#247</a>
+        </li>
+        <li>
+          update for OuterTypeFilename Check to check top level type are the public type or the first type in file if public is missed. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/248">#248</a>
+        </li>
+        <li>
+          update for RightCurly Check, new option to check line break after the closing brace if that brace terminates a statement or the body of a method, constructor or named class. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/182">#182</a>
+        </li>
+        <li>
+          Added test and fix for the case if there is a semicolon between import statements. Author: Ryszard Wisniewski
+        </li>
+        <li>
+          Adding ANNOTATION_DEF to the valid list of parentASTs for the SuppressWarningsHolder. Without this, any
+          @SuppressWarnings (checkstyle or not) present on an annotation definition class will fail. Author: Dominic Jones
+        </li>
+        <li>
+          Adding u HTML tag to list of allowed tags in JavaDoc. Author: Ilja Gubins. <a href="https://github.com/checkstyle/checkstyle/issues/58">#58</a>
+        </li>
+        <li>
+          update for WhitespaceAround. Allowed empty anonymous classes. Was updated allowEmptyTypes property. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/197">#197</a>
+        </li>
+        <li>
+          Fixed AbstractTypeAwareCheck for generics in interfaces. Author: Tobias Baum. <a href="https://github.com/checkstyle/checkstyle/pull/177">#177</a>
+        </li>
+        <li>
+          Fixed RightCurlyCheck for empty methods. Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/213">#213</a>
+        </li>
+        <li>
+          Fixed WhitespaceAroundCheck. fix for anonymous inner class. Author: ychulovskyy. <a href="https://github.com/checkstyle/checkstyle/issues/213">#105</a>
+        </li>
+        <li>
+          Fixed RedundantModifier. Abstract Interface Should not be Allowed.
+          Author: ychulovskyy. <a href="https://github.com/checkstyle/checkstyle/issues/209">#209</a>
+        </li>
+        <li>
+          Fixed EmptyBlock. need to handle switch block.
+          Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/235">#235</a>
+        </li>
+        <li>
+          Fixed WhitespaceAround. Fix false positive with ANNOTATION_DEF.
+          Author: Max Vetrenko. <a href="https://github.com/checkstyle/checkstyle/issues/237">#237</a>
+        </li>
+        <li>
+          Fixed GenericWhitespace. Fix false positive with Array.
+          Author: Inav Sopov. <a href="https://github.com/checkstyle/checkstyle/issues/47">#47</a>
+        </li>
+        <li>
+          Fixed JavadocStyleCheck. HTML comments break the Javadoc style HTML check.
+          Author: theqaguy. <a href="https://github.com/checkstyle/checkstyle/issues/119">#119</a>
+        </li>
+        <li>
+          Fixed Java grammar. Now it can parse 'return (byte[].class);'
+          Author: Ilja Dubinin. <a href="https://github.com/checkstyle/checkstyle/issues/130">#130</a>
+        </li>
+        <li>
+          Exception thrown when parsing numeric constant "3.14_15F".
+          Author: ychulovskyy<a href="https://github.com/checkstyle/checkstyle/issues/134">#134</a>
+        </li>
+        <li>
+          RequireThis triggers for static interface fields Fixed.
+          Author: Sergiu Dumitriu <a href="https://github.com/checkstyle/checkstyle/issues/155">#155</a>
+        </li>
+        <li>
+          Javadoc in GenericWhitespaceCheck was updated.
+          Author: Max Vetrenko <a href="https://github.com/checkstyle/checkstyle/issues/254">#254</a>
+        </li>
+        <li>
+          MemberNameCheck should not validate interface constants, that's ConstantNameCheck's role . Author: Sergiu Dumitriu
+        </li>
+        <li>
+          RightCurly. Force line break before '}' in case SAME option.
+          Author: Max Vetrenko <a href="https://github.com/checkstyle/checkstyle/issues/250">#250</a>
+        </li>
+        <li>
+          SeparatorWrapCheck. Covers separators like ',', '.' .
+          Author: Max Vetrenko <a href="https://github.com/checkstyle/checkstyle/issues/179">#179</a>
+        </li>
+        <li>
+          Support annotations in TypeNameCheck. Author: Thomas Jensen
+        </li>
+        <li>
+          Update UnusedImportsCheck to correctly detect classes in parameters and inline tags nested within block tags.
+          fixing checkstyle issues Fixing even more checkstyle issues . Author: James Gorman
+        </li>
+        <li>
+          Use a thread-safe map implementation to keep the compiled patterns. Author: Christoph Kutzinski
+        </li>
+        <li>
+          WhitespaceAround with allowEmptyMethods complains on annotation's empty method
+          Author: Max Vetrenko <a href="https://github.com/checkstyle/checkstyle/issues/21">#21</a>
+        </li>
+      </ul>
+      <p>Notes:</p>
+      <ul>
+        <li>
+          dsm-maven-plugin is used to show <a href="dsm/index.html">dependency stucture of project</a> on site. Author: Ilja Dubinin.
+        </li>
+        <li>
+          Added and updated documentation/messages for number of Checks. Authors: Max Vetrenko, Thomas Jensen, ychulovskyy, Jarmo Isotalo
+          , Peter O, Ryszard Wisniewski, Ilja Gubins, Baratali Izmailov, Jan Schafer, Niklas Walter, Andrew Gaul.
+        </li>
+        <li>
+          Moving to standard directory layout . Author: Ivan Sopov.
+        </li>
+      </ul>
+    </section>
+
+    <section name="Release 5.7">
+      <p>New features:</p>
+      <ul>
+        <li>
+          Support
+          <a href="config.html#SuppressWarningsFilter">SuppressWarningsFilter</a>
+          to use <code>@SuppressWarnings</code> annotations to suppress
+          violations. Thanks to Trevor Robinson for patch #156.
+        </li>
+        <li>
+          New: UniqueProperties check. Thanks to Pavel Baranchikov. <a href="https://github.com/checkstyle/checkstyle/issues/19">#19</a>
+        </li>
+        <li>
+          Support for '&' in nested generics. Thanks to <a
+          href="https://github.com/dkomanov">dkomanov</a>.
+        </li>
+        <li>
+          Allow HeaderCheck definition to be specified as URL. Thanks to
+          tnarake.
+        </li>
+        <li>
+          Allow additional URL schemes for SuppressionFilter
+          configuration. Thanks to tnarake.
+        </li>
+      </ul>
+      <p>Bug fixes:</p>
+      <ul>
+        <li>
+          added support for a separate throws indentation configuration
+        </li>
+        <li>
+          SuppressionCommentFilter ignores messageFormat. Patch from Chris Brigham. <a href="http://sourceforge.net/p/checkstyle/bugs/520/">#520</a>
+        </li>
+        <li>
+          Exclude some java.util classes from Class Fan out. Thanks to Ivan Sopov and Vincent Massol.<a href="https://github.com/checkstyle/checkstyle/issues/31">#31</a>
+        </li>
+        <li>
+          Allow to ignore java.lang and certain other classes. Thanks to Ivan Sopov and Vincent Massol.<a href="https://github.com/checkstyle/checkstyle/issues/33">#33</a>
+        </li>
+        <li>
+          RequireThisCheck doesn't check methods. Thanks to krzyk.<a href="https://github.com/checkstyle/checkstyle/issues/41">#41</a>
+        </li>
+        <li>
+          Document WhitespaceAround for-each property. Thanks to Andrew Gaul.<a href="https://github.com/checkstyle/checkstyle/issues/15">#15</a>
+        </li>
+        <li>
+          Other corrections for typos. Thanks to Andrew Gaul.<a href="https://github.com/checkstyle/checkstyle/issues/16">#16</a>
+        </li>
+        <li>
+          Remnants of DoubleCheckedLocking were removed. Thanks to Antonio Ospite.
+        </li>
+      </ul>
+      <p>Notes:</p>
+      <ul>
+        <li>
+          Improved the performance of FileText construction, which
+          increased file loading times by up to 30%.
+        </li>
+        <li>
+          Upgraded dependencies to guava-jdk5 14.0.1 and JUnit 4.11.
+        </li>
+        <li>
+           partial fix for "Sonarqube found problems in Checkstyle" <a href="https://github.com/checkstyle/checkstyle/issues/46">#46</a>.
+        </li>
+        <li>
+          Remnants of DoubleCheckedLocking were removed. Thanks to
+          Antonio Ospite.
+        </li>
+      </ul>
+    </section>
+
+    <section name="Release 5.6">
+      <p>New features:</p>
+      <ul>
+        <li>
+          <a href="config.html#SuppressionFilter">SuppressionFilter</a>
+          now supports loading a configuration from a URL
+          reference. Thanks to Stephen for patch #3485185.
+        </li>
+      </ul>
+      <p>Bug fixes:</p>
+      <ul>
+        <li>
+          Fixed bug in the grammar for an edge case (bug
+          #1667137). Thanks to Lukas Platinsky for patch #3393810.
+        </li>
+        <li>
+          <a href="config_coding.html#DeclarationOrder">DeclarationOrder</a>
+          handles ignoreModifiers correctly (all fields should be before
+          ctors and methods)(bug #3429775)
+        </li>
+        <li>
+          <a href="config_coding.html#InnerAssignment">Inner assignment</a>
+          is now allowed in try-with-resources (bug #3441097)
+        </li>
+        <li>
+          Fixed bug in the grammar when builtin types are used in a
+          generic declaration (bug #3553541).
+        </li>
+      </ul>
+      <p>Notes:</p>
+      <ul>
+        <li>
+          Removed the <code>DoubleCheckedLocking</code> check, as in Java 5
+          (and beyond), using the <code>volatile</code> keyword addresses
+          the issue. See
+          <a href="http://jeremymanson.blogspot.com.au/2008/05/double-checked-locking.html">here</a>
+          for more details.
+        </li>
+        <li>
+          Added Turkish message translations. Thanks to poyrazus
+          for patch #3460908.
+        </li>
+      </ul>
+    </section>
+
+    <section name="Release 5.5">
+      <p>New features:</p>
+      <ul>
+        <li>
+          Added Java 7 support to the grammar. Thanks to Dinesh
+          Bolkensteyn for patch #3403265.
+        </li>
+      </ul>
+      <p>Bug fixes:</p>
+      <ul>
+        <li>
+          Fix parsing error <code>unexpected char: 0xFFFF</code> which was
+          triggered when a comment line is on a line without newline character.
+          Thanks to Evgeny Mandrikov for patch #3367782.
+        </li>
+        <li>
+          Fixed <a href="config_imports.html#UnusedImports">UnusedImports</a>
+          to consider @linkplain, @throws and @exception tags when the option
+          <code>processJavadoc</code> is turned on.
+        </li>
+        <li>
+          <a href="config_coding.html#RequireThis">RequireThis</a> now
+          ignores static members (bug #1155921).
+        </li>
+        <li>
+          <a href="config_coding.html#HiddenField">HiddenField</a> now
+          treats setxYz() as a setter for xYz, and setXYz() as a setter for
+          XYz property to comply JavaBeans specification (bug #3370946).
+        </li>
+        <li>
+          Fixed parsing errors for Unicode escape sequences. Thanks to
+          Dinesh Bolkensteyn for patch #3412812.
+        </li>
+        <li>
+          ignoreEnhancedForColon property added to
+          <a href="config_whitespace.html#WhitespaceAround">WhitespaceAround</a>.
+          Thanks to Travis Schneeberger for patch #1921815 (bug #1649038).
+        </li>
+      </ul>
+    </section>
+
+    <section name="Release 5.4">
+      <p>New features:</p>
+      <ul>
+        <li>
+          Enhanced <a href="config_imports.html#UnusedImports">UnusedImports</a>
+          to have the option <code>processJavadoc</code> to detect whether
+          imports are used. Thanks to Lyle Hanson for patch #3267984.
+        </li>
+        <li>
+          Enhanced <a href="config_coding.html#MagicNumber">MagicNumber</a>
+          to support ignoring numbers in annotation declarations. Thanks to
+          Julio Cesar Cabral for patch #3132984.
+        </li>
+        <li>
+          Enhanced
+          <a href="config_coding.html#EqualsAvoidNull">EqualsAvoidNull</a>
+          to process <code>String.equalsIgnoreCase()</code>
+          invocations (which can be suppressed).
+        </li>
+        <li>
+          Enhanced
+          <a href="config_coding.html#IllegalThrows">IllegalThrows</a>
+          to support ignoring methods with specified names. Thanks to
+          Amit Shah for patch #3115439.
+        </li>
+        <li>
+          Enhanced
+          <a href="config_modifier.html#RedundantModifier">RedundantModifier</a>
+          to support detecting inner <code>interface</code> declarations that
+          are declared as <code>static</code>. Raised in bug #3222810.
+        </li>
+        <li>
+          Enhanced the <a href="anttask.html#Parameters">ANT task</a>,
+          <a href="cmdline.html#Usage">Command Line</a> and
+          <a href="config.html#SuppressionFilter">Suppression Filter</a> to be
+          able to load their configuration file from either the filesystem or
+          the classpath as a resource. Thanks to Tracy Snell for patch #3307526.
+        </li>
+      </ul>
+      <p>Bug fixes:</p>
+      <ul>
+        <li>
+          Fix
+          <a href="config_coding.html#MultipleVariableDeclarations">MultipleVariableDeclarations</a>
+          to properly handle when multiple variable declarations are inside a
+          for loop initializer. Thanks to Amit Shah for patch #3121071.
+        </li>
+        <li>
+          Fix memory leak in FileContentsHolder. Thanks to Evgeny Mandrikov
+          for patch #3323517.
+        </li>
+      </ul>
+    </section>
+
+    <section name="Release 5.3">
+      <p>New features:</p>
+      <ul>
+        <li>
+          Added <a href="config_misc.html#OuterTypeFilename">OuterTypeFilename</a>
+          that checks that the outer type name and the file name match.
+          For example, the class <code>Foo</code> must be in a file named
+          <code>Foo.java</code>.
+        </li>
+        <li>
+          Enhanced
+          <a href="config_coding.html#PackageDeclaration">PackageDeclaration</a>
+          to optionally check that the package name matches the name of the
+          directory containing the file.
+        </li>
+        <li>
+          Added <a href="config_coding.html#NestedForDepth">NestedForDepth</a>
+          that restricts nested <code>for</code> blocks to a specified
+          depth (default = 1). Thanks to Alexander Jesse for patch
+          #1151673.
+        </li>
+        <li>
+          Added <a href="config_sizes.html#MethodCount">MethodCount</a>
+          that checks the number of methods declared in each type. This
+          includes the number of each scope (<code>private</code>,
+          <code>package</code>, <code>protected</code> and
+          <code>public</code>) as well as an overall total. Thanks to
+          Alexander Jesse for patch #1151669, which was the inspiration.
+        </li>
+        <li>
+          Added <a href="config_coding.html#OneStatementPerLine">OneStatementPerLine</a>
+          that checks there is only one statement per line. Thanks to
+          Alexander Jesse for patch #1144994, which was the inspiration.
+        </li>
+        <li>
+          Enhanced <a href="config_coding.html#MagicNumber">MagicNumber</a>
+          to support the parameter <code>ignoreHashCodeMethod</code> to ignore
+          magic numbers in <code>hashCode()</code> methods. Thanks to
+          Daniel Solano Gómez for patch #3050788.
+        </li>
+        <li>
+          Enhanced
+          <a href="config_naming.html#AbstractClassName">AbstractClassName</a>
+          to support checking that matching classes have the
+          <code>abstract</code> modifier. Thanks to Danil Lopatin for
+          patch #3043752.
+        </li>
+        <li>
+          Enhanced the property types
+          <a href="property_types.html#stringSet">stringSet</a> and
+          <a href="property_types.html#intSet">intSet</a> to support being
+          supplied multiple times to construct the equivalent of a comma
+          separated list.
+        </li>
+        <li>
+          Enhanced
+          <a href="config_imports.html#AvoidStarImport">AvoidStarImport</a>
+          to support the properties <code>allowClassImports</code> and
+          <code>allowStaticMemberImports</code> for finer control over
+          what is allowed. Thanks to Travis Schneeberger for patch
+          #1939775.
+        </li>
+      </ul>
+      <p>Bug fixes:</p>
+      <ul>
+        <li>
+          Fix <a href="config_javadoc.html#JavadocMethod">JavadocMethod</a>
+          checking of <code>@throws</code> tags for methods that throw multiple
+          non-runtime exceptions. Thanks to Daan Kets for patch #3039869.
+        </li>
+        <li>
+          Fix
+          <a href="config_design.html#HideUtilityClassConstructor">HideUtilityClassConstructor</a>
+          to handle empty and inner classes. Thanks to Roman Ivanov for
+          patch #3045720.
+        </li>
+      </ul>
+      <p>Notes:</p>
+      <ul>
+        <li>
+          Changed the default value of the property <code>logLoadErrors</code>
+          to be <code>true</code> for the checks
+          <a href="config_coding.html#RedundantThrows">RedundantThrows</a> and
+          <a href="config_javadoc.html#JavadocMethod">JavadocMethod</a> to
+          ensure consistent behaviour.
+        </li>
+      </ul>
+    </section>
+    <section name="Release 5.2">
+      <p>New features:</p>
+      <ul>
+        <li>
+          Enhanced <a href="config_coding.html#DeclarationOrder">DeclarationOrder</a>
+          to support properties to ignore constructors, methods and modifiers.
+          Thanks to Steve McKay for patch #2953941.
+        </li>
+        <li>
+          Enhanced <a href="config_javadoc.html#WriteTag">WriteTag</a>
+          to support empty tags, and constructor declarations.
+          Thanks to Rolf Wojtech for patch #2724894.
+        </li>
+        <li>
+          Added <a
+          href="config_design.html#InnerTypeLast">InnerTypeLast</a> to
+          check nested (internal) classes/interfaces are declared at the
+          bottom of the class after all method and field declarations.
+          Thanks to Ruslan Dyachenko for patch #3027391.
+        </li>
+        <li>
+          Enhanced <a href="config_imports.html#ImportOrder">ImportOrder</a>
+          to support using regular expressions for defining groups.
+          Thanks to Martin von Gagern for patch #2782118.
+        </li>
+      </ul>
+      <p>Bug fixes:</p>
+      <ul>
+        <li>
+          Fixed <a href="config_imports.html#ImportOrder">ImportOrder</a>
+          to have the sort behaviour as in release 5.0. (bug #2952881).
+          Thanks to Steve McKay for patch #2953936.
+        </li>
+        <li>
+          Fixed <a href="config_javadoc.html#JavadocStyle">JavadocStyle</a>
+          not handling package declarations that have annotations.
+          (bug #2911363)
+        </li>
+      </ul>
+      <p>Notes:</p>
+      <ul>
+        <li>
+          Converted the build system to
+          <a href="http://maven.apache.org/">Maven</a>. The directory structure
+          has been maintained for now, rather than adopting Maven's
+          <a href="http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html">
+            standard directory layout
+          </a>. This will change once Maven has been <i>proven</i>.
+        </li>
+        <li>
+          The Maven <code><groupId></code> changed to be
+          <code>com.puppycrawl.tools</code> (from <code>checkstyle</code>).
+        </li>
+        <li>
+          Introduced
+          <a href="apidocs/com/puppycrawl/tools/checkstyle/api/FileText.html">
+              FileText
+          </a>
+          to provide more flexibility on how the contents of a file are
+          represented. This allows for Checkers that wish to operate on
+          a single character sequence instead of a list of lines.
+          Thanks to Martin von Gagern for patch #2783226.
+        </li>
+        <li>
+          Updated third party dependencies to the latest versions. See
+          <a href="dependencies.html">Project Dependencies</a> for details.
+        </li>
+        <li>
+          Made the method
+          <a href="apidocs/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyBlockCheck.html#hasText(com.puppycrawl.tools.checkstyle.api.DetailAST)">
+            EmptyBlockCheck.hasText(DetailAST)
+          </a>
+          <code>protected</code> so that it is accessible to subclasses.
+          Requested by Steve McKay.
+        </li>
+      </ul>
+    </section>
+
+    <section name="Release 5.1">
+      <p>New features:</p>
+      <ul>
+        <li>
+          Enhanced <a href="config_imports.html#ImportOrder">ImportOrder</a>
+          check to support wildcard ('*') groups.
+          Thanks to Steve McKay for patch #2891032.
+        </li>
+        <li>
+          Enhanced the naming checks
+          <a href="config_naming.html">ConstantName</a>,
+          <a href="config_naming.html">MemberName</a>,
+          <a href="config_naming.html">MethodName</a>
+          and <a href="config_naming.html">StaticVariableName</a>
+          to utilise the access control tuning features
+          of AbstractAccessControlNameCheck. Thanks to Steve McKay for patch
+          #2893581.
+        </li>
+        <li>
+          Improve ConfigurationLoader to use a InputSource. Thanks to
+          Martin von Gagern for patch #2782627.
+        </li>
+        <li>
+          Enhanced the
+          <a href="config_imports.html#ImportControl">ImportControl</a> check
+          to support regular expressions. Thanks to lbaeumer for patch
+          #2937442.
+        </li>
+      </ul>
+      <p>Bug fixes:</p>
+      <ul>
+        <li>
+           Corrected build errors on javadoc generation.
+           Thanks to Martin von Gagern for providing a patch (patch #2782630).
+        </li>
+        <li>
+           Corrected javadoc in TokenTypes class for UNARY_PLUS and UNARY_MINUS
+           members (bug #2745145).
+        </li>
+        <li>
+           Corrected broken link in WhiteSpaceAround documentation
+           (bug #2745287).
+        </li>
+        <li>
+           Corrected pad policy documentation for MethodParamPad (bug #2775402).
+        </li>
+        <li>
+           Added correct license information for referenced source files
+           (bug #2778850).
+        </li>
+        <li>
+           Updated documentation for writing checks (bug #2783451).
+        </li>
+        <li>
+          Report unused Javadoc tags with no trailing whitespace(bug #2506962).
+          Thanks to Ashlesha Patil for patch #2781021.
+        </li>
+        <li>
+          Enhanced <a href="config_javadoc.html#JavadocType">JavadocType</a>
+          check to handle and report on unknown Javadoc tags.
+          The property allowUnknownTags can be set to ignore errors.
+          (bug #2882261)
+        </li>
+      </ul>
+      <p>Notes:</p>
+      <ul>
+        <li>
+          <i>Updated dependencies</i>: Updated Google collections to version
+          1.0.
+        </li>
+        <li>
+          <i>Updated documentation</i>: Added links for 3rd party tools.
+        </li>
+      </ul>
+    </section>
+    <section name="Release 5.0">
+      <p>
+        Release 5.0 is not 100% backwardly compatible with release
+        4.4. Most likely you will need to update your configuration
+        file.
+      </p>
+      <p>The following checks were added since release 4.4:</p>
+      <ul>
+        <li><a href="config_annotation.html#AnnotationUseStyle">AnnotationUseStyle</a></li>
+        <li><a href="config_annotation.html#MissingDeprecated">MissingDeprecated</a></li>
+        <li><a href="config_annotation.html#MissingOverride">MissingOverride</a></li>
+        <li><a href="config_annotation.html#PackageAnnotation">PackageAnnotation</a></li>
+        <li><a href="config_annotation.html#SuppressWarnings">SuppressWarnings</a></li>
+        <li><a href="config_coding.html#EqualsAvoidNull">EqualsAvoidNull</a></li>
+        <li><a href="config_coding.html#NoClone">NoClone</a></li>
+        <li><a href="config_coding.html#NoFinalizer">NoFinalizer</a></li>
+        <li><a href="config_imports.html#AvoidStaticImport">AvoidStaticImport</a></li>
+        <li><a href="config_javadoc.html#JavadocPackage">JavadocPackage</a></li>
+        <li><a href="config_naming.html#ClassTypeParameterName">ClassTypeParameterName</a></li>
+        <li><a href="config_naming.html#MethodTypeParameterName">MethodTypeParameterName</a></li>
+        <li><a href="config_regexp.html#RegexpMultiline">RegexpMultiline</a></li>
+        <li><a href="config_regexp.html#RegexpSingleline">RegexpSingleline</a></li>
+        <li><a href="config_regexp.html#RegexpSinglelineJava">RegexpSinglelineJava</a></li>
+        <li><a href="config_sizes.html#OuterTypeNumber">OuterTypeNumber</a></li>
+        <li><a href="config_whitespace.html#FileTabCharacter">FileTabCharacter</a></li>
+        <li><a href="config_whitespace.html#GenericWhitespace">GenericWhitespace</a></li>
+      </ul>
+      <p>
+        Since release 4.4 the following checks were changed from a Check
+        to a FileSetCheck:
+      </p>
+      <ul>
+        <li><a href="config_header.html#Header">Header</a></li>
+        <li><a href="config_header.html#RegexpHeader">RegexpHeader</a></li>
+        <li><a href="config_sizes.html#FileLength">FileLength</a></li>
+      </ul>
+      <p>
+        This means that the checks above must not be declared under the
+        TreeWalker module anymore. For example, the following Checkstyle
+        4.4 configuration file:
+      </p>
+      <source>
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="Header">
+      <property name="headerFile" value="${checkstyle.header.file}"/>
+    </module>
+  </module>
+</module>
+      </source>
+
+      <p>becomes the following Checkstyle 5.0 configuration file:</p>
+      <source>
+<module name="Checker">
+  <module name="Header">
+    <property name="headerFile" value="${checkstyle.header.file}"/>
+    <property name="fileExtensions" value="java"/>
+  </module>
+</module>
+      </source>
+      <p>The following checks were removed since release 4.4:</p>
+      <ul>
+        <li>
+          GenericIllegalRegexpCheck - replaced with <a
+          href="config_regexp.html#RegexpMultiline">RegexpMultiline</a>
+          and <a
+          href="config_regexp.html#RegexpSingleline">RegexpSingleline</a>
+          and <a
+          href="config_regexp.html#RegexpSinglelineJava">RegexpSinglelineJava</a>.
+        </li>
+        <li>
+          RequiredRegexpCheck - replaced with <a
+          href="config_regexp.html#RegexpMultiline">RegexpMultiline</a>
+          and <a
+          href="config_regexp.html#RegexpSingleline">RegexpSingleline</a>
+          and <a
+          href="config_regexp.html#RegexpSinglelineJava">RegexpSinglelineJava</a>.
+        </li>
+        <li>
+          CrossLanguageRegexpHeaderCheck - replaced with
+          <a href="config_header.html#RegexpHeader">RegexpHeader</a>.
+        </li>
+        <li>
+          PackageHtmlCheck - replaced with
+          <a href="config_javadoc.html#JavadocPackage">JavadocPackage</a>.
+        </li>
+        <li>All the J2EE checks.</li>
+      </ul>
+      <p>New Features since release 5.0 Beta 2:</p>
+      <ul>
+        <li>
+          New Annotation checks
+          <a href="config_annotation.html#AnnotationUseStyle">AnnotationUseStyle</a>
+          <a href="config_annotation.html#MissingDeprecated">MissingDeprecated</a>
+          <a href="config_annotation.html#MissingOverride">MissingOverride</a>
+          <a href="config_annotation.html#PackageAnnotation">PackageAnnotation</a>
+          <a href="config_annotation.html#SuppressWarnings">SuppressWarnings</a>
+          . Big thanks to Travis Schneeberger who is now a committer on the
+          project.
+        </li>
+      </ul>
+      <p>Fixed Bugs since release 5.0 Beta 2:</p>
+      <ul>
+        <li>
+          <a href="config_coding.html#RequireThis">RequireThis</a>
+          reported a violation when using an annotation
+          with a member name that is the same as a member name in the enclosing
+          class the annotation was used in (bug #2123003).
+        </li>
+      </ul>
+    </section>
+
+    <section name="Release 5.0 Beta 2">
+      <p>
+        Major change to FileSetCheck architecture to move the
+        functionality of open/reporting of files into Checker. The
+        advantages are:
+      </p>
+      <ul>
+        <li>
+          Reduces the logic required in each implementation of FileSetCheck
+        </li>
+        <li>
+          Reduces, but not eliminates, the number of times a file is
+          reported as being audited.
+        </li>
+        <li>
+          Reduces the amount of times a file needs to be read in from
+          the file system.
+        </li>
+      </ul>
+      <p>
+        The motivation for this change is to convert checks that are
+        language neutral in nature, to be based on FileSetCheck. This
+        allows the checks to be used for other languages apart from
+        Java. As a practical example, it is possible to ensure that JSP
+        and XML files do not contain tabs.
+      </p>
+      <p>New Features:</p>
+      <ul>
+        <li>
+          Added the option <i>charset</i> to the
+          <a href="config_header.html">header checks</a> to allow
+          controlling the encoding of the header file (rfe 1952641).
+        </li>
+        <li>
+          New check
+          <a href="config_sizes.html#OuterTypeNumber">OuterTypeNumber</a>
+          for enforcing the maximum number of outer types per file. Inspired
+          by patch #1145023 from Alexander Jesse.
+        </li>
+        <li>
+          Added the option <i>sumTokenCounts</i> to the <a
+          href="config_misc.html#DescendantToken">DescendantToken</a> to
+          allow for even more powerful checks. For example, detect
+          statements like <code>this == null</code>.
+        </li>
+        <li>
+          Add new options to the <a
+          href="config_sizes.html#ImportOrderCheck">ImportOrderCheck</a>
+          to make it more flexible. Thanks to David Didier for providing
+          patch #1854213.
+        </li>
+        <li>
+          New check <a
+          href="config_whitespace.html#FileTabCharacter">FileTabCharacter</a>
+          for ensuring that any files does not contain a tab
+          character. It replaces <i>TabCharacterCheck</i> which was
+          restricted to Java files.
+        </li>
+        <li>
+          Changed <a href="config_sizes.html#FileLength">FileLength</a>
+          check to be a FileSetCheck.
+        </li>
+        <li>
+          Changed <a
+          href="config_header.html#RegexpHeader">RegexpHeader</a> and <a
+          href="config_header.html#Header">Header</a> to be a
+          FileSetCheck. Removed CrossLanguageRegexpHeader as a result.
+        </li>
+        <li>
+          Enhanced <a
+          href="config_javadoc.html#JavadocStyle">JavadocStyle</a> to
+          check for allowed HTML tags. Thanks to Nicolas Dordet for
+          providing patch #2214251.
+        </li>
+        <li>
+          Enhanced <a
+          href="config_javadoc.html#JavadocMethod">JavadocMethod</a> to
+          be more restrictive on where <code>{@inheritDoc}</code> can be
+          used. Also enhanced <a
+          href="config_javadoc.html#JavadocPackage">JavadocPackage</a>
+          to ensure a <code>package-info.java</code> file contains a
+          comment. Thanks to Travis Schneeberger for providing patch
+          #2294029.
+        </li>
+        <li>
+          Added the <a href="config.html#Filters">SuppressWithNearbyCommentFilter</a>
+          filter that uses nearby comments to suppress audit events. Thanks
+          to Mick Killianey for providing patch #2354424.
+        </li>
+        <li>
+          Added the new checks <a
+          href="config_regexp.html#RegexpMultiline">RegexpMultiline</a>
+          <a
+          href="config_regexp.html#RegexpSingleline">RegexpSingleline</a>
+          <a
+          href="config_regexp.html#RegexpSinglelineJava">RegexpSinglelineJava</a>.
+        </li>
+      </ul>
+
+      <p>Fixed Bugs:</p>
+      <ul>
+        <li>
+          The NCSS complexity checker reported an incorrect fileMax value
+          (bug #2161419).
+        </li>
+
+        <li>
+          Checkstyle command-line no longer reports a usage error if the
+          user specifies a directory with the <i>-r</i> option that does
+          not contain any files. Thanks to Florian for patch #2151706.
+        </li>
+        <li>
+          Fixed the <a href="config_blocks.html#LeftCurly">LeftCurly</a> check
+          to ignore leading annotations. Thanks to Tim Carpenter for patch
+          #2506439.
+        </li>
+      </ul>
+    </section>
+
+    <section name="Release 5.0 Beta 1">
+      <p>
+        The 5.x release is developed using Java 5 and requires a Java 5
+        platform to run. If you need run a Java 1.4 or earlier, then use
+        a Checkstyle 4.x release. As such, features for earlier versions
+        of Java will be dropped over time.
+      </p>
+
+      <p>New Features:</p>
+      <ul>
+        <li>
+          New check <a
+          href="config_coding.html#NoFinalizer">NoFinalizer</a>
+          for ensuring that a class does not define a finalize() method.
+          Thanks to Feng Qian and Steve McKay for providing patch #1892273.
+        </li>
+        <li>
+          New check <a
+          href="config_whitespace.html#GenericWhitespace">GenericWhitespace</a>
+          for ensuring the whitespace around the Generic tokens < and
+          > are correct to the <i>typical</i> convention.
+        </li>
+        <li>
+          New check <a
+          href="config_javadoc.html#JavadocPackage">JavadocPackage</a>
+          for ensuring that each Java package has a Javadoc
+          comment. Replaces the check PackageHtml which has been
+          removed. (Bug 1228207)
+        </li>
+        <li>
+          Enhanced the <a
+          href="config_javadoc.html#JavadocMethod">JavadocMethod</a>
+          check to not require Javadoc if the method is tagged with the
+          <code>@Override</code> annotation.
+        </li>
+        <li>
+          New check <a
+          href="config_coding.html#EqualsAvoidNull">EqualsAvoidNull</a>
+          for ensuring that String literals is on the left side of an
+          <code>equals()</code> comparison.  Thanks to
+          Travis Schneeberger for providing patch #1895152.
+        </li>
+        <li>
+          Overhaul of how the package names to be prefixed to module
+          names are determined. See the <a
+          href="config.html#Packages">documentation</a> for full
+          details. This has meant removing a supported parameter to the
+          ANT task and the Command line. Thanks to Lars Koedderitzsch
+          for patch #1914806.
+        </li>
+        <li>
+          New check <a
+          href="config_imports.html#AvoidStaticImport">AvoidStaticImport</a>
+          for ensuring there are no static import statements. Thanks to
+          Travis Schneeberger for providing patch #1940611.
+        </li>
+        <li>
+          Enhanced the <a href="config_naming.html">MethodName</a> check
+          to detect when a method name is the same as the residing class
+          name. Thanks to Travis Schneeberger for providing patch
+          #1892364.
+        </li>
+        <li>
+          New check <a href="config_coding.html#NoClone">NoClone</a> for
+          ensuring a class does not override the <code>clone</code> method from
+          the <code>Object</code> class. Thanks to Travis
+          Schneeberger for providing patch #1947417.
+        </li>
+        <li>
+          New checks <a href="config_naming.html#ClassTypeParameterName">
+          ClassTypeParameterName</a> and
+          <a href="config_naming.html#MethodTypeParameterName">
+          MethodTypeParameterName</a>
+          for type name formats. Thanks to Travis Schneeberger for providing
+          patch #1956561.
+        </li>
+        <li>
+          Overhaul of how <code>AbstractOptionCheck</code> works.
+          It now requires that the option type is a Java 5 Enum and hence the
+          <code>AbstractOption</code> class has been removed.
+        </li>
+        <li>
+          Provide support in the module configuration to allow for custom
+          messages that override the default message. This allows for
+          messages to be easily overridden.
+          See <a href="config.html#Custom%20messages">Custom Messages</a> for
+          more information. Thanks to Lars Koedderitzsch for providing patch
+          #1917420.
+        </li>
+      </ul>
+
+      <p>Fixed Bugs:</p>
+      <ul>
+        <li>
+          Stop the WhitespaceAroundCheck from checking the Generic
+          tokens < and >.
+        </li>
+        <li>
+          Fixed bug with incorrectly flagging an import as being
+          unused. Bug 1860424, but as a consequence reintroduced bug
+          1098126. It is a catch-22 that both bugs can be solved with
+          the current architecture.
+        </li>
+        <li>
+          Fixed bug #1649020 where generic parameters for methods
+          recognized as HTML tags. Used patch #1936389 from Travis
+          Schneeberger.
+        </li>
+      </ul>
+
+      <p>Notes:</p>
+      <ul>
+        <li>
+          <i>Retired</i> the J2EE Checks. If you are using Java 5, then you
+          really should be using
+          <a href="http://java.sun.com/javaee/">Java EE</a>. If you need
+          these checks, then use a Checkstyle 4.x release.
+        </li>
+        <li>
+          Applied patch #1892253 to expand access controls to other naming
+          checks.
+        </li>
+        <li>
+          Applied patch #1993103 to make the format of end of sentence
+          configurable in the
+          <a href="config_javadoc.html#JavadocStyle">JavadocStyle</a>
+          check.
+        </li>
+        <li>
+          <i>Updated dependencies</i>: Removed commons-collections; added Google collections
+          (google-collect-snapshot-20080321.jar); upgraded commons-cli to version 1.1.
+        </li>
+        <li>
+          Changed the classes <code>Scope</code> and
+          <code>SeverityLevel</code> to be based on the Java 5
+          <code>Enum</code> class. Used patch #2004776 from Travis
+          Schneeberger.
+        </li>
+      </ul>
+    </section>
+
+    <section name="Release 4.4">
+      <p>Fixed Bugs:</p>
+
+      <ul>
+        <li>
+          checkstyle-all.jar contained some classes from jakarta
+          commons-collections twice. (bug 1630361)
+        </li>
+        <li>
+          Multiple string literal check now ignores annotations by
+          default (bug 1560940).  It is possible to retain the old
+          behaviour by setting the new check property
+          ignoreOccurrenceContext to an empty value.
+        </li>
+        <li>
+          The calculated value of NPath complexity was subject to
+          integer overflow, so complex code was not always flagged (bug
+          1654769).
+        </li>
+        <li>
+          Fixed misleading documentation for BooleanExpressionComplexity
+          check (bug 1579227).
+        </li>
+        <li>
+          Fixed Java parser error for array brackets in wildcard generic
+          types (bug 1394014).  Thanks to Paul Constantinides for
+          submitting the fix (patch 1422247).
+        </li>
+        <li>
+          Fixed false alarm in HideUtilityClassConstructor check when class
+          has only static methods but contains non static fields (bug 1762702).
+        </li>
+      </ul>
+
+      <p>New features:</p>
+
+      <ul>
+        <li>
+          Allow to control the operator token types in
+          BooleanExpressionComplexity check (in response to bug
+          1579227).
+        </li>
+        <li>
+          Added an entry for <tt>Checkstyle-IDEA</tt> on the home page.
+        </li>
+        <li>
+          Set the <tt>failureProperty</tt> with a meaningful message
+          (feature request 1725475).
+        </li>
+        <li>
+          Add a URL option for ImportControl check. Thanks to Benjamin
+          Lerman for the patch 1724683.
+        </li>
+        <li>
+          Moved source control over to Subversion.
+        </li>
+      </ul>
+    </section>
+
+    <section name="Release 4.3">
+      <p>Fixed Bugs:</p>
+
+      <ul>
+        <li>
+          The StrictDuplicateCode check didn't report correct results when
+          multiple duplicate code regions were overlapping. (bug 1564465)
+        </li>
+        <li>
+          Fixed NPE in FallThrough check (bug 1472228)
+        </li>
+        <li>
+          Fixed typo in Command Line example (bug 1464595)
+        </li>
+        <li>
+          RegexpHeader check now correctly report problematic line in
+          file with regexps for header (bug 1455575)
+        </li>
+        <li>
+          Fixed small problem in usage checks (patch 1498920).  Thanks
+          to Chris Povirk (cpovirk) for submitting the patch.
+        </li>
+        <li>
+          Fixed incorrect French translation (bug 1611403). Thanks to
+          Fabien Bergeret for providing the correct value.
+        </li>
+      </ul>
+
+      <p>New features:</p>
+
+      <ul>
+        <li>
+          Major performance improvements in the StrictDuplicateCode check,
+          especially for large projects. Also, false alarms are no longer
+          possible.
+        </li>
+        <li>
+          New CrossLanguageRegexpHeader check that allows checking file headers
+          for other languages than Java.
+        </li>
+        <li>
+          Applied patch 1586411 from Dennis Lundberg (dennislundberg) to
+          add Maven POM files to the build.
+        </li>
+      </ul>
+    </section>
+
+    <section name="Release 4.2">
+      <p>New features:</p>
+
+      <ul>
+        <li>
+          NoWhitespaceAfter check now accepts TYPECAST token to check is
+          there is no whitespace after typecast. (rfe 1248106).
+        </li>
+        <li>
+          IllegalType can be configured to accept some abstract classes
+          which matches to regexp of illegal type names (property
+          legalAbstractClassNames, rfe 953266).  Thanks to Paul Guyot
+          (pguyot) for submitting patch.
+        </li>
+        <li>
+          TrailingComment now can be configured to accept some trailing
+          comments (such as NOI18N) (property legalComment, rfe
+          1385344).
+        </li>
+        <li>
+          Added WriteTag check which outputs a JavaDoc tag as
+          information (patch 902110) Thanks to Daniel Grenner (dgrenner)
+          for contribution.
+        </li>
+        <li>
+          Support for suppressing audit events based on an identifier
+          that is assigned to individual modules/checks. This allows for
+          suppressing at a finer level than the check class
+          name. See <a href="config.html#Filters">SuppressionFilter</a>
+          documentation for more.
+        </li>
+
+        <li>
+          Added the style sheet checkstyle-frames.xsl, thanks to Paul
+          King. (Bug 1385095).
+        </li>
+
+        <li>
+          Applied patch (1505376) by Clint Stotesbery to support the
+          suppressLoadErrors property for AbstractTypeAwareCheck (RFE
+          1491630).
+        </li>
+
+        <li>
+          Upgraded to ANTLR 2.7.6.
+        </li>
+
+        <li>
+          GUI now displays a TextArea with the contents of the file
+          parsed. Based on patch from sermojohn (RFE 1499180).
+        </li>
+      </ul>
+
+      <p>Fixed Bugs:</p>
+
+      <ul>
+        <li>
+          First attempt to fix 1000092 (RightCurlyCheck misbehaves for
+          LIT_CATCH).  The check has been rewritten to check rcurly
+          after finally and else.  Current behavior is incompatible
+          with previous one.
+        </li>
+        <li>
+          Fixed problem in type aware checks with loading
+          inner-classes which were referenced as
+          <outer_class_name>.<inner_class_name> (bug
+          1379666, modules JavadocMethod and RedundantThrows).
+        </li>
+        <li>
+          Fix UTF-8 encoding error in XMLLogger. (bug 1369589).
+        </li>
+        <li>
+          The new property logLoadErrors of the JavaDocMethod check
+          now allows controlling the behaviour when checkstyle cannot
+          load a class that is referenced in javadoc (bug 1422462).
+        </li>
+        <li>
+          Tighten up the allowed use of the {@inheritDoc} tag.
+        </li>
+        <li>
+          Stop creating duplicate regular expression patterns.
+        </li>
+      </ul>
+    </section>
+
+    <section name="Release 4.1">
+      <p>Fixed Bugs:</p>
+
+      <ul>
+        <li>
+          Documentation for JavadocMethod check corrected to indicate
+          that after fix for 1290379 javadoc which contains only @see
+          tag is not valid any more (bug 1369615)
+        </li>
+        <li>
+          Fixed StackOverflowError in GenericIllegalRegexp check
+          which may occur if ignoreComments is true and there is an
+          illegal match in comment at the end of line. (bug 1371588)
+        </li>
+        <li>
+          InnerAssignment now ignores assignments in annotations. (bug
+          1369425)
+        </li>
+        <li>
+          Applied patch from Ralf (rakus) to remove javadoc's
+          complaints. (patch 1352862)
+        </li>
+        <li>
+          Fixed StringIndexOutOfBoundsException which MethodParamPad may
+          throws if someone tries to create object of generic class
+          (with any params) (bug 1374792).
+        </li>
+        <li>
+          Added information to the manifest file. (bug 1380322).
+        </li>
+      </ul>
+    </section>
+
+    <section name="Release 4.0">
+      <p>New features:</p>
+
+      <ul>
+        <li>
+          Applied patch 1344344 by sjq to provide the new
+          <a href="config_misc.html#Regexp">Regexp</a> check that can
+          provide the functionality of the following
+          checks: <a
+          href="config_header.html#RegexpHeader">RegexpHeader</a>, <a
+          href="config_misc.html#GenericIllegalRegexp">GenericIllegalRegexp</a>
+          and <a
+          href="config_misc.html#RequiredRegexp">RequiredRegexp</a>.
+        </li>
+        <li>
+          Added support for property <i>ignoreStringsRegexp</i> to
+          <i>MultipleStringLiterals</i> check. Patch 1254918 from taab.
+        </li>
+        <li>
+          Added Spanish translation of messages. Thanks to Ricardo Mones
+          (patch 1250329).
+        </li>
+        <li>
+          Made the Class Loader used to load infrastructure classes and
+          resources come from <code>Thread.currentThread()
+          .getContextClassLoader()</code>. Done as a result of patch
+          1273903 from Lars Koedderitzsch.
+        </li>
+        <li>
+          Added patch The LocalizedMessage already gets the Class of the
+          check that triggers the message (to output the name of the
+          check). Instead of storing just the name of this class, store
+          the class itself. With this the name can be retrieved and the
+          classloader of this class can be used to load the correct
+          resource bundle. Patch 1309516 from Ralf (rakus).
+        </li>
+        <li>
+          FallThrough check now can check last case group (property
+          checkLastCaseGroup, bug 1245942).
+        </li>
+        <li>
+          Applied patch 906531 (WhitespaceAround allows empty
+          method/ctor bodies.) Thanks to Eric Roe (module
+          WhitespaceAround, properties allowEmptyCtors and
+          allowEmptyMethods).
+        </li>
+        <li>
+          FallThrough check can be configured to ignore fall-throughs
+          if there is a relief comment, thanks to  Ralf (aka rakus)
+          for a great patch (rfe 1345691, patch 1348873)
+        </li>
+      </ul>
+
+      <p>Fixed Bugs:</p>
+
+      <ul>
+        <li>
+          Fixed encoding problems when parsing XML because was using
+          FileReader instead of FileInputStream. Bug 1320132.
+        </li>
+        <li>
+          The InnerAssignment check didn't find all instances of inner
+          assignments. Bug 1195047.
+        </li>
+        <li>
+          Fixed typo in grammar (bug 1335088)
+        </li>
+        <li>
+          Fixed ParenPad check problem which was caused by one of
+          recent grammar change (one which was about
+          (SUPER_)CTOR_CALL) (bug 1322879).
+        </li>
+        <li>
+          Fixed bug in logic JavadocStyle check uses to get
+          main-section of javadoc (bug 1291847).
+        </li>
+        <li>
+          Three more fixes for Indentation check (bugs 1251988,
+          1260079, 1336737).
+        </li>
+        <li>
+          Fixed problem in Comment.hasIntersectionWithComment() (patch
+          1339523 from Richard Schulte).
+        </li>
+        <li>
+          Now javadoc method should not contain only @see tag (but
+          could contain only {@ingeritDoc} tag) (bug 1290379, module
+          JavadocMethod)
+        </li>
+      </ul>
+
+      <p>Other improvements:</p>
+
+      <ul>
+        <li>
+          Applied patch 1292684 from Maarten Coene to fix the generated
+          HTML reports that are not correct if you include the
+          TreeWalker and the StrictDuplicateCode modules in the same
+          configuration. Patch effects checkstyle-noframes-sorted.xsl.
+        </li>
+        <li>
+          Applied patch 1340300 from David Dodini to update bcel
+          checks to be compilable with current Checkstyle's API.
+        </li>
+        <li>
+          Added antlib.xml to support new cool feature of Ant.
+        </li>
+        <li>
+          Applied patch 1386388 to enable ConfigurationLoader to load
+          from InputStream.
+        </li>
+      </ul>
+
+    </section>
+
+    <section name="Release 4.0 Beta 6">
+      <p>New features:</p>
+
+      <ul>
+        <li>One more change for grammar: now CTOR_CALL and
+        SUPER_CTOR_CALL nodes represents "this" and "super" keywords
+        from these statements.</li>
+      </ul>
+
+      <p>Fixed Bugs:</p>
+
+      <ul>
+        <li>Removed all reference to the usage checks (bug
+        1256662).</li>
+
+        <li>RequireThis now handles inner enums better (bug 1257599)</li>
+
+        <li>Fixed package name for modifiers checks in documentation
+        (bug 1275988)</li>
+
+        <li>MagicNumber allows use numeric constants in enum constant
+        definition (bug 1284682)</li>
+
+        <li>Fixed i18n problems in ArrayTypeStyle,
+        HideUtilityClassConstructor and  AvoidInlineConditionals(bug
+        1262825)</li>
+
+      </ul>
+
+      <p>Other improvements:</p>
+
+      <ul>
+        <li>TBD</li>
+      </ul>
+
+    </section>
+
+    <section name="Release 4.0 Beta 5">
+      <p>New features:</p>
+
+      <ul>
+        <li>Added useFile property of ant task (patch 916971)</li>
+
+        <li>
+          Documented new tokens which is checked by WhitespaceAround
+          (bug 1233425)
+        </li>
+
+        <li>
+          Added patch (ID 1193251) to suppress processing of checks with
+          'ignore' severity. From Lars Koedderitzsch.
+        </li>
+
+        <li>
+          Added IllegalThrowsCheck to detect illegal throw declarations.
+        </li>
+
+        <li>
+          Added ImportControlCheck to controls what packages can be
+          imported in each package. Useful for ensuring that application
+          layering is not violated.
+        </li>
+      </ul>
+
+      <p>Fixed Bugs:</p>
+
+      <ul>
+        <li>HiddenField can be configured to ignore parameters of
+        abstract methods (property ignoreAbstractMethods, bug
+        1084512)</li>
+
+        <li>Applied patch 1079192 (thanks to Dave Brosius)</li>
+
+        <li>Two more bugs fixed in type aware checks (RedundantThrows
+        and JavadocMethod checks) (bug 1168408 and 1220726)</li>
+
+        <li>Applied patch 1045127 (thanks to Paul Constantinides)</li>
+
+        <li>TypecastParenPad and ParenPad are now smarter in detecting
+        if paren is part of typecast (bug 1217798)</li>
+
+        <li>LocalFinalVariable now also checks catch parameters (bug
+        1223290)</li>
+
+        <li>Applied patch 1061458, hope this helps users who use
+        checkstyle with JRockit (thank to Ville Skytta for
+        contribution)</li>
+
+        <li>Changed way how to IndentationCheck handles fields in
+        classes and operator new (bug 1193848, 1232822)</li>
+
+        <li>Fixed problem with cache file (patch 1012389) thanks to
+        Dave Wood.</li>
+
+        <li>Fixed example for FinalLocalVariable snf the check itself
+        (bug 1241722)</li>
+
+        <li>Fixed implementation of DetailAST so getPreviousSibling()
+        works for all nodes in AST tree (bug 1244994)</li>
+
+        <li>Now type-aware check know more about generics (bug 1249707,
+        modules: RedundantThrows and JavadocMethodCheck)</li>
+
+      </ul>
+
+      <p>Other improvements:</p>
+
+      <ul>
+        <li>
+          Introduced the EMMA code coverage tool. A report is produced
+          as a result of running the unit tests.
+        </li>
+
+        <li>
+          Retired the usage checks to the contrib directory. If there is
+          interest in the future they may be promoted back into the
+          optional set of checks.
+        </li>
+      </ul>
+    </section>
+
+    <section name="Release 4.0 Beta 4">
+      <p>Fixed Bugs:</p>
+
+      <ul>
+        <li>Fix critical bug in the grammar (bug 1216844)</li>
+      </ul>
+    </section>
+
+    <section name="Release 4.0 Beta 3">
+      <p>Fixed Bugs:</p>
+
+      <ul>
+          <li>DesignForExtension check skips enums now (they are final
+          :). (bug# 1194470)</li>
+
+          <li>Indentation check now works better with enums and
+          for-each statements (bugs 1193850 and 1193855)</li>
+
+          <li>Corrected calculation of Cyclomatic complexity metric
+          (bug 1203536, module CyclomaticComplexity)</li>
+
+          <li>SuppressionCommentFilter now silently does nothing if
+          there is no FileContentsHolder (bug 1183749)</li>
+
+          <li>Java Parser now understands Java 5 hex float syntax
+          (bug 1195818)</li>
+      </ul>
+
+      <p>Other improvements:</p>
+
+      <ul>
+          <li>Improved performance of reading Java files
+          (patch 1214386, contributed by Lars Koedderitzsch)</li>
+
+      </ul>
+
+      <p>Dependencies:</p>
+
+      <ul>
+          <li>Since Checkstyle now requires Java 1.4, it does not need
+          Jakarta Regexp library any more and uses java.util.regex
+          package from J2SE instead. The regular expression specifications
+          of these libraries use a slightly different syntax in some
+          corner cases, e.g. for posix character classes. We expect that
+          these differences are not relevant for the majority of checkstyle
+          users, but please check your configuration.</li>
+
+      </ul>
+
+    </section>
+
+    <section name="Release 4.0 Beta 2">
+
+      <p>Dependencies:</p>
+
+      <ul>
+          <li>Checkstyle now requires Java 1.4, running Checkstyle inside
+          a Java 1.3 VM is no longer supported.</li>
+
+      </ul>
+
+      <p>Fixed Bugs:</p>
+
+      <ul>
+          <li>The Ant task now always prints a summary line like
+          'Running Checkstyle 4.0 on 339 files' (bug 1099573).</li>
+
+          <li>Added missing documentation for the fileExtensions
+          property of the NewlineAtEndOfFile check (bug 1174751).</li>
+
+          <li>Fixed bug #1098126 in UnusedImport check.</li>
+
+          <li>Fixed bug #1185722 (DeclarationCollector.leaveToken unbalanced
+          with visitToken)</li>
+
+          <li>Fixed NPE in AbstractUsageCheck when we process an empty
+          file (bug 1165855)</li>
+
+      </ul>
+
+    </section>
+
+
+    <section name="Release 4.0 Beta 1">
+
+      <p>New features:</p>
+
+      <ul>
+
+        <li>Introduced preliminary support (beta quality) for the Java 5
+        language. Previous versions of Java are still supported so this
+        release should be a drop in replacement for the 3.5 release. The
+        reason for the beta release is to solicit feedback on the Java 5
+        support.</li>
+
+        <li>Documentation contains an alphabetically sorted
+            list of all available checks.</li>
+
+        <li>Checker.getBasedir() is public now (rfe 1023004)</li>
+
+        <li>JavadocMethod check now can be configured to skip missed javadoc
+        (rfe 1060634)</li>
+
+        <li>Some clarifications on  scope property of javadoc checks added
+        (rfe 1009201)</li>
+
+        <li>UnusedPrivateMethod check now can be configured to ignore
+        serialization-related methods (readObject(), writeObject(),
+        readResolve() and writeReplace()) (rfe 1036387)</li>
+
+        <li>Added support for the property
+        <code>allowMissingPropertyJavadoc </code> on the <a
+        href="config_javadoc.html#JavadocMethod">JavadocMethod</a>
+        check.</li>
+
+      </ul>
+
+
+      <p>Resolved bugs: </p>
+
+      <ul>
+
+        <li>Fix bug with suppression filtering. (bug 1080343).</li>
+
+        <li>Improved French message translations
+        (patch 1097980 by Olivier Parent).</li>
+
+        <li>Fixed typo in SuppressionCommentFilter which caused bug 1084654</li>
+
+        <li>Fixed 1048226 (Runtime problems of Checks are logged to checkstyle
+        audit), now checkstyle will fail if it cannot load class for exception
+        from throws clause of javadoc (modules RedundantThrows and
+        JavadocMethod)</li>
+
+        <li>Fixed French translation, patch from Paul Guyot (bugs 1090381 and
+        1100946)</li>
+
+        <li>Fixed problem with exception's javadoc checks(bug 1100193, module
+        JavadocMethod)</li>
+
+        <li>Fixed two more problems in Indentation check (bug 1089128)</li>
+
+        <li>ConstantName check now exclude serialPersistentFields from the
+        check (bug 1097285)</li>
+
+        <li>One more problem with SuppressionCommentFilter fixed (bug
+        1061459)</li>
+
+        <li>format property of IllegalType check documented (bug 1047449)</li>
+
+        <li>ModifiedControlVariable check changed to work with for-each
+        correctly (1101851)</li>
+
+        <li>Annotations and enums are classes too and should be treated so by
+        ClassFanOutComplexity checks (bug 1109205)</li>
+
+        <li>Two more annotation-related problems (module Indentation, bug
+        1109214 and module UnnecessaryParentheses, bug 1109238)</li>
+
+      </ul>
+
+
+      <p>Other changes:</p>
+
+      <ul>
+
+        <li>Added new check packages and moved check implementations.
+            Users who maintain their own packagelist must adapt to these changes.</li>
+
+      </ul>
+
+    </section>
+
+    <section name="Release 3.5">
+
+      <p>New features:</p>
+      <ul>
+
+        <li>Added attributes maxErrors and maxWarnings to Ant task to allow
+        finetuning of failure behaviour (request 783538).</li>
+
+        <li>Added check that checks for a required regexp, contributed by
+        Daniel Grenner (module RequiredRegexp, request 606115, patch
+        902189).</li>
+
+        <li>Added check for the ncss metric. (module JavaNCSS, patch
+        920820)</li>
+
+        <li>Added check that checks for multiple string literals, contributed
+        by Daniel Grenner (module MultipleStringLiterals, patch 929882).</li>
+
+        <li>Added check that checks for a modified control variable in a for loop,
+        contributed by Daniel Grenner
+        (module ModifiedControlVariable, patch 927680).</li>
+
+        <li>Added example of how to configure the XML parser factory for
+        Checkstyle, and how to support XInclude processing
+        (contrib/examples/XInclude, request 905169).</li>
+
+        <li>Added example of an ant build file and stylesheet for generation
+        of an HTML error report with links to source code.
+        (contrib/examples/linkErrors2Source, discussed on <a
+        href="http://sourceforge.net/mailarchive/forum.php?thread_id=4891991&#x26;forum_id=8139">sourceforge.net:
+        checkstyle-user</a>).</li>
+
+        <li>Added filter that suppresses audit events according to source file
+        comments, contributed by Mike McMahon (module
+        SuppressionCommentFilter, requests 732196 and 931327).</li>
+
+        <li>Better information for unexpected char (request 666188).</li>
+
+        <li>Added charset property to TreeWalker and StrictDuplicateCode check
+        (addresses bug 975346).  </li>
+
+        <li>French message translations, contributed by Pierre Dittgen
+        (request 978916).</li>
+
+        <li>DataAbstractionCoupling reports coupling classes, contributed by
+        Benoit Xhenseval (request 990055).</li>
+
+        <li>FinalLocalVariable ignores parameters of interface methods and
+        abstract methods.  (request 993922 and bug 1002849).</li>
+
+        <li>Header and RegexpHeader checks allow header specification directly
+        in the checkstyle configuration file, not only in an external file
+        (request 1041590).</li>
+
+        <li>com.puppycrawl.tools.checkstyle.gui.Main accepts an optional file
+        name in the command line.  (request 1000102).</li>
+
+      </ul>
+
+      <p>Resolved bugs: </p>
+
+      <ul>
+
+        <li>False alarms from UnusedPrivateMethodCheck for anonymous inner
+        class parameter.  (bug 950548).</li>
+
+        <li>Fixed bug in handling imports in RequireThis(bug 952508)</li>
+
+        <li>JUnitTestCaseCheck erroneously mentions tearDown instead of
+        setUp. (bug 955925, patch by Paul Guyot)</li>
+
+        <li>JavadocTypeCheck does not find a tag on the first comment
+        line. (patch 959995, patch by Michael Tamm)</li>
+
+        <li>StrictDuplicateCodeCheck did not find duplicates within the same
+        file.</li>
+
+        <li>Unexpected char (bug 975346).</li>
+
+        <li>MagicNumber check overly aggressive (reported on user mailing
+        list).</li>
+
+        <li>Documentation error for naming convention checks (bug
+        987503).</li>
+
+        <li>FinalParametersCheck checks parameters of abstract methods. (bug
+        1002849).</li>
+
+        <li>Bug in ClassResolver where it was mismatching imports - example
+        would match SecurityDataException when looking for DataException. Bug
+        was visible in RedundantThrows check (no known bug).</li>
+
+        <li>Fixed HiddenFieldCheck to correctly handle static inner classes
+        (bug 1032426).</li>
+
+        <li>Fixed misspelling of variable (patch 1032618 contributed by Paul
+        Wagland).</li>
+
+        <li>Fixed ClassResolver to handle exceptions which are inner for
+        current class (bug 945149).</li>
+
+        <li>Fixed ClassResolver to handle fully-qualified inner classes (bug
+        1037667).</li>
+
+        <li>Fixed 1033166 (Indent module specifies two indent levels for one
+        line)</li>
+
+        <li>Fixed false alarms in RequireThis check (bug 952508)</li>
+
+      </ul>
+
+      <p>API changes:</p>
+      <ul>
+
+          <li>Added new class SeverityLevelCounter.</li>
+
+      </ul>
+    </section>
+
+    <section name="Release 3.4">
+
+      <p>
+        New features:
+      </p>
+
+      <ul>
+
+        <li>Added a 'version' attribute to the 'checkstyle' element in the XML
+        output document (request 853128).</li>
+
+        <li>FinalParameter can be applied to catch blocks (request
+        848820).</li>
+
+        <li>Improved German translation, contributed by Oliver Fischer (patch
+        862911).</li>
+
+        <li>Added stylesheet to translate XML output into comma separated
+        values format (contrib/checkstyle-csv.xsl, request 764153).</li>
+
+        <li>Added BooleanExpressionComplexity check from Simon Harris (request
+        750760)</li>
+
+        <li>Added ClassDataAbstractionCoupling check
+        from Simon Harris (request 750758)</li>
+
+        <li>Added ClassFanOutComplexity check from
+        Simon Harris (request 750759)</li>
+
+        <li>Added NPathComplexity check from Simon
+        Harris (request 750757)</li>
+
+        <li>Added several more log() methods to
+        AbstractViolationReporter. (request 843551)</li>
+
+        <li>Added check to ensure that default is a last
+        label in the switch statement.(module DefaultComesLast,
+        request 754486 )</li>
+
+        <li>Added check to ensure that all classes
+        define constructor. (module MissingCtor, request
+        696129)</li>
+
+        <li>Added check to warn on fall-through in case
+        with code not followed by break. (module FallThrough,
+        request 754438)</li>
+
+        <li>Added check to ensure that every variable
+        is declared in its own statement and on its own line (module
+        MultipleVariableDeclarations, requests 639233, 753858,
+        844705)</li>
+
+        <li>Added check to ensure that references to
+        non-static fields and methods should be qualified.
+        (module RequireThis, contributed by Stephen Bloch, requests
+        755550, 696295).</li>
+
+        <li>Added multiLines property to regexpCheck
+        (request 597676)</li>
+
+        <li>Added check for the padding between the
+        identifier of a method definition, constructor definition,
+        method call, or constructor invocation;
+        and the left parenthesis of the parameter list.  (module
+        MethodParamPad, request 843254)</li>
+
+        <li>Added check to forbid endline
+        comments. (module TrailingComment, request 744970)</li>
+
+        <li>Added applyTo(Public|Protected|Package|Private)
+        properties to check MemberName. (request 695935)</li>
+
+        <li>Added check to verify padding in empty for loop
+        initializers. (module EmptyForInitializerPad, part of fix for
+        bug 895072)</li>
+
+        <li>Added checkEmptyJavadoc property to JavadocStyle
+        check, contributed by Daniel Grenner (request 849056, patch 903597)
+        </li>
+
+        <li>Added format property to ReturnCount check
+        to configure ignored method names (request 904437)</li>
+
+        <li>Added attribute 'default' to configuration
+        <property> tags, improves usability for centralized
+        configuration files. This change triggered a new version of the
+        configuration DTD. Your old configuration files will still work,
+        but if you want to use the new 'default' attribute you need to
+        upgrade your configuration file to DTD version 1.2.</li>
+
+        <li>Ignore comments in GenericIllegalRegexp check,
+        contributed by Daniel Grenner (request 680988, patch 902109).</li>
+
+        <li>UnnecessaryParentheses check contributed by
+        Eric Roe (patch 911086, request 634834)</li>
+
+        <li>Added ignoreNonLocal property to UnusedParameter
+        check to check only private and static methods (request 787683)</li>
+
+        <li>Added excludeScope property to
+        Javadoc(Method|Variable|Type|Style) checks (request
+        846108)</li>
+
+      </ul>
+
+      <p> Resolved bugs: </p>
+
+      <ul>
+
+        <li>Incorrect documentation of cmdline options
+        (bug 865610).</li>
+
+        <li>FinalParameter now reports column of start of
+        parameter declaration. (bug 864900)</li>
+
+        <li>Fixed inconsistent handling of NLOW (new
+        line on wrap) option by LeftCurly check. (bug 866501)</li>
+
+        <li>JDK 1.4 classes used by usage checks.
+        (bug 876570)</li>
+
+        <li>Error in reporting UnusedLocalVariable for
+        multi-dimensional array index.
+        (bug 878608)</li>
+
+        <li>MagicNumberCheck throws NumberFormatException
+        with negative octal and hex ints and longs.</li>
+
+        <li>JavadocStyleCheck throws StringIndexOutOfBoundsException
+        when open tag character, <, is the last character on a line.</li>
+
+        <li>UnusedPrivateMethod false positive (ternary call).
+        (bug 880954)</li>
+
+        <li>Cast causes MagicNumberCheck error.
+        (bug 890706)</li>
+
+        <li>Conflict between ParenPad and
+        NoWhiteSpaceBefore when code uses empty for loop
+        initializers. (bug 895072)</li>
+
+        <li>Fixed JavadocStyleCheck to handle inline
+        javadoc tags correctly (bug 897749)</li>
+
+        <li>Updated documentation for ReturnCount check to
+        reflect that it doesn't check equals() method (bug 904443)</li>
+
+        <li>Erroneous UnusedPrivateField error
+        when the left operand is enclosed in parentheses
+        and the field is in the right operand (bug 908339)</li>
+
+        <li>ExplicitInitialization shouldn't report about
+        explicitly initialized member of interface (bug 909619)</li>
+
+        <li>DesignForExtension fires for private inner
+        classes (bug 884035).</li>
+
+        <li>Entity resolver for configuration files now handles
+        all previous versions of the configuration DTD locally, without
+        accessing the internet (bug 909987).</li>
+
+        <li>Fixed handling of imports for inner classes
+        in RedundantThrows (bug 925263)</li>
+
+      </ul>
+
+      <p>
+        Removed features:
+      </p>
+
+      <ul>
+
+        <li>Removed ignoreLines property of RegexpHeader check.  To make some
+        line optional use "^.*$" regexp for this line.</li>
+
+        <li>Fixing bug 895072 required changing the logic of
+        the NoWhiteSpaceBefore and ParenPad checks.
+        When a for loop has an empty initializer
+        (like <code>for (; i &#x3C; j; i++)</code>)
+        both checks will not check whitespace between the opening parenthesis
+        and the first semicolon any more.
+        To enforce your coding rules for such code, you need to use
+        the EmptyForInitializerPad check.</li>
+
+      </ul>
+
+      <p>
+        API changes:
+      </p>
+      <ul>
+
+        <li>Added programmatic access to token type
+        documentation (request 724871)</li>
+
+        <li>All comments are wrapped in TextBlocks
+        (request 885993).</li>
+
+      </ul>
+    </section>
+
+    <section name="Release 3.3">
+      <p>
+        Distribution:
+      </p>
+      <ul>
+
+        <li>Renamed checkstyle-version-optional.jar to
+        checkstyle-optional-version.jar to make the distribution
+        <a href="http://maven.apache.org">Maven</a> friendly.</li>
+
+      </ul>
+
+      <p>
+        New features:
+      </p>
+      <ul>
+        <li>Fixed grammar build process (request 827781).</li>
+
+        <li>Added caseSensitive property to ImportOrder check
+        (bug 842604).</li>
+
+        <li>Added classpathref property to ant task
+        (patch 835896, from Ville Skytta (scop)).</li>
+
+      </ul>
+
+      <p>
+        Resolved bugs:
+      </p>
+
+      <ul>
+        <li>Removed MutableException dependency from
+        1.4 API.(bug 842756)</li>
+
+        <li>j2ee.EntityBean check for constructor is incorrect
+        (bug 846110).</li>
+
+        <li>Fixed ArrayIndexOutOfBounds in JavaStyle
+        (bug 841942).</li>
+
+        <li>Fixed 8433887 - XHTML not handled correctly
+        in JavadocStyle.</li>
+
+        <li>Fixed ArrayTypeStyle error when type declaration
+        and variable/method name are placed on different lines
+        (bug 848750).</li>
+
+        <li>Fixed several typos in documentation (patch 848483
+        from Ville Skytta (scop)).</li>
+
+        <li>xmllogger.dtd is out-of-date
+        (bug 847974).</li>
+
+        <li>ArrayTypeStyle shouldn't check method definition
+        (bug 849450).</li>
+
+        <li>Added link to summary page in
+        checkstyle-frames.xsl (bug 852397).</li>
+
+        <li>Fixed bug #791245: checkstyle-frames.xsl
+        cannot handle multiple leafs.</li>
+
+        <li>Fixed handling of inheritDoc in JavadocMethod
+        check (bug 855839).</li>
+
+        <li>Fixed bug #853225 - Indentation gives false
+        errors.</li>
+
+        <li>Wrong documentation for FinalLocalVariable
+        (bug 860990).</li>
+
+      </ul>
+    </section>
+
+    <section name="Release 3.2">
+      <p>
+        Distribution:
+      </p>
+      <ul>
+
+        <li>Checks that are designed to be used for a
+        special class of applications (like J2EE) or that require
+        external libraries are now distributed in a separate jar
+        file. This is similar to the way the <a
+        href="http://ant.apache.org">Ant</a> distribution is
+        organized. See the <a href="optional.html">documentation of
+        optional checks</a> for details.</li>
+
+        <li>Updated Jakarta Regexp library to version 1.3.</li>
+
+      </ul>
+
+      <p>
+        New features:
+      </p>
+
+      <ul>
+
+        <li>Added ability for user to incorporate custom listeners (requests
+        738205, 738388). Example listeners perform verbose and Commons Logging
+        audits (request 737584).</li>
+
+        <li>Added JavadocStyle check to ensure they are
+        stylistically well formed. Nice patch from Chris Stillwell.</li>
+
+        <li>Added check for trailing comma in array
+        initialization (module ArrayTrailingComma, request
+        696301).</li>
+
+        <li>MagicNumberCheck now checks array initializers (request
+        745949).</li>
+
+        <li>Added check for uncommented main
+        methods (debugging leftovers). (module UncommentedMain,
+        request 732257)</li>
+
+        <li>Added check to enforce that anonymous inner classes do
+        not exceed a certain length (module AnonInnerLength,
+        request 715709, contributed by Rob Worth).</li>
+
+        <li>Added TypecastParenPadCheck to check the padding of
+        typecasts (bug 750348).</li>
+
+        <li>Added ignoreFormat property to HiddenFieldCheck (request 748830).</li>
+
+        <li>Nice patch from Matt Quail to DetailAST to replace all the
+        repeated int[] array construction with a BitSet.</li>
+
+        <li>Patch from Matt Quail to stop the ugly hack of having hard coded
+        constants in TokenTypes. The big risk was that when the grammar changed, the generated
+        constants could change (patch 757846).</li>
+
+        <li>Added excludes property to AvoidStarImport, contributed
+        by Bill Schneider (request 744955).</li>
+
+        <li>Added CyclomaticComplexityCheck from Simon Harris.</li>
+
+        <li>Added check to catch equality comparison with string literals
+        using the == operator (module StringLiteralEquality, request 754835).</li>
+
+        <li>Added check for definition of covariant equals() method
+        without overriding method equals(comp.lang.Object)
+        (module coding.CovariantEquals).</li>
+
+        <li>Added NestedTryDepthCheck and
+        NestedIfDepthCheck from Simon Harris (requests 750736 and
+        750744).</li>
+
+        <li>Added IllegalTokenCheck from Simon Harris
+        (request 750755).</li>
+
+        <li>Added allowInSwitchCase property to AvoidNestedBlocksCheck
+        to allow limiting the scope of variables to one case of a switch statement.</li>
+
+        <li>Added checks for J2EE requirements.</li>
+
+        <li>Added a check that an overriding clone() method invokes
+        super.clone().</li>
+
+        <li>Added a check that an overriding finalize() method invokes
+        super.finalize().</li>
+
+        <li>Added usage checks OneMethodPrivateFieldCheck, UnusedLocalVariableCheck,
+        UnusedParameterCheck, UnusedPrivateFieldCheck, UnusedPrivateMethodCheck.</li>
+
+        <li>Added filters for audit events (partially fulfills request 559103).
+        A SuppressionFilter denies events according to a suppressions file (request 756416).</li>
+
+        <li>Made basedir property of Checker OS agnostic
+        (request 663149).</li>
+
+        <li>Enhanced RedundantModifier to check that all private methods and all methods in a
+        final class do not contain modifier final (discussed in request 775011).</li>
+
+        <li>Added MethodLengthCheck option for counting empty and comment lines
+        (requests 589358 and 654039).</li>
+
+        <li>Added a check for illegal token text
+        (requests 740694 and 750633).</li>
+
+        <li>Added property to HiddenFieldCheck to ignore the parameter of
+        property setter methods (request 790456).</li>
+
+        <li>Added DescendantToken check (request 755021).</li>
+
+        <li>Added IllegalCatch check from Simon Harris (request 750746).</li>
+
+        <li>Added PackageDeclaration check from Simon Harris (request 750753).</li>
+
+        <li>Added JUnitTestCase check from Simon Harris (request 750761).</li>
+
+        <li>Added MutableException check from Simon Harris (request 750750).</li>
+
+        <li>Added AbstractClassName check from Simon Harris (request 750749).</li>
+
+        <li>Added ThrowsCount check from Simon Harris (request 750742).</li>
+
+        <li>Added ReturnCount check from Simon Harris (request 750745).</li>
+
+        <li>Added CyclomaticComplexity check from Simon Harris (request 750756).</li>
+
+        <li>Added ExecutableStatementCount check from Simon Harris (request 750751).</li>
+
+        <li>Added property to HiddenFieldCheck to ignore constructor parameters
+        (request 798240).</li>
+
+        <li>Added check for illegal type of variable,
+        parameters and return value of methods contributed by Simon
+        Harris (request 750739, module IllegalType)</li>
+
+        <li>Added check for correct declarations order
+        contributed by Roland Auckenthaler (module
+        DeclarationOrder)</li>
+
+        <li>Added ParameterAssignment check contributed
+        by Simon Harris (request 750748).</li>
+
+        <li>Added FinalLocalVariable check from Roland
+        Auckenthaler and Kevin Gibbs.</li>
+
+        <li>Added check for correct grouping/order of
+        imports from Bill Schneider (module ImportOrder, request
+        745548)</li>
+
+        <li>Added Indentation check from John Richardson
+        (request 493366)</li>
+
+        <li>Added check for explicit initialization class
+        and object variable to value which is default for variable's
+        type (module ExplicitInitialization, request 614387).</li>
+
+        <li>Added check to find duplicate code
+        (module StrictDuplicateCode, request 650710).</li>
+
+      </ul>
+
+      <p>
+        Resolved bugs:
+      </p>
+
+      <ul>
+
+        <li>Fixed NPE when running ArrayTypeStyle check (bug
+        744573)</li>
+
+        <li>Typo in HideUtilityClassConstructor description (bug
+        743973)</li>
+
+        <li>False MagicNumberCheck errors for interfaces (bug
+        745941)</li>
+
+        <li>Docs for severity (bug 745937)</li>
+
+        <li>EmptyBlock does not accept stmt option (bug 747400)</li>
+
+        <li>Inner class fields interpreted as local variables (bug 747530)</li>
+
+        <li>Fixed typo in documentation for PackageName
+        (bug 7480028)</li>
+
+        <li>NumberFormatException in MagicNumberCheck (bug 748913)</li>
+
+        <li>Removed broken support for checking typecasts from
+        ParenPadCheck (bug 750348)</li>
+
+        <li>Fixed grammar problems with unclosed string
+        literals and multiple-lines comments (bug 694111)</li>
+
+        <li>Fixed grammar definition for identifiers to
+        handle all Unicode symbols (bug 755744)</li>
+
+        <li>Corrected misspelling of "precede" (bug 744342)</li>
+
+        <li>EmptyForIteratorPadCheck errors when for statement
+        wraps at the iterator (bug 777471)</li>
+
+        <li>False alarms from IllegalInstantiation for
+        user defined classes with the same names as those in
+        java.lang (bug 772832)</li>
+
+        <li>NoSuchElementException in JavadocStyleCheck (bug 785514)</li>
+
+        <li>RedundantModifierCheck error for public modifier of a
+        method defined in an inner implementation (bug 784814)</li>
+
+        <li>MagicNumberCheck does not permits negative constants (bug 788106)</li>
+
+        <li>NullPointerException in Unused... checks (bug 787672)</li>
+
+        <li>NoSuchMethodError when line wrapped at dot
+        operator (bug 790209)</li>
+
+        <li>Removed finder restrictions of LocalHomeInterfaceCheck
+        and RemoteHomeInterfaceCheck (bug 791591)</li>
+
+        <li>Fixed NoSuchMethodError when line wrapped at dot operator (bugid 790209)</li>
+
+        <li>Incorrect usage checks documentation (bug 790457)</li>
+
+        <li>CyclomaticComplexityCheck not documented in docs (bug 783800)</li>
+
+        <li>Changed configuration documentation example from checkstyle_checks.xml
+        to sun_checks.xml  (see bug 750169)</li>
+
+        <li>JavadocStyleCheck doesn't accept {@inheritDoc} javadoc (bug 798405)</li>
+
+        <li>Unused local variables are not always detected (bug 798111)</li>
+
+        <li>Fixed allowThrowsTagsForSubclasses/allowMissingThrowsTag interfere (bug 803577) </li>
+
+        <li>Unused... checks don't work together (bug 805954)</li>
+
+        <li>NoWhitespaceBeforeCheck error with an interface (bug 806242)</li>
+
+        <li>NoWhitespaceBeforeCheck error for anonymous inner class (bug 806243)</li>
+
+        <li>Usage of optional checks should be documented (bug 806961)</li>
+
+        <li>Changed default format for ConstantName to
+        ^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$ to please regexp library (see bug
+        807571)</li>
+
+        <li>HiddenFieldCheck error for a local variable of a static
+        method with same name as an instance field (bug 827713)</li>
+
+        <li>Changed HideUtilityClassConstructorCheck behaviour for classes
+        that do not extend java.lang.Object directly (partial fix for bug 824754)</li>
+
+        <li>False alarms for abstract classes from FinalClass (bug 837012)</li>
+
+        <li>Added Checker.removeListener() (fix for 834367)</li>
+
+      </ul>
+
+      <p>
+        API changes (only relevant for IDE plugin authors):
+      </p>
+      <ul>
+
+        <li>AuditListener and AuditEvent have been moved
+        from package com.puppycrawl.tools.checkstyle to package
+        com.puppycrawl.tools.checkstyle.api.</li>
+
+      </ul>
+
+    </section>
+
+    <section name="Release 3.1">
+
+      <p>
+        New features:
+      </p>
+      <ul>
+        <li>Patch from David Schneider to have severity levels
+        for each check (request 597683).</li>
+
+        <li>Added check to avoid inline conditionals like
+        "b ? x : y" (module AvoidInlineConditionals, request
+        597790).</li>
+
+        <li>Added check that blocks are not introduced at
+        arbitrary places but only for if, while, etc. (module
+        AvoidNestedBlocks, request 632442).</li>
+
+        <li>Added check to enforce that utility classes
+        (classes that have only static methods) cannot be instantiated
+        (module HideUtilityClassConstructor, request 634838).</li>
+
+        <li>Added check to enforce an API design that shields
+        classes against bugs in derived classes (module
+        DesignForExtension, request 659715).</li>
+
+        <li>Added check to enforce that Interfaces do not
+        contain only constants (module InterfaceIsType, request 659717, see
+        [Bloch, Effective Java], Item 17 "Use interfaces only to define
+        types").</li>
+
+        <li>Added check to detect the double-checked locking
+        idiom (module DoubleCheckedLocking, request 709333).</li>
+
+        <li>Added check to enforce C style (char c[]) or Java
+        style (char[] c) for array type declaration (module ArrayTypeStyle,
+        request 493380).</li>
+
+        <li>Added check to enforce that method parameters are
+        final (module FinalParameters, request 528196).</li>
+
+        <li>Added module to enforce that files end
+        with a newline character, contributed by Christopher Lenz
+        (module NewLineAtEndOfFile, request 662544).</li>
+
+        <li>Many documentation improvements, contributed by
+        Peter Dobratz.</li>
+
+        <li>Patch from Simon Kitching to allow more
+        configuration control over the JavadocMethodCheck.</li>
+
+        <li>Checkstyle ant task outputs version info
+        in verbose and debug mode (request 550483).</li>
+
+        <li>Patch from Oleg Sukhodolsky to add FinalCheck to
+        check that classes are declared final if they only contain private
+        constructors (request 696290).</li>
+
+        <li>Patch from Oleg Sukhodolsky to add
+        MissingSwitchDefaultCheck to check that a switch statement has a
+        default clause (request 564199).</li>
+
+        <li>Patch from Oleg Sukhodolsky to fix TranslationCheck
+        Test bug. (bug 720925).</li>
+
+        <li>Patch from Oleg Sukhodolsky to fix documentation.
+        (bug 727896).</li>
+
+        <li>Added check to find empty statements (module
+        EmptyStatement, request 724573).</li>
+
+        <li>Added check to find magic numbers (module
+        MagicNumber, request 564206).</li>
+
+        <li>One more option for JavadocMethodCheck
+        (allowThrowsTagsForSubclasses, request 540383)</li>
+
+        <li>Added sourceName property to AuditEvent and
+        LocalizedMessage; and "source" attribute to
+        "error" element of XMLLogger output (request 686336).</li>
+
+        <li>Added line and column numbers to configuration
+        parse exceptions (request 714962).</li>
+
+        <li>Added check for redundant exceptions in
+        throws clause (module RedundantThrows, request 579056)</li>
+
+        <li>Added property for GenericIllegalRegexp to
+        customize reported message (module GenericIllegalRegexp,
+        property message, request 738567)</li>
+
+        <li>Moved the location of the file
+        checkstyle_packages.xml to be in the directory
+        com/puppycrawl/tools/checkstyle. This is to work around a bug in
+        NetBeans (request 739881).</li>
+
+        <li>Patch from Dale King to enhance the GUI with
+        a Reload Java File button and storage of the current directory
+        of the last opened file (request 740545).</li>
+
+        <li>Patch from Bill Schneider to add
+        GenericIllegalRegexpCheck property to perform
+        case-insensitive matches (request 740112).</li>
+
+      </ul>
+
+      <p>
+        Resolved bugs:
+      </p>
+
+      <ul>
+
+        <li>False alarms from RightCurly module for code that
+        does not have braces in if-then-else (bug 689836).</li>
+
+        <li>Grammar incorrectly defaulting unqualified floating
+        point literals to be float, when they should be double (bug
+        713716).</li>
+
+        <li>"threadsafe" was treated as a Java
+        keyword, resulting in parser errors for sources that use it as an
+        identifier (bug 710319).</li>
+
+        <li>ConfigurationLoader was not public (only relevant
+        for IDE plugin authors).</li>
+
+        <li>HTML syntax errors in documentation (bug
+        721458).</li>
+
+        <li>Error when writing a DOS file name from
+        checkstyle-frames.xsl (bug 713845).</li>
+
+        <li>Files were not being closed by
+        Utils.getLines().</li>
+
+        <li>Missing documentation for the EmptyForIterator
+        check (bug 740038).</li>
+
+      </ul>
+
+      <p>
+        Development Team:
+      </p>
+      <ul>
+        <li>Oleg Sukhodolsky has joined the team.</li>
+      </ul>
+
+    </section>
+
+    <section name="Release 3.0">
+
+      <p>
+        New features:
+      </p>
+
+      <ul>
+        <li>Completely new architecture based around pluggable modules. This means that users can now write their own checks without changing the source code of checkstyle itself (request 578712).</li>
+        <li>Users can specify the Java token types for which a check must be performed. For example users can now control that there should be whitespace after 'synchronized' but not after 'if' (request 536385).</li>
+        <li>Detect classes that override 'equals()' but not 'hashCode()' (request 554373).</li>
+        <li>Detect inner assignments, e.g. 'this.add(label = new JLabel("yes, I'm a C hacker"));' (request 521325).</li>
+        <li>Detect matches of generic regular expressions (requests 595254, 621247, 630536).</li>
+        <li>Find empty blocks (not only empty catch blocks, request 609523).</li>
+        <li>Check spaces at empty for iterators (requests 565666, 583725).</li>
+        <li>Detect missing property file keys in internationalized applications (request 634966).</li>
+        <li>Check content of @author and @version tag against a regular expression.</li>
+        <li>Detect hiding of fields by parameters or local variables with the same name (request 471897).</li>
+        <li>Detect obsolete final modifier in interfaces (request 651121).</li>
+        <li>Detect whitespace before ';' (request 521323).</li>
+        <li>Added DTD for XML output (request 622157).</li>
+        <li>Added an XSL stylesheet to convert XML output to plain text, contributed by Jon Scott Stevens.</li>
+        <li>Added a Portuguese localization, contributed by Pedro Morais.</li>
+        <li>Added a Finnish localization, contributed by Ville Skyttä.</li>
+        <li>Added a French localization, contributed by Pierre Dittgen.</li>
+      </ul>
+
+      <p>
+        Resolved bugs:
+      </p>
+      <ul>
+        <li>Fully-qualified @throws claimed unused (bug 658805).</li>
+        <li>Expected @return tag when one is there (bug 579190).</li>
+        <li>Package name reported incorrectly (bug 622290).</li>
+        <li>Empty header filename silently ignored (bug 629139).</li>
+        <li>Array instantiation incorrectly flagged (bug 626875).</li>
+        <li>Tests fail with non-English locale (bug 594469).</li>
+        <li>Cachefile streams were not closed (bug 665016).</li>
+        <li>Ant Task: NullPointerException when type was not specified in formatter (bug 670321).</li>
+      </ul>
+
+      <p>
+        Removed features:
+      </p>
+      <ul>
+        <li>Removed support for Japanese localization until we find a new maintainer.</li>
+      </ul>
+
+      <p>
+        API changes (only relevant for IDE plugin authors):
+      </p>
+      <ul>
+        <li>Configuration is not based on Properties any more. Instead a Configuration interface is used, IDE plugins can define their own way of creating Configurations or they can reuse the provided ConfigurationLoader to read checkstyle's standard XML config files.</li>
+      </ul>
+
+      <p>
+        Development Team:
+      </p>
+      <ul>
+        <li>Rick Giles has joined the team.</li>
+      </ul>
+    </section>
+
+    <section name="Release 2.4">
+      <p>
+        New features:
+      </p>
+      <ul>
+        <li>Major refactoring on the way Checkstyle is configured. It is now completely based around properties. Big thanks to Vincent Massol for the suggestion on how to refactor the ANT task (bug 605141).</li>
+        <li>Check the package name against a pattern (request 597787). Patch provided by Simon Langford.</li>
+        <li>Detect the number of parameters in a declaration exceeding a specified amount (request 582144).</li>
+        <li>Inspired by patch 580410 from Shinya Ohnuma, now the error messages are localised.</li>
+        <li>Support checking to determine if an unused <code>@throws</code> exception is a subclass of <code>java.lang.Error</code> (request 583719).</li>
+        <li>Incorporate patch 555878 from Rick Giles to allow pattern for local final variables to be specified.</li>
+        <li>Incorporate patch 566855 from Rob Worth to optionally check that parenthesis are padded with spaces.</li>
+        <li>Incorporate patch 590931 from Vijay Aravamudhan to improve documentation of the build.xml file.</li>
+        <li>Incorporate patch from Vijay Aravamudhan to enforce requiring @version tag (request 543964).</li>
+        <li>Incorporate patch 607481 from Ville Skyttä to enforce wrap on operator at EOL.</li>
+      </ul>
+
+      <p>
+        Resolved bugs:
+      </p>
+      <ul>
+        <li>Incorporate a patch from Ronald Hastings (Boeing) to correctly handle C++ style comments being between Javadoc comments and declarations.</li>
+      </ul>
+
+      <p>
+        API changes (only relevant for IDE plugin authors):
+      </p>
+      <ul>
+        <li>Many changes to the Configuration object.</li>
+      </ul>
+    </section>
+
+    <section name="Release 2.3">
+      <p>
+        New features:
+      </p>
+      <ul>
+        <li>Support checking to determine if an unused <code>@throws</code> exception is a subclass of <code>java.lang.RuntimeException</code> (request 540382).</li>
+        <li>Detect instantiations of classes that should not be instantiated (e.g. java.lang.Boolean) (request 550205).</li>
+        <li>Added ability to specify the base directory for reporting file names (request 571161).</li>
+        <li>Check for line wrapping on operators (request 553160).</li>
+        <li>Detect empty <code>try</code> blocks.</li>
+        <li>Detect empty <code>catch</code> blocks (request 516255).</li>
+        <li>Detect empty <code>finally</code> blocks.</li>
+        <li>Detect to-do comments (request 504275).</li>
+        <li>Detect use of lowercase l ("ell") in long integer literals.</li>
+        <li>Include column number in the XML output (request 555262).</li>
+        <li>Added ability to specify a properties file on the command line (request 557544).</li>
+        <li>Check for whitespace around "{" and "}" (request 557544).</li>
+        <li>Fix Javadoc errors under JDK 1.4 (request 568553).</li>
+        <li>Detect redundant <code>abstract</code> modifier in interfaces (request 573485).</li>
+        <li>Support running Checkstyle using the <code>-jar</code> option.</li>
+      </ul>
+
+      <p>
+        Resolved bugs:
+      </p>
+      <ul>
+        <li>Better error reporting for missing properties files (bug 576165).</li>
+        <li>Ant task now logs style violations as errors (bug 561616).</li>
+      </ul>
+
+      <p>
+        API changes (only relevant for IDE plugin authors):
+      </p>
+      <ul>
+        <li>The get/setOutputStream methods have been removed from the AuditListener interface. The XMLLogger and DefaultLogger implementations now expect OutputStreams to be provided as a constructor argument.</li>
+        <li>The DefaultLogger now differentiates between info messages ("started checking file ...", etc.)  and error messages (style errors found by checkstyle).</li>
+      </ul>
+    </section>
+
+    <section name="Release 2.2">
+      <p>
+        Resolved bugs:
+      </p>
+      <ul>
+        <li>The cache was not invalidated upon parameter change (Bug 522282).</li>
+        <li>Tabs were not counted correctly in line length checks (Bug 524671).</li>
+        <li>Problem when a Checker could not be created (Bug 528358).</li>
+        <li>The documentation of the command line property names did not list the property checkstyle.allow.tabs (Bug 529975).</li>
+        <li>The default regular expression for constant names allowed consecutive '_' characters to occur (Bug 540358).</li>
+        <li>Checkstyle reported unused @throws tag for multiple declarations of the same Exception. According to the <a href="http://developer.java.sun.com/developer/bugParade/bugs/4525364.html">Java BugParade</a> this is incorrect, multiple @throws tags for the same exception are OK (Bug 540384).</li>
+      </ul>
+
+      <p>
+        New features:
+      </p>
+      <ul>
+        <!--(Feature request 498879)-->
+        <li>added check for whitespace around '()'</li>
+        <!--(Feature request 500122)-->
+        <li>added support for JDK 1.4 assert statements</li>
+        <!--(Feature request 515787)-->
+        <li>added column number to error messages for better Emacs integration</li>
+        <!--(Feature request 524650)-->
+        <li>added possibility to disable line-length checking by means of regular expressions</li>
+        <!--(Feature request 531229)-->
+        <li>added possibility to disallow import of package hierarchies, e.g. sun.*</li>
+        <!--(Feature request 534038)-->
+        <li>added failureProperty to ANT task</li>
+        <!--(Feature request 537107)-->
+        <li>added check for 'public' modifier in interface method declarations, following the recommendation in chapter 9.4 of the Java Language Specification</li>
+        <!--(Feature request 545128)-->
+        <li>added -r "dir" option to the commandline frontend, checkstyle will find all Java files contained in the specified directory</li>
+        <!--(Patch 531230 + enhancements)-->
+        <li>incorporated patch from Warner Onstine to configure the ANT task by means of a property file</li>
+        <li>added 'contrib' directory, contains XSL stylesheets for formatting checkstyle's XML output (contributions by Ingmar Stein, Stephane Bailliez, Scott McCrory and Gray Herter)</li>
+      </ul>
+    </section>
+
+    <section name="Release 2.1">
+      <p>
+        New features:
+      </p>
+      <ul>
+        <li>added check for package.html</li>
+        <li>added flag allowPackage which acts similar as allowProtected</li>
+        <li>added support for ignoring multiple lines in the file header</li>
+        <li>added support for specifying the file header by means of regular expressions</li>
+        <li>added whitespace checks around '.', e.g. System . out . println()</li>
+        <li>added check for names of methods and local variables</li>
+        <li>check the order of modifiers (public, static, etc.) against the recommendation in the Java Language specification</li>
+        <li>added checks for curly braces placement</li>
+        <li>incorporated patch from Andrew Lang for more robust Javadoc parsing</li>
+      </ul>
+    </section>
+
+    <section name="Release 2.0">
+      <p>
+        Changes:
+      </p>
+      <ul>
+        <li>Now released under the GNU Lesser General Public License (LGPL).</li>
+        <li>Fix bug #508010, documentation and code are inconsistent.</li>
+        <li>Changes to make it build "out of the box".</li>
+      </ul>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/running.xml b/src/xdocs/running.xml
new file mode 100644
index 0000000..9018886
--- /dev/null
+++ b/src/xdocs/running.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Running</title>
+    <author>Oliver Burn</author>
+  </properties>
+
+  <body>
+    <section name="Running">
+      <p>
+        This section documents the out-of-box supported methods for
+        running Checkstyle.
+      </p>
+
+      <ul>
+        <li>An <a href="anttask.html">Ant task</a>.</li>
+        <li>A <a href="cmdline.html">Command Line</a> tool.</li>
+      </ul>
+
+      <p>
+        Note that there are <a href="index.html#Related_Tools">loads of
+        plug-ins</a> for all the IDE's out there.
+      </p>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/style_configs.xml b/src/xdocs/style_configs.xml
new file mode 100644
index 0000000..a605c98
--- /dev/null
+++ b/src/xdocs/style_configs.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Style Configurations</title>
+    <author>Checkstyle Development Team</author>
+  </properties>
+
+  <body>
+    <section name="Style Configurations">
+      <p>
+        This section contains tables to display coverage Java styles by Checkstyle.
+      </p>
+    </section>
+  </body>
+</document>
+
+
+
+
+
diff --git a/src/xdocs/sun_style.xml b/src/xdocs/sun_style.xml
new file mode 100644
index 0000000..ff0f94c
--- /dev/null
+++ b/src/xdocs/sun_style.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+   <properties>
+      <title>Sun's Style</title>
+      <author>Checkstyle Development Team</author>
+   </properties>
+
+   <body>
+      <section name="Sun Style Checkstyle Coverage ">
+         <subsection name="Description">
+            <p>
+               Will be provided later
+            </p>
+         </subsection>
+         <subsection name="Coverage table">
+            <table>
+               <thead>
+                  <tr>
+                     <th>Sun Style Rule</th>
+                     <th>Checkstyle Check</th>
+                     <th>Applied to config</th>
+                  </tr>
+               </thead>
+               <tbody>
+                  <tr>
+                     <td> --  </td>
+                     <td> --  </td>
+                     <td> --  </td>
+                  </tr>
+               </tbody>
+            </table>
+         </subsection>
+      </section>
+   </body>
+</document>
diff --git a/src/xdocs/writingchecks.xml.vm b/src/xdocs/writingchecks.xml.vm
new file mode 100644
index 0000000..cea516e
--- /dev/null
+++ b/src/xdocs/writingchecks.xml.vm
@@ -0,0 +1,560 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Writing Checks</title>
+    <author>Lars K�hne</author>
+  </properties>
+
+  <body>
+
+    <section name="Overview">
+
+      <p>
+        OK, so you have finally decided to write your own Check.  Welcome
+        aboard, this is really a fun thing to do.  There are actually two
+        kinds of Checks, so before you can start, you have to find out
+        which kind of Check you want to implement.
+      </p>
+
+      <p>
+        The functionality of Checkstyle is implemented in modules that can
+        be plugged into Checkstyle. Modules can be containers for other
+        modules, i.e. they form a tree structure. The toplevel modules
+        that are known directly to the Checkstyle kernel (which is also a
+        module and forms the root of the tree) implement the <a
+        href="apidocs/com/puppycrawl/tools/checkstyle/api/FileSetCheck.html">FileSetCheck</a>
+        interface. These are pretty simple to grasp: they take a set of
+        input files and fire error messages.
+      </p>
+
+      <p>
+        Checkstyle provides a few FileSetCheck implementations by default
+        and one of them happens to be the <a
+        href="apidocs/com/puppycrawl/tools/checkstyle/TreeWalker.html">TreeWalker</a>. A
+        TreeWalker supports submodules that are derived from the <a
+        href="apidocs/com/puppycrawl/tools/checkstyle/api/Check.html">Check</a>
+        class. The TreeWalker operates by separately transforming each of
+        the Java input files into an abstract syntax tree and then handing
+        the result over to each of the Check submodules which in turn have
+        a look at a certain aspect of the tree.
+      </p>
+
+    </section>
+
+    <section name="Writing Checks">
+
+      <p>
+        Most of the functionality of Checkstyle is implemented as
+        Checks. If you know how to write your own Checks, you can extend
+        Checkstyle according to your needs without having to wait for the
+        Checkstyle development team. You are about to become a Checkstyle
+        Expert.
+      </p>
+
+      <p>
+        Suppose you have a convention that the number of methods in a
+        class should not exceed a certain limit, say 30. This rule makes
+        sense, a class should only do one thing and do it well. With a
+        zillion methods chances are that the class does more than one
+        thing. The only problem you have is that your convention is not
+        checked by Checkstyle, so you'll have to write your own Check
+        and plug it into the Checkstyle framework.
+      </p>
+
+      <p> This chapter is organized as a tour that takes you
+      through the process step by step and explains both the theoretical
+      foundations and the <a
+      href="apidocs/com/puppycrawl/tools/checkstyle/api/package-summary.html">Checkstyle
+      API</a> along the way.  </p>
+
+    </section>
+
+    <section name="Java Grammar">
+
+      <p>
+        Every Java Program is structured into files, and each of these
+        files has a certain structure. For example, if there is a
+        package statement then it is the first line of the file that is
+        not comment or whitespace. After the package statement comes a
+        list of import statements, which is followed by a class or
+        interface definition, and so on.
+      </p>
+      <p>
+        If you have ever read an introductory level Java book you probably
+        knew all of the above. And if you have studied computer science,
+        you probably also know that the rules that specify the Java language
+        can be formally specified using a grammar (statement is simplified
+        for didactic purposes).
+      </p>
+      <p>
+        Tools exist which read a grammar definition and produce a parser
+        for the language that is specified in the grammar. In other
+        words, the output of the tool is a program that can transform a
+        stream of characters (a Java file) into a tree representation
+        that reflects the structure of the file. Checkstyle uses the
+        parser generator <a href="http://www.antlr.org">ANTLR</a> but
+        that is an implementation detail you do not need to worry about
+        when writing Checks. Several other parser generators exist and
+        they all work well.
+      </p>
+
+    </section>
+
+    <section name="The Checkstyle SDK Gui">
+
+      <p>
+        Still with us? Great, you have mastered the basic theory so here
+        is your reward - a GUI that displays the structure of a Java source file. To run it type
+      </p>
+      <source>
+java -classpath checkstyle-${projectVersion}-all.jar \
+     com.puppycrawl.tools.checkstyle.gui.Main
+      </source>
+
+      <p>
+        on the command line. Click the button at the bottom of the frame
+        and select a syntactically correct Java source file. The frame
+        will be populated with a tree that corresponds to the structure
+        of the Java source code.
+      </p>
+
+      <p>
+        <img alt="screenshot" src="images/gui_screenshot.png"/>
+      </p>
+
+      <p> In the leftmost column you can open and close branches
+      of the tree, the remaining columns display information about each node
+      in the tree.  The second column displays a token type for each node. As
+      you navigate from the root of the tree to one of the leafs, you'll
+      notice that the token type denotes smaller and smaller units of your
+      source file, i.e. close to the root you might see the token type <a
+      href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">CLASS_DEF</a>
+      (a node that represents a class definition) while you will see token
+      types like IDENT (an identifier) near the leaves of the tree.  </p>
+
+      <p>
+        We'll get back to the details in the other columns later, they
+        are important for implementing Checks but not for understanding
+        the basic concepts. For now it is sufficient to know that the
+        gui is a tool that lets you look at the structure of a Java file, i.e. you can see the Java grammar 'in action'.
+      </p>
+
+    </section>
+
+    <section name="Understanding the visitor pattern">
+
+      <p>
+        Ready for a bit more theory? The last bit
+        that is missing before you can start writing Checks is understanding
+        the Visitor pattern.
+      </p>
+
+      <p>
+        When working with ASTs, a simple approach to define check operations
+        on them would be to add a <code>check()</code> method to the Class that defines
+        the AST nodes. For example, our AST type could have a method
+        <code>checkNumberOfMethods()</code>. Such an approach would suffer from a few
+        serious drawbacks. Most importantly, it does not provide an extensible
+        design, i.e. the Checks have to be known at compile time; there is no
+        way to write plugins.
+      </p>
+
+      <p> Hence Checkstyle's AST classes do not have any
+      methods that implement checking functionality. Instead,
+      Checkstyle's <a
+      href="apidocs/com/puppycrawl/tools/checkstyle/TreeWalker.html">TreeWalker</a>
+      takes a set of objects that conform to a <a
+      href="apidocs/com/puppycrawl/tools/checkstyle/api/Check.html">Check</a>
+      interface. OK, you're right - actually it's not an interface
+      but an abstract class to provide some helper methods. A Check provides
+      methods that take an AST as an argument and perform the checking process
+      for that AST, most prominently <a
+      href="apidocs/com/puppycrawl/tools/checkstyle/api/Check.html#visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST)"><code>visitToken()</code></a>.  </p>
+
+      <p> It is important to understand that the individual
+      Checks do no drive the AST traversal. Instead, the TreeWalker initiates
+      a recursive descend from the root of the AST to the leaf nodes and calls
+      the Check methods. The traversal is done using a <a
+      href="http://mathworld.wolfram.com/Depth-FirstTraversal.html">depth-first</a>
+      algorithm.  </p>
+
+      <p> Before any visitor method is called, the TreeWalker
+      will call <a
+      href="apidocs/com/puppycrawl/tools/checkstyle/api/Check.html#beginTree(com.puppycrawl.tools.checkstyle.api.DetailAST)"><code>beginTree()</code></a> to give the Check a chance to do
+      some initialization. Then, when performing the recursive descend from
+      the root to the leaf nodes, the <code>visitToken()</code>
+      method is called. Unlike the basic examples in the pattern book, there
+      is a <code>visitToken()</code> counterpart called <a
+      href="apidocs/com/puppycrawl/tools/checkstyle/api/Check.html#leaveToken(com.puppycrawl.tools.checkstyle.api.DetailAST)"><code>leaveToken()</code></a>. The TreeWalker will call that
+      method to signal that the subtree below the node has been processed and
+      the TreeWalker is backtracking from the node. After the root node has
+      been left, the TreeWalker will call <a
+      href="apidocs/com/puppycrawl/tools/checkstyle/api/Check.html#finishTree(com.puppycrawl.tools.checkstyle.api.DetailAST)"><code>finishTree()</code></a>.  </p>
+
+      <p>
+        If you'd like to learn more about the Visitor pattern you should
+        grab a copy of the Gof
+        <a href="http://c2.com/cgi/wiki?DesignPatternsBook">Design
+        Patterns</a> book.
+      </p>
+
+    </section>
+
+    <section name="Visitor in action">
+
+      <p>
+        Let's get back to our example and start writing code - that's why
+        you came here, right?
+        When you fire up the Checkstyle GUI and look at a few source
+        files you'll figure out pretty quickly that you are mainly
+        interested in the number of tree nodes of type METHOD_DEF. The
+        number of such tokens should be counted separately for each
+        CLASS_DEF / INTERFACE_DEF.
+      </p>
+
+      <p>
+        Hence we need to register the Check for the token types
+        CLASS_DEF and INTERFACE_DEF. The TreeWalker will only call
+        visitToken for these token types. Because the requirements of
+        our tasks are so simple, there is no need to implement the other
+        fancy methods, like <code>finishTree()</code>, etc., so here is our first
+        shot at our Check implementation:
+      </p>
+
+      <source>
+package com.mycompany.checks;
+import com.puppycrawl.tools.checkstyle.api.*;
+
+public class MethodLimitCheck extends Check
+{
+    private static final int DEFAULT_MAX = 30;
+    private int max = DEFAULT_MAX;
+
+    @Override
+    public int[] getDefaultTokens()
+    {
+        return new int[]{TokenTypes.CLASS_DEF, TokenTypes.INTERFACE_DEF};
+    }
+
+    @Override
+    public void visitToken(DetailAST ast)
+    {
+        // find the OBJBLOCK node below the CLASS_DEF/INTERFACE_DEF
+        DetailAST objBlock = ast.findFirstToken(TokenTypes.OBJBLOCK);
+        // count the number of direct children of the OBJBLOCK
+        // that are METHOD_DEFS
+        int methodDefs = objBlock.getChildCount(TokenTypes.METHOD_DEF);
+        // report error if limit is reached
+        if (methodDefs > this.max) {
+            log(ast.getLineNo(),
+                "too many methods, only " + this.max + " are allowed");
+        }
+   }
+}
+      </source>
+
+    </section>
+
+    <section name="Navigating the AST">
+
+      <p>
+        In the example above you already saw that the DetailsAST class
+        provides utility methods to extract information from the tree,
+        like <code>getChildCount()</code>. By now you have
+        probably consulted the API documentation and found that
+        DetailsAST additionally provides methods for navigating around
+        in the syntax tree, like finding the next sibling of a node, the
+        children of a node, the parent of a node, etc.
+      </p>
+
+      <p>
+        These methods provide great power for developing complex
+        Checks. Most of the Checks that Checkstyle provides by default
+        use these methods to analyze the environment of the ASTs that
+        are visited by the TreeWalker.  Don't abuse that feature for
+        exploring the whole tree, though. Let the TreeWalker drive the
+        tree traversal and limit the visitor to the neighbours of a
+        single AST.
+      </p>
+
+    </section>
+
+    <section name="Defining Check Properties">
+
+      <p>
+
+        OK Mr. Checkstyle, that's all very nice but in my company we
+        have several projects, and each has another number of allowed
+        methods. I need to control my Check through properties, so where
+        is the API to do that?
+      </p>
+
+      <p>
+        Well, the short answer is, there is no API. It's magic. Really!
+      </p>
+
+      <p>
+        If you need to make something configurable, just add a setter method
+        to the Check:
+      </p>
+
+      <source>
+public class MethodLimitCheck extends Check
+{
+    // code from above omitted for brevity
+    public void setMax(int limit)
+    {
+        max = limit;
+    }
+}
+      </source>
+
+      <p>
+        With this code added, you can set the property <code>max</code> for the MethodLimitCheck module in the
+        configuration file. It doesn't get any simpler than that. The secret is
+        that Checkstyle uses JavaBean introspection to set the JavaBean
+        properties. That works for all primitive types like boolean,
+        int, long, etc., plus Strings, plus arrays of these types.
+      </p>
+
+    </section>
+
+    <section name="Logging errors">
+
+      <p>
+        Detecting errors is one thing, presenting them to the user is
+        another. To do that, the Check base class provides several log
+        methods, the simplest of them being <code>Check.log(String)</code>. In your
+        Check you can simply use a verbatim error string like in <code>log("Too many methods, only " + mMax +
+        " are allowed");</code> as the argument. That will
+        work, but it's not the best possible solution if your Check is
+        intended for a wider audience.
+      </p>
+
+      <p>
+        If you are not living in a country where people speak English,
+        you may have noticed that Checkstyle writes internationalized
+        error messages, for example if you live in Germany the error
+        messages are German. The individual Checks don't have to do
+        anything fancy to achieve this, it's actually quite easy and the
+        Checkstyle framework does most of the work.
+      </p>
+
+      <p>
+        To support internationalized error messages, you need to create
+        a messages.properties file alongside your Check class, i.e. the
+        Java file and the properties files should be in the same
+        directory.  Add a symbolic error code and an English
+        representation to the messages.properties. The file should
+        contain the following line: <code>too.many.methods=Too many methods, only {0} are
+        allowed</code>.  Then replace the verbatim error message with
+        the symbolic representation and use one of the log helper
+        methods to provide the dynamic part of the message (mMax in this
+        case): <code>log("too.many.methods",
+        mMax);</code>. Please consult the documentation of Java's <a
+        href="http://java.sun.com/j2se/1.4.1/docs/api/java/text/MessageFormat.html">MessageFormat</a>
+        to learn about the syntax of format strings (especially about
+        those funny numbers in the translated text).
+      </p>
+
+      <p>
+        Supporting a new language is very easy now, simply create a new
+        messages file for the language, e.g. messages_fr.properties to
+        provide French error messages. The correct file will be chosen
+        automatically, based on the language settings of the user's
+        operating system.
+      </p>
+
+    </section>
+
+    <section name="Integrate your Check">
+
+      <p>
+        The great final moment has arrived, you are about to run your
+        Check. To integrate your Check, add a new subentry under the
+        TreeWalker module of your configuration file. Use the full
+        classname of your Check class as the name of the module.
+        Your configuration file should look something like this:
+      </p>
+
+      <source>
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+<module name="Checker">
+  <module name="TreeWalker">
+          <!-- your standard Checks that come with Checkstyle -->
+    <module name="UpperEll"/>
+    <module name="MethodLength"/>
+          <!-- your Check goes here -->
+    <module name="com.mycompany.checks.MethodLimitCheck">
+      <property name="max" value="45"/>
+    </module>
+  </module>
+</module>
+      </source>
+
+      <p>
+        To run the new Check on the command line compile your Check,
+        create a jar that contains the classes and property files,
+        e.g. <code>mycompanychecks.jar</code>. Then run
+        (with the path separator adjusted to your platform):
+      </p>
+
+      <source>
+java -classpath mycompanychecks.jar:checkstyle-${projectVersion}-all.jar \
+     com.puppycrawl.tools.checkstyle.Main \
+     -c config.xml -r .
+      </source>
+
+      <p>
+        Did you see all those errors about "too many methods"
+        flying over your screen? Congratulations. You can now consider
+        yourself a Checkstyle expert. Go to your fridge. Have a beer.
+      </p>
+
+      <p>
+        Please consult the <a href="config.html#Packages">Checkstyle
+        configuration manual</a> to learn how to integrate your Checks
+        into the package configuration so that you can use <code>MethodLimit</code> instead of the full class name.
+      </p>
+
+    </section>
+
+    <section name="Limitations">
+
+      <p>
+        OK, so you have written your first Check, and you have found
+        several flaws in many of your programs. You now know that your
+        boss does not follow the coding conventions he wrote.  And you
+        know that you are the king of the world. To become a programming
+        god, you want to write your second Check - now wait, first you
+        should know what your limits are.
+      </p>
+
+      <p>
+        There are basically only two of them:
+      </p>
+      <ul>
+        <li>You cannot determine the type of an expression.</li>
+        <li>You cannot see the content of other files. (although you can save processed files for use later)</li>
+      </ul>
+      <p>
+        This means that you cannot implement some of the code inspection
+        features that are available in advanced IDEs like <a
+        href="http://www.intellij.com/idea/">IntelliJ IDEA</a>. For
+        example you will not be able to implement a Check that finds
+        redundant type casts or unused public methods.
+      </p>
+
+
+    </section>
+
+    <section name="Writing FileSetChecks">
+
+      <p> Writing a FileSetCheck is pretty straightforward: Just
+      inherit from <a
+      href="apidocs/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.html">AbstractFileSetCheck</a>
+      and override the abstract <a
+      href="apidocs/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.html#processFiltered(java.io.File,%20java.util.List)"><code>processFiltered(java.io.File, java.util.List)</code></a> method and you're
+      done. A very simple example could fire an error if the number of files
+      exceeds a certain limit. Here is a FileSetCheck that does just that:</p>
+
+      <source>
+package com.mycompany.checks;
+import java.io.File;
+import java.util.List;
+import com.puppycrawl.tools.checkstyle.api.*;
+
+public class LimitImplementationFiles extends AbstractFileSetCheck
+{
+    private static final int DEFAULT_MAX = 100;
+    private int fileCount;
+    private int max = DEFAULT_MAX;
+    public void setMax(int aMax)
+    {
+        this.max = aMax;
+    }
+
+    @Override
+    public void beginProcessing(String aCharset)
+    {
+        super.beginProcessing(aCharset);
+
+        //reset the file count
+        this.fileCount = 0;
+    }
+
+    @Override
+    public void processFiltered(File file, List<String> aLines)
+    {
+        this.fileCount++;
+
+        if (this.fileCount > this.max) {
+            // log the message
+            log(0, "max.files.exceeded", Integer.valueOf(this.max));
+            // you can call log() multiple times to flag multiple
+            // errors in the same file
+        }
+    }
+}
+      </source>
+
+      <p>
+        Note that the configuration via bean introspection also applies
+        here.  By implementing the <code>setMax()</code>
+        method the FileSetCheck automatically makes "max" a
+        legal configuration parameter that you can use in the Checkstyle
+        configuration file.
+      </p>
+      <p>
+        There are virtually no limits what you can do in
+        FileSetChecks. The craziest ideas we've had so far are:
+      </p>
+      <ul>
+        <li>to find global code problems like unused public methods.</li>
+        <li>to find duplicate code.</li>
+        <li>to port the TreeWalker solution to check C#
+        instead of Java.</li>
+      </ul>
+
+    </section>
+
+    <section name="Huh? I can't figure it out!">
+      <p>
+        That's probably our fault, and it means that we have to provide
+        better documentation. Please do not hesitate to ask questions on
+        the user mailing list, this will help us to improve this
+        document.  Please ask your questions as precisely as possible.
+        We will not be able to answer questions like "I want to
+        write a Check but I don't know how, can you help me?". Tell
+        us what you are trying to do (the purpose of the Check), what
+        you have understood so far, and what exactly you are getting stuck
+        on.
+      </p>
+
+    </section>
+
+    <section name="Contributing">
+
+      <p>
+        We need <em>your</em> help to keep improving Checkstyle.
+
+        Whenever you write a Check or FileSetCheck that you think is
+        generally useful, please consider
+        <a href="contributing.html">contributing</a> it to the
+        Checkstyle community and submit it for inclusion in the next
+        release of Checkstyle.
+
+      </p>
+    </section>
+
+
+  </body>
+</document>
+
diff --git a/src/xdocs/writingfilters.xml b/src/xdocs/writingfilters.xml
new file mode 100644
index 0000000..9a5f222
--- /dev/null
+++ b/src/xdocs/writingfilters.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Writing Filters</title>
+    <author>Lars K�hne</author>
+  </properties>
+
+  <body>
+    <section name="Overview">
+      <p>
+        A <code>Checker</code> has a set of <code>Filter</code>s that decide which audit events the <code>Checker</code> reports through its listeners.  Interface
+        <code>Filter</code> and class <code>FilterSet</code> are intended to support general <code>AuditEvent</code> filtering using a set of <code>Filter</code>s.
+      </p>
+
+      <p>
+        A <code>Filter</code> has <code>boolean</code> method <code>accept(AuditEvent)</code> that returns <code>true</code> if the <code>Filter</code>
+        accepts the <code>AuditEvent</code> parameter and returns
+        <code>false</code> if the <code>Filter</code> rejects it.
+      </p>
+
+      <p>
+        A <code>FilterSet</code> is a particular <code>Filter</code> that contains a set of <code>Filter</code>s. A <code>FilterSet</code>
+        accepts an <code>AuditEvent</code> if and only if all
+        <code>Filter</code>s in the set accept the <code>AuditEvent</code>.
+      </p>
+
+      <p>
+        Here is a UML diagram for interface <code>Filter</code>
+        and class <code>FilterSet</code>.
+      </p>
+
+      <img src="images/Filter.gif" alt="Filter UML diagram" />
+    </section>
+
+    <section name="Writing Filters">
+      <p>
+        The <code>Filter</code> that we demonstrate here rejects
+        audit events for files whose name matches a <a
+        href="property_types.html#regexp">regular expression</a>.  In order to
+        enable the specification of the file name pattern as a property in a
+        configuration file, the <code>Filter</code> is an <a
+        href="apidocs/com/puppycrawl/tools/checkstyle/api/AutomaticBean.html">AutomaticBean</a>
+        with mutator method <code>setFiles(String)</code> that
+        receives the file name pattern.  An <code>AutomaticBean</code> uses JavaBean introspection to set
+        JavaBean properties such as <code>files</code>.
+      </p>
+
+      <source>
+package com.mycompany.filters;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.AutomaticBean;
+import com.puppycrawl.tools.checkstyle.api.Filter;
+import com.puppycrawl.tools.checkstyle.api.Utils;
+
+public class FilesFilter
+    extends AutomaticBean
+    implements Filter
+{
+    private Pattern mFileRegexp;
+
+    public FilesFilter()
+        throws PatternSyntaxException
+    {
+        setFiles("^$");
+    }
+
+    public boolean accept(AuditEvent aEvent)
+    {
+        final String fileName = aEvent.getFileName();
+        return ((fileName == null) || !mFileRegexp.matcher(fileName).find());
+    }
+
+    public void setFiles(String aFilesPattern)
+        throws PatternSyntaxException
+    {
+        mFileRegexp = Utils.getPattern(aFilesPattern);
+    }
+}
+      </source>
+    </section>
+
+    <section name="Using Filters">
+      <p>
+        To incorporate a <code>Filter</code> in the filter set
+        for a <code>Checker</code>, include a module element for
+        the <code>Filter</code> in the <a
+        href="config.html#Filters">configuration file</a>. For example, to
+        configure a <code>Checker</code> so that it uses custom
+        filter <code>FilesFilter</code> to prevent reporting of
+        audit events for files whose name contains "Generated",
+        include the following module in the configuration file:
+      </p>
+
+      <source>
+<module name="com.mycompany.filters.FilesFilter">
+    <property name="files" value="Generated"/>
+</module>
+      </source>
+    </section>
+
+    <section name="Huh? I can't figure it out!">
+      <p>
+        That's probably our fault, and it means that we have to provide
+        better documentation. Please do not hesitate to ask questions on the
+        user mailing list, this will help us to improve this document.  Please
+        ask your questions as precisely as possible. We will not be able to
+        answer questions like "I want to write a filter but I don't
+        know how, can you help me?". Tell us what you are trying to do
+        (the purpose of the filter), what you have understood so far, and what
+        exactly you are getting stuck on.
+      </p>
+    </section>
+
+    <section name="Contributing">
+      <p>
+        We need <em>your</em> help to keep improving Checkstyle. Whenever you
+        write a filter that you think is generally useful, please consider <a
+        href="contributing.html">contributing</a> it to the Checkstyle
+        community and submit it for inclusion in the next release of
+        Checkstyle.
+      </p>
+    </section>
+  </body>
+</document>
diff --git a/src/xdocs/writinglisteners.xml.vm b/src/xdocs/writinglisteners.xml.vm
new file mode 100644
index 0000000..008352f
--- /dev/null
+++ b/src/xdocs/writinglisteners.xml.vm
@@ -0,0 +1,373 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+  <properties>
+    <title>Writing Listeners</title>
+    <author>Lars K�hne</author>
+  </properties>
+
+  <body>
+    <section name="Overview">
+      <p>
+        A Checkstyle listener monitors the progress of a <code>Checker</code> during the audit of files. The <code>Checker</code> notifies its attached listeners of
+        significant events such as the start of the audit of a file and
+        the logging of a Check error, and the listeners respond
+        appropriately.  Any number of listeners can be attached to a
+        <code> Checker</code>. An audit always adds one of
+        the distribution listeners, <a
+        href="apidocs/com/puppycrawl/tools/checkstyle/DefaultLogger.html">DefaultLogger</a>
+        or <a
+        href="apidocs/com/puppycrawl/tools/checkstyle/XMLLogger.html">XMLLogger</a>,
+        to report events. A <code>DefaultLogger</code>
+        produces simple text output for the events it receives, and a
+        <code>XMLLogger</code> produces an XML document for
+        its events.
+      </p>
+
+      <p>
+        Listeners <code>DefaultLogger</code> and <code> XMLLogger</code> are sufficient for most
+        Checkstyle users, but you may find a need for a custom
+        listener. For example, a user has requested verbose output of
+        progress information during a Checkstyle run. Another user would
+        like to filter error events. This document explains how to write
+        listeners for such tasks and how to integrate them in a Checker
+        module. It also describes two custom listeners that are inspired
+        by ANT listeners: a listener that is a wrapper for the Jakarta
+        Commons Logging API, and a listener that sends its results via
+        email.
+      </p>
+
+      <p>
+        A listener is an implementation of the <a
+        href="apidocs/com/puppycrawl/tools/checkstyle/api/AuditListener.html">AuditListener</a>
+        interface. During an audit, a <code>Checker</code>
+        informs its attached <code>AuditListeners</code> of
+        six kinds of events: audit started/ended, file started/ended,
+        and logging of an error/exception.
+      </p>
+
+      <p>
+        An audit passes an event to a listener as an <a
+        href="apidocs/com/puppycrawl/tools/checkstyle/api/AuditEvent.html">AuditEvent</a>.
+        A file-related <code>AuditEvent</code> contains the
+        name of that file. An <code>AuditEvent</code> for
+        error logging has a message, a severity level, a message source
+        such as the name of a <code>Check</code>, and file
+        line and column numbers that may be relevant to the error. The
+        notification of an exception to a <code>AuditListener</code> includes an error <code>AuditEvent</code> and the details of the
+        exception. Here is a UML diagram for classes <code>AuditListener</code> and <code>AuditEvent</code>.
+      </p>
+
+      <img src="images/AuditListener.gif" width="381" height="488"
+             alt="AuditListener UML diagram"/>
+
+    </section>
+
+    <section name="Writing Listeners">
+      <p>
+        A custom listener is an implementation of the <a
+        href="apidocs/com/puppycrawl/tools/checkstyle/api/AuditListener.html">AuditListener</a>
+        interface. If the listener has properties that can be set from a
+        configuration, the listener must extend <a
+        href="apidocs/com/puppycrawl/tools/checkstyle/api/AutomaticBean.html">AutomaticBean</a>.
+        An <code>AutomaticBean</code> uses JavaBean
+        introspection to set JavaBean properties.
+      </p>
+
+      <p>
+        The custom listener that we demonstrate here is a verbose
+        listener that simply prints each event notification to an output
+        stream, and reports the number of errors per audited file and
+        the total number of errors. The default output stream is <code>System.out</code>. In order to enable the
+        specification of output to a file through property <code>file</code>, the class extends <code>AutomaticBean</code> and defines method <code>setFile(String)</code>.
+      </p>
+
+      <source>
+package com.mycompany.listeners;
+
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+
+import com.puppycrawl.tools.checkstyle.api.AuditEvent;
+import com.puppycrawl.tools.checkstyle.api.AuditListener;
+import com.puppycrawl.tools.checkstyle.api.AutomaticBean;
+import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
+
+public class VerboseListener
+    extends AutomaticBean
+    implements AuditListener
+{
+    private PrintWriter mWriter = new PrintWriter(System.out);
+    private boolean mCloseOut = false;
+    private int mTotalErrors;
+    private int mErrors;
+
+    public void setFile(String aFileName)
+        throws FileNotFoundException
+    {
+        final OutputStream out = new FileOutputStream(aFileName);
+        mWriter = new PrintWriter(out);
+        mCloseOut = true;
+    }
+
+    public void auditStarted(AuditEvent aEvt)
+    {
+        mTotalErrors = 0;
+        mWriter.println("Audit started.");
+    }
+
+    public void auditFinished(AuditEvent aEvt)
+    {
+        mWriter.println("Audit finished. Total errors: " + mTotalErrors);
+        mWriter.flush();
+        if (mCloseOut) {
+            mWriter.close();
+        }
+    }
+
+    public void fileStarted(AuditEvent aEvt)
+    {
+        mErrors = 0;
+        mWriter.println(
+            "Started checking file '" + aEvt.getFileName() + "'.");
+    }
+
+    public void fileFinished(AuditEvent aEvt)
+    {
+        mWriter.println("Finished checking file '" + aEvt.getFileName()
+            + "'. Errors: " + mErrors);
+    }
+
+    public void addError(AuditEvent aEvt)
+    {
+        printEvent(aEvt);
+        if (SeverityLevel.ERROR.equals(aEvt.getSeverityLevel())) {
+            mErrors++;
+            mTotalErrors++;
+        }
+    }
+
+    public void addException(AuditEvent aEvt, Throwable aThrowable)
+    {
+        printEvent(aEvt);
+        aThrowable.printStackTrace(System.out);
+        mErrors++;
+        mTotalErrors++;
+    }
+
+    private void printEvent(AuditEvent aEvt)
+    {
+        mWriter.println("Logging error -"
+            + " file: '" + aEvt.getFileName() + "'"
+            + " line: " + aEvt.getLine()
+            + " column: " + aEvt.getColumn()
+            + " severity: " + aEvt.getSeverityLevel()
+            + " message: " + aEvt.getMessage()
+            + " source: " + aEvt.getSourceName());
+    }
+}
+      </source>
+
+      <p>
+        A listener that filters error events could perform the filtering
+        in methods <code> addError</code> and <code>addException</code>. As further examples of
+        listeners, <a
+        href="#CommonsLoggingListener">CommonsLoggingListener</a>
+        reports its events through the Commons Logging API, and <a
+        href="#MailLogger">MailLogger</a> e-mails the audit report of a
+        <code>DefaultLogger</code>.
+      </p>
+    </section>
+
+    <section name="Using Listeners">
+      <p>
+        To incorporate a custom listener in the set of listeners for a
+        <code>Checker</code>, include a module element for
+        the listener in the <a
+        href="config.html#AuditListeners">configuration file</a>. For
+        example, to configure a <code>Checker</code> so
+        that it uses custom listener <code>VerboseListener</code> to print audit messages to a
+        file named "audit.txt", include the following module
+        in the configuration file:
+      </p>
+
+      <source>
+<module name="com.mycompany.listeners.VerboseListener">
+    <property name="file" value="audit.txt"/>
+</module>
+      </source>
+
+      <p>
+        Here is a truncated example of audit output from a <code> VerboseListener</code>:
+      </p>
+
+      <source>
+Audit started.
+Started checking file 'CommonsLoggingListener.java'.
+Finished checking file 'CommonsLoggingListener.java'. Errors: 0
+Started checking file 'MailLogger.java'.
+Finished checking file 'MailLogger.java'. Errors: 0
+Started checking file 'VerboseListener.java'.
+Logging error - file: 'VerboseListener.java' line: 23 ...
+Finished checking file 'VerboseListener.java'. Errors: 1
+Audit finished. Total errors: 1
+      </source>
+    </section>
+
+    <section name="Examples">
+      <p>
+        This section describes two examples based on <a
+        href="http://ant.apache.org/">ANT</a> listeners. The first
+        listener, <code> CommonsLoggingListener</code>,
+        hands off events to the <a
+        href="http://commons.apache.org/logging/">Jakarata
+        Commons Logging</a> facade and the second, <code>MailLogger</code>, sends a report of an audit via
+        e-mail. The discussion of these examples and how to use them is
+        derived from material in <a
+        href="http://www.manning.com/hatcher/">"Java Development
+        with Ant"</a> by Eric Hatcher and Steve Loughran, an
+        excellent ANT book.
+      </p>
+
+      <a name="CommonsLoggingListener"/>
+      <h4>CommonsLoggingListener</h4>
+
+      <p>
+        <a
+        href="http://commons.apache.org/logging/">Jakarata
+        Commons Logging</a> provides a facade for logging tools
+        <a
+        href="http://jakarta.apache.org/log4j/docs/index.html">log4j</a>,
+        <a
+        href="http://jakarta.apache.org/avalon/logkit/index.html">Avalon
+        LogKit</a>, J2SE 1.4, and others. Checkstyle listener <code> CommonsLoggingListener</code> responds to an
+        AuditEvent by handing it off to the current Commons Logging Log.
+      </p>
+
+      <p>
+        The source code for <code>CommonsLoggingListener</code> is in distribution
+        directory <code>contrib/examples/listeners</code>.  Notice that
+        each <code>AuditListener</code> method that
+        receives an <code> AuditEvent</code> calls a method
+        for the Commons Logging log level corresponding to the
+        Checkstyle <code>SeverityLevel</code> of the <code> AuditEvent</code>.
+      </p>
+
+      <p>
+        The easiest way to use <code>CommonsLoggingListener</code> is to include <code>checkstyle-${projectVersion}-all.jar</code>
+        in the classpath because that jar file contains all the Commons
+        Logging classes.  The default Log under J2SE 1.4 is wrapper
+        class <a
+        href="http://commons.apache.org/logging/apidocs/org/apache/commons/logging/impl/Jdk14Logger.html">Jdk14Logger</a>.
+        Under earlier Java versions, the default Log is a simple wrapper
+        class, <a
+        href="http://commons.apache.org/logging/apidocs/org/apache/commons/logging/impl/SimpleLog.html">SimpleLog</a>.
+        Both default logging tools can be used directly from Commons
+        Logging; if you need to use other tools such as log4j, then you
+        must include the appropriate jar file(s) in the classpath.
+      </p>
+
+      <p>
+        Logging configuration details for Jakarta Commons Logging are in
+        the <a
+        href="http://commons.apache.org/logging/">documentation</a>.
+        As a simple example, assume that <code>log4j.jar</code> is in the classpath and the
+        following <code>log4j.properties</code> file is
+        in the current directory:
+      </p>
+
+      <source>
+# Set root logger level to INFO and its only appender to A1.
+log4j.rootLogger=INFO, A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-5p %c %x- %m%n
+      </source>
+
+      <p>
+        Running a Checkstyle audit with a <code>CommonsLoggingListener</code> yields this
+        (abbreviated) output:
+      </p>
+
+      <source>
+INFO  com.puppycrawl...Checker  - Audit started.
+INFO  com.puppycrawl...Checker  - File "CommonsLoggingListener.java" started.
+INFO  com.puppycrawl...Checker  - File "CommonsLoggingListener.java" finished.
+INFO  com.puppycrawl...Checker  - File "MailLogger.java" started.
+INFO  com.puppycrawl...Checker  - File "MailLogger.java" finished.
+INFO  com.puppycrawl...Checker  - File "VerboseListener.java" started.
+ERROR com.puppycrawl...ParenPadCheck  - Line: 23 Column: 28 ...
+INFO  com.puppycrawl...Checker  - File "VerboseListener.java" finished.
+INFO  com.puppycrawl...Checker  - Audit finished.
+      </source>
+
+      <a name="MailLogger"/>
+      <h4>MailLogger</h4>
+      <p>
+        <code>MailLogger</code> sends an audit report in an
+        email message.  The listener uses a <code>DefaultLogger</code> to prepare the text of the
+        message. The listener obtains other message parameters such as
+        <code>to</code> and <code>subject</code> from environment properties that
+        can be read from a properties file.
+      </p>
+
+      <p>
+        The source code for <code>CommonsLoggingListener</code> is in distribution
+        directory <code>contrib/examples/listeners</code>.  This
+        implementation uses the <a
+        href="http://java.sun.com/products/javamail">JavaMail API</a> as
+        the mail system, and you must include appropriate jar files in
+        the classpath.
+      </p>
+
+      <p>
+        As an example of using <code>MailLogger</code>, set
+        system property <code>-DMailLogger.properties.file=MailLogger.properties</code>,
+        so that <code>MailLogger</code> reads message
+        parameters from file <code>MailLogger.properties</code> of the current
+        directory:
+      </p>
+
+      <source>
+MailLogger.from=user at example.org
+MailLogger.failure.to=user at example.org
+MailLogger.success.to=user at example.org
+MailLogger.mailhost=localhost
+      </source>
+    </section>
+
+    <section name="Huh? I can't figure it out!">
+      <p>
+        That's probably our fault, and it means that we have to
+        provide better documentation. Please do not hesitate to ask
+        questions on the user mailing list, this will help us to improve
+        this document.  Please ask your questions as precisely as
+        possible. We will not be able to answer questions like "I
+        want to write a listener but I don't know how, can you help
+        me?". Tell us what you are trying to do (the purpose of the
+        listener), what you have understood so far, and what exactly you
+        are getting stuck on.
+      </p>
+    </section>
+
+    <section name="Contributing">
+      <p>
+        We need <em>your</em> help to keep improving Checkstyle.
+        Whenever you write a listener that you think is generally
+        useful, please consider <a
+        href="contributing.html">contributing</a> it to the Checkstyle
+        community and submit it for inclusion in the next release of
+        Checkstyle.
+      </p>
+    </section>
+  </body>
+</document>
diff --git a/sun_checks.xml b/sun_checks.xml
new file mode 100644
index 0000000..709f3ec
--- /dev/null
+++ b/sun_checks.xml
@@ -0,0 +1,177 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+          "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
+          "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+
+<!--
+
+  Checkstyle configuration that checks the sun coding conventions from:
+
+    - the Java Language Specification at
+      http://java.sun.com/docs/books/jls/second_edition/html/index.html
+
+    - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
+
+    - the Javadoc guidelines at
+      http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
+
+    - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
+
+    - some best practices
+
+  Checkstyle is very configurable. Be sure to read the documentation at
+  http://checkstyle.sf.net (or in your downloaded distribution).
+
+  Most Checks are configurable, be sure to consult the documentation.
+
+  To completely disable a check, just comment it out or delete it from the file.
+
+  Finally, it is worth reading the documentation.
+
+-->
+
+<module name="Checker">
+    <!--
+        If you set the basedir property below, then all reported file
+        names will be relative to the specified directory. See
+        http://checkstyle.sourceforge.net/5.x/config.html#Checker
+
+        <property name="basedir" value="${basedir}"/>
+    -->
+
+    <!-- Checks that a package-info.java file exists for each package.     -->
+    <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
+    <module name="JavadocPackage"/>
+
+    <!-- Checks whether files end with a new line.                        -->
+    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+    <module name="NewlineAtEndOfFile"/>
+
+    <!-- Checks that property files contain the same keys.         -->
+    <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
+    <module name="Translation"/>
+    
+    <!-- Checks for Size Violations.                    -->
+    <!-- See http://checkstyle.sf.net/config_sizes.html -->
+    <module name="FileLength"/>
+    
+    <!-- Checks for whitespace                               -->
+    <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+    <module name="FileTabCharacter"/>
+
+    <!-- Miscellaneous other checks.                   -->
+    <!-- See http://checkstyle.sf.net/config_misc.html -->
+    <module name="RegexpSingleline">
+       <property name="format" value="\s+$"/>
+       <property name="minimum" value="0"/>
+       <property name="maximum" value="0"/>
+       <property name="message" value="Line has trailing spaces."/>
+    </module>
+
+    <!-- Checks for Headers                                -->
+    <!-- See http://checkstyle.sf.net/config_header.html   -->
+    <!-- <module name="Header"> -->
+    <!--   <property name="headerFile" value="${checkstyle.header.file}"/> -->
+    <!--   <property name="fileExtensions" value="java"/> -->
+    <!-- </module> -->
+
+    <module name="TreeWalker">
+
+        <!-- Checks for Javadoc comments.                     -->
+        <!-- See http://checkstyle.sf.net/config_javadoc.html -->
+        <module name="JavadocMethod"/>
+        <module name="JavadocType"/>
+        <module name="JavadocVariable"/>
+        <module name="JavadocStyle"/>
+
+
+        <!-- Checks for Naming Conventions.                  -->
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <module name="ConstantName"/>
+        <module name="LocalFinalVariableName"/>
+        <module name="LocalVariableName"/>
+        <module name="MemberName"/>
+        <module name="MethodName"/>
+        <module name="PackageName"/>
+        <module name="ParameterName"/>
+        <module name="StaticVariableName"/>
+        <module name="TypeName"/>
+
+
+        <!-- Checks for imports                              -->
+        <!-- See http://checkstyle.sf.net/config_import.html -->
+        <module name="AvoidStarImport"/>
+        <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
+        <module name="RedundantImport"/>
+        <module name="UnusedImports"/>
+
+
+        <!-- Checks for Size Violations.                    -->
+        <!-- See http://checkstyle.sf.net/config_sizes.html -->
+        <module name="LineLength"/>
+        <module name="MethodLength"/>
+        <module name="ParameterNumber"/>
+
+
+        <!-- Checks for whitespace                               -->
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <module name="EmptyForIteratorPad"/>
+        <module name="GenericWhitespace"/>
+        <module name="MethodParamPad"/>
+        <module name="NoWhitespaceAfter"/>
+        <module name="NoWhitespaceBefore"/>
+        <module name="OperatorWrap"/>
+        <module name="ParenPad"/>
+        <module name="TypecastParenPad"/>
+        <module name="WhitespaceAfter"/>
+        <module name="WhitespaceAround"/>
+
+
+        <!-- Modifier Checks                                    -->
+        <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+        <module name="ModifierOrder"/>
+        <module name="RedundantModifier"/>
+
+
+        <!-- Checks for blocks. You know, those {}'s         -->
+        <!-- See http://checkstyle.sf.net/config_blocks.html -->
+        <module name="AvoidNestedBlocks"/>
+        <module name="EmptyBlock"/>
+        <module name="LeftCurly"/>
+        <module name="NeedBraces"/>
+        <module name="RightCurly"/>
+
+
+        <!-- Checks for common coding problems               -->
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <module name="AvoidInlineConditionals"/>
+        <module name="EmptyStatement"/>
+        <module name="EqualsHashCode"/>
+        <module name="HiddenField"/>
+        <module name="IllegalInstantiation"/>
+        <module name="InnerAssignment"/>
+        <module name="MagicNumber"/>
+        <module name="MissingSwitchDefault"/>
+        <module name="RedundantThrows"/>
+        <module name="SimplifyBooleanExpression"/>
+        <module name="SimplifyBooleanReturn"/>
+
+        <!-- Checks for class design                         -->
+        <!-- See http://checkstyle.sf.net/config_design.html -->
+        <module name="DesignForExtension"/>
+        <module name="FinalClass"/>
+        <module name="HideUtilityClassConstructor"/>
+        <module name="InterfaceIsType"/>
+        <module name="VisibilityModifier"/>
+
+
+        <!-- Miscellaneous other checks.                   -->
+        <!-- See http://checkstyle.sf.net/config_misc.html -->
+        <module name="ArrayTypeStyle"/>
+        <module name="FinalParameters"/>
+        <module name="TodoComment"/>
+        <module name="UpperEll"/>
+
+    </module>
+
+</module>
diff --git a/suppressions.xml b/suppressions.xml
new file mode 100644
index 0000000..0409f79
--- /dev/null
+++ b/suppressions.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE suppressions PUBLIC
+    "-//Puppy Crawl//DTD Suppressions 1.1//EN"
+    "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
+
+<suppressions>
+    <suppress checks="FileLength"
+              files="TokenTypes.java"
+              lines="1"/>
+    <suppress checks="MagicNumber"
+              files="UnusedPrivateMethodCheck.java"
+              lines="176"/>
+    <suppress checks="ImportControl"
+              files="NewlineAtEndOfFileCheck.java"
+              lines="27"/>
+    <suppress checks="ImportControl"
+              files="TranslationCheck.java"
+              lines="24"/>
+    <suppress checks="ImportControl"
+              files="SuppressionCommentFilter.java"
+              lines="28"/>
+    <suppress checks="ImportControl"
+              files="SuppressWarningsFilter.java"
+              lines="24"/>
+    <suppress checks="ImportControl"
+              files="SuppressWithNearbyCommentFilter.java"
+              lines="28"/>
+    <suppress id="paramNum"
+              files="LocalizedMessage.java"
+              lines="141,148,181,213"/>
+
+    <!-- Tone down the checking for test code -->
+    <suppress checks="EmptyBlock" files=".*[\\/]src[\\/]test[\\/]"/>
+    <suppress checks="ImportControl" files=".*[\\/]src[\\/]test[\\/]"/>
+    <suppress checks="Javadoc" files=".*[\\/]src[\\/]test[\\/]"/>
+    <suppress checks="MagicNumber" files=".*[\\/]src[\\/]test[\\/]"/>
+    <suppress checks="MethodCount" files="[\\/]IndentationCheckTest.java$"/>
+    <suppress checks="EqualsAvoidNull" files="[\\/]Int.*FilterTest.java$"/>
+
+    <!-- suppressions to remove over time -->
+    <suppress checks="FinalLocalVariable" files=".*[\\/]src[\\/]test[\\/]"/>
+    <suppress checks="LineLength" files=".*[\\/]src[\\/]test[\\/]"/>
+    <suppress checks="Name" files=".*[\\/]src[\\/]test[\\/]"/>    
+
+    <!--
+      Turn off all checks for Generated and Test code. Fixes issues with using
+      Eclipse plug-in.
+      -->
+    <suppress checks="." files=".*[\\/]grammars[\\/]Generated[a-zA-Z]*\.java"/>
+    <suppress checks="." files=".*[\\/]grammars[\\/]Generated[a-zA-Z]*\.java"/>
+    <suppress checks="." files=".*[\\/]checkstyle[\\/]gui[\\/]"/>
+</suppressions>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/checkstyle.git



More information about the pkg-java-commits mailing list