From e65dfc8a04b77f299b73acc6c7a58fefb3629b41 Mon Sep 17 00:00:00 2001 From: Tom Copeland Date: Mon, 24 Jun 2002 15:50:34 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@16 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd/docs/ant.html | 2 +- .../sourceforge}/pmd/FunctionalTest.java | 6 +- .../sourceforge}/pmd/NamespaceTest.java | 6 +- .../sourceforge}/pmd/ReportTest.java | 8 +- .../sourceforge}/pmd/RuleFactoryTest.java | 10 +-- .../sourceforge}/pmd/RuleViolationTest.java | 6 +- .../sourceforge}/pmd/SymbolTableTest.java | 6 +- .../sourceforge}/pmd/SymbolTest.java | 4 +- pmd/src/net/sourceforge/pmd/AbstractRule.java | 21 +++++ .../pmd/DontCreateThreadsRule.java | 20 +++++ .../sourceforge/pmd/DontCreateTimersRule.java | 20 +++++ .../sourceforge/pmd/EmptyCatchBlockRule.java | 22 +++++ .../net/sourceforge/pmd/EmptyIfStmtRule.java | 23 +++++ pmd/src/net/sourceforge/pmd/Namespace.java | 63 +++++++++++++ pmd/src/net/sourceforge/pmd/PMD.java | 65 ++++++++++++++ pmd/src/net/sourceforge/pmd/PMDTask.java | 68 ++++++++++++++ pmd/src/net/sourceforge/pmd/Report.java | 40 +++++++++ pmd/src/net/sourceforge/pmd/Rule.java | 8 ++ pmd/src/net/sourceforge/pmd/RuleFactory.java | 55 ++++++++++++ .../net/sourceforge/pmd/RuleViolation.java | 27 ++++++ pmd/src/net/sourceforge/pmd/Symbol.java | 38 ++++++++ pmd/src/net/sourceforge/pmd/SymbolTable.java | 83 +++++++++++++++++ .../net/sourceforge/pmd/SystemOutRule.java | 18 ++++ .../net/sourceforge/pmd/SystemPropsRule.java | 19 ++++ .../UnnecessaryConversionTemporaryRule.java | 58 ++++++++++++ .../pmd/UnusedLocalVariableRule.java | 80 +++++++++++++++++ .../UnusedPrivateInstanceVariableRule.java | 90 +++++++++++++++++++ .../pmd/ast/ASTAdditiveExpression.java | 3 +- .../pmd/ast/ASTAllocationExpression.java | 3 +- .../pmd/ast/ASTAndExpression.java | 3 +- .../sourceforge}/pmd/ast/ASTArgumentList.java | 3 +- .../sourceforge}/pmd/ast/ASTArguments.java | 3 +- .../pmd/ast/ASTArrayDimsAndInits.java | 3 +- .../pmd/ast/ASTArrayInitializer.java | 3 +- .../pmd/ast/ASTAssertStatement.java | 3 +- .../pmd/ast/ASTAssignmentOperator.java | 3 +- .../sourceforge}/pmd/ast/ASTBlock.java | 3 +- .../pmd/ast/ASTBlockStatement.java | 3 +- .../pmd/ast/ASTBooleanLiteral.java | 3 +- .../pmd/ast/ASTBreakStatement.java | 3 +- .../pmd/ast/ASTCastExpression.java | 3 +- .../pmd/ast/ASTCastLookahead.java | 3 +- .../sourceforge}/pmd/ast/ASTClassBody.java | 3 +- .../pmd/ast/ASTClassBodyDeclaration.java | 3 +- .../pmd/ast/ASTClassDeclaration.java | 3 +- .../pmd/ast/ASTCompilationUnit.java | 3 +- .../pmd/ast/ASTConditionalAndExpression.java | 3 +- .../pmd/ast/ASTConditionalExpression.java | 3 +- .../pmd/ast/ASTConditionalOrExpression.java | 3 +- .../pmd/ast/ASTConstructorDeclaration.java | 3 +- .../pmd/ast/ASTContinueStatement.java | 3 +- .../sourceforge}/pmd/ast/ASTDoStatement.java | 3 +- .../pmd/ast/ASTEmptyStatement.java | 3 +- .../pmd/ast/ASTEqualityExpression.java | 3 +- .../pmd/ast/ASTExclusiveOrExpression.java | 3 +- .../ast/ASTExplicitConstructorInvocation.java | 3 +- .../sourceforge}/pmd/ast/ASTExpression.java | 3 +- .../pmd/ast/ASTFieldDeclaration.java | 3 +- .../sourceforge}/pmd/ast/ASTForInit.java | 3 +- .../sourceforge}/pmd/ast/ASTForStatement.java | 3 +- .../sourceforge}/pmd/ast/ASTForUpdate.java | 3 +- .../pmd/ast/ASTFormalParameter.java | 3 +- .../pmd/ast/ASTFormalParameters.java | 3 +- .../sourceforge}/pmd/ast/ASTIfStatement.java | 3 +- .../pmd/ast/ASTImportDeclaration.java | 3 +- .../pmd/ast/ASTInclusiveOrExpression.java | 3 +- .../sourceforge}/pmd/ast/ASTInitializer.java | 3 +- .../pmd/ast/ASTInstanceOfExpression.java | 3 +- .../pmd/ast/ASTInterfaceDeclaration.java | 3 +- .../ast/ASTInterfaceMemberDeclaration.java | 3 +- .../pmd/ast/ASTLabeledStatement.java | 3 +- .../sourceforge}/pmd/ast/ASTLiteral.java | 3 +- .../pmd/ast/ASTLocalVariableDeclaration.java | 3 +- .../pmd/ast/ASTMethodDeclaration.java | 3 +- .../ast/ASTMethodDeclarationLookahead.java | 3 +- .../pmd/ast/ASTMethodDeclarator.java | 3 +- .../pmd/ast/ASTMultiplicativeExpression.java | 3 +- .../sourceforge}/pmd/ast/ASTName.java | 3 +- .../sourceforge}/pmd/ast/ASTNameList.java | 3 +- .../pmd/ast/ASTNestedClassDeclaration.java | 3 +- .../ast/ASTNestedInterfaceDeclaration.java | 3 +- .../sourceforge}/pmd/ast/ASTNullLiteral.java | 3 +- .../pmd/ast/ASTPackageDeclaration.java | 3 +- .../pmd/ast/ASTPostfixExpression.java | 3 +- .../pmd/ast/ASTPreDecrementExpression.java | 3 +- .../pmd/ast/ASTPreIncrementExpression.java | 3 +- .../pmd/ast/ASTPrimaryExpression.java | 3 +- .../pmd/ast/ASTPrimaryPrefix.java | 3 +- .../pmd/ast/ASTPrimarySuffix.java | 3 +- .../pmd/ast/ASTPrimitiveType.java | 3 +- .../pmd/ast/ASTRelationalExpression.java | 3 +- .../sourceforge}/pmd/ast/ASTResultType.java | 3 +- .../pmd/ast/ASTReturnStatement.java | 3 +- .../pmd/ast/ASTShiftExpression.java | 3 +- .../sourceforge}/pmd/ast/ASTStatement.java | 3 +- .../pmd/ast/ASTStatementExpression.java | 3 +- .../pmd/ast/ASTStatementExpressionList.java | 3 +- .../sourceforge}/pmd/ast/ASTSwitchLabel.java | 3 +- .../pmd/ast/ASTSwitchStatement.java | 3 +- .../pmd/ast/ASTSynchronizedStatement.java | 3 +- .../pmd/ast/ASTThrowStatement.java | 3 +- .../sourceforge}/pmd/ast/ASTTryStatement.java | 3 +- .../sourceforge}/pmd/ast/ASTType.java | 3 +- .../pmd/ast/ASTTypeDeclaration.java | 3 +- .../pmd/ast/ASTUnaryExpression.java | 3 +- .../ast/ASTUnaryExpressionNotPlusMinus.java | 3 +- .../ast/ASTUnmodifiedClassDeclaration.java | 3 +- .../ASTUnmodifiedInterfaceDeclaration.java | 3 +- .../pmd/ast/ASTVariableDeclarator.java | 3 +- .../pmd/ast/ASTVariableDeclaratorId.java | 3 +- .../pmd/ast/ASTVariableInitializer.java | 3 +- .../pmd/ast/ASTWhileStatement.java | 3 +- .../pmd/ast/JJTJavaParserState.java | 3 +- .../sourceforge}/pmd/ast/JavaCharStream.java | 2 +- .../sourceforge}/pmd/ast/JavaParser.java | 3 +- .../pmd/ast/JavaParserConstants.java | 2 +- .../pmd/ast/JavaParserTokenManager.java | 5 +- .../pmd/ast/JavaParserTreeConstants.java | 2 +- .../pmd/ast/JavaParserVisitor.java | 3 +- .../pmd/ast/JavaParserVisitorAdapter.java | 3 +- .../sourceforge}/pmd/ast/Node.java | 3 +- .../sourceforge}/pmd/ast/ParseException.java | 3 +- .../sourceforge}/pmd/ast/SimpleNode.java | 3 +- .../sourceforge}/pmd/ast/Test.java | 2 +- .../sourceforge}/pmd/ast/Token.java | 2 +- .../sourceforge}/pmd/ast/TokenMgrError.java | 2 +- 126 files changed, 1036 insertions(+), 123 deletions(-) rename pmd/regress/test/{com/infoether => net/sourceforge}/pmd/FunctionalTest.java (99%) rename pmd/regress/test/{com/infoether => net/sourceforge}/pmd/NamespaceTest.java (86%) rename pmd/regress/test/{com/infoether => net/sourceforge}/pmd/ReportTest.java (89%) rename pmd/regress/test/{com/infoether => net/sourceforge}/pmd/RuleFactoryTest.java (83%) rename pmd/regress/test/{com/infoether => net/sourceforge}/pmd/RuleViolationTest.java (87%) rename pmd/regress/test/{com/infoether => net/sourceforge}/pmd/SymbolTableTest.java (96%) rename pmd/regress/test/{com/infoether => net/sourceforge}/pmd/SymbolTest.java (87%) create mode 100644 pmd/src/net/sourceforge/pmd/AbstractRule.java create mode 100644 pmd/src/net/sourceforge/pmd/DontCreateThreadsRule.java create mode 100644 pmd/src/net/sourceforge/pmd/DontCreateTimersRule.java create mode 100644 pmd/src/net/sourceforge/pmd/EmptyCatchBlockRule.java create mode 100644 pmd/src/net/sourceforge/pmd/EmptyIfStmtRule.java create mode 100644 pmd/src/net/sourceforge/pmd/Namespace.java create mode 100644 pmd/src/net/sourceforge/pmd/PMD.java create mode 100644 pmd/src/net/sourceforge/pmd/PMDTask.java create mode 100644 pmd/src/net/sourceforge/pmd/Report.java create mode 100644 pmd/src/net/sourceforge/pmd/Rule.java create mode 100644 pmd/src/net/sourceforge/pmd/RuleFactory.java create mode 100644 pmd/src/net/sourceforge/pmd/RuleViolation.java create mode 100644 pmd/src/net/sourceforge/pmd/Symbol.java create mode 100644 pmd/src/net/sourceforge/pmd/SymbolTable.java create mode 100644 pmd/src/net/sourceforge/pmd/SystemOutRule.java create mode 100644 pmd/src/net/sourceforge/pmd/SystemPropsRule.java create mode 100644 pmd/src/net/sourceforge/pmd/UnnecessaryConversionTemporaryRule.java create mode 100644 pmd/src/net/sourceforge/pmd/UnusedLocalVariableRule.java create mode 100644 pmd/src/net/sourceforge/pmd/UnusedPrivateInstanceVariableRule.java rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTAdditiveExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTAllocationExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTAndExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTArgumentList.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTArguments.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTArrayDimsAndInits.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTArrayInitializer.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTAssertStatement.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTAssignmentOperator.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTBlock.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTBlockStatement.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTBooleanLiteral.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTBreakStatement.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTCastExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTCastLookahead.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTClassBody.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTClassBodyDeclaration.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTClassDeclaration.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTCompilationUnit.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTConditionalAndExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTConditionalExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTConditionalOrExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTConstructorDeclaration.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTContinueStatement.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTDoStatement.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTEmptyStatement.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTEqualityExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTExclusiveOrExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTExplicitConstructorInvocation.java (93%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTExpression.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTFieldDeclaration.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTForInit.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTForStatement.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTForUpdate.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTFormalParameter.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTFormalParameters.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTIfStatement.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTImportDeclaration.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTInclusiveOrExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTInitializer.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTInstanceOfExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTInterfaceDeclaration.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTInterfaceMemberDeclaration.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTLabeledStatement.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTLiteral.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTLocalVariableDeclaration.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTMethodDeclaration.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTMethodDeclarationLookahead.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTMethodDeclarator.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTMultiplicativeExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTName.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTNameList.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTNestedClassDeclaration.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTNestedInterfaceDeclaration.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTNullLiteral.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTPackageDeclaration.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTPostfixExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTPreDecrementExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTPreIncrementExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTPrimaryExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTPrimaryPrefix.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTPrimarySuffix.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTPrimitiveType.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTRelationalExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTResultType.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTReturnStatement.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTShiftExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTStatement.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTStatementExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTStatementExpressionList.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTSwitchLabel.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTSwitchStatement.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTSynchronizedStatement.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTThrowStatement.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTTryStatement.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTType.java (91%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTTypeDeclaration.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTUnaryExpression.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTUnaryExpressionNotPlusMinus.java (93%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTUnmodifiedClassDeclaration.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTUnmodifiedInterfaceDeclaration.java (93%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTVariableDeclarator.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTVariableDeclaratorId.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTVariableInitializer.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ASTWhileStatement.java (92%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/JJTJavaParserState.java (98%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/JavaCharStream.java (99%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/JavaParser.java (99%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/JavaParserConstants.java (99%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/JavaParserTokenManager.java (99%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/JavaParserTreeConstants.java (99%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/JavaParserVisitor.java (99%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/JavaParserVisitorAdapter.java (99%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/Node.java (97%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/ParseException.java (99%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/SimpleNode.java (98%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/Test.java (99%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/Token.java (98%) rename pmd/src/{com/infoether => net/sourceforge}/pmd/ast/TokenMgrError.java (99%) diff --git a/pmd/docs/ant.html b/pmd/docs/ant.html index f6fce666c5..4054cfb67c 100644 --- a/pmd/docs/ant.html +++ b/pmd/docs/ant.html @@ -33,7 +33,7 @@ Runs a set of PMD rules on a set of files and generates a report.

Examples

     <target name="pmd">
-        <taskdef name="pmd" classname="com.infoether.pmd.PMDTask"/>
+        <taskdef name="pmd" classname="net.sourceforge.pmd.PMDTask"/>
         <pmd reportFile="c:\foo.txt" verbose="false" rulesettype="general">
             <fileset dir="c:\j2sdk1.4.0\src\">
                 <include name="**/*.java"/>
diff --git a/pmd/regress/test/com/infoether/pmd/FunctionalTest.java b/pmd/regress/test/net/sourceforge/pmd/FunctionalTest.java
similarity index 99%
rename from pmd/regress/test/com/infoether/pmd/FunctionalTest.java
rename to pmd/regress/test/net/sourceforge/pmd/FunctionalTest.java
index 50637a3137..970f9ffd0f 100644
--- a/pmd/regress/test/com/infoether/pmd/FunctionalTest.java
+++ b/pmd/regress/test/net/sourceforge/pmd/FunctionalTest.java
@@ -3,16 +3,16 @@
  * Date: Jun 17, 2002
  * Time: 3:19:33 PM
  */
-package test.com.infoether.pmd;
+package test.net.sourceforge.pmd;
 
 import junit.framework.TestCase;
 
-import com.infoether.pmd.*;
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.util.Iterator;
 
+import net.sourceforge.pmd.*;
+
 public class FunctionalTest extends TestCase{
 
     public FunctionalTest(String name) {
diff --git a/pmd/regress/test/com/infoether/pmd/NamespaceTest.java b/pmd/regress/test/net/sourceforge/pmd/NamespaceTest.java
similarity index 86%
rename from pmd/regress/test/com/infoether/pmd/NamespaceTest.java
rename to pmd/regress/test/net/sourceforge/pmd/NamespaceTest.java
index ff671e29fb..6afe07e1a8 100644
--- a/pmd/regress/test/com/infoether/pmd/NamespaceTest.java
+++ b/pmd/regress/test/net/sourceforge/pmd/NamespaceTest.java
@@ -3,11 +3,11 @@
  * Date: Jun 21, 2002
  * Time: 2:21:44 PM
  */
-package test.com.infoether.pmd;
+package test.net.sourceforge.pmd;
 
 import junit.framework.TestCase;
-import com.infoether.pmd.Namespace;
-import com.infoether.pmd.SymbolTable;
+import net.sourceforge.pmd.Namespace;
+import net.sourceforge.pmd.SymbolTable;
 
 public class NamespaceTest extends TestCase{
     public NamespaceTest(String name) {
diff --git a/pmd/regress/test/com/infoether/pmd/ReportTest.java b/pmd/regress/test/net/sourceforge/pmd/ReportTest.java
similarity index 89%
rename from pmd/regress/test/com/infoether/pmd/ReportTest.java
rename to pmd/regress/test/net/sourceforge/pmd/ReportTest.java
index cb78695726..e4aae47d98 100644
--- a/pmd/regress/test/com/infoether/pmd/ReportTest.java
+++ b/pmd/regress/test/net/sourceforge/pmd/ReportTest.java
@@ -3,12 +3,12 @@
  * Date: Jun 14, 2002
  * Time: 1:18:30 PM
  */
-package test.com.infoether.pmd;
+package test.net.sourceforge.pmd;
 
 import junit.framework.TestCase;
-import com.infoether.pmd.Report;
-import com.infoether.pmd.RuleViolation;
-import com.infoether.pmd.Rule;
+import net.sourceforge.pmd.Report;
+import net.sourceforge.pmd.RuleViolation;
+import net.sourceforge.pmd.Rule;
 
 import java.lang.reflect.Proxy;
 import java.lang.reflect.InvocationHandler;
diff --git a/pmd/regress/test/com/infoether/pmd/RuleFactoryTest.java b/pmd/regress/test/net/sourceforge/pmd/RuleFactoryTest.java
similarity index 83%
rename from pmd/regress/test/com/infoether/pmd/RuleFactoryTest.java
rename to pmd/regress/test/net/sourceforge/pmd/RuleFactoryTest.java
index 1a93740970..495a5d2596 100644
--- a/pmd/regress/test/com/infoether/pmd/RuleFactoryTest.java
+++ b/pmd/regress/test/net/sourceforge/pmd/RuleFactoryTest.java
@@ -3,16 +3,16 @@
  * Date: Jun 20, 2002
  * Time: 8:43:20 AM
  */
-package test.com.infoether.pmd;
+package test.net.sourceforge.pmd;
 
 import junit.framework.TestCase;
 
 import java.util.List;
 
-import com.infoether.pmd.RuleFactory;
-import com.infoether.pmd.Rule;
-import com.infoether.pmd.DontCreateTimersRule;
-import com.infoether.pmd.EmptyIfStmtRule;
+import net.sourceforge.pmd.RuleFactory;
+import net.sourceforge.pmd.Rule;
+import net.sourceforge.pmd.DontCreateTimersRule;
+import net.sourceforge.pmd.EmptyIfStmtRule;
 
 public class RuleFactoryTest extends TestCase {
     public RuleFactoryTest(String name) {
diff --git a/pmd/regress/test/com/infoether/pmd/RuleViolationTest.java b/pmd/regress/test/net/sourceforge/pmd/RuleViolationTest.java
similarity index 87%
rename from pmd/regress/test/com/infoether/pmd/RuleViolationTest.java
rename to pmd/regress/test/net/sourceforge/pmd/RuleViolationTest.java
index f539491f89..70e45bcddd 100644
--- a/pmd/regress/test/com/infoether/pmd/RuleViolationTest.java
+++ b/pmd/regress/test/net/sourceforge/pmd/RuleViolationTest.java
@@ -1,9 +1,11 @@
-package test.com.infoether.pmd;
+package test.net.sourceforge.pmd;
 
 import junit.framework.*;
-import com.infoether.pmd.*;
 import java.util.*;
 
+import net.sourceforge.pmd.Rule;
+import net.sourceforge.pmd.RuleViolation;
+
 public class RuleViolationTest extends TestCase {
     public RuleViolationTest(String name) {
         super(name);
diff --git a/pmd/regress/test/com/infoether/pmd/SymbolTableTest.java b/pmd/regress/test/net/sourceforge/pmd/SymbolTableTest.java
similarity index 96%
rename from pmd/regress/test/com/infoether/pmd/SymbolTableTest.java
rename to pmd/regress/test/net/sourceforge/pmd/SymbolTableTest.java
index d03c0a2138..308b82cd9a 100644
--- a/pmd/regress/test/com/infoether/pmd/SymbolTableTest.java
+++ b/pmd/regress/test/net/sourceforge/pmd/SymbolTableTest.java
@@ -3,11 +3,11 @@
  * Date: Jun 19, 2002
  * Time: 11:09:06 AM
  */
-package test.com.infoether.pmd;
+package test.net.sourceforge.pmd;
 
 import junit.framework.TestCase;
-import com.infoether.pmd.SymbolTable;
-import com.infoether.pmd.Symbol;
+import net.sourceforge.pmd.SymbolTable;
+import net.sourceforge.pmd.Symbol;
 
 import java.util.HashMap;
 
diff --git a/pmd/regress/test/com/infoether/pmd/SymbolTest.java b/pmd/regress/test/net/sourceforge/pmd/SymbolTest.java
similarity index 87%
rename from pmd/regress/test/com/infoether/pmd/SymbolTest.java
rename to pmd/regress/test/net/sourceforge/pmd/SymbolTest.java
index 55fbfd97f3..1ab311c559 100644
--- a/pmd/regress/test/com/infoether/pmd/SymbolTest.java
+++ b/pmd/regress/test/net/sourceforge/pmd/SymbolTest.java
@@ -3,10 +3,10 @@
  * Date: Jun 19, 2002
  * Time: 11:59:24 AM
  */
-package test.com.infoether.pmd;
+package test.net.sourceforge.pmd;
 
 import junit.framework.TestCase;
-import com.infoether.pmd.Symbol;
+import net.sourceforge.pmd.Symbol;
 
 public class SymbolTest extends TestCase {
 
diff --git a/pmd/src/net/sourceforge/pmd/AbstractRule.java b/pmd/src/net/sourceforge/pmd/AbstractRule.java
new file mode 100644
index 0000000000..7b1d1f5b97
--- /dev/null
+++ b/pmd/src/net/sourceforge/pmd/AbstractRule.java
@@ -0,0 +1,21 @@
+/*
+ * User: tom
+ * Date: Jun 17, 2002
+ * Time: 5:44:22 PM
+ */
+package net.sourceforge.pmd;
+
+import net.sourceforge.pmd.ast.JavaParserVisitorAdapter;
+
+public abstract class AbstractRule extends JavaParserVisitorAdapter {
+    public String getName() {return getClass().getName();}
+
+    public boolean equals(Object o) {
+        Rule r = (Rule)o;
+        return r.getName().equals(getName());
+    }
+
+    public int hashCode() {
+        return getName().hashCode();
+    }
+}
diff --git a/pmd/src/net/sourceforge/pmd/DontCreateThreadsRule.java b/pmd/src/net/sourceforge/pmd/DontCreateThreadsRule.java
new file mode 100644
index 0000000000..9d7e8df3d7
--- /dev/null
+++ b/pmd/src/net/sourceforge/pmd/DontCreateThreadsRule.java
@@ -0,0 +1,20 @@
+package net.sourceforge.pmd;
+
+import net.sourceforge.pmd.ast.JavaParserVisitorAdapter;
+import net.sourceforge.pmd.ast.ASTAllocationExpression;
+import net.sourceforge.pmd.ast.ASTName;
+
+import java.util.*;
+
+public class DontCreateThreadsRule extends AbstractRule implements Rule {
+
+    public String getDescription() {return "Don't create threads, use the ThreadService instead";}
+
+    public Object visit(ASTAllocationExpression node, Object data){
+        if ((node.jjtGetChild(0) instanceof ASTName)  // this avoids "new ", i.e., "new int[]"
+                && ((ASTName)node.jjtGetChild(0)).getImage().equals("Thread")) {
+            ((Report)data).addRuleViolation(new RuleViolation(this, node.getBeginLine()));
+        }
+        return super.visit(node, data);
+    }
+}
diff --git a/pmd/src/net/sourceforge/pmd/DontCreateTimersRule.java b/pmd/src/net/sourceforge/pmd/DontCreateTimersRule.java
new file mode 100644
index 0000000000..f055fc055b
--- /dev/null
+++ b/pmd/src/net/sourceforge/pmd/DontCreateTimersRule.java
@@ -0,0 +1,20 @@
+package net.sourceforge.pmd;
+
+import net.sourceforge.pmd.ast.JavaParserVisitorAdapter;
+import net.sourceforge.pmd.ast.ASTAllocationExpression;
+import net.sourceforge.pmd.ast.ASTName;
+
+import java.util.*;
+
+public class DontCreateTimersRule extends AbstractRule implements Rule {
+
+    public String getDescription() {return "Don't create java.util.Timers, use the Cougaar alarm service instead";}
+
+    public Object visit(ASTAllocationExpression node, Object data){
+        if ((node.jjtGetChild(0) instanceof ASTName)  // this avoids "new ", i.e., "new int[]"
+                && ((ASTName)node.jjtGetChild(0)).getImage().equals("Timer")) {
+            ((Report)data).addRuleViolation(new RuleViolation(this, node.getBeginLine()));
+        }
+        return super.visit(node, data);
+    }
+}
diff --git a/pmd/src/net/sourceforge/pmd/EmptyCatchBlockRule.java b/pmd/src/net/sourceforge/pmd/EmptyCatchBlockRule.java
new file mode 100644
index 0000000000..2ceac7c0e8
--- /dev/null
+++ b/pmd/src/net/sourceforge/pmd/EmptyCatchBlockRule.java
@@ -0,0 +1,22 @@
+/*
+ * User: tom
+ * Date: Jun 14, 2002
+ * Time: 12:13:55 PM
+ */
+package net.sourceforge.pmd;
+
+import net.sourceforge.pmd.ast.ASTBlock;
+import net.sourceforge.pmd.ast.ASTTryStatement;
+
+public class EmptyCatchBlockRule extends AbstractRule implements Rule {
+
+    public String getDescription() {return "Avoid empty catch blocks";}
+
+   public Object visit(ASTBlock node, Object data){
+       if ((node.jjtGetParent() instanceof ASTTryStatement) && node.jjtGetNumChildren()==0) {
+           ((Report)data).addRuleViolation(new RuleViolation(this, node.getBeginLine()));
+       }
+
+        return super.visit(node, data);
+    }
+}
diff --git a/pmd/src/net/sourceforge/pmd/EmptyIfStmtRule.java b/pmd/src/net/sourceforge/pmd/EmptyIfStmtRule.java
new file mode 100644
index 0000000000..872b6fd85d
--- /dev/null
+++ b/pmd/src/net/sourceforge/pmd/EmptyIfStmtRule.java
@@ -0,0 +1,23 @@
+/*
+ * User: tom
+ * Date: Jun 17, 2002
+ * Time: 4:23:30 PM
+ */
+package net.sourceforge.pmd;
+
+import net.sourceforge.pmd.ast.JavaParserVisitorAdapter;
+import net.sourceforge.pmd.ast.ASTBlock;
+import net.sourceforge.pmd.ast.ASTTryStatement;
+import net.sourceforge.pmd.ast.ASTIfStatement;
+
+public class EmptyIfStmtRule extends AbstractRule implements Rule {
+    public String getDescription() {return "Avoid empty IF statements";}
+
+   public Object visit(ASTBlock node, Object data){
+       if ((node.jjtGetParent().jjtGetParent() instanceof ASTIfStatement) && node.jjtGetNumChildren()==0) {
+           ((Report)data).addRuleViolation(new RuleViolation(this, node.getBeginLine()));
+       }
+
+        return super.visit(node, data);
+    }
+}
diff --git a/pmd/src/net/sourceforge/pmd/Namespace.java b/pmd/src/net/sourceforge/pmd/Namespace.java
new file mode 100644
index 0000000000..e13a9d7eae
--- /dev/null
+++ b/pmd/src/net/sourceforge/pmd/Namespace.java
@@ -0,0 +1,63 @@
+/*
+ * User: tom
+ * Date: Jun 21, 2002
+ * Time: 2:11:15 PM
+ */
+package net.sourceforge.pmd;
+
+import java.util.Stack;
+
+
+/**
+ *
+ * Here's the problem:
+ *
+ * public class Outer
+ * {
+ *  private String foo;
+ *  public void foo() {
+ *      bar(new Runnable() {public void run() {String foo;}});
+ *  }
+ *  private void bar(Runnable r) {}
+ * }
+ *
+ * In this example, Outer.foo and the Runnable.foo are two different variables - even though
+ * Runnable.foo looks like its inside Outer, they don't conflict.
+ *
+ * So, a couple of SymbolTables are grouped into a Namespace.  SymbolTables are grouped so that inner classes have their own
+ * "group" of symbol tables.  So a class with an inner class would look like this:
+ *
+ *        ST
+ *        ST
+ *        NS2
+ * ST     ST    ST
+ * ST     ST    ST
+ * NS1    NS1   NS1
+ *
+ * That way the scopes work out nicely and inner classes can be arbitrarily nested.
+ */
+public class Namespace {
+
+    private Stack tables = new Stack();
+
+    public void addTable() {
+        if (tables.empty()) {
+            tables.push(new SymbolTable());
+        } else {
+            tables.push(new SymbolTable((SymbolTable)tables.peek()));
+        }
+    }
+
+    public void removeTable() {
+        tables.pop();
+    }
+
+    public SymbolTable peek() {
+        return (SymbolTable)tables.peek();
+    }
+
+    public int size() {
+        return tables.size();
+    }
+
+}
diff --git a/pmd/src/net/sourceforge/pmd/PMD.java b/pmd/src/net/sourceforge/pmd/PMD.java
new file mode 100644
index 0000000000..1f2b3ffc36
--- /dev/null
+++ b/pmd/src/net/sourceforge/pmd/PMD.java
@@ -0,0 +1,65 @@
+/*
+ * User: tom
+ * Date: Jun 17, 2002
+ * Time: 3:23:17 PM
+ */
+package net.sourceforge.pmd;
+
+import net.sourceforge.pmd.ast.JavaParser;
+import net.sourceforge.pmd.ast.ASTCompilationUnit;
+import net.sourceforge.pmd.ast.JavaParserVisitor;
+import net.sourceforge.pmd.ast.ParseException;
+
+import java.io.*;
+import java.util.List;
+import java.util.Iterator;
+
+public class PMD {
+		
+		public Report processFile(InputStream is) {
+			return null;
+		}
+
+		public Report processFile(FileReader fr) {
+		return null; }
+	
+    public Report processFile(File file, String ruleSetType) {
+        Report report = new Report(file.getAbsolutePath());
+        List rules = RuleFactory.createRules(ruleSetType);
+
+        try {
+            Reader reader = new BufferedReader(new FileReader(file));
+            JavaParser parser = new JavaParser(reader);
+            ASTCompilationUnit c = parser.CompilationUnit();
+            //c.dump("");
+            for (Iterator iterator = rules.iterator(); iterator.hasNext();) {
+                JavaParserVisitor rule = (JavaParserVisitor)iterator.next();
+                c.childrenAccept(rule, report);
+            }
+            reader.close();
+        } catch (FileNotFoundException fnfe) {
+            fnfe.printStackTrace();
+        } catch (ParseException pe) {
+            System.out.println("Error while parsing " + file.getAbsolutePath() + " at line " + pe.currentToken.beginLine + "; continuing...");
+        } catch (IOException ioe) {
+            ioe.printStackTrace();
+        } catch (Throwable t) {
+            System.out.println("Error while parsing " + file.getAbsolutePath() + "; "+ t.getMessage() + "; continuing...");
+            //t.printStackTrace();
+        }
+        return report;
+    }
+
+    public static void main(String[] args) {
+        if (args.length == 0) {
+            throw new RuntimeException("Pass a filename in");
+        }
+        File input = new File(args[0]);
+        if (!input.exists()) {
+            throw new RuntimeException("File " + args[0] + " doesn't exist");
+        }
+        PMD pmd = new PMD();
+        Report report = pmd.processFile(input, RuleFactory.ALL);
+        System.out.println(report.renderToText());
+    }
+}
diff --git a/pmd/src/net/sourceforge/pmd/PMDTask.java b/pmd/src/net/sourceforge/pmd/PMDTask.java
new file mode 100644
index 0000000000..8da5426ed0
--- /dev/null
+++ b/pmd/src/net/sourceforge/pmd/PMDTask.java
@@ -0,0 +1,68 @@
+package net.sourceforge.pmd;
+
+import org.apache.tools.ant.*;
+import org.apache.tools.ant.types.*;
+import java.util.*;
+import java.io.*;
+
+import net.sourceforge.pmd.ast.JavaParser;
+import net.sourceforge.pmd.ast.JavaParserVisitor;
+import net.sourceforge.pmd.ast.ParseException;
+import net.sourceforge.pmd.ast.ASTCompilationUnit;
+
+public class PMDTask extends Task {
+
+    private List filesets  = new ArrayList();
+    private String reportFile;
+    private boolean verbose;
+    private String ruleSetType;
+
+    public void setVerbose(boolean verbose) {
+        this.verbose = verbose;
+    }
+
+    public void setRuleSetType(String ruleSetType) {
+        this.ruleSetType = ruleSetType;
+    }
+
+    public void addFileset(FileSet set) {
+        filesets.add(set);
+    }
+    
+    public void setReportFile(String reportFile) {
+        this.reportFile = reportFile;
+    }
+    
+    public void execute() throws BuildException {
+        if (reportFile == null) {
+            throw new BuildException("No report file specified");
+        }
+        if (ruleSetType == null) {
+            throw new BuildException("No rule set type specified");
+        }
+        StringBuffer buf = new StringBuffer();
+        for (Iterator i = filesets.iterator(); i.hasNext();) {
+            FileSet fs = (FileSet) i.next();
+            DirectoryScanner ds = fs.getDirectoryScanner(project);
+            String[] srcFiles = ds.getIncludedFiles();
+            for (int j=0; j