You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2014/08/27 00:43:36 UTC

[05/51] [partial] Refactored the PMD Maven build - Adjusted the directory structure - Fixed a lot of compile problems - Fixed the maven setup - Made PMD build with Flexmojos 7.1.0 and Apache Flex 4.13.0 - Fixed a few UnitTests

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidDeclarationInLoopRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidDeclarationInLoopRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidDeclarationInLoopRuleTest.java
new file mode 100644
index 0000000..7fd164f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidDeclarationInLoopRuleTest.java
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.performance;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class AvoidDeclarationInLoopRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.FlexPMD181.as", new ViolationPosition[]
+       { new ViolationPosition( 2338 ) } ),
+                  new ExpectedViolation( "bug.FlexPMD88.as", new ViolationPosition[]
+                  { new ViolationPosition( 48 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.mxml.IterationsList.mxml",
+                                         new ViolationPosition[]
+                                         { new ViolationPosition( 53 ),
+                                                     new ViolationPosition( 64 ),
+                                                     new ViolationPosition( 76 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.TestResult.as", new ViolationPosition[]
+                  { new ViolationPosition( 136 ),
+                              new ViolationPosition( 150 ) } ),
+                  new ExpectedViolation( "Looping.as", new ViolationPosition[]
+                  { new ViolationPosition( 63 ) } ),
+                  new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+                  { new ViolationPosition( 205 ),
+                              new ViolationPosition( 224 ),
+                              new ViolationPosition( 340 ),
+                              new ViolationPosition( 341 ),
+                              new ViolationPosition( 342 ),
+                              new ViolationPosition( 343 ),
+                              new ViolationPosition( 344 ),
+                              new ViolationPosition( 345 ),
+                              new ViolationPosition( 346 ),
+                              new ViolationPosition( 347 ),
+                              new ViolationPosition( 350 ),
+                              new ViolationPosition( 351 ),
+                              new ViolationPosition( 352 ),
+                              new ViolationPosition( 353 ),
+                              new ViolationPosition( 358 ),
+                              new ViolationPosition( 368 ),
+                              new ViolationPosition( 369 ),
+                              new ViolationPosition( 370 ),
+                              new ViolationPosition( 371 ),
+                              new ViolationPosition( 373 ),
+                              new ViolationPosition( 374 ),
+                              new ViolationPosition( 387 ),
+                              new ViolationPosition( 388 ),
+                              new ViolationPosition( 389 ),
+                              new ViolationPosition( 390 ),
+                              new ViolationPosition( 391 ),
+                              new ViolationPosition( 392 ),
+                              new ViolationPosition( 393 ),
+                              new ViolationPosition( 394 ),
+                              new ViolationPosition( 397 ),
+                              new ViolationPosition( 398 ),
+                              new ViolationPosition( 399 ),
+                              new ViolationPosition( 400 ),
+                              new ViolationPosition( 405 ),
+                              new ViolationPosition( 415 ),
+                              new ViolationPosition( 416 ),
+                              new ViolationPosition( 417 ),
+                              new ViolationPosition( 418 ),
+                              new ViolationPosition( 420 ),
+                              new ViolationPosition( 421 ),
+                              new ViolationPosition( 592 ),
+                              new ViolationPosition( 595 ),
+                              new ViolationPosition( 597 ),
+                              new ViolationPosition( 617 ),
+                              new ViolationPosition( 618 ),
+                              new ViolationPosition( 619 ),
+                              new ViolationPosition( 620 ) } ),
+                  new ExpectedViolation( "RadonDataGrid.as", new ViolationPosition[]
+                  { new ViolationPosition( 188 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new AvoidDeclarationInLoopRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidInstanciationInLoopRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidInstanciationInLoopRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidInstanciationInLoopRuleTest.java
new file mode 100644
index 0000000..9205516
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidInstanciationInLoopRuleTest.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.performance;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class AvoidInstanciationInLoopRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+       { new ViolationPosition( 255 ),
+                   new ViolationPosition( 282 ),
+                   new ViolationPosition( 289 ) } ),
+                  new ExpectedViolation( "Looping.as", new ViolationPosition[]
+                  { new ViolationPosition( 43 ),
+                              new ViolationPosition( 46 ),
+                              new ViolationPosition( 50 ),
+                              new ViolationPosition( 56 ),
+                              new ViolationPosition( 59 ),
+                              new ViolationPosition( 63 ),
+                              new ViolationPosition( 68 ),
+                              new ViolationPosition( 71 ),
+                              new ViolationPosition( 75 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new AvoidInstanciationInLoopRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathCeilRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathCeilRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathCeilRuleTest.java
new file mode 100644
index 0000000..0fbf36f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathCeilRuleTest.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.performance;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+
+public class AvoidUsingMathCeilRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      {};
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new AvoidUsingMathCeilRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathFloorRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathFloorRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathFloorRuleTest.java
new file mode 100644
index 0000000..369617a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathFloorRuleTest.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.performance;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class AvoidUsingMathFloorRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+      { new ViolationPosition( 205 ),
+                  new ViolationPosition( 224 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new AvoidUsingMathFloorRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathRoundRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathRoundRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathRoundRuleTest.java
new file mode 100644
index 0000000..43b71be
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathRoundRuleTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.performance;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class AvoidUsingMathRoundRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+      { new ViolationPosition( 434 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new AvoidUsingMathRoundRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/BindableClassRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/BindableClassRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/BindableClassRuleTest.java
new file mode 100644
index 0000000..3c388d4
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/BindableClassRuleTest.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.performance;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class BindableClassRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.FlexPMD60.as", new ViolationPosition[]
+       { new ViolationPosition( 19 ) } ),
+                  new ExpectedViolation( "cairngorm.BindableModelLocator.as", new ViolationPosition[]
+                  { new ViolationPosition( 32 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new BindableClassRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/CreationPolicySetToAllRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/CreationPolicySetToAllRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/CreationPolicySetToAllRuleTest.java
new file mode 100644
index 0000000..ae06bac
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/CreationPolicySetToAllRuleTest.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.performance;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegExpBasedRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class CreationPolicySetToAllRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "Main.mxml", new ViolationPosition[]
+      { new ViolationPosition( 36 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "creationPolicy = Policy.ALL",
+                  " creationPolicy=\"all\"" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new CreationPolicySetToAllRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "creationPolic=" };
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/CyclomaticComplexityRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/CyclomaticComplexityRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/CyclomaticComplexityRuleTest.java
new file mode 100644
index 0000000..78dd8a6
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/CyclomaticComplexityRuleTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.performance;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class CyclomaticComplexityRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.FlexPMD181.as", new ViolationPosition[]
+       { new ViolationPosition( 2194 ),
+                   new ViolationPosition( 2292 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.LongSwitch.as", new ViolationPosition[]
+                  { new ViolationPosition( 39 ) } ),
+                  new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+                  { new ViolationPosition( 548 ) } ),
+                  new ExpectedViolation( "RadonDataGrid.as", new ViolationPosition[]
+                  { new ViolationPosition( 160 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new CyclomaticComplexityRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/DeeplyNestedIfRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/DeeplyNestedIfRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/DeeplyNestedIfRuleTest.java
new file mode 100644
index 0000000..0d03946
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/DeeplyNestedIfRuleTest.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.performance;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class DeeplyNestedIfRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.Duane.mxml", new ViolationPosition[]
+       { new ViolationPosition( 87 ),
+                   new ViolationPosition( 91 ),
+                   new ViolationPosition( 96 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.AbstractRowData.as", new ViolationPosition[]
+                  { new ViolationPosition( 59 ) } ),
+                  new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+                  { new ViolationPosition( 578 ),
+                              new ViolationPosition( 576 ),
+                              new ViolationPosition( 584 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new DeeplyNestedIfRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/DynamicFiltersUsedInPopupTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/DynamicFiltersUsedInPopupTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/DynamicFiltersUsedInPopupTest.java
new file mode 100644
index 0000000..e7eeb44
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/DynamicFiltersUsedInPopupTest.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.performance;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegExpBasedRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class DynamicFiltersUsedInPopupTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "filters.MyPopup.as", new ViolationPosition[]
+       { new ViolationPosition( 37 ) } ),
+                  new ExpectedViolation( "filters.MyPopup.mxml", new ViolationPosition[]
+                  { new ViolationPosition( 41 ),
+                              new ViolationPosition( 44 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      final String[] lines =
+      { "new DropShadowFilter",
+                  "new GlowFilter",
+                  "mx:DropShadowFilter" };
+      return lines;
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new DynamicFiltersUsedInPopup();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      final String[] lines =
+      { ".filterFunction",
+                  "DropShadowfilter(" };
+      return lines;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/HeavyConstructorRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/HeavyConstructorRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/HeavyConstructorRuleTest.java
new file mode 100644
index 0000000..4e767df
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/HeavyConstructorRuleTest.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.performance;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class HeavyConstructorRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.FlexPMD88.as", new ViolationPosition[]
+       { new ViolationPosition( 38 ) } ),
+                  new ExpectedViolation( "flexunit.RaoulTest.as", new ViolationPosition[]
+                  { new ViolationPosition( 71 ) } ),
+                  new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+                  { new ViolationPosition( 130 ) } ),
+                  new ExpectedViolation( "Looping.as", new ViolationPosition[]
+                  { new ViolationPosition( 39 ) } ),
+                  new ExpectedViolation( "RadonDataGrid.as", new ViolationPosition[]
+                  { new ViolationPosition( 53 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new HeavyConstructorRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/RecursiveStyleManagerRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/RecursiveStyleManagerRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/RecursiveStyleManagerRuleTest.java
new file mode 100644
index 0000000..fcef96f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/RecursiveStyleManagerRuleTest.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.performance;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class RecursiveStyleManagerRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "GoodComponent.as", new ViolationPosition[]
+      { new ViolationPosition( 59 ),
+                  new ViolationPosition( 60 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new RecursiveStyleManagerRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/UseTraceFunctionRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/UseTraceFunctionRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/UseTraceFunctionRuleTest.java
new file mode 100644
index 0000000..2e8b45d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/performance/UseTraceFunctionRuleTest.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.performance;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class UseTraceFunctionRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.LongSwitch.as", new ViolationPosition[]
+       { new ViolationPosition( 125 ) } ),
+                  new ExpectedViolation( "Simple.as", new ViolationPosition[]
+                  { new ViolationPosition( 1 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.BigImporterModel.as", new ViolationPosition[]
+                  { new ViolationPosition( 74 ),
+                              new ViolationPosition( 75 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UseTraceFunctionRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/AllowAllSecureDomainRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/AllowAllSecureDomainRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/AllowAllSecureDomainRuleTest.java
new file mode 100644
index 0000000..e58442e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/AllowAllSecureDomainRuleTest.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.security;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegExpBasedRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class AllowAllSecureDomainRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.Security.as", new ViolationPosition[]
+      { new ViolationPosition( 38 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "LocalConnection.allowDomain(\"*\")",
+                  "LocalConnection.allowDomain( \"*\")",
+                  "LocalConnection.allowDomain(\"*\" )",
+                  "LocalConnection.allowDomain( \"*\" )",
+                  "LocalConnection.allowDomain('*')",
+                  "LocalConnection.allowDomain( '*')",
+                  "LocalConnection.allowDomain('*' )",
+                  "LocalConnection.allowDomain( '*' )",
+                  "Security.allowDomain(\"*\")",
+                  "Security.allowDomain( \"*\")",
+                  "Security.allowDomain(\"*\" )",
+                  "Security.allowDomain( \"*\" )",
+                  "Security.allowDomain('*')",
+                  "Security.allowDomain( '*')",
+                  "Security.allowDomain('*' )",
+                  "Security.allowDomain( '*' )" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new AllowAllSecureDomainRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "LocalConnection.allowDomain(\"www.google.com\")",
+                  "LocalConnection.allowDomain( \"www.google.com\")",
+                  "LocalConnection.allowDomain(\"www.google.com\" )",
+                  "LocalConnection.allowDomain( \"www.google.com\" )",
+                  "LocalConnection.allowDomain('www.google.com')",
+                  "LocalConnection.allowDomain( 'www.google.com')",
+                  "LocalConnection.allowDomain('www.google.com' )",
+                  "LocalConnection.allowDomain( 'www.google.com' )",
+                  "Security.allowDomain(\"www.google.com\")",
+                  "Security.allowDomain( \"www.google.com\")",
+                  "Security.allowDomain(\"www.google.com\" )",
+                  "Security.allowDomain( \"www.google.com\" )",
+                  "Security.allowDomain('www.google.com')",
+                  "Security.allowDomain( 'www.google.com')",
+                  "Security.allowDomain('www.google.com' )",
+                  "Security.allowDomain( 'www.google.com' )" };
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/AllowInsecureDomainRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/AllowInsecureDomainRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/AllowInsecureDomainRuleTest.java
new file mode 100644
index 0000000..b802bf5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/AllowInsecureDomainRuleTest.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.security;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegExpBasedRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class AllowInsecureDomainRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.Security.as", new ViolationPosition[]
+      { new ViolationPosition( 39 ),
+                  new ViolationPosition( 40 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "LocalConnection.allowInsecureDomain(\"www.example.org\")",
+                  "Security.allowInsecureDomain(\"www.example.org\");" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new AllowInsecureDomainRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "LocalConnection.allowDomain(\"www.example.org\")",
+                  "Security.allowDomain(\"www.example.org\");" };
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/ImportLoadBestPracticeRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/ImportLoadBestPracticeRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/ImportLoadBestPracticeRuleTest.java
new file mode 100644
index 0000000..7718c24
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/ImportLoadBestPracticeRuleTest.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.security;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegExpBasedRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+
+public class ImportLoadBestPracticeRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      {};
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "SecurityDomain.currentDomain.loadBytes(" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new ImportLoadBestPracticeRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "LocalConnection.allowDomain(\"www.example.org\")",
+                  "Security.allowDomain(\"www.example.org\");",
+                  "SecurityDomain.loadBytes" };
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/InsecureExactSettingsRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/InsecureExactSettingsRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/InsecureExactSettingsRuleTest.java
new file mode 100644
index 0000000..ef80bbd
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/InsecureExactSettingsRuleTest.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.security;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegExpBasedRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class InsecureExactSettingsRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.Security.as", new ViolationPosition[]
+      { new ViolationPosition( 41 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "Security.exactSettings = true;",
+                  "Security.exactSettings = false;" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new InsecureExactSettingsRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "LocalConnection.allowDomain(\"www.example.org\")",
+                  "Security.allowDomain(\"www.example.org\");",
+                  "SecurityDomain.loadBytes" };
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/LSOSecureFalseRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/LSOSecureFalseRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/LSOSecureFalseRuleTest.java
new file mode 100644
index 0000000..83a35c6
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/LSOSecureFalseRuleTest.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.security;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegExpBasedRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class LSOSecureFalseRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.Security.as", new ViolationPosition[]
+      { new ViolationPosition( 45 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { " LSO.getLocal(name, null, true);",
+                  " LSO.getLocal( name,null,true );",
+                  " LSO.getLocal(name,null,true);",
+                  " LSO.getLocal(name,null,true)",
+                  " LSO.getLocal(name, null, false);" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new LSOSecureFalseRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "LocalConnection.allowDomain(\"www.example.org\")",
+                  "Security.allowDomain(\"www.example.org\");",
+                  "SecurityDomain.loadBytes",
+                  "LocalConnection.allowDomain(\"www.example.org\");" };
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/LocalConnectionStarRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/LocalConnectionStarRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/LocalConnectionStarRuleTest.java
new file mode 100644
index 0000000..97adaf7
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/security/LocalConnectionStarRuleTest.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.security;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegExpBasedRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class LocalConnectionStarRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.Security.as", new ViolationPosition[]
+      { new ViolationPosition( 42 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { " LocalConnection.allowDomain(\"*\");",
+                  " LocalConnection.allowDomain( \"*\" );",
+                  " LocalConnection.allowDomain('*');" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new LocalConnectionStarRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "LocalConnection.allowDomain(\"www.example.org\")",
+                  "Security.allowDomain(\"www.example.org\");",
+                  "SecurityDomain.loadBytes",
+                  "LocalConnection.allowDomain(\"www.example.org\");" };
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooLongFunctionRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooLongFunctionRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooLongFunctionRuleTest.java
new file mode 100644
index 0000000..d6fc009
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooLongFunctionRuleTest.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.sizing;
+
+import java.util.LinkedHashMap;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class TooLongFunctionRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      new LinkedHashMap< String, ViolationPosition[] >();
+
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "cairngorm.FatController.as", new ViolationPosition[]
+       { new ViolationPosition( 97 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.NestedSwitch.as", new ViolationPosition[]
+                  { new ViolationPosition( 35 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.LongSwitch.as", new ViolationPosition[]
+                  { new ViolationPosition( 39 ) } ),
+                  new ExpectedViolation( "ErrorToltipSkin.as", new ViolationPosition[]
+                  { new ViolationPosition( 156 ) } ),
+                  new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+                  { new ViolationPosition( 150 ),
+                              new ViolationPosition( 335 ),
+                              new ViolationPosition( 548 ) } ),
+                  new ExpectedViolation( "RadonDataGrid.as", new ViolationPosition[]
+                  { new ViolationPosition( 84 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new TooLongFunctionRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooLongSwitchCaseRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooLongSwitchCaseRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooLongSwitchCaseRuleTest.java
new file mode 100644
index 0000000..1695b38
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooLongSwitchCaseRuleTest.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.sizing;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class TooLongSwitchCaseRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "ErrorToltipSkin.as", new ViolationPosition[]
+       { new ViolationPosition( 189 ),
+                   new ViolationPosition( 214 ),
+                   new ViolationPosition( 252 ),
+                   new ViolationPosition( 290 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.NestedSwitch.as", new ViolationPosition[]
+                  { new ViolationPosition( 38 ),
+                              new ViolationPosition( 58 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.LongSwitch.as", new ViolationPosition[]
+                  { new ViolationPosition( 47 ),
+                              new ViolationPosition( 52 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new TooLongSwitchCaseRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyFieldInVORuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyFieldInVORuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyFieldInVORuleTest.java
new file mode 100644
index 0000000..7d53b3a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyFieldInVORuleTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.sizing;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class TooManyFieldInVORuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.ArrayVO.as", new ViolationPosition[]
+      { new ViolationPosition( 33 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new TooManyFieldInVORule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyFieldsRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyFieldsRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyFieldsRuleTest.java
new file mode 100644
index 0000000..b8b9e19
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyFieldsRuleTest.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.sizing;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class TooManyFieldsRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.TestResult.as", new ViolationPosition[]
+       { new ViolationPosition( 46 ) } ),
+                  new ExpectedViolation( "Sorted.as", new ViolationPosition[]
+                  { new ViolationPosition( 37 ) } ),
+                  new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+                  { new ViolationPosition( 42 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.BigModel.as", new ViolationPosition[]
+                  { new ViolationPosition( 35 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new TooManyFieldsRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyFunctionRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyFunctionRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyFunctionRuleTest.java
new file mode 100644
index 0000000..72176ba
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyFunctionRuleTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.sizing;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class TooManyFunctionRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+       { new ViolationPosition( 42 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.TestResult.as", new ViolationPosition[]
+                  { new ViolationPosition( 46 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.BigModel.as", new ViolationPosition[]
+                  { new ViolationPosition( 35 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new TooManyFunctionRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyParametersRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyParametersRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyParametersRuleTest.java
new file mode 100644
index 0000000..4073258
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyParametersRuleTest.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.sizing;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class TooManyParametersRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "RadonDataGrid.as", new ViolationPosition[]
+       { new ViolationPosition( 68 ),
+                   new ViolationPosition( 84 ),
+                   new ViolationPosition( 117 ) } ),
+                  new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+                  { new ViolationPosition( 548 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.BigImporterModel.as", new ViolationPosition[]
+                  { new ViolationPosition( 62 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new TooManyParametersRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyPublicRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyPublicRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyPublicRuleTest.java
new file mode 100644
index 0000000..7e54083
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/sizing/TooManyPublicRuleTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.sizing;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class TooManyPublicRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.ArrayVO.as", new ViolationPosition[]
+       { new ViolationPosition( 33 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.TestResult.as", new ViolationPosition[]
+                  { new ViolationPosition( 46 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.BigModel.as", new ViolationPosition[]
+                  { new ViolationPosition( 35 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new TooManyPublicRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/BadFormatLoggerRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/BadFormatLoggerRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/BadFormatLoggerRuleTest.java
new file mode 100644
index 0000000..ff43207
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/BadFormatLoggerRuleTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.style;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class BadFormatLoggerRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+      { new ViolationPosition( 44 ),
+                  new ViolationPosition( 45 ),
+                  new ViolationPosition( 46 ),
+                  new ViolationPosition( 47 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new BadFormatLoggerRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/ConstructorNonEmptyReturnTypeRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/ConstructorNonEmptyReturnTypeRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/ConstructorNonEmptyReturnTypeRuleTest.java
new file mode 100644
index 0000000..629461d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/ConstructorNonEmptyReturnTypeRuleTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.style;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class ConstructorNonEmptyReturnTypeRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.VoidConstructor.as", new ViolationPosition[]
+      { new ViolationPosition( 37 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new ConstructorNonEmptyReturnTypeRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/CopyrightMissingRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/CopyrightMissingRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/CopyrightMissingRuleTest.java
new file mode 100644
index 0000000..b84a603
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/CopyrightMissingRuleTest.java
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package com.adobe.ac.pmd.rules.style;
+
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class CopyrightMissingRuleTest extends AbstractFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "Simple.as", new ViolationPosition[]
+       { new ViolationPosition( -1 ) } ),
+                  new ExpectedViolation( "MainWithNoCopyright.mxml", new ViolationPosition[]
+                  { new ViolationPosition( -1 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new CopyrightMissingRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/ImportFromSamePackageRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/ImportFromSamePackageRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/ImportFromSamePackageRuleTest.java
new file mode 100644
index 0000000..2c3f3de
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/ImportFromSamePackageRuleTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.style;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class ImportFromSamePackageRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.BigImporterModel.as", new ViolationPosition[]
+      { new ViolationPosition( 33 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new ImportFromSamePackageRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/OverLongLineRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/OverLongLineRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/OverLongLineRuleTest.java
new file mode 100644
index 0000000..12155e3
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/OverLongLineRuleTest.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.style;
+
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class OverLongLineRuleTest extends AbstractFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "RadonDataGrid.as", new ViolationPosition[]
+       { new ViolationPosition( 68 ),
+                   new ViolationPosition( 84 ),
+                   new ViolationPosition( 117 ) } ),
+                  new ExpectedViolation( "Simple.as", new ViolationPosition[]
+                  { new ViolationPosition( 1 ) } ),
+                  new ExpectedViolation( "FileReferenceList.as", new ViolationPosition[]
+                  { new ViolationPosition( 47 ) } ),
+                  new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+                  { new ViolationPosition( 46 ),
+                              new ViolationPosition( 47 ),
+                              new ViolationPosition( 49 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.BigImporterModel.as", new ViolationPosition[]
+                  { new ViolationPosition( 62 ) } ),
+                  new ExpectedViolation( "SkinStyles.as", new ViolationPosition[]
+                  { new ViolationPosition( 82 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.mxml.IterationsList2.mxml",
+                                         new ViolationPosition[]
+                                         { new ViolationPosition( 54 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new OverLongLineRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/TabUsedAsIndentorRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/TabUsedAsIndentorRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/TabUsedAsIndentorRuleTest.java
new file mode 100644
index 0000000..598ee2e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/style/TabUsedAsIndentorRuleTest.java
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package com.adobe.ac.pmd.rules.style;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.logging.Logger;
+
+import net.sourceforge.pmd.PMDException;
+
+import com.adobe.ac.pmd.files.impl.FileUtils;
+import com.adobe.ac.pmd.rules.core.AbstractRegExpBasedRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class TabUsedAsIndentorRuleTest extends AbstractRegExpBasedRuleTest
+{
+   private static final Logger LOGGER      = Logger.getLogger( TabUsedAsIndentorRuleTest.class.getName() );
+   private final String        TEST_FOLDER = "/com/adobe/ac/ncss/event";
+
+   public TabUsedAsIndentorRuleTest()
+   {
+      super();
+      final URL resource = this.getClass().getResource( "/test"
+            + TEST_FOLDER );
+
+      if ( resource != null )
+      {
+         try
+         {
+            setTestFiles( FileUtils.computeFilesList( new File( resource.toURI().getPath() ),
+                                                      null,
+                                                      "",
+                                                      null ) );
+         }
+         catch ( final PMDException e )
+         {
+            LOGGER.warning( e.getLocalizedMessage() );
+         }
+         catch ( final URISyntaxException e )
+         {
+            LOGGER.warning( e.getLocalizedMessage() );
+         }
+      }
+   }
+
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "SecondCustomEvent.as", new ViolationPosition[]
+      { new ViolationPosition( 37 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "\t",
+                  "   \t\t",
+                  "  \t  " };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new TabUsedAsIndentorRule();
+   }
+
+   @Override
+   protected File getTestDirectory() // NO_UCD
+   {
+      return new File( super.getTestDirectory().getAbsolutePath()
+            + TEST_FOLDER );
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "    ",
+                  "lala\t\t" };
+   }
+}