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:32 UTC

[01/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

Repository: flex-utilities
Updated Branches:
  refs/heads/develop 1da832013 -> e43b7a87f


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD233b.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD233b.mxml b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD233b.mxml
new file mode 100644
index 0000000..a06fc62
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD233b.mxml
@@ -0,0 +1,300 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<!--- The default skin class for a Spark TitleWindow container.
+
+@see spark.skins.spark.TitleWindowCloseButtonSkin
+@see spark.components.TitleWindow
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
+			 xmlns:s="library://ns.adobe.com/flex/spark"
+			 xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
+			 blendMode="normal"
+			 mouseEnabled="false"
+			 minWidth="76"
+			 minHeight="76"
+			 alpha.disabled="0.5"
+			 alpha.disabledWithControlBar="0.5">
+	
+	<fx:Metadata>
+		<![CDATA[ 
+		/** 
+		* @copy spark.skins.spark.ApplicationSkin#hostComponent
+		*/
+		[HostComponent("spark.components.TitleWindow")]
+		]]>
+	</fx:Metadata>
+	
+	<fx:Script fb:purpose="styling">
+		/* Define the skin elements that should not be colorized. 
+		For panel, border and title background are skinned, but the content area and title text are not. */
+		static private const exclusions:Array = ["titleDisplay", "contentGroup"];// "background", 
+		
+		/**
+		 * @private
+		 */  
+		override public function get colorizeExclusions():Array {return exclusions;}
+		
+		/**
+		 * @private
+		 */
+		override protected function initializationComplete():void
+		{
+			useChromeColor = true;
+			super.initializationComplete();
+		}
+		
+		/**
+		 * @private
+		 */
+		override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+		{
+			if (getStyle("borderVisible") == true)
+			{
+				border.visible = true;
+				background.left = background.top = background.right = background.bottom = 1;
+				contents.left = contents.top = contents.right = contents.bottom = 1;
+			}
+			else
+			{
+				border.visible = false;
+				background.left = background.top = background.right = background.bottom = 0;
+				contents.left = contents.top = contents.right = contents.bottom = 0;
+			}
+			
+			dropShadow.visible = getStyle("dropShadowVisible");
+			
+			var cr:Number = getStyle("cornerRadius");
+			var withControls:Boolean = 
+				(currentState == "disabledWithControlBar" || 
+					currentState == "normalWithControlBar" ||
+					currentState == "inactiveWithControlBar");
+			
+			if (cornerRadius != cr)
+			{
+				cornerRadius = cr;
+				
+				dropShadow.tlRadius = cornerRadius;
+				dropShadow.trRadius = cornerRadius;
+				dropShadow.blRadius = withControls ? cornerRadius : 0;
+				dropShadow.brRadius = withControls ? cornerRadius : 0;
+				
+				setPartCornerRadii(topMaskRect, withControls); 
+				setPartCornerRadii(border, withControls); 
+				setPartCornerRadii(background, withControls);
+			}
+			
+			if (bottomMaskRect) setPartCornerRadii(bottomMaskRect, withControls); 
+			
+			borderStroke.color = getStyle("borderColor");
+			borderStroke.alpha = getStyle("borderAlpha");
+			backgroundFill.color = getStyle("backgroundColor");
+			backgroundFill.alpha = getStyle("backgroundAlpha");
+			
+			super.updateDisplayList(unscaledWidth, unscaledHeight);
+		}
+		
+		/**
+		 * @private
+		 */  
+		private function setPartCornerRadii(target:Rect, includeBottom:Boolean):void
+		{            
+			target.topLeftRadiusX = cornerRadius;
+			target.topRightRadiusX = cornerRadius;
+			target.bottomLeftRadiusX = includeBottom ? cornerRadius : 0;
+			target.bottomRightRadiusX = includeBottom ? cornerRadius : 0;
+		}
+		
+		private var cornerRadius:Number;
+	</fx:Script>
+	
+	<s:states>
+		<s:State name="normal" />
+		<s:State name="inactive" stateGroups="inactiveGroup" />
+		<s:State name="disabled" />
+		<s:State name="normalWithControlBar" stateGroups="withControls" />
+		<s:State name="inactiveWithControlBar" stateGroups="withControls, inactiveGroup" />
+		<s:State name="disabledWithControlBar" stateGroups="withControls" />
+	</s:states>
+	
+	<!--- drop shadow can't be hittable so it stays sibling of other graphics @private-->
+	<s:RectangularDropShadow id="dropShadow" blurX="20" blurY="20" alpha="0.32" 
+							 alpha.inactiveGroup="0.22" distance="11"  distance.inactiveGroup="7"
+							 angle="90" color="0x000000" left="0" top="0" right="0" bottom="0"/>
+	
+	<!--- drop shadow can't be hittable so all other graphics go in this group -->
+	<s:Group left="0" right="0" top="0" bottom="0">
+		
+		<!--- top group mask @private-->
+		<s:Group left="1" top="1" right="1" bottom="1" id="topGroupMask">
+			<!--- @private-->
+			<s:Rect id="topMaskRect" left="0" top="0" right="0" bottom="0">
+				<s:fill>
+					<s:SolidColor alpha="0"/>
+				</s:fill>
+			</s:Rect>
+		</s:Group>
+		
+		<!--- bottom group mask @private-->
+		<s:Group left="1" top="1" right="1" bottom="1" id="bottomGroupMask" 
+				 includeIn="withControls">
+			<!--- @private-->
+			<s:Rect id="bottomMaskRect" left="0" top="0" right="0" bottom="0">
+				<s:fill>
+					<s:SolidColor alpha="0"/>
+				</s:fill>
+			</s:Rect>
+		</s:Group>
+		
+		<!--- layer 1: border @private -->
+		<s:Rect id="border" left="0" right="0" top="0" bottom="0" radiusX="8">
+			<s:stroke>
+				<!--- Defines the TitleWindowSkin class's border stroke. The default value is 1. /////// HS ! ///////////-->
+				<s:SolidColorStroke id="borderStroke" weight="1" color="0xff0000"/>
+			</s:stroke>
+		</s:Rect>
+		
+		<!-- layer 2: background fill -->
+		<!--- Defines the appearance of the TitleWindowSkin class's background. /////// HS ! /////////////////////-->
+		<s:Rect id="background" left="1" top="1" right="1" bottom="1" >
+			<s:fill>
+				<!--- Defines the TitleWindowSkin class's background fill. The default color is 0xFFFFFF. -->
+				<s:SolidColor id="backgroundFill" color="0x70a6d2" />
+			</s:fill>
+		</s:Rect>
+		
+		<!-- layer 3: contents -->
+		<!--- Contains the vertical stack of title bar content and control bar. //////////////////////////-->
+		<s:Group left="1" right="1" top="1" bottom="1" id="contents" height="40">
+			<s:layout>
+				<s:VerticalLayout gap="0" horizontalAlign="justify" />
+			</s:layout>
+			<!--- @private -->
+			<s:Group id="topGroup" mask="{topGroupMask}">
+				
+				<!--- layer 0: title bar fill @private /////////////////////////////////////////////////////-->
+				<s:Rect id="tbFill" left="0" right="0" top="0" bottom="1">
+					<s:fill>
+						<s:LinearGradient rotation="90">
+							<s:GradientEntry color="0x70a6d2"
+											 /> <!--color.inactiveGroup="0xEAEAEA"-->
+							<s:GradientEntry color="0xdceefd"
+											 /> <!--color.inactiveGroup="0xCECECE"-->
+						</s:LinearGradient>
+					</s:fill>
+				</s:Rect>
+				
+				<!--- layer 1: title bar highlight @private ////////////////////////////////////////////////-->
+				<!--<s:Rect id="tbHilite" left="0" right="0" top="0" bottom="0">
+				<s:stroke>
+				<s:LinearGradientStroke rotation="90" weight="1">
+				<s:GradientEntry color="0x70a6d2" />
+				<s:GradientEntry color="0xFFFFFF" alpha="0.22"/>
+				</s:LinearGradientStroke>
+				</s:stroke>
+				<s:fill>
+				<s:LinearGradient rotation="90">
+				<s:GradientEntry color="0xa9d1f2" alpha="0.15" /> 
+				<s:GradientEntry color="0xa9d1f2" alpha="0.15" ratio="0.44"/>
+				<s:GradientEntry color="0xa9d1f2" alpha="0" ratio="0.4401"/>
+				</s:LinearGradient>
+				</s:fill>
+				</s:Rect>-->
+				
+				<!--- layer 2: title bar divider @private ///////////////////////////////////////////////-->
+				<s:Rect id="tbDiv" left="0" right="0" height="1" bottom="0">
+					<s:fill>
+						<s:SolidColor color="0xffffff" alpha="0.75" />
+					</s:fill>
+				</s:Rect>
+				
+				<!-- layer 3: text -->
+				<!--- @copy spark.components.Panel#titleDisplay ////////////////////////////////////////////-->
+				<s:Label id="titleDisplay" maxDisplayedLines="1"
+						 left="9" right="36" top="1" bottom="0" minHeight="30"
+						 verticalAlign="middle" fontWeight="bold" color="0x183d5b"/>
+				
+				<!-- layer 4: moveArea -->
+				<!--- @copy spark.components.TitleWindow#moveArea -->
+				<s:Group id="moveArea" left="0" right="0" top="0" bottom="0" />
+				
+				<!--- @copy spark.components.TitleWindow#closeButton -->
+				<s:Button id="closeButton" skinClass="spark.skins.spark.TitleWindowCloseButtonSkin"
+						  width="15" height="15" right="7" top="7" />
+			</s:Group>
+			
+			<!--
+			Note: setting the minimum size to 0 here so that changes to the host component's
+			size will not be thwarted by this skin part's minimum size.   This is a compromise,
+			more about it here: http://bugs.adobe.com/jira/browse/SDK-21143
+			-->
+			<!--- @copy spark.components.SkinnableContainer#contentGroup -->
+			<s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0">
+			</s:Group>
+			
+			<!--- @private ////////////////////////////////////////////////////////////////////////////-->
+			<s:Group id="bottomGroup" minWidth="0" minHeight="0" 
+					 includeIn="withControls">  
+				
+				<s:Group left="0" right="0" top="0" bottom="0" mask="{bottomGroupMask}">
+					
+					<!-- layer 0: control bar divider line -->
+					<!--<s:Rect left="0" right="0" top="0" height="1" alpha="0.22">
+					<s:fill>
+					<s:SolidColor color="0xff0000" />
+					</s:fill>
+					</s:Rect>-->
+					
+					<!-- layer 1: control bar highlight -->
+					<s:Rect left="0" right="0" top="1" bottom="0">
+						<s:stroke>
+							<s:LinearGradientStroke rotation="90" weight="1">
+								<s:GradientEntry color="0xFFFFFF" />
+								<s:GradientEntry color="0x70a6d2" />
+							</s:LinearGradientStroke>
+						</s:stroke>
+					</s:Rect>
+					
+					<!-- layer 2: control bar fill -->
+					<s:Rect left="1" right="1" top="2" bottom="1">
+						<s:fill>
+							<s:LinearGradient rotation="90">
+								<s:GradientEntry color="0xdceefd"/> <!--0xEDEDED-->
+								<s:GradientEntry color="0x70a6d2"/>
+							</s:LinearGradient>
+						</s:fill>
+					</s:Rect>
+				</s:Group>
+				
+				<!--- @copy spark.components.Panel#controlBarGroup -->
+				<s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">
+					<s:layout>
+						<s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
+					</s:layout>
+				</s:Group>
+			</s:Group>
+		</s:Group>
+	</s:Group>
+</s:SparkSkin>
+


[40/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/FlexPmdTestBase.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/FlexPmdTestBase.java b/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/FlexPmdTestBase.java
deleted file mode 100644
index c3e3b5d..0000000
--- a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/FlexPmdTestBase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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;
-
-import java.io.File;
-import java.util.Map;
-
-import com.adobe.ac.pmd.files.IFlexFile;
-
-/**
- * This is a base class for any FlexPMD rule test case.
- * 
- * @author xagnetti
- */
-public class FlexPmdTestBase // NO_UCD
-{
-   protected static final String    BEGIN_LINE_NOT_CORRECT        = "Begining line is not correct";     // NO_UCD
-   protected static final String    END_LINE_NOT_CORRECT          = "Ending line is not correct";       // NO_UCD
-   protected static final String    VIOLATIONS_NUMBER_NOT_CORRECT = "Violations number is not correct"; // NO_UCD
-
-   /**
-    * Test files placeholder. The key is the qualified file name
-    */
-   private Map< String, IFlexFile > testFiles                     = ResourcesManagerTest.getInstance()
-                                                                                        .getTestFiles();
-
-   /**
-    * 
-    */
-   protected FlexPmdTestBase()
-   {
-   }
-
-   /**
-    * @return
-    */
-   protected File getTestDirectory() // NO_UCD
-   {
-      return ResourcesManagerTest.getInstance().getTestRootDirectory();
-   }
-
-   /**
-    * @return
-    */
-   protected final Map< String, IFlexFile > getTestFiles() // NO_UCD
-   {
-      return testFiles;
-   }
-
-   /**
-    * @param testFilesToBeSet
-    */
-   protected final void setTestFiles( final Map< String, IFlexFile > testFilesToBeSet )
-   {
-      testFiles = testFilesToBeSet;
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/ResourcesManagerTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/ResourcesManagerTest.java b/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/ResourcesManagerTest.java
deleted file mode 100644
index 5986888..0000000
--- a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/ResourcesManagerTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.logging.Logger;
-
-import net.sourceforge.pmd.PMDException;
-
-import com.adobe.ac.pmd.files.IFlexFile;
-import com.adobe.ac.pmd.files.impl.FileUtils;
-import com.adobe.ac.utils.StackTraceUtils;
-
-/**
- * Internal utility which finds out the test resources, and map them to their
- * qualified names.
- * 
- * @author xagnetti
- */
-public final class ResourcesManagerTest
-{
-   private static ResourcesManagerTest instance = null;
-   private static final Logger         LOGGER   = Logger.getLogger( ResourcesManagerTest.class.getName() );
-
-   /**
-    * @return
-    */
-   public static synchronized ResourcesManagerTest getInstance() // NOPMD
-   {
-      if ( instance == null )
-      {
-         try
-         {
-            new LoggerUtils().loadConfiguration();
-            instance = new ResourcesManagerTest( "/test" );
-         }
-         catch ( final URISyntaxException e )
-         {
-            LOGGER.warning( StackTraceUtils.print( e ) );
-         }
-         catch ( final PMDException e )
-         {
-            LOGGER.warning( StackTraceUtils.print( e ) );
-         }
-      }
-      return instance;
-   }
-
-   private final Map< String, IFlexFile > testFiles;
-   private final File                     testRootDirectory;
-
-   private ResourcesManagerTest( final String directory ) throws URISyntaxException,
-                                                         PMDException
-   {
-      final URL resource = this.getClass().getResource( directory );
-
-      if ( resource == null )
-      {
-         LOGGER.severe( directory
-               + " folder is not found in the resource" );
-         testRootDirectory = null;
-         testFiles = new LinkedHashMap< String, IFlexFile >();
-      }
-      else
-      {
-         testRootDirectory = new File( resource.toURI().getPath() );
-         testFiles = FileUtils.computeFilesList( testRootDirectory,
-                                                 null,
-                                                 "",
-                                                 null );
-      }
-   }
-
-   /**
-    * @return
-    */
-   public Map< String, IFlexFile > getTestFiles()
-   {
-      return testFiles;
-   }
-
-   protected File getTestRootDirectory()
-   {
-      return testRootDirectory;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IAs3File.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IAs3File.java b/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IAs3File.java
deleted file mode 100644
index 4997eeb..0000000
--- a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IAs3File.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.files;
-
-/**
- * @author xagnetti
- */
-public interface IAs3File extends IFlexFile
-{
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IFlexFile.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IFlexFile.java b/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IFlexFile.java
deleted file mode 100644
index 21adb01..0000000
--- a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IFlexFile.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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.files;
-
-import java.util.Set;
-
-/**
- * @author xagnetti
- */
-public interface IFlexFile
-{
-   /**
-    * @param stringToLookup
-    * @param linesToBeIgnored
-    * @return
-    */
-   boolean contains( final String stringToLookup,
-                     final Set< Integer > linesToBeIgnored );
-
-   /**
-    * @return
-    */
-   String getClassName();
-
-   /**
-    * @return the token for comment closing
-    */
-   String getCommentClosingTag();
-
-   /**
-    * @return the token for comment opening
-    */
-   String getCommentOpeningTag();
-
-   /**
-    * @return java.io.File name
-    */
-   String getFilename();
-
-   /**
-    * @return java.io.File absolute path
-    */
-   String getFilePath();
-
-   /**
-    * @return
-    */
-   String getFullyQualifiedName();
-
-   /**
-    * @param lineIndex
-    * @return
-    */
-   String getLineAt( int lineIndex );
-
-   /**
-    * @return
-    */
-   int getLinesNb();
-
-   /**
-    * @return
-    */
-   String getPackageName();
-
-   /**
-    * @return the token for one line comment
-    */
-   String getSingleLineComment();
-
-   /**
-    * @return true if the file is a main MXML file
-    */
-   boolean isMainApplication();
-
-   /**
-    * @return true if the file is a MXML file
-    */
-   boolean isMxml();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IMxmlFile.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IMxmlFile.java b/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IMxmlFile.java
deleted file mode 100644
index 1d98c98..0000000
--- a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IMxmlFile.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.files;
-
-/**
- * @author xagnetti
- */
-public interface IMxmlFile extends IFlexFile
-{
-   /**
-    * @return
-    */
-   String[] getActualScriptBlock();
-
-   /**
-    * @return
-    */
-   int getBeginningScriptBlock();
-
-   /**
-    * @return
-    */
-   int getEndingScriptBlock();
-
-   /**
-    * @return
-    */
-   String[] getScriptBlock();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/AbstractFlexFile.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/AbstractFlexFile.java b/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/AbstractFlexFile.java
deleted file mode 100644
index 986f2a7..0000000
--- a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/AbstractFlexFile.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * 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.files.impl;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import java.util.logging.Logger;
-
-import org.apache.commons.lang.StringUtils;
-
-import com.adobe.ac.pmd.files.IFlexFile;
-import com.adobe.ac.utils.StackTraceUtils;
-
-/**
- * Abstract class representing a Flex File (either MXML or AS)
- * 
- * @author xagnetti
- */
-abstract class AbstractFlexFile implements IFlexFile
-{
-   private static final Logger LOGGER = Logger.getLogger( AbstractFlexFile.class.getName() );
-
-   /**
-    * @param filePath
-    * @param rootPath
-    * @param className
-    * @param fileSeparator
-    * @return
-    */
-   protected static String computePackageName( final String filePath,
-                                               final CharSequence rootPath,
-                                               final String className,
-                                               final String fileSeparator )
-   {
-      String temporaryPackage;
-
-      temporaryPackage = filePath.replace( className,
-                                           "" ).replace( rootPath,
-                                                         "" ).replace( fileSeparator,
-                                                                       "." );
-      if ( temporaryPackage.endsWith( "." ) )
-      {
-         temporaryPackage = temporaryPackage.substring( 0,
-                                                        temporaryPackage.length() - 1 );
-      }
-      if ( temporaryPackage.length() > 0
-            && temporaryPackage.charAt( 0 ) == '.' )
-      {
-         temporaryPackage = temporaryPackage.substring( 1,
-                                                        temporaryPackage.length() );
-      }
-      return temporaryPackage;
-   }
-
-   private static boolean doesCurrentLineContain( final String line,
-                                                  final String search )
-   {
-      return line.contains( search );
-   }
-
-   private final String         className;
-   private final File           file;
-   private final List< String > lines;
-   private final String         packageName;
-
-   /**
-    * @param underlyingFile
-    * @param rootDirectory
-    */
-   protected AbstractFlexFile( final File underlyingFile,
-                               final File rootDirectory )
-   {
-      final String filePath = underlyingFile.getPath();
-      final CharSequence rootPath = rootDirectory == null ? ""
-                                                         : rootDirectory.getPath();
-
-      file = underlyingFile;
-      className = underlyingFile.getName();
-      packageName = computePackageName( filePath,
-                                        rootPath,
-                                        className,
-                                        System.getProperty( "file.separator" ) );
-      lines = new ArrayList< String >();
-      try
-      {
-         String[] linesArray;
-         linesArray = FileUtils.readLines( underlyingFile );
-         for ( final String string : linesArray )
-         {
-            lines.add( string );
-         }
-      }
-      catch ( final IOException e )
-      {
-         LOGGER.warning( StackTraceUtils.print( e ) );
-      }
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IFlexFile#contains(java.lang.String, int)
-    */
-   public final boolean contains( final String stringToLookup,
-                                  final Set< Integer > linesToBeIgnored )
-   {
-      int lineIndex = 1;
-      boolean found = false;
-
-      for ( final String line : lines )
-      {
-         if ( doesCurrentLineContain( line,
-                                      stringToLookup )
-               && !linesToBeIgnored.contains( lineIndex ) )
-         {
-            found = true;
-            break;
-         }
-         lineIndex++;
-      }
-      return found;
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see java.lang.Object#equals(java.lang.Object)
-    */
-   @Override
-   public final boolean equals( final Object obj )
-   {
-      return obj != null
-            && obj instanceof AbstractFlexFile && hashCode() == ( ( AbstractFlexFile ) obj ).hashCode();
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IFlexFile#getClassName()
-    */
-   public final String getClassName()
-   {
-      return className;
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IFlexFile#getCommentClosingTag()
-    */
-   public abstract String getCommentClosingTag();
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IFlexFile#getCommentOpeningTag()
-    */
-   public abstract String getCommentOpeningTag();
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IFlexFile#getFilename()
-    */
-   public final String getFilename()
-   {
-      return file.getName();
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IFlexFile#getFilePath()
-    */
-   public final String getFilePath()
-   {
-      return file.toURI().getPath();
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IFlexFile#getFullyQualifiedName()
-    */
-   public final String getFullyQualifiedName()
-   {
-      return ( StringUtils.isEmpty( packageName ) ? ""
-                                                 : packageName
-                                                       + "." )
-            + className;
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IFlexFile#getLineAt(int)
-    */
-   public String getLineAt( final int lineIndex )
-   {
-      return lines.get( lineIndex - 1 );
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IFlexFile#getLines()
-    */
-   public final List< String > getLines()
-   {
-      return lines;
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IFlexFile#getLinesNb()
-    */
-   public int getLinesNb()
-   {
-      return lines.size();
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IFlexFile#getPackageName()
-    */
-   public final String getPackageName()
-   {
-      return packageName;
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see java.lang.Object#hashCode()
-    */
-   @Override
-   public int hashCode()
-   {
-      return getFilePath().hashCode();
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IFlexFile#isMainApplication()
-    */
-   public abstract boolean isMainApplication();
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IFlexFile#isMxml()
-    */
-   public abstract boolean isMxml();
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/As3File.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/As3File.java b/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/As3File.java
deleted file mode 100644
index d4a3c93..0000000
--- a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/As3File.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * 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.files.impl;
-
-import java.io.File;
-
-import com.adobe.ac.pmd.files.IAs3File;
-
-/**
- * @author xagnetti
- */
-class As3File extends AbstractFlexFile implements IAs3File
-{
-   /**
-    * @param file
-    * @param rootDirectory
-    */
-   protected As3File( final File file,
-                      final File rootDirectory )
-   {
-      super( file, rootDirectory );
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.impl.AbstractFlexFile#getCommentClosingTag()
-    */
-   @Override
-   public final String getCommentClosingTag()
-   {
-      return "*/";
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.impl.AbstractFlexFile#getCommentOpeningTag()
-    */
-   @Override
-   public final String getCommentOpeningTag()
-   {
-      return "/*";
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IFlexFile#getSingleLineComment()
-    */
-   public String getSingleLineComment()
-   {
-      return "//";
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.impl.AbstractFlexFile#isMainApplication()
-    */
-   @Override
-   public final boolean isMainApplication()
-   {
-      return false;
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.impl.AbstractFlexFile#isMxml()
-    */
-   @Override
-   public final boolean isMxml()
-   {
-      return false;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/FileUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/FileUtils.java b/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/FileUtils.java
deleted file mode 100644
index 12450f8..0000000
--- a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/FileUtils.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * 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.files.impl;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import net.sourceforge.pmd.PMDException;
-
-import com.adobe.ac.ncss.filters.FlexFilter;
-import com.adobe.ac.pmd.files.IFlexFile;
-
-/**
- * @author xagnetti
- */
-public final class FileUtils
-{
-   /**
-    * @param source
-    * @param sourceList
-    * @param packageToExclude
-    * @param excludePatterns
-    * @return
-    * @throws PMDException
-    */
-   public static Map< String, IFlexFile > computeFilesList( final File source,
-                                                            final List< File > sourceList,
-                                                            final String packageToExclude,
-                                                            final List< String > excludePatterns ) throws PMDException
-   {
-      final Map< String, IFlexFile > files = new LinkedHashMap< String, IFlexFile >();
-      final FlexFilter flexFilter = new FlexFilter();
-      final Collection< File > foundFiles = getFlexFiles( source,
-                                                          sourceList,
-                                                          flexFilter );
-
-      for ( final File sourceFile : foundFiles )
-      {
-         final AbstractFlexFile file = create( sourceFile,
-                                               source );
-
-         if ( ( "".equals( packageToExclude ) || !file.getFullyQualifiedName().startsWith( packageToExclude ) )
-               && !currentPackageIncludedInExcludePatterns( file.getFullyQualifiedName(),
-                                                            excludePatterns ) )
-         {
-            files.put( file.getFullyQualifiedName(),
-                       file );
-         }
-      }
-
-      return files;
-   }
-
-   /**
-    * @param sourceFile
-    * @param sourceDirectory
-    * @return
-    */
-   public static AbstractFlexFile create( final File sourceFile,
-                                          final File sourceDirectory )
-   {
-      AbstractFlexFile file;
-
-      if ( sourceFile.getName().endsWith( ".as" ) )
-      {
-         file = new As3File( sourceFile, sourceDirectory );
-      }
-      else
-      {
-         file = new MxmlFile( sourceFile, sourceDirectory );
-      }
-
-      return file;
-   }
-
-   /**
-    * @param file
-    * @return
-    * @throws IOException
-    */
-   public static String[] readLines( final File file ) throws IOException
-   {
-      final List< String > lines = com.adobe.ac.ncss.utils.FileUtils.readFile( file );
-
-      return lines.toArray( new String[ lines.size() ] );
-   }
-
-   private static boolean currentPackageIncludedInExcludePatterns( final String fullyQualifiedName,
-                                                                   final List< String > excludePatterns )
-   {
-      if ( excludePatterns != null )
-      {
-         for ( final String excludePattern : excludePatterns )
-         {
-            if ( fullyQualifiedName.startsWith( excludePattern ) )
-            {
-               return true;
-            }
-         }
-      }
-      return false;
-   }
-
-   private static Collection< File > getFlexFiles( final File source,
-                                                   final List< File > sourceList,
-                                                   final FlexFilter flexFilter ) throws PMDException
-   {
-      if ( source == null
-            && sourceList == null )
-      {
-         throw new PMDException( "sourceDirectory is not specified", null );
-      }
-      Collection< File > foundFiles;
-      if ( source == null )
-      {
-         foundFiles = com.adobe.ac.ncss.utils.FileUtils.listFiles( sourceList,
-                                                                   flexFilter,
-                                                                   true );
-      }
-      else
-      {
-         if ( source.isDirectory() )
-         {
-            foundFiles = com.adobe.ac.ncss.utils.FileUtils.listFiles( source,
-                                                                      flexFilter,
-                                                                      true );
-         }
-         else
-         {
-            foundFiles = new ArrayList< File >();
-            foundFiles.add( source );
-         }
-      }
-      if ( foundFiles.isEmpty() )
-      {
-         return new ArrayList< File >();
-      }
-      return foundFiles;
-   }
-
-   private FileUtils()
-   {
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/MxmlFile.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/MxmlFile.java b/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/MxmlFile.java
deleted file mode 100644
index 7438c53..0000000
--- a/FlexPMD/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/MxmlFile.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * 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.files.impl;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.adobe.ac.pmd.files.IMxmlFile;
-
-/**
- * @author xagnetti
- */
-class MxmlFile extends AbstractFlexFile implements IMxmlFile
-{
-   private static final String METADATA_TAG    = "Metadata";
-   private String[]            actualScriptBlock;
-   private int                 endLine;
-   private boolean             mainApplication = false;
-   private String[]            scriptBlock;
-   private int                 startLine;
-
-   /**
-    * @param file
-    * @param rootDirectory
-    */
-   protected MxmlFile( final File file,
-                       final File rootDirectory )
-   {
-      super( file, rootDirectory );
-
-      computeIfIsMainApplication();
-      if ( getLinesNb() > 0 )
-      {
-         extractScriptBlock();
-      }
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IMxmlFile#getActualScriptBlock()
-    */
-   public final String[] getActualScriptBlock()
-   {
-      return actualScriptBlock; // NOPMD
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IMxmlFile#getBeginningScriptBlock()
-    */
-   public int getBeginningScriptBlock()
-   {
-      return startLine;
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.impl.AbstractFlexFile#getCommentClosingTag()
-    */
-   @Override
-   public final String getCommentClosingTag()
-   {
-      return "-->";
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.impl.AbstractFlexFile#getCommentOpeningTag()
-    */
-   @Override
-   public final String getCommentOpeningTag()
-   {
-      return "<!--";
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IMxmlFile#getEndingScriptBlock()
-    */
-   public int getEndingScriptBlock()
-   {
-      return endLine;
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IMxmlFile#getScriptBlock()
-    */
-   public final String[] getScriptBlock()
-   {
-      return scriptBlock; // NOPMD by xagnetti on 7/7/09 3:15 PM
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.IFlexFile#getSingleLineComment()
-    */
-   public String getSingleLineComment()
-   {
-      return getCommentOpeningTag();
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.impl.AbstractFlexFile#isMainApplication()
-    */
-   @Override
-   public final boolean isMainApplication()
-   {
-      return mainApplication;
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.files.impl.AbstractFlexFile#isMxml()
-    */
-   @Override
-   public final boolean isMxml()
-   {
-      return true;
-   }
-
-   private void computeIfIsMainApplication()
-   {
-      for ( final String line : getLines() )
-      {
-         if ( line.contains( "Application " )
-               && line.charAt( 0 ) == '<' )
-         {
-            mainApplication = true;
-            break;
-         }
-      }
-   }
-
-   private int computeScriptOffSet( final int startingLineIndex )
-   {
-      int currentLineIndex = startingLineIndex + 1;
-      while ( getLines().get( currentLineIndex ).contains( "CDATA[" )
-            || getLines().get( currentLineIndex ).contains( "//" ) || containsCloseComment( currentLineIndex )
-            || getLines().get( currentLineIndex ).trim().equals( "" ) )
-      {
-         currentLineIndex++;
-      }
-      return currentLineIndex
-            - startingLineIndex;
-   }
-
-   private boolean containsCloseComment( final int currentLineIndex )
-   {
-      final boolean closedAsComment = getLines().get( currentLineIndex ).contains( "/*" )
-            && getLines().get( currentLineIndex ).contains( "*/" );
-      final boolean closeMxmlComment = getLines().get( currentLineIndex ).contains( "<!--" )
-            && getLines().get( currentLineIndex ).contains( "-->" );
-      return closedAsComment
-            || closeMxmlComment;
-   }
-
-   private void copyScriptLinesKeepingOriginalLineIndices()
-   {
-      final List< String > scriptLines = extractScriptLines();
-      final List< String > metaDataLines = extractMetaDataLines();
-      final String packageLine = "package "
-            + getPackageName() + "{";
-      final String classLine = "class "
-            + getClassName().split( "\\." )[ 0 ] + "{";
-
-      scriptLines.set( 0,
-                       packageLine );
-
-      if ( metaDataLines.isEmpty()
-            || metaDataLines.get( 0 ).compareTo( "HostComponent" ) == 0 )
-      {
-         if ( scriptLines.size() > 1 )
-         {
-            scriptLines.set( 1,
-                             classLine );
-         }
-      }
-      else
-      {
-         final int firstMetaDataLine = getFirstMetaDataLine( getLines() );
-
-         for ( int i = firstMetaDataLine; i < firstMetaDataLine
-               + metaDataLines.size(); i++ )
-         {
-            scriptLines.set( i,
-                             metaDataLines.get( i
-                                   - firstMetaDataLine ) );
-         }
-         scriptLines.set( firstMetaDataLine
-                                + metaDataLines.size(),
-                          classLine );
-      }
-
-      scriptLines.set( scriptLines.size() - 1,
-                       "}}" );
-      scriptBlock = scriptLines.toArray( new String[ scriptLines.size() ] );
-   }
-
-   private List< String > extractMetaDataLines()
-   {
-      final ArrayList< String > metaDataLines = new ArrayList< String >();
-      int currentLineIndex = 0;
-      int start = 0;
-      int end = 0;
-
-      for ( final String line : getLines() )
-      {
-         if ( line.contains( METADATA_TAG ) )
-         {
-            if ( line.contains( "</" ) )
-            {
-               end = currentLineIndex
-                     - ( getLines().get( currentLineIndex - 1 ).contains( "]]>" ) ? 1
-                                                                                 : 0 );
-               if ( line.contains( "<fx" )
-                     || line.contains( "<mx" ) )
-               {
-                  start = end;
-               }
-               break;
-            }
-            if ( line.contains( "<" ) )
-            {
-               start = currentLineIndex
-                     + ( getLines().get( currentLineIndex + 1 ).contains( "CDATA[" ) ? 2
-                                                                                    : 1 );
-            }
-         }
-         currentLineIndex++;
-      }
-      metaDataLines.addAll( getLines().subList( start,
-                                                end ) );
-      return metaDataLines;
-   }
-
-   private void extractScriptBlock()
-   {
-      int currentLineIndex = 0;
-      startLine = 0;
-      endLine = 0;
-
-      for ( final String line : getLines() )
-      {
-         if ( line.contains( "Script" ) )
-         {
-            if ( line.contains( "</" ) )
-            {
-               endLine = currentLineIndex
-                     - ( getLines().get( currentLineIndex - 1 ).contains( "]]>" ) ? 1
-                                                                                 : 0 );
-               break;
-            }
-            else if ( line.contains( "<" ) )
-            {
-               startLine = currentLineIndex
-                     + computeScriptOffSet( currentLineIndex );
-            }
-         }
-         currentLineIndex++;
-      }
-
-      copyScriptLinesKeepingOriginalLineIndices();
-   }
-
-   private List< String > extractScriptLines()
-   {
-      final List< String > scriptLines = new ArrayList< String >();
-
-      for ( int j = 0; j < startLine; j++ )
-      {
-         scriptLines.add( "" );
-      }
-      if ( startLine < endLine )
-      {
-         actualScriptBlock = getLines().subList( startLine,
-                                                 endLine ).toArray( new String[ endLine
-               - startLine ] );
-         scriptLines.addAll( new ArrayList< String >( getLines().subList( startLine,
-                                                                          endLine ) ) );
-      }
-      for ( int j = endLine; j < getLines().size(); j++ )
-      {
-         scriptLines.add( "" );
-      }
-      return scriptLines;
-   }
-
-   private int getFirstMetaDataLine( final List< String > lines )
-   {
-      for ( int i = 0; i < lines.size(); i++ )
-      {
-         final String line = lines.get( i );
-
-         if ( line.contains( METADATA_TAG )
-               && line.contains( "<" ) )
-         {
-            return i;
-         }
-      }
-      return 0;
-   }
-
-   // private String printMetaData( final List< String > metaDataLines )
-   // {
-   // final StringBuffer buffer = new StringBuffer();
-   // if ( metaDataLines == null
-   // || metaDataLines.isEmpty() )
-   // {
-   // return "";
-   // }
-   // for ( final String line : metaDataLines )
-   // {
-   // buffer.append( line );
-   // }
-   // return buffer + " ";
-   // }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/main/java/net/sourceforge/pmd/PMDException.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/main/java/net/sourceforge/pmd/PMDException.java b/FlexPMD/flex-pmd-files/src/main/java/net/sourceforge/pmd/PMDException.java
deleted file mode 100644
index ce150c9..0000000
--- a/FlexPMD/flex-pmd-files/src/main/java/net/sourceforge/pmd/PMDException.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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 net.sourceforge.pmd;
-
-/**
- * A convenience exception wrapper. Contains the original exception, if any.
- * Also, contains a severity number (int). Zero implies no severity. The higher
- * the number the greater the severity.
- * 
- * @author Donald A. Leckie
- * @version $Revision: 5681 $, $Date: 2007-11-30 14:00:56 -0800 (Fri, 30 Nov
- *          2007) $
- * @since August 30, 2002
- */
-public class PMDException extends Exception
-{
-   private static final long serialVersionUID = 6938647389367956874L;
-
-   private int               severity;
-
-   /**
-    * @param message
-    */
-   public PMDException( final String message )
-   {
-      super( message );
-   }
-
-   /**
-    * @param message
-    * @param reason
-    */
-   public PMDException( final String message,
-                        final Exception reason )
-   {
-      super( message, reason );
-   }
-
-   /**
-    * Returns the cause of this exception or <code>null</code>
-    * 
-    * @return the cause of this exception or <code>null</code>
-    * @deprecated use {@link #getCause()} instead
-    */
-   @Deprecated
-   public Exception getReason()
-   {
-      return ( Exception ) getCause();
-   }
-
-   /**
-    * @return
-    */
-   public int getSeverity()
-   {
-      return severity;
-   }
-
-   /**
-    * @param severityToBeSet
-    */
-   public void setSeverity( final int severityToBeSet )
-   {
-      severity = severityToBeSet;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/FlexPmdTestBaseTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/FlexPmdTestBaseTest.java b/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/FlexPmdTestBaseTest.java
deleted file mode 100644
index 3fede84..0000000
--- a/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/FlexPmdTestBaseTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import junit.framework.Assert;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.files.IFlexFile;
-
-public class FlexPmdTestBaseTest
-{
-   @Test
-   public void testSetTestFiles()
-   {
-      final FlexPmdTestBase testBase = new FlexPmdTestBase();
-      final Map< String, IFlexFile > testFilesToBeSet = new LinkedHashMap< String, IFlexFile >();
-
-      testBase.setTestFiles( testFilesToBeSet );
-      Assert.assertEquals( testFilesToBeSet,
-                           testBase.getTestFiles() );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/ResourcesManagerTestTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/ResourcesManagerTestTest.java b/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/ResourcesManagerTestTest.java
deleted file mode 100644
index fe4848a..0000000
--- a/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/ResourcesManagerTestTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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;
-
-import junit.framework.Assert;
-
-import org.junit.Test;
-
-public class ResourcesManagerTestTest
-{
-   @Test
-   public void testGetInstance()
-   {
-      final ResourcesManagerTest manager = ResourcesManagerTest.getInstance();
-
-      Assert.assertNotNull( manager.getTestFiles() );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/MxmlFileTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/MxmlFileTest.java b/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/MxmlFileTest.java
deleted file mode 100644
index 2193e78..0000000
--- a/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/MxmlFileTest.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * 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.files;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.adobe.ac.pmd.FlexPmdTestBase;
-
-public class MxmlFileTest extends FlexPmdTestBase
-{
-   private IMxmlFile bug141;
-   private IMxmlFile bug233a;
-   private IMxmlFile bug233b;
-   private IMxmlFile deleteRenderer;
-   private IMxmlFile iterationsList;
-   private IMxmlFile nestedComponent;
-
-   @Before
-   public void setUp()
-   {
-      bug141 = ( IMxmlFile ) getTestFiles().get( "bug.FlexPMD141a.mxml" );
-      bug233a = ( IMxmlFile ) getTestFiles().get( "bug.FlexPMD233a.mxml" );
-      bug233b = ( IMxmlFile ) getTestFiles().get( "bug.FlexPMD233b.mxml" );
-      iterationsList = ( IMxmlFile ) getTestFiles().get( "com.adobe.ac.ncss.mxml.IterationsList.mxml" );
-      nestedComponent = ( IMxmlFile ) getTestFiles().get( "com.adobe.ac.ncss.mxml.NestedComponent.mxml" );
-      deleteRenderer = ( IMxmlFile ) getTestFiles().get( "DeleteButtonRenderer.mxml" );
-   }
-
-   @Test
-   public void testCommentTags()
-   {
-      assertEquals( "<!--",
-                    iterationsList.getCommentOpeningTag() );
-      assertEquals( "-->",
-                    iterationsList.getCommentClosingTag() );
-   }
-
-   @Test
-   public void testFlexPMD141()
-   {
-      final String[] lines = bug141.getScriptBlock();
-
-      assertEquals( "package bug{",
-                    lines[ 0 ] );
-      assertEquals( "class FlexPMD141a{",
-                    lines[ 1 ] );
-      assertEquals( Integer.valueOf( 46 ),
-                    Integer.valueOf( lines.length ) );
-      assertEquals( "",
-                    lines[ 36 ] );
-      assertEquals( "",
-                    lines[ 37 ] );
-      assertEquals( "",
-                    lines[ 38 ] );
-      assertEquals( "private var object:List = new List();",
-                    lines[ 39 ].trim() );
-      assertEquals( "}}",
-                    lines[ lines.length - 1 ] );
-   }
-
-   @Test
-   public void testFlexPMD233()
-   {
-      final String[] lines = bug233a.getScriptBlock();
-
-      Assert.assertEquals( "",
-                           lines[ 47 ] );
-
-      Assert.assertEquals( 80,
-                           bug233b.getActualScriptBlock().length );
-   }
-
-   @Test
-   public void testGetActionScriptScriptBlock()
-   {
-      final String[] deleteRendererLines = deleteRenderer.getScriptBlock();
-
-      assertEquals( "package {",
-                    deleteRendererLines[ 0 ] );
-      assertEquals( "       [Event(name=\"ruleRemoved\", type=\"flash.events.Event\")]",
-                    deleteRendererLines[ 43 ] );
-      assertEquals( "class DeleteButtonRenderer{",
-                    deleteRendererLines[ 44 ] );
-      assertEquals( Integer.valueOf( 115 ),
-                    Integer.valueOf( deleteRendererLines.length ) );
-      assertEquals( "            import com.adobe.ac.pmd.model.Rule;",
-                    deleteRendererLines[ 49 ] );
-      assertEquals( "}}",
-                    deleteRendererLines[ deleteRendererLines.length - 1 ] );
-   }
-
-   @Test
-   public void testGetMxmlScriptBlock()
-   {
-      final String[] iterationsListLines = iterationsList.getScriptBlock();
-
-      assertEquals( "package com.adobe.ac.ncss.mxml{",
-                    iterationsListLines[ 0 ] );
-      assertEquals( "class IterationsList{",
-                    iterationsListLines[ 1 ] );
-      assertEquals( "         import com.adobe.ac.anthology.model.object.IterationModelLocator;",
-                    iterationsListLines[ 40 ] );
-      assertEquals( "}}",
-                    iterationsListLines[ iterationsListLines.length - 1 ] );
-      assertEquals( Integer.valueOf( 104 ),
-                    Integer.valueOf( iterationsListLines.length ) );
-   }
-
-   @Test
-   public void testGetMxmlScriptBlock2()
-   {
-      final String[] nestedLines = nestedComponent.getScriptBlock();
-
-      assertEquals( "package com.adobe.ac.ncss.mxml{",
-                    nestedLines[ 0 ] );
-      assertEquals( "class NestedComponent{",
-                    nestedLines[ 1 ] );
-      assertEquals( Integer.valueOf( 57 ),
-                    Integer.valueOf( nestedLines.length ) );
-      assertEquals( "}}",
-                    nestedLines[ nestedLines.length - 1 ] );
-   }
-
-   @Test
-   public void testScriptBlockLines()
-   {
-      assertEquals( Integer.valueOf( 40 ),
-                    Integer.valueOf( iterationsList.getBeginningScriptBlock() ) );
-      assertEquals( Integer.valueOf( 94 ),
-                    Integer.valueOf( iterationsList.getEndingScriptBlock() ) );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/AbstractFlexFileTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/AbstractFlexFileTest.java b/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/AbstractFlexFileTest.java
deleted file mode 100644
index 7987d77..0000000
--- a/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/AbstractFlexFileTest.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * 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.files.impl;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.FileNotFoundException;
-import java.net.URISyntaxException;
-import java.util.HashSet;
-import java.util.Set;
-
-import junit.framework.Assert;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import com.adobe.ac.pmd.FlexPmdTestBase;
-import com.adobe.ac.pmd.files.IAs3File;
-import com.adobe.ac.pmd.files.IMxmlFile;
-
-public class AbstractFlexFileTest extends FlexPmdTestBase
-{
-   private IAs3File  as3;
-   private IMxmlFile mainMxml;
-   private IMxmlFile mxml;
-
-   @Before
-   public void init() throws FileNotFoundException,
-                     URISyntaxException
-   {
-      as3 = ( IAs3File ) getTestFiles().get( "AbstractRowData.as" );
-      mainMxml = ( IMxmlFile ) getTestFiles().get( "Main.mxml" );
-      mxml = ( IMxmlFile ) getTestFiles().get( "com.adobe.ac.ncss.mxml.IterationsList.mxml" );
-   }
-
-   @Test
-   public void testContains()
-   {
-      assertTrue( as3.contains( "logger",
-                                buildSetContaining( 0 ) ) );
-      assertFalse( as3.contains( "loggerr",
-                                 buildSetContaining( 0 ) ) );
-      assertFalse( as3.contains( "addEventListener",
-                                 buildSetContaining( 109,
-                                                     114 ) ) );
-   }
-
-   @Test
-   public void testEquals()
-   {
-      Assert.assertTrue( as3.equals( as3 ) );
-      Assert.assertFalse( mxml.equals( as3 ) );
-      Assert.assertFalse( as3.equals( mxml ) );
-   }
-
-   @Test
-   public void testFlexPMD152()
-   {
-      Assert.assertEquals( "com.something",
-                           AbstractFlexFile.computePackageName( "C:/somePath/ProjectName/com/something/Test.mxml",
-                                                                "C:/somePath/ProjectName",
-                                                                "Test.mxml",
-                                                                "/" ) );
-
-      Assert.assertEquals( "com.something",
-                           AbstractFlexFile.computePackageName( "C:/somePath/ProjectName/com/something/Test.mxml",
-                                                                "C:/somePath/ProjectName/",
-                                                                "Test.mxml",
-                                                                "/" ) );
-   }
-
-   @Test
-   public void testGetClassName()
-   {
-      assertEquals( "AbstractRowData.as",
-                    as3.getClassName() );
-      assertEquals( "IterationsList.mxml",
-                    mxml.getClassName() );
-   }
-
-   @Test
-   public void testGetFileName()
-   {
-      Assert.assertEquals( "AbstractRowData.as",
-                           as3.getFilename() );
-   }
-
-   @Test
-   public void testGetFilePath()
-   {
-      assertNotNull( as3.getFilePath() );
-      assertNotNull( mxml.getFilePath() );
-      assertNotNull( mainMxml.getFilePath() );
-   }
-
-   @Test
-   public void testGetPackageName()
-   {
-      assertEquals( "",
-                    as3.getPackageName() );
-      assertEquals( "com.adobe.ac.ncss.mxml",
-                    mxml.getPackageName() );
-   }
-
-   @Test
-   public void testGetPath()
-   {
-      assertEquals( "AbstractRowData.as",
-                    as3.getFullyQualifiedName() );
-      assertEquals( "com.adobe.ac.ncss.mxml.IterationsList.mxml",
-                    mxml.getFullyQualifiedName() );
-   }
-
-   @Test
-   public void testIsMainApplication()
-   {
-      assertFalse( as3.isMainApplication() );
-      assertFalse( mxml.isMainApplication() );
-      assertTrue( mainMxml.isMainApplication() );
-   }
-
-   @Test
-   public void testIsMxml()
-   {
-      assertFalse( as3.isMxml() );
-      assertTrue( mxml.isMxml() );
-   }
-
-   private Set< Integer > buildSetContaining( final int... lines )
-   {
-
-      final HashSet< Integer > hashSet = new HashSet< Integer >();
-
-      for ( final int line : lines )
-      {
-         hashSet.add( line );
-      }
-      return hashSet;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/As3FileTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/As3FileTest.java b/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/As3FileTest.java
deleted file mode 100644
index b15e413..0000000
--- a/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/As3FileTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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.files.impl;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import com.adobe.ac.pmd.FlexPmdTestBase;
-import com.adobe.ac.pmd.files.IAs3File;
-
-public class As3FileTest extends FlexPmdTestBase
-{
-   private IAs3File data;
-
-   @Before
-   public void setUp()
-   {
-      data = ( IAs3File ) getTestFiles().get( "AbstractRowData.as" );
-   }
-
-   @Test
-   public void testGetCommentClosingTag()
-   {
-      assertEquals( "*/",
-                    data.getCommentClosingTag() );
-   }
-
-   @Test
-   public void testGetCommentOpeningTag()
-   {
-      assertEquals( "/*",
-                    data.getCommentOpeningTag() );
-   }
-
-   @Test
-   public void testGetLineAt()
-   {
-      assertEquals( "      public const logger : ILogger;",
-                    data.getLineAt( 45 ) );
-   }
-
-   @Test
-   public void testGetSingleLineComment()
-   {
-      assertEquals( "//",
-                    data.getSingleLineComment() );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/FileUtilsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/FileUtilsTest.java b/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/FileUtilsTest.java
deleted file mode 100644
index b507a86..0000000
--- a/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/FileUtilsTest.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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.files.impl;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.Assert;
-import net.sourceforge.pmd.PMDException;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.FlexPmdTestBase;
-import com.adobe.ac.pmd.files.IFlexFile;
-
-public class FileUtilsTest extends FlexPmdTestBase
-{
-   @Test
-   public void testComputeFilesList() throws PMDException
-   {
-      Map< String, IFlexFile > files;
-      files = FileUtils.computeFilesList( getTestDirectory(),
-                                          null,
-                                          "",
-                                          null );
-
-      Assert.assertEquals( 105,
-                           files.size() );
-
-      final List< String > excludePatterns = new ArrayList< String >();
-      excludePatterns.add( "bug" );
-      files = FileUtils.computeFilesList( getTestDirectory(),
-                                          null,
-                                          "",
-                                          excludePatterns );
-
-      Assert.assertEquals( 88,
-                           files.size() );
-   }
-
-   @Test
-   public void testComputeFilesListWithEmptySourceFolder() throws PMDException
-   {
-      final Map< String, IFlexFile > files = FileUtils.computeFilesList( new File( getTestDirectory().getAbsolutePath()
-                                                                               + "/" + "empty/emptyFolder" ),
-                                                                         null,
-                                                                         "",
-                                                                         null );
-
-      Assert.assertEquals( 1,
-                           files.size() );
-   }
-
-   @Test
-   public void testComputeFilesListWithoutSource()
-   {
-      try
-      {
-         FileUtils.computeFilesList( null,
-                                     null,
-                                     "",
-                                     null );
-         Assert.fail();
-      }
-      catch ( final PMDException e )
-      {
-         Assert.assertEquals( "sourceDirectory is not specified",
-                              e.getMessage() );
-      }
-   }
-
-   @Test
-   public void testComputeFilesListWithSourceFile() throws PMDException
-   {
-      final Map< String, IFlexFile > files = FileUtils.computeFilesList( new File( getTestFiles().get( "AbstractRowData.as" )
-                                                                                                 .getFilePath() ),
-                                                                         null,
-                                                                         "",
-                                                                         null );
-
-      Assert.assertEquals( 1,
-                           files.size() );
-   }
-
-   @Test
-   public void testComputeFilesListWithSourceList() throws PMDException
-   {
-      final List< File > sourceList = new ArrayList< File >();
-
-      sourceList.add( getTestDirectory() );
-      final Map< String, IFlexFile > files = FileUtils.computeFilesList( null,
-                                                                         sourceList,
-                                                                         "",
-                                                                         null );
-
-      Assert.assertEquals( 105,
-                           files.size() );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/FlexFileFactoryTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/FlexFileFactoryTest.java b/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/FlexFileFactoryTest.java
deleted file mode 100644
index 842f3e6..0000000
--- a/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/FlexFileFactoryTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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.files.impl;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.FlexPmdTestBase;
-import com.adobe.ac.pmd.files.IAs3File;
-import com.adobe.ac.pmd.files.IFlexFile;
-import com.adobe.ac.pmd.files.IMxmlFile;
-
-public class FlexFileFactoryTest extends FlexPmdTestBase
-{
-   @Test
-   public void testCreate()
-   {
-      assertTrue( "",
-                  create( new File( getTestFiles().get( "AbstractRowData.as" ).getFilePath() ),
-                          new File( "" ) ) instanceof IAs3File );
-      assertTrue( "",
-                  create( new File( getTestFiles().get( "Main.mxml" ).getFilePath() ),
-                          new File( "" ) ) instanceof IMxmlFile );
-      assertTrue( "",
-                  create( new File( getTestFiles().get( "com.adobe.ac.ncss.mxml.IterationsList.mxml" )
-                                                  .getFilePath() ),
-                          new File( "" ) ) instanceof IMxmlFile );
-   }
-
-   private IFlexFile create( final File sourceFile,
-                             final File sourceDirectory )
-   {
-      IFlexFile file;
-
-      if ( sourceFile.getName().endsWith( ".as" ) )
-      {
-         file = new As3File( sourceFile, sourceDirectory );
-      }
-      else
-      {
-         file = new MxmlFile( sourceFile, sourceDirectory );
-      }
-
-      return file;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/MxmlFileTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/MxmlFileTest.java b/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/MxmlFileTest.java
deleted file mode 100644
index e51bc29..0000000
--- a/FlexPMD/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/MxmlFileTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.files.impl;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import com.adobe.ac.pmd.FlexPmdTestBase;
-import com.adobe.ac.pmd.files.IMxmlFile;
-
-public class MxmlFileTest extends FlexPmdTestBase
-{
-   private IMxmlFile data;
-
-   @Before
-   public void setUp()
-   {
-      data = ( IMxmlFile ) getTestFiles().get( "Main.mxml" );
-   }
-
-   @Test
-   public void testGetActualScriptBlock()
-   {
-      assertEquals( Integer.valueOf( 4 ),
-                    Integer.valueOf( data.getActualScriptBlock().length ) );
-   }
-
-   @Test
-   public void testGetSingleLineComment()
-   {
-      assertEquals( "<!--",
-                    data.getSingleLineComment() );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/src/test/java/net/sourceforge/pmd/PMDExceptionTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/src/test/java/net/sourceforge/pmd/PMDExceptionTest.java b/FlexPMD/flex-pmd-files/src/test/java/net/sourceforge/pmd/PMDExceptionTest.java
deleted file mode 100644
index 550d982..0000000
--- a/FlexPMD/flex-pmd-files/src/test/java/net/sourceforge/pmd/PMDExceptionTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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 net.sourceforge.pmd;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-
-public class PMDExceptionTest
-{
-   @SuppressWarnings("deprecation")
-   @Test
-   public void testGetReason()
-   {
-      final Exception reason = new Exception();
-      final PMDException exception = new PMDException( "message", reason );
-
-      assertEquals( reason,
-                    exception.getReason() );
-   }
-
-   @Test
-   public void testPMDExceptionString()
-   {
-      assertEquals( "message",
-                    new PMDException( "message" ).getMessage() );
-   }
-
-   @Test
-   public void testPMDExceptionStringException()
-   {
-      final PMDException exception = new PMDException( "message", new Exception() );
-
-      assertEquals( "message",
-                    exception.getMessage() );
-   }
-
-   @Test
-   public void testSetSeverity()
-   {
-      final PMDException exception = new PMDException( "message" );
-
-      exception.setSeverity( 1 );
-      assertEquals( Integer.valueOf( 1 ),
-                    Integer.valueOf( exception.getSeverity() ) );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/.checkstyle
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/.checkstyle b/FlexPMD/flex-pmd-flex-lib/.checkstyle
deleted file mode 100644
index a34f4bb..0000000
--- a/FlexPMD/flex-pmd-flex-lib/.checkstyle
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-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.
-
--->
-<fileset-config file-format-version="1.2.0" simple-config="true">
-    <fileset name="all" enabled="true" check-config-name="Ac" local="false">
-        <file-match-pattern match-pattern="." include-pattern="true"/>
-    </fileset>
-</fileset-config>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/.externalToolBuilders/org.maven.ide.eclipse.maven2Builder.launch
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/.externalToolBuilders/org.maven.ide.eclipse.maven2Builder.launch b/FlexPMD/flex-pmd-flex-lib/.externalToolBuilders/org.maven.ide.eclipse.maven2Builder.launch
deleted file mode 100644
index 850ec2f..0000000
--- a/FlexPMD/flex-pmd-flex-lib/.externalToolBuilders/org.maven.ide.eclipse.maven2Builder.launch
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-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.
-
--->
-<launchConfiguration type="org.maven.ide.eclipse.Maven2BuilderConfigurationType">
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.maven.ide.eclipse.maven2Builder"/>
-<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/pom.xml b/FlexPMD/flex-pmd-flex-lib/pom.xml
deleted file mode 100644
index 618220b..0000000
--- a/FlexPMD/flex-pmd-flex-lib/pom.xml
+++ /dev/null
@@ -1,207 +0,0 @@
-<!--
-
-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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-flex-lib</artifactId>
-	<packaging>swc</packaging>
-	<name>Adobe Flex PMD Flex lib</name>
-	<description>Adobe Flex PMD Flex library containing shared classes</description>
-
-	<parent>
-		<artifactId>flex-pmd-flex-parent</artifactId>
-		<groupId>com.adobe.ac</groupId>
-		<version>1.3-SNAPSHOT</version>
-		<relativePath>../flex-pmd-flex-parent/pom.xml</relativePath>
-	</parent>
-
-	<dependencies>
-
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<artifactId>flex-pmd-ruleset</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>com.adobe.cairngorm</groupId>
-			<artifactId>event-source</artifactId>
-			<version>${event-source.version}</version>
-			<type>swc</type>
-			<scope>test</scope>
-		</dependency>
-
-		<dependency>
-			<groupId>com.adobe.cairngorm</groupId>
-			<artifactId>cairngorm</artifactId>
-			<version>${cairngorm.version}</version>
-			<type>swc</type>
-		</dependency>
-
-		<!-- flex sdk dependencies -->
-
-		<dependency>
-			<groupId>com.adobe.flex.framework</groupId>
-			<artifactId>flex-framework</artifactId>
-			<version>${flex.version}</version>
-			<type>pom</type>
-			<exclusions>
-				<exclusion>
-					<groupId>com.adobe.flex.framework</groupId>
-					<artifactId>playerglobal</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-
-		<dependency>
-			<groupId>com.adobe.flex.framework</groupId>
-			<artifactId>playerglobal</artifactId>
-			<version>${flash-player.version}-${flex.version}</version>
-			<type>swc</type>
-		</dependency>
-
-		<dependency>
-			<groupId>com.adobe.flex.framework</groupId>
-			<artifactId>datavisualization</artifactId>
-			<version>${flex.version}</version>
-			<type>swc</type>
-		</dependency>
-
-		<dependency>
-			<groupId>com.adobe.flex.framework</groupId>
-			<artifactId>datavisualization</artifactId>
-			<version>${flex.version}</version>
-			<type>rb.swc</type>
-			<classifier>en_US</classifier>
-		</dependency>
-
-		<!-- flexmojos Unit testing support -->
-		<dependency>
-			<groupId>org.sonatype.flexmojos</groupId>
-			<artifactId>flexmojos-unittest-support</artifactId>
-			<version>${flex-mojos-plugin.version}</version>
-			<type>swc</type>
-			<scope>test</scope>
-			<exclusions>
-				<exclusion>
-					<groupId>com.adobe.flex.framework</groupId>
-					<artifactId>playerglobal</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-
-	</dependencies>
-
-	<build>
-		<sourceDirectory>src/main/flex</sourceDirectory>
-		<testSourceDirectory>src/test/flex</testSourceDirectory>
-		<resources>
-			<resource>
-				<directory>src/main/resources</directory>
-			</resource>
-		</resources>
-		<testResources>
-			<testResource>
-				<directory>src/test/resources</directory>
-			</testResource>
-		</testResources>
-
-		<plugins>
-
-			<plugin>
-				<artifactId>maven-antrun-plugin</artifactId>
-				<version>${ant-run-plugin.version}</version>
-				<executions>
-					<execution>
-						<id>copy-version-as</id>
-						<phase>process-resources</phase>
-						<configuration>
-							<tasks>
-								<tstamp>
-									<format property="last.updated.date" pattern="yyyy-MM-dd" />
-									<format property="last.updated.time" pattern="HH:mm:ss" />
-								</tstamp>
-								<echo message="Generating Version.as..." />
-								<echo file="${basedir}/src/main/flex/Version.as" append="false" message="package" />
-								<echo file="${basedir}/src/main/flex/Version.as" append="true" message="{" />
-								<echo file="${basedir}/src/main/flex/Version.as" append="true" message=" public class Version" />
-								<echo file="${basedir}/src/main/flex/Version.as" append="true" message=" {" />
-								<echo file="${basedir}/src/main/flex/Version.as" append="true" message=" public static const BUILD_NUMBER : String = '${project.version}';" />
-								<echo file="${basedir}/src/main/flex/Version.as" append="true" message=" public static const BUILD_TIME : String = '${last.updated.time}';" />
-								<echo file="${basedir}/src/main/flex/Version.as" append="true" message=" public static const BUILD_DATE : String = '${last.updated.date}';" />
-								<echo file="${basedir}/src/main/flex/Version.as" append="true" message=" }" />
-								<echo file="${basedir}/src/main/flex/Version.as" append="true" message="}" />
-							</tasks>
-						</configuration>
-						<goals>
-							<goal>run</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-
-			<plugin>
-				<groupId>org.sonatype.flexmojos</groupId>
-				<artifactId>flexmojos-maven-plugin</artifactId>
-				<version>${flex-mojos-plugin.version}</version>
-				<extensions>true</extensions>
-				<configuration>
-					<targetPlayer>${flash-player.version}.0.0</targetPlayer>
-				</configuration>
-			</plugin>
-
-		</plugins>
-	</build>
-
-	<repositories>
-		<repository>
-			<id>flexmojos-repository</id>
-			<url>http://repository.sonatype.org/content/groups/public/</url>
-		</repository>
-	</repositories>
-	<pluginRepositories>
-		<pluginRepository>
-			<id>flexmojos-repository</id>
-			<url>http://repository.sonatype.org/content/groups/public/</url>
-		</pluginRepository>
-	</pluginRepositories>
-
-	<reporting>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-surefire-report-plugin</artifactId>
-				<configuration>
-					<reportsDirectory>surefire-reports</reportsDirectory>
-				</configuration>
-			</plugin>
-
-			<plugin>
-				<groupId>${project.groupId}</groupId>
-				<artifactId>flex-pmd-maven-plugin</artifactId>
-				<version>${project.parent.version}</version>
-				<configuration>
-					<failOnError>true</failOnError>
-				</configuration>
-			</plugin>
-
-		</plugins>
-	</reporting>
-
-</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/model/IDomainModel.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/model/IDomainModel.as b/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/model/IDomainModel.as
deleted file mode 100644
index beb6097..0000000
--- a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/model/IDomainModel.as
+++ /dev/null
@@ -1,26 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.model
-{
-
-   public interface IDomainModel
-   {
-      // Marker interface for Domain Model
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/model/IPresentationModel.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/model/IPresentationModel.as b/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/model/IPresentationModel.as
deleted file mode 100644
index f0ee7c2..0000000
--- a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/model/IPresentationModel.as
+++ /dev/null
@@ -1,26 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.model
-{
-
-   public interface IPresentationModel
-   {
-      // Marker interface for Presentation Model
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/api/IGetRulesetContent.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/api/IGetRulesetContent.as b/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/api/IGetRulesetContent.as
deleted file mode 100644
index 1e2d5d1..0000000
--- a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/api/IGetRulesetContent.as
+++ /dev/null
@@ -1,28 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.api
-{
-   import com.adobe.ac.pmd.model.Ruleset;
-
-   public interface IGetRulesetContent
-   {
-      function getRulesetContent( ref : String ) : void;
-      function onReceiveRulesetContent( ruleset : Ruleset ) : void;
-   }
-}
\ No newline at end of file


[09/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/ImportFromSamePackageRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/ImportFromSamePackageRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/ImportFromSamePackageRule.java
new file mode 100644
index 0000000..ef71b6d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/ImportFromSamePackageRule.java
@@ -0,0 +1,61 @@
+/*
+ * 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 org.apache.commons.lang.StringUtils;
+
+import com.adobe.ac.pmd.nodes.IPackage;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class ImportFromSamePackageRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IPackage)
+    */
+   @Override
+   protected final void findViolations( final IPackage packageNode )
+   {
+      final String packageName = packageNode.getName();
+
+      for ( final IParserNode importNode : packageNode.getImports() )
+      {
+         if ( StringUtils.substringBeforeLast( importNode.toString(),
+                                               "." ).equals( packageName ) )
+         {
+            addViolation( importNode );
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/OverLongLineRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/OverLongLineRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/OverLongLineRule.java
new file mode 100644
index 0000000..1e80663
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/OverLongLineRule.java
@@ -0,0 +1,114 @@
+/*
+ * 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.util.ArrayList;
+import java.util.List;
+
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.AbstractMaximizedFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public class OverLongLineRule extends AbstractMaximizedFlexRule
+{
+   private static final int DEFAULT_THRESHOLD = 120;
+   private int              currentLineLength;
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#findViolationsInCurrentFile()
+    */
+   @Override
+   public final List< IFlexViolation > findViolationsInCurrentFile()
+   {
+      final List< IFlexViolation > violations = new ArrayList< IFlexViolation >();
+
+      if ( isConcernedByTheCurrentFile() )
+      {
+         final IFlexFile currentFile = getCurrentFile();
+
+         for ( int i = 1; i <= currentFile.getLinesNb(); i++ )
+         {
+            final String line = currentFile.getLineAt( i );
+
+            if ( !line.trim().startsWith( "import" )
+                  && line.length() > getThreshold() )
+            {
+               currentLineLength = line.length();
+               final ViolationPosition position = ViolationPosition.create( i,
+                                                                            i,
+                                                                            0,
+                                                                            currentLineLength );
+
+               addViolation( violations,
+                             position );
+            }
+         }
+      }
+      return violations;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#
+    * getActualValueForTheCurrentViolation()
+    */
+   @Override
+   public final int getActualValueForTheCurrentViolation()
+   {
+      return currentLineLength;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getDefaultThreshold
+    * ()
+    */
+   @Override
+   public final int getDefaultThreshold()
+   {
+      return DEFAULT_THRESHOLD;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   protected boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/TabUsedAsIndentorRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/TabUsedAsIndentorRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/TabUsedAsIndentorRule.java
new file mode 100644
index 0000000..37f44a3
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/TabUsedAsIndentorRule.java
@@ -0,0 +1,48 @@
+/*
+ * 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.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+public class TabUsedAsIndentorRule extends AbstractRegexpBasedRule
+{
+
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   @Override
+   protected String getRegexp()
+   {
+      return "^ *\t.*";
+   }
+
+   @Override
+   protected boolean isConcernedByTheCurrentFile()
+   {
+      return !getCurrentFile().isMxml();
+   }
+
+   @Override
+   protected boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      return true;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/IdenticalSwitchCasesRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/IdenticalSwitchCasesRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/IdenticalSwitchCasesRule.java
new file mode 100644
index 0000000..fad7a45
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/IdenticalSwitchCasesRule.java
@@ -0,0 +1,73 @@
+/*
+ * 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.switchrules;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class IdenticalSwitchCasesRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitSwitch(com.adobe.
+    * ac.pmd.parser.IParserNode)
+    */
+   @Override
+   protected final void visitSwitch( final IParserNode ast )
+   {
+      super.visitSwitch( ast );
+
+      if ( ast.numChildren() > 0 )
+      {
+         final Map< String, IParserNode > cases = new LinkedHashMap< String, IParserNode >();
+
+         for ( final IParserNode caseStatement : ast.getChild( 1 ).getChildren() )
+         {
+            final String label = caseStatement.getChild( 0 ).toString();
+
+            if ( cases.containsKey( label ) )
+            {
+               addViolation( caseStatement );
+               break;
+            }
+            else
+            {
+               cases.put( label,
+                          caseStatement );
+            }
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/NestedSwitchRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/NestedSwitchRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/NestedSwitchRule.java
new file mode 100644
index 0000000..38dd7e5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/NestedSwitchRule.java
@@ -0,0 +1,58 @@
+/*
+ * 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.switchrules;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class NestedSwitchRule extends AbstractAstFlexRule
+{
+   private int switchLevel = 0;
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitSwitch(com.adobe.
+    * ac.pmd.parser.IParserNode)
+    */
+   @Override
+   protected final void visitSwitch( final IParserNode ast )
+   {
+      switchLevel++;
+      if ( switchLevel > 1 )
+      {
+         addViolation( ast );
+      }
+      super.visitSwitch( ast );
+
+      switchLevel--;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/NonBreakableSwitchCaseRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/NonBreakableSwitchCaseRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/NonBreakableSwitchCaseRule.java
new file mode 100644
index 0000000..3697903
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/NonBreakableSwitchCaseRule.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.switchrules;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+public class NonBreakableSwitchCaseRule extends AbstractAstFlexRule
+{
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   @Override
+   protected void visitSwitchCase( final IParserNode switchCaseNode )
+   {
+      if ( switchCaseNode.getChildren() != null
+            && switchCaseNode.getChildren().size() > 0
+            && switchCaseNode.getLastChild().getStringValue().compareTo( "break" ) != 0 )
+      {
+         addViolation( switchCaseNode );
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/SwitchStatementsShouldHaveDefaultRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/SwitchStatementsShouldHaveDefaultRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/SwitchStatementsShouldHaveDefaultRule.java
new file mode 100644
index 0000000..163333e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/SwitchStatementsShouldHaveDefaultRule.java
@@ -0,0 +1,75 @@
+/*
+ * 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.switchrules;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class SwitchStatementsShouldHaveDefaultRule extends AbstractAstFlexRule
+{
+   private boolean defaultStatementFound = false;
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitSwitch(com.adobe.
+    * ac.pmd.parser.IParserNode)
+    */
+   @Override
+   protected final void visitSwitch( final IParserNode ast )
+   {
+      super.visitSwitch( ast );
+
+      if ( !defaultStatementFound )
+      {
+         ast.getChild( 1 );
+
+         addViolation( ast );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitSwitchDefaultCase
+    * (com.adobe.ac.pmd.parser.IParserNode)
+    */
+   @Override
+   protected final void visitSwitchDefaultCase( final IParserNode child )
+   {
+      super.visitSwitchDefaultCase( child );
+
+      if ( child.numChildren() != 0 )
+      {
+         defaultStatementFound = true;
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/TooFewBrancheInSwitchStatementRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/TooFewBrancheInSwitchStatementRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/TooFewBrancheInSwitchStatementRule.java
new file mode 100644
index 0000000..2f4aae9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/switchrules/TooFewBrancheInSwitchStatementRule.java
@@ -0,0 +1,144 @@
+/*
+ * 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.switchrules;
+
+import java.util.Map;
+
+import net.sourceforge.pmd.PropertyDescriptor;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule;
+
+/**
+ * @author xagnetti
+ */
+public class TooFewBrancheInSwitchStatementRule extends AbstractAstFlexRule implements IThresholdedRule
+{
+   public static final int DEFAULT_THRESHOLD = 3;
+   private int             switchCases;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#
+    * getActualValueForTheCurrentViolation()
+    */
+   public final int getActualValueForTheCurrentViolation()
+   {
+      return switchCases;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getDefaultThreshold
+    * ()
+    */
+   public final int getDefaultThreshold()
+   {
+      return DEFAULT_THRESHOLD;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getThreshold()
+    */
+   public final int getThreshold()
+   {
+      return getIntProperty( propertyDescriptorFor( getThresholdName() ) );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getThresholdName
+    * ()
+    */
+   public final String getThresholdName()
+   {
+      return MINIMUM;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.CommonAbstractRule#propertiesByName()
+    */
+   @Override
+   protected final Map< String, PropertyDescriptor > propertiesByName()
+   {
+      return getThresholdedRuleProperties( this );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitSwitch(com.adobe.
+    * ac.pmd.parser.IParserNode)
+    */
+   @Override
+   protected final void visitSwitch( final IParserNode ast )
+   {
+      switchCases = 0;
+
+      super.visitSwitch( ast );
+
+      if ( switchCases < getThreshold() )
+      {
+         addViolation( ast );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitSwitchCase(com.adobe
+    * .ac.pmd.parser.IParserNode)
+    */
+   @Override
+   protected final void visitSwitchCase( final IParserNode child )
+   {
+      super.visitSwitchCase( child );
+
+      switchCases++;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitSwitchDefaultCase
+    * (com.adobe.ac.pmd.parser.IParserNode)
+    */
+   @Override
+   protected void visitSwitchDefaultCase( final IParserNode defaultCaseNode )
+   {
+      super.visitSwitchDefaultCase( defaultCaseNode );
+
+      switchCases++;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/AbstractUnusedVariableRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/AbstractUnusedVariableRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/AbstractUnusedVariableRule.java
new file mode 100644
index 0000000..63640b2
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/AbstractUnusedVariableRule.java
@@ -0,0 +1,130 @@
+/*
+ * 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.unused;
+
+import java.util.Map;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.NodeKind;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+
+/**
+ * @author xagnetti
+ */
+abstract class AbstractUnusedVariableRule extends AbstractAstFlexRule
+{
+   private Map< String, IParserNode > variablesUnused;
+
+   /**
+    * @param variableName
+    * @param ast
+    */
+   protected final void addVariable( final String variableName,
+                                     final IParserNode ast )
+   {
+      variablesUnused.put( variableName,
+                           ast );
+   }
+
+   /**
+    * @return
+    */
+   protected Map< String, IParserNode > getVariablesUnused()
+   {
+      return variablesUnused;
+   }
+
+   /**
+    * @param variablesUnusedToBeSet
+    */
+   protected void setVariablesUnused( final Map< String, IParserNode > variablesUnusedToBeSet )
+   {
+      variablesUnused = variablesUnusedToBeSet;
+   }
+
+   /**
+    * @param ast
+    */
+   protected final void tryToAddVariableNodeInChildren( final IParserNode ast )
+   {
+      if ( ast != null
+            && !tryToAddVariableNode( ast ) && ast.is( NodeKind.VAR_LIST ) )
+      {
+         for ( final IParserNode child : ast.getChildren() )
+         {
+            tryToAddVariableNode( child );
+         }
+      }
+   }
+
+   /**
+    * @param ast
+    */
+   protected final void tryToMarkVariableAsUsed( final IParserNode ast )
+   {
+      if ( variablesUnused != null
+            && ast != null )
+      {
+         markVariableAsUsed( ast );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitStatement(com.adobe
+    * .ac.pmd.parser.IParserNode)
+    */
+   @Override
+   protected void visitStatement( final IParserNode ast )
+   {
+      super.visitStatement( ast );
+
+      tryToMarkVariableAsUsed( ast );
+   }
+
+   private void markVariableAsUsed( final IParserNode ast )
+   {
+      if ( ast.numChildren() == 0 )
+      {
+         if ( variablesUnused.containsKey( ast.getStringValue() ) )
+         {
+            variablesUnused.remove( ast.getStringValue() );
+         }
+      }
+      else
+      {
+         for ( final IParserNode child : ast.getChildren() )
+         {
+            markVariableAsUsed( child );
+         }
+      }
+   }
+
+   private boolean tryToAddVariableNode( final IParserNode ast )
+   {
+      boolean result = false;
+
+      if ( ast.is( NodeKind.NAME_TYPE_INIT ) )
+      {
+         addVariable( ast.getChild( 0 ).getStringValue(),
+                      ast );
+         result = true;
+      }
+      return result;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/EmptyPrivateMethodRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/EmptyPrivateMethodRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/EmptyPrivateMethodRule.java
new file mode 100644
index 0000000..f9805c1
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/EmptyPrivateMethodRule.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.unused;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.Modifier;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+public class EmptyPrivateMethodRule extends AbstractAstFlexRule
+{
+   @Override
+   protected final void findViolations( final IFunction function )
+   {
+      if ( function.is( Modifier.PRIVATE )
+            && function.getBody().numChildren() == 0 )
+      {
+         addViolation( function );
+      }
+   }
+
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/UnusedFieldRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/UnusedFieldRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/UnusedFieldRule.java
new file mode 100644
index 0000000..c6bc6fd
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/UnusedFieldRule.java
@@ -0,0 +1,128 @@
+/*
+ * 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.unused;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.KeyWords;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class UnusedFieldRule extends AbstractUnusedVariableRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#isConcernedByTheCurrentFile
+    * ()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return !getCurrentFile().isMxml();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitClass(com.adobe.ac
+    * .pmd.parser.IParserNode)
+    */
+   @Override
+   protected final void visitClass( final IParserNode classNode )
+   {
+      setVariablesUnused( new LinkedHashMap< String, IParserNode >() );
+
+      super.visitClass( classNode );
+
+      for ( final String variableName : getVariablesUnused().keySet() )
+      {
+         final IParserNode variable = getVariablesUnused().get( variableName );
+
+         addViolation( variable,
+                       variable,
+                       variableName );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitVariableInitialization
+    * (com.adobe.ac.pmd.parser.IParserNode)
+    */
+   @Override
+   protected final void visitVariableInitialization( final IParserNode node )
+   {
+      super.visitVariableInitialization( node );
+
+      tryToMarkVariableAsUsed( node );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitVarOrConstList(com
+    * .adobe.ac.pmd.parser.IParserNode,
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule.VariableOrConstant,
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule.VariableScope)
+    */
+   @Override
+   protected final void visitVarOrConstList( final IParserNode ast,
+                                             final VariableOrConstant varOrConst,
+                                             final VariableScope scope )
+   {
+      if ( scope.equals( VariableScope.IN_CLASS ) )
+      {
+         final List< IParserNode > modifiers = ast.getChild( 0 ).getChildren();
+         boolean isPrivate = false;
+
+         if ( !modifiers.isEmpty() )
+         {
+            for ( final IParserNode modifierNode : modifiers )
+            {
+               if ( modifierNode.getStringValue().equals( KeyWords.PRIVATE.toString() ) )
+               {
+                  isPrivate = true;
+                  break;
+               }
+            }
+         }
+         if ( isPrivate )
+         {
+            tryToAddVariableNodeInChildren( ast );
+         }
+      }
+      super.visitVarOrConstList( ast,
+                                 varOrConst,
+                                 scope );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/UnusedLocalVariableRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/UnusedLocalVariableRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/UnusedLocalVariableRule.java
new file mode 100644
index 0000000..64df71a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/UnusedLocalVariableRule.java
@@ -0,0 +1,76 @@
+/*
+ * 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.unused;
+
+import java.util.LinkedHashMap;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class UnusedLocalVariableRule extends AbstractUnusedVariableRule
+{
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitFunction(com.adobe
+    * .ac.pmd.parser.IParserNode,
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule.FunctionType)
+    */
+   @Override
+   protected final void visitFunction( final IParserNode ast,
+                                       final FunctionType type )
+   {
+      setVariablesUnused( new LinkedHashMap< String, IParserNode >() );
+
+      super.visitFunction( ast,
+                           type );
+      for ( final String variableName : getVariablesUnused().keySet() )
+      {
+         final IParserNode variable = getVariablesUnused().get( variableName );
+
+         addViolation( variable,
+                       variable,
+                       variableName );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.unused.AbstractUnusedVariableRule#visitStatement
+    * (com.adobe.ac.pmd.parser.IParserNode)
+    */
+   @Override
+   protected final void visitStatement( final IParserNode ast )
+   {
+      super.visitStatement( ast );
+      tryToAddVariableNodeInChildren( ast );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/UnusedParameterRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/UnusedParameterRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/UnusedParameterRule.java
new file mode 100644
index 0000000..305def5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/UnusedParameterRule.java
@@ -0,0 +1,239 @@
+/*
+ * 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.unused;
+
+import java.util.LinkedHashMap;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.KeyWords;
+import com.adobe.ac.pmd.parser.NodeKind;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.parsley.utils.ParsleyMetaData;
+import com.adobe.ac.pmd.rules.parsley.utils.MetaDataTag.Location;
+
+/**
+ * @author xagnetti
+ */
+public class UnusedParameterRule extends AbstractUnusedVariableRule
+{
+   private static final String DATA_GRID_COLUMN         = "DataGridColumn";
+   private static final String FAULT_FUNCTION_NAME      = "fault";
+   private static final String RESPONDER_INTERFACE_NAME = "Responder";
+   private static final String RESULT_FUNCTION_NAME     = "result";
+
+   private static String computeFunctionName( final IParserNode functionAst )
+   {
+      String functionName = "";
+      for ( final IParserNode node : functionAst.getChildren() )
+      {
+         if ( node.is( NodeKind.NAME ) )
+         {
+            functionName = node.getStringValue();
+            break;
+         }
+      }
+      return functionName;
+   }
+
+   private static boolean isClassImplementingIResponder( final IParserNode currentClass2 )
+   {
+      for ( final IParserNode node : currentClass2.getChildren() )
+      {
+         if ( node.is( NodeKind.IMPLEMENTS_LIST ) )
+         {
+            for ( final IParserNode implementation : node.getChildren() )
+            {
+               if ( implementation.getStringValue() != null
+                     && implementation.getStringValue().contains( RESPONDER_INTERFACE_NAME ) )
+               {
+                  return true;
+               }
+            }
+         }
+      }
+      return false;
+   }
+
+   private static boolean isResponderImplementation( final IParserNode currentClass,
+                                                     final IParserNode functionAst )
+   {
+      if ( !isClassImplementingIResponder( currentClass ) )
+      {
+         return false;
+      }
+      final String functionName = computeFunctionName( functionAst );
+
+      return RESULT_FUNCTION_NAME.compareTo( functionName ) == 0
+            || FAULT_FUNCTION_NAME.compareTo( functionName ) == 0;
+   }
+
+   private IParserNode currentClass;
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitClass(com.adobe.ac
+    * .pmd.parser.IParserNode)
+    */
+   @Override
+   protected final void visitClass( final IParserNode classNode )
+   {
+      currentClass = classNode;
+      super.visitClass( classNode );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitFunction(com.adobe
+    * .ac.pmd.parser.IParserNode,
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule.FunctionType)
+    */
+   @Override
+   protected final void visitFunction( final IParserNode functionAst,
+                                       final FunctionType type )
+   {
+      setVariablesUnused( new LinkedHashMap< String, IParserNode >() );
+      final boolean isOverriden = isFunctionOverriden( functionAst );
+
+      if ( !isOverriden
+            && !isResponderImplementation( currentClass,
+                                           functionAst ) && !isParsleyFunction( functionAst ) )
+      {
+         super.visitFunction( functionAst,
+                              type );
+
+         if ( !functionIsEventHandler( functionAst ) )
+         {
+            for ( final String variableName : getVariablesUnused().keySet() )
+            {
+               final IParserNode variable = getVariablesUnused().get( variableName );
+
+               addViolation( variable,
+                             variable,
+                             variableName );
+            }
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitParameters(com.adobe
+    * .ac.pmd.parser.IParserNode)
+    */
+   @Override
+   protected final void visitParameters( final IParserNode ast )
+   {
+      super.visitParameters( ast );
+
+      if ( ast.numChildren() != 0 )
+      {
+         for ( final IParserNode parameterNode : ast.getChildren() )
+         {
+            if ( !isParameterAnEvent( parameterNode )
+                  && parameterNode.numChildren() > 0
+                  && parameterNode.getChild( 0 ).numChildren() > 1
+                  && parameterNode.getChild( 0 ).getChild( 1 ).getStringValue().compareTo( DATA_GRID_COLUMN ) != 0 )
+            {
+               addVariable( parameterNode.getChild( 0 ).getChild( 0 ).getStringValue(),
+                            parameterNode );
+            }
+         }
+      }
+   }
+
+   private String extractFunctionName( final IParserNode ast )
+   {
+      if ( ast.numChildren() != 0 )
+      {
+         for ( final IParserNode node : ast.getChildren() )
+         {
+            if ( node.is( NodeKind.NAME ) )
+            {
+               return node.getStringValue();
+            }
+         }
+      }
+      return "";
+   }
+
+   private boolean functionIsEventHandler( final IParserNode ast )
+   {
+      final String functionName = extractFunctionName( ast );
+
+      return functionName.startsWith( "on" )
+            || functionName.startsWith( "handle" ) || functionName.endsWith( "handler" );
+   }
+
+   private boolean isFunctionOverriden( final IParserNode ast )
+   {
+      for ( final IParserNode child : ast.getChildren() )
+      {
+         if ( child.is( NodeKind.MOD_LIST ) )
+         {
+            for ( final IParserNode mod : child.getChildren() )
+            {
+               if ( mod.getStringValue().equals( KeyWords.OVERRIDE.toString() ) )
+               {
+                  return true;
+               }
+            }
+         }
+      }
+      return false;
+   }
+
+   private boolean isParameterAnEvent( final IParserNode parameterNode )
+   {
+      final IParserNode parameterType = getTypeFromFieldDeclaration( parameterNode );
+
+      return parameterType != null
+            && parameterType.getStringValue() != null && parameterType.getStringValue().contains( "Event" );
+   }
+
+   private boolean isParsleyFunction( final IParserNode functionAst )
+   {
+      for ( final IParserNode child : functionAst.getChildren() )
+      {
+         if ( child.is( NodeKind.META_LIST ) )
+         {
+            for ( final IParserNode metaDataChild : child.getChildren() )
+            {
+               if ( metaDataChild.getStringValue() != null
+                     && ParsleyMetaData.getPossibleMetaDataFromLocation( Location.FUNCTION )
+                                       .containsKey( metaDataChild.getStringValue() ) )
+               {
+                  return true;
+               }
+            }
+         }
+      }
+      return false;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/UnusedPrivateMethodRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/UnusedPrivateMethodRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/UnusedPrivateMethodRule.java
new file mode 100644
index 0000000..6637b4f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/unused/UnusedPrivateMethodRule.java
@@ -0,0 +1,183 @@
+/*
+ * 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.unused;
+
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import com.adobe.ac.pmd.files.IAs3File;
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IConstant;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.IVariable;
+import com.adobe.ac.pmd.nodes.Modifier;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class UnusedPrivateMethodRule extends AbstractAstFlexRule
+{
+   private Map< String, IFunction > privateFunctions = null;
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNode )
+   {
+      fillPrivateFunctions( classNode.getFunctions() );
+      findUnusedFunction( classNode.getBlock() );
+
+      super.findViolations( classNode );
+
+      addViolations();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(java.util
+    * .List)
+    */
+   @Override
+   protected final void findViolations( final List< IFunction > functions )
+   {
+      super.findViolations( functions );
+
+      for ( final IFunction function : functions )
+      {
+         findUnusedFunction( function.getBody() );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromAttributes
+    * (java.util.List)
+    */
+   @Override
+   protected void findViolationsFromAttributes( final List< IAttribute > variables )
+   {
+      super.findViolationsFromAttributes( variables );
+
+      findViolationsFromVariables( variables );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromConstants
+    * (java.util.List)
+    */
+   @Override
+   protected void findViolationsFromConstants( final List< IConstant > constants )
+   {
+      super.findViolationsFromConstants( constants );
+
+      findViolationsFromVariables( constants );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   private void addViolations()
+   {
+      final Set< Integer > ignoredLines = new HashSet< Integer >();
+
+      for ( final String functionName : privateFunctions.keySet() )
+      {
+         final IFunction function = privateFunctions.get( functionName );
+         ignoredLines.clear();
+         ignoredLines.add( getNameFromFunctionDeclaration( function.getInternalNode() ).getLine() );
+
+         if ( getCurrentFile() instanceof IAs3File
+               || !getCurrentFile().contains( functionName,
+                                              ignoredLines ) )
+         {
+            addViolation( function );
+         }
+      }
+   }
+
+   private void fillPrivateFunctions( final List< IFunction > functions )
+   {
+      privateFunctions = new LinkedHashMap< String, IFunction >();
+
+      for ( final IFunction function : functions )
+      {
+         if ( function.is( Modifier.PRIVATE ) )
+         {
+            privateFunctions.put( function.getName(),
+                                  function );
+         }
+      }
+   }
+
+   private void findUnusedFunction( final IParserNode body )
+   {
+      if ( body != null )
+      {
+         if ( body.getStringValue() != null )
+         {
+            for ( final String functionName : privateFunctions.keySet() )
+            {
+               if ( body.getStringValue().equals( functionName ) )
+               {
+                  privateFunctions.remove( functionName );
+                  break;
+               }
+            }
+         }
+         if ( body.numChildren() != 0 )
+         {
+            for ( final IParserNode child : body.getChildren() )
+            {
+               findUnusedFunction( child );
+            }
+         }
+      }
+   }
+
+   private void findViolationsFromVariables( final List< ? extends IVariable > variables )
+   {
+      for ( final IVariable constant : variables )
+      {
+         if ( constant.getInitializationExpression() != null )
+         {
+            findUnusedFunction( constant.getInitializationExpression().getInternalNode() );
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/all_flex.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/all_flex.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/all_flex.xml
new file mode 100644
index 0000000..814086d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/all_flex.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="All Flex Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+
+	<description>Every Flex Rule in FlexPMD</description>
+
+	<rule ref="com/adobe/ac/pmd/rulesets/architecture.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/asdocs.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/basic_mxml.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/binding.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/cairngorm.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/component.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/css.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/empty.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/event.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/indentation.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/maintanability.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/multitouch.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/naming.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/parsley.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/performance.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/sizing.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/style.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/switches.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/unittest.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/unused.xml" />
+
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/default_flex.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/default_flex.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/default_flex.xml
new file mode 100644
index 0000000..ef8fd61
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/default_flex.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Default Flex Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+
+	<description>Every Flex Rule in FlexPMD</description>
+
+	<rule ref="com/adobe/ac/pmd/rulesets/architecture.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/basic_mxml.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/binding.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/cairngorm.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/component.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/css.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/empty.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/event.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/maintanability.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/naming.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/parsley.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/performance.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/security.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/sizing.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/style.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/switches.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/unittest.xml" />
+	<rule ref="com/adobe/ac/pmd/rulesets/unused.xml" />
+
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/architecture.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/architecture.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/architecture.xml
new file mode 100644
index 0000000..82adbe2
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/architecture.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Architecture Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	
+	<description>
+      The Architecture ruleset contains a collection of good practices around architecture.
+	</description>
+	
+	<rule class="com.adobe.ac.pmd.rules.architecture.ViewComponentReferencedInModelRule"
+		message="A view component should not be referenced in a model class">
+		<description></description>
+		<priority>3</priority>
+		<example>
+package com.adobe.ac
+{
+   import mx.controls.ComboBox; // VIOLATION
+
+   public class MyModelClass
+   {
+   }
+} 		
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.architecture.MonkeyPatchingRule"
+		message="This class looks to be duplicated with a SDK class">
+		<description>Monkey patching can be a risky undertaking because it is not using intended extensibility points and thus may have unintended consequences or make migration to newer versions of the SDK more difficult</description>
+		<priority>1</priority>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.architecture.UseInternalClassOutsideApiClass"
+		message="This class imports an internal class ({0}) from another function area ({1})">
+		<description>If you have different functionalities, you probably don't want every class of each to be accessible from any other functional areas.
+So you probably want to use this packaging:
+[org].[project].func1.api
+[org].[project].func1.restricted
+[org].[project].func2.api
+[org].[project].func2.restricted
+This rule makes sure that no restricted classes is accessed from outside its own function area.
+ </description>
+		<priority>1</priority>
+		<example>
+package functional
+{
+	import functional.func1.api.Func1ExposedClass;
+	import functional.func1.restricted.Func1RestrictedClass; // VIOLATION
+	import functional.func2.api.Func2ExposedClass;
+	import functional.func2.restricted.Func2RestrictedClass; // VIOLATION
+	
+	public class FunctionClient
+	{
+	}
+}
+package functional.func1.api
+
+{
+	import functional.func1.restricted.Func1RestrictedClass; 
+	import functional.func2.api.Func2ExposedClass;
+	import functional.func2.restricted.Func2RestrictedClass; // VIOLATION
+	
+	public class Func1ExposedClass
+	{
+	}
+}
+package functional.func1.restricted
+{
+	import functional.func1.api.Func1ExposedClass;
+	import functional.func2.api.Func2ExposedClass;
+	import functional.func2.restricted.Func2RestrictedClass; // VIOLATION
+	
+	public class Func1RestrictedClass
+	{
+	}
+}
+package functional.func2.api
+{
+	import functional.func1.api.Func1ExposedClass;
+	import functional.func1.restricted.Func1RestrictedClass; // VIOLATION
+	import functional.func2.restricted.Func2RestrictedClass;
+	
+	public class Func2ExposedClass
+	{
+	}
+}
+package functional.func2.restricted
+{
+	import functional.func1.api.Func1ExposedClass;
+	import functional.func1.restricted.Func1RestrictedClass; // VIOLATION
+	import functional.func2.api.Func2ExposedClass;
+	
+	public class Func2RestrictedClass
+	{
+	}
+}		
+		</example>
+	</rule>
+
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/asdocs.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/asdocs.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/asdocs.xml
new file mode 100644
index 0000000..3877230
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/asdocs.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset 
+	name="AsDocs Rules" 
+	xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
+	>
+
+	<description>
+      The AsDocs Ruleset contains a collection of good practices related to AsDocs.
+    </description>
+    
+	<rule 
+		class="com.adobe.ac.pmd.rules.asdocs.AttributeAsDocMissingRule"
+		message="This attribute ({0}) should be documented with AsDocs.">
+		<priority>3</priority>
+	</rule>
+
+	<rule 
+		class="com.adobe.ac.pmd.rules.asdocs.ClassAsDocMissingRule"
+		message="This class ({0}) should be documented with AsDocs.">
+		<priority>3</priority>
+	</rule>
+
+	<rule 
+		class="com.adobe.ac.pmd.rules.asdocs.MethodAsDocMissingRule"
+		message="This method ({0}) should be documented with AsDocs.">
+		<priority>3</priority>
+	</rule>
+
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/basic_mxml.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/basic_mxml.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/basic_mxml.xml
new file mode 100644
index 0000000..2f9fcf5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/basic_mxml.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Basic MXML Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+
+	<description>
+      The Basic MXML Ruleset contains a collection of good practices which everyone should follow.
+    </description>
+
+	<rule class="com.adobe.ac.pmd.rules.mxml.MoreThanOneEntryPointInMxmlRule"
+		message="There is more than 1 public variable in this MXML component">
+		<priority>5</priority>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.mxml.MoreThanTwoEntryPointsInMxmlRule"
+		message="There are more than 2 public variables in this MXML component">
+		<priority>3</priority>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.mxml.TooLongScriptBlockRule"
+		message="This script block is too long ({0} maximum, but {1} actually)">
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>50</value>
+			</property>
+		</properties>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.mxml.CodeBehindInMxmlRule"
+		message="Avoid using code behind files">
+		<description>Code behind files are tightly coupled with the view, not unit-testable, not easy to navigate the code code base and not reusable. Try using presentation model pattern, or observer pattern</description>
+		<priority>5</priority>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.mxml.TooManyStatesInMxmlRule"
+	message="Having too many states does not help visibility. Try to refactor this view component.">
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>5</value>
+			</property>
+		</properties>
+	</rule>
+
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/binding.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/binding.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/binding.xml
new file mode 100644
index 0000000..0eedc46
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/binding.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Binding Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+
+	<description>
+      The Binding ruleset contains a collection of good practices around usage of binding.
+	</description>
+
+	<rule class="com.adobe.ac.pmd.rules.binding.BindingUtilsRule"
+		message="BindingUtils class uses hard coded strings, which won't be picked up by the compiler if you rename this attribute. You should probably consider refactoring using events">
+		<description></description>
+		<priority>1</priority>
+		<example>
+public class Controller extends FrontController
+{
+   public function Controller()
+   {
+   	 BindingUtils.bindSetter(setContent, value, "content"); // VIOLATION
+   }
+}	 
+      	 </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.binding.ChangeWatcherRule"
+		message="ChangeWatcher class uses hard coded strings to specify the attribute name, to listen to. Prefer listening to events or setters">
+		<priority>1</priority>
+		<example>
+public final class Title 
+{
+	private var watcher : ChangeWatcher; // VIOLATION
+}		
+		</example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.binding.TooLongBindingExpressionRule"
+		message="This binding expression is too long ({0} dots maximum, but {1} actually)">
+		<description>A Binding expression is executed as soon as one of the bindable attributes changed. If a binding expression contains too many expression, there could be some performance issue.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>3</value>
+			</property>
+		</properties>
+		<example>
+		<![CDATA[
+<mx:Label text="{ vfrfr.frfr.frf.lala }"/> <!-- Violation-->
+		]]>
+		</example>
+	</rule>
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/cairngorm.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/cairngorm.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/cairngorm.xml
new file mode 100644
index 0000000..43b425c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/cairngorm.xml
@@ -0,0 +1,134 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Cairngorm Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	<description>
+      The Cairngorm Ruleset contains a collection of good practices related to Cairngorm.
+    </description>
+    
+	<rule class="com.adobe.ac.pmd.rules.cairngorm.BindableModelLocatorRule"
+		message="A modelLocator must not be Bindable at a class level">
+		<description>A bindable ModelLocator could leads to performance issues due to bindings</description>
+		<priority>1</priority>
+		<example>
+[Bindable]
+public class BindableModelLocator // VIOLATION 
+{      
+}      
+      </example>
+	</rule>
+	
+	<rule
+		class="com.adobe.ac.pmd.rules.cairngorm.ReferenceModelLocatorOutsideTheMainApplicationRule"
+		message="The ModelLocator should be only accessible from the main application file">
+		<description>The ModelLocator should be only accessible from the main application file. Then sub-models should be injected to the nested views.</description>
+		<priority>3</priority>
+		<example>
+package business
+{
+   import model.MyModelLocator; // VIOLATION
+   
+   public class MyBusinessClass 
+   {
+   } 
+}
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.cairngorm.FatControllerRule"
+		message="A FrontController must nor add all its commands within the Controller constructor">
+		<description>Try split them into methods where you add commands depending on their functional area.</description>
+		<priority>3</priority>
+		<example>
+package control
+{
+   import control.GetItems1Command;
+   import control.GetItems1Event;
+   import control.GetItems2Command;
+   import control.GetItems2Event;
+   // A lot of other imports
+   
+   public class MyFrontController // VIOLATION
+   {
+      public function MyFrontController()
+      {
+         addCommand( 
+            GetItems1Event.EVENT_NAME,
+            GetItems1Command );
+
+         addCommand( 
+            GetItems2Event.EVENT_NAME,
+            GetItems2Command );
+
+         // A lot of other addCommand
+      }
+   } 
+}
+      </example>
+	</rule>
+
+	<rule
+		class="com.adobe.ac.pmd.rules.cairngorm.BadCairngormEventNameFormatRule"
+		message="A Cairngorm event name should contain the function area name before the actual event name">
+		<description>You would have something like 'productManagement.getProducts' as an event name.</description>
+		<priority>3</priority>
+		<example>
+
+public class UncorrectConstructorEvent extends CairngormEvent
+{
+   public function UncorrectConstructorEvent( model : IModel )
+   {
+      super( "eventName", model ); // VIOLATION. It should be "functionalArea.eventName" instead
+   }
+}
+public class UncorrectConstantEvent extends CairngormEnterpriseEvent
+{
+   public static const EVENT_NAME : String = "eventName";
+   
+   public function UncorrectConstantEvent( model : IModel )
+   {
+      super( EVENT_NAME, model ); // VIOLATION
+   }
+}
+       </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.cairngorm.CairngormEventDispatcherCallExplicitlyRule"
+		  message="CairngormEventDispatcher is called explicitly. {0}">
+		  <priority>3</priority>
+		  <example>
+		  <![CDATA[
+public function foo() : void
+{
+   CairngormEventDispatcher.getInstance().dispatchEvent(new Event(CONSTANT)); // VIOLATION <- use cairngormEvent.dispatch();
+   CairngormEventDispatcher.getInstance().addEventListener(CONSTANT, onHearing); // VIOLATION <- MVC broken
+}  
+		  ]]>
+		  </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.cairngorm.ModelLocatorReferencedMoreThanOncePerClassRule"
+		message="Only one reference of ModelLocator is allowed per class">
+		<priority>3</priority>
+	</rule>
+
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/component.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/component.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/component.xml
new file mode 100644
index 0000000..daba3e1
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/component.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Custom component rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	
+	<description>
+      The Component Ruleset contains a collection of good practices related to custom component development.
+   </description>
+   
+	<rule
+		class="com.adobe.ac.pmd.rules.component.UpdateChildrenNumberInUpdateDisplayListRule"
+		message="Flex specific - Do not add or remove displayable children from updateDisplayList">
+		<description>UpdateDisplayList is called everytime a child is invalidated. So calling addChild or removeChild in this function could be really CPU consuming</description>
+		<priority>1</priority>
+		<example></example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.component.CallLaterDirectlyRule"
+		message="Flex specific - Don't call 'callLater' explicitly">
+		<description>If you needed to call 'callLater' explicitly, then you probably did not extend the correct component life cycle.</description>
+		<priority>1</priority>
+	</rule>
+	
+</ruleset>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/css.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/css.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/css.xml
new file mode 100644
index 0000000..c580d39
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/css.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="CSS Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	
+	<description>
+		The Styling Ruleset contains a collection of good practices related to
+		styling.
+    </description>
+    
+	<rule class="com.adobe.ac.pmd.rules.css.StyleBlockInMxmlRule"
+		message="The style block is embed in the MXML file">
+		<description>It is not a good practice to embed style blocks inside the MXML component. Prefer using external CSS files.</description>
+		<priority>3</priority>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.css.UseCssInsteadOfEmbedMetaDataRule"
+		message="Embed metadata detected in source code where a stylesheet may be cleaner">
+		<priority>5</priority>
+	</rule>
+	
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/empty.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/empty.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/empty.xml
new file mode 100644
index 0000000..e6f46c3
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/empty.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Empty statement Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	
+	<description>
+      The Empty ruleset contains a collection of rules detecting empty statements.
+	</description>
+	
+	<rule class="com.adobe.ac.pmd.rules.empty.EmptyCatchStatementRule"
+		message="This catch statement is empty">
+		<priority>3</priority>
+		<example>
+public class Foo 
+{
+   public function bar( x : int ) : void
+   {
+      try
+      {
+      }
+      catch( e : Exception )         // VIOLATION
+      {
+      }
+   }
+} 		
+		</example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.empty.EmptyIfStmtRule"
+		message="No statements in this if statement">
+		<description>Empty If Statement finds instances where a condition is checked but nothing is done about it. </description>
+		<priority>3</priority>
+		<example>
+public class Foo 
+{
+   public function bar( x : int ) : void
+   {
+      if ( x == 0 ) 
+      {
+         // VIOLATION
+      }
+   }
+} 
+      </example>
+	</rule>
+	
+</ruleset>


[35/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/html-template/index.template.html b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/html-template/index.template.html
new file mode 100644
index 0000000..2146ca8
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+  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.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">	
+    <!-- 
+    Smart developers always View Source. 
+    
+    This application was built using Adobe Flex, an open source framework
+    for building rich Internet applications that get delivered via the
+    Flash Player or to desktops via Adobe AIR. 
+    
+    Learn more about Flex at http://flex.org 
+    // -->
+    <head>
+        <title>${title}</title>         
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<!-- Include CSS to eliminate any default margins/padding and set the height of the html element and 
+		     the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as 
+			 the percentage of the height of its parent container, which has to be set explicitly.  Initially, 
+			 don't display flashContent div so it won't show if JavaScript disabled.
+		-->
+        <style type="text/css" media="screen"> 
+			html, body	{ height:100%; }
+			body { margin:0; padding:0; overflow:auto; text-align:center; 
+			       background-color: ${bgcolor}; }   
+			#flashContent { display:none; }
+        </style>
+		
+		<!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+        <!-- BEGIN Browser History required section ${useBrowserHistory}>
+        <link rel="stylesheet" type="text/css" href="history/history.css" />
+        <script type="text/javascript" src="history/history.js"></script>
+        <!${useBrowserHistory} END Browser History required section -->  
+		    
+        <script type="text/javascript" src="swfobject.js"></script>
+        <script type="text/javascript">
+            <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. --> 
+            var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+            <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+            var xiSwfUrlStr = "${expressInstallSwf}";
+            var flashvars = {};
+            var params = {};
+            params.quality = "high";
+            params.bgcolor = "${bgcolor}";
+            params.allowscriptaccess = "sameDomain";
+            params.allowfullscreen = "true";
+            var attributes = {};
+            attributes.id = "${application}";
+            attributes.name = "${application}";
+            attributes.align = "middle";
+            swfobject.embedSWF(
+                "${swf}.swf", "flashContent", 
+                "${width}", "${height}", 
+                swfVersionStr, xiSwfUrlStr, 
+                flashvars, params, attributes);
+			<!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+			swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+        </script>
+    </head>
+    <body>
+        <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough 
+			 JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+			 when JavaScript is disabled.
+		-->
+        <div id="flashContent">
+        	<p>
+	        	To view this page ensure that Adobe Flash Player version 
+				${version_major}.${version_minor}.${version_revision} or greater is installed. 
+			</p>
+			<script type="text/javascript"> 
+				var pageHost = ((document.location.protocol == "https:") ? "https://" :	"http://"); 
+				document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='" 
+								+ pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" ); 
+			</script> 
+        </div>
+	   	
+       	<noscript>
+            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+                <param name="movie" value="${swf}.swf" />
+                <param name="quality" value="high" />
+                <param name="bgcolor" value="${bgcolor}" />
+                <param name="allowScriptAccess" value="sameDomain" />
+                <param name="allowFullScreen" value="true" />
+                <!--[if !IE]>-->
+                <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+                    <param name="quality" value="high" />
+                    <param name="bgcolor" value="${bgcolor}" />
+                    <param name="allowScriptAccess" value="sameDomain" />
+                    <param name="allowFullScreen" value="true" />
+                <!--<![endif]-->
+                <!--[if gte IE 6]>-->
+                	<p> 
+                		Either scripts and active content are not permitted to run or Adobe Flash Player version
+                		${version_major}.${version_minor}.${version_revision} or greater is not installed.
+                	</p>
+                <!--<![endif]-->
+                    <a href="http://www.adobe.com/go/getflashplayer">
+                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+                    </a>
+                <!--[if !IE]>-->
+                </object>
+                <!--<![endif]-->
+            </object>
+	    </noscript>		
+   </body>
+</html>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/pom.xml b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/pom.xml
new file mode 100644
index 0000000..6df39c6
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/pom.xml
@@ -0,0 +1,186 @@
+<!--
+
+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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>flex-pmd-flex</artifactId>
+        <groupId>org.apache.flex.pmd</groupId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-violations-viewer</artifactId>
+	<packaging>swf</packaging>
+
+	<name>Adobe Flex PMD Violations viewer</name>
+	<description>Adobe Flex PMD Violations viewer</description>
+
+	<dependencies>
+
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>flex-pmd-flex-lib</artifactId>
+			<version>${project.version}</version>
+			<type>swc</type>
+		</dependency>
+
+		<!--  Cairngorm -->
+		<dependency>
+			<groupId>com.adobe.cairngorm</groupId>
+			<artifactId>cairngorm</artifactId>
+			<version>${cairngorm.version}</version>
+			<type>swc</type>
+		</dependency>
+
+        <!-- flex sdk dependencies -->
+
+		<dependency>
+			<groupId>org.apache.flex</groupId>
+			<artifactId>framework</artifactId>
+			<version>${flex.version}</version>
+			<type>pom</type>
+		</dependency>
+
+		<dependency>
+			<groupId>com.adobe.flash.framework</groupId>
+			<artifactId>playerglobal</artifactId>
+			<version>${flash-player.version}</version>
+			<type>swc</type>
+		</dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>flexunit-theme</artifactId>
+            <version>${project.version}</version>
+            <type>swc</type>
+            <scope>theme</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.adobe.cairngorm</groupId>
+            <artifactId>event-source</artifactId>
+            <version>${event-source.version}</version>
+            <type>swc</type>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+	<build>
+		<sourceDirectory>src/main/flex</sourceDirectory>
+		<testSourceDirectory>src/test/flex</testSourceDirectory>
+		<testResources>
+			<testResource>
+				<directory>src/test/resources</directory>
+			</testResource>
+		</testResources>
+
+		<plugins>
+
+			<plugin>
+				<groupId>net.flexmojos.oss</groupId>
+				<artifactId>flexmojos-maven-plugin</artifactId>
+				<version>${flex-mojos-plugin.version}</version>
+				<extensions>true</extensions>
+				<configuration>
+					<targetPlayer>${flash-player.version}.0.0</targetPlayer>
+					<defaultSizeWidth>1000</defaultSizeWidth>
+					<defaultSizeHeight>700</defaultSizeHeight>
+					<useNetwork>false</useNetwork>
+				</configuration>
+                <dependencies>
+                    <!-- This handles a bug in maven which causes problems with flex resources -->
+                    <dependency>
+                        <groupId>net.flexmojos.oss</groupId>
+                        <artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
+                        <version>${flex-mojos-plugin.version}</version>
+                    </dependency>
+                    <!-- Without this FM will use the compiler configured in its
+                    master pom, which will result in version conflicts -->
+                    <dependency>
+                        <groupId>org.apache.flex</groupId>
+                        <artifactId>compiler</artifactId>
+                        <version>${flex.version}</version>
+                        <type>pom</type>
+                    </dependency>
+                </dependencies>
+			</plugin>
+
+			<plugin>
+				<groupId>net.flexmojos.oss</groupId>
+				<artifactId>flexmojos-maven-plugin</artifactId>
+				<version>${flex-mojos-plugin.version}</version>
+				<extensions>true</extensions>
+				<executions>
+					<execution>
+						<goals>
+							<goal>wrapper</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<templateURI>folder:html-template</templateURI>
+				</configuration>
+                <dependencies>
+                    <!-- This handles a bug in maven which causes problems with flex resources -->
+                    <dependency>
+                        <groupId>net.flexmojos.oss</groupId>
+                        <artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
+                        <version>${flex-mojos-plugin.version}</version>
+                    </dependency>
+                    <!-- Without this FM will use the compiler configured in its
+                    master pom, which will result in version conflicts -->
+                    <dependency>
+                        <groupId>org.apache.flex</groupId>
+                        <artifactId>compiler</artifactId>
+                        <version>${flex.version}</version>
+                        <type>pom</type>
+                    </dependency>
+                </dependencies>
+			</plugin>
+			
+		</plugins>
+	</build>
+
+	<repositories>
+		<repository>
+			<id>flexmojos-repository</id>
+			<url>http://repository.sonatype.org/content/groups/flexgroup/</url>
+			<snapshots>
+				<enabled>true</enabled>
+			</snapshots>
+			<releases>
+				<enabled>true</enabled>
+			</releases>
+		</repository>
+	</repositories>
+	<pluginRepositories>
+		<pluginRepository>
+			<id>flexmojos-repository</id>
+			<url>http://repository.sonatype.org/content/groups/flexgroup/</url>
+			<snapshots>
+				<enabled>true</enabled>
+			</snapshots>
+			<releases>
+				<enabled>true</enabled>
+			</releases>
+		</pluginRepository>
+	</pluginRepositories>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/Main.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/Main.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/Main.mxml
new file mode 100644
index 0000000..5cf62bc
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/Main.mxml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:Application xmlns:control="com.adobe.ac.pmd.control.*"
+    xmlns:local="*"
+    xmlns:mx="http://www.adobe.com/2006/mxml"
+    xmlns:services="com.adobe.ac.pmd.services.*"
+    xmlns:view="com.adobe.ac.pmd.view.*"
+    styleName="flexUnitApplication"
+    horizontalScrollPolicy="off"
+    layout="vertical"
+    minHeight="800"
+    minWidth="1000"
+    verticalScrollPolicy="off"
+    horizontalAlign="center"
+    verticalAlign="top"
+    xmlns:source="com.adobe.ac.pmd.view.source.*">
+
+    <mx:Panel width="100%"
+    	height="100%"
+        styleName="mainPanel"
+        >
+
+        <mx:HBox width="100%"
+            horizontalGap="0"
+            paddingRight="10"
+            verticalAlign="bottom"
+            >
+
+            <view:Title styleName="panelTitleStyle"
+                text="PMD Violations viewer"
+                />
+
+            <view:Title styleName="panelTitleSubStyle"
+                text="powered by Adobe Technical Services"
+                buttonMode="true"
+                click="navigateToURL( new URLRequest( 'http://www.adobe.com/consulting/' ) )"
+                mouseChildren="false"
+                useHandCursor="true"
+                />
+
+            <mx:Spacer width="100%"
+                />
+
+            <view:Title styleName="panelTitleSubStyle"
+                text="v{ Version.BUILD_NUMBER } built on { Version.BUILD_DATE } at { Version.BUILD_TIME}"
+                />
+
+        </mx:HBox>
+
+        <mx:HRule width="100%"
+            styleName="flexUnitHRule"
+            />
+
+        <mx:ViewStack id="viewStack"
+            width="100%"
+            height="100%"
+            >
+
+            <view:UploadView id="uploadView"
+                violationsLoaded="viewStack.selectedIndex = 1"
+                />
+
+            <view:ResultsView results="{ uploadView.model.violations }"
+                />
+            
+        </mx:ViewStack>
+
+    </mx:Panel>
+
+</mx:Application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/TestRunner.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/TestRunner.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/TestRunner.mxml
new file mode 100644
index 0000000..9015a16
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/TestRunner.mxml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<FlexUnitTestRunnerApplication xmlns:flexunit="flexunit.flexui.*"
+    xmlns:mx="http://www.adobe.com/2006/mxml"
+    testSuite="{ new AllTests() }"
+    xmlns="*"
+    />

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/CharacterPosition.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/CharacterPosition.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/CharacterPosition.as
new file mode 100644
index 0000000..3b6e0cd
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/CharacterPosition.as
@@ -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.model
+{
+    public class CharacterPosition
+    {
+        private var _line : int;
+        private var _column : int;
+
+        public function CharacterPosition( line : int, column : int )
+        {
+            _line = line;
+            _column = column;
+        }
+
+		[Bindable("unused")]
+        public function get line() : int
+        {
+            return _line;
+        }
+
+		[Bindable("unused")]
+        public function get column() : int
+        {
+            return _column;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/File.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/File.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/File.as
new file mode 100644
index 0000000..c681a3c
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/File.as
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.model
+{
+    public class File
+    {
+        private var _path : String;
+
+        public function File( path : String )
+        {
+            _path = path;
+        }
+
+        public function get path() : String
+        {
+            return _path;
+        }
+
+        public function get shortPath() : String
+        {
+            var srcIndex : int = path.indexOf( "src" );
+			var result : String = path;
+
+            if ( srcIndex != -1 )
+            {
+                var regexp : RegExp = new RegExp( "/", "g" );
+				result = path.substr( srcIndex + 4 ).replace( regexp, "." );
+            }
+            return result;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/Violation.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/Violation.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/Violation.as
new file mode 100644
index 0000000..3ca98fe
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/Violation.as
@@ -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.model
+{
+    public class Violation
+    {
+        private var _position : ViolationPosition;
+        private var _rule : Rule;
+        private var _violatedFile : File;
+
+        public function Violation( begin : CharacterPosition, end : CharacterPosition, violatedFilePath : String )
+        {
+            _position = new ViolationPosition( begin, end );
+            _rule = new Rule();
+            _violatedFile = new File( violatedFilePath );
+        }
+
+		[Bindable("unused")]
+        public function get rule() : Rule
+        {
+            return _rule;
+        }
+
+		[Bindable("unused")]
+        public function get position() : ViolationPosition
+        {
+            return _position;
+        }
+
+		[Bindable("unused")]
+        public function get shortPath() : String
+        {
+            return _violatedFile.shortPath;
+        }
+
+		[Bindable("unused")]
+        public function get filePath() : String
+        {
+            return _violatedFile.path;
+        }
+
+		[Bindable("unused")]
+        public function get shortRuleName() : String
+        {
+            return _rule.shortName;
+        }
+
+		[Bindable("unused")]
+        public function get beginLine() : Number
+        {
+            return _position.begin.line;
+        }
+
+		[Bindable("unused")]
+        public function get message() : String
+        {
+            return _rule.message;
+        }
+
+		[Bindable("unused")]
+        public function get priority() : ViolationPriority
+        {
+            return _rule.priority;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/ViolationPosition.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/ViolationPosition.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/ViolationPosition.as
new file mode 100644
index 0000000..c08fa8e
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/ViolationPosition.as
@@ -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.model
+{
+    public class ViolationPosition
+    {
+        private var _begin : CharacterPosition;
+        private var _end : CharacterPosition;
+
+        public function ViolationPosition( begin : CharacterPosition, end : CharacterPosition )
+        {
+            _begin = begin;
+            _end = end;
+        }
+
+		[Bindable("unused")]
+        public function get begin() : CharacterPosition
+        {
+            return _begin;
+        }
+
+		[Bindable("unused")]
+        public function get end() : CharacterPosition
+        {
+            return _end;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/FilterResults.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/FilterResults.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/FilterResults.mxml
new file mode 100644
index 0000000..8037dc5
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/FilterResults.mxml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%"
+	horizontalAlign="center">
+
+    <mx:Script>
+        <![CDATA[
+        	import com.adobe.ac.pmd.view.model.ResultsModel;
+        	import com.adobe.ac.pmd.view.model.ResultsFilter;
+        	
+            [Bindable]
+            public var model : ResultsModel;
+        ]]>
+    </mx:Script>
+
+	<mx:FormItem
+		label="Show violation level"
+		>
+		
+		<mx:ComboBox id="filter"
+	        dataProvider="{ ResultsFilter.VIOLATION_PRIORITIES }"
+	        selectedIndex="1"
+	        labelField="name"
+	        change="model.currentPriorityVisible = filter.selectedItem.level"
+	        />
+
+	</mx:FormItem>
+    
+    <mx:FormItem
+		label="Group by"
+		>
+
+	    <mx:List id="groupBy"
+	    	 allowMultipleSelection="true"
+	        dataProvider="{ ResultsFilter.GROUPING_FIELDS }"
+	        labelField="name"
+	        allowDragSelection="true"
+	        rowCount="{ ResultsFilter.GROUPING_FIELDS.length }"
+	        selectedIndices="{ model.selectedGoupFieldIndices }"
+	        change="model.selectedGroupFields = groupBy.selectedIndices"
+	        />
+    	
+    </mx:FormItem>    	
+
+	<mx:Button
+		label="Filter"
+		click="model.filter()"
+		/>
+		
+</mx:HBox>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/ResultsFormatter.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/ResultsFormatter.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/ResultsFormatter.as
new file mode 100644
index 0000000..e8d6520
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/ResultsFormatter.as
@@ -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.view
+{
+    import com.adobe.ac.pmd.model.Violation;
+    
+    import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
+
+    public final class ResultsFormatter
+    {
+        public static function formatViolationsNumberOrBeginLine( 
+        							item : Object, // NO PMD
+        							column : AdvancedDataGridColumn ) : String // NO PMD
+        {
+            var violation : Violation = item as Violation;
+			var result : String = "";
+			
+            if ( violation )
+            {
+				result = violation.position.begin.line.toString();
+            }
+            return result;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/ResultsView.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/ResultsView.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/ResultsView.mxml
new file mode 100644
index 0000000..51abe8f
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/ResultsView.mxml
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:VBox xmlns:model="com.adobe.ac.pmd.view.model.*"
+    xmlns:mx="http://www.adobe.com/2006/mxml"
+    xmlns:view="com.adobe.ac.pmd.view.*"
+    width="100%"
+    height="100%"
+    horizontalAlign="center"
+    verticalAlign="middle"
+	verticalScrollPolicy="off"
+    >
+
+    <mx:Script>
+        <![CDATA[
+            import com.adobe.ac.pmd.model.Violation;
+            import mx.collections.ArrayCollection;
+
+            public function set results( value : ArrayCollection ) : void
+            {
+                model.violations = value;
+                gc.refresh();
+            }
+
+            private function currentVisibilityChange() : void
+            {
+                gc.refresh();
+            }
+
+            private function groupLabelFunction( item : Object, column : AdvancedDataGridColumn ) : String // NO PMD
+            {
+				var label : String;
+				
+                if ( item && item.children )
+                {
+					label = item[ gc.grouping.label ] + " (" + item.children.length + ")";
+                }
+                else
+                {
+					label = item[ column.dataField ];
+                }
+				return label;
+            }
+        ]]>
+    </mx:Script>
+
+	<mx:Resize
+		id="resize"
+		duration="200"
+		/>
+	
+    <model:ResultsModel id="model"
+        currentVisibilityChange="currentVisibilityChange()"
+        />
+
+    <mx:GroupingCollection id="gc"
+        source="{ model.violations }"
+        grouping="{ model.grouping }"
+        />
+	
+    <view:Summary model="{ model }"
+        />
+
+    <mx:HRule width="100%"
+        styleName="flexUnitHRule"
+        />
+
+    <view:FilterResults model="{ model }"
+        />
+
+    <mx:HRule width="100%"
+        styleName="flexUnitHRule"
+        />
+
+    <mx:HBox width="100%"
+        height="100%"
+        >
+
+        <mx:AdvancedDataGrid id="dg"
+            width="100%"
+            height="100%"
+            dataProvider="{ gc }"
+            change="model.selectedViolation = dg.selectedItem as Violation"
+            groupLabelFunction="groupLabelFunction"
+            >
+
+            <mx:columns>
+
+                <mx:AdvancedDataGridColumn dataField="shortPath"
+                    headerText=""
+                    sortable="false"
+                    />
+
+                <mx:AdvancedDataGridColumn width="100"
+                    labelFunction="ResultsFormatter.formatViolationsNumberOrBeginLine"
+                    dataField="beginLine"
+                    headerText="Line"
+                    sortable="false"
+                    />
+
+                <mx:AdvancedDataGridColumn dataField="message"
+                    dataTipField="message"
+                    headerText="Message"
+                    sortable="false"
+                    />
+
+                <mx:AdvancedDataGridColumn width="100"
+                    dataField="priority"
+                    headerText="Priority"
+                    sortable="false"
+                    />
+
+            </mx:columns>
+
+        </mx:AdvancedDataGrid>
+
+        <view:SelectedViolation includeInLayout="{ model.selectedViolation != null }"
+            close="model.selectedViolation = null"
+            violation="{ model.selectedViolation }"
+            visible="{ model.selectedViolation != null }"
+			resizeEffect="{ resize }"
+            />
+
+    </mx:HBox>
+
+</mx:VBox>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/SelectedViolation.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/SelectedViolation.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/SelectedViolation.mxml
new file mode 100644
index 0000000..f5e8c2b
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/SelectedViolation.mxml
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:Form xmlns:mx="http://www.adobe.com/2006/mxml"
+    height="100%"
+    paddingBottom="0"
+    paddingLeft="0"
+    paddingRight="10"
+    paddingTop="0"
+    >
+    <mx:Metadata>
+    	[Event(name="close", type = "flash.events.Event")]
+    </mx:Metadata>
+
+    <mx:Script>
+        <![CDATA[
+            import com.adobe.ac.pmd.model.Violation;
+
+            public static const CLOSE : String = "close";
+
+            [Bindable]
+            public var violation : Violation;
+        ]]>
+    </mx:Script>
+
+    <mx:HBox verticalAlign="middle"
+        >
+
+        <mx:Button label=">"
+            toolTip="Close panel"
+            click="dispatchEvent( new Event( CLOSE ) )"
+            />
+
+        <mx:Label text="Selected violation"
+            fontWeight="bold"
+            />
+
+    </mx:HBox>
+
+    <mx:FormItem label="RuleName"
+        >
+
+        <mx:Label text="{ violation.rule.shortName }"
+            toolTip="{ violation.rule.name }"
+            />
+
+    </mx:FormItem>
+
+    <mx:FormItem label="RuleSet"
+        >
+
+        <mx:Label text="{ violation.rule.ruleset.name }"
+            />
+
+    </mx:FormItem>
+
+    <mx:FormItem label="Message"
+        >
+
+        <mx:Text width="300"
+            text="{ violation.rule.message }"
+            />
+
+    </mx:FormItem>
+
+    <mx:FormItem label="Priority"
+        >
+
+        <mx:Label text="{ violation.rule.priority.name }"
+            />
+
+    </mx:FormItem>
+
+    <mx:FormItem label="Position"
+        >
+
+        <mx:VBox>
+
+            <mx:Label text="{ violation.shortPath }"
+            	toolTip="{ violation.filePath }"
+                />
+
+            <mx:HBox>
+
+                <mx:Label width="50"
+                    text=""
+                    />
+
+                <mx:Label width="50"
+                    text="line"
+                    />
+
+                <mx:Label width="50"
+                    text="column"
+                    />
+
+            </mx:HBox>
+
+            <mx:HBox>
+
+                <mx:Label width="50"
+                    text="start"
+                    />
+
+                <mx:Label width="50"
+                    text="{ violation.position.begin.line }"
+                    />
+
+                <mx:Label width="50"
+                    text="{ violation.position.begin.column }"
+                    />
+
+            </mx:HBox>
+
+            <mx:HBox>
+
+                <mx:Label width="50"
+                    text="end"
+                    />
+
+                <mx:Label width="50"
+                    text="{ violation.position.end.line }"
+                    />
+
+                <mx:Label width="50"
+                    text="{ violation.position.end.column }"
+                    />
+
+            </mx:HBox>
+
+        </mx:VBox>
+
+    </mx:FormItem>
+
+</mx:Form>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/Summary.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/Summary.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/Summary.mxml
new file mode 100644
index 0000000..c7eeefa
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/Summary.mxml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:HBox xmlns:model="com.adobe.ac.pmd.model.*"
+    xmlns:mx="http://www.adobe.com/2006/mxml"
+    >
+
+    <mx:Script>
+        <![CDATA[
+        	import com.adobe.ac.pmd.view.model.ResultsModel;
+
+            [Bindable]
+            public var model : ResultsModel;
+        ]]>
+    </mx:Script>
+
+<!--    <mx:HBox>-->
+
+        <mx:FormItem label="Violations #"
+            >
+
+            <mx:Label text="{ model.violationsNumber }"
+                />
+
+        </mx:FormItem>
+
+        <mx:FormItem label="Errors #"
+            >
+
+            <mx:Label text="{ model.errors }"
+                />
+
+        </mx:FormItem>
+
+        <mx:FormItem label="Warnings #"
+            >
+
+            <mx:Label text="{ model.warnings }"
+                />
+
+        </mx:FormItem>
+
+        <mx:FormItem label="Informations #"
+            >
+
+            <mx:Label text="{ model.informations }"
+                />
+
+        </mx:FormItem>
+
+<!--    </mx:Form>-->
+
+</mx:HBox>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/UploadView.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/UploadView.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/UploadView.mxml
new file mode 100644
index 0000000..0a546b0
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/UploadView.mxml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:VBox xmlns:model="com.adobe.ac.pmd.view.model.*"
+    xmlns:mx="http://www.adobe.com/2006/mxml"
+    xmlns:view="com.adobe.ac.pmd.view.*"
+    width="100%"
+    minHeight="600"
+    bottom="0"
+    horizontalAlign="center"
+    top="0"
+    verticalAlign="middle"
+    creationComplete="model.tryToLoadFromParameters()"
+    >
+
+    <mx:Metadata>
+		[Event(name="violationsLoaded", type="flash.events.Event")]
+	</mx:Metadata>
+
+    <model:UploadModel id="model"
+        violationsLoaded="dispatchEvent( event.clone() )"
+        />
+
+    <mx:Button label="Upload your Pmd results"
+        click="model.load()"
+        />
+
+</mx:VBox>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ResultsFilter.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ResultsFilter.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ResultsFilter.as
new file mode 100644
index 0000000..2920f34
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ResultsFilter.as
@@ -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.view.model
+{
+    import com.adobe.ac.pmd.model.Violation;
+    import com.adobe.ac.pmd.model.ViolationPriority;
+    
+    import mx.collections.GroupingField;
+
+    public final class ResultsFilter
+    {
+        public static const VIOLATION_PRIORITIES : Array = [ 
+        				{ name: "All", level: 0 }, 
+        				ViolationPriority.ERROR, 
+        				ViolationPriority.WARNING,
+            			ViolationPriority.INFO ];
+    	public static const FILE_PATH_GROUPFIELD : GroupingField = new GroupingField( "shortPath" );
+    	public static const RULENAME_GROUPFIELD : GroupingField = new GroupingField( "shortRuleName" );
+
+		[ArrayElementType("mx.collections.GroupingField")]
+    	public static const GROUPING_FIELDS : Array = [ FILE_PATH_GROUPFIELD, RULENAME_GROUPFIELD ];
+
+        public static var currentPriorityVisible : int = 1; // NO PMD AvoidUsingPublicStaticField
+
+        public static function filterViolation( value : Object ) : Boolean // NO PMD
+        {
+            if ( currentPriorityVisible == 0 )
+            {
+                return true;
+            }
+            return ( value as Violation ).rule.priority.level == currentPriorityVisible;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ResultsModel.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ResultsModel.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ResultsModel.as
new file mode 100644
index 0000000..5bef07f
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ResultsModel.as
@@ -0,0 +1,138 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.view.model
+{
+    import com.adobe.ac.model.IPresentationModel;
+    import com.adobe.ac.pmd.model.Violation;
+    
+    import flash.events.Event;
+    import flash.events.EventDispatcher;
+    
+    import mx.collections.ArrayCollection;
+    import mx.collections.Grouping;
+    import mx.collections.GroupingField;
+
+    [Event( name="currentVisibilityChange", type = "flash.events.Event" )]
+    public class ResultsModel extends EventDispatcher implements IPresentationModel
+    {
+        private static const CURRENT_VISIBILITY_CHANGE : String = "currentVisibilityChange";
+        private static const VIOLATIONS_COMPUTED : String = "violationsComputed";
+        private static const SELECTED_GROUP_FIELDS_CHANGE : String = 'selectedGroupFieldsChange';
+
+        private var _grouping : Grouping;
+        private var _violations : ViolationsModel
+        
+        [Bindable]
+        public var selectedViolation : Violation;
+        
+        public function ResultsModel()
+        {
+        	_violations = new ViolationsModel();
+        	_grouping = new Grouping();
+        	selectedGroupFields = [ 1 ];
+        }
+        
+        public function filter() : void
+        {
+        	_violations.filter();
+            dispatchEvent( new Event( CURRENT_VISIBILITY_CHANGE ) )
+        }
+        
+        public function set selectedGroupFields( value : Array ) : void
+        {
+        	_grouping.fields = [];
+        	for each ( var indice : Number in value )
+        	{
+        		_grouping.fields.push( ResultsFilter.GROUPING_FIELDS[ indice ] );
+        	}
+        	
+        	dispatchEvent( new Event( SELECTED_GROUP_FIELDS_CHANGE ) );
+        }
+        
+        [Bindable('selectedGroupFieldsChange')]
+        public function get selectedGoupFieldIndices() : Array
+        {
+        	var indices : Array = [];
+        	var currentIndexInPossibleFields : int;
+        	
+        	for each ( var selectedField : GroupingField in _grouping.fields )
+        	{
+        		currentIndexInPossibleFields = 0;
+        		for each ( var possibleField : GroupingField in ResultsFilter.GROUPING_FIELDS )
+        		{
+        			if ( selectedField == possibleField )
+        			{
+        				indices.push( currentIndexInPossibleFields );
+        				break;
+        			}
+        			currentIndexInPossibleFields++;
+        		}
+        	}
+        	return indices;
+        }
+        
+        [Bindable("unused")]
+        public function get grouping() : Grouping
+        {
+        	return _grouping;
+        }
+
+        public function set currentPriorityVisible( value : int ) : void
+        {
+            ResultsFilter.currentPriorityVisible = value;
+        }
+
+        public function set violations( value : ArrayCollection ) : void
+        {
+            _violations.violations = value;
+
+            dispatchEvent( new Event( VIOLATIONS_COMPUTED ) );
+        }
+
+        [Bindable( "violationsComputed" )]
+        public function get errors() : int
+        {
+            return _violations.errors;
+        }
+
+        [Bindable( "violationsComputed" )]
+        public function get warnings() : int
+        {
+            return _violations.warnings;
+        }
+
+        [Bindable( "violationsComputed" )]
+        public function get informations() : int
+        {
+            return _violations.informations;
+        }
+
+        [Bindable( "violationsComputed" )]
+        public function get violationsNumber() : int
+        {
+            return _violations.violations.source.length;
+        }
+
+        [Bindable( "violationsComputed" )]
+        public function get violations() : ArrayCollection
+        {
+            return _violations.violations;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/UploadModel.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/UploadModel.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/UploadModel.as
new file mode 100644
index 0000000..41c17ee
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/UploadModel.as
@@ -0,0 +1,135 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.view.model
+{
+    import com.adobe.ac.model.IPresentationModel;
+    import com.adobe.ac.pmd.model.CharacterPosition;
+    import com.adobe.ac.pmd.model.Violation;
+    import com.adobe.ac.pmd.model.ViolationPriority;
+    
+    import flash.events.Event;
+    import flash.events.EventDispatcher;
+    import flash.net.FileFilter;
+    import flash.net.FileReference;
+    import flash.utils.ByteArray;
+    
+    import mx.collections.ArrayCollection;
+    import mx.core.Application;
+    import mx.rpc.events.ResultEvent;
+    import mx.rpc.http.mxml.HTTPService;
+
+    [Event( name="violationsLoaded", type = "flash.events.Event" )]
+
+    public class UploadModel extends EventDispatcher implements IPresentationModel
+    {
+        public static const VIOLATIONS_LOADED : String = "violationsLoaded";
+
+        [ArrayElementType( "flash.net.FileFilter" )]
+        private static const FILTERS : Array = [ new FileFilter( "Pmd results file", "pmd.xml" ) ];
+
+        [Bindable]
+        public var violations : ArrayCollection;
+
+        private var fileReference : FileReference;
+
+        public function UploadModel()
+        {
+            super();
+        }
+
+        public function tryToLoadFromParameters() : void
+        {
+            var report : String = Application.application.parameters.report;
+
+            if ( report != "" )
+            {
+                var request : HTTPService = new HTTPService();
+                
+                request.useProxy = false;
+                request.url = report;
+                request.showBusyCursor = true;
+                request.resultFormat = "xml";
+                request.addEventListener( ResultEvent.RESULT, onDonwloadResult );
+                request.send();
+            }
+        }
+
+        public function load() : void
+        {
+            fileReference = new FileReference();
+            fileReference.browse( FILTERS );
+            fileReference.addEventListener( Event.SELECT, onSelect );
+        }
+
+        public function deserializeViolations( violationsXml : XML ) : ArrayCollection
+        {
+            var newViolations : ArrayCollection = new ArrayCollection();
+
+            for each ( var fileXml : XML in violationsXml.file )
+            {
+                for each ( var violationXml : XML in fileXml.violation )
+                {
+                    newViolations.addItem( deserializeViolation( violationXml, fileXml.@name ) );
+                }
+            }
+            return newViolations;
+        }
+
+        private function deserializeViolation( violationXml : XML, filePath : String ) : Violation
+        {
+        	var beginPosition : CharacterPosition = new CharacterPosition( 
+        													violationXml.@beginline, 
+        													violationXml.@begincolumn );
+        	var endPosition : CharacterPosition = new CharacterPosition( 
+        													violationXml.@endline, 
+        													violationXml.@endcolumn );
+            var violation : Violation = new Violation( beginPosition, endPosition, filePath );
+
+            violation.rule.name = violationXml.@rule;
+            violation.rule.ruleset.name = violationXml.@ruleset
+            violation.rule.priority = ViolationPriority.create( violationXml.@priority );
+            violation.rule.message = violationXml.toString();
+
+            return violation;
+        }
+
+        private function onDonwloadResult( e : ResultEvent ) : void
+        {
+        	violations = deserializeViolations( new XML( e.result ) );
+
+            dispatchEvent( new Event( VIOLATIONS_LOADED ) )
+        }
+        
+        private function onSelect( e : Event ) : void
+        {
+            fileReference.addEventListener( Event.COMPLETE, onLoadComplete );
+            fileReference.load();
+        }
+
+        private function onLoadComplete( e : Event ) : void
+        {
+            var data : ByteArray = fileReference.data;
+            var xml : XML = new XML( data.readUTFBytes( data.bytesAvailable ) );
+
+            violations = deserializeViolations( xml );
+
+            dispatchEvent( new Event( VIOLATIONS_LOADED ) )
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ViolationsModel.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ViolationsModel.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ViolationsModel.as
new file mode 100644
index 0000000..bfb459f
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ViolationsModel.as
@@ -0,0 +1,84 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.view.model
+{
+	import com.adobe.ac.pmd.model.Violation;
+	
+	import mx.collections.ArrayCollection;
+	
+	public class ViolationsModel
+	{
+        private var _errors : int = 0;
+        private var _warnings : int = 0;
+        private var _informations : int = 0;
+        private var _violations : ArrayCollection;
+        
+		public function ViolationsModel()
+		{
+		}
+		
+		public function get violations() : ArrayCollection
+		{
+			return _violations;
+		}
+		
+		public function get errors() : int
+		{
+			return _errors;
+		}
+		
+		public function get warnings() : int
+		{
+			return _warnings;
+		}
+		
+		public function get informations() : int
+		{
+			return _informations;
+		}
+
+		public function set violations( value : ArrayCollection ) : void
+        {
+            _violations = value;
+            _violations.filterFunction = ResultsFilter.filterViolation;
+
+            for each ( var violation : Violation in _violations )
+            {
+                if ( violation.rule.priority.level == 1 )
+                {
+                    _errors++;
+                }
+                else if ( violation.rule.priority.level == 3 )
+                {
+                    _warnings++;
+                }
+                else if ( violation.rule.priority.level == 5 )
+                {
+                    _informations++;
+                }
+            }
+            _violations.refresh();
+        }
+        
+        public function filter() : void
+        {
+        	_violations.refresh();
+        }
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/test/flex/AllTests.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/test/flex/AllTests.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/test/flex/AllTests.as
new file mode 100644
index 0000000..4d2e642
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/test/flex/AllTests.as
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flex - pmd - violations - viewer.src.test.flex
+{
+   import flexunit.framework.TestSuite;
+
+   public class AllTests extends TestSuite
+   {
+      public function AllTests()
+      {
+         super();
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/pom.xml b/FlexPMD/flex-pmd-flex/flexunit-theme/pom.xml
new file mode 100644
index 0000000..1ffe2f4
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flexunit-theme/pom.xml
@@ -0,0 +1,91 @@
+<!--
+
+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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>flex-pmd-flex</artifactId>
+        <groupId>org.apache.flex.pmd</groupId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+	<artifactId>flexunit-theme</artifactId>
+	<packaging>swc</packaging>
+
+	<name>FlexUnit theme</name>
+	<description>Adobe FlexUnit theme</description>
+
+	<dependencies>
+
+		<!-- flex sdk dependencies -->
+
+		<dependency>
+			<groupId>org.apache.flex</groupId>
+			<artifactId>framework</artifactId>
+			<version>${flex.version}</version>
+			<type>pom</type>
+		</dependency>
+
+		<dependency>
+			<groupId>com.adobe.flash.framework</groupId>
+			<artifactId>playerglobal</artifactId>
+			<version>${flash-player.version}</version>
+			<type>swc</type>
+		</dependency>
+
+	</dependencies>
+
+	<build>
+		<sourceDirectory>src/main/resources</sourceDirectory>
+		<resources>
+			<resource>
+				<directory>src/main/resources</directory>
+			</resource>
+		</resources>
+
+		<plugins>
+			<plugin>
+				<groupId>net.flexmojos.oss</groupId>
+				<artifactId>flexmojos-maven-plugin</artifactId>
+				<version>${flex-mojos-plugin.version}</version>
+				<extensions>true</extensions>
+				<configuration>
+					<targetPlayer>${flash-player.version}</targetPlayer>
+				</configuration>
+                <dependencies>
+                    <!-- This handles a bug in maven which causes problems with flex resources -->
+                    <dependency>
+                        <groupId>net.flexmojos.oss</groupId>
+                        <artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
+                        <version>${flex-mojos-plugin.version}</version>
+                    </dependency>
+                    <!-- Without this FM will use the compiler configured in its
+                    master pom, which will result in version conflicts -->
+                    <dependency>
+                        <groupId>org.apache.flex</groupId>
+                        <artifactId>compiler</artifactId>
+                        <version>${flex.version}</version>
+                        <type>pom</type>
+                    </dependency>
+                </dependencies>
+            </plugin>
+		</plugins>
+	</build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/cancelledIcon.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/cancelledIcon.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/cancelledIcon.png
new file mode 100644
index 0000000..9bca099
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/cancelledIcon.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/export.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/export.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/export.png
new file mode 100644
index 0000000..fd4bfcd
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/export.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/icon_tool_trash.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/icon_tool_trash.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/icon_tool_trash.png
new file mode 100644
index 0000000..b4b470d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/icon_tool_trash.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/icon_tool_trash2.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/icon_tool_trash2.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/icon_tool_trash2.png
new file mode 100644
index 0000000..282a037
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/icon_tool_trash2.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/todoLogo.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/todoLogo.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/todoLogo.png
new file mode 100644
index 0000000..a314b8d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/todoLogo.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/todoLogo_big.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/todoLogo_big.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/todoLogo_big.png
new file mode 100644
index 0000000..bb89f68
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/todoLogo_big.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/css/default.css
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/css/default.css b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/css/default.css
new file mode 100644
index 0000000..2e79328
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/css/default.css
@@ -0,0 +1,285 @@
+/*
+ * 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.
+ */
+Application {
+  backgroundColor: #3872b2;
+   backgroundGradientColors: #3872b2, #0c1a3d;
+   backgroundGradientAlphas: 1, 1;
+   themeColor: #0c1a3d;
+   color: #444444;
+   fontFamily: "Myriad Pro";
+   fontSize: 12;
+   verticalScrollBarStyleName: flexUnitScrollBar;
+   horizontalScrollBarStyleName: flexUnitScrollBar;
+   modal-transparency-blur: 0;
+   modal-transparency: 0;   
+}
+
+ToolTip
+{
+   fontFamily: "Myriad Pro";
+   leading: 5;
+   fontSize: 11;
+   backgroundColor: #DFEAF4;
+}
+
+ScrollBar
+{
+	downArrowDisabledSkin: Embed( source="skins/VScrollBar_downArrowDisabledSkin.png" );
+	downArrowDownSkin: Embed( source="skins/VScrollBar_downArrowDownSkin.png" );
+	downArrowOverSkin: Embed( source="skins/VScrollBar_downArrowOverSkin.png" );
+	downArrowUpSkin: Embed( source="skins/VScrollBar_downArrowUpSkin.png" );
+	thumbIcon: Embed( source="skins/VScrollBar_thumbIcon.png" );
+	trackSkin: Embed( source="skins/VScrollBar_trackSkin.png" );
+	upArrowDisabledSkin: Embed( source="skins/VScrollBar_upArrowDisabledSkin.png" );
+	upArrowDownSkin: Embed( source="skins/VScrollBar_upArrowDownSkin.png" );
+	upArrowOverSkin: Embed( source="skins/VScrollBar_upArrowOverSkin.png" );
+	upArrowUpSkin: Embed( source="skins/VScrollBar_upArrowUpSkin.png" );
+	thumbDownSkin: Embed( 
+	   source="skins/VScrollBar_thumbDownSkin.png",
+		   scaleGridLeft="1", scaleGridTop="5", 
+		   scaleGridRight="8", scaleGridBottom="44" );
+	thumbOverSkin: Embed( 
+	   source="skins/VScrollBar_thumbOverSkin.png",
+   		scaleGridLeft="1", scaleGridTop="5", 
+   		scaleGridRight="8", scaleGridBottom="44" );
+	thumbUpSkin: Embed( 
+	   source="skins/VScrollBar_thumbUpSkin.png",
+		   scaleGridLeft="1", scaleGridTop="5", 
+		   scaleGridRight="8", scaleGridBottom="44" );
+}
+
+/* Embedded Fonts */
+ /*@font-face {
+	font-family: "Myriad Pro SemiCond";
+	src: url( "fonts/fonts.swf" );
+}*/
+/* CSS file used for component-level compilation */
+
+/* Embedded Fonts */
+/* Font for titles */
+/*@font-face {
+	font-family: "Myriad Pro SemiCond";
+	src: url("fonts/fonts.swf");
+}*/
+
+/* Font for anything else */
+/*@font-face {
+	font-family: "Myriad Pro";
+	src: url("fonts/fonts.swf");
+}*/
+
+/*@font-face {
+	font-family: "Myriad Pro";
+	font-weight: bold;
+	src: url("fonts/fonts.swf");
+}*/
+
+ScrollBar
+{
+	downArrowDisabledSkin: Embed(source="skins/VScrollBar_downArrowDisabledSkin.png");
+	downArrowDownSkin: Embed(source="skins/VScrollBar_downArrowDownSkin.png");
+	downArrowOverSkin: Embed(source="skins/VScrollBar_downArrowOverSkin.png");
+	downArrowUpSkin: Embed(source="skins/VScrollBar_downArrowUpSkin.png");
+	thumbIcon: Embed(source="skins/VScrollBar_thumbIcon.png");
+	trackSkin: Embed(source="skins/VScrollBar_trackSkin.png");
+	upArrowDisabledSkin: Embed(source="skins/VScrollBar_upArrowDisabledSkin.png");
+	upArrowDownSkin: Embed(source="skins/VScrollBar_upArrowDownSkin.png");
+	upArrowOverSkin: Embed(source="skins/VScrollBar_upArrowOverSkin.png");
+	upArrowUpSkin: Embed(source="skins/VScrollBar_upArrowUpSkin.png");
+	thumbDownSkin: Embed(
+	   source="skins/VScrollBar_thumbDownSkin.png",
+		   scaleGridLeft="1", scaleGridTop="5", 
+		   scaleGridRight="8", scaleGridBottom="44" );
+	thumbOverSkin: Embed(
+	   source="skins/VScrollBar_thumbOverSkin.png",
+		   scaleGridLeft="1", scaleGridTop="5", 
+		   scaleGridRight="8", scaleGridBottom="44" );
+	thumbUpSkin: Embed(
+	   source="skins/VScrollBar_thumbUpSkin.png",
+		   scaleGridLeft="1", scaleGridTop="5", 
+		   scaleGridRight="8", scaleGridBottom="44" );
+}
+
+Button
+{
+	horizontalGap: -1;
+    firstButtonStyleName: "firstButtonBarButton";
+    lastButtonStyleName: "lastButtonBarButton";
+}
+
+.mainPanel {
+   header-height: 0;
+   vertical-gap: 2;
+	borderSkin: Embed( 
+	   source="skins/Panel_borderSkin.png", 
+   	   scaleGridLeft="12", scaleGridTop="31", 
+   	   scaleGridRight="265", scaleGridBottom="189" );	
+    padding-top: 20;
+	padding-left: 8;
+	padding-right: 8;
+}
+
+.onlineIcon {
+	background-color: #26DE26;
+	corner-radius: 7;
+	borderThickness: 0;
+	borderStyle: solid;
+}
+
+.offlineIcon {
+	background-color: #D32929;
+	corner-radius: 7;
+	borderStyle: solid;
+	borderThickness: 0;
+}
+
+HRule {
+	strokeColor: #b9b9b9;
+	strokeWidth: 2;
+	shadowColor: #FFFFFF; 
+}
+
+.FormItemLabel {
+	color: #777777;
+}
+
+.FormItemValue {
+	color: #444444;
+}
+
+.panelTitleStyle {
+   fontFamily: "Myriad Pro SemiCond";
+   fontSize: 24;
+   textIndent: 20;
+}
+
+.statusPanelTitleSubStyle {
+   fontFamily: "Myriad Pro SemiCond";
+   fontSize: 16;
+   horizontal-center: right;
+   paddingLeft: 15;
+}
+
+.acPanelTitleSubStyle {
+   fontFamily: "Myriad Pro SemiCond";
+   fontSize: 16;
+   horizontal-center: right;
+	color: #C20D2B;
+}
+
+.panelTitleSubStyle {
+   fontFamily: "Myriad Pro SemiCond";
+   fontSize: 16;
+   horizontal-center: right;
+}
+
+.lowerPanelTitleSubStyle{
+   fontFamily: "Myriad Pro SemiCond";
+   fontSize: 16;
+   textIndent: 20;
+}
+
+.panelTitleLogo {
+	background-image:Embed(source="assets/todoLogo_big.png");
+	backgroundAlpha: 1.0;
+	backgroundSize: auto;
+}
+
+.firstButtonBarButton
+{
+    disabledSkin: Embed(
+      source="skins/ButtonBarFirstButton_disabledSkin.png",
+		   scaleGridLeft="6", scaleGridTop="6", 
+		   scaleGridRight="40", scaleGridBottom="16" );
+    downSkin: Embed(
+      source="skins/ButtonBarFirstButton_downSkin.png",
+		   scaleGridLeft="6", scaleGridTop="6", 
+		   scaleGridRight="40", scaleGridBottom="16" );
+    overSkin: Embed(
+      source="skins/ButtonBarFirstButton_overSkin.png",
+		   scaleGridLeft="6", scaleGridTop="6", 
+		   scaleGridRight="40", scaleGridBottom="16" );
+    selectedDisabledSkin: Embed(
+      source="skins/ButtonBarFirstButton_selectedDisabledSkin.png",
+		   scaleGridLeft="6", scaleGridTop="6", 
+		   scaleGridRight="40", scaleGridBottom="16" );
+    selectedDownSkin: Embed(
+      source="skins/ButtonBarFirstButton_downSkin.png",
+		   scaleGridLeft="6", scaleGridTop="6", 
+		   scaleGridRight="40", scaleGridBottom="16" );
+    selectedOverSkin: Embed(
+      source="skins/ButtonBarFirstButton_overSkin.png",
+		   scaleGridLeft="6", scaleGridTop="6", 
+		   scaleGridRight="40", scaleGridBottom="16" );
+    selectedUpSkin: Embed(
+      source="skins/ButtonBarFirstButton_selectedUpSkin.png",
+		   scaleGridLeft="6", scaleGridTop="6", 
+		   scaleGridRight="40", scaleGridBottom="16" );
+    upSkin: Embed(
+      source="skins/ButtonBarFirstButton_upSkin.png",
+		   scaleGridLeft="6", scaleGridTop="6", 
+		   scaleGridRight="40", scaleGridBottom="16" );
+}
+
+.lastButtonBarButton
+{
+    disabledSkin: Embed(
+      source="skins/ButtonBarLastButton_disabledSkin.png",
+   		scaleGridLeft="6", scaleGridTop="6", 
+   		scaleGridRight="40", scaleGridBottom="16" );
+    downSkin: Embed(
+      source="skins/ButtonBarLastButton_downSkin.png",
+		   scaleGridLeft="6", scaleGridTop="6", 
+		   scaleGridRight="40", scaleGridBottom="16" );
+    overSkin: Embed(
+      source="skins/ButtonBarLastButton_overSkin.png",
+		   scaleGridLeft="6", scaleGridTop="6", 
+		   scaleGridRight="40", scaleGridBottom="16" );
+    selectedDisabledSkin: Embed(
+      source="skins/ButtonBarLastButton_disabledSkin.png",
+		   scaleGridLeft="6", scaleGridTop="6", 
+		   scaleGridRight="40", scaleGridBottom="16" );
+    selectedDownSkin: Embed(
+      source="skins/ButtonBarLastButton_downSkin.png",
+		   scaleGridLeft="6", scaleGridTop="6", 
+		   scaleGridRight="40", scaleGridBottom="16" );
+    selectedOverSkin: Embed(
+      source="skins/ButtonBarLastButton_overSkin.png",
+		   scaleGridLeft="6", scaleGridTop="6", 
+		   scaleGridRight="40", scaleGridBottom="16" );
+    selectedUpSkin: Embed(
+      source="skins/ButtonBarLastButton_selectedUpSkin.png",
+		   scaleGridLeft="6", scaleGridTop="6", 
+		   scaleGridRight="40", scaleGridBottom="16" );
+    upSkin: Embed(
+      source="skins/ButtonBarLastButton_upSkin.png",
+		   scaleGridLeft="6", scaleGridTop="6", 
+		   scaleGridRight="40", scaleGridBottom="16" );
+}
+Panel
+{
+	borderThicknessLeft: 4;
+	borderThicknessRight: 4;
+	roundedBottomCorners: true;
+	borderAlpha: 0.7;
+	paddingTop: 20;
+	paddingBottom: 20;
+	paddingLeft: 20;
+	paddingRight: 20;
+}
+
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_disabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_disabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_disabledSkin.png
new file mode 100644
index 0000000..09c33cb
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_disabledSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_downSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_downSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_downSkin.png
new file mode 100644
index 0000000..bd8646c
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_downSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_overSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_overSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_overSkin.png
new file mode 100644
index 0000000..349a753
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_overSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_selectedDisabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_selectedDisabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_selectedDisabledSkin.png
new file mode 100644
index 0000000..f73df16
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_selectedDisabledSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_selectedUpSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_selectedUpSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_selectedUpSkin.png
new file mode 100644
index 0000000..16c9a95
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_selectedUpSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_upSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_upSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_upSkin.png
new file mode 100644
index 0000000..95dc22d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_upSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_disabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_disabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_disabledSkin.png
new file mode 100644
index 0000000..4366eea
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_disabledSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_downSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_downSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_downSkin.png
new file mode 100644
index 0000000..ad95d69
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_downSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_overSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_overSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_overSkin.png
new file mode 100644
index 0000000..c15bf1f
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_overSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_selectedDisabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_selectedDisabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_selectedDisabledSkin.png
new file mode 100644
index 0000000..b044701
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_selectedDisabledSkin.png differ


[37/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/arrow.ai
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/arrow.ai b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/arrow.ai
new file mode 100644
index 0000000..7331f5b
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/arrow.ai
@@ -0,0 +1,1121 @@
+%PDF-1.5
%����
+1 0 obj
<</Metadata 2 0 R/OCProperties<</D<</ON[5 0 R]/Order 6 0 R/RBGroups[]>>/OCGs[5 0 R]>>/Pages 3 0 R/Type/Catalog>>
endobj
2 0 obj
<</Length 43191/Subtype/XML/Type/Metadata>>stream
+<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
+<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.2.2-c063 53.352624, 2008/07/30-18:05:41        ">
+   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+      <rdf:Description rdf:about=""
+            xmlns:dc="http://purl.org/dc/elements/1.1/">
+         <dc:format>application/pdf</dc:format>
+         <dc:title>
+            <rdf:Alt>
+               <rdf:li xml:lang="x-default">arrow</rdf:li>
+            </rdf:Alt>
+         </dc:title>
+      </rdf:Description>
+      <rdf:Description rdf:about=""
+            xmlns:xmp="http://ns.adobe.com/xap/1.0/"
+            xmlns:xmpGImg="http://ns.adobe.com/xap/1.0/g/img/">
+         <xmp:CreatorTool>Adobe Illustrator CS4</xmp:CreatorTool>
+         <xmp:CreateDate>2009-12-09T09:41:16+01:00</xmp:CreateDate>
+         <xmp:ModifyDate>2009-12-09T09:41:17+01:00</xmp:ModifyDate>
+         <xmp:MetadataDate>2009-12-09T09:41:17+01:00</xmp:MetadataDate>
+         <xmp:Thumbnails>
+            <rdf:Alt>
+               <rdf:li rdf:parseType="Resource">
+                  <xmpGImg:width>256</xmpGImg:width>
+                  <xmpGImg:height>196</xmpGImg:height>
+                  <xmpGImg:format>JPEG</xmpGImg:format>
+                  <xmpGImg:image>/9j/4AAQSkZJRgABAgEASABIAAD/7QAsUGhvdG9zaG9wIDMuMAA4QklNA+0AAAAAABAASAAAAAEA&#xA;AQBIAAAAAQAB/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoK&#xA;DBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx8fHx8fHwEHBwcNDA0YEBAYGhURFRofHx8f&#xA;Hx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8f/8AAEQgAxAEAAwER&#xA;AAIRAQMRAf/EAaIAAAAHAQEBAQEAAAAAAAAAAAQFAwIGAQAHCAkKCwEAAgIDAQEBAQEAAAAAAAAA&#xA;AQACAwQFBgcICQoLEAACAQMDAgQCBgcDBAIGAnMBAgMRBAAFIRIxQVEGE2EicYEUMpGhBxWxQiPB&#xA;UtHhMxZi8CRygvElQzRTkqKyY3PCNUQnk6OzNhdUZHTD0uIIJoMJChgZhJRFRqS0VtNVKBry4/PE&#xA;1OT0ZXWFlaW1xdXl9WZ2hpamtsbW5vY3R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo+Ck5SVlpeYmZ&#xA;qbnJ2en5KjpKWmp6ipqqusra6voRAAICAQIDBQUEBQYECAMDbQEAAhEDBCESMUEFURNhIgZxgZEy&#xA;obHwFMHR4SNCFVJicvEzJDRDghaSUyWiY7LCB3PSNeJEgxdUkwgJChgZJjZFGidkdFU38qOzwygp&#xA;0+PzhJSktMTU5PRldYWVpbXF1eX1RlZmdoaWprbG1ub2R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo&#xA;+DlJWWl5iZmpucnZ6fkqOkpaanqKmqq6ytrq+v/aAAwDAQACEQMRAD8A9U4q7FXYq7FXYq7FX
 Yq7&#xA;FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7F&#xA;XYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FX&#xA;Yq7FXYq7FXYq7FXYq7FXYq7FXVxV1cVdXFXVxV2KuxV2KuxV2KuxV2KuxV2KuxV2KuxV2KuxV2Ku&#xA;xV2KuxV2KuxV2KuxV2KuxV2KuxV1cVaxV2KuxV2KuxV2Kt1xV2KuxV2KuxV2KuxV2KuxV2KuxV2K&#xA;uxV2KuxV2KuxV2KuxV2KuxV2KuxVquKuxV1cVariricVarirq4q2Dirq4q3XFXYq7FW8VdirsVdi&#xA;rsVdirsVdirsVdirsVdirsVdirsVdirsVdirRxV2KurirROKrScVdXFWiRirq4q6uKuBGKt1xVwO&#xA;KrgcVbrirsVcMVbxV2KuxV2KuxV2KuxV2KuxV2KuxV2KuxV2KuxVrFXYq1XFWq4qtJxVonFVtffF&#xA;Wiw8cVdy98Va5jxxVvl74q3X3xVcG98VbBxVdXFW64q3irsVbxV2KuxV2KuxV2KuxV2KuxV2KuxV&#xA;2KuxVrFXYq1iq0nFVpOKrSffFVpb3xVaW98VSrUNftbaqRn1ph+yv2R8zkxAlUPp/mRJT6d3SJyd&#xA;pB9j6a9MModypyHB3BHtlarg3virfL3xVcG98VXhtuuKrgxxVcDiq7FW8VdireKuxV2KuxV2KuxV&#xA;2KuxV2KuxV2KtVxV2KtHFVpOKrScVWE4qsYnFUFf6pa2a/vW+MjaMbsfowiJKsbv9cu7qqKfSh/k&#xA;XqfmctEAEJdk1diqP07WLi0IQ/vIP5D2/wBU5GUbVklrfQXUfOFgfFe4+YykikokMcCrgxxVUVji&#xA;q9Tiq8HFVwOKrsVbx
 V1cVbxV2KuxV2KuxV2KuxV2KuxV2KtYq44qtOKrScVWMcVQ9zdQQRmSZwiD&#xA;uf4YQLVjmoeZJJKpaD01/wB+H7R+Q7ZYId6ElZmZizEsx3JO5OWK1irsVdirsVXwzSwyCSJijjuM&#xA;BFqyDT9cimpHPSOXoG/ZP9MqlCkpsrZBVRG6YqqKcVVAcVXjFV4xVuuKt4q3irsVdirsVdirsVdi&#xA;rsVdirjirWKtHFVpOKqbsqgsx4qBUk7AYqkOpeZoY6x2g9WQf7sP2B8vHLBDvVjlzdXFzJ6k7l29&#xA;+g+Q7ZYBSFLCrsVdirsVdirsVdirsVTLTtamtqRy1kh6U/aX5ZCULVkdrdQ3EYeJuSn8PnlRFJRS&#xA;nAqoDiqoDiq4YquGKrsVbGKuxV2KuxV2KuxV2KuxV2KuOKtYq0cVUZ2kWNmiT1JB9lK8a/ScQrGd&#xA;RsvMl6T6qAR9oUdQv69/py0GIVL20HVl625+hkP6jkuMIU20fU1NDbt9FD+o48QVYdNvxWtu+3+S&#xA;cPEFQ7KysVYFWGxB2Iwq1irsVdirsVdirsVdiqrbXU9tIJIXKt38CPAjARasm0zW4LqkclIp/wCU&#xA;9G/1T/DKpQpKbKcgqoDiqoMVXDFVwxV2Kt4q7FXYq7FXYq7FXYq7FXHFWsVaOKrDiq04qpNiqm2K&#xA;qLjrirD9QNb64/4yN+BzIjyQh8KuxV2KuxVEaeoa8jUjkCTUHfscjLkrIPqlqesKH/Yj+mU2Url0&#xA;+yPWBPuGPEVXDStPYbwL+Iw8RVsaJpbUrB9zMP1HHjKplEiogRa8VFBUkn7zvkVVl64qvXriq/FV&#xA;wxV2Kt4q7FXYq7FXYq7FXYq7FXHFWsVaOKrSMVWHFVNhiqkwxVTcdcVYXeGt5OfGRz/wxzIHJCjh&#xA;V2KuxV2KovSRW/j9uX/ETkZ8lZIBlCV6jFVZB0xVVU
 YqqqMVVBiq8DFV1MVXDFXYq3irsVdirsVd&#xA;irsVdirsVccVaxVqmKtHFVhxVYcVU2U4qpsDviqDk02yYljAhLbk03qcPEVUG0mwP+6V+iow8RVT&#xA;bR9PP+6R9DMP448ZVYdGsa7JT/ZN/XHjKrDodn4MPpw8ZVUttJt4JRKhbktaVO24p4YDMlUeFORV&#xA;UVTiqoo6YqqKMVVAMVVBiq8DFVwxVvFWxirsVdirsVdirsVdirsVdirsVaxV2KtYqtIxVYRiqxhi&#xA;qxl9sVWFfbFVMr7YqsK+2KtcPbFWuHtirYT2xVeF9sVXqp8MVXqvtiqoq+2KrwMVXAYqvAxVsYq3&#xA;irYxV2KuxV2KuxV2KuxV2KuxV2KuOKtYq7FWqYqtIxVYRiq0j2xVYV9sVWlR4YqsKDwxVrh7Yq7j&#xA;7Yq7gPDFVwQeGKrwvtiq4L7YqvAxVcBiq6mKrhireKuxVvFXYq7FXYq7FXYq7FXYq7FXYq7FXEYq&#xA;1irqYqtxVojFVpGKtEDFVpUYqtKjFWuIxV3AYq7iMVbCjFVwAxVcBiq4DFVwGKtjFW8VdireKuxV&#xA;2KuxV2KuxV2KuxV2KuxV2KuxV2KupirWKuxVqmKtHFWiMVapirXHFWqYq6mKupirdMVbAxVsDFW6&#xA;Yq3TFW8VdireKuxV2KuxV2KuxV2KuxV2KuxV2KuxV2KuxV2KuxV1MVaxV1MVapirRGKupirqYq7j&#xA;irqYq6mKt0xV1MVbxV2Kt0xV2KuxV2KuxV2KuxV2KuxV2KuxV2KuxV2KuxV2KuxV2KuxV1MVdTFW&#xA;sVdirqYq6mKupirqYq6mKuxV2Kt0xV2KuxV2KuxV2KuxV2KuxV2KuxV2KuxV2KuxV2KuxV2KuxV2&#xA;KuxV2KuxV1MVdTFXUxVrFXYq3TFXUxV1MVdirsVdirsVdirsVdirsVdirsVdirsVdir
 sVdirsVdi&#xA;rsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdir&#xA;sVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirs&#xA;VdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsV&#xA;f//Z</xmpGImg:image>
+               </rdf:li>
+            </rdf:Alt>
+         </xmp:Thumbnails>
+      </rdf:Description>
+      <rdf:Description rdf:about=""
+            xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
+            xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
+            xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#">
+         <xmpMM:RenditionClass>proof:pdf</xmpMM:RenditionClass>
+         <xmpMM:OriginalDocumentID>uuid:65E6390686CF11DBA6E2D887CEACB407</xmpMM:OriginalDocumentID>
+         <xmpMM:DocumentID>xmp.did:FB7F117407206811BFE2E9F5A7A531BF</xmpMM:DocumentID>
+         <xmpMM:InstanceID>uuid:c886d873-14bc-3a47-a6cc-e5a29eac31e9</xmpMM:InstanceID>
+         <xmpMM:History>
+            <rdf:Seq>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>converted</stEvt:action>
+                  <stEvt:params>from application/pdf to &lt;unknown&gt;</stEvt:params>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>saved</stEvt:action>
+                  <stEvt:instanceID>xmp.iid:D47F11740720681191099C3B601C4548</stEvt:instanceID>
+                  <stEvt:when>2008-04-17T14:19:21+05:30</stEvt:when>
+                  <stEvt:softwareAgent>Adobe Illustrator CS4</stEvt:softwareAgent>
+                  <stEvt:changed>
+                     <rdf:Bag>
+                        <rdf:li>/</rdf:li>
+                     </rdf:Bag>
+                  </stEvt:changed>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>converted</stEvt:action>
+                  <stEvt:params>from application/pdf to &lt;unknown&gt;</stEvt:params>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>converted</stEvt:action>
+                  <stEvt:params>from application/pdf to &lt;unknown&gt;</stEvt:params>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>saved</stEvt:action>
+                  <stEvt:instanceID>xmp.iid:FD7F11740720681197C1BF14D1759E83</stEvt:instanceID>
+                  <stEvt:when>2008-05-16T17:01:20-07:00</stEvt:when>
+                  <stEvt:softwareAgent>Adobe Illustrator CS4</stEvt:softwareAgent>
+                  <stEvt:changed>
+                     <rdf:Bag>
+                        <rdf:li>/</rdf:li>
+                     </rdf:Bag>
+                  </stEvt:changed>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>saved</stEvt:action>
+                  <stEvt:instanceID>xmp.iid:F77F117407206811BC18AC99CBA78E83</stEvt:instanceID>
+                  <stEvt:when>2008-05-19T18:10:15-07:00</stEvt:when>
+                  <stEvt:softwareAgent>Adobe Illustrator CS4</stEvt:softwareAgent>
+                  <stEvt:changed>
+                     <rdf:Bag>
+                        <rdf:li>/</rdf:li>
+                     </rdf:Bag>
+                  </stEvt:changed>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>converted</stEvt:action>
+                  <stEvt:params>from application/vnd.adobe.illustrator to application/vnd.adobe.illustrator</stEvt:params>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>saved</stEvt:action>
+                  <stEvt:instanceID>xmp.iid:FB7F117407206811B628E3BF27C8C41B</stEvt:instanceID>
+                  <stEvt:when>2008-05-22T14:26:44-07:00</stEvt:when>
+                  <stEvt:softwareAgent>Adobe Illustrator CS4</stEvt:softwareAgent>
+                  <stEvt:changed>
+                     <rdf:Bag>
+                        <rdf:li>/</rdf:li>
+                     </rdf:Bag>
+                  </stEvt:changed>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>converted</stEvt:action>
+                  <stEvt:params>from application/vnd.adobe.illustrator to application/vnd.adobe.illustrator</stEvt:params>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>saved</stEvt:action>
+                  <stEvt:instanceID>xmp.iid:08C3BD25102DDD1181B594070CEB88D9</stEvt:instanceID>
+                  <stEvt:when>2008-05-28T16:51:46-07:00</stEvt:when>
+                  <stEvt:softwareAgent>Adobe Illustrator CS4</stEvt:softwareAgent>
+                  <stEvt:changed>
+                     <rdf:Bag>
+                        <rdf:li>/</rdf:li>
+                     </rdf:Bag>
+                  </stEvt:changed>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>converted</stEvt:action>
+                  <stEvt:params>from application/vnd.adobe.illustrator to application/vnd.adobe.illustrator</stEvt:params>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>saved</stEvt:action>
+                  <stEvt:instanceID>xmp.iid:F77F11740720681192B0DFFC927805D7</stEvt:instanceID>
+                  <stEvt:when>2008-05-30T21:26:38-07:00</stEvt:when>
+                  <stEvt:softwareAgent>Adobe Illustrator CS4</stEvt:softwareAgent>
+                  <stEvt:changed>
+                     <rdf:Bag>
+                        <rdf:li>/</rdf:li>
+                     </rdf:Bag>
+                  </stEvt:changed>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>converted</stEvt:action>
+                  <stEvt:params>from application/vnd.adobe.illustrator to application/vnd.adobe.illustrator</stEvt:params>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>saved</stEvt:action>
+                  <stEvt:instanceID>xmp.iid:F87F11740720681192B0DFFC927805D7</stEvt:instanceID>
+                  <stEvt:when>2008-05-30T21:27-07:00</stEvt:when>
+                  <stEvt:softwareAgent>Adobe Illustrator CS4</stEvt:softwareAgent>
+                  <stEvt:changed>
+                     <rdf:Bag>
+                        <rdf:li>/</rdf:li>
+                     </rdf:Bag>
+                  </stEvt:changed>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>converted</stEvt:action>
+                  <stEvt:params>from application/vnd.adobe.illustrator to application/vnd.adobe.illustrator</stEvt:params>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>saved</stEvt:action>
+                  <stEvt:instanceID>xmp.iid:F97F1174072068119098B097FDA39BEF</stEvt:instanceID>
+                  <stEvt:when>2008-06-02T13:26:10-07:00</stEvt:when>
+                  <stEvt:softwareAgent>Adobe Illustrator CS4</stEvt:softwareAgent>
+                  <stEvt:changed>
+                     <rdf:Bag>
+                        <rdf:li>/</rdf:li>
+                     </rdf:Bag>
+                  </stEvt:changed>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <stEvt:action>saved</stEvt:action>
+                  <stEvt:instanceID>xmp.iid:FB7F117407206811BFE2E9F5A7A531BF</stEvt:instanceID>
+                  <stEvt:when>2009-12-09T09:41:11+01:00</stEvt:when>
+                  <stEvt:softwareAgent>Adobe Illustrator CS4</stEvt:softwareAgent>
+                  <stEvt:changed>/</stEvt:changed>
+               </rdf:li>
+            </rdf:Seq>
+         </xmpMM:History>
+         <xmpMM:DerivedFrom rdf:parseType="Resource">
+            <stRef:instanceID>uuid:32300939-b1c4-8440-b812-b255b7b0d326</stRef:instanceID>
+            <stRef:documentID>xmp.did:F97F1174072068119098B097FDA39BEF</stRef:documentID>
+            <stRef:originalDocumentID>uuid:65E6390686CF11DBA6E2D887CEACB407</stRef:originalDocumentID>
+            <stRef:renditionClass>proof:pdf</stRef:renditionClass>
+         </xmpMM:DerivedFrom>
+      </rdf:Description>
+      <rdf:Description rdf:about=""
+            xmlns:illustrator="http://ns.adobe.com/illustrator/1.0/">
+         <illustrator:StartupProfile>Web</illustrator:StartupProfile>
+         <illustrator:Type>Document</illustrator:Type>
+      </rdf:Description>
+      <rdf:Description rdf:about=""
+            xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/"
+            xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#"
+            xmlns:xmpG="http://ns.adobe.com/xap/1.0/g/">
+         <xmpTPg:NPages>1</xmpTPg:NPages>
+         <xmpTPg:HasVisibleTransparency>True</xmpTPg:HasVisibleTransparency>
+         <xmpTPg:HasVisibleOverprint>False</xmpTPg:HasVisibleOverprint>
+         <xmpTPg:MaxPageSize rdf:parseType="Resource">
+            <stDim:w>800.000000</stDim:w>
+            <stDim:h>600.000000</stDim:h>
+            <stDim:unit>Pixels</stDim:unit>
+         </xmpTPg:MaxPageSize>
+         <xmpTPg:PlateNames>
+            <rdf:Seq>
+               <rdf:li>Cyan</rdf:li>
+               <rdf:li>Magenta</rdf:li>
+               <rdf:li>Yellow</rdf:li>
+               <rdf:li>Black</rdf:li>
+            </rdf:Seq>
+         </xmpTPg:PlateNames>
+         <xmpTPg:SwatchGroups>
+            <rdf:Seq>
+               <rdf:li rdf:parseType="Resource">
+                  <xmpG:groupName>Default Swatch Group</xmpG:groupName>
+                  <xmpG:groupType>0</xmpG:groupType>
+                  <xmpG:Colorants>
+                     <rdf:Seq>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>White</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>255</xmpG:red>
+                           <xmpG:green>255</xmpG:green>
+                           <xmpG:blue>255</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>Black</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>0</xmpG:red>
+                           <xmpG:green>0</xmpG:green>
+                           <xmpG:blue>0</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>RGB Red</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>255</xmpG:red>
+                           <xmpG:green>0</xmpG:green>
+                           <xmpG:blue>0</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>RGB Yellow</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>255</xmpG:red>
+                           <xmpG:green>255</xmpG:green>
+                           <xmpG:blue>0</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>RGB Green</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>0</xmpG:red>
+                           <xmpG:green>255</xmpG:green>
+                           <xmpG:blue>0</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>RGB Cyan</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>0</xmpG:red>
+                           <xmpG:green>255</xmpG:green>
+                           <xmpG:blue>255</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>RGB Blue</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>0</xmpG:red>
+                           <xmpG:green>0</xmpG:green>
+                           <xmpG:blue>255</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>RGB Magenta</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>255</xmpG:red>
+                           <xmpG:green>0</xmpG:green>
+                           <xmpG:blue>255</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=193 G=39 B=45</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>193</xmpG:red>
+                           <xmpG:green>39</xmpG:green>
+                           <xmpG:blue>45</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=237 G=28 B=36</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>237</xmpG:red>
+                           <xmpG:green>28</xmpG:green>
+                           <xmpG:blue>36</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=241 G=90 B=36</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>241</xmpG:red>
+                           <xmpG:green>90</xmpG:green>
+                           <xmpG:blue>36</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=247 G=147 B=30</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>247</xmpG:red>
+                           <xmpG:green>147</xmpG:green>
+                           <xmpG:blue>30</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=251 G=176 B=59</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>251</xmpG:red>
+                           <xmpG:green>176</xmpG:green>
+                           <xmpG:blue>59</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=252 G=238 B=33</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>252</xmpG:red>
+                           <xmpG:green>238</xmpG:green>
+                           <xmpG:blue>33</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=217 G=224 B=33</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>217</xmpG:red>
+                           <xmpG:green>224</xmpG:green>
+                           <xmpG:blue>33</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=140 G=198 B=63</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>140</xmpG:red>
+                           <xmpG:green>198</xmpG:green>
+                           <xmpG:blue>63</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=57 G=181 B=74</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>57</xmpG:red>
+                           <xmpG:green>181</xmpG:green>
+                           <xmpG:blue>74</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=0 G=146 B=69</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>0</xmpG:red>
+                           <xmpG:green>146</xmpG:green>
+                           <xmpG:blue>69</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=0 G=104 B=55</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>0</xmpG:red>
+                           <xmpG:green>104</xmpG:green>
+                           <xmpG:blue>55</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=34 G=181 B=115</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>34</xmpG:red>
+                           <xmpG:green>181</xmpG:green>
+                           <xmpG:blue>115</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=0 G=169 B=157</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>0</xmpG:red>
+                           <xmpG:green>169</xmpG:green>
+                           <xmpG:blue>157</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=41 G=171 B=226</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>41</xmpG:red>
+                           <xmpG:green>171</xmpG:green>
+                           <xmpG:blue>226</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=0 G=113 B=188</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>0</xmpG:red>
+                           <xmpG:green>113</xmpG:green>
+                           <xmpG:blue>188</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=46 G=49 B=146</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>46</xmpG:red>
+                           <xmpG:green>49</xmpG:green>
+                           <xmpG:blue>146</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=27 G=20 B=100</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>27</xmpG:red>
+                           <xmpG:green>20</xmpG:green>
+                           <xmpG:blue>100</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=102 G=45 B=145</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>102</xmpG:red>
+                           <xmpG:green>45</xmpG:green>
+                           <xmpG:blue>145</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=147 G=39 B=143</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>147</xmpG:red>
+                           <xmpG:green>39</xmpG:green>
+                           <xmpG:blue>143</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=158 G=0 B=93</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>158</xmpG:red>
+                           <xmpG:green>0</xmpG:green>
+                           <xmpG:blue>93</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=212 G=20 B=90</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>212</xmpG:red>
+                           <xmpG:green>20</xmpG:green>
+                           <xmpG:blue>90</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=237 G=30 B=121</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>237</xmpG:red>
+                           <xmpG:green>30</xmpG:green>
+                           <xmpG:blue>121</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=199 G=178 B=153</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>199</xmpG:red>
+                           <xmpG:green>178</xmpG:green>
+                           <xmpG:blue>153</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=153 G=134 B=117</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>153</xmpG:red>
+                           <xmpG:green>134</xmpG:green>
+                           <xmpG:blue>117</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=115 G=99 B=87</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>115</xmpG:red>
+                           <xmpG:green>99</xmpG:green>
+                           <xmpG:blue>87</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=83 G=71 B=65</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>83</xmpG:red>
+                           <xmpG:green>71</xmpG:green>
+                           <xmpG:blue>65</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=198 G=156 B=109</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>198</xmpG:red>
+                           <xmpG:green>156</xmpG:green>
+                           <xmpG:blue>109</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=166 G=124 B=82</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>166</xmpG:red>
+                           <xmpG:green>124</xmpG:green>
+                           <xmpG:blue>82</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=140 G=98 B=57</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>140</xmpG:red>
+                           <xmpG:green>98</xmpG:green>
+                           <xmpG:blue>57</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=117 G=76 B=36</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>117</xmpG:red>
+                           <xmpG:green>76</xmpG:green>
+                           <xmpG:blue>36</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=96 G=56 B=19</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>96</xmpG:red>
+                           <xmpG:green>56</xmpG:green>
+                           <xmpG:blue>19</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=66 G=33 B=11</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>66</xmpG:red>
+                           <xmpG:green>33</xmpG:green>
+                           <xmpG:blue>11</xmpG:blue>
+                        </rdf:li>
+                     </rdf:Seq>
+                  </xmpG:Colorants>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <xmpG:groupName>Grays</xmpG:groupName>
+                  <xmpG:groupType>1</xmpG:groupType>
+                  <xmpG:Colorants>
+                     <rdf:Seq>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=0 G=0 B=0</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>0</xmpG:red>
+                           <xmpG:green>0</xmpG:green>
+                           <xmpG:blue>0</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=26 G=26 B=26</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>26</xmpG:red>
+                           <xmpG:green>26</xmpG:green>
+                           <xmpG:blue>26</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=51 G=51 B=51</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>51</xmpG:red>
+                           <xmpG:green>51</xmpG:green>
+                           <xmpG:blue>51</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=77 G=77 B=77</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>77</xmpG:red>
+                           <xmpG:green>77</xmpG:green>
+                           <xmpG:blue>77</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=102 G=102 B=102</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>102</xmpG:red>
+                           <xmpG:green>102</xmpG:green>
+                           <xmpG:blue>102</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=128 G=128 B=128</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>128</xmpG:red>
+                           <xmpG:green>128</xmpG:green>
+                           <xmpG:blue>128</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=153 G=153 B=153</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>153</xmpG:red>
+                           <xmpG:green>153</xmpG:green>
+                           <xmpG:blue>153</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=179 G=179 B=179</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>179</xmpG:red>
+                           <xmpG:green>179</xmpG:green>
+                           <xmpG:blue>179</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=204 G=204 B=204</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>204</xmpG:red>
+                           <xmpG:green>204</xmpG:green>
+                           <xmpG:blue>204</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=230 G=230 B=230</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>230</xmpG:red>
+                           <xmpG:green>230</xmpG:green>
+                           <xmpG:blue>230</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=242 G=242 B=242</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>242</xmpG:red>
+                           <xmpG:green>242</xmpG:green>
+                           <xmpG:blue>242</xmpG:blue>
+                        </rdf:li>
+                     </rdf:Seq>
+                  </xmpG:Colorants>
+               </rdf:li>
+               <rdf:li rdf:parseType="Resource">
+                  <xmpG:groupName>Web Color Group</xmpG:groupName>
+                  <xmpG:groupType>1</xmpG:groupType>
+                  <xmpG:Colorants>
+                     <rdf:Seq>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=63 G=169 B=245</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>63</xmpG:red>
+                           <xmpG:green>169</xmpG:green>
+                           <xmpG:blue>245</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=122 G=201 B=67</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>122</xmpG:red>
+                           <xmpG:green>201</xmpG:green>
+                           <xmpG:blue>67</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=255 G=147 B=30</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>255</xmpG:red>
+                           <xmpG:green>147</xmpG:green>
+                           <xmpG:blue>30</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=255 G=29 B=37</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>255</xmpG:red>
+                           <xmpG:green>29</xmpG:green>
+                           <xmpG:blue>37</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=255 G=123 B=172</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>255</xmpG:red>
+                           <xmpG:green>123</xmpG:green>
+                           <xmpG:blue>172</xmpG:blue>
+                        </rdf:li>
+                        <rdf:li rdf:parseType="Resource">
+                           <xmpG:swatchName>R=189 G=204 B=212</xmpG:swatchName>
+                           <xmpG:mode>RGB</xmpG:mode>
+                           <xmpG:type>PROCESS</xmpG:type>
+                           <xmpG:red>189</xmpG:red>
+                           <xmpG:green>204</xmpG:green>
+                           <xmpG:blue>212</xmpG:blue>
+                        </rdf:li>
+                     </rdf:Seq>
+                  </xmpG:Colorants>
+               </rdf:li>
+            </rdf:Seq>
+         </xmpTPg:SwatchGroups>
+      </rdf:Description>
+      <rdf:Description rdf:about=""
+            xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
+         <pdf:Producer>Adobe PDF library 9.00</pdf:Producer>
+      </rdf:Description>
+   </rdf:RDF>
+</x:xmpmeta>
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                                                                                                    
+                           
+<?xpacket end="w"?>
endstream
endobj
3 0 obj
<</Count 1/Kids[7 0 R]/Type/Pages>>
endobj
7 0 obj
<</ArtBox[266.0 325.0 323.0 368.0]/BleedBox[0.0 0.0 800.0 600.0]/Contents 8 0 R/Group 9 0 R/LastModified(D:20091209094115+01'00')/MediaBox[0.0 0.0 800.0 600.0]/Parent 3 0 R/PieceInfo<</Illustrator 10 0 R>>/Resources<</ColorSpace<</CS0 11 0 R/CS1 11 0 R>>/ExtGState<</GS0 12 0 R/GS1 13 0 R/GS2 14 0 R>>/Properties<</MC0 5 0 R>>/Shading<</Sh0 15 0 R>>/XObject<</Fm0 16 0 R>>>>/Thumb 17 0 R/TrimBox[0.0 0.0 800.0 600.0]/Type/Page>>
endobj
8 0 obj
<</Filter/FlateDecode/Length 268>>stream
+H�lQ�n�0����H��c��vr��C�m�"N�z�a�C!H")��xr��+����܍d���oĆF0-��V�
��jF󆛶��p�͎,Q�)3jD>Y#
+k�[���Z񍏊�j�x�c���׏�y��9)<!!������A˕�=M�×�ݮh��J��L���&� ��@*�]S�ŋ�Vr��檩>�iE�K�u�~�������5fs�2ZI���-'A�j��Hk���o�_�\�^��\�����*��~ׯ9Z�
endstream
endobj
9 0 obj
<</CS 18 0 R/I false/K false/S/Transparency>>
endobj
17 0 obj
<</BitsPerComponent 8/ColorSpace 19 0 R/Filter[/ASCII85Decode/FlateDecode]/Height 75/Length 67/Width 100>>stream
+8;Z]X0bFC>%)ajf`KT5*3\?";=`TZ+2us!Z(9"D#`MqJ],X$SV!!!#oEs3B\?0@Y?~>
endstream
endobj
19 0 obj
[/Indexed/DeviceRGB 255 20 0 R]
endobj
20 0 obj
<</Filter[/ASCII85Decode/FlateDecode]/Length 428>>stream
+8;X]O>EqN@%''O_@%e@?J;%+8(9e>X=MR6S?i^YgA3=].HDXF.R$lIL@"pJ+EP(%0
+b]6ajmNZn*!='OQZeQ^Y*,=]?C.B+\Ulg9dhD*"iC[;*=3`oP1[!S^)?1)IZ4dup`
+E1r!/,*0[*9.aFIR2&b-C#s<Xl5FH@[<=!#6V)uDBXnIr.F>oRZ7Dl%MLY\.?d>Mn
+6%Q2oYfNRF$$+ON<+]RUJmC0I<jlL.oXisZ;SYU[/7#<&37rclQKqeJe#,UF7Rgb1
+VNWFKf>nDZ4OTs0S!saG>GGKUlQ*Q?45:CI&4J'_2j<etJICj7e7nPMb=O6S7UOH<
+PO7r\I.Hu&e0d&E<.')fERr/l+*W,)q^D*ai5<uuLX.7g/>$XKrcYp0n+Xl_nU*O(
+l[$6Nn+Z_Nq0]s7hs]`XX1nZ8&94a\~>
endstream
endobj
16 0 obj
<</BBox[266.0 368.0 323.0 325.0]/Group 21 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ColorSpace<</CS0 22 0 R>>/ExtGState<</GS0 23 0 R>>/ProcSet[/PDF/ImageC/ImageI]/XObject<</Im0 24 0 R>>>>/Subtype/Form>>stream
+q
+/GS0 gs
+57 0 0 43 266 325 cm
+/Im0 Do
+Q
+
endstream
endobj
21 0 obj
<</I false/K false/S/Transparency/Type/Group>>
endobj
24 0 obj
<</BitsPerComponent 8/ColorSpace 22 0 R/Decode[0.0 255.0]/Filter/FlateDecode/Height 43/Intent/RelativeColorimetric/Length 118/Name/X/SMask 25 0 R/Subtype/Image/Type/XObject/Width 57>>stream
+H���1�0CQr�Kw�ظj�J��&�7��Ɯ�Zvc
�)�t�,��Ŕr�$�&Y�!�Taí�8Tw �s|[R�r��&��Q+��z�����(`%X`Y��&zr�.|[
endstream
endobj
22 0 obj
[/Indexed 26 0 R 1 27 0 R]
endobj
25 0 obj
<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 57>>/Filter/FlateDecode/Height 43/Intent/RelativeColorimetric/Length 1000/Name/X/Subtype/Image/Type/XObject/Width 57>>stream
+H�ԕ�Wg�5a��a���%0�\T@���z��������j!mB�ML��Q�bMZZ�[�ў��vA��Cz���9gηwG���:O��9���
+�y(��61`C!�Ht�
T�D�X"���E�R��Ϡǘ�a
+�+&G�DP=M��dN�j
EQ���1���"9#5Z�h2[,f#�ӐJ@�H+Q�C$�0��jw�Y�u_�[Mz���(�6'��)�:#��x��P������tjkEr�q��-�?�O�R���P��i�)B!� M��91��7x11���^�Neƒ�!��1�6#;��ȕ�q�±/�侺qs�fa~fr,	�6 1T��I�2\���|��l~��z�~�����\&
��Qʥ0f�$� �Z��;�z���ݓ���6��,�f��ˢSA���\�����;82=_,?~��������+���p��n�%�:�	
���pzv�n���_~������F������e֑ܔ��r�29��+�b���jo߿;z��U]]̍]�c=�
+�iE�59}��S�o7w_}�����Γ{�f���.��e
C��bj2��������m�Տ�k��\�J�f�g������������?�f���aZ��U5Ͱ�C�مRec{�������z���������A������\���Ǜ�;;�Ϫ�ҍk�án�	nGڰ��!�j���G���Bq��Z}XY�z!�N�\V=�i�v
+�All �����K++���\v<Q��7�M	�m�?IO����s3ә�X��ڌZ�{X��*H�$盛/K�N����X������4q�Y �%����7������BS�ה;��Pi
������}=].���ђ���+��6Ymv��a��
�s�Y��s�.��h���@뵔�b�Y�[�#�*�$I�JE��\܆��! Ǡ�2TH���'X.w�	V{yu�s".�⢪���8��O�z�,y�YW�Ru�����`���
endstream
endobj
26 0 obj
[/ICCBased 28 0 R]
endobj
27 0 obj
<</Length 6>>stream
+���
endstream
endobj
28 0 obj
<</Filter/FlateDecode/Length 2574/N 3>>stream
+H���yTSw�oɞ����c
[���5la�QIBH�ADED���2�mtFOE�.�c��}���0��8�׎�8G�Ng�����9�w���߽����'����0�֠�J��b�	
+ 2y�.-;!��K�Z�	���^�i�"L��0���-��
@8(��r�;q��7�L��y��&�Q��q�4�j���|�9��
+�V��)g�B�0�i�W��8#�8wթ��8_�٥ʨQ����Q�j@�&�A)/��g�>'K���t�;\��
ӥ$պF�ZUn����(4T�%)뫔�0C&�����Z��i���8��bx��E���B�;�����P���ӓ̹�A�om?�W=
+�x������-�����[���0����}��y)7ta�����>j���T�7���@���tܛ�`q�2��ʀ��&���6�Z�L�Ą?�_��yxg)˔z���çL�U���*�u�Sk�Se�O4?׸�c����.����R�
߁��-��2�5������	��S�>ӣV����d�`r��n~��Y�&�+`��;�A4�� ���A9�=�-�t��l�`;��~p����	�Gp|	��[`L��`<� "A�YA�+��Cb(��R�,�*�T�2B-�
+�ꇆ��n���Q�t�}MA�0�al������S�x	��k�&�^���>�0|>_�'��,�G!"F$H:R��!z��F�Qd?r9�\A&�G���rQ��h������E��]�a�4z�Bg�����E#H	�*B=��0H�I��p�p�0MxJ$�D1��D, V���ĭ����KĻ�Y�dE�"E��I2���E�B�G��t�4MzN�����r!YK� ���?%_&�#���(��0J:EAi��Q�(�()ӔWT6U@���P+���!�~��m���D�e�Դ�!��h�Ӧh/��']B/����ҏӿ�?a0n�hF!��X���8����܌k�c&5S�����6�l��Ia�2c�K�M�A�!�E�#��ƒ�d�V��(�k��e���l
����}�}�C�q�9
+N'��)�].�u�J�r�
+��w�G�	xR^���[�oƜch�g�`>b���$���*~� �:����E���b��~���,m,�-��ݖ,�Y��¬�*�6X�[ݱF�=�3�뭷Y��~dó	���t���i�z�f�6�~`{�v���.�Ng����#{�}�}��������j������c1X6���fm���;'_9	�r�:�8�q�:��˜�O:ϸ8������u��Jq���nv=���M���m���R 4	�
+n�3ܣ�k�Gݯz=��[=��=�<�=G</z�^�^j��^��	ޡ�Z�Q�B�0FX'�+������t���<�u�-���{���_�_�ߘ�-G�,�}���/���Hh8�m�W�2p[���AiA��N�#8$X�?�A�KHI�{!7�<q��W�y(!46�-���a�a���a�W��	��@�@�`l���YĎ��H,�$����(�(Y�h�7��ъ���b<b*b��<�����~�L&Y&9��%�u�M�s�s��NpJP%�M�IJlN<�DHJIڐtCj'�KwKg�C��%�N��d��|�ꙪO=��%�mL���u�v�x:H��oL��!Ȩ��C&13#s$�/Y����������=�Osbs�rn��sO�1��v�=ˏ��ϟ\�h٢���#��¼����oZ<]T�Ut}�`IÒsK��V-���Y,+>TB(�/�S�,]6*�-���W:#��7�*���e��^YDY�}U�j��AyT�`�#�D=���"�b{ų���+�ʯ:�!kJ4G�m��t�}uC�%���K7YV��fF���Y�.�
 ��=b��?S��ƕƩ�Ⱥ����y���
چ���k�5%4��m�7�lqlio�Z�lG+�Z�z�͹��mzy��]�����?u�u�w|�"űN���wW&���e֥ﺱ*|����j��5k��yݭ���ǯg��^y�kEk�����l�D_p߶������7Dm����o꿻1m��l�{��Mś�
n�L�l�<9��O�[����$�����h�՛B��������d�Ҟ@��������i�ءG���&����v��V�ǥ8��������n��R�ĩ7�������u��\�ЭD���-�������u��`�ֲK�³8���%�������y��h��Y�ѹJ�º;���.���!������
+�����z���p���g���_���X���Q���K���F���Aǿ�=ȼ�:ɹ�8ʷ�6˶�5̵�5͵�6ζ�7ϸ�9к�<Ѿ�?���D���I���N���U���\���d���l���v��ۀ�܊�ݖ�ޢ�)߯�6��D���S���c���s����
����2��F���[���p������(��@���X���r������4���P���m��������8���W���w����)���K���m������
endstream
endobj
23 0 obj
<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 29 0 R/Type/ExtGState/ca 1.0/op false>>
endobj
29 0 obj
<</BC 30 0 R/G 31 0 R/S/Luminosity/Type/Mask>>
endobj
30 0 obj
[0.0 0.0 0.0]
endobj
31 0 obj
<</BBox[266.0 368.0 323.0 325.0]/Group 32 0 R/Length 41/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 33 0 R>>/ProcSet[/PDF/ImageB]/XObject<</Im0 34 0 R>>>>/Subtype/Form>>stream
+q
+/GS0 gs
+57 0 0 43 266 325 cm
+/Im0 Do
+Q
+
endstream
endobj
32 0 obj
<</CS 26 0 R/I false/K false/S/Transparency/Type/Group>>
endobj
34 0 obj
<</BitsPerComponent 8/ColorSpace/DeviceGray/DecodeParms<</BitsPerComponent 4/Colors 1/Columns 57>>/Filter/FlateDecode/Height 43/Intent/RelativeColorimetric/Length 1000/Name/X/Subtype/Image/Type/XObject/Width 57>>stream
+H�ԕ�Wg�5a��a���%0�\T@���z��������j!mB�ML��Q�bMZZ�[�ў��vA��Cz���9gηwG���:O��9���
+�y(��61`C!�Ht�
T�D�X"���E�R��Ϡǘ�a
+�+&G�DP=M��dN�j
EQ���1���"9#5Z�h2[,f#�ӐJ@�H+Q�C$�0��jw�Y�u_�[Mz���(�6'��)�:#��x��P������tjkEr�q��-�?�O�R���P��i�)B!� M��91��7x11���^�Neƒ�!��1�6#;��ȕ�q�±/�侺qs�fa~fr,	�6 1T��I�2\���|��l~��z�~�����\&
��Qʥ0f�$� �Z��;�z���ݓ���6��,�f��ˢSA���\�����;82=_,?~��������+���p��n�%�:�	
���pzv�n���_~������F������e֑ܔ��r�29��+�b���jo߿;z��U]]̍]�c=�
+�iE�59}��S�o7w_}�����Γ{�f���.��e
C��bj2��������m�Տ�k��\�J�f�g������������?�f���aZ��U5Ͱ�C�مRec{�������z���������A������\���Ǜ�;;�Ϫ�ҍk�án�	nGڰ��!�j���G���Bq��Z}XY�z!�N�\V=�i�v
+�All �����K++���\v<Q��7�M	�m�?IO����s3ә�X��ڌZ�{X��*H�$盛/K�N����X������4q�Y �%����7������BS�ה;��Pi
������}=].���ђ���+��6Ymv��a��
�s�Y��s�.��h���@뵔�b�Y�[�#�*�$I�JE��\܆��! Ǡ�2TH���'X.w�	V{yu�s".�⢪���8��O�z�,y�YW�Ru�����`���
endstream
endobj
33 0 obj
<</AIS true/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 1.0/op false>>
endobj
15 0 obj
<</AntiAlias false/ColorSpace 11 0 R/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 35 0 R/ShadingType 2>>
endobj
11 0 obj
[/ICCBased 28 0 R]
endobj
35 0 obj
<</Bounds[]/Domain[0.0 1.0]/Encode[0.0 1.0]/FunctionType 3/Functions[36 0 R]>>
endobj
36 0 obj
<</C0[0.992157 0.992157 0.996078]/C1[0.992157 0.992157 0.996078]/Domain[0.0 1.0]/FunctionType 
 2/N 2.40942>>
endobj
5 0 obj
<</Intent 37 0 R/Name(Layer 1)/Type/OCG/Usage 38 0 R>>
endobj
37 0 obj
[/View/Design]
endobj
38 0 obj
<</CreatorInfo<</Creator(Adobe Illustrator 14.0)/Subtype/Artwork>>>>
endobj
12 0 obj
<</AIS false/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask 39 0 R/Type/ExtGState/ca 1.0/op false>>
endobj
13 0 obj
<</AIS true/BM/Normal/CA 0.179993/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 0.179993/op false>>
endobj
14 0 obj
<</AIS false/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 1.0/op false>>
endobj
39 0 obj
<</G 40 0 R/S/Luminosity/Type/Mask>>
endobj
40 0 obj
<</BBox[-32768.0 32767.0 32767.0 -32767.0]/Group 41 0 R/Length 97/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</ExtGState<</GS0 14 0 R>>/Shading<</Sh0 42 0 R>>>>/Subtype/Form>>stream
+q
+0 g
+/GS0 gs
+-0.0087891 0.0003662 0.000061 0.0015106 292.6523437 345.6567383 cm
+BX /Sh0 sh EX Q
+
endstream
endobj
41 0 obj
<</CS 43 0 R/I false/K false/S/Transparency/Type/Group>>
endobj
42 0 obj
<</AntiAlias false/ColorSpace 44 0 R/Coords[0.0 0.0 1.0 0.0]/Domain[0.0 1.0]/Extend[true true]/Function 45 0 R/ShadingType 2>>
endobj
44 0 obj
/DeviceGray
endobj
45 0 obj
<</Bounds[]/Domain[0.0 1.0]/Encode[0.0 1.0]/FunctionType 3/Functions[46 0 R]>>
endobj
46 0 obj
<</C0[0.0]/C1[1.0]/Domain[0.0 1.0]/FunctionType 2/N 2.40942>>
endobj
43 0 obj
/DeviceGray
endobj
10 0 obj
<</LastModified(D:20091209094115+01'00')/Private 47 0 R>>
endobj
47 0 obj
<</AIMetaData 48 0 R/AIPrivateData1 49 0 R/AIPrivateData2 50 0 R/AIPrivateData3 51 0 R/ContainerVersion 11/CreatorVersion 14/NumBlock 3/RoundtripStreamType 1/RoundtripVersion 14>>
endobj
48 0 obj
<</Length 927>>stream
+%!PS-Adobe-3.0 
%%Creator: Adobe Illustrator(R) 14.0
%%AI8_CreatorVersion: 14.0.0
%%For: (xagnetti) ()
%%Title: (Untitled-1)
%%CreationDate: 09/12/2009 09:41
%%Canvassize: 16383
%%BoundingBox: 266 325 323 368
%%HiResBoundingBox: 266 325 323 368
%%DocumentProcessColors: Cyan Magenta Yellow Black
%AI5_FileFormat 10.0
%AI12_BuildNumber: 367
%AI3_ColorUsage: Color
%AI7_ImageSettings: 0
%%RGBProcessColor: 0 0 0 ([Registration])
%AI3_Cropmarks: 0 0 800 600
%AI3_TemplateBox: 400.5 299.5 400.5 299.5
%AI3_TileBox: -3 20.5 780 579.5
%AI3_DocumentPreview: None
%AI5_ArtSize: 14400 14400
%AI5_RulerUnits: 6
%AI9_ColorModel: 1
%AI5_ArtFlags: 0 0 0 1 0 0 1 0 0
%AI5_TargetResolution: 800
%AI5_NumLayers: 1
%AI9_OpenToView: -187.6333 617 1.61 1835 1010 18 0 0 43 129 0 0 0 1 1 0 1 1 0
%AI5_OpenViewLayers: 7
%%PageOrigin:0 0
%AI7_GridSettings: 72 8 72 8 1 0 0.8 0.8 0.8 0.9 0.9 0.9
%AI9_Flatten: 1
%AI12_CMSettings: 00.MS
%%EndComments

endstream
endobj
49 0 obj
<</Length 6497>>stream
+%%BoundingBox: 266 325 323 368
%%HiResBoundingBox: 266 325 323 368
%AI7_Thumbnail: 128 100 8
%%BeginData: 6366 Hex Bytes
%0000330000660000990000CC0033000033330033660033990033CC0033FF
%0066000066330066660066990066CC0066FF009900009933009966009999
%0099CC0099FF00CC0000CC3300CC6600CC9900CCCC00CCFF00FF3300FF66
%00FF9900FFCC3300003300333300663300993300CC3300FF333300333333
%3333663333993333CC3333FF3366003366333366663366993366CC3366FF
%3399003399333399663399993399CC3399FF33CC0033CC3333CC6633CC99
%33CCCC33CCFF33FF0033FF3333FF6633FF9933FFCC33FFFF660000660033
%6600666600996600CC6600FF6633006633336633666633996633CC6633FF
%6666006666336666666666996666CC6666FF669900669933669966669999
%6699CC6699FF66CC0066CC3366CC6666CC9966CCCC66CCFF66FF0066FF33
%66FF6666FF9966FFCC66FFFF9900009900339900669900999900CC9900FF
%9933009933339933669933999933CC9933FF996600996633996666996699
%9966CC9966FF9999009999339999669999999999CC9999FF99CC0099CC33
%99CC6699CC9999CCCC99CCFF99FF0099FF3399FF6699FF9999FFCC99FFFF
%CC0000C
 C0033CC0066CC0099CC00CCCC00FFCC3300CC3333CC3366CC3399
%CC33CCCC33FFCC6600CC6633CC6666CC6699CC66CCCC66FFCC9900CC9933
%CC9966CC9999CC99CCCC99FFCCCC00CCCC33CCCC66CCCC99CCCCCCCCCCFF
%CCFF00CCFF33CCFF66CCFF99CCFFCCCCFFFFFF0033FF0066FF0099FF00CC
%FF3300FF3333FF3366FF3399FF33CCFF33FFFF6600FF6633FF6666FF6699
%FF66CCFF66FFFF9900FF9933FF9966FF9999FF99CCFF99FFFFCC00FFCC33
%FFCC66FFCC99FFCCCCFFCCFFFFFF33FFFF66FFFF99FFFFCC110000001100
%000011111111220000002200000022222222440000004400000044444444
%550000005500000055555555770000007700000077777777880000008800
%000088888888AA000000AA000000AAAAAAAABB000000BB000000BBBBBBBB
%DD000000DD000000DDDDDDDDEE000000EE000000EEEEEEEE0000000000FF
%00FF0000FFFFFF0000FF00FFFFFF00FFFFFF
%524C45FDFCFFFDFCFFFDFCFFFDFCFFFDFCFFFDFCFFFDFCFFFDFCFFFDFCFF
%FDD6FFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FDFC
%FFFDE5FFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FF
%FFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FDDFFFA8FFFFFFA8FFFFFFA8FFFFFF
%A8FFFFFFA8FFFFFFA8FDDDFFA8FFFFFFA8FF
 FFFFA8FFFFFFA8FFFFFFA8FF
%FFFFA8FFA8FFA8FFA8FFA8FFA8FFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFF
%A8FFFFFFA8FDD7FFA8FFFFFFA8FFFFFFA8FFA8FFA8FFFFFFA8FFFFFFA8FF
%FFFFA8FFFFFFA8FD6CFFA8A9A8FD62FFA8FFFFFFA8FFFFFFA8FFFFFFA8FF
%FFFFA8FFA8FFA8FFA8FFA8FFA8A87EA8A8FFA8FFA8FFA8FFA8FFA8FFA8FF
%A8FFA8FFA8FFFFFFA8FFFFFFA8FFFFFFA8FD5AFFA8FFA8A8A8A9A8A8A8FD
%6CFFA8FFFFFFA8FFFFFFA8FFA8A87EA8A8A87EA8A8A87EA9A8FFA8FFA8FF
%A8FFA8FFA8FFFFFFA8FFFFFFA8FD60FFFD05A8A9A8A8A8A9A8A87EA9A8FF
%A8FFFFFFA8FD54FFA8FFFFFFA8FFFFFFA8FFFFFFA8FFA8FFA8FFA8FFA8A8
%7EA87EA87EA87EA87EA87EA87EA87EA8A8FFA8FFA8FFA8FFA8FFA8FFA8FF
%A8FFA8FFA8FFFFFFA8FFFFFFA8FFFFFFA8FD4EFFA8A9A8A8A8A9A8A8A8A9
%A8A8A8A9A8A8A8A9A8A8A8FD60FFA8FFFFFFA8FFFFFFA8FFA8A87EA8A8A8
%7EA8A8A87EA8A8A87EA8A8A87EA8A8A87EFFA8FFA8FFA8FFA8FFA8FFA8FF
%FFFFA8FFFFFFA8FD52FFA9A97EFD04A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8
%A8A8A9A8A87EA9A9FFA8FFFFFFA8FD4CFFA8FFFFFFA8FFFFFFA8FFA8FFA8
%FFFFFFA8A87EA87EA87EA87EA87EA87EA87EA87EA87EA87EA87EA87EA87E
%A87EA8A8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFFFF
 FA8FFFFFFA8FFFFFFA8
%FD46FFA8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8
%A8A8A9A8A8A8FD58FFA8FFFFFFA8A87EA87EA8A8A87EA8A8A87EA8A8A87E
%A8A8A87EA8A8A87EA8A8A87EA8A8A87EA8A2A8A2FFA8FFA8FFA8FFA8FFFF
%FFA8FFFFFFA8FD4AFFA8A8A2A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8
%A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8FFFFFFA8FD48FFA8FFFFFFA8
%FFFFFFA8FFA8A97EA87EA87EA87EA87EA87EA87EA87EA87EA87EA87EA87E
%A87EA87EA87EA87EA87EA87EA87EA87EA87EA8A8FFA8FFA8FFA8FFA8FFA8
%FFFFFFA8FFFFFFA8FFFFFFA8FD3CFFCBA9A8A9A8A8A8A9A8A8A8A9A8A8A8
%A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8
%A8A8FD50FFA8A87EA87EA8A8A87EA8A8A87EA8A8A87EA8A8A87EA8A8A87E
%A8A8A87EA8A8A87EA8A8A87EA8A8A87EA8A8A87EA87EA8A8FFFFFFA8FFFF
%FFA8FFFFFFA8FD42FFA8A8A2FD08A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8
%A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8FD48FFA8FF
%FFA97EA8A8A87EA8A2A87EA87EA87EA87EA87EA87EA87EA87EA87EA87EA8
%7EA87EA87EA87EA87EA87EA87EA87EA87EA87EA87EA87EA87EA9A8FFA8FF
%A8FFA8FFFFFFA8FFFFFFA8FFFFFFA8FD42FFA8FFA8FFA8
 FFA8A8A8A9A8A8
%A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9
%A8A9A8FD4CFFA8FFFFFFA8FFFFFFA8FFA8FFFD04A87EA8A8A87EA8A8A87E
%A8A8A87EA8A8A87EFD04A8A9A8A8A8A9A8A8A8A9FD07A8FFFFFFA8FD50FF
%A8FFFFFFA2A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8FFA8FF
%CFFFA8FFFFFFA8FFFFFFA8FD44FFA8FFFFFFA8FFFFFFA8FFA8FFA8FFA8FF
%A8FFA8FFA8FFA8A87EA87EA87EA87EA87EA87EA87EA87EA87EA87EA87EFF
%A8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFFFFFA8FFFFFF
%A8FD4AFFA8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8A8A8A9A8FFA8FF
%A8FFA8FFFFFFA8FD50FFA8FFFFFFA8FFFFFFA8FFA8FFA8FFA8A87EA8A8A8
%7EA8A8A87EA8A8A87EA8A8A87EA8A8A87EFFA8FFA8FFA8FFA8FFA8FFA8FF
%A8FFA8FFFFFFA8FFFFFFA8FD4CFFA8FFFFFFA8FFA8A8A8A9A8A8A8A9A8A8
%A8A9A8A8A8A9A8A8A8A9A8A8A8FFA8FFA8FFA8FFA8FFFFFFA8FD48FFA8FF
%FFFFA8FFFFFFA8FFA8FFA8FFA8FFA8FFA8FFA8A87EA87EA87EA87EA87EA8
%7EA87EA87EA87EA87EA8A8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FF
%A8FFA8FFFFFFA8FFFFFFA8FFFFFFA8FD48FFA8A8A8A9A8A8A8A9A8A8A8A9
%A8A8A8A9A8A8A8A9A8A9A8FFA8FFA8FFFFFFA8FD54FFA8FFFFF
 FA8FFFFFF
%A8FFA8FFFD08A87EA8A2A87EA8A2A87EA87EA87EA8A8FFA8FFA8FFA8FFA8
%FFA8FFA8FFA8FFFFFFA8FFFFFFA8FD50FFA8FFFFFFA8FFFFFFA8FFA8FFA8
%FFA8FFA8FFA8FFA8FFA8A9A8FFA8FFA8FFFFFFA8FFFFFFA8FD48FFA8FFFF
%FFA8FFFFFFA8FFFFFFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8
%FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8
%FFA8FFFFFFA8FFFFFFA8FFFFFFA8FD52FFA8FFFFFFA8FFFFFFA8FFFFFFA8
%FFFFFFA8FD5CFFA8FFFFFFA8FFFFFFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8
%FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFFFFFA8
%FD58FFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FD50
%FFA8FFFFFFA8FFFFFFA8FFFFFFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8
%FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8
%FFA8FFFFFFA8FFFFFFA8FFFFFFA8FDC3FFA8FFFFFFA8FFFFFFA8FFFFFFA8
%FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFFFFFA8FFFF
%FFA8FFFFFFA8FD64FFA8FFFFFFA8FFFFFFA8FD5CFFA8FFFFFFA8FFFFFFA8
%FFFFFFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8FFA8
%FFA8FFA8FFA8FFA8FFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FDCF
 FFA8
%FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFF
%FFA8FDD1FFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8
%FFA8FFA8FFA8FFA8FFA8FFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFF
%FFA8FDDBFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FDDDFFA8
%FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFF
%FFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FDFCFFFDD9FFA8FFFFFFA8FF
%FFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FFFFFFA8FDFCFF
%FDFCFFFDFCFFFDFCFFFDFCFFFDFCFFFDFCFFFDFCFFFDFCFFFDFCFFFD56FF
%FF
%%EndData

endstream
endobj
50 0 obj
<</Length 65536>>stream
+%AI12_CompressedDatax��ks%�q(��?p?(B�ئo@�؈s�C�v۶B#ٺ�1њi���f�lO�t��~�O$�ٯ#˲Ɋ&�I��DHd&2?��~�ճ÷o��Y�^���������߾��B�~����?�����gW.^�����kn�//����훟��w����߽y�����]��g��W�_���߼y�}���L^�?}��}������������?��x��?�����v9��aǷ?���՛�o��ϯ|�W���/\�\����W�z���ܾ�����o�����o^������o����?�xs��/��yq��^�~��OW��/���K�q����뗽s�/�_9����}����o����߽���8|�(�C�����._��C���������8Z2:���ۯ^~�
+Y����h߽���Ż��5��z�ו����߿��>�u�NW������-{G�ճp��o��W���{^����?���޾yI<8�{��F�h�;��W?�~��7o^��e5b�?������^?���w?H7��N
~���w/��!|����8����3���?���r����_�����:���+W�:�+WC�C��*�'�+盾��w������O~���߽��՛�3���x���1��_U������_�Dn����/�0�}�������?~��xz����{`�0��$x��������w�K���������H��ݫ7�s�'�K�������wo��o~�v�)-�_�{�Mov�Ͽ�/�y��)�o_���������٣�z�޽��?����?}���}M�����/_��ޠUȋ7�^��w��/_�x������W�y�y4p�G }��]*�|�����;�#؇�}�
L�wW�w?��_�}�Z��R�
 ��F(����_����b��M�`��.�ý��~�
�����߼x���w�^|��Wߜ{�����o�2��|����_�p?擁��Ż���y��?�����c؀����>Q�j��{��Wx��K���w��+E���ъ�g�wu|c�?�{��.S�
+r��ۗW��^���E���]����˿-}�_}p
Y}������5�R��k�K�����wϕ๒��_���/��S��U�;U�o;ʾG|}I����®�\�tu9�a��x�c,��Ȏ���|��˫_���x}%�>�g��C����/@�
+j�_�����	]���sX���z��ֻ��7sλ�K�+"����؟w�N�ί�w���O>��o���������B�OWV}WfbH!��5��n�mN��ᢏ!Ƙ���Sb�-�1���x�w��O!ŔR^�O����M�9�Nݖ���@��� O�/�8$�?Y�g�]��+�[��*r�_�1�{���?��٧��wf��~���;������w�?����ԙ����[Ow����ts:��v��rʧt��p�'�1��ߞnooon�������r�o�m����pws�����9�n�M�)7�&�ěp�o��z�;���Ǜ��x8�c=�c>�c<��_�TXw����ps8�v��rȇt��p���}�cuw�݁�b��[б�v�W���I�fĮBg�������i��C�o����AC>'�����W�/���O�Z:��M�Q�iȫ���πkqtf�u���v�,{��c���Y���w�E��/)���S���Ӈ1��3��Y��%��.
 ��>��J���sXr�(�O�μi__B�+ߕK)�?�?�r,}�u��Ik���J
5EK���m���>������k�ʚk���EG'��
[k�vl}nØ���k�2�!����M�;���.��7�Om�{ğ��tY	�2��,�{��;a������7(Io�I�E]�����;|��t�]�&�� eK�^Q�6�� q�(qA枺H����%���M]�ס> m`
��A>��z�;ta�2L���.����;+��>�},n���i�����}�b%�d��U�����t�c���<��z�\��w�n�������G��i�sZ��}���ڵ��S��7}n:I�m�;C�=�}�.;N}���=��'D�o�1�-&tn�.�I.���'�Ì�ő�������
+��:�s��-��d�
�fX7���P�(XA�z��(d�PЂ��Eq��݆��/�ߌ2�pDI`��8�`[��}B�|���3�gЍ$�ip�i�,��'=�ܳ��|����ߖs��zD��.-�Y)�<���.j���tK�}"C��r	�Qֵ�:�X�Cs�*��Ҡ�����t�]��Y�>�5��%T�6�GAꮻh���Q�T�����^�|c�
�vV�y��5fח][���D*)A�uE��k�JՆ5�D�,MI�������N]o}��L���ˍcGغH-}?�}�o]9:�r�-'⾴�]4L�=�1�Q��F=��Sl>��B�H���ߊ��H̲��P�.�i$V�#j��Ͼ+s_'%���*8�Rm�r#��a�mX�YT��&��
�UUPP�QOnU1�}��NV���9u���϶�.�]������	(}?h�=�nq�����������ˤN]�{�{4oPMA��t��"Ze��������6ZC;퀶����nP���l&����
+ച%v�:S�C��
nP'XP�9����G�6�M�*��9ٚ��L�2'��5���yq�{��=�勶����i�cT?Hq81�p����9�*ҕ��6
+�I�����T�eAFy�x��F�F��Ͳ}c��[įa�Ϭ]~R����d����6'��Ķ�G�<�Q�Kk����)����k
+��,)�ZtA�^ ��DÂ&
h2�
+JCE�l��n`�4Y�7�l=,l@4T�I
�QSU��0'p�z\���In�1��g}B��gG��B��/,q�{ڸB��2�g^V�%xewH#wH��F��
+�Fް�}�-a2��cCl��!L�0����'�S�S�������� ��J��OӞ�Q��<��H�Ӝ'8�2�����C��0�#Nc���n
+u�gm��J����
+�
+	-Y��4�h�K�k�O�X=�8�$!e��M�7	��DD��6��%q�C�ǹqs��P@�(���-q�V���	�8(�ք�ߟ��cwGпp��r�ч�Q�)F|������/��=��~K��Q�h�A�l];��OlC��Q���M��&2� O���6�;#�����ɡ�[�<�>�;�B�1�(Y7�=�������8�Vr���aQ�G�{�?�Q�"'�i��,�Bnq;�C䀚bE�H)yA2�$��ģ���d��gr�~z�Q�����s��/ոR��+U�Õ*���J]ŕ��/����J�Ԧ���NM��29\�ٲ_�O�7���2�Z�^����[���f�.�z�ͺ��FlD����c�'C��]9Mrj�0>��W��CN�e�g-t�����}{�ٓ��n�'���|���ƙijǾ�[��w��~�{�^��W�ӗQ�o_@�ӡ�x�^�[��������ft�0���d`�IC��%M"�)��|��d%]��eX��QW:�i0�-���|�HD
 F9v�ZW��ȰgA�=w�5eb
+1��qb� ���¶HR+-8�A�▽GT��**��3z,��@w9�p�P�j(q�c,+��T�I��։����"�e"�D��py�⠥{�l��j���W��R��������f;�f?�_�����Zx��\��Yf2����o
�'���q���j���$��əs��䄜�Hz&�Z>rx"G'+[:d�X�M���}�v}d�EFYZQ�P�ްzJ^�cx\}CQ%U���W���� *��)�����U}��	�{$�:�sd��u��9j�rR����*z]\���^yw���!Qq�
�x�o�cH�DO����
��Cr*��aM���[8<8z+���(�<�O�K�,�P��&��~>�GӨ���r��yD�4<)���m���¶�L�;���v�i-��}B���!7�9G��jc�����b<nbMݨ=��EP�S��ĺ��,:>?�l��
z��A:�C��W����s����ۅ\`|��ٱ'n���9��.�g��:��I"/u��`��'� ��g{`��.��!W�u�
 Vu�Z��q��h��з��k�����)��9�x���Q\PJ�Lj�����w�XzX��s3=���6�iYSM�͡_��0a��s�E?E�В��hT�7Ym7f�yv`����_���ۇl��d��킷
+r��	,+�̒���v [����{�XL��f�?��8(HD�T � &7�Hݍ�W�*�TD(
+�E%���cU,A�a(�.�3NQk[��4�j]�]U9P'�=Ŗ����j$���E#P�¡;b)�&3z҅�!1��1-'�l�,jP�&��,�O�7'���Ͻ{�5���l|�0�#{d�
+Y��F'���by߈��O3xa#<�Ҏj���"���ԃf�����s���~C��iϧ�#�I��$��C�� �'�bœntϖ=����a�U�	�b�}Q�ݛx('z��@:��V��a۳}��>���f}�y���>ýy�y��l��N�s;?����{<m����}&�N���{4�na�����ğO���_ԯ%KM����3<Y6��F�D5c�Y�c���֔%�h�h�.g��Ȧ�'kb,I��X���N��-��-�v�j�6v�K@�d'���p,�&��W�e���)�!��Gx���@��_�N3GD\-�n���
+�<��Q�]�]5��bZ�`�>&����U�p��$^���ɲ��m��k
%A�ut�d�_�{�爩���:�IaJ.�i���:���9�N�����1U���v
��U�ecH�,Z���'M��ɹ���D���EM1�]L�	�[C*[Z2�K�)b��
+|NH�!�LXօJP��Wo^b��Fm!#!C��$�|��1�7#���<\4*��X\���ϧ�Ʈ`C�/Ǝ'+~o�_�c{{d�|_�����'�Rֈ3^y�I-�ڸ��1%��8��:��S��I"P�ҋ���`v]%6]2��=��9�j-څ(L��qP�|�� I/8�b&�.=c1sc}$Ac�ǵ 6��"�gg�co���>�Ϣ6�6@�Νb=�w�M�M�ח�wƽ9Ϥ��i�vL!��)g�s��ʬ���;�y�ϲS,o����qd��4�b��v"ҹ�p.��t�3a�������?��
+^�~�����i:D��1?cBl�}dR�c��2)n��Mď?;1��c������2��3��
6&��ޅ)�l~��n�]ov��<�I|B���T���)�.G<�s�.���;0=�����5t�A�N@�X��>��Vj[�L'X@�W��^]^
=]���V�BnNݞ�`�c5t���	]W��4\ck����L�������Y``�.�{,�Q
P=g^�1�����7b�Fv9##ad9�1��"|zēк��l�@|vڐ��%�-Gi7�;�}zS��s}9Q4�@7�)L#j�i*<M����4vS���J�#�8zo�A�h��\��<���,'�Z*ԗ�Q}L�1ɿz���T���_^a'��p:���0bF,̈eŇ����?e� 	)�뮠ƫ����?}��!!���"������5�k^�U��%���<��ij�f���O�P�y�����o��c�U_�}F��eo'`�>`l�����>k��K"���p����pؠ��<p�4
�F���{ͮ�偐	�HS���F
��CeF������?
 [�!�����S���3��G�| >�[N:8i.8�����(�%͠�
^5���U3F���zg(��ofxSnw���9N��}�;�N���)�+�F���v�����:M�[���1(Ç=�Xԇ_�4��8�-h��x�-��?������ݚsi�4g��v���\B۱��r	m�*;��k;t�i#Ʒ���hq+>�07�)F�ܘ��W=@a��)�A"�b�L��1���mV;٧� �r
H]��p�˖ߧ��M���&��D��$���l0�,&�`D�c
+FT�W`�x��9����>[0k�}��Nu�<$�Ї�P�Kۼb�Bߢ�-���Y��B����-�������P��p�xY~�����P~�j��Yզ��jC�3��-^=���Y�#�;n�
+���p�1�ٚ���y��d��r�����	�	=n��b�<�{���н��v�9<o��	���Y�L�)����x�Q�sۈY>h��x�C(����`�/��J�ĭA���4m�P+������6a����O�h�/d�|J����� �L���n�˗��\U�wP�C�&�D2,4��SMF~EӒ�@�ԋ ~�$�/A�	�O��6�O�wm:�/4kp�yR�9\�-�y��K1�� @����&c��Es1.Nbj��z���0~��geg���%��>���Eׇ�y�s,�H/�u(Fp����@�0U��0^:�u(v!���(c����)<��,���p�Κ�'(֟�D����v˧��i��[�-�P'<��mD��aI��G�,;�[~)&�-�l�
��j��.��s����V�lm��S<�S<�S<�S<߇��S<�S<ߧ=��=��=E��mG�<M����4��ƒ�|��~R|���}A�#��p,I�L�+$�}nD�|���v�\o��>�A�"�рӉF��3ȶ��-vȗ
x
 _mQ��(=��t��ST��`���EM��g+��ME��MI��J=A˙�Q7<��Au}ኦ�������f��6W�}Y�G����`�4��Ec��D>��	���L6�
+G�5-v��m�ŏ]ʲ�\�7&,܌�1g*�COu[��v��P��y�?q�Y����<W��t(��Z-^#�N��G�����íF-�k����靆)� �*���h����H���#�����9��^����RnDp_!����Ւ�Ή8BɩM�$'>b�~�!_�mJ���{�Ó�ɇ��C~�!?���|�O>�'���[��8|�
+OS�i*|����5��!Vǹ;/�r��b����w1�tan��)R#IjJ�ZF�Ԩ\i*��j��R�qOŸ9��Ÿ��L�+?jv���ͳ07hf�y1�
+;'��7(<|��v&<8�Džg˜f6�^�W����������1����y�"+�R�w;�W���r��4éw���nj���W/Й��|��]�s��N,zI���>+x����y0	������8s�)��U-�l=K���⃱=F�sk��e4:��|ޕ|��M)���]	.ݘ�X�@J;ۻ��4�_C#<-�0�S���Ul��~;H�fG���P��0�dxHXI �@����O��w��}v��w�7�c؂׫��݂w�4�W��*7��}*��驏%\�W��xyJËSB���X��)	.K��[R�����r�d30��+��+���,%�*���Ί\\���v�S1������q�f�?��;��<���,.��p,n���#���02y�'����"�.��
��#W��K|��w�D�I�90�o��g=n�
+0�E.f�$����\(˥��[ ��4nW|�
+OS�i*<M�
+�_g�A���A��ϫ7���Z���(��9QQ�_a�K����
�~Ji��|\�����ǮI9�7��[�7z���Tۣ�#��4V��T��c<�Y��qkS�*sf<_n�ve������r=���4�π�׵�K�j]ٛ��&")HQ%[mINR�y�����WM�K,9q9,l>�pI,�.�(֝�ĽbB0�Ē����p���1Q��v�bXG��쨥�N`ߠ��QK�rXX
+⭑u*��f��z�n>��F��]��+��?�ڲ.�5��
+Tkh��A4#dCb�Ă�9�E&���Oi�<�Oc��7��e�̇����mu�HlXL
-6jұ�TQ�K}��7�|���|9�ϸ���c�YFe.�k�^߼��y���]����qi�-�5�ڔꚋu�]���bWP��+�5����]��ܕ'��t�ٹZ^���PM�dWL����2ս����3a9S�k�v��ר�u���2������%fj~��Q�?˙�_�b1�{;��Jp���.&w^�t��?ϡ�5Ŷ��/���ɚ�*���7ڜ>d+>�$�F|�>�͍����`�3��M�::_������~��!D:�ݡ�,20�q��5T\}��S�w�bD/O:���<������wkğ���aZ8�;�r��{��SBZ���mD+Y,�V�jCXq���Us]���&3�p~�M�.q�7�����@��\d&q���C4��Ͷ�x�q�y�.�mh&[�s�
H=	��N%*���p��{�MÜG�M����e�D<�8E!J�*e=vAqÚN�g�Tt:r='��t-~
+��p�#����p�p���o�[�����b�PĚd� t��A�����.���͝}���]�zŬKb��9�h�>I���j�<�۷�O�R�E����]�kp#��];c�|�{ˇ�\�u�F��up�T��C�[>&�g߽��5��+�Pb	�R��n�}B��*�i�Y�ǔ�ͅ����BI�N�e⽚�'�����q1�Q�B�)���
G("uvo��/۰��L�%o��X���6����s��|0
C�D�'"��J�!�@q��*Җb�?�ׄM���%�Em���Cy�]���]c/3�n����~>�WIݿe��2��Bad�#y+S8�Ga�}ǾƠ��tZ?Y����ʲ\2���FK���Rji���ٌN��i��趔[ڑ�A�pq�qC���<L��|��y԰��n*M�T��4w��0�����:�}����+]���˾�ld�S�\о�Z}X���/������W���p4<I�1�Lx�|F��Iz<<�kx8�j�3X7�E��؝{[�>���
��o](����KV�
 �����ۙ���n�h��y�'�}9'$��E���Z���.���uZ�EnR/r]����r(?�n&O�K�×	����0����k
+�����
+�=k���̏��8t�h�c�B��DŽ�GFg�� 2q\�\�Df��A&����+��uuݦ4��Kc�ą��-{����ϞijG��?$�r�m��K���L��Z
+�b��{����ė{��^��Cj�	g�]V�芯dl��6FUKH�����n=��;�HUq���8��TG~�'�=/�-+�>��?��L��9Lϱ�:l����7�ܚ�4b.���i���BOF�Z��f��������(]��$5�B��F�T6j����@A��z'o1ۜ%ꈫ��2��FG�l�n*�"����?� �x?�gb� �o�P?H���D�=(2S��f0RS����ߒ�|�ko��?Z�ٞ�Y-v*R���y�X8�<k��h�V���1�&��Zq�(}<��V��}�,sL�5O(�tL
+W�c�;�<T�@�"�t���i��?��;�9��{$��
L$�7\���$H9����C�x���p��mě
`�ώ��z���0�})����ز��l�|�G�ma�u{'eݽ��5�+����;��WU��'6��渖9��Ʊ�e�`��V6�*�&�9<e
+KY�x��ֹ9�d
+;��M�(�e/�C4��Nd�I��:��wZ8��nnM�Ӎ���'r9�!PŁP�%�PNf”�;��Ι�]�<����O	�X4�yg�<ʟ=΋�����c�|\5�G�z3��g�>2��G�~p�7�l���7�4���sˎ���g��=�����o���Z�Y�_�e�A��#�|�ϲً�>��� |�#�(���+Ng��~��|��d[e*O�Nx��
+�WKׯ���>U�l�o�6�zk:�S����F�|Q;\��f���� �{s:g�4�9�-s��"վ�V0�� oo�jh܀y�):d�����!p��:d�T4x�h��({\�̟��d��mM�?�D�|�����2�(s�6��w�)='Ԅ;��ބp�d�t�;LFa���y&�0f�Ӑ��5�)�y0G��Ӡܜ�$晫�L�!%7�K7��ɍ#� j�װ�������DW5�/j����FG~���j��Bw��p.�p��%�l6���';<7�/��n�{�>���Ᵹd�g�c�}�u|˙Z�S���gy�<�r�Y�����Ha��^�b*�����_lC�^��{��Y��cn�����o�r�n��.����o��ۗ���W��ʓ����`܆���A��V���_�d��c���$�TƎ�;�r(���|���C��	�a��#��6t�z3�n�<�{�v�D��qrv����	�rZ��f8��^:���FV���}a�2��|�&²;,�㒡����4�
 ��^#w�ɉ9;Y���n��(L"���F�?�߱���?�+�B�x���X�S*-K�O�Qw挀�:
+����Y�-
+��2�uĽ��6^qG����R�_�|�[m@I�qK>�����I������h��=��p����Lb���s�I���2����{�9�{�)Y���~Z:�Gl���b�9�늡��҃h嚒s�4<\t�:d�b����h�7�ʡ�C�#���y�2m�._��@���6���>+�Wjv�j/T�� ��:�HGhm�a�\���t?ȣ�"dM�V��i>����WJwX��_�h+p�4�oB��<�	]��$�JR>=��醑�F�ny�a�醑�F.��{ <w��t���
#����O�J<M����4�b�Tb]�mU�O����aA;��6Y�����;�yF��tc���,S��ӹ*�z�	�ٛ#�cdtܡ�Dq�.nv
+��A�iA�_"-�V�Q�@�Y�߅W�N��u�p�r/N������''6i:G�vX��l	x"U��#F�e�I\C��y9�?r��N| ���
+Z�&|L��&΀$�gJ�3����U>��K�m���A��"E�L~̬"1,��vx)�q{��t��4գ/�5e�����䍤�Z�N��	A�^#���]�.a.v8+� ���;�L>/,�ӗ�γ�X�\����N{4�]����������.0��o�C����8��F�K������y��*�U���|:id�8�Jp��;q���К@I�OwI�S�V��E,��v�� ��B��H�w�p`u��]:ە|8�!�����sE�Hȏ����ˇ�Y����I��Ko����:m3j�B�u�G�x�m�զ\�brf��ق�t�&�}�͙��ԍ�qR�ǹ����m��7>Q$}\F�������)�\Y�b��طH��3�ͦ�Zr���]�6�ɔc�&u_c�]��ݗ�G��Ti�
+��S\��ӻ�7�+SW���C;��P>��t������/߽z��՛�=3;����O��_��/޿��Mߒ��|���W�7߽~�mߍ6�+�c,�������~������M���?��������?]ū�����^}��������70�{���6�`���g��
��q(Z�S+��V�UK�uu$`ɵ�&T#�"q�"�~�����j�J��f�D0��'����@�c�������W(��w���u)���v�Z������������:�R�h���ewZI���������M�y˱�c+��ֵ��7o��[�c9�a�����
&yv�D��Y�
+���l���K��>KdL�
�>Ҧ�������7qk3&� �?�#��'��.��:̷��}h}��=��5A|�/��֫_Q2W�f7���M����v�T@;OhJ�j��큜0W�3u̕s�vn1�Y�l����ɞh}?�	�T�L
$�!Y<�����`�ո�Y���W"5܍����<gy72&Y���z�t��,K����9��[|��n�T���K
+-Qj���-J	9Id�����t��f���MڈZ��zF���B�}+���,}�"�Ce��]��d�G�]`�1����' �������F��
��9�yF8��K�®��0�@�}J� Rc�
+;9\���3��������~�Oh��V��8YQ9��i$��,'�.�:ʺ�g����r|��<���ϖ������Oˏ�����*'*��Bs�:]��Đ\�³P�x
q	�|����9�~��*'̆B%�������	g�U���q�d���0$�ۺ�|I��z��3t���DF�xjm�e�� ���Z�uq�)Ɔ]aέن��q�<��
�
��}�//���TZ�r�n�����7 �8ٕ��o6�B�徺�^q�?o�?�Vq�?.3W���v;P7���,��?�����pR�U0M��t�^u𕟦�GO�RZ�;5���?8�Kg��f��gp�0g+�
��ɥf>b�}���V�"R�4BB��5��E���^�����f�=@�&nV7L��/��Xa/�:F�T�y�u�k�FHVO���B�q��ڛ������0Vp8y'mC䗥�_QC+�7��p�|�;�Z���˵s�S��볷k'Ix+##�s�4�ܩ-3w�>M|e����sB,��^al��~e�
 ��q͂��,<UV���<�-M(��fg`��M-k��;p��&�S��]9��+���]�*��&7���"�p�ѯ<ú^�)�c�>��`�:�d���$���6:�}#3�O}�]��<���%�}rx�]`��S�ٙim�x� D���y�\��\��!�$S���s���$�
O�R#Ȱ�A��|�F#�>���sa^W�A��2�9��ߔ����Q�;��]��ILmX��-�/�j^�:��2Xג���υ�}�$'�$d�j�s�\_���Ydz}j�QDB�Ba`AV��6�o#�@{��i*Qf3����#p������$�U�%�5��8F2r=�C�@tـm=왩�d���Хx�.����p��Ԃ�D��V�8w�"k,-���������VX��IdGk���V^��3$`g\�!+��nM�I��SI�yTw���>���&	FQ�7FY�Lm�t��A���&`N�c��U�@Y~8���;7�]N��Q6��d�LS��6�E8�$�D�V�ٰ	��钶4�}_�Qw
 Or����2�5d��	z~p�|#�U��K%/��(l�nݔ:8�,+9����6�˾n*�?7C!��W���Hm���4W���v�.�~e� �N�ʰ.�e����w�ͲKGA��O��i��v-]qWm
���⁶L[���<J�W��S �%M��+t���
;0�f���ts47Y0 �	�*;
ך3�:�_� �ʽM���k�Q���/�5,�x�j,N�u2ee�^��u���G�#am��'�+4i[֨�Y��ʔ�{��L��#��Y������hb��䌺��ʻGw�%���� �Io�����_��m%�bi%6v57˴��$_:pF�ꅷ\K2��DaM��2v��}�R��}gJ�Ϗ��E/T����RP�Mg���.V�Z��"S���Ƌ~T#X�.&0{����E�<4�mՠsd`�*ʔ�� ;��u�l�10����7%٩ ��t���(H�л,dўҁk��xAcc��ہ5�:W���G�w}�tpB4����M�MD}
+,&@�{yU�uS@V2�h�B5{���$�ȴ�W���l6����l�5��d%�%p��.8�60a�<b`�BA����$��Qp�y��0��pV��=����g`��Y�CG���E�_gF�����a�v���w>f�S@�]t�yv4�.(<B�����0�A$nc,Q��F"`Y>_���b2����2B�V%��?�6�@EեvU��L�1�k��@/˸���T�*�"����h��X��7`b��$���� �l�upv2(2;0�,3����=	�[AP��j�s\Љ����Z�\ �J+[
+k;d�XGLݢ��6F�	!��)��
+n��q�'p�YhP�aFJW��̫�y�Nmv1�D�lU[;��ݔ�cr�����d&��6Ln�o?���dK���8��A26dc�J����B�d�I2^����fu�5�aNfb�b���l)d
�.����t�Ń �Y����A
+Vv=l�Q��A�]�6]�Q<g;0H�n�DE�n���w�ads�T�)eO�]�>_�ؑϋB��$;
+���&����K�B�N���
+�f�
+��,�z�PK@'H�������FP2���@������#�\���4ާb3�
j�Ld�]�%	���<�����'�gGU��n7J7�n+�����X�@��I$�TQ�.�m2�,��]��O��,R�tғ#��E�
6��VH�Ue�9+N�����r�PDkMY4��7�*�U�L��s<��5�'�a\�Wy
�� �SJ(`GD���� ��n����x��Hz'J)RB:�Wq���P�i�:oTC#��
4k��ɥ�W@�9G�������d�2+�����FE� jPV����u6�?��p,"�k�i�S������l@C����^�Gܒ�œ��uD��W�M3�@d����YsM`���-�o�RU$�.UšP*)�Q�6��A�$�
�ehlww`LQ��QP�w,�����\�:e�M����v�T��mfh��p��M��"��_��S���W��;e:�����U#�Ϻ��R����0��� 
+���i��ڵ��T�<�3
+{�[U�7,n���2$q�}��}M;�g�9�m�+(�����3���$`mk��-:)��ޭqdž���n\��*I�����zq,!X�W�2�V�:���T���vQ���!�U:Ƣ���I6���{�6TLpB-r��O$�aڦ*&�(���
+�k}[ɁN@��hB&��%�J����ׁy��p��:�8�v#�`v��#0�Ӷ�MѨ;Xv �MB�,ΐ�`Q�X���1�U�0�|�ņ�|�Ձމ'C@Ճ'c=�b�H�`k��RD���+���l�kuzsy�L��336'i�==�k�������AS�+���Ӎ�	����":���]�jfE��o�i�tl�@��#����,��U�������4u�W0:�������=�h$Q�V=:��0�	��qٴ��Hǹf!�Aa��I|[��{Cب�Yf'zH�߁��e��@̚�Wb��*gpm%g4Moa�8�L^�{M^�~�̇d������u���� �b\v>e0����B
Q�����Z�B�Aً2��\)���� `5�@����D'R�D�����&M�p��r^��RV�=�/+9���M>��<u�d��GL����s��Y�����Xq�wu�����K��S̯�z<'2
T�i2|<�YK��̓Z��a��Z���mT�y��I>�T��YV
+�%��Vq�����Y��L7x�W�N\��M���g ��CB�G� ��M	(jܒ���k���VUqFDUa
+��߆U���"h�,� ;�C��/~��'�O0_�tsӋ�����U�����	Y�:%^=q�'���dƁ�@�J�]�O�:0�U�|�++B��^� �������P� J��}����=��J�#!xYP�����,���!�*4�KW6z9;��`��MQr�B�P�xV'>P��$��t�_q���#��Dڤƨɋ[�#���y�8����Of�x�.y$ģ4y�����Q$=���Z��~�H�+1����2v�Xد�(l��Pe����N��[��4D;��ж�^�i�[�*@��o�Y��&zSo���E�.Lz���Ω������%������7+a^�=����A���"`vc�Kc�|^O+�)��
�D|������
+��Y�M��FM���U����a����>K�
+��;0�ZIJ���b�t�t��������''L*��tʈ���,!���Y<�yP`l�,����ո�Qf�
��
0C��yBo�-�$�����{v
+u`�����F�)^�C)2?{A�E���Ku#}��OȎX5*z[	�~�yʨ�� ����ȇa@���ꐡO�_�d�7�� �N���&A*�8�t�����琗aX���;N���������=х�9n��։�Y���*��#�4�L����Lxt!�`N�bm���V�-8�wY�)dy���
�����7:�,6�Q��
+��ޠ��I�ZAچ(��� L��8��N6Zt�?gp�"�1�@��%*et�L�����Z�@{|S]%,�%�X����]�ء���U$��ט�
+����}3Z�����>K%ɋ6(!�@9���U���Щm�ɫ3A�6��������JǗ�4޼��Ёy�2��5��Z�)�Qǧ]�:q��nO�\��Y�gvc硓�
+�#�a�5��yՒ+LՍ����D�hA_iY�D�a[qygv�T��ԁ:�z�0D�3i����]r��j6�j�C
+]U��9�����S�y���7!=`E���/@0B���(!C
+UG���U�kĉI�J��AaP!�������Ż
+�څ"��Fׄ0������:��^�����u�ئ�"����Kj0���v0�D��2]���-�:A0\bI]b���<�#)hK1Zmثl���$�in�����(�~���R��w�|���u���1?���#�bON�4lt�BK]^�"*x��C���ZUCk��9+�σSO&A���i�NJU�,��
�Vz-
S�U�ƧK�x�U��
+�?�Gf�|>�2Z�r	��W�A�����*8p��#��.}M�Y�x�i�7����5h��u�.�5����vN�"��Y��A�(�ߵ��S!~[b|3P@*���J'�9s�8!�����>g�<�g6
+[��dS�$SzH�'��6�'=g��8Q��$K�H5����P�Jҵ��Ļ�,hP�$IfRb�&�f��DEO��gH����)	�E��;�n�������]†�#WF�A8� ������UO�@Mfv��R���*���*� �7�J�ef�
%��e���ώT��j�sw����X$�UV��NB���!3T�G6�����FΘ���bXe�
�%/������J�,Sx4S�7tk�fj�� Ӕ9�d��\��
+m5GmZfY���B��հ�C&� �-;0ؾ���L�7��c��7z3���9���h�:��N	8t�$�00L$]���	�[$��'c���~.{ �?5?qc��
�v�S��Gs��>D��+��"`	����ELMҥ$���ڰ�K�B��@���D��8&MUY���g
�8HFw�Xo�;V����j�˻xx.�	#IӨzn+�c
R�Y�(�����#� �6u�`r2�9�\_�B�p�qh �P<j^_&�!�\%=
�g��S1��i�
���l;��v�GU[��_�._����
+���z1�R0V9��3V<
+ٙ�_LY�����S��� '>���вj�I�#�gtBJaC t$� �I&w!��7]Ys)�ܐS^6E�c	�5a��]�
+Z����r>���3<}�F4=8�^e�D=�`�\��ڈȩE�"�T>g���D��n��0� zC�+� H����:�|�`�:����X����	��	b&X�c��3��&ˡ��$�28:��`bI�Uܸ���>� B��4z �Ry��;�Y,8v��F�r�e
����@��P<�8@��aP(�T�M��ʱn#�gF�F�]"�0�Hf=<�d��"F���I�Y�}��EfF�ɺ�j�趨~�<�@�C
+�����H)����3���&�b�
zuf�VCXr)%	�q�6(hIG��?B�n΅�7�K&p��õ�$�9$r�M�����>�Xg`)EV�fό8�B�Q�0�]<�cnB�='�2D	A�rG�����'�#a�&
�I���Is�
+�y0��5"B*[U(��'<�����kf/r'FM8-#W%P���l �fP�{U\Ͳ��$��}e�R��L��E0�I��7Vz/=`=פ@㤈�m�V�WM�J��jƠhn+�[q�f�I�F�����"x���Q]E�7!�+�,�ޡi��r�9��Q��.P��84(t�����*�뇢��f�C�f�Ձa��(��~dRޞa~4��l2� ��:�O����"�'x~�2gJ�@TU�O�Gt�#K�G�� ɽ�2��_U�q���9WEY�a	��3�%�1�E��=4�Zb�S{�I��:�6��g�.Ktv���K�E@
wI5ܬ	d��P�AUa�{�aS>�3⹀#���?�W�ё��z=�$�R��^�)�
��Ƭ��GٗY���8�%�M�Ś�TLL�gX[GSY]�k�3J�l*�WA�ȍՁ���)�ak-����a����#w�qx�E�8$��s}p�D�@G��-���2�oub�g���gQV���T!D#�A��8i�G���W���4&	�Y���@lqK����@.f	&\5D�j�:�f�@�
 ��&>I.���t͋��a�b9�Q"����`�^b�*�t��9�p5�@��=����$G2%I�f0��(;�5:Ur��LG��$�mO��R�F�ĥe��4��?�����Օj�rp��r�`J���U%d(����LT	������*1>ʉ��"Q�tb*�8�TöP���D	Qؼ^��*���P�C�U-��*��f�I#"Yt�h�J��DI�S%2�i�U�JJ�x�a�x�Q��385M��C�Gi�<?��������P��>�8��ƠIɄ,n�fSam���U�`�V�8oO��o&��{7��
+�\�s��=?��9���J��ʟ_
��?"`!�VΚ
��Μ/�\?�����Az� \�BwDǐ׀�]��·pgA��mu
K�&���,^�B=����������5���GR����J�1����"E������n��VV�QVij� go]�"4תG}�|�R(/��6�U�L]��aq^D��A�
+]�J^�����Ƹ�Q>
+��Q8�2J��=�"�$�E��}����)՚�n�ݘw��K���O��W‹ծΎ�7��!)�$�XAt�=�CE�U��7�BF��p� ����栌 q$;jK�m��B�m� S J\א�0�T0�F�3�Ś�.����3N-
g�=�X.��|e����5G��y�~ݿ!ö)�
+�Q�Ğ�l��WTWOq�rJ�;լ@
Y�S�z�����YE��^
+�x8aά�G���et`JK�.��C䍎$�����\�J&�B�:��Q�\�@�JZT0yǺ�}Ar
�ٯE�Q�\�kS{�bA['_@��a�[&
+U��뇵�3Ck���]��[C�����&�)��É
p&3��E..�@�U����ɺXP( ���9a���両@�"ϘZ�vtw`��x�������o޿z��Ż?_���~������z��՛�~��^|����%֚�ï���˟]�����`�_�R�����=�{ة�pF(H^S�XI���`qB �Q��ƽ��E9�x�a٥
+��3�j��"( b��J�D�#PFO�FF[9�!OHL�/�'�D����D[Q�	 
�kێ��{��V1��g�+����B��E����j<��T"]y�qt�O��7`.`B����(���=0P��F򗍶����d� S@8i4��*�	�2��������s7�P��$b�E�X�.���J���R��C�=�nWy3*�p�F\FR)�����L�`߰�*'r�i��.��0(
�_/�p��kR8�������I�mG���������V�x�(c�HH��*z�܇�OVqE�T�y��l2�Jf�ۭ[Y�RNt��P���涸�Ѳ1X
�R��|0!��`��e(�ebm��-�u��mm�gg=��Gb�ؿ1���1�>�
+h�ve�HW�߀���B)ጊB�J(ԵLi���A���{m&�����8S~͌5Q*�L��B�i;�e��x�܍�<G�T�F���2��Fط�ec�Į2����
�kb�\g�G��I����]p��M��Y���gp&��N�T$	�
+�������1�kJ+�}��]2�:]�i���>�^��jFo/���U63]<�}�*���!�I(�eCݶ���u�"�@��:�� Mzrb`�pW�5mG��������.}���`�[^���Yp�]Ozg˥$�kZ�߀���;�u,��v
�����ȔQdۂy��
�d
+tt,qk�#fC���B�hi��(w�:�oc�`���I�tÏ����rѸC�\2��?\�p��B1�U��;`
�2w��05��°-�6�r�����#
+�sL��v�	o�N;EG7��_h�>�8�
�������o����x1?��=|���%�s	
���}>��:��u{�}��6���m��U�B!�L��V�ǥ��A�	�Rkښ��{���rs�F���7�LQ�X����HǓԯ��j��/��m�%�,��wӧ�W�JmSI������P�I�m�G���21�e��q����o%e5;��0՚��Kh(��5�M�U��-�d
+����V�5�meP @B��ڶ�_��2!'�FO
B��p��n�XW�d�,P���˶-����:�L�pW��b�b����g
+(�ejm��/�uǃ�Y�1�{��E��fJ!�p6���\PU���d�j['�	��y����)�k.��P�+/�vt�`�r�R�"F�9Q��&����7��,k�����H]�P:�m�B�hp��s\�آ��4��P�@B0�5mG��.`-��K�+A" 8S4.� �R��_/@a�c�k�:��n�u�a����U�T֦15�
+c�Z�v��`���b�"�+
+]����o��bX�-ȴ������p
+{�[�m�T�������*c)X!��o)`� jM��/�uǃ�ً�`�����r�c�ct�ˤb�ҹd|L�q�i� R��`��4X���30P�S��/�uÃ˚��SP�i�����Ԗw�{�Y���.��YDږ�{�C9��z��KN�A:-y?U@��D��N)������s��G2c�"�crz�am��h����z-�=����p���5a9�״�z;�����v4�<j}+V8s�+�$J�m;��m�
XQ��1��C(�����-KEnI�p���``̆�\(ʶ-t�?cU�P@8K4�@
+�����F�����mGo�.e:Bau*�L��
��ׇ�m\��i��ͦXR��Z�m��a�t���24Q�)x�9ti @a-kێ^�;\�p���T�3(ٲ1P�ҋ�8(�B��V��(����L[�QHx�X��@5�L���QZ	 !Pbm��-�uˁ�Y��K�	��Jn0W�Ms�R��TZ�U�+ف�J�i�$��b@�@8���<ٜ	=(�p���mG��.e8½|p_(��~����k	�Xc�w
+L@�[�!l�b�]�`@�@��*�iM�%H3[�ds�f�5mG��.`6�P�r�S��7�jop�[Qa�q�2��м3@a+�ڶP^QتX�)��V8j��=C��B�ik��Xw<���+g�W�r�k�U[3(��m��8QS|���5!�m�w��W� S X�/
VC�qC��B��vtW��xp1�/�$�N^�L� !�@ZH"���UJ�
+G`Lm��ӌuS�P��a��
+��3P>/�NmG��X҉{c�MM�Ѭ��K��R��QOq�SA��_�-_7c�yY+Xj5MXK�;&����S�d,~Ȕ�KXq��/�aXq\M����ޜ��x�X3@dF����6m�B����Ɋ3�a
��Aa3��ֶ�5Xw<�r+��E�8P=�~5WUD�.��G�ʀ��Pغ��6m������U�f��m�,#�y�_��y�ն�H����	W]8����7�q�(��H�g��
+�[b5@�Y�k�Mۢ��Z̾��Ќ�wMX1�+��
+o�Z�v��`���RF�B���Ք�������1J�#OgƺF���R����:Rr�&H�^����Ek��,ǵ��(�eZm��)�u����pp�J�1���p�"Dor'�3��a	��:�"l�fʶ�� S \�m,k���
+���������L8�t����OP,�J�F'��\��yIa��cI�`Mˬq%��l�����g�;��>�lPjڎ>���_�|CQ/#�����H�BE|+a��W],(\�l�m�F���2�`���5k=pC��B�ik��Xw<������8�5�~����T+ʠq`p����
P�Ӊr��IV�5MZljc|l�>c�T�g����^�vj;��Xw<���DP���c��Z��(.��NP�W/.J�Z�#~m��.���:ո��R�r�Z��W����Z���������l8(W�d�R�c�0�1e`�ӹ1��2�%]3ܷ勧g��(s��	i-y�~�ɧ����i`�t��g�A�V��X/�p��ϨZ ���GBP�FN lѩ�M�fҬ�Z΀�Dڄ��-�$J�m;�e��x��܄S;P��41���p��GZ��C���j����¶-�]��220�BC)�х+J���L�m;�5��8p)#���JYy�p3�0C�l;D)�uY�j��ZI�7m��A�VM���qw�"-
 Y�
��m���W��2� .71a�rV���&jc��_� 'Ƶ
�0V�ۏ�P(�oQ �\�*��Z
���K���2����������7H�׌,�w�7*nJ�r��2nT�(9g��Y.Me�beƶ�:�L� ���4H3�n`��V�5mG��.e���Vg��~���t������_pr(g�Ҳ�U���!9�E˸��n��_�@�k�~�6�@;ź���7,�a�uŇF.^�To,��L�U�ꊋ(l�T�ζ�/6X�)��T+3XG�VCA6U����b���b�[.�B��o��kB�X�Y/�Z�s&��-9ZW��_.�`�-uF:�s��3P8+f����T���_�l������z���\������F��5��Gn^�&�T�f��<c����"N`qOXsj~G��J�i;��Xw<���zt�D|<۽߁���d�3��<�ҹ$�Ѷͭ��8t����j�Ue�x�vP��F��M�?�js��
+�c��O��U�@٬�j����[Q�|��66i��&��5�G�t	����^��/c�M�2-�v�p��%�u�Y����
�i�PJ5 �,�M��|�1�Wx	Iش�;�g��� x���(�u�*_�Z�6��dź����
++E�-h*��
G|'
+��)T����&N�-޺"&��mr���:�L�pW�e\i�X1G/�0Lx˴���S��2Ϡ��s�]m�p��*7���j\z���
H�W9�і�^/~�s�Y�Z�[eV1��^g�z)[��J��%�s���h"�EŊ�;p���\���9��Q]mi(�Śs۪���j��ԇ��gƚGa�A��B�i;�e��xp)
.�ќ(���߁��qd���ʒ�8ү��WR�آ� |�N�&>����g�R�v����O�д=1w���e��T�Y�Xf��\|�v�Ǹ[Nl�QRv�&�D�.
J[��O<�5�u�a(`�0V�5mG��.f�a�� ��U���Z6�s�8�@�;��{�(�M�L�J7�Z����7_1Vr�~C��y��vW��xp1
����1��~�cc�h���	2w���
+w���vmS�*CF�`1q��g��P4�L��B�ik{+Hw�l.�4��y��6�$5k*5\�d�
+\�e�vTeQ�X���b%��4��w��`����:��X���\��,��!����,���6�΀G��n��y稴ҭ
+�{�~�ܤ;We�xG���h�E��)먴b(�UY��������e�L%�E���,L%T�_�Ú��
+�K�MU�W�E*G+�15YxTOQ��ʊy���bȴm�7��2s�b
+kE��)�y���K��
+�RHD+��"n�6˥����,��S�Qe�P`+�jm��/�uǃY�0��kZ�Td�`���v	��*+�7�w�Vd>��iiψ��z,��S稰b�n��Jm��'�s��K�@D�c�����պ)lt�ਰ�\:��
+g%zҴ�RZ�b�Q��B�n�A:*�l5C�m;�e�n9p!����!.$ֺ)0E��Qa�&UEM5`��7-����8��Lk�X�VM8���}���b)5mG��]���v�ׯb�k%֚),z.��U�[Jm*�XlӶ��$E���J,�5S,V��-�`�5mG��.e;�&0L4��b�Z'H�I��U(yŦ�KٴL����L�N��a�`��2pje�vS��Rj�c�*�]�/e7"mZ�V���`����-����li�\�@uӶ�m�u�
+��z)�VV��*,�ک������E-G�'U*�h��%S���Hm�RN�.�
+��oۍR��j
���R�i9ɻMK�L��#��D������8��VJ�QK�kU�\�LH[�%�!��4��ku�
+�:���h�Z+�`UU���ֶMF+��8�p��T`1�Q+(w:pU��`�V`�x��Ԕ���U/X��
+,,�R�QU�`+�bm��ہtǁK���Oų�X,X����2�GU��7�9o��3u��m;Y��F:`��k��tTU1�
+,�X�v��`�q�R�bM�jΫ�P���v�[��ɅЦ����ٶp%���(�X,Tsn
�QU�`+�bm��-�uˁ�Y�����sZ�ł�VJ��$c�+�@�Z�|I��|��RܴurC��:���k���hUCA1X����������Ŏ9����k���r��VU�ZܶtYl�����~�uM�b)�VU��
+,�X�vtk �q��"����k����\ZU��V[jE���r��pi�`
+�4Xf0�J�X�����T`�Ԛ����uǃ���0�Z�U+�X�^�>�����6�r�F�f�6.vo�BQ:�#U�h*����H�f��������^�vj;��Xw<���D�jf��Ж�Ȅ䃖�ʺ!Lz�����>�l4(0�ĵP��Q�)���	&:m��!�r���B@�X�7Zd�,�� �b���}-�N�$��mI��;�༤̥Rf�TSe&@��̴���S��ܽY@Qr*�7��NJ��O�X\Q%��Z 2#7�c4m3�=N��d��Ю�QQ�P`��jm��݁uσ/�� s����W,T� ����pE�T��q[}%��\N�vV������+���U��m�C�m;z5�n�)��-�A�&��b�Z'%(J��j���г�&9��\g�Ҷ�7ٜV4�W,X�������V_1�ڶ�_��2���L/u$����J����SGE�Y	r��W��W��������F��:)gъ*���T_1�ڶ�S��3�:�XEA��+�uR��E��*�7���T_>�
 �� c�m�zj�#�X�T_�`��b�jEK���b�5mG��.e�u�R_gT_��\*�Ei^GM�Y�bzH�����r����U6P��bqf��������������L7���W,X������+�p�R.H������a�m��g��P����2�9��bՊ*�S}�Rk���*�.f����-��Wfp�e�~���/@�E��-�E��T�:��*V7i����Q0۵iQߢ!�?�!vj;�%Hw���#�E�h����[��
+���3�K�h��7�j���uP�n����2�1�c�Z��4((�V&�NmGw
�
.f�mU�{����*)���e�^���y'	��ێ"V�j�L�Rf�U�|�_j�̤���O��=�-{���q���VI�V�T��z*9��XNk��TUum� ��Z�̀�J��:�
+l�C�m;�5��y���[�Z���^�`�����j �z�bjHlwe޴Mpo�$�hj�X��I1HG=C@1�W����"�s�R&\g����K��6��<��
+�,�PX�\X/m��ȱ#50S{ł�J�A:�l�C�m;z5��9p)�c�N.����P
+RK�ZQ:���+U����-\5-'�������j��T��m�C�m;�4�n;1�-C��Y��W,X���)ɉ�S������
+�A.�m���e�j����K��T�XL�K�i;��H�����1��^��2���S;�堻G�Ԃn�y�:��9ǁ��q�
!i�Z%���z*������Դ]2Xwݿ��{'�Taj�X�VIAR�T��z*Э�V[dE�:�|�-̷���1V4�Wf0WI�X������^�Ԛ����uǃ��ny8�L�\8�C�+�2�$b�dI_DKڵ
��
V�,~�"�F_��`(�Ƽ0Ԛ��_���`���Z�ł��x����'4���9��+ma�U㍑�)�2��˺���5^���@a�L��Yź���l7 "J)k-�2�9I�n���1p��l-���(9w��*���:�Z�e÷�-֖w�oC�J�������_�K7G��b�7��)9�⚊���$
za����XK_������m�%TJ��b�mj�"G�d=J�r����%���K��e�`���v�EL�����}[�x����-�3V4uY,X+���֊���e1Ԛ��_���ݒ3�f��b�ZA��(4N����
 ��,Uo�.�4m��]�ʘ	V4uY,X���Zm�`�ZGKө�rπK�n�m
+��o�ZC���V[��
��@�l.�+�m˾ڋ��,�UT,R��b	0�Y,�����������[rϵ6��**H�(���qX�6��j�m�QJ���,�UT,V��b)0�Y,����������L��jq)S�e+
�@]���gM&�H���ii[(�+J�rk��@�k=�S+����*-�����i`���6\G��\x�UZf���|�s��V�i�J�}�Ti��f�:�J���`��+�S��R;ښ~
�{\̆Ee'�Vi�`���;	��0��T���*-��h�i+7��h���`)�`�j�K���b�m���t9r#Y}�C��Y��6bA,G�D����ZmRkFf��ʨ,��#.5,V�u�����$	dqɤ �Ą�{x����Z�s�h2���I2gi)�m>U�s��W0��:O�YZx��|�T�
9�P�h��L���%�JYi�y��@����l�mo����<n�]o�s��>4�S�>wZ.ɼ��k5m�F��y-�%�����lM�=hʧRV���B	�
+	��/0�V�u4;������Uf�q�Q�/�(�*�T�sN���U���%�NIU����A�ݯ���;9|�w�^�%Q�,�>]���cJ��;����@ ���Z;`�c�;!�A�X���Hp�e�	g.%
+��!e�h�3J@-~P��I�}� M�~!���0Y��"R��4����IZ8��,:�v�P,a�7�\Hr��­�>�0Ɍ]c?6,��s<�#��"Bn#�_�����|��mv����S���M���v�¹6Y!uL��HźB]��d%���,�w)�6�6MM>�p`MI�ij��:�En���W��
�LK�8%��x͏hlZ��B���2�ˆ�̳�?�*�<�@�%�%Mz�$

<TRUNCATED>

[32/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/main/java/de/bokelberg/flex/parser/AS3Parser.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/main/java/de/bokelberg/flex/parser/AS3Parser.java b/FlexPMD/flex-pmd-java/as3-parser/src/main/java/de/bokelberg/flex/parser/AS3Parser.java
new file mode 100644
index 0000000..d12f099
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/main/java/de/bokelberg/flex/parser/AS3Parser.java
@@ -0,0 +1,2360 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.adobe.ac.pmd.files.impl.FileUtils;
+import com.adobe.ac.pmd.parser.IAS3Parser;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.KeyWords;
+import com.adobe.ac.pmd.parser.NodeKind;
+import com.adobe.ac.pmd.parser.Operators;
+import com.adobe.ac.pmd.parser.exceptions.NullTokenException;
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+import com.adobe.ac.pmd.parser.exceptions.UnExpectedTokenException;
+import com.adobe.ac.pmd.parser.exceptions.UnExpectedTokenException.Position;
+
+import de.bokelberg.flex.parser.AS3Scanner.Token;
+
+/**
+ * @author xagnetti
+ */
+public class AS3Parser implements IAS3Parser
+{
+   /**
+    * 
+    */
+   public static final String  ASDOC_COMMENT          = "/**";
+   /**
+    * 
+    */
+   public static final String  MULTIPLE_LINES_COMMENT = "/*";
+   /**
+    * 
+    */
+   public static final String  NEW_LINE               = "\n";
+   /**
+    * 
+    */
+   public static final String  SINGLE_LINE_COMMENT    = "//";
+   private static final String VECTOR                 = "Vector";
+   private Node                currentAsDoc;
+   private Node                currentFunctionNode;
+   private Node                currentMultiLineComment;
+   private String              fileName;
+   private boolean             isInFor;
+   private AS3Scanner          scn;
+   private Token               tok;
+
+   /**
+    * 
+    */
+   public AS3Parser()
+   {
+      this.scn = new AS3Scanner();
+      isInFor = false;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see de.bokelberg.flex.parser.IAS3Parser#buildAst(java.lang.String)
+    */
+   public final IParserNode buildAst( final String filePath ) throws IOException,
+                                                             TokenException
+   {
+      return parseLines( filePath,
+                         FileUtils.readLines( new File( filePath ) ) );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.parser.IAS3Parser#buildAst(java.lang.String,
+    * java.lang.String[])
+    */
+   public final IParserNode buildAst( final String filePath,
+                                      final String[] scriptBlockLines ) throws TokenException
+   {
+      return parseLines( filePath,
+                         scriptBlockLines );
+   }
+
+   /**
+    * @return
+    */
+   final AS3Scanner getScn()
+   {
+      return scn;
+   }
+
+   final void nextToken() throws TokenException
+   {
+      nextToken( false );
+   }
+
+   /**
+    * Get the next token Skip comments and newlines for now In the end we want
+    * to keep them though.
+    * 
+    * @throws TokenException
+    */
+   final void nextToken( final boolean ignoreDocumentation ) throws TokenException
+   {
+      do
+      {
+         if ( ignoreDocumentation )
+         {
+            nextTokenIgnoringDocumentation();
+         }
+         else
+         {
+            nextTokenAllowNewLine();
+         }
+      }
+      while ( tok.getText().equals( NEW_LINE ) );
+   }
+
+   /**
+    * tok is first content token
+    * 
+    * @throws TokenException
+    */
+   final Node parseClassContent() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.CONTENT,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      final List< Token > modifiers = new ArrayList< Token >();
+      final List< Node > meta = new ArrayList< Node >();
+
+      while ( !tokIs( Operators.RIGHT_CURLY_BRACKET ) )
+      {
+         if ( tokIs( Operators.LEFT_CURLY_BRACKET ) )
+         {
+            result.addChild( parseBlock() );
+         }
+         if ( tokIs( Operators.LEFT_SQUARE_BRACKET ) )
+         {
+            meta.add( parseMetaData() );
+         }
+         else if ( tokIs( KeyWords.VAR ) )
+         {
+            parseClassField( result,
+                             modifiers,
+                             meta );
+         }
+         else if ( tokIs( KeyWords.CONST ) )
+         {
+            parseClassConstant( result,
+                                modifiers,
+                                meta );
+         }
+         else if ( tokIs( KeyWords.IMPORT ) )
+         {
+            result.addChild( parseImport() );
+         }
+         else if ( tokIs( KeyWords.FUNCTION ) )
+         {
+            parseClassFunctions( result,
+                                 modifiers,
+                                 meta );
+         }
+         else
+         {
+            tryToParseCommentNode( result,
+                                   modifiers );
+         }
+      }
+      return result;
+   }
+
+   /**
+    * tok is empty, since nextToken has not been called before
+    * 
+    * @throws UnExpectedTokenException
+    */
+   final Node parseCompilationUnit() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.COMPILATION_UNIT,
+                                       -1,
+                                       -1 );
+
+      nextTokenIgnoringDocumentation();
+      if ( tokIs( KeyWords.PACKAGE ) )
+      {
+         result.addChild( parsePackage() );
+      }
+      result.addChild( parsePackageContent() );
+      return result;
+   }
+
+   /**
+    * @return
+    * @throws TokenException
+    */
+   final IParserNode parseExpression() throws TokenException
+   {
+      return parseAssignmentExpression();
+   }
+
+   /**
+    * tok is first content token
+    * 
+    * @throws TokenException
+    */
+   final Node parseInterfaceContent() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.CONTENT,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      while ( !tokIs( Operators.RIGHT_CURLY_BRACKET ) )
+      {
+         if ( tokIs( KeyWords.IMPORT ) )
+         {
+            result.addChild( parseImport() );
+         }
+         else if ( tokIs( KeyWords.FUNCTION ) )
+         {
+            result.addChild( parseFunctionSignature() );
+         }
+         else if ( tokIs( KeyWords.INCLUDE )
+               || tokIs( KeyWords.INCLUDE_AS2 ) )
+         {
+            result.addChild( parseIncludeExpression() );
+         }
+         else if ( tokIs( Operators.LEFT_SQUARE_BRACKET ) )
+         {
+            while ( !tokIs( Operators.RIGHT_SQUARE_BRACKET ) )
+            {
+               nextToken();
+            }
+            nextToken();
+         }
+         else
+         {
+            tryToParseCommentNode( result,
+                                   null );
+         }
+      }
+      return result;
+   }
+
+   /**
+    * tok is first token of content
+    * 
+    * @throws UnExpectedTokenException
+    */
+   final Node parsePackageContent() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.CONTENT,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      final List< Token > modifiers = new ArrayList< Token >();
+      final List< Node > meta = new ArrayList< Node >();
+
+      while ( !tokIs( Operators.RIGHT_CURLY_BRACKET )
+            && !tokIs( KeyWords.EOF ) )
+      {
+         if ( tokIs( KeyWords.IMPORT ) )
+         {
+            result.addChild( parseImport() );
+         }
+         else if ( tokIs( KeyWords.USE ) )
+         {
+            result.addChild( parseUse() );
+         }
+         else if ( tokIs( Operators.LEFT_SQUARE_BRACKET ) )
+         {
+            meta.add( parseMetaData() );
+         }
+         else if ( tokIs( KeyWords.CLASS ) )
+         {
+            result.addChild( parseClass( meta,
+                                         modifiers ) );
+
+            modifiers.clear();
+            meta.clear();
+         }
+         else if ( tokIs( KeyWords.INTERFACE ) )
+         {
+            result.addChild( parseInterface( meta,
+                                             modifiers ) );
+            modifiers.clear();
+            meta.clear();
+         }
+         else if ( tokIs( KeyWords.FUNCTION ) )
+         {
+            parseClassFunctions( result,
+                                 modifiers,
+                                 meta );
+         }
+         else if ( tok.getText().startsWith( ASDOC_COMMENT ) )
+         {
+            currentAsDoc = Node.create( NodeKind.AS_DOC,
+                                        tok.getLine(),
+                                        tok.getColumn(),
+                                        tok.getText() );
+            nextToken();
+         }
+         else if ( tok.getText().startsWith( MULTIPLE_LINES_COMMENT ) )
+         {
+            currentMultiLineComment = Node.create( NodeKind.MULTI_LINE_COMMENT,
+                                                   tok.getLine(),
+                                                   tok.getColumn(),
+                                                   tok.getText() );
+            nextToken();
+         }
+         else
+         {
+            modifiers.add( tok );
+            nextTokenIgnoringDocumentation();
+         }
+      }
+      return result;
+   }
+
+   /**
+    * @return
+    * @throws TokenException
+    */
+   final Node parsePrimaryExpression() throws TokenException
+   {
+      Node result = Node.create( NodeKind.PRIMARY,
+                                 tok.getLine(),
+                                 tok.getColumn(),
+                                 tok.getText() );
+
+      if ( tokIs( Operators.LEFT_SQUARE_BRACKET ) )
+      {
+         result.addChild( parseArrayLiteral() );
+      }
+      else if ( tokIs( Operators.LEFT_CURLY_BRACKET ) )
+      {
+         result.addChild( parseObjectLiteral() );
+      }
+      else if ( tokIs( KeyWords.FUNCTION ) )
+      {
+         result.addChild( parseLambdaExpression() );
+      }
+      else if ( tokIs( KeyWords.NEW ) )
+      {
+         result = parseNewExpression();
+      }
+      else if ( tokIs( Operators.LEFT_PARENTHESIS ) )
+      {
+         result.addChild( parseEncapsulatedExpression() );
+      }
+      else
+      {
+         nextToken( true );
+      }
+      return result;
+   }
+
+   /**
+    * tok is the first token of a statement
+    * 
+    * @throws TokenException
+    */
+   final IParserNode parseStatement() throws TokenException
+   {
+      IParserNode result;
+
+      if ( tokIs( KeyWords.FOR ) )
+      {
+         result = parseFor();
+      }
+      else if ( tokIs( KeyWords.IF ) )
+      {
+         result = parseIf();
+      }
+      else if ( tokIs( KeyWords.SWITCH ) )
+      {
+         result = parseSwitch();
+      }
+      else if ( tokIs( KeyWords.DO ) )
+      {
+         result = parseDo();
+      }
+      else if ( tokIs( KeyWords.WHILE ) )
+      {
+         result = parseWhile();
+      }
+      else if ( tokIs( KeyWords.TRY ) )
+      {
+         result = parseTry();
+      }
+      else if ( tokIs( KeyWords.CATCH ) )
+      {
+         result = parseCatch();
+      }
+      else if ( tokIs( KeyWords.FINALLY ) )
+      {
+         result = parseFinally();
+      }
+      else if ( tokIs( Operators.LEFT_CURLY_BRACKET ) )
+      {
+         result = parseBlock();
+      }
+      else if ( tokIs( KeyWords.VAR ) )
+      {
+         result = parseVar();
+      }
+      else if ( tokIs( KeyWords.CONST ) )
+      {
+         result = parseConst();
+      }
+      else if ( tokIs( KeyWords.RETURN ) )
+      {
+         result = parseReturnStatement();
+      }
+      else if ( tokIs( Operators.SEMI_COLUMN ) )
+      {
+         result = parseEmptyStatement();
+      }
+      else
+      {
+         result = parseExpressionList();
+         skip( Operators.SEMI_COLUMN );
+      }
+      return result;
+   }
+
+   /**
+    * @return
+    * @throws TokenException
+    */
+   final Node parseUnaryExpression() throws TokenException
+   {
+      Node result;
+      if ( tokIs( Operators.INCREMENT ) )
+      {
+         nextToken();
+         result = Node.create( NodeKind.PRE_INC,
+                               tok.getLine(),
+                               tok.getColumn(),
+                               parseUnaryExpression() );
+      }
+      else if ( tokIs( Operators.DECREMENT ) )
+      {
+         nextToken();
+         result = Node.create( NodeKind.PRE_DEC,
+                               tok.getLine(),
+                               tok.getColumn(),
+                               parseUnaryExpression() );
+      }
+      else if ( tokIs( Operators.MINUS ) )
+      {
+         nextToken();
+         result = Node.create( NodeKind.MINUS,
+                               tok.getLine(),
+                               tok.getColumn(),
+                               parseUnaryExpression() );
+      }
+      else if ( tokIs( Operators.PLUS )
+            || tokIs( Operators.PLUS_AS2 ) )
+      {
+         nextToken();
+         result = Node.create( NodeKind.PLUS,
+                               tok.getLine(),
+                               tok.getColumn(),
+                               parseUnaryExpression() );
+      }
+      else
+      {
+         result = parseUnaryExpressionNotPlusMinus();
+      }
+      return result;
+   }
+
+   private IParserNode collectVarListContent( final Node result ) throws TokenException
+   {
+      result.addChild( parseNameTypeInit() );
+      while ( tokIs( Operators.COMMA ) )
+      {
+         nextToken( true );
+         result.addChild( parseNameTypeInit() );
+      }
+      return result;
+   }
+
+   private void consume( final KeyWords keyword ) throws TokenException
+   {
+      consume( keyword.toString() );
+   }
+
+   private void consume( final Operators operator ) throws TokenException
+   {
+      consume( operator.toString() );
+   }
+
+   /**
+    * Compare the current token to the parameter. If it equals, get the next
+    * token. If not, throw a runtime exception.
+    * 
+    * @param text
+    * @throws UnExpectedTokenException
+    */
+   private void consume( final String text ) throws TokenException
+   {
+      while ( tok.getText().startsWith( "//" ) )
+      {
+         nextToken();
+      }
+
+      if ( !tokIs( text ) )
+      {
+         throw new UnExpectedTokenException( tok.getText(),
+                                             new Position( tok.getLine(), tok.getColumn() ),
+                                             fileName,
+                                             text );
+      }
+      nextToken();
+   }
+
+   private Node convertMeta( final List< Node > metadataList )
+   {
+      if ( metadataList == null
+            || metadataList.isEmpty() )
+      {
+         return null;
+      }
+
+      final Node result = Node.create( NodeKind.META_LIST,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+
+      for ( final Node metadataNode : metadataList )
+      {
+         result.addChild( metadataNode );
+      }
+      return result;
+   }
+
+   private Node convertModifiers( final List< Token > modifierList )
+   {
+      if ( modifierList == null )
+      {
+         return null;
+      }
+
+      final Node result = Node.create( NodeKind.MOD_LIST,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+
+      for ( final Token modifierToken : modifierList )
+      {
+         result.addChild( NodeKind.MODIFIER,
+                          tok.getLine(),
+                          tok.getColumn(),
+                          modifierToken.getText() );
+      }
+      return result;
+   }
+
+   private Node[] doParseSignature() throws TokenException
+   {
+      consume( KeyWords.FUNCTION );
+
+      Node type = Node.create( NodeKind.TYPE,
+                               tok.getLine(),
+                               tok.getColumn(),
+                               KeyWords.FUNCTION.toString() );
+      if ( tokIs( KeyWords.SET )
+            || tokIs( KeyWords.GET ) )
+      {
+         type = Node.create( NodeKind.TYPE,
+                             tok.getLine(),
+                             tok.getColumn(),
+                             tok.getText() );
+         nextToken(); // set or get
+      }
+      final Node name = Node.create( NodeKind.NAME,
+                                     tok.getLine(),
+                                     tok.getColumn(),
+                                     tok.getText() );
+      nextToken(); // name
+      final Node params = parseParameterList();
+      final Node returnType = parseOptionalType();
+      return new Node[]
+      { type,
+                  name,
+                  params,
+                  returnType };
+   }
+
+   private NodeKind findFunctionTypeFromSignature( final Node[] signature )
+   {
+      for ( final Node node : signature )
+      {
+         if ( node.is( NodeKind.TYPE ) )
+         {
+            if ( node.getStringValue().equals( "set" ) )
+            {
+               return NodeKind.SET;
+            }
+            if ( node.getStringValue().equals( "get" ) )
+            {
+               return NodeKind.GET;
+            }
+            return NodeKind.FUNCTION;
+         }
+      }
+      return NodeKind.FUNCTION;
+   }
+
+   /**
+    * Get the next token Skip comments but keep newlines We need this method for
+    * beeing able to decide if a returnStatement has an expression
+    * 
+    * @throws UnExpectedTokenException
+    */
+   private void nextTokenAllowNewLine() throws TokenException
+   {
+      do
+      {
+         tok = scn.nextToken();
+
+         if ( tok == null )
+         {
+            throw new NullTokenException( fileName );
+
+         }
+         if ( tok.getText() == null )
+         {
+            throw new NullTokenException( fileName );
+         }
+      }
+      while ( tok.getText().startsWith( SINGLE_LINE_COMMENT ) );
+   }
+
+   private void nextTokenIgnoringDocumentation() throws TokenException
+   {
+      do
+      {
+         nextToken();
+      }
+      while ( tok.getText().startsWith( MULTIPLE_LINES_COMMENT ) );
+   }
+
+   private IParserNode parseAdditiveExpression() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.ADD,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseMultiplicativeExpression() );
+      while ( tokIs( Operators.PLUS )
+            || tokIs( Operators.PLUS_AS2 ) || tokIs( Operators.MINUS ) )
+      {
+         result.addChild( Node.create( NodeKind.OP,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       tok.getText() ) );
+         nextToken( true );
+         result.addChild( parseMultiplicativeExpression() );
+      }
+      return result.numChildren() > 1 ? result
+                                     : result.getChild( 0 );
+   }
+
+   // ------------------------------------------------------------------------
+   // language specific recursive descent parsing
+   // ------------------------------------------------------------------------
+
+   private IParserNode parseAndExpression() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.AND,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseBitwiseOrExpression() );
+      while ( tokIs( Operators.AND )
+            || tokIs( Operators.AND_AS2 ) )
+      {
+         result.addChild( Node.create( NodeKind.OP,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       tok.getText() ) );
+         nextToken( true );
+         result.addChild( parseBitwiseOrExpression() );
+      }
+      return result.numChildren() > 1 ? result
+                                     : result.getChild( 0 );
+   }
+
+   /**
+    * tok is ( exit tok is first token after )
+    */
+   private Node parseArgumentList() throws TokenException
+   {
+      consume( Operators.LEFT_PARENTHESIS );
+      final Node result = Node.create( NodeKind.ARGUMENTS,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      while ( !tokIs( Operators.RIGHT_PARENTHESIS ) )
+      {
+         result.addChild( parseExpression() );
+         skip( Operators.COMMA );
+      }
+      consume( Operators.RIGHT_PARENTHESIS );
+      return result;
+   }
+
+   private Node parseArrayAccessor( final Node node ) throws TokenException
+   {
+      final Node result = Node.create( NodeKind.ARRAY_ACCESSOR,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      result.addChild( node );
+      while ( tokIs( Operators.LEFT_SQUARE_BRACKET ) )
+      {
+         nextToken( true );
+         result.addChild( parseExpression() );
+         consume( Operators.RIGHT_SQUARE_BRACKET );
+      }
+      return result;
+   }
+
+   /**
+    * tok is [
+    */
+   private IParserNode parseArrayLiteral() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.ARRAY,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      consume( Operators.LEFT_SQUARE_BRACKET );
+      while ( !tokIs( Operators.RIGHT_SQUARE_BRACKET ) )
+      {
+         result.addChild( parseExpression() );
+         skip( Operators.COMMA );
+      }
+      consume( Operators.RIGHT_SQUARE_BRACKET );
+      return result;
+   }
+
+   private IParserNode parseAssignmentExpression() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.ASSIGN,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseConditionalExpression() );
+      while ( tokIs( Operators.EQUAL )
+            || tokIs( Operators.PLUS_EQUAL ) || tokIs( Operators.MINUS_EQUAL )
+            || tokIs( Operators.TIMES_EQUAL ) || tokIs( Operators.DIVIDED_EQUAL )
+            || tokIs( Operators.MODULO_EQUAL ) || tokIs( Operators.AND_EQUAL ) || tokIs( Operators.OR_EQUAL )
+            || tokIs( Operators.XOR_EQUAL ) )
+      {
+         result.addChild( Node.create( NodeKind.OP,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       tok.getText() ) );
+         nextToken( true );
+         result.addChild( parseExpression() );
+      }
+      return result.numChildren() > 1 ? result
+                                     : result.getChild( 0 );
+   }
+
+   private IParserNode parseBitwiseAndExpression() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.B_AND,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseEqualityExpression() );
+      while ( tokIs( Operators.B_AND ) )
+      {
+         result.addChild( Node.create( NodeKind.OP,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       tok.getText() ) );
+         nextToken( true );
+         result.addChild( parseEqualityExpression() );
+      }
+      return result.numChildren() > 1 ? result
+                                     : result.getChild( 0 );
+   }
+
+   private IParserNode parseBitwiseOrExpression() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.B_OR,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseBitwiseXorExpression() );
+      while ( tokIs( Operators.B_OR ) )
+      {
+         result.addChild( Node.create( NodeKind.OP,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       tok.getText() ) );
+         nextToken( true );
+         result.addChild( parseBitwiseXorExpression() );
+      }
+      return result.numChildren() > 1 ? result
+                                     : result.getChild( 0 );
+   }
+
+   private IParserNode parseBitwiseXorExpression() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.B_XOR,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseBitwiseAndExpression() );
+      while ( tokIs( Operators.B_XOR ) )
+      {
+         result.addChild( Node.create( NodeKind.OP,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       tok.getText() ) );
+         nextToken( true );
+         result.addChild( parseBitwiseAndExpression() );
+      }
+      return result.numChildren() > 1 ? result
+                                     : result.getChild( 0 );
+   }
+
+   private Node parseBlock() throws TokenException
+   {
+      return parseBlock( Node.create( NodeKind.BLOCK,
+                                      tok.getLine(),
+                                      tok.getColumn() ) );
+   }
+
+   private Node parseBlock( final Node result ) throws TokenException
+   {
+      consume( Operators.LEFT_CURLY_BRACKET );
+
+      while ( !tokIs( Operators.RIGHT_CURLY_BRACKET ) )
+      {
+         if ( tok.getText().startsWith( MULTIPLE_LINES_COMMENT ) )
+         {
+            currentFunctionNode.addChild( Node.create( NodeKind.MULTI_LINE_COMMENT,
+                                                       tok.getLine(),
+                                                       tok.getColumn(),
+                                                       tok.getText() ) );
+            nextToken();
+         }
+         else
+         {
+            result.addChild( parseStatement() );
+         }
+      }
+      consume( Operators.RIGHT_CURLY_BRACKET );
+      return result;
+   }
+
+   /**
+    * tok is catch
+    * 
+    * @throws TokenException
+    */
+   private Node parseCatch() throws TokenException
+   {
+      consume( KeyWords.CATCH );
+      consume( Operators.LEFT_PARENTHESIS );
+      final Node result = Node.create( NodeKind.CATCH,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       Node.create( NodeKind.NAME,
+                                                    tok.getLine(),
+                                                    tok.getColumn(),
+                                                    tok.getText() ) );
+      nextToken( true ); // name
+      if ( tokIs( Operators.COLUMN ) )
+      {
+         nextToken( true ); // :
+         result.addChild( Node.create( NodeKind.TYPE,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       tok.getText() ) );
+         nextToken( true ); // type
+      }
+      consume( Operators.RIGHT_PARENTHESIS );
+      result.addChild( parseBlock() );
+      return result;
+   }
+
+   /**
+    * tok is class
+    * 
+    * @param meta
+    * @param modifier
+    * @throws TokenException
+    */
+   private Node parseClass( final List< Node > meta,
+                            final List< Token > modifier ) throws TokenException
+   {
+      consume( KeyWords.CLASS );
+
+      final Node result = Node.create( NodeKind.CLASS,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+
+      if ( currentAsDoc != null )
+      {
+         result.addChild( currentAsDoc );
+         currentAsDoc = null;
+      }
+      if ( currentMultiLineComment != null )
+      {
+         result.addChild( currentMultiLineComment );
+         currentMultiLineComment = null;
+      }
+
+      result.addChild( NodeKind.NAME,
+                       tok.getLine(),
+                       tok.getColumn(),
+                       parseQualifiedName( true ) );
+
+      result.addChild( convertMeta( meta ) );
+      result.addChild( convertModifiers( modifier ) );
+
+      // nextToken( true ); // name
+
+      do
+      {
+         if ( tokIs( KeyWords.EXTENDS ) )
+         {
+            nextToken( true ); // extends
+            result.addChild( NodeKind.EXTENDS,
+                             tok.getLine(),
+                             tok.getColumn(),
+                             parseQualifiedName( false ) );
+         }
+         else if ( tokIs( KeyWords.IMPLEMENTS ) )
+         {
+            result.addChild( parseImplementsList() );
+         }
+      }
+      while ( !tokIs( Operators.LEFT_CURLY_BRACKET ) );
+      consume( Operators.LEFT_CURLY_BRACKET );
+      result.addChild( parseClassContent() );
+      consume( Operators.RIGHT_CURLY_BRACKET );
+      return result;
+   }
+
+   private void parseClassConstant( final Node result,
+                                    final List< Token > modifiers,
+                                    final List< Node > meta ) throws TokenException
+   {
+      result.addChild( parseConstList( meta,
+                                       modifiers ) );
+      if ( tokIs( Operators.SEMI_COLUMN ) )
+      {
+         nextToken();
+      }
+      meta.clear();
+      modifiers.clear();
+   }
+
+   private void parseClassField( final Node result,
+                                 final List< Token > modifiers,
+                                 final List< Node > meta ) throws TokenException
+   {
+      final Node varList = parseVarList( meta,
+                                         modifiers );
+      result.addChild( varList );
+      if ( currentAsDoc != null )
+      {
+         varList.addChild( currentAsDoc );
+         currentAsDoc = null;
+      }
+      if ( currentMultiLineComment != null )
+      {
+         result.addChild( currentMultiLineComment );
+         currentMultiLineComment = null;
+      }
+      if ( tokIs( Operators.SEMI_COLUMN ) )
+      {
+         nextToken();
+      }
+      meta.clear();
+      modifiers.clear();
+   }
+
+   private void parseClassFunctions( final Node result,
+                                     final List< Token > modifiers,
+                                     final List< Node > meta ) throws TokenException
+   {
+      result.addChild( parseFunction( meta,
+                                      modifiers ) );
+      meta.clear();
+      modifiers.clear();
+   }
+
+   /**
+    * tok is (
+    * 
+    * @throws TokenException
+    */
+   private Node parseCondition() throws TokenException
+   {
+      consume( Operators.LEFT_PARENTHESIS );
+      final Node result = Node.create( NodeKind.CONDITION,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseExpression() );
+      consume( Operators.RIGHT_PARENTHESIS );
+      return result;
+   }
+
+   private IParserNode parseConditionalExpression() throws TokenException
+   {
+      final IParserNode result = parseOrExpression();
+      if ( tokIs( Operators.QUESTION_MARK ) )
+      {
+         final Node conditional = Node.create( NodeKind.CONDITIONAL,
+                                               tok.getLine(),
+                                               tok.getColumn(),
+                                               result );
+         nextToken( true ); // ?
+         conditional.addChild( parseExpression() );
+         nextToken( true ); // :
+         conditional.addChild( parseExpression() );
+
+         return conditional;
+      }
+      return result;
+   }
+
+   private Node parseConst() throws TokenException
+   {
+      Node result;
+      result = parseConstList( null,
+                               null );
+      skip( Operators.SEMI_COLUMN );
+      return result;
+   }
+
+   /**
+    * tok is const
+    * 
+    * @param modifiers
+    * @param meta
+    * @throws TokenException
+    */
+   private Node parseConstList( final List< Node > meta,
+                                final List< Token > modifiers ) throws TokenException
+   {
+      consume( KeyWords.CONST );
+      final Node result = Node.create( NodeKind.CONST_LIST,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      result.addChild( convertMeta( meta ) );
+      result.addChild( convertModifiers( modifiers ) );
+      collectVarListContent( result );
+      return result;
+   }
+
+   private Node parseDecrement( final Node node ) throws TokenException
+   {
+      nextToken( true );
+      final Node result = Node.create( NodeKind.POST_DEC,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      result.addChild( node );
+      return result;
+   }
+
+   /**
+    * tok is do
+    * 
+    * @throws TokenException
+    */
+   private Node parseDo() throws TokenException
+   {
+      consume( KeyWords.DO );
+      final Node result = Node.create( NodeKind.DO,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseStatement() );
+      consume( KeyWords.WHILE );
+      result.addChild( parseCondition() );
+      if ( tokIs( Operators.SEMI_COLUMN ) )
+      {
+         nextToken( true );
+      }
+      return result;
+   }
+
+   private Node parseDot( final Node node ) throws TokenException
+   {
+      nextToken();
+      if ( tokIs( Operators.LEFT_PARENTHESIS ) )
+      {
+         nextToken();
+         final Node result = Node.create( NodeKind.E4X_FILTER,
+                                          tok.getLine(),
+                                          tok.getColumn() );
+         result.addChild( node );
+         result.addChild( parseExpression() );
+         consume( Operators.RIGHT_PARENTHESIS );
+         return result;
+      }
+      else if ( tokIs( Operators.TIMES ) )
+      {
+         final Node result = Node.create( NodeKind.E4X_STAR,
+                                          tok.getLine(),
+                                          tok.getColumn() );
+         result.addChild( node );
+         return result;
+      }
+      final Node result = Node.create( NodeKind.DOT,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      result.addChild( node );
+      result.addChild( parseExpression() );
+      return result;
+   }
+
+   private Node parseEmptyStatement() throws TokenException
+   {
+      Node result;
+      result = Node.create( NodeKind.STMT_EMPTY,
+                            tok.getLine(),
+                            tok.getColumn(),
+                            Operators.SEMI_COLUMN.toString() );
+      nextToken( true );
+      return result;
+   }
+
+   private Node parseEncapsulatedExpression() throws TokenException
+   {
+      consume( Operators.LEFT_PARENTHESIS );
+      final Node result = Node.create( NodeKind.ENCAPSULATED,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      result.addChild( parseExpressionList() );
+
+      consume( Operators.RIGHT_PARENTHESIS );
+
+      return result;
+   }
+
+   private IParserNode parseEqualityExpression() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.EQUALITY,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseRelationalExpression() );
+      while ( tokIs( Operators.DOUBLE_EQUAL )
+            || tokIs( Operators.DOUBLE_EQUAL_AS2 ) || tokIs( Operators.STRICTLY_EQUAL )
+            || tokIs( Operators.NON_EQUAL ) || tokIs( Operators.NON_EQUAL_AS2_1 )
+            || tokIs( Operators.NON_EQUAL_AS2_2 ) || tokIs( Operators.NON_STRICTLY_EQUAL ) )
+      {
+         result.addChild( Node.create( NodeKind.OP,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       tok.getText() ) );
+         nextToken( true );
+         result.addChild( parseRelationalExpression() );
+      }
+      return result.numChildren() > 1 ? result
+                                     : result.getChild( 0 );
+   }
+
+   private IParserNode parseExpressionList() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.EXPR_LIST,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseAssignmentExpression() );
+      while ( tokIs( Operators.COMMA ) )
+      {
+         nextToken( true );
+         result.addChild( parseAssignmentExpression() );
+      }
+      return result.numChildren() > 1 ? result
+                                     : result.getChild( 0 );
+   }
+
+   private Node parseFinally() throws TokenException
+   {
+      Node result;
+      nextToken( true );
+      result = Node.create( NodeKind.FINALLY,
+                            tok.getLine(),
+                            tok.getColumn(),
+                            parseBlock() );
+      return result;
+   }
+
+   /**
+    * tok is for
+    * 
+    * @throws TokenException
+    */
+   private Node parseFor() throws TokenException
+   {
+      consume( KeyWords.FOR );
+
+      if ( tokIs( KeyWords.EACH ) )
+      {
+         nextToken();
+         return parseForEach();
+      }
+      else
+      {
+         return parseTraditionalFor();
+      }
+   }
+
+   /**
+    * tok is ( for each( var obj : Type in List )
+    * 
+    * @throws TokenException
+    */
+   private Node parseForEach() throws TokenException
+   {
+      consume( Operators.LEFT_PARENTHESIS );
+
+      final Node result = Node.create( NodeKind.FOREACH,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      if ( tokIs( KeyWords.VAR ) )
+      {
+         final Node var = Node.create( NodeKind.VAR,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+         nextToken();
+         var.addChild( parseNameTypeInit() );
+         result.addChild( var );
+      }
+      else
+      {
+         result.addChild( NodeKind.NAME,
+                          tok.getLine(),
+                          tok.getColumn(),
+                          tok.getText() );
+         // names allowed?
+         nextToken();
+      }
+      nextToken(); // in
+      result.addChild( NodeKind.IN,
+                       tok.getLine(),
+                       tok.getColumn(),
+                       parseExpression() );
+      consume( Operators.RIGHT_PARENTHESIS );
+      result.addChild( parseStatement() );
+      return result;
+   }
+
+   private Node parseForIn( final Node result ) throws TokenException
+   {
+      nextToken();
+      result.addChild( NodeKind.IN,
+                       tok.getLine(),
+                       tok.getColumn(),
+                       parseExpression() );
+      result.setId( NodeKind.FORIN );
+      return result;
+   }
+
+   /**
+    * tok is function
+    * 
+    * @param modifiers
+    * @param meta
+    * @throws TokenException
+    */
+   private Node parseFunction( final List< Node > meta,
+                               final List< Token > modifiers ) throws TokenException
+   {
+      final Node[] signature = doParseSignature();
+      final Node result = Node.create( findFunctionTypeFromSignature( signature ),
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       signature[ 0 ].getStringValue() );
+
+      if ( currentAsDoc != null )
+      {
+         result.addChild( currentAsDoc );
+         currentAsDoc = null;
+      }
+      if ( currentMultiLineComment != null )
+      {
+         result.addChild( currentMultiLineComment );
+         currentMultiLineComment = null;
+      }
+      result.addChild( convertMeta( meta ) );
+      result.addChild( convertModifiers( modifiers ) );
+      result.addChild( signature[ 1 ] );
+      result.addChild( signature[ 2 ] );
+      result.addChild( signature[ 3 ] );
+      if ( tokIs( Operators.SEMI_COLUMN ) )
+      {
+         consume( Operators.SEMI_COLUMN );
+      }
+      else
+      {
+         result.addChild( parseFunctionBlock() );
+      }
+      currentFunctionNode = null;
+      return result;
+   }
+
+   /**
+    * tok is { exit tok is the first tok after }
+    * 
+    * @throws TokenException
+    * @throws TokenException
+    */
+
+   private Node parseFunctionBlock() throws TokenException
+   {
+      final Node block = Node.create( NodeKind.BLOCK,
+                                      tok.getLine(),
+                                      tok.getColumn() );
+
+      currentFunctionNode = block;
+
+      parseBlock( block );
+
+      return block;
+   }
+
+   private Node parseFunctionCall( final Node node ) throws TokenException
+   {
+      final Node result = Node.create( NodeKind.CALL,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      result.addChild( node );
+      while ( tokIs( Operators.LEFT_PARENTHESIS ) )
+      {
+         result.addChild( parseArgumentList() );
+      }
+      while ( tokIs( Operators.LEFT_SQUARE_BRACKET ) )
+      {
+         result.addChild( parseArrayLiteral() );
+      }
+
+      return result;
+   }
+
+   /**
+    * tok is function exit tok is the first token after the optional ;
+    * 
+    * @throws TokenException
+    */
+   private Node parseFunctionSignature() throws TokenException
+   {
+      final Node[] signature = doParseSignature();
+      skip( Operators.SEMI_COLUMN );
+      final Node result = Node.create( findFunctionTypeFromSignature( signature ),
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       signature[ 0 ].getStringValue() );
+      result.addChild( signature[ 1 ] );
+      result.addChild( signature[ 2 ] );
+      result.addChild( signature[ 3 ] );
+      return result;
+   }
+
+   /**
+    * tok is if
+    * 
+    * @throws TokenException
+    */
+   private Node parseIf() throws TokenException
+   {
+      consume( KeyWords.IF );
+      final Node result = Node.create( NodeKind.IF,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseCondition() );
+      result.addChild( parseStatement() );
+      if ( tokIs( KeyWords.ELSE ) )
+      {
+         nextToken( true );
+         result.addChild( parseStatement() );
+      }
+      return result;
+   }
+
+   /**
+    * tok is implements implements a,b,c exit tok is the first token after the
+    * list of qualfied names
+    * 
+    * @throws TokenException
+    */
+   private Node parseImplementsList() throws TokenException
+   {
+      consume( KeyWords.IMPLEMENTS );
+
+      final Node result = Node.create( NodeKind.IMPLEMENTS_LIST,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      result.addChild( NodeKind.IMPLEMENTS,
+                       tok.getLine(),
+                       tok.getColumn(),
+                       parseQualifiedName( true ) );
+      while ( tokIs( Operators.COMMA ) )
+      {
+         nextToken( true );
+         result.addChild( NodeKind.IMPLEMENTS,
+                          tok.getLine(),
+                          tok.getColumn(),
+                          parseQualifiedName( false ) );
+      }
+      return result;
+   }
+
+   /**
+    * tok is import
+    * 
+    * @throws TokenException
+    */
+   private Node parseImport() throws TokenException
+   {
+      consume( KeyWords.IMPORT );
+      final Node result = Node.create( NodeKind.IMPORT,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseImportName() );
+      skip( Operators.SEMI_COLUMN );
+      return result;
+   }
+
+   /**
+    * tok is the first part of a name the last part can be a star exit tok is
+    * the first token, which doesn't belong to the name
+    * 
+    * @throws TokenException
+    */
+   private String parseImportName() throws TokenException
+   {
+      final StringBuffer result = new StringBuffer();
+
+      result.append( tok.getText() );
+      nextToken();
+      while ( tokIs( Operators.DOT ) )
+      {
+         result.append( Operators.DOT );
+         nextToken(); // .
+         result.append( tok.getText() );
+         nextToken(); // part of name
+      }
+      return result.toString();
+   }
+
+   private IParserNode parseIncludeExpression() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.INCLUDE,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      if ( tokIs( KeyWords.INCLUDE ) )
+      {
+         consume( KeyWords.INCLUDE );
+      }
+      else if ( tokIs( KeyWords.INCLUDE_AS2 ) )
+      {
+         consume( KeyWords.INCLUDE_AS2 );
+      }
+      result.addChild( parseExpression() );
+      return result;
+   }
+
+   private Node parseIncrement( final Node node ) throws TokenException
+   {
+      nextToken( true );
+      final Node result = Node.create( NodeKind.POST_INC,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      result.addChild( node );
+      return result;
+   }
+
+   /**
+    * tok is interface
+    * 
+    * @param meta
+    * @param modifier
+    * @throws TokenException
+    */
+   private Node parseInterface( final List< Node > meta,
+                                final List< Token > modifier ) throws TokenException
+   {
+      consume( KeyWords.INTERFACE );
+      final Node result = Node.create( NodeKind.INTERFACE,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+
+      if ( currentAsDoc != null )
+      {
+         result.addChild( currentAsDoc );
+         currentAsDoc = null;
+      }
+      if ( currentMultiLineComment != null )
+      {
+         result.addChild( currentMultiLineComment );
+         currentMultiLineComment = null;
+      }
+      result.addChild( NodeKind.NAME,
+                       tok.getLine(),
+                       tok.getColumn(),
+                       parseQualifiedName( true ) );
+
+      result.addChild( convertMeta( meta ) );
+      result.addChild( convertModifiers( modifier ) );
+
+      if ( tokIs( KeyWords.EXTENDS ) )
+      {
+         nextToken(); // extends
+         result.addChild( NodeKind.EXTENDS,
+                          tok.getLine(),
+                          tok.getColumn(),
+                          parseQualifiedName( false ) );
+      }
+      while ( tokIs( Operators.COMMA ) )
+      {
+         nextToken(); // comma
+         result.addChild( NodeKind.EXTENDS,
+                          tok.getLine(),
+                          tok.getColumn(),
+                          parseQualifiedName( false ) );
+      }
+      consume( Operators.LEFT_CURLY_BRACKET );
+      result.addChild( parseInterfaceContent() );
+      consume( Operators.RIGHT_CURLY_BRACKET );
+      return result;
+   }
+
+   /**
+    * tok is function
+    * 
+    * @throws TokenException
+    */
+   private Node parseLambdaExpression() throws TokenException
+   {
+      consume( KeyWords.FUNCTION );
+      Node result;
+
+      if ( tok.getText().compareTo( "(" ) == 0 )
+      {
+         result = Node.create( NodeKind.LAMBDA,
+                               tok.getLine(),
+                               tok.getColumn() );
+      }
+      else
+      {
+         result = Node.create( NodeKind.FUNCTION,
+                               tok.getLine(),
+                               tok.getColumn(),
+                               tok.getText() );
+         nextToken( true );
+      }
+      result.addChild( parseParameterList() );
+      result.addChild( parseOptionalType() );
+      result.addChild( parseBlock() );
+      return result;
+   }
+
+   private IParserNode parseLines( final String filePath,
+                                   final String[] lines ) throws TokenException
+   {
+      setFileName( filePath );
+      scn = new AS3Scanner();
+      scn.setLines( lines );
+      return parseCompilationUnit();
+   }
+
+   /**
+    * tok is [ [id] [id ("test")] [id (name="test",type="a.b.c.Event")] exit
+    * token is the first token after ]
+    * 
+    * @throws TokenException
+    */
+   private Node parseMetaData() throws TokenException
+   {
+      final StringBuffer buffer = new StringBuffer();
+
+      final int line = tok.getLine();
+      final int column = tok.getColumn();
+
+      consume( Operators.LEFT_SQUARE_BRACKET );
+      while ( !tokIs( Operators.RIGHT_SQUARE_BRACKET ) )
+      {
+         if ( buffer.length() > 0 )
+         {
+            buffer.append( ' ' );
+         }
+         buffer.append( tok.getText() );
+         nextToken();
+      }
+      skip( Operators.RIGHT_SQUARE_BRACKET );
+      final Node metaDataNode = Node.create( NodeKind.META,
+                                             line,
+                                             column,
+                                             buffer.toString() );
+
+      return metaDataNode;
+   }
+
+   private IParserNode parseMultiplicativeExpression() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.MULTIPLICATION,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseUnaryExpression() );
+      while ( tokIs( Operators.TIMES )
+            || tokIs( Operators.SLASH ) || tokIs( Operators.MODULO ) )
+      {
+         result.addChild( Node.create( NodeKind.OP,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       tok.getText() ) );
+         nextToken( true );
+         result.addChild( parseUnaryExpression() );
+      }
+      return result.numChildren() > 1 ? result
+                                     : result.getChild( 0 );
+   }
+
+   private String parseNamespaceName() throws TokenException
+   {
+      final String name = tok.getText();
+      nextToken(); // simple name for now
+      return name;
+   }
+
+   private Node parseNameTypeInit() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.NAME_TYPE_INIT,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      result.addChild( NodeKind.NAME,
+                       tok.getLine(),
+                       tok.getColumn(),
+                       tok.getText() );
+      nextToken( true ); // name
+      result.addChild( parseOptionalType() );
+      result.addChild( parseOptionalInit() );
+      return result;
+   }
+
+   private Node parseNewExpression() throws TokenException
+   {
+      consume( KeyWords.NEW );
+
+      final Node result = Node.create( NodeKind.NEW,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      result.addChild( parseExpression() ); // name
+      if ( tokIs( Operators.VECTOR_START ) )
+      {
+         result.addChild( Node.create( NodeKind.VECTOR,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseVector() ) );
+      }
+      if ( tokIs( Operators.LEFT_PARENTHESIS ) )
+      {
+         result.addChild( parseArgumentList() );
+      }
+      return result;
+   }
+
+   /**
+    * tok is {
+    */
+   private Node parseObjectLiteral() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.OBJECT,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      consume( Operators.LEFT_CURLY_BRACKET );
+      while ( !tokIs( Operators.RIGHT_CURLY_BRACKET ) )
+      {
+         result.addChild( parseObjectLiteralPropertyDeclaration() );
+         skip( Operators.COMMA );
+      }
+      consume( Operators.RIGHT_CURLY_BRACKET );
+      return result;
+   }
+
+   /*
+    * tok is name
+    */
+   private Node parseObjectLiteralPropertyDeclaration() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.PROP,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      final Node name = Node.create( NodeKind.NAME,
+                                     tok.getLine(),
+                                     tok.getColumn(),
+                                     tok.getText() );
+      result.addChild( name );
+      nextToken(); // name
+      consume( Operators.COLUMN );
+      result.addChild( NodeKind.VALUE,
+                       tok.getLine(),
+                       tok.getColumn(),
+                       parseExpression() );
+      return result;
+   }
+
+   /**
+    * if tok is "=" parse the expression otherwise do nothing
+    * 
+    * @return
+    */
+   private Node parseOptionalInit() throws TokenException
+   {
+      Node result = null;
+      if ( tokIs( Operators.EQUAL ) )
+      {
+         nextToken( true );
+         result = Node.create( NodeKind.INIT,
+                               tok.getLine(),
+                               tok.getColumn(),
+                               parseExpression() );
+      }
+      return result;
+   }
+
+   /**
+    * if tok is ":" parse the type otherwise do nothing
+    * 
+    * @return
+    * @throws TokenException
+    */
+   private Node parseOptionalType() throws TokenException
+   {
+      Node result = Node.create( NodeKind.TYPE,
+                                 tok.getLine(),
+                                 tok.getColumn(),
+                                 "" );
+      if ( tokIs( Operators.COLUMN ) )
+      {
+         nextToken( true );
+         result = parseType();
+      }
+      return result;
+   }
+
+   private IParserNode parseOrExpression() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.OR,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseAndExpression() );
+      while ( tokIs( Operators.LOGICAL_OR )
+            || tokIs( Operators.LOGICAL_OR_AS2 ) )
+      {
+         result.addChild( Node.create( NodeKind.OP,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       tok.getText() ) );
+         nextToken( true );
+         result.addChild( parseAndExpression() );
+      }
+      return result.numChildren() > 1 ? result
+                                     : result.getChild( 0 );
+   }
+
+   /**
+    * tok is package
+    * 
+    * @throws UnExpectedTokenException
+    */
+   private Node parsePackage() throws TokenException
+   {
+      consume( KeyWords.PACKAGE );
+
+      final Node result = Node.create( NodeKind.PACKAGE,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      final StringBuffer nameBuffer = new StringBuffer();
+
+      while ( !tokIs( Operators.LEFT_CURLY_BRACKET ) )
+      {
+         nameBuffer.append( tok.getText() );
+         nextToken();
+      }
+      result.addChild( NodeKind.NAME,
+                       tok.getLine(),
+                       tok.getColumn(),
+                       nameBuffer.toString() );
+      consume( Operators.LEFT_CURLY_BRACKET );
+      result.addChild( parsePackageContent() );
+      consume( Operators.RIGHT_CURLY_BRACKET );
+      return result;
+   }
+
+   /**
+    * tok is the name of a parameter or ...
+    */
+   private Node parseParameter() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.PARAMETER,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      if ( tokIs( Operators.REST_PARAMETERS ) )
+      {
+         nextToken( true ); // ...
+         final Node rest = Node.create( NodeKind.REST,
+                                        tok.getLine(),
+                                        tok.getColumn(),
+                                        tok.getText() );
+         nextToken( true ); // rest
+         result.addChild( rest );
+      }
+      else
+      {
+         result.addChild( parseNameTypeInit() );
+      }
+      return result;
+   }
+
+   /**
+    * tok is (
+    * 
+    * @throws TokenException
+    */
+   private Node parseParameterList() throws TokenException
+   {
+      consume( Operators.LEFT_PARENTHESIS );
+
+      final Node result = Node.create( NodeKind.PARAMETER_LIST,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      while ( !tokIs( Operators.RIGHT_PARENTHESIS ) )
+      {
+         result.addChild( parseParameter() );
+         if ( tokIs( Operators.COMMA ) )
+         {
+            nextToken( true );
+         }
+         else
+         {
+            break;
+         }
+      }
+      consume( Operators.RIGHT_PARENTHESIS );
+      return result;
+   }
+
+   /**
+    * tok is first part of the name exit tok is the first token after the name
+    * 
+    * @throws TokenException
+    */
+   private String parseQualifiedName( final boolean skipPackage ) throws TokenException
+   {
+      final StringBuffer buffer = new StringBuffer();
+
+      buffer.append( tok.getText() );
+      nextToken();
+      while ( tokIs( Operators.DOT )
+            || tokIs( Operators.DOUBLE_COLUMN ) )
+      {
+         buffer.append( tok.getText() );
+         nextToken();
+         buffer.append( tok.getText() );
+         nextToken(); // name
+      }
+
+      if ( skipPackage )
+      {
+         return buffer.substring( buffer.lastIndexOf( Operators.DOT.toString() ) + 1 );
+      }
+      return buffer.toString();
+   }
+
+   private IParserNode parseRelationalExpression() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.RELATION,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseShiftExpression() );
+      while ( tokIs( Operators.INFERIOR )
+            || tokIs( Operators.INFERIOR_AS2 ) || tokIs( Operators.INFERIOR_OR_EQUAL )
+            || tokIs( Operators.INFERIOR_OR_EQUAL_AS2 ) || tokIs( Operators.SUPERIOR )
+            || tokIs( Operators.SUPERIOR_AS2 ) || tokIs( Operators.SUPERIOR_OR_EQUAL )
+            || tokIs( Operators.SUPERIOR_OR_EQUAL_AS2 ) || tokIs( KeyWords.IS ) || tokIs( KeyWords.IN )
+            && !isInFor || tokIs( KeyWords.AS ) || tokIs( KeyWords.INSTANCE_OF ) )
+      {
+         if ( !tokIs( KeyWords.AS ) )
+         {
+            result.addChild( Node.create( NodeKind.OP,
+                                          tok.getLine(),
+                                          tok.getColumn(),
+                                          tok.getText() ) );
+         }
+         else
+         {
+            result.addChild( Node.create( NodeKind.AS,
+                                          tok.getLine(),
+                                          tok.getColumn(),
+                                          tok.getText() ) );
+         }
+         nextToken( true );
+         result.addChild( parseShiftExpression() );
+      }
+      return result.numChildren() > 1 ? result
+                                     : result.getChild( 0 );
+   }
+
+   private IParserNode parseReturnStatement() throws TokenException
+   {
+      Node result;
+
+      nextTokenAllowNewLine();
+      if ( tokIs( NEW_LINE )
+            || tokIs( Operators.SEMI_COLUMN ) )
+      {
+         nextToken( true );
+         result = Node.create( NodeKind.RETURN,
+                               tok.getLine(),
+                               tok.getColumn(),
+                               "" );
+      }
+      else
+      {
+         result = Node.create( NodeKind.RETURN,
+                               tok.getLine(),
+                               tok.getColumn(),
+                               parseExpression() );
+         skip( Operators.SEMI_COLUMN );
+      }
+      return result;
+   }
+
+   private IParserNode parseShiftExpression() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.SHIFT,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseAdditiveExpression() );
+      while ( tokIs( Operators.DOUBLE_SHIFT_LEFT )
+            || tokIs( Operators.TRIPLE_SHIFT_LEFT ) || tokIs( Operators.DOUBLE_SHIFT_RIGHT )
+            || tokIs( Operators.TRIPLE_SHIFT_RIGHT ) )
+      {
+         result.addChild( Node.create( NodeKind.OP,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       tok.getText() ) );
+         nextToken( true );
+         result.addChild( parseAdditiveExpression() );
+      }
+      return result.numChildren() > 1 ? result
+                                     : result.getChild( 0 );
+   }
+
+   /**
+    * tok is switch
+    * 
+    * @throws TokenException
+    */
+   private Node parseSwitch() throws TokenException
+   {
+      consume( KeyWords.SWITCH );
+      final Node result = Node.create( NodeKind.SWITCH,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseCondition() );
+      if ( tokIs( Operators.LEFT_CURLY_BRACKET ) )
+      {
+         nextToken();
+         result.addChild( parseSwitchCases() );
+         consume( Operators.RIGHT_CURLY_BRACKET );
+      }
+      return result;
+   }
+
+   /**
+    * tok is case, default or the first token of the first statement
+    * 
+    * @throws TokenException
+    */
+   private Node parseSwitchBlock() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.SWITCH_BLOCK,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      while ( !tokIs( KeyWords.CASE )
+            && !tokIs( KeyWords.DEFAULT ) && !tokIs( Operators.RIGHT_CURLY_BRACKET ) )
+      {
+         result.addChild( parseStatement() );
+      }
+      return result;
+   }
+
+   /**
+    * tok is { exit tok is }
+    * 
+    * @throws TokenException
+    */
+   private Node parseSwitchCases() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.CASES,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      for ( ;; )
+      {
+         if ( tokIs( Operators.RIGHT_CURLY_BRACKET ) )
+         {
+            break;
+         }
+         else if ( tokIs( KeyWords.CASE ) )
+         {
+            nextToken( true ); // case
+            final Node caseNode = Node.create( NodeKind.CASE,
+                                               tok.getLine(),
+                                               tok.getColumn(),
+                                               parseExpression() );
+            consume( Operators.COLUMN );
+            caseNode.addChild( parseSwitchBlock() );
+            result.addChild( caseNode );
+         }
+         else if ( tokIs( KeyWords.DEFAULT ) )
+         {
+            nextToken( true ); // default
+            consume( Operators.COLUMN );
+            final Node caseNode = Node.create( NodeKind.CASE,
+                                               tok.getLine(),
+                                               tok.getColumn(),
+                                               Node.create( NodeKind.DEFAULT,
+                                                            tok.getLine(),
+                                                            tok.getColumn(),
+                                                            KeyWords.DEFAULT.toString() ) );
+            caseNode.addChild( parseSwitchBlock() );
+            result.addChild( caseNode );
+         }
+      }
+      return result;
+   }
+
+   /**
+    * tok is ( for( var x : int = 0; i < length; i++ ) for( var s : String in
+    * Object )
+    * 
+    * @throws TokenException
+    */
+   private Node parseTraditionalFor() throws TokenException
+   {
+      consume( Operators.LEFT_PARENTHESIS );
+
+      final Node result = Node.create( NodeKind.FOR,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      if ( !tokIs( Operators.SEMI_COLUMN ) )
+      {
+         if ( tokIs( KeyWords.VAR ) )
+         {
+            result.addChild( NodeKind.INIT,
+                             tok.getLine(),
+                             tok.getColumn(),
+                             parseVarList( null,
+                                           null ) );
+         }
+         else
+         {
+            isInFor = true;
+            result.addChild( NodeKind.INIT,
+                             tok.getLine(),
+                             tok.getColumn(),
+                             parseExpression() );
+            isInFor = false;
+         }
+         if ( tokIs( NodeKind.IN.toString() ) )
+         {
+            return parseForIn( result );
+         }
+      }
+      consume( Operators.SEMI_COLUMN );
+      if ( !tokIs( Operators.SEMI_COLUMN ) )
+      {
+         result.addChild( NodeKind.COND,
+                          tok.getLine(),
+                          tok.getColumn(),
+                          parseExpression() );
+      }
+      consume( Operators.SEMI_COLUMN );
+      if ( !tokIs( Operators.RIGHT_PARENTHESIS ) )
+      {
+         result.addChild( NodeKind.ITER,
+                          tok.getLine(),
+                          tok.getColumn(),
+                          parseExpressionList() );
+      }
+      consume( Operators.RIGHT_PARENTHESIS );
+      result.addChild( parseStatement() );
+      return result;
+   }
+
+   private Node parseTry() throws TokenException
+   {
+      Node result;
+      nextToken( true );
+      result = Node.create( NodeKind.TRY,
+                            tok.getLine(),
+                            tok.getColumn(),
+                            parseBlock() );
+      return result;
+   }
+
+   private Node parseType() throws TokenException
+   {
+      Node result;
+      if ( tok.getText().equals( VECTOR ) )
+      {
+         result = parseVector();
+      }
+      else
+      {
+         result = Node.create( NodeKind.TYPE,
+                               tok.getLine(),
+                               tok.getColumn(),
+                               parseQualifiedName( true ) );
+         // nextToken( true );
+      }
+      return result;
+   }
+
+   private Node parseUnaryExpressionNotPlusMinus() throws TokenException
+   {
+      Node result;
+      if ( tokIs( KeyWords.DELETE ) )
+      {
+         nextToken( true );
+         result = Node.create( NodeKind.DELETE,
+                               tok.getLine(),
+                               tok.getColumn(),
+                               parseExpression() );
+      }
+      else if ( tokIs( KeyWords.VOID ) )
+      {
+         nextToken( true );
+         result = Node.create( NodeKind.VOID,
+                               tok.getLine(),
+                               tok.getColumn(),
+                               parseExpression() );
+      }
+      else if ( tokIs( KeyWords.TYPEOF ) )
+      {
+         nextToken( true );
+         result = Node.create( NodeKind.TYPEOF,
+                               tok.getLine(),
+                               tok.getColumn(),
+                               parseExpression() );
+      }
+      else if ( tokIs( "!" )
+            || tokIs( "not" ) )
+      {
+         nextToken( true );
+         result = Node.create( NodeKind.NOT,
+                               tok.getLine(),
+                               tok.getColumn(),
+                               parseExpression() );
+      }
+      else if ( tokIs( "~" ) )
+      {
+         nextToken( true );
+         result = Node.create( NodeKind.B_NOT,
+                               tok.getLine(),
+                               tok.getColumn(),
+                               parseExpression() );
+      }
+      else
+      {
+         result = parseUnaryPostfixExpression();
+      }
+      return result;
+   }
+
+   private Node parseUnaryPostfixExpression() throws TokenException
+   {
+      Node node = parsePrimaryExpression();
+
+      if ( tokIs( Operators.LEFT_SQUARE_BRACKET ) )
+      {
+         node = parseArrayAccessor( node );
+      }
+      else if ( tokIs( Operators.LEFT_PARENTHESIS ) )
+      {
+         node = parseFunctionCall( node );
+      }
+      if ( tokIs( Operators.INCREMENT ) )
+      {
+         node = parseIncrement( node );
+      }
+      else if ( tokIs( Operators.DECREMENT ) )
+      {
+         node = parseDecrement( node );
+      }
+      else if ( tokIs( Operators.DOT )
+            || tokIs( Operators.DOUBLE_COLUMN ) )
+      {
+         node = parseDot( node );
+      }
+      return node;
+   }
+
+   private Node parseUse() throws TokenException
+   {
+      consume( KeyWords.USE );
+      consume( KeyWords.NAMESPACE );
+      final Node result = Node.create( NodeKind.USE,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       parseNamespaceName() );
+      skip( Operators.SEMI_COLUMN );
+      return result;
+   }
+
+   private Node parseVar() throws TokenException
+   {
+      Node result;
+      result = parseVarList( null,
+                             null );
+      skip( Operators.SEMI_COLUMN );
+      return result;
+   }
+
+   /**
+    * tok is var var x, y : String, z : int = 0;
+    * 
+    * @param modifiers
+    * @param meta
+    * @throws TokenException
+    */
+   private Node parseVarList( final List< Node > meta,
+                              final List< Token > modifiers ) throws TokenException
+   {
+      consume( KeyWords.VAR );
+      final Node result = Node.create( NodeKind.VAR_LIST,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      result.addChild( convertMeta( meta ) );
+      result.addChild( convertModifiers( modifiers ) );
+      collectVarListContent( result );
+      return result;
+   }
+
+   private Node parseVector() throws TokenException
+   {
+      final Node result = Node.create( NodeKind.VECTOR,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       "" );
+      if ( tok.getText().compareTo( "Vector" ) == 0 )
+      {
+         nextToken();
+      }
+      consume( Operators.VECTOR_START );
+
+      result.addChild( parseType() );
+
+      consume( Operators.SUPERIOR );
+
+      return result;
+   }
+
+   /**
+    * tok is while
+    * 
+    * @throws TokenException
+    */
+   private Node parseWhile() throws TokenException
+   {
+      consume( KeyWords.WHILE );
+      final Node result = Node.create( NodeKind.WHILE,
+                                       tok.getLine(),
+                                       tok.getColumn() );
+      result.addChild( parseCondition() );
+      result.addChild( parseStatement() );
+      return result;
+   }
+
+   private void setFileName( final String fileNameToParse )
+   {
+      fileName = fileNameToParse;
+   }
+
+   private void skip( final Operators operator ) throws TokenException
+   {
+      skip( operator.toString() );
+   }
+
+   /**
+    * Skip the current token, if it equals to the parameter
+    * 
+    * @param text
+    * @throws UnExpectedTokenException
+    */
+   private void skip( final String text ) throws TokenException
+   {
+      if ( tokIs( text ) )
+      {
+         nextToken();
+      }
+   }
+
+   private boolean tokIs( final KeyWords keyword )
+   {
+      return tok.getText().compareTo( keyword.toString() ) == 0;
+   }
+
+   private boolean tokIs( final Operators operator )
+   {
+      return tok.getText().compareTo( operator.toString() ) == 0;
+   }
+
+   /**
+    * Compare the current token to the parameter
+    * 
+    * @param text
+    * @return true, if tok's text property equals the parameter
+    */
+   private boolean tokIs( final String text )
+   {
+      return tok.getText().equals( text );
+   }
+
+   private void tryToParseCommentNode( final Node result,
+                                       final List< Token > modifiers ) throws TokenException
+   {
+      if ( tok.getText().startsWith( ASDOC_COMMENT ) )
+      {
+         currentAsDoc = Node.create( NodeKind.AS_DOC,
+                                     tok.getLine(),
+                                     tok.getColumn(),
+                                     tok.getText() );
+         nextToken();
+      }
+      else if ( tok.getText().startsWith( MULTIPLE_LINES_COMMENT ) )
+      {
+         result.addChild( Node.create( NodeKind.MULTI_LINE_COMMENT,
+                                       tok.getLine(),
+                                       tok.getColumn(),
+                                       tok.getText() ) );
+         nextToken();
+      }
+      else
+      {
+         if ( modifiers != null )
+         {
+            modifiers.add( tok );
+         }
+         nextTokenIgnoringDocumentation();
+      }
+   }
+}


[34/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_selectedUpSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_selectedUpSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_selectedUpSkin.png
new file mode 100644
index 0000000..5381f2a
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_selectedUpSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_upSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_upSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_upSkin.png
new file mode 100644
index 0000000..afa52fa
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_upSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_disabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_disabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_disabledSkin.png
new file mode 100644
index 0000000..2b23fa2
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_disabledSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_downSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_downSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_downSkin.png
new file mode 100644
index 0000000..07fbefe
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_downSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_overSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_overSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_overSkin.png
new file mode 100644
index 0000000..1ab5603
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_overSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_selectedDisabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_selectedDisabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_selectedDisabledSkin.png
new file mode 100644
index 0000000..e6eb55d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_selectedDisabledSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_selectedUpSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_selectedUpSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_selectedUpSkin.png
new file mode 100644
index 0000000..f569735
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_selectedUpSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_upSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_upSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_upSkin.png
new file mode 100644
index 0000000..9594dda
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarLastButton_upSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Button_disabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Button_disabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Button_disabledSkin.png
new file mode 100644
index 0000000..4d1a0f3
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Button_disabledSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Button_downSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Button_downSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Button_downSkin.png
new file mode 100644
index 0000000..029c95f
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Button_downSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Button_overSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Button_overSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Button_overSkin.png
new file mode 100644
index 0000000..b8658c3
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Button_overSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Button_upSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Button_upSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Button_upSkin.png
new file mode 100644
index 0000000..46c1229
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Button_upSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/CursorManager_busyCursor.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/CursorManager_busyCursor.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/CursorManager_busyCursor.png
new file mode 100644
index 0000000..143774a
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/CursorManager_busyCursor.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_borderSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_borderSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_borderSkin.png
new file mode 100644
index 0000000..a57869c
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_borderSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_columnDropIndicatorSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_columnDropIndicatorSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_columnDropIndicatorSkin.png
new file mode 100644
index 0000000..8157023
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_columnDropIndicatorSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_columnResizeSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_columnResizeSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_columnResizeSkin.png
new file mode 100644
index 0000000..584950c
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_columnResizeSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_headerBackgroundSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_headerBackgroundSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_headerBackgroundSkin.png
new file mode 100644
index 0000000..0181c08
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_headerBackgroundSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_headerSeparatorSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_headerSeparatorSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_headerSeparatorSkin.png
new file mode 100644
index 0000000..15ea672
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_headerSeparatorSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_sortArrowSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_sortArrowSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_sortArrowSkin.png
new file mode 100644
index 0000000..6ec3386
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_sortArrowSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_stretchCursor.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_stretchCursor.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_stretchCursor.png
new file mode 100644
index 0000000..c499613
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/DataGrid_stretchCursor.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/FormItem_indicatorSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/FormItem_indicatorSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/FormItem_indicatorSkin.png
new file mode 100644
index 0000000..2ce8753
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/FormItem_indicatorSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollArrowLeft_disabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollArrowLeft_disabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollArrowLeft_disabledSkin.png
new file mode 100644
index 0000000..d60db28
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollArrowLeft_disabledSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollArrowRight_disabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollArrowRight_disabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollArrowRight_disabledSkin.png
new file mode 100644
index 0000000..a0694f2
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollArrowRight_disabledSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_leftArrowDownSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_leftArrowDownSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_leftArrowDownSkin.png
new file mode 100644
index 0000000..cc03ff3
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_leftArrowDownSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_leftArrowOverSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_leftArrowOverSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_leftArrowOverSkin.png
new file mode 100644
index 0000000..d83c9e5
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_leftArrowOverSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_leftArrowUpSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_leftArrowUpSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_leftArrowUpSkin.png
new file mode 100644
index 0000000..d83c9e5
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_leftArrowUpSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_rightArrowDownSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_rightArrowDownSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_rightArrowDownSkin.png
new file mode 100644
index 0000000..cfcf43d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_rightArrowDownSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_rightArrowOverSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_rightArrowOverSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_rightArrowOverSkin.png
new file mode 100644
index 0000000..d15c28b
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_rightArrowOverSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_rightArrowUpSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_rightArrowUpSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_rightArrowUpSkin.png
new file mode 100644
index 0000000..d15c28b
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_rightArrowUpSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_thumbDownSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_thumbDownSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_thumbDownSkin.png
new file mode 100644
index 0000000..7c919a8
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_thumbDownSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_thumbIcon.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_thumbIcon.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_thumbIcon.png
new file mode 100644
index 0000000..bdf6488
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_thumbIcon.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_thumbOverSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_thumbOverSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_thumbOverSkin.png
new file mode 100644
index 0000000..1f65415
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_thumbOverSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_thumbUpSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_thumbUpSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_thumbUpSkin.png
new file mode 100644
index 0000000..b753027
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_thumbUpSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_trackDisabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_trackDisabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_trackDisabledSkin.png
new file mode 100644
index 0000000..ff4659d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_trackDisabledSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_trackSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_trackSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_trackSkin.png
new file mode 100644
index 0000000..44d8cb2
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/HScrollBar_trackSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Panel_borderSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Panel_borderSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Panel_borderSkin.png
new file mode 100644
index 0000000..d53c6bc
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/Panel_borderSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_downArrowDisabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_downArrowDisabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_downArrowDisabledSkin.png
new file mode 100644
index 0000000..546fb36
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_downArrowDisabledSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_downArrowDownSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_downArrowDownSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_downArrowDownSkin.png
new file mode 100644
index 0000000..cc03ff3
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_downArrowDownSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_downArrowOverSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_downArrowOverSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_downArrowOverSkin.png
new file mode 100644
index 0000000..d83c9e5
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_downArrowOverSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_downArrowUpSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_downArrowUpSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_downArrowUpSkin.png
new file mode 100644
index 0000000..d83c9e5
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_downArrowUpSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_thumbDownSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_thumbDownSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_thumbDownSkin.png
new file mode 100644
index 0000000..7c919a8
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_thumbDownSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_thumbIcon.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_thumbIcon.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_thumbIcon.png
new file mode 100644
index 0000000..bdf6488
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_thumbIcon.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_thumbOverSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_thumbOverSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_thumbOverSkin.png
new file mode 100644
index 0000000..88b4b5f
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_thumbOverSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_thumbUpSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_thumbUpSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_thumbUpSkin.png
new file mode 100644
index 0000000..88b4b5f
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_thumbUpSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_trackDisabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_trackDisabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_trackDisabledSkin.png
new file mode 100644
index 0000000..ff4659d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_trackDisabledSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_trackSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_trackSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_trackSkin.png
new file mode 100644
index 0000000..44d8cb2
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_trackSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_upArrowDisabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_upArrowDisabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_upArrowDisabledSkin.png
new file mode 100644
index 0000000..8f59f90
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_upArrowDisabledSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_upArrowDownSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_upArrowDownSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_upArrowDownSkin.png
new file mode 100644
index 0000000..cfcf43d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_upArrowDownSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_upArrowOverSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_upArrowOverSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_upArrowOverSkin.png
new file mode 100644
index 0000000..d15c28b
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_upArrowOverSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_upArrowUpSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_upArrowUpSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_upArrowUpSkin.png
new file mode 100644
index 0000000..d15c28b
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/VScrollBar_upArrowUpSkin.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/pom.xml b/FlexPMD/flex-pmd-flex/pom.xml
new file mode 100644
index 0000000..ec32a55
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/pom.xml
@@ -0,0 +1,123 @@
+<!--
+
+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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+	<artifactId>flex-pmd-flex</artifactId>
+	<packaging>pom</packaging>
+
+	<name>Adobe Flex PMD Flex Parent</name>
+
+	<properties>
+		<flex.version>4.13.0.20140701</flex.version>
+		<flash-player.version>11.1</flash-player.version>
+		<flexunit.version>4.2.0</flexunit.version>
+		<event-source.version>1.1</event-source.version>
+		<!--flexunit-optional.version>0.85</flexunit-optional.version-->
+		<event-source.version>1.1</event-source.version>
+		<cairngorm.version>2.2.1</cairngorm.version>
+		<flexunit-theme.version>1.0</flexunit-theme.version>
+	</properties>
+
+	<modules>
+		<module>flex-pmd-ruleset-creator</module>
+		<module>flex-pmd-violations-viewer</module>
+		<module>flex-pmd-flex-lib</module>
+		<module>flexunit-theme</module>
+	</modules>
+	
+	<build>
+		<sourceDirectory>.</sourceDirectory>
+		<plugins>
+		
+			<plugin>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>flex-pmd-maven-plugin</artifactId>
+				<version>${project.version}</version>
+				<executions>
+					<execution>
+						<phase>package</phase>
+						<goals>
+							<goal>check</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+
+			<plugin>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>flex-pmd-cpd-maven-plugin</artifactId>
+				<version>${project.version}</version>
+				<executions>
+					<execution>
+						<phase>package</phase>
+						<goals>
+							<goal>check</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+
+			<plugin>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>flex-pmd-metrics-maven-plugin</artifactId>
+				<version>${project.version}</version>
+				<executions>
+					<execution>
+						<phase>package</phase>
+						<goals>
+							<goal>check</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			
+		</plugins>
+	</build>
+
+	<reporting>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-report-plugin</artifactId>
+				<version>2.4.3</version>
+				<configuration>
+					<reportsDirectory>surefire-reports</reportsDirectory>
+				</configuration>
+			</plugin>
+
+			<plugin>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>flex-pmd-maven-plugin</artifactId>
+				<version>${project.parent.version}</version>
+				<configuration>
+					<failOnError>true</failOnError>
+				</configuration>
+			</plugin>
+
+		</plugins>
+	</reporting>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-hybrid-parent/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-hybrid-parent/pom.xml b/FlexPMD/flex-pmd-hybrid-parent/pom.xml
deleted file mode 100644
index d41df0d..0000000
--- a/FlexPMD/flex-pmd-hybrid-parent/pom.xml
+++ /dev/null
@@ -1,279 +0,0 @@
-<!--
-
-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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-hybrid-parent</artifactId>
-	<packaging>pom</packaging>
-	<name>Adobe Flex PMD Flex/Java Parent</name>
-	
-	<parent>
-		<groupId>com.adobe.ac</groupId>
-		<artifactId>flex-pmd</artifactId>
-		<version>1.3-SNAPSHOT</version>
-		<relativePath>../flex-pmd-parent/pom.xml</relativePath>
-	</parent>
-	
-	<modules>
-		<module>../flex-pmd-automator-workflow</module>
-		<module>../flex-pmd-bundles</module>
-	</modules>
-
-	<build>
-
-		<pluginManagement>
-			<plugins>
-				<plugin>
-					<groupId>org.apache.maven.plugins</groupId>
-					<artifactId>maven-dependency-plugin</artifactId>
-					<version>${dependency.version}</version>
-				</plugin>
-				<plugin>
-					<groupId>org.apache.maven.plugins</groupId>
-					<artifactId>maven-assembly-plugin</artifactId>
-					<version>${assembly.version}</version>
-				</plugin>
-			</plugins>
-		</pluginManagement>
-
-		<plugins>
-
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-release-plugin</artifactId>
-				<version>${release-plugin.version}</version>
-			</plugin>
-
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<configuration>
-					<source>${compileSource}</source>
-					<target>${compileSource}</target>
-				</configuration>
-			</plugin>
-
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>cobertura-maven-plugin</artifactId>
-				<version>${cobertura.version}</version>
-				<configuration>
-					<format>xml</format>
-				</configuration>
-			</plugin>
-
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>findbugs-maven-plugin</artifactId>
-				<version>${findbugs.version}</version>
-				<configuration>
-					<xmlOutput>true</xmlOutput>
-				</configuration>
-			</plugin>
-
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-checkstyle-plugin</artifactId>
-				<version>${checkstyle.version}</version>
-				<configuration>
-					<configLocation>checkstyle.xml</configLocation>
-				</configuration>
-			</plugin>
-
-			<plugin>
-				<groupId>com.google.code.maven-license-plugin</groupId>
-				<artifactId>maven-license-plugin</artifactId>
-				<version>${license.version}</version>
-				<configuration>
-					<header>../flex-pmd-parent/src/etc/header.txt</header>
-					<includes>
-						<include>**/src/**</include>
-						<include>**/test/**</include>
-					</includes>
-					<excludes>
-						<exclude>**/Simple.as</exclude>
-						<exclude>**/Empty.*</exclude>
-						<exclude>**/Version.as</exclude>
-						<exclude>**/FlexPMD60.as</exclude>
-						<exclude>**/header.txt</exclude>
-						<exclude>**/MainWithNoCopyright.mxml</exclude>
-					</excludes>
-					<aggregate>true</aggregate>
-					<properties>
-						<year>${project.inceptionYear}</year>
-						<company>${project.organization.name}</company>
-					</properties>
-					<mapping>
-						<mxml>XML_STYLE</mxml>
-						<xsl>XML_STYLE</xsl>
-						<as>JAVADOC_STYLE</as>
-					</mapping>
-				</configuration>
-				<executions>
-					<execution>
-						<phase>package</phase>
-						<goals>
-							<goal>check</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-
-	</build>
-
-	<repositories>
-		<repository>
-			<id>maven2-repository.dev.java.net</id>
-			<name>Java.net Repository for Maven</name>
-			<url>http://download.java.net/maven/2/</url>
-		</repository>
-		<repository>
-			<id>central</id>
-			<name>maven-central</name>
-			<url>http://repo1.maven.org/maven2</url>
-			<releases>
-				<enabled>true</enabled>
-			</releases>
-			<snapshots>
-				<enabled>false</enabled>
-			</snapshots>
-		</repository>
-		<repository>
-			<id>dist.codehaus.org</id>
-			<layout>legacy</layout>
-			<url>http://dist.codehaus.org/</url>
-		</repository>
-		<repository>
-			<id>apache</id>
-			<name>Apache repository</name>
-			<layout>legacy</layout>
-			<url>http://cvs.apache.org/repository/</url>
-		</repository>
-		<repository>
-			<id>flex-mojos</id>
-			<url>http://repository.sonatype.org/content/groups/flexgroup</url>
-			<snapshots>
-				<enabled>false</enabled>
-				<checksumPolicy>ignore</checksumPolicy>
-			</snapshots>
-			<releases>
-				<enabled>true</enabled>
-				<checksumPolicy>ignore</checksumPolicy>
-			</releases>
-		</repository>
-	</repositories>
-
-	<pluginRepositories>
-		<pluginRepository>
-			<id>dist.codehaus.org</id>
-			<releases>
-				<enabled>true</enabled>
-			</releases>
-			<snapshots>
-				<enabled>true</enabled>
-			</snapshots>
-			<name>XDoclet central repository on codehaus</name>
-			<url>http://dist.codehaus.org</url>
-			<layout>legacy</layout>
-		</pluginRepository>
-		<pluginRepository>
-			<id>repository.codehaus.org</id>
-			<releases>
-				<enabled>true</enabled>
-			</releases>
-			<snapshots>
-				<enabled>true</enabled>
-			</snapshots>
-			<name>Central repository on codehaus</name>
-			<url>http://repository.codehaus.org</url>
-		</pluginRepository>
-		<pluginRepository>
-			<id>mc-release</id>
-			<name>Local Maven repository of releases</name>
-			<url>http://mc-repo.googlecode.com/svn/maven2/releases</url>
-			<snapshots>
-				<enabled>false</enabled>
-			</snapshots>
-			<releases>
-				<enabled>true</enabled>
-			</releases>
-		</pluginRepository>
-	</pluginRepositories>
-
-	<reporting>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-site-plugin</artifactId>
-				<version>2.0-beta-5</version>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-project-info-reports-plugin</artifactId>
-				<version>2.1.1</version>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-surefire-report-plugin</artifactId>
-				<inherited>true</inherited>
-				<version>2.4.3</version>
-			</plugin>
-			<plugin>
-				<artifactId>maven-pmd-plugin</artifactId>
-				<version>${maven-pmd-plugin.version}</version>
-				<configuration>
-					<linkXref>true</linkXref>
-					<minimumTokens>100</minimumTokens>
-					<targetJdk>${compileSource}</targetJdk>
-					<rulesets>
-						<ruleset>pmd.xml</ruleset>
-					</rulesets>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>javancss-maven-plugin</artifactId>
-				<version>2.0-beta-2</version>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-javadoc-plugin</artifactId>
-				<version>2.5</version>
-			</plugin>
-		</plugins>
-	</reporting>
-	
-	<profiles>
-		<profile>
-			<id>hudson</id>
-			<distributionManagement>
-				<repository>
-					<id>txi_releases</id>
-					<url>http://txici.can.adobe.com:9999/nexus/content/repositories/txi</url>
-				</repository>
-				<snapshotRepository>
-					<id>txi_snapshot</id>
-					<url>http://txici.can.adobe.com:9999/nexus/content/repositories/txi_snapshots/</url>
-				</snapshotRepository>
-			</distributionManagement>
-		</profile>
-	</profiles>
-	
-</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-hybrid/flex-pmd-automator/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-hybrid/flex-pmd-automator/pom.xml b/FlexPMD/flex-pmd-hybrid/flex-pmd-automator/pom.xml
new file mode 100644
index 0000000..e77fa41
--- /dev/null
+++ b/FlexPMD/flex-pmd-hybrid/flex-pmd-automator/pom.xml
@@ -0,0 +1,56 @@
+<!--
+
+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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>flex-pmd-hybrid</artifactId>
+        <groupId>org.apache.flex.pmd</groupId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+	<artifactId>flex-pmd-automator</artifactId>
+	<packaging>pom</packaging>
+
+	<name>Adobe Flex PMD Mac OSX Automator workflow</name>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-assembly-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>bundle-automator-workflow</id>
+						<goals>
+							<goal>single</goal>
+						</goals>
+						<phase>install</phase>
+						<configuration>
+							<descriptors>
+								<descriptor>src/main/assembly/workflow.xml</descriptor>
+							</descriptors>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-hybrid/flex-pmd-automator/src/main/assembly/workflow.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-hybrid/flex-pmd-automator/src/main/assembly/workflow.xml b/FlexPMD/flex-pmd-hybrid/flex-pmd-automator/src/main/assembly/workflow.xml
new file mode 100644
index 0000000..a7cf1e3
--- /dev/null
+++ b/FlexPMD/flex-pmd-hybrid/flex-pmd-automator/src/main/assembly/workflow.xml
@@ -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.
+
+-->
+<assembly>
+    <id>workflow</id>
+    <formats>
+        <format>zip</format>
+    </formats>
+    <includeBaseDirectory>false</includeBaseDirectory>
+    <fileSets>
+        <fileSet>
+            <directory>src/main/automator</directory>
+            <outputDirectory></outputDirectory>
+        </fileSet>
+        <fileSet>
+        	<directory>../flex-pmd-command-line/target/release</directory>
+            <outputDirectory>command-line</outputDirectory>
+        </fileSet>
+        <fileSet>
+        	<directory>../flex-pmd-violations-viewer/target</directory>
+            <outputDirectory>violations-viewer</outputDirectory>
+            <excludes>
+            	<exclude>**/*.xml</exclude>
+            	<exclude>classes</exclude>
+            	<exclude>css</exclude>
+            	<exclude>images</exclude>
+            	<exclude>site</exclude>
+            </excludes>
+        </fileSet>
+    </fileSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-hybrid/flex-pmd-automator/src/main/automator/run.FlexPMD.workflow/Contents/QuickLook/Preview.pdf
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-hybrid/flex-pmd-automator/src/main/automator/run.FlexPMD.workflow/Contents/QuickLook/Preview.pdf b/FlexPMD/flex-pmd-hybrid/flex-pmd-automator/src/main/automator/run.FlexPMD.workflow/Contents/QuickLook/Preview.pdf
new file mode 100644
index 0000000..aded733
Binary files /dev/null and b/FlexPMD/flex-pmd-hybrid/flex-pmd-automator/src/main/automator/run.FlexPMD.workflow/Contents/QuickLook/Preview.pdf differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-hybrid/flex-pmd-automator/src/main/automator/run.FlexPMD.workflow/Contents/document.wflow
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-hybrid/flex-pmd-automator/src/main/automator/run.FlexPMD.workflow/Contents/document.wflow b/FlexPMD/flex-pmd-hybrid/flex-pmd-automator/src/main/automator/run.FlexPMD.workflow/Contents/document.wflow
new file mode 100644
index 0000000..462d407
--- /dev/null
+++ b/FlexPMD/flex-pmd-hybrid/flex-pmd-automator/src/main/automator/run.FlexPMD.workflow/Contents/document.wflow
@@ -0,0 +1,545 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>AMApplicationBuild</key>
+	<string>153</string>
+	<key>AMApplicationVersion</key>
+	<string>2.0</string>
+	<key>AMDocumentVersion</key>
+	<string>2</string>
+	<key>actions</key>
+	<array>
+		<dict>
+			<key>action</key>
+			<dict>
+				<key>AMAccepts</key>
+				<dict>
+					<key>Container</key>
+					<string>List</string>
+					<key>Optional</key>
+					<true/>
+					<key>Types</key>
+					<array>
+						<string>com.apple.applescript.alias-object</string>
+					</array>
+				</dict>
+				<key>AMActionVersion</key>
+				<string>1.1</string>
+				<key>AMParameterProperties</key>
+				<dict>
+					<key>defaultLocation</key>
+					<dict>
+						<key>isPathPopUp</key>
+						<true/>
+						<key>variableUUIDsInMenu</key>
+						<array/>
+					</dict>
+					<key>granularity</key>
+					<dict/>
+					<key>multipleSelection</key>
+					<dict/>
+					<key>promptMessage</key>
+					<dict>
+						<key>tokenizedValue</key>
+						<array>
+							<string>Choose a source folder for executing FlexPMD against</string>
+						</array>
+					</dict>
+				</dict>
+				<key>AMProvides</key>
+				<dict>
+					<key>Container</key>
+					<string>List</string>
+					<key>Types</key>
+					<array>
+						<string>com.apple.applescript.alias-object</string>
+					</array>
+				</dict>
+				<key>ActionBundlePath</key>
+				<string>/System/Library/Automator/Ask for Finder Items.action</string>
+				<key>ActionName</key>
+				<string>Ask for Finder Items</string>
+				<key>ActionParameters</key>
+				<dict>
+					<key>defaultLocation</key>
+					<string>~</string>
+					<key>granularity</key>
+					<integer>1</integer>
+					<key>multipleSelection</key>
+					<false/>
+					<key>promptMessage</key>
+					<string>Choose a source folder for executing FlexPMD against</string>
+				</dict>
+				<key>Application</key>
+				<array>
+					<string>Finder</string>
+				</array>
+				<key>BundleIdentifier</key>
+				<string>com.apple.Automator.AskForFinderItems</string>
+				<key>CFBundleVersion</key>
+				<string>1.1</string>
+				<key>CanShowSelectedItemsWhenRun</key>
+				<true/>
+				<key>CanShowWhenRun</key>
+				<false/>
+				<key>Category</key>
+				<array>
+					<string>AMCategoryFilesAndFolders</string>
+				</array>
+				<key>Class Name</key>
+				<string>AMAppleScriptAction</string>
+				<key>InputUUID</key>
+				<string>048C977D-98A1-423E-8435-0D294C8AEACB</string>
+				<key>Keywords</key>
+				<array>
+					<string>Find</string>
+					<string>Item</string>
+					<string>File</string>
+					<string>Folder</string>
+					<string>Ask</string>
+					<string>Choose</string>
+					<string>Prompt</string>
+				</array>
+				<key>OutputUUID</key>
+				<string>85D7C03F-8983-4BF2-83C6-7DF3F3838515</string>
+				<key>StartAction</key>
+				<false/>
+				<key>UUID</key>
+				<string>B38DA4F4-3B0A-479A-8996-6FEFB5CE76DE</string>
+				<key>UnlocalizedApplications</key>
+				<array>
+					<string>Finder</string>
+				</array>
+				<key>arguments</key>
+				<dict>
+					<key>0</key>
+					<dict>
+						<key>default value</key>
+						<string>~/Desktop</string>
+						<key>name</key>
+						<string>defaultLocation</string>
+						<key>required</key>
+						<string>0</string>
+						<key>type</key>
+						<string>0</string>
+						<key>uuid</key>
+						<string>0</string>
+					</dict>
+					<key>1</key>
+					<dict>
+						<key>default value</key>
+						<false/>
+						<key>name</key>
+						<string>multipleSelection</string>
+						<key>required</key>
+						<string>0</string>
+						<key>type</key>
+						<string>0</string>
+						<key>uuid</key>
+						<string>1</string>
+					</dict>
+					<key>2</key>
+					<dict>
+						<key>default value</key>
+						<string>Choose a Finder Item:</string>
+						<key>name</key>
+						<string>promptMessage</string>
+						<key>required</key>
+						<string>0</string>
+						<key>type</key>
+						<string>0</string>
+						<key>uuid</key>
+						<string>2</string>
+					</dict>
+					<key>3</key>
+					<dict>
+						<key>default value</key>
+						<integer>0</integer>
+						<key>name</key>
+						<string>granularity</string>
+						<key>required</key>
+						<string>0</string>
+						<key>type</key>
+						<string>0</string>
+						<key>uuid</key>
+						<string>3</string>
+					</dict>
+				</dict>
+				<key>isViewVisible</key>
+				<true/>
+				<key>location</key>
+				<string>457.500000:586.000000</string>
+				<key>nibPath</key>
+				<string>/System/Library/Automator/Ask for Finder Items.action/Contents/Resources/English.lproj/main.nib</string>
+			</dict>
+			<key>isViewVisible</key>
+			<true/>
+		</dict>
+		<dict>
+			<key>action</key>
+			<dict>
+				<key>AMAccepts</key>
+				<dict>
+					<key>Container</key>
+					<string>List</string>
+					<key>Optional</key>
+					<true/>
+					<key>Types</key>
+					<array>
+						<string>com.apple.cocoa.string</string>
+					</array>
+				</dict>
+				<key>AMActionVersion</key>
+				<string>2.0.1</string>
+				<key>AMParameterProperties</key>
+				<dict>
+					<key>COMMAND_STRING</key>
+					<dict/>
+					<key>CheckedForUserDefaultShell</key>
+					<dict/>
+					<key>inputMethod</key>
+					<dict/>
+					<key>shell</key>
+					<dict/>
+					<key>source</key>
+					<dict/>
+				</dict>
+				<key>AMProvides</key>
+				<dict>
+					<key>Container</key>
+					<string>List</string>
+					<key>Types</key>
+					<array>
+						<string>com.apple.cocoa.string</string>
+					</array>
+				</dict>
+				<key>ActionBundlePath</key>
+				<string>/System/Library/Automator/Run Shell Script.action</string>
+				<key>ActionName</key>
+				<string>Run Shell Script</string>
+				<key>ActionParameters</key>
+				<dict>
+					<key>COMMAND_STRING</key>
+					<string>#####################
+#  Script Variables #
+#####################
+
+#
+# The FlexPMD version
+#
+flexPmdVersion=1.0.RC3
+
+#
+# The directory where the FlexPMD automator workflow has been extracted
+#
+flexPmdWorkflowLocation="/Users/xagnetti/Work/repositories/opensource.adobe/flexpmd/trunk/flex-pmd-automator-workflow/target/flex-pmd-automator-${flexPmdVersion}-workflow"
+
+#
+# The directory where the FlexPMD command line client is stored
+#
+flexPmdCommandLineDirectory=${flexPmdWorkflowLocation}/command-line
+
+#
+# The directory where the FlexPMD violations viewer application is stored
+#
+viewerDirectory=${flexPmdWorkflowLocation}/violations-viewer
+
+#
+# The temporary directory where files are stored by the script
+#
+tmpDirectory=~/flexpmd
+
+
+#####################
+#    Script Core    #
+#####################
+
+tmpSourceDirectory=${tmpDirectory}/sourceDirectory
+resultDirectory=${tmpDirectory}
+tmpStdout=${tmpDirectory}/stdout
+tmpStderr=${tmpDirectory}/stderr
+
+rm -rf ${tmpDirectory}
+mkdir ${tmpDirectory}
+rm ${tmpSourceDirectory}
+rm ${resultDirectory}/pmd.xml
+rm ${tmpStderr}
+rm ${tmpStdout}
+
+cat &gt; ${tmpSourceDirectory}
+
+sourceDirectory=`cat ${tmpSourceDirectory}`
+
+cd ${flexPmdCommandLineDirectory}
+
+java -jar flex-pmd-command-line-${flexPmdVersion}.jar -s "${sourceDirectory}" -o ${resultDirectory} &gt; ${tmpStdout} 2&gt; ${tmpStderr}
+
+report=${resultDirectory}/pmd.xml
+
+echo file://${viewerDirectory}/flex-pmd-violations-viewer-${flexPmdVersion}.html?report=$report
+</string>
+					<key>CheckedForUserDefaultShell</key>
+					<true/>
+					<key>inputMethod</key>
+					<integer>0</integer>
+					<key>shell</key>
+					<string>/bin/bash</string>
+					<key>source</key>
+					<string></string>
+				</dict>
+				<key>Application</key>
+				<array>
+					<string>Automator</string>
+				</array>
+				<key>BundleIdentifier</key>
+				<string>com.apple.RunShellScript</string>
+				<key>CFBundleVersion</key>
+				<string>2.0.1</string>
+				<key>CanShowSelectedItemsWhenRun</key>
+				<false/>
+				<key>CanShowWhenRun</key>
+				<true/>
+				<key>Category</key>
+				<array>
+					<string>AMCategoryUtilities</string>
+				</array>
+				<key>Class Name</key>
+				<string>RunShellScriptAction</string>
+				<key>InputUUID</key>
+				<string>403A6D3E-FD99-4B71-8D42-C1C2E54807E3</string>
+				<key>Keywords</key>
+				<array>
+					<string>Shell</string>
+					<string>Script</string>
+					<string>Command</string>
+					<string>Run</string>
+					<string>Unix</string>
+				</array>
+				<key>OutputUUID</key>
+				<string>457C1F3B-569E-467A-95C7-DAFC85801AD5</string>
+				<key>ShowWhenRun</key>
+				<false/>
+				<key>UUID</key>
+				<string>7F7B8E52-6DD4-47FA-AF9D-74246B8DFA1A</string>
+				<key>UnlocalizedApplications</key>
+				<array>
+					<string>Automator</string>
+				</array>
+				<key>arguments</key>
+				<dict>
+					<key>0</key>
+					<dict>
+						<key>default value</key>
+						<integer>0</integer>
+						<key>name</key>
+						<string>inputMethod</string>
+						<key>required</key>
+						<string>0</string>
+						<key>type</key>
+						<string>0</string>
+						<key>uuid</key>
+						<string>0</string>
+					</dict>
+					<key>1</key>
+					<dict>
+						<key>default value</key>
+						<string>/bin/sh</string>
+						<key>name</key>
+						<string>shell</string>
+						<key>required</key>
+						<string>0</string>
+						<key>type</key>
+						<string>0</string>
+						<key>uuid</key>
+						<string>1</string>
+					</dict>
+					<key>2</key>
+					<dict>
+						<key>default value</key>
+						<string></string>
+						<key>name</key>
+						<string>source</string>
+						<key>required</key>
+						<string>0</string>
+						<key>type</key>
+						<string>0</string>
+						<key>uuid</key>
+						<string>2</string>
+					</dict>
+					<key>3</key>
+					<dict>
+						<key>default value</key>
+						<string></string>
+						<key>name</key>
+						<string>COMMAND_STRING</string>
+						<key>required</key>
+						<string>0</string>
+						<key>type</key>
+						<string>0</string>
+						<key>uuid</key>
+						<string>3</string>
+					</dict>
+					<key>4</key>
+					<dict>
+						<key>default value</key>
+						<false/>
+						<key>name</key>
+						<string>CheckedForUserDefaultShell</string>
+						<key>required</key>
+						<string>0</string>
+						<key>type</key>
+						<string>0</string>
+						<key>uuid</key>
+						<string>4</string>
+					</dict>
+				</dict>
+				<key>isViewVisible</key>
+				<true/>
+				<key>location</key>
+				<string>457.500000:431.000000</string>
+				<key>nibPath</key>
+				<string>/System/Library/Automator/Run Shell Script.action/Contents/Resources/English.lproj/main.nib</string>
+			</dict>
+			<key>isViewVisible</key>
+			<true/>
+		</dict>
+		<dict>
+			<key>action</key>
+			<dict>
+				<key>AMAccepts</key>
+				<dict>
+					<key>Container</key>
+					<string>List</string>
+					<key>Optional</key>
+					<false/>
+					<key>Types</key>
+					<array>
+						<string>com.apple.cocoa.url</string>
+					</array>
+				</dict>
+				<key>AMActionVersion</key>
+				<string>1.0</string>
+				<key>AMParameterProperties</key>
+				<dict/>
+				<key>AMProvides</key>
+				<dict>
+					<key>Container</key>
+					<string>List</string>
+					<key>Types</key>
+					<array>
+						<string>com.apple.cocoa.url</string>
+					</array>
+				</dict>
+				<key>AMRequiredResources</key>
+				<array/>
+				<key>ActionBundlePath</key>
+				<string>/System/Library/Automator/Display Webpages 2.action</string>
+				<key>ActionName</key>
+				<string>Display Webpages</string>
+				<key>ActionParameters</key>
+				<dict/>
+				<key>Application</key>
+				<array>
+					<string>Safari</string>
+				</array>
+				<key>BundleIdentifier</key>
+				<string>com.apple.Automator.Display_Webpages</string>
+				<key>CFBundleVersion</key>
+				<string>1.0</string>
+				<key>CanShowSelectedItemsWhenRun</key>
+				<false/>
+				<key>CanShowWhenRun</key>
+				<false/>
+				<key>Category</key>
+				<array>
+					<string>AMCategoryInternet</string>
+				</array>
+				<key>Class Name</key>
+				<string>Display_Webpages</string>
+				<key>InputUUID</key>
+				<string>84EA6E4D-9337-4CF6-9976-60DA2E4DB5FC</string>
+				<key>Keywords</key>
+				<array>
+					<string>URL</string>
+					<string>Web</string>
+					<string>Display</string>
+					<string>Open</string>
+					<string>Show</string>
+				</array>
+				<key>OutputUUID</key>
+				<string>8F04C323-3143-449D-8C71-0C5CACC0C875</string>
+				<key>UUID</key>
+				<string>89B93EE5-8B2B-48D4-B0D9-1AC49BB0AA6D</string>
+				<key>UnlocalizedApplications</key>
+				<array>
+					<string>Safari</string>
+				</array>
+				<key>arguments</key>
+				<dict/>
+			</dict>
+		</dict>
+	</array>
+	<key>connectors</key>
+	<dict>
+		<key>073CDD95-EB15-47E3-AE4D-9667F1C01ECF</key>
+		<dict>
+			<key>from</key>
+			<string>B38DA4F4-3B0A-479A-8996-6FEFB5CE76DE - B38DA4F4-3B0A-479A-8996-6FEFB5CE76DE</string>
+			<key>to</key>
+			<string>7F7B8E52-6DD4-47FA-AF9D-74246B8DFA1A - 7F7B8E52-6DD4-47FA-AF9D-74246B8DFA1A</string>
+		</dict>
+		<key>56A224D4-DCA7-469A-974D-DAAAFF5B5871</key>
+		<dict>
+			<key>from</key>
+			<string>7F7B8E52-6DD4-47FA-AF9D-74246B8DFA1A - 7F7B8E52-6DD4-47FA-AF9D-74246B8DFA1A</string>
+			<key>to</key>
+			<string>89B93EE5-8B2B-48D4-B0D9-1AC49BB0AA6D - 89B93EE5-8B2B-48D4-B0D9-1AC49BB0AA6D</string>
+		</dict>
+	</dict>
+	<key>state</key>
+	<dict>
+		<key>EditorSplitViewPosition</key>
+		<real>576</real>
+		<key>MainSplitViewPosition_v2</key>
+		<real>525</real>
+		<key>windowFrame</key>
+		<string>{{0, 51}, {1440, 827}}</string>
+		<key>windowFrameTopLeft</key>
+		<string>{{0, 0}, {1440, 827}}</string>
+		<key>workflowViewScrollPosition</key>
+		<string>{{0, 0}, {915, 576}}</string>
+	</dict>
+	<key>variables</key>
+	<array>
+		<dict>
+			<key>UUID</key>
+			<string>12F77683-5982-4DA7-A149-C34344BC6E5E</string>
+			<key>identifier</key>
+			<string>com.apple.Automator.Variable.Path</string>
+			<key>name</key>
+			<string>New Path</string>
+			<key>value</key>
+			<string>~/Desktop</string>
+		</dict>
+	</array>
+</dict>
+</plist>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-hybrid/flex-pmd-bundles/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-hybrid/flex-pmd-bundles/pom.xml b/FlexPMD/flex-pmd-hybrid/flex-pmd-bundles/pom.xml
new file mode 100644
index 0000000..3f0c9cd
--- /dev/null
+++ b/FlexPMD/flex-pmd-hybrid/flex-pmd-bundles/pom.xml
@@ -0,0 +1,129 @@
+<!--
+
+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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>flex-pmd-hybrid</artifactId>
+        <groupId>org.apache.flex.pmd</groupId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>${project.parent.artifactId}-all-in-one-bundle</artifactId>
+	<packaging>pom</packaging>
+
+    <name>Adobe Flex PMD All-in-one bundle</name>
+
+    <dependencies>
+
+		<dependency>
+			<groupId>com.martiansoftware</groupId>
+			<artifactId>jsap</artifactId>
+			<version>${jsap.version}</version>
+		</dependency>
+		
+		<!-- FlexPMD -->
+	
+		<dependency>
+			<groupId>${project.parent.groupId}</groupId>
+			<artifactId>flex-pmd-ant-task</artifactId>
+			<version>${project.parent.version}</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>${project.parent.groupId}</groupId>
+			<artifactId>flex-pmd-command-line</artifactId>
+			<version>${project.parent.version}</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>${project.parent.groupId}</groupId>
+			<artifactId>flex-pmd-automator-workflow</artifactId>
+			<version>${project.parent.version}</version>
+			<type>pom</type>
+			<scope>compile</scope>
+		</dependency>
+
+		<!-- FlexCPD -->
+
+		<dependency>
+			<groupId>${project.parent.groupId}</groupId>
+			<artifactId>flex-pmd-cpd-ant-task</artifactId>
+			<version>${project.parent.version}</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>${project.parent.groupId}</groupId>
+			<artifactId>flex-pmd-cpd-command-line</artifactId>
+			<version>${project.parent.version}</version>
+			<scope>compile</scope>
+		</dependency>
+
+		<!-- FlexMetrics -->
+		
+	    <dependency>
+			<groupId>${project.parent.groupId}</groupId>
+			<artifactId>flex-pmd-metrics-ant-task</artifactId>
+			<version>${project.parent.version}</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>${project.parent.groupId}</groupId>
+			<artifactId>flex-pmd-metrics-command-line</artifactId>
+			<version>${project.parent.version}</version>
+			<scope>compile</scope>
+		</dependency>
+
+	</dependencies>
+
+	<build>
+		<plugins>
+
+			<plugin>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<version>${maven-antrun-plugin.version}</version>
+				<executions>
+					<execution>
+						<id>package-ant-task</id>
+						<phase>install</phase>
+						<configuration>
+							<tasks>
+								<mkdir dir="${project.build.directory}/release" />
+								<unzip src="${project.build.directory}/../../../flex-pmd-java/flex-pmd-ant-task/target/flex-pmd-ant-task-${project.parent.version}.zip" dest="${project.build.directory}/release" />
+								<unzip src="${project.build.directory}/../../../flex-pmd-java/flex-pmd-cpd-ant-task/target/flex-pmd-cpd-ant-task-${project.parent.version}.zip" dest="${project.build.directory}/release" />
+								<unzip src="${project.build.directory}/../../../flex-pmd-java/flex-pmd-metrics-ant-task/target/flex-pmd-metrics-ant-task-${project.parent.version}.zip" dest="${project.build.directory}/release" />
+								<unzip src="${project.build.directory}/../../../flex-pmd-java/flex-pmd-command-line/target/flex-pmd-command-line-${project.parent.version}.zip" dest="${project.build.directory}/release" />
+								<unzip src="${project.build.directory}/../../../flex-pmd-java/flex-pmd-cpd-command-line/target/flex-pmd-cpd-command-line-${project.parent.version}.zip" dest="${project.build.directory}/release" />
+								<unzip src="${project.build.directory}/../../../flex-pmd-java/flex-pmd-metrics-command-line/target/flex-pmd-metrics-command-line-${project.parent.version}.zip" dest="${project.build.directory}/release" />
+								<unzip src="${project.build.directory}/../../flex-pmd-automator/target/flex-pmd-automator-${project.parent.version}-workflow.zip" dest="${project.build.directory}/release" />
+								<delete dir="${project.build.directory}/release/command-line" />
+								<zip destfile="${project.build.directory}/${project.build.finalName}.zip" basedir="${project.build.directory}/release" excludes="*.zip" />
+							</tasks>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+
+		</plugins>
+	</build>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-hybrid/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-hybrid/pom.xml b/FlexPMD/flex-pmd-hybrid/pom.xml
new file mode 100644
index 0000000..6714556
--- /dev/null
+++ b/FlexPMD/flex-pmd-hybrid/pom.xml
@@ -0,0 +1,278 @@
+<!--
+
+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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+	<artifactId>flex-pmd-hybrid</artifactId>
+	<packaging>pom</packaging>
+
+	<name>Adobe Flex PMD Flex/Java Parent</name>
+
+	<modules>
+		<module>flex-pmd-automator</module>
+		<module>flex-pmd-bundles</module>
+	</modules>
+
+	<build>
+		<pluginManagement>
+			<plugins>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-dependency-plugin</artifactId>
+					<version>${dependency.version}</version>
+				</plugin>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-assembly-plugin</artifactId>
+					<version>${assembly.version}</version>
+				</plugin>
+			</plugins>
+		</pluginManagement>
+
+		<plugins>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-release-plugin</artifactId>
+				<version>${release-plugin.version}</version>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>${compileSource}</source>
+					<target>${compileSource}</target>
+				</configuration>
+			</plugin>
+
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>cobertura-maven-plugin</artifactId>
+				<version>${cobertura.version}</version>
+				<configuration>
+					<format>xml</format>
+				</configuration>
+			</plugin>
+
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>findbugs-maven-plugin</artifactId>
+				<version>${findbugs.version}</version>
+				<configuration>
+					<xmlOutput>true</xmlOutput>
+				</configuration>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-checkstyle-plugin</artifactId>
+				<version>${checkstyle.version}</version>
+				<configuration>
+					<configLocation>checkstyle.xml</configLocation>
+				</configuration>
+			</plugin>
+
+			<!--plugin>
+				<groupId>com.google.code.maven-license-plugin</groupId>
+				<artifactId>maven-license-plugin</artifactId>
+				<version>${license.version}</version>
+				<configuration>
+					<header>../flex-pmd-parent/src/etc/header.txt</header>
+					<includes>
+						<include>**/src/**</include>
+						<include>**/test/**</include>
+					</includes>
+					<excludes>
+						<exclude>**/Simple.as</exclude>
+						<exclude>**/Empty.*</exclude>
+						<exclude>**/Version.as</exclude>
+						<exclude>**/FlexPMD60.as</exclude>
+						<exclude>**/header.txt</exclude>
+						<exclude>**/MainWithNoCopyright.mxml</exclude>
+					</excludes>
+					<aggregate>true</aggregate>
+					<properties>
+						<year>${project.inceptionYear}</year>
+						<company>${project.organization.name}</company>
+					</properties>
+					<mapping>
+						<mxml>XML_STYLE</mxml>
+						<xsl>XML_STYLE</xsl>
+						<as>JAVADOC_STYLE</as>
+					</mapping>
+				</configuration>
+				<executions>
+					<execution>
+						<phase>package</phase>
+						<goals>
+							<goal>check</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin-->
+		</plugins>
+
+	</build>
+
+	<repositories>
+		<repository>
+			<id>maven2-repository.dev.java.net</id>
+			<name>Java.net Repository for Maven</name>
+			<url>http://download.java.net/maven/2/</url>
+		</repository>
+		<repository>
+			<id>central</id>
+			<name>maven-central</name>
+			<url>http://repo1.maven.org/maven2</url>
+			<releases>
+				<enabled>true</enabled>
+			</releases>
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
+		</repository>
+		<repository>
+			<id>dist.codehaus.org</id>
+			<layout>legacy</layout>
+			<url>http://dist.codehaus.org/</url>
+		</repository>
+		<repository>
+			<id>apache</id>
+			<name>Apache repository</name>
+			<layout>legacy</layout>
+			<url>http://cvs.apache.org/repository/</url>
+		</repository>
+		<repository>
+			<id>flex-mojos</id>
+			<url>http://repository.sonatype.org/content/groups/flexgroup</url>
+			<snapshots>
+				<enabled>false</enabled>
+				<checksumPolicy>ignore</checksumPolicy>
+			</snapshots>
+			<releases>
+				<enabled>true</enabled>
+				<checksumPolicy>ignore</checksumPolicy>
+			</releases>
+		</repository>
+	</repositories>
+
+	<pluginRepositories>
+		<pluginRepository>
+			<id>dist.codehaus.org</id>
+			<releases>
+				<enabled>true</enabled>
+			</releases>
+			<snapshots>
+				<enabled>true</enabled>
+			</snapshots>
+			<name>XDoclet central repository on codehaus</name>
+			<url>http://dist.codehaus.org</url>
+			<layout>legacy</layout>
+		</pluginRepository>
+		<pluginRepository>
+			<id>repository.codehaus.org</id>
+			<releases>
+				<enabled>true</enabled>
+			</releases>
+			<snapshots>
+				<enabled>true</enabled>
+			</snapshots>
+			<name>Central repository on codehaus</name>
+			<url>http://repository.codehaus.org</url>
+		</pluginRepository>
+		<pluginRepository>
+			<id>mc-release</id>
+			<name>Local Maven repository of releases</name>
+			<url>http://mc-repo.googlecode.com/svn/maven2/releases</url>
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
+			<releases>
+				<enabled>true</enabled>
+			</releases>
+		</pluginRepository>
+	</pluginRepositories>
+
+	<reporting>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-site-plugin</artifactId>
+				<version>2.0-beta-5</version>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-project-info-reports-plugin</artifactId>
+				<version>2.1.1</version>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-report-plugin</artifactId>
+				<inherited>true</inherited>
+				<version>2.4.3</version>
+			</plugin>
+			<plugin>
+				<artifactId>maven-pmd-plugin</artifactId>
+				<version>${maven-pmd-plugin.version}</version>
+				<configuration>
+					<linkXref>true</linkXref>
+					<minimumTokens>100</minimumTokens>
+					<targetJdk>${compileSource}</targetJdk>
+					<rulesets>
+						<ruleset>pmd.xml</ruleset>
+					</rulesets>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>javancss-maven-plugin</artifactId>
+				<version>2.0-beta-2</version>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-javadoc-plugin</artifactId>
+				<version>2.5</version>
+			</plugin>
+		</plugins>
+	</reporting>
+	
+	<profiles>
+		<profile>
+			<id>hudson</id>
+			<distributionManagement>
+				<repository>
+					<id>txi_releases</id>
+					<url>http://txici.can.adobe.com:9999/nexus/content/repositories/txi</url>
+				</repository>
+				<snapshotRepository>
+					<id>txi_snapshot</id>
+					<url>http://txici.can.adobe.com:9999/nexus/content/repositories/txi_snapshots/</url>
+				</snapshotRepository>
+			</distributionManagement>
+		</profile>
+	</profiles>
+	
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java-parent/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java-parent/pom.xml b/FlexPMD/flex-pmd-java-parent/pom.xml
deleted file mode 100644
index d5b80de..0000000
--- a/FlexPMD/flex-pmd-java-parent/pom.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<!--
-
-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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-java-parent</artifactId>
-	<packaging>pom</packaging>
-	<name>Adobe Flex PMD Java Parent</name>
-
-	<parent>
-		<groupId>com.adobe.ac</groupId>
-		<artifactId>flex-pmd</artifactId>
-		<version>1.3-SNAPSHOT</version>
-		<relativePath>../flex-pmd-parent/pom.xml</relativePath>
-	</parent>
-
-	<modules>
-		<module>../as3-parser</module>
-		<module>../as3-parser-api</module>
-		<module>../as3-plugin-utils</module>
-		<module>../flex-pmd-test-resources</module>
-		<module>../flex-pmd-ruleset</module>
-		<module>../flex-pmd-cpd</module>
-		<module>../flex-pmd-cpd-ant-task</module>
-		<module>../flex-pmd-cpd-maven-plugin</module>
-		<module>../flex-pmd-cpd-command-line</module>
-		<module>../flex-pmd-ruleset-api</module>
-		<module>../flex-pmd-core</module>
-		<module>../flex-pmd-ant-task</module>
-		<module>../flex-pmd-maven-plugin</module>
-		<module>../flex-pmd-command-line</module>
-		<module>../flex-pmd-command-line-api</module>
-		<module>../flex-pmd-files</module>
-		<module>../flex-pmd-metrics</module>
-		<module>../flex-pmd-metrics-command-line</module>
-		<module>../flex-pmd-metrics-ant-task</module>
-		<module>../flex-pmd-metrics-maven-plugin</module>
-	</modules>
-
-</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java-parent/sonar.sh
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java-parent/sonar.sh b/FlexPMD/flex-pmd-java-parent/sonar.sh
deleted file mode 100644
index 00c42ff..0000000
--- a/FlexPMD/flex-pmd-java-parent/sonar.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-mvn sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url="jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8" -Dsonar.jdbc.username=root -Dsonar.jdbc.password= -o
-
-# 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.
-

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser-api/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser-api/.pmd b/FlexPMD/flex-pmd-java/as3-parser-api/.pmd
new file mode 100644
index 0000000..b5c19d9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser-api/.pmd
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<pmd>
+    <useProjectRuleSet>false</useProjectRuleSet>
+    <ruleSetFile>../flex-pmd-parent/pmd.xml</ruleSetFile>
+    <includeDerivedFiles>false</includeDerivedFiles>
+    <violationsAsErrors>true</violationsAsErrors>
+</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser-api/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser-api/pom.xml b/FlexPMD/flex-pmd-java/as3-parser-api/pom.xml
new file mode 100644
index 0000000..0b6ace0
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser-api/pom.xml
@@ -0,0 +1,34 @@
+<!--
+
+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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>as3-parser-api</artifactId>
+    <packaging>jar</packaging>
+
+    <name>As3 Parser API</name>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/IAS3Parser.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/IAS3Parser.java b/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/IAS3Parser.java
new file mode 100644
index 0000000..5d30939
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/IAS3Parser.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.parser;
+
+import java.io.IOException;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+/**
+ * @author xagnetti
+ */
+public interface IAS3Parser
+{
+   /**
+    * @param filePath
+    * @return
+    * @throws IOException
+    * @throws TokenException
+    */
+   IParserNode buildAst( final String filePath ) throws IOException,
+                                                TokenException;
+
+   /**
+    * @param filePath
+    * @param scriptBlockLines
+    * @return
+    * @throws IOException
+    * @throws TokenException
+    */
+   IParserNode buildAst( final String filePath,
+                         final String[] scriptBlockLines ) throws IOException,
+                                                          TokenException;
+}
\ No newline at end of file


[24/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/pom.xml
new file mode 100644
index 0000000..32e8a44
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/pom.xml
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-cpd-command-line</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Adobe Flex CPD Command line</name>
+
+    <properties>
+        <maven.jar.plugin.version>2.2</maven.jar.plugin.version>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>com.martiansoftware</groupId>
+            <artifactId>jsap</artifactId>
+            <version>${jsap.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <version>${project.version}</version>
+            <artifactId>flex-pmd-command-line-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>pmd</groupId>
+            <artifactId>pmd</artifactId>
+            <version>${pmd.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <version>${project.parent.version}</version>
+            <artifactId>flex-pmd-cpd</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <version>${project.version}</version>
+            <artifactId>flex-pmd-files</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>as3-plugin-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>as3-parser</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>as3-parser-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>${commons-lang.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-test-resources</artifactId>
+            <version>${project.parent.version}</version>
+            <classifier>resources</classifier>
+            <type>zip</type>
+            <scope>provided</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+
+        <testResources>
+            <testResource>
+                <directory>${project.build.directory}/test/generated-resources</directory>
+            </testResource>
+        </testResources>
+
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-test-resources</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeGroupIds>${project.groupId}</includeGroupIds>
+                            <includes>**/*.as,**/*.mxml</includes>
+                            <outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
+                            <excludeTransitive>true</excludeTransitive>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>${maven.jar.plugin.version}</version>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>com.adobe.ac.cpd.commandline.FlexCPD</mainClass>
+                            <packageName>com.adobe.ac.cpd.commandline</packageName>
+                            <addClasspath>true</addClasspath>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>${maven-antrun-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <id>package-ant-task</id>
+                        <phase>install</phase>
+                        <configuration>
+                            <tasks>
+                                <echo message="Building ant-task"/>
+                                <mkdir dir="${project.build.directory}/release"/>
+                                <echo message=""/>
+                                <echo message="Copying Flex CPD dependencies..."/>
+                                <copy file="${project.build.directory}/${project.build.finalName}.jar"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:flex-pmd-command-line-api:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:as3-parser-api:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:as3-parser:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:flex-pmd-cpd:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:flex-pmd-files:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:as3-plugin-utils:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <echo message="Copying Command line dependencies..."/>
+                                <copy file="${pmd:pmd:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${commons-lang:commons-lang:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${com.martiansoftware:jsap:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <echo message="Extracting license..."/>
+                                <copy file="../../src/etc/header.txt"
+                                      tofile="${project.build.directory}/release/LICENSE.txt" overwrite="true"/>
+                                <echo message="Compressing zip..."/>
+                                <zip destfile="${project.build.directory}/${project.build.finalName}.zip"
+                                     basedir="${project.build.directory}/release" excludes="*.zip"/>
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/CpdCommandLineOptions.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/CpdCommandLineOptions.java b/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/CpdCommandLineOptions.java
new file mode 100644
index 0000000..a359eb4
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/CpdCommandLineOptions.java
@@ -0,0 +1,37 @@
+/*
+ * 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.cpd.commandline;
+
+import com.adobe.ac.pmd.ICommandLineOptions;
+
+public enum CpdCommandLineOptions implements ICommandLineOptions
+{
+   MINIMUM_TOKENS("minimumTokens"), OUTPUT_FILE("outputFile");
+
+   private String name;
+
+   private CpdCommandLineOptions( final String nameToBeSet )
+   {
+      name = nameToBeSet;
+   }
+
+   @Override
+   public String toString()
+   {
+      return name;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/FlexCPD.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/FlexCPD.java b/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/FlexCPD.java
new file mode 100644
index 0000000..c43042f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/FlexCPD.java
@@ -0,0 +1,195 @@
+/*
+ * 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.cpd.commandline;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import net.sourceforge.pmd.PMDException;
+import net.sourceforge.pmd.cpd.CPD;
+import net.sourceforge.pmd.cpd.FileReporter;
+import net.sourceforge.pmd.cpd.Renderer;
+import net.sourceforge.pmd.cpd.ReportException;
+import net.sourceforge.pmd.cpd.XMLRenderer;
+
+import com.adobe.ac.cpd.FlexLanguage;
+import com.adobe.ac.cpd.FlexTokenizer;
+import com.adobe.ac.pmd.CommandLineOptions;
+import com.adobe.ac.pmd.CommandLineUtils;
+import com.adobe.ac.pmd.ICommandLineOptions;
+import com.adobe.ac.pmd.LoggerUtils;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.files.impl.FileUtils;
+import com.martiansoftware.jsap.JSAP;
+import com.martiansoftware.jsap.JSAPException;
+import com.martiansoftware.jsap.JSAPResult;
+
+public final class FlexCPD
+{
+   private static JSAPResult        config;
+   private static final String      ENCODING = System.getProperty( "file.encoding" );
+   private static final Logger      LOGGER   = Logger.getLogger( FlexCPD.class.getName() );
+   private static FlexCpdParameters parameters;
+
+   public static void main( final String[] args ) throws JSAPException,
+                                                 URISyntaxException,
+                                                 IOException,
+                                                 ReportException,
+                                                 PMDException
+   {
+      new LoggerUtils().loadConfiguration();
+      startFlexCPD( args );
+      LOGGER.info( "FlexCPD terminated" );
+      System.exit( 0 ); // NOPMD
+   }
+
+   static boolean areCommandLineOptionsCorrect( final String[] args ) throws JSAPException
+   {
+      final JSAP jsap = new JSAP();
+      config = parseCommandLineArguments( args,
+                                          jsap );
+
+      if ( !config.success() )
+      {
+         LOGGER.log( Level.SEVERE,
+                     "Usage: java "
+                           + FlexCPD.class.getName() + " " + jsap.getUsage() );
+      }
+
+      return config.success();
+   }
+
+   static String getParameterValue( final ICommandLineOptions option )
+   {
+      return config.getString( option.toString() );
+   }
+
+   static boolean startFlexCPD( final String[] args ) throws JSAPException,
+                                                     URISyntaxException,
+                                                     IOException,
+                                                     ReportException,
+                                                     PMDException
+   {
+      if ( areCommandLineOptionsCorrect( args ) )
+      {
+         final String minimumTokens = getParameterValue( CpdCommandLineOptions.MINIMUM_TOKENS );
+         final String source = getParameterValue( CommandLineOptions.SOURCE_DIRECTORY );
+         final File sourceDirectory = source.contains( "," ) ? null
+                                                            : new File( source );
+         final List< File > sourceList = CommandLineUtils.computeSourceList( source );
+         final File outputDirectory = new File( getParameterValue( CpdCommandLineOptions.OUTPUT_FILE ) );
+
+         parameters = new FlexCpdParameters( outputDirectory,
+                                             minimumTokens == null ? FlexTokenizer.DEFAULT_MINIMUM_TOKENS
+                                                                  : Integer.valueOf( minimumTokens ),
+                                             sourceDirectory,
+                                             sourceList );
+         LOGGER.info( "Starting run, minimumTokenCount is "
+               + parameters.getMinimumTokenCount() );
+
+         LOGGER.info( "Tokenizing files" );
+         final CPD cpd = new CPD( parameters.getMinimumTokenCount(), new FlexLanguage() );
+
+         cpd.setEncoding( ENCODING );
+         tokenizeFiles( cpd );
+
+         LOGGER.info( "Starting to analyze code" );
+         final long timeTaken = analyzeCode( cpd );
+         LOGGER.info( "Done analyzing code; that took "
+               + timeTaken + " milliseconds" );
+
+         LOGGER.info( "Generating report" );
+         report( cpd );
+      }
+
+      return config.success();
+   }
+
+   private static long analyzeCode( final CPD cpd )
+   {
+      final long start = System.currentTimeMillis();
+      cpd.go();
+      final long stop = System.currentTimeMillis();
+      return stop
+            - start;
+   }
+
+   private static JSAPResult parseCommandLineArguments( final String[] args,
+                                                        final JSAP jsap ) throws JSAPException
+   {
+      CommandLineUtils.registerParameter( jsap,
+                                          CommandLineOptions.SOURCE_DIRECTORY,
+                                          true );
+      CommandLineUtils.registerParameter( jsap,
+                                          CpdCommandLineOptions.OUTPUT_FILE,
+                                          true );
+      CommandLineUtils.registerParameter( jsap,
+                                          CpdCommandLineOptions.MINIMUM_TOKENS,
+                                          false );
+      CommandLineUtils.registerParameter( jsap,
+                                          CommandLineOptions.EXLUDE_PACKAGE,
+                                          false );
+
+      return jsap.parse( args );
+   }
+
+   private static void report( final CPD cpd ) throws ReportException,
+                                              IOException
+   {
+      if ( !cpd.getMatches().hasNext() )
+      {
+         LOGGER.info( "No duplicates over "
+               + parameters.getMinimumTokenCount() + " tokens found" );
+      }
+      final Renderer renderer = new XMLRenderer( ENCODING );
+
+      if ( !parameters.getOutputFile().exists() )
+      {
+         if ( parameters.getOutputFile().createNewFile() == false )
+         {
+            LOGGER.warning( "Could not create a new output file" );
+         }
+      }
+
+      final FileReporter reporter = new FileReporter( parameters.getOutputFile(), ENCODING );
+      reporter.report( renderer.render( cpd.getMatches() ) );
+   }
+
+   private static void tokenizeFiles( final CPD cpd ) throws IOException,
+                                                     PMDException
+   {
+      final Map< String, IFlexFile > files = FileUtils.computeFilesList( parameters.getSourceDirectory(),
+                                                                         parameters.getSourceList(),
+                                                                         "",
+                                                                         null );
+
+      for ( final Entry< String, IFlexFile > fileEntry : files.entrySet() )
+      {
+         cpd.add( new File( fileEntry.getValue().getFilePath() ) ); // NOPMD
+      }
+   }
+
+   private FlexCPD()
+   {
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/FlexCpdParameters.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/FlexCpdParameters.java b/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/FlexCpdParameters.java
new file mode 100644
index 0000000..dfdd0b3
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/FlexCpdParameters.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.cpd.commandline;
+
+import java.io.File;
+import java.util.List;
+
+public class FlexCpdParameters
+{
+   private final Integer      minimumTokenCount;
+   private final File         outputFile;
+   private final File         sourceDirectory;
+   private final List< File > sourceList;
+
+   public FlexCpdParameters( final File outputFileToBeSet,
+                             final Integer minimumTokenCountToBeSet,
+                             final File sourceDirectoryToBeSet,
+                             final List< File > sourceListToBeSet )
+   {
+      super();
+      minimumTokenCount = minimumTokenCountToBeSet;
+      outputFile = outputFileToBeSet;
+      sourceDirectory = sourceDirectoryToBeSet;
+      sourceList = sourceListToBeSet;
+   }
+
+   public final Integer getMinimumTokenCount()
+   {
+      return minimumTokenCount;
+   }
+
+   public final File getOutputFile()
+   {
+      return outputFile;
+   }
+
+   public final File getSourceDirectory()
+   {
+      return sourceDirectory;
+   }
+
+   public List< File > getSourceList()
+   {
+      return sourceList;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/src/test/java/com/adobe/ac/cpd/commandline/FlexCPDTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/src/test/java/com/adobe/ac/cpd/commandline/FlexCPDTest.java b/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/src/test/java/com/adobe/ac/cpd/commandline/FlexCPDTest.java
new file mode 100644
index 0000000..9526b0a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd-command-line/src/test/java/com/adobe/ac/cpd/commandline/FlexCPDTest.java
@@ -0,0 +1,105 @@
+/*
+ * 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.cpd.commandline;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import net.sourceforge.pmd.PMDException;
+import net.sourceforge.pmd.cpd.ReportException;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.CommandLineOptions;
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.martiansoftware.jsap.JSAPException;
+
+public class FlexCPDTest extends FlexPmdTestBase
+{
+   @Test
+   public void testAreCommandLineOptionsCorrect() throws FileNotFoundException,
+                                                 JSAPException,
+                                                 PMDException,
+                                                 URISyntaxException
+   {
+      assertFalse( FlexCPD.areCommandLineOptionsCorrect( new String[]
+      {} ) );
+
+      assertFalse( FlexCPD.areCommandLineOptionsCorrect( new String[]
+      { "-y",
+                  "sourceDirectory",
+                  "-p",
+                  "outPutDirectory" } ) );
+
+      assertTrue( FlexCPD.areCommandLineOptionsCorrect( new String[]
+      { "-s",
+                  "sourceDirectory",
+                  "-o",
+                  "target",
+                  "-m",
+                  "50" } ) );
+
+      assertTrue( FlexCPD.areCommandLineOptionsCorrect( new String[]
+      { "-s",
+                  "sourceDirectory",
+                  "-o",
+                  "target" } ) );
+   }
+
+   @Test
+   public void testGetCommandLineValue() throws JSAPException
+   {
+      FlexCPD.areCommandLineOptionsCorrect( new String[]
+      { "-s",
+                  "sourceDirectory",
+                  "-o",
+                  "target",
+                  "-m",
+                  "25" } );
+
+      assertEquals( "sourceDirectory",
+                    FlexCPD.getParameterValue( CommandLineOptions.SOURCE_DIRECTORY ) );
+      assertEquals( "target",
+                    FlexCPD.getParameterValue( CpdCommandLineOptions.OUTPUT_FILE ) );
+      assertEquals( "25",
+                    FlexCPD.getParameterValue( CpdCommandLineOptions.MINIMUM_TOKENS ) );
+   }
+
+   @Test
+   public void testStartFlexCPD() throws JSAPException,
+                                 PMDException,
+                                 URISyntaxException,
+                                 IOException,
+                                 ReportException
+   {
+      final String[] args = new String[]
+      { "-s",
+                  getTestDirectory().getAbsolutePath(),
+                  "-o",
+                  new File( "target/cpd.xml" ).getAbsolutePath(),
+                  "--excludePackage",
+                  "cairngorm." };
+
+      FlexCPD.startFlexCPD( args );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd-maven-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd-maven-plugin/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-cpd-maven-plugin/pom.xml
new file mode 100644
index 0000000..7089f25
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd-maven-plugin/pom.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-cpd-maven-plugin</artifactId>
+    <packaging>maven-plugin</packaging>
+
+    <name>Adobe Flex CPD Maven plugin</name>
+
+
+    <dependencies>
+        <dependency>
+            <groupId>pmd</groupId>
+            <artifactId>pmd</artifactId>
+            <version>${pmd.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+            <version>${maven-plugin-api.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.reporting</groupId>
+            <artifactId>maven-reporting-impl</artifactId>
+            <version>${maven-reporting-impl.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-pmd-plugin</artifactId>
+            <version>${maven-pmd-plugin.version}</version>
+            <type>maven-plugin</type>
+        </dependency>
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-core</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-cpd</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-files</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-test-resources</artifactId>
+            <version>${project.parent.version}</version>
+            <classifier>resources</classifier>
+            <type>zip</type>
+            <scope>provided</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+
+        <testResources>
+            <testResource>
+                <directory>${project.build.directory}/test/generated-resources</directory>
+            </testResource>
+        </testResources>
+
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-test-resources</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeGroupIds>${project.groupId}</includeGroupIds>
+                            <includes>**/*.as,**/*.mxml</includes>
+                            <outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
+                            <excludeTransitive>true</excludeTransitive>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd-maven-plugin/src/main/java/com/adobe/ac/cpd/maven/FlexCpdMojo.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd-maven-plugin/src/main/java/com/adobe/ac/cpd/maven/FlexCpdMojo.java b/FlexPMD/flex-pmd-java/flex-pmd-cpd-maven-plugin/src/main/java/com/adobe/ac/cpd/maven/FlexCpdMojo.java
new file mode 100644
index 0000000..e7481e5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd-maven-plugin/src/main/java/com/adobe/ac/cpd/maven/FlexCpdMojo.java
@@ -0,0 +1,201 @@
+/*
+ * 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.cpd.maven;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+import java.util.Map.Entry;
+
+import net.sourceforge.pmd.PMDException;
+import net.sourceforge.pmd.cpd.CPD;
+import net.sourceforge.pmd.cpd.FileReporter;
+import net.sourceforge.pmd.cpd.Renderer;
+import net.sourceforge.pmd.cpd.ReportException;
+import net.sourceforge.pmd.cpd.XMLRenderer;
+
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.reporting.AbstractMavenReport;
+import org.apache.maven.reporting.MavenReportException;
+import org.codehaus.doxia.site.renderer.SiteRenderer;
+
+import com.adobe.ac.cpd.FlexLanguage;
+import com.adobe.ac.pmd.LoggerUtils;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.files.impl.FileUtils;
+
+/**
+ * @author xagnetti
+ * @goal check
+ * @phase verify
+ */
+public class FlexCpdMojo extends AbstractMavenReport
+{
+   private static final String OUTPUT_NAME = "cpd";
+
+   protected static ResourceBundle getBundle( final Locale locale )
+   {
+      return ResourceBundle.getBundle( "flexPmd",
+                                       locale,
+                                       FlexCpdMojo.class.getClassLoader() ); // NOPMD
+   }
+
+   private final String encoding = System.getProperty( "file.encoding" );
+
+   /**
+    * Location of the file.
+    * 
+    * @parameter expression="25"
+    * @required
+    */
+   private int          minimumTokenCount;
+
+   /**
+    * Location of the file.
+    * 
+    * @parameter expression="${project.build.directory}"
+    * @required
+    */
+   private File         outputDirectory;
+
+   /**
+    * @parameter expression="${project}"
+    * @required
+    * @readonly
+    */
+   private MavenProject project;
+
+   /**
+    * @parameter 
+    *            expression="${component.org.codehaus.doxia.site.renderer.SiteRenderer}"
+    * @required
+    * @readonly
+    */
+   private SiteRenderer siteRenderer;
+
+   /**
+    * Specifies the location of the source files to be used.
+    * 
+    * @parameter expression="${project.build.sourceDirectory}"
+    * @required
+    * @readonly
+    */
+   private File         sourceDirectory;
+
+   public FlexCpdMojo()
+   {
+      super();
+   }
+
+   public FlexCpdMojo( final File outputDirectoryToBeSet,
+                       final File sourceDirectoryToBeSet,
+                       final MavenProject projectToBeSet )
+   {
+      super();
+      outputDirectory = outputDirectoryToBeSet;
+      sourceDirectory = sourceDirectoryToBeSet;
+      project = projectToBeSet;
+      minimumTokenCount = 25;
+   }
+
+   public String getDescription( final Locale locale )
+   {
+      return getBundle( locale ).getString( "report.flexCpd.description" );
+   }
+
+   public final String getName( final Locale locale )
+   {
+      return getBundle( locale ).getString( "report.flexCpd.name" );
+   }
+
+   public final String getOutputName()
+   {
+      return OUTPUT_NAME;
+   }
+
+   void setSiteRenderer( final SiteRenderer site )
+   {
+      siteRenderer = site;
+   }
+
+   @Override
+   protected void executeReport( final Locale locale ) throws MavenReportException
+   {
+      new LoggerUtils().loadConfiguration();
+
+      final CPD cpd = new CPD( minimumTokenCount, new FlexLanguage() );
+
+      try
+      {
+         final Map< String, IFlexFile > files = FileUtils.computeFilesList( sourceDirectory,
+                                                                            null,
+                                                                            "",
+                                                                            null );
+
+         for ( final Entry< String, IFlexFile > fileEntry : files.entrySet() )
+         {
+            cpd.add( new File( fileEntry.getValue().getFilePath() ) ); // NOPMD
+         }
+
+         cpd.go();
+
+         report( cpd );
+      }
+      catch ( final PMDException e )
+      {
+         throw new MavenReportException( "", e );
+      }
+      catch ( final IOException e )
+      {
+         throw new MavenReportException( "", e );
+      }
+      catch ( final ReportException e )
+      {
+         throw new MavenReportException( "", e );
+      }
+   }
+
+   @Override
+   protected String getOutputDirectory()
+   {
+      return outputDirectory.getAbsolutePath();
+   }
+
+   @Override
+   protected MavenProject getProject()
+   {
+      return project;
+   }
+
+   @Override
+   protected SiteRenderer getSiteRenderer()
+   {
+      return siteRenderer;
+   }
+
+   private void report( final CPD cpd ) throws ReportException
+   {
+      final Renderer renderer = new XMLRenderer( encoding );
+      final FileReporter reporter = new FileReporter( new File( outputDirectory.getAbsolutePath(),
+                                                                OUTPUT_NAME
+                                                                      + ".xml" ), encoding );
+      reporter.report( renderer.render( cpd.getMatches() ) );
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd-maven-plugin/src/main/resources/flexPmd.properties
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd-maven-plugin/src/main/resources/flexPmd.properties b/FlexPMD/flex-pmd-java/flex-pmd-cpd-maven-plugin/src/main/resources/flexPmd.properties
new file mode 100644
index 0000000..238be18
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd-maven-plugin/src/main/resources/flexPmd.properties
@@ -0,0 +1,16 @@
+# 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.
+
+report.flexCpd.name=

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd-maven-plugin/src/test/java/com/adobe/ac/cpd/maven/FlexCpdMojoTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd-maven-plugin/src/test/java/com/adobe/ac/cpd/maven/FlexCpdMojoTest.java b/FlexPMD/flex-pmd-java/flex-pmd-cpd-maven-plugin/src/test/java/com/adobe/ac/cpd/maven/FlexCpdMojoTest.java
new file mode 100644
index 0000000..93d09cb
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd-maven-plugin/src/test/java/com/adobe/ac/cpd/maven/FlexCpdMojoTest.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.cpd.maven;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.codehaus.doxia.site.renderer.DefaultSiteRenderer;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+
+public class FlexCpdMojoTest extends FlexPmdTestBase
+{
+   @Test
+   public void testExecute() throws MojoExecutionException,
+                            IOException
+   {
+      final FlexCpdMojo mojo = new FlexCpdMojo( new File( "target" ),
+                                                getTestDirectory(),
+                                                new MavenProjectStub() );
+
+      mojo.setSiteRenderer( new DefaultSiteRenderer() );
+      mojo.execute();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-cpd/pom.xml
new file mode 100644
index 0000000..3e02e2c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd/pom.xml
@@ -0,0 +1,93 @@
+<!--
+
+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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-cpd</artifactId>
+    <packaging>jar</packaging>
+
+	<name>Adobe Flex CPD (Copy and Past Detector)</name>
+
+	<dependencies>
+
+		<dependency>
+			<groupId>pmd</groupId>
+			<artifactId>pmd</artifactId>
+			<version>${pmd.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<version>${project.parent.version}</version>
+			<artifactId>as3-parser</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>${project.parent.groupId}</groupId>
+			<artifactId>flex-pmd-test-resources</artifactId>
+			<version>${project.parent.version}</version>
+			<classifier>resources</classifier>
+			<type>zip</type>
+			<scope>provided</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<version>${project.version}</version>
+			<artifactId>flex-pmd-files</artifactId>
+		</dependency>
+
+	</dependencies>
+
+	<build>
+		<testResources>
+			<testResource>
+				<directory>${project.build.directory}/test/generated-resources</directory>
+			</testResource>
+		</testResources>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>unpack-test-resources</id>
+						<phase>generate-resources</phase>
+						<goals>
+							<goal>unpack-dependencies</goal>
+						</goals>
+						<configuration>
+							<includeGroupIds>${project.groupId}</includeGroupIds>
+							<includes>**/*.as,**/*.mxml</includes>
+							<outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
+							<excludeTransitive>true</excludeTransitive>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+	
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd/src/main/java/com/adobe/ac/cpd/FlexLanguage.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd/src/main/java/com/adobe/ac/cpd/FlexLanguage.java b/FlexPMD/flex-pmd-java/flex-pmd-cpd/src/main/java/com/adobe/ac/cpd/FlexLanguage.java
new file mode 100644
index 0000000..b71ce3f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd/src/main/java/com/adobe/ac/cpd/FlexLanguage.java
@@ -0,0 +1,27 @@
+/*
+ * 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.cpd;
+
+import net.sourceforge.pmd.cpd.AbstractLanguage;
+
+public class FlexLanguage extends AbstractLanguage
+{
+   public FlexLanguage()
+   {
+      super( new FlexTokenizer(), "as", "mxml" );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd/src/main/java/com/adobe/ac/cpd/FlexTokenizer.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd/src/main/java/com/adobe/ac/cpd/FlexTokenizer.java b/FlexPMD/flex-pmd-java/flex-pmd-cpd/src/main/java/com/adobe/ac/cpd/FlexTokenizer.java
new file mode 100644
index 0000000..252009d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd/src/main/java/com/adobe/ac/cpd/FlexTokenizer.java
@@ -0,0 +1,132 @@
+/*
+ * 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.cpd;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.Set;
+
+import net.sourceforge.pmd.cpd.SourceCode;
+import net.sourceforge.pmd.cpd.TokenEntry;
+import net.sourceforge.pmd.cpd.Tokenizer;
+import net.sourceforge.pmd.cpd.Tokens;
+
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.files.IMxmlFile;
+import com.adobe.ac.pmd.files.impl.FileUtils;
+import com.adobe.ac.pmd.parser.KeyWords;
+import com.adobe.ac.pmd.parser.Operators;
+
+import de.bokelberg.flex.parser.AS3Parser;
+import de.bokelberg.flex.parser.AS3Scanner;
+import de.bokelberg.flex.parser.AS3Scanner.Token;
+
+public class FlexTokenizer implements Tokenizer
+{
+   public static final int            DEFAULT_MINIMUM_TOKENS = 25;
+   private static final Set< String > IGNORED_TOKENS;
+   private static final Set< String > IGNORING_LINE_TOKENS;
+
+   static
+   {
+      IGNORED_TOKENS = new HashSet< String >();
+      IGNORED_TOKENS.add( Operators.SEMI_COLUMN.toString() );
+      IGNORED_TOKENS.add( Operators.LEFT_CURLY_BRACKET.toString() );
+      IGNORED_TOKENS.add( Operators.RIGHT_CURLY_BRACKET.toString() );
+      IGNORED_TOKENS.add( AS3Parser.NEW_LINE );
+      IGNORING_LINE_TOKENS = new HashSet< String >();
+      IGNORING_LINE_TOKENS.add( KeyWords.IMPORT.toString() );
+      IGNORING_LINE_TOKENS.add( KeyWords.PACKAGE.toString() );
+   }
+
+   private static boolean isTokenIgnored( final String tokenText )
+   {
+      return IGNORED_TOKENS.contains( tokenText )
+            || tokenText.startsWith( AS3Parser.MULTIPLE_LINES_COMMENT )
+            || tokenText.startsWith( AS3Parser.SINGLE_LINE_COMMENT );
+   }
+
+   private static boolean isTokenIgnoringLine( final String tokenText )
+   {
+      return IGNORING_LINE_TOKENS.contains( tokenText );
+   }
+
+   public void tokenize( final SourceCode tokens,
+                         final Tokens tokenEntries )
+   {
+      try
+      {
+         final AS3Scanner scanner = initializeScanner( tokens );
+         Token currentToken = scanner.moveToNextToken();
+         int inImportLine = 0;
+
+         while ( currentToken != null
+               && currentToken.getText().compareTo( KeyWords.EOF.toString() ) != 0 )
+         {
+            final String currentTokenText = currentToken.getText();
+            final int currentTokenLine = currentToken.getLine();
+
+            if ( !isTokenIgnored( currentTokenText ) )
+            {
+               if ( isTokenIgnoringLine( currentTokenText ) )
+               {
+                  inImportLine = currentTokenLine;
+               }
+               else
+               {
+                  if ( inImportLine == 0
+                        || inImportLine != currentTokenLine )
+                  {
+                     inImportLine = 0;
+                     tokenEntries.add( new TokenEntry( currentTokenText, // NOPMD
+                                                       tokens.getFileName(),
+                                                       currentTokenLine ) );
+                  }
+               }
+            }
+            currentToken = scanner.moveToNextToken();
+         }
+      }
+      catch ( final Exception e )
+      {
+      }
+      finally
+      {
+         tokenEntries.add( TokenEntry.getEOF() );
+      }
+   }
+
+   private AS3Scanner initializeScanner( final SourceCode tokens )
+   {
+      final AS3Scanner scanner = new AS3Scanner();
+
+      final IFlexFile flexFile = FileUtils.create( new File( tokens.getFileName() ),
+                                                   new File( "" ) );
+
+      if ( flexFile instanceof IMxmlFile )
+      {
+         final IMxmlFile mxml = ( IMxmlFile ) flexFile;
+
+         scanner.setLines( mxml.getScriptBlock() );
+      }
+      else
+      {
+         scanner.setLines( tokens.getCode().toArray( new String[ tokens.getCode().size() ] ) );
+      }
+      return scanner;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd/src/test/java/com/adobe/ac/cpd/FlexCpdTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd/src/test/java/com/adobe/ac/cpd/FlexCpdTest.java b/FlexPMD/flex-pmd-java/flex-pmd-cpd/src/test/java/com/adobe/ac/cpd/FlexCpdTest.java
new file mode 100644
index 0000000..09b7a75
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd/src/test/java/com/adobe/ac/cpd/FlexCpdTest.java
@@ -0,0 +1,121 @@
+/*
+ * 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.cpd;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Map.Entry;
+
+import net.sourceforge.pmd.cpd.CPD;
+import net.sourceforge.pmd.cpd.Match;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.IFlexFile;
+
+public class FlexCpdTest extends FlexPmdTestBase
+{
+   private class ExpectedMatchInformation
+   {
+      private final int lineCount;
+      private final int markCount;
+      private final int tokenCount;
+
+      public ExpectedMatchInformation( final int tokenCountToBeSet,
+                                       final int markCountToBeSet,
+                                       final int lineCountToBeSet )
+      {
+         lineCount = lineCountToBeSet;
+         tokenCount = tokenCountToBeSet;
+         markCount = markCountToBeSet;
+      }
+   }
+   final ExpectedMatchInformation[] EXPECTED = new ExpectedMatchInformation[]
+                                             { new ExpectedMatchInformation( 107, 2, 7 ),
+               new ExpectedMatchInformation( 79, 2, 17 ),
+               new ExpectedMatchInformation( 77, 2, 6 ),
+               new ExpectedMatchInformation( 76, 2, 18 ),
+               new ExpectedMatchInformation( 64, 2, 7 ),
+               new ExpectedMatchInformation( 60, 3, 14 ),
+               new ExpectedMatchInformation( 57, 2, 7 ),
+               new ExpectedMatchInformation( 54, 2, 9 ),
+               new ExpectedMatchInformation( 53, 2, 8 ),
+               new ExpectedMatchInformation( 48, 2, 18 ) };
+
+   @Test
+   public void test119() throws IOException
+   {
+      final CPD cpd = new CPD( 25, new FlexLanguage() );
+
+      cpd.add( new File( "src/test/resources/test/FlexPMD119.mxml" ) );
+      cpd.go();
+
+      final Iterator< Match > matchIterator = cpd.getMatches();
+      final Match match = matchIterator.next();
+
+      assertEquals( "The first mark is not correct",
+                    41,
+                    match.getFirstMark().getBeginLine() );
+      assertEquals( "The second mark is not correct",
+                    81,
+                    match.getSecondMark().getBeginLine() );
+   }
+
+   @Test
+   public void tokenize() throws IOException
+   {
+      final Iterator< Match > matchIterator = getMatchIterator();
+
+      for ( int currentIndex = 0; matchIterator.hasNext()
+            && currentIndex < EXPECTED.length; currentIndex++ )
+      {
+         final Match currentMatch = matchIterator.next();
+
+         assertEquals( "The token count is not correct on the "
+                             + currentIndex + "th index",
+                       EXPECTED[ currentIndex ].tokenCount,
+                       currentMatch.getTokenCount() );
+
+         assertEquals( "The mark count is not correct on the "
+                             + currentIndex + "th index",
+                       EXPECTED[ currentIndex ].markCount,
+                       currentMatch.getMarkCount() );
+
+         assertEquals( "The line count is not correct on the "
+                             + currentIndex + "th index",
+                       EXPECTED[ currentIndex ].lineCount,
+                       currentMatch.getLineCount() );
+      }
+   }
+
+   private Iterator< Match > getMatchIterator() throws IOException
+   {
+      final CPD cpd = new CPD( 25, new FlexLanguage() );
+
+      for ( final Entry< String, IFlexFile > includedFile : getTestFiles().entrySet() )
+      {
+         cpd.add( new File( includedFile.getValue().getFilePath() ) );
+      }
+      cpd.go();
+
+      return cpd.getMatches();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd/src/test/resources/test/FlexPMD119.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd/src/test/resources/test/FlexPMD119.mxml b/FlexPMD/flex-pmd-java/flex-pmd-cpd/src/test/resources/test/FlexPMD119.mxml
new file mode 100644
index 0000000..1519ac1
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd/src/test/resources/test/FlexPMD119.mxml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:Canvas> 
+	
+	<mx:Script>
+		<![CDATA[
+		
+		// Handle the mouseDown event generated 
+		// by clicking in the application.
+		private function handleMouseDown(event:MouseEvent):void {
+		
+		// Convert the mouse position to global coordinates.
+		// The localX and localY properties of the mouse event contain
+		// the coordinates at which the event occurred relative to the
+		// event target, typically one of the 
+		// colored internal Canvas controls.
+		// A production version of this example could use the stageX 
+		// and stageY properties, which use the global coordinates, 
+		// and avoid this step.
+		// This example uses the localX and localY properties only to
+		// illustrate conversion between different frames of reference.
+		var pt:Point = new Point(event.localX, event.localY);
+		pt = event.target.localToGlobal(pt);
+		
+		// Convert the global coordinates to the content coordinates 
+		// inside the outer c1 Canvas control.
+		pt = c1.globalToContent(pt);
+		
+		// Figure out which quadrant was clicked.
+		var whichColor:String = "border area";
+		
+		if (pt.x < 150) {
+		if (pt.y < 150)
+		whichColor = "red";
+		else
+		whichColor = "blue";
+		}
+		else {
+		if (pt.y < 150)
+		whichColor = "green";
+		else
+		whichColor = "magenta";
+		}
+		
+		Alert.show("You clicked on the " + whichColor);
+		}
+		
+		// Handle the mouseDown event generated 
+		// by clicking in the application.
+		private function handleMouseDown(event:MouseEvent):void {
+		
+		// Convert the mouse position to global coordinates.
+		// The localX and localY properties of the mouse event contain
+		// the coordinates at which the event occurred relative to the
+		// event target, typically one of the 
+		// colored internal Canvas controls.
+		// A production version of this example could use the stageX 
+		// and stageY properties, which use the global coordinates, 
+		// and avoid this step.
+		// This example uses the localX and localY properties only to
+		// illustrate conversion between different frames of reference.
+		var pt:Point = new Point(event.localX, event.localY);
+		pt = event.target.localToGlobal(pt);
+		
+		// Convert the global coordinates to the content coordinates 
+		// inside the outer c1 Canvas control.
+		pt = c1.globalToContent(pt);
+		
+		// Figure out which quadrant was clicked.
+		var whichColor:String = "border area";
+		
+		if (pt.x < 150) {
+		if (pt.y < 150)
+		whichColor = "red";
+		else
+		whichColor = "blue";
+		}
+		else {
+		if (pt.y < 150)
+		whichColor = "green";
+		else
+		whichColor = "magenta";
+		}
+		
+		Alert.show("You clicked on the " + whichColor);
+		}
+		]]>
+	</mx:Script>
+	
+</mx:Canvas>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-files/pom.xml
new file mode 100644
index 0000000..9796310
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/pom.xml
@@ -0,0 +1,84 @@
+<!--
+
+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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-files</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Adobe Flex PMD Files</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>${commons-lang.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>as3-plugin-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-test-resources</artifactId>
+            <version>${project.version}</version>
+            <classifier>resources</classifier>
+            <type>zip</type>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <testResources>
+            <testResource>
+                <directory>${project.build.directory}/test/generated-resources</directory>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-test-resources</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeGroupIds>${project.groupId}</includeGroupIds>
+                            <includes>**/*.as,**/*.mxml</includes>
+                            <outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
+                            <excludeTransitive>true</excludeTransitive>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/FlexPmdTestBase.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/FlexPmdTestBase.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/FlexPmdTestBase.java
new file mode 100644
index 0000000..c3e3b5d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/FlexPmdTestBase.java
@@ -0,0 +1,71 @@
+/*
+ * 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;
+
+import java.io.File;
+import java.util.Map;
+
+import com.adobe.ac.pmd.files.IFlexFile;
+
+/**
+ * This is a base class for any FlexPMD rule test case.
+ * 
+ * @author xagnetti
+ */
+public class FlexPmdTestBase // NO_UCD
+{
+   protected static final String    BEGIN_LINE_NOT_CORRECT        = "Begining line is not correct";     // NO_UCD
+   protected static final String    END_LINE_NOT_CORRECT          = "Ending line is not correct";       // NO_UCD
+   protected static final String    VIOLATIONS_NUMBER_NOT_CORRECT = "Violations number is not correct"; // NO_UCD
+
+   /**
+    * Test files placeholder. The key is the qualified file name
+    */
+   private Map< String, IFlexFile > testFiles                     = ResourcesManagerTest.getInstance()
+                                                                                        .getTestFiles();
+
+   /**
+    * 
+    */
+   protected FlexPmdTestBase()
+   {
+   }
+
+   /**
+    * @return
+    */
+   protected File getTestDirectory() // NO_UCD
+   {
+      return ResourcesManagerTest.getInstance().getTestRootDirectory();
+   }
+
+   /**
+    * @return
+    */
+   protected final Map< String, IFlexFile > getTestFiles() // NO_UCD
+   {
+      return testFiles;
+   }
+
+   /**
+    * @param testFilesToBeSet
+    */
+   protected final void setTestFiles( final Map< String, IFlexFile > testFilesToBeSet )
+   {
+      testFiles = testFilesToBeSet;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/ResourcesManagerTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/ResourcesManagerTest.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/ResourcesManagerTest.java
new file mode 100644
index 0000000..5986888
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/ResourcesManagerTest.java
@@ -0,0 +1,104 @@
+/*
+ * 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;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.logging.Logger;
+
+import net.sourceforge.pmd.PMDException;
+
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.files.impl.FileUtils;
+import com.adobe.ac.utils.StackTraceUtils;
+
+/**
+ * Internal utility which finds out the test resources, and map them to their
+ * qualified names.
+ * 
+ * @author xagnetti
+ */
+public final class ResourcesManagerTest
+{
+   private static ResourcesManagerTest instance = null;
+   private static final Logger         LOGGER   = Logger.getLogger( ResourcesManagerTest.class.getName() );
+
+   /**
+    * @return
+    */
+   public static synchronized ResourcesManagerTest getInstance() // NOPMD
+   {
+      if ( instance == null )
+      {
+         try
+         {
+            new LoggerUtils().loadConfiguration();
+            instance = new ResourcesManagerTest( "/test" );
+         }
+         catch ( final URISyntaxException e )
+         {
+            LOGGER.warning( StackTraceUtils.print( e ) );
+         }
+         catch ( final PMDException e )
+         {
+            LOGGER.warning( StackTraceUtils.print( e ) );
+         }
+      }
+      return instance;
+   }
+
+   private final Map< String, IFlexFile > testFiles;
+   private final File                     testRootDirectory;
+
+   private ResourcesManagerTest( final String directory ) throws URISyntaxException,
+                                                         PMDException
+   {
+      final URL resource = this.getClass().getResource( directory );
+
+      if ( resource == null )
+      {
+         LOGGER.severe( directory
+               + " folder is not found in the resource" );
+         testRootDirectory = null;
+         testFiles = new LinkedHashMap< String, IFlexFile >();
+      }
+      else
+      {
+         testRootDirectory = new File( resource.toURI().getPath() );
+         testFiles = FileUtils.computeFilesList( testRootDirectory,
+                                                 null,
+                                                 "",
+                                                 null );
+      }
+   }
+
+   /**
+    * @return
+    */
+   public Map< String, IFlexFile > getTestFiles()
+   {
+      return testFiles;
+   }
+
+   protected File getTestRootDirectory()
+   {
+      return testRootDirectory;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IAs3File.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IAs3File.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IAs3File.java
new file mode 100644
index 0000000..4997eeb
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IAs3File.java
@@ -0,0 +1,24 @@
+/*
+ * 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.files;
+
+/**
+ * @author xagnetti
+ */
+public interface IAs3File extends IFlexFile
+{
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IFlexFile.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IFlexFile.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IFlexFile.java
new file mode 100644
index 0000000..21adb01
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IFlexFile.java
@@ -0,0 +1,94 @@
+/*
+ * 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.files;
+
+import java.util.Set;
+
+/**
+ * @author xagnetti
+ */
+public interface IFlexFile
+{
+   /**
+    * @param stringToLookup
+    * @param linesToBeIgnored
+    * @return
+    */
+   boolean contains( final String stringToLookup,
+                     final Set< Integer > linesToBeIgnored );
+
+   /**
+    * @return
+    */
+   String getClassName();
+
+   /**
+    * @return the token for comment closing
+    */
+   String getCommentClosingTag();
+
+   /**
+    * @return the token for comment opening
+    */
+   String getCommentOpeningTag();
+
+   /**
+    * @return java.io.File name
+    */
+   String getFilename();
+
+   /**
+    * @return java.io.File absolute path
+    */
+   String getFilePath();
+
+   /**
+    * @return
+    */
+   String getFullyQualifiedName();
+
+   /**
+    * @param lineIndex
+    * @return
+    */
+   String getLineAt( int lineIndex );
+
+   /**
+    * @return
+    */
+   int getLinesNb();
+
+   /**
+    * @return
+    */
+   String getPackageName();
+
+   /**
+    * @return the token for one line comment
+    */
+   String getSingleLineComment();
+
+   /**
+    * @return true if the file is a main MXML file
+    */
+   boolean isMainApplication();
+
+   /**
+    * @return true if the file is a MXML file
+    */
+   boolean isMxml();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IMxmlFile.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IMxmlFile.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IMxmlFile.java
new file mode 100644
index 0000000..1d98c98
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/IMxmlFile.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.files;
+
+/**
+ * @author xagnetti
+ */
+public interface IMxmlFile extends IFlexFile
+{
+   /**
+    * @return
+    */
+   String[] getActualScriptBlock();
+
+   /**
+    * @return
+    */
+   int getBeginningScriptBlock();
+
+   /**
+    * @return
+    */
+   int getEndingScriptBlock();
+
+   /**
+    * @return
+    */
+   String[] getScriptBlock();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/AbstractFlexFile.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/AbstractFlexFile.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/AbstractFlexFile.java
new file mode 100644
index 0000000..986f2a7
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/AbstractFlexFile.java
@@ -0,0 +1,259 @@
+/*
+ * 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.files.impl;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.logging.Logger;
+
+import org.apache.commons.lang.StringUtils;
+
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.utils.StackTraceUtils;
+
+/**
+ * Abstract class representing a Flex File (either MXML or AS)
+ * 
+ * @author xagnetti
+ */
+abstract class AbstractFlexFile implements IFlexFile
+{
+   private static final Logger LOGGER = Logger.getLogger( AbstractFlexFile.class.getName() );
+
+   /**
+    * @param filePath
+    * @param rootPath
+    * @param className
+    * @param fileSeparator
+    * @return
+    */
+   protected static String computePackageName( final String filePath,
+                                               final CharSequence rootPath,
+                                               final String className,
+                                               final String fileSeparator )
+   {
+      String temporaryPackage;
+
+      temporaryPackage = filePath.replace( className,
+                                           "" ).replace( rootPath,
+                                                         "" ).replace( fileSeparator,
+                                                                       "." );
+      if ( temporaryPackage.endsWith( "." ) )
+      {
+         temporaryPackage = temporaryPackage.substring( 0,
+                                                        temporaryPackage.length() - 1 );
+      }
+      if ( temporaryPackage.length() > 0
+            && temporaryPackage.charAt( 0 ) == '.' )
+      {
+         temporaryPackage = temporaryPackage.substring( 1,
+                                                        temporaryPackage.length() );
+      }
+      return temporaryPackage;
+   }
+
+   private static boolean doesCurrentLineContain( final String line,
+                                                  final String search )
+   {
+      return line.contains( search );
+   }
+
+   private final String         className;
+   private final File           file;
+   private final List< String > lines;
+   private final String         packageName;
+
+   /**
+    * @param underlyingFile
+    * @param rootDirectory
+    */
+   protected AbstractFlexFile( final File underlyingFile,
+                               final File rootDirectory )
+   {
+      final String filePath = underlyingFile.getPath();
+      final CharSequence rootPath = rootDirectory == null ? ""
+                                                         : rootDirectory.getPath();
+
+      file = underlyingFile;
+      className = underlyingFile.getName();
+      packageName = computePackageName( filePath,
+                                        rootPath,
+                                        className,
+                                        System.getProperty( "file.separator" ) );
+      lines = new ArrayList< String >();
+      try
+      {
+         String[] linesArray;
+         linesArray = FileUtils.readLines( underlyingFile );
+         for ( final String string : linesArray )
+         {
+            lines.add( string );
+         }
+      }
+      catch ( final IOException e )
+      {
+         LOGGER.warning( StackTraceUtils.print( e ) );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IFlexFile#contains(java.lang.String, int)
+    */
+   public final boolean contains( final String stringToLookup,
+                                  final Set< Integer > linesToBeIgnored )
+   {
+      int lineIndex = 1;
+      boolean found = false;
+
+      for ( final String line : lines )
+      {
+         if ( doesCurrentLineContain( line,
+                                      stringToLookup )
+               && !linesToBeIgnored.contains( lineIndex ) )
+         {
+            found = true;
+            break;
+         }
+         lineIndex++;
+      }
+      return found;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see java.lang.Object#equals(java.lang.Object)
+    */
+   @Override
+   public final boolean equals( final Object obj )
+   {
+      return obj != null
+            && obj instanceof AbstractFlexFile && hashCode() == ( ( AbstractFlexFile ) obj ).hashCode();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IFlexFile#getClassName()
+    */
+   public final String getClassName()
+   {
+      return className;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IFlexFile#getCommentClosingTag()
+    */
+   public abstract String getCommentClosingTag();
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IFlexFile#getCommentOpeningTag()
+    */
+   public abstract String getCommentOpeningTag();
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IFlexFile#getFilename()
+    */
+   public final String getFilename()
+   {
+      return file.getName();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IFlexFile#getFilePath()
+    */
+   public final String getFilePath()
+   {
+      return file.toURI().getPath();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IFlexFile#getFullyQualifiedName()
+    */
+   public final String getFullyQualifiedName()
+   {
+      return ( StringUtils.isEmpty( packageName ) ? ""
+                                                 : packageName
+                                                       + "." )
+            + className;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IFlexFile#getLineAt(int)
+    */
+   public String getLineAt( final int lineIndex )
+   {
+      return lines.get( lineIndex - 1 );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IFlexFile#getLines()
+    */
+   public final List< String > getLines()
+   {
+      return lines;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IFlexFile#getLinesNb()
+    */
+   public int getLinesNb()
+   {
+      return lines.size();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IFlexFile#getPackageName()
+    */
+   public final String getPackageName()
+   {
+      return packageName;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see java.lang.Object#hashCode()
+    */
+   @Override
+   public int hashCode()
+   {
+      return getFilePath().hashCode();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IFlexFile#isMainApplication()
+    */
+   public abstract boolean isMainApplication();
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IFlexFile#isMxml()
+    */
+   public abstract boolean isMxml();
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/As3File.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/As3File.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/As3File.java
new file mode 100644
index 0000000..d4a3c93
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/As3File.java
@@ -0,0 +1,86 @@
+/*
+ * 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.files.impl;
+
+import java.io.File;
+
+import com.adobe.ac.pmd.files.IAs3File;
+
+/**
+ * @author xagnetti
+ */
+class As3File extends AbstractFlexFile implements IAs3File
+{
+   /**
+    * @param file
+    * @param rootDirectory
+    */
+   protected As3File( final File file,
+                      final File rootDirectory )
+   {
+      super( file, rootDirectory );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.impl.AbstractFlexFile#getCommentClosingTag()
+    */
+   @Override
+   public final String getCommentClosingTag()
+   {
+      return "*/";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.impl.AbstractFlexFile#getCommentOpeningTag()
+    */
+   @Override
+   public final String getCommentOpeningTag()
+   {
+      return "/*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IFlexFile#getSingleLineComment()
+    */
+   public String getSingleLineComment()
+   {
+      return "//";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.impl.AbstractFlexFile#isMainApplication()
+    */
+   @Override
+   public final boolean isMainApplication()
+   {
+      return false;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.impl.AbstractFlexFile#isMxml()
+    */
+   @Override
+   public final boolean isMxml()
+   {
+      return false;
+   }
+}


[14/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/FlexRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/FlexRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/FlexRuleTest.java
new file mode 100644
index 0000000..e18b6d8
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/FlexRuleTest.java
@@ -0,0 +1,94 @@
+/*
+ * 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.core;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.Assert;
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.FileSetUtils;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.nodes.impl.NodeFactory;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.NodeKind;
+
+public class FlexRuleTest extends FlexPmdTestBase
+{
+   public class EmptyIfStmtRule extends AbstractAstFlexRule
+   {
+      /*
+       * (non-Javadoc)
+       * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+       */
+      @Override
+      protected final ViolationPriority getDefaultPriority()
+      {
+         return ViolationPriority.NORMAL;
+      }
+
+      /*
+       * (non-Javadoc)
+       * @see
+       * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitIf(com.adobe.ac
+       * .pmd .parser.IParserNode)
+       */
+      @Override
+      protected final void visitIf( final IParserNode ast )
+      {
+         super.visitIf( ast );
+
+         if ( isBlockEmpty( ast.getChild( 1 ) ) )
+         {
+            addViolation( ast );
+         }
+      }
+
+      private boolean isBlockEmpty( final IParserNode block )
+      {
+         return block.is( NodeKind.BLOCK )
+               && block.numChildren() == 0 || block.is( NodeKind.STMT_EMPTY );
+      }
+   }
+
+   @Test
+   public void testExclusions() throws PMDException
+   {
+      final AbstractFlexRule rule = new EmptyIfStmtRule();
+      final IFlexFile duaneMxml = getTestFiles().get( "bug.Duane.mxml" );
+      final Set< String > excludes = new HashSet< String >();
+
+      excludes.add( "" );
+
+      final int noExclusionViolationsLength = rule.processFile( duaneMxml,
+                                                                NodeFactory.createPackage( FileSetUtils.buildAst( duaneMxml ) ),
+                                                                getTestFiles() )
+                                                  .size();
+
+      rule.setExcludes( excludes );
+      final int exclusionViolationsLength = rule.processFile( duaneMxml,
+                                                              NodeFactory.createPackage( FileSetUtils.buildAst( duaneMxml ) ),
+                                                              getTestFiles() )
+                                                .size();
+
+      Assert.assertTrue( noExclusionViolationsLength > exclusionViolationsLength );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/IgnoreRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/IgnoreRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/IgnoreRuleTest.java
new file mode 100644
index 0000000..49d1140
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/IgnoreRuleTest.java
@@ -0,0 +1,129 @@
+/*
+ * 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.core;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.List;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.files.IFlexFile;
+
+public class IgnoreRuleTest extends FlexPmdTestBase
+{
+   private class IgnoredRule extends AbstractFlexRule
+   {
+      private final IFlexFile currentFile;
+
+      protected IgnoredRule( final IFlexFile file )
+      {
+         super();
+         currentFile = file;
+      }
+
+      @Override
+      public String getName()
+      {
+         return "com.adobe.ac.Ignored";
+      }
+
+      @Override
+      protected List< IFlexViolation > findViolationsInCurrentFile()
+      {
+         return null;
+      }
+
+      @Override
+      protected IFlexFile getCurrentFile()
+      {
+         return currentFile;
+      }
+
+      @Override
+      protected ViolationPriority getDefaultPriority()
+      {
+         return ViolationPriority.LOW;
+      }
+
+      @Override
+      protected boolean isConcernedByTheCurrentFile()
+      {
+         return true;
+      }
+   }
+   private static final String AS3_LINE  = "var i : int;";
+   private static final String MXML_LINE = "addedToStage=\"callLater( myFunction )\"";
+
+   private final IgnoredRule   ruleWithAsFile;
+   private final IgnoredRule   ruleWithMxmlFile;
+
+   public IgnoreRuleTest()
+   {
+      ruleWithAsFile = new IgnoredRule( getTestFiles().get( "AbstractRowData.as" ) );
+      ruleWithMxmlFile = new IgnoredRule( getTestFiles().get( "Main.mxml" ) );
+   }
+
+   @Test
+   public final void testIsViolationIgnored()
+   {
+      isIgnored( " NO PMD" );
+   }
+
+   @Test
+   public final void testIsViolationIgnoredCollapsed()
+   {
+      isIgnored( " NOPMD" );
+   }
+
+   @Test
+   public final void testIsViolationIgnoredWithFullCollapsed()
+   {
+      isIgnored( "NOPMD" );
+   }
+
+   @Test
+   public final void testIsViolationIgnoredWithLowerCase()
+   {
+      isIgnored( " No PMD" );
+   }
+
+   private void isIgnored( final String noPmd )
+   {
+      assertTrue( ruleWithAsFile.isViolationIgnored( AS3_LINE
+            + " //" + noPmd ) );
+      assertFalse( ruleWithAsFile.isViolationIgnored( AS3_LINE
+            + " //" + noPmd + " AlertShow" ) );
+      assertTrue( ruleWithAsFile.isViolationIgnored( AS3_LINE
+            + " //" + noPmd + " IgnoreTest$Ignored" ) );
+      assertTrue( ruleWithAsFile.isViolationIgnored( AS3_LINE
+            + " //" + noPmd + " adobe.ac.pmd.rules.core.IgnoreTest$Ignored" ) );
+      assertFalse( ruleWithAsFile.isViolationIgnored( AS3_LINE ) );
+      assertTrue( ruleWithMxmlFile.isViolationIgnored( MXML_LINE
+            + " <!--" + noPmd ) );
+      assertFalse( ruleWithMxmlFile.isViolationIgnored( MXML_LINE
+            + " <!--" + noPmd + " AlertShow" ) );
+      assertTrue( ruleWithMxmlFile.isViolationIgnored( MXML_LINE
+            + " <!--" + noPmd + " IgnoreTest$Ignored" ) );
+      assertTrue( ruleWithMxmlFile.isViolationIgnored( MXML_LINE
+            + " <!--" + noPmd + " adobe.ac.pmd.rules.core.IgnoreTest$Ignored" ) );
+      assertFalse( ruleWithMxmlFile.isViolationIgnored( MXML_LINE ) );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/TestAbstractAstFlexRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/TestAbstractAstFlexRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/TestAbstractAstFlexRule.java
new file mode 100644
index 0000000..c2ea0b5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/TestAbstractAstFlexRule.java
@@ -0,0 +1,146 @@
+/*
+ * 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.core;
+
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.FileSetUtils;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.impl.NodeFactory;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+public class TestAbstractAstFlexRule extends FlexPmdTestBase
+{
+   public class AllRule extends AbstractAstFlexRule
+   {
+      protected boolean catchVisited     = false;
+      protected boolean emptyVisited     = false;
+      protected boolean interfaceVisited = false;
+      protected boolean switchVisited    = false;
+      protected boolean whileVisited     = false;
+
+      @Override
+      protected void findViolations( final IClass classNode )
+      {
+         super.findViolations( classNode );
+
+         addViolation( classNode );
+         addViolation( classNode.getInternalNode(),
+                       "first",
+                       "second" );
+         addViolation( classNode,
+                       "first",
+                       "second" );
+      }
+
+      @Override
+      protected void findViolations( final IFunction function )
+      {
+         super.findViolations( function );
+
+         addViolation( function );
+         addViolation( function,
+                       "toto" );
+      }
+
+      @Override
+      protected ViolationPriority getDefaultPriority()
+      {
+         return ViolationPriority.NORMAL;
+      }
+
+      @Override
+      protected void visitCatch( final IParserNode catchNode )
+      {
+         super.visitCatch( catchNode );
+
+         catchVisited = true;
+      }
+
+      @Override
+      protected void visitEmptyStatetement( final IParserNode statementNode )
+      {
+         super.visitEmptyStatetement( statementNode );
+
+         emptyVisited = true;
+      }
+
+      @Override
+      protected void visitInterface( final IParserNode interfaceNode )
+      {
+         super.visitInterface( interfaceNode );
+
+         interfaceVisited = true;
+      }
+
+      @Override
+      protected void visitSwitch( final IParserNode switchNode )
+      {
+         super.visitSwitch( switchNode );
+
+         switchVisited = true;
+      }
+
+      @Override
+      protected void visitWhile( final IParserNode whileNode )
+      {
+         super.visitWhile( whileNode );
+
+         whileVisited = true;
+      }
+   }
+
+   @Test
+   public void testVisit() throws PMDException
+   {
+      final AllRule rule = new AllRule();
+
+      processFile( rule,
+                   "bug.Duane.mxml" );
+      processFile( rule,
+                   "PngEncoder.as" );
+      processFile( rule,
+                   "Color.as" );
+      processFile( rule,
+                   "AbstractRowData.as" );
+      processFile( rule,
+                   "com.adobe.ac.ncss.LongSwitch.as" );
+      processFile( rule,
+                   "com.adobe.ac.ncss.BigImporterModel.as" );
+
+      Assert.assertTrue( rule.catchVisited );
+      Assert.assertTrue( rule.emptyVisited );
+      Assert.assertTrue( rule.interfaceVisited );
+      Assert.assertTrue( rule.switchVisited );
+      Assert.assertTrue( rule.whileVisited );
+   }
+
+   private void processFile( final AllRule rule,
+                             final String fileName ) throws PMDException
+   {
+      final IFlexFile duane = getTestFiles().get( fileName );
+      rule.processFile( duane,
+                        NodeFactory.createPackage( FileSetUtils.buildAst( duane ) ),
+                        getTestFiles() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/ViolationPriorityTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/ViolationPriorityTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/ViolationPriorityTest.java
new file mode 100644
index 0000000..a3da264
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/ViolationPriorityTest.java
@@ -0,0 +1,35 @@
+/*
+ * 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.core;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class ViolationPriorityTest
+{
+   @Test
+   public void testToString()
+   {
+      assertEquals( "1",
+                    ViolationPriority.HIGH.toString() );
+      assertEquals( "3",
+                    ViolationPriority.NORMAL.toString() );
+      assertEquals( "5",
+                    ViolationPriority.LOW.toString() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/ViolationTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/ViolationTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/ViolationTest.java
new file mode 100644
index 0000000..1ab9e78
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/ViolationTest.java
@@ -0,0 +1,236 @@
+/*
+ * 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.core;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+
+import java.io.FileNotFoundException;
+import java.net.URISyntaxException;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule;
+
+public class ViolationTest extends FlexPmdTestBase
+{
+   private static final int              BEGINNING_COLUMN = 0;
+   private static final int              BEGINNING_LINE   = 1;
+   private static final int              ENDING_COLUMN    = 20;
+   private static final int              ENDING_LINE      = 10;
+   private static final IThresholdedRule INFO_RULE        = new EmptyRule();
+   private static final String           RULE_SET_NAME    = "RuleSetName";
+   private static final IFlexRule        WARNING_RULE     = new WarningRule();
+   private IFlexFile                     abstractRowData;
+   private IFlexFile                     abstractRowDataWithPackage;
+   private IFlexFile                     iterationsListMxml;
+   private final ViolationPosition       position;
+
+   public ViolationTest()
+   {
+      super();
+
+      position = ViolationPosition.create( 10,
+                                           20,
+                                           30,
+                                           30 );
+   }
+
+   @Before
+   public void setUp()
+   {
+      abstractRowData = getTestFiles().get( "AbstractRowData.as" );
+      abstractRowDataWithPackage = getTestFiles().get( "com.adobe.ac.AbstractRowData.as" );
+      iterationsListMxml = getTestFiles().get( "com.adobe.ac.ncss.mxml.IterationsList.mxml" );
+   }
+
+   @Test
+   public void testCompareTo()
+   {
+      final Violation infoViolation = new Violation( position, INFO_RULE, null );
+      final Violation infoViolation2 = new Violation( ViolationPosition.create( 11,
+                                                                                20,
+                                                                                30,
+                                                                                30 ), INFO_RULE, null );
+      final Violation warningViolation = new Violation( position, WARNING_RULE, null );
+      final Violation warningViolation2 = new Violation( position, WARNING_RULE, null );
+
+      assertEquals( -1,
+                    infoViolation.compareTo( infoViolation2 ) );
+      assertEquals( -1,
+                    warningViolation.compareTo( infoViolation ) );
+      assertEquals( 0,
+                    warningViolation.compareTo( warningViolation2 ) );
+      assertEquals( 1,
+                    infoViolation2.compareTo( infoViolation ) );
+      assertEquals( 1,
+                    infoViolation.compareTo( warningViolation ) );
+   }
+
+   @Test
+   public void testGetActualValueForTheCurrentViolation()
+   {
+      final IThresholdedRule thresholdRule = ( IThresholdedRule ) new Violation( position, INFO_RULE, null ).getRule();
+
+      assertEquals( 0,
+                    thresholdRule.getActualValueForTheCurrentViolation() );
+   }
+
+   @Test
+   public void testGetClassName()
+   {
+      assertEquals( "",
+                    new Violation( position, INFO_RULE, null ).getClassName() );
+   }
+
+   @Test
+   public void testGetDefaultThreshold()
+   {
+      assertEquals( Integer.valueOf( ViolationPriority.LOW.toString() ),
+                    Integer.valueOf( new Violation( position, INFO_RULE, null ).getRule().getPriority() ) );
+   }
+
+   @Test
+   public void testGetDescription()
+   {
+      assertEquals( "emptyMessage",
+                    new Violation( position, INFO_RULE, null ).getDescription() );
+   }
+
+   @Test
+   public void testGetEndColumn()
+   {
+      assertEquals( 30,
+                    new Violation( position, INFO_RULE, null ).getEndColumn() );
+   }
+
+   @Test
+   public void testGetFileName()
+   {
+      final Violation infoViolation = new Violation( position, INFO_RULE, abstractRowData );
+
+      assertEquals( "AbstractRowData.as",
+                    infoViolation.getFilename() );
+
+      final Violation infoViolation2 = new Violation( position, INFO_RULE, abstractRowDataWithPackage );
+
+      assertEquals( "com.adobe.ac.AbstractRowData.as",
+                    infoViolation2.getFilename() );
+   }
+
+   @Test
+   public void testGetMethodName()
+   {
+      assertEquals( "",
+                    new Violation( position, INFO_RULE, abstractRowData ).getMethodName() );
+
+   }
+
+   @Test
+   public void testGetPackageName()
+   {
+      assertEquals( "",
+                    new Violation( position, INFO_RULE, abstractRowData ).getPackageName() );
+
+      assertEquals( "com.adobe.ac",
+                    new Violation( position, INFO_RULE, abstractRowDataWithPackage ).getPackageName() );
+   }
+
+   @Test
+   public void testGetRuleMessage()
+   {
+      assertEquals( "emptyMessage",
+                    new Violation( position, INFO_RULE, null ).getRuleMessage() );
+
+      assertEquals( "warning message",
+                    new Violation( position, WARNING_RULE, null ).getRuleMessage() );
+   }
+
+   @Test
+   public void testGetVariableName()
+   {
+      assertEquals( "",
+                    new Violation( position, INFO_RULE, null ).getVariableName() );
+   }
+
+   @Test
+   public void testIsSuppressed()
+   {
+      assertFalse( "",
+                   new Violation( position, INFO_RULE, abstractRowData ).isSuppressed() );
+   }
+
+   @Test
+   public void testToXmlString() throws FileNotFoundException,
+                                URISyntaxException
+   {
+      final Violation infoViolation = new Violation( ViolationPosition.create( BEGINNING_LINE,
+                                                                               ENDING_LINE,
+                                                                               BEGINNING_COLUMN,
+                                                                               ENDING_COLUMN ),
+                                                     INFO_RULE,
+                                                     null );
+
+      assertEquals( "As3 file at a root level",
+                    "      <violation beginline=\""
+                          + BEGINNING_LINE + "\" endline=\"" + ENDING_LINE + "\" begincolumn=\""
+                          + BEGINNING_COLUMN + "\" endcolumn=\"" + ENDING_COLUMN + "\" rule=\""
+                          + INFO_RULE.getRuleName() + "\" ruleset=\"" + RULE_SET_NAME + "\" package=\""
+                          + abstractRowData.getPackageName() + "\" class=\"" + abstractRowData.getClassName()
+                          + "\" externalInfoUrl=\"" + Violation.RULESET_CREATOR_URL + "EmptyRule\" "
+                          + "priority=\"" + INFO_RULE.getPriority() + "\">" + "emptyMessage" + "</violation>"
+                          + infoViolation.getNewLine(),
+                    infoViolation.toXmlString( abstractRowData,
+                                               RULE_SET_NAME ) );
+
+      final Violation warningViolation = new Violation( ViolationPosition.create( BEGINNING_LINE,
+                                                                                  ENDING_LINE,
+                                                                                  BEGINNING_COLUMN,
+                                                                                  ENDING_COLUMN ),
+                                                        WARNING_RULE,
+                                                        null );
+
+      assertEquals( "As3 File at a not-root level",
+                    "      <violation beginline=\""
+                          + BEGINNING_LINE + "\" endline=\"" + ENDING_LINE + "\" begincolumn=\""
+                          + BEGINNING_COLUMN + "\" endcolumn=\"" + ENDING_COLUMN + "\" rule=\""
+                          + WARNING_RULE.getRuleName() + "\" ruleset=\"" + RULE_SET_NAME + "\" package=\""
+                          + abstractRowDataWithPackage.getPackageName() + "\" class=\""
+                          + abstractRowData.getClassName() + "\" externalInfoUrl=\""
+                          + Violation.RULESET_CREATOR_URL + "WarningRule\" " + "priority=\""
+                          + WARNING_RULE.getPriority() + "\">" + "warning message" + "</violation>"
+                          + warningViolation.getNewLine(),
+                    warningViolation.toXmlString( abstractRowDataWithPackage,
+                                                  RULE_SET_NAME ) );
+
+      assertEquals( "Mxml File at a not-root level",
+                    "      <violation beginline=\""
+                          + BEGINNING_LINE + "\" endline=\"" + ENDING_LINE + "\" begincolumn=\""
+                          + BEGINNING_COLUMN + "\" endcolumn=\"" + ENDING_COLUMN + "\" rule=\""
+                          + WARNING_RULE.getRuleName() + "\" ruleset=\"" + RULE_SET_NAME + "\" package=\""
+                          + iterationsListMxml.getPackageName() + "\" class=\""
+                          + iterationsListMxml.getClassName() + "\" externalInfoUrl=\""
+                          + Violation.RULESET_CREATOR_URL + "WarningRule\" " + "priority=\""
+                          + WARNING_RULE.getPriority() + "\">" + "warning message" + "</violation>"
+                          + warningViolation.getNewLine(),
+                    warningViolation.toXmlString( iterationsListMxml,
+                                                  RULE_SET_NAME ) );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/WarningRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/WarningRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/WarningRule.java
new file mode 100644
index 0000000..3898c7e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/WarningRule.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.core;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+public class WarningRule extends AbstractFlexRule
+{
+   @Override
+   public String getMessage()
+   {
+      return "warning message.";
+   }
+
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   @Override
+   protected List< IFlexViolation > findViolationsInCurrentFile()
+   {
+      final ArrayList< IFlexViolation > violations = new ArrayList< IFlexViolation >();
+
+      addViolation( violations,
+                    new ViolationPosition( 0 ) );
+
+      return violations;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/.externalToolBuilders/net.sourceforge.pmd.eclipse.plugin.pmdBuilder.launch
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/.externalToolBuilders/net.sourceforge.pmd.eclipse.plugin.pmdBuilder.launch b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/.externalToolBuilders/net.sourceforge.pmd.eclipse.plugin.pmdBuilder.launch
new file mode 100644
index 0000000..725ec3c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/.externalToolBuilders/net.sourceforge.pmd.eclipse.plugin.pmdBuilder.launch
@@ -0,0 +1,25 @@
+<!--
+
+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.
+
+-->
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="net.sourceforge.pmd.eclipse.plugin.pmdBuilder"/>
+<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/.pmd b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/.pmd
new file mode 100644
index 0000000..5bebc12
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/.pmd
@@ -0,0 +1,935 @@
+<!--
+
+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.
+
+-->
+<?xml version="1.0" encoding="UTF-8"?>
+<pmd>
+    <useProjectRuleSet>false</useProjectRuleSet>
+    <ruleSetFile>.ruleset</ruleSetFile>
+    <rules>
+        <rule>
+            <name>AvoidDecimalLiteralsInBigDecimalConstructor</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidMultipleUnaryOperators</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThreadGroup</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingHardCodedIP</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingOctalValues</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BigIntegerInstantiation</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanInstantiation</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BrokenNullCheck</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CheckResultSet</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassCastExceptionWithToArray</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CollapsibleIfStatements</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoubleCheckedLocking</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyCatchBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyFinallyBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyIfStmt</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyStatementNotInLoop</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyStaticInitializer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptySwitchStatements</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptySynchronizedBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyTryBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyWhileStmt</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ForLoopShouldBeWhileLoop</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JumbledIncrementer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MisplacedNullCheck</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OverrideBothEqualsAndHashcode</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReturnFromFinallyBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnconditionalIfStatement</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryConversionTemporary</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryFinalModifier</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryReturn</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedNullCheckInEquals</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessOperationOnImmutable</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessOverridingMethod</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ForLoopsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IfElseStmtsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IfStmtsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>WhileLoopsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloneThrowsCloneNotSupportedException</name>
+            <ruleset>Clone Implementation Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ProperCloneImplementation</name>
+            <ruleset>Clone Implementation Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CyclomaticComplexity</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveClassLength</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveMethodLength</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveParameterList</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessivePublicCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssConstructorCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssMethodCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssTypeCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NPathComplexity</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyFields</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyMethods</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AssignmentInOperand</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AtLeastOneConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidAccessibilityAlteration</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingNativeCode</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingShortType</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingVolatile</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanInversion</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CallSuperInConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DataflowAnomalyAnalysis</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DefaultPackage</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotCallGarbageCollectionExplicitly</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DontImportSun</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NullAssignment</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OnlyOneReturn</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousOctalEscape</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryParentheses</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedModifier</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CouplingBetweenObjects</name>
+            <ruleset>Coupling Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveImports</name>
+            <ruleset>Coupling Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractClassWithoutAbstractMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractClassWithoutAnyMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AccessorClassGeneration</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AssignmentToNonFinalStatic</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidConstantsInterface</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDeeplyNestedIfStmts</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidInstanceofChecksInCatchClause</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidProtectedFieldInFinalClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidReassigningParameters</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidSynchronizedAtMethodLevel</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BadComparison</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassWithOnlyPrivateConstructorsShouldBeFinal</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloseResource</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CompareObjectsWithEquals</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConfusingTernary</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConstructorCallsOverridableMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DefaultLabelNotLastInSwitchStmt</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EqualsNull</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalFieldCouldBeStatic</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IdempotentOperations</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ImmutableField</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InstantiationToGetClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingBreakInSwitch</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingStaticMethodInNonInstantiatableClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonCaseLabelInSwitchStatement</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonStaticInitializer</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonThreadSafeSingleton</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OptimizableToArrayCall</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PositionLiteralsFirstInComparisons</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PreserveStackTrace</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReturnEmptyArrayRatherThanNull</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimpleDateFormatNeedsLocale</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanExpressions</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanReturns</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyConditional</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SingularField</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SwitchDensity</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SwitchStmtsShouldHaveDefault</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooFewBranchesForASwitchStatement</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UncommentedEmptyConstructor</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UncommentedEmptyMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryLocalBeforeReturn</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnsynchronizedStaticDateFormatter</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseCollectionIsEmpty</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseLocaleWithCaseConversions</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseNotifyAllInsteadOfNotify</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseSingleton</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCallingFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyFinalizer</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeDoesNotCallSuperFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeOnlyCallsSuperFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeOverloaded</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeShouldBeProtected</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DontImportJavaLang</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DuplicateImports</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ImportFromSamePackage</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyStaticImports</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotCallSystemExit</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotUseThreads</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalHomeNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalInterfaceSessionNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MDBAndSessionBeanNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>RemoteInterfaceNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>RemoteSessionInterfaceNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StaticEJBFieldShouldBeFinal</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseProperClassLoader</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ProperLogger</name>
+            <ruleset>Jakarta Commons Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseCorrectExceptionLogging</name>
+            <ruleset>Jakarta Commons Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidPrintStackTrace</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LoggerIsNotStaticFinal</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MoreThanOneLogger</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SystemPrintln</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingSerialVersionUID</name>
+            <ruleset>JavaBean Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitAssertionsShouldIncludeMessage</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitSpelling</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitStaticSuite</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitTestsShouldIncludeAssert</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanAssertion</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TestClassWithoutTestCases</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryBooleanAssertion</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertEqualsInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertNullInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertSameInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidAssertAsIdentifier</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidEnumAsIdentifier</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ByteInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IntegerInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4SuitesShouldUseSuiteAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseAfterAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseBeforeAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseTestAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitUseExpected</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LongInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceEnumerationWithIterator</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceHashtableWithMap</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceVectorWithList</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractNaming</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDollarSigns</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFieldNameMatchingMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFieldNameMatchingTypeName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanGetMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodWithSameNameAsEnclosingClass</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MisleadingVariableName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NoPackage</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PackageCase</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortVariable</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousConstantFieldName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousEqualsMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousHashcodeMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>VariableNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AddEmptyString</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidArrayLoops</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidInstantiatingObjectsInLoops</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalVariableCouldBeFinal</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodArgumentCouldBeFinal</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyStartsWith</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryWrapperObjectCreation</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseArrayListInsteadOfVector</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseArraysAsList</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseStringBufferForStringAppends</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ArrayIsStoredDirectly</name>
+            <ruleset>Security Code Guidelines</ruleset>
+        </rule>
+        <rule>
+            <name>MethodReturnsInternalArray</name>
+            <ruleset>Security Code Guidelines</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCatchingNPE</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCatchingThrowable</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidRethrowingException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingNullPointerException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingRawExceptionTypes</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotExtendJavaLangError</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotThrowExceptionInFinally</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExceptionAsFlowControl</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AppendCharacterWithChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDuplicateLiterals</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidStringBufferField</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConsecutiveLiteralAppends</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InefficientEmptyStringCheck</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InefficientStringBuffering</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InsufficientStringBufferDeclaration</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringBufferInstantiationWithChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringInstantiation</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringToString</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryCaseChange</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseEqualsToCompareStrings</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseIndexOfChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessStringValueOf</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseStringBufferLength</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloneMethodMustImplementCloneable</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LooseCoupling</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SignatureDeclareThrowsException</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedImports</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedFormalParameter</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedLocalVariable</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedPrivateField</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedPrivateMethod</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+    </rules>
+    <includeDerivedFiles>false</includeDerivedFiles>
+    <violationsAsErrors>true</violationsAsErrors>
+</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/pom.xml
new file mode 100644
index 0000000..960c505
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/pom.xml
@@ -0,0 +1,83 @@
+<!--
+
+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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-ruleset</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Adobe Flex PMD RuleSet</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>dom4j</groupId>
+            <artifactId>dom4j</artifactId>
+            <version>${dom4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>${project.artifactId}-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-test-resources</artifactId>
+            <version>${project.parent.version}</version>
+            <classifier>resources</classifier>
+            <type>zip</type>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <testResources>
+            <testResource>
+                <directory>${project.build.directory}/test/generated-resources</directory>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-test-resources</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeGroupIds>${project.groupId}</includeGroupIds>
+                            <includes>**/*.as,**/*.mxml</includes>
+                            <outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
+                            <excludeTransitive>true</excludeTransitive>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/architecture/MonkeyPatchingRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/architecture/MonkeyPatchingRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/architecture/MonkeyPatchingRule.java
new file mode 100644
index 0000000..fb24575
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/architecture/MonkeyPatchingRule.java
@@ -0,0 +1,72 @@
+/*
+ * 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.architecture;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class MonkeyPatchingRule extends AbstractFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#findViolationsInCurrentFile()
+    */
+   @Override
+   protected final List< IFlexViolation > findViolationsInCurrentFile()
+   {
+      final List< IFlexViolation > violations = new ArrayList< IFlexViolation >();
+
+      if ( getCurrentFile().getPackageName().startsWith( "mx." )
+            && !getCurrentFile().getClassName().equals( "Version.as" )
+            && !getCurrentFile().getClassName().endsWith( "Style.as" ) )
+      {
+         addViolation( violations,
+                       new ViolationPosition( 0 ) );
+      }
+      return violations;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   protected final boolean isConcernedByTheCurrentFile()
+   {
+      return !getCurrentFile().isMxml();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/architecture/UseInternalClassOutsideApiClass.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/architecture/UseInternalClassOutsideApiClass.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/architecture/UseInternalClassOutsideApiClass.java
new file mode 100644
index 0000000..ccda5a6
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/architecture/UseInternalClassOutsideApiClass.java
@@ -0,0 +1,126 @@
+/*
+ * 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.architecture;
+
+import org.apache.commons.lang.StringUtils;
+
+import com.adobe.ac.pmd.nodes.IPackage;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class UseInternalClassOutsideApiClass extends AbstractAstFlexRule
+{
+   private static final String API_PACKAGE_NAME      = "api";
+   private static final String INTERNAL_PACKAGE_NAME = "restricted";
+   private static final String PACKAGE_SEPARATOR     = ".";
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IPackage)
+    */
+   @Override
+   protected final void findViolations( final IPackage packageNode )
+   {
+      final String packageName = packageNode.getName();
+      final boolean isApiClass = isApiClass( packageName );
+      final boolean isInternalClass = isInternalClass( packageName );
+      String functionAreaName = null;
+
+      if ( isApiClass
+            || isInternalClass )
+      {
+         functionAreaName = extractFunctionalArea( packageName,
+                                                   false );
+      }
+      for ( final IParserNode importNode : packageNode.getImports() )
+      {
+         final String importName = importNode.getStringValue();
+         final String importFunctionalArea = extractFunctionalArea( importName,
+                                                                    true );
+
+         if ( doesLineContainPackageReference( importName,
+                                               INTERNAL_PACKAGE_NAME )
+               && ( functionAreaName == null || !functionAreaName.equals( importFunctionalArea ) ) )
+         {
+            addViolation( importNode,
+                          importName,
+                          importFunctionalArea );
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   private boolean doesLineContainPackageReference( final String line,
+                                                    final String packageName )
+   {
+      return line.contains( PACKAGE_SEPARATOR
+            + packageName );
+   }
+
+   private String extractFunctionalArea( final String packageName,
+                                         final boolean isInImport )
+   {
+      if ( packageName.contains( INTERNAL_PACKAGE_NAME ) )
+      {
+         return extractFunctionArea( packageName,
+                                     INTERNAL_PACKAGE_NAME,
+                                     isInImport );
+      }
+      return extractFunctionArea( packageName,
+                                  API_PACKAGE_NAME,
+                                  isInImport );
+   }
+
+   private String extractFunctionArea( final String packageName,
+                                       final String visibilityPackageName,
+                                       final boolean isInImport )
+   {
+      return StringUtils.substringAfterLast( StringUtils.substringBeforeLast( packageName,
+                                                                              PACKAGE_SEPARATOR
+                                                                                    + visibilityPackageName
+                                                                                    + ( isInImport ? PACKAGE_SEPARATOR
+                                                                                                  : "" ) ),
+                                             PACKAGE_SEPARATOR );
+   }
+
+   private boolean isApiClass( final String packageName )
+   {
+      return doesLineContainPackageReference( packageName,
+                                              API_PACKAGE_NAME );
+   }
+
+   private boolean isInternalClass( final String packageName )
+   {
+      return doesLineContainPackageReference( packageName,
+                                              INTERNAL_PACKAGE_NAME );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/architecture/ViewComponentReferencedInModelRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/architecture/ViewComponentReferencedInModelRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/architecture/ViewComponentReferencedInModelRule.java
new file mode 100644
index 0000000..ec5a40f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/architecture/ViewComponentReferencedInModelRule.java
@@ -0,0 +1,87 @@
+/*
+ * 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.architecture;
+
+import java.util.Locale;
+import java.util.regex.Matcher;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class ViewComponentReferencedInModelRule extends AbstractRegexpBasedRule // NO_UCD
+{
+   private static final String ALERT_CLASS_NAME           = "Alert";
+   private static final String FLEX_CONTROLS_PACKAGE_NAME = "mx.controls";
+   private static final String MODEL_CLASS_SUFFIX         = "model";
+   private static final String MODEL_PACKAGE_NAME         = ".model";
+   private static final String VIEW_PACKAGE_NAME          = ".view";
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected final String getRegexp()
+   {
+      return ".*import (.*);?.*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   protected final boolean isConcernedByTheCurrentFile()
+   {
+      return !getCurrentFile().isMxml()
+            && getCurrentFile().getFullyQualifiedName()
+                               .toLowerCase( Locale.ENGLISH )
+                               .contains( MODEL_CLASS_SUFFIX );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected final boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      final Matcher matcher = getMatcher( line );
+
+      matcher.matches();
+      final String importedClass = matcher.group( 1 );
+
+      return importedClass.contains( FLEX_CONTROLS_PACKAGE_NAME )
+            && !importedClass.contains( ALERT_CLASS_NAME ) || importedClass.contains( VIEW_PACKAGE_NAME )
+            && !importedClass.contains( MODEL_PACKAGE_NAME );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/asdocs/AbstractAsDocRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/asdocs/AbstractAsDocRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/asdocs/AbstractAsDocRule.java
new file mode 100644
index 0000000..d0d8864
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/asdocs/AbstractAsDocRule.java
@@ -0,0 +1,37 @@
+/*
+ * 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.asdocs;
+
+import com.adobe.ac.pmd.nodes.IAsDocHolder;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+
+/**
+ * @author xagnetti
+ */
+abstract class AbstractAsDocRule extends AbstractAstFlexRule
+{
+   /**
+    * @param asDocHolder
+    */
+   protected void addViolationIfAsDocMissing( final IAsDocHolder asDocHolder )
+   {
+      if ( asDocHolder.getAsDoc() == null )
+      {
+         addViolation( asDocHolder );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/asdocs/AttributeAsDocMissingRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/asdocs/AttributeAsDocMissingRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/asdocs/AttributeAsDocMissingRule.java
new file mode 100644
index 0000000..b2d23f9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/asdocs/AttributeAsDocMissingRule.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.asdocs;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class AttributeAsDocMissingRule extends AbstractAsDocRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromAttributes
+    * (java.util.List)
+    */
+   @Override
+   protected void findViolationsFromAttributes( final List< IAttribute > variables )
+   {
+      for ( final IAttribute attribute : variables )
+      {
+         addViolationIfAsDocMissing( attribute );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/asdocs/ClassAsDocMissingRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/asdocs/ClassAsDocMissingRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/asdocs/ClassAsDocMissingRule.java
new file mode 100644
index 0000000..a1b0431
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/asdocs/ClassAsDocMissingRule.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.asdocs;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class ClassAsDocMissingRule extends AbstractAsDocRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#isConcernedByTheCurrentFile
+    * ()
+    */
+   @Override
+   public boolean isConcernedByTheCurrentFile()
+   {
+      return !getCurrentFile().isMxml();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected void findViolations( final IClass classNode )
+   {
+      addViolationIfAsDocMissing( classNode );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/asdocs/MethodAsDocMissingRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/asdocs/MethodAsDocMissingRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/asdocs/MethodAsDocMissingRule.java
new file mode 100644
index 0000000..faf6056
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/asdocs/MethodAsDocMissingRule.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.asdocs;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.Modifier;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class MethodAsDocMissingRule extends AbstractAsDocRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void findViolations( final IFunction function )
+   {
+      if ( ( function.isPublic() || function.is( Modifier.PROTECTED ) )
+            && !function.isGetter() && !function.isSetter() && function.getAsDoc() == null )
+      {
+         addViolation( function );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}


[49/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/main/java/de/bokelberg/flex/parser/AS3Parser.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/main/java/de/bokelberg/flex/parser/AS3Parser.java b/FlexPMD/as3-parser/src/main/java/de/bokelberg/flex/parser/AS3Parser.java
deleted file mode 100644
index d12f099..0000000
--- a/FlexPMD/as3-parser/src/main/java/de/bokelberg/flex/parser/AS3Parser.java
+++ /dev/null
@@ -1,2360 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.adobe.ac.pmd.files.impl.FileUtils;
-import com.adobe.ac.pmd.parser.IAS3Parser;
-import com.adobe.ac.pmd.parser.IParserNode;
-import com.adobe.ac.pmd.parser.KeyWords;
-import com.adobe.ac.pmd.parser.NodeKind;
-import com.adobe.ac.pmd.parser.Operators;
-import com.adobe.ac.pmd.parser.exceptions.NullTokenException;
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-import com.adobe.ac.pmd.parser.exceptions.UnExpectedTokenException;
-import com.adobe.ac.pmd.parser.exceptions.UnExpectedTokenException.Position;
-
-import de.bokelberg.flex.parser.AS3Scanner.Token;
-
-/**
- * @author xagnetti
- */
-public class AS3Parser implements IAS3Parser
-{
-   /**
-    * 
-    */
-   public static final String  ASDOC_COMMENT          = "/**";
-   /**
-    * 
-    */
-   public static final String  MULTIPLE_LINES_COMMENT = "/*";
-   /**
-    * 
-    */
-   public static final String  NEW_LINE               = "\n";
-   /**
-    * 
-    */
-   public static final String  SINGLE_LINE_COMMENT    = "//";
-   private static final String VECTOR                 = "Vector";
-   private Node                currentAsDoc;
-   private Node                currentFunctionNode;
-   private Node                currentMultiLineComment;
-   private String              fileName;
-   private boolean             isInFor;
-   private AS3Scanner          scn;
-   private Token               tok;
-
-   /**
-    * 
-    */
-   public AS3Parser()
-   {
-      this.scn = new AS3Scanner();
-      isInFor = false;
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see de.bokelberg.flex.parser.IAS3Parser#buildAst(java.lang.String)
-    */
-   public final IParserNode buildAst( final String filePath ) throws IOException,
-                                                             TokenException
-   {
-      return parseLines( filePath,
-                         FileUtils.readLines( new File( filePath ) ) );
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see com.adobe.ac.pmd.parser.IAS3Parser#buildAst(java.lang.String,
-    * java.lang.String[])
-    */
-   public final IParserNode buildAst( final String filePath,
-                                      final String[] scriptBlockLines ) throws TokenException
-   {
-      return parseLines( filePath,
-                         scriptBlockLines );
-   }
-
-   /**
-    * @return
-    */
-   final AS3Scanner getScn()
-   {
-      return scn;
-   }
-
-   final void nextToken() throws TokenException
-   {
-      nextToken( false );
-   }
-
-   /**
-    * Get the next token Skip comments and newlines for now In the end we want
-    * to keep them though.
-    * 
-    * @throws TokenException
-    */
-   final void nextToken( final boolean ignoreDocumentation ) throws TokenException
-   {
-      do
-      {
-         if ( ignoreDocumentation )
-         {
-            nextTokenIgnoringDocumentation();
-         }
-         else
-         {
-            nextTokenAllowNewLine();
-         }
-      }
-      while ( tok.getText().equals( NEW_LINE ) );
-   }
-
-   /**
-    * tok is first content token
-    * 
-    * @throws TokenException
-    */
-   final Node parseClassContent() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.CONTENT,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      final List< Token > modifiers = new ArrayList< Token >();
-      final List< Node > meta = new ArrayList< Node >();
-
-      while ( !tokIs( Operators.RIGHT_CURLY_BRACKET ) )
-      {
-         if ( tokIs( Operators.LEFT_CURLY_BRACKET ) )
-         {
-            result.addChild( parseBlock() );
-         }
-         if ( tokIs( Operators.LEFT_SQUARE_BRACKET ) )
-         {
-            meta.add( parseMetaData() );
-         }
-         else if ( tokIs( KeyWords.VAR ) )
-         {
-            parseClassField( result,
-                             modifiers,
-                             meta );
-         }
-         else if ( tokIs( KeyWords.CONST ) )
-         {
-            parseClassConstant( result,
-                                modifiers,
-                                meta );
-         }
-         else if ( tokIs( KeyWords.IMPORT ) )
-         {
-            result.addChild( parseImport() );
-         }
-         else if ( tokIs( KeyWords.FUNCTION ) )
-         {
-            parseClassFunctions( result,
-                                 modifiers,
-                                 meta );
-         }
-         else
-         {
-            tryToParseCommentNode( result,
-                                   modifiers );
-         }
-      }
-      return result;
-   }
-
-   /**
-    * tok is empty, since nextToken has not been called before
-    * 
-    * @throws UnExpectedTokenException
-    */
-   final Node parseCompilationUnit() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.COMPILATION_UNIT,
-                                       -1,
-                                       -1 );
-
-      nextTokenIgnoringDocumentation();
-      if ( tokIs( KeyWords.PACKAGE ) )
-      {
-         result.addChild( parsePackage() );
-      }
-      result.addChild( parsePackageContent() );
-      return result;
-   }
-
-   /**
-    * @return
-    * @throws TokenException
-    */
-   final IParserNode parseExpression() throws TokenException
-   {
-      return parseAssignmentExpression();
-   }
-
-   /**
-    * tok is first content token
-    * 
-    * @throws TokenException
-    */
-   final Node parseInterfaceContent() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.CONTENT,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      while ( !tokIs( Operators.RIGHT_CURLY_BRACKET ) )
-      {
-         if ( tokIs( KeyWords.IMPORT ) )
-         {
-            result.addChild( parseImport() );
-         }
-         else if ( tokIs( KeyWords.FUNCTION ) )
-         {
-            result.addChild( parseFunctionSignature() );
-         }
-         else if ( tokIs( KeyWords.INCLUDE )
-               || tokIs( KeyWords.INCLUDE_AS2 ) )
-         {
-            result.addChild( parseIncludeExpression() );
-         }
-         else if ( tokIs( Operators.LEFT_SQUARE_BRACKET ) )
-         {
-            while ( !tokIs( Operators.RIGHT_SQUARE_BRACKET ) )
-            {
-               nextToken();
-            }
-            nextToken();
-         }
-         else
-         {
-            tryToParseCommentNode( result,
-                                   null );
-         }
-      }
-      return result;
-   }
-
-   /**
-    * tok is first token of content
-    * 
-    * @throws UnExpectedTokenException
-    */
-   final Node parsePackageContent() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.CONTENT,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      final List< Token > modifiers = new ArrayList< Token >();
-      final List< Node > meta = new ArrayList< Node >();
-
-      while ( !tokIs( Operators.RIGHT_CURLY_BRACKET )
-            && !tokIs( KeyWords.EOF ) )
-      {
-         if ( tokIs( KeyWords.IMPORT ) )
-         {
-            result.addChild( parseImport() );
-         }
-         else if ( tokIs( KeyWords.USE ) )
-         {
-            result.addChild( parseUse() );
-         }
-         else if ( tokIs( Operators.LEFT_SQUARE_BRACKET ) )
-         {
-            meta.add( parseMetaData() );
-         }
-         else if ( tokIs( KeyWords.CLASS ) )
-         {
-            result.addChild( parseClass( meta,
-                                         modifiers ) );
-
-            modifiers.clear();
-            meta.clear();
-         }
-         else if ( tokIs( KeyWords.INTERFACE ) )
-         {
-            result.addChild( parseInterface( meta,
-                                             modifiers ) );
-            modifiers.clear();
-            meta.clear();
-         }
-         else if ( tokIs( KeyWords.FUNCTION ) )
-         {
-            parseClassFunctions( result,
-                                 modifiers,
-                                 meta );
-         }
-         else if ( tok.getText().startsWith( ASDOC_COMMENT ) )
-         {
-            currentAsDoc = Node.create( NodeKind.AS_DOC,
-                                        tok.getLine(),
-                                        tok.getColumn(),
-                                        tok.getText() );
-            nextToken();
-         }
-         else if ( tok.getText().startsWith( MULTIPLE_LINES_COMMENT ) )
-         {
-            currentMultiLineComment = Node.create( NodeKind.MULTI_LINE_COMMENT,
-                                                   tok.getLine(),
-                                                   tok.getColumn(),
-                                                   tok.getText() );
-            nextToken();
-         }
-         else
-         {
-            modifiers.add( tok );
-            nextTokenIgnoringDocumentation();
-         }
-      }
-      return result;
-   }
-
-   /**
-    * @return
-    * @throws TokenException
-    */
-   final Node parsePrimaryExpression() throws TokenException
-   {
-      Node result = Node.create( NodeKind.PRIMARY,
-                                 tok.getLine(),
-                                 tok.getColumn(),
-                                 tok.getText() );
-
-      if ( tokIs( Operators.LEFT_SQUARE_BRACKET ) )
-      {
-         result.addChild( parseArrayLiteral() );
-      }
-      else if ( tokIs( Operators.LEFT_CURLY_BRACKET ) )
-      {
-         result.addChild( parseObjectLiteral() );
-      }
-      else if ( tokIs( KeyWords.FUNCTION ) )
-      {
-         result.addChild( parseLambdaExpression() );
-      }
-      else if ( tokIs( KeyWords.NEW ) )
-      {
-         result = parseNewExpression();
-      }
-      else if ( tokIs( Operators.LEFT_PARENTHESIS ) )
-      {
-         result.addChild( parseEncapsulatedExpression() );
-      }
-      else
-      {
-         nextToken( true );
-      }
-      return result;
-   }
-
-   /**
-    * tok is the first token of a statement
-    * 
-    * @throws TokenException
-    */
-   final IParserNode parseStatement() throws TokenException
-   {
-      IParserNode result;
-
-      if ( tokIs( KeyWords.FOR ) )
-      {
-         result = parseFor();
-      }
-      else if ( tokIs( KeyWords.IF ) )
-      {
-         result = parseIf();
-      }
-      else if ( tokIs( KeyWords.SWITCH ) )
-      {
-         result = parseSwitch();
-      }
-      else if ( tokIs( KeyWords.DO ) )
-      {
-         result = parseDo();
-      }
-      else if ( tokIs( KeyWords.WHILE ) )
-      {
-         result = parseWhile();
-      }
-      else if ( tokIs( KeyWords.TRY ) )
-      {
-         result = parseTry();
-      }
-      else if ( tokIs( KeyWords.CATCH ) )
-      {
-         result = parseCatch();
-      }
-      else if ( tokIs( KeyWords.FINALLY ) )
-      {
-         result = parseFinally();
-      }
-      else if ( tokIs( Operators.LEFT_CURLY_BRACKET ) )
-      {
-         result = parseBlock();
-      }
-      else if ( tokIs( KeyWords.VAR ) )
-      {
-         result = parseVar();
-      }
-      else if ( tokIs( KeyWords.CONST ) )
-      {
-         result = parseConst();
-      }
-      else if ( tokIs( KeyWords.RETURN ) )
-      {
-         result = parseReturnStatement();
-      }
-      else if ( tokIs( Operators.SEMI_COLUMN ) )
-      {
-         result = parseEmptyStatement();
-      }
-      else
-      {
-         result = parseExpressionList();
-         skip( Operators.SEMI_COLUMN );
-      }
-      return result;
-   }
-
-   /**
-    * @return
-    * @throws TokenException
-    */
-   final Node parseUnaryExpression() throws TokenException
-   {
-      Node result;
-      if ( tokIs( Operators.INCREMENT ) )
-      {
-         nextToken();
-         result = Node.create( NodeKind.PRE_INC,
-                               tok.getLine(),
-                               tok.getColumn(),
-                               parseUnaryExpression() );
-      }
-      else if ( tokIs( Operators.DECREMENT ) )
-      {
-         nextToken();
-         result = Node.create( NodeKind.PRE_DEC,
-                               tok.getLine(),
-                               tok.getColumn(),
-                               parseUnaryExpression() );
-      }
-      else if ( tokIs( Operators.MINUS ) )
-      {
-         nextToken();
-         result = Node.create( NodeKind.MINUS,
-                               tok.getLine(),
-                               tok.getColumn(),
-                               parseUnaryExpression() );
-      }
-      else if ( tokIs( Operators.PLUS )
-            || tokIs( Operators.PLUS_AS2 ) )
-      {
-         nextToken();
-         result = Node.create( NodeKind.PLUS,
-                               tok.getLine(),
-                               tok.getColumn(),
-                               parseUnaryExpression() );
-      }
-      else
-      {
-         result = parseUnaryExpressionNotPlusMinus();
-      }
-      return result;
-   }
-
-   private IParserNode collectVarListContent( final Node result ) throws TokenException
-   {
-      result.addChild( parseNameTypeInit() );
-      while ( tokIs( Operators.COMMA ) )
-      {
-         nextToken( true );
-         result.addChild( parseNameTypeInit() );
-      }
-      return result;
-   }
-
-   private void consume( final KeyWords keyword ) throws TokenException
-   {
-      consume( keyword.toString() );
-   }
-
-   private void consume( final Operators operator ) throws TokenException
-   {
-      consume( operator.toString() );
-   }
-
-   /**
-    * Compare the current token to the parameter. If it equals, get the next
-    * token. If not, throw a runtime exception.
-    * 
-    * @param text
-    * @throws UnExpectedTokenException
-    */
-   private void consume( final String text ) throws TokenException
-   {
-      while ( tok.getText().startsWith( "//" ) )
-      {
-         nextToken();
-      }
-
-      if ( !tokIs( text ) )
-      {
-         throw new UnExpectedTokenException( tok.getText(),
-                                             new Position( tok.getLine(), tok.getColumn() ),
-                                             fileName,
-                                             text );
-      }
-      nextToken();
-   }
-
-   private Node convertMeta( final List< Node > metadataList )
-   {
-      if ( metadataList == null
-            || metadataList.isEmpty() )
-      {
-         return null;
-      }
-
-      final Node result = Node.create( NodeKind.META_LIST,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-
-      for ( final Node metadataNode : metadataList )
-      {
-         result.addChild( metadataNode );
-      }
-      return result;
-   }
-
-   private Node convertModifiers( final List< Token > modifierList )
-   {
-      if ( modifierList == null )
-      {
-         return null;
-      }
-
-      final Node result = Node.create( NodeKind.MOD_LIST,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-
-      for ( final Token modifierToken : modifierList )
-      {
-         result.addChild( NodeKind.MODIFIER,
-                          tok.getLine(),
-                          tok.getColumn(),
-                          modifierToken.getText() );
-      }
-      return result;
-   }
-
-   private Node[] doParseSignature() throws TokenException
-   {
-      consume( KeyWords.FUNCTION );
-
-      Node type = Node.create( NodeKind.TYPE,
-                               tok.getLine(),
-                               tok.getColumn(),
-                               KeyWords.FUNCTION.toString() );
-      if ( tokIs( KeyWords.SET )
-            || tokIs( KeyWords.GET ) )
-      {
-         type = Node.create( NodeKind.TYPE,
-                             tok.getLine(),
-                             tok.getColumn(),
-                             tok.getText() );
-         nextToken(); // set or get
-      }
-      final Node name = Node.create( NodeKind.NAME,
-                                     tok.getLine(),
-                                     tok.getColumn(),
-                                     tok.getText() );
-      nextToken(); // name
-      final Node params = parseParameterList();
-      final Node returnType = parseOptionalType();
-      return new Node[]
-      { type,
-                  name,
-                  params,
-                  returnType };
-   }
-
-   private NodeKind findFunctionTypeFromSignature( final Node[] signature )
-   {
-      for ( final Node node : signature )
-      {
-         if ( node.is( NodeKind.TYPE ) )
-         {
-            if ( node.getStringValue().equals( "set" ) )
-            {
-               return NodeKind.SET;
-            }
-            if ( node.getStringValue().equals( "get" ) )
-            {
-               return NodeKind.GET;
-            }
-            return NodeKind.FUNCTION;
-         }
-      }
-      return NodeKind.FUNCTION;
-   }
-
-   /**
-    * Get the next token Skip comments but keep newlines We need this method for
-    * beeing able to decide if a returnStatement has an expression
-    * 
-    * @throws UnExpectedTokenException
-    */
-   private void nextTokenAllowNewLine() throws TokenException
-   {
-      do
-      {
-         tok = scn.nextToken();
-
-         if ( tok == null )
-         {
-            throw new NullTokenException( fileName );
-
-         }
-         if ( tok.getText() == null )
-         {
-            throw new NullTokenException( fileName );
-         }
-      }
-      while ( tok.getText().startsWith( SINGLE_LINE_COMMENT ) );
-   }
-
-   private void nextTokenIgnoringDocumentation() throws TokenException
-   {
-      do
-      {
-         nextToken();
-      }
-      while ( tok.getText().startsWith( MULTIPLE_LINES_COMMENT ) );
-   }
-
-   private IParserNode parseAdditiveExpression() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.ADD,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseMultiplicativeExpression() );
-      while ( tokIs( Operators.PLUS )
-            || tokIs( Operators.PLUS_AS2 ) || tokIs( Operators.MINUS ) )
-      {
-         result.addChild( Node.create( NodeKind.OP,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       tok.getText() ) );
-         nextToken( true );
-         result.addChild( parseMultiplicativeExpression() );
-      }
-      return result.numChildren() > 1 ? result
-                                     : result.getChild( 0 );
-   }
-
-   // ------------------------------------------------------------------------
-   // language specific recursive descent parsing
-   // ------------------------------------------------------------------------
-
-   private IParserNode parseAndExpression() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.AND,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseBitwiseOrExpression() );
-      while ( tokIs( Operators.AND )
-            || tokIs( Operators.AND_AS2 ) )
-      {
-         result.addChild( Node.create( NodeKind.OP,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       tok.getText() ) );
-         nextToken( true );
-         result.addChild( parseBitwiseOrExpression() );
-      }
-      return result.numChildren() > 1 ? result
-                                     : result.getChild( 0 );
-   }
-
-   /**
-    * tok is ( exit tok is first token after )
-    */
-   private Node parseArgumentList() throws TokenException
-   {
-      consume( Operators.LEFT_PARENTHESIS );
-      final Node result = Node.create( NodeKind.ARGUMENTS,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      while ( !tokIs( Operators.RIGHT_PARENTHESIS ) )
-      {
-         result.addChild( parseExpression() );
-         skip( Operators.COMMA );
-      }
-      consume( Operators.RIGHT_PARENTHESIS );
-      return result;
-   }
-
-   private Node parseArrayAccessor( final Node node ) throws TokenException
-   {
-      final Node result = Node.create( NodeKind.ARRAY_ACCESSOR,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      result.addChild( node );
-      while ( tokIs( Operators.LEFT_SQUARE_BRACKET ) )
-      {
-         nextToken( true );
-         result.addChild( parseExpression() );
-         consume( Operators.RIGHT_SQUARE_BRACKET );
-      }
-      return result;
-   }
-
-   /**
-    * tok is [
-    */
-   private IParserNode parseArrayLiteral() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.ARRAY,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      consume( Operators.LEFT_SQUARE_BRACKET );
-      while ( !tokIs( Operators.RIGHT_SQUARE_BRACKET ) )
-      {
-         result.addChild( parseExpression() );
-         skip( Operators.COMMA );
-      }
-      consume( Operators.RIGHT_SQUARE_BRACKET );
-      return result;
-   }
-
-   private IParserNode parseAssignmentExpression() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.ASSIGN,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseConditionalExpression() );
-      while ( tokIs( Operators.EQUAL )
-            || tokIs( Operators.PLUS_EQUAL ) || tokIs( Operators.MINUS_EQUAL )
-            || tokIs( Operators.TIMES_EQUAL ) || tokIs( Operators.DIVIDED_EQUAL )
-            || tokIs( Operators.MODULO_EQUAL ) || tokIs( Operators.AND_EQUAL ) || tokIs( Operators.OR_EQUAL )
-            || tokIs( Operators.XOR_EQUAL ) )
-      {
-         result.addChild( Node.create( NodeKind.OP,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       tok.getText() ) );
-         nextToken( true );
-         result.addChild( parseExpression() );
-      }
-      return result.numChildren() > 1 ? result
-                                     : result.getChild( 0 );
-   }
-
-   private IParserNode parseBitwiseAndExpression() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.B_AND,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseEqualityExpression() );
-      while ( tokIs( Operators.B_AND ) )
-      {
-         result.addChild( Node.create( NodeKind.OP,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       tok.getText() ) );
-         nextToken( true );
-         result.addChild( parseEqualityExpression() );
-      }
-      return result.numChildren() > 1 ? result
-                                     : result.getChild( 0 );
-   }
-
-   private IParserNode parseBitwiseOrExpression() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.B_OR,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseBitwiseXorExpression() );
-      while ( tokIs( Operators.B_OR ) )
-      {
-         result.addChild( Node.create( NodeKind.OP,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       tok.getText() ) );
-         nextToken( true );
-         result.addChild( parseBitwiseXorExpression() );
-      }
-      return result.numChildren() > 1 ? result
-                                     : result.getChild( 0 );
-   }
-
-   private IParserNode parseBitwiseXorExpression() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.B_XOR,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseBitwiseAndExpression() );
-      while ( tokIs( Operators.B_XOR ) )
-      {
-         result.addChild( Node.create( NodeKind.OP,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       tok.getText() ) );
-         nextToken( true );
-         result.addChild( parseBitwiseAndExpression() );
-      }
-      return result.numChildren() > 1 ? result
-                                     : result.getChild( 0 );
-   }
-
-   private Node parseBlock() throws TokenException
-   {
-      return parseBlock( Node.create( NodeKind.BLOCK,
-                                      tok.getLine(),
-                                      tok.getColumn() ) );
-   }
-
-   private Node parseBlock( final Node result ) throws TokenException
-   {
-      consume( Operators.LEFT_CURLY_BRACKET );
-
-      while ( !tokIs( Operators.RIGHT_CURLY_BRACKET ) )
-      {
-         if ( tok.getText().startsWith( MULTIPLE_LINES_COMMENT ) )
-         {
-            currentFunctionNode.addChild( Node.create( NodeKind.MULTI_LINE_COMMENT,
-                                                       tok.getLine(),
-                                                       tok.getColumn(),
-                                                       tok.getText() ) );
-            nextToken();
-         }
-         else
-         {
-            result.addChild( parseStatement() );
-         }
-      }
-      consume( Operators.RIGHT_CURLY_BRACKET );
-      return result;
-   }
-
-   /**
-    * tok is catch
-    * 
-    * @throws TokenException
-    */
-   private Node parseCatch() throws TokenException
-   {
-      consume( KeyWords.CATCH );
-      consume( Operators.LEFT_PARENTHESIS );
-      final Node result = Node.create( NodeKind.CATCH,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       Node.create( NodeKind.NAME,
-                                                    tok.getLine(),
-                                                    tok.getColumn(),
-                                                    tok.getText() ) );
-      nextToken( true ); // name
-      if ( tokIs( Operators.COLUMN ) )
-      {
-         nextToken( true ); // :
-         result.addChild( Node.create( NodeKind.TYPE,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       tok.getText() ) );
-         nextToken( true ); // type
-      }
-      consume( Operators.RIGHT_PARENTHESIS );
-      result.addChild( parseBlock() );
-      return result;
-   }
-
-   /**
-    * tok is class
-    * 
-    * @param meta
-    * @param modifier
-    * @throws TokenException
-    */
-   private Node parseClass( final List< Node > meta,
-                            final List< Token > modifier ) throws TokenException
-   {
-      consume( KeyWords.CLASS );
-
-      final Node result = Node.create( NodeKind.CLASS,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-
-      if ( currentAsDoc != null )
-      {
-         result.addChild( currentAsDoc );
-         currentAsDoc = null;
-      }
-      if ( currentMultiLineComment != null )
-      {
-         result.addChild( currentMultiLineComment );
-         currentMultiLineComment = null;
-      }
-
-      result.addChild( NodeKind.NAME,
-                       tok.getLine(),
-                       tok.getColumn(),
-                       parseQualifiedName( true ) );
-
-      result.addChild( convertMeta( meta ) );
-      result.addChild( convertModifiers( modifier ) );
-
-      // nextToken( true ); // name
-
-      do
-      {
-         if ( tokIs( KeyWords.EXTENDS ) )
-         {
-            nextToken( true ); // extends
-            result.addChild( NodeKind.EXTENDS,
-                             tok.getLine(),
-                             tok.getColumn(),
-                             parseQualifiedName( false ) );
-         }
-         else if ( tokIs( KeyWords.IMPLEMENTS ) )
-         {
-            result.addChild( parseImplementsList() );
-         }
-      }
-      while ( !tokIs( Operators.LEFT_CURLY_BRACKET ) );
-      consume( Operators.LEFT_CURLY_BRACKET );
-      result.addChild( parseClassContent() );
-      consume( Operators.RIGHT_CURLY_BRACKET );
-      return result;
-   }
-
-   private void parseClassConstant( final Node result,
-                                    final List< Token > modifiers,
-                                    final List< Node > meta ) throws TokenException
-   {
-      result.addChild( parseConstList( meta,
-                                       modifiers ) );
-      if ( tokIs( Operators.SEMI_COLUMN ) )
-      {
-         nextToken();
-      }
-      meta.clear();
-      modifiers.clear();
-   }
-
-   private void parseClassField( final Node result,
-                                 final List< Token > modifiers,
-                                 final List< Node > meta ) throws TokenException
-   {
-      final Node varList = parseVarList( meta,
-                                         modifiers );
-      result.addChild( varList );
-      if ( currentAsDoc != null )
-      {
-         varList.addChild( currentAsDoc );
-         currentAsDoc = null;
-      }
-      if ( currentMultiLineComment != null )
-      {
-         result.addChild( currentMultiLineComment );
-         currentMultiLineComment = null;
-      }
-      if ( tokIs( Operators.SEMI_COLUMN ) )
-      {
-         nextToken();
-      }
-      meta.clear();
-      modifiers.clear();
-   }
-
-   private void parseClassFunctions( final Node result,
-                                     final List< Token > modifiers,
-                                     final List< Node > meta ) throws TokenException
-   {
-      result.addChild( parseFunction( meta,
-                                      modifiers ) );
-      meta.clear();
-      modifiers.clear();
-   }
-
-   /**
-    * tok is (
-    * 
-    * @throws TokenException
-    */
-   private Node parseCondition() throws TokenException
-   {
-      consume( Operators.LEFT_PARENTHESIS );
-      final Node result = Node.create( NodeKind.CONDITION,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseExpression() );
-      consume( Operators.RIGHT_PARENTHESIS );
-      return result;
-   }
-
-   private IParserNode parseConditionalExpression() throws TokenException
-   {
-      final IParserNode result = parseOrExpression();
-      if ( tokIs( Operators.QUESTION_MARK ) )
-      {
-         final Node conditional = Node.create( NodeKind.CONDITIONAL,
-                                               tok.getLine(),
-                                               tok.getColumn(),
-                                               result );
-         nextToken( true ); // ?
-         conditional.addChild( parseExpression() );
-         nextToken( true ); // :
-         conditional.addChild( parseExpression() );
-
-         return conditional;
-      }
-      return result;
-   }
-
-   private Node parseConst() throws TokenException
-   {
-      Node result;
-      result = parseConstList( null,
-                               null );
-      skip( Operators.SEMI_COLUMN );
-      return result;
-   }
-
-   /**
-    * tok is const
-    * 
-    * @param modifiers
-    * @param meta
-    * @throws TokenException
-    */
-   private Node parseConstList( final List< Node > meta,
-                                final List< Token > modifiers ) throws TokenException
-   {
-      consume( KeyWords.CONST );
-      final Node result = Node.create( NodeKind.CONST_LIST,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      result.addChild( convertMeta( meta ) );
-      result.addChild( convertModifiers( modifiers ) );
-      collectVarListContent( result );
-      return result;
-   }
-
-   private Node parseDecrement( final Node node ) throws TokenException
-   {
-      nextToken( true );
-      final Node result = Node.create( NodeKind.POST_DEC,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      result.addChild( node );
-      return result;
-   }
-
-   /**
-    * tok is do
-    * 
-    * @throws TokenException
-    */
-   private Node parseDo() throws TokenException
-   {
-      consume( KeyWords.DO );
-      final Node result = Node.create( NodeKind.DO,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseStatement() );
-      consume( KeyWords.WHILE );
-      result.addChild( parseCondition() );
-      if ( tokIs( Operators.SEMI_COLUMN ) )
-      {
-         nextToken( true );
-      }
-      return result;
-   }
-
-   private Node parseDot( final Node node ) throws TokenException
-   {
-      nextToken();
-      if ( tokIs( Operators.LEFT_PARENTHESIS ) )
-      {
-         nextToken();
-         final Node result = Node.create( NodeKind.E4X_FILTER,
-                                          tok.getLine(),
-                                          tok.getColumn() );
-         result.addChild( node );
-         result.addChild( parseExpression() );
-         consume( Operators.RIGHT_PARENTHESIS );
-         return result;
-      }
-      else if ( tokIs( Operators.TIMES ) )
-      {
-         final Node result = Node.create( NodeKind.E4X_STAR,
-                                          tok.getLine(),
-                                          tok.getColumn() );
-         result.addChild( node );
-         return result;
-      }
-      final Node result = Node.create( NodeKind.DOT,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      result.addChild( node );
-      result.addChild( parseExpression() );
-      return result;
-   }
-
-   private Node parseEmptyStatement() throws TokenException
-   {
-      Node result;
-      result = Node.create( NodeKind.STMT_EMPTY,
-                            tok.getLine(),
-                            tok.getColumn(),
-                            Operators.SEMI_COLUMN.toString() );
-      nextToken( true );
-      return result;
-   }
-
-   private Node parseEncapsulatedExpression() throws TokenException
-   {
-      consume( Operators.LEFT_PARENTHESIS );
-      final Node result = Node.create( NodeKind.ENCAPSULATED,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      result.addChild( parseExpressionList() );
-
-      consume( Operators.RIGHT_PARENTHESIS );
-
-      return result;
-   }
-
-   private IParserNode parseEqualityExpression() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.EQUALITY,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseRelationalExpression() );
-      while ( tokIs( Operators.DOUBLE_EQUAL )
-            || tokIs( Operators.DOUBLE_EQUAL_AS2 ) || tokIs( Operators.STRICTLY_EQUAL )
-            || tokIs( Operators.NON_EQUAL ) || tokIs( Operators.NON_EQUAL_AS2_1 )
-            || tokIs( Operators.NON_EQUAL_AS2_2 ) || tokIs( Operators.NON_STRICTLY_EQUAL ) )
-      {
-         result.addChild( Node.create( NodeKind.OP,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       tok.getText() ) );
-         nextToken( true );
-         result.addChild( parseRelationalExpression() );
-      }
-      return result.numChildren() > 1 ? result
-                                     : result.getChild( 0 );
-   }
-
-   private IParserNode parseExpressionList() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.EXPR_LIST,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseAssignmentExpression() );
-      while ( tokIs( Operators.COMMA ) )
-      {
-         nextToken( true );
-         result.addChild( parseAssignmentExpression() );
-      }
-      return result.numChildren() > 1 ? result
-                                     : result.getChild( 0 );
-   }
-
-   private Node parseFinally() throws TokenException
-   {
-      Node result;
-      nextToken( true );
-      result = Node.create( NodeKind.FINALLY,
-                            tok.getLine(),
-                            tok.getColumn(),
-                            parseBlock() );
-      return result;
-   }
-
-   /**
-    * tok is for
-    * 
-    * @throws TokenException
-    */
-   private Node parseFor() throws TokenException
-   {
-      consume( KeyWords.FOR );
-
-      if ( tokIs( KeyWords.EACH ) )
-      {
-         nextToken();
-         return parseForEach();
-      }
-      else
-      {
-         return parseTraditionalFor();
-      }
-   }
-
-   /**
-    * tok is ( for each( var obj : Type in List )
-    * 
-    * @throws TokenException
-    */
-   private Node parseForEach() throws TokenException
-   {
-      consume( Operators.LEFT_PARENTHESIS );
-
-      final Node result = Node.create( NodeKind.FOREACH,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      if ( tokIs( KeyWords.VAR ) )
-      {
-         final Node var = Node.create( NodeKind.VAR,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-         nextToken();
-         var.addChild( parseNameTypeInit() );
-         result.addChild( var );
-      }
-      else
-      {
-         result.addChild( NodeKind.NAME,
-                          tok.getLine(),
-                          tok.getColumn(),
-                          tok.getText() );
-         // names allowed?
-         nextToken();
-      }
-      nextToken(); // in
-      result.addChild( NodeKind.IN,
-                       tok.getLine(),
-                       tok.getColumn(),
-                       parseExpression() );
-      consume( Operators.RIGHT_PARENTHESIS );
-      result.addChild( parseStatement() );
-      return result;
-   }
-
-   private Node parseForIn( final Node result ) throws TokenException
-   {
-      nextToken();
-      result.addChild( NodeKind.IN,
-                       tok.getLine(),
-                       tok.getColumn(),
-                       parseExpression() );
-      result.setId( NodeKind.FORIN );
-      return result;
-   }
-
-   /**
-    * tok is function
-    * 
-    * @param modifiers
-    * @param meta
-    * @throws TokenException
-    */
-   private Node parseFunction( final List< Node > meta,
-                               final List< Token > modifiers ) throws TokenException
-   {
-      final Node[] signature = doParseSignature();
-      final Node result = Node.create( findFunctionTypeFromSignature( signature ),
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       signature[ 0 ].getStringValue() );
-
-      if ( currentAsDoc != null )
-      {
-         result.addChild( currentAsDoc );
-         currentAsDoc = null;
-      }
-      if ( currentMultiLineComment != null )
-      {
-         result.addChild( currentMultiLineComment );
-         currentMultiLineComment = null;
-      }
-      result.addChild( convertMeta( meta ) );
-      result.addChild( convertModifiers( modifiers ) );
-      result.addChild( signature[ 1 ] );
-      result.addChild( signature[ 2 ] );
-      result.addChild( signature[ 3 ] );
-      if ( tokIs( Operators.SEMI_COLUMN ) )
-      {
-         consume( Operators.SEMI_COLUMN );
-      }
-      else
-      {
-         result.addChild( parseFunctionBlock() );
-      }
-      currentFunctionNode = null;
-      return result;
-   }
-
-   /**
-    * tok is { exit tok is the first tok after }
-    * 
-    * @throws TokenException
-    * @throws TokenException
-    */
-
-   private Node parseFunctionBlock() throws TokenException
-   {
-      final Node block = Node.create( NodeKind.BLOCK,
-                                      tok.getLine(),
-                                      tok.getColumn() );
-
-      currentFunctionNode = block;
-
-      parseBlock( block );
-
-      return block;
-   }
-
-   private Node parseFunctionCall( final Node node ) throws TokenException
-   {
-      final Node result = Node.create( NodeKind.CALL,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      result.addChild( node );
-      while ( tokIs( Operators.LEFT_PARENTHESIS ) )
-      {
-         result.addChild( parseArgumentList() );
-      }
-      while ( tokIs( Operators.LEFT_SQUARE_BRACKET ) )
-      {
-         result.addChild( parseArrayLiteral() );
-      }
-
-      return result;
-   }
-
-   /**
-    * tok is function exit tok is the first token after the optional ;
-    * 
-    * @throws TokenException
-    */
-   private Node parseFunctionSignature() throws TokenException
-   {
-      final Node[] signature = doParseSignature();
-      skip( Operators.SEMI_COLUMN );
-      final Node result = Node.create( findFunctionTypeFromSignature( signature ),
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       signature[ 0 ].getStringValue() );
-      result.addChild( signature[ 1 ] );
-      result.addChild( signature[ 2 ] );
-      result.addChild( signature[ 3 ] );
-      return result;
-   }
-
-   /**
-    * tok is if
-    * 
-    * @throws TokenException
-    */
-   private Node parseIf() throws TokenException
-   {
-      consume( KeyWords.IF );
-      final Node result = Node.create( NodeKind.IF,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseCondition() );
-      result.addChild( parseStatement() );
-      if ( tokIs( KeyWords.ELSE ) )
-      {
-         nextToken( true );
-         result.addChild( parseStatement() );
-      }
-      return result;
-   }
-
-   /**
-    * tok is implements implements a,b,c exit tok is the first token after the
-    * list of qualfied names
-    * 
-    * @throws TokenException
-    */
-   private Node parseImplementsList() throws TokenException
-   {
-      consume( KeyWords.IMPLEMENTS );
-
-      final Node result = Node.create( NodeKind.IMPLEMENTS_LIST,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      result.addChild( NodeKind.IMPLEMENTS,
-                       tok.getLine(),
-                       tok.getColumn(),
-                       parseQualifiedName( true ) );
-      while ( tokIs( Operators.COMMA ) )
-      {
-         nextToken( true );
-         result.addChild( NodeKind.IMPLEMENTS,
-                          tok.getLine(),
-                          tok.getColumn(),
-                          parseQualifiedName( false ) );
-      }
-      return result;
-   }
-
-   /**
-    * tok is import
-    * 
-    * @throws TokenException
-    */
-   private Node parseImport() throws TokenException
-   {
-      consume( KeyWords.IMPORT );
-      final Node result = Node.create( NodeKind.IMPORT,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseImportName() );
-      skip( Operators.SEMI_COLUMN );
-      return result;
-   }
-
-   /**
-    * tok is the first part of a name the last part can be a star exit tok is
-    * the first token, which doesn't belong to the name
-    * 
-    * @throws TokenException
-    */
-   private String parseImportName() throws TokenException
-   {
-      final StringBuffer result = new StringBuffer();
-
-      result.append( tok.getText() );
-      nextToken();
-      while ( tokIs( Operators.DOT ) )
-      {
-         result.append( Operators.DOT );
-         nextToken(); // .
-         result.append( tok.getText() );
-         nextToken(); // part of name
-      }
-      return result.toString();
-   }
-
-   private IParserNode parseIncludeExpression() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.INCLUDE,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      if ( tokIs( KeyWords.INCLUDE ) )
-      {
-         consume( KeyWords.INCLUDE );
-      }
-      else if ( tokIs( KeyWords.INCLUDE_AS2 ) )
-      {
-         consume( KeyWords.INCLUDE_AS2 );
-      }
-      result.addChild( parseExpression() );
-      return result;
-   }
-
-   private Node parseIncrement( final Node node ) throws TokenException
-   {
-      nextToken( true );
-      final Node result = Node.create( NodeKind.POST_INC,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      result.addChild( node );
-      return result;
-   }
-
-   /**
-    * tok is interface
-    * 
-    * @param meta
-    * @param modifier
-    * @throws TokenException
-    */
-   private Node parseInterface( final List< Node > meta,
-                                final List< Token > modifier ) throws TokenException
-   {
-      consume( KeyWords.INTERFACE );
-      final Node result = Node.create( NodeKind.INTERFACE,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-
-      if ( currentAsDoc != null )
-      {
-         result.addChild( currentAsDoc );
-         currentAsDoc = null;
-      }
-      if ( currentMultiLineComment != null )
-      {
-         result.addChild( currentMultiLineComment );
-         currentMultiLineComment = null;
-      }
-      result.addChild( NodeKind.NAME,
-                       tok.getLine(),
-                       tok.getColumn(),
-                       parseQualifiedName( true ) );
-
-      result.addChild( convertMeta( meta ) );
-      result.addChild( convertModifiers( modifier ) );
-
-      if ( tokIs( KeyWords.EXTENDS ) )
-      {
-         nextToken(); // extends
-         result.addChild( NodeKind.EXTENDS,
-                          tok.getLine(),
-                          tok.getColumn(),
-                          parseQualifiedName( false ) );
-      }
-      while ( tokIs( Operators.COMMA ) )
-      {
-         nextToken(); // comma
-         result.addChild( NodeKind.EXTENDS,
-                          tok.getLine(),
-                          tok.getColumn(),
-                          parseQualifiedName( false ) );
-      }
-      consume( Operators.LEFT_CURLY_BRACKET );
-      result.addChild( parseInterfaceContent() );
-      consume( Operators.RIGHT_CURLY_BRACKET );
-      return result;
-   }
-
-   /**
-    * tok is function
-    * 
-    * @throws TokenException
-    */
-   private Node parseLambdaExpression() throws TokenException
-   {
-      consume( KeyWords.FUNCTION );
-      Node result;
-
-      if ( tok.getText().compareTo( "(" ) == 0 )
-      {
-         result = Node.create( NodeKind.LAMBDA,
-                               tok.getLine(),
-                               tok.getColumn() );
-      }
-      else
-      {
-         result = Node.create( NodeKind.FUNCTION,
-                               tok.getLine(),
-                               tok.getColumn(),
-                               tok.getText() );
-         nextToken( true );
-      }
-      result.addChild( parseParameterList() );
-      result.addChild( parseOptionalType() );
-      result.addChild( parseBlock() );
-      return result;
-   }
-
-   private IParserNode parseLines( final String filePath,
-                                   final String[] lines ) throws TokenException
-   {
-      setFileName( filePath );
-      scn = new AS3Scanner();
-      scn.setLines( lines );
-      return parseCompilationUnit();
-   }
-
-   /**
-    * tok is [ [id] [id ("test")] [id (name="test",type="a.b.c.Event")] exit
-    * token is the first token after ]
-    * 
-    * @throws TokenException
-    */
-   private Node parseMetaData() throws TokenException
-   {
-      final StringBuffer buffer = new StringBuffer();
-
-      final int line = tok.getLine();
-      final int column = tok.getColumn();
-
-      consume( Operators.LEFT_SQUARE_BRACKET );
-      while ( !tokIs( Operators.RIGHT_SQUARE_BRACKET ) )
-      {
-         if ( buffer.length() > 0 )
-         {
-            buffer.append( ' ' );
-         }
-         buffer.append( tok.getText() );
-         nextToken();
-      }
-      skip( Operators.RIGHT_SQUARE_BRACKET );
-      final Node metaDataNode = Node.create( NodeKind.META,
-                                             line,
-                                             column,
-                                             buffer.toString() );
-
-      return metaDataNode;
-   }
-
-   private IParserNode parseMultiplicativeExpression() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.MULTIPLICATION,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseUnaryExpression() );
-      while ( tokIs( Operators.TIMES )
-            || tokIs( Operators.SLASH ) || tokIs( Operators.MODULO ) )
-      {
-         result.addChild( Node.create( NodeKind.OP,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       tok.getText() ) );
-         nextToken( true );
-         result.addChild( parseUnaryExpression() );
-      }
-      return result.numChildren() > 1 ? result
-                                     : result.getChild( 0 );
-   }
-
-   private String parseNamespaceName() throws TokenException
-   {
-      final String name = tok.getText();
-      nextToken(); // simple name for now
-      return name;
-   }
-
-   private Node parseNameTypeInit() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.NAME_TYPE_INIT,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      result.addChild( NodeKind.NAME,
-                       tok.getLine(),
-                       tok.getColumn(),
-                       tok.getText() );
-      nextToken( true ); // name
-      result.addChild( parseOptionalType() );
-      result.addChild( parseOptionalInit() );
-      return result;
-   }
-
-   private Node parseNewExpression() throws TokenException
-   {
-      consume( KeyWords.NEW );
-
-      final Node result = Node.create( NodeKind.NEW,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      result.addChild( parseExpression() ); // name
-      if ( tokIs( Operators.VECTOR_START ) )
-      {
-         result.addChild( Node.create( NodeKind.VECTOR,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseVector() ) );
-      }
-      if ( tokIs( Operators.LEFT_PARENTHESIS ) )
-      {
-         result.addChild( parseArgumentList() );
-      }
-      return result;
-   }
-
-   /**
-    * tok is {
-    */
-   private Node parseObjectLiteral() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.OBJECT,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      consume( Operators.LEFT_CURLY_BRACKET );
-      while ( !tokIs( Operators.RIGHT_CURLY_BRACKET ) )
-      {
-         result.addChild( parseObjectLiteralPropertyDeclaration() );
-         skip( Operators.COMMA );
-      }
-      consume( Operators.RIGHT_CURLY_BRACKET );
-      return result;
-   }
-
-   /*
-    * tok is name
-    */
-   private Node parseObjectLiteralPropertyDeclaration() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.PROP,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      final Node name = Node.create( NodeKind.NAME,
-                                     tok.getLine(),
-                                     tok.getColumn(),
-                                     tok.getText() );
-      result.addChild( name );
-      nextToken(); // name
-      consume( Operators.COLUMN );
-      result.addChild( NodeKind.VALUE,
-                       tok.getLine(),
-                       tok.getColumn(),
-                       parseExpression() );
-      return result;
-   }
-
-   /**
-    * if tok is "=" parse the expression otherwise do nothing
-    * 
-    * @return
-    */
-   private Node parseOptionalInit() throws TokenException
-   {
-      Node result = null;
-      if ( tokIs( Operators.EQUAL ) )
-      {
-         nextToken( true );
-         result = Node.create( NodeKind.INIT,
-                               tok.getLine(),
-                               tok.getColumn(),
-                               parseExpression() );
-      }
-      return result;
-   }
-
-   /**
-    * if tok is ":" parse the type otherwise do nothing
-    * 
-    * @return
-    * @throws TokenException
-    */
-   private Node parseOptionalType() throws TokenException
-   {
-      Node result = Node.create( NodeKind.TYPE,
-                                 tok.getLine(),
-                                 tok.getColumn(),
-                                 "" );
-      if ( tokIs( Operators.COLUMN ) )
-      {
-         nextToken( true );
-         result = parseType();
-      }
-      return result;
-   }
-
-   private IParserNode parseOrExpression() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.OR,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseAndExpression() );
-      while ( tokIs( Operators.LOGICAL_OR )
-            || tokIs( Operators.LOGICAL_OR_AS2 ) )
-      {
-         result.addChild( Node.create( NodeKind.OP,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       tok.getText() ) );
-         nextToken( true );
-         result.addChild( parseAndExpression() );
-      }
-      return result.numChildren() > 1 ? result
-                                     : result.getChild( 0 );
-   }
-
-   /**
-    * tok is package
-    * 
-    * @throws UnExpectedTokenException
-    */
-   private Node parsePackage() throws TokenException
-   {
-      consume( KeyWords.PACKAGE );
-
-      final Node result = Node.create( NodeKind.PACKAGE,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      final StringBuffer nameBuffer = new StringBuffer();
-
-      while ( !tokIs( Operators.LEFT_CURLY_BRACKET ) )
-      {
-         nameBuffer.append( tok.getText() );
-         nextToken();
-      }
-      result.addChild( NodeKind.NAME,
-                       tok.getLine(),
-                       tok.getColumn(),
-                       nameBuffer.toString() );
-      consume( Operators.LEFT_CURLY_BRACKET );
-      result.addChild( parsePackageContent() );
-      consume( Operators.RIGHT_CURLY_BRACKET );
-      return result;
-   }
-
-   /**
-    * tok is the name of a parameter or ...
-    */
-   private Node parseParameter() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.PARAMETER,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      if ( tokIs( Operators.REST_PARAMETERS ) )
-      {
-         nextToken( true ); // ...
-         final Node rest = Node.create( NodeKind.REST,
-                                        tok.getLine(),
-                                        tok.getColumn(),
-                                        tok.getText() );
-         nextToken( true ); // rest
-         result.addChild( rest );
-      }
-      else
-      {
-         result.addChild( parseNameTypeInit() );
-      }
-      return result;
-   }
-
-   /**
-    * tok is (
-    * 
-    * @throws TokenException
-    */
-   private Node parseParameterList() throws TokenException
-   {
-      consume( Operators.LEFT_PARENTHESIS );
-
-      final Node result = Node.create( NodeKind.PARAMETER_LIST,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      while ( !tokIs( Operators.RIGHT_PARENTHESIS ) )
-      {
-         result.addChild( parseParameter() );
-         if ( tokIs( Operators.COMMA ) )
-         {
-            nextToken( true );
-         }
-         else
-         {
-            break;
-         }
-      }
-      consume( Operators.RIGHT_PARENTHESIS );
-      return result;
-   }
-
-   /**
-    * tok is first part of the name exit tok is the first token after the name
-    * 
-    * @throws TokenException
-    */
-   private String parseQualifiedName( final boolean skipPackage ) throws TokenException
-   {
-      final StringBuffer buffer = new StringBuffer();
-
-      buffer.append( tok.getText() );
-      nextToken();
-      while ( tokIs( Operators.DOT )
-            || tokIs( Operators.DOUBLE_COLUMN ) )
-      {
-         buffer.append( tok.getText() );
-         nextToken();
-         buffer.append( tok.getText() );
-         nextToken(); // name
-      }
-
-      if ( skipPackage )
-      {
-         return buffer.substring( buffer.lastIndexOf( Operators.DOT.toString() ) + 1 );
-      }
-      return buffer.toString();
-   }
-
-   private IParserNode parseRelationalExpression() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.RELATION,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseShiftExpression() );
-      while ( tokIs( Operators.INFERIOR )
-            || tokIs( Operators.INFERIOR_AS2 ) || tokIs( Operators.INFERIOR_OR_EQUAL )
-            || tokIs( Operators.INFERIOR_OR_EQUAL_AS2 ) || tokIs( Operators.SUPERIOR )
-            || tokIs( Operators.SUPERIOR_AS2 ) || tokIs( Operators.SUPERIOR_OR_EQUAL )
-            || tokIs( Operators.SUPERIOR_OR_EQUAL_AS2 ) || tokIs( KeyWords.IS ) || tokIs( KeyWords.IN )
-            && !isInFor || tokIs( KeyWords.AS ) || tokIs( KeyWords.INSTANCE_OF ) )
-      {
-         if ( !tokIs( KeyWords.AS ) )
-         {
-            result.addChild( Node.create( NodeKind.OP,
-                                          tok.getLine(),
-                                          tok.getColumn(),
-                                          tok.getText() ) );
-         }
-         else
-         {
-            result.addChild( Node.create( NodeKind.AS,
-                                          tok.getLine(),
-                                          tok.getColumn(),
-                                          tok.getText() ) );
-         }
-         nextToken( true );
-         result.addChild( parseShiftExpression() );
-      }
-      return result.numChildren() > 1 ? result
-                                     : result.getChild( 0 );
-   }
-
-   private IParserNode parseReturnStatement() throws TokenException
-   {
-      Node result;
-
-      nextTokenAllowNewLine();
-      if ( tokIs( NEW_LINE )
-            || tokIs( Operators.SEMI_COLUMN ) )
-      {
-         nextToken( true );
-         result = Node.create( NodeKind.RETURN,
-                               tok.getLine(),
-                               tok.getColumn(),
-                               "" );
-      }
-      else
-      {
-         result = Node.create( NodeKind.RETURN,
-                               tok.getLine(),
-                               tok.getColumn(),
-                               parseExpression() );
-         skip( Operators.SEMI_COLUMN );
-      }
-      return result;
-   }
-
-   private IParserNode parseShiftExpression() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.SHIFT,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseAdditiveExpression() );
-      while ( tokIs( Operators.DOUBLE_SHIFT_LEFT )
-            || tokIs( Operators.TRIPLE_SHIFT_LEFT ) || tokIs( Operators.DOUBLE_SHIFT_RIGHT )
-            || tokIs( Operators.TRIPLE_SHIFT_RIGHT ) )
-      {
-         result.addChild( Node.create( NodeKind.OP,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       tok.getText() ) );
-         nextToken( true );
-         result.addChild( parseAdditiveExpression() );
-      }
-      return result.numChildren() > 1 ? result
-                                     : result.getChild( 0 );
-   }
-
-   /**
-    * tok is switch
-    * 
-    * @throws TokenException
-    */
-   private Node parseSwitch() throws TokenException
-   {
-      consume( KeyWords.SWITCH );
-      final Node result = Node.create( NodeKind.SWITCH,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseCondition() );
-      if ( tokIs( Operators.LEFT_CURLY_BRACKET ) )
-      {
-         nextToken();
-         result.addChild( parseSwitchCases() );
-         consume( Operators.RIGHT_CURLY_BRACKET );
-      }
-      return result;
-   }
-
-   /**
-    * tok is case, default or the first token of the first statement
-    * 
-    * @throws TokenException
-    */
-   private Node parseSwitchBlock() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.SWITCH_BLOCK,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      while ( !tokIs( KeyWords.CASE )
-            && !tokIs( KeyWords.DEFAULT ) && !tokIs( Operators.RIGHT_CURLY_BRACKET ) )
-      {
-         result.addChild( parseStatement() );
-      }
-      return result;
-   }
-
-   /**
-    * tok is { exit tok is }
-    * 
-    * @throws TokenException
-    */
-   private Node parseSwitchCases() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.CASES,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      for ( ;; )
-      {
-         if ( tokIs( Operators.RIGHT_CURLY_BRACKET ) )
-         {
-            break;
-         }
-         else if ( tokIs( KeyWords.CASE ) )
-         {
-            nextToken( true ); // case
-            final Node caseNode = Node.create( NodeKind.CASE,
-                                               tok.getLine(),
-                                               tok.getColumn(),
-                                               parseExpression() );
-            consume( Operators.COLUMN );
-            caseNode.addChild( parseSwitchBlock() );
-            result.addChild( caseNode );
-         }
-         else if ( tokIs( KeyWords.DEFAULT ) )
-         {
-            nextToken( true ); // default
-            consume( Operators.COLUMN );
-            final Node caseNode = Node.create( NodeKind.CASE,
-                                               tok.getLine(),
-                                               tok.getColumn(),
-                                               Node.create( NodeKind.DEFAULT,
-                                                            tok.getLine(),
-                                                            tok.getColumn(),
-                                                            KeyWords.DEFAULT.toString() ) );
-            caseNode.addChild( parseSwitchBlock() );
-            result.addChild( caseNode );
-         }
-      }
-      return result;
-   }
-
-   /**
-    * tok is ( for( var x : int = 0; i < length; i++ ) for( var s : String in
-    * Object )
-    * 
-    * @throws TokenException
-    */
-   private Node parseTraditionalFor() throws TokenException
-   {
-      consume( Operators.LEFT_PARENTHESIS );
-
-      final Node result = Node.create( NodeKind.FOR,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      if ( !tokIs( Operators.SEMI_COLUMN ) )
-      {
-         if ( tokIs( KeyWords.VAR ) )
-         {
-            result.addChild( NodeKind.INIT,
-                             tok.getLine(),
-                             tok.getColumn(),
-                             parseVarList( null,
-                                           null ) );
-         }
-         else
-         {
-            isInFor = true;
-            result.addChild( NodeKind.INIT,
-                             tok.getLine(),
-                             tok.getColumn(),
-                             parseExpression() );
-            isInFor = false;
-         }
-         if ( tokIs( NodeKind.IN.toString() ) )
-         {
-            return parseForIn( result );
-         }
-      }
-      consume( Operators.SEMI_COLUMN );
-      if ( !tokIs( Operators.SEMI_COLUMN ) )
-      {
-         result.addChild( NodeKind.COND,
-                          tok.getLine(),
-                          tok.getColumn(),
-                          parseExpression() );
-      }
-      consume( Operators.SEMI_COLUMN );
-      if ( !tokIs( Operators.RIGHT_PARENTHESIS ) )
-      {
-         result.addChild( NodeKind.ITER,
-                          tok.getLine(),
-                          tok.getColumn(),
-                          parseExpressionList() );
-      }
-      consume( Operators.RIGHT_PARENTHESIS );
-      result.addChild( parseStatement() );
-      return result;
-   }
-
-   private Node parseTry() throws TokenException
-   {
-      Node result;
-      nextToken( true );
-      result = Node.create( NodeKind.TRY,
-                            tok.getLine(),
-                            tok.getColumn(),
-                            parseBlock() );
-      return result;
-   }
-
-   private Node parseType() throws TokenException
-   {
-      Node result;
-      if ( tok.getText().equals( VECTOR ) )
-      {
-         result = parseVector();
-      }
-      else
-      {
-         result = Node.create( NodeKind.TYPE,
-                               tok.getLine(),
-                               tok.getColumn(),
-                               parseQualifiedName( true ) );
-         // nextToken( true );
-      }
-      return result;
-   }
-
-   private Node parseUnaryExpressionNotPlusMinus() throws TokenException
-   {
-      Node result;
-      if ( tokIs( KeyWords.DELETE ) )
-      {
-         nextToken( true );
-         result = Node.create( NodeKind.DELETE,
-                               tok.getLine(),
-                               tok.getColumn(),
-                               parseExpression() );
-      }
-      else if ( tokIs( KeyWords.VOID ) )
-      {
-         nextToken( true );
-         result = Node.create( NodeKind.VOID,
-                               tok.getLine(),
-                               tok.getColumn(),
-                               parseExpression() );
-      }
-      else if ( tokIs( KeyWords.TYPEOF ) )
-      {
-         nextToken( true );
-         result = Node.create( NodeKind.TYPEOF,
-                               tok.getLine(),
-                               tok.getColumn(),
-                               parseExpression() );
-      }
-      else if ( tokIs( "!" )
-            || tokIs( "not" ) )
-      {
-         nextToken( true );
-         result = Node.create( NodeKind.NOT,
-                               tok.getLine(),
-                               tok.getColumn(),
-                               parseExpression() );
-      }
-      else if ( tokIs( "~" ) )
-      {
-         nextToken( true );
-         result = Node.create( NodeKind.B_NOT,
-                               tok.getLine(),
-                               tok.getColumn(),
-                               parseExpression() );
-      }
-      else
-      {
-         result = parseUnaryPostfixExpression();
-      }
-      return result;
-   }
-
-   private Node parseUnaryPostfixExpression() throws TokenException
-   {
-      Node node = parsePrimaryExpression();
-
-      if ( tokIs( Operators.LEFT_SQUARE_BRACKET ) )
-      {
-         node = parseArrayAccessor( node );
-      }
-      else if ( tokIs( Operators.LEFT_PARENTHESIS ) )
-      {
-         node = parseFunctionCall( node );
-      }
-      if ( tokIs( Operators.INCREMENT ) )
-      {
-         node = parseIncrement( node );
-      }
-      else if ( tokIs( Operators.DECREMENT ) )
-      {
-         node = parseDecrement( node );
-      }
-      else if ( tokIs( Operators.DOT )
-            || tokIs( Operators.DOUBLE_COLUMN ) )
-      {
-         node = parseDot( node );
-      }
-      return node;
-   }
-
-   private Node parseUse() throws TokenException
-   {
-      consume( KeyWords.USE );
-      consume( KeyWords.NAMESPACE );
-      final Node result = Node.create( NodeKind.USE,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       parseNamespaceName() );
-      skip( Operators.SEMI_COLUMN );
-      return result;
-   }
-
-   private Node parseVar() throws TokenException
-   {
-      Node result;
-      result = parseVarList( null,
-                             null );
-      skip( Operators.SEMI_COLUMN );
-      return result;
-   }
-
-   /**
-    * tok is var var x, y : String, z : int = 0;
-    * 
-    * @param modifiers
-    * @param meta
-    * @throws TokenException
-    */
-   private Node parseVarList( final List< Node > meta,
-                              final List< Token > modifiers ) throws TokenException
-   {
-      consume( KeyWords.VAR );
-      final Node result = Node.create( NodeKind.VAR_LIST,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      result.addChild( convertMeta( meta ) );
-      result.addChild( convertModifiers( modifiers ) );
-      collectVarListContent( result );
-      return result;
-   }
-
-   private Node parseVector() throws TokenException
-   {
-      final Node result = Node.create( NodeKind.VECTOR,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       "" );
-      if ( tok.getText().compareTo( "Vector" ) == 0 )
-      {
-         nextToken();
-      }
-      consume( Operators.VECTOR_START );
-
-      result.addChild( parseType() );
-
-      consume( Operators.SUPERIOR );
-
-      return result;
-   }
-
-   /**
-    * tok is while
-    * 
-    * @throws TokenException
-    */
-   private Node parseWhile() throws TokenException
-   {
-      consume( KeyWords.WHILE );
-      final Node result = Node.create( NodeKind.WHILE,
-                                       tok.getLine(),
-                                       tok.getColumn() );
-      result.addChild( parseCondition() );
-      result.addChild( parseStatement() );
-      return result;
-   }
-
-   private void setFileName( final String fileNameToParse )
-   {
-      fileName = fileNameToParse;
-   }
-
-   private void skip( final Operators operator ) throws TokenException
-   {
-      skip( operator.toString() );
-   }
-
-   /**
-    * Skip the current token, if it equals to the parameter
-    * 
-    * @param text
-    * @throws UnExpectedTokenException
-    */
-   private void skip( final String text ) throws TokenException
-   {
-      if ( tokIs( text ) )
-      {
-         nextToken();
-      }
-   }
-
-   private boolean tokIs( final KeyWords keyword )
-   {
-      return tok.getText().compareTo( keyword.toString() ) == 0;
-   }
-
-   private boolean tokIs( final Operators operator )
-   {
-      return tok.getText().compareTo( operator.toString() ) == 0;
-   }
-
-   /**
-    * Compare the current token to the parameter
-    * 
-    * @param text
-    * @return true, if tok's text property equals the parameter
-    */
-   private boolean tokIs( final String text )
-   {
-      return tok.getText().equals( text );
-   }
-
-   private void tryToParseCommentNode( final Node result,
-                                       final List< Token > modifiers ) throws TokenException
-   {
-      if ( tok.getText().startsWith( ASDOC_COMMENT ) )
-      {
-         currentAsDoc = Node.create( NodeKind.AS_DOC,
-                                     tok.getLine(),
-                                     tok.getColumn(),
-                                     tok.getText() );
-         nextToken();
-      }
-      else if ( tok.getText().startsWith( MULTIPLE_LINES_COMMENT ) )
-      {
-         result.addChild( Node.create( NodeKind.MULTI_LINE_COMMENT,
-                                       tok.getLine(),
-                                       tok.getColumn(),
-                                       tok.getText() ) );
-         nextToken();
-      }
-      else
-      {
-         if ( modifiers != null )
-         {
-            modifiers.add( tok );
-         }
-         nextTokenIgnoringDocumentation();
-      }
-   }
-}


[13/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/binding/BindingUtilsRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/binding/BindingUtilsRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/binding/BindingUtilsRule.java
new file mode 100644
index 0000000..5b86b95
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/binding/BindingUtilsRule.java
@@ -0,0 +1,48 @@
+/*
+ * 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.binding;
+
+import com.adobe.ac.pmd.rules.core.AbstractForbiddenImportRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class BindingUtilsRule extends AbstractForbiddenImportRule // NO_UCD
+{
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractForbiddenImportRule#getForbiddenImport
+    * ()
+    */
+   @Override
+   protected String getForbiddenImport()
+   {
+      return "BindingUtils";
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/binding/ChangeWatcherRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/binding/ChangeWatcherRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/binding/ChangeWatcherRule.java
new file mode 100644
index 0000000..05e3f42
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/binding/ChangeWatcherRule.java
@@ -0,0 +1,48 @@
+/*
+ * 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.binding;
+
+import com.adobe.ac.pmd.rules.core.AbstractForbiddenImportRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class ChangeWatcherRule extends AbstractForbiddenImportRule
+{
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractForbiddenImportRule#getForbiddenImport
+    * ()
+    */
+   @Override
+   protected String getForbiddenImport()
+   {
+      return "ChangeWatcher";
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/binding/TooLongBindingExpressionRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/binding/TooLongBindingExpressionRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/binding/TooLongBindingExpressionRule.java
new file mode 100644
index 0000000..4241f8f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/binding/TooLongBindingExpressionRule.java
@@ -0,0 +1,115 @@
+/*
+ * 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.binding;
+
+import java.util.regex.Matcher;
+
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.AbstractMaximizedRegexpBasedRule;
+
+/**
+ * @author xagnetti
+ */
+public class TooLongBindingExpressionRule extends AbstractMaximizedRegexpBasedRule // NO_UCD
+{
+   private int currentCount;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#
+    * getActualValueForTheCurrentViolation()
+    */
+   public final int getActualValueForTheCurrentViolation()
+   {
+      return currentCount;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getDefaultThreshold
+    * ()
+    */
+   public final int getDefaultThreshold()
+   {
+      return 2;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected final String getRegexp()
+   {
+      return ".*=\"\\{[^']([^\\}]*)[^']\\}\".*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   protected final boolean isConcernedByTheCurrentFile()
+   {
+      return getCurrentFile().isMxml();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected final boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      final Matcher matcher = getMatcher( line );
+
+      matcher.matches();
+      currentCount = countChar( matcher.group( 1 ),
+                                '.' );
+      return matcher.matches()
+            && currentCount > getThreshold();
+   }
+
+   private int countChar( final String input,
+                          final char charToSearch )
+   {
+      int charCount = 0;
+
+      for ( int i = 0; i < input.length(); i++ )
+      {
+         if ( input.charAt( i ) == charToSearch )
+         {
+            charCount++;
+         }
+      }
+
+      return charCount;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/BadCairngormEventNameFormatRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/BadCairngormEventNameFormatRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/BadCairngormEventNameFormatRule.java
new file mode 100644
index 0000000..119b01e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/BadCairngormEventNameFormatRule.java
@@ -0,0 +1,119 @@
+/*
+ * 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.cairngorm;
+
+import org.apache.commons.lang.StringUtils;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IField;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class BadCairngormEventNameFormatRule extends AbstractAstFlexRule // NO_UCD
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#isConcernedByTheCurrentFile
+    * ()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return getCurrentFile().getClassName().endsWith( "Event.as" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNode )
+   {
+      if ( isExtendedClassCairngormEvent( classNode ) )
+      {
+         final String eventName = extractEventName( classNode );
+
+         if ( StringUtils.isEmpty( eventName )
+               || !eventName.contains( "." ) )
+         {
+            addViolation( classNode );
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   private String extractEventName( final IClass classNode )
+   {
+      String eventName = "";
+
+      for ( final IField constantNode : classNode.getConstants() )
+      {
+         if ( constantNode.getName().startsWith( "EVENT" ) )
+         {
+            eventName = extractEventNameFromConstant( constantNode.getInitializationExpression()
+                                                                  .getInternalNode() );
+         }
+      }
+      if ( StringUtils.isEmpty( eventName )
+            && classNode.getConstructor() != null )
+      {
+         eventName = extractEventNameFromConstructor( classNode.getConstructor() );
+      }
+      return eventName;
+   }
+
+   private String extractEventNameFromConstant( final IParserNode initExpressionNode )
+   {
+      return initExpressionNode.getChild( 0 ).getStringValue();
+   }
+
+   private String extractEventNameFromConstructor( final IFunction constructor )
+   {
+      String eventName = "";
+      final IParserNode superCall = constructor.getSuperCall();
+
+      if ( superCall != null )
+      {
+         eventName = superCall.getChild( 1 ).getChild( 0 ).getStringValue();
+      }
+      return eventName;
+   }
+
+   private boolean isExtendedClassCairngormEvent( final IClass classNode )
+   {
+      return classNode.getExtensionName() != null
+            && classNode.getExtensionName().contains( "Cairngorm" )
+            && classNode.getExtensionName().contains( "Event" );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/BindableModelLocatorRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/BindableModelLocatorRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/BindableModelLocatorRule.java
new file mode 100644
index 0000000..eb3dca0
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/BindableModelLocatorRule.java
@@ -0,0 +1,64 @@
+/*
+ * 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.cairngorm;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class BindableModelLocatorRule extends AbstractAstFlexRule // NO_UCD
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#isConcernedByTheCurrentFile
+    * ()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return getCurrentFile().getClassName().endsWith( "ModelLocator.as" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNode )
+   {
+      if ( classNode.isBindable() )
+      {
+         addViolation( classNode );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/CairngormEventDispatcherCallExplicitlyRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/CairngormEventDispatcherCallExplicitlyRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/CairngormEventDispatcherCallExplicitlyRule.java
new file mode 100644
index 0000000..22c44ef
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/CairngormEventDispatcherCallExplicitlyRule.java
@@ -0,0 +1,74 @@
+/*
+ * 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.cairngorm;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class CairngormEventDispatcherCallExplicitlyRule extends AbstractPrimaryAstRule // NO_UCD
+{
+   private static final String ADD_EVENT_LISTENER_MESSAGE = "The Cairngorm event is listened directly. "
+                                                                + "The Controller is then avoided, and "
+                                                                + "the MVC pattern is broken.";
+   private static final String DISPATCH_EVENT             = "dispatchEvent";
+   private static final String DISPATCH_EVENT_MESSAGE     = "Use cairngormEvent.dispatch instead";
+   private static final String EVENT_DISPATCHER           = "CairngormEventDispatcher";
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#addViolation(com.adobe
+    * .ac.pmd.parser.IParserNode, com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void addViolation( final IParserNode statement,
+                                final IFunction function )
+   {
+      final String violationLine = getCurrentFile().getLineAt( statement.getLine() );
+      final String messageToAppend = violationLine.contains( DISPATCH_EVENT ) ? ADD_EVENT_LISTENER_MESSAGE
+                                                                             : DISPATCH_EVENT_MESSAGE;
+
+      addViolation( statement,
+                    messageToAppend );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#getFirstPrimaryToFind()
+    */
+   @Override
+   protected String getFirstPrimaryToFind()
+   {
+      return EVENT_DISPATCHER;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/FatControllerRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/FatControllerRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/FatControllerRule.java
new file mode 100644
index 0000000..7c23727
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/FatControllerRule.java
@@ -0,0 +1,97 @@
+/*
+ * 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.cairngorm;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IPackage;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class FatControllerRule extends AbstractAstFlexRule // NO_UCD
+{
+   private static final int DEFAULT_THRESHOLD = 5;
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#isConcernedByTheCurrentFile
+    * ()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return getCurrentFile().getClassName().endsWith( "Controller.as" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IPackage)
+    */
+   @Override
+   protected final void findViolations( final IPackage packageNode )
+   {
+      final IClass classNode = packageNode.getClassNode();
+
+      if ( classNode != null )
+      {
+         final int commandsCount = computeCommandsCountInImport( packageNode.getImports() );
+         final int methodsCount = classNode.getFunctions().size();
+
+         if ( methodsCount > 0
+               && commandsCount
+                     / methodsCount > DEFAULT_THRESHOLD )
+         {
+            addViolation( classNode );
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   private int computeCommandsCountInImport( final List< IParserNode > imports )
+   {
+      int commandImport = 0;
+
+      if ( imports != null )
+      {
+         for ( final IParserNode importNode : imports )
+         {
+            if ( importNode.getStringValue().endsWith( "Command" ) )
+            {
+               commandImport++;
+            }
+         }
+      }
+      return commandImport;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/ModelLocatorReferencedMoreThanOncePerClassRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/ModelLocatorReferencedMoreThanOncePerClassRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/ModelLocatorReferencedMoreThanOncePerClassRule.java
new file mode 100644
index 0000000..68bfb27
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/ModelLocatorReferencedMoreThanOncePerClassRule.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.cairngorm;
+
+/**
+ * @author xagnetti
+ */
+public class ModelLocatorReferencedMoreThanOncePerClassRule extends
+                                                           ReferenceModelLocatorOutsideTheMainApplicationRule
+{
+   private int referencesPerFile;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.cairngorm.
+    * ReferenceModelLocatorOutsideTheMainApplicationRule
+    * #isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected final boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      if ( !line.contains( "import" )
+            && !line.contains( "return" ) )
+      {
+         referencesPerFile++;
+      }
+      return referencesPerFile > 1;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#onRuleStart()
+    */
+   @Override
+   protected final void onRuleStart()
+   {
+      referencesPerFile = 0;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/ReferenceModelLocatorOutsideTheMainApplicationRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/ReferenceModelLocatorOutsideTheMainApplicationRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/ReferenceModelLocatorOutsideTheMainApplicationRule.java
new file mode 100644
index 0000000..5df0b7e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/cairngorm/ReferenceModelLocatorOutsideTheMainApplicationRule.java
@@ -0,0 +1,73 @@
+/*
+ * 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.cairngorm;
+
+import com.adobe.ac.pmd.parser.KeyWords;
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+import de.bokelberg.flex.parser.AS3Parser;
+
+/**
+ * @author xagnetti
+ */
+public class ReferenceModelLocatorOutsideTheMainApplicationRule extends AbstractRegexpBasedRule // NO_UCD
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return !getCurrentFile().getClassName().endsWith( "ModelLocator.as" )
+            && ( !getCurrentFile().isMxml() || !getCurrentFile().isMainApplication() );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected final String getRegexp()
+   {
+      return ".*ModelLocator.*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      return !line.contains( KeyWords.IMPORT.toString() )
+            && !line.contains( AS3Parser.SINGLE_LINE_COMMENT );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/component/CallLaterDirectlyRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/component/CallLaterDirectlyRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/component/CallLaterDirectlyRule.java
new file mode 100644
index 0000000..5eaae55
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/component/CallLaterDirectlyRule.java
@@ -0,0 +1,62 @@
+/*
+ * 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.component;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class CallLaterDirectlyRule extends AbstractPrimaryAstRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#addViolation(com.adobe
+    * .ac.pmd.parser.IParserNode, com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void addViolation( final IParserNode statement,
+                                final IFunction function )
+   {
+      addViolation( statement );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#getFirstPrimaryToFind()
+    */
+   @Override
+   protected String getFirstPrimaryToFind()
+   {
+      return "callLater";
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/component/UpdateChildrenNumberInUpdateDisplayListRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/component/UpdateChildrenNumberInUpdateDisplayListRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/component/UpdateChildrenNumberInUpdateDisplayListRule.java
new file mode 100644
index 0000000..642d3cc
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/component/UpdateChildrenNumberInUpdateDisplayListRule.java
@@ -0,0 +1,66 @@
+/*
+ * 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.component;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class UpdateChildrenNumberInUpdateDisplayListRule extends AbstractAstFlexRule // NO_UCD
+{
+   private static final String[] METHOD_NAMES        =
+                                                     { "addChild",
+               "addChildAt",
+               "removeChild",
+               "removeChildAt"                      };
+   private static final String   UPDATE_DISPLAY_LIST = "updateDisplayList";
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected final void findViolations( final IFunction function )
+   {
+      if ( function.getName().equals( UPDATE_DISPLAY_LIST ) )
+      {
+         for ( final String methodName : METHOD_NAMES )
+         {
+            for ( final IParserNode statement : function.findPrimaryStatementsInBody( methodName ) )
+            {
+               addViolation( statement );
+            }
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/css/StyleBlockInMxmlRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/css/StyleBlockInMxmlRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/css/StyleBlockInMxmlRule.java
new file mode 100644
index 0000000..15fa24a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/css/StyleBlockInMxmlRule.java
@@ -0,0 +1,68 @@
+/*
+ * 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.css;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class StyleBlockInMxmlRule extends AbstractRegexpBasedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return getCurrentFile().isMxml();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected final String getRegexp()
+   {
+      return ".*<mx:Style>.*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected final boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      return true;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/css/UseCssInsteadOfEmbedMetaDataRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/css/UseCssInsteadOfEmbedMetaDataRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/css/UseCssInsteadOfEmbedMetaDataRule.java
new file mode 100644
index 0000000..cc9c5b3
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/css/UseCssInsteadOfEmbedMetaDataRule.java
@@ -0,0 +1,84 @@
+/*
+ * 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.css;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IConstant;
+import com.adobe.ac.pmd.nodes.IMetaData;
+import com.adobe.ac.pmd.nodes.IMetaDataListHolder;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class UseCssInsteadOfEmbedMetaDataRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromAttributes
+    * (java.util.List)
+    */
+   @Override
+   protected final void findViolationsFromAttributes( final List< IAttribute > variables )
+   {
+      super.findViolationsFromAttributes( variables );
+
+      findViolationsInMetaDataList( variables );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromConstants
+    * (java.util.List)
+    */
+   @Override
+   protected final void findViolationsFromConstants( final List< IConstant > constants )
+   {
+      super.findViolationsFromConstants( constants );
+
+      findViolationsInMetaDataList( constants );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   private void findViolationsInMetaDataList( final List< ? extends IMetaDataListHolder > metaDataList )
+   {
+      for ( final IMetaDataListHolder metaData : metaDataList )
+      {
+         final List< IMetaData > embedList = metaData.getMetaData( MetaData.EMBED );
+
+         if ( embedList != null )
+         {
+            addViolation( embedList.get( 0 ) );
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/empty/AbstractEmptyBlockRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/empty/AbstractEmptyBlockRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/empty/AbstractEmptyBlockRule.java
new file mode 100644
index 0000000..9f92476
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/empty/AbstractEmptyBlockRule.java
@@ -0,0 +1,37 @@
+/*
+ * 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.empty;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.NodeKind;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public abstract class AbstractEmptyBlockRule extends AbstractAstFlexRule
+{
+   /**
+    * @param block
+    * @return
+    */
+   protected static boolean isBlockEmpty( final IParserNode block )
+   {
+      return block.is( NodeKind.BLOCK )
+            && block.numChildren() == 0 || block.is( NodeKind.STMT_EMPTY );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/empty/EmptyCatchStatementRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/empty/EmptyCatchStatementRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/empty/EmptyCatchStatementRule.java
new file mode 100644
index 0000000..b73a29e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/empty/EmptyCatchStatementRule.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.empty;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class EmptyCatchStatementRule extends AbstractEmptyBlockRule
+{
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitCatch(com.adobe.ac
+    * .pmd.parser.IParserNode)
+    */
+   @Override
+   protected final void visitCatch( final IParserNode ast )
+   {
+      super.visitCatch( ast );
+
+      if ( isBlockEmpty( ast.getChild( 2 ) ) )
+      {
+         addViolation( ast );
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/empty/EmptyIfStmtRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/empty/EmptyIfStmtRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/empty/EmptyIfStmtRule.java
new file mode 100644
index 0000000..2774d93
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/empty/EmptyIfStmtRule.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.empty;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class EmptyIfStmtRule extends AbstractEmptyBlockRule
+{
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitIf(com.adobe.ac.pmd
+    * .parser.IParserNode)
+    */
+   @Override
+   protected final void visitIf( final IParserNode ast )
+   {
+      super.visitIf( ast );
+
+      if ( isBlockEmpty( ast.getChild( 1 ) ) )
+      {
+         addViolation( ast );
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/AbstractEventRelatedRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/AbstractEventRelatedRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/AbstractEventRelatedRule.java
new file mode 100644
index 0000000..b6d4514
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/AbstractEventRelatedRule.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.event;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public abstract class AbstractEventRelatedRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#isConcernedByTheCurrentFile
+    * ()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return !getCurrentFile().isMxml();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected void findViolations( final IClass classNode )
+   {
+      if ( classNode.getExtensionName() != null
+            && classNode.getExtensionName().endsWith( "Event" ) )
+      {
+         super.findViolations( classNode );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/ConstructorDispatchingEventRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/ConstructorDispatchingEventRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/ConstructorDispatchingEventRule.java
new file mode 100644
index 0000000..1d9945e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/ConstructorDispatchingEventRule.java
@@ -0,0 +1,65 @@
+/*
+ * 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.event;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class ConstructorDispatchingEventRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#isConcernedByTheCurrentFile
+    * ()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return !getCurrentFile().isMxml();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromConstructor
+    * (com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected final void findViolationsFromConstructor( final IFunction constructor )
+   {
+      for ( final IParserNode statement : constructor.findPrimaryStatementsInBody( "dispatchEvent" ) )
+      {
+         addViolation( statement );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/DefaultEventNameRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/DefaultEventNameRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/DefaultEventNameRule.java
new file mode 100644
index 0000000..523490a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/DefaultEventNameRule.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.event;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class DefaultEventNameRule extends AbstractEventRelatedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromConstructor
+    * (com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected final void findViolationsFromConstructor( final IFunction constructor )
+   {
+      if ( constructor.getParameters().size() > 0
+            && constructor.getParameters().get( 0 ).getType().toString().equals( "String" )
+            && constructor.getParameters().get( 0 ).getInitializationExpression() != null )
+      {
+         addViolation( constructor.getParameters().get( 0 ) );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/DispatchHardCodedEventNameRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/DispatchHardCodedEventNameRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/DispatchHardCodedEventNameRule.java
new file mode 100644
index 0000000..2770a12
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/DispatchHardCodedEventNameRule.java
@@ -0,0 +1,80 @@
+/*
+ * 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.event;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class DispatchHardCodedEventNameRule extends AbstractRegexpBasedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected final String getRegexp()
+   {
+      return ".*dispatchEvent *\\( *new Event\\( *(\"|\').*(\"|\') *\\) *\\).*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#isCurrentLineConcerned
+    * (java.lang.String)
+    */
+   @Override
+   protected boolean isCurrentLineConcerned( final String line )
+   {
+      return line.contains( "dispatchEvent" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected final boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      return getMatcher( line ).matches();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/EventMissingCloneFunctionRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/EventMissingCloneFunctionRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/EventMissingCloneFunctionRule.java
new file mode 100644
index 0000000..69eca21
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/EventMissingCloneFunctionRule.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.event;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class EventMissingCloneFunctionRule extends AbstractEventRelatedRule
+{
+   private IClass classNode = null;
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.event.AbstractEventRelatedRule#findViolations(com
+    * .adobe.ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNodeToBeSet )
+   {
+      classNode = classNodeToBeSet;
+      if ( "Event".equals( classNode.getExtensionName() ) )
+      {
+         super.findViolations( classNode );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(java.util
+    * .List)
+    */
+   @Override
+   protected final void findViolations( final List< IFunction > functions )
+   {
+      boolean cloneFound = false;
+
+      for ( final IFunction functionNode : functions )
+      {
+         if ( "clone".equals( functionNode.getName() ) )
+         {
+            cloneFound = true;
+            break;
+         }
+      }
+      if ( !cloneFound )
+      {
+         addViolation( classNode );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/ListenForHardCodedEventNameRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/ListenForHardCodedEventNameRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/ListenForHardCodedEventNameRule.java
new file mode 100644
index 0000000..99d0a24
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/ListenForHardCodedEventNameRule.java
@@ -0,0 +1,80 @@
+/*
+ * 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.event;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class ListenForHardCodedEventNameRule extends AbstractRegexpBasedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected final String getRegexp()
+   {
+      return ".*addEventListener *\\( *(\"|\').*(\"|\').*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#isCurrentLineConcerned
+    * (java.lang.String)
+    */
+   @Override
+   protected boolean isCurrentLineConcerned( final String line )
+   {
+      return line.contains( "addEventListener" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected final boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      return getMatcher( line ).matches();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/PublicVariableInCustomEventRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/PublicVariableInCustomEventRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/PublicVariableInCustomEventRule.java
new file mode 100644
index 0000000..caaf913
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/PublicVariableInCustomEventRule.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.event;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class PublicVariableInCustomEventRule extends AbstractEventRelatedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromAttributes
+    * (java.util.List)
+    */
+   @Override
+   protected final void findViolationsFromAttributes( final List< IAttribute > variables )
+   {
+      for ( final IAttribute attribute : variables )
+      {
+         if ( attribute.isPublic() )
+         {
+            addViolation( attribute,
+                          attribute.getName() );
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/UnboundTypeInMetadataRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/UnboundTypeInMetadataRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/UnboundTypeInMetadataRule.java
new file mode 100644
index 0000000..0dc7d2a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/UnboundTypeInMetadataRule.java
@@ -0,0 +1,83 @@
+/*
+ * 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.event;
+
+import java.util.List;
+import java.util.Map;
+
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IMetaData;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class UnboundTypeInMetadataRule extends AbstractAstFlexRule
+{
+   private static final String TYPE = "type";
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNode )
+   {
+      final List< IMetaData > eventMetaDatas = classNode.getMetaData( MetaData.EVENT );
+
+      if ( eventMetaDatas != null )
+      {
+         findViolationsInMetaDataNode( eventMetaDatas,
+                                       getFilesInSourcePath() );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   private void findViolationsInMetaDataNode( final List< IMetaData > eventMetaDatas,
+                                              final Map< String, IFlexFile > files )
+   {
+      for ( final IMetaData metaData : eventMetaDatas )
+      {
+         if ( metaData.getProperty( TYPE ).length > 0 )
+         {
+            final String type = metaData.getProperty( TYPE )[ 0 ];
+
+            if ( !files.containsKey( type
+                  + ".as" )
+                  && !type.startsWith( "mx." ) && !type.startsWith( "flash." ) )
+            {
+               addViolation( metaData,
+                             type );
+            }
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/UntypedEventMetadataRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/UntypedEventMetadataRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/UntypedEventMetadataRule.java
new file mode 100644
index 0000000..8851615
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/event/UntypedEventMetadataRule.java
@@ -0,0 +1,71 @@
+/*
+ * 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.event;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IMetaData;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class UntypedEventMetadataRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNode )
+   {
+      final List< IMetaData > eventMetaData = classNode.getMetaData( MetaData.EVENT );
+
+      if ( eventMetaData != null )
+      {
+         findViolationsInMetaDataNode( eventMetaData );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   private void findViolationsInMetaDataNode( final List< IMetaData > eventMetaDatas )
+   {
+      for ( final IMetaData metaData : eventMetaDatas )
+      {
+         final String metaDataValue = metaData.getInternalNode().getStringValue();
+
+         if ( !metaDataValue.contains( "type = " ) )
+         {
+            addViolation( metaData );
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/flexunit/EmptyUnitTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/flexunit/EmptyUnitTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/flexunit/EmptyUnitTest.java
new file mode 100644
index 0000000..3980293
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/flexunit/EmptyUnitTest.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.flexunit;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public final class EmptyUnitTest extends AbstractAstFlexRule
+{
+   private static final String[] ASSERTIONS = new String[]
+                                            { "assertEquals",
+               "assertObjectEquals",
+               "assertMatch",
+               "assertNoMatch",
+               "assertContained",
+               "assertNotContained",
+               "assertStrictlyEquals",
+               "assertTrue",
+               "assertFalse",
+               "assertNull",
+               "assertNotNull",
+               "assertUndefined",
+               "assertNotUndefined",
+               "assertThat",
+               "handleEvent",
+               "assertEvents",
+               "fail"                      };
+
+   private boolean               isExtendingTestCase;
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected void findViolations( final IClass classNode )
+   {
+      isExtendingTestCase = classNode.getExtensionName() != null
+            && classNode.getExtensionName().endsWith( "TestCase" );
+
+      super.findViolations( classNode );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void findViolations( final IFunction function )
+   {
+      super.findViolations( function );
+
+      if ( isExtendingTestCase
+            && function.getName().startsWith( "test" )
+            && function.findPrimaryStatementInBody( ASSERTIONS ).isEmpty() )
+      {
+         addViolation( function );
+      }
+      if ( !function.getMetaData( MetaData.TEST ).isEmpty()
+            && function.findPrimaryStatementInBody( ASSERTIONS ).isEmpty() )
+      {
+         addViolation( function );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AlertShowRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AlertShowRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AlertShowRule.java
new file mode 100644
index 0000000..8b8ac35
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AlertShowRule.java
@@ -0,0 +1,74 @@
+/*
+ * 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.maintanability;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class AlertShowRule extends AbstractPrimaryAstRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#addViolation(com.adobe
+    * .ac.pmd.parser.IParserNode, com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void addViolation( final IParserNode statement,
+                                final IFunction function )
+   {
+      addViolation( statement );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#getFirstPrimaryToFind()
+    */
+   @Override
+   protected String getFirstPrimaryToFind()
+   {
+      return "Alert";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#getSecondPrimaryToFind
+    * ()
+    */
+   @Override
+   protected String getSecondPrimaryToFind()
+   {
+      return "show";
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ArrayFieldWithNoArrayElementTypeRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ArrayFieldWithNoArrayElementTypeRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ArrayFieldWithNoArrayElementTypeRule.java
new file mode 100644
index 0000000..f1d8f90
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ArrayFieldWithNoArrayElementTypeRule.java
@@ -0,0 +1,93 @@
+/*
+ * 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.maintanability;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IConstant;
+import com.adobe.ac.pmd.nodes.IField;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class ArrayFieldWithNoArrayElementTypeRule extends AbstractAstFlexRule
+{
+   private static final String ARRAY_TYPE = "Array";
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#isConcernedByTheCurrentFile
+    * ()
+    */
+   @Override
+   public boolean isConcernedByTheCurrentFile()
+   {
+      return getCurrentFile().isMxml();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromAttributes
+    * (java.util.List)
+    */
+   @Override
+   protected final void findViolationsFromAttributes( final List< IAttribute > variables )
+   {
+      findViolationFromFieds( variables );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromConstants
+    * (java.util.List)
+    */
+   @Override
+   protected void findViolationsFromConstants( final List< IConstant > constants )
+   {
+      findViolationFromFieds( constants );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   private void findViolationFromFieds( final List< ? extends IField > fields )
+   {
+      for ( final IField variable : fields )
+      {
+         if ( ARRAY_TYPE.equals( variable.getType().toString() )
+               && variable.getMetaData( MetaData.ARRAY_ELEMENT_TYPE ) == null )
+         {
+            addViolation( variable,
+                          variable.getName() );
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AvoidProtectedFieldInFinalClassRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AvoidProtectedFieldInFinalClassRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AvoidProtectedFieldInFinalClassRule.java
new file mode 100644
index 0000000..940ed49
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AvoidProtectedFieldInFinalClassRule.java
@@ -0,0 +1,92 @@
+/*
+ * 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.maintanability;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.Modifier;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class AvoidProtectedFieldInFinalClassRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNode )
+   {
+      final boolean isClassFinal = classNode.isFinal();
+
+      findProtectedAttributes( classNode.getAttributes(),
+                               isClassFinal );
+      findProtectedMethods( classNode.getFunctions(),
+                            isClassFinal );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   private void findProtectedAttributes( final List< IAttribute > atributes,
+                                         final boolean isClassFinal )
+   {
+      if ( atributes != null )
+      {
+         for ( final IAttribute field : atributes )
+         {
+            if ( field.is( Modifier.PROTECTED )
+                  && isClassFinal )
+            {
+               addViolation( field,
+                             field.getName() );
+            }
+         }
+      }
+   }
+
+   private void findProtectedMethods( final List< IFunction > functions,
+                                      final boolean isClassFinal )
+   {
+      if ( functions != null )
+      {
+         for ( final IFunction function : functions )
+         {
+            if ( function.is( Modifier.PROTECTED )
+                  && !function.isOverriden() && isClassFinal )
+            {
+               addViolation( function );
+            }
+         }
+      }
+   }
+}


[29/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestTryCatchFinallyStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestTryCatchFinallyStatement.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestTryCatchFinallyStatement.java
new file mode 100644
index 0000000..45da07e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestTryCatchFinallyStatement.java
@@ -0,0 +1,58 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestTryCatchFinallyStatement extends AbstractStatementTest
+{
+   @Test
+   public void testCatch() throws TokenException
+   {
+      assertStatement( "1",
+                       "catch( e : Error ) {trace( true ); }",
+                       "<catch line=\"1\"><name line=\"1\">e"
+                             + "</name><type line=\"1\">Error</type><block line=\"1\">"
+                             + "<call line=\"1\"><primary line=\"1\">trace</primary>"
+                             + "<arguments line=\"1\"><primary line=\"1\">true"
+                             + "</primary></arguments></call></block></catch>" );
+   }
+
+   @Test
+   public void testFinally() throws TokenException
+   {
+      assertStatement( "1",
+                       "finally {trace( true ); }",
+                       "<finally line=\"1\"><block line=\"1\">"
+                             + "<call line=\"1\"><primary line=\"1\">"
+                             + "trace</primary><arguments line=\"1\"><primary line=\"1\">"
+                             + "true</primary></arguments></call></block></finally>" );
+   }
+
+   @Test
+   public void testTry() throws TokenException
+   {
+      assertStatement( "1",
+                       "try {trace( true ); }",
+                       "<try line=\"1\"><block line=\"1\">"
+                             + "<call line=\"1\"><primary line=\"1\">"
+                             + "trace</primary><arguments line=\"1\"><primary line=\"1\">"
+                             + "true</primary></arguments></call></block></try>" );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestUnaryExpression.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestUnaryExpression.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestUnaryExpression.java
new file mode 100644
index 0000000..41ca8d2
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestUnaryExpression.java
@@ -0,0 +1,132 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestUnaryExpression extends AbstractStatementTest
+{
+   @Test
+   public void testArrayAccess() throws TokenException
+   {
+      assertStatement( "1",
+                       "x[0]",
+                       "<arr-acc line=\"1\"><primary line=\"1\">x<"
+                             + "/primary><primary line=\"1\">0</primary></arr-acc>" );
+   }
+
+   @Test
+   public void testComplex() throws TokenException
+   {
+      assertStatement( "1",
+                       "a.b['c'].d.e(1)",
+                       "<dot line=\"1\"><primary line=\"1\">a"
+                             + "</primary><dot line=\"1\"><arr-acc line=\"1\">"
+                             + "<primary line=\"1\">b</primary><primary line=\"1\">"
+                             + "'c'</primary></arr-acc><dot line=\"1\"><primary line=\"1\">"
+                             + "d</primary><call line=\"1\"><primary line=\"1\">e"
+                             + "</primary><arguments line=\"1\"><primary line=\"1\">1"
+                             + "</primary></arguments></call></dot></dot></dot>" );
+
+      assertStatement( "2",
+                       "a.b['c']['d'].e(1)",
+                       "<dot line=\"1\"><primary line=\"1\">a"
+                             + "</primary><dot line=\"1\"><arr-acc line=\"1\">"
+                             + "<primary line=\"1\">b</primary><primary line=\"1\">"
+                             + "'c'</primary><primary line=\"1\">'d'</primary>"
+                             + "</arr-acc><call line=\"1\"><primary line=\"1\">"
+                             + "e</primary><arguments line=\"1\"><primary line=\"1\">1"
+                             + "</primary></arguments></call></dot></dot>" );
+   }
+
+   @Test
+   public void testMethodCall() throws TokenException
+   {
+      assertStatement( "1",
+                       "method()",
+                       "<call line=\"1\"><primary line=\"1\">"
+                             + "method</primary><arguments line=\"1\"></arguments></call>" );
+
+      assertStatement( "2",
+                       "method( 1, \"two\" )",
+                       "<call line=\"1\"><primary line=\"1\">"
+                             + "method</primary><arguments line=\"1\"><primary line=\"1\">1"
+                             + "</primary><primary line=\"1\">\"two\"</primary></arguments></call>" );
+   }
+
+   @Test
+   public void testMultipleMethodCall() throws TokenException
+   {
+      assertStatement( "1",
+                       "method()()",
+                       "<call line=\"1\"><primary line=\"1\">"
+                             + "method</primary><arguments line=\"1\"></arguments>"
+                             + "<arguments line=\"1\"></arguments></call>" );
+   }
+
+   @Test
+   public void testParseUnaryExpressions() throws TokenException
+   {
+      assertStatement( "1",
+                       "++x",
+                       "<pre-inc line=\"1\"><primary line=\"1\">x</primary></pre-inc>" );
+      assertStatement( "2",
+                       "x++",
+                       "<post-inc line=\"2\"><primary line=\"1\">x</primary></post-inc>" );
+      assertStatement( "3",
+                       "--x",
+                       "<pre-dec line=\"1\"><primary line=\"1\">x</primary></pre-dec>" );
+      assertStatement( "4",
+                       "x--",
+                       "<post-dec line=\"2\"><primary line=\"1\">x</primary></post-dec>" );
+      assertStatement( "5",
+                       "+x",
+                       "<plus line=\"1\"><primary line=\"1\">x</primary></plus>" );
+      assertStatement( "6",
+                       "+ x",
+                       "<plus line=\"1\"><primary line=\"1\">x</primary></plus>" );
+      assertStatement( "7",
+                       "-x",
+                       "<minus line=\"1\"><primary line=\"1\">x</primary></minus>" );
+      assertStatement( "8",
+                       "- x",
+                       "<minus line=\"1\"><primary line=\"1\">x</primary></minus>" );
+      assertStatement( "9",
+                       "delete x",
+                       "<delete line=\"1\"><primary line=\"1\">x</primary></delete>" );
+      assertStatement( "a",
+                       "void x",
+                       "<void line=\"1\"><primary line=\"1\">x</primary></void>" );
+      assertStatement( "b",
+                       "typeof x",
+                       "<typeof line=\"1\"><primary line=\"1\">x</primary></typeof>" );
+      assertStatement( "c",
+                       "! x",
+                       "<not line=\"1\"><primary line=\"1\">x</primary></not>" );
+      assertStatement( "d",
+                       "~ x",
+                       "<b-not line=\"1\"><primary line=\"1\">x</primary></b-not>" );
+      assertStatement( "e",
+                       "x++",
+                       "<post-inc line=\"2\"><primary line=\"1\">x</primary></post-inc>" );
+      assertStatement( "f",
+                       "x--",
+                       "<post-dec line=\"2\"><primary line=\"1\">x</primary></post-dec>" );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestVarStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestVarStatement.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestVarStatement.java
new file mode 100644
index 0000000..baa9584
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestVarStatement.java
@@ -0,0 +1,126 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestVarStatement extends AbstractStatementTest
+{
+   @Test
+   public void testFlexPMD211() throws TokenException
+   {
+      assertStatement( "",
+                       "var a:Vector.<String> = new Vector.<String>();\nvar i:int;",
+                       "<var-list line=\"1\"><name-type-init line=\"1\"><name line=\"1\">a</name>"
+                             + "<vector line=\"1\"><type line=\"1\">String</type></vector>"
+                             + "<init line=\"1\"><new line=\"1\"><primary line=\"1\">Vector</primary>"
+                             + "<vector line=\"1\"><vector line=\"1\"><type line=\"1\">String</type>"
+                             + "</vector></vector><arguments line=\"1\"></arguments></new></init>"
+                             + "</name-type-init></var-list>" );
+   }
+
+   @Test
+   public void testFullFeaturedVar() throws TokenException
+   {
+      assertStatement( "1",
+                       "var a : int = 4",
+                       "<var-list line=\"1\">"
+                             + "<name-type-init line=\"1\">"
+                             + "<name line=\"1\">a</name><type line=\"1\">int</type>"
+                             + "<init line=\"1\"><primary line=\"1\">4</primary>"
+                             + "</init></name-type-init></var-list>" );
+
+      assertStatement( "1",
+                       "var a : int = 4, b : int = 2;",
+                       "<var-list line=\"1\"><name-type-init line=\"1\">"
+                             + "<name line=\"1\">a</name><type line=\"1\">int</type>"
+                             + "<init line=\"1\"><primary line=\"1\">4</primary></init>"
+                             + "</name-type-init><name-type-init line=\"1\">"
+                             + "<name line=\"1\">b</name><type line=\"1\">int</type>"
+                             + "<init line=\"1\"><primary line=\"1\">2</primary></init>"
+                             + "</name-type-init></var-list>" );
+
+      assertStatement( "with array",
+                       "var colors:Array = [0x2bc9f6, 0x0086ad];",
+                       "<var-list line=\"1\">"
+                             + "<name-type-init line=\"1\">"
+                             + "<name line=\"1\">colors</name><type line=\"1\">Array</type>"
+                             + "<init line=\"1\">" + "<primary line=\"1\"><array line=\"1\">"
+                             + "<primary line=\"1\">0x2bc9f6</primary>"
+                             + "<primary line=\"1\">0x0086ad</primary>"
+                             + "</array></primary></init></name-type-init></var-list>" );
+   }
+
+   @Test
+   public void testInitializedVar() throws TokenException
+   {
+      assertStatement( "1",
+                       "var a = 4",
+                       "<var-list line=\"1\"><name-type-init line=\"1\">"
+                             + "<name line=\"1\">a</name><type line=\"1\">"
+                             + "</type><init line=\"1\"><primary line=\"1\">4</primary>"
+                             + "</init></name-type-init></var-list>" );
+   }
+
+   @Test
+   public void testSimpleVar() throws TokenException
+   {
+      assertStatement( "1",
+                       "var a",
+                       "<var-list line=\"1\"><name-type-init line=\"1\">"
+                             + "<name line=\"1\">a</name><type line=\"2\">"
+                             + "</type></name-type-init></var-list>" );
+   }
+
+   @Test
+   public void testTypedVar() throws TokenException
+   {
+      assertStatement( "1",
+                       "var a : Object",
+                       "<var-list line=\"1\"><name-type-init line=\"1\">"
+                             + "<name line=\"1\">a</name><type line=\"1\">Object</type>"
+                             + "</name-type-init></var-list>" );
+   }
+
+   @Test
+   public void testVector() throws TokenException
+   {
+      assertStatement( "vector",
+                       "var v:Vector.<DisplayObject> = new Vector.<Sprite>();",
+                       "<var-list line=\"1\"><name-type-init line=\"1\"><name line=\"1\">v</name><vector line=\"1\"><type line=\"1\">DisplayObject</type></vector><init line=\"1\"><new line=\"1\"><primary line=\"1\">Vector</primary><vector line=\"1\"><vector line=\"1\"><type line=\"1\">Sprite</type></vector></vector><arguments line=\"1\"></arguments></new></init></name-type-init></var-list>" );
+
+      assertStatement( "vector",
+                       "var v:Vector.< Vector.< String > >",
+                       "<var-list line=\"1\"><name-type-init line=\"1\">"
+                             + "<name line=\"1\">" + "v</name><vector line=\"1\"><vector line=\"1\""
+                             + "><type line=\"1\""
+                             + ">String</type></vector></vector></name-type-init></var-list>" );
+
+      assertStatement( "vector",
+                       "var v:Vector.<Vector.<String>>;",
+                       "<var-list line=\"1\"><name-type-init line=\"1\">"
+                             + "<name line=\"1\">"
+                             + "v</name><vector line=\"1\"><vector line=\"1\"><type line=\"1\""
+                             + ">String</type></vector></vector></name-type-init></var-list>" );
+
+      assertStatement( "",
+                       "var HT:Vector.<BitString> = new Vector.<BitString>(251, true);",
+                       "<var-list line=\"1\"><name-type-init line=\"1\"><name line=\"1\">HT</name><vector line=\"1\"><type line=\"1\">BitString</type></vector><init line=\"1\"><new line=\"1\"><primary line=\"1\">Vector</primary><vector line=\"1\"><vector line=\"1\"><type line=\"1\">BitString</type></vector></vector><arguments line=\"1\"><primary line=\"1\">251</primary><primary line=\"1\">true</primary></arguments></new></init></name-type-init></var-list>" );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestWhileStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestWhileStatement.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestWhileStatement.java
new file mode 100644
index 0000000..159d101
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestWhileStatement.java
@@ -0,0 +1,67 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestWhileStatement extends AbstractStatementTest
+{
+   @Test
+   public void testWhile() throws TokenException
+   {
+      assertStatement( "1",
+                       "while( i++ ){ trace( i ); }",
+                       "<while line=\"1\">"
+                             + "<condition line=\"1\">"
+                             + "<post-inc line=\"1\">"
+                             + "<primary line=\"1\">i</primary>"
+                             + "</post-inc>"
+                             + "</condition>"
+                             + "<block line=\"1\"><call line=\"1\">"
+                             + "<primary line=\"1\">trace</primary>"
+                             + "<arguments line=\"1\"><primary line=\"1\">i</primary>"
+                             + "</arguments></call>" + "</block>" + "</while>" );
+   }
+
+   @Test
+   public void testWhileWithEmptyStatement() throws TokenException
+   {
+      assertStatement( "1",
+                       "while( i++ ); ",
+                       "<while line=\"1\">"
+                             + "<condition line=\"1\">"
+                             + "<post-inc line=\"1\">"
+                             + "<primary line=\"1\">i</primary>"
+                             + "</post-inc></condition><stmt-empty line=\"1\">;</stmt-empty></while>" );
+   }
+
+   @Test
+   public void testWhileWithoutBlock() throws TokenException
+   {
+      assertStatement( "1",
+                       "while( i++ ) trace( i ); ",
+                       "<while line=\"1\">"
+                             + "<condition line=\"1\">"
+                             + "<post-inc line=\"1\">"
+                             + "<primary line=\"1\">i</primary>"
+                             + "</post-inc></condition><call line=\"1\">"
+                             + "<primary line=\"1\">trace</primary><arguments line=\"1\">"
+                             + "<primary line=\"1\">i</primary></arguments></call></while>" );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/Enum.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/Enum.as b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/Enum.as
new file mode 100644
index 0000000..358e103
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/Enum.as
@@ -0,0 +1,84 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.granite.util 
+{	
+	import flash.utils.IDataInput;
+	import flash.utils.IDataOutput;
+	import flash.utils.IExternalizable;
+	import flash.utils.getQualifiedClassName;
+	
+	public class Enum implements IExternalizable
+	{
+		private var _name:String;
+		
+		public function Enum(name:String, restrictor:Restrictor) {
+			_name = (restrictor is Restrictor ? name : constantOf(name).name);
+		}
+		
+		public function get name():String {
+			return _name;
+		}
+		
+		protected function getConstants():Array {
+			throw new Error("Should be overriden");
+		}
+		
+		protected function constantOf(name:String):Enum {
+			for each (var o:* in getConstants()) {
+				var enum:Enum = Enum(o);
+				if (enum.name == name)
+					return enum;
+			}
+			throw new ArgumentError("Invalid " + getQualifiedClassName(this) + " value: " + name);
+		}
+		
+		public function readExternal(input:IDataInput):void {
+			_name = constantOf(input.readObject() as String).name;
+		}
+		
+		public function writeExternal(output:IDataOutput):void {
+			output.writeObject(_name);
+		}
+		
+		public static function normalize(enum:Enum):Enum {
+			return (enum == null ? null : enum.constantOf(enum.name));
+		}
+		
+		public static function readEnum(input:IDataInput):Enum {
+			return normalize(input.readObject() as Enum);
+		}
+		
+		public function toString():String {
+			return name;
+		}
+		
+		public function equals(other:Enum):Boolean {
+			return other === this || (
+				other != null &&
+				getQualifiedClassName(this) == getQualifiedClassName(other) &&
+				other.name == this.name
+			);
+		}
+		
+		protected static function get _():Restrictor { // NO PMD ProtectedStaticMethod
+			return new Restrictor();
+		}
+	}
+}
+class Restrictor {}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FisheyeBase.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FisheyeBase.as b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FisheyeBase.as
new file mode 100644
index 0000000..fe2147a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FisheyeBase.as
@@ -0,0 +1,564 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 qs.controls.fisheyeClasses
+{
+    import flash.display.DisplayObject;
+    import flash.display.Sprite;
+    import flash.events.Event;
+    import flash.events.MouseEvent;
+    import mx.core.ClassFactory;
+    import mx.core.IDataRenderer;
+    import mx.core.IFactory;
+    import mx.core.UIComponent;
+    import qs.controls.CachedLabel;
+    import qs.controls.LayoutAnimator;
+
+    /** the horizontal alignment.  */
+    [Style( name="horizontalAlign", type="String", enumeration="left,center,right,justified", inherit="no" )]
+    /** the vertical alignment */
+    [Style( name="verticalAlign", type="String", enumeration="top,center,bottom,justified", inherit="no" )]
+    /** the amount of space, in pixels, between invidual items */
+    [Style( name="defaultSpacing", type="Number", inherit="no" )]
+    /** the amount of space, in pixels, between invidual items when hilighted*/
+    [Style( name="hilightSpacing", type="Number", inherit="no" )]
+    /** the property on the item renderer to assign to when the renderer' state changes */
+    [Style( name="stateProperty", type="String", inherit="no" )]
+    /** the value to assign to 'stateProperty' on the renderer when the item is hilighted */
+    [Style( name="rolloverValue", type="String", inherit="no" )]
+    /** the value to assign to 'stateProperty' on the renderer when the item is selected */
+    [Style( name="selectedValue", type="String", inherit="no" )]
+    /** the value to assign to 'stateProperty' on the renderer when some other item is selected */
+    [Style( name="unselectedValue", type="String", inherit="no" )]
+    /** the value to assign to 'stateProperty' on the renderer when the item is in its default state */
+    [Style( name="defaultValue", type="String", inherit="no" )]
+    /** the scale factor assigned to renderers when no item is hilighted or selected */
+    [Style( name="defaultScale", type="Number", inherit="no" )]
+    /** the minimum scale factor assigned to renderers on screen. The actual scale factor assigned to
+     * an item will range between minScale and hilightMaxScale based on its distance from the hilighted or selected item */
+    [Style( name="hilightMinScale", type="Number", inherit="no" )]
+    /** the maximum scale factor assigned to renderers on screen. The actual scale factor assigned to
+     * an item will range between minScale and hilightMaxScale based on its distance from the hilighted or selected item */
+    [Style( name="hilightMaxScale", type="Number", inherit="no" )]
+    /** how quickly or slowly items scale down from the hilightMaxScale value to minScale value.  A value of 1 will scale linearly down from the hilighted item out to the item at scaleRadius.
+     * A value higher than wone will descend slowly from the hilight, then drop off quicker at the edge. A value lower than one will drop off quickly from the hilight Should be greater than 0*/
+    [Style( name="hilightScaleSlope", type="Number", inherit="no" )]
+    /** The radius, in items, around the hilighted item that are affected by the hilight. A value of 1 means only the hilighted item will scale. A value of three means the hilighted item plus the two items
+     * to either side will scale up. How much each item scales is affected by the scaleSlope style.*/
+    [Style( name="hilightScaleRadius", type="Number", inherit="no" )]
+    /** how quickly items animate to their target location when the layout of the renderers change.  A value of 1 will
+     * snap instantly to the new value, while a value of 0 will never change */
+    [Style( name="animationSpeed", type="Number", inherit="no" )]
+    [Event( name="change", type="flash.events.Event" )]
+    [Event( name="loaded", type="flash.events.Event" )]
+    [DefaultProperty( "dataProvider" )]
+    public class FisheyeBase extends UIComponent
+    {
+        public static const LOADED : String = "loaded";
+
+        /** the data items driving the component
+         */
+        private var _items : Array = [];
+
+        /** when a new dataprovider is assigned, we keep it in reserve until we have a chance
+         * to generate new renderers for it.  This is the temporary holding pen for those new items
+         */
+        private var _pendingItems : Array;
+
+        protected var itemsChanged : Boolean = false;
+
+        /** true if the renderers need to be regenerated */
+        protected var renderersDirty : Boolean = true;
+
+        /** the renderers representing the data items, one for each item */
+        protected var renderers : Array = [];
+
+        /** the currently hilighted item
+         */
+        protected var hilightedItemIndex : Number = NaN;
+
+        /** the currently selected item
+         */
+        protected var selectedItemIndex : Number = NaN;
+
+        /** @private */
+        private var _selectionEnabled : Boolean = true;
+
+        /** the factory that generates item renderers
+         */
+        private var _itemRendererFactory : IFactory;
+
+        /**
+         * the object that manages animating the children layout
+         */
+        protected var animator : LayoutAnimator;
+
+        /** Constructor */
+        public function FisheyeBase()
+        {
+            super();
+            _itemRendererFactory = new ClassFactory( CachedLabel );
+            addEventListener( MouseEvent.MOUSE_MOVE, updateHilight );
+            addEventListener( MouseEvent.ROLL_OUT, removeHilight );
+            addEventListener( MouseEvent.MOUSE_DOWN, updateSelection );
+            var maskShape : Sprite = new Sprite();
+            addChild( maskShape );
+            mask = maskShape;
+            maskShape.graphics.beginFill( 0 );
+            maskShape.graphics.drawRect( 0, 0, 10, 10 );
+            maskShape.graphics.endFill();
+            animator = new LayoutAnimator();
+            animator.layoutFunction = generateLayout;
+        }
+
+        //-----------------------------------------------------------------
+        /** the data source
+         */
+        public function set dataProvider( value : Array ) : void
+        {
+            _pendingItems = value;
+            renderersDirty = true;
+            itemsChanged = true;
+            invalidateProperties();
+            dispatchEvent( new Event( LOADED ) );
+        }
+
+        public function get dataProvider() : Array
+        {
+            return _items;
+        }
+
+        //-----------------------------------------------------------------
+        public function set selectionEnabled( value : Boolean ) : void
+        {
+            if ( _selectionEnabled == value )
+                return;
+            _selectionEnabled = value;
+            selectedIndex = selectedIndex;
+        }
+
+        public function get selectionEnabled() : Boolean
+        {
+            return _selectionEnabled;
+        }
+
+        [Bindable( "change" )]
+        public function get selectedItem() : Object
+        {
+            return ( isNaN( selectedItemIndex ) ? null : _items[ selectedItemIndex ] );
+        }
+
+        public function set selectedItem( value : Object ) : void
+        {
+            var newIndex : Number;
+
+            for ( var i : int = 0; i < _items.length; i++ )
+            {
+                if ( value == _items[ i ] )
+                {
+                    newIndex = i;
+                    break;
+                }
+            }
+            selectedIndex = newIndex;
+        }
+
+        [Bindable( "change" )]
+        public function get selectedIndex() : int
+        {
+            return ( isNaN( selectedItemIndex ) ? -1 : selectedItemIndex );
+        }
+
+        public function set selectedIndex( value : int ) : void
+        {
+            var v : Number = ( value < 0 || value >= _items.length ) ? NaN : value;
+
+            if ( v != selectedItemIndex )
+            {
+                selectedItemIndex = v;
+                updateState();
+                animator.invalidateLayout();
+                dispatchEvent( new Event( LOADED ) );
+            }
+        }
+
+        //-----------------------------------------------------------------
+        /* These private get properties are wrappers around styles that return defaults if unset.
+         *  It saves me from having to write a CSS selector, which
+         *  I really should do at some point */
+        protected function get defaultSpacingWithDefault() : Number
+        {
+            var result : Number = getStyle( "defaultSpacing" );
+
+            if ( isNaN( result ) )
+                result = 0;
+            return result;
+        }
+
+        protected function get maxScaleWithDefault() : Number
+        {
+            var result : Number = getStyle( "hilightMaxScale" );
+
+            if ( isNaN( result ) )
+                result = 1;
+            return result;
+        }
+
+        //-----------------------------------------------------------------
+        /**
+         * by making the itemRenderer be of type IFactory,
+         * developers can define it inline using the <Component> tag
+         */
+        public function get itemRenderer() : IFactory
+        {
+            return _itemRendererFactory;
+        }
+
+        public function set itemRenderer( value : IFactory ) : void
+        {
+            _itemRendererFactory = value;
+            renderersDirty = true;
+            invalidateProperties();
+        }
+
+        //-----------------------------------------------------------------
+        override protected function commitProperties() : void
+        {
+            // its now safe to switch over new dataProviders.
+            if ( _pendingItems != null )
+            {
+                _items = _pendingItems;
+                _pendingItems = null;
+            }
+            itemsChanged = false;
+
+            if ( renderersDirty )
+            {
+                // something has forced us to reallocate our renderers. start by throwing out the old ones.
+                renderersDirty = false;
+                var mask : DisplayObject = mask;
+
+                for ( var i : int = numChildren - 1; i >= 0; i-- )
+                    removeChildAt( i );
+                addChild( mask );
+                renderers = [];
+
+                // allocate new renderers, assign the data.
+                for ( i = 0; i < _items.length; i++ )
+                {
+                    var renderer : UIComponent = _itemRendererFactory.newInstance();
+                    IDataRenderer( renderer ).data = _items[ i ];
+                    renderers[ i ] = renderer;
+                    addChild( renderer );
+                }
+                animator.items = renderers;
+            }
+            invalidateSize();
+        }
+
+        private function removeHilight( e : MouseEvent ) : void
+        {
+            // called on rollout. Clear out any hilight, and reset our layout.
+            hilightedItemIndex = NaN;
+            updateState();
+            animator.invalidateLayout();
+        }
+
+        /** finds the item that would be closest to the x/y position if it were hilighted
+         */
+        protected function findItemForPosition( xPos : Number, yPos : Number ) : Number
+        {
+            return NaN;
+        }
+
+        /** called on mouse click to set or clear the selection */
+        protected function updateSelection( e : MouseEvent ) : void
+        {
+            if ( _selectionEnabled == false )
+                return;
+            var newSelection : Number = findItemForPosition( this.mouseX, this.mouseY );
+
+            if ( selectedItemIndex == newSelection )
+                selectedIndex = -1;
+            else
+                selectedIndex = newSelection;
+            updateState();
+            animator.invalidateLayout();
+        }
+
+        /** called on mouse move to update the hilight */
+        private function updateHilight( e : MouseEvent ) : void
+        {
+            var newHilight : Number = findItemForPosition( this.mouseX, this.mouseY );
+
+            if ( newHilight == hilightedItemIndex )
+                return;
+            hilightedItemIndex = newHilight;
+            updateState();
+            animator.invalidateLayout();
+        }
+
+        /**
+         * update the state properties of all of the items, based on
+         * the current hilighted and/or selected items
+         */
+        protected function updateState() : void
+        {
+            var stateProperty : String = getStyle( "stateProperty" );
+
+            if ( stateProperty != null )
+            {
+                var rolloverState : String = getStyle( "rolloverValue" );
+                var selectedState : String = getStyle( "selectedValue" );
+                var unselectedValue : String = getStyle( "unselectedValue" );
+
+                if ( unselectedValue == null || ( isNaN( selectedItemIndex ) && isNaN( hilightedItemIndex ) ) )
+                    unselectedValue = getStyle( "defaultValue" );
+
+                for ( var i : int = 0; i < renderers.length; i++ )
+                {
+                    renderers[ i ][ stateProperty ] = ( i == selectedItemIndex ) ? selectedState : ( i == hilightedItemIndex ) ? rolloverState : unselectedValue;
+                }
+            }
+        }
+
+        /**
+         * each item get scaled down based on its distance from the hliighted item.  this is the equation we use
+         * to figure out how much to scale down. The basic idea is this...we have two parameters that play a part
+         * in how quickly we scale down, scaleRadius and scaleSlope.  scaleRadius is the number of items on either
+         * side of the hilighted item (inclusive) that we should be able to use to scale down.  scaleSlope affects
+         * how whether we scale down quickly with the first few items in the radius, or the last few items.
+         * This equation essentially does that.
+         */
+        private function calcDistanceFactor( params : FisheyeParameters, distance : Number ) : Number
+        {
+            var mult : Number = 1 / params.scaleRadius;
+            return Math.max( 0, 1 - Math.pow( distance * mult, params.scaleSlope ) );
+        }
+
+        /**
+         * populates a set of items to fit into the distance axisLength, assuming nothing is hilighted, so they
+         * all scale the same. It will attempt to scale them to match the defaultScale style */
+        protected function populateMajorAxisForDefault( pdata : Array, axis : FisheyeAxis,
+                                                        axisLength : Number ) : FisheyeParameters
+        {
+            var vp : Number;
+            var itemCount : int = pdata.length;
+            var params : FisheyeParameters = new FisheyeParameters();
+            populateParameters( params, false );
+            var summedSpacing : Number = params.spacing * ( itemCount - 1 );
+            var sizeSum : Number = 0;
+            var pdataInst : FisheyeItem;
+
+            for ( var i : int = 0; i < itemCount; i++ )
+                sizeSum += pdata[ i ][ axis.EOM ];
+
+            if ( sizeSum > 0 )
+            {
+                var maximumMinScale : Number = ( axisLength - summedSpacing ) / sizeSum;
+                params.minScale = Math.min( params.minScale, maximumMinScale );
+            }
+            vp = 0;
+
+            for ( i = 0; i < itemCount; i++ )
+            {
+                pdataInst = pdata[ i ];
+                pdataInst.scale = params.minScale;
+                pdataInst[ axis.pos ] = vp;
+                vp += pdataInst[ axis.EOM ] * params.minScale + params.spacing;
+            }
+            return params;
+        }
+
+        /**
+         * takes the parameters used in the fisheye equation, and adjusts them as best as possible to make sure the
+         * items can fit into distance 'axisScale.'  Right now it does this by scaling down the minScale parameter if necessary. That's
+         * not entirely sufficient, but it does a pretty good job.  For future work:  If that's not sufficient, adjust the scaleRadius, scaleSlope,
+         * and spacing parameter
+         */
+        private function adjustParameters( pdata : Array, targetIndex : Number, params : FisheyeParameters,
+                                           axisSize : Number, axis : FisheyeAxis ) : void
+        {
+            var itemCount : int = pdata.length;
+            var summedSpacing : Number = params.spacing * ( itemCount - 1 );
+            var maxSum : Number = 0;
+            var minSum : Number = 0;
+
+            // given the constraint:
+            // W(0) * S(0) + spacing + W(1) * S(1) + spacing + ... + W(N) * S(N) <= unscaledWidth
+            // here we adjust the numbers that go into the calculation of S(i) to fit.
+            // right now that just means adjusting minScale downward if necessary. We'll probably add some more complex heuristic later.
+            for ( var i : int = 0; i < itemCount; i++ )
+            {
+                var pdataInst : FisheyeItem = pdata[ i ];
+                var distanceFromItem : Number = Math.abs( targetIndex - i );
+                var distanceFactor : Number = calcDistanceFactor( params, distanceFromItem );
+                var maxFactor : Number = params.maxScale * distanceFactor;
+                var minFactor : Number = ( 1 - distanceFactor );
+                var itemSize : Number = pdataInst[ axis.EOM ];
+                maxSum += itemSize * maxFactor;
+                minSum += itemSize * minFactor;
+            }
+            var minScale : Number = ( minSum > 0 ) ? ( ( axisSize - summedSpacing - maxSum ) / minSum ) : 0;
+            // if we've got lots of extra space, we might calculate that we need to make our ends _larger_ to fill the space. We don't want
+            // to do that. So let's contrain it to minScale. 
+            minScale = Math.min( params.minScale, minScale );
+            params.minScale = minScale;
+        }
+
+        /**
+         * populate a parameters structure from the various styles
+         */
+        private function populateParameters( params : FisheyeParameters, hilighted : Boolean ) : void
+        {
+            if ( hilighted == false )
+            {
+                params.minScale = getStyle( "defaultScale" );
+
+                if ( isNaN( params.minScale ) )
+                    params.minScale = .5;
+                params.spacing = defaultSpacingWithDefault;
+            }
+            else
+            {
+                params.minScale = getStyle( "hilightMinScale" );
+
+                if ( isNaN( params.minScale ) )
+                {
+                    params.minScale = getStyle( "defaultScale" );
+
+                    if ( isNaN( params.minScale ) )
+                        params.minScale = .5;
+                }
+                params.spacing = getStyle( "hilightSpacing" );
+
+                if ( isNaN( params.spacing ) )
+                    params.spacing = defaultSpacingWithDefault;
+            }
+            params.maxScale = getStyle( "hilightMaxScale" );
+
+            if ( isNaN( params.maxScale ) )
+                params.maxScale = 1;
+            params.scaleRadius = getStyle( "hilightScaleRadius" );
+
+            if ( isNaN( params.scaleRadius ) )
+                params.scaleRadius = 2;
+            params.scaleRadius = Math.max( 1, params.scaleRadius );
+            params.scaleSlope = getStyle( "hilightScaleSlope" );
+
+            if ( isNaN( params.scaleSlope ) )
+                params.scaleSlope = .75;
+        }
+
+        /**
+         * populates a set of items to fit into the distance axisLength, assuming targetIndex is hilighted.
+         */
+        protected function populateMajorAxisFor( pdata : Array, targetIndex : Number, axisSize : Number,
+                                                 axis : FisheyeAxis ) : FisheyeParameters
+        {
+            var vp : Number;
+            var itemCount : int = pdata.length;
+            var pdataInst : FisheyeItem;
+            var params : FisheyeParameters = new FisheyeParameters();
+            populateParameters( params, true );
+            adjustParameters( pdata, targetIndex, params, axisSize, axis );
+            vp = 0;
+
+            for ( var i : int = 0; i < itemCount; i++ )
+            {
+                pdataInst = pdata[ i ];
+                var distanceFromItem : Number = Math.abs( targetIndex - i );
+                var distanceFactor : Number = calcDistanceFactor( params, distanceFromItem );
+                var scale : Number = Math.max( 0,
+                                               params.minScale + ( params.maxScale - params.minScale ) * ( distanceFactor ) );
+                pdataInst[ axis.pos ] = vp;
+                pdataInst.scale = scale;
+                vp += pdataInst[ axis.EOM ] * scale + params.spacing;
+            }
+            return params;
+        }
+
+        /**
+         * given a set of scaled and laid out items, adjust them forward or backward to match the align property
+         */
+        protected function align( pdata : Array, axis : FisheyeAxis ) : void
+        {
+            var majorAlignValue : String = getStyle( axis.align );
+            var itemCount : int = pdata.length;
+            var pdataInst : FisheyeItem;
+
+            if ( itemCount == 0 )
+                return;
+
+            switch ( majorAlignValue )
+            {
+                case "right":
+                case "bottom":
+                    pdataInst = pdata[ itemCount - 1 ];
+                    var offset : Number = this[ axis.unscaled ] - ( pdataInst[ axis.pos ] + pdata[ itemCount - 1 ][ axis.EOM ] * pdataInst.scale );
+                    for ( var i : int = 0; i < itemCount; i++ )
+                    {
+                        pdata[ i ][ axis.pos ] += offset;
+                    }
+                    break;
+                case "left":
+                case "top":
+                    break;
+                case "center":
+                default:
+                    var midIndex : int = Math.floor( itemCount / 2 );
+                    pdataInst = pdata[ itemCount - 1 ];
+                    var rightPos : Number = pdataInst[ axis.pos ] + pdataInst[ axis.EOM ] * pdataInst.scale;
+                    offset = ( this[ axis.unscaled ] / 2 - ( rightPos ) / 2 );
+                    for ( i = 0; i < itemCount; i++ )
+                    {
+                        pdata[ i ][ axis.pos ] += offset;
+                    }
+                    break;
+            }
+        }
+
+        /**
+         * overridden in the subclasses
+         */
+        protected function generateLayout() : void
+        {
+        }
+
+        override protected function updateDisplayList( unscaledWidth : Number, unscaledHeight : Number ) : void
+        {
+            graphics.clear();
+            graphics.moveTo( 0, 0 );
+            graphics.beginFill( 0, 0 );
+            graphics.drawRect( 0, 0, unscaledWidth, unscaledHeight );
+            // update the mask
+            mask.width = unscaledWidth;
+            mask.height = unscaledHeight;
+            animator.invalidateLayout();
+        }
+
+        override public function styleChanged( styleProp : String ) : void
+        {
+            if ( styleProp == "animationSpeed" )
+                animator.animationSpeed = getStyle( "animationSpeed" );
+            invalidateSize();
+            invalidateDisplayList();
+            animator.invalidateLayout();
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FlexPMD115.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FlexPMD115.as b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FlexPMD115.as
new file mode 100644
index 0000000..ca9191c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FlexPMD115.as
@@ -0,0 +1,22 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 foo.bar 
+{
+	public function baz() : void { }
+} 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FlexPMD195.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FlexPMD195.as b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FlexPMD195.as
new file mode 100644
index 0000000..65ba179
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FlexPMD195.as
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import flash.display.Sprite;
+	
+	public class FlexPMD195 extends Sprite {
+		public function computeJustifyAdjustment(lineArray:Array, firstLineIndex:int, numLines:int):Number
+		{
+			adj = 0;
+			
+			if (numLines == 1)
+			{
+				return 0; // do nothing
+			}
+			
+			// first line unchanged
+			var firstLine:IVerticalJustificationLine = lineArray[firstLineIndex];
+			var firstBaseLine:Number = getBaseline(firstLine);
+			
+			// descent of the last line on the bottom of the frame
+			var lastLine:IVerticalJustificationLine = lineArray[firstLineIndex + numLines - 1];
+			var frameBottom:Number = _textFrame.compositionHeight - Number(_textFrame.effectivePaddingBottom);
+			var allowance:Number = frameBottom - getBottomOfLine(lastLine);
+			if (allowance < 0)
+			{
+				return 0; // Some text scrolled out; don't justify
+			}
+			var lastBaseLine:Number = getBaseline(lastLine);
+			
+			adj = allowance/(lastBaseLine - firstBaseLine); // multiplicative factor by which the space between consecutive lines is increased
+			return adj;
+		} 
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FlexPMD62.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FlexPMD62.as b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FlexPMD62.as
new file mode 100644
index 0000000..9585654
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FlexPMD62.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.test.testy.ui.components {
+	
+	import flash.display.Sprite;
+	
+	public class Link extends Sprite {
+		
+		protected var _linkText:String = ''; // NO PMD
+		protected var _style:String;
+		
+		public function Link(text:String = '', style:String = null) // NO PMD
+		{
+			_style = style;
+			_linkText = text;
+		}
+		
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FlexPMD98.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FlexPMD98.as b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FlexPMD98.as
new file mode 100644
index 0000000..353395b
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/FlexPMD98.as
@@ -0,0 +1,440 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import flash.display.*;
+	import flash.events.Event;
+	import flash.text.*;
+	import flash.utils.*;
+	
+	/**
+	 *   An app to test function call performance
+	 *   @author Jackson Dunstan
+	 */
+	public class FunctionPerformanceTest extends Base implements IInterface
+	{
+		private function privateFunction(): void {}
+		protected function protectedFunction(): void {}
+		internal function internalFunction(): void {}
+		public function publicFunction(): void {}
+		
+		private function get privateGetFunction(): int { return 0; }
+		protected function get protectedGetFunction(): int { return 0; }
+		internal function get internalGetFunction(): int { return 0; }
+		public function get publicGetFunction(): int { return 0; }
+		
+		private function set privateSetFunction(val:int): void {}
+		protected function set protectedSetFunction(val:int): void {}
+		internal function set internalSetFunction(val:int): void {}
+		public function set publicSetFunction(val:int): void {}
+		
+		private static function staticPrivateFunction(): void {}
+		protected static function staticProtectedFunction(): void {}
+		internal static function staticInternalFunction(): void {}
+		public static function staticPublicFunction(): void {}
+		
+		override protected function overrideProtectedFunction(): void {}
+		override internal function overrideInternalFunction(): void {}
+		override public function overridePublicFunction(): void {}
+		
+		final private function finalPrivateFunction(): void {}
+		final protected function finalProtectedFunction(): void {}
+		final internal function finalInternalFunction(): void {}
+		final public function finalPublicFunction(): void {}
+		
+		final override protected function finalOverrideProtectedFunction(): void {}
+		final override internal function finalOverrideInternalFunction(): void {}
+		final override public function finalOverridePublicFunction(): void {}
+		
+		public function interfaceFunction(): void {}
+		
+		private var __logger:TextField; 
+		
+		/**
+		 *   Application entry point
+		 */
+		public function FunctionPerformanceTest()
+		{
+			stage.align = StageAlign.TOP_LEFT;
+			stage.scaleMode = StageScaleMode.NO_SCALE;
+			__logger = new TextField();
+			__logger.autoSize = TextFieldAutoSize.LEFT;
+			addChild(__logger);
+			
+			addEventListener(Event.ENTER_FRAME, testDynamicFunctions);
+		}
+		
+		private function testDynamicFunctions(ev:Event): void
+		{
+			var beforeTime:int;
+			var i:int;
+			const NUM_ITERATIONS:int = 10000000;
+			
+			function localFunction(): void {}
+			var functionVarFunction:Function = function(): void {}
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				plainFunction();
+			}
+			log("Plain: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				localFunction();
+			}
+			log("Local: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				functionVarFunction();
+			}
+			log("Function var: " + (getTimer()-beforeTime));
+			
+			log("");
+			
+			removeEventListener(Event.ENTER_FRAME, testDynamicFunctions);
+			addEventListener(Event.ENTER_FRAME, testMethods);
+		}
+		
+		private function testMethods(ev:Event): void
+		{
+			var beforeTime:int;
+			var i:int;
+			const NUM_ITERATIONS:int = 10000000;
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				privateFunction();
+			}
+			log("Private: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				protectedFunction();
+			}
+			log("Protected: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				internalFunction();
+			}
+			log("Internal: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				publicFunction();
+			}
+			log("Public: " + (getTimer()-beforeTime));
+			
+			log("");
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				this.privateFunction();
+			}
+			log("this.Private: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				this.protectedFunction();
+			}
+			log("this.Protected: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				this.internalFunction();
+			}
+			log("this.Internal: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				this.publicFunction();
+			}
+			log("this.Public: " + (getTimer()-beforeTime));
+			
+			log("");
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				staticPrivateFunction();
+			}
+			log("Static private: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				staticProtectedFunction();
+			}
+			log("Static protected: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				staticInternalFunction();
+			}
+			log("Static internal: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				staticPublicFunction();
+			}
+			log("Static public: " + (getTimer()-beforeTime));
+			
+			log("");
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				overrideProtectedFunction();
+			}
+			log("Override protected: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				overrideInternalFunction();
+			}
+			log("Override internal: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				overridePublicFunction();
+			}
+			log("Override public: " + (getTimer()-beforeTime));
+			
+			log("");
+			
+			removeEventListener(Event.ENTER_FRAME, testMethods);
+			addEventListener(Event.ENTER_FRAME, testSupersAndInterfaces);
+		}
+		
+		private function testSupersAndInterfaces(ev:Event): void
+		{
+			var beforeTime:int;
+			var i:int;
+			const NUM_ITERATIONS:int = 10000000;
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				super.overrideProtectedFunction();
+			}
+			log("Super protected: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				super.overrideInternalFunction();
+			}
+			log("Super internal: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				super.overridePublicFunction();
+			}
+			log("Super public: " + (getTimer()-beforeTime));
+			
+			log("");
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				interfaceFunction();
+			}
+			log("Interface direct: " + (getTimer()-beforeTime));
+			
+			var inter:IInterface = this;
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				inter.interfaceFunction();
+			}
+			log("Interface via interface: " + (getTimer()-beforeTime));
+			
+			var clazz:FunctionPerformanceTest = this;
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				clazz.interfaceFunction();
+			}
+			log("Interface via class: " + (getTimer()-beforeTime));
+			
+			log("");
+			
+			removeEventListener(Event.ENTER_FRAME, testSupersAndInterfaces);
+			addEventListener(Event.ENTER_FRAME, testGettersAndSetters);
+		}
+		
+		private function testGettersAndSetters(ev:Event): void
+		{
+			var beforeTime:int;
+			var i:int;
+			const NUM_ITERATIONS:int = 10000000;
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				privateGetFunction;
+			}
+			log("Private Get: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				protectedGetFunction;
+			}
+			log("Protected Get: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				internalGetFunction;
+			}
+			log("Internal Get: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				publicGetFunction;
+			}
+			log("Public Get: " + (getTimer()-beforeTime));
+			
+			log("");
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				privateSetFunction = 0;
+			}
+			log("Private Set: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				protectedSetFunction = 0;
+			}
+			log("Protected Set: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				internalSetFunction = 0;
+			}
+			log("Internal Set: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				publicSetFunction = 0;
+			}
+			log("Public Set: " + (getTimer()-beforeTime));
+			
+			log("");
+			
+			removeEventListener(Event.ENTER_FRAME, testGettersAndSetters);
+			addEventListener(Event.ENTER_FRAME, testFinals);
+		}
+		
+		private function testFinals(ev:Event): void
+		{
+			var beforeTime:int;
+			var i:int;
+			const NUM_ITERATIONS:int = 10000000;
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				finalPrivateFunction();
+			}
+			log("Final Private: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				finalProtectedFunction();
+			}
+			log("Final Protected: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				finalInternalFunction();
+			}
+			log("Final Internal: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				finalPublicFunction();
+			}
+			log("Final Public: " + (getTimer()-beforeTime));
+			
+			log("");
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				finalOverrideProtectedFunction();
+			}
+			log("Final Override protected: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				finalOverrideInternalFunction();
+			}
+			log("Final Override internal: " + (getTimer()-beforeTime));
+			
+			beforeTime = getTimer();
+			for (i = 0; i < NUM_ITERATIONS; ++i)
+			{
+				finalOverridePublicFunction();
+			}
+			log("Final Override public: " + (getTimer()-beforeTime));
+			
+			removeEventListener(Event.ENTER_FRAME, testFinals);
+		}
+		
+		private function log(msg:*): void
+		{
+			__logger.appendText(msg + "\n");
+		}
+	}
+}
+function plainFunction(): void {}
+interface IInterface
+{
+	function interfaceFunction(): void;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/JPEGEncoder.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/JPEGEncoder.as b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/JPEGEncoder.as
new file mode 100644
index 0000000..c3c85cc
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/JPEGEncoder.as
@@ -0,0 +1,669 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import flash.display.BitmapData;
+	import flash.utils.ByteArray;
+	
+	public final class JPEGEncoder
+	{
+		// Static table initialization
+		private const ZigZag:Vector.<int> = Vector.<int>([
+			0, 1, 5, 6,14,15,27,28,
+			2, 4, 7,13,16,26,29,42,
+			3, 8,12,17,25,30,41,43,
+			9,11,18,24,31,40,44,53,
+			10,19,23,32,39,45,52,54,
+			20,22,33,38,46,51,55,60,
+			21,34,37,47,50,56,59,61,
+			35,36,48,49,57,58,62,63
+		]);
+		private var YTable:Vector.<int> = new Vector.<int>(64, true);
+		private var UVTable:Vector.<int> = new Vector.<int>(64, true);
+		private var outputfDCTQuant:Vector.<int> = new Vector.<int>(64, true);
+		private var fdtbl_Y:Vector.<Number> = new Vector.<Number>(64, true);
+		private var fdtbl_UV:Vector.<Number> = new Vector.<Number>(64, true);
+		private var sf:int;
+		
+		private const aasf:Vector.<Number> = Vector.<Number>([
+			1.0, 1.387039845, 1.306562965, 1.175875602,
+			1.0, 0.785694958, 0.541196100, 0.275899379
+		]);
+		
+		private var YQT:Vector.<int> = Vector.<int>([
+			16, 11, 10, 16, 24, 40, 51, 61,
+			12, 12, 14, 19, 26, 58, 60, 55,
+			14, 13, 16, 24, 40, 57, 69, 56,
+			14, 17, 22, 29, 51, 87, 80, 62,
+			18, 22, 37, 56, 68,109,103, 77,
+			24, 35, 55, 64, 81,104,113, 92,
+			49, 64, 78, 87,103,121,120,101,
+			72, 92, 95, 98,112,100,103, 99
+		]);
+		
+		private const UVQT:Vector.<int> = Vector.<int>([
+			17, 18, 24, 47, 99, 99, 99, 99,
+			18, 21, 26, 66, 99, 99, 99, 99,
+			24, 26, 56, 99, 99, 99, 99, 99,
+			47, 66, 99, 99, 99, 99, 99, 99,
+			99, 99, 99, 99, 99, 99, 99, 99,
+			99, 99, 99, 99, 99, 99, 99, 99,
+			99, 99, 99, 99, 99, 99, 99, 99,
+			99, 99, 99, 99, 99, 99, 99, 99
+		]);
+		
+		private function initQuantTables(sf:int):void
+		{
+			var i:int;
+			const I64:int = 64;
+			const I8:int = 8;
+			for (i = 0; i < I64; ++i)
+			{
+				var t:int = int((YQT[i]*sf+50)*0.01);
+				if (t < 1) {
+					t = 1;
+				} else if (t > 255) {
+					t = 255;
+				}
+				YTable[ZigZag[i]] = t;
+			}
+			
+			for (i = 0; i < I64; i++)
+			{
+				var u:int = int((UVQT[i]*sf+50)*0.01);
+				if (u < 1) {
+					u = 1;
+				} else if (u > 255) {
+					u = 255;
+				}
+				UVTable[ZigZag[i]] = u;
+			}
+			i = 0;
+			for (var row:int = 0; row < I8; ++row)
+			{
+				for (var col:int = 0; col < I8; ++col)
+				{
+					fdtbl_Y[i]  = (1 / (YTable [ZigZag[i]] * aasf[row] * aasf[col] * I8));
+					fdtbl_UV[i] = (1 / (UVTable[ZigZag[i]] * aasf[row] * aasf[col] * I8));
+					i++;
+				}
+			}
+		}
+		
+		private var YDC_HT:Vector.<BitString>;
+		private var UVDC_HT:Vector.<BitString>;
+		private var YAC_HT:Vector.<BitString>;
+		private var UVAC_HT:Vector.<BitString>;
+		
+		private function computeHuffmanTbl(nrcodes:Vector.<int>, std_table:Vector.<int>):Vector.<BitString>
+		{
+			var codevalue:int = 0;
+			var pos_in_table:int = 0;
+			var HT:Vector.<BitString> = new Vector.<BitString>(251, true);
+			var bitString:BitString;
+			for (var k:int=1; k<=16; ++k)
+			{
+				for (var j:int=1; j<=nrcodes[k]; ++j)
+				{
+					HT[std_table[pos_in_table]] = bitString = new BitString();
+					bitString.val = codevalue;
+					bitString.len = k;
+					pos_in_table++;
+					codevalue++;
+				}
+				codevalue<<=1;
+			}
+			return HT;
+		}
+		
+		private var std_dc_luminance_nrcodes:Vector.<int> = Vector.<int>([0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0]);
+		private var std_dc_luminance_values:Vector.<int> = Vector.<int>([0,1,2,3,4,5,6,7,8,9,10,11]);
+		private var std_ac_luminance_nrcodes:Vector.<int> = Vector.<int>([0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d]);
+		private var std_ac_luminance_values:Vector.<int> = Vector.<int>([0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,
+			0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,
+			0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,
+			0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,
+			0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,
+			0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28,
+			0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,
+			0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,
+			0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
+			0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,
+			0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,
+			0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89,
+			0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,
+			0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,
+			0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,
+			0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,
+			0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,
+			0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,
+			0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,
+			0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,
+			0xf9,0xfa]);
+		
+		private var std_dc_chrominance_nrcodes:Vector.<int> = Vector.<int>([0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0]);
+		private var std_dc_chrominance_values:Vector.<int> = Vector.<int>([0,1,2,3,4,5,6,7,8,9,10,11]);
+		private var std_ac_chrominance_nrcodes:Vector.<int> = Vector.<int>([0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77]);
+		private var std_ac_chrominance_values:Vector.<int> = Vector.<int>([0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21,
+			0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,
+			0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91,
+			0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,
+			0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,
+			0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,
+			0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38,
+			0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,
+			0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,
+			0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,
+			0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,
+			0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,
+			0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,
+			0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,
+			0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,
+			0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,
+			0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,
+			0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,
+			0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,
+			0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,
+			0xf9,0xfa
+		]);
+		
+		private function initHuffmanTbl():void
+		{
+			YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values);
+			UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values);
+			YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values);
+			UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values);
+		}
+		
+		private var bitcode:Vector.<BitString> = new Vector.<BitString>(65535, true);
+		private var category:Vector.<int> = new Vector.<int>(65535, true);
+		
+		private function initCategoryNumber():void
+		{
+			var nrlower:int = 1;
+			var nrupper:int = 2;
+			var bitString:BitString;
+			const I15:int = 15;
+			var pos:int;
+			for (var cat:int=1; cat<=I15; ++cat)
+			{
+				//Positive numbers
+				for (var nr:int=nrlower; nr<nrupper; ++nr)
+				{
+					pos = int(32767+nr);
+					category[pos] = cat;
+					bitcode[pos] = bitString = new BitString();
+					bitString.len = cat;
+					bitString.val = nr;
+				}
+				//Negative numbers
+				for (var nrneg:int=-(nrupper-1); nrneg<=-nrlower; ++nrneg)
+				{
+					pos = int(32767+nrneg);
+					category[pos] = cat;
+					bitcode[pos] = bitString = new BitString();
+					bitString.len = cat;
+					bitString.val = nrupper-1+nrneg;
+				}
+				nrlower <<= 1;
+				nrupper <<= 1;
+			}
+		}
+		
+		// IO functions
+		
+		private var byteout:ByteArray;
+		private var bytenew:int = 0;
+		private var bytepos:int = 7;
+		
+		private function writeBits(bs:BitString):void
+		{
+			var value:int = bs.val;
+			var posval:int = bs.len-1;
+			while ( posval >= 0 )
+			{
+				if (value & uint(1 << posval) )
+					bytenew |= uint(1 << bytepos);
+				posval--;
+				bytepos--;
+				if (bytepos < 0)
+				{
+					if (bytenew == 0xFF)
+					{
+						byteout.writeByte(0xFF);
+						byteout.writeByte(0);
+					}
+					else byteout.writeByte(bytenew);
+					bytepos=7;
+					bytenew=0;
+				}
+			}
+		}
+		
+		// DCT & quantization core
+		
+		private function fDCTQuant(data:Vector.<Number>, fdtbl:Vector.<Number>):Vector.<int>
+		{
+			/* Pass 1: process rows. */
+			var dataOff:int=0;
+			var d0:Number, d1:Number, d2:Number, d3:Number, d4:Number, d5:Number, d6:Number, d7:Number;
+			var i:int;
+			const I8:int = 8;
+			const I64:int = 64;
+			for (i=0; i<I8; ++i)
+			{	
+				d0 = data[int(dataOff)];
+				d1 = data[int(dataOff+1)];
+				d2 = data[int(dataOff+2)];
+				d3 = data[int(dataOff+3)];
+				d4 = data[int(dataOff+4)];
+				d5 = data[int(dataOff+5)];
+				d6 = data[int(dataOff+6)];
+				d7 = data[int(dataOff+7)];
+				
+				var tmp0:Number = d0 + d7;
+				var tmp7:Number = d0 - d7;
+				var tmp1:Number = d1 + d6;
+				var tmp6:Number = d1 - d6;
+				var tmp2:Number = d2 + d5;
+				var tmp5:Number = d2 - d5;
+				var tmp3:Number = d3 + d4;
+				var tmp4:Number = d3 - d4;
+				
+				/* Even part */
+				var tmp10:Number = tmp0 + tmp3;	/* phase 2 */
+				var tmp13:Number = tmp0 - tmp3;
+				var tmp11:Number = tmp1 + tmp2;
+				var tmp12:Number = tmp1 - tmp2;
+				
+				data[int(dataOff)] = tmp10 + tmp11; /* phase 3 */
+				data[int(dataOff+4)] = tmp10 - tmp11;
+				
+				var z1:Number = (tmp12 + tmp13) * 0.707106781; /* c4 */
+				data[int(dataOff+2)] = tmp13 + z1; /* phase 5 */
+				data[int(dataOff+6)] = tmp13 - z1;
+				
+				/* Odd part */
+				tmp10 = tmp4 + tmp5; /* phase 2 */
+				tmp11 = tmp5 + tmp6;
+				tmp12 = tmp6 + tmp7;
+				
+				/* The rotator is modified from fig 4-8 to avoid extra negations. */
+				var z5:Number = (tmp10 - tmp12) * 0.382683433; /* c6 */
+				var z2:Number = 0.541196100 * tmp10 + z5; /* c2-c6 */
+				var z4:Number = 1.306562965 * tmp12 + z5; /* c2+c6 */
+				var z3:Number = tmp11 * 0.707106781; /* c4 */
+				
+				var z11:Number = tmp7 + z3;	/* phase 5 */
+				var z13:Number = tmp7 - z3;
+				
+				data[int(dataOff+5)] = z13 + z2;	/* phase 6 */
+				data[int(dataOff+3)] = z13 - z2;
+				data[int(dataOff+1)] = z11 + z4;
+				data[int(dataOff+7)] = z11 - z4;
+				
+				dataOff += 8; /* advance pointer to next row */
+			}
+			
+			/* Pass 2: process columns. */
+			dataOff = 0;
+			for (i=0; i<I8; ++i)
+			{
+				d0 = data[int(dataOff)];
+				d1 = data[int(dataOff + 8)];
+				d2 = data[int(dataOff + 16)];
+				d3 = data[int(dataOff + 24)];
+				d4 = data[int(dataOff + 32)];
+				d5 = data[int(dataOff + 40)];
+				d6 = data[int(dataOff + 48)];
+				d7 = data[int(dataOff + 56)];
+				
+				var tmp0p2:Number = d0 + d7;
+				var tmp7p2:Number = d0 - d7;
+				var tmp1p2:Number = d1 + d6;
+				var tmp6p2:Number = d1 - d6;
+				var tmp2p2:Number = d2 + d5;
+				var tmp5p2:Number = d2 - d5;
+				var tmp3p2:Number = d3 + d4;
+				var tmp4p2:Number = d3 - d4;
+				
+				/* Even part */
+				var tmp10p2:Number = tmp0p2 + tmp3p2;	/* phase 2 */
+				var tmp13p2:Number = tmp0p2 - tmp3p2;
+				var tmp11p2:Number = tmp1p2 + tmp2p2;
+				var tmp12p2:Number = tmp1p2 - tmp2p2;
+				
+				data[int(dataOff)] = tmp10p2 + tmp11p2; /* phase 3 */
+				data[int(dataOff+32)] = tmp10p2 - tmp11p2;
+				
+				var z1p2:Number = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */
+				data[int(dataOff+16)] = tmp13p2 + z1p2; /* phase 5 */
+				data[int(dataOff+48)] = tmp13p2 - z1p2;
+				
+				/* Odd part */
+				tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */
+				tmp11p2 = tmp5p2 + tmp6p2;
+				tmp12p2 = tmp6p2 + tmp7p2;
+				
+				/* The rotator is modified from fig 4-8 to avoid extra negations. */
+				var z5p2:Number = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */
+				var z2p2:Number = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */
+				var z4p2:Number = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */
+				var z3p2:Number= tmp11p2 * 0.707106781; /* c4 */
+				
+				var z11p2:Number = tmp7p2 + z3p2;	/* phase 5 */
+				var z13p2:Number = tmp7p2 - z3p2;
+				
+				data[int(dataOff+40)] = z13p2 + z2p2; /* phase 6 */
+				data[int(dataOff+24)] = z13p2 - z2p2;
+				data[int(dataOff+ 8)] = z11p2 + z4p2;
+				data[int(dataOff+56)] = z11p2 - z4p2;
+				
+				dataOff++; /* advance pointer to next column */
+			}
+			
+			// Quantize/descale the coefficients
+			var fDCTQuant:Number;
+			for (i=0; i<I64; ++i)
+			{
+				// Apply the quantization and scaling factor & Round to nearest integer
+				fDCTQuant = data[int(i)]*fdtbl[int(i)];
+				outputfDCTQuant[int(i)] = (fDCTQuant > 0.0) ? int(fDCTQuant + 0.5) : int(fDCTQuant - 0.5);
+			}
+			return outputfDCTQuant;
+		}
+		
+		// Chunk writing
+		private function writeAPP0():void
+		{
+			byteout.writeShort(0xFFE0); // marker
+			byteout.writeShort(16); // length
+			byteout.writeByte(0x4A); // J
+			byteout.writeByte(0x46); // F
+			byteout.writeByte(0x49); // I
+			byteout.writeByte(0x46); // F
+			byteout.writeByte(0); // = "JFIF",'\0'
+			byteout.writeByte(1); // versionhi
+			byteout.writeByte(1); // versionlo
+			byteout.writeByte(0); // xyunits
+			byteout.writeShort(1); // xdensity
+			byteout.writeShort(1); // ydensity
+			byteout.writeByte(0); // thumbnwidth
+			byteout.writeByte(0); // thumbnheight
+		}
+		
+		private function writeSOF0(width:int, height:int):void
+		{
+			byteout.writeShort(0xFFC0); // marker
+			byteout.writeShort(17);   // length, truecolor YUV JPG
+			byteout.writeByte(8);    // precision
+			byteout.writeShort(height);
+			byteout.writeShort(width);
+			byteout.writeByte(3);    // nrofcomponents
+			byteout.writeByte(1);    // IdY
+			byteout.writeByte(0x11); // HVY
+			byteout.writeByte(0);    // QTY
+			byteout.writeByte(2);    // IdU
+			byteout.writeByte(0x11); // HVU
+			byteout.writeByte(1);    // QTU
+			byteout.writeByte(3);    // IdV
+			byteout.writeByte(0x11); // HVV
+			byteout.writeByte(1);    // QTV
+		}
+		
+		private function writeDQT():void
+		{
+			byteout.writeShort(0xFFDB); // marker
+			byteout.writeShort(132);	   // length
+			byteout.writeByte(0);
+			
+			var i:int;
+			const I64:int = 64;
+			for (i=0; i<I64; ++i)
+				byteout.writeByte(YTable[i]);
+			
+			byteout.writeByte(1);
+			
+			for (i=0; i<I64; ++i)
+				byteout.writeByte(UVTable[i]);
+		}
+		
+		private function writeDHT():void
+		{
+			byteout.writeShort(0xFFC4); // marker
+			byteout.writeShort(0x01A2); // length
+			
+			byteout.writeByte(0); // HTYDCinfo
+			var i:int;
+			const I11:int = 11;
+			const I16:int = 16;
+			const I161:int = 161;
+			for (i=0; i<I16; ++i)
+				byteout.writeByte(std_dc_luminance_nrcodes[int(i+1)]);
+			
+			for (i=0; i<=I11; ++i)
+				byteout.writeByte(std_dc_luminance_values[int(i)]);
+			
+			byteout.writeByte(0x10); // HTYACinfo
+			
+			for (i=0; i<I16; ++i)
+				byteout.writeByte(std_ac_luminance_nrcodes[int(i+1)]);
+			
+			for (i=0; i<=I161; ++i)
+				byteout.writeByte(std_ac_luminance_values[int(i)]);
+			
+			byteout.writeByte(1); // HTUDCinfo
+			
+			for (i=0; i<I16; ++i)
+				byteout.writeByte(std_dc_chrominance_nrcodes[int(i+1)]);
+			
+			for (i=0; i<=I11; ++i)
+				byteout.writeByte(std_dc_chrominance_values[int(i)]);
+			
+			byteout.writeByte(0x11); // HTUACinfo
+			
+			for (i=0; i<I16; ++i)
+				byteout.writeByte(std_ac_chrominance_nrcodes[int(i+1)]);
+			
+			for (i=0; i<=I161; ++i)
+				byteout.writeByte(std_ac_chrominance_values[int(i)]);
+		}
+		
+		private function writeSOS():void
+		{
+			byteout.writeShort(0xFFDA); // marker
+			byteout.writeShort(12); // length
+			byteout.writeByte(3); // nrofcomponents
+			byteout.writeByte(1); // IdY
+			byteout.writeByte(0); // HTY
+			byteout.writeByte(2); // IdU
+			byteout.writeByte(0x11); // HTU
+			byteout.writeByte(3); // IdV
+			byteout.writeByte(0x11); // HTV
+			byteout.writeByte(0); // Ss
+			byteout.writeByte(0x3f); // Se
+			byteout.writeByte(0); // Bf
+		}
+		
+		// Core processing
+		internal var DU:Vector.<int> = new Vector.<int>(64, true);
+		
+		private function processDU(CDU:Vector.<Number>, fdtbl:Vector.<Number>, DC:Number, HTDC:Vector.<BitString>, HTAC:Vector.<BitString>):Number
+		{
+			var EOB:BitString = HTAC[0x00];
+			var M16zeroes:BitString = HTAC[0xF0];
+			var pos:int;
+			const I16:int = 16;
+			const I63:int = 63;
+			const I64:int = 64;
+			var DU_DCT:Vector.<int> = fDCTQuant(CDU, fdtbl);
+			//ZigZag reorder
+			for (var j:int=0;j<I64;++j) {
+				DU[ZigZag[j]]=DU_DCT[j];
+			}
+			var Diff:int = DU[0] - DC; DC = DU[0];
+			//Encode DC
+			if (Diff==0) {
+				writeBits(HTDC[0]); // Diff might be 0
+			} else {
+				pos = int(32767+Diff);
+				writeBits(HTDC[category[pos]]);
+				writeBits(bitcode[pos]);
+			}
+			//Encode ACs
+			const end0pos:int = 63;
+			for (; (end0pos>0)&&(DU[end0pos]==0); end0pos--) {};
+			//end0pos = first element in reverse order !=0
+			if ( end0pos == 0) {
+				writeBits(EOB);
+				return DC;
+			}
+			var i:int = 1;
+			var lng:int;
+			while ( i <= end0pos ) {
+				var startpos:int = i;
+				for (; (DU[i]==0) && (i<=end0pos); ++i) {}
+				var nrzeroes:int = i-startpos;
+				if ( nrzeroes >= I16 ) {
+					lng = nrzeroes>>4;
+					for (var nrmarker:int=1; nrmarker <= lng; ++nrmarker)
+						writeBits(M16zeroes);
+					nrzeroes = int(nrzeroes&0xF);
+				}
+				pos = int(32767+DU[i]);
+				writeBits(HTAC[int((nrzeroes<<4)+category[pos])]);
+				writeBits(bitcode[pos]);
+				i++;
+			}
+			if ( end0pos != I63 ) {
+				writeBits(EOB);
+			}
+			return DC;
+		}
+		
+		private var YDU:Vector.<Number> = new Vector.<Number>(64, true);
+		private var UDU:Vector.<Number> = new Vector.<Number>(64, true);
+		private var VDU:Vector.<Number> = new Vector.<Number>(64, true);
+		
+		private function RGB2YUV(img:BitmapData, xpos:int, ypos:int):void
+		{
+			var pos:int=0;
+			const I8:int = 8;
+			for (var y:int=0; y<I8; ++y) {
+				for (var x:int=0; x<I8; ++x) {
+					var P:uint = img.getPixel32(xpos+x,ypos+y);
+					var R:int = (P>>16)&0xFF;
+					var G:int = (P>> 8)&0xFF;
+					var B:int = (P    )&0xFF;
+					YDU[int(pos)]=((( 0.29900)*R+( 0.58700)*G+( 0.11400)*B))-0x80;
+					UDU[int(pos)]=(((-0.16874)*R+(-0.33126)*G+( 0.50000)*B));
+					VDU[int(pos)]=((( 0.50000)*R+(-0.41869)*G+(-0.08131)*B));
+					++pos;
+				}
+			}
+		}
+		
+		public function JPEGEncoder(quality:int=50)
+		{
+			if (quality <= 0)
+				quality = 1;
+			
+			if (quality > 100)
+				quality = 100;
+			
+			sf = quality < 50 ? int(5000 / quality) : int(200 - (quality<<1));
+			init();
+		}
+		
+		private function init():void
+		{
+			ZigZag.fixed = true;
+			aasf.fixed = true;
+			YQT.fixed = true;
+			UVQT.fixed = true;
+			std_ac_chrominance_nrcodes.fixed = true;
+			std_ac_chrominance_values.fixed = true;
+			std_ac_luminance_nrcodes.fixed = true;
+			std_ac_luminance_values.fixed = true;
+			std_dc_chrominance_nrcodes.fixed = true;
+			std_dc_chrominance_values.fixed = true;
+			std_dc_luminance_nrcodes.fixed = true;
+			std_dc_luminance_values.fixed = true;
+			// Create tables
+			initHuffmanTbl();
+			initCategoryNumber();
+			initQuantTables(sf);
+		}
+		
+		public function encode(image:BitmapData):ByteArray
+		{
+			// Initialize bit writer
+			byteout = new ByteArray();
+			
+			bytenew=0;
+			bytepos=7;
+			
+			// Add JPEG headers
+			byteout.writeShort(0xFFD8); // SOI
+			writeAPP0();
+			writeDQT();
+			writeSOF0(image.width,image.height);
+			writeDHT();
+			writeSOS();
+			
+			// Encode 8x8 macroblocks
+			var DCY:Number=0;
+			var DCU:Number=0;
+			var DCV:Number=0;
+			bytenew=0;
+			bytepos=7;
+			
+			var width:int = image.width;
+			var height:int = image.height;
+			
+			for (var ypos:int=0; ypos<height; ypos+=8)
+			{
+				for (var xpos:int=0; xpos<width; xpos+=8)
+				{
+					RGB2YUV(image, xpos, ypos);
+					DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);
+					DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);
+					DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);
+				}
+			}
+			
+			// Do the bit alignment of the EOI marker
+			if ( bytepos >= 0 )
+			{
+				var fillbits:BitString = new BitString();
+				fillbits.len = bytepos+1;
+				fillbits.val = (1<<(bytepos+1))-1;
+				writeBits(fillbits);
+			}
+			byteout.writeShort(0xFFD9); //EOI
+			return byteout;
+		}
+	}
+}
+
+final class BitString
+{
+	public var len:int = 0;
+	public var val:int = 0;
+}
\ No newline at end of file


[12/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AvoidUseOfAsKeywordRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AvoidUseOfAsKeywordRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AvoidUseOfAsKeywordRule.java
new file mode 100644
index 0000000..b16dbe1
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AvoidUseOfAsKeywordRule.java
@@ -0,0 +1,48 @@
+/*
+ * 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.maintanability;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.NodeKind;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+public class AvoidUseOfAsKeywordRule extends AbstractAstFlexRule
+{
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   @Override
+   protected void visitRelationalExpression( final IParserNode ast )
+   {
+      super.visitRelationalExpression( ast );
+
+      if ( ast.getChildren() != null )
+      {
+         for ( final IParserNode child : ast.getChildren() )
+         {
+            if ( child.is( NodeKind.AS ) )
+            {
+               addViolation( child );
+            }
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AvoidUsingPublicStaticFieldRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AvoidUsingPublicStaticFieldRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AvoidUsingPublicStaticFieldRule.java
new file mode 100644
index 0000000..39cdb90
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AvoidUsingPublicStaticFieldRule.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.maintanability;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class AvoidUsingPublicStaticFieldRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromAttributes
+    * (java.util.List)
+    */
+   @Override
+   protected void findViolationsFromAttributes( final List< IAttribute > variables )
+   {
+      for ( final IAttribute attribute : variables )
+      {
+         if ( attribute.isPublic()
+               && attribute.isStatic() && !attribute.getName().contains( "instance" ) )
+         {
+            addViolation( attribute,
+                          attribute.getName() );
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AvoidUsingWithKeyWordRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AvoidUsingWithKeyWordRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AvoidUsingWithKeyWordRule.java
new file mode 100644
index 0000000..1c531ad
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/AvoidUsingWithKeyWordRule.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.maintanability;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class AvoidUsingWithKeyWordRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void findViolations( final IFunction function )
+   {
+      final List< IParserNode > withStatements = function.findPrimaryStatementsInBody( "with" );
+
+      for ( final IParserNode withStatement : withStatements )
+      {
+         addViolation( withStatement );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ClassAndExtensionAreIdenticalRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ClassAndExtensionAreIdenticalRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ClassAndExtensionAreIdenticalRule.java
new file mode 100644
index 0000000..cea669b
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ClassAndExtensionAreIdenticalRule.java
@@ -0,0 +1,68 @@
+/*
+ * 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.maintanability;
+
+import org.apache.commons.lang.StringUtils;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class ClassAndExtensionAreIdenticalRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNode )
+   {
+      final String extensionName = classNode.getExtensionName();
+
+      if ( extensionName != null )
+      {
+         final String extension = extractExtensionName( extensionName );
+
+         if ( extension.equals( classNode.getName() ) )
+         {
+            addViolation( classNode );
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   private String extractExtensionName( final String extensionName )
+   {
+      return extensionName.indexOf( '.' ) == -1 ? extensionName
+                                               : StringUtils.substringAfterLast( extensionName,
+                                                                                 "." );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/DynamicClassRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/DynamicClassRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/DynamicClassRule.java
new file mode 100644
index 0000000..988db64
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/DynamicClassRule.java
@@ -0,0 +1,65 @@
+/*
+ * 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.maintanability;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.Modifier;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class DynamicClassRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#isConcernedByTheCurrentFile
+    * ()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return !getCurrentFile().isMxml();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNode )
+   {
+      if ( classNode.is( Modifier.DYNAMIC ) )
+      {
+         addViolation( classNode );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/EmptyStatementRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/EmptyStatementRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/EmptyStatementRule.java
new file mode 100644
index 0000000..a659f83
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/EmptyStatementRule.java
@@ -0,0 +1,49 @@
+/*
+ * 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.maintanability;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class EmptyStatementRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitEmptyStatetement(
+    * com.adobe.ac.pmd.parser.IParserNode)
+    */
+   @Override
+   protected void visitEmptyStatetement( final IParserNode statementNode )
+   {
+      addViolation( statementNode );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ExcessiveImportRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ExcessiveImportRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ExcessiveImportRule.java
new file mode 100644
index 0000000..becf73e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ExcessiveImportRule.java
@@ -0,0 +1,80 @@
+/*
+ * 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.maintanability;
+
+import com.adobe.ac.pmd.nodes.IPackage;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.AbstractMaximizedAstFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public class ExcessiveImportRule extends AbstractMaximizedAstFlexRule
+{
+   private static final int DEFAULT_THRESHOLD = 15;
+   private int              importNumber;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#
+    * getActualValueForTheCurrentViolation()
+    */
+   @Override
+   public final int getActualValueForTheCurrentViolation()
+   {
+      return importNumber;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getDefaultThreshold
+    * ()
+    */
+   @Override
+   public final int getDefaultThreshold()
+   {
+      return DEFAULT_THRESHOLD;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IPackage)
+    */
+   @Override
+   protected final void findViolations( final IPackage packageNode )
+   {
+      importNumber = packageNode.getImports().size();
+
+      if ( importNumber > getThreshold() )
+      {
+         addViolation( packageNode.getClassNode() );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/NonStaticConstantFieldRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/NonStaticConstantFieldRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/NonStaticConstantFieldRule.java
new file mode 100644
index 0000000..a322ecd
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/NonStaticConstantFieldRule.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.maintanability;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IConstant;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class NonStaticConstantFieldRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromConstants
+    * (java.util.List)
+    */
+   @Override
+   protected final void findViolationsFromConstants( final List< IConstant > constants )
+   {
+      for ( final IConstant field : constants )
+      {
+         if ( !field.isStatic()
+               && field.isPublic() )
+         {
+            addViolation( field,
+                          field.getName() );
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/OnlyOneReturnRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/OnlyOneReturnRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/OnlyOneReturnRule.java
new file mode 100644
index 0000000..75f16f0
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/OnlyOneReturnRule.java
@@ -0,0 +1,72 @@
+/*
+ * 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.maintanability;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class OnlyOneReturnRule extends AbstractAstFlexRule
+{
+   private int returnStatement;
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitFunction(com.adobe
+    * .ac.pmd.parser.IParserNode,
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule.FunctionType)
+    */
+   @Override
+   protected void visitFunction( final IParserNode functionNode,
+                                 final FunctionType type )
+   {
+      returnStatement = 0;
+      super.visitFunction( functionNode,
+                           type );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitReturn(com.adobe.
+    * ac.pmd.parser.IParserNode)
+    */
+   @Override
+   protected void visitReturn( final IParserNode ast )
+   {
+      returnStatement++;
+
+      if ( returnStatement > 1 )
+      {
+         addViolation( ast );
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ProtectedStaticMethodRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ProtectedStaticMethodRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ProtectedStaticMethodRule.java
new file mode 100644
index 0000000..0e67239
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ProtectedStaticMethodRule.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.maintanability;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.Modifier;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class ProtectedStaticMethodRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void findViolations( final IFunction function )
+   {
+      if ( function.is( Modifier.STATIC )
+            && function.is( Modifier.PROTECTED ) )
+      {
+         addViolation( function );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ReferenceToVariableBindingFromItsInitializerRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ReferenceToVariableBindingFromItsInitializerRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ReferenceToVariableBindingFromItsInitializerRule.java
new file mode 100644
index 0000000..e62c3c6
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/ReferenceToVariableBindingFromItsInitializerRule.java
@@ -0,0 +1,91 @@
+/*
+ * 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.maintanability;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IConstant;
+import com.adobe.ac.pmd.nodes.IField;
+import com.adobe.ac.pmd.nodes.IFieldInitialization;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class ReferenceToVariableBindingFromItsInitializerRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromAttributes
+    * (java.util.List)
+    */
+   @Override
+   protected void findViolationsFromAttributes( final List< IAttribute > variables )
+   {
+      for ( final IAttribute attribute : variables )
+      {
+         findViolation( attribute );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromConstants
+    * (java.util.List)
+    */
+   @Override
+   protected void findViolationsFromConstants( final List< IConstant > constants )
+   {
+      for ( final IConstant constant : constants )
+      {
+         findViolation( constant );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   private void findViolation( final IField attribute )
+   {
+      final IFieldInitialization initialization = attribute.getInitializationExpression();
+      final String name = attribute.getName();
+
+      if ( initialization != null )
+      {
+         final List< IParserNode > statements = initialization.getInternalNode()
+                                                              .findPrimaryStatementsFromNameInChildren( new String[]
+                                                              { name } );
+         if ( statements != null
+               && !statements.isEmpty() )
+         {
+            addViolation( attribute );
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/TrueFalseConditionRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/TrueFalseConditionRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/TrueFalseConditionRule.java
new file mode 100644
index 0000000..e9ede97
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/TrueFalseConditionRule.java
@@ -0,0 +1,84 @@
+/*
+ * 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.maintanability;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class TrueFalseConditionRule extends AbstractAstFlexRule // NO_UCD
+{
+   private static final int FALSE = 2;
+   private static final int TRUE  = 1;
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitCondition(com.adobe
+    * .ac.pmd.parser.IParserNode)
+    */
+   @Override
+   protected void visitCondition( final IParserNode condition )
+   {
+      super.visitCondition( condition );
+
+      final int conditionChidrenHaveBooleans = conditionChidrenHaveBooleans( condition );
+
+      if ( conditionChidrenHaveBooleans > 0 )
+      {
+         addViolation( condition,
+                       ( conditionChidrenHaveBooleans == TRUE ? ""
+                                                             : "!" )
+                             + "condition" );
+      }
+   }
+
+   private int conditionChidrenHaveBooleans( final IParserNode condition )
+   {
+      if ( condition != null )
+      {
+         for ( final IParserNode child : condition.getChildren() )
+         {
+            if ( child.getStringValue() != null )
+            {
+               if ( child.getStringValue().compareTo( "true" ) == 0 )
+               {
+                  return TRUE;
+               }
+               if ( child.getStringValue().compareTo( "false" ) == 0 )
+               {
+                  return FALSE;
+               }
+            }
+         }
+      }
+      return 0;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/UselessOverridenFunctionRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/UselessOverridenFunctionRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/UselessOverridenFunctionRule.java
new file mode 100644
index 0000000..efcca82
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/UselessOverridenFunctionRule.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.maintanability;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.KeyWords;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class UselessOverridenFunctionRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected final void findViolations( final IFunction function )
+   {
+      final int statementNbAtFirstLevelInBody = function.getStatementNbInBody();
+
+      if ( function.getBody() != null
+            && function.isOverriden() && statementNbAtFirstLevelInBody == 1 )
+      {
+         final List< IParserNode > statements = function.findPrimaryStatementsInBody( KeyWords.SUPER.toString() );
+
+         if ( statements != null
+               && statements.size() == 1 && function.getBody().getChild( 0 ).getChild( 1 ) != null
+               && function.getBody().getChild( 0 ).getChild( 1 ).getChild( 1 ) != null
+               && !areArgumentsModified( function.getBody().getChild( 0 ).getChild( 1 ).getChild( 1 ) ) )
+         {
+            addViolation( function );
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   private boolean areArgumentsModified( final IParserNode args )
+   {
+      if ( args.getChildren() != null )
+      {
+         for ( final IParserNode arg : args.getChildren() )
+         {
+            if ( arg.getChildren() != null )
+            {
+               return true;
+            }
+         }
+      }
+      return false;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/forbiddentypes/AbstractUseForbiddenTypeRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/forbiddentypes/AbstractUseForbiddenTypeRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/forbiddentypes/AbstractUseForbiddenTypeRule.java
new file mode 100644
index 0000000..ca164e1
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/forbiddentypes/AbstractUseForbiddenTypeRule.java
@@ -0,0 +1,119 @@
+/*
+ * 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.maintanability.forbiddentypes;
+
+import java.util.List;
+import java.util.Map.Entry;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.IVariable;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public abstract class AbstractUseForbiddenTypeRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected void findViolations( final IClass classNode )
+   {
+      super.findViolations( classNode );
+
+      findViolationInVariableLists( classNode.getAttributes() );
+      findViolationInVariableLists( classNode.getConstants() );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void findViolations( final IFunction function )
+   {
+      findViolationsInReturnType( function );
+      if ( !function.isOverriden() )
+      {
+         findViolationsInParametersList( function );
+      }
+      findViolationsInLocalVariables( function );
+   }
+
+   /**
+    * @param function
+    */
+   protected void findViolationsInParametersList( final IFunction function )
+   {
+      findViolationInVariableLists( function.getParameters() );
+   }
+
+   /**
+    * @return
+    */
+   protected abstract String getForbiddenType();
+
+   private < E extends IVariable > void findViolationInVariableLists( final List< E > variables )
+   {
+      for ( final IVariable variable : variables )
+      {
+         if ( variable.getType() != null )
+         {
+            tryToAddViolation( variable.getInternalNode(),
+                               variable.getType().toString() );
+         }
+      }
+   }
+
+   private void findViolationsInLocalVariables( final IFunction function )
+   {
+      for ( final Entry< String, IParserNode > localVariableEntry : function.getLocalVariables().entrySet() )
+      {
+         final IParserNode type = getTypeFromFieldDeclaration( localVariableEntry.getValue() );
+
+         tryToAddViolation( type,
+                            type.getStringValue() );
+      }
+   }
+
+   private void findViolationsInReturnType( final IFunction function )
+   {
+      if ( function != null
+            && function.getReturnType() != null )
+      {
+         tryToAddViolation( function.getReturnType().getInternalNode(),
+                            function.getReturnType().toString() );
+      }
+   }
+
+   private void tryToAddViolation( final IParserNode node,
+                                   final String typeName )
+   {
+      if ( typeName.equals( getForbiddenType() ) )
+      {
+         addViolation( node );
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/forbiddentypes/UseDictionaryTypeRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/forbiddentypes/UseDictionaryTypeRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/forbiddentypes/UseDictionaryTypeRule.java
new file mode 100644
index 0000000..435e5a9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/forbiddentypes/UseDictionaryTypeRule.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.maintanability.forbiddentypes;
+
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class UseDictionaryTypeRule extends AbstractUseForbiddenTypeRule // NO_UCD
+{
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.maintanability.forbiddentypes.
+    * AbstractUseForbiddenTypeRule#getForbiddenType()
+    */
+   @Override
+   protected String getForbiddenType()
+   {
+      return "Dictionnary";
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/forbiddentypes/UseGenericTypeRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/forbiddentypes/UseGenericTypeRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/forbiddentypes/UseGenericTypeRule.java
new file mode 100644
index 0000000..d6c6c08
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/forbiddentypes/UseGenericTypeRule.java
@@ -0,0 +1,48 @@
+/*
+ * 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.maintanability.forbiddentypes;
+
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class UseGenericTypeRule extends AbstractUseForbiddenTypeRule // NO_UCD
+{
+   private static final String STAR = "*";
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.maintanability.forbiddentypes.
+    * AbstractUseForbiddenTypeRule#getForbiddenType()
+    */
+   @Override
+   protected String getForbiddenType()
+   {
+      return STAR;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/forbiddentypes/UseObjectTypeRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/forbiddentypes/UseObjectTypeRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/forbiddentypes/UseObjectTypeRule.java
new file mode 100644
index 0000000..298ec98
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/maintanability/forbiddentypes/UseObjectTypeRule.java
@@ -0,0 +1,92 @@
+/*
+ * 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.maintanability.forbiddentypes;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class UseObjectTypeRule extends AbstractUseForbiddenTypeRule // NO_UCD
+{
+   private boolean isResponder;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.maintanability.forbiddentypes.
+    * AbstractUseForbiddenTypeRule#findViolations(com.adobe.ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected void findViolations( final IClass classNode )
+   {
+      for ( final IParserNode implementation : classNode.getImplementations() )
+      {
+         if ( "IResponder".equals( implementation.getStringValue() ) )
+         {
+            isResponder = true;
+            break;
+         }
+      }
+
+      super.findViolations( classNode );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.maintanability.forbiddentypes.
+    * AbstractUseForbiddenTypeRule
+    * #findViolationsInParametersList(com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void findViolationsInParametersList( final IFunction function )
+   {
+      if ( !isResponderImplementation( function ) )
+      {
+         super.findViolationsInParametersList( function );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.maintanability.forbiddentypes.
+    * AbstractUseForbiddenTypeRule#getForbiddenType()
+    */
+   @Override
+   protected String getForbiddenType()
+   {
+      return "Object";
+   }
+
+   private boolean isResponderImplementation( final IFunction function )
+   {
+      return isResponder
+            && ( function.getName().equals( "result" ) || function.getName().equals( "fault" ) );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/multiscreen/AvoidRollMouseEventRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/multiscreen/AvoidRollMouseEventRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/multiscreen/AvoidRollMouseEventRule.java
new file mode 100644
index 0000000..1209086
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/multiscreen/AvoidRollMouseEventRule.java
@@ -0,0 +1,69 @@
+/*
+ * 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.multiscreen;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class AvoidRollMouseEventRule extends AbstractRegexpBasedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected String getRegexp()
+   {
+      return ".*((mouseOut)|(MOUSE_OUT)|(mouseOver)|(MOUSE_OVER)|"
+            + "(rollOut)|(ROLL_OUT)|(rollOver)|(ROLL_OVER)).*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   protected boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      return true;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/multiscreen/AvoidTooltipRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/multiscreen/AvoidTooltipRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/multiscreen/AvoidTooltipRule.java
new file mode 100644
index 0000000..ff3ed1f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/multiscreen/AvoidTooltipRule.java
@@ -0,0 +1,68 @@
+/*
+ * 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.multiscreen;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class AvoidTooltipRule extends AbstractRegexpBasedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected String getRegexp()
+   {
+      return ".*\\s*toolTip\\s*=.*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   protected boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      return true;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/AbstractMoreThanEntryPointInMxmlRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/AbstractMoreThanEntryPointInMxmlRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/AbstractMoreThanEntryPointInMxmlRule.java
new file mode 100644
index 0000000..fac8969
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/AbstractMoreThanEntryPointInMxmlRule.java
@@ -0,0 +1,110 @@
+/*
+ * 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.mxml;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+/**
+ * @author xagnetti
+ */
+abstract class AbstractMoreThanEntryPointInMxmlRule extends AbstractAstFlexRule
+{
+   private int lastPublicVarLine = 0;
+   private int publicVarCount    = 0;
+
+   /**
+    * @return
+    */
+   public abstract int getThreshold();
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#isConcernedByTheCurrentFile
+    * ()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return getCurrentFile().isMxml();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected void findViolations( final IClass classNode )
+   {
+      publicVarCount = 0;
+      lastPublicVarLine = 0;
+
+      super.findViolations( classNode );
+
+      if ( publicVarCount > getThreshold() )
+      {
+         addViolation( ViolationPosition.create( lastPublicVarLine,
+                                                 lastPublicVarLine,
+                                                 0,
+                                                 getCurrentFile().getLineAt( lastPublicVarLine - 1 ).length() ) );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected final void findViolations( final IFunction function )
+   {
+      if ( function.isPublic()
+            && function.isSetter() )
+      {
+         publicVarCount++;
+         lastPublicVarLine = function.getInternalNode().getLine();
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromAttributes
+    * (java.util.List)
+    */
+   @Override
+   protected void findViolationsFromAttributes( final List< IAttribute > variables )
+   {
+      for ( final IAttribute attribute : variables )
+      {
+         if ( attribute.isPublic() )
+         {
+            publicVarCount++;
+            lastPublicVarLine = attribute.getInternalNode().getLine();
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/CodeBehindInMxmlRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/CodeBehindInMxmlRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/CodeBehindInMxmlRule.java
new file mode 100644
index 0000000..9e2bd13
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/CodeBehindInMxmlRule.java
@@ -0,0 +1,68 @@
+/*
+ * 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.mxml;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class CodeBehindInMxmlRule extends AbstractRegexpBasedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return getCurrentFile().isMxml();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected final String getRegexp()
+   {
+      return ".*<.*Script.*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected final boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      return line.contains( "source" );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/MoreThanOneEntryPointInMxmlRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/MoreThanOneEntryPointInMxmlRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/MoreThanOneEntryPointInMxmlRule.java
new file mode 100644
index 0000000..c28758b
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/MoreThanOneEntryPointInMxmlRule.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.mxml;
+
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class MoreThanOneEntryPointInMxmlRule extends AbstractMoreThanEntryPointInMxmlRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.mxml.AbstractMoreThanEntryPointInMxmlRule#getThreshold
+    * ()
+    */
+   @Override
+   public final int getThreshold()
+   {
+      return 1;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/MoreThanTwoEntryPointsInMxmlRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/MoreThanTwoEntryPointsInMxmlRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/MoreThanTwoEntryPointsInMxmlRule.java
new file mode 100644
index 0000000..7f768a4
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/MoreThanTwoEntryPointsInMxmlRule.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.mxml;
+
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class MoreThanTwoEntryPointsInMxmlRule extends AbstractMoreThanEntryPointInMxmlRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.mxml.AbstractMoreThanEntryPointInMxmlRule#getThreshold
+    * ()
+    */
+   @Override
+   public final int getThreshold()
+   {
+      return 2;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/OnlyOneScriptBlockPerMxmlRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/OnlyOneScriptBlockPerMxmlRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/OnlyOneScriptBlockPerMxmlRule.java
new file mode 100644
index 0000000..2041b13
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/OnlyOneScriptBlockPerMxmlRule.java
@@ -0,0 +1,97 @@
+/*
+ * 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.mxml;
+
+import java.util.List;
+
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+
+import org.w3c.dom.Document;
+
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.rules.core.AbstractXpathRelatedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class OnlyOneScriptBlockPerMxmlRule extends AbstractXpathRelatedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractXpathRelatedRule#evaluate(org.w3c.
+    * dom.Document, javax.xml.xpath.XPath)
+    */
+   @Override
+   protected Object evaluate( final Document doc,
+                              final XPath xPath ) throws XPathExpressionException
+   {
+      return xPath.evaluate( getXPathExpression(),
+                             doc,
+                             XPathConstants.NUMBER );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractXpathRelatedRule#getXPathExpression()
+    */
+   @Override
+   protected String getXPathExpression()
+   {
+      return "count(//mx:Script)";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractXpathRelatedRule#onEvaluated(java.
+    * util.List, org.w3c.dom.Document, javax.xml.xpath.XPath)
+    */
+   @Override
+   protected void onEvaluated( final List< IFlexViolation > violations,
+                               final Document doc,
+                               final XPath xPath ) throws XPathExpressionException
+   {
+      final Double scriptNb = ( Double ) evaluate( doc,
+                                                   xPath );
+
+      if ( scriptNb >= 2 )
+      {
+         addViolation( violations,
+                       ViolationPosition.create( 1,
+                                                 1,
+                                                 0,
+                                                 0 ),
+                       String.valueOf( scriptNb ) );
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/StaticMethodInMxmlRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/StaticMethodInMxmlRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/StaticMethodInMxmlRule.java
new file mode 100644
index 0000000..2aaf314
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/StaticMethodInMxmlRule.java
@@ -0,0 +1,66 @@
+/*
+ * 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.mxml;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.Modifier;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class StaticMethodInMxmlRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#isConcernedByTheCurrentFile
+    * ()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return getCurrentFile().isMxml();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected final void findViolations( final IFunction function )
+   {
+      if ( function.is( Modifier.STATIC ) )
+      {
+         addViolation( function );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/TooLongScriptBlockRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/TooLongScriptBlockRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/TooLongScriptBlockRule.java
new file mode 100644
index 0000000..4e54d8c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/TooLongScriptBlockRule.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.mxml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.files.IMxmlFile;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.AbstractMaximizedFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public class TooLongScriptBlockRule extends AbstractMaximizedFlexRule
+{
+   public static final int DEFAULT_THRESHOLD = 50;
+   private int             linesInScriptBlock;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#
+    * getActualValueForTheCurrentViolation()
+    */
+   public final int getActualValueForTheCurrentViolation()
+   {
+      return linesInScriptBlock;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getDefaultThreshold
+    * ()
+    */
+   public final int getDefaultThreshold()
+   {
+      return DEFAULT_THRESHOLD;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return getCurrentFile().isMxml();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#findViolationsInCurrentFile()
+    */
+   @Override
+   protected final List< IFlexViolation > findViolationsInCurrentFile()
+   {
+      final List< IFlexViolation > violations = new ArrayList< IFlexViolation >();
+      final IMxmlFile mxml = ( IMxmlFile ) getCurrentFile();
+
+      linesInScriptBlock = mxml.getEndingScriptBlock()
+            - mxml.getBeginningScriptBlock();
+
+      if ( linesInScriptBlock >= getThreshold() )
+      {
+         addViolation( violations,
+                       new ViolationPosition( mxml.getBeginningScriptBlock(), mxml.getEndingScriptBlock() ) );
+      }
+      return violations;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/TooManyStatesInMxmlRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/TooManyStatesInMxmlRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/TooManyStatesInMxmlRule.java
new file mode 100644
index 0000000..d0ac6c5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/mxml/TooManyStatesInMxmlRule.java
@@ -0,0 +1,159 @@
+/*
+ * 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.mxml;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+
+import net.sourceforge.pmd.PropertyDescriptor;
+
+import org.w3c.dom.Document;
+
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.rules.core.AbstractXpathRelatedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule;
+
+/**
+ * @author xagnetti
+ */
+public class TooManyStatesInMxmlRule extends AbstractXpathRelatedRule implements IThresholdedRule
+{
+   private Double statesNb = 0.0;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#
+    * getActualValueForTheCurrentViolation()
+    */
+   public int getActualValueForTheCurrentViolation()
+   {
+      return statesNb.intValue();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getDefaultThreshold
+    * ()
+    */
+   public int getDefaultThreshold()
+   {
+      return 5;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getThreshold()
+    */
+   public int getThreshold()
+   {
+      return getIntProperty( propertyDescriptorFor( getThresholdName() ) );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getThresholdName
+    * ()
+    */
+   public final String getThresholdName()
+   {
+      return MAXIMUM;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractXpathRelatedRule#evaluate(org.w3c.
+    * dom.Document, javax.xml.xpath.XPath)
+    */
+   @Override
+   protected Object evaluate( final Document doc,
+                              final XPath xPath ) throws XPathExpressionException
+   {
+      return xPath.evaluate( getXPathExpression(),
+                             doc,
+                             XPathConstants.NUMBER );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractXpathRelatedRule#getXPathExpression()
+    */
+   @Override
+   protected String getXPathExpression()
+   {
+      return "count(//mx:states/*)";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractXpathRelatedRule#onEvaluated(java.
+    * util.List, org.w3c.dom.Document, javax.xml.xpath.XPath)
+    */
+   @Override
+   protected void onEvaluated( final List< IFlexViolation > violations,
+                               final Document doc,
+                               final XPath xPath ) throws XPathExpressionException
+   {
+      statesNb = ( Double ) evaluate( doc,
+                                      xPath );
+
+      if ( statesNb >= getThreshold() )
+      {
+         xPath.evaluate( "//mx:states/*",
+                         doc,
+                         XPathConstants.NODESET );
+
+         addViolation( violations,
+                       ViolationPosition.create( 1,
+                                                 1,
+                                                 0,
+                                                 0 ),
+                       String.valueOf( getActualValueForTheCurrentViolation() ) );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.CommonAbstractRule#propertiesByName()
+    */
+   @Override
+   protected final Map< String, PropertyDescriptor > propertiesByName()
+   {
+      return getThresholdedRuleProperties( this );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/BooleanAttributeShouldContainIsHasRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/BooleanAttributeShouldContainIsHasRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/BooleanAttributeShouldContainIsHasRule.java
new file mode 100644
index 0000000..1f33580
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/BooleanAttributeShouldContainIsHasRule.java
@@ -0,0 +1,75 @@
+/*
+ * 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.naming;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.INamableNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+public class BooleanAttributeShouldContainIsHasRule extends AbstractAstFlexRule
+{
+   private static final String   BOOLEAN         = "Boolean";
+   private static final String[] FORBIDDEN_NAMES = new String[]
+                                                 { "has",
+               "is",
+               "can"                            };
+
+   @Override
+   protected void findViolations( final IFunction function )
+   {
+      if ( function.isGetter()
+            && function.isPublic() && function.getReturnType().toString().compareTo( BOOLEAN ) == 0 )
+      {
+         isWronglyNamed( function );
+      }
+   }
+
+   @Override
+   protected void findViolationsFromAttributes( final List< IAttribute > variables )
+   {
+      for ( final IAttribute variable : variables )
+      {
+         if ( variable.getName().compareTo( BOOLEAN ) == 0 )
+         {
+            isWronglyNamed( variable );
+         }
+      }
+   }
+
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   private void isWronglyNamed( final INamableNode namable )
+   {
+      for ( final String forbiddenName : FORBIDDEN_NAMES )
+      {
+         if ( namable.getName().startsWith( forbiddenName ) )
+         {
+            return;
+         }
+      }
+      addViolation( namable,
+                    namable.getName() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/CapitalizeConstantsRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/CapitalizeConstantsRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/CapitalizeConstantsRule.java
new file mode 100644
index 0000000..ae57015
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/CapitalizeConstantsRule.java
@@ -0,0 +1,51 @@
+/*
+ * 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.naming;
+
+import java.util.List;
+import java.util.Locale;
+
+import com.adobe.ac.pmd.nodes.IConstant;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+public class CapitalizeConstantsRule extends AbstractAstFlexRule
+{
+   @Override
+   protected void findViolationsFromConstants( final List< IConstant > constants )
+   {
+      for ( final IConstant constant : constants )
+      {
+         if ( nameContainsLowerCase( constant.getName() ) )
+         {
+            addViolation( constant,
+                          constant.getName() );
+         }
+      }
+   }
+
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   private boolean nameContainsLowerCase( final String name )
+   {
+      return name.toUpperCase( Locale.getDefault() ).compareTo( name ) != 0;
+   }
+}


[27/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/EmptyTestFunctionStatus.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/EmptyTestFunctionStatus.as b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/EmptyTestFunctionStatus.as
new file mode 100644
index 0000000..68bd07e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/EmptyTestFunctionStatus.as
@@ -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 flexunit.flexui.data.filter
+{
+   import flexunit.flexui.controls.FlexUnitLabels;
+   import flexunit.flexui.data.TestFunctionRowData;
+   
+   public class EmptyTestFunctionStatus implements ITestFunctionStatus
+   {
+      public function isTestFunctionVisible( test : TestFunctionRowData ) : Boolean
+      {
+         return test.assertionsMade == 0;
+      }
+      
+      public function get label() : String
+      {
+         return FlexUnitLabels.EMPTY;
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/ErrorTestFunctionStatus.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/ErrorTestFunctionStatus.as b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/ErrorTestFunctionStatus.as
new file mode 100644
index 0000000..4bacad6
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/ErrorTestFunctionStatus.as
@@ -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 flexunit.flexui.data.filter
+{
+   import flexunit.flexui.controls.FlexUnitLabels;
+   import flexunit.flexui.data.TestFunctionRowData;
+
+   public class ErrorTestFunctionStatus implements ITestFunctionStatus
+   {
+      public function isTestFunctionVisible( test : TestFunctionRowData ) : Boolean
+      {
+         return ! test.testSuccessful;
+      }
+      
+      public function get label() : String
+      {
+         return FlexUnitLabels.FAILURES_AND_ERRORS;
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/ITestFunctionStatus.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/ITestFunctionStatus.as b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/ITestFunctionStatus.as
new file mode 100644
index 0000000..a5d4256
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/ITestFunctionStatus.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flexunit.flexui.data.filter
+{
+   import flexunit.flexui.data.TestFunctionRowData;
+   
+   public interface ITestFunctionStatus
+   {
+      function isTestFunctionVisible( test : TestFunctionRowData ) : Boolean;
+      function get label() : String;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/TestfFunctionStatuses.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/TestfFunctionStatuses.as b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/TestfFunctionStatuses.as
new file mode 100644
index 0000000..7a37483
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/TestfFunctionStatuses.as
@@ -0,0 +1,32 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flexunit.flexui.data.filter
+{
+   public class TestfFunctionStatuses
+   {
+      public static const ALL : ITestFunctionStatus = new AllTestFunctionStatus();
+      public static const EMPTY : ITestFunctionStatus = new EmptyTestFunctionStatus();
+      public static const ERRORS_AND_FAILURES : ITestFunctionStatus = new ErrorTestFunctionStatus();
+      
+      public static function toArray() : Array
+      {
+         return [ ALL, EMPTY, ERRORS_AND_FAILURES ];
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/mxml/IterationView.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/mxml/IterationView.mxml b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/mxml/IterationView.mxml
new file mode 100644
index 0000000..04a064c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/mxml/IterationView.mxml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:Panel 
+   xmlns:mx="http://www.adobe.com/2006/mxml"
+   xmlns:ns1="com.adobe.ac.anthology.view.iteration.*"
+   xmlns:component="com.adobe.ac.anthology.utils.components.*"
+   title="MyIterations" 
+   horizontalAlign="left"
+   visible="{ model.selectedRelease != null }">
+
+    <mx:Script>
+    <![CDATA[
+       import com.adobe.ac.anthology.model.object.Iteration;
+       import com.adobe.ac.anthology.model.AnthologyModelLocator;
+       import com.adobe.ac.anthology.model.ProjectModel;
+      import com.adobe.cairngorm.business.ServiceLocator;
+      import com.adobe.ac.anthology.control.event.iteration.*;
+      import com.adobe.ac.anthology.utils.FormTools;
+      
+      [Bindable]
+      private var model : ProjectModel = AnthologyModelLocator.instance.projectModel;
+      
+      private function addIteration() : void
+ 	   {
+ 	      model.selectedRelease.addIteration( new Iteration() );
+ 	   }
+ 	   
+ 	   private function changeIteration() : void
+ 	   {
+ 	      model.selectedIteration = dg.selectedItem as Iteration;
+ 	   }
+
+    ]]>
+    </mx:Script>
+    <mx:HBox height="320"> 
+    
+    <ns1:DetailedIterationWithControl
+       id="detailedIterationForm"
+       iteration="{ model.selectedIteration }" />
+	     
+    <mx:VRule
+       height="100%"
+       strokeColor="#DDDDDD"/>   
+ 
+    <mx:VBox
+       paddingTop="15"
+       paddingLeft="15"
+       paddingRight="15"
+       paddingBottom="15">
+     
+      <mx:Text text="List of Iterations"/>
+      
+      <component:ScrawlGrid
+            id="dg"
+            dataProvider="{ model.selectedRelease.iterations }"
+            width="200" height="220"
+            change="changeIteration()">
+            
+         <component:columns>
+               
+            <mx:DataGridColumn
+               dataField="iterationNumber"
+               headerText="#"/>
+               
+            <mx:DataGridColumn
+               dataField="startDate"
+               headerText="Start Date"
+               editable="false"/>
+               
+            <mx:DataGridColumn 
+               dataField="endDate" 
+               headerText="End Date"/>
+               
+         </component:columns>
+         
+      </component:ScrawlGrid>
+      
+      <mx:HBox width="200">
+      
+         <mx:Button label="Add Iteration"
+            click="addIteration()"/>
+            
+      </mx:HBox>
+  
+    </mx:VBox>
+ 
+  </mx:HBox>   
+</mx:Panel>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/mxml/IterationsList.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/mxml/IterationsList.mxml b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/mxml/IterationsList.mxml
new file mode 100644
index 0000000..7718eb2
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/mxml/IterationsList.mxml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<component:ScrawlGrid xmlns:mx="http://www.adobe.com/2006/mxml"
+   xmlns:component="com.adobe.ac.anthology.utils.components.*">
+   <!--
+       lalala 
+       -->
+   <mx:Script>
+      <![CDATA[
+         import com.adobe.ac.anthology.model.object.Iteration;
+         
+         import mx.collections.ArrayCollection;
+         
+         
+         private var _selectedIteration : Iteration;
+         
+         public function set selectedIteration(value : Iteration) : void
+         {
+           for (var i : uint = 0; i < (dataProvider as ArrayCollection).length; i++) {
+         		var currentId : uint = dataProvider[i].id;
+         		if (currentId == value.id) {
+         			selectedItem = dataProvider[i];
+         			return;
+         		}	
+         	}
+         }
+         
+         private function displayTitle(item : Object, column : DataGridColumn) : String
+         {
+            var i  : Iteration = Iteration( item );
+            
+            return "#" + i.iterationNumber.toString() + " " + i.status;
+         }
+         
+      ]]>
+   </mx:Script>
+   
+   <component:columns>
+   
+      <mx:DataGridColumn dataField="iterationNumber" headerText="Iterations" labelFunction="displayTitle"/>
+      
+   </component:columns>   
+   
+</component:ScrawlGrid>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ant-task/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ant-task/.pmd b/FlexPMD/flex-pmd-java/flex-pmd-ant-task/.pmd
new file mode 100644
index 0000000..b5c19d9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ant-task/.pmd
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<pmd>
+    <useProjectRuleSet>false</useProjectRuleSet>
+    <ruleSetFile>../flex-pmd-parent/pmd.xml</ruleSetFile>
+    <includeDerivedFiles>false</includeDerivedFiles>
+    <violationsAsErrors>true</violationsAsErrors>
+</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ant-task/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ant-task/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-ant-task/pom.xml
new file mode 100644
index 0000000..fb11720
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ant-task/pom.xml
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-ant-task</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Adobe Flex PMD Ant task</name>
+
+    <build>
+        <testResources>
+            <testResource>
+                <directory>${project.build.directory}/test/generated-resources</directory>
+            </testResource>
+        </testResources>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-test-resources</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeGroupIds>${project.groupId}</includeGroupIds>
+                            <includes>**/*.as,**/*.mxml</includes>
+                            <outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
+                            <excludeTransitive>true</excludeTransitive>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>${maven-antrun-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <id>package-ant-task</id>
+                        <phase>install</phase>
+                        <configuration>
+                            <tasks>
+                                <echo message="Building ant-task"/>
+                                <mkdir dir="${project.build.directory}/release"/>
+                                <echo message=""/>
+                                <echo message="Copying Flex PMD dependencies..."/>
+                                <copy file="${project.build.directory}/${project.build.finalName}.jar"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:flex-pmd-core:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:flex-pmd-ruleset:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:flex-pmd-files:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:flex-pmd-ruleset-api:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:as3-parser:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:as3-parser-api:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <echo message="Copying Ant dependencies..."/>
+                                <copy file="${org.apache.flex.pmd:as3-plugin-utils:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${pmd:pmd:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.ant:ant:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${commons-lang:commons-lang:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${plexus:plexus-utils:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <echo message="Extracting license..."/>
+                                <copy file="../../src/etc/header.txt"
+                                      tofile="${project.build.directory}/release/LICENSE.txt" overwrite="true"/>
+                                <echo message="Compressing zip..."/>
+                                <zip destfile="${project.build.directory}/${project.build.finalName}.zip"
+                                     basedir="${project.build.directory}/release" excludes="*.zip"/>
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.flex.pmd</groupId>
+            <artifactId>flex-pmd-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ant</groupId>
+            <artifactId>ant</artifactId>
+            <version>${ant.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-test-resources</artifactId>
+            <version>${project.parent.version}</version>
+            <classifier>resources</classifier>
+            <type>zip</type>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- Dependencies for packaging from ANT -->
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>flex-pmd-ruleset</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>flex-pmd-ruleset-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>flex-pmd-files</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>as3-plugin-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>as3-parser</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>as3-parser-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>pmd</groupId>
+            <artifactId>pmd</artifactId>
+            <version>${pmd.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>plexus</groupId>
+            <artifactId>plexus-utils</artifactId>
+            <version>${plexus-utils.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>${commons-lang.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ant-task/src/main/assemble/bin.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ant-task/src/main/assemble/bin.xml b/FlexPMD/flex-pmd-java/flex-pmd-ant-task/src/main/assemble/bin.xml
new file mode 100644
index 0000000..134549d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ant-task/src/main/assemble/bin.xml
@@ -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.
+
+-->
+<assembly>
+  <id>ant</id>
+  <formats>
+    <format>jar</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <dependencySets>
+    <dependencySet>
+      <includes>
+         <include>com.adobe.ac:flex-pmd-core</include>
+         <include>org.apache.ant:ant</include>
+         <include>com.adobe.ac:as3-parser</include>
+         <include>com.adobe.ac:as3-plugin-utils</include>
+         <include>com.adobe.ac:flex-pmd-ruleset</include>
+         <include>com.adobe.ac:flex-pmd-ruleset-api</include>
+         <include>pmd:pmd</include>
+      </includes>
+    </dependencySet>
+  </dependencySets>    
+</assembly>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ant-task/src/main/java/com/adobe/ac/pmd/ant/FlexPmdAntTask.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ant-task/src/main/java/com/adobe/ac/pmd/ant/FlexPmdAntTask.java b/FlexPMD/flex-pmd-java/flex-pmd-ant-task/src/main/java/com/adobe/ac/pmd/ant/FlexPmdAntTask.java
new file mode 100644
index 0000000..40e7167
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ant-task/src/main/java/com/adobe/ac/pmd/ant/FlexPmdAntTask.java
@@ -0,0 +1,119 @@
+/*
+ * 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.ant;
+
+import java.io.File;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+import com.adobe.ac.pmd.FlexPmdParameters;
+import com.adobe.ac.pmd.FlexPmdViolations;
+import com.adobe.ac.pmd.LoggerUtils;
+import com.adobe.ac.pmd.engines.FlexPmdXmlEngine;
+import com.adobe.ac.pmd.engines.PmdEngineUtils;
+
+public class FlexPmdAntTask extends Task // NO_UCD
+{
+   private boolean failOnError;
+   private boolean failOnRuleViolation;
+   private File    outputDirectory;
+   private String  packageToExclude;
+   private File    ruleSet;
+   private File    sourceDirectory;
+
+   @Override
+   public final void execute()
+   {
+      try
+      {
+         presetParameters();
+
+         new LoggerUtils().loadConfiguration();
+
+         final FlexPmdXmlEngine engine = new FlexPmdXmlEngine( new FlexPmdParameters( packageToExclude,
+                                                                                      outputDirectory,
+                                                                                      ruleSet,
+                                                                                      sourceDirectory ) );
+         final FlexPmdViolations violations = new FlexPmdViolations();
+
+         engine.executeReport( violations );
+
+         if ( failOnError )
+         {
+            final String message = PmdEngineUtils.findFirstViolationError( violations );
+
+            if ( message.length() > 0 )
+            {
+               throw new BuildException( message );
+            }
+         }
+         if ( failOnRuleViolation
+               && !violations.getViolations().isEmpty() )
+         {
+            throw new BuildException( "At least one violation has been found" );
+         }
+      }
+      catch ( final Exception e )
+      {
+         throw new BuildException( e );
+      }
+   }
+
+   public final String getPackageToExclude()
+   {
+      return packageToExclude;
+   }
+
+   public final void setFailOnError( final boolean failOnErrorToBeSet )
+   {
+      failOnError = failOnErrorToBeSet;
+   }
+
+   public final void setFailOnRuleViolation( final boolean failOnRuleViolation )
+   {
+      this.failOnRuleViolation = failOnRuleViolation;
+   }
+
+   public final void setOutputDirectory( final File outputDirectoryToBeSet )
+   {
+      outputDirectory = outputDirectoryToBeSet;
+   }
+
+   public final void setPackageToExclude( final String packageToExcludeToBeSet )
+   {
+      packageToExclude = packageToExcludeToBeSet;
+   }
+
+   public final void setRuleSet( final File ruleSetToBeSet )
+   {
+      ruleSet = ruleSetToBeSet;
+   }
+
+   public final void setSourceDirectory( final File sourceDirectoryToBeSet )
+   {
+      sourceDirectory = sourceDirectoryToBeSet;
+   }
+
+   private void presetParameters()
+   {
+      if ( packageToExclude == null )
+      {
+         packageToExclude = "";
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ant-task/src/test/java/com/adobe/ac/pmd/ant/FlexPmdAntTaskTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ant-task/src/test/java/com/adobe/ac/pmd/ant/FlexPmdAntTaskTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ant-task/src/test/java/com/adobe/ac/pmd/ant/FlexPmdAntTaskTest.java
new file mode 100644
index 0000000..256e871
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ant-task/src/test/java/com/adobe/ac/pmd/ant/FlexPmdAntTaskTest.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.ant;
+
+import java.io.File;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+
+public class FlexPmdAntTaskTest extends FlexPmdTestBase
+{
+   private static final String TARGET = "target";
+
+   @Test(expected = BuildException.class)
+   public void testExecuteWithFailOnError()
+   {
+      final FlexPmdAntTask task = new FlexPmdAntTask();
+      final Project project = new Project();
+
+      task.setFailOnError( true );
+      task.setSourceDirectory( getTestDirectory() );
+      task.setOutputDirectory( new File( TARGET ) );
+      task.setProject( project );
+      task.execute();
+   }
+
+   @Test(expected = BuildException.class)
+   public void testExecuteWithFailOnViolation()
+   {
+      final FlexPmdAntTask task = new FlexPmdAntTask();
+      final Project project = new Project();
+
+      task.setFailOnRuleViolation( true );
+      task.setPackageToExclude( "" );
+      task.setRuleSet( null );
+      task.setSourceDirectory( getTestDirectory() );
+      task.setOutputDirectory( new File( TARGET ) );
+      task.setProject( project );
+      task.execute();
+   }
+
+   @Test(expected = BuildException.class)
+   public void testExecuteWithoutSettingParameters()
+   {
+      final FlexPmdAntTask task = new FlexPmdAntTask();
+      final Project project = new Project();
+
+      task.setProject( project );
+      task.execute();
+   }
+
+   @Test
+   public void testExecuteWithParameters()
+   {
+      final FlexPmdAntTask task = new FlexPmdAntTask();
+      final Project project = new Project();
+
+      task.setSourceDirectory( getTestDirectory() );
+      task.setOutputDirectory( new File( TARGET ) );
+      task.setProject( project );
+      task.execute();
+      new File( TARGET
+            + "/pmd.xml" ).delete();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/.pmd b/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/.pmd
new file mode 100644
index 0000000..b5c19d9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/.pmd
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<pmd>
+    <useProjectRuleSet>false</useProjectRuleSet>
+    <ruleSetFile>../flex-pmd-parent/pmd.xml</ruleSetFile>
+    <includeDerivedFiles>false</includeDerivedFiles>
+    <violationsAsErrors>true</violationsAsErrors>
+</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/pom.xml
new file mode 100644
index 0000000..dcaad29
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/pom.xml
@@ -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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-command-line-api</artifactId>
+    <packaging>jar</packaging>
+
+	<name>Adobe Flex PMD Command line API</name>
+
+	<dependencies>
+		<dependency>
+			<groupId>com.martiansoftware</groupId>
+			<artifactId>jsap</artifactId>
+			<version>${jsap.version}</version>
+		</dependency>
+	</dependencies>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/CommandLineOptions.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/CommandLineOptions.java b/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/CommandLineOptions.java
new file mode 100644
index 0000000..e8aa66e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/CommandLineOptions.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;
+
+public enum CommandLineOptions implements ICommandLineOptions
+{
+   EXLUDE_PACKAGE("excludePackage"),
+   MXML_FACTOR("mxmlFactor"),
+   OUTPUT("outputDirectory"),
+   RULE_SET("ruleSet"),
+   SOURCE_DIRECTORY("sourceDirectory");
+
+   private String name;
+
+   private CommandLineOptions( final String nameToBeSet )
+   {
+      name = nameToBeSet;
+   }
+
+   @Override
+   public String toString()
+   {
+      return name;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/CommandLineUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/CommandLineUtils.java b/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/CommandLineUtils.java
new file mode 100644
index 0000000..ba212a4
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/CommandLineUtils.java
@@ -0,0 +1,58 @@
+/*
+ * 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;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.martiansoftware.jsap.FlaggedOption;
+import com.martiansoftware.jsap.JSAP;
+import com.martiansoftware.jsap.JSAPException;
+
+public final class CommandLineUtils
+{
+   public static List< File > computeSourceList( final String source )
+   {
+      if ( !source.contains( "," ) )
+      {
+         return null;
+      }
+      final List< File > sourceList = new ArrayList< File >();
+      for ( int i = 0; i < source.split( "," ).length; i++ )
+      {
+         sourceList.add( new File( source.split( "," )[ i ] ) ); // NOPMD
+      }
+      return sourceList;
+   }
+
+   public static void registerParameter( final JSAP jsap,
+                                         final ICommandLineOptions option,
+                                         final boolean required ) throws JSAPException
+   {
+      final String optionName = option.toString();
+
+      jsap.registerParameter( new FlaggedOption( optionName ).setStringParser( JSAP.STRING_PARSER )
+                                                             .setRequired( required )
+                                                             .setShortFlag( optionName.charAt( 0 ) )
+                                                             .setLongFlag( optionName ) );
+   }
+
+   private CommandLineUtils()
+   {
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/ICommandLineOptions.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/ICommandLineOptions.java b/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/ICommandLineOptions.java
new file mode 100644
index 0000000..8d0e250
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/ICommandLineOptions.java
@@ -0,0 +1,22 @@
+/*
+ * 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;
+
+public interface ICommandLineOptions
+{
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/test/java/com/adobe/ac/pmd/CommandLineOptionsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/test/java/com/adobe/ac/pmd/CommandLineOptionsTest.java b/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/test/java/com/adobe/ac/pmd/CommandLineOptionsTest.java
new file mode 100644
index 0000000..9ced093
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/test/java/com/adobe/ac/pmd/CommandLineOptionsTest.java
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class CommandLineOptionsTest
+{
+   @Test
+   public void testToString()
+   {
+      assertEquals( "outputDirectory",
+                    CommandLineOptions.OUTPUT.toString() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/test/java/com/adobe/ac/pmd/CommandLineUtilsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/test/java/com/adobe/ac/pmd/CommandLineUtilsTest.java b/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/test/java/com/adobe/ac/pmd/CommandLineUtilsTest.java
new file mode 100644
index 0000000..305315c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-command-line-api/src/test/java/com/adobe/ac/pmd/CommandLineUtilsTest.java
@@ -0,0 +1,58 @@
+/*
+ * 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;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+import com.martiansoftware.jsap.JSAP;
+import com.martiansoftware.jsap.JSAPException;
+
+public class CommandLineUtilsTest
+{
+   @Test
+   public void testComputeSourceList()
+   {
+      assertEquals( 3,
+                    CommandLineUtils.computeSourceList( "lala,toto,tyty" ).size() );
+      assertNull( CommandLineUtils.computeSourceList( "lala" ) );
+   }
+
+   @Test
+   public void testRegisterParameter() throws JSAPException
+   {
+      final JSAP jsap = new JSAP();
+
+      CommandLineUtils.registerParameter( jsap,
+                                          new ICommandLineOptions()
+                                          {
+                                             @Override
+                                             public String toString()
+                                             {
+                                                return "name";
+                                             }
+                                          },
+                                          true );
+
+      assertTrue( jsap.getByShortFlag( 'n' ) != null );
+      assertNull( jsap.getByShortFlag( 'm' ) );
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-command-line/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-command-line/.pmd b/FlexPMD/flex-pmd-java/flex-pmd-command-line/.pmd
new file mode 100644
index 0000000..b5c19d9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-command-line/.pmd
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<pmd>
+    <useProjectRuleSet>false</useProjectRuleSet>
+    <ruleSetFile>../flex-pmd-parent/pmd.xml</ruleSetFile>
+    <includeDerivedFiles>false</includeDerivedFiles>
+    <violationsAsErrors>true</violationsAsErrors>
+</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-command-line/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-command-line/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-command-line/pom.xml
new file mode 100644
index 0000000..5f425fa
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-command-line/pom.xml
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+	<artifactId>flex-pmd-command-line</artifactId>
+    <packaging>jar</packaging>
+
+	<name>Adobe Flex PMD Command line</name>
+
+	<properties>
+		<maven.jar.plugin.version>2.2</maven.jar.plugin.version>
+	</properties>
+
+	<dependencies>
+		<dependency>
+			<groupId>com.martiansoftware</groupId>
+			<artifactId>jsap</artifactId>
+			<version>${jsap.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>flex-pmd-core</artifactId>
+            <version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>${project.artifactId}-api</artifactId>
+            <version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>flex-pmd-ruleset</artifactId>
+            <version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>${project.parent.groupId}</groupId>
+			<artifactId>flex-pmd-test-resources</artifactId>
+			<version>${project.parent.version}</version>
+			<classifier>resources</classifier>
+			<type>zip</type>
+			<scope>provided</scope>
+		</dependency>
+
+		<!-- Dependencies for packaging from ANT -->
+
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>flex-pmd-files</artifactId>
+            <version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>flex-pmd-ruleset-api</artifactId>
+            <version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>as3-plugin-utils</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>as3-parser</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>as3-parser-api</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>pmd</groupId>
+			<artifactId>pmd</artifactId>
+			<version>${pmd.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>plexus</groupId>
+			<artifactId>plexus-utils</artifactId>
+			<version>${plexus-utils.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-lang</groupId>
+			<artifactId>commons-lang</artifactId>
+			<version>${commons-lang.version}</version>
+		</dependency>
+	</dependencies>
+
+	<build>
+
+		<testResources>
+			<testResource>
+				<directory>${project.build.directory}/test/generated-resources</directory>
+			</testResource>
+		</testResources>
+
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>unpack-test-resources</id>
+						<phase>generate-resources</phase>
+						<goals>
+							<goal>unpack-dependencies</goal>
+						</goals>
+						<configuration>
+							<includeGroupIds>${project.groupId}</includeGroupIds>
+							<includes>**/*.as,**/*.mxml</includes>
+							<outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
+							<excludeTransitive>true</excludeTransitive>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-jar-plugin</artifactId>
+				<version>${maven.jar.plugin.version}</version>
+				<configuration>
+					<archive>
+						<manifest>
+							<mainClass>com.adobe.ac.pmd.commandline.FlexPMD</mainClass>
+							<packageName>com.adobe.ac.pmd.commandline</packageName>
+							<addClasspath>true</addClasspath>
+						</manifest>
+					</archive>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<version>${maven-antrun-plugin.version}</version>
+				<executions>
+					<execution>
+						<id>package-ant-task</id>
+						<phase>install</phase>
+						<configuration>
+							<tasks>
+								<echo message="Building ant-task" />
+								<mkdir dir="${project.build.directory}/release" />
+								<echo message="" />
+								<echo message="Copying Flex PMD dependencies..." />
+								<copy file="${project.build.directory}/${project.build.finalName}.jar" todir="${project.build.directory}/release" overwrite="true" />
+								<copy file="${org.apache.flex.pmd:flex-pmd-command-line-api:jar}" todir="${project.build.directory}/release" overwrite="true" />
+								<!--copy file="${org.apache.flex.pmd:flex-pmd-core:jar}" todir="${project.build.directory}/release" overwrite="true" /-->
+								<copy file="${org.apache.flex.pmd:flex-pmd-ruleset:jar}" todir="${project.build.directory}/release" overwrite="true" />
+								<copy file="${org.apache.flex.pmd:flex-pmd-files:jar}" todir="${project.build.directory}/release" overwrite="true" />
+								<copy file="${org.apache.flex.pmd:flex-pmd-ruleset-api:jar}" todir="${project.build.directory}/release" overwrite="true" />
+								<copy file="${org.apache.flex.pmd:as3-parser-api:jar}" todir="${project.build.directory}/release" overwrite="true" />
+								<copy file="${org.apache.flex.pmd:as3-parser:jar}" todir="${project.build.directory}/release" overwrite="true" />
+								<echo message="Copying Command line dependencies..." />
+								<copy file="${org.apache.flex.pmd:as3-plugin-utils:jar}" todir="${project.build.directory}/release" overwrite="true" />
+								<copy file="${pmd:pmd:jar}" todir="${project.build.directory}/release" overwrite="true" />
+								<copy file="${plexus:plexus-utils:jar}" todir="${project.build.directory}/release" overwrite="true" />
+								<copy file="${commons-lang:commons-lang:jar}" todir="${project.build.directory}/release" overwrite="true" />
+								<copy file="${com.martiansoftware:jsap:jar}" todir="${project.build.directory}/release" overwrite="true" />
+								<echo message="Extracting license..." />
+								<copy file="../../src/etc/header.txt" tofile="${project.build.directory}/release/LICENSE.txt" overwrite="true" />
+								<echo message="Compressing zip..." />
+								<zip destfile="${project.build.directory}/${project.build.finalName}.zip" basedir="${project.build.directory}/release" excludes="*.zip" />
+							</tasks>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-command-line/src/main/assemble/bin.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-command-line/src/main/assemble/bin.xml b/FlexPMD/flex-pmd-java/flex-pmd-command-line/src/main/assemble/bin.xml
new file mode 100644
index 0000000..3f5dd15
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-command-line/src/main/assemble/bin.xml
@@ -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.
+
+-->
+<assembly>
+  <id>command-line</id>
+  <formats>
+    <format>jar</format>
+  </formats>  
+  <fileSets>
+   <fileSet>
+      
+   </fileSet>
+  </fileSets>
+  <dependencySets>
+    <dependencySet>
+      <includes>
+         <include>com.adobe.ac:flex-pmd-core</include>
+         <include>com.adobe.ac:as3-parser</include>
+         <include>com.adobe.ac:as3-plugin-utils</include>
+         <include>com.adobe.ac:flex-pmd-ruleset</include>
+         <include>com.adobe.ac:flex-pmd-ruleset-api</include>
+         <include>com.martiansoftware:jsap</include>
+      </includes>
+    </dependencySet>
+  </dependencySets>    
+</assembly>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-command-line/src/main/java/com/adobe/ac/pmd/commandline/FlexPMD.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-command-line/src/main/java/com/adobe/ac/pmd/commandline/FlexPMD.java b/FlexPMD/flex-pmd-java/flex-pmd-command-line/src/main/java/com/adobe/ac/pmd/commandline/FlexPMD.java
new file mode 100644
index 0000000..4b293fa
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-command-line/src/main/java/com/adobe/ac/pmd/commandline/FlexPMD.java
@@ -0,0 +1,134 @@
+/*
+ * 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.commandline;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import net.sourceforge.pmd.PMDException;
+
+import com.adobe.ac.pmd.CommandLineOptions;
+import com.adobe.ac.pmd.CommandLineUtils;
+import com.adobe.ac.pmd.FlexPmdParameters;
+import com.adobe.ac.pmd.FlexPmdViolations;
+import com.adobe.ac.pmd.LoggerUtils;
+import com.adobe.ac.pmd.engines.FlexPmdXmlEngine;
+import com.martiansoftware.jsap.JSAP;
+import com.martiansoftware.jsap.JSAPException;
+import com.martiansoftware.jsap.JSAPResult;
+
+public final class FlexPMD // NO_UCD
+{
+   private static JSAPResult   config;
+   private static final Logger LOGGER = Logger.getLogger( FlexPMD.class.getName() );
+
+   /**
+    * @param args
+    * @throws JSAPException
+    * @throws PMDException
+    * @throws URISyntaxException
+    * @throws IOException
+    * @throws Exception
+    */
+   public static void main( final String[] args ) throws JSAPException,
+                                                 PMDException,
+                                                 URISyntaxException,
+                                                 IOException
+   {
+      new LoggerUtils().loadConfiguration();
+      startFlexPMD( args );
+      LOGGER.info( "FlexPMD terminated" );
+      System.exit( 0 ); // NOPMD
+   }
+
+   static boolean areCommandLineOptionsCorrect( final String[] args ) throws JSAPException
+   {
+      final JSAP jsap = new JSAP();
+      config = parseCommandLineArguments( args,
+                                          jsap );
+
+      if ( !config.success() )
+      {
+         LOGGER.log( Level.SEVERE,
+                     "Usage: java "
+                           + FlexPMD.class.getName() + " " + jsap.getUsage() );
+      }
+
+      return config.success();
+   }
+
+   static String getParameterValue( final CommandLineOptions option )
+   {
+      return config.getString( option.toString() );
+   }
+
+   static boolean startFlexPMD( final String[] args ) throws JSAPException,
+                                                     PMDException,
+                                                     URISyntaxException,
+                                                     IOException
+   {
+      if ( areCommandLineOptionsCorrect( args ) )
+      {
+         final String rulesetRef = getParameterValue( CommandLineOptions.RULE_SET );
+         final String excludePackage = getParameterValue( CommandLineOptions.EXLUDE_PACKAGE );
+         final String source = getParameterValue( CommandLineOptions.SOURCE_DIRECTORY );
+         final File sourceDirectory = source.contains( "," ) ? null
+                                                            : new File( source );
+         final List< File > sourceList = CommandLineUtils.computeSourceList( source );
+         final File outputDirectory = new File( getParameterValue( CommandLineOptions.OUTPUT ) );
+         final FlexPmdParameters parameters = new FlexPmdParameters( excludePackage == null ? ""
+                                                                                           : excludePackage,
+                                                                     outputDirectory,
+                                                                     rulesetRef == null ? null
+                                                                                       : new File( rulesetRef ),
+                                                                     sourceDirectory,
+                                                                     sourceList );
+         final FlexPmdXmlEngine engine = new FlexPmdXmlEngine( parameters );
+
+         engine.executeReport( new FlexPmdViolations() );
+      }
+
+      return config.success();
+   }
+
+   private static JSAPResult parseCommandLineArguments( final String[] args,
+                                                        final JSAP jsap ) throws JSAPException
+   {
+      CommandLineUtils.registerParameter( jsap,
+                                          CommandLineOptions.SOURCE_DIRECTORY,
+                                          true );
+      CommandLineUtils.registerParameter( jsap,
+                                          CommandLineOptions.OUTPUT,
+                                          true );
+      CommandLineUtils.registerParameter( jsap,
+                                          CommandLineOptions.RULE_SET,
+                                          false );
+      CommandLineUtils.registerParameter( jsap,
+                                          CommandLineOptions.EXLUDE_PACKAGE,
+                                          false );
+
+      return jsap.parse( args );
+   }
+
+   private FlexPMD()
+   {
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-command-line/src/test/java/com/adobe/ac/pmd/commandline/FlexPMDTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-command-line/src/test/java/com/adobe/ac/pmd/commandline/FlexPMDTest.java b/FlexPMD/flex-pmd-java/flex-pmd-command-line/src/test/java/com/adobe/ac/pmd/commandline/FlexPMDTest.java
new file mode 100644
index 0000000..764b118
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-command-line/src/test/java/com/adobe/ac/pmd/commandline/FlexPMDTest.java
@@ -0,0 +1,187 @@
+/*
+ * 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.commandline;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import junit.framework.Assert;
+import net.sourceforge.pmd.PMDException;
+
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.io.SAXReader;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.CommandLineOptions;
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.martiansoftware.jsap.JSAPException;
+
+public class FlexPMDTest extends FlexPmdTestBase
+{
+   @Test
+   public void testAreCommandLineOptionsCorrect() throws FileNotFoundException,
+                                                 JSAPException,
+                                                 PMDException,
+                                                 URISyntaxException
+   {
+      assertFalse( FlexPMD.areCommandLineOptionsCorrect( new String[]
+      {} ) );
+
+      assertFalse( FlexPMD.areCommandLineOptionsCorrect( new String[]
+      { "-y",
+                  "sourceDirectory",
+                  "-p",
+                  "outPutDirectory" } ) );
+
+      assertTrue( FlexPMD.areCommandLineOptionsCorrect( new String[]
+      { "-s",
+                  "sourceDirectory",
+                  "-o",
+                  "target",
+                  "-r",
+                  "valid.xml" } ) );
+
+      assertTrue( FlexPMD.areCommandLineOptionsCorrect( new String[]
+      { "-s",
+                  "sourceDirectory",
+                  "-o",
+                  "target" } ) );
+   }
+
+   @Test
+   public void testFlexPMD114() throws JSAPException,
+                               PMDException,
+                               URISyntaxException,
+                               IOException,
+                               DocumentException
+   {
+      final String[] args = new String[]
+      { "-s",
+                  getTestDirectory().getAbsolutePath()
+                        + File.separatorChar + "flexpmd114",
+                  "-o",
+                  new File( "target/test2" ).getAbsolutePath() };
+
+      FlexPMD.startFlexPMD( args );
+
+      assertEquals( 3,
+                    loadDocument( new File( "target/test2/pmd.xml" ) ).selectNodes( "//pmd/file" ).size() );
+   }
+
+   @Test
+   public void testFlexPMD88() throws JSAPException,
+                              PMDException,
+                              URISyntaxException,
+                              IOException,
+                              DocumentException
+   {
+      final String[] args = new String[]
+      { "-s",
+                  getTestDirectory().getAbsolutePath()
+                        + File.separatorChar + "bug" + File.separatorChar + "FlexPMD88.as",
+                  "-o",
+                  new File( "target/test3" ).getAbsolutePath() };
+
+      FlexPMD.startFlexPMD( args );
+
+      Assert.assertTrue( loadDocument( new File( "target/test3/pmd.xml" ) ).selectNodes( "//pmd/file[1]/violation" )
+                                                                           .size() > 0 );
+   }
+
+   @Test
+   public void testGetCommandLineValue() throws JSAPException
+   {
+      FlexPMD.areCommandLineOptionsCorrect( new String[]
+      { "-s",
+                  "sourceDirectory",
+                  "-o",
+                  "target",
+                  "-r",
+                  "valid.xml" } );
+
+      assertEquals( "sourceDirectory",
+                    FlexPMD.getParameterValue( CommandLineOptions.SOURCE_DIRECTORY ) );
+      assertEquals( "target",
+                    FlexPMD.getParameterValue( CommandLineOptions.OUTPUT ) );
+      assertEquals( "valid.xml",
+                    FlexPMD.getParameterValue( CommandLineOptions.RULE_SET ) );
+   }
+
+   @Test
+   public void testStartFlexPMD() throws JSAPException,
+                                 PMDException,
+                                 URISyntaxException,
+                                 IOException
+   {
+      final String[] args = new String[]
+      { "-s",
+                  getTestDirectory().getAbsolutePath(),
+                  "-o",
+                  new File( "target/test" ).getAbsolutePath(),
+                  "--excludePackage",
+                  "cairngorm." };
+
+      FlexPMD.startFlexPMD( args );
+   }
+
+   @Test
+   public void testStartFlexPMDOnAFile() throws JSAPException,
+                                        PMDException,
+                                        URISyntaxException,
+                                        IOException
+   {
+      final String filePath = getTestFiles().get( "AbstractRowData.as" ).getFilePath();
+
+      final String[] args = new String[]
+      { "-s",
+                  filePath,
+                  "-o",
+                  new File( "target/test" ).getAbsolutePath(),
+                  "--excludePackage",
+                  "cairngorm." };
+
+      FlexPMD.startFlexPMD( args );
+   }
+
+   @Test
+   public void testStartFlexPMDOnSeveralFolders() throws JSAPException,
+                                                 PMDException,
+                                                 URISyntaxException,
+                                                 IOException
+   {
+      final String[] args = new String[]
+      { "-s",
+                  new File( "target/test/bug" ).getAbsolutePath()
+                        + "," + new File( "target/test/cairngorm" ).getAbsolutePath(),
+                  "-o",
+                  new File( "target/test" ).getAbsolutePath(), };
+
+      FlexPMD.startFlexPMD( args );
+   }
+
+   private Document loadDocument( final File outputFile ) throws DocumentException
+   {
+      return new SAXReader().read( outputFile );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/.p4ignore
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/.p4ignore b/FlexPMD/flex-pmd-java/flex-pmd-core/.p4ignore
new file mode 100644
index 0000000..eb5a316
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/.p4ignore
@@ -0,0 +1 @@
+target

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/.pmd b/FlexPMD/flex-pmd-java/flex-pmd-core/.pmd
new file mode 100644
index 0000000..b5c19d9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/.pmd
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<pmd>
+    <useProjectRuleSet>false</useProjectRuleSet>
+    <ruleSetFile>../flex-pmd-parent/pmd.xml</ruleSetFile>
+    <includeDerivedFiles>false</includeDerivedFiles>
+    <violationsAsErrors>true</violationsAsErrors>
+</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-core/pom.xml
new file mode 100644
index 0000000..b24af26
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/pom.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-core</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Adobe Flex PMD Core</name>
+
+    <properties>
+        <doxia-core.version>1.0-alpha-4</doxia-core.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>doxia</groupId>
+            <artifactId>doxia-core</artifactId>
+            <version>${doxia-core.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-ruleset-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <!-- Test dependencies -->
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-test-resources</artifactId>
+            <version>${project.version}</version>
+            <classifier>resources</classifier>
+            <type>zip</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-ruleset</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <testResources>
+            <testResource>
+                <directory>${project.build.directory}/test/generated-resources</directory>
+            </testResource>
+            <testResource>
+                <directory>${basedir}/src/test/resources</directory>
+            </testResource>
+        </testResources>
+        <resources>
+            <resource>
+                <directory>${project.build.directory}/test/generated-resources</directory>
+            </resource>
+        </resources>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-test-resources</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeGroupIds>${project.groupId}</includeGroupIds>
+                            <includes>**/*.as,**/*.mxml,**/*.xml</includes>
+                            <outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
+                            <excludeTransitive>true</excludeTransitive>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/FlexPmdParameters.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/FlexPmdParameters.java b/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/FlexPmdParameters.java
new file mode 100644
index 0000000..5bab526
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/FlexPmdParameters.java
@@ -0,0 +1,123 @@
+/*
+ * 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;
+
+import java.io.File;
+import java.util.List;
+
+public class FlexPmdParameters
+{
+   private final String       excludePackage;
+   private final boolean      failOnError;
+   private final boolean      failOnRuleViolation;
+   private final File         outputDirectory;
+   private final File         ruleSet;
+   private final File         source;
+   private final List< File > sourceList;
+
+   public FlexPmdParameters( final String excludePackageToBeSet,
+                             final boolean failOnErrorToBeSet,
+                             final boolean failOnRuleViolationToBeSet,
+                             final File outputDirectoryToBeSet,
+                             final File ruleSetToBeSet,
+                             final File sourceToBeSet )
+   {
+      this( excludePackageToBeSet,
+            failOnErrorToBeSet,
+            failOnRuleViolationToBeSet,
+            outputDirectoryToBeSet,
+            ruleSetToBeSet,
+            sourceToBeSet,
+            null );
+   }
+
+   public FlexPmdParameters( final String excludePackageToBeSet,
+                             final boolean failOnErrorToBeSet,
+                             final boolean failOnRuleViolationToBeSet,
+                             final File outputDirectoryToBeSet,
+                             final File ruleSetToBeSet,
+                             final File sourceToBeSet,
+                             final List< File > sourceListToBeSet )
+   {
+      super();
+      excludePackage = excludePackageToBeSet;
+      failOnError = failOnErrorToBeSet;
+      failOnRuleViolation = failOnRuleViolationToBeSet;
+      outputDirectory = outputDirectoryToBeSet;
+      ruleSet = ruleSetToBeSet;
+      source = sourceToBeSet;
+      sourceList = sourceListToBeSet;
+   }
+
+   public FlexPmdParameters( final String excludePackageToBeSet,
+                             final File outputDirectoryToBeSet,
+                             final File ruleSetToBeSet,
+                             final File sourceToBeSet )
+   {
+      this( excludePackageToBeSet, false, false, outputDirectoryToBeSet, ruleSetToBeSet, sourceToBeSet, null );
+   }
+
+   public FlexPmdParameters( final String excludePackageToBeSet,
+                             final File outputDirectoryToBeSet,
+                             final File ruleSetToBeSet,
+                             final File sourceToBeSet,
+                             final List< File > sourceListToBeSet )
+   {
+      this( excludePackageToBeSet,
+            false,
+            false,
+            outputDirectoryToBeSet,
+            ruleSetToBeSet,
+            sourceToBeSet,
+            sourceListToBeSet );
+   }
+
+   public final String getExcludePackage()
+   {
+      return excludePackage;
+   }
+
+   public final File getOutputDirectory()
+   {
+      return outputDirectory;
+   }
+
+   public final File getRuleSet()
+   {
+      return ruleSet;
+   }
+
+   public final File getSource()
+   {
+      return source;
+   }
+
+   public List< File > getSourceList()
+   {
+      return sourceList;
+   }
+
+   public final boolean isFailOnError()
+   {
+      return failOnError;
+   }
+
+   public boolean isFailOnRuleViolation()
+   {
+      return failOnRuleViolation;
+   }
+}


[30/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestClassContent.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestClassContent.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestClassContent.java
new file mode 100644
index 0000000..79b767d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestClassContent.java
@@ -0,0 +1,307 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestClassContent extends AbstractAs3ParserTest
+{
+   @Test
+   public void testCommentInMethod() throws TokenException
+   {
+      assertClassContent( "",
+                          "public function log():void{/* comment */}",
+                          "<function line=\"2\"><mod-list line=\"2\"><mod "
+                                + "line=\"2\">public</mod></mod-list><name line=\"2\">log</name>"
+                                + "<parameter-list line=\"2\"></parameter-list><type line=\"2\">"
+                                + "void</type><block line=\"2\"><multi-line-comment line=\"2\">"
+                                + "/* comment */</multi-line-comment></block></function>" );
+
+      assertClassContent( "",
+                          new String[]
+                          { "{",
+                                      "public function log():void{// comment ",
+                                      "}",
+                                      "}",
+                                      "__END__" },
+                          "<function line=\"2\"><mod-list line=\"2\"><mod line=\"2\""
+                                + ">public</mod></mod-list><name line=\"2\">log</name>"
+                                + "<parameter-list line=\"2\"></parameter-list><type line=\"2\""
+                                + ">void</type><block line=\"2\"></block></function>" );
+   }
+
+   @Test
+   public void testConstDeclarations() throws TokenException
+   {
+      assertClassContent( "1",
+                          "const a",
+                          "<const-list line=\"2\"><mod-list line=\"2\">"
+                                + "</mod-list><name-type-init line=\"2\"><name line=\"2\">a"
+                                + "</name><type line=\"3\"></type></name-type-init></const-list>" );
+
+      assertClassContent( "2",
+                          "public const a",
+                          "<const-list line=\"2\"><mod-list line=\"2\">"
+                                + "<mod line=\"2\">public</mod></mod-list><name-type-init line=\"2\""
+                                + "><name line=\"2\">a</name><type line=\"3\">"
+                                + "</type></name-type-init></const-list>" );
+
+      assertClassContent( "3",
+                          "public static const a : int = 0",
+                          "<const-list line=\"2\"><mod-list line=\"2\">"
+                                + "<mod line=\"2\">public</mod><mod line=\"2\">"
+                                + "static</mod></mod-list><name-type-init line=\"2\"><name "
+                                + "line=\"2\">a</name><type line=\"2\">int</type>"
+                                + "<init line=\"2\"><primary line=\"2\">0</primary>"
+                                + "</init></name-type-init></const-list>" );
+
+      assertClassContent( "4",
+                          "[Bindable] const a",
+                          "<const-list line=\"2\"><meta-list line=\"2\">"
+                                + "<meta line=\"2\">Bindable</meta></meta-list><mod-list line=\"2\""
+                                + "></mod-list><name-type-init line=\"2\">"
+                                + "<name line=\"2\">a</name><type line=\"3\">"
+                                + "</type></name-type-init></const-list>" );
+   }
+
+   @Test
+   public void testFlexPMD211() throws TokenException
+   {
+      assertClassContent( "",
+                          "private function foo(sf:int):void{"
+                                + "var a:Vector.<String> = new Vector.<String>()}",
+                          "<function line=\"2\"><mod-list line=\"2\"><mod line=\"2\">private</mod>"
+                                + "</mod-list><name line=\"2\">foo</name><parameter-list line=\"2\">"
+                                + "<parameter line=\"2\"><name-type-init line=\"2\"><name line=\"2\">sf</name>"
+                                + "<type line=\"2\">int</type></name-type-init></parameter></parameter-list>"
+                                + "<type line=\"2\">void</type><block line=\"2\"><var-list line=\"2\">"
+                                + "<name-type-init line=\"2\"><name line=\"2\">a</name><vector line=\"2\">"
+                                + "<type line=\"2\">String</type></vector><init line=\"2\"><new line=\"2\">"
+                                + "<primary line=\"2\">Vector</primary><vector line=\"2\"><vector line=\"2\">"
+                                + "<type line=\"2\">String</type></vector></vector><arguments line=\"2\">"
+                                + "</arguments></new></init></name-type-init></var-list></block></function>" );
+      assertClassContent( "",
+                          "private function foo(sf:int):void{"
+                                + "var a:Vector.<String> = new Vector.<String>();}",
+                          "<function line=\"2\"><mod-list line=\"2\"><mod line=\"2\">private</mod></mod-list>"
+                                + "<name line=\"2\">foo</name><parameter-list line=\"2\"><parameter line=\"2\">"
+                                + "<name-type-init line=\"2\"><name line=\"2\">sf</name><type line=\"2\">int</type>"
+                                + "</name-type-init></parameter></parameter-list><type line=\"2\">void</type>"
+                                + "<block line=\"2\"><var-list line=\"2\"><name-type-init line=\"2\">"
+                                + "<name line=\"2\">a</name><vector line=\"2\"><type line=\"2\">String</type>"
+                                + "</vector><init line=\"2\"><new line=\"2\"><primary line=\"2\">Vector</primary>"
+                                + "<vector line=\"2\"><vector line=\"2\"><type line=\"2\">String</type></vector>"
+                                + "</vector><arguments line=\"2\"></arguments></new></init></name-type-init>"
+                                + "</var-list></block></function>" );
+   }
+
+   @Test
+   public void testImports() throws TokenException
+   {
+      assertClassContent( "1",
+                          "import a.b.c;",
+                          "<import line=\"2\">a.b.c</import>" );
+      assertClassContent( "2",
+                          "import a.b.c import x.y.z",
+                          "<import line=\"2\">a.b.c</import>"
+                                + "<import line=\"2\">x.y.z</import>" );
+   }
+
+   @Test
+   public void testMethods() throws TokenException
+   {
+      assertClassContent( "1",
+                          "function a(){}",
+                          "<function line=\"2\"><mod-list line=\"2\">"
+                                + "</mod-list><name line=\"2\">a</name><parameter-list line=\"2\""
+                                + "></parameter-list><type line=\"2\"></type><block "
+                                + "line=\"2\"></block></function>" );
+
+      assertClassContent( "2",
+                          "function set a( value : int ) : void {}",
+                          "<set line=\"2\"><mod-list line=\"2\">"
+                                + "</mod-list><name line=\"2\">a</name>"
+                                + "<parameter-list line=\"2\"><parameter line=\"2\">"
+                                + "<name-type-init line=\"2\"><name line=\"2\">value"
+                                + "</name><type line=\"2\">int</type></name-type-init></parameter>"
+                                + "</parameter-list><type line=\"2\">void</type><block line=\"2\""
+                                + "></block></set>" );
+
+      assertClassContent( "3",
+                          "function get a() : int {}",
+                          "<get line=\"2\"><mod-list line=\"2\">"
+                                + "</mod-list><name line=\"2\">a</name><parameter-list line=\"2\""
+                                + "></parameter-list><type line=\"2\">int"
+                                + "</type><block line=\"2\"></block></get>" );
+
+      assertClassContent( "function with default parameter",
+                          "public function newLine ( height:*='' ):void{}",
+                          "<function line=\"2\"><mod-list line=\"2\"><mod line=\"2\""
+                                + ">public</mod></mod-list><name line=\"2\">newLine"
+                                + "</name><parameter-list line=\"2\"><parameter line=\"2\""
+                                + "><name-type-init line=\"2\"><name line=\"2\""
+                                + ">height</name><type line=\"2\">*</type>"
+                                + "<init line=\"2\"><primary line=\"2\">''"
+                                + "</primary></init></name-type-init></parameter></parameter-list>"
+                                + "<type line=\"2\">void</type><block line=\"2\">" + "</block></function>" );
+   }
+
+   @Test
+   public void testMethodsWithAsDoc() throws TokenException
+   {
+      scn.setLines( new String[]
+      { "{",
+                  "/** AsDoc */public function a(){}",
+                  "}",
+                  "__END__" } );
+      asp.nextToken(); // first call
+      asp.nextToken(); // skip {
+
+      assertEquals( "<content line=\"2\"><function line=\"2\">"
+                          + "<as-doc line=\"2\">/** AsDoc */</as-doc><mod-list "
+                          + "line=\"2\"><mod line=\"2\">public</mod>"
+                          + "</mod-list><name line=\"2\">a</name><parameter-list "
+                          + "line=\"2\"></parameter-list><type line=\"2\">"
+                          + "</type><block line=\"2\"></block></function></content>",
+                    new ASTToXMLConverter().convert( asp.parseClassContent() ) );
+   }
+
+   @Test
+   public void testMethodsWithMultiLineComments() throws TokenException
+   {
+      scn.setLines( new String[]
+      { "{",
+                  "/* Commented */public function a(){}",
+                  "}",
+                  "__END__" } );
+      asp.nextToken(); // first call
+      asp.nextToken(); // skip {
+
+      assertEquals( "<content line=\"2\"><multi-line-comment line=\"2\">"
+                          + "/* Commented */</multi-line-comment><function line=\"2\">"
+                          + "<mod-list line=\"2\"><mod line=\"2\">public"
+                          + "</mod></mod-list><name line=\"2\">a</name><parameter-list "
+                          + "line=\"2\"></parameter-list><type line=\"2\">"
+                          + "</type><block line=\"2\"></block></function></content>",
+                    new ASTToXMLConverter().convert( asp.parseClassContent() ) );
+   }
+
+   @Test
+   public void testMethodWithMetadataComment() throws TokenException
+   {
+      scn.setLines( new String[]
+      { "{",
+                  "/* Comment */ [Bindable] public function a () : void { }",
+                  "}",
+                  "__END__" } );
+      asp.nextToken(); // first call
+      asp.nextToken(); // skip {
+
+      assertEquals( "1",
+                    "<content line=\"2\"><multi-line-comment line=\"2\">"
+                          + "/* Comment */</multi-line-comment><function line=\"2\">"
+                          + "<meta-list line=\"2\"><meta line=\"2\">Bindable"
+                          + "</meta></meta-list><mod-list line=\"2\"><mod line=\"2\""
+                          + ">public</mod></mod-list><name line=\"2\">a</name>"
+                          + "<parameter-list line=\"2\"></parameter-list><type line=\"2\""
+                          + ">void</type><block line=\"2\"></block></function>" + "</content>",
+                    new ASTToXMLConverter().convert( asp.parseClassContent() ) );
+   }
+
+   @Test
+   public void testRestParameter() throws TokenException
+   {
+      assertClassContent( "",
+                          "public function log(message:String, ... rest):void{}",
+                          "<function line=\"2\"><mod-list line=\"2\">"
+                                + "<mod line=\"2\">public</mod></mod-list><name line=\"2\">"
+                                + "log</name><parameter-list line=\"2\">"
+                                + "<parameter line=\"2\"><name-type-init line=\"2\">"
+                                + "<name line=\"2\">message</name><type line=\"2\">String"
+                                + "</type></name-type-init></parameter><parameter line=\"2\">"
+                                + "<rest line=\"2\">rest</rest></parameter></parameter-list>"
+                                + "<type line=\"2\">void</type><block line=\"2\">" + "</block></function>" );
+   }
+
+   @Test
+   public void testVarDeclarations() throws TokenException
+   {
+      assertClassContent( "1",
+                          "var a",
+                          "<var-list line=\"2\"><mod-list line=\"2\">"
+                                + "</mod-list><name-type-init line=\"2\"><name line=\"2\">a"
+                                + "</name><type line=\"3\"></type></name-type-init></var-list>" );
+
+      assertClassContent( "2",
+                          "public var a;",
+                          "<var-list line=\"2\"><mod-list line=\"2\">"
+                                + "<mod line=\"2\">public</mod></mod-list><name-type-init line=\"2\""
+                                + "><name line=\"2\">a</name><type line=\"2\""
+                                + "></type></name-type-init></var-list>" );
+
+      assertClassContent( "3",
+                          "public static var a : int = 0",
+                          "<var-list line=\"2\"><mod-list line=\"2\">"
+                                + "<mod line=\"2\">public</mod><mod line=\"2\">"
+                                + "static</mod></mod-list><name-type-init line=\"2\">"
+                                + "<name line=\"2\">a</name><type line=\"2\">int</type>"
+                                + "<init line=\"2\"><primary line=\"2\">0</primary>"
+                                + "</init></name-type-init></var-list>" );
+
+      assertClassContent( "4",
+                          "[Bindable] var a",
+                          "<var-list line=\"2\"><meta-list line=\"2\">"
+                                + "<meta line=\"2\">Bindable</meta></meta-list>"
+                                + "<mod-list line=\"2\"></mod-list>" + "<name-type-init line=\"2\">"
+                                + "<name line=\"2\">a</name><type line=\"3\">"
+                                + "</type></name-type-init></var-list>" );
+   }
+
+   private void assertClassContent( final String message,
+                                    final String input,
+                                    final String expected ) throws TokenException
+   {
+      scn.setLines( new String[]
+      { "{",
+                  input,
+                  "}",
+                  "__END__" } );
+      asp.nextToken(); // first call
+      asp.nextToken(); // skip {
+      final String result = new ASTToXMLConverter().convert( asp.parseClassContent() );
+      assertEquals( message,
+                    "<content line=\"2\">"
+                          + expected + "</content>",
+                    result );
+   }
+
+   private void assertClassContent( final String message,
+                                    final String[] input,
+                                    final String expected ) throws TokenException
+   {
+      scn.setLines( input );
+      asp.nextToken(); // first call
+      asp.nextToken(); // skip {
+      final String result = new ASTToXMLConverter().convert( asp.parseClassContent() );
+      assertEquals( message,
+                    "<content line=\"2\">"
+                          + expected + "</content>",
+                    result );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestCompilationUnit.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestCompilationUnit.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestCompilationUnit.java
new file mode 100644
index 0000000..820dfc7
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestCompilationUnit.java
@@ -0,0 +1,90 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestCompilationUnit extends AbstractAs3ParserTest
+{
+   @Test
+   public void testEmptyPackage() throws TokenException
+   {
+      assertCompilationUnit( "1",
+                             "package a { } ",
+                             "<compilation-unit line=\"-1\">"
+                                   + "<package line=\"1\">" + "<name line=\"1\">a"
+                                   + "</name><content line=\"1\">"
+                                   + "</content></package><content line=\"2\">"
+                                   + "</content></compilation-unit>" );
+   }
+
+   @Test
+   public void testEmptyPackagePlusLocalClass() throws TokenException
+   {
+      assertCompilationUnit( "1",
+                             "package a { } class Local { }",
+                             "<compilation-unit line=\"-1\"><package line=\"1\">"
+                                   + "<name line=\"1\">a</name><content line=\"1\">"
+                                   + "</content></package><content line=\"1\"><class line=\"1\""
+                                   + "><name line=\"1\">Local</name>"
+                                   + "<mod-list line=\"1\"></mod-list><content line=\"1\">"
+                                   + "</content></class></content></compilation-unit>" );
+   }
+
+   @Test
+   public void testPackageWithClass() throws TokenException
+   {
+      assertCompilationUnit( "1",
+                             "package a { public class B { } } ",
+                             "<compilation-unit line=\"-1\"><package line=\"1\">"
+                                   + "<name line=\"1\">a</name><content line=\"1\">"
+                                   + "<class line=\"1\"><name line=\"1\">B</name>"
+                                   + "<mod-list line=\"1\"><mod line=\"1\">public"
+                                   + "</mod></mod-list><content line=\"1\"></content>"
+                                   + "</class></content></package><content line=\"2\">"
+                                   + "</content></compilation-unit>" );
+   }
+
+   @Test
+   public void testPackageWithInterface() throws TokenException
+   {
+      assertCompilationUnit( "1",
+                             "package a { public interface B { } } ",
+                             "<compilation-unit line=\"-1\"><package line=\"1\">"
+                                   + "<name line=\"1\">a</name><content line=\"1\">"
+                                   + "<interface line=\"1\"><name line=\"1\">B</name>"
+                                   + "<mod-list line=\"1\"><mod line=\"1\">public</mod>"
+                                   + "</mod-list><content line=\"1\"></content></interface>"
+                                   + "</content></package><content line=\"2\"></content>"
+                                   + "</compilation-unit>" );
+   }
+
+   private void assertCompilationUnit( final String message,
+                                       final String input,
+                                       final String expected ) throws TokenException
+   {
+      scn.setLines( new String[]
+      { input,
+                  "__END__" } );
+      final String result = new ASTToXMLConverter().convert( asp.parseCompilationUnit() );
+      assertEquals( message,
+                    expected,
+                    result );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestConstStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestConstStatement.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestConstStatement.java
new file mode 100644
index 0000000..ccfb640
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestConstStatement.java
@@ -0,0 +1,67 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestConstStatement extends AbstractStatementTest
+{
+   @Test
+   public void testFullFeaturedConst() throws TokenException
+   {
+      assertStatement( "1",
+                       "const a : int = 4",
+                       "<const-list line=\"1\">"
+                             + "<name-type-init line=\"1\">"
+                             + "<name line=\"1\">a</name><type line=\"1\">int</type>"
+                             + "<init line=\"1\"><primary line=\"1\">4</primary>"
+                             + "</init></name-type-init></const-list>" );
+   }
+
+   @Test
+   public void testInitializedConst() throws TokenException
+   {
+      assertStatement( "1",
+                       "const a = 4",
+                       "<const-list line=\"1\"><name-type-init line=\"1\">"
+                             + "<name line=\"1\">a</name><type line=\"1\">"
+                             + "</type><init line=\"1\"><primary line=\"1\">4"
+                             + "</primary></init></name-type-init></const-list>" );
+   }
+
+   @Test
+   public void testSimpleConst() throws TokenException
+   {
+      assertStatement( "1",
+                       "const a",
+                       "<const-list line=\"1\"><name-type-init line=\"1\">"
+                             + "<name line=\"1\">a</name><type line=\"2\">"
+                             + "</type></name-type-init></const-list>" );
+   }
+
+   @Test
+   public void testTypedConst() throws TokenException
+   {
+      assertStatement( "1",
+                       "const a : Object",
+                       "<const-list line=\"1\"><name-type-init line=\"1\">"
+                             + "<name line=\"1\">a</name><type line=\"1\">Object</type>"
+                             + "</name-type-init></const-list>" );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestDoStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestDoStatement.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestDoStatement.java
new file mode 100644
index 0000000..a66d2dd
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestDoStatement.java
@@ -0,0 +1,61 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestDoStatement extends AbstractStatementTest
+{
+   @Test
+   public void testDo() throws TokenException
+   {
+      assertStatement( "1",
+                       "do{ trace( i ); } while( i++ );",
+                       "<do line=\"1\"><block line=\"1\">"
+                             + "<call line=\"1\"><primary line=\"1\">"
+                             + "trace</primary><arguments line=\"1\">"
+                             + "<primary line=\"1\">i</primary></arguments>"
+                             + "</call></block><condition line=\"1\">"
+                             + "<post-inc line=\"1\"><primary line=\"1\">"
+                             + "i</primary></post-inc></condition></do>" );
+   }
+
+   @Test
+   public void testDoWithEmptyStatement() throws TokenException
+   {
+      assertStatement( "1",
+                       "do ; while( i++ ); ",
+                       "<do line=\"1\"><stmt-empty line=\"1\">;</stmt-empty>"
+                             + "<condition line=\"1\"><post-inc line=\"1\">"
+                             + "<primary line=\"1\">i</primary></post-inc></condition></do>" );
+   }
+
+   @Test
+   public void testDoWithoutBlock() throws TokenException
+   {
+      assertStatement( "1",
+                       "do trace( i ); while( i++ ); ",
+                       "<do line=\"1\"><call line=\"1\">"
+                             + "<primary line=\"1\">trace</primary><arguments line=\"1\""
+                             + "><primary line=\"1\">i</primary>"
+                             + "</arguments></call><condition line=\"1\">"
+                             + "<post-inc line=\"1\"><primary line=\"1\""
+                             + ">i</primary></post-inc></condition></do>" );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestE4xExpression.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestE4xExpression.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestE4xExpression.java
new file mode 100644
index 0000000..7d6f874
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestE4xExpression.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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestE4xExpression extends AbstractStatementTest
+{
+   @Test
+   public void testE4xFilter() throws TokenException
+   {
+      assertStatement( "",
+                       "myXml.(lala=\"lala\")",
+                       "<e4x-filter line=\"1\"><primary line=\"1\">myXml"
+                             + "</primary><assign line=\"1\"><primary line=\"1\">"
+                             + "lala</primary><op line=\"1\">=</op><primary line=\"1\">"
+                             + "\"lala\"</primary></assign></e4x-filter>" );
+
+      assertStatement( "",
+                       "doc.*.worm[1]",
+                       "<mul line=\"1\"><e4x-star line=\"1\"><primary line=\"1\""
+                             + ">doc</primary></e4x-star><op line=\"1\">*</op><primary "
+                             + "line=\"1\">.</primary></mul>" );
+
+      assertStatement( "",
+                       "doc.@worm",
+                       "<dot line=\"1\"><primary line=\"1\">doc</primary><primary "
+                             + "line=\"1\">@worm</primary></dot>" );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestEmptyStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestEmptyStatement.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestEmptyStatement.java
new file mode 100644
index 0000000..6133b33
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestEmptyStatement.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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestEmptyStatement extends AbstractStatementTest
+{
+   @Test
+   public void testComplex() throws TokenException
+   {
+      assertStatement( "1",
+                       "{;1;;}",
+                       "<block line=\"1\"><stmt-empty line=\"1\">;"
+                             + "</stmt-empty><primary line=\"1\">1"
+                             + "</primary><stmt-empty line=\"1\">;</stmt-empty></block>" );
+   }
+
+   @Test
+   public void testSimple() throws TokenException
+   {
+      assertStatement( "1",
+                       ";",
+                       "<stmt-empty line=\"1\">;</stmt-empty>" );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestExpression.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestExpression.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestExpression.java
new file mode 100644
index 0000000..16308c9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestExpression.java
@@ -0,0 +1,204 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestExpression extends AbstractStatementTest
+{
+   @Test
+   public void testAddExpression() throws TokenException
+   {
+      assertStatement( "1",
+                       "5+6",
+                       "<add line=\"1\"><primary line=\"1\""
+                             + ">5</primary><op line=\"1\">+</op>" + "<primary line=\"1\">6</primary></add>" );
+   }
+
+   @Test
+   public void testAndExpression() throws TokenException
+   {
+      assertStatement( "1",
+                       "5&&6",
+                       "<and line=\"1\"><primary line=\"1\">5</primary>"
+                             + "<op line=\"1\">&&</op>" + "<primary line=\"1\">6</primary></and>" );
+   }
+
+   @Test
+   public void testAssignmentExpression() throws TokenException
+   {
+      assertStatement( "1",
+                       "x+=6",
+                       "<assign line=\"1\"><primary line=\"1\">x"
+                             + "</primary><op line=\"1\">+=</op><primary line=\"1\""
+                             + ">6</primary></assign>" );
+   }
+
+   @Test
+   public void testBitwiseAndExpression() throws TokenException
+   {
+      assertStatement( "1",
+                       "5&6",
+                       "<b-and line=\"1\"><primary line=\"1\">5"
+                             + "</primary><op line=\"1\">&</op><primary line=\"1\">6</primary></b-and>" );
+   }
+
+   @Test
+   public void testBitwiseOrExpression() throws TokenException
+   {
+      assertStatement( "1",
+                       "5|6",
+                       "<b-or line=\"1\"><primary line=\"1\">5"
+                             + "</primary><op line=\"1\">|</op><primary line=\"1\">6</primary></b-or>" );
+   }
+
+   @Test
+   public void testBitwiseXorExpression() throws TokenException
+   {
+      assertStatement( "1",
+                       "5^6",
+                       "<b-xor line=\"1\"><primary line=\"1\">5"
+                             + "</primary><op line=\"1\">^</op><primary line=\"1\">6</primary></b-xor>" );
+   }
+
+   @Test
+   public void testConditionalExpression() throws TokenException
+   {
+      assertStatement( "1",
+                       "true?5:6",
+                       "<conditional line=\"1\"><primary line=\"1\">"
+                             + "true</primary><primary line=\"1\">5" + "</primary><primary line=\"1\">6"
+                             + "</primary></conditional>" );
+   }
+
+   @Test
+   public void testDivision() throws TokenException
+   {
+      assertStatement( "",
+                       "offset = ( this[ axis.unscaled ] / 2 - ( rightPos ) / 2 );",
+                       "<assign line=\"1\"><primary line=\"1\">offset</primary><op line=\"1\">=</op>"
+                             + "<primary line=\"1\"><encapsulated line=\"1\"><add line=\"1\"><mul line=\"1\">"
+                             + "<arr-acc line=\"1\"><primary line=\"1\">this</primary><dot line=\"1\"><primary "
+                             + "line=\"1\">axis</primary><primary line=\"1\">unscaled</primary></dot></arr-acc>"
+                             + "<op line=\"1\">/</op><primary line=\"1\">2</primary></mul><op line=\"1\">-</op>"
+                             + "<mul line=\"1\"><primary line=\"1\"><encapsulated line=\"1\"><primary line=\"1\">"
+                             + "rightPos</primary></encapsulated></primary><op line=\"1\">/</op><primary line=\"1\">"
+                             + "2</primary></mul></add></encapsulated></primary></assign>" );
+   }
+
+   @Test
+   public void testEncapsulated() throws TokenException
+   {
+      assertStatement( "",
+                       "(dataProvider as ArrayCollection) = null",
+                       "<assign line=\"1\"><primary line=\"1\">"
+                             + "<encapsulated line=\"1\"><relation line=\"1\">"
+                             + "<primary line=\"1\">dataProvider</primary>"
+                             + "<as line=\"1\">as</as><primary line=\"1\">"
+                             + "ArrayCollection</primary></relation></encapsulated></primary>"
+                             + "<op line=\"1\">=</op><primary line=\"1\">" + "null</primary></assign>" );
+   }
+
+   @Test
+   public void testEqualityExpression() throws TokenException
+   {
+      assertStatement( "1",
+                       "5!==6",
+                       "<equality line=\"1\"><primary line=\"1\">5"
+                             + "</primary><op line=\"1\">!==</op><primary line=\"1\">6</primary></equality>" );
+   }
+
+   @Test
+   public void testExpressionList() throws TokenException
+   {
+      assertStatement( "1",
+                       "5&&6,5&&9",
+                       "<expr-list line=\"1\"><and line=\"1\">"
+                             + "<primary line=\"1\">5</primary><op line=\"1\">"
+                             + "&&</op><primary line=\"1\">6</primary></and><and line=\"1\""
+                             + "><primary line=\"1\">5</primary><op line=\"1\""
+                             + ">&&</op><primary line=\"1\">9</primary></and></expr-list>" );
+   }
+
+   @Test
+   public void testInstanceOf() throws TokenException
+   {
+      assertStatement( "bug237",
+                       "if (a instanceof b){}",
+                       "<if line=\"1\"><condition line=\"1\"><relation line=\"1\"><primary "
+                             + "line=\"1\">a</primary><op line=\"1\">instanceof</op><primary line=\"1\">"
+                             + "b</primary></relation></condition><block line=\"1\"></block></if>" );
+   }
+
+   @Test
+   public void testMulExpression() throws TokenException
+   {
+      assertStatement( "1",
+                       "5/6",
+                       "<mul line=\"1\"><primary line=\"1\">5"
+                             + "</primary><op line=\"1\">/</op><primary line=\"1\">6</primary></mul>" );
+   }
+
+   @Test
+   public void testNewExpression() throws TokenException
+   {
+      assertStatement( "",
+                       "new Event()",
+                       "<new line=\"1\"><call line=\"1\">"
+                             + "<primary line=\"1\">Event</primary>"
+                             + "<arguments line=\"1\"></arguments></call></new>" );
+
+      assertStatement( "",
+                       "new Event(\"lala\")",
+                       "<new line=\"1\"><call line=\"1\">"
+                             + "<primary line=\"1\">Event</primary>"
+                             + "<arguments line=\"1\"><primary line=\"1\">"
+                             + "\"lala\"</primary></arguments></call></new>" );
+
+   }
+
+   @Test
+   public void testOrExpression() throws TokenException
+   {
+      assertStatement( "1",
+                       "5||6",
+                       "<or line=\"1\"><primary line=\"1\">5"
+                             + "</primary><op line=\"1\">||</op><primary line=\"1\">6</primary></or>" );
+   }
+
+   @Test
+   public void testRelationalExpression() throws TokenException
+   {
+      assertStatement( "1",
+                       "5<=6",
+                       "<relation line=\"1\"><primary line=\"1\">5"
+                             + "</primary><op line=\"1\">&lt;=</op><primary line=\"1\""
+                             + ">6</primary></relation>" );
+   }
+
+   @Test
+   public void testShiftExpression() throws TokenException
+   {
+      assertStatement( "1",
+                       "5<<6",
+                       "<shift line=\"1\"><primary line=\"1\">5"
+                             + "</primary><op line=\"1\">&lt;&lt;</op><primary line=\"1\""
+                             + ">6</primary></shift>" );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestForStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestForStatement.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestForStatement.java
new file mode 100644
index 0000000..afafbf2
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestForStatement.java
@@ -0,0 +1,101 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestForStatement extends AbstractStatementTest
+{
+   @Test
+   public void testSimpleFor() throws TokenException
+   {
+      assertStatement( "1",
+                       "for( var i : int = 0; i < length; i++ ){ trace( i ); }",
+                       "<for line=\"1\"><init line=\"1\">"
+                             + "<var-list line=\"1\"><name-type-init line=\"1\""
+                             + "><name line=\"1\">i</name><type line=\"1\">int</type><init line=\"1\">"
+                             + "<primary line=\"1\">0</primary></init>"
+                             + "</name-type-init></var-list></init>"
+                             + "<cond line=\"1\"><relation line=\"1\">"
+                             + "<primary line=\"1\">i</primary><op line=\"1\""
+                             + ">&lt;</op><primary line=\"1\">length"
+                             + "</primary></relation></cond><iter line=\"1\">"
+                             + "<post-inc line=\"1\"><primary line=\"1\">i"
+                             + "</primary></post-inc></iter><block line=\"1\"><call line=\"1\""
+                             + "><primary line=\"1\">trace"
+                             + "</primary><arguments line=\"1\"><primary line=\"1\">i"
+                             + "</primary></arguments></call></block></for>" );
+
+      assertStatement( "",
+                       "        for (i = 0; i < n; i++)",
+                       "<for line=\"1\"><init line=\"1\">"
+                             + "<assign line=\"1\"><primary line=\"1\">i</primary><op line=\"1\">=</op>"
+                             + "<primary line=\"1\">0</primary></assign></init>"
+                             + "<cond line=\"1\"><relation line=\"1\"><primary line=\"1\">i</primary>"
+                             + "<op line=\"1\">&lt;</op><primary line=\"1\">n"
+                             + "</primary></relation></cond><iter line=\"1\">"
+                             + "<post-inc line=\"1\"><primary line=\"1\">i"
+                             + "</primary></post-inc></iter><primary line=\"2\">__END__</primary></for>" );
+   }
+
+   @Test
+   public void testSimpleForEach() throws TokenException
+   {
+      assertStatement( "1",
+                       "for each( var obj : Object in list ){ obj.print( i ); }",
+                       "<foreach line=\"1\"><var line=\"1\">"
+                             + "<name-type-init line=\"1\"><name line=\"1\""
+                             + ">obj</name><type line=\"1\">Object"
+                             + "</type></name-type-init></var><in line=\"1\">"
+                             + "<primary line=\"1\">list</primary></in>"
+                             + "<block line=\"1\"><dot line=\"1\">"
+                             + "<primary line=\"1\">obj</primary><call line=\"1\""
+                             + "><primary line=\"1\">print</primary>"
+                             + "<arguments line=\"1\"><primary line=\"1\">"
+                             + "i</primary></arguments></call></dot></block></foreach>" );
+
+      assertStatement( "1",
+                       "for each( obj in list ){}",
+                       "<foreach line=\"1\"><name line=\"1\">obj</name>"
+                             + "<in line=\"1\"><primary line=\"1\">list</primary>"
+                             + "</in><block line=\"1\"></block></foreach>" );
+
+      // assertStatement(
+      // "", "for each (var a:XML in classInfo..accessor) {}", "" );
+   }
+
+   @Test
+   public void testSimpleForIn() throws TokenException
+   {
+      assertStatement( "1",
+                       "for( var s : String in obj ){ trace( s, obj[ s ]); }",
+                       "<forin line=\"1\"><init line=\"1\">"
+                             + "<var-list line=\"1\"><name-type-init line=\"1\""
+                             + "><name line=\"1\">s</name>"
+                             + "<type line=\"1\">String</type></name-type-init>"
+                             + "</var-list></init><in line=\"1\"><primary line=\"1\""
+                             + ">obj</primary></in></forin>" );
+
+      assertStatement( "for in",
+                       "            for (p in events);",
+                       "<forin line=\"1\"><init line=\"1\">"
+                             + "<primary line=\"1\">p</primary></init><in line=\"1\""
+                             + "><primary line=\"1\">events</primary></in></forin>" );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestIfStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestIfStatement.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestIfStatement.java
new file mode 100644
index 0000000..aecc7c2
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestIfStatement.java
@@ -0,0 +1,136 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestIfStatement extends AbstractStatementTest
+{
+   @Test
+   public void testBug232() throws TokenException
+   {
+      assertStatement( "",
+                       "if (true || /* comment */!false) ) )",
+                       "<if line=\"1\"><condition line=\"1\"><or line=\"1\"><primary line=\"1\">"
+                             + "true</primary><op line=\"1\">||</op><not line=\"1\"><primary "
+                             + "line=\"1\">false</primary></not></or></condition><primary "
+                             + "line=\"1\">)</primary></if>" );
+   }
+
+   @Test
+   public void testIf() throws TokenException
+   {
+      assertStatement( "1",
+                       "if( true ){ trace( true ); }",
+                       "<if line=\"1\">"
+                             + "<condition line=\"1\">" + "<primary line=\"1\">true</primary></condition>"
+                             + "<block line=\"1\"><call line=\"1\">" + "<primary line=\"1\">trace"
+                             + "</primary><arguments line=\"1\">" + "<primary line=\"1\">true</primary>"
+                             + "</arguments></call></block></if>" );
+
+      assertStatement( "1",
+                       "if( \"i\" in oaderContext ){ }",
+                       "<if line=\"1\"><condition line=\"1\">"
+                             + "<relation line=\"1\"><primary line=\"1\">"
+                             + "\"i\"</primary><op line=\"1\">in</op>"
+                             + "<primary line=\"1\">oaderContext</primary>"
+                             + "</relation></condition><block line=\"1\"></block></if>" );
+
+      assertStatement( "internal",
+                       "if (col.mx_internal::contentSize) {col.mx_internal::_width = NaN;}",
+                       "<if line=\"1\"><condition line=\"1\">"
+                             + "<dot line=\"1\"><primary line=\"1\">col"
+                             + "</primary><dot line=\"1\"><primary line=\"1\">"
+                             + "mx_internal</primary><primary line=\"1\">contentSize"
+                             + "</primary></dot></dot></condition><block line=\"1\">"
+                             + "<dot line=\"1\"><primary line=\"1\">col"
+                             + "</primary><dot line=\"1\"><primary line=\"1\">"
+                             + "mx_internal</primary><assign line=\"1\">"
+                             + "<primary line=\"1\">_width</primary>"
+                             + "<op line=\"1\">=</op><primary line=\"1\">"
+                             + "NaN</primary></assign></dot></dot></block></if>" );
+   }
+
+   @Test
+   public void testIfElse() throws TokenException
+   {
+      assertStatement( "1",
+                       "if( true ){ trace( true ); } else { trace( false )}",
+                       "<if line=\"1\"><condition line=\"1\">"
+                             + "<primary line=\"1\">true" + "</primary></condition><block line=\"1\">"
+                             + "<call line=\"1\"><primary line=\"1\">trace"
+                             + "</primary><arguments line=\"1\">"
+                             + "<primary line=\"1\">true</primary></arguments>"
+                             + "</call></block><block line=\"1\">" + "<call line=\"1\">"
+                             + "<primary line=\"1\">trace</primary>" + "<arguments line=\"1\">"
+                             + "<primary line=\"1\">false</primary>" + "</arguments></call></block></if>" );
+   }
+
+   @Test
+   public void testIfWithArrayAccessor() throws TokenException
+   {
+      assertStatement( "",
+                       "if ( chart.getItemAt( 0 )[ xField ] > targetXFieldValue ){}",
+                       "<if line=\"1\"><condition line=\"1\"><dot line=\"1\""
+                             + "><primary line=\"1\">chart</primary><relation line=\"1\""
+                             + "><call line=\"1\"><primary line=\"1\""
+                             + ">getItemAt</primary><arguments line=\"1\"" + "><primary line=\"1\""
+                             + ">0</primary></arguments><array line=\"1\"" + "><primary line=\"1\""
+                             + ">xField</primary></array></call><op line=\"1\"" + ">&gt;</op><primary "
+                             + "line=\"1\">targetXFieldValue</primary>"
+                             + "</relation></dot></condition><block line=\"1\"" + "></block></if>" );
+   }
+
+   @Test
+   public void testIfWithEmptyStatement() throws TokenException
+   {
+      assertStatement( "1",
+                       "if( i++ ); ",
+                       "<if line=\"1\"><condition line=\"1\">"
+                             + "<post-inc line=\"1\"><primary line=\"1\">"
+                             + "i</primary></post-inc></condition><stmt-empty line=\"1\">;"
+                             + "</stmt-empty></if>" );
+   }
+
+   @Test
+   public void testIfWithoutBlock() throws TokenException
+   {
+      assertStatement( "1",
+                       "if( i++ ) trace( i ); ",
+                       "<if line=\"1\"><condition line=\"1\">"
+                             + "<post-inc line=\"1\"><primary line=\"1\">i"
+                             + "</primary></post-inc></condition><call line=\"1\">"
+                             + "<primary line=\"1\">trace</primary><arguments line=\"1\""
+                             + "><primary line=\"1\">i</primary>" + "</arguments></call></if>" );
+   }
+
+   @Test
+   public void testIfWithReturn() throws TokenException
+   {
+      assertStatement( "",
+                       "if ( true )return;",
+                       "<if line=\"1\"><condition line=\"1\"><primary line=\"1\""
+                             + ">true</primary></condition><return line=\"2\"" + "></return></if>" );
+
+      assertStatement( "",
+                       "if ( true )throw new Error();",
+                       "<if line=\"1\"><condition line=\"1\"><primary line=\"1\""
+                             + ">true</primary></condition><primary line=\"1\">" + "throw</primary></if>" );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestInterface.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestInterface.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestInterface.java
new file mode 100644
index 0000000..6cc46ae
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestInterface.java
@@ -0,0 +1,76 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestInterface extends AbstractAs3ParserTest
+{
+   @Test
+   public void testExtends() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "public interface A extends B { } ",
+                            "<content line=\"2\"><interface line=\"2\">"
+                                  + "<name line=\"2\">A</name><mod-list line=\"2\">"
+                                  + "<mod line=\"2\">public</mod>"
+                                  + "</mod-list><extends line=\"2\">B</extends>"
+                                  + "<content line=\"2\"></content></interface></content>" );
+
+      assertPackageContent( "",
+                            "   public interface ITimelineEntryRenderer extends IFlexDisplayObject, IDataRenderer{}",
+                            "<content line=\"2\"><interface line=\"2\"><name line=\"2\""
+                                  + ">ITimelineEntryRenderer</name><mod-list line=\"2\">"
+                                  + "<mod line=\"2\">public</mod></mod-list><extends line=\"2\""
+                                  + ">IFlexDisplayObject</extends><extends line=\"2\">"
+                                  + "IDataRenderer</extends><content line=\"2\">"
+                                  + "</content></interface></content>" );
+   }
+
+   @Test
+   public void testInclude() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "public interface A extends B { include \"ITextFieldInterface.asz\" } ",
+                            "<content line=\"2\"><interface line=\"2\">"
+                                  + "<name line=\"2\">A</name><mod-list line=\"2\">"
+                                  + "<mod line=\"2\">public</mod></mod-list>" + "<extends line=\"2\">"
+                                  + "B</extends><content line=\"2\"><include line=\"2\">"
+                                  + "<primary line=\"2\">\"ITextFieldInterface.asz\"</primary>"
+                                  + "</include></content></interface></content>" );
+   }
+
+   private void assertPackageContent( final String message,
+                                      final String input,
+                                      final String expected ) throws TokenException
+   {
+      scn.setLines( new String[]
+      { "{",
+                  input,
+                  "}",
+                  "__END__" } );
+      asp.nextToken(); // first call
+      asp.nextToken(); // skip {
+      final String result = new ASTToXMLConverter().convert( asp.parsePackageContent() );
+      assertEquals( message,
+                    expected,
+                    result );
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestInterfaceContent.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestInterfaceContent.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestInterfaceContent.java
new file mode 100644
index 0000000..9c4508e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestInterfaceContent.java
@@ -0,0 +1,96 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestInterfaceContent extends AbstractAs3ParserTest
+{
+   @Test(timeout = 2)
+   public void testConditionalCompilation() throws TokenException
+   {
+      assertInterfaceContent( "with conditional compilation",
+
+                              "CONFIG::DEBUG { function output():String; } ",
+                              "<function line=\"2\"><name line=\"2\">"
+                                    + "output</name><parameter-list line=\"2\"></parameter-list>"
+                                    + "<type line=\"2\">String</type></function>" );
+
+   }
+
+   @Test
+   public void testImports() throws TokenException
+   {
+      assertInterfaceContent( "1",
+                              "import a.b.c;",
+                              "<import line=\"2\">a.b.c</import>" );
+
+      assertInterfaceContent( "2",
+                              "import a.b.c import x.y.z",
+                              "<import line=\"2\">a.b.c</import>"
+                                    + "<import line=\"2\">x.y.z</import>" );
+   }
+
+   @Test
+   public void testMethods() throws TokenException
+   {
+      assertInterfaceContent( "1",
+                              "function a()",
+                              "<function line=\"3\">"
+                                    + "<name line=\"2\">a</name>"
+                                    + "<parameter-list line=\"2\">"
+                                    + "</parameter-list><type line=\"3\">"
+                                    + "</type></function>" );
+
+      assertInterfaceContent( "2",
+                              "function set a( value : int ) : void",
+                              "<set line=\"3\"><name line=\"2\">a"
+                                    + "</name><parameter-list line=\"2\">"
+                                    + "<parameter line=\"2\">"
+                                    + "<name-type-init line=\"2\">"
+                                    + "<name line=\"2\">value</name>"
+                                    + "<type line=\"2\">int</type>"
+                                    + "</name-type-init></parameter></parameter-list>"
+                                    + "<type line=\"2\">void</type></set>" );
+
+      assertInterfaceContent( "3",
+                              "function get a() : int",
+                              "<get line=\"3\"><name line=\"2\">a"
+                                    + "</name><parameter-list line=\"2\">"
+                                    + "</parameter-list><type line=\"2\">int" + "</type></get>" );
+   }
+
+   private void assertInterfaceContent( final String message,
+                                        final String input,
+                                        final String expected ) throws TokenException
+   {
+      scn.setLines( new String[]
+      { "{",
+                  input,
+                  "}",
+                  "__END__" } );
+      asp.nextToken(); // first call
+      asp.nextToken(); // skip {
+      final String result = new ASTToXMLConverter().convert( asp.parseInterfaceContent() );
+      assertEquals( message,
+                    "<content line=\"2\">"
+                          + expected + "</content>",
+                    result );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestPackageContent.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestPackageContent.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestPackageContent.java
new file mode 100644
index 0000000..f81df13
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestPackageContent.java
@@ -0,0 +1,220 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestPackageContent extends AbstractAs3ParserTest
+{
+   @Test
+   public void testClass() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "public class A { }",
+                            "<content line=\"2\"><class line=\"2\">"
+                                  + "<name line=\"2\">A</name><mod-list line=\"2\">"
+                                  + "<mod line=\"2\">public</mod>" + "</mod-list><content line=\"2\">"
+                                  + "</content></class></content>" );
+   }
+
+   @Test
+   public void testClassWithAsDoc() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "/** AsDoc */ public class A { }",
+                            "<content line=\"2\"><class line=\"2\">"
+                                  + "<as-doc line=\"2\">/** AsDoc */</as-doc><name line=\"2\""
+                                  + ">A</name><mod-list line=\"2\"><mod line=\"2\""
+                                  + ">public</mod></mod-list><content line=\"2\">"
+                                  + "</content></class></content>" );
+   }
+
+   @Test
+   public void testClassWithAsDocComplex() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "/** AsDoc */ public class A { "
+                                  + "/** Member */ " + "public var tmp : Number; "
+                                  + "private var tmp2 : int; " + "/** Function */ "
+                                  + "protected function foo() : void { } }",
+                            "<content line=\"2\"><class line=\"2\"><as-doc line=\"2\""
+                                  + ">/** AsDoc */</as-doc><name line=\"2\">A</name>"
+                                  + "<mod-list line=\"2\"><mod line=\"2\">public</mod>"
+                                  + "</mod-list><content line=\"2\"><var-list line=\"2\">"
+                                  + "<mod-list line=\"2\"><mod line=\"2\">public</mod>"
+                                  + "</mod-list><name-type-init line=\"2\"><name line=\"2\">tmp</name>"
+                                  + "<type line=\"2\">Number</type></name-type-init><as-doc line=\"2\""
+                                  + ">/** Member */</as-doc></var-list><var-list line=\"2\">"
+                                  + "<mod-list line=\"2\"><mod line=\"2\">private</mod></mod-list>"
+                                  + "<name-type-init line=\"2\"><name line=\"2\">tmp2</name>"
+                                  + "<type line=\"2\">int</type></name-type-init></var-list><function "
+                                  + "line=\"2\"><as-doc line=\"2\">/** Function */</as-doc>"
+                                  + "<mod-list line=\"2\"><mod line=\"2\">protected</mod></mod-list>"
+                                  + "<name line=\"2\">foo</name><parameter-list line=\"2\">"
+                                  + "</parameter-list><type line=\"2\">void</type><block line=\"2\""
+                                  + "></block></function></content></class></content>" );
+   }
+
+   @Test
+   public void testClassWithComment() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "/* lala */ /** asDoc */ public class A { }",
+                            "<content line=\"2\"><class line=\"2\">"
+                                  + "<as-doc line=\"2\">/** asDoc */</as-doc><multi-line-comment "
+                                  + "line=\"2\">/* lala */</multi-line-comment><name line=\"2\""
+                                  + ">A</name><mod-list line=\"2\"><mod line=\"2\""
+                                  + ">public</mod></mod-list><content line=\"2\">"
+                                  + "</content></class></content>" );
+   }
+
+   @Test
+   public void testClassWithMetadata() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "[Bindable(name=\"abc\", value=\"123\")] public class A { }",
+                            "<content line=\"2\"><class line=\"2\">"
+                                  + "<name line=\"2\">A</name><meta-list line=\"2\">" + "<meta line=\"2\""
+                                  + ">Bindable ( name = \"abc\" , value = \"123\" )</meta>"
+                                  + "</meta-list><mod-list line=\"2\">" + "<mod line=\"2\">public"
+                                  + "</mod></mod-list><content line=\"2\"></content></class></content>" );
+   }
+
+   @Test
+   public void testClassWithMetadataAsDoc() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "/** Comment */ [Bindable] public class A { }",
+                            "<content line=\"2\"><class line=\"2\"><as-doc line=\"2\">"
+                                  + "/** Comment */</as-doc><name line=\"2\">A</name><meta-list "
+                                  + "line=\"2\"><meta line=\"2\">Bindable</meta></meta-list><mod-list "
+                                  + "line=\"2\"><mod line=\"2\">public</mod></mod-list><content "
+                                  + "line=\"2\"></content></class></content>" );
+   }
+
+   @Test
+   public void testClassWithMetadataComment() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "/* Comment */ [Bindable] public class A { }",
+                            "<content line=\"2\"><class line=\"2\">"
+                                  + "<multi-line-comment line=\"2\">/* Comment */"
+                                  + "</multi-line-comment><name line=\"2\">A</name>"
+                                  + "<meta-list line=\"2\"><meta line=\"2\">"
+                                  + "Bindable</meta></meta-list><mod-list line=\"2\"><mod "
+                                  + "line=\"2\">public</mod></mod-list><content line=\"2\""
+                                  + "></content></class></content>" );
+   }
+
+   @Test
+   public void testClassWithMetadataWithComment() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "/* lala */ /** asDoc */ [Bindable] public class A { }",
+                            "<content line=\"2\"><class line=\"2\"><as-doc line=\"2\">"
+                                  + "/** asDoc */</as-doc><multi-line-comment line=\"2\">"
+                                  + "/* lala */</multi-line-comment><name line=\"2\">A</name>"
+                                  + "<meta-list line=\"2\"><meta line=\"2\">Bindable</meta>"
+                                  + "</meta-list><mod-list line=\"2\"><mod line=\"2\">public"
+                                  + "</mod></mod-list><content line=\"2\"></content></class></content>" );
+   }
+
+   @Test
+   public void testClassWithSimpleMetadata() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "[Bindable] public class A { }",
+                            "<content line=\"2\"><class line=\"2\"><name line=\"2\""
+                                  + ">A</name><meta-list line=\"2\"><meta line=\"2\""
+                                  + ">Bindable</meta></meta-list><mod-list line=\"2\">"
+                                  + "<mod line=\"2\">public</mod></mod-list><content line=\"2\""
+                                  + "></content></class></content>" );
+   }
+
+   @Test
+   public void testImports() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "import a.b.c;",
+                            "<content line=\"2\"><import line=\"2\""
+                                  + ">a.b.c</import></content>" );
+
+      assertPackageContent( "2",
+                            "import a.b.c import x.y.z",
+                            "<content line=\"2\"><import line=\"2\">a.b.c"
+                                  + "</import><import line=\"2\">x.y.z</import></content>" );
+   }
+
+   @Test
+   public void testInterface() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "public interface A { }",
+                            "<content line=\"2\"><interface line=\"2\">"
+                                  + "<name line=\"2\">A</name><mod-list line=\"2\">"
+                                  + "<mod line=\"2\">public</mod>" + "</mod-list><content line=\"2\">"
+                                  + "</content></interface></content>" );
+   }
+
+   @Test
+   public void testMethodPackages() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "public function a() : void { }",
+                            "<content line=\"2\"><function line=\"2\">"
+                                  + "<mod-list line=\"2\"><mod line=\"2\">public</mod>"
+                                  + "</mod-list><name line=\"2\">a</name><parameter-list line=\"2\""
+                                  + "></parameter-list><type line=\"2\">void</type>"
+                                  + "<block line=\"2\"></block></function></content>" );
+   }
+
+   @Test
+   public void testUse() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "use namespace myNamespace",
+                            "<content line=\"2\"><use line=\"2\""
+                                  + ">myNamespace</use></content>" );
+   }
+
+   @Test
+   public void testUseNameSpace() throws TokenException
+   {
+      assertPackageContent( "FlexPMD-108",
+                            "use namespace mx_internal;",
+                            "<content line=\"2\"><use line=\"2\">mx_internal</use></content>" );
+   }
+
+   private void assertPackageContent( final String message,
+                                      final String input,
+                                      final String expected ) throws TokenException
+   {
+      scn.setLines( new String[]
+      { "{",
+                  input,
+                  "}",
+                  "__END__" } );
+      asp.nextToken(); // first call
+      asp.nextToken(); // skip {
+      final String result = new ASTToXMLConverter().convert( asp.parsePackageContent() );
+      assertEquals( message,
+                    expected,
+                    result );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestPrimaryExpression.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestPrimaryExpression.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestPrimaryExpression.java
new file mode 100644
index 0000000..0670bf6
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestPrimaryExpression.java
@@ -0,0 +1,114 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestPrimaryExpression extends AbstractAs3ParserTest
+{
+   @Test
+   public void testArrayLiteral() throws TokenException
+   {
+      assertPrimary( "[1,2,3]",
+                     "<array line=\"1\"><primary line=\"1\">1"
+                           + "</primary><primary line=\"1\">2</primary>"
+                           + "<primary line=\"1\">3</primary></array>" );
+   }
+
+   @Test
+   public void testBooleans() throws TokenException
+   {
+      assertPrimary( "true" );
+      assertPrimary( "false" );
+   }
+
+   @Test
+   public void testFunctionLiteral() throws TokenException
+   {
+      assertPrimary( "function ( a : Object ) : * { trace('test'); }",
+                     "<lambda line=\"1\"><parameter-list line=\"1\">"
+                           + "<parameter line=\"1\"><name-type-init line=\"1\">"
+                           + "<name line=\"1\">a</name><type line=\"1\">"
+                           + "Object</type></name-type-init></parameter></parameter-list>"
+                           + "<type line=\"1\">*</type><block line=\"1\">"
+                           + "<call line=\"1\"><primary line=\"1\">trace</primary>"
+                           + "<arguments line=\"1\"><primary line=\"1\">'test'"
+                           + "</primary></arguments></call></block></lambda>" );
+   }
+
+   @Test
+   public void testNull() throws TokenException
+   {
+      assertPrimary( "null" );
+   }
+
+   @Test
+   public void testNumbers() throws TokenException
+   {
+      assertPrimary( "1" );
+      assertPrimary( "0xff" );
+      assertPrimary( "0777" );
+      assertPrimary( ".12E5" );
+   }
+
+   @Test
+   public void testObjectLiteral() throws TokenException
+   {
+      assertPrimary( "{a:1,b:2}",
+                     "<object line=\"1\"><prop line=\"1\">"
+                           + "<name line=\"1\">a</name><value line=\"1\">"
+                           + "<primary line=\"1\">1</primary></value></prop><prop line=\"1\">"
+                           + "<name line=\"1\">b</name><value line=\"1\">"
+                           + "<primary line=\"1\">2</primary></value></prop></object>" );
+   }
+
+   @Test
+   public void testStrings() throws TokenException
+   {
+      assertPrimary( "\"string\"" );
+      assertPrimary( "'string'" );
+   }
+
+   @Test
+   public void testUndefined() throws TokenException
+   {
+      assertPrimary( "undefined" );
+   }
+
+   private void assertPrimary( final String input ) throws TokenException
+   {
+      assertPrimary( input,
+                     input );
+   }
+
+   private void assertPrimary( final String input,
+                               final String expected ) throws TokenException
+   {
+      scn.setLines( new String[]
+      { input,
+                  "__END__" } );
+      asp.nextToken();
+      final String result = new ASTToXMLConverter().convert( asp.parsePrimaryExpression() );
+      assertEquals( "unexpected",
+                    "<primary line=\"1\">"
+                          + expected + "</primary>",
+                    result );
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestReturnStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestReturnStatement.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestReturnStatement.java
new file mode 100644
index 0000000..f1dd833
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestReturnStatement.java
@@ -0,0 +1,70 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestReturnStatement extends AbstractStatementTest
+{
+   @Test
+   public void testEmptyReturn() throws TokenException
+   {
+      assertStatement( "1",
+                       "return",
+                       "<return line=\"2\"></return>" );
+
+      assertStatement( "2",
+                       "return;",
+                       "<return line=\"2\"></return>" );
+   }
+
+   @Test
+   public void testFlexPMD181a() throws TokenException
+   {
+      assertStatement( "1",
+                       "return (str1 === str2);",
+                       "<return line=\"1\"><primary line=\"1\"><encapsulated line=\"1\">"
+                             + "<equality line=\"1\"><primary line=\"1\">str1</primary><op line=\"1\">"
+                             + "===</op><primary line=\"1\">str2</primary></equality>"
+                             + "</encapsulated></primary></return>" );
+   }
+
+   @Test
+   public void testFlexPMD181b() throws TokenException
+   {
+      assertStatement( "1",
+                       "return testString(str, /^[a-zA-Z\\s]*$/);",
+                       "<return line=\"1\"><call line=\"1\"><primary line=\"1\">testString"
+                             + "</primary><arguments line=\"1\"><primary line=\"1\">str</primary>"
+                             + "<primary line=\"1\">/^[a-zA-Z\\s]*$/</primary></arguments></call></return>" );
+   }
+
+   @Test
+   public void testReturnArrayLiteral() throws TokenException
+   {
+      assertStatement( "1",
+                       "return []",
+                       "<return line=\"1\"><primary line=\"1\">"
+                             + "<array line=\"1\"></array></primary></return>" );
+      assertStatement( "2",
+                       "return [];",
+                       "<return line=\"1\"><primary line=\"1\">"
+                             + "<array line=\"1\"></array></primary></return>" );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestSwitchStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestSwitchStatement.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestSwitchStatement.java
new file mode 100644
index 0000000..89ce628
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestSwitchStatement.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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestSwitchStatement extends AbstractStatementTest
+{
+   @Test
+   public void testFullFeatured() throws TokenException
+   {
+      assertStatement( "1",
+                       "switch( x ){ case 1 : trace('one'); break; default : trace('unknown'); }",
+                       "<switch line=\"1\"><condition line=\"1\">"
+                             + "<primary line=\"1\">x</primary>" + "</condition><cases line=\"1\">"
+                             + "<case line=\"1\"><primary line=\"1\">1</primary>"
+                             + "<switch-block line=\"1\"><call line=\"1\">"
+                             + "<primary line=\"1\">trace</primary><arguments line=\"1\">"
+                             + "<primary line=\"1\">'one'</primary></arguments>"
+                             + "</call><primary line=\"1\">break</primary>"
+                             + "</switch-block></case><case line=\"1\">" + "<default line=\"1\">"
+                             + "default</default><switch-block line=\"1\">"
+                             + "<call line=\"1\"><primary line=\"1\">trace" + "</primary>"
+                             + "<arguments line=\"1\">" + "<primary line=\"1\">'unknown'</primary>"
+                             + "</arguments></call></switch-block></case></cases></switch>" );
+      assertStatement( "1",
+                       "switch( x ){ case 1 : break; default:}",
+                       "<switch line=\"1\"><condition line=\"1\"><primary line=\"1\""
+                             + ">x</primary></condition><cases line=\"1\"><case line=\"1\""
+                             + "><primary line=\"1\">1</primary><switch-block line=\"1\""
+                             + "><primary line=\"1\">break</primary></switch-block></case>"
+                             + "<case line=\"1\"><default line=\"1\">default</default>"
+                             + "<switch-block line=\"1\"></switch-block></case></cases></switch>" );
+
+   }
+}


[39/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/control/events/GetRulesetContentEvent.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/control/events/GetRulesetContentEvent.as b/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/control/events/GetRulesetContentEvent.as
deleted file mode 100644
index e9f20c1..0000000
--- a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/control/events/GetRulesetContentEvent.as
+++ /dev/null
@@ -1,56 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.control.events
-{
-   import com.adobe.ac.pmd.api.IGetRulesetContent;
-   import com.adobe.cairngorm.control.CairngormEvent;
-
-   import flash.events.Event;
-
-   public class GetRulesetContentEvent extends CairngormEvent
-   {
-      public static const EVENT_NAME : String = "ruleset.getContent";
-
-      private var _invoker : IGetRulesetContent;
-      private var _ref : String;
-
-      public function GetRulesetContentEvent( invoker : IGetRulesetContent, ref : String )
-      {
-         super( EVENT_NAME );
-
-         _ref = ref;
-         _invoker = invoker;
-      }
-
-      public function get invoker() : IGetRulesetContent
-      {
-         return _invoker;
-      }
-
-      public function get ref() : String
-      {
-         return _ref;
-      }
-
-      override public function clone() : Event
-      {
-         return new GetRulesetContentEvent( _invoker, _ref );
-      }
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Property.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Property.as b/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Property.as
deleted file mode 100644
index 9e2f4d3..0000000
--- a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Property.as
+++ /dev/null
@@ -1,35 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.model
-{
-   import com.adobe.ac.model.IDomainModel;
-
-   import mx.collections.ArrayCollection;
-   import mx.collections.ListCollectionView;
-
-   public class Property implements IDomainModel
-   {
-      public var name : String;
-      public var value : String;
-
-      public function Property()
-      {
-      }
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/RootRuleset.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/RootRuleset.as b/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/RootRuleset.as
deleted file mode 100644
index cb41e7a..0000000
--- a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/RootRuleset.as
+++ /dev/null
@@ -1,103 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.model
-{
-	import com.adobe.ac.model.IDomainModel;
-	
-	import flash.events.Event;
-	import flash.events.EventDispatcher;
-	
-	import mx.collections.ArrayCollection;
-	import mx.collections.ListCollectionView;
-	import mx.events.CollectionEvent;
-
-	public class RootRuleset  extends EventDispatcher implements IDomainModel
-	{
-		public static const CUSTOM_RULESET_NAME : String = "Parameterized rules";
-		private static const RULES_CHANGED : String = "rulesChange";
-		public var name : String;
-		public var description : String;
-		[Bindable]
-		public var rulesets : ListCollectionView = new ArrayCollection();
-		
-		private var _customRuleset : Ruleset = null;
-		
-		public function RootRuleset()
-		{
-			rulesets.addEventListener(CollectionEvent.COLLECTION_CHANGE, handleRulesetChange);
-		}
-		
-
-		public function get customRuleset():Ruleset
-		{
-			return _customRuleset;
-		}
-
-		public function addRegExpBasedRule( rule : Rule ) : void
-		{
-			if ( ! customRuleset )
-			{
-				_customRuleset = new Ruleset();
-				_customRuleset.name = CUSTOM_RULESET_NAME;
-				rulesets.addItem( _customRuleset );
-			}
-			
-			rule.ruleset = _customRuleset;
-			_customRuleset.rules.addItem( rule );
-			rulesChanged();
-		}
-		
-		private function handleRulesetChange( event : CollectionEvent ) : void
-		{
-			for each ( var ruleset : Ruleset in rulesets )
-			{
-				ruleset.rules.addEventListener(CollectionEvent.COLLECTION_CHANGE, handleRulesChange);
-			}
-		}
-		
-		private function handleRulesChange( event : CollectionEvent ) : void
-		{
-			rulesChanged();
-		}
-		
-		public function rulesChanged() : void
-		{
-			dispatchEvent( new Event( RULES_CHANGED ) );			
-		}
-		
-		[Bindable("rulesChange")]
-		public function get rulesNb() : Number
-		{
-			var result : Number = 0;
-			
-			for each ( var ruleset : Ruleset in rulesets )
-			{
-				for each ( var rule : Rule in ruleset.rules )
-				{
-					if ( !rule.deleted )
-					{
-						result++;
-					}
-				}
-			}
-			
-			return result;
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Rule.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Rule.as b/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Rule.as
deleted file mode 100644
index 9fe5509..0000000
--- a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Rule.as
+++ /dev/null
@@ -1,92 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.model
-{
-   import com.adobe.ac.model.IDomainModel;
-   
-   import flash.events.Event;
-   import flash.events.EventDispatcher;
-   
-   import mx.collections.ArrayCollection;
-   import mx.collections.ListCollectionView;
-
-   public class Rule extends EventDispatcher implements IDomainModel // NO PMD BindableClass TooManyFields
-   {
-	   public static const NAME_CHANGE : String = "nameChange";
-	   public static const DELETED_CHANGE : String = "deleteChange";
-
-      public var since : String;
-	  [Bindable]
-      public var message : String;
-	  [Bindable]
-      public var examples : String;
-	  [Bindable]
-      public var description : String;
-	  [Bindable]
-      public var properties : ListCollectionView = new ArrayCollection();
-	  [Bindable]
-      public var priority : ViolationPriority;
-	  [Bindable]
-      public var ruleset : Ruleset;
-
-	  private var _deleted : Boolean = false;
-      private var _name : String;
-
-      public function Rule()
-      {
-      	ruleset = new Ruleset();
-      }
-
-      [Bindable( "nameChange" )]
-      public function get name() : String
-      {
-         return _name;
-      }
-
-      public function set name( value : String ) : void
-      {
-         _name = value;
-         dispatchEvent( new Event( NAME_CHANGE ) );
-      }
-
-      [Bindable( "nameChange" )]
-      public function get shortName() : String
-      {
-         return name.substr( name.lastIndexOf( "." ) + 1 );
-      }
-	  
-	  [Bindable( "deleteChange" )]
-	  public function get deleted() : Boolean
-	  {
-		  return _deleted;
-	  }
-
-	  public function remove() : void
-	  {
-		  _deleted = true;
-		  dispatchEvent( new Event( DELETED_CHANGE ) );
-	  }
-
-	  public function unDelete() : void
-	  {
-		  _deleted = false;
-		  dispatchEvent( new Event( DELETED_CHANGE ) );
-	  }
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Ruleset.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Ruleset.as b/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Ruleset.as
deleted file mode 100644
index 45afcfa..0000000
--- a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Ruleset.as
+++ /dev/null
@@ -1,63 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.model
-{
-    import com.adobe.ac.model.IDomainModel;
-    import com.adobe.ac.pmd.api.IGetRulesetContent;
-    import com.adobe.ac.pmd.control.events.GetRulesetContentEvent;
-    import com.adobe.ac.pmd.model.events.RulesetReceivedEvent;
-
-    import flash.events.EventDispatcher;
-
-    import mx.collections.ArrayCollection;
-    import mx.collections.ListCollectionView;
-    import mx.events.CollectionEvent;
-
-    [Event( name="rulesetReceived",type="com.adobe.ac.pmd.model.events.RulesetReceivedEvent" )]
-    public class Ruleset extends EventDispatcher implements IDomainModel, IGetRulesetContent // NO PMD BindableClass
-    {
-        private static const RULES_CHANGED : String = "rulesChange";
-		[Bindable]
-        public var isRef : Boolean;
-		[Bindable]
-        public var name : String;
-		[Bindable]
-        public var description : String;
-		[Bindable]
-        public var rules : ListCollectionView = new ArrayCollection();
-
-        public function Ruleset()
-        {
-        }
-
-        public function getRulesetContent( ref : String ) : void
-        {
-            new GetRulesetContentEvent( this, ref ).dispatch();
-        }
-
-        public function onReceiveRulesetContent( ruleset : Ruleset ) : void
-        {
-            name = ruleset.name;
-            rules = ruleset.rules;
-            isRef = ruleset.isRef;
-            description = ruleset.description;
-            dispatchEvent( new RulesetReceivedEvent( this ) );
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/ViolationPriority.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/ViolationPriority.as b/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/ViolationPriority.as
deleted file mode 100644
index 61fa224..0000000
--- a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/ViolationPriority.as
+++ /dev/null
@@ -1,82 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.model
-{
-   import flash.events.Event;
-   import flash.events.EventDispatcher;
-
-   public class ViolationPriority extends EventDispatcher
-   {
-      public static const ERROR : ViolationPriority = new ViolationPriority( 1, "Error" );
-      public static const WARNING : ViolationPriority = new ViolationPriority( 3, "Warning" );
-      public static const INFO : ViolationPriority = new ViolationPriority( 5, "Info" );
-
-      private var _level : int;
-      private var _name : String;
-
-      public function ViolationPriority( level : int, name : String )
-      {
-         _level = level;
-         _name = name;
-      }
-
-      public static function create( level : int ) : ViolationPriority
-      {
-         var result : ViolationPriority = null;
-		 
-         switch( level )
-         {
-            case 1:
-				result = ERROR;
-				break;
-            case 3:
-				result = WARNING;
-				break;
-            case 5:
-				result = INFO;
-				break;
-            default:
-               throw new Error( "Unknown violation level (" + level + ")" );
-         }
-		 return result;
-      }
-
-      public static function get values() : Array
-      {
-         return[ ERROR, WARNING, INFO ];
-      }
-
-      [Bindable( "unused" )]
-      public function get level() : int
-      {
-         return _level;
-      }
-
-      [Bindable( "initialized" )]
-      public function get name() : String
-      {
-         return _name;
-      }
-
-      override public function toString() : String
-      {
-         return _name;
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/events/RulesetReceivedEvent.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/events/RulesetReceivedEvent.as b/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/events/RulesetReceivedEvent.as
deleted file mode 100644
index aeff332..0000000
--- a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/events/RulesetReceivedEvent.as
+++ /dev/null
@@ -1,48 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.model.events
-{
-   import com.adobe.ac.pmd.model.Ruleset;
-
-   import flash.events.Event;
-
-   public class RulesetReceivedEvent extends Event
-   {
-      public static const EVENT_NAME : String = "rulesetReceived";
-
-      private var _ruleset : Ruleset;
-
-      public function RulesetReceivedEvent( ruleset : Ruleset )
-      {
-         super( EVENT_NAME );
-
-         _ruleset = ruleset;
-      }
-
-      public function get ruleset() : Ruleset
-      {
-         return _ruleset;
-      }
-
-      override public function clone() : Event
-      {
-         return new RulesetReceivedEvent( ruleset );
-      }
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/view/Title.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/view/Title.mxml b/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/view/Title.mxml
deleted file mode 100644
index caea7ad..0000000
--- a/FlexPMD/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/view/Title.mxml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-  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.
-
--->
-<mx:Label xmlns:mx="http://www.adobe.com/2006/mxml"
-    styleName="h1"
-    >
-
-    <mx:filters>
-
-        <flash.filters:DropShadowFilter xmlns:flash.filters="flash.filters.*"
-            color="0xffffff"
-            angle="90"
-            blurX="0"
-            blurY="0"
-            distance="1"
-            />
-
-    </mx:filters>
-
-</mx:Label>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/cancelledIcon.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/cancelledIcon.png b/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/cancelledIcon.png
deleted file mode 100644
index 9bca099..0000000
Binary files a/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/cancelledIcon.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/export.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/export.png b/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/export.png
deleted file mode 100644
index fd4bfcd..0000000
Binary files a/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/export.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/icon_tool_trash.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/icon_tool_trash.png b/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/icon_tool_trash.png
deleted file mode 100644
index b4b470d..0000000
Binary files a/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/icon_tool_trash.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/icon_tool_trash2.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/icon_tool_trash2.png b/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/icon_tool_trash2.png
deleted file mode 100644
index 282a037..0000000
Binary files a/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/icon_tool_trash2.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/todoLogo.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/todoLogo.png b/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/todoLogo.png
deleted file mode 100644
index a314b8d..0000000
Binary files a/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/todoLogo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/todoLogo_big.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/todoLogo_big.png b/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/todoLogo_big.png
deleted file mode 100644
index bb89f68..0000000
Binary files a/FlexPMD/flex-pmd-flex-lib/src/main/resources/assets/todoLogo_big.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/test/flex/AllTests.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/test/flex/AllTests.as b/FlexPMD/flex-pmd-flex-lib/src/test/flex/AllTests.as
deleted file mode 100644
index 681ca74..0000000
--- a/FlexPMD/flex-pmd-flex-lib/src/test/flex/AllTests.as
+++ /dev/null
@@ -1,36 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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
-{
-   import com.adobe.ac.pmd.model.RuleTest;
-   import com.adobe.ac.pmd.model.RulesetTest;
-   
-   import flexunit.framework.TestSuite;
-
-   public class AllTests extends TestSuite
-   {
-      public function AllTests()
-      {
-         super();
-
-         addTestSuite( RulesetTest );
-         addTestSuite( RuleTest );
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/test/flex/com/adobe/ac/pmd/model/RuleTest.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/test/flex/com/adobe/ac/pmd/model/RuleTest.as b/FlexPMD/flex-pmd-flex-lib/src/test/flex/com/adobe/ac/pmd/model/RuleTest.as
deleted file mode 100644
index d4d4a6b..0000000
--- a/FlexPMD/flex-pmd-flex-lib/src/test/flex/com/adobe/ac/pmd/model/RuleTest.as
+++ /dev/null
@@ -1,61 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.model
-{
-   import flexunit.framework.EventfulTestCase;
-
-   public class RuleTest extends EventfulTestCase
-   {
-      private var rule : Rule;
-      
-      public function RuleTest()
-      {
-      }
-
-      override public function setUp():void
-      {
-         rule = new Rule();
-      }
-      
-      public function testName() : void
-      {
-         listenForEvent( rule, Rule.NAME_CHANGE );
-         
-         rule.name = "com.adobe.ac.MyRule";
-         
-         assertEvents();
-         assertEquals( "MyRule", rule.shortName );
-         
-         rule.name = "MyRule";
-         assertEquals( "MyRule", rule.shortName );         
-      }
-      
-      public function testRemove() : void
-      {
-         var parentRuleset : Ruleset = new Ruleset();
-         
-         rule.ruleset = parentRuleset;
-         parentRuleset.rules.addItem( rule );
-         rule.remove();
-         
-		 assertEquals( 1, parentRuleset.rules.length );
-		 assertTrue( Rule( parentRuleset.rules.getItemAt( 0 ) ).deleted );
-      }
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-lib/src/test/flex/com/adobe/ac/pmd/model/RulesetTest.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-lib/src/test/flex/com/adobe/ac/pmd/model/RulesetTest.as b/FlexPMD/flex-pmd-flex-lib/src/test/flex/com/adobe/ac/pmd/model/RulesetTest.as
deleted file mode 100644
index f70d229..0000000
--- a/FlexPMD/flex-pmd-flex-lib/src/test/flex/com/adobe/ac/pmd/model/RulesetTest.as
+++ /dev/null
@@ -1,72 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.model
-{
-   import com.adobe.ac.pmd.control.events.GetRulesetContentEvent;
-   import com.adobe.ac.pmd.model.events.RulesetReceivedEvent;
-   
-   import flexunit.framework.CairngormEventSource;
-   import flexunit.framework.EventfulTestCase;
-   
-   import mx.collections.ArrayCollection;
-
-   public class RulesetTest extends EventfulTestCase
-   {
-      private var model : Ruleset;
-      
-      public function RulesetTest()
-      {
-      }
-
-      override public function setUp():void
-      {
-         model = new Ruleset();
-      }
-      
-      public function testGetRulesetContent() : void
-      {
-         listenForEvent( CairngormEventSource.instance, GetRulesetContentEvent.EVENT_NAME );
-         
-         model.getRulesetContent( "ref" );
-         
-         assertEvents();
-         assertEquals( model, GetRulesetContentEvent( lastDispatchedExpectedEvent ).invoker );
-         assertEquals( "ref", GetRulesetContentEvent( lastDispatchedExpectedEvent ).ref );
-      }
-      
-      public function testOnReceiveRulesetContent() : void
-      {
-         var receivedRuleset : Ruleset = new Ruleset();
-         
-         listenForEvent( model, RulesetReceivedEvent.EVENT_NAME );
-         
-         receivedRuleset.name = "name";
-         receivedRuleset.description = "description";
-         receivedRuleset.rules = new ArrayCollection();
-         
-         model.onReceiveRulesetContent( receivedRuleset );
-         
-         assertEvents();
-         assertEquals( model, RulesetReceivedEvent( lastDispatchedExpectedEvent ).ruleset );
-         assertEquals( receivedRuleset.name, model.name );
-         assertEquals( receivedRuleset.description, model.description );
-         assertEquals( receivedRuleset.rules, model.rules );
-      }
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex-parent/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex-parent/pom.xml b/FlexPMD/flex-pmd-flex-parent/pom.xml
deleted file mode 100644
index 6ff8aca..0000000
--- a/FlexPMD/flex-pmd-flex-parent/pom.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<!--
-
-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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-flex-parent</artifactId>
-	<packaging>pom</packaging>
-	<name>Adobe Flex PMD Flex Parent</name>
-
-	<parent>
-		<groupId>com.adobe.ac</groupId>
-		<artifactId>flex-pmd</artifactId>
-		<version>1.3-SNAPSHOT</version>
-		<relativePath>../flex-pmd-parent/pom.xml</relativePath>
-	</parent>
-
-	<properties>
-
-		<flex.version>3.2.0.3958</flex.version>
-		<flash-player.version>10</flash-player.version>
-		<flexunit.version>0.9</flexunit.version>
-		<event-source.version>1.1</event-source.version>
-		<flexunit-optional.version>0.85</flexunit-optional.version>
-		<event-source.version>1.1</event-source.version>
-		<cairngorm.version>2.2.1</cairngorm.version>
-		<flexunit-theme.version>1.0</flexunit-theme.version>
-
-	</properties>
-
-	<modules>
-		<module>../flex-pmd-ruleset-creator</module>
-		<module>../flex-pmd-violations-viewer</module>
-		<module>../flex-pmd-flex-lib</module>
-		<module>../flexunit-theme</module>
-	</modules>
-	
-	<build>
-		<sourceDirectory>.</sourceDirectory>
-		<plugins>
-		
-			<plugin>
-				<groupId>${project.groupId}</groupId>
-				<artifactId>flex-pmd-maven-plugin</artifactId>
-				<version>${project.version}</version>
-				<executions>
-					<execution>
-						<phase>package</phase>
-						<goals>
-							<goal>check</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-
-			<plugin>
-				<groupId>${project.groupId}</groupId>
-				<artifactId>flex-pmd-cpd-maven-plugin</artifactId>
-				<version>${project.version}</version>
-				<executions>
-					<execution>
-						<phase>package</phase>
-						<goals>
-							<goal>check</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-
-			<plugin>
-				<groupId>${project.groupId}</groupId>
-				<artifactId>flex-pmd-metrics-maven-plugin</artifactId>
-				<version>${project.version}</version>
-				<executions>
-					<execution>
-						<phase>package</phase>
-						<goals>
-							<goal>check</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-			
-		</plugins>
-	</build>
-
-	<reporting>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-surefire-report-plugin</artifactId>
-				<version>2.4.3</version>
-				<configuration>
-					<reportsDirectory>surefire-reports</reportsDirectory>
-				</configuration>
-			</plugin>
-
-			<plugin>
-				<groupId>${project.groupId}</groupId>
-				<artifactId>flex-pmd-maven-plugin</artifactId>
-				<version>${project.parent.version}</version>
-				<configuration>
-					<failOnError>true</failOnError>
-				</configuration>
-			</plugin>
-
-		</plugins>
-	</reporting>
-
-</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/.checkstyle
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/.checkstyle b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/.checkstyle
new file mode 100644
index 0000000..a34f4bb
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/.checkstyle
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<fileset-config file-format-version="1.2.0" simple-config="true">
+    <fileset name="all" enabled="true" check-config-name="Ac" local="false">
+        <file-match-pattern match-pattern="." include-pattern="true"/>
+    </fileset>
+</fileset-config>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/.externalToolBuilders/org.maven.ide.eclipse.maven2Builder.launch
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/.externalToolBuilders/org.maven.ide.eclipse.maven2Builder.launch b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/.externalToolBuilders/org.maven.ide.eclipse.maven2Builder.launch
new file mode 100644
index 0000000..850ec2f
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/.externalToolBuilders/org.maven.ide.eclipse.maven2Builder.launch
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<launchConfiguration type="org.maven.ide.eclipse.Maven2BuilderConfigurationType">
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.maven.ide.eclipse.maven2Builder"/>
+<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/pom.xml b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/pom.xml
new file mode 100644
index 0000000..d89e9b2
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/pom.xml
@@ -0,0 +1,196 @@
+<!--
+
+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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>flex-pmd-flex</artifactId>
+        <groupId>org.apache.flex.pmd</groupId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+	<artifactId>flex-pmd-flex-lib</artifactId>
+	<packaging>swc</packaging>
+
+	<name>Adobe Flex PMD Flex lib</name>
+	<description>Adobe Flex PMD Flex library containing shared classes</description>
+
+	<dependencies>
+
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>flex-pmd-ruleset</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>com.adobe.cairngorm</groupId>
+			<artifactId>cairngorm</artifactId>
+			<version>${cairngorm.version}</version>
+			<type>swc</type>
+		</dependency>
+
+        <dependency>
+            <groupId>com.adobe.cairngorm</groupId>
+            <artifactId>event-source</artifactId>
+            <version>${event-source.version}</version>
+            <type>swc</type>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- flex sdk dependencies -->
+
+		<dependency>
+			<groupId>org.apache.flex</groupId>
+			<artifactId>framework</artifactId>
+			<version>${flex.version}</version>
+			<type>pom</type>
+		</dependency>
+
+		<dependency>
+			<groupId>com.adobe.flash.framework</groupId>
+			<artifactId>playerglobal</artifactId>
+			<version>${flash-player.version}</version>
+			<type>swc</type>
+		</dependency>
+
+        <dependency>
+            <groupId>org.apache.flex.framework.themes</groupId>
+            <artifactId>spark</artifactId>
+            <version>${flex.version}</version>
+            <type>swc</type>
+            <scope>theme</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.flex.flexunit</groupId>
+            <artifactId>flexunit-flex</artifactId>
+            <version>${flexunit.version}</version>
+            <type>swc</type>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.adobe.flexunit</groupId>
+            <artifactId>flexunit</artifactId>
+            <version>1.0.0</version>
+            <type>swc</type>
+            <scope>test</scope>
+        </dependency>
+
+	</dependencies>
+
+	<build>
+		<sourceDirectory>src/main/flex</sourceDirectory>
+		<testSourceDirectory>src/test/flex</testSourceDirectory>
+		<resources>
+			<resource>
+				<directory>src/main/resources</directory>
+			</resource>
+		</resources>
+		<testResources>
+			<testResource>
+				<directory>src/test/resources</directory>
+			</testResource>
+		</testResources>
+
+		<plugins>
+
+			<plugin>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<version>${ant-run-plugin.version}</version>
+				<executions>
+					<execution>
+						<id>copy-version-as</id>
+						<phase>process-resources</phase>
+						<configuration>
+							<tasks>
+								<tstamp>
+									<format property="last.updated.date" pattern="yyyy-MM-dd" />
+									<format property="last.updated.time" pattern="HH:mm:ss" />
+								</tstamp>
+								<echo message="Generating Version.as..." />
+								<echo file="${basedir}/src/main/flex/Version.as" append="false" message="package" />
+								<echo file="${basedir}/src/main/flex/Version.as" append="true" message="{" />
+								<echo file="${basedir}/src/main/flex/Version.as" append="true" message=" public class Version" />
+								<echo file="${basedir}/src/main/flex/Version.as" append="true" message=" {" />
+								<echo file="${basedir}/src/main/flex/Version.as" append="true" message=" public static const BUILD_NUMBER : String = '${project.version}';" />
+								<echo file="${basedir}/src/main/flex/Version.as" append="true" message=" public static const BUILD_TIME : String = '${last.updated.time}';" />
+								<echo file="${basedir}/src/main/flex/Version.as" append="true" message=" public static const BUILD_DATE : String = '${last.updated.date}';" />
+								<echo file="${basedir}/src/main/flex/Version.as" append="true" message=" }" />
+								<echo file="${basedir}/src/main/flex/Version.as" append="true" message="}" />
+							</tasks>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+
+			<plugin>
+				<groupId>net.flexmojos.oss</groupId>
+				<artifactId>flexmojos-maven-plugin</artifactId>
+				<version>${flex-mojos-plugin.version}</version>
+				<extensions>true</extensions>
+				<configuration>
+					<targetPlayer>${flash-player.version}.0.0</targetPlayer>
+				</configuration>
+                <dependencies>
+                    <!-- This handles a bug in maven which causes problems with flex resources -->
+                    <dependency>
+                        <groupId>net.flexmojos.oss</groupId>
+                        <artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
+                        <version>${flex-mojos-plugin.version}</version>
+                    </dependency>
+                    <!-- Without this FM will use the compiler configured in its
+                    master pom, which will result in version conflicts -->
+                    <dependency>
+                        <groupId>org.apache.flex</groupId>
+                        <artifactId>compiler</artifactId>
+                        <version>${flex.version}</version>
+                        <type>pom</type>
+                    </dependency>
+                </dependencies>
+			</plugin>
+		</plugins>
+	</build>
+
+	<reporting>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-report-plugin</artifactId>
+				<configuration>
+					<reportsDirectory>surefire-reports</reportsDirectory>
+				</configuration>
+			</plugin>
+
+			<plugin>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>flex-pmd-maven-plugin</artifactId>
+				<version>${project.parent.version}</version>
+				<configuration>
+					<failOnError>true</failOnError>
+				</configuration>
+			</plugin>
+		</plugins>
+	</reporting>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/Version.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/Version.as b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/Version.as
new file mode 100644
index 0000000..7b19419
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/Version.as
@@ -0,0 +1 @@
+package{ public class Version { public static const BUILD_NUMBER : String = '1.3-SNAPSHOT'; public static const BUILD_TIME : String = '00:38:25'; public static const BUILD_DATE : String = '2014-08-27'; }}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/model/IDomainModel.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/model/IDomainModel.as b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/model/IDomainModel.as
new file mode 100644
index 0000000..3df7ae6
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/model/IDomainModel.as
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.model
+{
+
+   public interface IDomainModel
+   {
+      // Marker interface for Domain Model
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/model/IPresentationModel.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/model/IPresentationModel.as b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/model/IPresentationModel.as
new file mode 100644
index 0000000..3f91f4e
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/model/IPresentationModel.as
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.model
+{
+
+   public interface IPresentationModel
+   {
+      // Marker interface for Presentation Model
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/api/IGetRulesetContent.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/api/IGetRulesetContent.as b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/api/IGetRulesetContent.as
new file mode 100644
index 0000000..1e2d5d1
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/api/IGetRulesetContent.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.api
+{
+   import com.adobe.ac.pmd.model.Ruleset;
+
+   public interface IGetRulesetContent
+   {
+      function getRulesetContent( ref : String ) : void;
+      function onReceiveRulesetContent( ruleset : Ruleset ) : void;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/control/events/GetRulesetContentEvent.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/control/events/GetRulesetContentEvent.as b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/control/events/GetRulesetContentEvent.as
new file mode 100644
index 0000000..e9f20c1
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/control/events/GetRulesetContentEvent.as
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.control.events
+{
+   import com.adobe.ac.pmd.api.IGetRulesetContent;
+   import com.adobe.cairngorm.control.CairngormEvent;
+
+   import flash.events.Event;
+
+   public class GetRulesetContentEvent extends CairngormEvent
+   {
+      public static const EVENT_NAME : String = "ruleset.getContent";
+
+      private var _invoker : IGetRulesetContent;
+      private var _ref : String;
+
+      public function GetRulesetContentEvent( invoker : IGetRulesetContent, ref : String )
+      {
+         super( EVENT_NAME );
+
+         _ref = ref;
+         _invoker = invoker;
+      }
+
+      public function get invoker() : IGetRulesetContent
+      {
+         return _invoker;
+      }
+
+      public function get ref() : String
+      {
+         return _ref;
+      }
+
+      override public function clone() : Event
+      {
+         return new GetRulesetContentEvent( _invoker, _ref );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Property.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Property.as b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Property.as
new file mode 100644
index 0000000..9e2f4d3
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Property.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.model
+{
+   import com.adobe.ac.model.IDomainModel;
+
+   import mx.collections.ArrayCollection;
+   import mx.collections.ListCollectionView;
+
+   public class Property implements IDomainModel
+   {
+      public var name : String;
+      public var value : String;
+
+      public function Property()
+      {
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/RootRuleset.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/RootRuleset.as b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/RootRuleset.as
new file mode 100644
index 0000000..cb41e7a
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/RootRuleset.as
@@ -0,0 +1,103 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.model
+{
+	import com.adobe.ac.model.IDomainModel;
+	
+	import flash.events.Event;
+	import flash.events.EventDispatcher;
+	
+	import mx.collections.ArrayCollection;
+	import mx.collections.ListCollectionView;
+	import mx.events.CollectionEvent;
+
+	public class RootRuleset  extends EventDispatcher implements IDomainModel
+	{
+		public static const CUSTOM_RULESET_NAME : String = "Parameterized rules";
+		private static const RULES_CHANGED : String = "rulesChange";
+		public var name : String;
+		public var description : String;
+		[Bindable]
+		public var rulesets : ListCollectionView = new ArrayCollection();
+		
+		private var _customRuleset : Ruleset = null;
+		
+		public function RootRuleset()
+		{
+			rulesets.addEventListener(CollectionEvent.COLLECTION_CHANGE, handleRulesetChange);
+		}
+		
+
+		public function get customRuleset():Ruleset
+		{
+			return _customRuleset;
+		}
+
+		public function addRegExpBasedRule( rule : Rule ) : void
+		{
+			if ( ! customRuleset )
+			{
+				_customRuleset = new Ruleset();
+				_customRuleset.name = CUSTOM_RULESET_NAME;
+				rulesets.addItem( _customRuleset );
+			}
+			
+			rule.ruleset = _customRuleset;
+			_customRuleset.rules.addItem( rule );
+			rulesChanged();
+		}
+		
+		private function handleRulesetChange( event : CollectionEvent ) : void
+		{
+			for each ( var ruleset : Ruleset in rulesets )
+			{
+				ruleset.rules.addEventListener(CollectionEvent.COLLECTION_CHANGE, handleRulesChange);
+			}
+		}
+		
+		private function handleRulesChange( event : CollectionEvent ) : void
+		{
+			rulesChanged();
+		}
+		
+		public function rulesChanged() : void
+		{
+			dispatchEvent( new Event( RULES_CHANGED ) );			
+		}
+		
+		[Bindable("rulesChange")]
+		public function get rulesNb() : Number
+		{
+			var result : Number = 0;
+			
+			for each ( var ruleset : Ruleset in rulesets )
+			{
+				for each ( var rule : Rule in ruleset.rules )
+				{
+					if ( !rule.deleted )
+					{
+						result++;
+					}
+				}
+			}
+			
+			return result;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Rule.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Rule.as b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Rule.as
new file mode 100644
index 0000000..9fe5509
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Rule.as
@@ -0,0 +1,92 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.model
+{
+   import com.adobe.ac.model.IDomainModel;
+   
+   import flash.events.Event;
+   import flash.events.EventDispatcher;
+   
+   import mx.collections.ArrayCollection;
+   import mx.collections.ListCollectionView;
+
+   public class Rule extends EventDispatcher implements IDomainModel // NO PMD BindableClass TooManyFields
+   {
+	   public static const NAME_CHANGE : String = "nameChange";
+	   public static const DELETED_CHANGE : String = "deleteChange";
+
+      public var since : String;
+	  [Bindable]
+      public var message : String;
+	  [Bindable]
+      public var examples : String;
+	  [Bindable]
+      public var description : String;
+	  [Bindable]
+      public var properties : ListCollectionView = new ArrayCollection();
+	  [Bindable]
+      public var priority : ViolationPriority;
+	  [Bindable]
+      public var ruleset : Ruleset;
+
+	  private var _deleted : Boolean = false;
+      private var _name : String;
+
+      public function Rule()
+      {
+      	ruleset = new Ruleset();
+      }
+
+      [Bindable( "nameChange" )]
+      public function get name() : String
+      {
+         return _name;
+      }
+
+      public function set name( value : String ) : void
+      {
+         _name = value;
+         dispatchEvent( new Event( NAME_CHANGE ) );
+      }
+
+      [Bindable( "nameChange" )]
+      public function get shortName() : String
+      {
+         return name.substr( name.lastIndexOf( "." ) + 1 );
+      }
+	  
+	  [Bindable( "deleteChange" )]
+	  public function get deleted() : Boolean
+	  {
+		  return _deleted;
+	  }
+
+	  public function remove() : void
+	  {
+		  _deleted = true;
+		  dispatchEvent( new Event( DELETED_CHANGE ) );
+	  }
+
+	  public function unDelete() : void
+	  {
+		  _deleted = false;
+		  dispatchEvent( new Event( DELETED_CHANGE ) );
+	  }
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Ruleset.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Ruleset.as b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Ruleset.as
new file mode 100644
index 0000000..45afcfa
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/Ruleset.as
@@ -0,0 +1,63 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.model
+{
+    import com.adobe.ac.model.IDomainModel;
+    import com.adobe.ac.pmd.api.IGetRulesetContent;
+    import com.adobe.ac.pmd.control.events.GetRulesetContentEvent;
+    import com.adobe.ac.pmd.model.events.RulesetReceivedEvent;
+
+    import flash.events.EventDispatcher;
+
+    import mx.collections.ArrayCollection;
+    import mx.collections.ListCollectionView;
+    import mx.events.CollectionEvent;
+
+    [Event( name="rulesetReceived",type="com.adobe.ac.pmd.model.events.RulesetReceivedEvent" )]
+    public class Ruleset extends EventDispatcher implements IDomainModel, IGetRulesetContent // NO PMD BindableClass
+    {
+        private static const RULES_CHANGED : String = "rulesChange";
+		[Bindable]
+        public var isRef : Boolean;
+		[Bindable]
+        public var name : String;
+		[Bindable]
+        public var description : String;
+		[Bindable]
+        public var rules : ListCollectionView = new ArrayCollection();
+
+        public function Ruleset()
+        {
+        }
+
+        public function getRulesetContent( ref : String ) : void
+        {
+            new GetRulesetContentEvent( this, ref ).dispatch();
+        }
+
+        public function onReceiveRulesetContent( ruleset : Ruleset ) : void
+        {
+            name = ruleset.name;
+            rules = ruleset.rules;
+            isRef = ruleset.isRef;
+            description = ruleset.description;
+            dispatchEvent( new RulesetReceivedEvent( this ) );
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/ViolationPriority.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/ViolationPriority.as b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/ViolationPriority.as
new file mode 100644
index 0000000..61fa224
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/ViolationPriority.as
@@ -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.model
+{
+   import flash.events.Event;
+   import flash.events.EventDispatcher;
+
+   public class ViolationPriority extends EventDispatcher
+   {
+      public static const ERROR : ViolationPriority = new ViolationPriority( 1, "Error" );
+      public static const WARNING : ViolationPriority = new ViolationPriority( 3, "Warning" );
+      public static const INFO : ViolationPriority = new ViolationPriority( 5, "Info" );
+
+      private var _level : int;
+      private var _name : String;
+
+      public function ViolationPriority( level : int, name : String )
+      {
+         _level = level;
+         _name = name;
+      }
+
+      public static function create( level : int ) : ViolationPriority
+      {
+         var result : ViolationPriority = null;
+		 
+         switch( level )
+         {
+            case 1:
+				result = ERROR;
+				break;
+            case 3:
+				result = WARNING;
+				break;
+            case 5:
+				result = INFO;
+				break;
+            default:
+               throw new Error( "Unknown violation level (" + level + ")" );
+         }
+		 return result;
+      }
+
+      public static function get values() : Array
+      {
+         return[ ERROR, WARNING, INFO ];
+      }
+
+      [Bindable( "unused" )]
+      public function get level() : int
+      {
+         return _level;
+      }
+
+      [Bindable( "initialized" )]
+      public function get name() : String
+      {
+         return _name;
+      }
+
+      override public function toString() : String
+      {
+         return _name;
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/events/RulesetReceivedEvent.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/events/RulesetReceivedEvent.as b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/events/RulesetReceivedEvent.as
new file mode 100644
index 0000000..aeff332
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/model/events/RulesetReceivedEvent.as
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.model.events
+{
+   import com.adobe.ac.pmd.model.Ruleset;
+
+   import flash.events.Event;
+
+   public class RulesetReceivedEvent extends Event
+   {
+      public static const EVENT_NAME : String = "rulesetReceived";
+
+      private var _ruleset : Ruleset;
+
+      public function RulesetReceivedEvent( ruleset : Ruleset )
+      {
+         super( EVENT_NAME );
+
+         _ruleset = ruleset;
+      }
+
+      public function get ruleset() : Ruleset
+      {
+         return _ruleset;
+      }
+
+      override public function clone() : Event
+      {
+         return new RulesetReceivedEvent( ruleset );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/view/Title.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/view/Title.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/view/Title.mxml
new file mode 100644
index 0000000..0bf1899
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/flex/com/adobe/ac/pmd/view/Title.mxml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:Label xmlns:mx="http://www.adobe.com/2006/mxml"
+    styleName="h1"
+    >
+
+    <mx:filters>
+
+        <flash.filters:DropShadowFilter xmlns:flash.filters="flash.filters.*"
+            color="0xffffff"
+            angle="90"
+            blurX="0"
+            blurY="0"
+            distance="1"
+            />
+
+    </mx:filters>
+
+</mx:Label>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/cancelledIcon.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/cancelledIcon.png b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/cancelledIcon.png
new file mode 100644
index 0000000..9bca099
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/cancelledIcon.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/export.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/export.png b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/export.png
new file mode 100644
index 0000000..fd4bfcd
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/export.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/icon_tool_trash.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/icon_tool_trash.png b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/icon_tool_trash.png
new file mode 100644
index 0000000..b4b470d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/icon_tool_trash.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/icon_tool_trash2.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/icon_tool_trash2.png b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/icon_tool_trash2.png
new file mode 100644
index 0000000..282a037
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/icon_tool_trash2.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/todoLogo.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/todoLogo.png b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/todoLogo.png
new file mode 100644
index 0000000..a314b8d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/todoLogo.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/todoLogo_big.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/todoLogo_big.png b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/todoLogo_big.png
new file mode 100644
index 0000000..bb89f68
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/main/resources/assets/todoLogo_big.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/test/flex/AllTests.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/test/flex/AllTests.as b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/test/flex/AllTests.as
new file mode 100644
index 0000000..65391b7
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/test/flex/AllTests.as
@@ -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 flex - pmd - flex - lib.src.test.flex
+{
+   import com.adobe.ac.pmd.model.RuleTest;
+   import com.adobe.ac.pmd.model.RulesetTest;
+   
+   import flexunit.framework.TestSuite;
+
+   public class AllTests extends TestSuite
+   {
+      public function AllTests()
+      {
+         super();
+
+         addTestSuite( RulesetTest );
+         addTestSuite( RuleTest );
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/test/flex/com/adobe/ac/pmd/model/RuleTest.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/test/flex/com/adobe/ac/pmd/model/RuleTest.as b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/test/flex/com/adobe/ac/pmd/model/RuleTest.as
new file mode 100644
index 0000000..d4d4a6b
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/test/flex/com/adobe/ac/pmd/model/RuleTest.as
@@ -0,0 +1,61 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.model
+{
+   import flexunit.framework.EventfulTestCase;
+
+   public class RuleTest extends EventfulTestCase
+   {
+      private var rule : Rule;
+      
+      public function RuleTest()
+      {
+      }
+
+      override public function setUp():void
+      {
+         rule = new Rule();
+      }
+      
+      public function testName() : void
+      {
+         listenForEvent( rule, Rule.NAME_CHANGE );
+         
+         rule.name = "com.adobe.ac.MyRule";
+         
+         assertEvents();
+         assertEquals( "MyRule", rule.shortName );
+         
+         rule.name = "MyRule";
+         assertEquals( "MyRule", rule.shortName );         
+      }
+      
+      public function testRemove() : void
+      {
+         var parentRuleset : Ruleset = new Ruleset();
+         
+         rule.ruleset = parentRuleset;
+         parentRuleset.rules.addItem( rule );
+         rule.remove();
+         
+		 assertEquals( 1, parentRuleset.rules.length );
+		 assertTrue( Rule( parentRuleset.rules.getItemAt( 0 ) ).deleted );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/test/flex/com/adobe/ac/pmd/model/RulesetTest.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/test/flex/com/adobe/ac/pmd/model/RulesetTest.as b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/test/flex/com/adobe/ac/pmd/model/RulesetTest.as
new file mode 100644
index 0000000..f70d229
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/src/test/flex/com/adobe/ac/pmd/model/RulesetTest.as
@@ -0,0 +1,72 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.model
+{
+   import com.adobe.ac.pmd.control.events.GetRulesetContentEvent;
+   import com.adobe.ac.pmd.model.events.RulesetReceivedEvent;
+   
+   import flexunit.framework.CairngormEventSource;
+   import flexunit.framework.EventfulTestCase;
+   
+   import mx.collections.ArrayCollection;
+
+   public class RulesetTest extends EventfulTestCase
+   {
+      private var model : Ruleset;
+      
+      public function RulesetTest()
+      {
+      }
+
+      override public function setUp():void
+      {
+         model = new Ruleset();
+      }
+      
+      public function testGetRulesetContent() : void
+      {
+         listenForEvent( CairngormEventSource.instance, GetRulesetContentEvent.EVENT_NAME );
+         
+         model.getRulesetContent( "ref" );
+         
+         assertEvents();
+         assertEquals( model, GetRulesetContentEvent( lastDispatchedExpectedEvent ).invoker );
+         assertEquals( "ref", GetRulesetContentEvent( lastDispatchedExpectedEvent ).ref );
+      }
+      
+      public function testOnReceiveRulesetContent() : void
+      {
+         var receivedRuleset : Ruleset = new Ruleset();
+         
+         listenForEvent( model, RulesetReceivedEvent.EVENT_NAME );
+         
+         receivedRuleset.name = "name";
+         receivedRuleset.description = "description";
+         receivedRuleset.rules = new ArrayCollection();
+         
+         model.onReceiveRulesetContent( receivedRuleset );
+         
+         assertEvents();
+         assertEquals( model, RulesetReceivedEvent( lastDispatchedExpectedEvent ).ruleset );
+         assertEquals( receivedRuleset.name, model.name );
+         assertEquals( receivedRuleset.description, model.description );
+         assertEquals( receivedRuleset.rules, model.rules );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/build.properties
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/build.properties b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/build.properties
new file mode 100644
index 0000000..7c7944d
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/build.properties
@@ -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.
+##
+################################################################################
+
+#
+###################################
+## detail your environment settings
+###################################
+#env.MAVEN_HOME will be used by the ant file
+MAVEN.EXE = mvn.bat 
+# for windows
+#MAVEN.EXE = mvn 
+# for Mac
+
+# Location of flex SDK
+flexcover.sdk=C:\\apps\\flex\\instrumented-sdk-adobe-3.2.0.3958
+flex.sdk.version=3.2.0.3958
+
+###################################
+## common parameters section
+###################################
+temp=${basedir}/temp
+path.maven.repo=http://fna-v2.googlecode.com/svn/trunk/fna/fna_m2_repository/
+
+
+


[33/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/IParserNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/IParserNode.java b/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/IParserNode.java
new file mode 100644
index 0000000..91d8506
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/IParserNode.java
@@ -0,0 +1,90 @@
+/*
+ * 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.parser;
+
+import java.util.List;
+
+/**
+ * @author xagnetti
+ */
+public interface IParserNode
+{
+   /**
+    * @return the cyclomatic complexity of the current node
+    */
+   int computeCyclomaticComplexity();
+
+   /**
+    * @param type
+    * @return count recursivly the number of children which are of type "type"
+    */
+   int countNodeFromType( final NodeKind type );
+
+   /**
+    * @param names
+    * @return the list of IParserNode which names is contained in the given
+    *         names array
+    */
+   List< IParserNode > findPrimaryStatementsFromNameInChildren( final String[] names );
+
+   /**
+    * @param index
+    * @return the indexth child
+    */
+   IParserNode getChild( final int index );
+
+   /**
+    * @return the entire list of chilren
+    */
+   List< IParserNode > getChildren();
+
+   /**
+    * @return node's column
+    */
+   int getColumn();
+
+   /**
+    * @return node's type
+    */
+   NodeKind getId();
+
+   /**
+    * @return the node's last child
+    */
+   IParserNode getLastChild();
+
+   /**
+    * @return nodes's line
+    */
+   int getLine();
+
+   /**
+    * @return node's string value
+    */
+   String getStringValue();
+
+   /**
+    * @param expectedType
+    * @return true if the node's type is identical to the given name
+    */
+   boolean is( final NodeKind expectedType ); // NOPMD
+
+   /**
+    * @return the children number
+    */
+   int numChildren();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/KeyWords.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/KeyWords.java b/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/KeyWords.java
new file mode 100644
index 0000000..5a60a18
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/KeyWords.java
@@ -0,0 +1,88 @@
+/*
+ * 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.parser;
+
+/**
+ * @author xagnetti
+ */
+public enum KeyWords
+{
+   AS("as"),
+   CASE("case"),
+   CATCH("catch"),
+   CLASS("class"),
+   CONST("const"),
+   DEFAULT("default"),
+   DELETE("delete"),
+   DO("do"),
+   DYNAMIC("dynamic"),
+   EACH("each"),
+   ELSE("else"),
+   EOF("__END__"),
+   EXTENDS("extends"),
+   FINAL("final"),
+   FINALLY("finally"),
+   FOR("for"),
+   FUNCTION("function"),
+   GET("get"),
+   IF("if"),
+   IMPLEMENTS("implements"),
+   IMPORT("import"),
+   IN("in"),
+   INCLUDE("include"),
+   INCLUDE_AS2("#include"),
+   INSTANCE_OF("instanceof"),
+   INTERFACE("interface"),
+   INTERNAL("internal"),
+   INTRINSIC("intrinsic"),
+   IS("is"),
+   NAMESPACE("namespace"),
+   NEW("new"),
+   OVERRIDE("override"),
+   PACKAGE("package"),
+   PRIVATE("private"),
+   PROTECTED("protected"),
+   PUBLIC("public"),
+   RETURN("return"),
+   SET("set"),
+   STATIC("static"),
+   SUPER("super"),
+   SWITCH("switch"),
+   TRY("try"),
+   TYPEOF("typeof"),
+   USE("use"),
+   VAR("var"),
+   VOID("void"),
+   WHILE("while");
+
+   private final String name;
+
+   private KeyWords( final String nameToBeSet )
+   {
+      name = nameToBeSet;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see java.lang.Enum#toString()
+    */
+   @Override
+   public String toString()
+   {
+      return name;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/NodeKind.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/NodeKind.java b/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/NodeKind.java
new file mode 100644
index 0000000..0259068
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/NodeKind.java
@@ -0,0 +1,137 @@
+/*
+ * 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.parser;
+
+/**
+ * @author xagnetti
+ */
+public enum NodeKind
+{
+   ADD("add"),
+   AND("and"),
+   ARGUMENTS("arguments"),
+   ARRAY("array"),
+   ARRAY_ACCESSOR("arr-acc"),
+   AS("as"),
+   AS_DOC("as-doc"),
+   ASSIGN("assign"),
+   B_AND("b-and"),
+   B_NOT("b-not"),
+   B_OR("b-or"),
+   B_XOR("b-xor"),
+   BLOCK("block"),
+   CALL("call"),
+   CASE("case"),
+   CASES("cases"),
+   CATCH("catch"),
+   CLASS("class"),
+   COMPILATION_UNIT("compilation-unit"),
+   COND("cond"),
+   CONDITION("condition"),
+   CONDITIONAL("conditional"),
+   CONST("const"),
+   CONST_LIST("const-list"),
+   CONTENT("content"),
+   DEFAULT("default"),
+   DELETE("delete"),
+   DO("do"),
+   DOT("dot"),
+   E4X_ATTR("e4x-attr"),
+   E4X_FILTER("e4x-filter"),
+   E4X_STAR("e4x-star"),
+   ENCAPSULATED("encapsulated"),
+   EQUALITY("equality"),
+   EXPR_LIST("expr-list"),
+   EXTENDS("extends"),
+   FINALLY("finally"),
+   FOR("for"),
+   FOREACH("foreach"),
+   FORIN("forin"),
+   FUNCTION("function"),
+   GET("get"),
+   IF("if"),
+   IMPLEMENTS("implements"),
+   IMPLEMENTS_LIST("implements-list"),
+   IMPORT("import"),
+   IN("in"),
+   INCLUDE("include"),
+   INIT("init"),
+   INTERFACE("interface"),
+   ITER("iter"),
+   LAMBDA("lambda"),
+   LEFT_CURLY_BRACKET("{"),
+   META("meta"),
+   META_LIST("meta-list"),
+   MINUS("minus"),
+   MOD_LIST("mod-list"),
+   MODIFIER("mod"),
+   MULTI_LINE_COMMENT("multi-line-comment"),
+   MULTIPLICATION("mul"),
+   NAME("name"),
+   NAME_TYPE_INIT("name-type-init"),
+   NEW("new"),
+   NOT("not"),
+   OBJECT("object"),
+   OP("op"),
+   OR("or"),
+   PACKAGE("package"),
+   PARAMETER("parameter"),
+   PARAMETER_LIST("parameter-list"),
+   PLUS("plus"),
+   POST_DEC("post-dec"),
+   POST_INC("post-inc"),
+   PRE_DEC("pre-dec"),
+   PRE_INC("pre-inc"),
+   PRIMARY("primary"),
+   PROP("prop"),
+   RELATION("relation"),
+   REST("rest"),
+   RETURN("return"),
+   SET("set"),
+   SHIFT("shift"),
+   STAR("star"),
+   STMT_EMPTY("stmt-empty"),
+   SWITCH("switch"),
+   SWITCH_BLOCK("switch-block"),
+   TRY("try"),
+   TYPE("type"),
+   TYPEOF("typeof"),
+   USE("use"),
+   VALUE("value"),
+   VAR("var"),
+   VAR_LIST("var-list"),
+   VECTOR("vector"),
+   VOID("void"),
+   WHILE("while");
+
+   private String name;
+
+   private NodeKind( final String nameToBeSet )
+   {
+      name = nameToBeSet;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see java.lang.Enum#toString()
+    */
+   @Override
+   public String toString()
+   {
+      return name;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/Operators.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/Operators.java b/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/Operators.java
new file mode 100644
index 0000000..1b379dc
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/Operators.java
@@ -0,0 +1,101 @@
+/*
+ * 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.parser;
+
+/**
+ * @author xagnetti
+ */
+public enum Operators
+{
+   AND("&&"),
+   AND_AS2("and"),
+   AND_EQUAL("&="),
+   AT("@"),
+   B_AND("&"),
+   B_OR("|"),
+   B_XOR("^"),
+   COLUMN(":"),
+   COMMA(","),
+   DECREMENT("--"),
+   DIVIDED_EQUAL("/="),
+   DOT("."),
+   DOUBLE_COLUMN("::"),
+   DOUBLE_EQUAL("=="),
+   DOUBLE_EQUAL_AS2("eq"),
+   DOUBLE_QUOTE("\""),
+   DOUBLE_SHIFT_LEFT("<<"),
+   DOUBLE_SHIFT_RIGHT(">>"),
+   EQUAL("="),
+   INCREMENT("++"),
+   INFERIOR("<"),
+   INFERIOR_AS2("lt"),
+   INFERIOR_OR_EQUAL("<="),
+   INFERIOR_OR_EQUAL_AS2("le"),
+   LEFT_CURLY_BRACKET("{"),
+   LEFT_PARENTHESIS("("),
+   LEFT_SQUARE_BRACKET("["),
+   LOGICAL_OR("||"),
+   LOGICAL_OR_AS2("or"),
+   MINUS("-"),
+   MINUS_EQUAL("-="),
+   MODULO("%"),
+   MODULO_EQUAL("%="),
+   NON_EQUAL("!="),
+   NON_EQUAL_AS2_1("ne"),
+   NON_EQUAL_AS2_2("<>"),
+   NON_STRICTLY_EQUAL("!=="),
+   OR_EQUAL("|="),
+   PLUS("+"),
+   PLUS_AS2("add"),
+   PLUS_EQUAL("+="),
+   QUESTION_MARK("?"),
+   REST_PARAMETERS("..."),
+   RIGHT_CURLY_BRACKET("}"),
+   RIGHT_PARENTHESIS(")"),
+   RIGHT_SQUARE_BRACKET("]"),
+   SEMI_COLUMN(";"),
+   SIMPLE_QUOTE("'"),
+   SLASH("/"),
+   STRICTLY_EQUAL("==="),
+   SUPERIOR(">"),
+   SUPERIOR_AS2("gt"),
+   SUPERIOR_OR_EQUAL(">="),
+   SUPERIOR_OR_EQUAL_AS2("ge"),
+   TIMES("*"),
+   TIMES_EQUAL("*="),
+   TRIPLE_SHIFT_LEFT("<<<"),
+   TRIPLE_SHIFT_RIGHT(">>>"),
+   VECTOR_START(".<"),
+   XOR_EQUAL("^=");
+
+   private String symbol;
+
+   private Operators( final String symbolToBeSet )
+   {
+      symbol = symbolToBeSet;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see java.lang.Enum#toString()
+    */
+   @Override
+   public String toString()
+   {
+      return symbol;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/NullTokenException.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/NullTokenException.java b/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/NullTokenException.java
new file mode 100644
index 0000000..3ce539d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/NullTokenException.java
@@ -0,0 +1,33 @@
+/*
+ * 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.parser.exceptions;
+
+/**
+ * @author xagnetti
+ */
+@SuppressWarnings("serial")
+public class NullTokenException extends TokenException
+{
+   /**
+    * @param fileName
+    */
+   public NullTokenException( final String fileName )
+   {
+      super( "null token in "
+            + fileName + "." );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/TokenException.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/TokenException.java b/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/TokenException.java
new file mode 100644
index 0000000..819216b
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/TokenException.java
@@ -0,0 +1,32 @@
+/*
+ * 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.parser.exceptions;
+
+/**
+ * @author xagnetti
+ */
+@SuppressWarnings("serial")
+public class TokenException extends Exception
+{
+   /**
+    * @param message
+    */
+   protected TokenException( final String message )
+   {
+      super( message );
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/UnExpectedTokenException.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/UnExpectedTokenException.java b/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/UnExpectedTokenException.java
new file mode 100644
index 0000000..7a11432
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/UnExpectedTokenException.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.parser.exceptions;
+
+/**
+ * @author xagnetti
+ */
+@SuppressWarnings("serial")
+public class UnExpectedTokenException extends TokenException
+{
+   public static class Position
+   {
+      private final int column;
+      private final int line;
+
+      public Position( final int lineToBeSet,
+                       final int columnToBeSet )
+      {
+         super();
+         line = lineToBeSet;
+         column = columnToBeSet;
+      }
+   }
+
+   /**
+    * @param tokenText
+    * @param tokenPosition
+    * @param fileName
+    * @param expected
+    */
+   public UnExpectedTokenException( final String tokenText,
+                                    final Position tokenPosition,
+                                    final String fileName,
+                                    final String expected )
+   {
+      super( "Unexpected token: \""
+            + tokenText + "\" in file (" + fileName + ") at " + tokenPosition.line + ":"
+            + tokenPosition.column + ". Expecting \"" + expected + "\"" );
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/KeyWordsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/KeyWordsTest.java b/FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/KeyWordsTest.java
new file mode 100644
index 0000000..5ce85b0
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/KeyWordsTest.java
@@ -0,0 +1,31 @@
+/*
+ * 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.parser;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class KeyWordsTest
+{
+   @Test
+   public void testToString()
+   {
+      assertEquals( "as",
+                    KeyWords.AS.toString() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/NodeKindTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/NodeKindTest.java b/FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/NodeKindTest.java
new file mode 100644
index 0000000..80f4fa7
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/NodeKindTest.java
@@ -0,0 +1,31 @@
+/*
+ * 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.parser;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class NodeKindTest
+{
+   @Test
+   public void testToString()
+   {
+      assertEquals( "add",
+                    NodeKind.ADD.toString() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/OperatorsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/OperatorsTest.java b/FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/OperatorsTest.java
new file mode 100644
index 0000000..c395b9f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/OperatorsTest.java
@@ -0,0 +1,33 @@
+/*
+ * 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.parser;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class OperatorsTest
+{
+   @Test
+   public void testToString()
+   {
+      assertEquals( "&&",
+                    Operators.AND.toString() );
+      assertEquals( "and",
+                    Operators.AND_AS2.toString() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/exceptions/FlexPmdExceptionTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/exceptions/FlexPmdExceptionTest.java b/FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/exceptions/FlexPmdExceptionTest.java
new file mode 100644
index 0000000..d13def2
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/exceptions/FlexPmdExceptionTest.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.parser.exceptions;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.UnExpectedTokenException.Position;
+
+public class FlexPmdExceptionTest
+{
+   private static final String MY_FILE_NAME = "myFileName";
+
+   @Test
+   public void testNullTokenException()
+   {
+      assertEquals( "null token in "
+                          + MY_FILE_NAME + ".",
+                    new NullTokenException( MY_FILE_NAME ).getMessage() );
+   }
+
+   @Test
+   public void testTokenException()
+   {
+      assertEquals( "myMessage",
+                    new TokenException( "myMessage" ).getMessage() );
+   }
+
+   @Test
+   public void testUnexpectedTokenException()
+   {
+      assertEquals( "Unexpected token: \"tokenText\" in file (myFileName) at 1:1. Expecting \"token\"",
+                    new UnExpectedTokenException( "tokenText", new Position( 1, 1 ), MY_FILE_NAME, "token" ).getMessage() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/.pmd b/FlexPMD/flex-pmd-java/as3-parser/.pmd
new file mode 100644
index 0000000..b5c19d9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/.pmd
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<pmd>
+    <useProjectRuleSet>false</useProjectRuleSet>
+    <ruleSetFile>../flex-pmd-parent/pmd.xml</ruleSetFile>
+    <includeDerivedFiles>false</includeDerivedFiles>
+    <violationsAsErrors>true</violationsAsErrors>
+</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/pom.xml b/FlexPMD/flex-pmd-java/as3-parser/pom.xml
new file mode 100644
index 0000000..2e288e6
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/pom.xml
@@ -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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>as3-parser</artifactId>
+    <packaging>jar</packaging>
+
+    <name>As3 Parser</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <version>${project.parent.version}</version>
+            <artifactId>${project.artifactId}-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <version>${project.parent.version}</version>
+            <artifactId>flex-pmd-files</artifactId>
+        </dependency>
+    </dependencies>
+
+</project>


[45/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/resources/examples/JPEGEncoder2.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/resources/examples/JPEGEncoder2.as b/FlexPMD/as3-parser/src/test/resources/examples/JPEGEncoder2.as
deleted file mode 100644
index 3bcf7d1..0000000
--- a/FlexPMD/as3-parser/src/test/resources/examples/JPEGEncoder2.as
+++ /dev/null
@@ -1,671 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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
-{
-	import flash.display.BitmapData;
-	import flash.utils.ByteArray;
-	
-	public final class JPEGEncoder
-	{
-		// Static table initialization
-		private const ZigZag:Vector.<int> = Vector.<int>([
-			0, 1, 5, 6,14,15,27,28,
-			2, 4, 7,13,16,26,29,42,
-			3, 8,12,17,25,30,41,43,
-			9,11,18,24,31,40,44,53,
-			10,19,23,32,39,45,52,54,
-			20,22,33,38,46,51,55,60,
-			21,34,37,47,50,56,59,61,
-			35,36,48,49,57,58,62,63
-		]);
-		private var a:Vector.<String> = new Vector.<String>(); 
-		private var YTable:Vector.<int> = new Vector.<int>(64, true);
-		private var UVTable:Vector.<int> = new Vector.<int>(64, true);
-		private var outputfDCTQuant:Vector.<int> = new Vector.<int>(64, true);
-		private var fdtbl_Y:Vector.<Number> = new Vector.<Number>(64, true);
-		private var fdtbl_UV:Vector.<Number> = new Vector.<Number>(64, true);
-		private var sf:int;
-		
-		private const aasf:Vector.<Number> = Vector.<Number>([
-			1.0, 1.387039845, 1.306562965, 1.175875602,
-			1.0, 0.785694958, 0.541196100, 0.275899379
-		]);
-		
-		private var YQT:Vector.<int> = Vector.<int>([
-			16, 11, 10, 16, 24, 40, 51, 61,
-			12, 12, 14, 19, 26, 58, 60, 55,
-			14, 13, 16, 24, 40, 57, 69, 56,
-			14, 17, 22, 29, 51, 87, 80, 62,
-			18, 22, 37, 56, 68,109,103, 77,
-			24, 35, 55, 64, 81,104,113, 92,
-			49, 64, 78, 87,103,121,120,101,
-			72, 92, 95, 98,112,100,103, 99
-		]);
-		
-		private const UVQT:Vector.<int> = Vector.<int>([
-			17, 18, 24, 47, 99, 99, 99, 99,
-			18, 21, 26, 66, 99, 99, 99, 99,
-			24, 26, 56, 99, 99, 99, 99, 99,
-			47, 66, 99, 99, 99, 99, 99, 99,
-			99, 99, 99, 99, 99, 99, 99, 99,
-			99, 99, 99, 99, 99, 99, 99, 99,
-			99, 99, 99, 99, 99, 99, 99, 99,
-			99, 99, 99, 99, 99, 99, 99, 99
-		]);
-		
-		private function initQuantTables(sf:int):void
-		{
-			var a:Vector.<String> = new Vector.<String>();
-			var i:int;
-			const I64:int = 64;
-			const I8:int = 8;
-			for (i = 0; i < I64; ++i)
-			{
-				var t:int = int((YQT[i]*sf+50)*0.01);
-				if (t < 1) {
-					t = 1;
-				} else if (t > 255) {
-					t = 255;
-				}
-				YTable[ZigZag[i]] = t;
-			}
-			
-			for (i = 0; i < I64; i++)
-			{
-				var u:int = int((UVQT[i]*sf+50)*0.01);
-				if (u < 1) {
-					u = 1;
-				} else if (u > 255) {
-					u = 255;
-				}
-				UVTable[ZigZag[i]] = u;
-			}
-			i = 0;
-			for (var row:int = 0; row < I8; ++row)
-			{
-				for (var col:int = 0; col < I8; ++col)
-				{
-					fdtbl_Y[i]  = (1 / (YTable [ZigZag[i]] * aasf[row] * aasf[col] * I8));
-					fdtbl_UV[i] = (1 / (UVTable[ZigZag[i]] * aasf[row] * aasf[col] * I8));
-					i++;
-				}
-			}
-		}
-		
-		private var YDC_HT:Vector.<BitString>;
-		private var UVDC_HT:Vector.<BitString>;
-		private var YAC_HT:Vector.<BitString>;
-		private var UVAC_HT:Vector.<BitString>;
-		
-		private function computeHuffmanTbl(nrcodes:Vector.<int>, std_table:Vector.<int>):Vector.<BitString>
-		{
-			var codevalue:int = 0;
-			var pos_in_table:int = 0;
-			var HT:Vector.<BitString> = new Vector.<BitString>(251, true);
-			var bitString:BitString;
-			for (var k:int=1; k<=16; ++k)
-			{
-				for (var j:int=1; j<=nrcodes[k]; ++j)
-				{
-					HT[std_table[pos_in_table]] = bitString = new BitString();
-					bitString.val = codevalue;
-					bitString.len = k;
-					pos_in_table++;
-					codevalue++;
-				}
-				codevalue<<=1;
-			}
-			return HT;
-		}
-		
-		private var std_dc_luminance_nrcodes:Vector.<int> = Vector.<int>([0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0]);
-		private var std_dc_luminance_values:Vector.<int> = Vector.<int>([0,1,2,3,4,5,6,7,8,9,10,11]);
-		private var std_ac_luminance_nrcodes:Vector.<int> = Vector.<int>([0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d]);
-		private var std_ac_luminance_values:Vector.<int> = Vector.<int>([0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,
-			0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,
-			0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,
-			0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,
-			0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,
-			0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28,
-			0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,
-			0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,
-			0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
-			0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,
-			0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,
-			0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89,
-			0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,
-			0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,
-			0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,
-			0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,
-			0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,
-			0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,
-			0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,
-			0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,
-			0xf9,0xfa]);
-		
-		private var std_dc_chrominance_nrcodes:Vector.<int> = Vector.<int>([0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0]);
-		private var std_dc_chrominance_values:Vector.<int> = Vector.<int>([0,1,2,3,4,5,6,7,8,9,10,11]);
-		private var std_ac_chrominance_nrcodes:Vector.<int> = Vector.<int>([0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77]);
-		private var std_ac_chrominance_values:Vector.<int> = Vector.<int>([0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21,
-			0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,
-			0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91,
-			0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,
-			0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,
-			0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,
-			0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38,
-			0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,
-			0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,
-			0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,
-			0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,
-			0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,
-			0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,
-			0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,
-			0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,
-			0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,
-			0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,
-			0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,
-			0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,
-			0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,
-			0xf9,0xfa
-		]);
-		
-		private function initHuffmanTbl():void
-		{
-			YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values);
-			UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values);
-			YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values);
-			UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values);
-		}
-		
-		private var bitcode:Vector.<BitString> = new Vector.<BitString>(65535, true);
-		private var category:Vector.<int> = new Vector.<int>(65535, true);
-		
-		private function initCategoryNumber():void
-		{
-			var nrlower:int = 1;
-			var nrupper:int = 2;
-			var bitString:BitString;
-			const I15:int = 15;
-			var pos:int;
-			for (var cat:int=1; cat<=I15; ++cat)
-			{
-				//Positive numbers
-				for (var nr:int=nrlower; nr<nrupper; ++nr)
-				{
-					pos = int(32767+nr);
-					category[pos] = cat;
-					bitcode[pos] = bitString = new BitString();
-					bitString.len = cat;
-					bitString.val = nr;
-				}
-				//Negative numbers
-				for (var nrneg:int=-(nrupper-1); nrneg<=-nrlower; ++nrneg)
-				{
-					pos = int(32767+nrneg);
-					category[pos] = cat;
-					bitcode[pos] = bitString = new BitString();
-					bitString.len = cat;
-					bitString.val = nrupper-1+nrneg;
-				}
-				nrlower <<= 1;
-				nrupper <<= 1;
-			}
-		}
-		
-		// IO functions
-		
-		private var byteout:ByteArray;
-		private var bytenew:int = 0;
-		private var bytepos:int = 7;
-		
-		private function writeBits(bs:BitString):void
-		{
-			var value:int = bs.val;
-			var posval:int = bs.len-1;
-			while ( posval >= 0 )
-			{
-				if (value & uint(1 << posval) )
-					bytenew |= uint(1 << bytepos);
-				posval--;
-				bytepos--;
-				if (bytepos < 0)
-				{
-					if (bytenew == 0xFF)
-					{
-						byteout.writeByte(0xFF);
-						byteout.writeByte(0);
-					}
-					else byteout.writeByte(bytenew);
-					bytepos=7;
-					bytenew=0;
-				}
-			}
-		}
-		
-		// DCT & quantization core
-		
-		private function fDCTQuant(data:Vector.<Number>, fdtbl:Vector.<Number>):Vector.<int>
-		{
-			/* Pass 1: process rows. */
-			var dataOff:int=0;
-			var d0:Number, d1:Number, d2:Number, d3:Number, d4:Number, d5:Number, d6:Number, d7:Number;
-			var i:int;
-			const I8:int = 8;
-			const I64:int = 64;
-			for (i=0; i<I8; ++i)
-			{	
-				d0 = data[int(dataOff)];
-				d1 = data[int(dataOff+1)];
-				d2 = data[int(dataOff+2)];
-				d3 = data[int(dataOff+3)];
-				d4 = data[int(dataOff+4)];
-				d5 = data[int(dataOff+5)];
-				d6 = data[int(dataOff+6)];
-				d7 = data[int(dataOff+7)];
-				
-				var tmp0:Number = d0 + d7;
-				var tmp7:Number = d0 - d7;
-				var tmp1:Number = d1 + d6;
-				var tmp6:Number = d1 - d6;
-				var tmp2:Number = d2 + d5;
-				var tmp5:Number = d2 - d5;
-				var tmp3:Number = d3 + d4;
-				var tmp4:Number = d3 - d4;
-				
-				/* Even part */
-				var tmp10:Number = tmp0 + tmp3;	/* phase 2 */
-				var tmp13:Number = tmp0 - tmp3;
-				var tmp11:Number = tmp1 + tmp2;
-				var tmp12:Number = tmp1 - tmp2;
-				
-				data[int(dataOff)] = tmp10 + tmp11; /* phase 3 */
-				data[int(dataOff+4)] = tmp10 - tmp11;
-				
-				var z1:Number = (tmp12 + tmp13) * 0.707106781; /* c4 */
-				data[int(dataOff+2)] = tmp13 + z1; /* phase 5 */
-				data[int(dataOff+6)] = tmp13 - z1;
-				
-				/* Odd part */
-				tmp10 = tmp4 + tmp5; /* phase 2 */
-				tmp11 = tmp5 + tmp6;
-				tmp12 = tmp6 + tmp7;
-				
-				/* The rotator is modified from fig 4-8 to avoid extra negations. */
-				var z5:Number = (tmp10 - tmp12) * 0.382683433; /* c6 */
-				var z2:Number = 0.541196100 * tmp10 + z5; /* c2-c6 */
-				var z4:Number = 1.306562965 * tmp12 + z5; /* c2+c6 */
-				var z3:Number = tmp11 * 0.707106781; /* c4 */
-				
-				var z11:Number = tmp7 + z3;	/* phase 5 */
-				var z13:Number = tmp7 - z3;
-				
-				data[int(dataOff+5)] = z13 + z2;	/* phase 6 */
-				data[int(dataOff+3)] = z13 - z2;
-				data[int(dataOff+1)] = z11 + z4;
-				data[int(dataOff+7)] = z11 - z4;
-				
-				dataOff += 8; /* advance pointer to next row */
-			}
-			
-			/* Pass 2: process columns. */
-			dataOff = 0;
-			for (i=0; i<I8; ++i)
-			{
-				d0 = data[int(dataOff)];
-				d1 = data[int(dataOff + 8)];
-				d2 = data[int(dataOff + 16)];
-				d3 = data[int(dataOff + 24)];
-				d4 = data[int(dataOff + 32)];
-				d5 = data[int(dataOff + 40)];
-				d6 = data[int(dataOff + 48)];
-				d7 = data[int(dataOff + 56)];
-				
-				var tmp0p2:Number = d0 + d7;
-				var tmp7p2:Number = d0 - d7;
-				var tmp1p2:Number = d1 + d6;
-				var tmp6p2:Number = d1 - d6;
-				var tmp2p2:Number = d2 + d5;
-				var tmp5p2:Number = d2 - d5;
-				var tmp3p2:Number = d3 + d4;
-				var tmp4p2:Number = d3 - d4;
-				
-				/* Even part */
-				var tmp10p2:Number = tmp0p2 + tmp3p2;	/* phase 2 */
-				var tmp13p2:Number = tmp0p2 - tmp3p2;
-				var tmp11p2:Number = tmp1p2 + tmp2p2;
-				var tmp12p2:Number = tmp1p2 - tmp2p2;
-				
-				data[int(dataOff)] = tmp10p2 + tmp11p2; /* phase 3 */
-				data[int(dataOff+32)] = tmp10p2 - tmp11p2;
-				
-				var z1p2:Number = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */
-				data[int(dataOff+16)] = tmp13p2 + z1p2; /* phase 5 */
-				data[int(dataOff+48)] = tmp13p2 - z1p2;
-				
-				/* Odd part */
-				tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */
-				tmp11p2 = tmp5p2 + tmp6p2;
-				tmp12p2 = tmp6p2 + tmp7p2;
-				
-				/* The rotator is modified from fig 4-8 to avoid extra negations. */
-				var z5p2:Number = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */
-				var z2p2:Number = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */
-				var z4p2:Number = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */
-				var z3p2:Number= tmp11p2 * 0.707106781; /* c4 */
-				
-				var z11p2:Number = tmp7p2 + z3p2;	/* phase 5 */
-				var z13p2:Number = tmp7p2 - z3p2;
-				
-				data[int(dataOff+40)] = z13p2 + z2p2; /* phase 6 */
-				data[int(dataOff+24)] = z13p2 - z2p2;
-				data[int(dataOff+ 8)] = z11p2 + z4p2;
-				data[int(dataOff+56)] = z11p2 - z4p2;
-				
-				dataOff++; /* advance pointer to next column */
-			}
-			
-			// Quantize/descale the coefficients
-			var fDCTQuant:Number;
-			for (i=0; i<I64; ++i)
-			{
-				// Apply the quantization and scaling factor & Round to nearest integer
-				fDCTQuant = data[int(i)]*fdtbl[int(i)];
-				outputfDCTQuant[int(i)] = (fDCTQuant > 0.0) ? int(fDCTQuant + 0.5) : int(fDCTQuant - 0.5);
-			}
-			return outputfDCTQuant;
-		}
-		
-		// Chunk writing
-		private function writeAPP0():void
-		{
-			byteout.writeShort(0xFFE0); // marker
-			byteout.writeShort(16); // length
-			byteout.writeByte(0x4A); // J
-			byteout.writeByte(0x46); // F
-			byteout.writeByte(0x49); // I
-			byteout.writeByte(0x46); // F
-			byteout.writeByte(0); // = "JFIF",'\0'
-			byteout.writeByte(1); // versionhi
-			byteout.writeByte(1); // versionlo
-			byteout.writeByte(0); // xyunits
-			byteout.writeShort(1); // xdensity
-			byteout.writeShort(1); // ydensity
-			byteout.writeByte(0); // thumbnwidth
-			byteout.writeByte(0); // thumbnheight
-		}
-		
-		private function writeSOF0(width:int, height:int):void
-		{
-			byteout.writeShort(0xFFC0); // marker
-			byteout.writeShort(17);   // length, truecolor YUV JPG
-			byteout.writeByte(8);    // precision
-			byteout.writeShort(height);
-			byteout.writeShort(width);
-			byteout.writeByte(3);    // nrofcomponents
-			byteout.writeByte(1);    // IdY
-			byteout.writeByte(0x11); // HVY
-			byteout.writeByte(0);    // QTY
-			byteout.writeByte(2);    // IdU
-			byteout.writeByte(0x11); // HVU
-			byteout.writeByte(1);    // QTU
-			byteout.writeByte(3);    // IdV
-			byteout.writeByte(0x11); // HVV
-			byteout.writeByte(1);    // QTV
-		}
-		
-		private function writeDQT():void
-		{
-			byteout.writeShort(0xFFDB); // marker
-			byteout.writeShort(132);	   // length
-			byteout.writeByte(0);
-			
-			var i:int;
-			const I64:int = 64;
-			for (i=0; i<I64; ++i)
-				byteout.writeByte(YTable[i]);
-			
-			byteout.writeByte(1);
-			
-			for (i=0; i<I64; ++i)
-				byteout.writeByte(UVTable[i]);
-		}
-		
-		private function writeDHT():void
-		{
-			byteout.writeShort(0xFFC4); // marker
-			byteout.writeShort(0x01A2); // length
-			
-			byteout.writeByte(0); // HTYDCinfo
-			var i:int;
-			const I11:int = 11;
-			const I16:int = 16;
-			const I161:int = 161;
-			for (i=0; i<I16; ++i)
-				byteout.writeByte(std_dc_luminance_nrcodes[int(i+1)]);
-			
-			for (i=0; i<=I11; ++i)
-				byteout.writeByte(std_dc_luminance_values[int(i)]);
-			
-			byteout.writeByte(0x10); // HTYACinfo
-			
-			for (i=0; i<I16; ++i)
-				byteout.writeByte(std_ac_luminance_nrcodes[int(i+1)]);
-			
-			for (i=0; i<=I161; ++i)
-				byteout.writeByte(std_ac_luminance_values[int(i)]);
-			
-			byteout.writeByte(1); // HTUDCinfo
-			
-			for (i=0; i<I16; ++i)
-				byteout.writeByte(std_dc_chrominance_nrcodes[int(i+1)]);
-			
-			for (i=0; i<=I11; ++i)
-				byteout.writeByte(std_dc_chrominance_values[int(i)]);
-			
-			byteout.writeByte(0x11); // HTUACinfo
-			
-			for (i=0; i<I16; ++i)
-				byteout.writeByte(std_ac_chrominance_nrcodes[int(i+1)]);
-			
-			for (i=0; i<=I161; ++i)
-				byteout.writeByte(std_ac_chrominance_values[int(i)]);
-		}
-		
-		private function writeSOS():void
-		{
-			byteout.writeShort(0xFFDA); // marker
-			byteout.writeShort(12); // length
-			byteout.writeByte(3); // nrofcomponents
-			byteout.writeByte(1); // IdY
-			byteout.writeByte(0); // HTY
-			byteout.writeByte(2); // IdU
-			byteout.writeByte(0x11); // HTU
-			byteout.writeByte(3); // IdV
-			byteout.writeByte(0x11); // HTV
-			byteout.writeByte(0); // Ss
-			byteout.writeByte(0x3f); // Se
-			byteout.writeByte(0); // Bf
-		}
-		
-		// Core processing
-		internal var DU:Vector.<int> = new Vector.<int>(64, true);
-		
-		private function processDU(CDU:Vector.<Number>, fdtbl:Vector.<Number>, DC:Number, HTDC:Vector.<BitString>, HTAC:Vector.<BitString>):Number
-		{
-			var EOB:BitString = HTAC[0x00];
-			var M16zeroes:BitString = HTAC[0xF0];
-			var pos:int;
-			const I16:int = 16;
-			const I63:int = 63;
-			const I64:int = 64;
-			var DU_DCT:Vector.<int> = fDCTQuant(CDU, fdtbl);
-			//ZigZag reorder
-			for (var j:int=0;j<I64;++j) {
-				DU[ZigZag[j]]=DU_DCT[j];
-			}
-			var Diff:int = DU[0] - DC; DC = DU[0];
-			//Encode DC
-			if (Diff==0) {
-				writeBits(HTDC[0]); // Diff might be 0
-			} else {
-				pos = int(32767+Diff);
-				writeBits(HTDC[category[pos]]);
-				writeBits(bitcode[pos]);
-			}
-			//Encode ACs
-			const end0pos:int = 63;
-			for (; (end0pos>0)&&(DU[end0pos]==0); end0pos--) {};
-			//end0pos = first element in reverse order !=0
-			if ( end0pos == 0) {
-				writeBits(EOB);
-				return DC;
-			}
-			var i:int = 1;
-			var lng:int;
-			while ( i <= end0pos ) {
-				var startpos:int = i;
-				for (; (DU[i]==0) && (i<=end0pos); ++i) {}
-				var nrzeroes:int = i-startpos;
-				if ( nrzeroes >= I16 ) {
-					lng = nrzeroes>>4;
-					for (var nrmarker:int=1; nrmarker <= lng; ++nrmarker)
-						writeBits(M16zeroes);
-					nrzeroes = int(nrzeroes&0xF);
-				}
-				pos = int(32767+DU[i]);
-				writeBits(HTAC[int((nrzeroes<<4)+category[pos])]);
-				writeBits(bitcode[pos]);
-				i++;
-			}
-			if ( end0pos != I63 ) {
-				writeBits(EOB);
-			}
-			return DC;
-		}
-		
-		private var YDU:Vector.<Number> = new Vector.<Number>(64, true);
-		private var UDU:Vector.<Number> = new Vector.<Number>(64, true);
-		private var VDU:Vector.<Number> = new Vector.<Number>(64, true);
-		
-		private function RGB2YUV(img:BitmapData, xpos:int, ypos:int):void
-		{
-			var pos:int=0;
-			const I8:int = 8;
-			for (var y:int=0; y<I8; ++y) {
-				for (var x:int=0; x<I8; ++x) {
-					var P:uint = img.getPixel32(xpos+x,ypos+y);
-					var R:int = (P>>16)&0xFF;
-					var G:int = (P>> 8)&0xFF;
-					var B:int = (P    )&0xFF;
-					YDU[int(pos)]=((( 0.29900)*R+( 0.58700)*G+( 0.11400)*B))-0x80;
-					UDU[int(pos)]=(((-0.16874)*R+(-0.33126)*G+( 0.50000)*B));
-					VDU[int(pos)]=((( 0.50000)*R+(-0.41869)*G+(-0.08131)*B));
-					++pos;
-				}
-			}
-		}
-		
-		public function JPEGEncoder(quality:int=50)
-		{
-			if (quality <= 0)
-				quality = 1;
-			
-			if (quality > 100)
-				quality = 100;
-			
-			sf = quality < 50 ? int(5000 / quality) : int(200 - (quality<<1));
-			init();
-		}
-		
-		private function init():void
-		{
-			ZigZag.fixed = true;
-			aasf.fixed = true;
-			YQT.fixed = true;
-			UVQT.fixed = true;
-			std_ac_chrominance_nrcodes.fixed = true;
-			std_ac_chrominance_values.fixed = true;
-			std_ac_luminance_nrcodes.fixed = true;
-			std_ac_luminance_values.fixed = true;
-			std_dc_chrominance_nrcodes.fixed = true;
-			std_dc_chrominance_values.fixed = true;
-			std_dc_luminance_nrcodes.fixed = true;
-			std_dc_luminance_values.fixed = true;
-			// Create tables
-			initHuffmanTbl();
-			initCategoryNumber();
-			initQuantTables(sf);
-		}
-		
-		public function encode(image:BitmapData):ByteArray
-		{
-			// Initialize bit writer
-			byteout = new ByteArray();
-			
-			bytenew=0;
-			bytepos=7;
-			
-			// Add JPEG headers
-			byteout.writeShort(0xFFD8); // SOI
-			writeAPP0();
-			writeDQT();
-			writeSOF0(image.width,image.height);
-			writeDHT();
-			writeSOS();
-			
-			// Encode 8x8 macroblocks
-			var DCY:Number=0;
-			var DCU:Number=0;
-			var DCV:Number=0;
-			bytenew=0;
-			bytepos=7;
-			
-			var width:int = image.width;
-			var height:int = image.height;
-			
-			for (var ypos:int=0; ypos<height; ypos+=8)
-			{
-				for (var xpos:int=0; xpos<width; xpos+=8)
-				{
-					RGB2YUV(image, xpos, ypos);
-					DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);
-					DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);
-					DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);
-				}
-			}
-			
-			// Do the bit alignment of the EOI marker
-			if ( bytepos >= 0 )
-			{
-				var fillbits:BitString = new BitString();
-				fillbits.len = bytepos+1;
-				fillbits.val = (1<<(bytepos+1))-1;
-				writeBits(fillbits);
-			}
-			byteout.writeShort(0xFFD9); //EOI
-			return byteout;
-		}
-	}
-}
-
-final class BitString
-{
-	public var len:int = 0;
-	public var val:int = 0;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/resources/examples/toAS2/src/fw/data/request/ResultListener.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/resources/examples/toAS2/src/fw/data/request/ResultListener.as b/FlexPMD/as3-parser/src/test/resources/examples/toAS2/src/fw/data/request/ResultListener.as
deleted file mode 100644
index f225da6..0000000
--- a/FlexPMD/as3-parser/src/test/resources/examples/toAS2/src/fw/data/request/ResultListener.as
+++ /dev/null
@@ -1,27 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-import src.fw.data.request.Request;
-interface src.fw.data.request.ResultListener
-{
-	public function onResultLoad(request:Request) : Void;
-
-	public function onResultError(request:Request) : Void;
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/resources/examples/unformatted/IContext.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/resources/examples/unformatted/IContext.as b/FlexPMD/as3-parser/src/test/resources/examples/unformatted/IContext.as
deleted file mode 100644
index ee1fe67..0000000
--- a/FlexPMD/as3-parser/src/test/resources/examples/unformatted/IContext.as
+++ /dev/null
@@ -1,83 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.commons.context
-{
-	import flash.events.IEventDispatcher;
-	
-	/**
-	 * Interface IContext.
-	 * 
-	 * @author  (resp. mv)
-	 */
-	public interface IContext extends IEventDispatcher
-	{
-		
-		/** 
-		 * Get Value for given key.
-		 * All contexts are searched for the given key.
-		 * 
- 		 * @param key the name of the attribute to search.
-		 * @result the found value for given key or null.
-		 */
-		function getValue(key:String) : Object;
-
-		/**
-		 * Put a value into the context for a given key.
-		 * 
-		 * @param key the key to store this object.
-		 * @param value the value of the given key.
-		 */
-		function putValue(key:String, value:Object) : void;
-		
-		/**
-		 * Get the context of given type.
-		 * 
-		 * @param contextType the type of the context.
-		 * @result the context of the given type or null.
-		 */
-		function getContext(contextType:String) : IContext;
-		
-		/**
-		 * Get the owner of this context.
-		 * @return the owner, if there is one, or null.
-		 */ 
-		 [Deprecated("There is no owner any longer. Do not use this property")]
-		function get owner() : IContextOwner;
-
-		/**
-	 	 * Parent context. (e.g. for managing "shared" resources).
-	 	 * All contextes build a tree. With this getter you get the parent of this context inside the tree.
-	 	 */
-		function get parentContext() : IContext;
-		
-		/**
-		 * Get the resource for given url.
-		 * @param key the url or key of the asset.
-		 * @return the object of given url with following type:
-		 * MediaType.Text  := String
-		 * MediaType.Audio := com.commons.media.ISound
-		 * MediaType.Image := DisplayObject
-		 * MediaType.FlexModule := DisplayObject
-		 * MediaType.Video := NetStream
-		 * MediaType.FlashApplication := DisplayObject
-		 * MediaType.FlexStyleDeclaration := null
-		 */
-		function getResource(key:String) : Object;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/resources/examples/unformatted/Simple.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/resources/examples/unformatted/Simple.as b/FlexPMD/as3-parser/src/test/resources/examples/unformatted/Simple.as
deleted file mode 100644
index 78bd746..0000000
--- a/FlexPMD/as3-parser/src/test/resources/examples/unformatted/Simple.as
+++ /dev/null
@@ -1,19 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 simple { public class Simple    {      public function Simple ( )      {         trace ( "Simple" );      }   }   }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/resources/examples/unformatted/Title.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/resources/examples/unformatted/Title.as b/FlexPMD/as3-parser/src/test/resources/examples/unformatted/Title.as
deleted file mode 100644
index e2301fb..0000000
--- a/FlexPMD/as3-parser/src/test/resources/examples/unformatted/Title.as
+++ /dev/null
@@ -1,32 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 org.viewing
-
-{
-	
-	public final class Title 
-	
-	{
-		
-		public static const SHOW:String = "true";
-		public static const HIDE:String = "false";
-		
-	}
-	
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/pom.xml b/FlexPMD/as3-plugin-utils/pom.xml
deleted file mode 100644
index 8864e42..0000000
--- a/FlexPMD/as3-plugin-utils/pom.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<!--
-
-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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>com.adobe.ac</groupId>
-  <artifactId>as3-plugin-utils</artifactId>
-  <name>As3 Maven plugin Utils</name>
-  <url>http://maven.apache.org</url>
-  <packaging>jar</packaging>
-  
-  <parent>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-java-parent</artifactId>
-	<version>1.3-SNAPSHOT</version>
-	<relativePath>../flex-pmd-java-parent/pom.xml</relativePath>
-  </parent>
-  
-</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/main/java/com/adobe/ac/ncss/filters/FlexFilter.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/main/java/com/adobe/ac/ncss/filters/FlexFilter.java b/FlexPMD/as3-plugin-utils/src/main/java/com/adobe/ac/ncss/filters/FlexFilter.java
deleted file mode 100644
index c81794a..0000000
--- a/FlexPMD/as3-plugin-utils/src/main/java/com/adobe/ac/ncss/filters/FlexFilter.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.ncss.filters;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.util.Locale;
-
-/**
- * @author xagnetti
- */
-public class FlexFilter implements FilenameFilter
-{
-   /*
-    * (non-Javadoc)
-    * @see java.io.FilenameFilter#accept(java.io.File, java.lang.String)
-    */
-   public boolean accept( final File dir,
-                          final String name )
-   {
-      boolean accepted = false;
-
-      if ( !new File( dir, name ).isDirectory() )
-      {
-         accepted = name.toLowerCase( Locale.US ).endsWith( ".as" )
-               || name.toLowerCase( Locale.US ).endsWith( ".mxml" );
-      }
-      return accepted;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/main/java/com/adobe/ac/ncss/utils/FileUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/main/java/com/adobe/ac/ncss/utils/FileUtils.java b/FlexPMD/as3-plugin-utils/src/main/java/com/adobe/ac/ncss/utils/FileUtils.java
deleted file mode 100644
index 61e8e19..0000000
--- a/FlexPMD/as3-plugin-utils/src/main/java/com/adobe/ac/ncss/utils/FileUtils.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * 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.ncss.utils;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.logging.Logger;
-
-import com.adobe.ac.utils.StackTraceUtils;
-
-/**
- * @author xagnetti
- */
-public final class FileUtils
-{
-   public static class FilePathComparator implements Comparator< File >
-   {
-      public int compare( final File arg0,
-                          final File arg1 )
-      {
-         return arg0.getAbsolutePath().compareTo( arg1.getAbsolutePath() );
-      }
-   }
-
-   public static final Logger LOGGER = Logger.getLogger( FileUtils.class.getName() );
-
-   /**
-    * @param line
-    * @return
-    */
-   public static boolean isLineACorrectStatement( final String line )
-   {
-      return line.compareTo( "" ) != 0
-            && lrtrim( line ).compareTo( "{" ) != 0 && lrtrim( line ).compareTo( "}" ) != 0
-            && line.endsWith( ";" );
-   }
-
-   /**
-    * @param directory
-    * @param filter
-    * @param recurse
-    * @return
-    */
-   public static Collection< File > listFiles( final File directory,
-                                               final FilenameFilter filter,
-                                               final boolean recurse )
-   {
-      final ArrayList< File > files = listFilesRecurse( directory,
-                                                        filter,
-                                                        recurse );
-      Collections.sort( files,
-                        new FilePathComparator() );
-      return files;
-   }
-
-   /**
-    * @param sourceDirectory
-    * @param filter
-    * @param recurse
-    * @return
-    */
-   public static Collection< File > listFiles( final List< File > sourceDirectory,
-                                               final FilenameFilter filter,
-                                               final boolean recurse )
-   {
-      final ArrayList< File > files = new ArrayList< File >();
-
-      for ( final File topDirectory : sourceDirectory )
-      {
-         files.addAll( listFilesRecurse( topDirectory,
-                                         filter,
-                                         recurse ) );
-      }
-
-      Collections.sort( files,
-                        new FilePathComparator() );
-      return files;
-   }
-
-   /**
-    * @param file
-    * @return
-    */
-   public static List< String > readFile( final File file )
-   {
-      final List< String > result = new ArrayList< String >();
-
-      BufferedReader inReader = null;
-      try
-      {
-         final Reader reader = new InputStreamReader( new FileInputStream( file ), "UTF-8" );
-         inReader = new BufferedReader( reader );
-
-         String line = readLine( inReader );
-
-         while ( line != null )
-         {
-            result.add( line );
-            line = readLine( inReader );
-         }
-         inReader.close();
-      }
-      catch ( final IOException e )
-      {
-         StackTraceUtils.print( e );
-      }
-      return result;
-   }
-
-   private static ArrayList< File > listFilesRecurse( final File directory,
-                                                      final FilenameFilter filter,
-                                                      final boolean recurse )
-   {
-      final ArrayList< File > files = new ArrayList< File >();
-      final File[] entries = directory.listFiles();
-
-      if ( entries != null )
-      {
-         for ( final File entry : entries )
-         {
-            if ( filter == null
-                  || filter.accept( directory,
-                                    entry.getName() ) )
-            {
-               files.add( entry );
-            }
-            if ( recurse
-                  && entry.isDirectory() )
-            {
-               files.addAll( listFilesRecurse( entry,
-                                               filter,
-                                               recurse ) );
-            }
-         }
-      }
-      return files;
-   }
-
-   private static String lrtrim( final String source )
-   {
-      return ltrim( rtrim( source ) );
-   }
-
-   /* remove leading whitespace */
-   private static String ltrim( final String source )
-   {
-      return source.replaceAll( "^\\s+",
-                                "" );
-   }
-
-   private static String readLine( final BufferedReader inReader ) throws IOException
-   {
-      final String line = inReader.readLine();
-
-      if ( line != null )
-      {
-         return line.replaceAll( "\uFEFF",
-                                 "" );
-      }
-      return null;
-   }
-
-   /* remove trailing whitespace */
-   private static String rtrim( final String source )
-   {
-      return source.replaceAll( "\\s+$",
-                                "" );
-   }
-
-   private FileUtils()
-   {
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/main/java/com/adobe/ac/pmd/LoggerUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/main/java/com/adobe/ac/pmd/LoggerUtils.java b/FlexPMD/as3-plugin-utils/src/main/java/com/adobe/ac/pmd/LoggerUtils.java
deleted file mode 100644
index 007db33..0000000
--- a/FlexPMD/as3-plugin-utils/src/main/java/com/adobe/ac/pmd/LoggerUtils.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.logging.LogManager;
-
-public final class LoggerUtils
-{
-   public void loadConfiguration()
-   {
-      try
-      {
-         if ( System.getProperty( "java.util.logging.config.file" ) == null )
-         {
-            final InputStream resourceAsStream = getClass().getResourceAsStream( "/logger.properties" );
-            LogManager.getLogManager().readConfiguration( resourceAsStream );
-         }
-      }
-      catch ( final SecurityException e )
-      {
-         e.printStackTrace();
-      }
-      catch ( final IOException e )
-      {
-         e.printStackTrace();
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/main/java/com/adobe/ac/utils/StackTraceUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/main/java/com/adobe/ac/utils/StackTraceUtils.java b/FlexPMD/as3-plugin-utils/src/main/java/com/adobe/ac/utils/StackTraceUtils.java
deleted file mode 100644
index 179d1f5..0000000
--- a/FlexPMD/as3-plugin-utils/src/main/java/com/adobe/ac/utils/StackTraceUtils.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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.utils;
-
-/**
- * @author xagnetti
- */
-public final class StackTraceUtils
-{
-   /**
-    * Pretty print the first two lines of the stacktrace of the given exception
-    * 
-    * @param exception Exception to print
-    * @return The first two lines of the stacktrace
-    */
-   public static String print( final Exception exception )
-   {
-      final StringBuffer buffer = new StringBuffer();
-
-      buffer.append( exception.getMessage()
-            + " at " + exception.getStackTrace()[ 0 ] + "\n" );
-      buffer.append( exception.getStackTrace()[ 1 ]
-            + "\n" + exception.getStackTrace()[ 2 ] );
-      return buffer.toString();
-   }
-
-   /**
-    * Pretty print the first two lines of the stacktrace of the given exception,
-    * specifying which file the exception was thrown on.
-    * 
-    * @param fileName current fileName
-    * @param exception exception thrown
-    * @return error message
-    */
-   public static String print( final String fileName,
-                               final Exception exception )
-   {
-      return "on "
-            + fileName + " " + print( exception );
-   }
-
-   private StackTraceUtils()
-   {
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/main/resources/logger.properties
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/main/resources/logger.properties b/FlexPMD/as3-plugin-utils/src/main/resources/logger.properties
deleted file mode 100644
index da1fe6f..0000000
--- a/FlexPMD/as3-plugin-utils/src/main/resources/logger.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-# 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.
-
-com.adobe.ac.cpd.commandline.FlexCPD.level=SEVERE
-com.adobe.ac.pmd.commandline.FlexPMD.level=SEVERE
-com.adobe.ac.pmd.metrics.commandline.FlexMetrics.level=SEVERE
-com.adobe.ac.pmd.files.FileSetUtils.level=WARNING
-com.adobe.ac.pmd.rules.core.AbstractFlexRule.leve=INFO
-com.adobe.ac.pmd.FlexPmdViolations.level=WARNING
-com.adobe.ac.pmd.ResourcesManagerTest.level=WARNING

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/test/java/com/adobe/ac/ncss/utils/TestFileUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/test/java/com/adobe/ac/ncss/utils/TestFileUtils.java b/FlexPMD/as3-plugin-utils/src/test/java/com/adobe/ac/ncss/utils/TestFileUtils.java
deleted file mode 100644
index ab0cec7..0000000
--- a/FlexPMD/as3-plugin-utils/src/test/java/com/adobe/ac/ncss/utils/TestFileUtils.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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.ncss.utils;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.junit.Test;
-
-import com.adobe.ac.ncss.filters.FlexFilter;
-
-public class TestFileUtils extends TestCase
-{
-   @Test
-   public void testIsLineACorrectStatement()
-   {
-      assertFalse( FileUtils.isLineACorrectStatement( "    { " ) );
-      assertFalse( FileUtils.isLineACorrectStatement( "    } " ) );
-      assertFalse( FileUtils.isLineACorrectStatement( "{" ) );
-      assertFalse( FileUtils.isLineACorrectStatement( "}" ) );
-      assertFalse( FileUtils.isLineACorrectStatement( "    class MyModel " ) );
-      assertFalse( FileUtils.isLineACorrectStatement( "class MyModel" ) );
-      assertFalse( FileUtils.isLineACorrectStatement( "function lala() : void" ) );
-      assertFalse( FileUtils.isLineACorrectStatement( "var i : int" ) );
-      assertFalse( FileUtils.isLineACorrectStatement( "lalla; cdcdvf" ) );
-      assertTrue( FileUtils.isLineACorrectStatement( "var i : int;" ) );
-      assertTrue( FileUtils.isLineACorrectStatement( "  foo( bar );" ) );
-      assertTrue( FileUtils.isLineACorrectStatement( "lalla;" ) );
-   }
-
-   @Test
-   public void testListFiles()
-   {
-      assertEquals( 12,
-                    FileUtils.listFiles( new File( "src/test/resources" ),
-                                         new FlexFilter(),
-                                         true ).size() );
-
-      final List< File > sourceDirectory = new ArrayList< File >();
-
-      sourceDirectory.add( new File( "src/test/resources/com/adobe/ac/ncss/flexunit" ) );
-      sourceDirectory.add( new File( "src/test/resources/com/adobe/ac/ncss/mxml" ) );
-
-      assertEquals( 12,
-                    FileUtils.listFiles( sourceDirectory,
-                                         new FlexFilter(),
-                                         true ).size() );
-
-      assertEquals( 0,
-                    FileUtils.listFiles( new File( "./src/main/java" ),
-                                         new FlexFilter(),
-                                         true ).size() );
-   }
-
-   @Test
-   public void testReadFile() throws IOException
-   {
-      assertEquals( 75,
-                    FileUtils.readFile( new File( "./src/test/resources/com/adobe/ac/ncss/mxml/IterationsList.mxml" ) )
-                             .size() );
-
-      assertEquals( 0,
-                    FileUtils.readFile( new File( "./DoNotExistFile.as" ) ).size() );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/test/java/com/adobe/ac/utils/StackTraceUtilsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/test/java/com/adobe/ac/utils/StackTraceUtilsTest.java b/FlexPMD/as3-plugin-utils/src/test/java/com/adobe/ac/utils/StackTraceUtilsTest.java
deleted file mode 100644
index cc81ab8..0000000
--- a/FlexPMD/as3-plugin-utils/src/test/java/com/adobe/ac/utils/StackTraceUtilsTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.utils;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-
-public class StackTraceUtilsTest
-{
-   @SuppressWarnings("serial")
-   private static class CustomException extends Exception
-   {
-      public CustomException( final String message )
-      {
-         super( message );
-      }
-   }
-
-   @Test
-   public void testPrint()
-   {
-      final Exception exception = new CustomException( "message" );
-
-      assertEquals( "stackTrace is not correct",
-                    "message at com.adobe.ac.utils.StackTraceUtilsTest.testPrint(StackTraceUtilsTest.java:51)\n"
-                          + "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n"
-                          + "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)",
-                    StackTraceUtils.print( exception ) );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/AbstractRowData.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/AbstractRowData.as b/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/AbstractRowData.as
deleted file mode 100644
index a82beba..0000000
--- a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/AbstractRowData.as
+++ /dev/null
@@ -1,115 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 flexunit.flexui.data
-{
-   import flexunit.flexui.controls.FlexUnitLabels;
-   
-   import mx.formatters.NumberFormatter;
-   
-   /**
-    * Abstract class representing a row in the test cases tree.
-    * A row can be either a test class (node) or a test case (leaf)
-    */   
-   public class AbstractRowData
-   {
-      public var label : String;
-      public var qualifiedClassName : String;
-      public var testSuccessful : Boolean;
-      public var testIsFailure : Boolean;
-
-      /**
-       * @return the class name from the qualified class name
-       */      
-      public function get className() : String
-      {
-         if ( qualifiedClassName )
-         {
-            var splitIndex : int = qualifiedClassName.lastIndexOf( "::" );
-
-            if ( splitIndex >= 0 )
-            {
-               return qualifiedClassName.substring( splitIndex + 2 );
-            }
-         }
-
-         return qualifiedClassName;
-      }
-
-      /**
-       * Abstract method. Defined in TestCaseRowData and in TestClassRowData
-       * 
-       * @return the count of assertions which have been made either in average if
-       * the current row is a test class or in total if the current row is a test case
-       */
-      public function get assertionsMade() : Number
-      {
-         throw new Error( "TestSummaryRowData::assertionsMade is an abstract method" );
-      }
-
-      public function get failIcon() : Class
-      {
-         throw new Error( "TestSummaryRowData::failIcon is an abstract method" );
-      }
-
-      public function get passIcon() : Class
-      {
-         throw new Error( "TestSummaryRowData::passIcon is an abstract method" );
-      }
-      
-      /**
-       * Abstract method which allows the legend to be correctly formatted.
-       *  
-       * @return true for the TestClassRowData and false for the TestCaseRowData
-       */      
-      public function get isAverage() : Boolean
-      {
-         throw new Error( "TestSummaryRowData::isAverage is an abstract method" );
-      }
-      
-      public function get formattedAssertionsMade() : String
-      {
-         var f : NumberFormatter = new NumberFormatter();
-         
-         f.precision = 2;
-         f.rounding = "nearest";
-         
-         return f.format( assertionsMade );
-      }
-      
-      /**
-       * @return the correcly formatted (no typos) legend for the number of assertions
-       * made.
-       * 
-       * Can return :
-       *  - 0 assertions have been made in average
-       *  - 0 assertions have been made in total
-       *  - 1 assertion has been made in average
-       *  - 1 assertion has been made in total
-       *  - 2 assertions have been made in average
-       *  - 2 assertions have been made in total
-       */      
-      public function get assertionsMadeLegend() : String
-      {
-         return FlexUnitLabels.formatAssertions( 
-                           formattedAssertionsMade,
-                           assertionsMade,
-                           isAverage );
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/FilterTestsModel.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/FilterTestsModel.as b/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/FilterTestsModel.as
deleted file mode 100644
index 91d5ece..0000000
--- a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/FilterTestsModel.as
+++ /dev/null
@@ -1,74 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 flexunit.flexui.data
-{
-   import flash.events.EventDispatcher;
-   
-   import flexunit.flexui.data.filter.ITestFunctionStatus;
-   import flexunit.flexui.event.TestRunnerBasePresentationModelProperyChangedEvent;
-   
-   import mx.collections.IList;
-
-   [Event( 
-      name="filterChanged", 
-      type="flash.events.Event")]
-   
-   public class FilterTestsModel extends EventDispatcher
-   {
-      public var filter : String;
-      
-      private var _selectedTestFunctionStatus : ITestFunctionStatus;
-
-      public function searchFilterFunc( item : Object ) : Boolean
-      {
-         if ( item is TestCaseData )
-         {
-            var testClassSum : TestCaseData = item as TestCaseData;
-
-            testClassSum.filterText = filter;
-            testClassSum.selectedTestFunctionStatus = _selectedTestFunctionStatus;
-            testClassSum.refresh();
-
-            var testCaseChildren : IList = testClassSum.children;
-
-            if ( testCaseChildren && testCaseChildren.length > 0 )
-            {
-               return true;
-            }
-         }
-
-         return false;
-      }
-      
-      public function set selectedTestFunctionStatus( value : ITestFunctionStatus ) : void
-      {
-         _selectedTestFunctionStatus = value;
-         
-         dispatchEvent(
-               new TestRunnerBasePresentationModelProperyChangedEvent( 
-                     TestRunnerBasePresentationModelProperyChangedEvent.FILTER_CHANGED, 
-                     true ) );
-      }
-
-      public function get selectedTestFunctionStatus() : ITestFunctionStatus
-      {
-         return _selectedTestFunctionStatus;
-      }
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestCaseData.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestCaseData.as b/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestCaseData.as
deleted file mode 100644
index 069037a..0000000
--- a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestCaseData.as
+++ /dev/null
@@ -1,139 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 flexunit.flexui.data
-{
-   import flexunit.flexui.data.filter.ITestFunctionStatus;
-   import flexunit.flexui.data.filter.TestfFunctionStatuses;
-   
-   import mx.collections.ArrayCollection;
-   import mx.collections.IList;
-   import mx.collections.ListCollectionView;
-
-   public class TestCaseData extends AbstractRowData
-   {
-      public var testFunctions : IList = new ArrayCollection();
-      public var filterText : String;
-      public var selectedTestFunctionStatus : ITestFunctionStatus = TestfFunctionStatuses.ALL;
-      
-      [Embed(source="/assets/pass_small.png")]
-      private static var passImg : Class;
-
-      [Embed(source="/assets/fail_small.png")]
-      private static var failImg : Class;
-
-      private var _testsNumber : int;
-      private var _testsPassedNumber : int;
-
-      public function TestCaseData( testFunction : TestFunctionRowData )
-      {
-         label = testFunction.className;
-         qualifiedClassName = testFunction.qualifiedClassName;
-         testFunctions = new ArrayCollection();
-         testSuccessful = true;
-         _testsNumber = 0;
-         _testsPassedNumber = 0;
-      }
-
-      public function get children() : IList
-      {
-         return testFunctions;
-      }
-
-      override public function get failIcon() : Class
-      {
-         return failImg;
-      }
-
-      override public function get passIcon() : Class
-      {
-         return passImg;
-      }
-      
-      override public function get isAverage() : Boolean
-      {
-         return true;
-      }
-
-      public function get testsNumber() : int
-      {
-         return _testsNumber;
-      }
-
-      public function get passedTestsNumber() : int
-      {
-         return _testsPassedNumber;
-      }
-      
-      override public function get assertionsMade() : Number
-      {
-         var currentAssertionsMade : Number = 0;
-         
-         for each ( var test : TestFunctionRowData in testFunctions )
-         {
-            currentAssertionsMade += test.assertionsMade;
-         }
-         
-         if ( testFunctions.length > 0 )
-         {
-            return currentAssertionsMade / testFunctions.length;
-         }
-         return 0;
-      }
-      
-      public function addTest( testFunctionToAdd : TestFunctionRowData ) : void
-      {
-         testFunctionToAdd.parentTestCaseSummary = this;
-         if ( ! testFunctionToAdd.testSuccessful )
-         {
-            testSuccessful = false;
-         }
-         else
-         {
-            _testsPassedNumber++;
-         }
-         _testsNumber++;
-         testFunctions.addItem( testFunctionToAdd );
-      }
-
-      public function refresh() : void
-      {
-         var filteredChildren : ListCollectionView = testFunctions as ListCollectionView;
-         if ( filteredChildren )
-         {
-            filteredChildren.filterFunction = searchFilterFunc;
-            filteredChildren.refresh();
-         }
-      }
-
-      private function searchFilterFunc( item : Object ) : Boolean
-      {
-         var testFunction : TestFunctionRowData = item as TestFunctionRowData;
-         if ( ( className && className.toLowerCase().indexOf( filterText.toLowerCase() ) != - 1 ) ||
-              filterText == null ||
-              filterText == "" ||
-              testFunction.isVisibleOnFilterText( filterText.toLowerCase() ) )
-         {
-            if ( selectedTestFunctionStatus.isTestFunctionVisible( testFunction ) )
-               return true;
-         }
-
-         return false;
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestFunctionRowData.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestFunctionRowData.as b/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestFunctionRowData.as
deleted file mode 100644
index 0bb4779..0000000
--- a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestFunctionRowData.as
+++ /dev/null
@@ -1,217 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 flexunit.flexui.data
-{
-   import flexunit.flexui.patterns.*;
-   import flexunit.framework.TestCase;
-   
-   import mx.formatters.NumberFormatter;
-
-   public class TestFunctionRowData extends AbstractRowData
-   {
-      public static const EMPTY_STRING : String = "-";
-
-      private const patterns : Array =
-          [
-             new AssertNotContainedPattern(),
-             new AssertNoMatchPattern(),
-             new AssertMatchPattern(),
-             new AssertContainedPattern(),
-             new AssertEventOcurredPattern(),
-             new AssertEqualsPattern(),
-             new AssertNotNullPattern(),
-             new AssertNotUndefinedPattern(),
-             new AssertNullPattern(),
-             new AssertUndefinedPattern(),
-             new FailAsyncCallPattern()
-          ];
-
-      public var testCase : TestCase;
-      public var testMethodName : String;
-      public var parentTestCaseSummary : TestCaseData;
-      public var expectedResult : String;
-      public var actualResult : String;
-
-      private var _errorMessage : String;
-      private var _stackTrace : String;
-      private var _error : Error;
-      private var _location : String;
-      private var _line : Number;
-
-      [Embed(source="/assets/pass_mini.png")]
-      private static var passImgMini : Class;
-
-      [Embed(source="/assets/fail_mini.png")]
-      private static var failImgMini : Class;
-
-      override public function get failIcon() : Class
-      {
-         return failImgMini;
-      }
-
-      override public function get passIcon() : Class
-      {
-         return passImgMini;
-      }
-      
-      override public function get assertionsMade() : Number
-      {
-         return testCase.assertionsMade;
-      }
-
-      override public function get formattedAssertionsMade() : String
-      {
-         var f : NumberFormatter = new NumberFormatter();
-         
-         f.precision = 0;
-         f.rounding = "nearest";
-         
-         return f.format( assertionsMade );
-      }
-      
-      override public function get isAverage() : Boolean
-      {
-         return false;
-      }
-
-      public function set error( value : Error ) : void
-      {
-         _error = value;
-
-         _errorMessage = error ? error.message : EMPTY_STRING;
-         expectedResult = EMPTY_STRING;
-         actualResult = EMPTY_STRING;
-
-         if ( error != null && error.getStackTrace() )
-         {
-            _stackTrace = formatStack( value.getStackTrace().replace( "<", "&lt;" ).replace( ">", "&gt;" ) );
-
-            for ( var i : int = 0 ; i < patterns.length; i++ )
-            {
-               var pattern : AbstractPattern = AbstractPattern( patterns[ i ] );
-
-               if( pattern.match( error.message ) )
-               {
-                  pattern.apply( this );
-                  break;
-               }
-            }
-         }
-      }
-
-      public function get error() : Error
-      {
-         return _error;
-      }
-
-      public function get errorMessage() : String
-      {
-         return _errorMessage;
-      }
-
-      public function get location() : String
-      {
-         if( _location )
-         {
-            return _location + " (l." + _line + ")";
-         }
-         return EMPTY_STRING;
-      }
-
-      public function get stackTrace() : String
-      {
-         return _stackTrace;
-      }
-      
-      public function get stackTraceToolTip() : String
-      {
-         if ( _stackTrace == null )
-            return null;
-            
-         var regexp : RegExp = /\(\)\[.*\\.*\:(\d*)\]/gm;
-         var array : Array = _stackTrace.split( "<br/>" );
-         var stackTraceToolTip : String = "";
-         
-         for ( var i : int = 0; i < array.length; i++ )
-         {
-            stackTraceToolTip += array[ i ].toString().replace( regexp, "() at l.$1" ) + "<br/>";
-         }
-         return stackTraceToolTip;
-      }
-      
-      public function isVisibleOnFilterText( filter : String ) : Boolean
-      {
-         return testMethodName.toLowerCase().indexOf( filter ) > -1 ||
-                actualResult.toLowerCase().indexOf( filter ) > -1 ||
-                expectedResult.toLowerCase().indexOf( filter ) > -1
-      }
-
-      private function extractLocation( line : String ) : Boolean
-      {
-
-         var location : RegExp = /(.*):(\d+)\]$/
-         var splittedLine : Array = line.split( "\\" );
-         var results : Array = location.exec( splittedLine[ splittedLine.length - 1 ] ) as Array;
-
-         if( results && results.length == 3 )
-         {
-            _location = results[ 1 ];
-            _line = results [ 2 ];
-
-            return true;
-         }
-
-        return false;
-      }
-
-      private function formatStack( stackTrace : String ) : String
-      {
-         var replaceNewLine : RegExp = /\n/mg;
-         var html : String = stackTrace.replace( replaceNewLine, "<br/>" );
-         var formattedStack : String = "";
-         var isFirst : Boolean = true;
-
-         for ( var i : int = 1; i < html.split( "<br/>" ).length; i++ )
-         {
-            var currentLine : String = html.split( "<br/>" )[ i ];
-            var matchingFlexunit : RegExp = /(at flexunit.*)$/g;
-            var matchingFlash : RegExp = /(at flash.*)$/g;
-            var matchingFlex : RegExp = /(at mx.*)$/g;
-            var matchingFunction : RegExp = /at Function\/http:\/\/adobe\.com\/AS3\//
-
-            if( ! matchingFlex.test( currentLine ) &&
-                ! matchingFlexunit.test( currentLine ) &&
-                ! matchingFlash.test( currentLine ) &&
-                ! matchingFunction.test( currentLine ) )
-            {
-               if( isFirst && extractLocation( currentLine ) )
-               {
-                  isFirst = false;
-               }
-               formattedStack += "<b>" + currentLine + "</b><br/>";
-            }
-            else
-            {
-               formattedStack += currentLine + "<br/>";
-            }
-         }
-         return formattedStack;
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestRunnerBasePresentationModel.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestRunnerBasePresentationModel.as b/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestRunnerBasePresentationModel.as
deleted file mode 100644
index d5fe259..0000000
--- a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestRunnerBasePresentationModel.as
+++ /dev/null
@@ -1,315 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 flexunit.flexui.data
-{
-   import flash.events.Event;
-   import flash.events.EventDispatcher;
-   import flash.utils.getTimer;
-   
-   import flexunit.flexui.event.TestRunnerBasePresentationModelProperyChangedEvent;
-   import flexunit.framework.TestCase;
-   
-   import mx.collections.ArrayCollection;
-   import mx.collections.IList;
-   import mx.collections.ListCollectionView;
-
-   [Event( name="rowSelectedChanged",          type="flash.events.Event")]
-   [Event( name="testSuiteRunDurationChanged", type="flash.events.Event")]
-   [Event( name="totalErrorsChanged",          type="flash.events.Event")]
-   [Event( name="totalFailuresChanged",        type="flash.events.Event")]
-   [Event( name="progressChanged",             type="flash.events.Event")]
-   [Event( name="filterChanged",               type="flash.events.Event")]
-   [Event( name="filterEnableChanged",         type="flash.events.Event")]
-
-   public class TestRunnerBasePresentationModel extends EventDispatcher
-   {
-      public var totalTests : int;
-      public var filterModel : FilterTestsModel = new FilterTestsModel();
-      private var _rowSelected : AbstractRowData;
-
-      private var _totalErrors : int;
-      private var _totalFailures : int;
-      private var _numTestsRun : int;
-
-      private var _testSuiteStartTime : int;
-      private var _testSuiteEndTime : int;
-
-
-      private var _allTestsTreeCollection : ListCollectionView;
-      private var _errorTestsTreeCollection : ListCollectionView;
-      private var _testClassMap : Object = new Object();
-      private var _errorTestClassMap : Object = new Object();
-      private var _filterSectionEnabled : Boolean = false;
-      private var _testsRunning : Boolean;
-      private var errorHasBeenFound : Boolean = false;
-      
-      public function TestRunnerBasePresentationModel()
-      {
-         filterModel.addEventListener( 
-            TestRunnerBasePresentationModelProperyChangedEvent.FILTER_CHANGED,
-            handleFilterChanged )
-      }
-      
-      public function get dataProvider() : ListCollectionView
-      {
-         if( _testsRunning )
-         {
-            return _errorTestsTreeCollection;
-         }
-         else
-         {
-            return _allTestsTreeCollection;
-         }
-      }
-      
-      public function get testsRunning() : Boolean
-      {
-         return _testsRunning;
-      }
-
-      public function set filterSectionEnabled( value : Boolean ) : void
-      {
-         _filterSectionEnabled = value;
-
-         dispatchPropertyChanged(
-               TestRunnerBasePresentationModelProperyChangedEvent.FILTER_ENABLE_CHANGED );
-      }
-
-      public function get filterSectionEnabled() : Boolean
-      {
-         return _filterSectionEnabled;
-      }
-
-      public function set numTestsRun( value : int ) : void
-      {
-         _numTestsRun = value;
-
-         dispatchPropertyChanged(
-               TestRunnerBasePresentationModelProperyChangedEvent.PROGRESS_CHANGED );
-      }
-
-      public function get numTestsRun() : int
-      {
-         return _numTestsRun;
-      }
-
-      public function get totalFailures() : int
-      {
-         return _totalFailures;
-      }
-
-      public function get totalErrors() : int
-      {
-         return _totalErrors;
-      }
-
-      public function get suiteDurationFormatted() : String
-      {
-         return ( ( _testSuiteEndTime - _testSuiteStartTime ) / 1000 ) + " seconds";
-      }
-
-      public function set rowSelected( value : AbstractRowData ) : void
-      {
-         _rowSelected = value;
-
-         dispatchPropertyChanged(
-               TestRunnerBasePresentationModelProperyChangedEvent.ROW_SELECTED_CHANGED );
-      }
-
-      public function get rowSelected() : AbstractRowData
-      {
-         return _rowSelected;
-      }
-
-      public function get testFunctionSelected() : TestFunctionRowData
-      {
-         return _rowSelected as TestFunctionRowData;
-      }
-
-      public function get testCaseSelected() : TestCaseData
-      {
-         return _rowSelected as TestCaseData;
-      }
-
-      public function addFailure() : void
-      {
-         _totalFailures++;
-
-         dispatchPropertyChanged(
-               TestRunnerBasePresentationModelProperyChangedEvent.TOTAL_FAILURES_CHANGED );
-      }
-
-      public function addError() : void
-      {
-         _totalErrors++;
-
-         dispatchPropertyChanged(
-               TestRunnerBasePresentationModelProperyChangedEvent.TOTAL_ERRORS_CHANGED );
-      }
-
-      public function launchTests() : void
-      {
-         _testsRunning = true;
-         _testSuiteStartTime = getTimer();
-
-         _allTestsTreeCollection = new ArrayCollection();
-         _allTestsTreeCollection.filterFunction = filterModel.searchFilterFunc;
-         
-         _errorTestsTreeCollection = new ArrayCollection();         
-      }
-
-      public function endTimer() : void
-      {
-         _testsRunning = false;
-         
-         _testSuiteEndTime = getTimer();
-
-         dispatchPropertyChanged(
-               TestRunnerBasePresentationModelProperyChangedEvent.TOTAL_FAILURES_CHANGED );
-         dispatchPropertyChanged(
-               TestRunnerBasePresentationModelProperyChangedEvent.TEST_SUITE_RUN_DURATION_CHANGED );
-         dispatchPropertyChanged(
-               TestRunnerBasePresentationModelProperyChangedEvent.TOTAL_ERRORS_CHANGED );
-      }
-
-      public function addTestRowToHierarchicalList(
-                  testCase : TestCase,
-                  error : Error,
-                  success : Boolean,
-                  isFailure : Boolean ) : TestFunctionRowData
-      {
-         var rowToAdd : TestFunctionRowData = new TestFunctionRowData();
-         var parentRow : TestCaseData;
-
-         rowToAdd.label = testCase.methodName;
-         rowToAdd.qualifiedClassName = testCase.className;
-         rowToAdd.testSuccessful = success;
-         rowToAdd.testIsFailure = isFailure;
-         rowToAdd.testMethodName = testCase.methodName;
-         rowToAdd.testCase = testCase;
-         rowToAdd.error = error;
-         
-
-         parentRow = findTestCaseParentRowInAllTests( rowToAdd );
-
-         if ( parentRow && parentRow.testFunctions as IList )
-         {
-            parentRow.addTest( rowToAdd );
-         }
-
-         if( ! success )
-         {
-            parentRow = findTestCaseParentRowInErrorTests( rowToAdd );
-            
-            if ( parentRow && parentRow.testFunctions as IList )
-            {
-               parentRow.addTest( rowToAdd );
-            }
-         }
-
-         return rowToAdd;
-      }
-
-      private function findTestCaseParentRowInAllTests( 
-               testFunction : TestFunctionRowData ) : TestCaseData
-      {
-         var testCaseParentRow : TestCaseData;
-
-         // Check local _currentTestClassRow to see if it's the correct Test Class Summary object
-         if ( testCaseSelected &&
-              testCaseSelected.qualifiedClassName == testFunction.qualifiedClassName )
-         {
-            testCaseParentRow = testCaseSelected;
-         }
-         else if ( _testClassMap[ testFunction.qualifiedClassName ] != null )
-         {
-            // Lookup testClassName in object map
-            testCaseParentRow = _testClassMap[ testFunction.qualifiedClassName ] as TestCaseData;
-         }
-
-         if ( ! errorHasBeenFound )
-         {
-            rowSelected = testFunction;
-         }
-
-         if ( testCaseParentRow )
-         {
-            return testCaseParentRow;
-         }
-         else
-         {
-            // Else create a new row and add it to the list
-            testCaseParentRow = new TestCaseData( testFunction );
-            
-            // Mark _currentTestClassRow and add the new testClassName to object map
-
-            _testClassMap[ testFunction.qualifiedClassName ] = testCaseParentRow;
-
-            _allTestsTreeCollection.addItem( testCaseParentRow );
-         }
-
-         return testCaseParentRow;
-      }
-
-      private function findTestCaseParentRowInErrorTests( 
-               testFunction : TestFunctionRowData ) : TestCaseData
-      {
-         var testCaseParentRow : TestCaseData;
-
-         if ( _errorTestClassMap[ testFunction.qualifiedClassName ] != null )
-         {
-            // Lookup testClassName in object map
-            testCaseParentRow = _errorTestClassMap[ testFunction.qualifiedClassName ] as TestCaseData;
-         }
-
-         if ( testCaseParentRow )
-         {
-            return testCaseParentRow;
-         }
-         else
-         {
-            // Else create a new row and add it to the list
-            testCaseParentRow = new TestCaseData( testFunction );
-
-            // Mark _currentTestClassRow and add the new testClassName to object map
-
-            rowSelected = testFunction;
-            
-            errorHasBeenFound = true;
-
-            _errorTestClassMap[ testFunction.qualifiedClassName ] = testCaseParentRow;
-
-            _errorTestsTreeCollection.addItem( testCaseParentRow );
-         }
-
-         return testCaseParentRow;
-      }
-      
-      private function handleFilterChanged( event : Event ) : void
-      {
-         dispatchEvent( event.clone() );
-      }
-      
-      private function dispatchPropertyChanged( type : String ) : void
-      {
-         dispatchEvent(
-               new TestRunnerBasePresentationModelProperyChangedEvent( type ) );
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/AllTestFunctionStatus.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/AllTestFunctionStatus.as b/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/AllTestFunctionStatus.as
deleted file mode 100644
index 560f9df..0000000
--- a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/AllTestFunctionStatus.as
+++ /dev/null
@@ -1,36 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 flexunit.flexui.data.filter
-{
-   import flexunit.flexui.controls.FlexUnitLabels;
-   import flexunit.flexui.data.TestFunctionRowData;
-
-   public class AllTestFunctionStatus implements ITestFunctionStatus
-   {
-      public function isTestFunctionVisible( test : TestFunctionRowData ) : Boolean
-      {
-         return true;
-      }
-      
-      public function get label() : String
-      {
-         return FlexUnitLabels.ALL;
-      }
-   }
-}
\ No newline at end of file


[02/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD181.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD181.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD181.as
new file mode 100644
index 0000000..bd94928
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD181.as
@@ -0,0 +1,2344 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.as3commons.lang {
+	
+	/**
+	 * <p>Methods in this class give sample code to explain their operation.
+	 * The symbol <code>*</code> is used to indicate any input
+	 * including <code>null</code>.</p>
+	 *
+	 * @author Steffen Leistner
+	 * @author Christophe Herreman
+	 */
+	public class StringUtils { // NO PMD TooManyFunction TooManyPublic
+		
+		/**
+		 * The empty String <code>""</code>
+		 */
+		private static const EMPTY:String = '';
+		
+		/**
+		 * Represents a failed index search.
+		 */
+		private static const INDEX_NOT_FOUND:int = -1;
+		
+		/**
+		 * The control character code
+		 */
+		private static const WHITE:uint = 32;
+		
+		/**
+		 * <p>The maximum size to which the padding constant(s) can expand.</p>
+		 */
+		private static const PAD_LIMIT:uint = 8192;
+		
+		/**
+		 * <p>Returns a simple Initials like string.</p>
+		 *
+		 * StringUtils.toInitials("stringutils") 		= s
+		 * StringUtils.toInitials("stringUtils") 		= su
+		 * StringUtils.toInitials("stringUtilsTest") 	= sut
+		 */
+		public static function toInitials(str:String):String {
+			if (isEmpty(str)) {
+				return str;
+			}
+			return str.match(/[A-Z]/g).join('').toLowerCase();
+		}
+		
+		/**
+		 * <p>Removes one newline from end of a String if it's there,
+		 * otherwise leave it alone.  A newline is &quot;<code>\n</code>&quot;,
+		 * &quot;<code>\r</code>&quot;, or &quot;<code>\r\n</code>&quot;.</p>
+		 *
+		 * <pre>
+		 * StringUtils.chomp(null)          = null
+		 * StringUtils.chomp("")            = ""
+		 * StringUtils.chomp("abc \r")      = "abc "
+		 * StringUtils.chomp("abc\n")       = "abc"
+		 * StringUtils.chomp("abc\r\n")     = "abc"
+		 * StringUtils.chomp("abc\r\n\r\n") = "abc\r\n"
+		 * StringUtils.chomp("abc\n\r")     = "abc\n"
+		 * StringUtils.chomp("abc\n\rabc")  = "abc\n\rabc"
+		 * StringUtils.chomp("\r")          = ""
+		 * StringUtils.chomp("\n")          = ""
+		 * StringUtils.chomp("\r\n")        = ""
+		 * </pre>
+		 *
+		 * @param str  the String to chomp a newline from, may be null
+		 * @return String without newline, <code>null</code> if null String input
+		 */
+		public static function chomp(str:String):String {
+			return chompString(str, '(\r\n|\r|\n)');
+		}
+		
+		/**
+		 * <p>Removes <code>separator</code> from the end of
+		 * <code>str</code> if it's there, otherwise leave it alone.</p>
+		 *
+		 * <p>It now more closely matches Perl chomp.
+		 * For the previous behavior, use #substringBeforeLast(String, String).
+		 * This method uses #endsWith(String).</p>
+		 *
+		 * <pre>
+		 * StringUtils.chompString(null, *)         = null
+		 * StringUtils.chompString("", *)           = ""
+		 * StringUtils.chompString("foobar", "bar") = "foo"
+		 * StringUtils.chompString("foobar", "baz") = "foobar"
+		 * StringUtils.chompString("foo", "foo")    = ""
+		 * StringUtils.chompString("foo ", "foo")   = "foo "
+		 * StringUtils.chompString(" foo", "foo")   = " "
+		 * StringUtils.chompString("foo", "foooo")  = "foo"
+		 * StringUtils.chompString("foo", "")       = "foo"
+		 * StringUtils.chompString("foo", null)     = "foo"
+		 * </pre>
+		 *
+		 * @param str  the String to chomp from, may be null
+		 * @param separator  separator String, may be null
+		 * @return String without trailing separator, <code>null</code> if null String input
+		 */
+		public static function chompString(str:String, separator:String):String {
+			if (isEmpty(str) || separator == null) {
+				return str;
+			}
+			return str.replace(new RegExp(separator + '$', ''), '')
+		}
+		
+		/**
+		 * <p>Removes control characters(char &lt;= 32) from both
+		 * ends of this String, handling <code>null</code> by returning
+		 * <code>null</code>.</p>
+		 *
+		 * <p>Trim removes start and end characters &lt;= 32.
+		 * To strip whitespace use #strip(String).</p>
+		 *
+		 * <p>To trim your choice of characters, use the
+		 * #strip(String, String) methods.</p>
+		 *
+		 * <pre>
+		 * StringUtils.trim(null)          = null
+		 * StringUtils.trim("")            = ""
+		 * StringUtils.trim("     ")       = ""
+		 * StringUtils.trim("abc")         = "abc"
+		 * StringUtils.trim("    abc    ") = "abc"
+		 * </pre>
+		 *
+		 * @param str  the String to be trimmed, may be null
+		 * @return the trimmed string, <code>null</code> if null String input
+		 */
+		public static function trim(str:String):String {
+			if (str == null) {
+				return null;
+			}
+			return str.replace(/^\s*/, '').replace(/\s*$/, '');
+		}
+		
+		/**
+		 * <p>Deletes all 'space' characters from a String as defined by
+		 *
+		 * <pre>
+		 * StringUtils.deleteSpaces(null)           = null
+		 * StringUtils.deleteSpaces("")             = ""
+		 * StringUtils.deleteSpaces("abc")          = "abc"
+		 * StringUtils.deleteSpaces(" \tabc \n ") = " abc  "
+		 * StringUtils.deleteSpaces("a\nb\tc     ") = "abc     "
+		 * </pre>
+		 *
+		 * <p>Spaces are defined as <code>{'\t', '\r', '\n', '\b'}</code>
+		 * in line with the deprecated <code>isSpace</code> method.</p>
+		 *
+		 * @param str  the String to delete spaces from, may be null
+		 * @return the String without 'spaces', <code>null</code> if null String input
+		 */
+		public static function deleteSpaces(str:String):String {
+			return deleteFromString(str, /\t|\r|\n|\b/g);
+		}
+		
+		/**
+		 * <p>Deletes all whitespaces from a String.</p>
+		 *
+		 * <pre>
+		 * StringUtils.deleteWhitespace(null)         = null
+		 * StringUtils.deleteWhitespace("")           = ""
+		 * StringUtils.deleteWhitespace("abc")        = "abc"
+		 * StringUtils.deleteWhitespace("   ab  c  ") = "abc"
+		 * </pre>
+		 *
+		 * @param str  the String to delete whitespace from, may be null
+		 * @return the String without whitespaces, <code>null</code> if null String input
+		 */
+		public static function deleteWhitespace(str:String):String {
+			return deleteFromString(str, /\s/g);
+		}
+		
+		private static function deleteFromString(str:String, pattern:RegExp):String {
+			if (isEmpty(str)) {
+				return str;
+			}
+			return str.replace(pattern, '');
+		}
+		
+		/**
+		 * <p>Gets the leftmost <code>len</code> characters of a String.</p>
+		 *
+		 * <p>If <code>len</code> characters are not available, or the
+		 * String is <code>null</code>, the String will be returned without
+		 * an exception. An exception is thrown if len is negative.</p>
+		 *
+		 * <pre>
+		 * StringUtils.left(null, *)    = null
+		 * StringUtils.left(*, -ve)     = ""
+		 * StringUtils.left("", *)      = ""
+		 * StringUtils.left("abc", 0)   = ""
+		 * StringUtils.left("abc", 2)   = "ab"
+		 * StringUtils.left("abc", 4)   = "abc"
+		 * </pre>
+		 *
+		 * @param str  the String to get the leftmost characters from, may be null
+		 * @param len  the length of the required String, must be zero or positive
+		 * @return the leftmost characters, <code>null</code> if null String input
+		 */
+		public static function left(str:String, len:int):String {
+			if (str == null) {
+				return null;
+			}
+			
+			if (len < 0) {
+				return EMPTY;
+			}
+			
+			if (str.length <= len) {
+				return str;
+			}
+			return str.substring(0, len);
+		}
+		
+		/**
+		 * <p>Centers a String in a larger String of size <code>size</code>.
+		 * Uses a supplied String as the value to pad the String with.</p>
+		 *
+		 * <p>If the size is less than the String length, the String is returned.
+		 * A <code>null</code> String returns <code>null</code>.
+		 * A negative size is treated as zero.</p>
+		 *
+		 * <pre>
+		 * StringUtils.center(null, *, *)     = null
+		 * StringUtils.center("", 4, " ")     = "    "
+		 * StringUtils.center("ab", -1, " ")  = "ab"
+		 * StringUtils.center("ab", 4, " ")   = " ab "
+		 * StringUtils.center("abcd", 2, " ") = "abcd"
+		 * StringUtils.center("a", 4, " ")    = " a  "
+		 * StringUtils.center("a", 4, "yz")   = "yayz"
+		 * StringUtils.center("abc", 7, null) = "  abc  "
+		 * StringUtils.center("abc", 7, "")   = "  abc  "
+		 * </pre>
+		 *
+		 * @param str  the String to center, may be null
+		 * @param size  the int size of new String, negative treated as zero
+		 * @param padStr  the String to pad the new String with, must not be null or empty
+		 * @return centered String, <code>null</code> if null String input
+		 */
+		public static function center(str:String, size:int, padStr:String):String {
+			if (str == null || size <= 0) {
+				return str;
+			}
+			
+			if (isEmpty(padStr)) {
+				padStr = " ";
+			}
+			var strLen:int = str.length;
+			var pads:int = size - strLen;
+			
+			if (pads <= 0) {
+				return str;
+			}
+			str = leftPad(str, strLen + pads / 2, padStr);
+			str = rightPad(str, size, padStr);
+			
+			return str;
+		}
+		
+		/**
+		 * <p>Left pad a String with a specified String.</p>
+		 *
+		 * <p>Pad to a size of <code>size</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.leftPad(null, *, *)      = null
+		 * StringUtils.leftPad("", 3, "z")      = "zzz"
+		 * StringUtils.leftPad("bat", 3, "yz")  = "bat"
+		 * StringUtils.leftPad("bat", 5, "yz")  = "yzbat"
+		 * StringUtils.leftPad("bat", 8, "yz")  = "yzyzybat"
+		 * StringUtils.leftPad("bat", 1, "yz")  = "bat"
+		 * StringUtils.leftPad("bat", -1, "yz") = "bat"
+		 * StringUtils.leftPad("bat", 5, null)  = "  bat"
+		 * StringUtils.leftPad("bat", 5, "")    = "  bat"
+		 * </pre>
+		 *
+		 * @param str  the String to pad out, may be null
+		 * @param size  the size to pad to
+		 * @param padStr  the String to pad with, null or empty treated as single space
+		 * @return left padded String or original String if no padding is necessary,
+		 *  <code>null</code> if null String input
+		 */
+		public static function leftPad(str:String, size:int, padStr:String):String {
+			if (str == null) {
+				return null;
+			}
+			
+			if (isEmpty(padStr)) {
+				padStr = " ";
+			}
+			var padLen:int = padStr.length;
+			var strLen:int = str.length;
+			var pads:int = size - strLen;
+			
+			if (pads <= 0) {
+				return str; // returns original String when possible
+			}
+			
+			if (padLen == 1 && pads <= PAD_LIMIT) {
+				return leftPadChar(str, size, padStr.charAt(0));
+			}
+			
+			if (pads == padLen) {
+				return padStr.concat(str);
+			} else if (pads < padLen) {
+				return padStr.substring(0, pads).concat(str);
+			} else {
+				var padding:Array = [];
+				var padChars:Array = padStr.split("");
+				
+				for (var i:int = 0; i < pads; i++) {
+					padding[i] = padChars[i % padLen];
+				}
+				return padding.join("").concat(str);
+			}
+		}
+		
+		/**
+		 * <p>Left pad a String with a specified character.</p>
+		 *
+		 * <p>Pad to a size of <code>size</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.leftPadChar(null, *, *)     = null
+		 * StringUtils.leftPadChar("", 3, 'z')     = "zzz"
+		 * StringUtils.leftPadChar("bat", 3, 'z')  = "bat"
+		 * StringUtils.leftPadChar("bat", 5, 'z')  = "zzbat"
+		 * StringUtils.leftPadChar("bat", 1, 'z')  = "bat"
+		 * StringUtils.leftPadChar("bat", -1, 'z') = "bat"
+		 * </pre>
+		 *
+		 * @param str  the String to pad out, may be null
+		 * @param size  the size to pad to
+		 * @param padChar  the character to pad with
+		 * @return left padded String or original String if no padding is necessary,
+		 *  <code>null</code> if null String input
+		 */
+		public static function leftPadChar(str:String, size:int, padChar:String):String {
+			if (str == null) {
+				return null;
+			}
+			var pads:int = size - str.length;
+			
+			if (pads <= 0) {
+				return str; // returns original String when possible
+			}
+			
+			if (pads > PAD_LIMIT) {
+				return leftPad(str, size, padChar);
+			}
+			return padding(pads, padChar).concat(str);
+		}
+		
+		/**
+		 * <p>Right pad a String with a specified String.</p>
+		 *
+		 * <p>The String is padded to the size of <code>size</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.rightPad(null, *, *)      = null
+		 * StringUtils.rightPad("", 3, "z")      = "zzz"
+		 * StringUtils.rightPad("bat", 3, "yz")  = "bat"
+		 * StringUtils.rightPad("bat", 5, "yz")  = "batyz"
+		 * StringUtils.rightPad("bat", 8, "yz")  = "batyzyzy"
+		 * StringUtils.rightPad("bat", 1, "yz")  = "bat"
+		 * StringUtils.rightPad("bat", -1, "yz") = "bat"
+		 * StringUtils.rightPad("bat", 5, null)  = "bat  "
+		 * StringUtils.rightPad("bat", 5, "")    = "bat  "
+		 * </pre>
+		 *
+		 * @param str  the String to pad out, may be null
+		 * @param size  the size to pad to
+		 * @param padStr  the String to pad with, null or empty treated as single space
+		 * @return right padded String or original String if no padding is necessary,
+		 *  <code>null</code> if null String input
+		 */
+		public static function rightPad(str:String, size:int, padStr:String):String {
+			if (str == null) {
+				return null;
+			}
+			
+			if (isEmpty(padStr)) {
+				padStr = " ";
+			}
+			var padLen:int = padStr.length;
+			var strLen:int = str.length;
+			var pads:int = size - strLen;
+			
+			if (pads <= 0) {
+				return str; // returns original String when possible
+			}
+			
+			if (padLen == 1 && pads <= PAD_LIMIT) {
+				return rightPadChar(str, size, padStr.charAt(0));
+			}
+			
+			if (pads == padLen) {
+				return str.concat(padStr);
+			} else if (pads < padLen) {
+				return str.concat(padStr.substring(0, pads));
+			} else {
+				var padding:Array = [];
+				var padChars:Array = padStr.split("");
+				
+				for (var i:int = 0; i < pads; i++) {
+					padding[i] = padChars[i % padLen];
+				}
+				return str.concat(padding.join(""));
+			}
+		}
+		
+		/**
+		 * <p>Right pad a String with a specified character.</p>
+		 *
+		 * <p>The String is padded to the size of <code>size</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.rightPadChar(null, *, *)     = null
+		 * StringUtils.rightPadChar("", 3, 'z')     = "zzz"
+		 * StringUtils.rightPadChar("bat", 3, 'z')  = "bat"
+		 * StringUtils.rightPadChar("bat", 5, 'z')  = "batzz"
+		 * StringUtils.rightPadChar("bat", 1, 'z')  = "bat"
+		 * StringUtils.rightPadChar("bat", -1, 'z') = "bat"
+		 * </pre>
+		 *
+		 * @param str  the String to pad out, may be null
+		 * @param size  the size to pad to
+		 * @param padChar  the character to pad with
+		 * @return right padded String or original String if no padding is necessary,
+		 *  <code>null</code> if null String input
+		 */
+		public static function rightPadChar(str:String, size:int, padChar:String):String {
+			if (str == null) {
+				return null;
+			}
+			var pads:int = size - str.length;
+			
+			if (pads <= 0) {
+				return str; // returns original String when possible
+			}
+			
+			if (pads > PAD_LIMIT) {
+				return rightPad(str, size, padChar);
+			}
+			return str.concat(padding(pads, padChar));
+		}
+		
+		/**
+		 * <p>Returns padding using the specified delimiter repeated
+		 * to a given length.</p>
+		 *
+		 * <pre>
+		 * StringUtils.padding(0, 'e')  = ""
+		 * StringUtils.padding(3, 'e')  = "eee"
+		 * StringUtils.padding(-2, 'e') = IndexOutOfBoundsException
+		 * </pre>
+		 *
+		 * @param repeat  number of times to repeat delim
+		 * @param padChar  character to repeat
+		 * @return String with repeated character
+		 */
+		private static function padding(repeat:int, padChar:String):String {
+			var buffer:String = '';
+			
+			for (var i:int = 0; i < repeat; i++) {
+				buffer += padChar;
+			}
+			return buffer;
+		}
+		
+		/**
+		 * <p>Replaces all occurrences of a String within another String.</p>
+		 *
+		 * <p>A <code>null</code> reference passed to this method is a no-op.</p>
+		 *
+		 * <pre>
+		 * StringUtils.replace(null, *, *)        = null
+		 * StringUtils.replace("", *, *)          = ""
+		 * StringUtils.replace("any", null, *)    = "any"
+		 * StringUtils.replace("any", *, null)    = "any"
+		 * StringUtils.replace("any", "", *)      = "any"
+		 * StringUtils.replace("aba", "a", null)  = "aba"
+		 * StringUtils.replace("aba", "a", "")    = "b"
+		 * StringUtils.replace("aba", "a", "z")   = "zbz"
+		 * </pre>
+		 *
+		 * @param text  text to search and replace in, may be null
+		 * @param pattern  the String to search for, may be null
+		 * @param repl  the String to replace with, may be null
+		 * @return the text with any replacements processed,
+		 *  <code>null</code> if null String input
+		 */
+		public static function replace(text:String, pattern:String, repl:String):String {
+			if (text == null || isEmpty(pattern) || repl == null) {
+				return text;
+			}
+			return text.replace(new RegExp(pattern, 'g'), repl);
+		}
+		
+		/**
+		 * <p>Replaces a String with another String inside a larger String,
+		 * for the first <code>max</code> values of the search String.</p>
+		 *
+		 * <p>A <code>null</code> reference passed to this method is a no-op.</p>
+		 *
+		 * <pre>
+		 * StringUtils.replaceTo(null, *, *, *)         = null
+		 * StringUtils.replaceTo("", *, *, *)           = ""
+		 * StringUtils.replaceTo("any", null, *, *)     = "any"
+		 * StringUtils.replaceTo("any", *, null, *)     = "any"
+		 * StringUtils.replaceTo("any", "", *, *)       = "any"
+		 * StringUtils.replaceTo("any", *, *, 0)        = "any"
+		 * StringUtils.replaceTo("abaa", "a", null, -1) = "abaa"
+		 * StringUtils.replaceTo("abaa", "a", "", -1)   = "b"
+		 * StringUtils.replaceTo("abaa", "a", "z", 0)   = "abaa"
+		 * StringUtils.replaceTo("abaa", "a", "z", 1)   = "zbaa"
+		 * StringUtils.replaceTo("abaa", "a", "z", 2)   = "zbza"
+		 * StringUtils.replaceTo("abaa", "a", "z", -1)  = "zbzz"
+		 * </pre>
+		 *
+		 * @param text  text to search and replace in, may be null
+		 * @param repl  the String to search for, may be null
+		 * @param with  the String to replace with, may be null
+		 * @param max  maximum number of values to replace, or <code>-1</code> if no maximum
+		 * @return the text with any replacements processed,
+		 *  <code>null</code> if null String input
+		 */
+		public static function replaceTo(text:String, pattern:String, repl:String, max:int):String {
+			if (text == null || isEmpty(pattern) || repl == null || max == 0) {
+				return text;
+			}
+			
+			var buf:String = "";
+			var start:int = 0;
+			var end:int = 0;
+			
+			while ((end = text.indexOf(pattern, start)) != -1) {
+				buf += text.substring(start, end) + repl;
+				start = end + pattern.length;
+				
+				if (--max == 0) {
+					break;
+				}
+			}
+			return buf += text.substring(start);
+		}
+		
+		/**
+		 * <p>Replaces a String with another String inside a larger String, once.</p>
+		 *
+		 * <p>A <code>null</code> reference passed to this method is a no-op.</p>
+		 *
+		 * <pre>
+		 * StringUtils.replaceOnce(null, *, *)        = null
+		 * StringUtils.replaceOnce("", *, *)          = ""
+		 * StringUtils.replaceOnce("any", null, *)    = "any"
+		 * StringUtils.replaceOnce("any", *, null)    = "any"
+		 * StringUtils.replaceOnce("any", "", *)      = "any"
+		 * StringUtils.replaceOnce("aba", "a", null)  = "aba"
+		 * StringUtils.replaceOnce("aba", "a", "")    = "ba"
+		 * StringUtils.replaceOnce("aba", "a", "z")   = "zba"
+		 * </pre>
+		 *
+		 * @see #replaceTo(text:String, pattern:String, repl:String, max:int)
+		 * @param text  text to search and replace in, may be null
+		 * @param repl  the String to search for, may be null
+		 * @param with  the String to replace with, may be null
+		 * @return the text with any replacements processed,
+		 *  <code>null</code> if null String input
+		 */
+		public static function replaceOnce(text:String, pattern:String, repl:String):String {
+			if (text == null || isEmpty(pattern) || repl == null) {
+				return text;
+			}
+			return text.replace(new RegExp(pattern, ''), repl);
+		}
+		
+		/**
+		 * <p>Returns either the passed in String, or if the String is
+		 * empty or <code>null</code>, the value of <code>defaultStr</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.defaultIfEmpty(null, "NULL")  = "NULL"
+		 * StringUtils.defaultIfEmpty("", "NULL")    = "NULL"
+		 * StringUtils.defaultIfEmpty("bat", "NULL") = "bat"
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @param defaultStr  the default String to return
+		 *  if the input is empty("") or <code>null</code>, may be null
+		 * @return the passed in String, or the default
+		 */
+		public static function defaultIfEmpty(str:String, defaultStr:String):String {
+			return isEmpty(str) ? defaultStr : str;
+		}
+		
+		/**
+		 * <p>Checks if a String is empty("") or null.</p>
+		 *
+		 * <pre>
+		 * StringUtils.isEmpty(null)      = true
+		 * StringUtils.isEmpty("")        = true
+		 * StringUtils.isEmpty(" ")       = false
+		 * StringUtils.isEmpty("bob")     = false
+		 * StringUtils.isEmpty("  bob  ") = false
+		 * </pre>
+		 *
+		 * <p>NOTE: This method changed in Lang version 2.0.
+		 * It no longer trims the String.
+		 * That functionality is available in isBlank().</p>
+		 *
+		 * @param str  the String to check, may be null
+		 * @return <code>true</code> if the String is empty or null
+		 */
+		public static function isEmpty(str:String):Boolean {
+			if (str == null) {
+				return true;
+			}
+			return str.length == 0;
+		}
+		
+		/**
+		 * <p>Checks if a String is not empty("") and not null.</p>
+		 *
+		 * <pre>
+		 * StringUtils.isNotEmpty(null)      = false
+		 * StringUtils.isNotEmpty("")        = false
+		 * StringUtils.isNotEmpty(" ")       = true
+		 * StringUtils.isNotEmpty("bob")     = true
+		 * StringUtils.isNotEmpty("  bob  ") = true
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @return <code>true</code> if the String is not empty and not null
+		 */
+		public static function isNotEmpty(str:String):Boolean {
+			return !isEmpty(str);
+		}
+		
+		/**
+		 * <p>Checks if a String is whitespace, empty("") or null.</p>
+		 *
+		 * <pre>
+		 * StringUtils.isBlank(null)      = true
+		 * StringUtils.isBlank("")        = true
+		 * StringUtils.isBlank(" ")       = true
+		 * StringUtils.isBlank("bob")     = false
+		 * StringUtils.isBlank("  bob  ") = false
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @return <code>true</code> if the String is null, empty or whitespace
+		 */
+		public static function isBlank(str:String):Boolean {
+			return isEmpty(trimToEmpty(str));
+		}
+		
+		/**
+		 * <p>Checks if a String is not empty(""), not <code>null</code>
+		 * and not whitespace only.</p>
+		 *
+		 * <pre>
+		 * StringUtils.isNotBlank(null)      = false
+		 * StringUtils.isNotBlank("")        = false
+		 * StringUtils.isNotBlank(" ")       = false
+		 * StringUtils.isNotBlank("bob")     = true
+		 * StringUtils.isNotBlank("  bob  ") = true
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @return <code>true</code> if the String is
+		 *  not empty and not null and not whitespace
+		 */
+		public static function isNotBlank(str:String):Boolean {
+			return !isBlank(str);
+		}
+		
+		/**
+		 * <p>Removes control characters (char &lt;= 32) from both
+		 * ends of this String returning <code>null</code> if the String is
+		 * empty ("") after the trim or if it is <code>null</code>.
+		 *
+		 * <p>The String is trimmed using #trim().
+		 * Trim removes start and end characters &lt;= 32.</p>
+		 *
+		 * <pre>
+		 * StringUtils.trimToNull(null)          = null
+		 * StringUtils.trimToNull("")            = null
+		 * StringUtils.trimToNull("     ")       = null
+		 * StringUtils.trimToNull("abc")         = "abc"
+		 * StringUtils.trimToNull("    abc    ") = "abc"
+		 * </pre>
+		 *
+		 * @param str  the String to be trimmed, may be null
+		 * @return the trimmed String,
+		 *  <code>null</code> if only chars &lt;= 32, empty or null String input
+		 */
+		public static function trimToNull(str:String):String {
+			var trimedString:String = trim(str);
+			return isEmpty(trimedString) ? null : trimedString;
+		}
+		
+		/**
+		 * <p>Removes control characters (char &lt;= 32) from both
+		 * ends of this String returning an empty String ("") if the String
+		 * is empty ("") after the trim or if it is <code>null</code>.
+		 *
+		 * <p>The String is trimmed using #trim().
+		 * Trim removes start and end characters &lt;= 32.
+		 * To strip whitespace use #stripToEmpty(String).</p>
+		 *
+		 * <pre>
+		 * StringUtils.trimToEmpty(null)          = ""
+		 * StringUtils.trimToEmpty("")            = ""
+		 * StringUtils.trimToEmpty("     ")       = ""
+		 * StringUtils.trimToEmpty("abc")         = "abc"
+		 * StringUtils.trimToEmpty("    abc    ") = "abc"
+		 * </pre>
+		 *
+		 * @param str  the String to be trimmed, may be null
+		 * @return the trimmed String, or an empty String if <code>null</code> input
+		 */
+		public static function trimToEmpty(str:String):String {
+			return str == null ? EMPTY : trim(str);
+		}
+		
+		/**
+		 * <p>Capitalizes a String changing the first letter to title case.
+		 * No other letters are changed.</p>
+		 *
+		 * A <code>null</code> input String returns <code>null</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.capitalize(null)  = null
+		 * StringUtils.capitalize("")    = ""
+		 * StringUtils.capitalize("cat") = "Cat"
+		 * StringUtils.capitalize("cAt") = "CAt"
+		 * </pre>
+		 *
+		 * @param str  the String to capitalize, may be null
+		 * @return the capitalized String, <code>null</code> if null String input
+		 * @see titleize(String)
+		 * @see #uncapitalize(String)
+		 */
+		public static function capitalize(str:String):String {
+			if (isEmpty(str)) {
+				return str;
+			}
+			return str.charAt(0).toUpperCase() + str.substring(1);
+		}
+		
+		/**
+		 * <p>Uncapitalizes a String changing the first letter to title case.
+		 * No other letters are changed.</p>
+		 *
+		 * <pre>
+		 * StringUtils.uncapitalize(null)  = null
+		 * StringUtils.uncapitalize("")    = ""
+		 * StringUtils.uncapitalize("Cat") = "cat"
+		 * StringUtils.uncapitalize("CAT") = "cAT"
+		 * </pre>
+		 *
+		 * @param str  the String to uncapitalize, may be null
+		 * @return the uncapitalized String, <code>null</code> if null String input
+		 * @see #capitalize(String)
+		 */
+		public static function uncapitalize(str:String):String {
+			if (isEmpty(str)) {
+				return str;
+			}
+			return str.charAt(0).toLowerCase() + str.substring(1);
+		}
+		
+		/**
+		 * <p>Capitalizes all the words and replaces some characters in
+		 * the string to create a nicer looking title.
+		 * Titleize is meant for creating pretty output.</p>
+		 *
+		 * <pre>
+		 * StringUtils.titleize(null)  = null
+		 * StringUtils.titleize("")    = ""
+		 * StringUtils.titleize("man from the boondocks") = "Man From The Boondocks"
+		 * StringUtils.titleize("man from THE bOOndocks") = "Man From The Boondocks"
+		 * </pre>
+		 *
+		 * @param str  the String to uncapitalize, may be null
+		 * @return the uncapitalized String, <code>null</code> if null String input
+		 * @see #capitalize(String)
+		 */
+		public static function titleize(str:String):String {
+			if (isEmpty(str)) {
+				return str;
+			}
+			var words:Array = str.toLowerCase().split(' ');
+			
+			for (var i:int = 0; i < words.length; i++) {
+				words[i] = capitalize(words[i]);
+			}
+			return words.join(' ');
+		}
+		
+		/**
+		 * <p>Gets the substring after the first occurrence of a separator.
+		 * The separator is not returned.</p>
+		 *
+		 * <p>A <code>null</code> string input will return <code>null</code>.
+		 * An empty("") string input will return the empty string.
+		 * A <code>null</code> separator will return the empty string if the
+		 * input string is not <code>null</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.substringAfter(null, *)      = null
+		 * StringUtils.substringAfter("", *)        = ""
+		 * StringUtils.substringAfter(*, null)      = ""
+		 * StringUtils.substringAfter("abc", "a")   = "bc"
+		 * StringUtils.substringAfter("abcba", "b") = "cba"
+		 * StringUtils.substringAfter("abc", "c")   = ""
+		 * StringUtils.substringAfter("abc", "d")   = ""
+		 * StringUtils.substringAfter("abc", "")    = "abc"
+		 * </pre>
+		 *
+		 * @param str  the String to get a substring from, may be null
+		 * @param separator  the String to search for, may be null
+		 * @return the substring after the first occurrence of the separator,
+		 *  <code>null</code> if null String input
+		 */
+		public static function substringAfter(str:String, separator:String):String {
+			if (isEmpty(str)) {
+				return str;
+			}
+			
+			if (separator == null) {
+				return EMPTY;
+			}
+			var pos:int = str.indexOf(separator);
+			
+			if (pos == INDEX_NOT_FOUND) {
+				return EMPTY;
+			}
+			return str.substring(pos + separator.length);
+		}
+		
+		/**
+		 * <p>Gets the substring after the last occurrence of a separator.
+		 * The separator is not returned.</p>
+		 *
+		 * <p>A <code>null</code> string input will return <code>null</code>.
+		 * An empty("") string input will return the empty string.
+		 * An empty or <code>null</code> separator will return the empty string if
+		 * the input string is not <code>null</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.substringAfterLast(null, *)      = null
+		 * StringUtils.substringAfterLast("", *)        = ""
+		 * StringUtils.substringAfterLast(*, "")        = ""
+		 * StringUtils.substringAfterLast(*, null)      = ""
+		 * StringUtils.substringAfterLast("abc", "a")   = "bc"
+		 * StringUtils.substringAfterLast("abcba", "b") = "a"
+		 * StringUtils.substringAfterLast("abc", "c")   = ""
+		 * StringUtils.substringAfterLast("a", "a")     = ""
+		 * StringUtils.substringAfterLast("a", "z")     = ""
+		 * </pre>
+		 *
+		 * @param str  the String to get a substring from, may be null
+		 * @param separator  the String to search for, may be null
+		 * @return the substring after the last occurrence of the separator,
+		 *  <code>null</code> if null String input
+		 */
+		public static function substringAfterLast(str:String, separator:String):String {
+			if (isEmpty(str)) {
+				return str;
+			}
+			
+			if (isEmpty(separator)) {
+				return EMPTY;
+			}
+			var pos:int = str.lastIndexOf(separator);
+			
+			if (pos == INDEX_NOT_FOUND || pos == (str.length - separator.length)) {
+				return EMPTY;
+			}
+			return str.substring(pos + separator.length);
+		}
+		
+		/**
+		 * <p>Gets the substring before the first occurrence of a separator.
+		 * The separator is not returned.</p>
+		 *
+		 * <p>A <code>null</code> string input will return <code>null</code>.
+		 * An empty("") string input will return the empty string.
+		 * A <code>null</code> separator will return the input string.</p>
+		 *
+		 * <pre>
+		 * StringUtils.substringBefore(null, *)      = null
+		 * StringUtils.substringBefore("", *)        = ""
+		 * StringUtils.substringBefore("abc", "a")   = ""
+		 * StringUtils.substringBefore("abcba", "b") = "a"
+		 * StringUtils.substringBefore("abc", "c")   = "ab"
+		 * StringUtils.substringBefore("abc", "d")   = "abc"
+		 * StringUtils.substringBefore("abc", "")    = ""
+		 * StringUtils.substringBefore("abc", null)  = "abc"
+		 * </pre>
+		 *
+		 * @param str  the String to get a substring from, may be null
+		 * @param separator  the String to search for, may be null
+		 * @return the substring before the first occurrence of the separator,
+		 *  <code>null</code> if null String input
+		 */
+		public static function substringBefore(str:String, separator:String):String {
+			if (isEmpty(str) || separator == null) {
+				return str;
+			}
+			
+			if (separator.length == 0) {
+				return EMPTY;
+			}
+			var pos:int = str.indexOf(separator);
+			
+			if (pos == INDEX_NOT_FOUND) {
+				return str;
+			}
+			return str.substring(0, pos);
+		}
+		
+		/**
+		 * <p>Gets the substring before the last occurrence of a separator.
+		 * The separator is not returned.</p>
+		 *
+		 * <p>A <code>null</code> string input will return <code>null</code>.
+		 * An empty("") string input will return the empty string.
+		 * An empty or <code>null</code> separator will return the input string.</p>
+		 *
+		 * <pre>
+		 * StringUtils.substringBeforeLast(null, *)      = null
+		 * StringUtils.substringBeforeLast("", *)        = ""
+		 * StringUtils.substringBeforeLast("abcba", "b") = "abc"
+		 * StringUtils.substringBeforeLast("abc", "c")   = "ab"
+		 * StringUtils.substringBeforeLast("a", "a")     = ""
+		 * StringUtils.substringBeforeLast("a", "z")     = "a"
+		 * StringUtils.substringBeforeLast("a", null)    = "a"
+		 * StringUtils.substringBeforeLast("a", "")      = "a"
+		 * </pre>
+		 *
+		 * @param str  the String to get a substring from, may be null
+		 * @param separator  the String to search for, may be null
+		 * @return the substring before the last occurrence of the separator,
+		 *  <code>null</code> if null String input
+		 */
+		public static function substringBeforeLast(str:String, separator:String):String {
+			if (isEmpty(str) || isEmpty(separator)) {
+				return str;
+			}
+			var pos:int = str.lastIndexOf(separator);
+			
+			if (pos == INDEX_NOT_FOUND) {
+				return str;
+			}
+			return str.substring(0, pos);
+		}
+		
+		/**
+		 * <p>Gets the String that is nested in between two Strings.
+		 * Only the first match is returned.</p>
+		 *
+		 * <p>A <code>null</code> input String returns <code>null</code>.
+		 * A <code>null</code> open/close returns <code>null</code>(no match).
+		 * An empty("") open/close returns an empty string.</p>
+		 *
+		 * <pre>
+		 * StringUtils.substringBetween(null, *, *)          = null
+		 * StringUtils.substringBetween("", "", "")          = ""
+		 * StringUtils.substringBetween("", "", "tag")       = null
+		 * StringUtils.substringBetween("", "tag", "tag")    = null
+		 * StringUtils.substringBetween("yabcz", null, null) = null
+		 * StringUtils.substringBetween("yabcz", "", "")     = ""
+		 * StringUtils.substringBetween("yabcz", "y", "z")   = "abc"
+		 * StringUtils.substringBetween("yabczyabcz", "y", "z")   = "abc"
+		 * </pre>
+		 *
+		 * @param str  the String containing the substring, may be null
+		 * @param open  the String before the substring, may be null
+		 * @param close  the String after the substring, may be null
+		 * @return the substring, <code>null</code> if no match
+		 */
+		public static function substringBetween(str:String, open:String, close:String):String {
+			if (str == null || open == null || close == null) {
+				return null;
+			}
+			var start:int = str.indexOf(open);
+			
+			if (start != INDEX_NOT_FOUND) {
+				var end:int = str.indexOf(close, start + open.length);
+				
+				if (end != INDEX_NOT_FOUND) {
+					return str.substring(start + open.length, end);
+				}
+			}
+			return null;
+		}
+		
+		/**
+		 * <p>Strips any of a set of characters from the start and end of a String.
+		 * This is similar to #trim() but allows the characters
+		 * to be stripped to be controlled.</p>
+		 *
+		 * <p>A <code>null</code> input String returns <code>null</code>.
+		 * An empty string("") input returns the empty string.</p>
+		 *
+		 * <pre>
+		 * StringUtils.strip(null, *)          = null
+		 * StringUtils.strip("", *)            = ""
+		 * StringUtils.strip("abc", null)      = "abc"
+		 * StringUtils.strip("  abc", null)    = "abc"
+		 * StringUtils.strip("abc  ", null)    = "abc"
+		 * StringUtils.strip(" abc ", null)    = "abc"
+		 * StringUtils.strip("  abcyx", "xyz") = "  abc"
+		 * </pre>
+		 *
+		 * @param str  the String to remove characters from, may be null
+		 * @param stripChars  the characters to remove, null treated as whitespace
+		 * @return the stripped String, <code>null</code> if null String input
+		 */
+		public static function strip(str:String, stripChars:String):String {
+			if (isEmpty(str)) {
+				return str;
+			}
+			return stripEnd(stripStart(str, stripChars), stripChars);
+		}
+		
+		/**
+		 * <p>Strips any of a set of characters from the start of a String.</p>
+		 *
+		 * <p>A <code>null</code> input String returns <code>null</code>.
+		 * An empty string("") input returns the empty string.</p>
+		 *
+		 * <pre>
+		 * StringUtils.stripStart(null, *)          = null
+		 * StringUtils.stripStart("", *)            = ""
+		 * StringUtils.stripStart("abc", "")        = "abc"
+		 * StringUtils.stripStart("abc", null)      = "abc"
+		 * StringUtils.stripStart("  abc", null)    = "abc"
+		 * StringUtils.stripStart("abc  ", null)    = "abc  "
+		 * StringUtils.stripStart(" abc ", null)    = "abc "
+		 * StringUtils.stripStart("yxabc  ", "xyz") = "abc  "
+		 * </pre>
+		 *
+		 * @param str  the String to remove characters from, may be null
+		 * @param stripChars  the characters to remove, null treated as whitespace
+		 * @return the stripped String, <code>null</code> if null String input
+		 */
+		public static function stripStart(str:String, stripChars:String):String {
+			if (isEmpty(str)) {
+				return str;
+			}
+			var p:RegExp = new RegExp('^[' + (stripChars != null ? stripChars : ' ') + ']*', '');
+			return str.replace(p, '');
+		}
+		
+		/**
+		 * <p>Strips any of a set of characters from the end of a String.</p>
+		 *
+		 * <p>A <code>null</code> input String returns <code>null</code>.
+		 * An empty string("") input returns the empty string.</p>
+		 *
+		 * <p>If the stripChars String is <code>null</code>, whitespace is
+		 * stripped.</p>
+		 *
+		 * <pre>
+		 * StringUtils.stripEnd(null, *)          = null
+		 * StringUtils.stripEnd("", *)            = ""
+		 * StringUtils.stripEnd("abc", "")        = "abc"
+		 * StringUtils.stripEnd("abc", null)      = "abc"
+		 * StringUtils.stripEnd("  abc", null)    = "  abc"
+		 * StringUtils.stripEnd("abc  ", null)    = "abc"
+		 * StringUtils.stripEnd(" abc ", null)    = " abc"
+		 * StringUtils.stripEnd("  abcyx", "xyz") = "  abc"
+		 * </pre>
+		 *
+		 * @param str  the String to remove characters from, may be null
+		 * @param stripChars  the characters to remove, null treated as whitespace
+		 * @return the stripped String, <code>null</code> if null String input
+		 */
+		public static function stripEnd(str:String, stripChars:String):String {
+			if (isEmpty(str)) {
+				return str;
+			}
+			var p:RegExp = new RegExp('[' + (stripChars != null ? stripChars : ' ') + ']*$', '');
+			return str.replace(p, '');
+		}
+		
+		/**
+		 * <p>Abbreviates a String using ellipses. This will turn
+		 * "Now is the time for all good men" into "...is the time for..."</p>
+		 *
+		 * <p>Works like <code>abbreviate(String, int)</code>, but allows you to specify
+		 * a "left edge" offset.  Note that this left edge is not necessarily going to
+		 * be the leftmost character in the result, or the first character following the
+		 * ellipses, but it will appear somewhere in the result.
+		 *
+		 * <p>In no case will it return a String of length greater than
+		 * <code>maxWidth</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.abbreviate(null, *, *)                = null
+		 * StringUtils.abbreviate("", 0, 4)                  = ""
+		 * StringUtils.abbreviate("abcdefghijklmno", -1, 10) = "abcdefg..."
+		 * StringUtils.abbreviate("abcdefghijklmno", 0, 10)  = "abcdefg..."
+		 * StringUtils.abbreviate("abcdefghijklmno", 1, 10)  = "abcdefg..."
+		 * StringUtils.abbreviate("abcdefghijklmno", 4, 10)  = "abcdefg..."
+		 * StringUtils.abbreviate("abcdefghijklmno", 5, 10)  = "...fghi..."
+		 * StringUtils.abbreviate("abcdefghijklmno", 6, 10)  = "...ghij..."
+		 * StringUtils.abbreviate("abcdefghijklmno", 8, 10)  = "...ijklmno"
+		 * StringUtils.abbreviate("abcdefghijklmno", 10, 10) = "...ijklmno"
+		 * StringUtils.abbreviate("abcdefghijklmno", 12, 10) = "...ijklmno"
+		 * StringUtils.abbreviate("abcdefghij", 0, 3)        = IllegalArgumentException
+		 * StringUtils.abbreviate("abcdefghij", 5, 6)        = IllegalArgumentException
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @param offset  left edge of source String
+		 * @param maxWidth  maximum length of result String, must be at least 4
+		 * @return abbreviated String, <code>null</code> if null String input
+		 * @throws IllegalArgumentException if the width is too small
+		 */
+		public static function abbreviate(str:String, offset:int, maxWidth:int):String {
+			if (str == null) {
+				return str;
+			}
+			
+			if (maxWidth < 4) {
+				throw new IllegalArgumentError("Minimum abbreviation width is 4");
+			}
+			
+			if (str.length <= maxWidth) {
+				return str;
+			}
+			
+			if (offset > str.length) {
+				offset = str.length;
+			}
+			
+			if ((str.length - offset) < (maxWidth - 3)) {
+				offset = str.length - (maxWidth - 3);
+			}
+			
+			if (offset <= 4) {
+				return str.substring(0, maxWidth - 3) + "...";
+			}
+			
+			if (maxWidth < 7) {
+				throw new IllegalArgumentError("Minimum abbreviation width with offset is 7");
+			}
+			
+			if ((offset + (maxWidth - 3)) < str.length) {
+				return "..." + abbreviate(str.substring(offset), 0, maxWidth - 3);
+			}
+			return "..." + str.substring(str.length - (maxWidth - 3));
+		}
+		
+		/**
+		 * <p>Finds the n-th index within a String, handling <code>null</code>.
+		 * This method uses String#indexOf(String).</p>
+		 *
+		 * <p>A <code>null</code> String will return <code>-1</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.ordinalIndexOf(null, *, *)          = -1
+		 * StringUtils.ordinalIndexOf(*, null, *)          = -1
+		 * StringUtils.ordinalIndexOf("", "", *)           = 0
+		 * StringUtils.ordinalIndexOf("aabaabaa", "a", 1)  = 0
+		 * StringUtils.ordinalIndexOf("aabaabaa", "a", 2)  = 1
+		 * StringUtils.ordinalIndexOf("aabaabaa", "b", 1)  = 2
+		 * StringUtils.ordinalIndexOf("aabaabaa", "b", 2)  = 5
+		 * StringUtils.ordinalIndexOf("aabaabaa", "ab", 1) = 1
+		 * StringUtils.ordinalIndexOf("aabaabaa", "ab", 2) = 4
+		 * StringUtils.ordinalIndexOf("aabaabaa", "", 1)   = 0
+		 * StringUtils.ordinalIndexOf("aabaabaa", "", 2)   = 0
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @param searchStr  the String to find, may be null
+		 * @param ordinal  the n-th <code>searchStr</code> to find
+		 * @return the n-th index of the search String,
+		 *  <code>-1</code>(<code>INDEX_NOT_FOUND</code>) if no match or <code>null</code> string input
+		 */
+		public static function ordinalIndexOf(str:String, searchStr:String, ordinal:int):int {
+			if (str == null || searchStr == null || ordinal <= 0) {
+				return INDEX_NOT_FOUND;
+			}
+			
+			if (searchStr.length == 0) {
+				return 0;
+			}
+			var found:int = 0;
+			var index:int = INDEX_NOT_FOUND;
+			
+			do {
+				index = str.indexOf(searchStr, index + 1);
+				
+				if (index < 0) {
+					return index;
+				}
+				found++;
+			} while (found < ordinal);
+			return index;
+		}
+		
+		/**
+		 * <p>Counts how many times the substring appears in the larger String.</p>
+		 *
+		 * <p>A <code>null</code> or empty("") String input returns <code>0</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.countMatches(null, *)       = 0
+		 * StringUtils.countMatches("", *)         = 0
+		 * StringUtils.countMatches("abba", null)  = 0
+		 * StringUtils.countMatches("abba", "")    = 0
+		 * StringUtils.countMatches("abba", "a")   = 2
+		 * StringUtils.countMatches("abba", "ab")  = 1
+		 * StringUtils.countMatches("abba", "xxx") = 0
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @param sub  the substring to count, may be null
+		 * @return the number of occurrences, 0 if either String is <code>null</code>
+		 */
+		public static function countMatches(str:String, sub:String):int {
+			if (isEmpty(str) || isEmpty(sub)) {
+				return 0;
+			}
+			return str.match(new RegExp('(' + sub + ')', 'g')).length;
+		}
+		
+		/**
+		 * <p>Checks if String contains a search String, handling <code>null</code>.
+		 *
+		 * <p>A <code>null</code> String will return <code>false</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.contains(null, *)     = false
+		 * StringUtils.contains(*, null)     = false
+		 * StringUtils.contains("", "")      = true
+		 * StringUtils.contains("abc", "")   = true
+		 * StringUtils.contains("abc", "a")  = true
+		 * StringUtils.contains("abc", "z")  = false
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @param searchStr  the String to find, may be null
+		 * @return true if the String contains the search String,
+		 *  false if not or <code>null</code> string input
+		 */
+		public static function contains(str:String, searchStr:String):Boolean {
+			if (str == null || searchStr == null) {
+				return false;
+			}
+			return new RegExp('(' + searchStr + ')', 'g').test(str);
+		}
+		
+		/**
+		 * <p>Checks that the String does not contain certain characters.</p>
+		 *
+		 * <p>A <code>null</code> String will return <code>true</code>.
+		 * A <code>null</code> invalid character array will return <code>true</code>.
+		 * An empty String("") always returns true.</p>
+		 *
+		 * <pre>
+		 * StringUtils.containsNone(null, *)       = true
+		 * StringUtils.containsNone(*, null)       = true
+		 * StringUtils.containsNone("", *)         = true
+		 * StringUtils.containsNone("ab", "")      = true
+		 * StringUtils.containsNone("abab", "xyz") = true
+		 * StringUtils.containsNone("ab1", "xyz")  = true
+		 * StringUtils.containsNone("abz", "xyz")  = false
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @param invalidChars  a String of invalid chars, may be null
+		 * @return true if it contains none of the invalid chars, or is null
+		 */
+		public static function containsNone(str:String, invalidChars:String):Boolean {
+			if (isEmpty(str) || invalidChars == null) {
+				return true;
+			}
+			return new RegExp('^[^' + invalidChars + ']*$', '').test(str);
+		}
+		
+		/**
+		 * <p>Checks if the String contains only certain characters.</p>
+		 *
+		 * <p>A <code>null</code> String will return <code>false</code>.
+		 * A <code>null</code> valid character String will return <code>false</code>.
+		 * An empty String("") always returns <code>true</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.containsOnly(null, *)       = false
+		 * StringUtils.containsOnly(*, null)       = false
+		 * StringUtils.containsOnly("", *)         = true
+		 * StringUtils.containsOnly("ab", "")      = false
+		 * StringUtils.containsOnly("abab", "abc") = true
+		 * StringUtils.containsOnly("ab1", "abc")  = false
+		 * StringUtils.containsOnly("abz", "abc")  = false
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @param validChars  a String of valid chars, may be null
+		 * @return true if it only contains valid chars and is non-null
+		 */
+		public static function containsOnly(str:String, validChars:String):Boolean {
+			if (str == null || isEmpty(validChars)) {
+				return false;
+			}
+			
+			if (str.length == 0) {
+				return true;
+			}
+			return new RegExp('^[' + validChars + ']*$', 'g').test(str);
+		}
+		
+		/**
+		 * <p>Search a String to find the first index of any
+		 * character in the given set of characters.</p>
+		 *
+		 * <p>A <code>null</code> String will return <code>-1</code>.
+		 * A <code>null</code> search string will return <code>-1</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.indexOfAny(null, *)            = -1
+		 * StringUtils.indexOfAny("", *)              = -1
+		 * StringUtils.indexOfAny(*, null)            = -1
+		 * StringUtils.indexOfAny(*, "")              = -1
+		 * StringUtils.indexOfAny("zzabyycdxx", "za") = 0
+		 * StringUtils.indexOfAny("zzabyycdxx", "by") = 3
+		 * StringUtils.indexOfAny("aba","z")          = -1
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @param searchChars  the chars to search for, may be null
+		 * @return the index of any of the chars, -1 if no match or null input
+		 */
+		public static function indexOfAny(str:String, searchChars:String):int {
+			if (isEmpty(str) || isEmpty(searchChars)) {
+				return INDEX_NOT_FOUND;
+			}
+			return str.search(new RegExp('[' + searchChars + ']', ''));
+		}
+		
+		/**
+		 * <p>Search a String to find the first index of any
+		 * character not in the given set of characters.</p>
+		 *
+		 * <p>A <code>null</code> String will return <code>-1</code>.
+		 * A <code>null</code> search string will return <code>-1</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.indexOfAnyBut(null, *)            = -1
+		 * StringUtils.indexOfAnyBut("", *)              = -1
+		 * StringUtils.indexOfAnyBut(*, null)            = -1
+		 * StringUtils.indexOfAnyBut(*, "")              = -1
+		 * StringUtils.indexOfAnyBut("zzabyycdxx", "za") = 3
+		 * StringUtils.indexOfAnyBut("aba","ab")         = -1
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @param searchChars  the chars to search for, may be null
+		 * @return the index of any of the chars, -1 if no match or null input
+		 */
+		public static function indexOfAnyBut(str:String, searchChars:String):int {
+			if (isEmpty(str) || isEmpty(searchChars)) {
+				return INDEX_NOT_FOUND;
+			}
+			return str.search(new RegExp('[^' + searchChars + ']', ''));
+		}
+		
+		/**
+		 * <p>Compares two Strings, and returns the portion where they differ.
+		 *(More precisely, return the remainder of the second String,
+		 * starting from where it's different from the first.)</p>
+		 *
+		 * <p>For example,
+		 * <code>difference("i am a machine", "i am a robot") -> "robot"</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.difference(null, null) = null
+		 * StringUtils.difference("", "") = ""
+		 * StringUtils.difference("", "abc") = "abc"
+		 * StringUtils.difference("abc", "") = ""
+		 * StringUtils.difference("abc", "abc") = ""
+		 * StringUtils.difference("ab", "abxyz") = "xyz"
+		 * StringUtils.difference("abcde", "abxyz") = "xyz"
+		 * StringUtils.difference("abcde", "xyz") = "xyz"
+		 * </pre>
+		 *
+		 * @param str1  the first String, may be null
+		 * @param str2  the second String, may be null
+		 * @return the portion of str2 where it differs from str1; returns the
+		 * empty String if they are equal
+		 */
+		public static function difference(str1:String, str2:String):String {
+			if (str1 == null) {
+				return str2;
+			}
+			
+			if (str2 == null) {
+				return str1;
+			}
+			var att:int = indexOfDifference(str1, str2);
+			
+			if (att == -1) {
+				return EMPTY;
+			}
+			return str2.substring(att);
+		}
+		
+		/**
+		 * <p>Compares two Strings, and returns the index at which the
+		 * Strings begin to differ.</p>
+		 *
+		 * <p>For example,
+		 * <code>indexOfDifference("i am a machine", "i am a robot") -> 7</code></p>
+		 *
+		 * <pre>
+		 * StringUtils.indexOfDifference(null, null) = -1
+		 * StringUtils.indexOfDifference("", "") = -1
+		 * StringUtils.indexOfDifference("", "abc") = 0
+		 * StringUtils.indexOfDifference("abc", "") = 0
+		 * StringUtils.indexOfDifference("abc", "abc") = -1
+		 * StringUtils.indexOfDifference("ab", "abxyz") = 2
+		 * StringUtils.indexOfDifference("abcde", "abxyz") = 2
+		 * StringUtils.indexOfDifference("abcde", "xyz") = 0
+		 * </pre>
+		 *
+		 * @param str1  the first String, may be null
+		 * @param str2  the second String, may be null
+		 * @return the index where str2 and str1 begin to differ; -1 if they are equal
+		 */
+		public static function indexOfDifference(str1:String, str2:String):int {
+			if (str1 == str2) {
+				return INDEX_NOT_FOUND;
+			}
+			
+			if (isEmpty(str1) || isEmpty(str2)) {
+				return 0;
+			}
+			var charIndex:int;
+			
+			for (charIndex = 0; charIndex < str1.length && charIndex < str2.length; ++charIndex) {
+				if (str1.charAt(charIndex) != str2.charAt(charIndex)) {
+					break;
+				}
+			}
+			
+			if (charIndex < str2.length || charIndex < str1.length) {
+				return charIndex;
+			}
+			return INDEX_NOT_FOUND;
+		}
+		
+		/**
+		 * <p>Compares two Strings, returning <code>true</code> if they are equal.</p>
+		 *
+		 * <p><code>null</code>s are handled without exceptions. Two <code>null</code>
+		 * references are considered to be equal. The comparison is case sensitive.</p>
+		 *
+		 * <pre>
+		 * StringUtils.equals(null, null)   = true
+		 * StringUtils.equals(null, "abc")  = false
+		 * StringUtils.equals("abc", null)  = false
+		 * StringUtils.equals("abc", "abc") = true
+		 * StringUtils.equals("abc", "ABC") = false
+		 * </pre>
+		 *
+		 * @param str1  the first String, may be null
+		 * @param str2  the second String, may be null
+		 * @return <code>true</code> if the Strings are equal, case sensitive, or
+		 *  both <code>null</code>
+		 */
+		public static function equals(str1:String, str2:String):Boolean {
+			return str1 === str2;
+		}
+		
+		/**
+		 * <p>Compares two Strings, returning <code>true</code> if they are equal ignoring
+		 * the case.</p>
+		 *
+		 * <p><code>null</code>s are handled without exceptions. Two <code>null</code>
+		 * references are considered equal. Comparison is case insensitive.</p>
+		 *
+		 * <pre>
+		 * StringUtils.equalsIgnoreCase(null, null)   = true
+		 * StringUtils.equalsIgnoreCase(null, "abc")  = false
+		 * StringUtils.equalsIgnoreCase("abc", null)  = false
+		 * StringUtils.equalsIgnoreCase("abc", "abc") = true
+		 * StringUtils.equalsIgnoreCase("abc", "ABC") = true
+		 * </pre>
+		 *
+		 * @param str1  the first String, may be null
+		 * @param str2  the second String, may be null
+		 * @return <code>true</code> if the Strings are equal, case insensitive, or
+		 *  both <code>null</code>
+		 */
+		public static function equalsIgnoreCase(str1:String, str2:String):Boolean {
+			if (str1 == null && str2 == null) {
+				return true;
+			} else if (str1 == null || str2 == null) {
+				return false;
+			}
+			return equals(str1.toLowerCase(), str2.toLowerCase());
+		}
+		
+		/**
+		 * <p>Checks if the String contains only unicode letters.</p>
+		 *
+		 * <p><code>null</code> will return <code>false</code>.
+		 * An empty String("") will return <code>true</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.isAlpha(null)   = false
+		 * StringUtils.isAlpha("")     = true
+		 * StringUtils.isAlpha("  ")   = false
+		 * StringUtils.isAlpha("abc")  = true
+		 * StringUtils.isAlpha("ab2c") = false
+		 * StringUtils.isAlpha("ab-c") = false
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @return <code>true</code> if only contains letters, and is non-null
+		 */
+		public static function isAlpha(str:String):Boolean {
+			return testString(str, /^[a-zA-Z]*$/);
+		}
+		
+		/**
+		 * <p>Checks if the String contains only unicode letters and
+		 * space(' ').</p>
+		 *
+		 * <p><code>null</code> will return <code>false</code>
+		 * An empty String("") will return <code>true</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.isAlphaSpace(null)   = false
+		 * StringUtils.isAlphaSpace("")     = true
+		 * StringUtils.isAlphaSpace("  ")   = true
+		 * StringUtils.isAlphaSpace("abc")  = true
+		 * StringUtils.isAlphaSpace("ab c") = true
+		 * StringUtils.isAlphaSpace("ab2c") = false
+		 * StringUtils.isAlphaSpace("ab-c") = false
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @return <code>true</code> if only contains letters and space,
+		 *  and is non-null
+		 */
+		public static function isAlphaSpace(str:String):Boolean {
+			return testString(str, /^[a-zA-Z\s]*$/);
+		}
+		
+		/**
+		 * <p>Checks if the String contains only unicode letters or digits.</p>
+		 *
+		 * <p><code>null</code> will return <code>false</code>.
+		 * An empty String("") will return <code>true</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.isAlphanumeric(null)   = false
+		 * StringUtils.isAlphanumeric("")     = true
+		 * StringUtils.isAlphanumeric("  ")   = false
+		 * StringUtils.isAlphanumeric("abc")  = true
+		 * StringUtils.isAlphanumeric("ab c") = false
+		 * StringUtils.isAlphanumeric("ab2c") = true
+		 * StringUtils.isAlphanumeric("ab-c") = false
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @return <code>true</code> if only contains letters or digits,
+		 *  and is non-null
+		 */
+		public static function isAlphanumeric(str:String):Boolean {
+			return testString(str, /^[a-zA-Z0-9]*$/);
+		}
+		
+		/**
+		 * <p>Checks if the String contains only unicode letters, digits
+		 * or space(<code>' '</code>).</p>
+		 *
+		 * <p><code>null</code> will return <code>false</code>.
+		 * An empty String("") will return <code>true</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.isAlphanumericSpace(null)   = false
+		 * StringUtils.isAlphanumericSpace("")     = true
+		 * StringUtils.isAlphanumericSpace("  ")   = true
+		 * StringUtils.isAlphanumericSpace("abc")  = true
+		 * StringUtils.isAlphanumericSpace("ab c") = true
+		 * StringUtils.isAlphanumericSpace("ab2c") = true
+		 * StringUtils.isAlphanumericSpace("ab-c") = false
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @return <code>true</code> if only contains letters, digits or space,
+		 *  and is non-null
+		 */
+		public static function isAlphanumericSpace(str:String):Boolean {
+			return testString(str, /^[a-zA-Z0-9\s]*$/);
+		}
+		
+		/**
+		 * <p>Checks if the String contains only unicode digits.
+		 * A decimal point is not a unicode digit and returns false.</p>
+		 *
+		 * <p><code>null</code> will return <code>false</code>.
+		 * An empty String("") will return <code>true</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.isNumeric(null)   = false
+		 * StringUtils.isNumeric("")     = true
+		 * StringUtils.isNumeric("  ")   = false
+		 * StringUtils.isNumeric("123")  = true
+		 * StringUtils.isNumeric("12 3") = false
+		 * StringUtils.isNumeric("ab2c") = false
+		 * StringUtils.isNumeric("12-3") = false
+		 * StringUtils.isNumeric("12.3") = false
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @return <code>true</code> if only contains digits, and is non-null
+		 */
+		public static function isNumeric(str:String):Boolean {
+			return testString(str, /^[0-9]*$/);
+		}
+		
+		/**
+		 * <p>Checks if the String contains only unicode digits or space
+		 *(<code>' '</code>).
+		 * A decimal point is not a unicode digit and returns false.</p>
+		 *
+		 * <p><code>null</code> will return <code>false</code>.
+		 * An empty String("") will return <code>true</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.isNumericSpace(null)   = false
+		 * StringUtils.isNumericSpace("")     = true
+		 * StringUtils.isNumericSpace("  ")   = true
+		 * StringUtils.isNumericSpace("123")  = true
+		 * StringUtils.isNumericSpace("12 3") = true
+		 * StringUtils.isNumericSpace("ab2c") = false
+		 * StringUtils.isNumericSpace("12-3") = false
+		 * StringUtils.isNumericSpace("12.3") = false
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @return <code>true</code> if only contains digits or space,
+		 *  and is non-null
+		 */
+		public static function isNumericSpace(str:String):Boolean {
+			return testString(str, /^[0-9\s]*$/);
+		}
+		
+		/**
+		 * <p>Checks if the String contains only whitespace.</p>
+		 *
+		 * <p><code>null</code> will return <code>false</code>.
+		 * An empty String("") will return <code>true</code>.</p>
+		 *
+		 * <pre>
+		 * StringUtils.isWhitespace(null)   = false
+		 * StringUtils.isWhitespace("")     = true
+		 * StringUtils.isWhitespace("  ")   = true
+		 * StringUtils.isWhitespace("abc")  = false
+		 * StringUtils.isWhitespace("ab2c") = false
+		 * StringUtils.isWhitespace("ab-c") = false
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @return <code>true</code> if only contains whitespace, and is non-null
+		 */
+		public static function isWhitespace(str:String):Boolean {
+			return testString(str, /^[\s]*$/);
+		}
+		
+		private static function testString(str:String, pattern:RegExp):Boolean {
+			return str != null && pattern.test(str);
+		}
+		
+		/**
+		 * <p>Overlays part of a String with another String.</p>
+		 *
+		 * <p>A <code>null</code> string input returns <code>null</code>.
+		 * A negative index is treated as zero.
+		 * An index greater than the string length is treated as the string length.
+		 * The start index is always the smaller of the two indices.</p>
+		 *
+		 * <pre>
+		 * StringUtils.overlay(null, *, *, *)            = null
+		 * StringUtils.overlay("", "abc", 0, 0)          = "abc"
+		 * StringUtils.overlay("abcdef", null, 2, 4)     = "abef"
+		 * StringUtils.overlay("abcdef", "", 2, 4)       = "abef"
+		 * StringUtils.overlay("abcdef", "", 4, 2)       = "abef"
+		 * StringUtils.overlay("abcdef", "zzzz", 2, 4)   = "abzzzzef"
+		 * StringUtils.overlay("abcdef", "zzzz", 4, 2)   = "abzzzzef"
+		 * StringUtils.overlay("abcdef", "zzzz", -1, 4)  = "zzzzef"
+		 * StringUtils.overlay("abcdef", "zzzz", 2, 8)   = "abzzzz"
+		 * StringUtils.overlay("abcdef", "zzzz", -2, -3) = "zzzzabcdef"
+		 * StringUtils.overlay("abcdef", "zzzz", 8, 10)  = "abcdefzzzz"
+		 * </pre>
+		 *
+		 * @param str  the String to do overlaying in, may be null
+		 * @param overlay  the String to overlay, may be null
+		 * @param start  the position to start overlaying at
+		 * @param end  the position to stop overlaying before
+		 * @return overlayed String, <code>null</code> if null String input
+		 */
+		public static function overlay(str:String, overlay:String, start:int, end:int):String {
+			if (str == null) {
+				return null;
+			}
+			
+			if (overlay == null) {
+				overlay = EMPTY;
+			}
+			var len:int = str.length;
+			
+			if (start < 0) {
+				start = 0;
+			}
+			
+			if (start > len) {
+				start = len;
+			}
+			
+			if (end < 0) {
+				end = 0;
+			}
+			
+			if (end > len) {
+				end = len;
+			}
+			
+			if (start > end) {
+				var temp:int = start; // NO PMD WronglyNamedVariable
+				start = end;
+				end = temp;
+			}
+			return str.substring(0, start).concat(overlay).concat(str.substring(end));
+		}
+		
+		/**
+		 * <p>Removes all occurances of a substring from within the source string.</p>
+		 *
+		 * <p>A <code>null</code> source string will return <code>null</code>.
+		 * An empty("") source string will return the empty string.
+		 * A <code>null</code> remove string will return the source string.
+		 * An empty("") remove string will return the source string.</p>
+		 *
+		 * <pre>
+		 * StringUtils.remove(null, *)        = null
+		 * StringUtils.remove("", *)          = ""
+		 * StringUtils.remove(*, null)        = *
+		 * StringUtils.remove(*, "")          = *
+		 * StringUtils.remove("queued", "ue") = "qd"
+		 * StringUtils.remove("queued", "zz") = "queued"
+		 * </pre>
+		 *
+		 * @param str  the source String to search, may be null
+		 * @param remove  the String to search for and remove, may be null
+		 * @return the substring with the string removed if found,
+		 *  <code>null</code> if null String input
+		 */
+		public static function remove(str:String, remove:String):String {
+			return safeRemove(str, new RegExp(remove, 'g'));
+		}
+		
+		/**
+		 * <p>Removes a substring only if it is at the end of a source string,
+		 * otherwise returns the source string.</p>
+		 *
+		 * <p>A <code>null</code> source string will return <code>null</code>.
+		 * An empty("") source string will return the empty string.
+		 * A <code>null</code> search string will return the source string.</p>
+		 *
+		 * <pre>
+		 * StringUtils.removeEnd(null, *)      = null
+		 * StringUtils.removeEnd("", *)        = ""
+		 * StringUtils.removeEnd(*, null)      = *
+		 * StringUtils.removeEnd("www.domain.com", ".com")   = "www.domain"
+		 * StringUtils.removeEnd("www.domain.com", "domain") = "www.domain.com"
+		 * StringUtils.removeEnd("abc", "")    = "abc"
+		 * </pre>
+		 *
+		 * @param str  the source String to search, may be null
+		 * @param remove  the String to search for and remove, may be null
+		 * @return the substring with the string removed if found,
+		 *  <code>null</code> if null String input
+		 */
+		public static function removeEnd(str:String, remove:String):String {
+			return safeRemove(str, new RegExp(remove + '$', ''));
+		}
+		
+		/**
+		 * <p>Removes a substring only if it is at the begining of a source string,
+		 * otherwise returns the source string.</p>
+		 *
+		 * <p>A <code>null</code> source string will return <code>null</code>.
+		 * An empty("") source string will return the empty string.
+		 * A <code>null</code> search string will return the source string.</p>
+		 *
+		 * <pre>
+		 * StringUtils.removeStart(null, *)      = null
+		 * StringUtils.removeStart("", *)        = ""
+		 * StringUtils.removeStart(*, null)      = *
+		 * StringUtils.removeStart("www.domain.com", "www.")   = "domain.com"
+		 * StringUtils.removeStart("domain.com", "www.")       = "domain.com"
+		 * StringUtils.removeStart("www.domain.com", "domain") = "www.domain.com"
+		 * StringUtils.removeStart("abc", "")    = "abc"
+		 * </pre>
+		 *
+		 * @param str  the source String to search, may be null
+		 * @param remove  the String to search for and remove, may be null
+		 * @return the substring with the string removed if found,
+		 *  <code>null</code> if null String input
+		 */
+		public static function removeStart(str:String, remove:String):String {
+			return safeRemove(str, new RegExp('^' + remove, ''));
+		}
+		
+		private static function safeRemove(str:String, pattern:RegExp):String {
+			if (isEmpty(str)) {
+				return str;
+			}
+			return str.replace(pattern, '');
+		}
+		
+		/**
+		 * <p>Checks if the String end characters match the given end string.</p>
+		 *
+		 * <p><code>null</code> will return <code>false</code>.
+		 *
+		 * <pre>
+		 * StringUtils.endsWith(null, *)	 				= false
+		 * StringUtils.endsWith(null, null) 				= false
+		 * StringUtils.endsWith(*, null)	   				= false
+		 * StringUtils.endsWith("www.domain.com", "com") = true
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @param end the string to compare
+		 * @return <code>true</code> if only contains whitespace, and is non-null
+		 */
+		public static function endsWith(str:String, end:String):Boolean {
+			return testString(str, new RegExp(end + '$', ''));
+		}
+		
+		/**
+		 * <p>Checks if the String start characters match the given start string.</p>
+		 *
+		 * <p><code>null</code> will return <code>false</code>.
+		 *
+		 * <pre>
+		 * StringUtils.startsWith(null, *)	 				= false
+		 * StringUtils.startsWith(null, null) 				= false
+		 * StringUtils.startsWith(*, null)	   				= false
+		 * StringUtils.startsWith("www.domain.com", "www.")	= true
+		 * </pre>
+		 *
+		 * @param str  the String to check, may be null
+		 * @param start the string to compare
+		 * @return <code>true</code> if only contains whitespace, and is non-null
+		 */
+		public static function startsWith(str:String, start:String):Boolean {
+			return testString(str, new RegExp('^' + start, ''));
+		}
+		
+		/**
+		 * Compares two strings lexicographically, ignoring case
+		 * differences. This method returns an integer whose sign is that of
+		 * calling <code>compareTo</code> with normalized versions of the strings
+		 * where case differences have been eliminated by calling
+		 * <code>Character.toLowerCase(Character.toUpperCase(character))</code> on
+		 * each character.
+		 * <p>
+		 *
+		 * @param   str1   the <code>String</code> to be compared.
+		 * @param   str2   the <code>String</code> to be compared.
+		 * @return  a negative integer, zero, or a positive integer as the
+		 *		specified String is greater than, equal to, or less
+		 *		than this String, ignoring case considerations.
+		 */
+		public static function compareToIgnoreCase(str1:String, str2:String):int {
+			if (str1 == null) {
+				str1 = "";
+			}
+			
+			if (str2 == null) {
+				str2 = "";
+			}
+			
+			return compareTo(str1.toLowerCase(), str2.toLowerCase());
+		}
+		
+		/**
+		 * Compares two strings lexicographically.
+		 * The comparison is based on the Unicode value of each character in
+		 * the strings. The character sequence represented by this
+		 * <code>String</code> object is compared lexicographically to the
+		 * character sequence represented by the argument string. The result is
+		 * a negative integer if this <code>String</code> object
+		 * lexicographically precedes the argument string. The result is a
+		 * positive integer if this <code>String</code> object lexicographically
+		 * follows the argument string. The result is zero if the strings
+		 * are equal; <code>compareTo</code> returns <code>0</code> exactly when
+		 * the #equals(Object) method would return <code>true</code>.
+		 * <p>
+		 * This is the definition of lexicographic ordering. If two strings are
+		 * different, then either they have different characters at some index
+		 * that is a valid index for both strings, or their lengths are different,
+		 * or both. If they have different characters at one or more index
+		 * positions, let <i>k</i> be the smallest such index; then the string
+		 * whose character at position <i>k</i> has the smaller value, as
+		 * determined by using the &lt; operator, lexicographically precedes the
+		 * other string. In this case, <code>compareTo</code> returns the
+		 * difference of the two character values at position <code>k</code> in
+		 * the two string -- that is, the value:
+		 * <blockquote><pre>
+		 * this.charAt(k)-anotherString.charAt(k)
+		 * </pre></blockquote>
+		 * If there is no index position at which they differ, then the shorter
+		 * string lexicographically precedes the longer string. In this case,
+		 * <code>compareTo</code> returns the difference of the lengths of the
+		 * strings -- that is, the value:
+		 * <blockquote><pre>
+		 * this.length-anotherString.length
+		 * </pre></blockquote>
+		 *
+		 * @param   anotherString   the <code>String</code> to be compared.
+		 * @return  the value <code>0</code> if the argument string is equal to
+		 *          this string; a value less than <code>0</code> if this string
+		 *          is lexicographically less than the string argument; and a
+		 *          value greater than <code>0</code> if this string is
+		 *          lexicographically greater than the string argument.
+		 */
+		public static function compareTo(str1:String, str2:String):int {
+			if (str1 == null) {
+				str1 = "";
+			}
+			
+			if (str2 == null) {
+				str2 = "";
+			}
+			return str1.localeCompare(str2);
+		}
+		
+		/**
+		 * Adds/inserts a new string at a certain position in the source string.
+		 */
+		public static function addAt(string:String, value:*, position:int):String {
+			if (position > string.length) {
+				position = string.length;
+			}
+			var firstPart:String = string.substring(0, position);
+			var secondPart:String = string.substring(position, string.length);
+			return (firstPart + value + secondPart);
+		}
+		
+		/**
+		 * Replaces a part of the text between 2 positions.
+		 */
+		public static function replaceAt(string:String, value:*, beginIndex:int, endIndex:int):String {
+			beginIndex = Math.max(beginIndex, 0);
+			endIndex = Math.min(endIndex, string.length);
+			var firstPart:String = string.substr(0, beginIndex);
+			var secondPart:String = string.substr(endIndex, string.length);
+			return (firstPart + value + secondPart);
+		}
+		
+		/**
+		 * Removes a part of the text between 2 positions.
+		 */
+		public static function removeAt(string:String, beginIndex:int, endIndex:int):String {
+			return StringUtils.replaceAt(string, "", beginIndex, endIndex);
+		}
+		
+		/**
+		 * Fixes double newlines in a text.
+		 */
+		public static function fixNewlines(string:String):String {
+			return string.replace(/\r\n/gm, "\n");
+		}
+		
+		/**
+		 * Checks if the given string has actual text.
+		 */
+		public static function hasText(string:String):Boolean {
+			if (!string)
+				return false;
+			return (StringUtils.trim(string).length > 0);
+		}
+		
+		/**
+		 * Removes all empty characters at the beginning of a string.
+		 *
+		 * <p>Characters that are removed: spaces {@code " "}, line forwards {@code "\n"}
+		 * and extended line forwarding {@code "\t\n"}.
+		 *
+		 * @param string the string to trim
+		 * @return the trimmed string
+		 */
+		public static function leftTrim(string:String):String {
+			return leftTrimForChars(string, "\n\t\n ");
+		}
+		
+		/**
+		 * Removes all empty characters at the end of a string.
+		 *
+		 * <p>Characters that are removed: spaces {@code " "}, line forwards {@code "\n"}
+		 * and extended line forwarding {@code "\t\n"}.
+		 *
+		 * @param string the string to trim
+		 * @return the trimmed string
+		 */
+		public static function rightTrim(string:String):String {
+			return rightTrimForChars(string, "\n\t\n ");
+		}
+		
+		/**
+		 * Removes all characters at the beginning of the {@code string} that match to the
+		 * set of {@code chars}.
+		 *
+		 * <p>This method splits all {@code chars} and removes occurencies at the beginning.
+		 *
+		 * <p>Example:
+		 * <code>
+		 *   trace(StringUtil.rightTrimForChars("ymoynkeym", "ym")); // oynkeym
+		 *   trace(StringUtil.rightTrimForChars("monkey", "mo")); // nkey
+		 *   trace(StringUtil.rightTrimForChars("monkey", "om")); // nkey
+		 * </code>
+		 *
+		 * @param string the string to trim
+		 * @param chars the characters to remove from the beginning of the {@code string}
+		 * @return the trimmed string
+		 */
+		public static function leftTrimForChars(string:String, chars:String):String {
+			var from:Number = 0;
+			var endIndex:Number = string.length;
+			
+			while (from < endIndex && chars.indexOf(string.charAt(from)) >= 0) {
+				from++;
+			}
+			return (from > 0 ? string.substr(from, endIndex) : string);
+		}
+		
+		/**
+		 * Removes all characters at the end of the {@code string} that match to the set of
+		 * {@code chars}.
+		 *
+		 * <p>This method splits all {@code chars} and removes occurencies at the end.
+		 *
+		 * <p>Example:
+		 * <code>
+		 *   trace(StringUtil.rightTrimForChars("ymoynkeym", "ym")); // ymoynke
+		 *   trace(StringUtil.rightTrimForChars("monkey***", "*y")); // monke
+		 *   trace(StringUtil.rightTrimForChars("monke*y**", "*y")); // monke
+		 * </code>
+		 *
+		 * @param string the string to trim
+		 * @param chars the characters to remove from the end of the {@code string}
+		 * @return the trimmed string
+		 */
+		public static function rightTrimForChars(string:String, chars:String):String {
+			var from:Number = 0;
+			var endIndex:Number = string.length - 1;
+			
+			while (from < endIndex && chars.indexOf(string.charAt(endIndex)) >= 0) {
+				endIndex--;
+			}
+			return (endIndex >= 0 ? string.substr(from, endIndex + 1) : string);
+		}
+		
+		/**
+		 * Removes all characters at the beginning of the {@code string} that matches the
+		 * {@code char}.
+		 *
+		 * <p>Example:
+		 * <code>
+		 *   trace(StringUtil.leftTrimForChar("yyyymonkeyyyy", "y"); // monkeyyyy
+		 * </code>
+		 *
+		 * @param string the string to trim
+		 * @param char the character to remove
+		 * @return the trimmed string
+		 * @throws IllegalArgumentException if you try to remove more than one character
+		 */
+		public static function leftTrimForChar(string:String, char:String):String {
+			if (char.length != 1) {
+				throw new IllegalArgumentError("The Second Attribute char [" + char + "] must exactly one character.");
+			}
+			return leftTrimForChars(string, char);
+		}
+		
+		/**
+		 * Removes all characters at the end of the {@code string} that matches the passed-in
+		 * {@code char}.
+		 *
+		 * <p>Example:
+		 * <code>
+		 *   trace(StringUtil.rightTrimForChar("yyyymonkeyyyy", "y"); // yyyymonke
+		 * </code>
+		 *
+		 * @param string the string to trim
+		 * @param char the character to remove
+		 * @return the trimmed string
+		 * @throws IllegalArgumentException if you try to remove more than one character
+		 */
+		public static function rightTrimForChar(string:String, char:String):String {
+			if (char.length != 1) {
+				throw new IllegalArgumentError("The Second Attribute char [" + char + "] must exactly one character.");
+			}
+			return rightTrimForChars(string, char);
+		}
+		
+		/**
+		 * Extended String::indexOf
+		 *
+		 * @param haystack string to search in
+		 * @param n which ocurance of needle
+		 * @param needle The substring for which to search
+		 * @param startIndex An optional integer specifying the starting index of the search.
+		 * @returns startIndex if n is 0
+		 * @returns -1 if not enough ocurances of needle are found
+		 * @returns charIndex of nth needle ocurances
+		 */
+		public static function nthIndexOf(haystack:String, n:uint, needle:String, startIndex:Number = 0):int {
+			var result:int = startIndex;
+			
+			if (n >= 1) {
+				result = haystack.indexOf(needle, result);
+				
+				for (var i:int = 1; result != -1 && i < n; i++) {
+					result = haystack.indexOf(needle, result + 1);
+				}
+			}
+			return result;
+		}
+		
+		/**
+		 * Returns if the given character is a white space or not.
+		 */
+		public static function characterIsWhitespace(a:String):Boolean {
+			return (a.charCodeAt(0) <= 32);
+		}
+		
+		/**
+		 * Returns if the given character is a digit or not.
+		 */
+		public static function characterIsDigit(a:String):Boolean {
+			var charCode:Number = a.charCodeAt(0);
+			return (charCode >= 48 && charCode <= 57);
+		}
+		
+		/**
+		 * Natural sort order compare function.
+		 *
+		 * @ignore Based on the JavaScript version by Kristof Coomans.
+		 * (http://sourcefrog.net/projects/natsort/natcompare.js)
+		 */
+		public static function naturalCompare(a:String, b:String):int { // NO PMD TooLongFunction
+			var iaa:int = 0, ibb:int = 0;
+			var nza:int = 0, nzb:int = 0;
+			var caa:String, cbb:String;
+			var result:int;
+			var lowerCaseBeforeUpperCase:Boolean = true; // used to be a method argument, keep this
+			
+			// replace null values with empty strings
+			if (!a)
+				a = "";
+			
+			if (!b)
+				b = "";
+			
+			/*if (!caseSensitive) {
+			a = a.toLowerCase();
+			b = b.toLowerCase();
+			}*/
+			
+			var stringsAreCaseInsensitiveEqual:Boolean = false;
+			
+			if (a.toLocaleLowerCase() == b.toLocaleLowerCase()) {
+				stringsAreCaseInsensitiveEqual = true;
+			} else {
+				a = a.toLowerCase();
+				b = b.toLowerCase();
+			}
+			
+			while (true) {
+				// only count the number of zeroes leading the last number compared
+				nza = nzb = 0;
+				
+				caa = a.charAt(iaa);
+				cbb = b.charAt(ibb);
+				
+				// skip over leading spaces or zeros
+				while (StringUtils.characterIsWhitespace(caa) || caa == "0") {
+					if (caa == "0") {
+						nza++;
+					} else {
+						// only count consecutive zeroes
+						nza = 0;
+					}
+					
+					caa = a.charAt(++iaa);
+				}
+				
+				while (StringUtils.characterIsWhitespace(cbb) || cbb == "0") {
+					if (cbb == "0") {
+						nzb++;
+					} else {
+						// only count consecutive zeroes
+						nzb = 0;
+					}
+					
+					cbb = b.charAt(++ibb);
+				}
+				
+				// process run of digits
+				if (StringUtils.characterIsDigit(caa) && StringUtils.characterIsDigit(cbb)) {
+					if ((result = compareRight(a.substring(iaa), b.substring(ibb))) != 0) {
+						return result;
+					}
+				}
+				
+				if (caa == "" && cbb == "") {
+					// The strings compare the same.  Perhaps the caller
+					// will want to call strcmp to break the tie.
+					return nza - nzb;
+				}
+				
+				if (stringsAreCaseInsensitiveEqual) {
+					// If the characters are in another case (upper or lower)
+					if (caa != cbb) {
+						if (caa < cbb) { // NO PMD DeeplyNestedIf
+							return lowerCaseBeforeUpperCase ? +1 : -1;
+						} else if (caa > cbb) {
+							return lowerCaseBeforeUpperCase ? -1 : +1;
+						}
+					}
+				}
+				
+				if (caa < cbb) {
+					return -1;
+				} else if (caa > cbb) {
+					return +1;
+				}
+				
+				++iaa;
+				++ibb;
+			}
+			
+			return 0;
+		}
+		
+		/**
+		 * Helper function used by the naturalCompare method.
+		 */
+		private static function compareRight(a:String, b:String):int {
+			var bias:int = 0;
+			var iaa:int = 0;
+			var ibb:int = 0;
+			var caa:String;
+			var cbb:String;
+			
+			// The longest run of digits wins.  That aside, the greatest
+			// value wins, but we can't know that it will until we've scanned
+			// both numbers to know that they have the same magnitude, so we
+			// remember it in BIAS.
+			for (; ; iaa++, ibb++) {
+				caa = a.charAt(iaa);
+				cbb = b.charAt(ibb);
+				
+				if (!StringUtils.characterIsDigit(caa) && !StringUtils.characterIsDigit(cbb)) {
+					return bias;
+				} else if (!StringUtils.characterIsDigit(caa)) {
+					return -1;
+				} else if (!StringUtils.characterIsDigit(cbb)) {
+					return +1;
+				} else if (caa < cbb) {
+					if (bias == 0) {
+						bias = -1;
+					}
+				} else if (caa > cbb) {
+					if (bias == 0)
+						bias = +1;
+				} else if (caa == "" && cbb == "") {
+					return bias;
+				}
+			}
+			
+			return 0;
+		}
+		
+		/**
+		 * Tokenizes a string to an array using the given delimiters.
+		 */
+		public static function tokenizeToArray(string:String, delimiters:String):Array {
+			var result:Array = [];
+			var numCharacters:int = string.length;
+			var delimiterFound:Boolean = false; // NO PMD UnusedLocalVariable
+			var token:String = "";
+			
+			for (var i:int = 0; i < numCharacters; i++) {
+				var character:String = string.charAt(i);
+				
+				if (delimiters.indexOf(character) == -1) {
+					token += character;
+				} else {
+					result.push(token);
+					token = "";
+				}
+				
+				// add the last token if we reached the end of the string
+				if (i == numCharacters - 1) {
+					result.push(token);
+				}
+			}
+			
+			return result;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD232.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD232.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD232.as
new file mode 100644
index 0000000..571c278
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD232.as
@@ -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 src.live ;
+{
+	class LiveRecording13
+	{
+		public function recordNoCheckTimeShifting(program:EpgProgramShort, epgDay:EpgDay, channelNumber:Number):Void
+		{		
+			if (channelNumber != Zapping.getInstance().getCurrentLCN() &&
+				( (aPossibilities.length == 0) 
+					|| /* Shouldn't be necessery to test because of getTheBestPossibleUriToRecord() */
+					!EligibigityConflictController.getInstance().canRecordWhileDisplaying(uriToRecord, videoDefToRecord)
+				) 
+			)
+			{
+				return ;
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD233a.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD233a.mxml b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD233a.mxml
new file mode 100644
index 0000000..58026d1
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD233a.mxml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<!--- The default skin class for a Spark SkinnableContainer container.
+
+	 @see spark.components.SkinnableContainer
+
+	 @langversion 3.0
+	 @playerversion Flash 10
+	 @playerversion AIR 1.5
+	 @productversion Flex 4
+-->
+<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
+		xmlns:s="library://ns.adobe.com/flex/spark"
+		xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
+		alpha.disabled="0.5">
+
+	<fx:Metadata>[HostComponent("spark.components.SkinnableContainer")]</fx:Metadata>
+
+	<s:states>
+		<s:State name="normal"/>
+		<s:State name="disabled"/>
+	</s:states>
+
+	<!--- Defines the appearance of the SkinnableContainer class's background. -->
+	<s:Rect id="background"
+			left="0"
+			right="0"
+			top="0"
+			bottom="0"
+			radiusX="4"
+			radiusY="4">
+
+		<s:stroke>
+			<!--<s:LinearGradientStroke weight="1"
+				 scaleMode="normal"/>-->
+			<s:SolidColorStroke weight="1"
+								color="0xffffff"
+								scaleMode="normal"
+								alpha="0"/>
+		</s:stroke>
+
+		<s:fill>
+			<s:LinearGradient rotation="90">
+				<s:GradientEntry color="0x70a6d2"
+								 alpha="1"/>
+				<!--000000 / 0.01-->
+				<s:GradientEntry color="0xdbecfb"
+								 alpha="1"/>
+				<!--000000 / 0.07-->
+			</s:LinearGradient>
+
+		</s:fill>
+
+	</s:Rect>
+
+	<!--
+		 Note: setting the minimum size to 0 here so that changes to the host component's
+		 size will not be thwarted by this skin part's minimum size.   This is a compromise,
+		 more about it here: http://bugs.adobe.com/jira/browse/SDK-21143
+	-->
+	<!--- @copy spark.components.SkinnableContainer#contentGroup -->
+	<s:Group id="contentGroup"
+			 left="10"
+			 right="10"
+			 top="0"
+			 bottom="0"
+			 minWidth="0"
+			 minHeight="0">
+		<s:layout>
+			<s:BasicLayout/>
+		</s:layout>
+	</s:Group>
+
+</s:Skin>


[36/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/cancelledIcon.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/cancelledIcon.png b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/cancelledIcon.png
new file mode 100644
index 0000000..9bca099
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/cancelledIcon.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/down.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/down.png b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/down.png
new file mode 100644
index 0000000..3b15bee
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/down.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/icon_tool_trash.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/icon_tool_trash.png b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/icon_tool_trash.png
new file mode 100644
index 0000000..b4b470d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/icon_tool_trash.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/icon_tool_trash2.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/icon_tool_trash2.png b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/icon_tool_trash2.png
new file mode 100644
index 0000000..282a037
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/icon_tool_trash2.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/todoLogo.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/todoLogo.png b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/todoLogo.png
new file mode 100644
index 0000000..a314b8d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/todoLogo.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/todoLogo_big.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/todoLogo_big.png b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/todoLogo_big.png
new file mode 100644
index 0000000..bb89f68
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/todoLogo_big.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/up.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/up.png b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/up.png
new file mode 100644
index 0000000..5dc169c
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/up.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/api/IGetCustomRuleset.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/api/IGetCustomRuleset.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/api/IGetCustomRuleset.as
new file mode 100644
index 0000000..3f92817
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/api/IGetCustomRuleset.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.api
+{
+   import com.adobe.ac.pmd.model.RootRuleset;
+
+   public interface IGetCustomRuleset
+   {
+      function getCustomRuleset() : void;
+	  function onReceiveCustomRuleset( ruleset : RootRuleset ) : void;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/api/IGetRootRuleset.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/api/IGetRootRuleset.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/api/IGetRootRuleset.as
new file mode 100644
index 0000000..54ea211
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/api/IGetRootRuleset.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.api
+{
+   import com.adobe.ac.pmd.model.RootRuleset;
+
+   public interface IGetRootRuleset
+   {
+      function getRootRuleset() : void;
+	  function onReceiveRootRuleset( ruleset : RootRuleset ) : void;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/Controller.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/Controller.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/Controller.as
new file mode 100644
index 0000000..a5a3af0
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/Controller.as
@@ -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.control
+{
+   import com.adobe.ac.pmd.control.commands.GetCustomRulesetCommand;
+   import com.adobe.ac.pmd.control.commands.GetRootRulesetCommand;
+   import com.adobe.ac.pmd.control.commands.GetRulesetContentCommand;
+   import com.adobe.ac.pmd.control.events.GetCustomRulesetEvent;
+   import com.adobe.ac.pmd.control.events.GetRootRulesetEvent;
+   import com.adobe.ac.pmd.control.events.GetRulesetContentEvent;
+   import com.adobe.cairngorm.control.FrontController;
+
+   public class Controller extends FrontController
+   {
+      public function Controller()
+      {
+         super();
+
+         addCommand( GetRootRulesetEvent.EVENT_NAME, GetRootRulesetCommand );
+         addCommand( GetRulesetContentEvent.EVENT_NAME, GetRulesetContentCommand );
+		 addCommand( GetCustomRulesetEvent.EVENT_NAME, GetCustomRulesetCommand );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/commands/GetCustomRulesetCommand.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/commands/GetCustomRulesetCommand.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/commands/GetCustomRulesetCommand.as
new file mode 100644
index 0000000..937a7df
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/commands/GetCustomRulesetCommand.as
@@ -0,0 +1,63 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.control.commands
+{
+   import com.adobe.ac.pmd.api.IGetCustomRuleset;
+   import com.adobe.ac.pmd.control.events.GetCustomRulesetEvent;
+   import com.adobe.ac.pmd.services.rulesets.RulesetDelegate;
+   import com.adobe.ac.pmd.services.translators.RootRulesetTranslator;
+   import com.adobe.cairngorm.commands.ICommand;
+   import com.adobe.cairngorm.control.CairngormEvent;
+   
+   import mx.controls.Alert;
+   import mx.logging.ILogger;
+   import mx.logging.Log;
+   import mx.rpc.IResponder;
+   import mx.rpc.events.ResultEvent;
+
+   public class GetCustomRulesetCommand implements ICommand, IResponder
+   {
+      private static const LOG : ILogger = Log.getLogger( "com.adobe.ac.pmd.control.commands.GetCustomRulesetCommand" );
+
+      private var invoker : IGetCustomRuleset;
+
+	  public function GetCustomRulesetCommand()
+	  {
+	  }
+
+	  public function execute( event : CairngormEvent ) : void
+      {
+         invoker = GetCustomRulesetEvent( event ).invoker;
+         new RulesetDelegate().getCustomRuleset( this );
+      }
+
+      public function result( data : Object ) : void // NO PMD
+      {
+         var xml : XML = XML( ResultEvent( data ).result );
+
+         invoker.onReceiveCustomRuleset( RootRulesetTranslator.deserialize( xml ) );
+      }
+
+      public function fault( info : Object ) : void // NO PMD
+      {
+		  Alert.show( info.toString() ); // NO PMD
+          LOG.error( info.toString() );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/commands/GetRootRulesetCommand.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/commands/GetRootRulesetCommand.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/commands/GetRootRulesetCommand.as
new file mode 100644
index 0000000..11def22
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/commands/GetRootRulesetCommand.as
@@ -0,0 +1,63 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.control.commands
+{
+   import com.adobe.ac.pmd.api.IGetRootRuleset;
+   import com.adobe.ac.pmd.control.events.GetRootRulesetEvent;
+   import com.adobe.ac.pmd.services.rulesets.RulesetDelegate;
+   import com.adobe.ac.pmd.services.translators.RootRulesetTranslator;
+   import com.adobe.cairngorm.commands.ICommand;
+   import com.adobe.cairngorm.control.CairngormEvent;
+   
+   import mx.controls.Alert;
+   import mx.logging.ILogger;
+   import mx.logging.Log;
+   import mx.rpc.IResponder;
+   import mx.rpc.events.ResultEvent;
+
+   public class GetRootRulesetCommand implements ICommand, IResponder
+   {
+      private static const LOG : ILogger = Log.getLogger( "com.adobe.ac.pmd.control.commands.GetRootRulesetCommand" );
+
+      private var invoker : IGetRootRuleset;
+
+      public function GetRootRulesetCommand()
+      {
+      }
+
+      public function execute( event : CairngormEvent ) : void
+      {
+         invoker = GetRootRulesetEvent( event ).invoker;
+         new RulesetDelegate().getRootRuleset( this );
+      }
+
+      public function result( data : Object ) : void // NO PMD
+      {
+         var xml : XML = XML( ResultEvent( data ).result );
+
+         invoker.onReceiveRootRuleset( RootRulesetTranslator.deserialize( xml ) );
+      }
+
+      public function fault( info : Object ) : void // NO PMD
+      {
+		  Alert.show( info.toString() ); // NO PMD
+          LOG.error( info.toString() );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/commands/GetRulesetContentCommand.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/commands/GetRulesetContentCommand.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/commands/GetRulesetContentCommand.as
new file mode 100644
index 0000000..73bf956
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/commands/GetRulesetContentCommand.as
@@ -0,0 +1,65 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.control.commands
+{
+   import com.adobe.ac.pmd.api.IGetRulesetContent;
+   import com.adobe.ac.pmd.control.events.GetRulesetContentEvent;
+   import com.adobe.ac.pmd.model.Ruleset;
+   import com.adobe.ac.pmd.services.rulesets.RulesetDelegate;
+   import com.adobe.ac.pmd.services.translators.RulesetTranslator;
+   import com.adobe.cairngorm.commands.ICommand;
+   import com.adobe.cairngorm.control.CairngormEvent;
+
+   import mx.logging.ILogger;
+   import mx.logging.Log;
+   import mx.rpc.IResponder;
+   import mx.rpc.events.ResultEvent;
+
+   public class GetRulesetContentCommand implements ICommand, IResponder
+   {
+      private static const LOG : ILogger = 
+         Log.getLogger( "com.adobe.ac.pmd.control.commands.GetRulesetContentCommand" );
+
+      private var invoker : IGetRulesetContent;
+
+      public function GetRulesetContentCommand()
+      {
+      }
+
+      public function execute( event : CairngormEvent ) : void
+      {
+         invoker = GetRulesetContentEvent( event ).invoker;
+         new RulesetDelegate().getRuleset( this, GetRulesetContentEvent( event ).ref );
+      }
+
+      public function result( data : Object ) : void // NO PMD
+      {
+         var xml : XML = ResultEvent( data ).result as XML;
+         var ruleset : Ruleset = RulesetTranslator.deserialize( xml );
+
+		 trace( "received " + ruleset.name + " length " + ruleset.rules.length );
+         invoker.onReceiveRulesetContent( ruleset );
+      }
+
+      public function fault( info : Object ) : void // NO PMD
+      {
+         LOG.error( info.toString() );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/events/GetCustomRulesetEvent.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/events/GetCustomRulesetEvent.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/events/GetCustomRulesetEvent.as
new file mode 100644
index 0000000..1b505a8
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/events/GetCustomRulesetEvent.as
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.control.events
+{
+   import com.adobe.ac.pmd.api.IGetCustomRuleset;
+   import com.adobe.cairngorm.control.CairngormEvent;
+   
+   import flash.events.Event;
+
+   public class GetCustomRulesetEvent extends CairngormEvent
+   {
+      public static const EVENT_NAME : String = "ruleset.getRoot";
+
+      private var _invoker : IGetCustomRuleset;
+
+      public function GetCustomRulesetEvent( invoker : IGetCustomRuleset )
+      {
+         super( EVENT_NAME );
+         _invoker = invoker;
+      }
+
+      public function get invoker() : IGetCustomRuleset
+      {
+         return _invoker;
+      }
+
+      override public function clone() : Event
+      {
+         return new GetCustomRulesetEvent( _invoker );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/events/GetRootRulesetEvent.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/events/GetRootRulesetEvent.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/events/GetRootRulesetEvent.as
new file mode 100644
index 0000000..e1077d7
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/control/events/GetRootRulesetEvent.as
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.control.events
+{
+   import com.adobe.ac.pmd.api.IGetRootRuleset;
+   import com.adobe.cairngorm.control.CairngormEvent;
+
+   import flash.events.Event;
+
+   public class GetRootRulesetEvent extends CairngormEvent
+   {
+      public static const EVENT_NAME : String = "ruleset.getCustom";
+
+      private var _invoker : IGetRootRuleset;
+
+      public function GetRootRulesetEvent( invoker : IGetRootRuleset )
+      {
+         super( EVENT_NAME );
+         _invoker = invoker;
+      }
+
+      public function get invoker() : IGetRootRuleset
+      {
+         return _invoker;
+      }
+
+      override public function clone() : Event
+      {
+         return new GetRootRulesetEvent( _invoker );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/MyServiceLocator.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/MyServiceLocator.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/MyServiceLocator.mxml
new file mode 100644
index 0000000..63d9ae0
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/MyServiceLocator.mxml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<cairngorm:ServiceLocator xmlns:cairngorm="com.adobe.cairngorm.business.*"
+   xmlns:mx="http://www.adobe.com/2006/mxml"
+   >
+
+   <mx:Script>
+      <![CDATA[
+         public static const RULESETS_PREFIX : String = "rulesets/";
+      ]]>
+   </mx:Script>
+
+   <mx:HTTPService id="rootRulesetService"
+      resultFormat="e4x"
+      url="{ RULESETS_PREFIX }com/adobe/ac/pmd/all_flex.xml"
+      />
+
+   <mx:HTTPService id="rulesetService"
+      resultFormat="e4x"
+      />
+
+</cairngorm:ServiceLocator>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/rulesets/RulesetDelegate.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/rulesets/RulesetDelegate.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/rulesets/RulesetDelegate.as
new file mode 100644
index 0000000..ecddba0
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/rulesets/RulesetDelegate.as
@@ -0,0 +1,96 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.services.rulesets
+{
+   import com.adobe.ac.pmd.services.MyServiceLocator;
+   import com.adobe.cairngorm.business.ServiceLocator;
+   
+   import flash.events.Event;
+   import flash.events.IOErrorEvent;
+   import flash.events.SecurityErrorEvent;
+   import flash.net.FileReference;
+   
+   import mx.rpc.Fault;
+   import mx.rpc.IResponder;
+   import mx.rpc.events.FaultEvent;
+   import mx.rpc.events.ResultEvent;
+   import mx.rpc.http.HTTPService;
+
+   public class RulesetDelegate
+   {
+	   private var _responder : IResponder;
+	   private var _fileReference : FileReference;
+	   
+	   public function RulesetDelegate()
+	   {
+	   }
+
+	   public function getRuleset( responder : IResponder, ref : String ) : void
+      {
+         rulesetService.url = MyServiceLocator.RULESETS_PREFIX + ref;
+         rulesetService.send().addResponder( responder );
+      }
+
+	  public function getRootRuleset( responder : IResponder ) : void
+	  {
+		  rootRulesetService.send().addResponder( responder );
+	  }
+	  
+	  public function getCustomRuleset( responder : IResponder ) : void
+	  {
+		  _responder = responder;
+		  _fileReference = new FileReference();
+		  _fileReference.addEventListener( Event.SELECT, onRulesetSelected );
+		  _fileReference.addEventListener( Event.COMPLETE, onRulesetLoaded );
+		  _fileReference.addEventListener( IOErrorEvent.IO_ERROR, onIoError );
+		  _fileReference.addEventListener( SecurityErrorEvent.SECURITY_ERROR, onSecurityError );
+		  _fileReference.browse();
+	  }
+	  
+	  private function onIoError( event : IOErrorEvent ) : void
+	  {
+		  _responder.fault( new FaultEvent( FaultEvent.FAULT, false, false, new Fault( "", event.text ) ) );	  
+	  }
+	  
+	  private function onSecurityError( event : SecurityError ) : void
+	  {
+		  _responder.fault( new FaultEvent( FaultEvent.FAULT, false, false, new Fault( event.errorID.toString(), event.message ) ) );	  
+	  }
+
+	  private function onRulesetSelected( event : Event ) : void
+	  {
+		  _fileReference.load();
+	  }
+	  
+	  private function onRulesetLoaded( event : Event ) : void
+	  {
+		  _responder.result( new ResultEvent( ResultEvent.RESULT, false, false, new XML( FileReference( event.target ).data.toString() ) ) );
+	  }
+
+      private function get rootRulesetService() : HTTPService
+      {
+         return MyServiceLocator( ServiceLocator.getInstance() ).rootRulesetService;
+      }
+
+      private function get rulesetService() : HTTPService
+      {
+         return MyServiceLocator( ServiceLocator.getInstance() ).rulesetService;
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/translators/PropertyTranslator.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/translators/PropertyTranslator.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/translators/PropertyTranslator.as
new file mode 100644
index 0000000..245cfb4
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/translators/PropertyTranslator.as
@@ -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.services.translators
+{
+   import com.adobe.ac.pmd.model.Property;
+
+   import mx.collections.ArrayCollection;
+   import mx.collections.ListCollectionView;
+
+   public class PropertyTranslator
+   {
+      public static function deserializeProperties( xmlList : XMLList ) : ListCollectionView
+      {
+         var properties : ListCollectionView = new ArrayCollection();
+
+         for( var childIndex : int = 0; childIndex < xmlList.length(); childIndex++ )
+         {
+            var propertyXml : XML = xmlList[ childIndex ];
+            var property : Property = new Property(); // NO PMD AvoidInstanciationInLoop
+
+            property.name = propertyXml.@name;
+            property.value = propertyXml.children()[ 0 ].toString();
+            properties.addItem( property );
+         }
+         return properties;
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/translators/RootRulesetTranslator.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/translators/RootRulesetTranslator.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/translators/RootRulesetTranslator.as
new file mode 100644
index 0000000..ebe5686
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/translators/RootRulesetTranslator.as
@@ -0,0 +1,107 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.services.translators
+{
+	import com.adobe.ac.pmd.model.RootRuleset;
+	import com.adobe.ac.pmd.model.Rule;
+	import com.adobe.ac.pmd.model.Ruleset;
+	
+	import mx.collections.ArrayCollection;
+
+	public class RootRulesetTranslator
+	{
+		public static function deserialize( xml : XML ) : RootRuleset
+		{
+			var ruleset : RootRuleset = new RootRuleset();
+			var children : XMLList = xml.children();
+			
+			ruleset.name = xml.@name;
+			
+			for( var i : int = 1; i < children.length(); i++ )
+			{
+				var ruleXml : XML = children[ i ];
+				
+				if( ruleXml.@ref != undefined )
+				{
+					var childRuleset : Ruleset = new Ruleset(); // NO PMD AvoidInstanciationInLoop
+					
+					childRuleset.isRef = true;
+					childRuleset.getRulesetContent( ruleXml.@ref );
+					ruleset.rulesets.addItem( childRuleset );
+				}
+				else
+				{
+					if ( ! ruleset.rulesets )
+					{
+						ruleset.rulesets = new ArrayCollection();
+					}
+					var nestingRuleset : Ruleset;
+					if ( ruleset.rulesets.length == 0 )
+					{
+						nestingRuleset = new Ruleset(); // NO PMD AvoidInstanciationInLoop
+						
+						nestingRuleset.name = "Custom ruleset";
+						ruleset.rulesets.addItem( nestingRuleset );
+					}
+					else
+					{
+						nestingRuleset = Ruleset( ruleset.rulesets.getItemAt( 0 ) );
+					}
+					var newRule : Rule = RuleTranslator.deserialize( ruleXml );
+
+					newRule.ruleset = nestingRuleset;
+					nestingRuleset.rules.addItem( newRule );
+				}
+			}
+			
+			return ruleset;			
+		}
+
+		public static function serializeRootRuleset( ruleset : RootRuleset ) : XML
+		{
+			var xmlString : String = "<ruleset name=\"" + ruleset.name + "\"" + 
+				"xmlns=\"http://pmd.sf.net/ruleset/1.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" +
+				"xsi:schemaLocation=\"http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd\"" +
+				"xsi:noNamespaceSchemaLocation=\"http://pmd.sf.net/ruleset_xml_schema.xsd\">" +
+				"<description>" + ( ruleset.description ? ruleset.description : "" ) + "</description>";
+			
+			for each( var childRuleset : Ruleset in ruleset.rulesets )
+			{
+				xmlString += serializeRuleset( childRuleset ).toXMLString();
+			}
+			xmlString += "</ruleset>";
+			
+			return XML( xmlString );
+		}
+		
+		private static function serializeRuleset( ruleset : Ruleset ) : XMLList
+		{
+			var xmlString : String = "";
+			
+			for each( var rule : Rule in ruleset.rules )
+			{
+				if ( !rule.deleted )
+				{
+					xmlString += RuleTranslator.serialize( rule ).toXMLString();
+				}
+			}
+			
+			return new XMLList( xmlString );
+		}}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/translators/RuleTranslator.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/translators/RuleTranslator.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/translators/RuleTranslator.as
new file mode 100644
index 0000000..4b2ef82
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/translators/RuleTranslator.as
@@ -0,0 +1,98 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.services.translators
+{
+    import com.adobe.ac.pmd.model.Property;
+    import com.adobe.ac.pmd.model.Rule;
+    import com.adobe.ac.pmd.model.ViolationPriority;
+
+    public class RuleTranslator
+    {
+        private static const INDENT : String = "        ";
+
+        public static function deserialize( ruleXml : XML ) : Rule
+        {
+            var rule : Rule = new Rule();
+
+            rule.since = ruleXml.@since;
+            rule.name = ruleXml.attribute( "class" );
+            rule.message = ruleXml.@message;
+
+            for ( var childIndex : int = 0; childIndex < ruleXml.children().length(); childIndex++ )
+            {
+                var child : XML = ruleXml.children()[ childIndex ];
+                var name : String = child.name().toString().replace( child.namespace() + "::", "" );
+
+                deserializeChildren( rule, name, child.children() );
+            }
+
+            return rule;
+        }
+
+        public static function serialize( rule : Rule ) : XML
+        {
+            var xmlString : String = "<rule since=\"" + rule.since + "\" class=\"" + rule.name + "\" message=\"" + rule.message +
+                "\">";
+
+            xmlString += "<description>" + ( rule.description ? rule.description : "" ) + "</description>";
+            xmlString += "<priority>" + ( rule.priority ? rule.priority.level : ViolationPriority.WARNING.level ) + "</priority>";
+
+            if ( rule.properties.length > 0 )
+            {
+                xmlString += "<properties>";
+
+                for each ( var property : Property in rule.properties )
+                {
+                    xmlString += "<property name=\"" + property.name + "\">";
+                    xmlString += "<value>" + property.value + "</value>";
+                    xmlString += "</property>";
+                }
+                xmlString += "</properties>";
+            }
+
+            if ( rule.examples )
+            {
+                xmlString += "<example><![CDATA[" + rule.examples + "]]></example>";
+            }
+            xmlString += "</rule>";
+            return XML( xmlString );
+        }
+
+        private static function deserializeChildren( rule : Rule, propertyName : String, value : XMLList ) : void
+        {
+            switch ( propertyName )
+            {
+                case "priority":
+                    rule.priority = ViolationPriority.create( Number( value.toString() ) );
+                    break;
+                case "description":
+                    rule.description = value.toString();
+                    break;
+                case "properties":
+                    rule.properties = PropertyTranslator.deserializeProperties( value );
+                    break;
+                case "example":
+                    rule.examples = value.toString();
+                    break;
+                default:
+                    break;
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/translators/RulesetTranslator.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/translators/RulesetTranslator.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/translators/RulesetTranslator.as
new file mode 100644
index 0000000..f0f3525
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/services/translators/RulesetTranslator.as
@@ -0,0 +1,63 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.services.translators
+{
+    import com.adobe.ac.pmd.model.Rule;
+    import com.adobe.ac.pmd.model.Ruleset;
+    import com.adobe.ac.pmd.model.RootRuleset;
+
+    public class RulesetTranslator
+    {
+        public static function deserialize( xml : XML ) : Ruleset
+        {
+            var ruleset : Ruleset = new Ruleset();
+            var children : XMLList = xml.children();
+
+            ruleset.name = xml.@name;
+
+            for ( var i : int = 1; i < children.length(); i++ )
+            {
+                var ruleXml : XML = children[ i ];
+
+                var rule : Rule = RuleTranslator.deserialize( ruleXml );
+
+                rule.ruleset = ruleset;
+                ruleset.rules.addItem( rule );
+                ruleset.isRef = false;
+            }
+
+            return ruleset;
+        }
+
+        public static function serializeRootRuleset( ruleset : Ruleset ) : XML
+        {
+            var xmlString : String = "<ruleset name=\"" + ruleset.name + "\"" + "xmlns=\"http://pmd.sf.net/ruleset/1.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" +
+                "xsi:schemaLocation=\"http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd\"" + "xsi:noNamespaceSchemaLocation=\"http://pmd.sf.net/ruleset_xml_schema.xsd\">" +
+                "<description>" + ( ruleset.description ? ruleset.description : "" ) + "</description>";
+
+            for each ( var rule : Rule in ruleset.rules )
+            {
+                xmlString += RuleTranslator.serialize( rule ).toXMLString();
+            }
+            xmlString += "</ruleset>";
+
+            return XML( xmlString );
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/RuleEditor.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/RuleEditor.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/RuleEditor.mxml
new file mode 100644
index 0000000..1afc08e
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/RuleEditor.mxml
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:Form xmlns:mx="http://www.adobe.com/2006/mxml"
+    xmlns:view="com.adobe.ac.pmd.view.*"
+    width="450"
+    height="100%"
+    paddingBottom="0"
+    paddingLeft="0"
+    paddingRight="0"
+    paddingTop="5"
+    visible="{ model.selectedRule != null }"
+    >
+
+    <mx:Script>
+        <![CDATA[
+            import com.adobe.ac.pmd.model.ViolationPriority;
+
+            private static const FORM_LABELS_WIDTH : int = 90;
+
+            private function onPrioritiesValueCommit() : void
+            {
+                if ( model.selectedRule )
+                {
+                    model.selectedRule.priority = ViolationPriority( priorities.selectedItem );
+                }
+            }
+        ]]>
+    </mx:Script>
+
+    <view:RuleEditorPM id="model"
+        />
+
+    <mx:Label width="{ width }"
+        text="{ model.selectedRule.shortName }"
+        truncateToFit="true"
+        fontWeight="bold"
+        />
+
+    <mx:HRule width="{ width }"
+        styleName="flexUnitHRule"
+        />
+
+    <mx:FormItem label="Message"
+        >
+
+        <mx:TextInput id="message"
+            width="{ width - FORM_LABELS_WIDTH }"
+			text="{ model.selectedRule.message }"
+			toolTip="{ model.selectedRule.message }"
+            enabled="{ model.selectedRule != null }"
+            change="model.selectedRule.message = message.text"
+            />
+
+    </mx:FormItem>
+
+    <mx:FormItem label="Description"
+        >
+
+        <mx:TextArea id="description"
+            width="{ width - FORM_LABELS_WIDTH }"
+            height="150"
+            text="{ model.selectedRule.description }"
+            enabled="{ model.selectedRule != null }"
+            change="model.selectedRule.description = description.text"
+            />
+
+    </mx:FormItem>
+
+    <mx:FormItem label="Priority"
+        >
+
+        <mx:ComboBox id="priorities"
+            dataProvider="{ ViolationPriority.values }"
+            enabled="{ model.selectedRule != null }"
+            selectedIndex="{ model.selectedRule.priority.level == 1 ? 0 : model.selectedRule.priority.level == 3 ? 1 : 2 }"
+            change="onPrioritiesValueCommit()"
+            />
+
+    </mx:FormItem>
+
+    <mx:FormItem label="Examples"
+        >
+
+        <mx:TextArea id="examples"
+            width="{ width - FORM_LABELS_WIDTH }"
+            height="150"
+            text="{ model.selectedRule.examples }"
+            enabled="{ model.selectedRule != null }"
+            change="model.selectedRule.examples = examples.text"
+            wordWrap="false"
+            />
+
+    </mx:FormItem>
+
+    <mx:FormItem label="Properties"
+        visible="{ model.selectedRule.properties.length > 0 }"
+        >
+
+        <mx:DataGrid width="{ width - FORM_LABELS_WIDTH }"
+            dataProvider="{ model.selectedRule.properties }"
+            editable="true"
+            rowCount="3"
+            >
+
+            <mx:columns>
+
+                <mx:DataGridColumn dataField="name"
+                    editable="false"
+                    headerText="Name"
+                    />
+
+                <mx:DataGridColumn dataField="value"
+                    editable="true"
+                    headerText="Value"
+                    />
+
+            </mx:columns>
+
+        </mx:DataGrid>
+
+    </mx:FormItem>
+
+</mx:Form>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/RuleEditorPM.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/RuleEditorPM.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/RuleEditorPM.as
new file mode 100644
index 0000000..9f2ddbd
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/RuleEditorPM.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.view
+{
+    import com.adobe.ac.model.IPresentationModel;
+    import com.adobe.ac.pmd.model.Rule;
+
+    public class RuleEditorPM implements IPresentationModel
+    {
+        public function RuleEditorPM()
+        {
+        }
+
+        [Bindable]
+        public var selectedRule : Rule;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/RuleSetNavigator.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/RuleSetNavigator.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/RuleSetNavigator.mxml
new file mode 100644
index 0000000..aa1f05a
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/RuleSetNavigator.mxml
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
+    xmlns:renderers="com.adobe.ac.pmd.view.renderers.*"
+    xmlns:view="com.adobe.ac.pmd.view.*"
+    paddingTop="5"
+    creationComplete="model.getRootRuleset()"
+    >
+    <mx:Metadata>
+      [Event(name="selectedRuleChange", type="com.adobe.ac.pmd.view.events.SelectedRuleChangeEvent")]
+   </mx:Metadata>
+
+    <mx:Script>
+        <![CDATA[
+			import com.adobe.ac.pmd.model.Rule;
+			import com.adobe.ac.pmd.model.Ruleset;
+			import com.adobe.ac.pmd.model.events.RulesetReceivedEvent;
+			import com.adobe.ac.pmd.view.events.SelectedRuleChangeEvent;
+			
+			import mx.collections.IHierarchicalCollectionViewCursor;
+			import mx.core.Application;
+			import mx.events.CollectionEvent;
+			import mx.events.CollectionEventKind;
+
+            public function onRuleRemoved() : void
+            {
+				model.rootRuleset.rulesChanged();
+                onChange();
+            }
+
+            private function onChange() : void
+            {
+                dispatchEvent( new SelectedRuleChangeEvent( dg.selectedItem as Rule ) );
+            }
+
+            private function onRulesetReceived( event : RulesetReceivedEvent ) : void
+            {
+				openRuleset( event.ruleset )
+            }
+			
+			public function openRuleset( ruleset : Ruleset ) : void
+			{
+				dg.dataProvider.openNode( ruleset );
+				ruleset.rules.addEventListener( CollectionEvent.COLLECTION_CHANGE, onRulesChange );
+				selectDefaultRule();
+			}
+
+            private function onRulesChange( event : CollectionEvent ) : void
+            {
+                if ( event.kind == CollectionEventKind.REMOVE )
+                {
+                    selectFirstRule();
+                }
+            }
+			
+			private function selectDefaultRule() : void
+			{
+				var ruleNameToLoad : String = Application.application.parameters[ "rule" ];
+				var index : int = -1;
+				
+				if ( ruleNameToLoad )
+				{
+					for each ( var ruleset : Ruleset in model.rootRuleset.rulesets )
+					{
+						index++;
+						for each ( var rule : Rule in ruleset.rules )
+						{
+							index++;
+							if ( rule.name.indexOf( ruleNameToLoad ) != -1 )
+							{
+								dg.selectedIndex = index;
+								onChange();
+								return;
+							}
+						}
+					}
+				}
+				else
+				{
+					selectFirstRule();
+				}				
+			}
+			
+            private function selectFirstRule() : void
+            {
+				dg.selectedIndex = 1;
+                onChange();
+            }
+        ]]>
+    </mx:Script>
+
+    <view:RuleSetNavigatorPM id="model"
+        rulesetReceived="onRulesetReceived( event )"
+        />
+
+    <mx:AdvancedDataGrid id="dg"
+        width="100%"
+        height="100%"
+        change="onChange()"
+        >
+
+        <mx:dataProvider>
+
+            <mx:HierarchicalData source="{ model.rootRuleset.rulesets }"
+                childrenField="rules"
+                />
+
+        </mx:dataProvider>
+
+        <mx:columns>
+
+            <mx:AdvancedDataGridColumn dataField="name"
+                headerText="Name"
+                />
+
+            <mx:AdvancedDataGridColumn width="100"
+                dataField="priority"
+                headerText="Priority"
+                />
+
+            <mx:AdvancedDataGridColumn width="50"
+                headerText=""
+                sortable="false"
+                >
+
+                <mx:itemRenderer>
+
+                    <mx:Component>
+
+                        <renderers:DeleteButtonRenderer ruleRemoved="outerDocument.onRuleRemoved()"
+                            />
+
+                    </mx:Component>
+
+                </mx:itemRenderer>
+
+            </mx:AdvancedDataGridColumn>
+
+        </mx:columns>
+
+    </mx:AdvancedDataGrid>
+
+</mx:VBox>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/RuleSetNavigatorPM.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/RuleSetNavigatorPM.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/RuleSetNavigatorPM.as
new file mode 100644
index 0000000..f1a5ab0
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/RuleSetNavigatorPM.as
@@ -0,0 +1,162 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.view
+{
+    import com.adobe.ac.model.IPresentationModel;
+    import com.adobe.ac.pmd.api.IGetCustomRuleset;
+    import com.adobe.ac.pmd.api.IGetRootRuleset;
+    import com.adobe.ac.pmd.control.events.GetCustomRulesetEvent;
+    import com.adobe.ac.pmd.control.events.GetRootRulesetEvent;
+    import com.adobe.ac.pmd.model.Property;
+    import com.adobe.ac.pmd.model.RootRuleset;
+    import com.adobe.ac.pmd.model.Rule;
+    import com.adobe.ac.pmd.model.Ruleset;
+    import com.adobe.ac.pmd.model.ViolationPriority;
+    import com.adobe.ac.pmd.model.events.RulesetReceivedEvent;
+    import com.adobe.ac.pmd.services.translators.RootRulesetTranslator;
+    
+    import flash.events.Event;
+    import flash.events.EventDispatcher;
+    import flash.net.FileReference;
+
+	[Event( name="rootRulesetReceived", type = "flash.events.Event" )]
+    [Event( name="rulesetReceived", type = "com.adobe.ac.pmd.model.events.RulesetReceivedEvent" )] // NO PMD UnboundTypeInMetadata
+    public class RuleSetNavigatorPM extends EventDispatcher implements IPresentationModel, IGetRootRuleset, IGetCustomRuleset
+    {
+		public static const ROOT_RULESET_RECEIVED : String = "rootRulesetReceived";
+		public static const PARAMETERIZED_RULE_NAME : String = "com.adobe.ac.pmd.rules.parameterized.ParameterizedRegExpBasedRule";
+
+		[Bindable]
+		public var rootRuleset : RootRuleset;
+		
+		private var rulesetReceived : int;
+
+        public function RuleSetNavigatorPM()
+        {
+        }
+		
+		public function addNewRegExpBasedRule() : Ruleset
+		{
+			var property : Property = new Property();
+			
+			property.name = "expression";
+
+			var rule : Rule = new Rule();
+			
+			rule.name = PARAMETERIZED_RULE_NAME;
+			rule.properties.addItem( property );
+			rule.priority = ViolationPriority.INFO;
+			rootRuleset.addRegExpBasedRule( rule );
+			
+			return rootRuleset.customRuleset;
+		}
+
+        public function getRootRuleset() : void
+        {
+            new GetRootRulesetEvent( this ).dispatch();
+        }
+		
+		public function getCustomRuleset() : void
+		{
+			new GetCustomRulesetEvent( this ).dispatch();
+		}
+		
+		public function onReceiveCustomRuleset( ruleset : RootRuleset ) : void
+		{
+			markRulesetAsEntirelyDeleted();
+			
+			for each ( var rule : Rule in Ruleset( ruleset.rulesets.getItemAt( 0 ) ).rules )
+			{
+				if ( rule.name != PARAMETERIZED_RULE_NAME )
+				{
+					markRuleAsUsed( rule );
+				}
+			}
+			addCustomRuleset( ruleset );			
+			rootRuleset.rulesChanged();
+			dispatchEvent( new Event( ROOT_RULESET_RECEIVED ) );
+			dispatchEvent( new RulesetReceivedEvent( ruleset.rulesets.getItemAt( 0 ) as Ruleset ) );			
+		}
+		
+		private function addCustomRuleset( ruleset : RootRuleset ) : void
+		{
+			for each ( var rule : Rule in Ruleset( ruleset.rulesets.getItemAt( 0 ) ).rules )
+			{
+				if ( rule.name == PARAMETERIZED_RULE_NAME )
+				{
+					rootRuleset.addRegExpBasedRule( rule );
+				}
+			}
+		}
+		
+		private function markRuleAsUsed( ruleToFind : Rule ) : void
+		{
+			for each ( var childRuleset : Ruleset in rootRuleset.rulesets )
+			{
+				for each ( var rule : Rule in childRuleset.rules )
+				{
+					if ( rule.name == ruleToFind.name )
+					{
+						rule.unDelete();
+						return;
+					}
+				}
+			}
+
+		}
+
+		private function markRulesetAsEntirelyDeleted() : void
+		{
+			for each ( var childRuleset : Ruleset in rootRuleset.rulesets )
+			{
+				for each ( var rule : Rule in childRuleset.rules )
+				{
+					rule.remove();
+				}
+			}
+		}
+		
+        public function onReceiveRootRuleset( ruleset : RootRuleset ) : void
+        {
+			rulesetReceived = 0;
+			rootRuleset = ruleset;
+			
+            for each ( var childRuleset : Ruleset in ruleset.rulesets )
+            {
+                childRuleset.addEventListener( RulesetReceivedEvent.EVENT_NAME, onRulesetReceived );
+            }
+
+            dispatchEvent( new Event( ROOT_RULESET_RECEIVED ) );
+        }
+
+        public function exportRootRuleset() : void
+        {
+            var xml : XML = RootRulesetTranslator.serializeRootRuleset( rootRuleset );
+            var fileReference : FileReference = new FileReference();
+
+            fileReference.save( xml, "pmd.xml" );
+        }
+		
+		private function onRulesetReceived( event : RulesetReceivedEvent ) : void
+		{
+			rulesetReceived++;
+			dispatchEvent( event );			
+		}
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/events/SelectedRuleChangeEvent.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/events/SelectedRuleChangeEvent.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/events/SelectedRuleChangeEvent.as
new file mode 100644
index 0000000..6659466
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/events/SelectedRuleChangeEvent.as
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.view.events
+{
+    import com.adobe.ac.pmd.model.Rule;
+
+    import flash.events.Event;
+
+    public class SelectedRuleChangeEvent extends Event
+    {
+        public static const EVENT_NAME : String = "selectedRuleChange";
+
+        private var _rule : Rule;
+
+        public function SelectedRuleChangeEvent( rule : Rule )
+        {
+            super( EVENT_NAME );
+
+            _rule = rule;
+        }
+
+        public function get selectedRule() : Rule
+        {
+            return _rule;
+        }
+
+        override public function clone() : Event
+        {
+            return new SelectedRuleChangeEvent( selectedRule );
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/renderers/DeleteButtonRenderer.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/renderers/DeleteButtonRenderer.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/renderers/DeleteButtonRenderer.mxml
new file mode 100644
index 0000000..3b30044
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/com/adobe/ac/pmd/view/renderers/DeleteButtonRenderer.mxml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:Button xmlns:mx="http://www.adobe.com/2006/mxml"
+    icon="{ rule.deleted ? UNDELETE_SKIN : DELETE_SKIN }"
+    toolTip="{ rule.deleted ? 'Add this rule (' + rule.shortName + ') to your ruleset' : 'Remove this rule (' + rule.shortName + ') from your ruleset' }"
+    skin="mx.skins.ProgrammaticSkin"
+    buttonMode="true"
+    click="onClick()"
+    mouseChildren="false"
+    useHandCursor="true"
+    >
+
+    <mx:Metadata>
+      [Event(name="ruleRemoved", type="flash.events.Event")]
+   </mx:Metadata>
+
+    <mx:Script>
+        <![CDATA[
+            import com.adobe.ac.pmd.model.Rule;
+            
+            import mx.events.ListEvent;
+
+            public static const RULE_REMOVED : String = "ruleRemoved";
+
+            [Bindable]
+            private var rule : Rule;
+			
+			[Embed(source='/assets/icon_tool_trash2.png')]
+			private static const DELETE_SKIN : Class;
+			
+			[Embed(source='/assets/add-10.png')]
+			private static const UNDELETE_SKIN : Class;
+			
+            override public function set data( value : Object ) : void // NO PMD
+            {
+                super.data = value;
+
+                rule = value as Rule;
+            }
+
+            private function onClick() : void
+            {
+                if ( rule )
+                {
+					if ( rule.deleted )
+					{
+						rule.unDelete();
+					}
+					else
+					{
+                    	rule.remove();
+					}
+
+                    dispatchEvent( new Event( RULE_REMOVED, true ) );
+                }
+            }
+        ]]>
+    </mx:Script>
+
+</mx:Button>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/locales/en_US/Main.properties
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/locales/en_US/Main.properties b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/locales/en_US/Main.properties
new file mode 100644
index 0000000..09697dc
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/locales/en_US/Main.properties
@@ -0,0 +1,15 @@
+# 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.
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/resources/placeholder.txt
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/resources/placeholder.txt b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/resources/placeholder.txt
new file mode 100644
index 0000000..aa36679
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/resources/placeholder.txt
@@ -0,0 +1,16 @@
+====
+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.
+====

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/AllTests.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/AllTests.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/AllTests.as
new file mode 100644
index 0000000..03b00eb
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/AllTests.as
@@ -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 flex - pmd - ruleset - creator.src.test.flex
+{
+   import com.adobe.ac.pmd.model.RuleTest;
+   import com.adobe.ac.pmd.model.RulesetTest;
+   import com.adobe.ac.pmd.services.translators.RuleTranslatorTest;
+   import com.adobe.ac.pmd.services.translators.RulesetTranslatorTest;
+   import com.adobe.ac.pmd.view.RuleSetNavigatorPMTest;
+   
+   import flexunit.framework.TestSuite;
+
+   public class AllTests extends TestSuite
+   {
+      public function AllTests()
+      {
+         super();
+
+         addTestSuite( RuleSetNavigatorPMTest );
+         addTestSuite( RulesetTest );
+         addTestSuite( RuleTest );
+         addTestSuite( RuleTranslatorTest );
+         addTestSuite( RulesetTranslatorTest );
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/com/adobe/ac/pmd/model/RulesetTest.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/com/adobe/ac/pmd/model/RulesetTest.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/com/adobe/ac/pmd/model/RulesetTest.as
new file mode 100644
index 0000000..f70d229
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/com/adobe/ac/pmd/model/RulesetTest.as
@@ -0,0 +1,72 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.model
+{
+   import com.adobe.ac.pmd.control.events.GetRulesetContentEvent;
+   import com.adobe.ac.pmd.model.events.RulesetReceivedEvent;
+   
+   import flexunit.framework.CairngormEventSource;
+   import flexunit.framework.EventfulTestCase;
+   
+   import mx.collections.ArrayCollection;
+
+   public class RulesetTest extends EventfulTestCase
+   {
+      private var model : Ruleset;
+      
+      public function RulesetTest()
+      {
+      }
+
+      override public function setUp():void
+      {
+         model = new Ruleset();
+      }
+      
+      public function testGetRulesetContent() : void
+      {
+         listenForEvent( CairngormEventSource.instance, GetRulesetContentEvent.EVENT_NAME );
+         
+         model.getRulesetContent( "ref" );
+         
+         assertEvents();
+         assertEquals( model, GetRulesetContentEvent( lastDispatchedExpectedEvent ).invoker );
+         assertEquals( "ref", GetRulesetContentEvent( lastDispatchedExpectedEvent ).ref );
+      }
+      
+      public function testOnReceiveRulesetContent() : void
+      {
+         var receivedRuleset : Ruleset = new Ruleset();
+         
+         listenForEvent( model, RulesetReceivedEvent.EVENT_NAME );
+         
+         receivedRuleset.name = "name";
+         receivedRuleset.description = "description";
+         receivedRuleset.rules = new ArrayCollection();
+         
+         model.onReceiveRulesetContent( receivedRuleset );
+         
+         assertEvents();
+         assertEquals( model, RulesetReceivedEvent( lastDispatchedExpectedEvent ).ruleset );
+         assertEquals( receivedRuleset.name, model.name );
+         assertEquals( receivedRuleset.description, model.description );
+         assertEquals( receivedRuleset.rules, model.rules );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/com/adobe/ac/pmd/services/translators/RuleTranslatorTest.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/com/adobe/ac/pmd/services/translators/RuleTranslatorTest.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/com/adobe/ac/pmd/services/translators/RuleTranslatorTest.as
new file mode 100644
index 0000000..9e78169
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/com/adobe/ac/pmd/services/translators/RuleTranslatorTest.as
@@ -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.services.translators
+{
+	import com.adobe.ac.pmd.model.Rule;
+	
+	import flexunit.framework.EventfulTestCase;
+
+	public class RuleTranslatorTest extends EventfulTestCase
+	{
+		public function testSerialize() : void
+		{
+			var rule : Rule = new Rule();
+			
+			rule.name = "ruleName";
+			
+			var xml : XML = RuleTranslator.serialize( rule );
+			
+			assertEquals( <rule since="null" class="ruleName" message="null"><description/><priority>3</priority></rule>, xml );
+
+			rule.since = "0.9";
+			rule.message = "";
+			xml = RuleTranslator.serialize( rule );
+
+			assertEquals( <rule since="0.9" class="ruleName" message=""><description/><priority>3</priority></rule>, xml );
+		}
+		
+		public function testDeserialize() : void
+		{
+			var xml : XML = <rule since="0.9" class="ruleName" message=""><description/><priority>3</priority></rule>;
+			var rule : Rule = RuleTranslator.deserialize( xml );
+			var expectedRule : Rule = new Rule();
+			
+			expectedRule.name = "ruleName";
+			expectedRule.since = "0.9"; 
+			expectedRule.message = "";
+
+			assertEquals( expectedRule.name, rule.name );
+			assertEquals( expectedRule.since, rule.since );
+			assertEquals( expectedRule.message, rule.message );
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/com/adobe/ac/pmd/services/translators/RulesetTranslatorTest.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/com/adobe/ac/pmd/services/translators/RulesetTranslatorTest.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/com/adobe/ac/pmd/services/translators/RulesetTranslatorTest.as
new file mode 100644
index 0000000..e076f8e
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/com/adobe/ac/pmd/services/translators/RulesetTranslatorTest.as
@@ -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.services.translators
+{
+	import com.adobe.ac.pmd.model.Rule;
+	import com.adobe.ac.pmd.model.Ruleset;
+	
+	import flexunit.framework.EventfulTestCase;
+
+	public class RulesetTranslatorTest extends EventfulTestCase
+	{
+		public function testSerialize() : void
+		{
+			var ruleset : Ruleset = new Ruleset();
+			
+			ruleset.name = "ruleName";
+			
+			var xml : XML = RulesetTranslator.serializeRootRuleset( ruleset );
+			
+			assertEquals( <ruleset name="ruleName" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd" xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><description/></ruleset>, xml );
+			
+			ruleset.rules.addItem( new Rule() );
+
+			xml = RulesetTranslator.serializeRootRuleset( ruleset );
+
+			assertEquals( <ruleset name="ruleName" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd" xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><description/><rule since="null" class="null" message="null"><description/><priority>3</priority></rule></ruleset>, xml );
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/com/adobe/ac/pmd/view/RuleSetNavigatorPMTest.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/com/adobe/ac/pmd/view/RuleSetNavigatorPMTest.as b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/com/adobe/ac/pmd/view/RuleSetNavigatorPMTest.as
new file mode 100644
index 0000000..f41c0c7
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/test/flex/com/adobe/ac/pmd/view/RuleSetNavigatorPMTest.as
@@ -0,0 +1,80 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.view
+{
+   import com.adobe.ac.pmd.control.events.GetRootRulesetEvent;
+   import com.adobe.ac.pmd.model.RootRuleset;
+   import com.adobe.ac.pmd.model.Ruleset;
+   import com.adobe.ac.pmd.model.events.RulesetReceivedEvent;
+
+   import flexunit.framework.CairngormEventSource;
+   import flexunit.framework.EventfulTestCase;
+
+   import mx.collections.ArrayCollection;
+
+   public class RuleSetNavigatorPMTest extends EventfulTestCase
+   {
+      private var model : RuleSetNavigatorPM;
+      
+      public function RuleSetNavigatorPMTest()
+      {
+      }
+
+      override public function setUp() : void
+      {
+         model = new RuleSetNavigatorPM();
+      }
+
+      public function testGetRootRuleset() : void
+      {
+         listenForEvent( CairngormEventSource.instance, GetRootRulesetEvent.EVENT_NAME );
+
+         model.getRootRuleset();
+
+         assertEvents();
+      }
+
+      public function testOnReceiveRootRuleset() : void
+      {
+         var emptyRootRuleset : RootRuleset = new RootRuleset();
+
+         listenForEvent( model, RuleSetNavigatorPM.ROOT_RULESET_RECEIVED );
+
+         model.onReceiveRootRuleset( emptyRootRuleset );
+
+         assertEvents();
+         assertEquals( emptyRootRuleset, model.rootRuleset );
+
+         var rootRuleset : RootRuleset = new RootRuleset();
+
+         rootRuleset.rulesets = new ArrayCollection();
+         rootRuleset.rulesets.addItem( new Ruleset() );
+         rootRuleset.rulesets.addItem( new Ruleset() );
+
+         model.onReceiveRootRuleset( rootRuleset );
+
+         assertEquals( rootRuleset, model.rootRuleset );
+
+         for each( var childRuleset : Ruleset in rootRuleset.rulesets )
+         {
+            assertTrue( childRuleset.hasEventListener( RulesetReceivedEvent.EVENT_NAME ) );
+         }
+      }
+   }
+}
\ No newline at end of file


[20/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/pom.xml
new file mode 100644
index 0000000..e078358
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/pom.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-metrics-maven-plugin</artifactId>
+    <packaging>maven-plugin</packaging>
+
+    <name>Adobe Flex Metrics Maven plugin</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+            <version>${maven-plugin-api.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.reporting</groupId>
+            <artifactId>maven-reporting-impl</artifactId>
+            <version>${maven-reporting-impl.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-pmd-plugin</artifactId>
+            <version>${maven-pmd-plugin.version}</version>
+            <type>maven-plugin</type>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <version>${project.parent.version}</version>
+            <artifactId>flex-pmd-metrics</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-test-resources</artifactId>
+            <version>${project.parent.version}</version>
+            <classifier>resources</classifier>
+            <type>zip</type>
+            <scope>provided</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+
+        <testResources>
+            <testResource>
+                <directory>${project.build.directory}/test/generated-resources</directory>
+            </testResource>
+        </testResources>
+
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-test-resources</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeGroupIds>${project.groupId}</includeGroupIds>
+                            <includes>**/*.as,**/*.mxml</includes>
+                            <outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
+                            <excludeTransitive>true</excludeTransitive>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/FlexMetricsMojo.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/FlexMetricsMojo.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/FlexMetricsMojo.java
new file mode 100644
index 0000000..323c976
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/FlexMetricsMojo.java
@@ -0,0 +1,201 @@
+/*
+ * 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.metrics.maven;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.Node;
+import org.dom4j.io.SAXReader;
+
+import com.adobe.ac.pmd.LoggerUtils;
+
+/**
+ * @author xagnetti
+ * @goal check
+ * @execute goal="metrics"
+ */
+public final class FlexMetricsMojo extends AbstractMojo
+{
+   /**
+    * CCN Limit, any code with a ccn greater than this number will generate a
+    * violation
+    * 
+    * @parameter default-value="10"
+    * @required
+    */
+   private int     ccnLimit;
+
+   /**
+    * Whether to fail the build if the validation check fails.
+    * 
+    * @parameter default-value="false"
+    * @required
+    */
+   private boolean failOnViolation;
+
+   /**
+    * ncss Limit, any code with a ncss greater than this number will generate a
+    * violation
+    * 
+    * @parameter default-value="100"
+    * @required
+    */
+   private int     ncssLimit;
+
+   /**
+    * Specifies the location of the source files to be used.
+    * 
+    * @parameter expression="${project.build.sourceDirectory}"
+    * @required
+    * @readonly
+    */
+   private File    sourceDirectory;
+
+   /**
+    * Name of the file holding the xml file generated by JavaNCSS
+    * 
+    * @parameter default-value="javancss-raw-report.xml"
+    * @required
+    */
+   private String  tempFileName;
+
+   /**
+    * Specifies the directory where the XML report will be generated.
+    * 
+    * @parameter default-value="${project.build.directory}"
+    * @required
+    */
+   private File    xmlOutputDirectory;
+
+   public FlexMetricsMojo()
+   {
+      super();
+   }
+
+   public FlexMetricsMojo( final File outputDirectoryToBeSet,
+                           final File sourceDirectoryToBeSet )
+   {
+      super();
+      xmlOutputDirectory = outputDirectoryToBeSet;
+      sourceDirectory = sourceDirectoryToBeSet;
+   }
+
+   @SuppressWarnings("unchecked")
+   public void execute() throws MojoExecutionException,
+                        MojoFailureException
+   {
+      new LoggerUtils().loadConfiguration();
+      if ( sourceDirectory != null
+            && sourceDirectory.exists() )
+      {
+         final Set< String > ccnViolation = new HashSet< String >();
+         final Set< String > ncssViolation = new HashSet< String >();
+         final List< Node > methodList = loadDocument().selectNodes( "//javancss/functions/function" );
+
+         for ( final Node node : methodList )
+         {
+            if ( Integer.valueOf( node.valueOf( "ccn" ) ) > ccnLimit )
+            {
+               ccnViolation.add( node.valueOf( "name" ) );
+            }
+            if ( Integer.valueOf( node.valueOf( "ncss" ) ) > ncssLimit )
+            {
+               ncssViolation.add( node.valueOf( "name" ) );
+            }
+         }
+         reportViolation( "ccn",
+                          ccnViolation,
+                          ccnLimit );
+         reportViolation( "ncss",
+                          ncssViolation,
+                          ncssLimit );
+      }
+   }
+
+   public void setCcnLimit( final int ccnLimitToBeSet )
+   {
+      ccnLimit = ccnLimitToBeSet;
+   }
+
+   public void setFailOnViolation( final boolean failOnViolationToBeSet )
+   {
+      failOnViolation = failOnViolationToBeSet;
+   }
+
+   public void setNcssLimit( final int ncssLimitToBeSet )
+   {
+      ncssLimit = ncssLimitToBeSet;
+   }
+
+   public void setTempFileName( final String tempFileNameToBeSet )
+   {
+      tempFileName = tempFileNameToBeSet;
+   }
+
+   public void setXmlOutputDirectory( final File xmlOutputDirectoryToBeSet )
+   {
+      xmlOutputDirectory = xmlOutputDirectoryToBeSet;
+   }
+
+   private Document loadDocument() throws MojoFailureException
+   {
+      final File ncssXmlFile = new File( xmlOutputDirectory
+            + File.separator + tempFileName );
+      try
+      {
+         return new SAXReader().read( ncssXmlFile );
+      }
+      catch ( final DocumentException de )
+      {
+         throw new MojoFailureException( "Can't read javancss xml output file : "
+               + ncssXmlFile, de );
+      }
+   }
+
+   private void reportViolation( final String statName,
+                                 final Set< String > violationSet,
+                                 final int limit ) throws MojoFailureException
+   {
+      getLog().debug( statName
+            + " Violation = " + violationSet.size() );
+      if ( !violationSet.isEmpty() )
+      {
+         final String violationString = "Your code has "
+               + violationSet.size() + " method(s) with a " + statName + " greater than " + limit;
+         getLog().warn( violationString );
+         final Iterator< String > iterator = violationSet.iterator();
+         while ( iterator.hasNext() )
+         {
+            getLog().warn( "    "
+                  + iterator.next() );
+         }
+         if ( failOnViolation )
+         {
+            throw new MojoFailureException( violationString );
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/FlexMetricsReportMojo.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/FlexMetricsReportMojo.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/FlexMetricsReportMojo.java
new file mode 100644
index 0000000..ffc3497
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/FlexMetricsReportMojo.java
@@ -0,0 +1,414 @@
+/*
+ * 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.metrics.maven;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.reporting.AbstractMavenReport;
+import org.apache.maven.reporting.MavenReportException;
+import org.codehaus.doxia.site.renderer.SiteRenderer;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.io.SAXReader;
+
+import com.adobe.ac.pmd.LoggerUtils;
+import com.adobe.ac.pmd.metrics.maven.generators.NcssAggregateReportGenerator;
+import com.adobe.ac.pmd.metrics.maven.generators.NcssReportGenerator;
+import com.adobe.ac.pmd.metrics.maven.utils.ModuleReport;
+import com.adobe.ac.pmd.metrics.maven.utils.NcssExecuter;
+
+/**
+ * @author xagnetti
+ * @goal metrics
+ */
+public final class FlexMetricsReportMojo extends AbstractMavenReport
+{
+   private static final String OUTPUT_NAME = "javancss";
+
+   private static ResourceBundle getBundle()
+   {
+      return ResourceBundle.getBundle( "flexMetrics" ); // NOPMD
+   }
+
+   /**
+    * Specifies the maximum number of lines to take into account into the
+    * reports.
+    * 
+    * @parameter default-value="5"
+    * @required
+    */
+   private int                  lineThreshold;
+
+   /**
+    * Specifies the factor the mxml files nb of lines will be taken into account
+    * 
+    * @parameter default-value="0"
+    * @required
+    */
+   private double               mxmlFactor;
+
+   /**
+    * Specifies the directory where the HTML report will be generated.
+    * 
+    * @parameter expression="${project.reporting.outputDirectory}"
+    * @required
+    * @readonly
+    */
+   private File                 outputDirectory;
+
+   /**
+    * @parameter expression="${project}"
+    * @required
+    * @readonly
+    */
+   private MavenProject         project;
+
+   /**
+    * The projects in the reactor for aggregation report.
+    * 
+    * @parameter expression="${reactorProjects}"
+    * @readonly
+    */
+   private List< MavenProject > reactorProjects;
+   /**
+    * @parameter 
+    *            expression="${component.org.codehaus.doxia.site.renderer.SiteRenderer}"
+    * @required
+    * @readonly
+    */
+   private SiteRenderer         siteRenderer;
+
+   /**
+    * Specifies the location of the source files to be used.
+    * 
+    * @parameter expression="${project.build.sourceDirectory}"
+    * @required
+    * @readonly
+    */
+   private File                 sourceDirectory;
+
+   /**
+    * Specified the name of the temporary file generated by Javancss prior
+    * report generation.
+    * 
+    * @parameter default-value="javancss-raw-report.xml"
+    * @required
+    */
+   private String               tempFileName;
+
+   /**
+    * Specifies the directory where the XML report will be generated.
+    * 
+    * @parameter default-value="${project.build.directory}"
+    * @required
+    */
+   private File                 xmlOutputDirectory;
+
+   public FlexMetricsReportMojo()
+   {
+      super();
+   }
+
+   public FlexMetricsReportMojo( final MavenProject projectToBeSet,
+                                 final File source,
+                                 final File output )
+   {
+      this();
+      project = projectToBeSet;
+      sourceDirectory = source;
+      outputDirectory = output;
+   }
+
+   public void addReactorProject( final MavenProject project )
+   {
+      if ( reactorProjects == null )
+      {
+         reactorProjects = new ArrayList< MavenProject >();
+      }
+      reactorProjects.add( project );
+   }
+
+   /**
+    * @see org.apache.maven.reporting.MavenReport#execute(java.util.Locale)
+    */
+   @Override
+   public void executeReport( final Locale locale ) throws MavenReportException
+   {
+      new LoggerUtils().loadConfiguration();
+      if ( sourceDirectory != null )
+      {
+         if ( sourceDirectory.exists() )
+         {
+            try
+            {
+               generateSingleReport();
+            }
+            catch ( final DocumentException e )
+            {
+               throw new MavenReportException( e.getMessage(), e );
+            }
+            catch ( final IOException e )
+            {
+               throw new MavenReportException( e.getMessage(), e );
+            }
+         }
+         else
+         {
+            getLog().error( "The source directory is not found "
+                  + sourceDirectory.getAbsolutePath() );
+         }
+      }
+      else
+      {
+         generateAggregateReport( locale );
+      }
+   }
+
+   /**
+    * @see org.apache.maven.reporting.MavenReport#getDescription(java.util.Locale)
+    */
+   public String getDescription( final Locale locale )
+   {
+      return getBundle().getString( "report.ncss.description" );
+   }
+
+   /**
+    * @see org.apache.maven.reporting.MavenReport#getName(java.util.Locale)
+    */
+   public String getName( final Locale locale )
+   {
+      return getBundle().getString( "report.ncss.name" );
+   }
+
+   /**
+    * @see org.apache.maven.reporting.MavenReport#getOutputName()
+    */
+   public String getOutputName()
+   {
+      return OUTPUT_NAME;
+   }
+
+   public void setLineThreshold( final int lineThresholdToBeSet )
+   {
+      lineThreshold = lineThresholdToBeSet;
+   }
+
+   public void setSiteRenderer( final SiteRenderer siteRendererToBeSet )
+   {
+      siteRenderer = siteRendererToBeSet;
+   }
+
+   public void setTempFileName( final String tempFileNameToBeSet )
+   {
+      tempFileName = tempFileNameToBeSet;
+   }
+
+   public void setXmlOutputDirectory( final File xmlOutputDirectoryToBeSet )
+   {
+      xmlOutputDirectory = xmlOutputDirectoryToBeSet;
+   }
+
+   /**
+    * Build a path for the output filename.
+    * 
+    * @return A String representation of the output filename.
+    */
+   /* package */File buildOutputFile()
+   {
+      return new File( getXmlOutputDirectory()
+            + File.separator + tempFileName );
+   }
+
+   /**
+    * @see org.apache.maven.reporting.AbstractMavenReport#getOutputDirectory()
+    */
+   @Override
+   protected String getOutputDirectory()
+   {
+      return outputDirectory.getAbsolutePath();
+   }
+
+   /**
+    * @see org.apache.maven.reporting.AbstractMavenReport#getProject()
+    */
+   @Override
+   protected MavenProject getProject()
+   {
+      return project;
+   }
+
+   /**
+    * @see org.apache.maven.reporting.AbstractMavenReport#getSiteRenderer()
+    */
+   @Override
+   protected SiteRenderer getSiteRenderer()
+   {
+      return siteRenderer;
+   }
+
+   /**
+    * Getter for the source directory
+    * 
+    * @return the source directory as a File object.
+    */
+   protected File getSourceDirectory()
+   {
+      return sourceDirectory;
+   }
+
+   protected String getXmlOutputDirectory()
+   {
+      return xmlOutputDirectory.getAbsolutePath();
+   }
+
+   private void generateAggregateReport( final Locale locale ) throws MavenReportException
+   {
+      final String basedir = project.getBasedir().toString();
+      final String output = xmlOutputDirectory.toString();
+      if ( getLog().isDebugEnabled() )
+      {
+         getLog().debug( "basedir: "
+               + basedir );
+         getLog().debug( "output: "
+               + output );
+      }
+      String relative = null;
+      if ( output.startsWith( basedir ) )
+      {
+         relative = output.substring( basedir.length() + 1 );
+      }
+      else
+      {
+         getLog().error( "Unable to aggregate report because I can't "
+               + "determine the relative location of the XML report" );
+         return;
+      }
+      getLog().debug( "relative: "
+            + relative );
+      final List< ModuleReport > reports = new ArrayList< ModuleReport >();
+
+      if ( reactorProjects != null )
+      {
+         for ( final MavenProject mavenProject : reactorProjects )
+         {
+            final MavenProject child = mavenProject;
+            final File xmlReport = new File( child.getBasedir() // NOPMD
+                  + File.separator + relative, tempFileName );
+            if ( xmlReport.exists() )
+            {
+               reports.add( new ModuleReport( child, loadDocument( xmlReport ) ) ); // NOPMD
+            }
+            else
+            {
+               getLog().debug( "xml file not found: "
+                     + xmlReport );
+            }
+         }
+         getLog().debug( "Aggregating "
+               + reports.size() + " JavaNCSS reports" );
+
+         new NcssAggregateReportGenerator( getSink(), getBundle(), getLog() ).doReport( locale,
+                                                                                        reports,
+                                                                                        lineThreshold );
+      }
+   }
+
+   private void generateSingleReport() throws MavenReportException,
+                                      DocumentException,
+                                      IOException
+   {
+      if ( getLog().isDebugEnabled() )
+      {
+         getLog().debug( "Calling NCSSExecuter with src    : "
+               + sourceDirectory );
+         getLog().debug( "Calling NCSSExecuter with output : "
+               + buildOutputFile() );
+      }
+      // run javaNCss and produce an temp xml file
+      new NcssExecuter( sourceDirectory, buildOutputFile(), mxmlFactor ).execute();
+      if ( !isTempReportGenerated() )
+      {
+         throw new MavenReportException( "Can't process temp ncss xml file." );
+      }
+      // parse the freshly generated file and write the report
+      final NcssReportGenerator reportGenerator = new NcssReportGenerator( getSink(), getBundle(), getLog() );
+      reportGenerator.doReport( loadDocument(),
+                                lineThreshold );
+   }
+
+   /**
+    * Check that the expected temporary file generated by JavaNCSS exists.
+    * 
+    * @return <code>true</code> if the temporary report exists,
+    *         <code>false</code> otherwise.
+    */
+   private boolean isTempReportGenerated()
+   {
+      return buildOutputFile().exists();
+   }
+
+   private Document loadDocument() throws MavenReportException
+   {
+      return loadDocument( buildOutputFile() );
+   }
+
+   /**
+    * Load the xml file generated by javancss. It first tries to load it as is.
+    * If this fails it tries to load it with the forceEncoding parameter which
+    * defaults to the system property "file.encoding". If this latter fails, it
+    * throws a MavenReportException.
+    */
+   private Document loadDocument( final File file ) throws MavenReportException
+   {
+      try
+      {
+         return loadDocument( file,
+                              null );
+      }
+      catch ( final DocumentException ignored )
+      {
+         try
+         {
+            return loadDocument( file,
+                                 System.getProperty( "file.encoding" ) );
+         }
+         catch ( final DocumentException de )
+         {
+            throw new MavenReportException( de.getMessage(), de );
+         }
+      }
+   }
+
+   private Document loadDocument( final File file,
+                                  final String encoding ) throws DocumentException
+   {
+      final SAXReader saxReader = new SAXReader();
+      if ( encoding != null )
+      {
+         saxReader.setEncoding( encoding );
+         getLog().debug( "Loading xml file with encoding : "
+               + encoding );
+      }
+      return saxReader.read( file );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/generators/NcssAggregateReportGenerator.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/generators/NcssAggregateReportGenerator.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/generators/NcssAggregateReportGenerator.java
new file mode 100644
index 0000000..929d939
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/generators/NcssAggregateReportGenerator.java
@@ -0,0 +1,193 @@
+/*
+ * 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.metrics.maven.generators;
+
+import java.util.List;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.apache.maven.plugin.logging.Log;
+import org.codehaus.doxia.sink.Sink;
+import org.dom4j.Document;
+import org.dom4j.Node;
+
+import com.adobe.ac.pmd.metrics.maven.utils.ModuleReport;
+
+/**
+ * Generates the JavaNCSS aggregate report.
+ *
+ * @author <a href="mperham AT gmail.com">Mike Perham</a>
+ * @version $Id: NcssAggregateReportGenerator.java 3286 2007-02-08 20:18:51Z
+ *          jeanlaurent $
+ */
+public class NcssAggregateReportGenerator extends NcssReportGeneratorBase
+{
+
+    /**
+     * @param getSink() the getSink() which will be used for reporting.
+     * @param bundle the correct RessourceBundle to be used for reporting.
+     * @param log
+     */
+    public NcssAggregateReportGenerator( final Sink sink,
+                                         final ResourceBundle bundle,
+                                         final Log log )
+    {
+        super( sink, bundle, log );
+    }
+
+    /**
+     * Generates the JavaNCSS report.
+     *
+     * @param locale the Locale used for this report.
+     * @param moduleReports the javancss raw reports to aggregate, List of
+     *           ModuleReport.
+     * @param lineThreshold the maximum number of lines to keep in major reports.
+     */
+    public void doReport( final Locale locale,
+                          final List< ModuleReport > moduleReports,
+                          final int lineThreshold )
+    {
+        // HEADER
+        getSink().head();
+        getSink().title();
+        getSink().text( getResourceBundle().getString( "report.javancss.title" ) );
+        getSink().title_();
+        getSink().head_();
+        // BODY
+        getSink().body();
+        doIntro();
+        // packages
+        startSection( "report.javancss.module.link",
+                "report.javancss.module.title" );
+        doModuleAnalysis( moduleReports );
+        endSection();
+        getSink().body_();
+        getSink().close();
+    }
+
+    private void doIntro()
+    {
+        getSink().section1();
+        getSink().sectionTitle1();
+        getSink().text( getResourceBundle().getString( "report.javancss.main.title" ) );
+        getSink().sectionTitle1_();
+        getSink().paragraph();
+        getSink().text( getResourceBundle().getString( "report.javancss.main.text" )
+                + " " );
+        getSink().lineBreak();
+        getSink().link( "http://www.kclee.de/clemens/java/javancss/" );
+        getSink().text( "JavaNCSS web site." );
+        getSink().link_();
+        getSink().paragraph_();
+        getSink().section1_();
+    }
+
+    private void doModuleAnalysis( final List< ModuleReport > reports )
+    {
+        doModuleAnalysisHeader();
+
+        int packages = 0;
+        int classes = 0;
+        int methods = 0;
+        int ncss = 0;
+        int javadocs = 0;
+        int jdlines = 0;
+        int single = 0;
+        int multi = 0;
+        for ( final ModuleReport moduleReport : reports )
+        {
+            final ModuleReport report = moduleReport;
+            final Document document = report.getJavancssDocument();
+            getSink().tableRow();
+            getLog().debug( "Aggregating "
+                    + report.getModule().getArtifactId() );
+            tableCellHelper( report.getModule().getArtifactId() );
+            final int packageSize = document.selectNodes( "//javancss/packages/package" ).size();
+            packages += packageSize;
+            tableCellHelper( String.valueOf( packageSize ) );
+
+            final Node node = document.selectSingleNode( "//javancss/packages/total" );
+
+            tableCellHelper( node.valueOf( "classes" ) );
+            classes += Integer.parseInt( node.valueOf( "classes" ) );
+            tableCellHelper( node.valueOf( "functions" ) );
+            methods += Integer.parseInt( node.valueOf( "functions" ) );
+            tableCellHelper( node.valueOf( "ncss" ) );
+            ncss += Integer.parseInt( node.valueOf( "ncss" ) );
+            tableCellHelper( node.valueOf( "javadocs" ) );
+            javadocs += Integer.parseInt( node.valueOf( "javadocs" ) );
+            tableCellHelper( node.valueOf( "javadoc_lines" ) );
+            jdlines += Integer.parseInt( node.valueOf( "javadoc_lines" ) );
+            tableCellHelper( node.valueOf( "single_comment_lines" ) );
+            single += Integer.parseInt( node.valueOf( "single_comment_lines" ) );
+            tableCellHelper( node.valueOf( "multi_comment_lines" ) );
+            multi += Integer.parseInt( node.valueOf( "multi_comment_lines" ) );
+
+            getSink().tableRow_();
+        }
+
+        doModuleAnalysisTotals( packages,
+                classes,
+                methods,
+                ncss,
+                javadocs,
+                jdlines,
+                single,
+                multi );
+    }
+
+    private void doModuleAnalysisHeader()
+    {
+        getSink().table();
+        getSink().tableRow();
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.module" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.packages" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.classetotal" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.functiontotal" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.ncsstotal" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.javadoc" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.javadoc_line" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.single_comment" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.multi_comment" ) );
+        getSink().tableRow_();
+    }
+
+    private void doModuleAnalysisTotals( final int packages,
+                                         final int classes,
+                                         final int methods,
+                                         final int ncss,
+                                         final int javadocs,
+                                         final int jdlines,
+                                         final int single,
+                                         final int multi )
+    {
+        getSink().tableRow();
+        tableCellHelper( getResourceBundle().getString( "report.javancss.header.totals" ) );
+        tableCellHelper( String.valueOf( packages ) );
+        tableCellHelper( String.valueOf( classes ) );
+        tableCellHelper( String.valueOf( methods ) );
+        tableCellHelper( String.valueOf( ncss ) );
+        tableCellHelper( String.valueOf( javadocs ) );
+        tableCellHelper( String.valueOf( jdlines ) );
+        tableCellHelper( String.valueOf( single ) );
+        tableCellHelper( String.valueOf( multi ) );
+        getSink().tableRow_();
+
+        getSink().table_();
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/generators/NcssReportGenerator.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/generators/NcssReportGenerator.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/generators/NcssReportGenerator.java
new file mode 100644
index 0000000..2bbe67e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/generators/NcssReportGenerator.java
@@ -0,0 +1,464 @@
+/*
+ * 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.metrics.maven.generators;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ResourceBundle;
+
+import org.apache.maven.plugin.logging.Log;
+import org.codehaus.doxia.sink.Sink;
+import org.dom4j.Document;
+import org.dom4j.Node;
+
+import com.adobe.ac.pmd.metrics.maven.utils.NumericNodeComparator;
+
+/**
+ * Generates the javaNcss maven report.
+ *
+ * @author <a href="jeanlaurentATgmail.com">Jean-Laurent de Morlhon</a>
+ * @version $Id: NcssReportGenerator.java 3286 2007-02-08 20:18:51Z jeanlaurent
+ *          $
+ */
+public class NcssReportGenerator extends NcssReportGeneratorBase
+{
+    private static final String CLASSES   = "classes";
+    private static final String FUNCTIONS = "functions";
+    private static final String NAME      = "name";
+    private static final String NCSS      = "ncss";
+    private int                 lineThreshold;
+
+    /**
+     * build a new NcssReportGenerator.
+     *
+     * @param sink the sink which will be used for reporting.
+     * @param bundle the correct RessourceBundle to be used for reporting.
+     */
+    public NcssReportGenerator( final Sink sink,
+                                final ResourceBundle bundle,
+                                final Log log )
+    {
+        super( sink, bundle, log );
+    }
+
+    /**
+     * Generates the JavaNcss reports.
+     *
+     * @param document the javaNcss raw report as an XML document.
+     * @param lineThresholdToBeSet the maximum number of lines to keep in major
+     *           reports.
+     */
+    public void doReport( final Document document,
+                          final int lineThresholdToBeSet )
+    {
+        lineThreshold = lineThresholdToBeSet;
+        // HEADER
+        getSink().head();
+        getSink().title();
+        getSink().text( getResourceBundle().getString( "report.javancss.title" ) );
+        getSink().title_();
+        getSink().head_();
+        // BODY
+        getSink().body();
+        doIntro();
+        // packages
+        startSection( "report.javancss.package.link",
+                "report.javancss.package.title" );
+        doMainPackageAnalysis( document );
+        doTotalPackageAnalysis( document );
+        endSection();
+        // Objects
+        startSection( "report.javancss.object.link",
+                "report.javancss.object.title" );
+        doTopObjectNcss( document );
+        doTopObjectFunctions( document );
+        doObjectAverage( document );
+        endSection();
+        // Functions
+        startSection( "report.javancss.function.link",
+                "report.javancss.function.title" );
+        doFunctionAnalysis( document );
+        doFunctionAverage( document );
+        endSection();
+        // Explanation
+        startSection( "report.javancss.explanation.link",
+                "report.javancss.explanation.title" );
+        doExplanation();
+        endSection();
+        getSink().body_();
+    }
+
+    // sink helper to start a section
+    @Override
+    protected void startSection( final String link,
+                                 final String title )
+    {
+        super.startSection( link,
+                title );
+        navigationBar();
+    }
+
+    private void doExplanation()
+    {
+        explainNcss();
+        explainCcn();
+    }
+
+    @SuppressWarnings("unchecked")
+    private void doFunctionAnalysis( final Document document )
+    {
+        subtitleHelper( getResourceBundle().getString( "report.javancss.top" )
+                + " " + lineThreshold + " " + getResourceBundle().getString( "report.javancss.function.byncss" ) );
+        getSink().paragraph();
+        getSink().table();
+        getSink().tableRow();
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.function" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.ncss" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.ccn" ) );
+        getSink().tableRow_();
+        final List< Node > list = document.selectNodes( "//javancss/functions/function" );
+        Collections.sort( list,
+                new NumericNodeComparator( NCSS ) );
+        final Iterator< Node > nodeIterator = list.iterator();
+        int currentIndex = 0;
+        while ( nodeIterator.hasNext()
+                && currentIndex++ < lineThreshold )
+        {
+            final Node node = nodeIterator.next();
+            getSink().tableRow();
+            // getSink().tableCell();
+            // getSink().tableCell_();
+            tableCellHelper( node.valueOf( "name" ) );
+            tableCellHelper( node.valueOf( NCSS ) );
+            tableCellHelper( node.valueOf( "ccn" ) );
+            getSink().tableRow_();
+        }
+        getSink().table_();
+        getSink().paragraph_();
+    }
+
+    private void doFunctionAverage( final Document document )
+    {
+        subtitleHelper( getResourceBundle().getString( "report.javancss.averages" ) );
+        getSink().paragraph();
+        getSink().table();
+        getSink().tableRow();
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.programncss" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.ncssaverage" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.ccnaverage" ) );
+        getSink().tableRow_();
+        final Node node = document.selectSingleNode( "//javancss/functions/function_averages" );
+        final String totalNcss = document.selectSingleNode( "//javancss/functions/ncss" ).getText();
+        getSink().tableRow();
+        tableCellHelper( totalNcss );
+        tableCellHelper( node.valueOf( NCSS ) );
+        tableCellHelper( node.valueOf( "ccn" ) );
+        getSink().tableRow_();
+        getSink().table_();
+        getSink().paragraph_();
+    }
+
+    private void doIntro()
+    {
+        getSink().section1();
+        getSink().sectionTitle1();
+        getSink().text( getResourceBundle().getString( "report.javancss.main.title" ) );
+        getSink().sectionTitle1_();
+        getSink().paragraph();
+        navigationBar();
+        getSink().text( getResourceBundle().getString( "report.javancss.main.text" )
+                + " " );
+        getSink().lineBreak();
+        getSink().link( "http://www.kclee.de/clemens/java/javancss/" );
+        getSink().text( "JavaNCSS web site." );
+        getSink().link_();
+        getSink().paragraph_();
+        getSink().section1_();
+    }
+
+    @SuppressWarnings("unchecked")
+    private void doMainPackageAnalysis( final Document document )
+    {
+        subtitleHelper( getResourceBundle().getString( "report.javancss.package.text" ) );
+        getSink().table();
+        getSink().tableRow();
+        // HEADER
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.package" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.classe" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.function" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.ncss" ) );
+        getSink().tableRow_();
+        // DATA
+        final List< Node > list = document.selectNodes( "//javancss/packages/package" );
+        Collections.sort( list,
+                new NumericNodeComparator( NCSS ) );
+
+        for ( final Node node : list )
+        {
+            getSink().tableRow();
+            tableCellHelper( node.valueOf( NAME ) );
+            tableCellHelper( node.valueOf( CLASSES ) );
+            tableCellHelper( node.valueOf( FUNCTIONS ) );
+            tableCellHelper( node.valueOf( NCSS ) );
+            getSink().tableRow_();
+        }
+        getSink().table_();
+    }
+
+    private void doObjectAverage( final Document document )
+    {
+        subtitleHelper( getResourceBundle().getString( "report.javancss.averages" ) );
+        getSink().table();
+        getSink().tableRow();
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.ncssaverage" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.classeaverage" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.functionaverage" ) );
+        getSink().tableRow_();
+        final Node node = document.selectSingleNode( "//javancss/objects/averages" );
+        getSink().tableRow();
+        tableCellHelper( node.valueOf( NCSS ) );
+        tableCellHelper( node.valueOf( CLASSES ) );
+        tableCellHelper( node.valueOf( FUNCTIONS ) );
+        getSink().tableRow_();
+        getSink().table_();
+    }
+
+    @SuppressWarnings("unchecked")
+    private void doTopObjectFunctions( final Document document )
+    {
+        subtitleHelper( getResourceBundle().getString( "report.javancss.top" )
+                + " " + lineThreshold + " " + getResourceBundle().getString( "report.javancss.object.byfunction" ) );
+        final List< Node > nodeList = document.selectNodes( "//javancss/objects/object" );
+        Collections.sort( nodeList,
+                new NumericNodeComparator( FUNCTIONS ) );
+        doTopObjectGeneric( nodeList );
+    }
+
+    // generic method called by doTopObjectFunctions & doTopObjectNCss
+    private void doTopObjectGeneric( final List< Node > nodeList )
+    {
+        getSink().table();
+        getSink().tableRow();
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.object" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.ncss" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.function" ) );
+        getSink().tableRow_();
+        final Iterator< Node > nodeIterator = nodeList.iterator();
+        int currentIndex = 0;
+        while ( nodeIterator.hasNext()
+                && currentIndex++ < lineThreshold )
+        {
+            final Node node = nodeIterator.next();
+            getSink().tableRow();
+            tableCellHelper( node.valueOf( NAME ) );
+            tableCellHelper( node.valueOf( NCSS ) );
+            tableCellHelper( node.valueOf( FUNCTIONS ) );
+            getSink().tableRow_();
+        }
+        getSink().table_();
+    }
+
+    @SuppressWarnings("unchecked")
+    private void doTopObjectNcss( final Document document )
+    {
+        subtitleHelper( getResourceBundle().getString( "report.javancss.top" )
+                + " " + lineThreshold + " " + getResourceBundle().getString( "report.javancss.object.byncss" ) );
+        final List< Node > nodeList = document.selectNodes( "//javancss/objects/object" );
+        Collections.sort( nodeList,
+                new NumericNodeComparator( NCSS ) );
+        doTopObjectGeneric( nodeList );
+    }
+
+    private void doTotalPackageAnalysis( final Document document )
+    {
+        getSink().table();
+        getSink().tableRow();
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.classetotal" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.functiontotal" ) );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.header.ncsstotal" ) );
+        getSink().tableRow_();
+        final Node node = document.selectSingleNode( "//javancss/packages/total" );
+        getSink().tableRow();
+        tableCellHelper( node.valueOf( CLASSES ) );
+        tableCellHelper( node.valueOf( FUNCTIONS ) );
+        tableCellHelper( node.valueOf( NCSS ) );
+        getSink().tableRow_();
+        getSink().table_();
+    }
+
+    private void explainCcn()
+    {
+        subtitleHelper( getResourceBundle().getString( "report.javancss.explanation.ccn.title" ) );
+        paragraphHelper( getResourceBundle().getString( "report.javancss.explanation.ccn.paragraph1" ) );
+        paragraphHelper( getResourceBundle().getString( "report.javancss.explanation.ccn.paragraph2" ) );
+        getSink().list();
+        codeItemListHelper( "if" );
+        codeItemListHelper( "for" );
+        codeItemListHelper( "while" );
+        codeItemListHelper( "case" );
+        codeItemListHelper( "catch" );
+        getSink().list_();
+        paragraphHelper( getResourceBundle().getString( "report.javancss.explanation.ccn.paragraph3" ) );
+        getSink().list();
+        codeItemListHelper( "if" );
+        codeItemListHelper( "for" );
+        getSink().list_();
+        paragraphHelper( getResourceBundle().getString( "report.javancss.explanation.ccn.paragraph4" ) );
+        paragraphHelper( getResourceBundle().getString( "report.javancss.explanation.ccn.paragraph5" ) );
+    }
+
+    private void explainClasses()
+    {
+        getSink().tableRow();
+        tableCellHelper( getResourceBundle().getString( "report.javancss.explanation.ncss.table.class" ) );
+        getSink().tableCell();
+        getSink().list();
+        codeItemListHelper( "public class Foo {" );
+        codeItemListHelper( "public class Foo extends Bla {" );
+        getSink().list_();
+        getSink().tableCell_();
+        getSink().tableRow_();
+
+        getSink().tableRow();
+        tableCellHelper( getResourceBundle().getString( "report.javancss.explanation.ncss.table.interface" ) );
+        codeCellHelper( "public interface Able {" );
+        getSink().tableRow_();
+    }
+
+    private void explainFunction()
+    {
+        getSink().tableRow();
+        tableCellHelper( getResourceBundle().getString( "report.javancss.explanation.ncss.table.method" ) );
+        getSink().tableCell();
+        getSink().list();
+        codeItemListHelper( "public function cry() : void{}" );
+        codeItemListHelper( "public function gib() : DeadResult {}" );
+        getSink().list_();
+        getSink().tableCell_();
+        getSink().tableRow_();
+
+        getSink().tableRow();
+        tableCellHelper( getResourceBundle().getString( "report.javancss.explanation.ncss.table.constructorD" ) );
+        codeCellHelper( "public Foo() {" );
+        getSink().tableRow_();
+
+        getSink().tableRow();
+        tableCellHelper( getResourceBundle().getString( "report.javancss.explanation.ncss.table.constructorI" ) );
+        getSink().tableCell();
+        getSink().list();
+        codeItemListHelper( "super();" );
+        getSink().list_();
+        getSink().tableCell_();
+        getSink().tableRow_();
+    }
+
+    private void explainNcss()
+    {
+        subtitleHelper( getResourceBundle().getString( "report.javancss.explanation.ncss.title" ) );
+        paragraphHelper( getResourceBundle().getString( "report.javancss.explanation.ncss.paragraph1" ) );
+        paragraphHelper( getResourceBundle().getString( "report.javancss.explanation.ncss.paragraph2" ) );
+        getSink().table();
+
+        getSink().tableRow();
+        headerCellHelper( "" );
+        headerCellHelper( getResourceBundle().getString( "report.javancss.explanation.ncss.table.examples" ) );
+        getSink().tableRow_();
+
+        explainPackage();
+        explainClasses();
+        explainVariable();
+        explainFunction();
+        explainStatement();
+
+        getSink().table_();
+
+        paragraphHelper( getResourceBundle().getString( "report.javancss.explanation.ncss.paragraph3" ) );
+    }
+
+    private void explainPackage()
+    {
+        getSink().tableRow();
+        tableCellHelper( getResourceBundle().getString( "report.javancss.explanation.ncss.table.package" ) );
+        codeCellHelper( "package com.adobe.ac {}" );
+        getSink().tableRow_();
+
+        getSink().tableRow();
+        tableCellHelper( getResourceBundle().getString( "report.javancss.explanation.ncss.table.import" ) );
+        codeCellHelper( "import com.adobe.ac.*;" );
+        getSink().tableRow_();
+    }
+
+    private void explainStatement()
+    {
+        getSink().tableRow();
+        tableCellHelper( getResourceBundle().getString( "report.javancss.explanation.ncss.table.statement" ) );
+        getSink().tableCell();
+        getSink().list();
+        codeItemListHelper( "i = 0;" );
+        codeItemListHelper( "if (ok)" );
+        codeItemListHelper( "if (exit) {" );
+        codeItemListHelper( "if (3 == 4);" );
+        codeItemListHelper( "if (4 == 4) { ;" );
+        codeItemListHelper( "} else {" );
+        getSink().list_();
+        getSink().tableCell_();
+        getSink().tableRow_();
+    }
+
+    private void explainVariable()
+    {
+        getSink().tableRow();
+        tableCellHelper( getResourceBundle().getString( "report.javancss.explanation.ncss.table.field" ) );
+        getSink().tableCell();
+        getSink().list();
+        codeItemListHelper( "var a : Number;" );
+        codeItemListHelper( "var a : Number = 1;" );
+        getSink().list_();
+        getSink().tableCell_();
+        getSink().tableRow_();
+    }
+
+    // print out the navigation bar
+    private void navigationBar()
+    {
+        getSink().paragraph();
+        getSink().text( "[ " );
+        getSink().link( "#"
+                + getResourceBundle().getString( "report.javancss.package.link" ) );
+        getSink().text( getResourceBundle().getString( "report.javancss.package.link" ) );
+        getSink().link_();
+        getSink().text( " ] [ " );
+        getSink().link( "#"
+                + getResourceBundle().getString( "report.javancss.object.link" ) );
+        getSink().text( getResourceBundle().getString( "report.javancss.object.link" ) );
+        getSink().link_();
+        getSink().text( " ] [ " );
+        getSink().link( "#"
+                + getResourceBundle().getString( "report.javancss.function.link" ) );
+        getSink().text( getResourceBundle().getString( "report.javancss.function.link" ) );
+        getSink().link_();
+        getSink().text( " ] [ " );
+        getSink().link( "#"
+                + getResourceBundle().getString( "report.javancss.explanation.link" ) );
+        getSink().text( getResourceBundle().getString( "report.javancss.explanation.link" ) );
+        getSink().link_();
+        getSink().text( " ]" );
+        getSink().paragraph_();
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/generators/NcssReportGeneratorBase.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/generators/NcssReportGeneratorBase.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/generators/NcssReportGeneratorBase.java
new file mode 100644
index 0000000..fcf5997
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/generators/NcssReportGeneratorBase.java
@@ -0,0 +1,220 @@
+/**
+ *    Copyright (c) 2009, Adobe Systems, Incorporated
+ *    All rights reserved.
+ *
+ *    Redistribution  and  use  in  source  and  binary  forms, with or without
+ *    modification,  are  permitted  provided  that  the  following  conditions
+ *    are met:
+ *
+ *      * Redistributions  of  source  code  must  retain  the  above copyright
+ *        notice, this list of conditions and the following disclaimer.
+ *      * Redistributions  in  binary  form  must reproduce the above copyright
+ *        notice,  this  list  of  conditions  and  the following disclaimer in
+ *        the    documentation   and/or   other  materials  provided  with  the
+ *        distribution.
+ *      * Neither the name of the Adobe Systems, Incorporated. nor the names of
+ *        its  contributors  may be used to endorse or promote products derived
+ *        from this software without specific prior written permission.
+ *
+ *    THIS  SOFTWARE  IS  PROVIDED  BY THE  COPYRIGHT  HOLDERS AND CONTRIBUTORS
+ *    "AS IS"  AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES,  INCLUDING,  BUT NOT
+ *    LIMITED  TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ *    PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
+ *    OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,  INCIDENTAL,  SPECIAL,
+ *    EXEMPLARY,  OR  CONSEQUENTIAL  DAMAGES  (INCLUDING,  BUT  NOT  LIMITED TO,
+ *    PROCUREMENT  OF  SUBSTITUTE   GOODS  OR   SERVICES;  LOSS  OF  USE,  DATA,
+ *    OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ *    LIABILITY,  WHETHER  IN  CONTRACT,  STRICT  LIABILITY, OR TORT (INCLUDING
+ *    NEGLIGENCE  OR  OTHERWISE)  ARISING  IN  ANY  WAY  OUT OF THE USE OF THIS
+ *    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.adobe.ac.pmd.metrics.maven.generators;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.util.ResourceBundle;
+
+import org.apache.maven.plugin.logging.Log;
+import org.codehaus.doxia.sink.Sink;
+
+/**
+ * Base abstract class for NCSSReport classes.<br>
+ * It holds essentially helper methods on top of the Sink Doxia object.
+ *
+ * @author <a href="jeanlaurent@NOSPAMgmail.com>Jean-Laurent de Morlhon</a>
+ * @version $Id: AbstractNcssReportGenerator.java 3286 2007-02-08 20:18:51Z
+ *          jeanlaurent $
+ */
+public class NcssReportGeneratorBase
+{
+
+    private final ResourceBundle bundle;
+    private final Log            log;
+    private final Sink           sink;
+
+    /**
+     * build a new NcssReportGenerator.
+     *
+     * @param sinkToBeSet the sink which will be used for reporting.
+     * @param bundleToBeSet the correct RessourceBundle to be used for reporting.
+     * @param logToBeSet the log object enabling logging within maven plugins.
+     */
+    protected NcssReportGeneratorBase( final Sink sinkToBeSet,
+                                       final ResourceBundle bundleToBeSet,
+                                       final Log logToBeSet )
+    {
+        bundle = bundleToBeSet;
+        sink = sinkToBeSet;
+        log = logToBeSet;
+    }
+
+    /**
+     * Getter for the Log instance.
+     *
+     * @return the current log instance associated with this report generator.
+     */
+    public Log getLog()
+    {
+        return this.log;
+    }
+
+    /**
+     * Getter for the RessourceBundle.
+     *
+     * @return the current ResourceBundle associated with this report generator.
+     */
+    public ResourceBundle getResourceBundle()
+    {
+        return this.bundle;
+    }
+
+    /**
+     * Getter for the Sink instance.
+     *
+     * @return the current instance of Sink associated with this report
+     *         generator.
+     */
+    public Sink getSink()
+    {
+        return this.sink;
+    }
+
+    /**
+     * sink helper to write cell containing code.
+     *
+     * @param text the text to write within a cell and within code tags.
+     */
+    protected void codeCellHelper( final String text )
+    {
+        sink.tableCell();
+        sink.monospaced();
+        sink.text( text );
+        sink.monospaced_();
+        sink.tableCell_();
+    }
+
+    /**
+     * sink helper to write a "code" itemList.
+     *
+     * @param test the text to write within the code tags.
+     */
+    protected void codeItemListHelper( final String text )
+    {
+        sink.listItem();
+        sink.monospaced();
+        sink.text( text );
+        sink.monospaced_();
+        sink.listItem_();
+    }
+
+    /**
+     * sink helper to end a section
+     */
+    protected void endSection()
+    {
+        sink.section1_();
+    }
+
+    /**
+     * sink helper to write a simple table header cell.
+     *
+     * @param text the text to write within a table header cell.
+     */
+    protected void headerCellHelper( final String text )
+    {
+        sink.tableHeaderCell();
+        sink.text( text );
+        sink.tableHeaderCell_();
+    }
+
+    /**
+     * sink helper to write a paragrah
+     *
+     * @param the text to write within the paragraph.
+     */
+    protected void paragraphHelper( final String text )
+    {
+        sink.paragraph();
+        sink.text( text );
+        sink.paragraph_();
+    }
+
+    /**
+     * sink helper to start a section.
+     *
+     * @param locale the locale to be used to display text within the section
+     *           start.
+     * @param link the anchor link.
+     * @param title the title of the anchor link.
+     */
+    protected void startSection( final String link,
+                                 final String title )
+    {
+        sink.section1();
+        sink.sectionTitle1();
+        sink.anchor( bundle.getString( link ) );
+        sink.text( bundle.getString( title ) );
+        sink.anchor_();
+        sink.sectionTitle1_();
+    }
+
+    /**
+     * sink helper to write a subtitle
+     *
+     * @param text the text to write as a subtitle.
+     */
+    protected void subtitleHelper( final String text )
+    {
+        sink.paragraph();
+        sink.bold();
+        sink.text( text );
+        sink.bold_();
+        sink.paragraph_();
+    }
+
+    /**
+     * sink helper to write a simple tabke cell.
+     *
+     * @param text the text to write within a table cell.
+     */
+    protected void tableCellHelper( final String text )
+    {
+        sink.tableCell();
+        sink.text( text );
+        sink.tableCell_();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/utils/ModuleReport.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/utils/ModuleReport.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/utils/ModuleReport.java
new file mode 100644
index 0000000..adaf50b
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/utils/ModuleReport.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.metrics.maven.utils;
+
+import org.apache.maven.project.MavenProject;
+import org.dom4j.Document;
+
+public final class ModuleReport
+{
+    /**
+     * The MavenProject associated with the report.
+     */
+    private MavenProject module;
+
+    /**
+     * The Report associated with the MavenProject
+     */
+    private Document     report;
+
+    public ModuleReport( final MavenProject project,
+                         final Document document )
+    {
+        module = project;
+        report = document;
+    }
+
+    public Document getJavancssDocument()
+    {
+        return report;
+    }
+
+    public MavenProject getModule()
+    {
+        return module;
+    }
+
+    public void setModule( final MavenProject project )
+    {
+        this.module = project;
+    }
+
+    public void setReport( final Document javancssDocument )
+    {
+        this.report = javancssDocument;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/utils/NcssExecuter.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/utils/NcssExecuter.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/utils/NcssExecuter.java
new file mode 100644
index 0000000..7f30439
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/utils/NcssExecuter.java
@@ -0,0 +1,48 @@
+package com.adobe.ac.pmd.metrics.maven.utils;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.maven.reporting.MavenReportException;
+import org.dom4j.DocumentException;
+
+import com.adobe.ac.pmd.metrics.engine.FlexMetrics;
+
+public final class NcssExecuter
+{
+   private final double mxmlFactor;
+   private final File   outputDirectory;
+   private final File   sourceLocation;
+
+   public NcssExecuter( final File sourceLocationToBeSet,
+                        final File outputDirectoryToBeSet,
+                        final double mxmlFactorToBeSet )
+   {
+      sourceLocation = sourceLocationToBeSet;
+      outputDirectory = outputDirectoryToBeSet;
+      mxmlFactor = mxmlFactorToBeSet;
+   }
+
+   public void execute() throws MavenReportException,
+                        DocumentException,
+                        IOException
+   {
+      new FlexMetrics( sourceLocation, mxmlFactor ).execute( outputDirectory );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/utils/NumericNodeComparator.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/utils/NumericNodeComparator.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/utils/NumericNodeComparator.java
new file mode 100644
index 0000000..6fdb639
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/java/com/adobe/ac/pmd/metrics/maven/utils/NumericNodeComparator.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.metrics.maven.utils;
+
+import java.io.Serializable;
+import java.util.Comparator;
+
+import org.dom4j.Node;
+
+/**
+ * Comparator for numeric xml node tag.
+ *
+ * @author <a href="jeanlaurentATgmail.com">Jean-Laurent de Morlhon</a>
+ * @version $Id: NumericNodeComparator.java 3286 2007-02-08 20:18:51Z
+ *          jeanlaurent $
+ */
+public final class NumericNodeComparator implements Comparator< Node >, Serializable
+{
+    private static final long serialVersionUID = -2728762615963337680L;
+    /**
+     * the tag property used by this comparator
+     */
+    private final String      tagProperty;
+
+    /**
+     * The numeric node tag property to used by this comparator.
+     *
+     * @param property the tag property used by this comparator.
+     */
+    public NumericNodeComparator( final String property )
+    {
+        this.tagProperty = property;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public int compare( final Node node1,
+                        final Node node2 )
+    {
+        return node2.numberValueOf( tagProperty ).intValue()
+                - node1.numberValueOf( tagProperty ).intValue();
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/resources/flexMetrics.properties
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/resources/flexMetrics.properties b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/resources/flexMetrics.properties
new file mode 100644
index 0000000..c1558a4
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/main/resources/flexMetrics.properties
@@ -0,0 +1,94 @@
+# 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.
+
+report.ncss.name=FlexMetrics report
+report.ncss.description=
+report.ncss.header=
+report.javancss.name=FlexMetrics Report
+report.javancss.description=Code metric analysis.
+report.javancss.title=FlexMetrics Metric Results
+# titles and links
+report.javancss.main.title=FlexMetrics Metric Results
+report.javancss.main.text=The following document contains the results of a FlexMetrics metric analysis.
+report.javancss.module.title=Modules
+report.javancss.module.link=modules
+report.javancss.package.title=Packages
+report.javancss.package.link=package
+report.javancss.package.text=Packages sorted by NCSS.
+report.javancss.object.title=Objects
+report.javancss.object.link=object
+report.javancss.top=TOP
+report.javancss.averages=Averages.
+report.javancss.object.byncss=classes containing the most NCSS.
+report.javancss.object.byfunction=classes containing the most methods.
+report.javancss.function.title=Methods
+report.javancss.function.link=method
+report.javancss.function.byncss=Methods containing the most NCSS.
+report.javancss.explanation.title=Explanations
+report.javancss.explanation.link=explanation
+# headers
+report.javancss.header.module=Module
+report.javancss.header.classe=Classes
+report.javancss.header.function=Methods
+report.javancss.header.ncss=NCSS
+report.javancss.header.javadoc=ASdocs
+report.javancss.header.package=Package
+report.javancss.header.packages=Packages
+report.javancss.header.javadoc_line=ASdoc lines
+report.javancss.header.single_comment=Single lines comment
+report.javancss.header.multi_comment=Multi lines comment
+report.javancss.header.object=Object
+report.javancss.header.ccn=CCN
+# total
+report.javancss.header.totals=Totals
+report.javancss.header.ncsstotal=NCSS total
+report.javancss.header.functiontotal=Methods total
+report.javancss.header.classetotal=Classes total
+# average
+report.javancss.header.averages=Averages
+report.javancss.header.ncssaverage=NCSS average
+report.javancss.header.programncss=Program NCSS
+report.javancss.header.classeaverage=Classes average
+report.javancss.header.functionaverage=Methods average
+report.javancss.header.javadocaverage=ASdocs average
+report.javancss.header.ccnaverage=CCN average
+# explanation
+report.javancss.explanation.ncss.title=Non Commenting Source Statements (NCSS)
+report.javancss.explanation.ncss.paragraph1=Statements for FlexMetrics are not statements as specified in the ECMAScript 4 Language Specification but include all kinds of declarations too. Roughly spoken, NCSS is approximately equivalent to counting ';' and '{' characters in source files.
+report.javancss.explanation.ncss.paragraph2=Not counted are empty statements, empty blocks or semicolons after closing brackets. Of course, comments don't get counted too. Closing brackets also never get counted, the same applies to blocks in general.
+report.javancss.explanation.ncss.paragraph3=In some cases consecutive semicolons are illegal according to the JLS but FlexMetrics still tolerates them. Nevertheless they are never counted as two statements.
+report.javancss.explanation.ccn.title=Cyclomatic Complexity Number (CCN)
+report.javancss.explanation.ccn.paragraph1=CCN is also know as McCabe Metric. There exists a much hyped theory behind it based on graph theory, but it all comes down to simply counting 'if', 'for', 'while' statements etc. in a method. Whenever the control flow of a method splits, the "CCN counter" gets incremented by one.
+report.javancss.explanation.ccn.paragraph2=Each method has a minimum value of 1 per default. For each of the following Java keywords/statements this value gets incremented by one:
+report.javancss.explanation.ccn.paragraph3=Also if the control flow of a method returns abortively the CCNvalue will be incremented by one:
+report.javancss.explanation.ccn.paragraph4=An ordinary return at the end of method will not be counted.
+report.javancss.explanation.ccn.paragraph5=Note that 'else', 'default', and 'finally' don't increment the CCN value any further. On the other hand, a simple method with a 'switch' statement and a huge block of 'case' statements can have a surprisingly high CCN value (still it has the same value when converting a 'switch' block to an equivalent sequence of 'if' statements).
+
+#ncss explanation table
+report.javancss.explanation.ncss.table.examples=Examples
+report.javancss.explanation.ncss.table.comments=Comments
+report.javancss.explanation.ncss.table.package=Package declaration
+report.javancss.explanation.ncss.table.import=Import declaration
+report.javancss.explanation.ncss.table.class=Class declaration
+report.javancss.explanation.ncss.table.interface=Interface declaration
+report.javancss.explanation.ncss.table.field=Field declaration
+report.javancss.explanation.ncss.table.field.comment=No matter how many fields get actually declared through a comma separated list, and no matter if these fields get actually initialized, only one statement is counted. So \"int a, b, c = 5, d = 6;\" gets only +1 count, not four or even six (let me know if there is good reason to count it differently).
+report.javancss.explanation.ncss.table.method=Method declaration
+report.javancss.explanation.ncss.table.constructorD=Constructor declaration
+report.javancss.explanation.ncss.table.constructorI=Constructor invocation
+report.javancss.explanation.ncss.table.statement=Statement declaration
+report.javancss.explanation.ncss.table.statement.comment=expression, if, else, while, do, for, switch, break, continue, return, throw, synchronized, catch, finally
+report.javancss.explanation.ncss.table.label=Label declaration
+report.javancss.explanation.ncss.table.label.comment=normal, case, default

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/test/java/com/adobe/ac/pmd/metrics/maven/FlexMetricsMojoTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/test/java/com/adobe/ac/pmd/metrics/maven/FlexMetricsMojoTest.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/test/java/com/adobe/ac/pmd/metrics/maven/FlexMetricsMojoTest.java
new file mode 100644
index 0000000..1af28df
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/test/java/com/adobe/ac/pmd/metrics/maven/FlexMetricsMojoTest.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.metrics.maven;
+
+import java.io.File;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.codehaus.doxia.site.renderer.DefaultSiteRenderer;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+
+public class FlexMetricsMojoTest extends FlexPmdTestBase
+{
+   private static final String TEMP_FILE_NAME = "javancss-raw-report.xml";
+
+   @Test
+   public void executeReport() throws MojoExecutionException,
+                              MojoFailureException
+   {
+      final MavenProjectStub project = new MavenProjectStub();
+      final File outputDirectoryToBeSet = new File( project.getBasedir().getAbsolutePath()
+            + "/target/pmd" );
+      final FlexMetricsReportMojo reportMojo = new FlexMetricsReportMojo( project,
+                                                                          getTestDirectory(),
+                                                                          outputDirectoryToBeSet );
+      final FlexMetricsMojo mojo = new FlexMetricsMojo( outputDirectoryToBeSet, getTestDirectory() );
+
+      outputDirectoryToBeSet.mkdirs();
+      reportMojo.setLineThreshold( 5 );
+      reportMojo.setSiteRenderer( new DefaultSiteRenderer() );
+      reportMojo.setXmlOutputDirectory( outputDirectoryToBeSet );
+      reportMojo.setTempFileName( TEMP_FILE_NAME );
+      reportMojo.execute();
+
+      mojo.setXmlOutputDirectory( outputDirectoryToBeSet );
+      mojo.setTempFileName( TEMP_FILE_NAME );
+      mojo.setCcnLimit( 50 );
+      mojo.setFailOnViolation( true );
+      mojo.setNcssLimit( 200 );
+
+      mojo.execute();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/test/java/com/adobe/ac/pmd/metrics/maven/FlexMetricsReportMojoTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/test/java/com/adobe/ac/pmd/metrics/maven/FlexMetricsReportMojoTest.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/test/java/com/adobe/ac/pmd/metrics/maven/FlexMetricsReportMojoTest.java
new file mode 100644
index 0000000..ef60647
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/src/test/java/com/adobe/ac/pmd/metrics/maven/FlexMetricsReportMojoTest.java
@@ -0,0 +1,98 @@
+/*
+ * 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.metrics.maven;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+import java.util.Locale;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.codehaus.doxia.site.renderer.DefaultSiteRenderer;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+
+public class FlexMetricsReportMojoTest extends FlexPmdTestBase
+{
+   @Test
+   public void executeMultipleReport() throws MojoExecutionException
+   {
+      final MavenProjectStub project = new MavenProjectStub();
+      final File outputDirectoryToBeSet = new File( project.getBasedir().getAbsolutePath()
+            + "/target/pmd" );
+      final FlexMetricsReportMojo mojo = new FlexMetricsReportMojo( project, null, outputDirectoryToBeSet );
+
+      outputDirectoryToBeSet.mkdirs();
+      mojo.addReactorProject( new MavenProjectStub() );
+      mojo.addReactorProject( new MavenProjectStub() );
+      mojo.setLineThreshold( 5 );
+      mojo.setSiteRenderer( new DefaultSiteRenderer() );
+      mojo.setXmlOutputDirectory( outputDirectoryToBeSet );
+      mojo.setTempFileName( "javancss-raw-report.xml" );
+
+      assertNotNull( "",
+                     mojo.getName( Locale.ENGLISH ) );
+
+      mojo.execute();
+   }
+
+   @Test
+   public void executeSingleReport() throws MojoExecutionException
+   {
+      final File outputDirectoryToBeSet = new File( "target/pmd" );
+
+      outputDirectoryToBeSet.mkdirs();
+
+      final FlexMetricsReportMojo mojo = new FlexMetricsReportMojo( new MavenProjectStub(),
+                                                                    getTestDirectory(),
+                                                                    outputDirectoryToBeSet );
+
+      mojo.setLineThreshold( 5 );
+      mojo.setSiteRenderer( new DefaultSiteRenderer() );
+      mojo.setXmlOutputDirectory( outputDirectoryToBeSet );
+      mojo.setTempFileName( "javancss-raw-report.xml" );
+
+      assertNotNull( "",
+                     mojo.getName( Locale.ENGLISH ) );
+
+      mojo.execute();
+   }
+
+   @Test
+   public void executeSingleReportOnNonExistingFolder() throws MojoExecutionException
+   {
+      final File outputDirectoryToBeSet = new File( "target/pmd" );
+
+      outputDirectoryToBeSet.mkdirs();
+
+      final FlexMetricsReportMojo mojo = new FlexMetricsReportMojo( new MavenProjectStub(),
+                                                                    new File( "nonExisting" ),
+                                                                    outputDirectoryToBeSet );
+
+      mojo.setLineThreshold( 5 );
+      mojo.setSiteRenderer( new DefaultSiteRenderer() );
+      mojo.setXmlOutputDirectory( outputDirectoryToBeSet );
+      mojo.setTempFileName( "javancss-raw-report.xml" );
+
+      assertNotNull( "",
+                     mojo.getName( Locale.ENGLISH ) );
+
+      mojo.execute();
+   }
+}


[31/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/main/java/de/bokelberg/flex/parser/AS3Scanner.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/main/java/de/bokelberg/flex/parser/AS3Scanner.java b/FlexPMD/flex-pmd-java/as3-parser/src/main/java/de/bokelberg/flex/parser/AS3Scanner.java
new file mode 100644
index 0000000..cdd185f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/main/java/de/bokelberg/flex/parser/AS3Scanner.java
@@ -0,0 +1,898 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.logging.Logger;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import com.adobe.ac.utils.StackTraceUtils;
+
+/**
+ * convert a actionscript to a stream of tokens
+ * 
+ * @author rbokel
+ * @author xagnetti
+ */
+public class AS3Scanner
+{
+   /**
+    * @author xagnetti
+    */
+   public static final class Token
+   {
+      private static Token create( final String textContent,
+                                   final int tokenLine,
+                                   final int tokenColumn )
+      {
+         return new Token( textContent, tokenLine, tokenColumn );
+      }
+
+      private final int     column;
+      private final boolean isNumeric;
+      private final int     line;
+      private final String  text;
+
+      /**
+       * @param textContent
+       * @param tokenLine
+       * @param tokenColumn
+       */
+      protected Token( final String textContent,
+                       final int tokenLine,
+                       final int tokenColumn )
+      {
+         this( textContent, tokenLine, tokenColumn, false );
+      }
+
+      /**
+       * @param textContent
+       * @param tokenLine
+       * @param tokenColumn
+       * @param isNumToSet
+       */
+      protected Token( final String textContent,
+                       final int tokenLine,
+                       final int tokenColumn,
+                       final boolean isNumToSet )
+      {
+         text = textContent;
+         line = tokenLine + 1;
+         column = tokenColumn + 1;
+         isNumeric = isNumToSet;
+      }
+
+      /**
+       * @return
+       */
+      public int getColumn()
+      {
+         return column;
+      }
+
+      /**
+       * @return
+       */
+      public int getLine()
+      {
+         return line;
+      }
+
+      /**
+       * @return
+       */
+      public String getText()
+      {
+         return text;
+      }
+
+      /**
+       * @return
+       */
+      public boolean isNum()
+      {
+         return isNumeric;
+      }
+   }
+
+   private static class XMLVerifier
+   {
+      private static DefaultHandler handler;
+      private static SAXParser      saxParser;
+
+      static
+      {
+         final SAXParserFactory factory = SAXParserFactory.newInstance();
+
+         handler = new DefaultHandler();
+         factory.setNamespaceAware( false );
+
+         try
+         {
+            saxParser = factory.newSAXParser();
+         }
+         catch ( final ParserConfigurationException e )
+         {
+            LOGGER.warning( StackTraceUtils.print( e ) );
+         }
+         catch ( final SAXException e )
+         {
+         }
+      }
+
+      public static boolean verify( final String text )
+      {
+         try
+         {
+            saxParser.parse( new InputSource( new StringReader( text ) ),
+                             handler );
+            return true;
+         }
+         catch ( final SAXException e )
+         {
+            LOGGER.warning( StackTraceUtils.print( e ) );
+            return false;
+         }
+         catch ( final IOException e )
+         {
+            LOGGER.warning( StackTraceUtils.print( e ) );
+            return false;
+         }
+      }
+   }
+
+   private static final String END    = "__END__";
+   private static final Logger LOGGER = Logger.getLogger( AS3Scanner.class.getName() );
+
+   protected static boolean isDecimalChar( final char currentCharacter )
+   {
+      return currentCharacter >= '0'
+            && currentCharacter <= '9';
+   }
+
+   private int      column;
+   private boolean  inVector;
+   private int      line;
+   private String[] lines = null;
+
+   /**
+    * @return
+    */
+   public Token moveToNextToken()
+   {
+      return nextToken();
+   }
+
+   /**
+    * @param linesToBeSet
+    */
+   public void setLines( final String[] linesToBeSet )
+   {
+      lines = linesToBeSet;
+      line = 0;
+      column = -1;
+   }
+
+   boolean isHexChar( final char currentCharacter )
+   {
+      final boolean isNum = currentCharacter >= '0'
+            && currentCharacter <= '9';
+      final boolean isLower = currentCharacter >= 'A'
+            && currentCharacter <= 'Z';
+      final boolean isUpper = currentCharacter >= 'a'
+            && currentCharacter <= 'z';
+
+      return isNum
+            || isLower || isUpper;
+   }
+
+   /**
+    * @return
+    */
+   protected Token nextToken()
+   {
+      char currentCharacter;
+
+      if ( lines != null
+            && line < lines.length )
+      {
+         currentCharacter = nextNonWhitespaceCharacter();
+      }
+      else
+      {
+         return new Token( END, line, column );
+      }
+
+      if ( currentCharacter == '\n' )
+      {
+         return new Token( "\n", line, column );
+      }
+      if ( currentCharacter == '/' )
+      {
+         return scanCommentRegExpOrOperator();
+      }
+      if ( currentCharacter == '"' )
+      {
+         return scanString( currentCharacter );
+      }
+      if ( currentCharacter == '\'' )
+      {
+         return scanString( currentCharacter );
+      }
+      if ( currentCharacter == '<' )
+      {
+         return scanXMLOrOperator( currentCharacter );
+      }
+      if ( currentCharacter >= '0'
+            && currentCharacter <= '9' || currentCharacter == '.' )
+      {
+         return scanNumberOrDots( currentCharacter );
+      }
+      if ( currentCharacter == '{'
+            || currentCharacter == '}' || currentCharacter == '(' || currentCharacter == ')'
+            || currentCharacter == '[' || currentCharacter == ']' || currentCharacter == ';'
+            || currentCharacter == ',' || currentCharacter == '?' || currentCharacter == '~' )
+      {
+         return scanSingleCharacterToken( currentCharacter );
+      }
+      if ( currentCharacter == ':' )
+      {
+         return scanCharacterSequence( currentCharacter,
+                                       new String[]
+                                       { "::" } );
+      }
+      if ( currentCharacter == '*' )
+      {
+         return scanCharacterSequence( currentCharacter,
+                                       new String[]
+                                       {} );
+      }
+      if ( currentCharacter == '+' )
+      {
+         return scanCharacterSequence( currentCharacter,
+                                       new String[]
+                                       { "++",
+                                                   "+=" } );
+      }
+      if ( currentCharacter == '-' )
+      {
+         return scanCharacterSequence( currentCharacter,
+                                       new String[]
+                                       { "--",
+                                                   "-=" } );
+      }
+      if ( currentCharacter == '%' )
+      {
+         return scanCharacterSequence( currentCharacter,
+                                       new String[]
+                                       { "%=" } );
+      }
+      if ( currentCharacter == '&' )
+      {
+         return scanCharacterSequence( currentCharacter,
+                                       new String[]
+                                       { "&&",
+                                                   "&=" } );
+      }
+      if ( currentCharacter == '|' )
+      {
+         return scanCharacterSequence( currentCharacter,
+                                       new String[]
+                                       { "||",
+                                                   "|=" } );
+      }
+      if ( currentCharacter == '^' )
+      {
+         return scanCharacterSequence( currentCharacter,
+                                       new String[]
+                                       { "^=" } );
+      }
+      if ( currentCharacter == '>' )
+      {
+         if ( inVector )
+         {
+            inVector = false;
+         }
+         else
+         {
+            return scanCharacterSequence( currentCharacter,
+                                          new String[]
+                                          { ">>>=",
+                                                      ">>>",
+                                                      ">>=",
+                                                      ">>",
+                                                      ">=" } );
+         }
+      }
+      if ( currentCharacter == '=' )
+      {
+         return scanCharacterSequence( currentCharacter,
+                                       new String[]
+                                       { "===",
+                                                   "==" } );
+      }
+      if ( currentCharacter == '!' )
+      {
+         return scanCharacterSequence( currentCharacter,
+                                       new String[]
+                                       { "!==",
+                                                   "!=" } );
+      }
+
+      return scanWord( currentCharacter );
+   }
+
+   private int computePossibleMatchesMaxLength( final String[] possibleMatches )
+   {
+      int max = 0;
+
+      for ( final String possibleMatch : possibleMatches )
+      {
+         max = Math.max( max,
+                         possibleMatch.length() );
+      }
+      return max;
+   }
+
+   private char getPreviousCharacter()
+   {
+      int currentIndex = -1;
+      char currentChar;
+      do
+      {
+         currentChar = peekChar( currentIndex-- );
+      }
+      while ( currentChar == ' ' );
+      return currentChar;
+   }
+
+   private boolean isIdentifierCharacter( final char currentCharacter )
+   {
+      return currentCharacter >= 'A'
+            && currentCharacter <= 'Z' || currentCharacter >= 'a' && currentCharacter <= 'z'
+            || currentCharacter >= '0' && currentCharacter <= '9' || currentCharacter == '_'
+            || currentCharacter == '$';
+   }
+
+   private boolean isProcessingInstruction( final String text )
+   {
+      return text.startsWith( "<?" );
+   }
+
+   private boolean isValidRegExp( final String pattern )
+   {
+      try
+      {
+         Pattern.compile( pattern );
+      }
+      catch ( final PatternSyntaxException t )
+      {
+         return false;
+      }
+      return true;
+   }
+
+   private boolean isValidXML( final String text )
+   {
+      return XMLVerifier.verify( text );
+   }
+
+   private char nextChar()
+   {
+      final String currentLine = lines[ line ];
+
+      column++;
+      if ( currentLine.length() <= column )
+      {
+         column = -1;
+         line++;
+         return '\n';
+      }
+
+      char currentChar = currentLine.charAt( column );
+
+      while ( currentChar == '\uFEFF' )
+      {
+         column++;
+         currentChar = currentLine.charAt( column );
+      }
+      return currentChar;
+   }
+
+   private char nextNonWhitespaceCharacter()
+   {
+      char result;
+      do
+      {
+         result = nextChar();
+      }
+      while ( result == ' '
+            || result == '\t' );
+      return result;
+   }
+
+   private char peekChar( final int offset )
+   {
+      final String currentLine = lines[ line ];
+      final int index = column
+            + offset;
+      if ( index == -1 )
+      {
+         return '\0';
+      }
+      if ( index >= currentLine.length() )
+      {
+         return '\n';
+      }
+
+      return currentLine.charAt( index );
+   }
+
+   /**
+    * find the longest matching sequence
+    * 
+    * @param currentCharacter
+    * @param possibleMatches
+    * @param maxLength
+    * @return
+    */
+   private Token scanCharacterSequence( final char currentCharacter,
+                                        final String[] possibleMatches )
+   {
+      int peekPos = 1;
+      final StringBuffer buffer = new StringBuffer();
+      final int maxLength = computePossibleMatchesMaxLength( possibleMatches );
+
+      buffer.append( currentCharacter );
+      String found = buffer.toString();
+      while ( peekPos < maxLength )
+      {
+         buffer.append( peekChar( peekPos ) );
+         peekPos++;
+         for ( final String possibleMatche : possibleMatches )
+         {
+            if ( buffer.toString().equals( possibleMatche ) )
+            {
+               found = buffer.toString();
+            }
+         }
+      }
+      final Token result = new Token( found, line, column );
+      skipChars( found.length() - 1 );
+      return result;
+   }
+
+   /**
+    * Something started with a slash This might be a comment, a regexp or a
+    * operator
+    * 
+    * @param currentCharacter
+    * @return
+    */
+   private Token scanCommentRegExpOrOperator()
+   {
+      final char firstCharacter = peekChar( 1 );
+
+      if ( firstCharacter == '/' )
+      {
+         return scanSingleLineComment();
+      }
+      if ( firstCharacter == '*' )
+      {
+         return scanMultiLineComment();
+      }
+
+      Token result;
+
+      if ( getPreviousCharacter() == '='
+            || getPreviousCharacter() == '(' || getPreviousCharacter() == ',' )
+      {
+         result = scanRegExp();
+
+         if ( result != null )
+         {
+            return result;
+         }
+      }
+
+      if ( firstCharacter == '=' )
+      {
+         result = new Token( "/=", line, column );
+         skipChars( 1 );
+         return result;
+      }
+      result = new Token( "/", line, column );
+      return result;
+   }
+
+   /**
+    * c is either a dot or a number
+    * 
+    * @return
+    */
+   private Token scanDecimal( final char currentCharacter )
+   {
+      char currentChar = currentCharacter;
+      final StringBuffer buffer = new StringBuffer();
+      int peekPos = 1;
+
+      while ( isDecimalChar( currentChar ) )
+      {
+         buffer.append( currentChar );
+         currentChar = peekChar( peekPos++ );
+      }
+
+      if ( currentChar == '.' )
+      {
+         buffer.append( currentChar );
+         currentChar = peekChar( peekPos++ );
+
+         while ( isDecimalChar( currentChar ) )
+         {
+            buffer.append( currentChar );
+            currentChar = peekChar( peekPos++ );
+         }
+
+         if ( currentChar == 'E' )
+         {
+            buffer.append( currentChar );
+            currentChar = peekChar( peekPos++ );
+            while ( isDecimalChar( currentChar ) )
+            {
+               buffer.append( currentChar );
+               currentChar = peekChar( peekPos++ );
+            }
+         }
+      }
+      final Token result = new Token( buffer.toString(), line, column, true );
+      skipChars( result.text.length() - 1 );
+      return result;
+   }
+
+   /**
+    * The first dot has been scanned Are the next chars dots as well?
+    * 
+    * @return
+    */
+   private Token scanDots()
+   {
+      final char secondCharacter = peekChar( 1 );
+
+      if ( secondCharacter == '.' )
+      {
+         final char thirdCharacter = peekChar( 2 );
+         final String text = thirdCharacter == '.' ? "..."
+                                                  : "..";
+         final Token result = new Token( text, line, column );
+
+         skipChars( text.length() - 1 );
+
+         return result;
+      }
+      else if ( secondCharacter == '<' )
+      {
+         final Token result = new Token( ".<", line, column );
+
+         skipChars( 1 );
+
+         inVector = true;
+         return result;
+      }
+      return null;
+   }
+
+   /**
+    * we have seen the 0x prefix
+    * 
+    * @return
+    */
+   private Token scanHex()
+   {
+      final StringBuffer buffer = new StringBuffer();
+
+      buffer.append( "0x" );
+      int peekPos = 2;
+      for ( ;; )
+      {
+         final char character = peekChar( peekPos++ );
+
+         if ( !isHexChar( character ) )
+         {
+            break;
+         }
+         buffer.append( character );
+      }
+      final Token result = new Token( buffer.toString(), line, column, true );
+      skipChars( result.text.length() - 1 );
+      return result;
+   }
+
+   /**
+    * the current char is the first slash plus we know, that a * is following
+    * 
+    * @return
+    */
+   private Token scanMultiLineComment()
+   {
+      final StringBuffer buffer = new StringBuffer();
+      char currentCharacter = ' ';
+      char previousCharacter = ' ';
+
+      buffer.append( "/*" );
+      skipChar();
+      do
+      {
+         previousCharacter = currentCharacter;
+         currentCharacter = nextChar();
+         buffer.append( currentCharacter );
+      }
+      while ( currentCharacter != 0
+            && !( currentCharacter == '/' && previousCharacter == '*' ) );
+
+      return new Token( buffer.toString(), line, column );
+   }
+
+   /**
+    * Something started with a number or a dot.
+    * 
+    * @param characterToBeScanned
+    * @return
+    */
+   private Token scanNumberOrDots( final char characterToBeScanned )
+   {
+      if ( characterToBeScanned == '.' )
+      {
+         final Token result = scanDots();
+         if ( result != null )
+         {
+            return result;
+         }
+
+         final char firstCharacter = peekChar( 1 );
+         if ( !isDecimalChar( firstCharacter ) )
+         {
+            return new Token( ".", line, column );
+         }
+      }
+      if ( characterToBeScanned == '0' )
+      {
+         final char firstCharacter = peekChar( 1 );
+         if ( firstCharacter == 'x' )
+         {
+            return scanHex();
+         }
+      }
+      return scanDecimal( characterToBeScanned );
+   }
+
+   private Token scanRegExp()
+   {
+      final Token token = scanUntilDelimiter( '/' );
+      if ( token != null
+            && isValidRegExp( token.text ) )
+      {
+         return token;
+      }
+      return null;
+   }
+
+   private Token scanSingleCharacterToken( final char character )
+   {
+      return new Token( String.valueOf( character ), line, column );
+   }
+
+   /**
+    * the current char is the first slash plus we know, that another slash is
+    * following
+    * 
+    * @return
+    */
+   private Token scanSingleLineComment()
+   {
+      final Token result = new Token( lines[ line ].substring( column ), line, column );
+      skipChars( result.text.length() - 1 );
+      return result;
+   }
+
+   /**
+    * Something started with a quote or double quote consume characters until
+    * the quote/double quote shows up again and is not escaped
+    * 
+    * @param startingCharacter
+    * @return
+    */
+   private Token scanString( final char startingCharacter )
+   {
+      return scanUntilDelimiter( startingCharacter );
+   }
+
+   private Token scanUntilDelimiter( final char delimiter )
+   {
+      return scanUntilDelimiter( delimiter,
+                                 delimiter );
+
+   }
+
+   private Token scanUntilDelimiter( final char start,
+                                     final char delimiter )
+   {
+      final StringBuffer buffer = new StringBuffer();
+      int peekPos = 1;
+      int numberOfBackslashes = 0;
+
+      buffer.append( start );
+
+      for ( ;; )
+      {
+         final char currentCharacter = peekChar( peekPos++ );
+         if ( currentCharacter == '\n' )
+         {
+            return null;
+         }
+         buffer.append( currentCharacter );
+         if ( currentCharacter == delimiter
+               && numberOfBackslashes == 0 )
+         {
+            final Token result = Token.create( buffer.toString(),
+                                               line,
+                                               column );
+            skipChars( buffer.toString().length() - 1 );
+            return result;
+         }
+         numberOfBackslashes = currentCharacter == '\\' ? ( numberOfBackslashes + 1 ) % 2
+                                                       : 0;
+      }
+   }
+
+   private Token scanWord( final char startingCharacter )
+   {
+      char currentChar = startingCharacter;
+      final StringBuffer buffer = new StringBuffer();
+
+      buffer.append( currentChar );
+      int peekPos = 1;
+      for ( ;; )
+      {
+         currentChar = peekChar( peekPos++ );
+         if ( !isIdentifierCharacter( currentChar ) )
+         {
+            break;
+         }
+
+         buffer.append( currentChar );
+      }
+      final Token result = new Token( buffer.toString(), line, column );
+      skipChars( buffer.toString().length() - 1 );
+      return result;
+   }
+
+   /**
+    * Try to parse a XML document
+    * 
+    * @return
+    */
+   private Token scanXML()
+   {
+      final int currentLine = line;
+      final int currentColumn = column;
+      int level = 0;
+      final StringBuffer buffer = new StringBuffer();
+      char currentCharacter = '<';
+
+      for ( ;; )
+      {
+         Token currentToken = null;
+         do
+         {
+            currentToken = scanUntilDelimiter( '<',
+                                               '>' );
+            if ( currentToken == null )
+            {
+               line = currentLine;
+               column = currentColumn;
+               return null;
+            }
+            buffer.append( currentToken.text );
+            if ( isProcessingInstruction( currentToken.text ) )
+            {
+               currentCharacter = nextChar();
+               if ( currentCharacter == '\n' )
+               {
+                  buffer.append( '\n' );
+                  skipChar();
+               }
+               currentToken = null;
+            }
+         }
+         while ( currentToken == null );
+
+         if ( currentToken.text.startsWith( "</" ) )
+         {
+            level--;
+         }
+         else if ( !currentToken.text.endsWith( "/>" )
+               && !currentToken.text.equals( "<>" ) ) // NOT operator in AS2
+         {
+            level++;
+         }
+
+         if ( level <= 0 )
+         {
+            return new Token( buffer.toString(), line, column );
+         }
+
+         for ( ;; )
+         {
+            currentCharacter = nextChar();
+            if ( currentCharacter == '<' )
+            {
+               break;
+            }
+            buffer.append( currentCharacter );
+         }
+      }
+   }
+
+   /**
+    * Something started with a lower sign <
+    * 
+    * @param startingCharacterc
+    * @return
+    */
+   private Token scanXMLOrOperator( final char startingCharacterc )
+   {
+      final Token xmlToken = scanXML();
+
+      if ( xmlToken != null
+            && isValidXML( xmlToken.text ) )
+      {
+         return xmlToken;
+      }
+      return scanCharacterSequence( startingCharacterc,
+                                    new String[]
+                                    { "<<<=",
+                                                "<<<",
+                                                "<<=",
+                                                "<<",
+                                                "<=" } );
+   }
+
+   private void skipChar()
+   {
+      nextChar();
+   }
+
+   private void skipChars( final int count )
+   {
+      int decrementCount = count;
+
+      while ( decrementCount-- > 0 )
+      {
+         nextChar();
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/main/java/de/bokelberg/flex/parser/NestedNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/main/java/de/bokelberg/flex/parser/NestedNode.java b/FlexPMD/flex-pmd-java/as3-parser/src/main/java/de/bokelberg/flex/parser/NestedNode.java
new file mode 100644
index 0000000..27affb2
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/main/java/de/bokelberg/flex/parser/NestedNode.java
@@ -0,0 +1,224 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.NodeKind;
+
+/**
+ * @author xagnetti
+ */
+class NestedNode
+{
+   private List< IParserNode > children;
+   private NodeKind            nodeId;
+
+   /**
+    * @param idToBeSet
+    */
+   protected NestedNode( final NodeKind idToBeSet )
+   {
+      nodeId = idToBeSet;
+   }
+
+   /**
+    * @param idToBeSet
+    * @param childToBeSet
+    */
+   protected NestedNode( final NodeKind idToBeSet,
+                         final IParserNode childToBeSet )
+   {
+      this( idToBeSet );
+      addChild( childToBeSet );
+   }
+
+   /**
+    * @return
+    */
+   public final int computeCyclomaticComplexity()
+   {
+      int cyclomaticComplexity = 0;
+
+      if ( is( NodeKind.FOREACH )
+            || is( NodeKind.FORIN ) || is( NodeKind.CASE ) || is( NodeKind.DEFAULT ) )
+      {
+         cyclomaticComplexity++;
+      }
+      else if ( is( NodeKind.IF )
+            || is( NodeKind.WHILE ) || is( NodeKind.FOR ) )
+      {
+         cyclomaticComplexity++;
+         cyclomaticComplexity += getChild( 0 ).countNodeFromType( NodeKind.AND );
+         cyclomaticComplexity += getChild( 0 ).countNodeFromType( NodeKind.OR );
+      }
+
+      if ( numChildren() > 0 )
+      {
+         for ( final IParserNode child : getChildren() )
+         {
+            cyclomaticComplexity += child.computeCyclomaticComplexity();
+         }
+      }
+
+      return cyclomaticComplexity;
+   }
+
+   /**
+    * @param type
+    * @return
+    */
+   public final int countNodeFromType( final NodeKind type )
+   {
+      int count = 0;
+
+      if ( is( type ) )
+      {
+         count++;
+      }
+      if ( numChildren() > 0 )
+      {
+         for ( final IParserNode child : getChildren() )
+         {
+            count += child.countNodeFromType( type );
+         }
+      }
+      return count;
+   }
+
+   /**
+    * @param index
+    * @return
+    */
+   public final IParserNode getChild( final int index )
+   {
+      return getChildren() == null
+            || getChildren().size() <= index ? null
+                                            : getChildren().get( index );
+   }
+
+   /**
+    * @return
+    */
+   public List< IParserNode > getChildren()
+   {
+      return children;
+   }
+
+   /**
+    * @return
+    */
+   public NodeKind getId()
+   {
+      return nodeId;
+   }
+
+   /**
+    * @return
+    */
+   public IParserNode getLastChild()
+   {
+      final IParserNode lastChild = getChild( numChildren() - 1 );
+
+      return lastChild != null
+            && lastChild.numChildren() > 0 ? lastChild.getLastChild()
+                                          : lastChild;
+   }
+
+   /**
+    * @param expectedType
+    * @return
+    */
+   public final boolean is( final NodeKind expectedType ) // NOPMD
+   {
+      return getId().equals( expectedType );
+   }
+
+   /**
+    * @return
+    */
+   public final int numChildren()
+   {
+      return getChildren() == null ? 0
+                                  : getChildren().size();
+   }
+
+   /**
+    * @param child
+    * @return
+    */
+   final IParserNode addChild( final IParserNode child )
+   {
+      if ( child == null )
+      {
+         return child; // skip optional children
+      }
+
+      if ( children == null )
+      {
+         children = new ArrayList< IParserNode >();
+      }
+      children.add( child );
+      return child;
+   }
+
+   /**
+    * @param childId
+    * @param childLine
+    * @param childColumn
+    * @param nephew
+    * @return
+    */
+   final IParserNode addChild( final NodeKind childId,
+                               final int childLine,
+                               final int childColumn,
+                               final IParserNode nephew )
+   {
+      return addChild( Node.create( childId,
+                                    childLine,
+                                    childColumn,
+                                    nephew ) );
+   }
+
+   /**
+    * @param childId
+    * @param childLine
+    * @param childColumn
+    * @param value
+    * @return
+    */
+   final IParserNode addChild( final NodeKind childId,
+                               final int childLine,
+                               final int childColumn,
+                               final String value )
+   {
+      return addChild( Node.create( childId,
+                                    childLine,
+                                    childColumn,
+                                    value ) );
+   }
+
+   /**
+    * @param idToBeSet
+    */
+   final void setId( final NodeKind idToBeSet )
+   {
+      nodeId = idToBeSet;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/main/java/de/bokelberg/flex/parser/Node.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/main/java/de/bokelberg/flex/parser/Node.java b/FlexPMD/flex-pmd-java/as3-parser/src/main/java/de/bokelberg/flex/parser/Node.java
new file mode 100644
index 0000000..a044881
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/main/java/de/bokelberg/flex/parser/Node.java
@@ -0,0 +1,168 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.NodeKind;
+
+/**
+ * A single node of the ast
+ * 
+ * @author rbokel
+ */
+final class Node extends NestedNode implements IParserNode
+{
+   protected static Node create( final NodeKind idToBeSet,
+                                 final int lineToBeSet,
+                                 final int columnToBeSet )
+   {
+      return new Node( idToBeSet, lineToBeSet, columnToBeSet );
+   }
+
+   protected static Node create( final NodeKind idToBeSet,
+                                 final int lineToBeSet,
+                                 final int columnToBeSet,
+                                 final IParserNode childToBeSet )
+   {
+      return new Node( idToBeSet, lineToBeSet, columnToBeSet, childToBeSet );
+   }
+
+   protected static Node create( final NodeKind idToBeSet,
+                                 final int lineToBeSet,
+                                 final int columnToBeSet,
+                                 final String valueToBeSet )
+   {
+      return new Node( idToBeSet, lineToBeSet, columnToBeSet, valueToBeSet );
+   }
+
+   private static boolean isNameInArray( final String[] strings,
+                                         final String string )
+   {
+      for ( final String currentName : strings )
+      {
+         if ( currentName.equals( string ) )
+         {
+            return true;
+         }
+      }
+      return false;
+   }
+
+   private final int    column;
+   private final int    line;
+   private final String stringValue;
+
+   private Node( final NodeKind idToBeSet,
+                 final int lineToBeSet,
+                 final int columnToBeSet )
+   {
+      super( idToBeSet );
+
+      line = lineToBeSet;
+      column = columnToBeSet;
+      stringValue = null;
+   }
+
+   private Node( final NodeKind idToBeSet,
+                 final int lineToBeSet,
+                 final int columnToBeSet,
+                 final IParserNode childToBeSet )
+   {
+      super( idToBeSet, childToBeSet );
+
+      line = lineToBeSet;
+      column = columnToBeSet;
+      stringValue = null;
+   }
+
+   private Node( final NodeKind idToBeSet,
+                 final int lineToBeSet,
+                 final int columnToBeSet,
+                 final String valueToBeSet )
+   {
+      super( idToBeSet );
+
+      line = lineToBeSet;
+      column = columnToBeSet;
+      stringValue = valueToBeSet;
+   }
+
+   public List< IParserNode > findPrimaryStatementsFromNameInChildren( final String[] names )
+   {
+      final List< IParserNode > foundNode = new ArrayList< IParserNode >();
+
+      if ( getStringValue() != null
+            && isNameInArray( names,
+                              getStringValue() ) )
+      {
+         foundNode.add( this );
+      }
+      else if ( numChildren() != 0 )
+      {
+         for ( final IParserNode child : getChildren() )
+         {
+            foundNode.addAll( child.findPrimaryStatementsFromNameInChildren( names ) );
+         }
+      }
+      return foundNode;
+   }
+
+   public int getColumn()
+   {
+      return column;
+   }
+
+   public int getLine()
+   {
+      return line;
+   }
+
+   public String getStringValue()
+   {
+      return stringValue;
+   }
+
+   @Override
+   public String toString()
+   {
+      final StringBuffer buffer = new StringBuffer();
+
+      if ( getStringValue() == null )
+      {
+         buffer.append( getId() );
+      }
+      else
+      {
+         buffer.append( getStringValue() );
+      }
+
+      buffer.append( ' ' );
+
+      if ( getChildren() != null )
+      {
+         for ( final IParserNode child : getChildren() )
+         {
+            buffer.append( child.toString() );
+            buffer.append( ' ' );
+         }
+      }
+      return buffer.toString();
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/AbstractAs3ParserTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/AbstractAs3ParserTest.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/AbstractAs3ParserTest.java
new file mode 100644
index 0000000..ff9b895
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/AbstractAs3ParserTest.java
@@ -0,0 +1,98 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import junit.framework.TestCase;
+
+import org.junit.Before;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+
+public abstract class AbstractAs3ParserTest extends TestCase
+{
+   protected final class ASTToXMLConverter
+   {
+      public String convert( final IParserNode ast )
+      {
+         final StringBuffer result = new StringBuffer();
+         visitNodes( ast,
+                     result,
+                     0 );
+         return result.toString();
+      }
+   }
+
+   private static String escapeEntities( final String stringToEscape )
+   {
+      final StringBuffer buffer = new StringBuffer();
+
+      for ( int i = 0; i < stringToEscape.length(); i++ )
+      {
+         final char currentCharacter = stringToEscape.charAt( i );
+
+         if ( currentCharacter == '<' )
+         {
+            buffer.append( "&lt;" );
+         }
+         else if ( currentCharacter == '>' )
+         {
+            buffer.append( "&gt;" );
+         }
+         else
+         {
+            buffer.append( currentCharacter );
+         }
+      }
+      return buffer.toString();
+   }
+
+   private static void visitNodes( final IParserNode ast,
+                                   final StringBuffer result,
+                                   final int level )
+   {
+      result.append( "<"
+            + ast.getId() + " line=\"" + ast.getLine() + "\">" );
+
+      final int numChildren = ast.numChildren();
+      if ( numChildren > 0 )
+      {
+         for ( int i = 0; i < numChildren; i++ )
+         {
+            visitNodes( ast.getChild( i ),
+                        result,
+                        level + 1 );
+         }
+      }
+      else if ( ast.getStringValue() != null )
+      {
+         result.append( escapeEntities( ast.getStringValue() ) );
+      }
+      result.append( "</"
+            + ast.getId() + ">" );
+   }
+
+   protected AS3Parser  asp;
+   protected AS3Scanner scn;
+
+   @Override
+   @Before
+   public void setUp()
+   {
+      asp = new AS3Parser();
+      scn = asp.getScn();
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/AbstractStatementTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/AbstractStatementTest.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/AbstractStatementTest.java
new file mode 100644
index 0000000..b437833
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/AbstractStatementTest.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 de.bokelberg.flex.parser;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public abstract class AbstractStatementTest extends AbstractAs3ParserTest
+{
+   protected void assertStatement( final String message,
+                                   final String input,
+                                   final String expected ) throws TokenException
+   {
+      scn.setLines( new String[]
+      { input,
+                  "__END__" } );
+      asp.nextToken();
+      final String result = new ASTToXMLConverter().convert( asp.parseStatement() );
+      assertEquals( message,
+                    expected,
+                    result );
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/NestedNodeTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/NestedNodeTest.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/NestedNodeTest.java
new file mode 100644
index 0000000..7d547ef
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/NestedNodeTest.java
@@ -0,0 +1,91 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.NodeKind;
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class NestedNodeTest extends AbstractAs3ParserTest
+{
+   private NestedNode function;
+
+   @Override
+   @Before
+   public void setUp()
+   {
+      super.setUp();
+
+      final String code = "public function foo() : void     {"
+            + "while(i>0){" + "while(true){" + "switch(a){" + "case 1:break;default:return;" + "}" + "}"
+            + "}" + "}";
+      final Node classNode = parseClass( code );
+
+      function = ( Node ) classNode.getChild( 0 );
+   }
+
+   @Test
+   public void testComputeCyclomaticComplexity()
+   {
+      assertEquals( 5,
+                    function.computeCyclomaticComplexity() );
+   }
+
+   @Test
+   public void testCountNodeFromType()
+   {
+      assertEquals( 2,
+                    function.countNodeFromType( NodeKind.WHILE ) );
+   }
+
+   @Test
+   public void testGetLastChild()
+   {
+      assertEquals( NodeKind.RETURN,
+                    function.getLastChild().getId() );
+
+      assertNull( function.getChild( Integer.MAX_VALUE ) );
+   }
+
+   @Test
+   public void testIs()
+   {
+      assertFalse( function.is( null ) );
+   }
+
+   private Node parseClass( final String input )
+   {
+      scn.setLines( new String[]
+      { "{",
+                  input,
+                  "}",
+                  "__END__" } );
+      try
+      {
+         asp.nextToken();
+         asp.nextToken(); // skip {
+         return asp.parseClassContent();
+      }
+      catch ( final TokenException e )
+      {
+         e.printStackTrace();
+      }
+      return null;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/NodeTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/NodeTest.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/NodeTest.java
new file mode 100644
index 0000000..cf7dae1
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/NodeTest.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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class NodeTest extends AbstractAs3ParserTest
+{
+   @Test
+   public void testFindPrimaryStatementsFromNameInChildren() throws TokenException
+   {
+      final Node ast = parseFunction( "function set a( value : int ) : void { trace(\"lala\")}" );
+
+      assertEquals( 2,
+                    ast.findPrimaryStatementsFromNameInChildren( new String[]
+                    { "trace",
+                                "\"lala\"" } ).size() );
+   }
+
+   @Test
+   public void testToString() throws TokenException
+   {
+      final Node ast = parseFunction( "function set a( value : int ) : void { trace(\"lala\")}" );
+
+      assertEquals( "content set mod-list  a  parameter-list parameter name-type-init "
+                          + "value  int     void  block call trace  arguments \"lala\"      ",
+                    ast.toString() );
+   }
+
+   private Node parseFunction( final String input ) throws TokenException
+   {
+      scn.setLines( new String[]
+      { "{",
+                  input,
+                  "}",
+                  "__END__" } );
+      asp.nextToken(); // first call
+      asp.nextToken(); // skip {
+      return asp.parseClassContent();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3Parser.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3Parser.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3Parser.java
new file mode 100644
index 0000000..672bd4e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3Parser.java
@@ -0,0 +1,76 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.files.impl.FileUtils;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestAS3Parser extends AbstractAs3ParserTest
+{
+   @Test
+   public void testBuildAst() throws IOException,
+                             URISyntaxException,
+                             TokenException
+   {
+      asp.buildAst( getClass().getResource( "/examples/unformatted/IContext.as" ).toURI().getPath() );
+      asp.buildAst( getClass().getResource( "/examples/FlexPMD115.as" ).toURI().getPath() );
+      asp.buildAst( getClass().getResource( "/examples/JPEGEncoder.as" ).toURI().getPath() );
+      asp.buildAst( getClass().getResource( "/examples/JPEGEncoder2.as" ).toURI().getPath() );
+      asp.buildAst( getClass().getResource( "/examples/FisheyeBase.as" ).toURI().getPath() );
+      asp.buildAst( getClass().getResource( "/examples/FlexPMD98.as" ).toURI().getPath() );
+      asp.buildAst( getClass().getResource( "/examples/FlexPMD195.as" ).toURI().getPath() );
+      final String titlePath = getClass().getResource( "/examples/unformatted/Title.as" ).toURI().getPath();
+
+      asp.buildAst( titlePath );
+      asp.buildAst( titlePath,
+                    FileUtils.readLines( new File( titlePath ) ) );
+   }
+
+   @Test
+   public void testBuildAst_AS2() throws IOException,
+                                 URISyntaxException,
+                                 TokenException
+   {
+      asp.buildAst( getClass().getResource( "/examples/toAS2/src/fw/data/request/ResultListener.as" )
+                              .toURI()
+                              .getPath() );
+
+      // Remark: file was missing.
+      //asp.buildAst( getClass().getResource( "/examples/toAS2/src/epg/StateExit_AS2.as" ).toURI().getPath() );
+   }
+
+   @Test
+   public void testBuildAst2() throws IOException,
+                              TokenException,
+                              URISyntaxException
+   {
+      final IParserNode flexPmd62 = asp.buildAst( getClass().getResource( "/examples/FlexPMD62.as" )
+                                                            .toURI()
+                                                            .getPath() );
+
+      assertEquals( "com.test.testy.ui.components",
+                    flexPmd62.getChild( 0 ).getChild( 0 ).getStringValue() );
+
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3Scanner.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3Scanner.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3Scanner.java
new file mode 100644
index 0000000..240b354
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3Scanner.java
@@ -0,0 +1,362 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import de.bokelberg.flex.parser.AS3Scanner.Token;
+
+public class TestAS3Scanner extends AbstractAs3ParserTest
+{
+   @Test
+   public void testAssignments()
+   {
+      final String[] lines = new String[]
+      { "=",
+                  "+=",
+                  "-=",
+                  "%=",
+                  "^=",
+                  "&=",
+                  "|=",
+                  "/=" };
+      scn.setLines( lines );
+
+      for ( int i = 0; i < lines.length; i++ )
+      {
+         assertText( Integer.toString( i ),
+                     lines[ i ] );
+         assertText( "\n" );
+      }
+   }
+
+   @Test
+   public void testBooleanOperators()
+   {
+      final String[] lines = new String[]
+      { "&&",
+                  "&=",
+                  "||",
+                  "|=" };
+      scn.setLines( lines );
+
+      for ( int i = 0; i < lines.length; i++ )
+      {
+         assertText( Integer.toString( i ),
+                     lines[ i ] );
+         assertText( "\n" );
+      }
+   }
+
+   @Test
+   public void testComparisonOperators()
+   {
+      final String[] lines = new String[]
+      { ">",
+                  ">>>=",
+                  ">>>",
+                  ">>=",
+                  ">>",
+                  ">=",
+                  "===",
+                  "==",
+                  "!==",
+                  "!=" };
+      scn.setLines( lines );
+
+      for ( int i = 0; i < lines.length; i++ )
+      {
+         assertText( Integer.toString( i ),
+                     lines[ i ] );
+         assertText( "\n" );
+      }
+   }
+
+   @Test
+   public void testIdentifiers()
+   {
+      final String[] lines = new String[]
+      { "a",
+                  "a.b.*",
+                  "a.b::c",
+                  "a.E" };
+      scn.setLines( lines );
+
+      assertText( "1",
+                  lines[ 0 ] );
+      assertText( "\n" );
+
+      assertText( "2",
+                  "a" );
+      assertText( "2",
+                  "." );
+      assertText( "2",
+                  "b" );
+      assertText( "2",
+                  "." );
+      assertText( "2",
+                  "*" );
+      assertText( "\n" );
+
+      assertText( "3",
+                  "a" );
+      assertText( "3",
+                  "." );
+      assertText( "3",
+                  "b" );
+      assertText( "3",
+                  "::" );
+      assertText( "3",
+                  "c" );
+      assertText( "\n" );
+
+      assertText( "4",
+                  "a" );
+      assertText( "4",
+                  "." );
+      assertText( "4",
+                  "E" );
+   }
+
+   @Test
+   public void testIsDecimalChar()
+   {
+      final String decimalString = "0123456789";
+      for ( int i = 0; i < decimalString.length(); i++ )
+      {
+         assertTrue( "",
+                     AS3Scanner.isDecimalChar( decimalString.charAt( i ) ) );
+      }
+      assertFalse( "",
+                   AS3Scanner.isDecimalChar( ( char ) 0 ) );
+
+   }
+
+   @Test
+   public void testIsHex()
+   {
+      assertTrue( "",
+                  scn.isHexChar( '0' ) );
+      assertTrue( "",
+                  scn.isHexChar( '9' ) );
+      assertTrue( "",
+                  scn.isHexChar( 'A' ) );
+      assertTrue( "",
+                  scn.isHexChar( 'a' ) );
+      assertTrue( "",
+                  scn.isHexChar( 'F' ) );
+      assertTrue( "",
+                  scn.isHexChar( 'f' ) );
+      assertFalse( "",
+                   scn.isHexChar( ';' ) );
+      assertFalse( "",
+                   scn.isHexChar( ']' ) );
+      assertFalse( "",
+                   scn.isHexChar( ' ' ) );
+   }
+
+   @Test
+   public void testMultiLineComment()
+   {
+      final String[] lines = new String[]
+      { "/* this is a multi line comment, not really */",
+                  "/** now for real",
+                  "/* now for real",
+                  "*/" };
+      scn.setLines( lines );
+
+      assertText( lines[ 0 ] );
+      assertText( "\n" );
+      assertText( "/** now for real\n/* now for real\n*/" );
+   }
+
+   @Test
+   public void testMultilineXML()
+   {
+      final String[] lines = new String[]
+      { "<?xml version=\"1.0\"?>",
+                  "<a>",
+                  "<b>test</b>",
+                  "</a>" };
+      scn.setLines( lines );
+      assertText( join( lines,
+                        "\n" ) );
+   }
+
+   @Test
+   public void testMultipleWords()
+   {
+      final String[] lines = new String[]
+      { "word1 word2 word3",
+                  "word4",
+                  "word5 word6" };
+      scn.setLines( lines );
+
+      assertText( "word1" );
+      assertText( "word2" );
+      assertText( "word3" );
+      assertText( "\n" );
+      assertText( "word4" );
+      assertText( "\n" );
+      assertText( "word5" );
+      assertText( "word6" );
+   }
+
+   @Test
+   public void testNumbers()
+   {
+      final String[] lines = new String[]
+      { "0",
+                  "1.2",
+                  "1.2E5",
+                  "0xffgg" };
+      scn.setLines( lines );
+
+      assertText( lines[ 0 ] );
+      assertText( "\n" );
+      assertText( lines[ 1 ] );
+      assertText( "\n" );
+      assertText( lines[ 2 ] );
+      assertText( "\n" );
+      assertText( lines[ 3 ] );
+   }
+
+   @Test
+   public void testPlusSymbols()
+   {
+      final String[] lines = new String[]
+      { "++",
+                  "+=",
+                  "+",
+                  "--",
+                  "-=",
+                  "-" };
+      scn.setLines( lines );
+
+      for ( int i = 0; i < lines.length; i++ )
+      {
+         assertText( Integer.toString( i ),
+                     lines[ i ] );
+         assertText( "\n" );
+      }
+   }
+
+   @Test
+   public void testSingleCharacterSymbols()
+   {
+      final String[] lines = "{}()[]:;,?~".split( "" );
+      scn.setLines( lines );
+
+      // the first entry is empty, so we skip it
+      for ( int i = 1; i < lines.length; i++ )
+      {
+         assertText( "\n" );
+         assertText( Integer.toString( i ),
+                     lines[ i ] );
+      }
+   }
+
+   @Test
+   public void testSingleLineComment()
+   {
+      final String[] lines = new String[]
+      { "//this is a single line comment",
+                  "word //another single line comment" };
+      scn.setLines( lines );
+
+      assertText( lines[ 0 ] );
+      assertText( "\n" );
+      assertText( "word" );
+      assertText( "//another single line comment" );
+   }
+
+   @Test
+   public void testSingleWord()
+   {
+      final String[] lines = new String[]
+      { "word" };
+      scn.setLines( lines );
+
+      assertText( lines[ 0 ] );
+   }
+
+   @Test
+   public void testStrings()
+   {
+      final String[] lines = new String[]
+      { "\"string\"",
+                  "\'string\'",
+                  "\"string\\\"\"" };
+      scn.setLines( lines );
+
+      assertText( "1",
+                  lines[ 0 ] );
+      assertText( "\n" );
+      assertText( "2",
+                  lines[ 1 ] );
+      assertText( "\n" );
+      assertText( "3",
+                  lines[ 2 ] );
+   }
+
+   @Test
+   public void testXML()
+   {
+      final String[] lines = new String[]
+      { "<root/>",
+                  "<root>test</root>",
+                  "<?xml version=\"1.0\"?><root>test</root>" };
+      scn.setLines( lines );
+      for ( int i = 0; i < lines.length; i++ )
+      {
+         assertText( Integer.toString( i ),
+                     lines[ i ] );
+         assertText( "\n" );
+      }
+   }
+
+   private void assertText( final String text )
+   {
+      assertText( "",
+                  text );
+   }
+
+   private void assertText( final String message,
+                            final String text )
+   {
+      Token tokent = null;
+      tokent = scn.nextToken();
+      assertEquals( message,
+                    text,
+                    tokent.getText() );
+   }
+
+   private String join( final String[] lines,
+                        final String delimiter )
+   {
+      final StringBuffer result = new StringBuffer();
+      for ( int i = 0; i < lines.length; i++ )
+      {
+         if ( i > 0 )
+         {
+            result.append( delimiter );
+         }
+         result.append( lines[ i ] );
+      }
+      return result.toString();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3ScannerWithFiles.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3ScannerWithFiles.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3ScannerWithFiles.java
new file mode 100644
index 0000000..48fc3d5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3ScannerWithFiles.java
@@ -0,0 +1,95 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import org.junit.Ignore;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.files.impl.FileUtils;
+
+import de.bokelberg.flex.parser.AS3Scanner.Token;
+
+public class TestAS3ScannerWithFiles extends AbstractAs3ParserTest
+{
+
+   @Test()
+   @Ignore("Simple.as has the completely wrong structure ... have to fix this first.")
+   public void testSimple() throws IOException,
+                           URISyntaxException
+   {
+      final String[] expected = new String[]
+      { "package",
+                  "simple",
+                  "{",
+                  "public",
+                  "class",
+                  "Simple",
+                  "{",
+                  "public",
+                  "function",
+                  "Simple",
+                  "(",
+                  ")",
+                  "{",
+                  "trace",
+                  "(",
+                  "\"Simple\"",
+                  ")",
+                  ";",
+                  "}",
+                  "}" };
+/*      assertFile( expected,
+                  "Simple.as" );
+*/   }
+
+   private void assertFile( final String[] expected,
+                            final String fileName ) throws IOException,
+                                                   URISyntaxException
+   {
+      final String[] lines = FileUtils.readLines( new File( getClass().getResource( "/examples/unformatted/" )
+                                                                       .toURI()
+                                                                       .getPath()
+            + fileName ) );
+      assertLines( expected,
+                   lines );
+   }
+
+   private void assertLines( final String[] expected,
+                             final String[] lines )
+   {
+      scn.setLines( lines );
+      for ( int i = 0; i < expected.length; i++ )
+      {
+         assertText( Integer.toString( i ),
+                     expected[ i ] );
+      }
+   }
+
+   private void assertText( final String message,
+                            final String text )
+   {
+      Token token = null;
+      token = scn.nextToken();
+      assertEquals( message,
+                    text,
+                    token.getText() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestClass.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestClass.java b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestClass.java
new file mode 100644
index 0000000..54235ef
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/java/de/bokelberg/flex/parser/TestClass.java
@@ -0,0 +1,144 @@
+/*
+ * 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 de.bokelberg.flex.parser;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class TestClass extends AbstractAs3ParserTest
+{
+   @Test
+   public void testExtends() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "public class A extends B { } ",
+                            "<content line=\"2\">"
+                                  + "<class line=\"2\">" + "<name line=\"2\">A</name><mod-list line=\"2\">"
+                                  + "<mod line=\"2\">public</mod></mod-list><extends line=\"2\""
+                                  + ">B</extends><content line=\"2\"></content>" + "</class></content>" );
+
+      assertPackageContent( "1",
+                            "public class A extends com.adobe::B { } ",
+                            "<content line=\"2\"><class line=\"2\"><name line=\"2\""
+                                  + ">A</name><mod-list line=\"2\"><mod line=\"2\""
+                                  + ">public</mod></mod-list><extends line=\"2\""
+                                  + ">com.adobe::B</extends><content line=\"2\"></content>"
+                                  + "</class></content>" );
+   }
+
+   @Test
+   public void testFinalClass() throws TokenException
+   {
+      assertPackageContent( "",
+                            "public final class Title{ }",
+                            "<content line=\"2\">"
+                                  + "<class line=\"2\">" + "<name line=\"2\">Title</name>"
+                                  + "<mod-list line=\"2\">" + "<mod line=\"2\">public</mod>"
+                                  + "<mod line=\"2\">final</mod></mod-list>" + "<content line=\"2\""
+                                  + "></content>" + "</class>" + "</content>" );
+   }
+
+   @Test
+   public void testFullFeatured() throws TokenException
+   {
+      // assertPackageContent( "",
+      // "public class A { public static const RULE_REMOVED : String = \"ruleRemoved\";}",
+      // "" );
+
+      assertPackageContent( "1",
+                            "public class A extends B implements C,D { } ",
+                            "<content line=\"2\"><class line=\"2\">"
+                                  + "<name line=\"2\">A</name><mod-list line=\"2\">"
+                                  + "<mod line=\"2\">public</mod></mod-list><extends line=\"2\""
+                                  + ">B</extends><implements-list line=\"2\">"
+                                  + "<implements line=\"2\">C</implements><implements line=\"2\""
+                                  + ">D</implements></implements-list><content line=\"2\">"
+                                  + "</content></class></content>" );
+   }
+
+   @Test
+   public void testImplementsList() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "public class A implements B,C { } ",
+                            "<content line=\"2\"><class line=\"2\">"
+                                  + "<name line=\"2\">A</name><mod-list line=\"2\""
+                                  + "><mod line=\"2\">public</mod></mod-list>"
+                                  + "<implements-list line=\"2\"><implements line=\"2\""
+                                  + ">B</implements><implements line=\"2\">"
+                                  + "C</implements></implements-list><content line=\"2\">"
+                                  + "</content></class></content>" );
+   }
+
+   @Test
+   public void testImplementsSingle() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "public class A implements B { } ",
+                            "<content line=\"2\"><class line=\"2\">"
+                                  + "<name line=\"2\">A</name><mod-list line=\"2\""
+                                  + "><mod line=\"2\">public</mod></mod-list>"
+                                  + "<implements-list line=\"2\"><implements line=\"2\""
+                                  + ">B</implements></implements-list><content line=\"2\""
+                                  + "></content></class></content>" );
+   }
+
+   @Test
+   public void testImportInsideClass() throws TokenException
+   {
+      assertPackageContent( "",
+                            "public final class Title{ import lala.lala; }",
+                            "<content line=\"2\">"
+                                  + "<class line=\"2\"><name line=\"2\">Title</name>"
+                                  + "<mod-list line=\"2\"><mod line=\"2\">public</mod>"
+                                  + "<mod line=\"2\">final</mod></mod-list>"
+                                  + "<content line=\"2\"><import line=\"2\""
+                                  + ">lala.lala</import></content></class></content>" );
+
+   }
+
+   @Test
+   public void testInclude() throws TokenException
+   {
+      assertPackageContent( "1",
+                            "public class A extends B { include \"ITextFieldInterface.asz\" } ",
+                            "<content line=\"2\"><class line=\"2\">"
+                                  + "<name line=\"2\">A</name><mod-list line=\"2\">"
+                                  + "<mod line=\"2\">public</mod></mod-list>"
+                                  + "<extends line=\"2\">B</extends>"
+                                  + "<content line=\"2\"></content></class></content>" );
+   }
+
+   private void assertPackageContent( final String message,
+                                      final String input,
+                                      final String expected ) throws TokenException
+   {
+      scn.setLines( new String[]
+      { "{",
+                  input,
+                  "}",
+                  "__END__" } );
+      asp.nextToken(); // first call
+      asp.nextToken(); // skip {
+      final String result = new ASTToXMLConverter().convert( asp.parsePackageContent() );
+      assertEquals( message,
+                    expected,
+                    result );
+   }
+
+}


[10/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathCeilRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathCeilRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathCeilRule.java
new file mode 100644
index 0000000..2309360
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathCeilRule.java
@@ -0,0 +1,74 @@
+/*
+ * 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.nodes.IFunction;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class AvoidUsingMathCeilRule extends AbstractPrimaryAstRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#addViolation(com.adobe
+    * .ac.pmd.parser.IParserNode, com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void addViolation( final IParserNode statement,
+                                final IFunction function )
+   {
+      addViolation( statement );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#getFirstPrimaryToFind()
+    */
+   @Override
+   protected String getFirstPrimaryToFind()
+   {
+      return "Math";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#getSecondPrimaryToFind
+    * ()
+    */
+   @Override
+   protected String getSecondPrimaryToFind()
+   {
+      return "ceil";
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathFloorRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathFloorRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathFloorRule.java
new file mode 100644
index 0000000..bdba2d7
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathFloorRule.java
@@ -0,0 +1,74 @@
+/*
+ * 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.nodes.IFunction;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class AvoidUsingMathFloorRule extends AbstractPrimaryAstRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#addViolation(com.adobe
+    * .ac.pmd.parser.IParserNode, com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void addViolation( final IParserNode statement,
+                                final IFunction function )
+   {
+      addViolation( statement );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#getFirstPrimaryToFind()
+    */
+   @Override
+   protected String getFirstPrimaryToFind()
+   {
+      return "Math";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#getSecondPrimaryToFind
+    * ()
+    */
+   @Override
+   protected String getSecondPrimaryToFind()
+   {
+      return "floor";
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathRoundRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathRoundRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathRoundRule.java
new file mode 100644
index 0000000..d1f211e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidUsingMathRoundRule.java
@@ -0,0 +1,74 @@
+/*
+ * 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.nodes.IFunction;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class AvoidUsingMathRoundRule extends AbstractPrimaryAstRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#addViolation(com.adobe
+    * .ac.pmd.parser.IParserNode, com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void addViolation( final IParserNode statement,
+                                final IFunction function )
+   {
+      addViolation( statement );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#getFirstPrimaryToFind()
+    */
+   @Override
+   protected String getFirstPrimaryToFind()
+   {
+      return "Math";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#getSecondPrimaryToFind
+    * ()
+    */
+   @Override
+   protected String getSecondPrimaryToFind()
+   {
+      return "round";
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/BindableClassRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/BindableClassRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/BindableClassRule.java
new file mode 100644
index 0000000..54ce012
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/BindableClassRule.java
@@ -0,0 +1,66 @@
+/*
+ * 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.nodes.IClass;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class BindableClassRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#isConcernedByTheCurrentFile
+    * ()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return !getCurrentFile().isMxml()
+            && !getCurrentFile().getClassName().endsWith( "VO.as" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNode )
+   {
+      if ( classNode.isBindable() )
+      {
+         addViolation( classNode.getMetaData( MetaData.BINDABLE ).get( 0 ) );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/CreationPolicySetToAllRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/CreationPolicySetToAllRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/CreationPolicySetToAllRule.java
new file mode 100644
index 0000000..4ad86c5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/CreationPolicySetToAllRule.java
@@ -0,0 +1,70 @@
+/*
+ * 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 java.util.Locale;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class CreationPolicySetToAllRule extends AbstractRegexpBasedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected final String getRegexp()
+   {
+      return ".*creationPolicy.*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected final boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      return line.toLowerCase( Locale.FRANCE ).contains( "all" );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/CyclomaticComplexityRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/CyclomaticComplexityRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/CyclomaticComplexityRule.java
new file mode 100644
index 0000000..2dcdb4c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/CyclomaticComplexityRule.java
@@ -0,0 +1,77 @@
+/*
+ * 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.nodes.IFunction;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.AbstractMaximizedAstFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public class CyclomaticComplexityRule extends AbstractMaximizedAstFlexRule
+{
+   public static final int DEFAULT_THRESHOLD = 10;
+   private IFunction       currentFunction   = null;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#
+    * getActualValueForTheCurrentViolation()
+    */
+   public final int getActualValueForTheCurrentViolation()
+   {
+      return currentFunction.getCyclomaticComplexity();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getDefaultThreshold
+    * ()
+    */
+   public final int getDefaultThreshold()
+   {
+      return DEFAULT_THRESHOLD;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected final void findViolations( final IFunction function )
+   {
+      currentFunction = function;
+      if ( function.getCyclomaticComplexity() > getThreshold() )
+      {
+         addViolation( function );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/DeeplyNestedIfRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/DeeplyNestedIfRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/DeeplyNestedIfRule.java
new file mode 100644
index 0000000..46b17ef
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/DeeplyNestedIfRule.java
@@ -0,0 +1,123 @@
+/*
+ * 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.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.AbstractMaximizedAstFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public class DeeplyNestedIfRule extends AbstractMaximizedAstFlexRule
+{
+   private int ifLevel = 0;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#
+    * getActualValueForTheCurrentViolation()
+    */
+   public final int getActualValueForTheCurrentViolation()
+   {
+      return ifLevel;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getDefaultThreshold
+    * ()
+    */
+   public final int getDefaultThreshold()
+   {
+      return 2;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitElse(com.adobe.ac
+    * .pmd.parser.IParserNode)
+    */
+   @Override
+   protected final void visitElse( final IParserNode ifNode )
+   {
+      beforeVisitingIfBlock();
+
+      super.visitElse( ifNode );
+
+      afterVisitingIfBlock( ifNode );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitFunction(com.adobe
+    * .ac.pmd.parser.IParserNode,
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule.FunctionType)
+    */
+   @Override
+   protected final void visitFunction( final IParserNode ast,
+                                       final FunctionType type )
+   {
+      ifLevel = 0;
+
+      super.visitFunction( ast,
+                           type );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitThen(com.adobe.ac
+    * .pmd.parser.IParserNode)
+    */
+   @Override
+   protected final void visitThen( final IParserNode ifNode )
+   {
+      beforeVisitingIfBlock();
+
+      super.visitThen( ifNode );
+
+      afterVisitingIfBlock( ifNode );
+   }
+
+   private void afterVisitingIfBlock( final IParserNode ifNode )
+   {
+      ifLevel--;
+      if ( ifLevel >= getThreshold() )
+      {
+         addViolation( ifNode );
+      }
+   }
+
+   private void beforeVisitingIfBlock()
+   {
+      ifLevel++;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/DynamicFiltersUsedInPopup.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/DynamicFiltersUsedInPopup.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/DynamicFiltersUsedInPopup.java
new file mode 100644
index 0000000..06aa2ed
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/DynamicFiltersUsedInPopup.java
@@ -0,0 +1,68 @@
+/*
+ * 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.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class DynamicFiltersUsedInPopup extends AbstractRegexpBasedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return getCurrentFile().getClassName().contains( "Popup" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected final String getRegexp()
+   {
+      return ".*Filter.*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected final boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      return true;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/HeavyConstructorRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/HeavyConstructorRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/HeavyConstructorRule.java
new file mode 100644
index 0000000..51d4d3a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/HeavyConstructorRule.java
@@ -0,0 +1,90 @@
+/*
+ * 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.nodes.IFunction;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.AbstractMaximizedAstFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public class HeavyConstructorRule extends AbstractMaximizedAstFlexRule
+{
+   private IFunction currentConstructor = null;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#
+    * getActualValueForTheCurrentViolation()
+    */
+   public final int getActualValueForTheCurrentViolation()
+   {
+      return currentConstructor.getCyclomaticComplexity();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getDefaultThreshold
+    * ()
+    */
+   public final int getDefaultThreshold()
+   {
+      return 1;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#isConcernedByTheCurrentFile
+    * ()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return !getCurrentFile().isMxml();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromConstructor
+    * (com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected final void findViolationsFromConstructor( final IFunction constructor )
+   {
+      currentConstructor = constructor;
+      final int cyclomaticComplexity = constructor.getCyclomaticComplexity();
+      if ( cyclomaticComplexity > getThreshold() )
+      {
+         addViolation( constructor,
+                       String.valueOf( cyclomaticComplexity ) );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/RecursiveStyleManagerRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/RecursiveStyleManagerRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/RecursiveStyleManagerRule.java
new file mode 100644
index 0000000..1ccaf27
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/RecursiveStyleManagerRule.java
@@ -0,0 +1,58 @@
+/*
+ * 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.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public final class RecursiveStyleManagerRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitMethodCall(com.adobe
+    * .ac.pmd.parser.IParserNode)
+    */
+   @Override
+   protected void visitMethodCall( final IParserNode methodCallNode )
+   {
+      final String methodName = methodCallNode.getChild( 0 ).getStringValue();
+
+      if ( "loadStyles".equals( methodName )
+            && ( methodCallNode.getChild( 1 ).numChildren() != 2 || "true".equals( methodCallNode.getChild( 1 )
+                                                                                                 .getChild( 1 )
+                                                                                                 .getStringValue() ) ) )
+      {
+         addViolation( methodCallNode );
+      }
+      super.visitMethodCall( methodCallNode );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/UseTraceFunctionRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/UseTraceFunctionRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/UseTraceFunctionRule.java
new file mode 100644
index 0000000..55346e7
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/UseTraceFunctionRule.java
@@ -0,0 +1,62 @@
+/*
+ * 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.nodes.IFunction;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class UseTraceFunctionRule extends AbstractPrimaryAstRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#addViolation(com.adobe
+    * .ac.pmd.parser.IParserNode, com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void addViolation( final IParserNode statement,
+                                final IFunction function )
+   {
+      addViolation( statement );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractPrimaryAstRule#getFirstPrimaryToFind()
+    */
+   @Override
+   protected String getFirstPrimaryToFind()
+   {
+      return "trace";
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/AllowAllSecureDomainRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/AllowAllSecureDomainRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/AllowAllSecureDomainRule.java
new file mode 100644
index 0000000..f39df22
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/AllowAllSecureDomainRule.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.security;
+
+import java.util.regex.Matcher;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class AllowAllSecureDomainRule extends AbstractRegexpBasedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected final String getRegexp()
+   {
+      return "\\s*([a-zA-Z]+)\\.allowDomain\\s*\\(\\s*['\"]\\*['\"]\\s*\\).*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#isCurrentLineConcerned
+    * (java.lang.String)
+    */
+   @Override
+   protected boolean isCurrentLineConcerned( final String line )
+   {
+      return line.contains( "allowDomain" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected final boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      final Matcher matcher = getMatcher( line );
+      final boolean result = false;
+
+      if ( matcher.matches() )
+      {
+         final String objectName = matcher.group( 1 ).trim();
+
+         if ( objectName == null )
+         {
+            return false;
+         }
+
+         if ( objectName.equalsIgnoreCase( "Security" ) )
+         {
+            return true;
+         }
+      }
+      return result;
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/AllowInsecureDomainRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/AllowInsecureDomainRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/AllowInsecureDomainRule.java
new file mode 100644
index 0000000..7729ebf
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/AllowInsecureDomainRule.java
@@ -0,0 +1,90 @@
+/*
+ * 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 java.util.regex.Matcher;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class AllowInsecureDomainRule extends AbstractRegexpBasedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected final String getRegexp()
+   {
+      return ".*\\.allowInsecureDomain[ \\(]+.*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#isCurrentLineConcerned
+    * (java.lang.String)
+    */
+   @Override
+   protected boolean isCurrentLineConcerned( final String line )
+   {
+      return line.contains( "allowInsecureDomain" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected final boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      final Matcher matcher = getMatcher( line );
+      final boolean result = false;
+
+      if ( matcher.matches() )
+      {
+         return true;
+      }
+      return result;
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/ImportLoadBestPracticeRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/ImportLoadBestPracticeRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/ImportLoadBestPracticeRule.java
new file mode 100644
index 0000000..3d3f058
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/ImportLoadBestPracticeRule.java
@@ -0,0 +1,90 @@
+/*
+ * 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 java.util.regex.Matcher;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class ImportLoadBestPracticeRule extends AbstractRegexpBasedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected final String getRegexp()
+   {
+      return ".*(([,=]\\s*SecurityDomain\\.currentDomain)|(\\.loadBytes\\s?\\()).*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#isCurrentLineConcerned
+    * (java.lang.String)
+    */
+   @Override
+   protected boolean isCurrentLineConcerned( final String line )
+   {
+      return line.contains( "SecurityDomain.currentDomain" )
+            || line.contains( ".loadBytes" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected final boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      final Matcher matcher = getMatcher( line );
+      final boolean result = false;
+
+      if ( matcher.matches() )
+      {
+         return true;
+      }
+      return result;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/InsecureExactSettingsRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/InsecureExactSettingsRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/InsecureExactSettingsRule.java
new file mode 100644
index 0000000..ce40dfc
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/InsecureExactSettingsRule.java
@@ -0,0 +1,89 @@
+/*
+ * 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 java.util.regex.Matcher;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class InsecureExactSettingsRule extends AbstractRegexpBasedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected final String getRegexp()
+   {
+      return ".*\\.exactSettings[ \\t=]+([a-zA-Z]+).*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#isCurrentLineConcerned
+    * (java.lang.String)
+    */
+   @Override
+   protected boolean isCurrentLineConcerned( final String line )
+   {
+      return line.contains( "exactSettings" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected final boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      final Matcher matcher = getMatcher( line );
+      boolean result = false;
+
+      if ( matcher.matches() )
+      {
+         result = matcher.group( 1 ).trim().equalsIgnoreCase( "false" );
+      }
+      return result;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/LSOSecureFalseRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/LSOSecureFalseRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/LSOSecureFalseRule.java
new file mode 100644
index 0000000..54f3219
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/LSOSecureFalseRule.java
@@ -0,0 +1,94 @@
+/*
+ * 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 java.util.regex.Matcher;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class LSOSecureFalseRule extends AbstractRegexpBasedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected final String getRegexp()
+   {
+      return ".*\\.getLocal\\s*\\([^,]+\\,[^,]+\\,([A-Za-z ]+)\\).*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#isCurrentLineConcerned
+    * (java.lang.String)
+    */
+   @Override
+   protected boolean isCurrentLineConcerned( final String line )
+   {
+      return line.contains( "getLocal" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected final boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      final Matcher matcher = getMatcher( line );
+
+      if ( matcher.matches() )
+      {
+         final String secureFlag = matcher.group( 1 ).trim();
+
+         if ( secureFlag.equalsIgnoreCase( "false" ) )
+         {
+            return true;
+         }
+
+      }
+      return false;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/LocalConnectionStarRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/LocalConnectionStarRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/LocalConnectionStarRule.java
new file mode 100644
index 0000000..2bf7ae0
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/security/LocalConnectionStarRule.java
@@ -0,0 +1,96 @@
+/*
+ * 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 java.util.regex.Matcher;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class LocalConnectionStarRule extends AbstractRegexpBasedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected final String getRegexp()
+   {
+      return ".*\\s([a-zA-Z0-9\\.\\-_]+)\\.allowDomain\\s*\\(\\s*['\"]\\*['\"]\\s*\\).*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#isCurrentLineConcerned
+    * (java.lang.String)
+    */
+   @Override
+   protected boolean isCurrentLineConcerned( final String line )
+   {
+      return line.contains( "allowDomain" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected final boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      final Matcher matcher = getMatcher( line );
+      boolean result = false;
+
+      if ( matcher.matches() )
+      {
+         final String objectName = matcher.group( 1 ).trim();
+
+         if ( objectName.equalsIgnoreCase( "Security" ) )
+         {
+            return false;
+         }
+
+         result = true;
+      }
+      return result;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooLongFunctionRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooLongFunctionRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooLongFunctionRule.java
new file mode 100644
index 0000000..be51e7e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooLongFunctionRule.java
@@ -0,0 +1,90 @@
+/*
+ * 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.nodes.utils.FunctionUtils;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.AbstractMaximizedAstFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public class TooLongFunctionRule extends AbstractMaximizedAstFlexRule
+{
+   public static final int DEFAULT_THRESHOLD = 20;
+   private int             functionLength;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#
+    * getActualValueForTheCurrentViolation()
+    */
+   public final int getActualValueForTheCurrentViolation()
+   {
+      return functionLength;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getDefaultThreshold
+    * ()
+    */
+   public final int getDefaultThreshold()
+   {
+      return DEFAULT_THRESHOLD;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitFunction(com.adobe
+    * .ac.pmd.parser.IParserNode,
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule.FunctionType)
+    */
+   @Override
+   protected final void visitFunction( final IParserNode functionNode,
+                                       final FunctionType type )
+   {
+      super.visitFunction( functionNode,
+                           type );
+
+      final IParserNode block = functionNode.getChild( functionNode.numChildren() - 1 );
+
+      if ( block != null
+            && block.numChildren() != 0 )
+      {
+         functionLength = FunctionUtils.computeFunctionLength( getCurrentFile(),
+                                                               block );
+         if ( functionLength > getThreshold() )
+         {
+            addViolation( getNameFromFunctionDeclaration( functionNode ) );
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooLongSwitchCaseRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooLongSwitchCaseRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooLongSwitchCaseRule.java
new file mode 100644
index 0000000..c383a2d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooLongSwitchCaseRule.java
@@ -0,0 +1,80 @@
+/*
+ * 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.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.AbstractMaximizedAstFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public class TooLongSwitchCaseRule extends AbstractMaximizedAstFlexRule
+{
+   private int length;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#
+    * getActualValueForTheCurrentViolation()
+    */
+   public final int getActualValueForTheCurrentViolation()
+   {
+      return length;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getDefaultThreshold
+    * ()
+    */
+   public final int getDefaultThreshold()
+   {
+      return 2;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitSwitchCase(com.adobe
+    * .ac.pmd.parser.IParserNode)
+    */
+   @Override
+   protected final void visitSwitchCase( final IParserNode caseBlock )
+   {
+      if ( caseBlock.getLastChild() != null )
+      {
+         length = caseBlock.getLastChild().getLine()
+               - caseBlock.getLine();
+         if ( length > getThreshold() )
+         {
+            addViolation( caseBlock );
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyFieldInVORule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyFieldInVORule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyFieldInVORule.java
new file mode 100644
index 0000000..44d8b22
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyFieldInVORule.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;
+
+/**
+ * @author xagnetti
+ */
+public class TooManyFieldInVORule extends TooManyFieldsRule
+{
+   public static final int DEFAULT_THRESHOLD_FOR_VO = 15;
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.sizing.TooManyFieldsRule#getDefaultThreshold()
+    */
+   @Override
+   public final int getDefaultThreshold()
+   {
+      return DEFAULT_THRESHOLD_FOR_VO;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.sizing.TooManyFieldsRule#isConcernedByTheCurrentFile
+    * ()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return !super.isConcernedByTheCurrentFile();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyFieldsRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyFieldsRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyFieldsRule.java
new file mode 100644
index 0000000..5dba6cb
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyFieldsRule.java
@@ -0,0 +1,107 @@
+/*
+ * 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.List;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.AbstractMaximizedAstFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public class TooManyFieldsRule extends AbstractMaximizedAstFlexRule
+{
+   public static final int DEFAULT_THRESHOLD = 5;
+   private int             attributesNb      = 0;
+   private IClass          classNode         = null;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#
+    * getActualValueForTheCurrentViolation()
+    */
+   public final int getActualValueForTheCurrentViolation()
+   {
+      return attributesNb;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getDefaultThreshold
+    * ()
+    */
+   public int getDefaultThreshold()
+   {
+      return DEFAULT_THRESHOLD;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#isConcernedByTheCurrentFile
+    * ()
+    */
+   @Override
+   public boolean isConcernedByTheCurrentFile()
+   {
+      return !getCurrentFile().getClassName().endsWith( "VO.as" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNodeToBeSet )
+   {
+      classNode = classNodeToBeSet;
+      super.findViolations( classNodeToBeSet );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromAttributes
+    * (java.util.List)
+    */
+   @Override
+   protected final void findViolationsFromAttributes( final List< IAttribute > attributes )
+   {
+      attributesNb = attributes.size();
+
+      if ( attributesNb > getThreshold() )
+      {
+         addViolation( classNode );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyFunctionRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyFunctionRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyFunctionRule.java
new file mode 100644
index 0000000..e3ced20
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyFunctionRule.java
@@ -0,0 +1,103 @@
+/*
+ * 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.List;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.AbstractMaximizedAstFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public class TooManyFunctionRule extends AbstractMaximizedAstFlexRule
+{
+   public static final int DEFAULT_THRESHOLD = 10;
+   private IClass          classNode         = null;
+   private int             functionNb;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#
+    * getActualValueForTheCurrentViolation()
+    */
+   public final int getActualValueForTheCurrentViolation()
+   {
+      return functionNb;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getDefaultThreshold
+    * ()
+    */
+   public final int getDefaultThreshold()
+   {
+      return DEFAULT_THRESHOLD;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNodeToSet )
+   {
+      functionNb = 0;
+      classNode = classNodeToSet;
+
+      super.findViolations( classNodeToSet );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(java.util
+    * .List)
+    */
+   @Override
+   protected final void findViolations( final List< IFunction > functions )
+   {
+      for ( final IFunction functionNode : functions )
+      {
+         if ( !functionNode.isGetter()
+               && !functionNode.isSetter() && functionNode != classNode.getConstructor() )
+         {
+            functionNb++;
+         }
+      }
+      if ( functionNb > getThreshold() )
+      {
+         addViolation( classNode );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyParametersRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyParametersRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyParametersRule.java
new file mode 100644
index 0000000..109a50b
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyParametersRule.java
@@ -0,0 +1,85 @@
+/*
+ * 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.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.AbstractMaximizedAstFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public class TooManyParametersRule extends AbstractMaximizedAstFlexRule
+{
+   public static final int DEFAULT_THRESHOLD = 4;
+   private int             paramsNb;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#
+    * getActualValueForTheCurrentViolation()
+    */
+   public final int getActualValueForTheCurrentViolation()
+   {
+      return paramsNb;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getDefaultThreshold
+    * ()
+    */
+   public final int getDefaultThreshold()
+   {
+      return DEFAULT_THRESHOLD;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#visitFunction(com.adobe
+    * .ac.pmd.parser.IParserNode,
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule.FunctionType)
+    */
+   @Override
+   protected final void visitFunction( final IParserNode ast,
+                                       final FunctionType type )
+   {
+      super.visitFunction( ast,
+                           type );
+
+      final IParserNode paramList = ast.getChild( 2 );
+
+      paramsNb = paramList.numChildren();
+
+      if ( paramsNb > getThreshold() )
+      {
+         addViolation( paramList );
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyPublicRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyPublicRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyPublicRule.java
new file mode 100644
index 0000000..e4c7fda
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/sizing/TooManyPublicRule.java
@@ -0,0 +1,120 @@
+/*
+ * 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.List;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.AbstractMaximizedAstFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public class TooManyPublicRule extends AbstractMaximizedAstFlexRule
+{
+   public static final int DEFAULT_THRESHOLD = 10;
+   private IFunction       constructor;
+   private int             publicCount;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#
+    * getActualValueForTheCurrentViolation()
+    */
+   public final int getActualValueForTheCurrentViolation()
+   {
+      return publicCount;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getDefaultThreshold
+    * ()
+    */
+   public final int getDefaultThreshold()
+   {
+      return DEFAULT_THRESHOLD;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNode )
+   {
+      publicCount = 0;
+      constructor = classNode.getConstructor();
+
+      super.findViolations( classNode );
+
+      if ( publicCount > getThreshold() )
+      {
+         addViolation( classNode );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected final void findViolations( final IFunction function )
+   {
+      if ( function.isPublic()
+            && !function.equals( constructor ) && !function.isGetter() && !function.isSetter() )
+      {
+         publicCount++;
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromAttributes
+    * (java.util.List)
+    */
+   @Override
+   protected final void findViolationsFromAttributes( final List< IAttribute > variables )
+   {
+      for ( final IAttribute variable : variables )
+      {
+         if ( variable.isPublic() )
+         {
+            publicCount++;
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/BadFormatLoggerRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/BadFormatLoggerRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/BadFormatLoggerRule.java
new file mode 100644
index 0000000..9774747
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/BadFormatLoggerRule.java
@@ -0,0 +1,83 @@
+/*
+ * 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.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IField;
+import com.adobe.ac.pmd.nodes.IVariable;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class BadFormatLoggerRule extends AbstractAstFlexRule
+{
+   private static final String CORRECT_LOGGER_NAME            = "LOG";
+   private static final String LOGGER_INTERFACE               = "ILogger";
+   private static final String MESSAGE_LOGGER_NAME_IS_NOT_LOG = "The logger name is not LOG";
+   private static final String MESSAGE_NOT_INITIALIZED        = "The logger is not initialized";
+   private static final String MESSAGE_SHOULD_BE_CONSTANT     = "A logger should be constant";
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNode )
+   {
+      for ( final IVariable field : classNode.getAttributes() )
+      {
+         if ( field.getType().toString().equals( LOGGER_INTERFACE ) )
+         {
+            addViolation( field.getInternalNode(),
+                          field.getInternalNode(),
+                          MESSAGE_SHOULD_BE_CONSTANT );
+         }
+      }
+      for ( final IField field : classNode.getConstants() )
+      {
+         if ( field.getType().toString().equals( LOGGER_INTERFACE ) )
+         {
+            if ( !field.getName().equals( CORRECT_LOGGER_NAME ) )
+            {
+               addViolation( field.getInternalNode(),
+                             field.getInternalNode(),
+                             MESSAGE_LOGGER_NAME_IS_NOT_LOG );
+            }
+            if ( field.getInitializationExpression() == null )
+            {
+               addViolation( field.getInternalNode(),
+                             field.getInternalNode(),
+                             MESSAGE_NOT_INITIALIZED );
+            }
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/ConstructorNonEmptyReturnTypeRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/ConstructorNonEmptyReturnTypeRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/ConstructorNonEmptyReturnTypeRule.java
new file mode 100644
index 0000000..bbb743f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/ConstructorNonEmptyReturnTypeRule.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.style;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class ConstructorNonEmptyReturnTypeRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromConstructor
+    * (com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected final void findViolationsFromConstructor( final IFunction constructor )
+   {
+      if ( constructor.getReturnType() != null
+            && !"".equals( constructor.getReturnType().toString() ) )
+      {
+         addViolation( constructor );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/CopyrightMissingRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/CopyrightMissingRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/CopyrightMissingRule.java
new file mode 100644
index 0000000..f0e641b
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/style/CopyrightMissingRule.java
@@ -0,0 +1,95 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.util.ArrayList;
+import java.util.List;
+
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.files.IAs3File;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.files.IMxmlFile;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class CopyrightMissingRule extends AbstractFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#findViolationsInCurrentFile()
+    */
+   @Override
+   protected final List< IFlexViolation > findViolationsInCurrentFile()
+   {
+      final List< IFlexViolation > violations = new ArrayList< IFlexViolation >();
+      final IFlexFile currentFile = getCurrentFile();
+
+      if ( currentFile.getLinesNb() == 1 )
+      {
+         addViolation( violations );
+      }
+      else if ( currentFile.getLinesNb() > 1 )
+      {
+         final String commentOpeningTag = currentFile.getCommentOpeningTag();
+         final String firstLine = currentFile.getLineAt( 1 );
+         final String secondLine = currentFile.getLineAt( 2 );
+
+         if ( !firstLine.startsWith( commentOpeningTag )
+               && !( currentFile instanceof IMxmlFile && secondLine.contains( commentOpeningTag ) )
+               && !( currentFile instanceof IAs3File && firstLine.contains( currentFile.getSingleLineComment() ) ) )
+         {
+            addViolation( violations );
+         }
+      }
+
+      return violations;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   private void addViolation( final List< IFlexViolation > violations )
+   {
+      addViolation( violations,
+                    new ViolationPosition( -1 ) );
+   }
+}


[38/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/build.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/build.xml b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/build.xml
new file mode 100644
index 0000000..24c6d01
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/build.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" ?>
+<!--
+
+  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.
+
+-->
+<project name="FlexPMD client build utility" default="default" xmlns:artifact="urn:maven-artifact-ant">
+
+	<property environment="env" />
+	<property file="${basedir}/build.properties" />
+
+	<!-- uncomment if you need to see what properties ant is picking up 
+	<echoproperties />
+    -->
+	
+	<path id="maven-ant-tasks.classpath" path="${basedir}/ant.lib/maven-ant-tasks-2.0.9.jar" />
+	<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath" />
+
+
+	<target name="default">
+		<echo> This build contains at set of usefull targets </echo>
+		<echo> The compilation, unit test, flexpmd quality report and done with maven </echo>
+		<echo />
+		<echo> From here, you may  the following target: </echo>
+		<echo />
+		<echo> -------- update the third party libraries swc  ----------------- </echo>
+		<echo> libs.update          -- will clean and recopy the 3rd party swc in libs</echo>
+		<echo />
+		<echo> -------- flexcover --------------------------------------------- </echo>
+		<echo> flexcover.run          -- will run the flexcover air client and flexunit test runner</echo>
+		<echo> flexcover.report       -- will run flexcover and create a emma.xml report</echo>
+	</target>
+
+	<target name="libs.update">
+		<delete includeemptydirs="true">
+			<fileset dir="${basedir}/libs" includes="*.swc" excludes="radon_flex_remoted_objects*.swc" />
+		</delete>
+		<artifact:dependencies filesetId="dependency.fileset" useScope="test">
+			<pom file="${basedir}/pom.xml" />
+		</artifact:dependencies>
+		<copy todir="${basedir}/libs">
+			<fileset refid="dependency.fileset" />
+			<!-- This mapper strips off all leading directory information -->
+			<mapper type="flatten" />
+		</copy>
+		<delete includeemptydirs="true">
+			<fileset dir="${basedir}/libs" includes="*${flex.sdk.version}*" defaultexcludes="false" excludes="datavisualization-3.2.0.3958-en_US.rb.swc,datavisualization-3.2.0.3958.swc"/>
+			<fileset dir="${basedir}/libs" includes="*.pom" defaultexcludes="false" />
+			<fileset dir="${basedir}/libs" includes="*.zip" defaultexcludes="false" />
+            <fileset dir="${basedir}/libs" includes="*.jar" defaultexcludes="false" />
+		</delete>
+	</target>
+
+	<target name="flexcover.run" depends="libs.update">
+		<ant antfile="${basedir}/flexcover.xml" target="run" />
+	</target>
+
+	<target name="flexcover.report" depends="libs.update">
+		<ant antfile="${basedir}/flexcover.xml" target="report" />
+	</target>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/flexcover.properties
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/flexcover.properties b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/flexcover.properties
new file mode 100644
index 0000000..929c918
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/flexcover.properties
@@ -0,0 +1,89 @@
+################################################################################
+##
+##  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.
+##
+################################################################################
+
+#
+# Common to all platforms
+
+# Mac/unix location of adl
+#adl=${FLEX_HOME}/bin/adl
+
+# Windows location of adl
+adl=${flexcover.sdk}\\bin\\adl.exe
+
+dirSep=\\
+
+# flex related variables
+FLEX_HOME=${flexcover.sdk}
+flexConfig=${flexcover.sdk}/frameworks/air-config.xml
+FLEX_TASKS=${flexcover.sdk}/ant/lib/flexTasks.jar
+
+LOCALE=en_US
+
+versionNumber=1.0
+
+# frameworks and locations
+ant.lib=${basedir}/ant.lib
+logs=${basedir}/target/logs
+temp=${logs}/temp
+flashOutput.location=${logs}/TEST-testOutput.xml
+src=${basedir}/src/main/flex
+src_resources=${basedir}/src/main/resources
+src_test=${basedir}/src/test/flex
+src_test_resources=${basedir}/src/test/resources
+src_locale=${basedir}/src/main/locales/en_US
+testClassPath=${basedir}/libs
+resourceBundles=${basedir}/src/main/locales
+flexUnitSrc=${basedir}/src/test
+filesToPublish=${basedir}/filesToPublish
+
+# constants
+testTerminationToken=-----------------TESTRUNNEROUTPUTENDS----------------
+initialContentToken=[This value will be overwritten by Flex Builder in the output app.xml]
+majorVersion=1
+minorVersion=0
+releaseVersion=0
+
+# project variables
+build=${temp}
+
+# test Harness
+testAppXML=${testName}-app.xml
+testAppMXML=${testName}.mxml
+testSWF=${testName}.swf
+testCVM=${testName}.cvm
+testOutputDir=${temp}
+
+# main app
+mainName=Main
+mainAppXMLtemplate=${mainName}-app-template.xml
+mainAppXML=${mainName}-app.xml
+mainAppMXML=${mainName}.mxml
+mainSWF=${mainName}.swf
+
+# instumentation
+coverageMetadata=${temp}/${mainName}.cvm
+coverageReport=${basedir}/target/site/emma/coverage.xml
+coverageCVR=${logs}/${mainName}_coverage.cvr
+coverageXML=${ant.lib}/CoverageViewer-app.xml
+
+# build variables
+verbose=true
+dist=${basedir}/target/dist-test
+adtJar=${flexcover.sdk}/lib/adt.jar
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/flexcover.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/flexcover.xml b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/flexcover.xml
new file mode 100644
index 0000000..0573834
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/flexcover.xml
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+<project name="FlexPMD Flex Cover Report ANT build report utility" basedir="" default="report">
+
+	<!-- set up the build environment -->
+	<property file="build.properties" />
+	<property file="flexcover.properties" />
+	<property environment="env" />
+
+	<property name="flexpmd.version" value="1.0-RC1" />
+
+	<!-- get the hostname of the machine we're running on -->
+	<property name="env.HOSTNAME" value="${env.COMPUTERNAME}" />
+
+	<!-- include the flex target definitions -->
+	<taskdef resource="flexTasks.tasks" classpath="${FLEX_TASKS}" />
+
+	<!-- Define the FlexUnit task. -->
+	<taskdef resource="com/adobe/ac/ant/tasks/tasks.properties" classpath="${ant.lib}/FlexUnitAntTasks.jar" />
+
+	<!-- uncomment if you need to see what properties ant is picking up -->
+	<echoproperties/>
+
+	<!-- the main build target the build machine uses, build, test, report, nag -->
+	<target name="run.prepare" 
+		depends="clean,getInstrumentationMetadata,compileAndRunTests,cleanUp" 
+		description="cleans, compiles and tests the app, builds a non-release package." />
+
+	
+	<target name="report">
+		<antcall target="run.prepare">
+            <param name="testName" value="TestRunner" />
+        </antcall>
+	</target>
+	
+	<target name="run">
+		<antcall target="run.prepare">
+            <param name="testName" value="TestViewRunner" />
+        </antcall>
+	</target>
+
+	<!-- usethis target to test locally -->
+	<target name="compileAndRunTests" depends="clean,compileTest,runTest" 
+		description="compile and run the test suite and code coverage tool" />
+
+	<target name="getInstrumentationMetadata" 
+		description="compiles the app to get metadata about classes needed for code coverage" depends="clean">
+ 		<compile />
+	</target>
+
+	<target name="cleanUp" description="removes test harness and temp folder from build directory">
+		<delete file="${build}/${testAppXML}">
+		</delete>
+		<delete file="${build}/${testSWF}">
+		</delete>
+	</target>
+
+	<property name="coverageMetadata-path" location="${coverageMetadata}" />
+	<property name="coverageReport-path" location="${coverageReport}" />
+	<property name="coverageCVR-path" location="${coverageCVR}" />
+	<property name="coverageXML-path" location="${coverageXML}" />
+
+	<target name="launchCodeCoverageApp" description="launches to code coverage listener app">
+		<echo>'${coverageMetadata-path}' -output '${coverageCVR-path}' -emma-report '${coverageReport-path}'</echo>
+		<launchApp appXML="${coverageXML-path}" additionalArgs="${coverageMetadata-path} -output ${coverageCVR-path} -emma-report ${coverageReport-path}" />
+	</target>
+
+	<macrodef name="launchApp">
+		<attribute name="appXML" />
+		<attribute name="additionalArgs" />
+		<attribute name="spawn" default="true" />
+		<sequential>
+			<pathconvert property="xmlPath" dirsep="${dirSep}">
+				<path location="@{appXML}" />
+			</pathconvert>
+			<echo>launching adl with ${xmlPath}</echo>
+			<exec executable="${adl}" spawn="@{spawn}">
+				<arg line="'${xmlPath}'" />
+				<arg line="--" />
+				<arg line="@{additionalArgs}" />
+			</exec>
+		</sequential>
+	</macrodef>
+
+	<macrodef name="compile">
+		<attribute name="srcFile" default="${src}/${mainAppMXML}" />
+		<attribute name="outputFile" default="${temp}/${mainSWF}" />
+		<sequential>
+			<mxmlc file="@{srcFile}" output="@{outputFile}" debug="${debugMode}" 
+				allow-source-path-overlap="true" show-actionscript-warnings="false" 
+				keep-generated-actionscript="false" maxmemory="1024m">
+
+				<define name="CONFIG::debugging" value="false" />
+
+				<load-config filename="${flexConfig}" />
+
+				<!-- path to our source -->
+				<source-path path-element="${src}" />
+				<source-path path-element="${src_test}" />
+				<source-path path-element="${src_locale}" />
+				<source-path path-element="${testClassPath}" />
+				<source-path path-element="${resourceBundles}" />
+				<source-path path-element="${flexUnitSrc}" />
+
+				<!-- core flex libraries -->
+				<compiler.library-path dir="${flexcover.sdk}/frameworks" append="true">
+					<include name="libs" />
+				</compiler.library-path>
+				<compiler.library-path dir="${flexcover.sdk}/frameworks/locale" append="true">
+					<include name="${LOCALE}" />
+				</compiler.library-path>
+
+				<!-- air libraries (why need to declare separate)? -->
+				<compiler.library-path dir="${flexcover.sdk}/frameworks" append="true">
+					<include name="libs/air" />
+				</compiler.library-path>
+
+				<!-- local libraries -->
+				<compiler.library-path dir="." append="true">
+					<include name="libs" />
+					<include name="${ant.lib}" />
+				</compiler.library-path>
+			</mxmlc>
+		</sequential>
+	</macrodef>
+
+
+	<!-- compile the unit tests -->
+	<target name="compileTest" description="compile the the test suite">
+		<compile srcFile="${src}/${testAppMXML}" outputFile="${build}/${testSWF}" />
+		<generateAppXML srcFile="${src}/${testAppXML}" destFile="${build}/${testAppXML}" initialContent="${testSWF}" />
+	</target>
+
+	<!-- create the application XML file -->
+	<macrodef name="generateAppXML">
+		<attribute name="srcFile" />
+		<attribute name="destFile" />
+		<attribute name="initialContent" />
+		<sequential>
+			<copy file="@{srcFile}" tofile="@{destFile}" />
+			<replace file="@{destFile}" token="${initialContentToken}" value="@{initialContent}" />
+			<echo>setting build number to: ${versionNumber}</echo>
+			<replace file="@{destFile}" token="%VERSION%" value="${versionNumber}" />
+		</sequential>
+	</macrodef>
+
+	<!-- Clears out the build directory -->
+	<target name="clean">
+		<echo message="Removing build directory contents" description="removes build related directory contents" />
+	</target>
+	
+	<target name="runTest" description="runs the test harness and coverage tool" depends="clean,compileTest">
+		<parallel timeout="120000">
+			<sequential>
+				<antcall target="launchCodeCoverageApp">
+				</antcall>
+				<sleep seconds="15" />
+				<launchApp appXML="${build}/${testAppXML}" additionalArgs="'${testOutputDir}'" spawn="no" />
+				<airflexunit reportDir="${testOutputDir}" haltonfailure="true" />
+				<echo>finished running tests </echo>
+				<waitfor>
+					<available file="${coverageCVR-path}" />
+				</waitfor>
+				<echo>found coverage CVR </echo>
+				<waitfor>
+					<available file="${coverageReport-path}" />
+				</waitfor>
+				<echo>found coverage report</echo>
+			</sequential>
+		</parallel>
+	</target>
+
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/html-template/index.template.html b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/html-template/index.template.html
new file mode 100644
index 0000000..2146ca8
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+  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.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">	
+    <!-- 
+    Smart developers always View Source. 
+    
+    This application was built using Adobe Flex, an open source framework
+    for building rich Internet applications that get delivered via the
+    Flash Player or to desktops via Adobe AIR. 
+    
+    Learn more about Flex at http://flex.org 
+    // -->
+    <head>
+        <title>${title}</title>         
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<!-- Include CSS to eliminate any default margins/padding and set the height of the html element and 
+		     the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as 
+			 the percentage of the height of its parent container, which has to be set explicitly.  Initially, 
+			 don't display flashContent div so it won't show if JavaScript disabled.
+		-->
+        <style type="text/css" media="screen"> 
+			html, body	{ height:100%; }
+			body { margin:0; padding:0; overflow:auto; text-align:center; 
+			       background-color: ${bgcolor}; }   
+			#flashContent { display:none; }
+        </style>
+		
+		<!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+        <!-- BEGIN Browser History required section ${useBrowserHistory}>
+        <link rel="stylesheet" type="text/css" href="history/history.css" />
+        <script type="text/javascript" src="history/history.js"></script>
+        <!${useBrowserHistory} END Browser History required section -->  
+		    
+        <script type="text/javascript" src="swfobject.js"></script>
+        <script type="text/javascript">
+            <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. --> 
+            var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+            <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+            var xiSwfUrlStr = "${expressInstallSwf}";
+            var flashvars = {};
+            var params = {};
+            params.quality = "high";
+            params.bgcolor = "${bgcolor}";
+            params.allowscriptaccess = "sameDomain";
+            params.allowfullscreen = "true";
+            var attributes = {};
+            attributes.id = "${application}";
+            attributes.name = "${application}";
+            attributes.align = "middle";
+            swfobject.embedSWF(
+                "${swf}.swf", "flashContent", 
+                "${width}", "${height}", 
+                swfVersionStr, xiSwfUrlStr, 
+                flashvars, params, attributes);
+			<!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+			swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+        </script>
+    </head>
+    <body>
+        <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough 
+			 JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+			 when JavaScript is disabled.
+		-->
+        <div id="flashContent">
+        	<p>
+	        	To view this page ensure that Adobe Flash Player version 
+				${version_major}.${version_minor}.${version_revision} or greater is installed. 
+			</p>
+			<script type="text/javascript"> 
+				var pageHost = ((document.location.protocol == "https:") ? "https://" :	"http://"); 
+				document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='" 
+								+ pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" ); 
+			</script> 
+        </div>
+	   	
+       	<noscript>
+            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+                <param name="movie" value="${swf}.swf" />
+                <param name="quality" value="high" />
+                <param name="bgcolor" value="${bgcolor}" />
+                <param name="allowScriptAccess" value="sameDomain" />
+                <param name="allowFullScreen" value="true" />
+                <!--[if !IE]>-->
+                <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+                    <param name="quality" value="high" />
+                    <param name="bgcolor" value="${bgcolor}" />
+                    <param name="allowScriptAccess" value="sameDomain" />
+                    <param name="allowFullScreen" value="true" />
+                <!--<![endif]-->
+                <!--[if gte IE 6]>-->
+                	<p> 
+                		Either scripts and active content are not permitted to run or Adobe Flash Player version
+                		${version_major}.${version_minor}.${version_revision} or greater is not installed.
+                	</p>
+                <!--<![endif]-->
+                    <a href="http://www.adobe.com/go/getflashplayer">
+                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+                    </a>
+                <!--[if !IE]>-->
+                </object>
+                <!--<![endif]-->
+            </object>
+	    </noscript>		
+   </body>
+</html>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/pom.xml b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/pom.xml
new file mode 100644
index 0000000..fab0bd0
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/pom.xml
@@ -0,0 +1,221 @@
+<!--
+
+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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>flex-pmd-flex</artifactId>
+        <groupId>org.apache.flex.pmd</groupId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+	<artifactId>flex-pmd-ruleset-creator</artifactId>
+	<packaging>swf</packaging>
+
+	<name>Adobe Flex PMD Ruleset creator</name>
+	<description>Adobe Flex PMD Ruleset creator</description>
+
+	<dependencies>
+
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>flex-pmd-ruleset</artifactId>
+			<version>${project.parent.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>flex-pmd-flex-lib</artifactId>
+			<version>${project.parent.version}</version>
+			<type>swc</type>
+		</dependency>
+
+		<dependency>
+			<groupId>com.adobe.cairngorm</groupId>
+			<artifactId>cairngorm</artifactId>
+			<version>${cairngorm.version}</version>
+			<type>swc</type>
+		</dependency>
+
+		<!-- flex sdk dependencies -->
+
+		<dependency>
+			<groupId>org.apache.flex</groupId>
+			<artifactId>framework</artifactId>
+			<version>${flex.version}</version>
+			<type>pom</type>
+		</dependency>
+
+		<dependency>
+			<groupId>com.adobe.flash.framework</groupId>
+			<artifactId>playerglobal</artifactId>
+			<version>${flash-player.version}</version>
+			<type>swc</type>
+		</dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>flexunit-theme</artifactId>
+            <version>${project.parent.version}</version>
+            <type>swc</type>
+            <scope>theme</scope>
+        </dependency>
+
+        <dependency>
+			<groupId>com.adobe.cairngorm</groupId>
+			<artifactId>event-source</artifactId>
+			<version>${event-source.version}</version>
+			<type>swc</type>
+			<scope>test</scope>
+		</dependency>
+
+        <dependency>
+            <groupId>org.apache.flex.flexunit</groupId>
+            <artifactId>flexunit-flex</artifactId>
+            <version>${flexunit.version}</version>
+            <type>swc</type>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.adobe.flexunit</groupId>
+            <artifactId>flexunit</artifactId>
+            <version>1.0.0</version>
+            <type>swc</type>
+            <scope>test</scope>
+        </dependency>
+
+	</dependencies>
+
+	<build>
+		<sourceDirectory>src/main/flex</sourceDirectory>
+		<testSourceDirectory>src/test/flex</testSourceDirectory>
+		<resources>
+			<resource>
+				<directory>src/main/resources</directory>
+			</resource>
+		</resources>
+		<testResources>
+			<testResource>
+				<directory>src/test/resources</directory>
+			</testResource>
+		</testResources>
+
+		<plugins>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<version>${maven-dependency-plugin.version}</version>
+				<executions>
+					<execution>
+						<id>unpack-binary-resources</id>
+						<phase>process-sources</phase>
+						<goals>
+							<goal>unpack-dependencies</goal>
+						</goals>
+						<configuration>
+							<includeGroupIds>${project.groupId}</includeGroupIds>
+							<includes>**/*.xml</includes>
+							<outputDirectory>target/rulesets</outputDirectory>
+							<excludeTransitive>true</excludeTransitive>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+
+			<plugin>
+				<groupId>net.flexmojos.oss</groupId>
+				<artifactId>flexmojos-maven-plugin</artifactId>
+				<version>${flex-mojos-plugin.version}</version>
+				<extensions>true</extensions>
+				<configuration>
+					<targetPlayer>${flash-player.version}.0.0</targetPlayer>
+					<defaultSizeWidth>1000</defaultSizeWidth>
+					<defaultSizeHeight>750</defaultSizeHeight>
+				</configuration>
+                <dependencies>
+                    <!-- This handles a bug in maven which causes problems with flex resources -->
+                    <dependency>
+                        <groupId>net.flexmojos.oss</groupId>
+                        <artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
+                        <version>${flex-mojos-plugin.version}</version>
+                    </dependency>
+                    <!-- Without this FM will use the compiler configured in its
+                    master pom, which will result in version conflicts -->
+                    <dependency>
+                        <groupId>org.apache.flex</groupId>
+                        <artifactId>compiler</artifactId>
+                        <version>${flex.version}</version>
+                        <type>pom</type>
+                    </dependency>
+                </dependencies>
+			</plugin>
+
+			<plugin>
+				<groupId>net.flexmojos.oss</groupId>
+				<artifactId>flexmojos-maven-plugin</artifactId>
+				<version>${flex-mojos-plugin.version}</version>
+				<extensions>true</extensions>
+				<executions>
+					<execution>
+						<goals>
+							<goal>wrapper</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<templateURI>folder:html-template</templateURI>
+					<htmlName>${project.artifactId}</htmlName>
+				</configuration>
+                <dependencies>
+                    <!-- This handles a bug in maven which causes problems with flex resources -->
+                    <dependency>
+                        <groupId>net.flexmojos.oss</groupId>
+                        <artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
+                        <version>${flex-mojos-plugin.version}</version>
+                    </dependency>
+                    <!-- Without this FM will use the compiler configured in its
+                    master pom, which will result in version conflicts -->
+                    <dependency>
+                        <groupId>org.apache.flex</groupId>
+                        <artifactId>compiler</artifactId>
+                        <version>${flex.version}</version>
+                        <type>pom</type>
+                    </dependency>
+                </dependencies>
+			</plugin>
+			
+		</plugins>
+	</build>
+
+	<repositories>
+		<repository>
+			<id>flexmojos-repository</id>
+			<url>http://repository.sonatype.org/content/groups/public/</url>
+		</repository>
+	</repositories>
+	<pluginRepositories>
+		<pluginRepository>
+			<id>flexmojos-repository</id>
+			<url>http://repository.sonatype.org/content/groups/public/</url>
+		</pluginRepository>
+	</pluginRepositories>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/Main.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/Main.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/Main.mxml
new file mode 100644
index 0000000..d965b0c
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/Main.mxml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:Application xmlns:control="com.adobe.ac.pmd.control.*"
+   xmlns:local="*"
+   xmlns:mx="http://www.adobe.com/2006/mxml"
+   xmlns:services="com.adobe.ac.pmd.services.*"
+   xmlns:view="com.adobe.ac.pmd.view.*"
+   styleName="flexUnitApplication"
+   horizontalScrollPolicy="off"
+   layout="vertical"
+   minHeight="600"
+   minWidth="850"
+   height="100%"
+   horizontalAlign="center"
+   verticalAlign="top"
+   paddingBottom="10">
+
+   <control:Controller/>
+
+   <services:MyServiceLocator/>
+
+   <mx:Panel width="100%" 
+      styleName="mainPanel"
+       height="100%">
+
+      <mx:HBox width="100%"
+         horizontalGap="0"
+         paddingRight="10"
+         verticalAlign="bottom"
+         >
+
+         <view:Title styleName="panelTitleStyle"
+            text="FlexPMD Ruleset Creator"
+            />
+
+         <view:Title styleName="panelTitleSubStyle"
+            text="powered by Adobe Technical Services"
+            buttonMode="true"
+            click="navigateToURL( new URLRequest( 'http://www.adobe.com/consulting/' ) )"
+            mouseChildren="false"
+            useHandCursor="true"
+            />
+
+         <mx:Spacer width="100%"
+            />
+
+         <view:Title styleName="panelTitleSubStyle"
+            text="v{ Version.BUILD_NUMBER } built on { Version.BUILD_DATE } at { Version.BUILD_TIME}"
+            />
+
+      </mx:HBox>
+
+      <mx:HRule width="100%"
+         styleName="flexUnitHRule"
+         />
+
+      <mx:HBox width="100%"
+         paddingBottom="5"
+         paddingLeft="10"
+          height="100%">
+
+         <view:RuleSetNavigator id="navigator"
+            width="100%"
+            selectedRuleChange="editor.model.selectedRule = event.selectedRule"
+             height="100%"/>
+
+         <mx:VRule
+            styleName="flexUnitHRule"
+             height="100%"/>
+
+		 <mx:VBox
+			 height="100%">
+			 
+	         <view:RuleEditor id="editor"/>
+			 
+			 <mx:Label
+				 text="{ navigator.model.rootRuleset.rulesNb } rule(s) in your current ruleset"
+				 />
+
+		 </mx:VBox>
+
+      </mx:HBox>
+
+      <mx:HRule width="100%"
+         styleName="flexUnitHRule"
+         />
+
+      <mx:HBox width="100%"
+         horizontalAlign="center"
+		 verticalAlign="middle"
+         >
+
+		  <mx:Button label="Import"
+					 icon="@Embed(source='/assets/up.png')"
+					 click="navigator.model.getCustomRuleset()"
+					 height="100%"
+					 />
+		  
+		  <mx:Button label="Export"
+					 icon="@Embed(source='/assets/down.png')"
+					 click="navigator.model.exportRootRuleset()"
+					 height="100%"
+					 />
+
+		  <mx:Button label="Add a regexp based rule"
+					 icon="@Embed(source='/assets/add-48.png')"
+					 click="navigator.openRuleset( navigator.model.addNewRegExpBasedRule() )"
+					 height="100%"
+					  paddingLeft="10"/>
+		  
+      </mx:HBox>
+
+   </mx:Panel>
+
+</mx:Application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/TestRunner-app.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/TestRunner-app.xml b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/TestRunner-app.xml
new file mode 100644
index 0000000..32aa44b
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/TestRunner-app.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<application xmlns="http://ns.adobe.com/air/application/1.5">
+    <id>com.adobe.ac.flex-pmd-ruleset-creator</id>
+    <version>1.0</version>
+    <filename>TestRunner</filename>
+    <name>Flex Unit</name>
+    <description>
+    </description>
+    <copyright>Adobe Systems Co.</copyright>
+    <initialWindow>
+        <title>Flex Unit</title>
+        <content>
+            TestRunner.swf
+        </content>
+        <systemChrome>none</systemChrome>
+        <transparent>true</transparent>
+        <visible>true</visible>
+        <minimizable>true</minimizable>
+        <maximizable>false</maximizable>
+        <resizable>false</resizable>
+        <width>640</width>
+        <height>480</height>
+        <minSize>320 240</minSize>
+        <maxSize>1280 960</maxSize>
+    </initialWindow> 
+    
+</application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/TestViewRunner-app.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/TestViewRunner-app.xml b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/TestViewRunner-app.xml
new file mode 100644
index 0000000..78fa8de
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/TestViewRunner-app.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<application xmlns="http://ns.adobe.com/air/application/1.5">
+    <id>com.adobe.ac.flex-pmd-ruleset-creator</id>
+    <version>1.0</version>
+    <filename>TestViewRunner</filename>
+    <name>Flex Unit</name>
+    <description>
+    </description>
+    <copyright>Adobe Systems Co.</copyright>
+    <initialWindow>
+        <title>Flex Unit</title>
+        <content>
+            TestViewRunner.swf
+        </content>
+        <systemChrome>none</systemChrome>
+        <transparent>true</transparent>
+        <visible>true</visible>
+        <minimizable>true</minimizable>
+        <maximizable>false</maximizable>
+        <resizable>false</resizable>
+        <width>1</width>
+        <height>1</height>
+        <minSize>320 240</minSize>
+        <maxSize>1280 960</maxSize>
+    </initialWindow> 
+    
+</application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/add-10.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/add-10.png b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/add-10.png
new file mode 100644
index 0000000..9c79824
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/add-10.png differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/add-48.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/add-48.png b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/add-48.png
new file mode 100644
index 0000000..045139d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/add-48.png differ


[48/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/main/java/de/bokelberg/flex/parser/AS3Scanner.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/main/java/de/bokelberg/flex/parser/AS3Scanner.java b/FlexPMD/as3-parser/src/main/java/de/bokelberg/flex/parser/AS3Scanner.java
deleted file mode 100644
index cdd185f..0000000
--- a/FlexPMD/as3-parser/src/main/java/de/bokelberg/flex/parser/AS3Scanner.java
+++ /dev/null
@@ -1,898 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.logging.Logger;
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-import com.adobe.ac.utils.StackTraceUtils;
-
-/**
- * convert a actionscript to a stream of tokens
- * 
- * @author rbokel
- * @author xagnetti
- */
-public class AS3Scanner
-{
-   /**
-    * @author xagnetti
-    */
-   public static final class Token
-   {
-      private static Token create( final String textContent,
-                                   final int tokenLine,
-                                   final int tokenColumn )
-      {
-         return new Token( textContent, tokenLine, tokenColumn );
-      }
-
-      private final int     column;
-      private final boolean isNumeric;
-      private final int     line;
-      private final String  text;
-
-      /**
-       * @param textContent
-       * @param tokenLine
-       * @param tokenColumn
-       */
-      protected Token( final String textContent,
-                       final int tokenLine,
-                       final int tokenColumn )
-      {
-         this( textContent, tokenLine, tokenColumn, false );
-      }
-
-      /**
-       * @param textContent
-       * @param tokenLine
-       * @param tokenColumn
-       * @param isNumToSet
-       */
-      protected Token( final String textContent,
-                       final int tokenLine,
-                       final int tokenColumn,
-                       final boolean isNumToSet )
-      {
-         text = textContent;
-         line = tokenLine + 1;
-         column = tokenColumn + 1;
-         isNumeric = isNumToSet;
-      }
-
-      /**
-       * @return
-       */
-      public int getColumn()
-      {
-         return column;
-      }
-
-      /**
-       * @return
-       */
-      public int getLine()
-      {
-         return line;
-      }
-
-      /**
-       * @return
-       */
-      public String getText()
-      {
-         return text;
-      }
-
-      /**
-       * @return
-       */
-      public boolean isNum()
-      {
-         return isNumeric;
-      }
-   }
-
-   private static class XMLVerifier
-   {
-      private static DefaultHandler handler;
-      private static SAXParser      saxParser;
-
-      static
-      {
-         final SAXParserFactory factory = SAXParserFactory.newInstance();
-
-         handler = new DefaultHandler();
-         factory.setNamespaceAware( false );
-
-         try
-         {
-            saxParser = factory.newSAXParser();
-         }
-         catch ( final ParserConfigurationException e )
-         {
-            LOGGER.warning( StackTraceUtils.print( e ) );
-         }
-         catch ( final SAXException e )
-         {
-         }
-      }
-
-      public static boolean verify( final String text )
-      {
-         try
-         {
-            saxParser.parse( new InputSource( new StringReader( text ) ),
-                             handler );
-            return true;
-         }
-         catch ( final SAXException e )
-         {
-            LOGGER.warning( StackTraceUtils.print( e ) );
-            return false;
-         }
-         catch ( final IOException e )
-         {
-            LOGGER.warning( StackTraceUtils.print( e ) );
-            return false;
-         }
-      }
-   }
-
-   private static final String END    = "__END__";
-   private static final Logger LOGGER = Logger.getLogger( AS3Scanner.class.getName() );
-
-   protected static boolean isDecimalChar( final char currentCharacter )
-   {
-      return currentCharacter >= '0'
-            && currentCharacter <= '9';
-   }
-
-   private int      column;
-   private boolean  inVector;
-   private int      line;
-   private String[] lines = null;
-
-   /**
-    * @return
-    */
-   public Token moveToNextToken()
-   {
-      return nextToken();
-   }
-
-   /**
-    * @param linesToBeSet
-    */
-   public void setLines( final String[] linesToBeSet )
-   {
-      lines = linesToBeSet;
-      line = 0;
-      column = -1;
-   }
-
-   boolean isHexChar( final char currentCharacter )
-   {
-      final boolean isNum = currentCharacter >= '0'
-            && currentCharacter <= '9';
-      final boolean isLower = currentCharacter >= 'A'
-            && currentCharacter <= 'Z';
-      final boolean isUpper = currentCharacter >= 'a'
-            && currentCharacter <= 'z';
-
-      return isNum
-            || isLower || isUpper;
-   }
-
-   /**
-    * @return
-    */
-   protected Token nextToken()
-   {
-      char currentCharacter;
-
-      if ( lines != null
-            && line < lines.length )
-      {
-         currentCharacter = nextNonWhitespaceCharacter();
-      }
-      else
-      {
-         return new Token( END, line, column );
-      }
-
-      if ( currentCharacter == '\n' )
-      {
-         return new Token( "\n", line, column );
-      }
-      if ( currentCharacter == '/' )
-      {
-         return scanCommentRegExpOrOperator();
-      }
-      if ( currentCharacter == '"' )
-      {
-         return scanString( currentCharacter );
-      }
-      if ( currentCharacter == '\'' )
-      {
-         return scanString( currentCharacter );
-      }
-      if ( currentCharacter == '<' )
-      {
-         return scanXMLOrOperator( currentCharacter );
-      }
-      if ( currentCharacter >= '0'
-            && currentCharacter <= '9' || currentCharacter == '.' )
-      {
-         return scanNumberOrDots( currentCharacter );
-      }
-      if ( currentCharacter == '{'
-            || currentCharacter == '}' || currentCharacter == '(' || currentCharacter == ')'
-            || currentCharacter == '[' || currentCharacter == ']' || currentCharacter == ';'
-            || currentCharacter == ',' || currentCharacter == '?' || currentCharacter == '~' )
-      {
-         return scanSingleCharacterToken( currentCharacter );
-      }
-      if ( currentCharacter == ':' )
-      {
-         return scanCharacterSequence( currentCharacter,
-                                       new String[]
-                                       { "::" } );
-      }
-      if ( currentCharacter == '*' )
-      {
-         return scanCharacterSequence( currentCharacter,
-                                       new String[]
-                                       {} );
-      }
-      if ( currentCharacter == '+' )
-      {
-         return scanCharacterSequence( currentCharacter,
-                                       new String[]
-                                       { "++",
-                                                   "+=" } );
-      }
-      if ( currentCharacter == '-' )
-      {
-         return scanCharacterSequence( currentCharacter,
-                                       new String[]
-                                       { "--",
-                                                   "-=" } );
-      }
-      if ( currentCharacter == '%' )
-      {
-         return scanCharacterSequence( currentCharacter,
-                                       new String[]
-                                       { "%=" } );
-      }
-      if ( currentCharacter == '&' )
-      {
-         return scanCharacterSequence( currentCharacter,
-                                       new String[]
-                                       { "&&",
-                                                   "&=" } );
-      }
-      if ( currentCharacter == '|' )
-      {
-         return scanCharacterSequence( currentCharacter,
-                                       new String[]
-                                       { "||",
-                                                   "|=" } );
-      }
-      if ( currentCharacter == '^' )
-      {
-         return scanCharacterSequence( currentCharacter,
-                                       new String[]
-                                       { "^=" } );
-      }
-      if ( currentCharacter == '>' )
-      {
-         if ( inVector )
-         {
-            inVector = false;
-         }
-         else
-         {
-            return scanCharacterSequence( currentCharacter,
-                                          new String[]
-                                          { ">>>=",
-                                                      ">>>",
-                                                      ">>=",
-                                                      ">>",
-                                                      ">=" } );
-         }
-      }
-      if ( currentCharacter == '=' )
-      {
-         return scanCharacterSequence( currentCharacter,
-                                       new String[]
-                                       { "===",
-                                                   "==" } );
-      }
-      if ( currentCharacter == '!' )
-      {
-         return scanCharacterSequence( currentCharacter,
-                                       new String[]
-                                       { "!==",
-                                                   "!=" } );
-      }
-
-      return scanWord( currentCharacter );
-   }
-
-   private int computePossibleMatchesMaxLength( final String[] possibleMatches )
-   {
-      int max = 0;
-
-      for ( final String possibleMatch : possibleMatches )
-      {
-         max = Math.max( max,
-                         possibleMatch.length() );
-      }
-      return max;
-   }
-
-   private char getPreviousCharacter()
-   {
-      int currentIndex = -1;
-      char currentChar;
-      do
-      {
-         currentChar = peekChar( currentIndex-- );
-      }
-      while ( currentChar == ' ' );
-      return currentChar;
-   }
-
-   private boolean isIdentifierCharacter( final char currentCharacter )
-   {
-      return currentCharacter >= 'A'
-            && currentCharacter <= 'Z' || currentCharacter >= 'a' && currentCharacter <= 'z'
-            || currentCharacter >= '0' && currentCharacter <= '9' || currentCharacter == '_'
-            || currentCharacter == '$';
-   }
-
-   private boolean isProcessingInstruction( final String text )
-   {
-      return text.startsWith( "<?" );
-   }
-
-   private boolean isValidRegExp( final String pattern )
-   {
-      try
-      {
-         Pattern.compile( pattern );
-      }
-      catch ( final PatternSyntaxException t )
-      {
-         return false;
-      }
-      return true;
-   }
-
-   private boolean isValidXML( final String text )
-   {
-      return XMLVerifier.verify( text );
-   }
-
-   private char nextChar()
-   {
-      final String currentLine = lines[ line ];
-
-      column++;
-      if ( currentLine.length() <= column )
-      {
-         column = -1;
-         line++;
-         return '\n';
-      }
-
-      char currentChar = currentLine.charAt( column );
-
-      while ( currentChar == '\uFEFF' )
-      {
-         column++;
-         currentChar = currentLine.charAt( column );
-      }
-      return currentChar;
-   }
-
-   private char nextNonWhitespaceCharacter()
-   {
-      char result;
-      do
-      {
-         result = nextChar();
-      }
-      while ( result == ' '
-            || result == '\t' );
-      return result;
-   }
-
-   private char peekChar( final int offset )
-   {
-      final String currentLine = lines[ line ];
-      final int index = column
-            + offset;
-      if ( index == -1 )
-      {
-         return '\0';
-      }
-      if ( index >= currentLine.length() )
-      {
-         return '\n';
-      }
-
-      return currentLine.charAt( index );
-   }
-
-   /**
-    * find the longest matching sequence
-    * 
-    * @param currentCharacter
-    * @param possibleMatches
-    * @param maxLength
-    * @return
-    */
-   private Token scanCharacterSequence( final char currentCharacter,
-                                        final String[] possibleMatches )
-   {
-      int peekPos = 1;
-      final StringBuffer buffer = new StringBuffer();
-      final int maxLength = computePossibleMatchesMaxLength( possibleMatches );
-
-      buffer.append( currentCharacter );
-      String found = buffer.toString();
-      while ( peekPos < maxLength )
-      {
-         buffer.append( peekChar( peekPos ) );
-         peekPos++;
-         for ( final String possibleMatche : possibleMatches )
-         {
-            if ( buffer.toString().equals( possibleMatche ) )
-            {
-               found = buffer.toString();
-            }
-         }
-      }
-      final Token result = new Token( found, line, column );
-      skipChars( found.length() - 1 );
-      return result;
-   }
-
-   /**
-    * Something started with a slash This might be a comment, a regexp or a
-    * operator
-    * 
-    * @param currentCharacter
-    * @return
-    */
-   private Token scanCommentRegExpOrOperator()
-   {
-      final char firstCharacter = peekChar( 1 );
-
-      if ( firstCharacter == '/' )
-      {
-         return scanSingleLineComment();
-      }
-      if ( firstCharacter == '*' )
-      {
-         return scanMultiLineComment();
-      }
-
-      Token result;
-
-      if ( getPreviousCharacter() == '='
-            || getPreviousCharacter() == '(' || getPreviousCharacter() == ',' )
-      {
-         result = scanRegExp();
-
-         if ( result != null )
-         {
-            return result;
-         }
-      }
-
-      if ( firstCharacter == '=' )
-      {
-         result = new Token( "/=", line, column );
-         skipChars( 1 );
-         return result;
-      }
-      result = new Token( "/", line, column );
-      return result;
-   }
-
-   /**
-    * c is either a dot or a number
-    * 
-    * @return
-    */
-   private Token scanDecimal( final char currentCharacter )
-   {
-      char currentChar = currentCharacter;
-      final StringBuffer buffer = new StringBuffer();
-      int peekPos = 1;
-
-      while ( isDecimalChar( currentChar ) )
-      {
-         buffer.append( currentChar );
-         currentChar = peekChar( peekPos++ );
-      }
-
-      if ( currentChar == '.' )
-      {
-         buffer.append( currentChar );
-         currentChar = peekChar( peekPos++ );
-
-         while ( isDecimalChar( currentChar ) )
-         {
-            buffer.append( currentChar );
-            currentChar = peekChar( peekPos++ );
-         }
-
-         if ( currentChar == 'E' )
-         {
-            buffer.append( currentChar );
-            currentChar = peekChar( peekPos++ );
-            while ( isDecimalChar( currentChar ) )
-            {
-               buffer.append( currentChar );
-               currentChar = peekChar( peekPos++ );
-            }
-         }
-      }
-      final Token result = new Token( buffer.toString(), line, column, true );
-      skipChars( result.text.length() - 1 );
-      return result;
-   }
-
-   /**
-    * The first dot has been scanned Are the next chars dots as well?
-    * 
-    * @return
-    */
-   private Token scanDots()
-   {
-      final char secondCharacter = peekChar( 1 );
-
-      if ( secondCharacter == '.' )
-      {
-         final char thirdCharacter = peekChar( 2 );
-         final String text = thirdCharacter == '.' ? "..."
-                                                  : "..";
-         final Token result = new Token( text, line, column );
-
-         skipChars( text.length() - 1 );
-
-         return result;
-      }
-      else if ( secondCharacter == '<' )
-      {
-         final Token result = new Token( ".<", line, column );
-
-         skipChars( 1 );
-
-         inVector = true;
-         return result;
-      }
-      return null;
-   }
-
-   /**
-    * we have seen the 0x prefix
-    * 
-    * @return
-    */
-   private Token scanHex()
-   {
-      final StringBuffer buffer = new StringBuffer();
-
-      buffer.append( "0x" );
-      int peekPos = 2;
-      for ( ;; )
-      {
-         final char character = peekChar( peekPos++ );
-
-         if ( !isHexChar( character ) )
-         {
-            break;
-         }
-         buffer.append( character );
-      }
-      final Token result = new Token( buffer.toString(), line, column, true );
-      skipChars( result.text.length() - 1 );
-      return result;
-   }
-
-   /**
-    * the current char is the first slash plus we know, that a * is following
-    * 
-    * @return
-    */
-   private Token scanMultiLineComment()
-   {
-      final StringBuffer buffer = new StringBuffer();
-      char currentCharacter = ' ';
-      char previousCharacter = ' ';
-
-      buffer.append( "/*" );
-      skipChar();
-      do
-      {
-         previousCharacter = currentCharacter;
-         currentCharacter = nextChar();
-         buffer.append( currentCharacter );
-      }
-      while ( currentCharacter != 0
-            && !( currentCharacter == '/' && previousCharacter == '*' ) );
-
-      return new Token( buffer.toString(), line, column );
-   }
-
-   /**
-    * Something started with a number or a dot.
-    * 
-    * @param characterToBeScanned
-    * @return
-    */
-   private Token scanNumberOrDots( final char characterToBeScanned )
-   {
-      if ( characterToBeScanned == '.' )
-      {
-         final Token result = scanDots();
-         if ( result != null )
-         {
-            return result;
-         }
-
-         final char firstCharacter = peekChar( 1 );
-         if ( !isDecimalChar( firstCharacter ) )
-         {
-            return new Token( ".", line, column );
-         }
-      }
-      if ( characterToBeScanned == '0' )
-      {
-         final char firstCharacter = peekChar( 1 );
-         if ( firstCharacter == 'x' )
-         {
-            return scanHex();
-         }
-      }
-      return scanDecimal( characterToBeScanned );
-   }
-
-   private Token scanRegExp()
-   {
-      final Token token = scanUntilDelimiter( '/' );
-      if ( token != null
-            && isValidRegExp( token.text ) )
-      {
-         return token;
-      }
-      return null;
-   }
-
-   private Token scanSingleCharacterToken( final char character )
-   {
-      return new Token( String.valueOf( character ), line, column );
-   }
-
-   /**
-    * the current char is the first slash plus we know, that another slash is
-    * following
-    * 
-    * @return
-    */
-   private Token scanSingleLineComment()
-   {
-      final Token result = new Token( lines[ line ].substring( column ), line, column );
-      skipChars( result.text.length() - 1 );
-      return result;
-   }
-
-   /**
-    * Something started with a quote or double quote consume characters until
-    * the quote/double quote shows up again and is not escaped
-    * 
-    * @param startingCharacter
-    * @return
-    */
-   private Token scanString( final char startingCharacter )
-   {
-      return scanUntilDelimiter( startingCharacter );
-   }
-
-   private Token scanUntilDelimiter( final char delimiter )
-   {
-      return scanUntilDelimiter( delimiter,
-                                 delimiter );
-
-   }
-
-   private Token scanUntilDelimiter( final char start,
-                                     final char delimiter )
-   {
-      final StringBuffer buffer = new StringBuffer();
-      int peekPos = 1;
-      int numberOfBackslashes = 0;
-
-      buffer.append( start );
-
-      for ( ;; )
-      {
-         final char currentCharacter = peekChar( peekPos++ );
-         if ( currentCharacter == '\n' )
-         {
-            return null;
-         }
-         buffer.append( currentCharacter );
-         if ( currentCharacter == delimiter
-               && numberOfBackslashes == 0 )
-         {
-            final Token result = Token.create( buffer.toString(),
-                                               line,
-                                               column );
-            skipChars( buffer.toString().length() - 1 );
-            return result;
-         }
-         numberOfBackslashes = currentCharacter == '\\' ? ( numberOfBackslashes + 1 ) % 2
-                                                       : 0;
-      }
-   }
-
-   private Token scanWord( final char startingCharacter )
-   {
-      char currentChar = startingCharacter;
-      final StringBuffer buffer = new StringBuffer();
-
-      buffer.append( currentChar );
-      int peekPos = 1;
-      for ( ;; )
-      {
-         currentChar = peekChar( peekPos++ );
-         if ( !isIdentifierCharacter( currentChar ) )
-         {
-            break;
-         }
-
-         buffer.append( currentChar );
-      }
-      final Token result = new Token( buffer.toString(), line, column );
-      skipChars( buffer.toString().length() - 1 );
-      return result;
-   }
-
-   /**
-    * Try to parse a XML document
-    * 
-    * @return
-    */
-   private Token scanXML()
-   {
-      final int currentLine = line;
-      final int currentColumn = column;
-      int level = 0;
-      final StringBuffer buffer = new StringBuffer();
-      char currentCharacter = '<';
-
-      for ( ;; )
-      {
-         Token currentToken = null;
-         do
-         {
-            currentToken = scanUntilDelimiter( '<',
-                                               '>' );
-            if ( currentToken == null )
-            {
-               line = currentLine;
-               column = currentColumn;
-               return null;
-            }
-            buffer.append( currentToken.text );
-            if ( isProcessingInstruction( currentToken.text ) )
-            {
-               currentCharacter = nextChar();
-               if ( currentCharacter == '\n' )
-               {
-                  buffer.append( '\n' );
-                  skipChar();
-               }
-               currentToken = null;
-            }
-         }
-         while ( currentToken == null );
-
-         if ( currentToken.text.startsWith( "</" ) )
-         {
-            level--;
-         }
-         else if ( !currentToken.text.endsWith( "/>" )
-               && !currentToken.text.equals( "<>" ) ) // NOT operator in AS2
-         {
-            level++;
-         }
-
-         if ( level <= 0 )
-         {
-            return new Token( buffer.toString(), line, column );
-         }
-
-         for ( ;; )
-         {
-            currentCharacter = nextChar();
-            if ( currentCharacter == '<' )
-            {
-               break;
-            }
-            buffer.append( currentCharacter );
-         }
-      }
-   }
-
-   /**
-    * Something started with a lower sign <
-    * 
-    * @param startingCharacterc
-    * @return
-    */
-   private Token scanXMLOrOperator( final char startingCharacterc )
-   {
-      final Token xmlToken = scanXML();
-
-      if ( xmlToken != null
-            && isValidXML( xmlToken.text ) )
-      {
-         return xmlToken;
-      }
-      return scanCharacterSequence( startingCharacterc,
-                                    new String[]
-                                    { "<<<=",
-                                                "<<<",
-                                                "<<=",
-                                                "<<",
-                                                "<=" } );
-   }
-
-   private void skipChar()
-   {
-      nextChar();
-   }
-
-   private void skipChars( final int count )
-   {
-      int decrementCount = count;
-
-      while ( decrementCount-- > 0 )
-      {
-         nextChar();
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/main/java/de/bokelberg/flex/parser/NestedNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/main/java/de/bokelberg/flex/parser/NestedNode.java b/FlexPMD/as3-parser/src/main/java/de/bokelberg/flex/parser/NestedNode.java
deleted file mode 100644
index 27affb2..0000000
--- a/FlexPMD/as3-parser/src/main/java/de/bokelberg/flex/parser/NestedNode.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.adobe.ac.pmd.parser.IParserNode;
-import com.adobe.ac.pmd.parser.NodeKind;
-
-/**
- * @author xagnetti
- */
-class NestedNode
-{
-   private List< IParserNode > children;
-   private NodeKind            nodeId;
-
-   /**
-    * @param idToBeSet
-    */
-   protected NestedNode( final NodeKind idToBeSet )
-   {
-      nodeId = idToBeSet;
-   }
-
-   /**
-    * @param idToBeSet
-    * @param childToBeSet
-    */
-   protected NestedNode( final NodeKind idToBeSet,
-                         final IParserNode childToBeSet )
-   {
-      this( idToBeSet );
-      addChild( childToBeSet );
-   }
-
-   /**
-    * @return
-    */
-   public final int computeCyclomaticComplexity()
-   {
-      int cyclomaticComplexity = 0;
-
-      if ( is( NodeKind.FOREACH )
-            || is( NodeKind.FORIN ) || is( NodeKind.CASE ) || is( NodeKind.DEFAULT ) )
-      {
-         cyclomaticComplexity++;
-      }
-      else if ( is( NodeKind.IF )
-            || is( NodeKind.WHILE ) || is( NodeKind.FOR ) )
-      {
-         cyclomaticComplexity++;
-         cyclomaticComplexity += getChild( 0 ).countNodeFromType( NodeKind.AND );
-         cyclomaticComplexity += getChild( 0 ).countNodeFromType( NodeKind.OR );
-      }
-
-      if ( numChildren() > 0 )
-      {
-         for ( final IParserNode child : getChildren() )
-         {
-            cyclomaticComplexity += child.computeCyclomaticComplexity();
-         }
-      }
-
-      return cyclomaticComplexity;
-   }
-
-   /**
-    * @param type
-    * @return
-    */
-   public final int countNodeFromType( final NodeKind type )
-   {
-      int count = 0;
-
-      if ( is( type ) )
-      {
-         count++;
-      }
-      if ( numChildren() > 0 )
-      {
-         for ( final IParserNode child : getChildren() )
-         {
-            count += child.countNodeFromType( type );
-         }
-      }
-      return count;
-   }
-
-   /**
-    * @param index
-    * @return
-    */
-   public final IParserNode getChild( final int index )
-   {
-      return getChildren() == null
-            || getChildren().size() <= index ? null
-                                            : getChildren().get( index );
-   }
-
-   /**
-    * @return
-    */
-   public List< IParserNode > getChildren()
-   {
-      return children;
-   }
-
-   /**
-    * @return
-    */
-   public NodeKind getId()
-   {
-      return nodeId;
-   }
-
-   /**
-    * @return
-    */
-   public IParserNode getLastChild()
-   {
-      final IParserNode lastChild = getChild( numChildren() - 1 );
-
-      return lastChild != null
-            && lastChild.numChildren() > 0 ? lastChild.getLastChild()
-                                          : lastChild;
-   }
-
-   /**
-    * @param expectedType
-    * @return
-    */
-   public final boolean is( final NodeKind expectedType ) // NOPMD
-   {
-      return getId().equals( expectedType );
-   }
-
-   /**
-    * @return
-    */
-   public final int numChildren()
-   {
-      return getChildren() == null ? 0
-                                  : getChildren().size();
-   }
-
-   /**
-    * @param child
-    * @return
-    */
-   final IParserNode addChild( final IParserNode child )
-   {
-      if ( child == null )
-      {
-         return child; // skip optional children
-      }
-
-      if ( children == null )
-      {
-         children = new ArrayList< IParserNode >();
-      }
-      children.add( child );
-      return child;
-   }
-
-   /**
-    * @param childId
-    * @param childLine
-    * @param childColumn
-    * @param nephew
-    * @return
-    */
-   final IParserNode addChild( final NodeKind childId,
-                               final int childLine,
-                               final int childColumn,
-                               final IParserNode nephew )
-   {
-      return addChild( Node.create( childId,
-                                    childLine,
-                                    childColumn,
-                                    nephew ) );
-   }
-
-   /**
-    * @param childId
-    * @param childLine
-    * @param childColumn
-    * @param value
-    * @return
-    */
-   final IParserNode addChild( final NodeKind childId,
-                               final int childLine,
-                               final int childColumn,
-                               final String value )
-   {
-      return addChild( Node.create( childId,
-                                    childLine,
-                                    childColumn,
-                                    value ) );
-   }
-
-   /**
-    * @param idToBeSet
-    */
-   final void setId( final NodeKind idToBeSet )
-   {
-      nodeId = idToBeSet;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/main/java/de/bokelberg/flex/parser/Node.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/main/java/de/bokelberg/flex/parser/Node.java b/FlexPMD/as3-parser/src/main/java/de/bokelberg/flex/parser/Node.java
deleted file mode 100644
index a044881..0000000
--- a/FlexPMD/as3-parser/src/main/java/de/bokelberg/flex/parser/Node.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.adobe.ac.pmd.parser.IParserNode;
-import com.adobe.ac.pmd.parser.NodeKind;
-
-/**
- * A single node of the ast
- * 
- * @author rbokel
- */
-final class Node extends NestedNode implements IParserNode
-{
-   protected static Node create( final NodeKind idToBeSet,
-                                 final int lineToBeSet,
-                                 final int columnToBeSet )
-   {
-      return new Node( idToBeSet, lineToBeSet, columnToBeSet );
-   }
-
-   protected static Node create( final NodeKind idToBeSet,
-                                 final int lineToBeSet,
-                                 final int columnToBeSet,
-                                 final IParserNode childToBeSet )
-   {
-      return new Node( idToBeSet, lineToBeSet, columnToBeSet, childToBeSet );
-   }
-
-   protected static Node create( final NodeKind idToBeSet,
-                                 final int lineToBeSet,
-                                 final int columnToBeSet,
-                                 final String valueToBeSet )
-   {
-      return new Node( idToBeSet, lineToBeSet, columnToBeSet, valueToBeSet );
-   }
-
-   private static boolean isNameInArray( final String[] strings,
-                                         final String string )
-   {
-      for ( final String currentName : strings )
-      {
-         if ( currentName.equals( string ) )
-         {
-            return true;
-         }
-      }
-      return false;
-   }
-
-   private final int    column;
-   private final int    line;
-   private final String stringValue;
-
-   private Node( final NodeKind idToBeSet,
-                 final int lineToBeSet,
-                 final int columnToBeSet )
-   {
-      super( idToBeSet );
-
-      line = lineToBeSet;
-      column = columnToBeSet;
-      stringValue = null;
-   }
-
-   private Node( final NodeKind idToBeSet,
-                 final int lineToBeSet,
-                 final int columnToBeSet,
-                 final IParserNode childToBeSet )
-   {
-      super( idToBeSet, childToBeSet );
-
-      line = lineToBeSet;
-      column = columnToBeSet;
-      stringValue = null;
-   }
-
-   private Node( final NodeKind idToBeSet,
-                 final int lineToBeSet,
-                 final int columnToBeSet,
-                 final String valueToBeSet )
-   {
-      super( idToBeSet );
-
-      line = lineToBeSet;
-      column = columnToBeSet;
-      stringValue = valueToBeSet;
-   }
-
-   public List< IParserNode > findPrimaryStatementsFromNameInChildren( final String[] names )
-   {
-      final List< IParserNode > foundNode = new ArrayList< IParserNode >();
-
-      if ( getStringValue() != null
-            && isNameInArray( names,
-                              getStringValue() ) )
-      {
-         foundNode.add( this );
-      }
-      else if ( numChildren() != 0 )
-      {
-         for ( final IParserNode child : getChildren() )
-         {
-            foundNode.addAll( child.findPrimaryStatementsFromNameInChildren( names ) );
-         }
-      }
-      return foundNode;
-   }
-
-   public int getColumn()
-   {
-      return column;
-   }
-
-   public int getLine()
-   {
-      return line;
-   }
-
-   public String getStringValue()
-   {
-      return stringValue;
-   }
-
-   @Override
-   public String toString()
-   {
-      final StringBuffer buffer = new StringBuffer();
-
-      if ( getStringValue() == null )
-      {
-         buffer.append( getId() );
-      }
-      else
-      {
-         buffer.append( getStringValue() );
-      }
-
-      buffer.append( ' ' );
-
-      if ( getChildren() != null )
-      {
-         for ( final IParserNode child : getChildren() )
-         {
-            buffer.append( child.toString() );
-            buffer.append( ' ' );
-         }
-      }
-      return buffer.toString();
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/AbstractAs3ParserTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/AbstractAs3ParserTest.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/AbstractAs3ParserTest.java
deleted file mode 100644
index ff9b895..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/AbstractAs3ParserTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import junit.framework.TestCase;
-
-import org.junit.Before;
-
-import com.adobe.ac.pmd.parser.IParserNode;
-
-public abstract class AbstractAs3ParserTest extends TestCase
-{
-   protected final class ASTToXMLConverter
-   {
-      public String convert( final IParserNode ast )
-      {
-         final StringBuffer result = new StringBuffer();
-         visitNodes( ast,
-                     result,
-                     0 );
-         return result.toString();
-      }
-   }
-
-   private static String escapeEntities( final String stringToEscape )
-   {
-      final StringBuffer buffer = new StringBuffer();
-
-      for ( int i = 0; i < stringToEscape.length(); i++ )
-      {
-         final char currentCharacter = stringToEscape.charAt( i );
-
-         if ( currentCharacter == '<' )
-         {
-            buffer.append( "&lt;" );
-         }
-         else if ( currentCharacter == '>' )
-         {
-            buffer.append( "&gt;" );
-         }
-         else
-         {
-            buffer.append( currentCharacter );
-         }
-      }
-      return buffer.toString();
-   }
-
-   private static void visitNodes( final IParserNode ast,
-                                   final StringBuffer result,
-                                   final int level )
-   {
-      result.append( "<"
-            + ast.getId() + " line=\"" + ast.getLine() + "\">" );
-
-      final int numChildren = ast.numChildren();
-      if ( numChildren > 0 )
-      {
-         for ( int i = 0; i < numChildren; i++ )
-         {
-            visitNodes( ast.getChild( i ),
-                        result,
-                        level + 1 );
-         }
-      }
-      else if ( ast.getStringValue() != null )
-      {
-         result.append( escapeEntities( ast.getStringValue() ) );
-      }
-      result.append( "</"
-            + ast.getId() + ">" );
-   }
-
-   protected AS3Parser  asp;
-   protected AS3Scanner scn;
-
-   @Override
-   @Before
-   public void setUp()
-   {
-      asp = new AS3Parser();
-      scn = asp.getScn();
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/AbstractStatementTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/AbstractStatementTest.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/AbstractStatementTest.java
deleted file mode 100644
index b437833..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/AbstractStatementTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public abstract class AbstractStatementTest extends AbstractAs3ParserTest
-{
-   protected void assertStatement( final String message,
-                                   final String input,
-                                   final String expected ) throws TokenException
-   {
-      scn.setLines( new String[]
-      { input,
-                  "__END__" } );
-      asp.nextToken();
-      final String result = new ASTToXMLConverter().convert( asp.parseStatement() );
-      assertEquals( message,
-                    expected,
-                    result );
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/NestedNodeTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/NestedNodeTest.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/NestedNodeTest.java
deleted file mode 100644
index 7d547ef..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/NestedNodeTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.NodeKind;
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class NestedNodeTest extends AbstractAs3ParserTest
-{
-   private NestedNode function;
-
-   @Override
-   @Before
-   public void setUp()
-   {
-      super.setUp();
-
-      final String code = "public function foo() : void     {"
-            + "while(i>0){" + "while(true){" + "switch(a){" + "case 1:break;default:return;" + "}" + "}"
-            + "}" + "}";
-      final Node classNode = parseClass( code );
-
-      function = ( Node ) classNode.getChild( 0 );
-   }
-
-   @Test
-   public void testComputeCyclomaticComplexity()
-   {
-      assertEquals( 5,
-                    function.computeCyclomaticComplexity() );
-   }
-
-   @Test
-   public void testCountNodeFromType()
-   {
-      assertEquals( 2,
-                    function.countNodeFromType( NodeKind.WHILE ) );
-   }
-
-   @Test
-   public void testGetLastChild()
-   {
-      assertEquals( NodeKind.RETURN,
-                    function.getLastChild().getId() );
-
-      assertNull( function.getChild( Integer.MAX_VALUE ) );
-   }
-
-   @Test
-   public void testIs()
-   {
-      assertFalse( function.is( null ) );
-   }
-
-   private Node parseClass( final String input )
-   {
-      scn.setLines( new String[]
-      { "{",
-                  input,
-                  "}",
-                  "__END__" } );
-      try
-      {
-         asp.nextToken();
-         asp.nextToken(); // skip {
-         return asp.parseClassContent();
-      }
-      catch ( final TokenException e )
-      {
-         e.printStackTrace();
-      }
-      return null;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/NodeTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/NodeTest.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/NodeTest.java
deleted file mode 100644
index cf7dae1..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/NodeTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class NodeTest extends AbstractAs3ParserTest
-{
-   @Test
-   public void testFindPrimaryStatementsFromNameInChildren() throws TokenException
-   {
-      final Node ast = parseFunction( "function set a( value : int ) : void { trace(\"lala\")}" );
-
-      assertEquals( 2,
-                    ast.findPrimaryStatementsFromNameInChildren( new String[]
-                    { "trace",
-                                "\"lala\"" } ).size() );
-   }
-
-   @Test
-   public void testToString() throws TokenException
-   {
-      final Node ast = parseFunction( "function set a( value : int ) : void { trace(\"lala\")}" );
-
-      assertEquals( "content set mod-list  a  parameter-list parameter name-type-init "
-                          + "value  int     void  block call trace  arguments \"lala\"      ",
-                    ast.toString() );
-   }
-
-   private Node parseFunction( final String input ) throws TokenException
-   {
-      scn.setLines( new String[]
-      { "{",
-                  input,
-                  "}",
-                  "__END__" } );
-      asp.nextToken(); // first call
-      asp.nextToken(); // skip {
-      return asp.parseClassContent();
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3Parser.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3Parser.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3Parser.java
deleted file mode 100644
index 44738f1..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3Parser.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.files.impl.FileUtils;
-import com.adobe.ac.pmd.parser.IParserNode;
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestAS3Parser extends AbstractAs3ParserTest
-{
-   @Test
-   public void testBuildAst() throws IOException,
-                             URISyntaxException,
-                             TokenException
-   {
-      asp.buildAst( getClass().getResource( "/examples/unformatted/IContext.as" ).toURI().getPath() );
-      asp.buildAst( getClass().getResource( "/examples/FlexPMD115.as" ).toURI().getPath() );
-      asp.buildAst( getClass().getResource( "/examples/JPEGEncoder.as" ).toURI().getPath() );
-      asp.buildAst( getClass().getResource( "/examples/JPEGEncoder2.as" ).toURI().getPath() );
-      asp.buildAst( getClass().getResource( "/examples/FisheyeBase.as" ).toURI().getPath() );
-      asp.buildAst( getClass().getResource( "/examples/FlexPMD98.as" ).toURI().getPath() );
-      asp.buildAst( getClass().getResource( "/examples/FlexPMD195.as" ).toURI().getPath() );
-      final String titlePath = getClass().getResource( "/examples/unformatted/Title.as" ).toURI().getPath();
-
-      asp.buildAst( titlePath );
-      asp.buildAst( titlePath,
-                    FileUtils.readLines( new File( titlePath ) ) );
-   }
-
-   @Test
-   public void testBuildAst_AS2() throws IOException,
-                                 URISyntaxException,
-                                 TokenException
-   {
-      asp.buildAst( getClass().getResource( "/examples/toAS2/src/fw/data/request/ResultListener.as" )
-                              .toURI()
-                              .getPath() );
-
-      asp.buildAst( getClass().getResource( "/examples/toAS2/src/epg/StateExit_AS2.as" ).toURI().getPath() );
-   }
-
-   @Test
-   public void testBuildAst2() throws IOException,
-                              TokenException,
-                              URISyntaxException
-   {
-      final IParserNode flexPmd62 = asp.buildAst( getClass().getResource( "/examples/FlexPMD62.as" )
-                                                            .toURI()
-                                                            .getPath() );
-
-      assertEquals( "com.test.testy.ui.components",
-                    flexPmd62.getChild( 0 ).getChild( 0 ).getStringValue() );
-
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3Scanner.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3Scanner.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3Scanner.java
deleted file mode 100644
index 240b354..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3Scanner.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import de.bokelberg.flex.parser.AS3Scanner.Token;
-
-public class TestAS3Scanner extends AbstractAs3ParserTest
-{
-   @Test
-   public void testAssignments()
-   {
-      final String[] lines = new String[]
-      { "=",
-                  "+=",
-                  "-=",
-                  "%=",
-                  "^=",
-                  "&=",
-                  "|=",
-                  "/=" };
-      scn.setLines( lines );
-
-      for ( int i = 0; i < lines.length; i++ )
-      {
-         assertText( Integer.toString( i ),
-                     lines[ i ] );
-         assertText( "\n" );
-      }
-   }
-
-   @Test
-   public void testBooleanOperators()
-   {
-      final String[] lines = new String[]
-      { "&&",
-                  "&=",
-                  "||",
-                  "|=" };
-      scn.setLines( lines );
-
-      for ( int i = 0; i < lines.length; i++ )
-      {
-         assertText( Integer.toString( i ),
-                     lines[ i ] );
-         assertText( "\n" );
-      }
-   }
-
-   @Test
-   public void testComparisonOperators()
-   {
-      final String[] lines = new String[]
-      { ">",
-                  ">>>=",
-                  ">>>",
-                  ">>=",
-                  ">>",
-                  ">=",
-                  "===",
-                  "==",
-                  "!==",
-                  "!=" };
-      scn.setLines( lines );
-
-      for ( int i = 0; i < lines.length; i++ )
-      {
-         assertText( Integer.toString( i ),
-                     lines[ i ] );
-         assertText( "\n" );
-      }
-   }
-
-   @Test
-   public void testIdentifiers()
-   {
-      final String[] lines = new String[]
-      { "a",
-                  "a.b.*",
-                  "a.b::c",
-                  "a.E" };
-      scn.setLines( lines );
-
-      assertText( "1",
-                  lines[ 0 ] );
-      assertText( "\n" );
-
-      assertText( "2",
-                  "a" );
-      assertText( "2",
-                  "." );
-      assertText( "2",
-                  "b" );
-      assertText( "2",
-                  "." );
-      assertText( "2",
-                  "*" );
-      assertText( "\n" );
-
-      assertText( "3",
-                  "a" );
-      assertText( "3",
-                  "." );
-      assertText( "3",
-                  "b" );
-      assertText( "3",
-                  "::" );
-      assertText( "3",
-                  "c" );
-      assertText( "\n" );
-
-      assertText( "4",
-                  "a" );
-      assertText( "4",
-                  "." );
-      assertText( "4",
-                  "E" );
-   }
-
-   @Test
-   public void testIsDecimalChar()
-   {
-      final String decimalString = "0123456789";
-      for ( int i = 0; i < decimalString.length(); i++ )
-      {
-         assertTrue( "",
-                     AS3Scanner.isDecimalChar( decimalString.charAt( i ) ) );
-      }
-      assertFalse( "",
-                   AS3Scanner.isDecimalChar( ( char ) 0 ) );
-
-   }
-
-   @Test
-   public void testIsHex()
-   {
-      assertTrue( "",
-                  scn.isHexChar( '0' ) );
-      assertTrue( "",
-                  scn.isHexChar( '9' ) );
-      assertTrue( "",
-                  scn.isHexChar( 'A' ) );
-      assertTrue( "",
-                  scn.isHexChar( 'a' ) );
-      assertTrue( "",
-                  scn.isHexChar( 'F' ) );
-      assertTrue( "",
-                  scn.isHexChar( 'f' ) );
-      assertFalse( "",
-                   scn.isHexChar( ';' ) );
-      assertFalse( "",
-                   scn.isHexChar( ']' ) );
-      assertFalse( "",
-                   scn.isHexChar( ' ' ) );
-   }
-
-   @Test
-   public void testMultiLineComment()
-   {
-      final String[] lines = new String[]
-      { "/* this is a multi line comment, not really */",
-                  "/** now for real",
-                  "/* now for real",
-                  "*/" };
-      scn.setLines( lines );
-
-      assertText( lines[ 0 ] );
-      assertText( "\n" );
-      assertText( "/** now for real\n/* now for real\n*/" );
-   }
-
-   @Test
-   public void testMultilineXML()
-   {
-      final String[] lines = new String[]
-      { "<?xml version=\"1.0\"?>",
-                  "<a>",
-                  "<b>test</b>",
-                  "</a>" };
-      scn.setLines( lines );
-      assertText( join( lines,
-                        "\n" ) );
-   }
-
-   @Test
-   public void testMultipleWords()
-   {
-      final String[] lines = new String[]
-      { "word1 word2 word3",
-                  "word4",
-                  "word5 word6" };
-      scn.setLines( lines );
-
-      assertText( "word1" );
-      assertText( "word2" );
-      assertText( "word3" );
-      assertText( "\n" );
-      assertText( "word4" );
-      assertText( "\n" );
-      assertText( "word5" );
-      assertText( "word6" );
-   }
-
-   @Test
-   public void testNumbers()
-   {
-      final String[] lines = new String[]
-      { "0",
-                  "1.2",
-                  "1.2E5",
-                  "0xffgg" };
-      scn.setLines( lines );
-
-      assertText( lines[ 0 ] );
-      assertText( "\n" );
-      assertText( lines[ 1 ] );
-      assertText( "\n" );
-      assertText( lines[ 2 ] );
-      assertText( "\n" );
-      assertText( lines[ 3 ] );
-   }
-
-   @Test
-   public void testPlusSymbols()
-   {
-      final String[] lines = new String[]
-      { "++",
-                  "+=",
-                  "+",
-                  "--",
-                  "-=",
-                  "-" };
-      scn.setLines( lines );
-
-      for ( int i = 0; i < lines.length; i++ )
-      {
-         assertText( Integer.toString( i ),
-                     lines[ i ] );
-         assertText( "\n" );
-      }
-   }
-
-   @Test
-   public void testSingleCharacterSymbols()
-   {
-      final String[] lines = "{}()[]:;,?~".split( "" );
-      scn.setLines( lines );
-
-      // the first entry is empty, so we skip it
-      for ( int i = 1; i < lines.length; i++ )
-      {
-         assertText( "\n" );
-         assertText( Integer.toString( i ),
-                     lines[ i ] );
-      }
-   }
-
-   @Test
-   public void testSingleLineComment()
-   {
-      final String[] lines = new String[]
-      { "//this is a single line comment",
-                  "word //another single line comment" };
-      scn.setLines( lines );
-
-      assertText( lines[ 0 ] );
-      assertText( "\n" );
-      assertText( "word" );
-      assertText( "//another single line comment" );
-   }
-
-   @Test
-   public void testSingleWord()
-   {
-      final String[] lines = new String[]
-      { "word" };
-      scn.setLines( lines );
-
-      assertText( lines[ 0 ] );
-   }
-
-   @Test
-   public void testStrings()
-   {
-      final String[] lines = new String[]
-      { "\"string\"",
-                  "\'string\'",
-                  "\"string\\\"\"" };
-      scn.setLines( lines );
-
-      assertText( "1",
-                  lines[ 0 ] );
-      assertText( "\n" );
-      assertText( "2",
-                  lines[ 1 ] );
-      assertText( "\n" );
-      assertText( "3",
-                  lines[ 2 ] );
-   }
-
-   @Test
-   public void testXML()
-   {
-      final String[] lines = new String[]
-      { "<root/>",
-                  "<root>test</root>",
-                  "<?xml version=\"1.0\"?><root>test</root>" };
-      scn.setLines( lines );
-      for ( int i = 0; i < lines.length; i++ )
-      {
-         assertText( Integer.toString( i ),
-                     lines[ i ] );
-         assertText( "\n" );
-      }
-   }
-
-   private void assertText( final String text )
-   {
-      assertText( "",
-                  text );
-   }
-
-   private void assertText( final String message,
-                            final String text )
-   {
-      Token tokent = null;
-      tokent = scn.nextToken();
-      assertEquals( message,
-                    text,
-                    tokent.getText() );
-   }
-
-   private String join( final String[] lines,
-                        final String delimiter )
-   {
-      final StringBuffer result = new StringBuffer();
-      for ( int i = 0; i < lines.length; i++ )
-      {
-         if ( i > 0 )
-         {
-            result.append( delimiter );
-         }
-         result.append( lines[ i ] );
-      }
-      return result.toString();
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3ScannerWithFiles.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3ScannerWithFiles.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3ScannerWithFiles.java
deleted file mode 100644
index d101579..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestAS3ScannerWithFiles.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.files.impl.FileUtils;
-
-import de.bokelberg.flex.parser.AS3Scanner.Token;
-
-public class TestAS3ScannerWithFiles extends AbstractAs3ParserTest
-{
-   @Test
-   public void testSimple() throws IOException,
-                           URISyntaxException
-   {
-      final String[] expected = new String[]
-      { "package",
-                  "simple",
-                  "{",
-                  "public",
-                  "class",
-                  "Simple",
-                  "{",
-                  "public",
-                  "function",
-                  "Simple",
-                  "(",
-                  ")",
-                  "{",
-                  "trace",
-                  "(",
-                  "\"Simple\"",
-                  ")",
-                  ";",
-                  "}",
-                  "}" };
-      assertFile( expected,
-                  "Simple.as" );
-   }
-
-   private void assertFile( final String[] expected,
-                            final String fileName ) throws IOException,
-                                                   URISyntaxException
-   {
-      final String[] lines = FileUtils.readLines( new File( getClass().getResource( "/examples/unformatted/" )
-                                                                       .toURI()
-                                                                       .getPath()
-            + fileName ) );
-      assertLines( expected,
-                   lines );
-   }
-
-   private void assertLines( final String[] expected,
-                             final String[] lines )
-   {
-      scn.setLines( lines );
-      for ( int i = 0; i < expected.length; i++ )
-      {
-         assertText( Integer.toString( i ),
-                     expected[ i ] );
-      }
-   }
-
-   private void assertText( final String message,
-                            final String text )
-   {
-      Token token = null;
-      token = scn.nextToken();
-      assertEquals( message,
-                    text,
-                    token.getText() );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestClass.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestClass.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestClass.java
deleted file mode 100644
index 54235ef..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestClass.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestClass extends AbstractAs3ParserTest
-{
-   @Test
-   public void testExtends() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "public class A extends B { } ",
-                            "<content line=\"2\">"
-                                  + "<class line=\"2\">" + "<name line=\"2\">A</name><mod-list line=\"2\">"
-                                  + "<mod line=\"2\">public</mod></mod-list><extends line=\"2\""
-                                  + ">B</extends><content line=\"2\"></content>" + "</class></content>" );
-
-      assertPackageContent( "1",
-                            "public class A extends com.adobe::B { } ",
-                            "<content line=\"2\"><class line=\"2\"><name line=\"2\""
-                                  + ">A</name><mod-list line=\"2\"><mod line=\"2\""
-                                  + ">public</mod></mod-list><extends line=\"2\""
-                                  + ">com.adobe::B</extends><content line=\"2\"></content>"
-                                  + "</class></content>" );
-   }
-
-   @Test
-   public void testFinalClass() throws TokenException
-   {
-      assertPackageContent( "",
-                            "public final class Title{ }",
-                            "<content line=\"2\">"
-                                  + "<class line=\"2\">" + "<name line=\"2\">Title</name>"
-                                  + "<mod-list line=\"2\">" + "<mod line=\"2\">public</mod>"
-                                  + "<mod line=\"2\">final</mod></mod-list>" + "<content line=\"2\""
-                                  + "></content>" + "</class>" + "</content>" );
-   }
-
-   @Test
-   public void testFullFeatured() throws TokenException
-   {
-      // assertPackageContent( "",
-      // "public class A { public static const RULE_REMOVED : String = \"ruleRemoved\";}",
-      // "" );
-
-      assertPackageContent( "1",
-                            "public class A extends B implements C,D { } ",
-                            "<content line=\"2\"><class line=\"2\">"
-                                  + "<name line=\"2\">A</name><mod-list line=\"2\">"
-                                  + "<mod line=\"2\">public</mod></mod-list><extends line=\"2\""
-                                  + ">B</extends><implements-list line=\"2\">"
-                                  + "<implements line=\"2\">C</implements><implements line=\"2\""
-                                  + ">D</implements></implements-list><content line=\"2\">"
-                                  + "</content></class></content>" );
-   }
-
-   @Test
-   public void testImplementsList() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "public class A implements B,C { } ",
-                            "<content line=\"2\"><class line=\"2\">"
-                                  + "<name line=\"2\">A</name><mod-list line=\"2\""
-                                  + "><mod line=\"2\">public</mod></mod-list>"
-                                  + "<implements-list line=\"2\"><implements line=\"2\""
-                                  + ">B</implements><implements line=\"2\">"
-                                  + "C</implements></implements-list><content line=\"2\">"
-                                  + "</content></class></content>" );
-   }
-
-   @Test
-   public void testImplementsSingle() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "public class A implements B { } ",
-                            "<content line=\"2\"><class line=\"2\">"
-                                  + "<name line=\"2\">A</name><mod-list line=\"2\""
-                                  + "><mod line=\"2\">public</mod></mod-list>"
-                                  + "<implements-list line=\"2\"><implements line=\"2\""
-                                  + ">B</implements></implements-list><content line=\"2\""
-                                  + "></content></class></content>" );
-   }
-
-   @Test
-   public void testImportInsideClass() throws TokenException
-   {
-      assertPackageContent( "",
-                            "public final class Title{ import lala.lala; }",
-                            "<content line=\"2\">"
-                                  + "<class line=\"2\"><name line=\"2\">Title</name>"
-                                  + "<mod-list line=\"2\"><mod line=\"2\">public</mod>"
-                                  + "<mod line=\"2\">final</mod></mod-list>"
-                                  + "<content line=\"2\"><import line=\"2\""
-                                  + ">lala.lala</import></content></class></content>" );
-
-   }
-
-   @Test
-   public void testInclude() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "public class A extends B { include \"ITextFieldInterface.asz\" } ",
-                            "<content line=\"2\"><class line=\"2\">"
-                                  + "<name line=\"2\">A</name><mod-list line=\"2\">"
-                                  + "<mod line=\"2\">public</mod></mod-list>"
-                                  + "<extends line=\"2\">B</extends>"
-                                  + "<content line=\"2\"></content></class></content>" );
-   }
-
-   private void assertPackageContent( final String message,
-                                      final String input,
-                                      final String expected ) throws TokenException
-   {
-      scn.setLines( new String[]
-      { "{",
-                  input,
-                  "}",
-                  "__END__" } );
-      asp.nextToken(); // first call
-      asp.nextToken(); // skip {
-      final String result = new ASTToXMLConverter().convert( asp.parsePackageContent() );
-      assertEquals( message,
-                    expected,
-                    result );
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestClassContent.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestClassContent.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestClassContent.java
deleted file mode 100644
index 79b767d..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestClassContent.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestClassContent extends AbstractAs3ParserTest
-{
-   @Test
-   public void testCommentInMethod() throws TokenException
-   {
-      assertClassContent( "",
-                          "public function log():void{/* comment */}",
-                          "<function line=\"2\"><mod-list line=\"2\"><mod "
-                                + "line=\"2\">public</mod></mod-list><name line=\"2\">log</name>"
-                                + "<parameter-list line=\"2\"></parameter-list><type line=\"2\">"
-                                + "void</type><block line=\"2\"><multi-line-comment line=\"2\">"
-                                + "/* comment */</multi-line-comment></block></function>" );
-
-      assertClassContent( "",
-                          new String[]
-                          { "{",
-                                      "public function log():void{// comment ",
-                                      "}",
-                                      "}",
-                                      "__END__" },
-                          "<function line=\"2\"><mod-list line=\"2\"><mod line=\"2\""
-                                + ">public</mod></mod-list><name line=\"2\">log</name>"
-                                + "<parameter-list line=\"2\"></parameter-list><type line=\"2\""
-                                + ">void</type><block line=\"2\"></block></function>" );
-   }
-
-   @Test
-   public void testConstDeclarations() throws TokenException
-   {
-      assertClassContent( "1",
-                          "const a",
-                          "<const-list line=\"2\"><mod-list line=\"2\">"
-                                + "</mod-list><name-type-init line=\"2\"><name line=\"2\">a"
-                                + "</name><type line=\"3\"></type></name-type-init></const-list>" );
-
-      assertClassContent( "2",
-                          "public const a",
-                          "<const-list line=\"2\"><mod-list line=\"2\">"
-                                + "<mod line=\"2\">public</mod></mod-list><name-type-init line=\"2\""
-                                + "><name line=\"2\">a</name><type line=\"3\">"
-                                + "</type></name-type-init></const-list>" );
-
-      assertClassContent( "3",
-                          "public static const a : int = 0",
-                          "<const-list line=\"2\"><mod-list line=\"2\">"
-                                + "<mod line=\"2\">public</mod><mod line=\"2\">"
-                                + "static</mod></mod-list><name-type-init line=\"2\"><name "
-                                + "line=\"2\">a</name><type line=\"2\">int</type>"
-                                + "<init line=\"2\"><primary line=\"2\">0</primary>"
-                                + "</init></name-type-init></const-list>" );
-
-      assertClassContent( "4",
-                          "[Bindable] const a",
-                          "<const-list line=\"2\"><meta-list line=\"2\">"
-                                + "<meta line=\"2\">Bindable</meta></meta-list><mod-list line=\"2\""
-                                + "></mod-list><name-type-init line=\"2\">"
-                                + "<name line=\"2\">a</name><type line=\"3\">"
-                                + "</type></name-type-init></const-list>" );
-   }
-
-   @Test
-   public void testFlexPMD211() throws TokenException
-   {
-      assertClassContent( "",
-                          "private function foo(sf:int):void{"
-                                + "var a:Vector.<String> = new Vector.<String>()}",
-                          "<function line=\"2\"><mod-list line=\"2\"><mod line=\"2\">private</mod>"
-                                + "</mod-list><name line=\"2\">foo</name><parameter-list line=\"2\">"
-                                + "<parameter line=\"2\"><name-type-init line=\"2\"><name line=\"2\">sf</name>"
-                                + "<type line=\"2\">int</type></name-type-init></parameter></parameter-list>"
-                                + "<type line=\"2\">void</type><block line=\"2\"><var-list line=\"2\">"
-                                + "<name-type-init line=\"2\"><name line=\"2\">a</name><vector line=\"2\">"
-                                + "<type line=\"2\">String</type></vector><init line=\"2\"><new line=\"2\">"
-                                + "<primary line=\"2\">Vector</primary><vector line=\"2\"><vector line=\"2\">"
-                                + "<type line=\"2\">String</type></vector></vector><arguments line=\"2\">"
-                                + "</arguments></new></init></name-type-init></var-list></block></function>" );
-      assertClassContent( "",
-                          "private function foo(sf:int):void{"
-                                + "var a:Vector.<String> = new Vector.<String>();}",
-                          "<function line=\"2\"><mod-list line=\"2\"><mod line=\"2\">private</mod></mod-list>"
-                                + "<name line=\"2\">foo</name><parameter-list line=\"2\"><parameter line=\"2\">"
-                                + "<name-type-init line=\"2\"><name line=\"2\">sf</name><type line=\"2\">int</type>"
-                                + "</name-type-init></parameter></parameter-list><type line=\"2\">void</type>"
-                                + "<block line=\"2\"><var-list line=\"2\"><name-type-init line=\"2\">"
-                                + "<name line=\"2\">a</name><vector line=\"2\"><type line=\"2\">String</type>"
-                                + "</vector><init line=\"2\"><new line=\"2\"><primary line=\"2\">Vector</primary>"
-                                + "<vector line=\"2\"><vector line=\"2\"><type line=\"2\">String</type></vector>"
-                                + "</vector><arguments line=\"2\"></arguments></new></init></name-type-init>"
-                                + "</var-list></block></function>" );
-   }
-
-   @Test
-   public void testImports() throws TokenException
-   {
-      assertClassContent( "1",
-                          "import a.b.c;",
-                          "<import line=\"2\">a.b.c</import>" );
-      assertClassContent( "2",
-                          "import a.b.c import x.y.z",
-                          "<import line=\"2\">a.b.c</import>"
-                                + "<import line=\"2\">x.y.z</import>" );
-   }
-
-   @Test
-   public void testMethods() throws TokenException
-   {
-      assertClassContent( "1",
-                          "function a(){}",
-                          "<function line=\"2\"><mod-list line=\"2\">"
-                                + "</mod-list><name line=\"2\">a</name><parameter-list line=\"2\""
-                                + "></parameter-list><type line=\"2\"></type><block "
-                                + "line=\"2\"></block></function>" );
-
-      assertClassContent( "2",
-                          "function set a( value : int ) : void {}",
-                          "<set line=\"2\"><mod-list line=\"2\">"
-                                + "</mod-list><name line=\"2\">a</name>"
-                                + "<parameter-list line=\"2\"><parameter line=\"2\">"
-                                + "<name-type-init line=\"2\"><name line=\"2\">value"
-                                + "</name><type line=\"2\">int</type></name-type-init></parameter>"
-                                + "</parameter-list><type line=\"2\">void</type><block line=\"2\""
-                                + "></block></set>" );
-
-      assertClassContent( "3",
-                          "function get a() : int {}",
-                          "<get line=\"2\"><mod-list line=\"2\">"
-                                + "</mod-list><name line=\"2\">a</name><parameter-list line=\"2\""
-                                + "></parameter-list><type line=\"2\">int"
-                                + "</type><block line=\"2\"></block></get>" );
-
-      assertClassContent( "function with default parameter",
-                          "public function newLine ( height:*='' ):void{}",
-                          "<function line=\"2\"><mod-list line=\"2\"><mod line=\"2\""
-                                + ">public</mod></mod-list><name line=\"2\">newLine"
-                                + "</name><parameter-list line=\"2\"><parameter line=\"2\""
-                                + "><name-type-init line=\"2\"><name line=\"2\""
-                                + ">height</name><type line=\"2\">*</type>"
-                                + "<init line=\"2\"><primary line=\"2\">''"
-                                + "</primary></init></name-type-init></parameter></parameter-list>"
-                                + "<type line=\"2\">void</type><block line=\"2\">" + "</block></function>" );
-   }
-
-   @Test
-   public void testMethodsWithAsDoc() throws TokenException
-   {
-      scn.setLines( new String[]
-      { "{",
-                  "/** AsDoc */public function a(){}",
-                  "}",
-                  "__END__" } );
-      asp.nextToken(); // first call
-      asp.nextToken(); // skip {
-
-      assertEquals( "<content line=\"2\"><function line=\"2\">"
-                          + "<as-doc line=\"2\">/** AsDoc */</as-doc><mod-list "
-                          + "line=\"2\"><mod line=\"2\">public</mod>"
-                          + "</mod-list><name line=\"2\">a</name><parameter-list "
-                          + "line=\"2\"></parameter-list><type line=\"2\">"
-                          + "</type><block line=\"2\"></block></function></content>",
-                    new ASTToXMLConverter().convert( asp.parseClassContent() ) );
-   }
-
-   @Test
-   public void testMethodsWithMultiLineComments() throws TokenException
-   {
-      scn.setLines( new String[]
-      { "{",
-                  "/* Commented */public function a(){}",
-                  "}",
-                  "__END__" } );
-      asp.nextToken(); // first call
-      asp.nextToken(); // skip {
-
-      assertEquals( "<content line=\"2\"><multi-line-comment line=\"2\">"
-                          + "/* Commented */</multi-line-comment><function line=\"2\">"
-                          + "<mod-list line=\"2\"><mod line=\"2\">public"
-                          + "</mod></mod-list><name line=\"2\">a</name><parameter-list "
-                          + "line=\"2\"></parameter-list><type line=\"2\">"
-                          + "</type><block line=\"2\"></block></function></content>",
-                    new ASTToXMLConverter().convert( asp.parseClassContent() ) );
-   }
-
-   @Test
-   public void testMethodWithMetadataComment() throws TokenException
-   {
-      scn.setLines( new String[]
-      { "{",
-                  "/* Comment */ [Bindable] public function a () : void { }",
-                  "}",
-                  "__END__" } );
-      asp.nextToken(); // first call
-      asp.nextToken(); // skip {
-
-      assertEquals( "1",
-                    "<content line=\"2\"><multi-line-comment line=\"2\">"
-                          + "/* Comment */</multi-line-comment><function line=\"2\">"
-                          + "<meta-list line=\"2\"><meta line=\"2\">Bindable"
-                          + "</meta></meta-list><mod-list line=\"2\"><mod line=\"2\""
-                          + ">public</mod></mod-list><name line=\"2\">a</name>"
-                          + "<parameter-list line=\"2\"></parameter-list><type line=\"2\""
-                          + ">void</type><block line=\"2\"></block></function>" + "</content>",
-                    new ASTToXMLConverter().convert( asp.parseClassContent() ) );
-   }
-
-   @Test
-   public void testRestParameter() throws TokenException
-   {
-      assertClassContent( "",
-                          "public function log(message:String, ... rest):void{}",
-                          "<function line=\"2\"><mod-list line=\"2\">"
-                                + "<mod line=\"2\">public</mod></mod-list><name line=\"2\">"
-                                + "log</name><parameter-list line=\"2\">"
-                                + "<parameter line=\"2\"><name-type-init line=\"2\">"
-                                + "<name line=\"2\">message</name><type line=\"2\">String"
-                                + "</type></name-type-init></parameter><parameter line=\"2\">"
-                                + "<rest line=\"2\">rest</rest></parameter></parameter-list>"
-                                + "<type line=\"2\">void</type><block line=\"2\">" + "</block></function>" );
-   }
-
-   @Test
-   public void testVarDeclarations() throws TokenException
-   {
-      assertClassContent( "1",
-                          "var a",
-                          "<var-list line=\"2\"><mod-list line=\"2\">"
-                                + "</mod-list><name-type-init line=\"2\"><name line=\"2\">a"
-                                + "</name><type line=\"3\"></type></name-type-init></var-list>" );
-
-      assertClassContent( "2",
-                          "public var a;",
-                          "<var-list line=\"2\"><mod-list line=\"2\">"
-                                + "<mod line=\"2\">public</mod></mod-list><name-type-init line=\"2\""
-                                + "><name line=\"2\">a</name><type line=\"2\""
-                                + "></type></name-type-init></var-list>" );
-
-      assertClassContent( "3",
-                          "public static var a : int = 0",
-                          "<var-list line=\"2\"><mod-list line=\"2\">"
-                                + "<mod line=\"2\">public</mod><mod line=\"2\">"
-                                + "static</mod></mod-list><name-type-init line=\"2\">"
-                                + "<name line=\"2\">a</name><type line=\"2\">int</type>"
-                                + "<init line=\"2\"><primary line=\"2\">0</primary>"
-                                + "</init></name-type-init></var-list>" );
-
-      assertClassContent( "4",
-                          "[Bindable] var a",
-                          "<var-list line=\"2\"><meta-list line=\"2\">"
-                                + "<meta line=\"2\">Bindable</meta></meta-list>"
-                                + "<mod-list line=\"2\"></mod-list>" + "<name-type-init line=\"2\">"
-                                + "<name line=\"2\">a</name><type line=\"3\">"
-                                + "</type></name-type-init></var-list>" );
-   }
-
-   private void assertClassContent( final String message,
-                                    final String input,
-                                    final String expected ) throws TokenException
-   {
-      scn.setLines( new String[]
-      { "{",
-                  input,
-                  "}",
-                  "__END__" } );
-      asp.nextToken(); // first call
-      asp.nextToken(); // skip {
-      final String result = new ASTToXMLConverter().convert( asp.parseClassContent() );
-      assertEquals( message,
-                    "<content line=\"2\">"
-                          + expected + "</content>",
-                    result );
-   }
-
-   private void assertClassContent( final String message,
-                                    final String[] input,
-                                    final String expected ) throws TokenException
-   {
-      scn.setLines( input );
-      asp.nextToken(); // first call
-      asp.nextToken(); // skip {
-      final String result = new ASTToXMLConverter().convert( asp.parseClassContent() );
-      assertEquals( message,
-                    "<content line=\"2\">"
-                          + expected + "</content>",
-                    result );
-   }
-}


[41/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/test/resources/pmd.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/test/resources/pmd.xml b/FlexPMD/flex-pmd-core/src/test/resources/pmd.xml
deleted file mode 100644
index 6b9ac1d..0000000
--- a/FlexPMD/flex-pmd-core/src/test/resources/pmd.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-  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.
-
--->
-<pmd version="4.2.1" timestamp="Fri Aug 08 08:31:02 PDT 2008">
-   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/AbstractRowData.as">
-      <violation beginline="41" endline="121" begincolumn="7" endcolumn="7" rule="TooManyFunction" ruleset="Basic As3 Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="1">A constructor should not have a return type</violation>
-      <violation beginline="41" endline="118" begincolumn="7" endcolumn="7" rule="TooManyFunction" ruleset="Basic As3 Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="1">A constructor should not have a return type</violation>
-      <violation beginline="29" endline="29" begincolumn="9" endcolumn="29" rule="PackageCase" ruleset="Basic Common Flex Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="3">A package name should be lower case</violation>
-      <violation beginline="44" endline="44" begincolumn="0" endcolumn="44" rule="DeadCode" ruleset="Basic Common Flex Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="3">There are some dead code here.</violation>
-      <violation beginline="49" endline="62" begincolumn="0" endcolumn="9" rule="DeadCode" ruleset="Basic Common Flex Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="3">There are some dead code here.</violation>
-      <violation beginline="98" endline="100" begincolumn="12" endcolumn="10" rule="EmptyIfStmt" ruleset="Basic Common Flex Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="3">No statements in this if statement</violation>
-      <violation beginline="101" endline="101" begincolumn="0" endcolumn="36" rule="DispatchHardCodedEventName" ruleset="Basic Common Flex Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="3">DispatchEvent function must dispatch constant strings</violation>
-      <violation beginline="102" endline="102" begincolumn="0" endcolumn="38" rule="DispatchHardCodedEventName" ruleset="Basic Common Flex Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="3">DispatchEvent function must dispatch constant strings</violation>
-      <violation beginline="97" endline="97" begincolumn="0" endcolumn="57" rule="TooShortVariable" ruleset="Basic Common Flex Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="5">This variable name is too short</violation>
-   </file>
-   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/com/adobe/ac/ncss/BigModel.as">
-      <violation beginline="5" endline="28" begincolumn="7" endcolumn="7" rule="TooManyFunction" ruleset="Basic As3 Rules" package="com.adobe.ac.ncss" class="BigModel.as" externalInfoUrl="" priority="1">A constructor should not have a return type</violation>
-      <violation beginline="8" endline="8" begincolumn="0" endcolumn="22" rule="TooShortVariable" ruleset="Basic Common Flex Rules" package="com.adobe.ac.ncss" class="BigModel.as" externalInfoUrl="" priority="5">This variable name is too short</violation>
-   </file>
-   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/com/adobe/ac/ncss/event/DynamicCustomEvent.as">
-      <violation beginline="3" endline="3" begincolumn="0" endcolumn="43" rule="DynamicClass" ruleset="Basic As3 Rules" package="com.adobe.ac.ncss.event" class="DynamicCustomEvent.as" externalInfoUrl="" priority="1">A class must not be dynamic</violation>
-      <violation beginline="5" endline="5" begincolumn="0" endcolumn="31" rule="PublicVariableInCustomEvent" ruleset="Basic As3 Rules" package="com.adobe.ac.ncss.event" class="DynamicCustomEvent.as" externalInfoUrl="" priority="3">No public variables should be inside a custom event</violation>
-   </file>
-   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/com/adobe/ac/ncss/event/FirstCustomEvent.as">
-      <violation beginline="0" endline="0" begincolumn="0" endcolumn="0" rule="EventMissingCloneFunction" ruleset="Basic As3 Rules" package="com.adobe.ac.ncss.event" class="FirstCustomEvent.as" externalInfoUrl="" priority="1">The clone event must be overiden in a custom event</violation>
-      <violation beginline="5" endline="5" begincolumn="0" endcolumn="31" rule="PublicVariableInCustomEvent" ruleset="Basic As3 Rules" package="com.adobe.ac.ncss.event" class="FirstCustomEvent.as" externalInfoUrl="" priority="3">No public variables should be inside a custom event</violation>
-   </file>
-   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/com/adobe/ac/ncss/mxml/IterationsList.mxml">
-      <violation beginline="18" endline="18" begincolumn="0" endcolumn="72" rule="MoreThanTwoEntryPointsInMxml" ruleset="Basic MXML Rules" package="com.adobe.ac.ncss.mxml" class="IterationsList.mxml" externalInfoUrl="" priority="3">There are more than 2 public variables in this MXML component</violation>
-      <violation beginline="18" endline="18" begincolumn="0" endcolumn="72" rule="MoreThanOneEntryPointInMxml" ruleset="Basic MXML Rules" package="com.adobe.ac.ncss.mxml" class="IterationsList.mxml" externalInfoUrl="" priority="5">There are more than 1 public variable in this MXML component</violation>
-      <violation beginline="20" endline="20" begincolumn="0" endcolumn="86" rule="TooShortVariable" ruleset="Basic Common Flex Rules" package="com.adobe.ac.ncss.mxml" class="IterationsList.mxml" externalInfoUrl="" priority="5">This variable name is too short</violation>
-      <violation beginline="31" endline="31" begincolumn="0" endcolumn="51" rule="TooShortVariable" ruleset="Basic Common Flex Rules" package="com.adobe.ac.ncss.mxml" class="IterationsList.mxml" externalInfoUrl="" priority="5">This variable name is too short</violation>
-   </file>
-   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/com/adobe/ac/ncss/SearchBarEvent.as">
-      <violation beginline="0" endline="0" begincolumn="0" endcolumn="0" rule="EventMissingCloneFunction" ruleset="Basic As3 Rules" package="com.adobe.ac.ncss" class="SearchBarEvent.as" externalInfoUrl="" priority="1">The clone event must be overiden in a custom event</violation>
-   </file>
-   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/com/adobe/ac/ncss/event/SecondCustomEvent.as">
-      <violation beginline="0" endline="0" begincolumn="0" endcolumn="0" rule="EventMissingCloneFunction" ruleset="Basic As3 Rules" package="com.adobe.ac.ncss.event" class="SecondCustomEvent.as" externalInfoUrl="" priority="1">The clone event must be overiden in a custom event</violation>
-   </file>
-   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/com/adobe/ac/ncss/TestResult.as">
-      <violation beginline="61" endline="64" begincolumn="0" endcolumn="11" rule="DeadCode" ruleset="Basic Common Flex Rules" package="com.adobe.ac.ncss" class="TestResult.as" externalInfoUrl="" priority="3">There are some dead code here.</violation>
-   </file>
-   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/com/adobe/ac/ncss/VoidConstructor.as">
-      <violation beginline="6" endline="7" begincolumn="7" endcolumn="10" rule="ConstructorNonEmptyReturnType" ruleset="Basic As3 Rules" package="com.adobe.ac.ncss" class="VoidConstructor.as" externalInfoUrl="" priority="3">A constructor should not have a return type</violation>
-      <violation beginline="8" endline="8" begincolumn="0" endcolumn="22" rule="TooShortVariable" ruleset="Basic Common Flex Rules" package="com.adobe.ac.ncss" class="VoidConstructor.as" externalInfoUrl="" priority="5">This variable name is too short</violation>
-   </file>
-</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/test/resources/pmd.xsd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/test/resources/pmd.xsd b/FlexPMD/flex-pmd-core/src/test/resources/pmd.xsd
deleted file mode 100644
index 92c59a3..0000000
--- a/FlexPMD/flex-pmd-core/src/test/resources/pmd.xsd
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-  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.
-
--->
-<!--W3C Schema generated by XMLSpy v2007 rel. 3 sp1 (http://www.altova.com)-->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
-	<xs:element name="violation">
-		<xs:complexType>
-			<xs:simpleContent>
-				<xs:extension base="xs:string">
-					<xs:attribute name="ruleset" use="required" type="xs:string"/>
-					<xs:attribute name="rule" use="required" type="xs:string"/>
-					<xs:attribute name="priority" use="required" type="xs:int"/>
-					<xs:attribute name="package" use="required" type="xs:string"/>
-					<xs:attribute name="externalInfoUrl" use="required" type="xs:string"/>
-					<xs:attribute name="endline" use="required" type="xs:int"/>
-					<xs:attribute name="endcolumn" use="required" type="xs:int"/>
-					<xs:attribute name="class" use="required" type="xs:string"/>
-					<xs:attribute name="beginline" use="required" type="xs:int"/>
-					<xs:attribute name="begincolumn" use="required" type="xs:int"/>
-				</xs:extension>
-			</xs:simpleContent>
-		</xs:complexType>
-	</xs:element>
-	<xs:element name="pmd">
-		<xs:complexType>
-			<xs:sequence>
-				<xs:element ref="file" maxOccurs="unbounded"/>
-			</xs:sequence>
-			<xs:attribute name="version" use="required" type="xs:string"/>
-			<xs:attribute name="timestamp" use="required" type="xs:string"/>
-		</xs:complexType>
-	</xs:element>
-	<xs:element name="file">
-		<xs:complexType>
-			<xs:sequence>
-				<xs:element ref="violation" maxOccurs="unbounded"/>
-			</xs:sequence>
-			<xs:attribute name="name" use="required" type="xs:string"/>
-		</xs:complexType>
-	</xs:element>
-</xs:schema>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd-ant-task/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd-ant-task/pom.xml b/FlexPMD/flex-pmd-cpd-ant-task/pom.xml
deleted file mode 100644
index 987d68e..0000000
--- a/FlexPMD/flex-pmd-cpd-ant-task/pom.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<!--
-
-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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-cpd-ant-task</artifactId>
-	<name>Adobe Flex CPD Ant task</name>
-	<packaging>jar</packaging>
-
-  <parent>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-java-parent</artifactId>
-	<version>1.3-SNAPSHOT</version>
-	<relativePath>../flex-pmd-java-parent/pom.xml</relativePath>
-  </parent>
-  
-
-	<dependencies>
-
-		<dependency>
-			<groupId>pmd</groupId>
-			<artifactId>pmd</artifactId>
-			<version>${pmd.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<version>${project.parent.version}</version>
-			<artifactId>flex-pmd-cpd</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>org.apache.ant</groupId>
-			<artifactId>ant</artifactId>
-			<version>${ant.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<version>${project.version}</version>
-			<artifactId>flex-pmd-files</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<artifactId>as3-plugin-utils</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<artifactId>as3-parser</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<artifactId>as3-parser-api</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-test-resources</artifactId>
-			<version>${project.parent.version}</version>
-			<classifier>resources</classifier>
-			<type>zip</type>
-			<scope>provided</scope>
-		</dependency>
-
-	</dependencies>
-
-	<build>
-		<testResources>
-			<testResource>
-				<directory>${project.build.directory}/test/generated-resources</directory>
-			</testResource>
-		</testResources>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>unpack-test-resources</id>
-						<phase>generate-resources</phase>
-						<goals>
-							<goal>unpack-dependencies</goal>
-						</goals>
-						<configuration>
-							<includeGroupIds>${project.groupId}</includeGroupIds>
-							<includes>**/*.as,**/*.mxml</includes>
-							<outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
-							<excludeTransitive>true</excludeTransitive>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-			
-			<plugin>
-				<artifactId>maven-antrun-plugin</artifactId>
-				<version>${maven-antrun-plugin.version}</version>
-				<executions>
-					<execution>
-						<id>package-ant-task</id>
-						<phase>install</phase>
-						<configuration>
-							<tasks>
-								<echo message="Building ant-task" />
-								<mkdir dir="${project.build.directory}/release" />
-								<echo message="" />
-								<echo message="Copying Flex PMD dependencies..." />
-								<copy file="${project.build.directory}/${project.build.finalName}.jar" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.flex-pmd-cpd.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.pmd.pmd.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<echo message="Copying Ant dependencies..." />
-								<copy file="${maven.dependency.com.adobe.ac.flex-pmd-files.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.as3-parser.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.as3-parser-api.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.org.apache.ant.ant.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.as3-plugin-utils.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<echo message="Extracting license..." />
-								<copy file="../flex-pmd-parent/src/etc/header.txt" tofile="${project.build.directory}/release/LICENSE.txt" overwrite="true" />
-								<echo message="Compressing zip..." />
-								<zip destfile="${project.build.directory}/${project.build.finalName}.zip" basedir="${project.build.directory}/release" excludes="*.zip" />
-							</tasks>
-						</configuration>
-						<goals>
-							<goal>run</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-			
-		</plugins>
-	</build>
-	
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd-ant-task/src/main/java/com/adobe/ac/cpd/ant/FlexCpdAntTask.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd-ant-task/src/main/java/com/adobe/ac/cpd/ant/FlexCpdAntTask.java b/FlexPMD/flex-pmd-cpd-ant-task/src/main/java/com/adobe/ac/cpd/ant/FlexCpdAntTask.java
deleted file mode 100644
index 1f1a438..0000000
--- a/FlexPMD/flex-pmd-cpd-ant-task/src/main/java/com/adobe/ac/cpd/ant/FlexCpdAntTask.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * 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.cpd.ant;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import net.sourceforge.pmd.cpd.CPD;
-import net.sourceforge.pmd.cpd.FileReporter;
-import net.sourceforge.pmd.cpd.Renderer;
-import net.sourceforge.pmd.cpd.ReportException;
-import net.sourceforge.pmd.cpd.XMLRenderer;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.FileSet;
-
-import com.adobe.ac.cpd.FlexLanguage;
-import com.adobe.ac.cpd.FlexTokenizer;
-import com.adobe.ac.pmd.LoggerUtils;
-
-public class FlexCpdAntTask extends Task
-{
-   private String                encoding          = System.getProperty( "file.encoding" );
-   private final List< FileSet > filesets          = new ArrayList< FileSet >();
-   private int                   minimumTokenCount = FlexTokenizer.DEFAULT_MINIMUM_TOKENS;
-   private File                  outputFile;
-
-   public void addFileset( final FileSet set )
-   {
-      filesets.add( set );
-   }
-
-   @Override
-   public void execute()
-   {
-      try
-      {
-         validateFields();
-         new LoggerUtils().loadConfiguration();
-
-         log( "Starting run, minimumTokenCount is "
-                    + minimumTokenCount,
-              Project.MSG_INFO );
-
-         log( "Tokenizing files",
-              Project.MSG_INFO );
-         final CPD cpd = new CPD( minimumTokenCount, new FlexLanguage() );
-         cpd.setEncoding( encoding );
-         tokenizeFiles( cpd );
-
-         log( "Starting to analyze code",
-              Project.MSG_INFO );
-         final long timeTaken = analyzeCode( cpd );
-         log( "Done analyzing code; that took "
-               + timeTaken + " milliseconds" );
-
-         log( "Generating report",
-              Project.MSG_INFO );
-         report( cpd );
-      }
-      catch ( final IOException ioe )
-      {
-         log( ioe.toString(),
-              Project.MSG_ERR );
-         throw new BuildException( "IOException during task execution", ioe );
-      }
-      catch ( final ReportException re )
-      {
-         log( re.toString(),
-              Project.MSG_ERR );
-         throw new BuildException( "ReportException during task execution", re );
-      }
-   }
-
-   public void setEncoding( final String encodingValue )
-   {
-      encoding = encodingValue;
-   }
-
-   public void setMinimumTokenCount( final int minimumTokenCountToBeSet )
-   {
-      minimumTokenCount = minimumTokenCountToBeSet;
-   }
-
-   public void setOutputFile( final File outputFileToBeSet )
-   {
-      outputFile = outputFileToBeSet;
-   }
-
-   private long analyzeCode( final CPD cpd )
-   {
-      final long start = System.currentTimeMillis();
-      cpd.go();
-      final long stop = System.currentTimeMillis();
-      return stop
-            - start;
-   }
-
-   private File getFile( final DirectoryScanner directoryScanner,
-                         final String includedFile )
-   {
-      final File file = new File( directoryScanner.getBasedir()
-            + System.getProperty( "file.separator" ) + includedFile );
-      log( "Tokenizing "
-                 + file.getAbsolutePath(),
-           Project.MSG_VERBOSE );
-      return file;
-   }
-
-   private void report( final CPD cpd ) throws ReportException
-   {
-      final Renderer renderer = new XMLRenderer( encoding );
-      FileReporter reporter;
-      if ( outputFile == null )
-      {
-         reporter = new FileReporter( encoding );
-      }
-      else if ( outputFile.isAbsolute() )
-      {
-         reporter = new FileReporter( outputFile, encoding );
-      }
-      else
-      {
-         reporter = new FileReporter( new File( getProject().getBaseDir(), outputFile.toString() ), encoding );
-      }
-      reporter.report( renderer.render( cpd.getMatches() ) );
-   }
-
-   private void tokenizeFiles( final CPD cpd ) throws IOException
-   {
-      for ( final FileSet fileSet : filesets )
-      {
-         final DirectoryScanner directoryScanner = fileSet.getDirectoryScanner( getProject() );
-         final String[] includedFiles = directoryScanner.getIncludedFiles();
-         for ( final String includedFile : includedFiles )
-         {
-            cpd.add( getFile( directoryScanner,
-                              includedFile ) );
-         }
-      }
-   }
-
-   private void validateFields()
-   {
-      if ( minimumTokenCount == 0 )
-      {
-         throw new BuildException( "minimumTokenCount is required and must be greater than zero" );
-      }
-      else if ( filesets.isEmpty() )
-      {
-         throw new BuildException( "Must include at least one FileSet" );
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd-ant-task/src/test/java/com/adobe/ac/cpd/ant/FlexCpdAntTaskTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd-ant-task/src/test/java/com/adobe/ac/cpd/ant/FlexCpdAntTaskTest.java b/FlexPMD/flex-pmd-cpd-ant-task/src/test/java/com/adobe/ac/cpd/ant/FlexCpdAntTaskTest.java
deleted file mode 100644
index c4aaf38..0000000
--- a/FlexPMD/flex-pmd-cpd-ant-task/src/test/java/com/adobe/ac/cpd/ant/FlexCpdAntTaskTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.cpd.ant;
-
-import java.io.File;
-
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.types.FileSet;
-import org.junit.Test;
-
-import com.adobe.ac.pmd.FlexPmdTestBase;
-
-public class FlexCpdAntTaskTest extends FlexPmdTestBase
-{
-   @Test
-   public void testExecute()
-   {
-      final FlexCpdAntTask task = new FlexCpdAntTask();
-      final FileSet set = new FileSet();
-      final Project project = new Project();
-
-      set.setDir( getTestDirectory() );
-      task.setProject( project );
-      task.addFileset( set );
-      task.execute();
-   }
-
-   @Test
-   public void testParameter()
-   {
-      final FlexCpdAntTask task = new FlexCpdAntTask();
-      final String encodingValue = "encoding";
-      final String desc = "desc";
-      final int minimumTokenCountToBeSet = 10;
-      final File outputFile = null;
-
-      task.setDescription( desc );
-      task.setEncoding( encodingValue );
-      task.setOutputFile( outputFile );
-      task.setMinimumTokenCount( minimumTokenCountToBeSet );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd-command-line/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd-command-line/pom.xml b/FlexPMD/flex-pmd-cpd-command-line/pom.xml
deleted file mode 100644
index c7d4729..0000000
--- a/FlexPMD/flex-pmd-cpd-command-line/pom.xml
+++ /dev/null
@@ -1,187 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-  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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-cpd-command-line</artifactId>
-	<name>Adobe Flex CPD Command line</name>
-	<description />
-	<packaging>jar</packaging>
-
-  <parent>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-java-parent</artifactId>
-	<version>1.3-SNAPSHOT</version>
-	<relativePath>../flex-pmd-java-parent/pom.xml</relativePath>
-  </parent>
-  
-
-	<properties>
-		<maven.jar.plugin.version>2.2</maven.jar.plugin.version>
-	</properties>
-
-	<dependencies>
-
-
-		<dependency>
-			<groupId>com.martiansoftware</groupId>
-			<artifactId>jsap</artifactId>
-			<version>${jsap.version}</version>
-		</dependency>
-		
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<version>${project.version}</version>
-			<artifactId>flex-pmd-command-line-api</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>pmd</groupId>
-			<artifactId>pmd</artifactId>
-			<version>${pmd.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<version>${project.parent.version}</version>
-			<artifactId>flex-pmd-cpd</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<version>${project.version}</version>
-			<artifactId>flex-pmd-files</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<artifactId>as3-plugin-utils</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<artifactId>as3-parser</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<artifactId>as3-parser-api</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>commons-lang</groupId>
-			<artifactId>commons-lang</artifactId>
-			<version>${commons-lang.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-test-resources</artifactId>
-			<version>${project.parent.version}</version>
-			<classifier>resources</classifier>
-			<type>zip</type>
-			<scope>provided</scope>
-		</dependency>
-
-	</dependencies>
-
-	<build>
-
-		<testResources>
-			<testResource>
-				<directory>${project.build.directory}/test/generated-resources</directory>
-			</testResource>
-		</testResources>
-	
-		<plugins>
-		
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>unpack-test-resources</id>
-						<phase>generate-resources</phase>
-						<goals>
-							<goal>unpack-dependencies</goal>
-						</goals>
-						<configuration>
-							<includeGroupIds>${project.groupId}</includeGroupIds>
-							<includes>**/*.as,**/*.mxml</includes>
-							<outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
-							<excludeTransitive>true</excludeTransitive>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<version>${maven.jar.plugin.version}</version>
-				<configuration>
-					<archive>
-						<manifest>
-							<mainClass>com.adobe.ac.cpd.commandline.FlexCPD</mainClass>
-							<packageName>com.adobe.ac.cpd.commandline</packageName>
-							<addClasspath>true</addClasspath>
-						</manifest>
-					</archive>
-				</configuration>
-			</plugin>
-			<plugin>
-				<artifactId>maven-antrun-plugin</artifactId>
-				<version>${maven-antrun-plugin.version}</version>
-				<executions>
-					<execution>
-						<id>package-ant-task</id>
-						<phase>install</phase>
-						<configuration>
-							<tasks>
-								<echo message="Building ant-task" />
-								<mkdir dir="${project.build.directory}/release" />
-								<echo message="" />
-								<echo message="Copying Flex CPD dependencies..." />
-								<copy file="${project.build.directory}/${project.build.finalName}.jar" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.flex-pmd-command-line-api.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.as3-parser-api.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.as3-parser.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.flex-pmd-cpd.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.flex-pmd-files.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.as3-plugin-utils.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<echo message="Copying Command line dependencies..." />
-								<copy file="${maven.dependency.pmd.pmd.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.commons-lang.commons-lang.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.martiansoftware.jsap.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<echo message="Extracting license..." />
-								<copy file="../flex-pmd-parent/src/etc/header.txt" tofile="${project.build.directory}/release/LICENSE.txt" overwrite="true" />
-								<echo message="Compressing zip..." />
-								<zip destfile="${project.build.directory}/${project.build.finalName}.zip" basedir="${project.build.directory}/release" excludes="*.zip" />
-							</tasks>
-						</configuration>
-						<goals>
-							<goal>run</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/CpdCommandLineOptions.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/CpdCommandLineOptions.java b/FlexPMD/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/CpdCommandLineOptions.java
deleted file mode 100644
index a359eb4..0000000
--- a/FlexPMD/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/CpdCommandLineOptions.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.cpd.commandline;
-
-import com.adobe.ac.pmd.ICommandLineOptions;
-
-public enum CpdCommandLineOptions implements ICommandLineOptions
-{
-   MINIMUM_TOKENS("minimumTokens"), OUTPUT_FILE("outputFile");
-
-   private String name;
-
-   private CpdCommandLineOptions( final String nameToBeSet )
-   {
-      name = nameToBeSet;
-   }
-
-   @Override
-   public String toString()
-   {
-      return name;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/FlexCPD.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/FlexCPD.java b/FlexPMD/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/FlexCPD.java
deleted file mode 100644
index c43042f..0000000
--- a/FlexPMD/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/FlexCPD.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * 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.cpd.commandline;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import net.sourceforge.pmd.PMDException;
-import net.sourceforge.pmd.cpd.CPD;
-import net.sourceforge.pmd.cpd.FileReporter;
-import net.sourceforge.pmd.cpd.Renderer;
-import net.sourceforge.pmd.cpd.ReportException;
-import net.sourceforge.pmd.cpd.XMLRenderer;
-
-import com.adobe.ac.cpd.FlexLanguage;
-import com.adobe.ac.cpd.FlexTokenizer;
-import com.adobe.ac.pmd.CommandLineOptions;
-import com.adobe.ac.pmd.CommandLineUtils;
-import com.adobe.ac.pmd.ICommandLineOptions;
-import com.adobe.ac.pmd.LoggerUtils;
-import com.adobe.ac.pmd.files.IFlexFile;
-import com.adobe.ac.pmd.files.impl.FileUtils;
-import com.martiansoftware.jsap.JSAP;
-import com.martiansoftware.jsap.JSAPException;
-import com.martiansoftware.jsap.JSAPResult;
-
-public final class FlexCPD
-{
-   private static JSAPResult        config;
-   private static final String      ENCODING = System.getProperty( "file.encoding" );
-   private static final Logger      LOGGER   = Logger.getLogger( FlexCPD.class.getName() );
-   private static FlexCpdParameters parameters;
-
-   public static void main( final String[] args ) throws JSAPException,
-                                                 URISyntaxException,
-                                                 IOException,
-                                                 ReportException,
-                                                 PMDException
-   {
-      new LoggerUtils().loadConfiguration();
-      startFlexCPD( args );
-      LOGGER.info( "FlexCPD terminated" );
-      System.exit( 0 ); // NOPMD
-   }
-
-   static boolean areCommandLineOptionsCorrect( final String[] args ) throws JSAPException
-   {
-      final JSAP jsap = new JSAP();
-      config = parseCommandLineArguments( args,
-                                          jsap );
-
-      if ( !config.success() )
-      {
-         LOGGER.log( Level.SEVERE,
-                     "Usage: java "
-                           + FlexCPD.class.getName() + " " + jsap.getUsage() );
-      }
-
-      return config.success();
-   }
-
-   static String getParameterValue( final ICommandLineOptions option )
-   {
-      return config.getString( option.toString() );
-   }
-
-   static boolean startFlexCPD( final String[] args ) throws JSAPException,
-                                                     URISyntaxException,
-                                                     IOException,
-                                                     ReportException,
-                                                     PMDException
-   {
-      if ( areCommandLineOptionsCorrect( args ) )
-      {
-         final String minimumTokens = getParameterValue( CpdCommandLineOptions.MINIMUM_TOKENS );
-         final String source = getParameterValue( CommandLineOptions.SOURCE_DIRECTORY );
-         final File sourceDirectory = source.contains( "," ) ? null
-                                                            : new File( source );
-         final List< File > sourceList = CommandLineUtils.computeSourceList( source );
-         final File outputDirectory = new File( getParameterValue( CpdCommandLineOptions.OUTPUT_FILE ) );
-
-         parameters = new FlexCpdParameters( outputDirectory,
-                                             minimumTokens == null ? FlexTokenizer.DEFAULT_MINIMUM_TOKENS
-                                                                  : Integer.valueOf( minimumTokens ),
-                                             sourceDirectory,
-                                             sourceList );
-         LOGGER.info( "Starting run, minimumTokenCount is "
-               + parameters.getMinimumTokenCount() );
-
-         LOGGER.info( "Tokenizing files" );
-         final CPD cpd = new CPD( parameters.getMinimumTokenCount(), new FlexLanguage() );
-
-         cpd.setEncoding( ENCODING );
-         tokenizeFiles( cpd );
-
-         LOGGER.info( "Starting to analyze code" );
-         final long timeTaken = analyzeCode( cpd );
-         LOGGER.info( "Done analyzing code; that took "
-               + timeTaken + " milliseconds" );
-
-         LOGGER.info( "Generating report" );
-         report( cpd );
-      }
-
-      return config.success();
-   }
-
-   private static long analyzeCode( final CPD cpd )
-   {
-      final long start = System.currentTimeMillis();
-      cpd.go();
-      final long stop = System.currentTimeMillis();
-      return stop
-            - start;
-   }
-
-   private static JSAPResult parseCommandLineArguments( final String[] args,
-                                                        final JSAP jsap ) throws JSAPException
-   {
-      CommandLineUtils.registerParameter( jsap,
-                                          CommandLineOptions.SOURCE_DIRECTORY,
-                                          true );
-      CommandLineUtils.registerParameter( jsap,
-                                          CpdCommandLineOptions.OUTPUT_FILE,
-                                          true );
-      CommandLineUtils.registerParameter( jsap,
-                                          CpdCommandLineOptions.MINIMUM_TOKENS,
-                                          false );
-      CommandLineUtils.registerParameter( jsap,
-                                          CommandLineOptions.EXLUDE_PACKAGE,
-                                          false );
-
-      return jsap.parse( args );
-   }
-
-   private static void report( final CPD cpd ) throws ReportException,
-                                              IOException
-   {
-      if ( !cpd.getMatches().hasNext() )
-      {
-         LOGGER.info( "No duplicates over "
-               + parameters.getMinimumTokenCount() + " tokens found" );
-      }
-      final Renderer renderer = new XMLRenderer( ENCODING );
-
-      if ( !parameters.getOutputFile().exists() )
-      {
-         if ( parameters.getOutputFile().createNewFile() == false )
-         {
-            LOGGER.warning( "Could not create a new output file" );
-         }
-      }
-
-      final FileReporter reporter = new FileReporter( parameters.getOutputFile(), ENCODING );
-      reporter.report( renderer.render( cpd.getMatches() ) );
-   }
-
-   private static void tokenizeFiles( final CPD cpd ) throws IOException,
-                                                     PMDException
-   {
-      final Map< String, IFlexFile > files = FileUtils.computeFilesList( parameters.getSourceDirectory(),
-                                                                         parameters.getSourceList(),
-                                                                         "",
-                                                                         null );
-
-      for ( final Entry< String, IFlexFile > fileEntry : files.entrySet() )
-      {
-         cpd.add( new File( fileEntry.getValue().getFilePath() ) ); // NOPMD
-      }
-   }
-
-   private FlexCPD()
-   {
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/FlexCpdParameters.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/FlexCpdParameters.java b/FlexPMD/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/FlexCpdParameters.java
deleted file mode 100644
index dfdd0b3..0000000
--- a/FlexPMD/flex-pmd-cpd-command-line/src/main/java/com/adobe/ac/cpd/commandline/FlexCpdParameters.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.cpd.commandline;
-
-import java.io.File;
-import java.util.List;
-
-public class FlexCpdParameters
-{
-   private final Integer      minimumTokenCount;
-   private final File         outputFile;
-   private final File         sourceDirectory;
-   private final List< File > sourceList;
-
-   public FlexCpdParameters( final File outputFileToBeSet,
-                             final Integer minimumTokenCountToBeSet,
-                             final File sourceDirectoryToBeSet,
-                             final List< File > sourceListToBeSet )
-   {
-      super();
-      minimumTokenCount = minimumTokenCountToBeSet;
-      outputFile = outputFileToBeSet;
-      sourceDirectory = sourceDirectoryToBeSet;
-      sourceList = sourceListToBeSet;
-   }
-
-   public final Integer getMinimumTokenCount()
-   {
-      return minimumTokenCount;
-   }
-
-   public final File getOutputFile()
-   {
-      return outputFile;
-   }
-
-   public final File getSourceDirectory()
-   {
-      return sourceDirectory;
-   }
-
-   public List< File > getSourceList()
-   {
-      return sourceList;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd-command-line/src/test/java/com/adobe/ac/cpd/commandline/FlexCPDTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd-command-line/src/test/java/com/adobe/ac/cpd/commandline/FlexCPDTest.java b/FlexPMD/flex-pmd-cpd-command-line/src/test/java/com/adobe/ac/cpd/commandline/FlexCPDTest.java
deleted file mode 100644
index 9526b0a..0000000
--- a/FlexPMD/flex-pmd-cpd-command-line/src/test/java/com/adobe/ac/cpd/commandline/FlexCPDTest.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * 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.cpd.commandline;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.URISyntaxException;
-
-import net.sourceforge.pmd.PMDException;
-import net.sourceforge.pmd.cpd.ReportException;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.CommandLineOptions;
-import com.adobe.ac.pmd.FlexPmdTestBase;
-import com.martiansoftware.jsap.JSAPException;
-
-public class FlexCPDTest extends FlexPmdTestBase
-{
-   @Test
-   public void testAreCommandLineOptionsCorrect() throws FileNotFoundException,
-                                                 JSAPException,
-                                                 PMDException,
-                                                 URISyntaxException
-   {
-      assertFalse( FlexCPD.areCommandLineOptionsCorrect( new String[]
-      {} ) );
-
-      assertFalse( FlexCPD.areCommandLineOptionsCorrect( new String[]
-      { "-y",
-                  "sourceDirectory",
-                  "-p",
-                  "outPutDirectory" } ) );
-
-      assertTrue( FlexCPD.areCommandLineOptionsCorrect( new String[]
-      { "-s",
-                  "sourceDirectory",
-                  "-o",
-                  "target",
-                  "-m",
-                  "50" } ) );
-
-      assertTrue( FlexCPD.areCommandLineOptionsCorrect( new String[]
-      { "-s",
-                  "sourceDirectory",
-                  "-o",
-                  "target" } ) );
-   }
-
-   @Test
-   public void testGetCommandLineValue() throws JSAPException
-   {
-      FlexCPD.areCommandLineOptionsCorrect( new String[]
-      { "-s",
-                  "sourceDirectory",
-                  "-o",
-                  "target",
-                  "-m",
-                  "25" } );
-
-      assertEquals( "sourceDirectory",
-                    FlexCPD.getParameterValue( CommandLineOptions.SOURCE_DIRECTORY ) );
-      assertEquals( "target",
-                    FlexCPD.getParameterValue( CpdCommandLineOptions.OUTPUT_FILE ) );
-      assertEquals( "25",
-                    FlexCPD.getParameterValue( CpdCommandLineOptions.MINIMUM_TOKENS ) );
-   }
-
-   @Test
-   public void testStartFlexCPD() throws JSAPException,
-                                 PMDException,
-                                 URISyntaxException,
-                                 IOException,
-                                 ReportException
-   {
-      final String[] args = new String[]
-      { "-s",
-                  getTestDirectory().getAbsolutePath(),
-                  "-o",
-                  new File( "target/cpd.xml" ).getAbsolutePath(),
-                  "--excludePackage",
-                  "cairngorm." };
-
-      FlexCPD.startFlexCPD( args );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd-maven-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd-maven-plugin/pom.xml b/FlexPMD/flex-pmd-cpd-maven-plugin/pom.xml
deleted file mode 100644
index 7249bb3..0000000
--- a/FlexPMD/flex-pmd-cpd-maven-plugin/pom.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-  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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-cpd-maven-plugin</artifactId>
-	<name>Adobe Flex CPD Maven plugin</name>
-	<packaging>maven-plugin</packaging>
-
-  <parent>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-java-parent</artifactId>
-	<version>1.3-SNAPSHOT</version>
-	<relativePath>../flex-pmd-java-parent/pom.xml</relativePath>
-  </parent>
-  
-	<dependencies>
-		<dependency>
-			<groupId>pmd</groupId>
-			<artifactId>pmd</artifactId>
-			<version>${pmd.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>org.apache.maven</groupId>
-			<artifactId>maven-plugin-api</artifactId>
-			<version>${maven-plugin-api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.maven.reporting</groupId>
-			<artifactId>maven-reporting-impl</artifactId>
-			<version>${maven-reporting-impl.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.maven.plugins</groupId>
-			<artifactId>maven-pmd-plugin</artifactId>
-			<version>${maven-pmd-plugin.version}</version>
-			<type>maven-plugin</type>
-		</dependency>
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-core</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-cpd</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-files</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-test-resources</artifactId>
-			<version>${project.parent.version}</version>
-			<classifier>resources</classifier>
-			<type>zip</type>
-			<scope>provided</scope>
-		</dependency>
-
-	</dependencies>
-
-	<build>
-
-		<testResources>
-			<testResource>
-				<directory>${project.build.directory}/test/generated-resources</directory>
-			</testResource>
-		</testResources>
-
-		<plugins>
-
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>unpack-test-resources</id>
-						<phase>generate-resources</phase>
-						<goals>
-							<goal>unpack-dependencies</goal>
-						</goals>
-						<configuration>
-							<includeGroupIds>${project.groupId}</includeGroupIds>
-							<includes>**/*.as,**/*.mxml</includes>
-							<outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
-							<excludeTransitive>true</excludeTransitive>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-
-</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd-maven-plugin/src/main/java/com/adobe/ac/cpd/maven/FlexCpdMojo.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd-maven-plugin/src/main/java/com/adobe/ac/cpd/maven/FlexCpdMojo.java b/FlexPMD/flex-pmd-cpd-maven-plugin/src/main/java/com/adobe/ac/cpd/maven/FlexCpdMojo.java
deleted file mode 100644
index e7481e5..0000000
--- a/FlexPMD/flex-pmd-cpd-maven-plugin/src/main/java/com/adobe/ac/cpd/maven/FlexCpdMojo.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * 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.cpd.maven;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Locale;
-import java.util.Map;
-import java.util.ResourceBundle;
-import java.util.Map.Entry;
-
-import net.sourceforge.pmd.PMDException;
-import net.sourceforge.pmd.cpd.CPD;
-import net.sourceforge.pmd.cpd.FileReporter;
-import net.sourceforge.pmd.cpd.Renderer;
-import net.sourceforge.pmd.cpd.ReportException;
-import net.sourceforge.pmd.cpd.XMLRenderer;
-
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.reporting.AbstractMavenReport;
-import org.apache.maven.reporting.MavenReportException;
-import org.codehaus.doxia.site.renderer.SiteRenderer;
-
-import com.adobe.ac.cpd.FlexLanguage;
-import com.adobe.ac.pmd.LoggerUtils;
-import com.adobe.ac.pmd.files.IFlexFile;
-import com.adobe.ac.pmd.files.impl.FileUtils;
-
-/**
- * @author xagnetti
- * @goal check
- * @phase verify
- */
-public class FlexCpdMojo extends AbstractMavenReport
-{
-   private static final String OUTPUT_NAME = "cpd";
-
-   protected static ResourceBundle getBundle( final Locale locale )
-   {
-      return ResourceBundle.getBundle( "flexPmd",
-                                       locale,
-                                       FlexCpdMojo.class.getClassLoader() ); // NOPMD
-   }
-
-   private final String encoding = System.getProperty( "file.encoding" );
-
-   /**
-    * Location of the file.
-    * 
-    * @parameter expression="25"
-    * @required
-    */
-   private int          minimumTokenCount;
-
-   /**
-    * Location of the file.
-    * 
-    * @parameter expression="${project.build.directory}"
-    * @required
-    */
-   private File         outputDirectory;
-
-   /**
-    * @parameter expression="${project}"
-    * @required
-    * @readonly
-    */
-   private MavenProject project;
-
-   /**
-    * @parameter 
-    *            expression="${component.org.codehaus.doxia.site.renderer.SiteRenderer}"
-    * @required
-    * @readonly
-    */
-   private SiteRenderer siteRenderer;
-
-   /**
-    * Specifies the location of the source files to be used.
-    * 
-    * @parameter expression="${project.build.sourceDirectory}"
-    * @required
-    * @readonly
-    */
-   private File         sourceDirectory;
-
-   public FlexCpdMojo()
-   {
-      super();
-   }
-
-   public FlexCpdMojo( final File outputDirectoryToBeSet,
-                       final File sourceDirectoryToBeSet,
-                       final MavenProject projectToBeSet )
-   {
-      super();
-      outputDirectory = outputDirectoryToBeSet;
-      sourceDirectory = sourceDirectoryToBeSet;
-      project = projectToBeSet;
-      minimumTokenCount = 25;
-   }
-
-   public String getDescription( final Locale locale )
-   {
-      return getBundle( locale ).getString( "report.flexCpd.description" );
-   }
-
-   public final String getName( final Locale locale )
-   {
-      return getBundle( locale ).getString( "report.flexCpd.name" );
-   }
-
-   public final String getOutputName()
-   {
-      return OUTPUT_NAME;
-   }
-
-   void setSiteRenderer( final SiteRenderer site )
-   {
-      siteRenderer = site;
-   }
-
-   @Override
-   protected void executeReport( final Locale locale ) throws MavenReportException
-   {
-      new LoggerUtils().loadConfiguration();
-
-      final CPD cpd = new CPD( minimumTokenCount, new FlexLanguage() );
-
-      try
-      {
-         final Map< String, IFlexFile > files = FileUtils.computeFilesList( sourceDirectory,
-                                                                            null,
-                                                                            "",
-                                                                            null );
-
-         for ( final Entry< String, IFlexFile > fileEntry : files.entrySet() )
-         {
-            cpd.add( new File( fileEntry.getValue().getFilePath() ) ); // NOPMD
-         }
-
-         cpd.go();
-
-         report( cpd );
-      }
-      catch ( final PMDException e )
-      {
-         throw new MavenReportException( "", e );
-      }
-      catch ( final IOException e )
-      {
-         throw new MavenReportException( "", e );
-      }
-      catch ( final ReportException e )
-      {
-         throw new MavenReportException( "", e );
-      }
-   }
-
-   @Override
-   protected String getOutputDirectory()
-   {
-      return outputDirectory.getAbsolutePath();
-   }
-
-   @Override
-   protected MavenProject getProject()
-   {
-      return project;
-   }
-
-   @Override
-   protected SiteRenderer getSiteRenderer()
-   {
-      return siteRenderer;
-   }
-
-   private void report( final CPD cpd ) throws ReportException
-   {
-      final Renderer renderer = new XMLRenderer( encoding );
-      final FileReporter reporter = new FileReporter( new File( outputDirectory.getAbsolutePath(),
-                                                                OUTPUT_NAME
-                                                                      + ".xml" ), encoding );
-      reporter.report( renderer.render( cpd.getMatches() ) );
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd-maven-plugin/src/main/resources/flexPmd.properties
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd-maven-plugin/src/main/resources/flexPmd.properties b/FlexPMD/flex-pmd-cpd-maven-plugin/src/main/resources/flexPmd.properties
deleted file mode 100644
index 238be18..0000000
--- a/FlexPMD/flex-pmd-cpd-maven-plugin/src/main/resources/flexPmd.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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.
-
-report.flexCpd.name=

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd-maven-plugin/src/test/java/com/adobe/ac/cpd/maven/FlexCpdMojoTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd-maven-plugin/src/test/java/com/adobe/ac/cpd/maven/FlexCpdMojoTest.java b/FlexPMD/flex-pmd-cpd-maven-plugin/src/test/java/com/adobe/ac/cpd/maven/FlexCpdMojoTest.java
deleted file mode 100644
index 93d09cb..0000000
--- a/FlexPMD/flex-pmd-cpd-maven-plugin/src/test/java/com/adobe/ac/cpd/maven/FlexCpdMojoTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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.cpd.maven;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-import org.codehaus.doxia.site.renderer.DefaultSiteRenderer;
-import org.junit.Test;
-
-import com.adobe.ac.pmd.FlexPmdTestBase;
-
-public class FlexCpdMojoTest extends FlexPmdTestBase
-{
-   @Test
-   public void testExecute() throws MojoExecutionException,
-                            IOException
-   {
-      final FlexCpdMojo mojo = new FlexCpdMojo( new File( "target" ),
-                                                getTestDirectory(),
-                                                new MavenProjectStub() );
-
-      mojo.setSiteRenderer( new DefaultSiteRenderer() );
-      mojo.execute();
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd/pom.xml b/FlexPMD/flex-pmd-cpd/pom.xml
deleted file mode 100644
index c0ac9ec..0000000
--- a/FlexPMD/flex-pmd-cpd/pom.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<!--
-
-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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-cpd</artifactId>
-	<name>Adobe Flex CPD (Copy and Past Detector)</name>
-
-  <parent>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-java-parent</artifactId>
-	<version>1.3-SNAPSHOT</version>
-	<relativePath>../flex-pmd-java-parent/pom.xml</relativePath>
-  </parent>
-  
-	<dependencies>
-
-		<dependency>
-			<groupId>pmd</groupId>
-			<artifactId>pmd</artifactId>
-			<version>${pmd.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<version>${project.parent.version}</version>
-			<artifactId>as3-parser</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-test-resources</artifactId>
-			<version>${project.parent.version}</version>
-			<classifier>resources</classifier>
-			<type>zip</type>
-			<scope>provided</scope>
-		</dependency>
-
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<version>${project.version}</version>
-			<artifactId>flex-pmd-files</artifactId>
-		</dependency>
-
-	</dependencies>
-
-	<build>
-		<testResources>
-			<testResource>
-				<directory>${project.build.directory}/test/generated-resources</directory>
-			</testResource>
-		</testResources>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>unpack-test-resources</id>
-						<phase>generate-resources</phase>
-						<goals>
-							<goal>unpack-dependencies</goal>
-						</goals>
-						<configuration>
-							<includeGroupIds>${project.groupId}</includeGroupIds>
-							<includes>**/*.as,**/*.mxml</includes>
-							<outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
-							<excludeTransitive>true</excludeTransitive>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-	
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd/src/main/java/com/adobe/ac/cpd/FlexLanguage.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd/src/main/java/com/adobe/ac/cpd/FlexLanguage.java b/FlexPMD/flex-pmd-cpd/src/main/java/com/adobe/ac/cpd/FlexLanguage.java
deleted file mode 100644
index b71ce3f..0000000
--- a/FlexPMD/flex-pmd-cpd/src/main/java/com/adobe/ac/cpd/FlexLanguage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.cpd;
-
-import net.sourceforge.pmd.cpd.AbstractLanguage;
-
-public class FlexLanguage extends AbstractLanguage
-{
-   public FlexLanguage()
-   {
-      super( new FlexTokenizer(), "as", "mxml" );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd/src/main/java/com/adobe/ac/cpd/FlexTokenizer.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd/src/main/java/com/adobe/ac/cpd/FlexTokenizer.java b/FlexPMD/flex-pmd-cpd/src/main/java/com/adobe/ac/cpd/FlexTokenizer.java
deleted file mode 100644
index 252009d..0000000
--- a/FlexPMD/flex-pmd-cpd/src/main/java/com/adobe/ac/cpd/FlexTokenizer.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * 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.cpd;
-
-import java.io.File;
-import java.util.HashSet;
-import java.util.Set;
-
-import net.sourceforge.pmd.cpd.SourceCode;
-import net.sourceforge.pmd.cpd.TokenEntry;
-import net.sourceforge.pmd.cpd.Tokenizer;
-import net.sourceforge.pmd.cpd.Tokens;
-
-import com.adobe.ac.pmd.files.IFlexFile;
-import com.adobe.ac.pmd.files.IMxmlFile;
-import com.adobe.ac.pmd.files.impl.FileUtils;
-import com.adobe.ac.pmd.parser.KeyWords;
-import com.adobe.ac.pmd.parser.Operators;
-
-import de.bokelberg.flex.parser.AS3Parser;
-import de.bokelberg.flex.parser.AS3Scanner;
-import de.bokelberg.flex.parser.AS3Scanner.Token;
-
-public class FlexTokenizer implements Tokenizer
-{
-   public static final int            DEFAULT_MINIMUM_TOKENS = 25;
-   private static final Set< String > IGNORED_TOKENS;
-   private static final Set< String > IGNORING_LINE_TOKENS;
-
-   static
-   {
-      IGNORED_TOKENS = new HashSet< String >();
-      IGNORED_TOKENS.add( Operators.SEMI_COLUMN.toString() );
-      IGNORED_TOKENS.add( Operators.LEFT_CURLY_BRACKET.toString() );
-      IGNORED_TOKENS.add( Operators.RIGHT_CURLY_BRACKET.toString() );
-      IGNORED_TOKENS.add( AS3Parser.NEW_LINE );
-      IGNORING_LINE_TOKENS = new HashSet< String >();
-      IGNORING_LINE_TOKENS.add( KeyWords.IMPORT.toString() );
-      IGNORING_LINE_TOKENS.add( KeyWords.PACKAGE.toString() );
-   }
-
-   private static boolean isTokenIgnored( final String tokenText )
-   {
-      return IGNORED_TOKENS.contains( tokenText )
-            || tokenText.startsWith( AS3Parser.MULTIPLE_LINES_COMMENT )
-            || tokenText.startsWith( AS3Parser.SINGLE_LINE_COMMENT );
-   }
-
-   private static boolean isTokenIgnoringLine( final String tokenText )
-   {
-      return IGNORING_LINE_TOKENS.contains( tokenText );
-   }
-
-   public void tokenize( final SourceCode tokens,
-                         final Tokens tokenEntries )
-   {
-      try
-      {
-         final AS3Scanner scanner = initializeScanner( tokens );
-         Token currentToken = scanner.moveToNextToken();
-         int inImportLine = 0;
-
-         while ( currentToken != null
-               && currentToken.getText().compareTo( KeyWords.EOF.toString() ) != 0 )
-         {
-            final String currentTokenText = currentToken.getText();
-            final int currentTokenLine = currentToken.getLine();
-
-            if ( !isTokenIgnored( currentTokenText ) )
-            {
-               if ( isTokenIgnoringLine( currentTokenText ) )
-               {
-                  inImportLine = currentTokenLine;
-               }
-               else
-               {
-                  if ( inImportLine == 0
-                        || inImportLine != currentTokenLine )
-                  {
-                     inImportLine = 0;
-                     tokenEntries.add( new TokenEntry( currentTokenText, // NOPMD
-                                                       tokens.getFileName(),
-                                                       currentTokenLine ) );
-                  }
-               }
-            }
-            currentToken = scanner.moveToNextToken();
-         }
-      }
-      catch ( final Exception e )
-      {
-      }
-      finally
-      {
-         tokenEntries.add( TokenEntry.getEOF() );
-      }
-   }
-
-   private AS3Scanner initializeScanner( final SourceCode tokens )
-   {
-      final AS3Scanner scanner = new AS3Scanner();
-
-      final IFlexFile flexFile = FileUtils.create( new File( tokens.getFileName() ),
-                                                   new File( "" ) );
-
-      if ( flexFile instanceof IMxmlFile )
-      {
-         final IMxmlFile mxml = ( IMxmlFile ) flexFile;
-
-         scanner.setLines( mxml.getScriptBlock() );
-      }
-      else
-      {
-         scanner.setLines( tokens.getCode().toArray( new String[ tokens.getCode().size() ] ) );
-      }
-      return scanner;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd/src/test/java/com/adobe/ac/cpd/FlexCpdTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd/src/test/java/com/adobe/ac/cpd/FlexCpdTest.java b/FlexPMD/flex-pmd-cpd/src/test/java/com/adobe/ac/cpd/FlexCpdTest.java
deleted file mode 100644
index 09b7a75..0000000
--- a/FlexPMD/flex-pmd-cpd/src/test/java/com/adobe/ac/cpd/FlexCpdTest.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * 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.cpd;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map.Entry;
-
-import net.sourceforge.pmd.cpd.CPD;
-import net.sourceforge.pmd.cpd.Match;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.FlexPmdTestBase;
-import com.adobe.ac.pmd.files.IFlexFile;
-
-public class FlexCpdTest extends FlexPmdTestBase
-{
-   private class ExpectedMatchInformation
-   {
-      private final int lineCount;
-      private final int markCount;
-      private final int tokenCount;
-
-      public ExpectedMatchInformation( final int tokenCountToBeSet,
-                                       final int markCountToBeSet,
-                                       final int lineCountToBeSet )
-      {
-         lineCount = lineCountToBeSet;
-         tokenCount = tokenCountToBeSet;
-         markCount = markCountToBeSet;
-      }
-   }
-   final ExpectedMatchInformation[] EXPECTED = new ExpectedMatchInformation[]
-                                             { new ExpectedMatchInformation( 107, 2, 7 ),
-               new ExpectedMatchInformation( 79, 2, 17 ),
-               new ExpectedMatchInformation( 77, 2, 6 ),
-               new ExpectedMatchInformation( 76, 2, 18 ),
-               new ExpectedMatchInformation( 64, 2, 7 ),
-               new ExpectedMatchInformation( 60, 3, 14 ),
-               new ExpectedMatchInformation( 57, 2, 7 ),
-               new ExpectedMatchInformation( 54, 2, 9 ),
-               new ExpectedMatchInformation( 53, 2, 8 ),
-               new ExpectedMatchInformation( 48, 2, 18 ) };
-
-   @Test
-   public void test119() throws IOException
-   {
-      final CPD cpd = new CPD( 25, new FlexLanguage() );
-
-      cpd.add( new File( "src/test/resources/test/FlexPMD119.mxml" ) );
-      cpd.go();
-
-      final Iterator< Match > matchIterator = cpd.getMatches();
-      final Match match = matchIterator.next();
-
-      assertEquals( "The first mark is not correct",
-                    41,
-                    match.getFirstMark().getBeginLine() );
-      assertEquals( "The second mark is not correct",
-                    81,
-                    match.getSecondMark().getBeginLine() );
-   }
-
-   @Test
-   public void tokenize() throws IOException
-   {
-      final Iterator< Match > matchIterator = getMatchIterator();
-
-      for ( int currentIndex = 0; matchIterator.hasNext()
-            && currentIndex < EXPECTED.length; currentIndex++ )
-      {
-         final Match currentMatch = matchIterator.next();
-
-         assertEquals( "The token count is not correct on the "
-                             + currentIndex + "th index",
-                       EXPECTED[ currentIndex ].tokenCount,
-                       currentMatch.getTokenCount() );
-
-         assertEquals( "The mark count is not correct on the "
-                             + currentIndex + "th index",
-                       EXPECTED[ currentIndex ].markCount,
-                       currentMatch.getMarkCount() );
-
-         assertEquals( "The line count is not correct on the "
-                             + currentIndex + "th index",
-                       EXPECTED[ currentIndex ].lineCount,
-                       currentMatch.getLineCount() );
-      }
-   }
-
-   private Iterator< Match > getMatchIterator() throws IOException
-   {
-      final CPD cpd = new CPD( 25, new FlexLanguage() );
-
-      for ( final Entry< String, IFlexFile > includedFile : getTestFiles().entrySet() )
-      {
-         cpd.add( new File( includedFile.getValue().getFilePath() ) );
-      }
-      cpd.go();
-
-      return cpd.getMatches();
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-cpd/src/test/resources/test/FlexPMD119.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-cpd/src/test/resources/test/FlexPMD119.mxml b/FlexPMD/flex-pmd-cpd/src/test/resources/test/FlexPMD119.mxml
deleted file mode 100644
index 1519ac1..0000000
--- a/FlexPMD/flex-pmd-cpd/src/test/resources/test/FlexPMD119.mxml
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-  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.
-
--->
-<mx:Canvas> 
-	
-	<mx:Script>
-		<![CDATA[
-		
-		// Handle the mouseDown event generated 
-		// by clicking in the application.
-		private function handleMouseDown(event:MouseEvent):void {
-		
-		// Convert the mouse position to global coordinates.
-		// The localX and localY properties of the mouse event contain
-		// the coordinates at which the event occurred relative to the
-		// event target, typically one of the 
-		// colored internal Canvas controls.
-		// A production version of this example could use the stageX 
-		// and stageY properties, which use the global coordinates, 
-		// and avoid this step.
-		// This example uses the localX and localY properties only to
-		// illustrate conversion between different frames of reference.
-		var pt:Point = new Point(event.localX, event.localY);
-		pt = event.target.localToGlobal(pt);
-		
-		// Convert the global coordinates to the content coordinates 
-		// inside the outer c1 Canvas control.
-		pt = c1.globalToContent(pt);
-		
-		// Figure out which quadrant was clicked.
-		var whichColor:String = "border area";
-		
-		if (pt.x < 150) {
-		if (pt.y < 150)
-		whichColor = "red";
-		else
-		whichColor = "blue";
-		}
-		else {
-		if (pt.y < 150)
-		whichColor = "green";
-		else
-		whichColor = "magenta";
-		}
-		
-		Alert.show("You clicked on the " + whichColor);
-		}
-		
-		// Handle the mouseDown event generated 
-		// by clicking in the application.
-		private function handleMouseDown(event:MouseEvent):void {
-		
-		// Convert the mouse position to global coordinates.
-		// The localX and localY properties of the mouse event contain
-		// the coordinates at which the event occurred relative to the
-		// event target, typically one of the 
-		// colored internal Canvas controls.
-		// A production version of this example could use the stageX 
-		// and stageY properties, which use the global coordinates, 
-		// and avoid this step.
-		// This example uses the localX and localY properties only to
-		// illustrate conversion between different frames of reference.
-		var pt:Point = new Point(event.localX, event.localY);
-		pt = event.target.localToGlobal(pt);
-		
-		// Convert the global coordinates to the content coordinates 
-		// inside the outer c1 Canvas control.
-		pt = c1.globalToContent(pt);
-		
-		// Figure out which quadrant was clicked.
-		var whichColor:String = "border area";
-		
-		if (pt.x < 150) {
-		if (pt.y < 150)
-		whichColor = "red";
-		else
-		whichColor = "blue";
-		}
-		else {
-		if (pt.y < 150)
-		whichColor = "green";
-		else
-		whichColor = "magenta";
-		}
-		
-		Alert.show("You clicked on the " + whichColor);
-		}
-		]]>
-	</mx:Script>
-	
-</mx:Canvas>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-files/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-files/pom.xml b/FlexPMD/flex-pmd-files/pom.xml
deleted file mode 100644
index 0ae0148..0000000
--- a/FlexPMD/flex-pmd-files/pom.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<!--
-
-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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>com.adobe.ac</groupId>
-  <artifactId>flex-pmd-files</artifactId>
-  <name>Adobe Flex PMD Files</name>
-
-  <parent>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-java-parent</artifactId>
-	<version>1.3-SNAPSHOT</version>
-	<relativePath>../flex-pmd-java-parent/pom.xml</relativePath>
-  </parent>
-  
-	<dependencies>
-		<dependency>
-			<groupId>commons-lang</groupId>
-			<artifactId>commons-lang</artifactId>
-			<version>${commons-lang.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>as3-plugin-utils</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-test-resources</artifactId>
-			<version>${project.version}</version>
-			<classifier>resources</classifier>
-			<type>zip</type>
-			<scope>test</scope>
-		</dependency>
-	</dependencies>
-
-	<build>
-		<testResources>
-			<testResource>
-				<directory>${project.build.directory}/test/generated-resources</directory>
-			</testResource>
-		</testResources>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>unpack-test-resources</id>
-						<phase>generate-resources</phase>
-						<goals>
-							<goal>unpack-dependencies</goal>
-						</goals>
-						<configuration>
-							<includeGroupIds>${project.groupId}</includeGroupIds>
-							<includes>**/*.as,**/*.mxml</includes>
-							<outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
-							<excludeTransitive>true</excludeTransitive>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-
-</project>
\ No newline at end of file


[15/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/Violation.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/Violation.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/Violation.java
new file mode 100644
index 0000000..14f7a79
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/Violation.java
@@ -0,0 +1,323 @@
+/*
+ * 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.core;
+
+import java.util.Formatter;
+
+import org.apache.commons.lang.StringUtils;
+
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.files.IFlexFile;
+
+/**
+ * @author xagnetti
+ */
+public final class Violation implements IFlexViolation
+{
+   public static final String RULESET_CREATOR_URL = "http://opensource.adobe.com/svn/opensource/"
+                                                        + "flexpmd/bin/flex-pmd-ruleset-creator.html?rule=";
+   private final int          beginColumn;
+   private final int          beginLine;
+   private int                endColumn;
+   private final int          endLine;
+   private final IFlexFile    file;
+   private final IFlexRule    rule;
+   private String             ruleMessage         = "";
+
+   /**
+    * @param position
+    * @param violatedRule
+    * @param violatedFile
+    */
+   public Violation( final ViolationPosition position,
+                     final IFlexRule violatedRule,
+                     final IFlexFile violatedFile )
+   {
+      beginLine = position.getBeginLine();
+      endLine = position.getEndLine();
+      beginColumn = position.getBeginColumn();
+      endColumn = position.getEndColumn();
+      rule = violatedRule;
+      file = violatedFile;
+
+      if ( violatedRule != null )
+      {
+         ruleMessage = violatedRule.getMessage() == null ? ""
+                                                        : violatedRule.getMessage();
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.IFlexViolation#appendToMessage(java.lang.String)
+    */
+   public void appendToMessage( final String messageToAppend )
+   {
+      ruleMessage += messageToAppend;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see java.lang.Comparable#compareTo(java.lang.Object)
+    */
+   public int compareTo( final IFlexViolation otherViolation ) // NO_UCD
+   {
+      int res;
+      final int priorityOrder = getPrioriyOrder( otherViolation );
+
+      if ( priorityOrder == 0 )
+      {
+         res = getLinePriority( otherViolation );
+      }
+      else
+      {
+         res = priorityOrder;
+      }
+      return res;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.IRuleViolation#getBeginColumn()
+    */
+   public int getBeginColumn()
+   {
+      return beginColumn;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.IRuleViolation#getBeginLine()
+    */
+   public int getBeginLine()
+   {
+      return beginLine;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.IRuleViolation#getClassName()
+    */
+   public String getClassName()
+   {
+      return "";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.IRuleViolation#getDescription()
+    */
+   public String getDescription()
+   {
+      return ruleMessage;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.IRuleViolation#getEndColumn()
+    */
+   public int getEndColumn()
+   {
+      return endColumn;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.IRuleViolation#getEndLine()
+    */
+   public int getEndLine()
+   {
+      return endLine;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.IRuleViolation#getFilename()
+    */
+   public String getFilename()
+   {
+      return file.getFullyQualifiedName();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.IRuleViolation#getMethodName()
+    */
+   public String getMethodName()
+   {
+      return "";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.IRuleViolation#getPackageName()
+    */
+   public String getPackageName()
+   {
+      return file.getPackageName();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.IRuleViolation#getRule()
+    */
+   public IFlexRule getRule()
+   {
+      return rule;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.IFlexViolation#getRuleMessage()
+    */
+   public String getRuleMessage()
+   {
+      return ruleMessage.endsWith( "." ) ? ruleMessage.substring( 0,
+                                                                  ruleMessage.length() - 1 )
+                                        : ruleMessage;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.IRuleViolation#getVariableName()
+    */
+   public String getVariableName()
+   {
+      return "";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.IRuleViolation#isSuppressed()
+    */
+   public boolean isSuppressed()
+   {
+      return false;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.IFlexViolation#replacePlaceholderInMessage(java.lang.
+    * String, int)
+    */
+   public void replacePlaceholderInMessage( final String replacement,
+                                            final int index )
+   {
+      ruleMessage = ruleMessage.replace( "{"
+                                               + index + "}",
+                                         replacement );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.IFlexViolation#setEndColumn(int)
+    */
+   public void setEndColumn( final int column )
+   {
+      endColumn = column;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.IFlexViolation#toXmlString(com.adobe.ac.pmd.files.IFlexFile
+    * , java.lang.String)
+    */
+   public String toXmlString( final IFlexFile violatedFile,
+                              final String ruleSetName )
+   {
+      final Formatter formatter = new Formatter();
+
+      if ( rule != null )
+      {
+         final StringBuffer message = new StringBuffer( getRuleMessage() );
+
+         formatter.format( "      <violation beginline=\"%d\" "
+                                 + "endline=\"%d\" begincolumn=\"%d\" " + "endcolumn=\"%d\" rule=\"%s\" "
+                                 + "ruleset=\"%s\" package=\"%s\" " + "class=\"%s\" externalInfoUrl=\"%s\" "
+                                 + "priority=\"%s\">%s</violation>" + getNewLine(),
+                           beginLine,
+                           endLine,
+                           beginColumn,
+                           endColumn,
+                           rule.getRuleName(),
+                           ruleSetName,
+                           violatedFile.getPackageName(),
+                           violatedFile.getClassName(),
+                           RULESET_CREATOR_URL
+                                 + extractShortName( rule.getName() ),
+                           rule.getPriority(),
+                           message );
+      }
+      return formatter.toString();
+   }
+
+   /**
+    * @return
+    */
+   String getNewLine()
+   {
+      return System.getProperty( "line.separator" );
+   }
+
+   private String extractShortName( final String name )
+   {
+      return StringUtils.substringAfterLast( name,
+                                             "." );
+   }
+
+   private int getLinePriority( final IFlexViolation otherViolation )
+   {
+      int res;
+
+      if ( beginLine > otherViolation.getBeginLine() )
+      {
+         res = 1;
+      }
+      else if ( beginLine < otherViolation.getBeginLine() )
+      {
+         res = -1;
+      }
+      else
+      {
+         res = 0;
+      }
+
+      return res;
+   }
+
+   private int getPrioriyOrder( final IFlexViolation otherViolation )
+   {
+      int res;
+
+      if ( rule.getPriority() > otherViolation.getRule().getPriority() )
+      {
+         res = 1;
+      }
+      else if ( rule.getPriority() < otherViolation.getRule().getPriority() )
+      {
+         res = -1;
+      }
+      else
+      {
+         res = 0;
+      }
+
+      return res;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/ViolationPosition.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/ViolationPosition.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/ViolationPosition.java
new file mode 100644
index 0000000..2de73ff
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/ViolationPosition.java
@@ -0,0 +1,106 @@
+/*
+ * 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.core;
+
+/**
+ * @author xagnetti
+ */
+public final class ViolationPosition
+{
+   /**
+    * @param beginLineToBeSet
+    * @param endLineToBeSet
+    * @param beginColumnToBeSet
+    * @param endColumnToBeSet
+    * @return
+    */
+   public static ViolationPosition create( final int beginLineToBeSet,
+                                           final int endLineToBeSet,
+                                           final int beginColumnToBeSet,
+                                           final int endColumnToBeSet )
+   {
+      return new ViolationPosition( beginLineToBeSet, endLineToBeSet, beginColumnToBeSet, endColumnToBeSet );
+   }
+
+   private final int beginColumn;
+   private final int beginLine;
+   private final int endColumn;
+   private final int endLine;
+
+   /**
+    * @param lineToBeSet
+    */
+   public ViolationPosition( final int lineToBeSet )
+   {
+      this( lineToBeSet, lineToBeSet, 0, 0 );
+   }
+
+   /**
+    * @param beginLineToBeSet
+    * @param endLineToBeSet
+    */
+   public ViolationPosition( final int beginLineToBeSet,
+                             final int endLineToBeSet )
+   {
+      this( beginLineToBeSet, endLineToBeSet, 0, 0 );
+   }
+
+   private ViolationPosition( final int beginLineToBeSet,
+                              final int endLineToBeSet,
+                              final int beginColumnToBeSet,
+                              final int endColumnToBeSet )
+   {
+      super();
+
+      beginLine = beginLineToBeSet;
+      beginColumn = beginColumnToBeSet;
+      endLine = endLineToBeSet;
+      endColumn = endColumnToBeSet;
+   }
+
+   /**
+    * @return
+    */
+   public int getBeginColumn()
+   {
+      return beginColumn;
+   }
+
+   /**
+    * @return
+    */
+   public int getBeginLine()
+   {
+      return beginLine;
+   }
+
+   /**
+    * @return
+    */
+   public int getEndColumn()
+   {
+      return endColumn;
+   }
+
+   /**
+    * @return
+    */
+   public int getEndLine()
+   {
+      return endLine;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/ViolationPriority.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/ViolationPriority.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/ViolationPriority.java
new file mode 100644
index 0000000..e39ed03
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/ViolationPriority.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.core;
+
+/**
+ * @author xagnetti
+ */
+public enum ViolationPriority
+{
+   HIGH("1"), LOW("5"), NORMAL("3");
+
+   private String priority;
+
+   /**
+    * @param priorityToBeSet
+    */
+   private ViolationPriority( final String priorityToBeSet )
+   {
+      priority = priorityToBeSet;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see java.lang.Enum#toString()
+    */
+   @Override
+   public String toString()
+   {
+      return priority;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/thresholded/AbstractMaximizedAstFlexRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/thresholded/AbstractMaximizedAstFlexRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/thresholded/AbstractMaximizedAstFlexRule.java
new file mode 100644
index 0000000..c1c89c8
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/thresholded/AbstractMaximizedAstFlexRule.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.core.thresholded;
+
+import java.util.Map;
+
+import net.sourceforge.pmd.PropertyDescriptor;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public abstract class AbstractMaximizedAstFlexRule extends AbstractAstFlexRule implements IThresholdedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getThreshold()
+    */
+   public final int getThreshold()
+   {
+      return getIntProperty( propertyDescriptorFor( getThresholdName() ) );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getThresholdName
+    * ()
+    */
+   public final String getThresholdName()
+   {
+      return MAXIMUM;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.CommonAbstractRule#propertiesByName()
+    */
+   @Override
+   protected final Map< String, PropertyDescriptor > propertiesByName()
+   {
+      return getThresholdedRuleProperties( this );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/thresholded/AbstractMaximizedFlexRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/thresholded/AbstractMaximizedFlexRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/thresholded/AbstractMaximizedFlexRule.java
new file mode 100644
index 0000000..d1ce967
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/thresholded/AbstractMaximizedFlexRule.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.core.thresholded;
+
+import java.util.Map;
+
+import net.sourceforge.pmd.PropertyDescriptor;
+
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public abstract class AbstractMaximizedFlexRule extends AbstractFlexRule implements IThresholdedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getThreshold()
+    */
+   public int getThreshold()
+   {
+      return getIntProperty( propertyDescriptorFor( getThresholdName() ) );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getThresholdName
+    * ()
+    */
+   public final String getThresholdName()
+   {
+      return MAXIMUM;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.CommonAbstractRule#propertiesByName()
+    */
+   @Override
+   protected final Map< String, PropertyDescriptor > propertiesByName()
+   {
+      return getThresholdedRuleProperties( this );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/thresholded/AbstractMaximizedRegexpBasedRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/thresholded/AbstractMaximizedRegexpBasedRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/thresholded/AbstractMaximizedRegexpBasedRule.java
new file mode 100644
index 0000000..7015306
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/thresholded/AbstractMaximizedRegexpBasedRule.java
@@ -0,0 +1,61 @@
+/*
+ * 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.core.thresholded;
+
+import java.util.Map;
+
+import net.sourceforge.pmd.PropertyDescriptor;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+
+/**
+ * @author xagnetti
+ */
+public abstract class AbstractMaximizedRegexpBasedRule extends AbstractRegexpBasedRule implements
+                                                                                      IThresholdedRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getThreshold()
+    */
+   public final int getThreshold()
+   {
+      return getIntProperty( propertyDescriptorFor( getThresholdName() ) );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getThresholdName
+    * ()
+    */
+   public final String getThresholdName()
+   {
+      return MAXIMUM;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.CommonAbstractRule#propertiesByName()
+    */
+   @Override
+   protected final Map< String, PropertyDescriptor > propertiesByName()
+   {
+      return getThresholdedRuleProperties( this );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/thresholded/IThresholdedRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/thresholded/IThresholdedRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/thresholded/IThresholdedRule.java
new file mode 100644
index 0000000..db4c845
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/thresholded/IThresholdedRule.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.core.thresholded;
+
+import com.adobe.ac.pmd.rules.core.IFlexRule;
+
+/**
+ * @author xagnetti
+ */
+public interface IThresholdedRule extends IFlexRule
+{
+   /**
+    * @return
+    */
+   int getActualValueForTheCurrentViolation();
+
+   /**
+    * @return
+    */
+   int getDefaultThreshold();
+
+   /**
+    * @return
+    */
+   int getThreshold();
+
+   /**
+    * @return
+    */
+   String getThresholdName();
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/resources/flexPmd.properties
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/resources/flexPmd.properties b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/resources/flexPmd.properties
new file mode 100644
index 0000000..14ad989
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/resources/flexPmd.properties
@@ -0,0 +1,26 @@
+# 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.
+
+report.flexCpd.name=Flex CPD Report
+report.flexPmd.name=Flex PMD Report
+report.flexPmd.description=List possible code smells in a Flex source directory
+report.flexCpd.description=List all the duplications in a Flex source directory
+report.pmd.title=Flex PMD Report
+report.pmd.pmdlink=
+report.pmd.files=Files
+report.pmd.column.violation=Violation
+report.pmd.column.line=Line
+report.pmd.noProblems=No problems found
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/files/FileSetUtilsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/files/FileSetUtilsTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/files/FileSetUtilsTest.java
new file mode 100644
index 0000000..2302b6d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/files/FileSetUtilsTest.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.files;
+
+import junit.framework.Assert;
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+
+public class FileSetUtilsTest extends FlexPmdTestBase
+{
+   @Test
+   public void buildAst() throws PMDException
+   {
+      FileSetUtils.buildAst( getTestFiles().get( "bug.Duane.mxml" ) );
+   }
+
+   @Test
+   public void testBuildMessage()
+   {
+      Assert.assertEquals( "While building AST on bug.Duane.mxml, an error occured: message",
+                           FileSetUtils.buildLogMessage( getTestFiles().get( "bug.Duane.mxml" ),
+                                                         "message" ) );
+   }
+
+   @Test
+   public void testComputeAsts() throws PMDException
+   {
+      FileSetUtils.computeAsts( getTestFiles() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/MetaDataTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/MetaDataTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/MetaDataTest.java
new file mode 100644
index 0000000..7bcf658
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/MetaDataTest.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.nodes;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class MetaDataTest
+{
+   @Test
+   public void testCreate()
+   {
+      assertEquals( MetaData.BINDABLE.toString(),
+                    MetaData.create( MetaData.BINDABLE.toString() ).toString() );
+
+      assertEquals( MetaData.ARRAY_ELEMENT_TYPE.toString(),
+                    MetaData.create( MetaData.ARRAY_ELEMENT_TYPE.toString() ).toString() );
+
+      assertEquals( MetaData.BEFORE.toString(),
+                    MetaData.create( MetaData.BEFORE.toString() ).toString() );
+
+      assertEquals( MetaData.EMBED.toString(),
+                    MetaData.create( MetaData.EMBED.toString() ).toString() );
+
+      assertEquals( MetaData.EVENT.toString(),
+                    MetaData.create( MetaData.EVENT.toString() ).toString() );
+
+      assertEquals( MetaData.TEST.toString(),
+                    MetaData.create( MetaData.TEST.toString() ).toString() );
+
+      final String unknownMetaData = "Unknown";
+      final MetaData other = MetaData.create( unknownMetaData );
+
+      assertEquals( MetaData.OTHER,
+                    other );
+
+      assertEquals( unknownMetaData,
+                    other.toString() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/ClassNodeTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/ClassNodeTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/ClassNodeTest.java
new file mode 100644
index 0000000..fb272a2
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/ClassNodeTest.java
@@ -0,0 +1,174 @@
+/*
+ * 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.nodes.impl;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+
+import junit.framework.Assert;
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.FileSetUtils;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.nodes.Modifier;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class ClassNodeTest extends FlexPmdTestBase
+{
+   private IClass bug233;
+   private IClass modelLocator;
+   private IClass nonBindableModelLocator;
+   private IClass radonDataGrid;
+
+   @Before
+   public void setup() throws IOException,
+                      TokenException,
+                      PMDException
+   {
+      IParserNode ast = FileSetUtils.buildAst( getTestFiles().get( "RadonDataGrid.as" ) );
+      radonDataGrid = NodeFactory.createPackage( ast ).getClassNode();
+      final IFlexFile file = getTestFiles().get( "bug.FlexPMD233a.mxml" );
+      ast = FileSetUtils.buildAst( file );
+      bug233 = NodeFactory.createPackage( ast ).getClassNode();
+      ast = FileSetUtils.buildAst( getTestFiles().get( "cairngorm.BindableModelLocator.as" ) );
+      modelLocator = NodeFactory.createPackage( ast ).getClassNode();
+      ast = FileSetUtils.buildAst( getTestFiles().get( "cairngorm.NonBindableModelLocator.as" ) );
+      nonBindableModelLocator = NodeFactory.createPackage( ast ).getClassNode();
+   }
+
+   @Test
+   public void testBlock()
+   {
+      Assert.assertNull( radonDataGrid.getBlock() );
+   }
+
+   @Test
+   public void testFlexPMD233()
+   {
+      Assert.assertNull( bug233.getBlock() );
+   }
+
+   @Test
+   public void testGetAllMetaData()
+   {
+      assertEquals( 0,
+                    radonDataGrid.getAllMetaData().size() );
+   }
+
+   @Test
+   public void testGetAttributes()
+   {
+      assertEquals( 0,
+                    radonDataGrid.getAttributes().size() );
+   }
+
+   @Test
+   public void testGetAverageCyclomaticComplexity()
+   {
+      assertEquals( 3.0,
+                    radonDataGrid.getAverageCyclomaticComplexity(),
+                    0.1 );
+   }
+
+   @Test
+   public void testGetConstants()
+   {
+      assertEquals( 0,
+                    radonDataGrid.getConstants().size() );
+   }
+
+   @Test
+   public void testGetConstructor()
+   {
+      assertNotNull( radonDataGrid.getConstructor() );
+   }
+
+   @Test
+   public void testGetExtensionName()
+   {
+      assertEquals( "DataGrid",
+                    radonDataGrid.getExtensionName() );
+   }
+
+   @Test
+   public void testGetImplementations()
+   {
+      assertEquals( 0,
+                    radonDataGrid.getImplementations().size() );
+      assertEquals( 1,
+                    modelLocator.getImplementations().size() );
+   }
+
+   @Test
+   public void testGetMetaData()
+   {
+      assertEquals( 0,
+                    nonBindableModelLocator.getMetaData( MetaData.BINDABLE ).size() );
+      assertEquals( 1,
+                    modelLocator.getMetaData( MetaData.BINDABLE ).size() );
+   }
+
+   @Test
+   public void testGetMetaDataList()
+   {
+      assertEquals( 0,
+                    radonDataGrid.getMetaDataCount() );
+      assertNotNull( modelLocator.getMetaData( MetaData.BINDABLE ) );
+      assertEquals( 1,
+                    modelLocator.getMetaData( MetaData.BINDABLE ).size() );
+      assertTrue( modelLocator.isBindable() );
+      assertFalse( nonBindableModelLocator.isBindable() );
+   }
+
+   @Test
+   public void testGetName()
+   {
+      assertEquals( "RadonDataGrid",
+                    radonDataGrid.getName() );
+   }
+
+   @Test
+   public void testIsFinal()
+   {
+      assertFalse( radonDataGrid.isFinal() );
+   }
+
+   @Test
+   public void testVisibility()
+   {
+      assertTrue( radonDataGrid.isPublic() );
+      assertTrue( modelLocator.is( Modifier.PROTECTED ) );
+      assertTrue( nonBindableModelLocator.is( Modifier.PRIVATE ) );
+      assertFalse( nonBindableModelLocator.is( Modifier.PROTECTED ) );
+      assertFalse( nonBindableModelLocator.isPublic() );
+      assertFalse( radonDataGrid.is( Modifier.PROTECTED ) );
+      assertFalse( radonDataGrid.is( Modifier.PRIVATE ) );
+      assertFalse( modelLocator.isPublic() );
+      assertFalse( modelLocator.is( Modifier.PRIVATE ) );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/CommentNodeTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/CommentNodeTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/CommentNodeTest.java
new file mode 100644
index 0000000..674d4a4
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/CommentNodeTest.java
@@ -0,0 +1,163 @@
+/*
+ * 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.nodes.impl;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.FileSetUtils;
+import com.adobe.ac.pmd.nodes.IPackage;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+public class CommentNodeTest extends FlexPmdTestBase
+{
+   private final IPackage flexPMD60Package;
+
+   public CommentNodeTest() throws PMDException
+   {
+      final IParserNode bug60Ast = FileSetUtils.buildAst( getTestFiles().get( "bug."
+            + "FlexPMD60.as" ) );
+      flexPMD60Package = NodeFactory.createPackage( bug60Ast );
+   }
+
+   @Test
+   public void testClassComment()
+   {
+      assertNotNull( flexPMD60Package.getClassNode().getAsDoc().getStringValue() );
+
+      assertEquals( "/**   * AsDoc class   */",
+                    flexPMD60Package.getClassNode()
+                                    .getAsDoc()
+                                    .getStringValue()
+                                    .replace( "\t",
+                                              "   " )
+                                    .replace( '\n',
+                                              ' ' )
+                                    .replaceAll( "  ",
+                                                 " " ) );
+
+      assertEquals( 2,
+                    flexPMD60Package.getClassNode().getMultiLinesComment().size() );
+
+      assertNotNull( flexPMD60Package.getClassNode().getMultiLinesComment().get( 0 ) );
+
+      assertEquals( "/*   * comment   */",
+                    flexPMD60Package.getClassNode()
+                                    .getMultiLinesComment()
+                                    .get( 0 )
+                                    .getStringValue()
+                                    .replace( "\t",
+                                              "   " )
+                                    .replace( '\n',
+                                              ' ' )
+                                    .replaceAll( "  ",
+                                                 " " ) );
+   }
+
+   @Test
+   public void testFieldComment()
+   {
+      assertNotNull( flexPMD60Package.getClassNode().getAttributes().get( 0 ).getAsDoc() );
+
+      assertEquals( "/**    * AsDoc attribute    */",
+                    flexPMD60Package.getClassNode()
+                                    .getAttributes()
+                                    .get( 0 )
+                                    .getAsDoc()
+                                    .getStringValue()
+                                    .replace( "\t",
+                                              "   " )
+                                    .replace( '\n',
+                                              ' ' )
+                                    .replaceAll( "  ",
+                                                 " " ) );
+
+   }
+
+   @Test
+   public void testFunctionComment()
+   {
+      assertNotNull( flexPMD60Package.getClassNode().getFunctions().get( 0 ).getAsDoc() );
+
+      assertEquals( "/**    * AsDoc method    */",
+                    flexPMD60Package.getClassNode()
+                                    .getFunctions()
+                                    .get( 0 )
+                                    .getAsDoc()
+                                    .getStringValue()
+                                    .replace( "\t",
+                                              "   " )
+                                    .replace( '\n',
+                                              ' ' )
+                                    .replaceAll( "  ",
+                                                 " " ) );
+
+      assertEquals( 2,
+                    flexPMD60Package.getClassNode().getMultiLinesComment().size() );
+
+      assertEquals( "/*   * comment   */",
+                    flexPMD60Package.getClassNode()
+                                    .getMultiLinesComment()
+                                    .get( 0 )
+                                    .getStringValue()
+                                    .replace( "\t",
+                                              "   " )
+                                    .replace( '\n',
+                                              ' ' )
+                                    .replaceAll( "  ",
+                                                 " " ) );
+
+      assertEquals( 1,
+                    flexPMD60Package.getClassNode().getFunctions().get( 0 ).getMultiLinesComment().size() );
+
+      assertEquals( "/*     var i : int = 0;*/",
+                    flexPMD60Package.getClassNode()
+                                    .getFunctions()
+                                    .get( 0 )
+                                    .getMultiLinesComment()
+                                    .get( 0 )
+                                    .getStringValue()
+                                    .replace( "\t",
+                                              "   " )
+                                    .replace( '\n',
+                                              ' ' )
+                                    .replaceAll( "  ",
+                                                 " " ) );
+   }
+
+   @Test
+   public void testMetadataComment()
+   {
+      assertNotNull( flexPMD60Package.getClassNode().getAsDoc() );
+
+      assertEquals( "/**   * AsDoc class   */",
+                    flexPMD60Package.getClassNode()
+                                    .getAsDoc()
+                                    .getStringValue()
+                                    .replace( "\t",
+                                              "   " )
+                                    .replace( '\n',
+                                              ' ' )
+                                    .replaceAll( "  ",
+                                                 " " ) );
+
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/FieldNodeTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/FieldNodeTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/FieldNodeTest.java
new file mode 100644
index 0000000..6c882d4
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/FieldNodeTest.java
@@ -0,0 +1,84 @@
+/*
+ * 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.nodes.impl;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import junit.framework.Assert;
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.FileSetUtils;
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.Modifier;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+public class FieldNodeTest extends FlexPmdTestBase
+{
+   private IAttribute first;
+   private IAttribute second;
+   private IAttribute third;
+   private IAttribute withAsDoc;
+
+   @Before
+   public void setup() throws PMDException
+   {
+      final IParserNode nonBindableModelLocatorAst = FileSetUtils.buildAst( getTestFiles().get( "cairngorm.NonBindableModelLocator.as" ) );
+      final IClass nonBindableModelLocator = NodeFactory.createPackage( nonBindableModelLocatorAst )
+                                                        .getClassNode();
+      first = nonBindableModelLocator.getAttributes().get( 0 );
+      second = nonBindableModelLocator.getAttributes().get( 1 );
+      third = nonBindableModelLocator.getAttributes().get( 2 );
+      final IParserNode asDocsAst = FileSetUtils.buildAst( getTestFiles().get( "asDocs.EmptyWithDocClass.as" ) );
+      final IClass asDocs = NodeFactory.createPackage( asDocsAst ).getClassNode();
+      withAsDoc = asDocs.getAttributes().get( 0 );
+
+   }
+
+   @Test
+   public void testBug167()
+   {
+      Assert.assertNotNull( withAsDoc.getAsDoc() );
+      Assert.assertEquals( 1,
+                           withAsDoc.getMetaDataCount() );
+   }
+
+   @Test
+   public void testIsStatic()
+   {
+      assertTrue( first.isStatic() );
+      assertFalse( second.isStatic() );
+   }
+
+   @Test
+   public void testVisibility() throws PMDException
+   {
+      assertTrue( first.is( Modifier.PRIVATE ) );
+      assertFalse( first.isPublic() );
+      assertFalse( first.is( Modifier.PROTECTED ) );
+      assertTrue( second.is( Modifier.PROTECTED ) );
+      assertFalse( second.isPublic() );
+      assertFalse( second.is( Modifier.PRIVATE ) );
+      assertTrue( third.isPublic() );
+      assertFalse( third.is( Modifier.PROTECTED ) );
+      assertFalse( third.is( Modifier.PRIVATE ) );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/FunctionNodeTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/FunctionNodeTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/FunctionNodeTest.java
new file mode 100644
index 0000000..428177d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/FunctionNodeTest.java
@@ -0,0 +1,271 @@
+/*
+ * 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.nodes.impl;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.FileSetUtils;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.nodes.Modifier;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class FunctionNodeTest extends FlexPmdTestBase
+{
+   private IFunction bug88Constructor;
+   private IFunction constructor;
+   private IFunction drawHighlightIndicator;
+   private IFunction drawRowBackground;
+   private IFunction drawSelectionIndicator;
+   private IFunction fDCTQuant;
+   private IFunction flexunit4Test;
+   private IFunction flexunit4TestSetUp;
+   private IFunction getHeight;
+   private IFunction isTrueGetter;
+   private IFunction isTrueSetter;
+   private IFunction placeSortArrow;
+
+   @Test
+   public void modifiers()
+   {
+      assertTrue( constructor.is( Modifier.PUBLIC ) );
+   }
+
+   @Before
+   public void setup() throws IOException,
+                      TokenException,
+                      PMDException
+   {
+      final IParserNode dataGridAst = FileSetUtils.buildAst( getTestFiles().get( "RadonDataGrid.as" ) );
+      final IParserNode modelLocatorAst = FileSetUtils.buildAst( getTestFiles().get( "cairngorm."
+            + "NonBindableModelLocator.as" ) );
+      final IParserNode flexUnit4TestCaseAst = FileSetUtils.buildAst( getTestFiles().get( "flexunit."
+            + "RaoulTest.as" ) );
+      final IParserNode bug888Ast = FileSetUtils.buildAst( getTestFiles().get( "bug."
+            + "FlexPMD88.as" ) );
+      final IParserNode pngEncoderAst = FileSetUtils.buildAst( getTestFiles().get( "PngEncoder.as" ) );
+
+      final IClass radonDataGrid = NodeFactory.createPackage( dataGridAst ).getClassNode();
+      final IClass nonBindableModelLocator = NodeFactory.createPackage( modelLocatorAst ).getClassNode();
+      final IClass flexUnit4TestCase = NodeFactory.createPackage( flexUnit4TestCaseAst ).getClassNode();
+      final IClass bug88 = NodeFactory.createPackage( bug888Ast ).getClassNode();
+      final IClass pngEncoder = NodeFactory.createPackage( pngEncoderAst ).getClassNode();
+
+      constructor = radonDataGrid.getFunctions().get( 0 );
+      drawHighlightIndicator = radonDataGrid.getFunctions().get( 1 );
+      drawSelectionIndicator = radonDataGrid.getFunctions().get( 2 );
+      drawRowBackground = radonDataGrid.getFunctions().get( 3 );
+      placeSortArrow = radonDataGrid.getFunctions().get( 4 );
+      isTrueGetter = radonDataGrid.getFunctions().get( 5 );
+      isTrueSetter = radonDataGrid.getFunctions().get( 6 );
+      getHeight = nonBindableModelLocator.getFunctions().get( 2 );
+      flexunit4Test = flexUnit4TestCase.getFunctions().get( 1 );
+      flexunit4TestSetUp = flexUnit4TestCase.getFunctions().get( 0 );
+      bug88Constructor = bug88.getConstructor();
+      fDCTQuant = pngEncoder.getFunctions().get( 9 );
+   }
+
+   @Test
+   public void testFindPrimaryStatementFromName()
+   {
+      assertEquals( 0,
+                    constructor.findPrimaryStatementsInBody( "" ).size() );
+      assertEquals( 1,
+                    drawHighlightIndicator.findPrimaryStatementInBody( new String[]
+                    { "super",
+                                "" } ).size() );
+   }
+
+   @Test
+   public void testGetAllMetaData()
+   {
+      assertEquals( 0,
+                    constructor.getAllMetaData().size() );
+   }
+
+   @Test
+   public void testGetBody()
+   {
+      assertEquals( 1,
+                    flexunit4TestSetUp.getBody().numChildren() );
+
+      assertEquals( 38,
+                    fDCTQuant.getBody().numChildren() );
+   }
+
+   @Test
+   public void testGetCyclomaticComplexity()
+   {
+      assertEquals( 2,
+                    constructor.getCyclomaticComplexity() );
+      assertEquals( 1,
+                    drawHighlightIndicator.getCyclomaticComplexity() );
+      assertEquals( 1,
+                    drawSelectionIndicator.getCyclomaticComplexity() );
+      assertEquals( 4,
+                    drawRowBackground.getCyclomaticComplexity() );
+      assertEquals( 13,
+                    placeSortArrow.getCyclomaticComplexity() );
+
+      assertEquals( 3,
+                    bug88Constructor.getCyclomaticComplexity() );
+   }
+
+   @Test
+   public void testGetMetaData()
+   {
+      assertEquals( 1,
+                    getHeight.getMetaDataCount() );
+      assertEquals( 0,
+                    isTrueGetter.getMetaDataCount() );
+      assertEquals( 1,
+                    flexunit4Test.getMetaData( MetaData.TEST ).size() );
+      assertEquals( "Test",
+                    flexunit4Test.getMetaData( MetaData.TEST ).get( 0 ).getName() );
+      assertEquals( 0,
+                    flexunit4Test.getMetaData( MetaData.BEFORE ).size() );
+   }
+
+   @Test
+   public void testGetName()
+   {
+      assertEquals( "RadonDataGrid",
+                    constructor.getName() );
+      assertEquals( "drawHighlightIndicator",
+                    drawHighlightIndicator.getName() );
+      assertEquals( "drawSelectionIndicator",
+                    drawSelectionIndicator.getName() );
+      assertEquals( "drawRowBackground",
+                    drawRowBackground.getName() );
+      assertEquals( "placeSortArrow",
+                    placeSortArrow.getName() );
+   }
+
+   @Test
+   public void testGetParameters()
+   {
+      assertEquals( 0,
+                    constructor.getParameters().size() );
+      assertEquals( 7,
+                    drawHighlightIndicator.getParameters().size() );
+      assertEquals( 7,
+                    drawSelectionIndicator.getParameters().size() );
+      assertEquals( 6,
+                    drawRowBackground.getParameters().size() );
+      assertEquals( 0,
+                    placeSortArrow.getParameters().size() );
+   }
+
+   @Test
+   public void testGetReturnType()
+   {
+      assertEquals( "",
+                    constructor.getReturnType().getInternalNode().getStringValue() );
+      assertEquals( "void",
+                    drawHighlightIndicator.getReturnType().getInternalNode().getStringValue() );
+      assertEquals( "void",
+                    drawSelectionIndicator.getReturnType().getInternalNode().getStringValue() );
+      assertEquals( "void",
+                    drawRowBackground.getReturnType().getInternalNode().getStringValue() );
+      assertEquals( "void",
+                    placeSortArrow.getReturnType().getInternalNode().getStringValue() );
+      assertEquals( "void",
+                    flexunit4TestSetUp.getReturnType().getInternalNode().getStringValue() );
+   }
+
+   @Test
+   public void testGetStatementNbInBody()
+   {
+      assertEquals( 7,
+                    constructor.getStatementNbInBody() );
+      assertEquals( 9,
+                    drawHighlightIndicator.getStatementNbInBody() );
+      assertEquals( 21,
+                    placeSortArrow.getStatementNbInBody() );
+   }
+
+   @Test
+   public void testIsGetter()
+   {
+      assertFalse( constructor.isGetter() );
+      assertFalse( drawHighlightIndicator.isGetter() );
+      assertFalse( isTrueSetter.isGetter() );
+      assertTrue( isTrueGetter.isGetter() );
+   }
+
+   @Test
+   public void testIsSetter()
+   {
+      assertFalse( constructor.isSetter() );
+      assertFalse( drawHighlightIndicator.isSetter() );
+      assertFalse( isTrueGetter.isSetter() );
+      assertTrue( isTrueSetter.isSetter() );
+   }
+
+   @Test
+   public void testLocalVariables()
+   {
+      assertEquals( 0,
+                    constructor.getLocalVariables().size() );
+      assertEquals( 2,
+                    drawHighlightIndicator.getLocalVariables().size() );
+      assertEquals( 13,
+                    drawSelectionIndicator.getLocalVariables().size() );
+      assertEquals( 5,
+                    drawRowBackground.getLocalVariables().size() );
+   }
+
+   @Test
+   public void testOverride()
+   {
+      assertTrue( drawHighlightIndicator.isOverriden() );
+      assertFalse( isTrueGetter.isOverriden() );
+   }
+
+   @Test
+   public void testSuperCall()
+   {
+      assertNotNull( constructor.getSuperCall() );
+      assertNotNull( drawHighlightIndicator.getSuperCall() );
+      assertNotNull( placeSortArrow.getSuperCall() );
+      assertNull( drawRowBackground.getSuperCall() );
+   }
+
+   @Test
+   public void testVisibility()
+   {
+      assertTrue( constructor.isPublic() );
+      assertTrue( drawHighlightIndicator.is( Modifier.PROTECTED ) );
+      assertTrue( drawSelectionIndicator.is( Modifier.PROTECTED ) );
+      assertTrue( drawRowBackground.is( Modifier.PROTECTED ) );
+      assertTrue( isTrueGetter.is( Modifier.PRIVATE ) );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/MetaDataNodeTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/MetaDataNodeTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/MetaDataNodeTest.java
new file mode 100644
index 0000000..24bbd9b
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/MetaDataNodeTest.java
@@ -0,0 +1,119 @@
+/*
+ * 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.nodes.impl;
+
+import static org.junit.Assert.assertEquals;
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.FileSetUtils;
+import com.adobe.ac.pmd.nodes.IMetaDataListHolder;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+public class MetaDataNodeTest extends FlexPmdTestBase
+{
+   private final IMetaDataListHolder modelLocator;
+   private final IMetaDataListHolder unboundMetaData;
+
+   public MetaDataNodeTest() throws PMDException
+   {
+      super();
+
+      IParserNode ast = FileSetUtils.buildAst( getTestFiles().get( "cairngorm.BindableModelLocator.as" ) );
+      modelLocator = NodeFactory.createPackage( ast ).getClassNode();
+      ast = FileSetUtils.buildAst( getTestFiles().get( "UnboundMetadata.as" ) );
+      unboundMetaData = NodeFactory.createPackage( ast ).getClassNode();
+   }
+
+   @Test
+   public void testEmbed() throws PMDException
+   {
+      final IParserNode titleNode = FileSetUtils.buildAst( getTestFiles().get( "Title.as" ) );
+
+      final IMetaDataListHolder show = NodeFactory.createPackage( titleNode )
+                                                  .getClassNode()
+                                                  .getConstants()
+                                                  .get( 0 );
+      assertEquals( MetaData.EMBED.toString(),
+                    show.getMetaData( MetaData.EMBED ).get( 0 ).getName() );
+
+   }
+
+   @Test
+   public void testGetAttributeNames()
+   {
+      assertEquals( 2,
+                    unboundMetaData.getMetaData( MetaData.EVENT ).get( 0 ).getAttributeNames().size() );
+      assertEquals( "name",
+                    unboundMetaData.getMetaData( MetaData.EVENT ).get( 0 ).getAttributeNames().get( 0 ) );
+      assertEquals( "type",
+                    unboundMetaData.getMetaData( MetaData.EVENT ).get( 0 ).getAttributeNames().get( 1 ) );
+   }
+
+   @Test
+   public void testGetDefaultValue()
+   {
+      assertEquals( "",
+                    modelLocator.getMetaData( MetaData.BINDABLE ).get( 0 ).getDefaultValue() );
+      assertEquals( "name = \"dayChange\" , type = \'mx.events.StateChangeEvent\'",
+                    unboundMetaData.getMetaData( MetaData.EVENT ).get( 0 ).getDefaultValue() );
+   }
+
+   @Test
+   public void testGetMetaDataName()
+   {
+      assertEquals( MetaData.BINDABLE.toString(),
+                    modelLocator.getMetaData( MetaData.BINDABLE ).get( 0 ).getName() );
+      assertEquals( MetaData.EVENT.toString(),
+                    unboundMetaData.getMetaData( MetaData.EVENT ).get( 0 ).getName() );
+   }
+
+   @Test
+   public void testGetProperty()
+   {
+      assertEquals( 1,
+                    unboundMetaData.getMetaData( MetaData.EVENT ).get( 0 ).getProperty( "name" ).length );
+      assertEquals( "dayChange",
+                    unboundMetaData.getMetaData( MetaData.EVENT ).get( 0 ).getProperty( "name" )[ 0 ] );
+      assertEquals( 1,
+                    unboundMetaData.getMetaData( MetaData.EVENT ).get( 0 ).getProperty( "type" ).length );
+      assertEquals( "mx.events.StateChangeEvent",
+                    unboundMetaData.getMetaData( MetaData.EVENT ).get( 0 ).getProperty( "type" )[ 0 ] );
+   }
+
+   @Test
+   public void testGetPropertyAsList()
+   {
+      assertEquals( 1,
+                    unboundMetaData.getMetaData( MetaData.EVENT ).get( 0 ).getPropertyAsList( "name" ).size() );
+      assertEquals( "dayChange",
+                    unboundMetaData.getMetaData( MetaData.EVENT )
+                                   .get( 0 )
+                                   .getPropertyAsList( "name" )
+                                   .get( 0 ) );
+      assertEquals( 1,
+                    unboundMetaData.getMetaData( MetaData.EVENT ).get( 0 ).getPropertyAsList( "type" ).size() );
+      assertEquals( "mx.events.StateChangeEvent",
+                    unboundMetaData.getMetaData( MetaData.EVENT )
+                                   .get( 0 )
+                                   .getPropertyAsList( "type" )
+                                   .get( 0 ) );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/PackageNodeTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/PackageNodeTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/PackageNodeTest.java
new file mode 100644
index 0000000..de9dfd9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/PackageNodeTest.java
@@ -0,0 +1,126 @@
+/*
+ * 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.nodes.impl;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.io.IOException;
+
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.FileSetUtils;
+import com.adobe.ac.pmd.nodes.IPackage;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public class PackageNodeTest extends FlexPmdTestBase
+{
+   private final IPackage buttonRenderer;
+   private final IPackage FlexPMD115Package;
+   private final IPackage FlexPMD62Package;
+   private final IPackage modelLocator;
+   private final IPackage stylePackage;
+
+   public PackageNodeTest() throws PMDException
+   {
+      final IParserNode ast = FileSetUtils.buildAst( getTestFiles().get( "SkinStyles.as" ) );
+      stylePackage = NodeFactory.createPackage( ast );
+
+      final IParserNode buttonRendererAst = FileSetUtils.buildAst( getTestFiles().get( "DeleteButtonRenderer.mxml" ) );
+      buttonRenderer = NodeFactory.createPackage( buttonRendererAst );
+
+      final IParserNode modelLocatorAst = FileSetUtils.buildAst( getTestFiles().get( "cairngorm."
+            + "NonBindableModelLocator.as" ) );
+      modelLocator = NodeFactory.createPackage( modelLocatorAst );
+
+      final IParserNode bug62Ast = FileSetUtils.buildAst( getTestFiles().get( "bug."
+            + "FlexPMD62.as" ) );
+      FlexPMD62Package = NodeFactory.createPackage( bug62Ast );
+
+      final IParserNode bug115Ast = FileSetUtils.buildAst( getTestFiles().get( "bug."
+            + "FlexPMD115.as" ) );
+      FlexPMD115Package = NodeFactory.createPackage( bug115Ast );
+   }
+
+   @Test
+   public void testConstructMxmlFile() throws IOException,
+                                      TokenException,
+                                      PMDException
+   {
+      assertNotNull( buttonRenderer.getClassNode() );
+      assertEquals( "",
+                    buttonRenderer.getName() );
+      assertEquals( 0,
+                    buttonRenderer.getImports().size() );
+
+   }
+
+   @Test
+   public void testConstructNamespace() throws IOException,
+                                       TokenException,
+                                       PMDException
+   {
+      final IParserNode ast = FileSetUtils.buildAst( getTestFiles().get( "schedule_internal.as" ) );
+      final IPackage namespacePackage = NodeFactory.createPackage( ast );
+
+      assertNull( namespacePackage.getClassNode() );
+      assertEquals( "flexlib.scheduling.scheduleClasses",
+                    namespacePackage.getName() );
+      assertEquals( 0,
+                    namespacePackage.getImports().size() );
+   }
+
+   @Test
+   public void testConstructStyles()
+   {
+      assertNull( stylePackage.getClassNode() );
+      assertEquals( "",
+                    stylePackage.getName() );
+      assertEquals( 0,
+                    stylePackage.getImports().size() );
+   }
+
+   @Test
+   public void testFullyQualifiedName()
+   {
+      assertEquals( "",
+                    stylePackage.getFullyQualifiedClassName() );
+      assertEquals( "DeleteButtonRenderer",
+                    buttonRenderer.getFullyQualifiedClassName() );
+      assertEquals( "com.adobe.ac.sample.model.ModelLocator",
+                    modelLocator.getFullyQualifiedClassName() );
+   }
+
+   @Test
+   public void testGetFunctions()
+   {
+      assertEquals( 0,
+                    stylePackage.getFunctions().size() );
+   }
+
+   @Test
+   public void testGetName()
+   {
+      assertEquals( "com.test.testy.ui.components",
+                    FlexPMD62Package.getName() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/VariableNodeTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/VariableNodeTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/VariableNodeTest.java
new file mode 100644
index 0000000..370a012
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/impl/VariableNodeTest.java
@@ -0,0 +1,77 @@
+/*
+ * 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.nodes.impl;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.FileSetUtils;
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+public class VariableNodeTest extends FlexPmdTestBase
+{
+   private IAttribute first;
+
+   @Before
+   public void setup() throws PMDException
+   {
+      final IParserNode ast = FileSetUtils.buildAst( getTestFiles().get( "cairngorm.NonBindableModelLocator.as" ) );
+      final IClass nonBindableModelLocator = NodeFactory.createPackage( ast ).getClassNode();
+      first = nonBindableModelLocator.getAttributes().get( 0 );
+   }
+
+   @Test
+   public void testGetAllMetaData()
+   {
+      assertEquals( 0,
+                    first.getAllMetaData().size() );
+   }
+
+   @Test
+   public void testGetInitializationExpression()
+   {
+      assertNull( first.getInitializationExpression() );
+   }
+
+   @Test
+   public void testGetMetaDataCount()
+   {
+      assertEquals( 0,
+                    first.getMetaDataCount() );
+   }
+
+   @Test
+   public void testGetName()
+   {
+      assertEquals( "_instance",
+                    first.getName() );
+   }
+
+   @Test
+   public void testGetType()
+   {
+      assertEquals( "ModelLocator",
+                    first.getType().toString() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/utils/AsDocUtilsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/utils/AsDocUtilsTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/utils/AsDocUtilsTest.java
new file mode 100644
index 0000000..28acd8b
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/utils/AsDocUtilsTest.java
@@ -0,0 +1,63 @@
+/*
+ * 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.nodes.utils;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.nodes.asdoc.impl.ClassAsDocNode;
+import com.adobe.ac.pmd.nodes.asdoc.impl.FunctionAsDocNode;
+import com.adobe.ac.pmd.nodes.asdoc.impl.ParameterAsDocNode;
+
+public class AsDocUtilsTest
+{
+   @Test
+   public void testComputeClassDoc()
+   {
+      final ClassAsDocNode emptyDoc = AsDocUtils.computeClassDoc( "" );
+
+      assertEquals( "",
+                    emptyDoc.getDescription() );
+
+      AsDocUtils.computeClassDoc( "/** description \n        * description2\n @see mx.kjnerkjlef.btbt*/" );
+   }
+
+   @Test
+   public void testComputeFunctionDoc()
+   {
+      final FunctionAsDocNode emptyDoc = AsDocUtils.computeFunctionDoc( "" );
+
+      assertEquals( "",
+                    emptyDoc.getDescription() );
+
+      final FunctionAsDocNode functionDoc = AsDocUtils.computeFunctionDoc( "/** description \n        * description2\n @see mx.kjnerkjlef.btbt*/" );
+
+      final ParameterAsDocNode parameter = AsDocUtils.computeParameterDoc( "name",
+                                                                           "description" );
+      functionDoc.addParameter( parameter );
+
+      assertEquals( parameter,
+                    functionDoc.getParameter( 0 ) );
+
+      assertEquals( "name",
+                    parameter.getName() );
+
+      assertEquals( "description",
+                    parameter.getDescription() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/utils/FunctionUtilsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/utils/FunctionUtilsTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/utils/FunctionUtilsTest.java
new file mode 100644
index 0000000..b0ef8de
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/nodes/utils/FunctionUtilsTest.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.nodes.utils;
+
+import static org.junit.Assert.assertEquals;
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.FileSetUtils;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.impl.NodeFactory;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+public class FunctionUtilsTest extends FlexPmdTestBase
+{
+   @Test
+   public void testComputeFunctionLength() throws PMDException
+   {
+      final IFlexFile file = getTestFiles().get( "RadonDataGrid.as" );
+      final IParserNode dataGridAst = FileSetUtils.buildAst( file );
+      final IClass radonDataGrid = NodeFactory.createPackage( dataGridAst ).getClassNode();
+
+      assertEquals( 6,
+                    FunctionUtils.computeFunctionLength( file,
+                                                         radonDataGrid.getFunctions().get( 0 ).getBody() ) );
+
+      assertEquals( 9,
+                    FunctionUtils.computeFunctionLength( file,
+                                                         radonDataGrid.getFunctions().get( 1 ).getBody() ) );
+
+      assertEquals( 21,
+                    FunctionUtils.computeFunctionLength( file,
+                                                         radonDataGrid.getFunctions().get( 2 ).getBody() ) );
+
+      assertEquals( 16,
+                    FunctionUtils.computeFunctionLength( file,
+                                                         radonDataGrid.getFunctions().get( 3 ).getBody() ) );
+
+      assertEquals( 10,
+                    FunctionUtils.computeFunctionLength( file,
+                                                         radonDataGrid.getFunctions().get( 4 ).getBody() ) );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/EmptyRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/EmptyRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/EmptyRule.java
new file mode 100644
index 0000000..43df42d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/EmptyRule.java
@@ -0,0 +1,79 @@
+/*
+ * 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.core;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.AbstractMaximizedFlexRule;
+
+public class EmptyRule extends AbstractMaximizedFlexRule
+{
+   public int getActualValueForTheCurrentViolation()
+   {
+      return 0;
+   }
+
+   public int getDefaultThreshold()
+   {
+      return 10;
+   }
+
+   @Override
+   public String getDescription()
+   {
+      return "description";
+   }
+
+   @Override
+   public String getMessage()
+   {
+      return "emptyMessage";
+   }
+
+   @Override
+   public int getThreshold()
+   {
+      return getDefaultThreshold();
+   }
+
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   @Override
+   protected List< IFlexViolation > findViolationsInCurrentFile()
+   {
+      final ArrayList< IFlexViolation > violations = new ArrayList< IFlexViolation >();
+
+      addViolation( violations,
+                    new ViolationPosition( 0 ) );
+
+      return violations;
+   }
+
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/EmptyRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/EmptyRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/EmptyRuleTest.java
new file mode 100644
index 0000000..18c5c8c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/test/java/com/adobe/ac/pmd/rules/core/EmptyRuleTest.java
@@ -0,0 +1,134 @@
+/*
+ * 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.core;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRuleTest.AssertPosition;
+
+public class EmptyRuleTest extends FlexPmdTestBase
+{
+   @Test
+   public void addViolationEmptyRule()
+   {
+      final List< IFlexViolation > violatons = new EmptyRule().processFile( null,
+                                                                            null,
+                                                                            null );
+
+      assertEquals( 1,
+                    violatons.size() );
+
+      final IFlexViolation firstViolation = violatons.get( 0 );
+
+      assertEquals( 0,
+                    firstViolation.getBeginLine() );
+      assertEquals( 0,
+                    firstViolation.getEndLine() );
+      assertEquals( "emptyMessage. description",
+                    firstViolation.getRuleMessage() );
+   }
+
+   @Test
+   public void addViolationWarningRule()
+   {
+      final List< IFlexViolation > violatons = new WarningRule().processFile( null,
+                                                                              null,
+                                                                              null );
+
+      assertEquals( 1,
+                    violatons.size() );
+
+      final IFlexViolation firstViolation = violatons.get( 0 );
+
+      assertEquals( 0,
+                    firstViolation.getBeginLine() );
+      assertEquals( 0,
+                    firstViolation.getEndLine() );
+      assertEquals( "warning message",
+                    firstViolation.getRuleMessage() );
+   }
+
+   @Test
+   public void testBuildFailuresMessage()
+   {
+      final ArrayList< AssertPosition > position = new ArrayList< AssertPosition >();
+
+      position.add( AssertPosition.create( "message",
+                                           1,
+                                           2 ) );
+
+      assertEquals( "message: expected <1> but actually <2>\n",
+                    AbstractFlexRuleTest.buildFailuresMessage( position ).toString() );
+   }
+
+   @Test
+   public void testBuildFailureViolations()
+   {
+      final ViolationPosition[] expectedPositions = new ViolationPosition[]
+      { new ViolationPosition( 0 ) };
+      final ArrayList< IFlexViolation > violations = new ArrayList< IFlexViolation >();
+
+      violations.add( new Violation( new ViolationPosition( 1 ), new EmptyRule(), null ) );
+
+      final List< AssertPosition > positions = AbstractFlexRuleTest.buildFailureViolations( "",
+                                                                                            expectedPositions,
+                                                                                            violations );
+
+      assertEquals( 2,
+                    positions.size() );
+      assertEquals( "Begining line is not correct at 0th violation on ",
+                    positions.get( 0 ).message );
+      assertEquals( "Ending line is not correct at 0th violation on ",
+                    positions.get( 1 ).message );
+   }
+
+   @Test
+   public void testBuildMessageName()
+   {
+      final Map< String, List< IFlexViolation >> violatedFiles = new LinkedHashMap< String, List< IFlexViolation > >();
+      final ArrayList< IFlexViolation > emptyList = new ArrayList< IFlexViolation >();
+
+      violatedFiles.put( "file1",
+                         emptyList );
+
+      violatedFiles.put( "file2",
+                         emptyList );
+
+      assertEquals( "file1 should not contain any violations  (0 found)\n"
+                          + "file2 should not contain any violations  (0 found)\n",
+                    AbstractFlexRuleTest.buildMessageName( violatedFiles ).toString() );
+
+      final ArrayList< IFlexViolation > oneItemList = new ArrayList< IFlexViolation >();
+
+      oneItemList.add( new Violation( new ViolationPosition( 0 ), new EmptyRule(), null ) );
+      violatedFiles.put( "file2",
+                         oneItemList );
+
+      assertEquals( "file1 should not contain any violations  (0 found)\n"
+                          + "file2 should not contain any violations  (1 found at 0:0)\n",
+                    AbstractFlexRuleTest.buildMessageName( violatedFiles ).toString() );
+   }
+}


[47/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestCompilationUnit.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestCompilationUnit.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestCompilationUnit.java
deleted file mode 100644
index 820dfc7..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestCompilationUnit.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestCompilationUnit extends AbstractAs3ParserTest
-{
-   @Test
-   public void testEmptyPackage() throws TokenException
-   {
-      assertCompilationUnit( "1",
-                             "package a { } ",
-                             "<compilation-unit line=\"-1\">"
-                                   + "<package line=\"1\">" + "<name line=\"1\">a"
-                                   + "</name><content line=\"1\">"
-                                   + "</content></package><content line=\"2\">"
-                                   + "</content></compilation-unit>" );
-   }
-
-   @Test
-   public void testEmptyPackagePlusLocalClass() throws TokenException
-   {
-      assertCompilationUnit( "1",
-                             "package a { } class Local { }",
-                             "<compilation-unit line=\"-1\"><package line=\"1\">"
-                                   + "<name line=\"1\">a</name><content line=\"1\">"
-                                   + "</content></package><content line=\"1\"><class line=\"1\""
-                                   + "><name line=\"1\">Local</name>"
-                                   + "<mod-list line=\"1\"></mod-list><content line=\"1\">"
-                                   + "</content></class></content></compilation-unit>" );
-   }
-
-   @Test
-   public void testPackageWithClass() throws TokenException
-   {
-      assertCompilationUnit( "1",
-                             "package a { public class B { } } ",
-                             "<compilation-unit line=\"-1\"><package line=\"1\">"
-                                   + "<name line=\"1\">a</name><content line=\"1\">"
-                                   + "<class line=\"1\"><name line=\"1\">B</name>"
-                                   + "<mod-list line=\"1\"><mod line=\"1\">public"
-                                   + "</mod></mod-list><content line=\"1\"></content>"
-                                   + "</class></content></package><content line=\"2\">"
-                                   + "</content></compilation-unit>" );
-   }
-
-   @Test
-   public void testPackageWithInterface() throws TokenException
-   {
-      assertCompilationUnit( "1",
-                             "package a { public interface B { } } ",
-                             "<compilation-unit line=\"-1\"><package line=\"1\">"
-                                   + "<name line=\"1\">a</name><content line=\"1\">"
-                                   + "<interface line=\"1\"><name line=\"1\">B</name>"
-                                   + "<mod-list line=\"1\"><mod line=\"1\">public</mod>"
-                                   + "</mod-list><content line=\"1\"></content></interface>"
-                                   + "</content></package><content line=\"2\"></content>"
-                                   + "</compilation-unit>" );
-   }
-
-   private void assertCompilationUnit( final String message,
-                                       final String input,
-                                       final String expected ) throws TokenException
-   {
-      scn.setLines( new String[]
-      { input,
-                  "__END__" } );
-      final String result = new ASTToXMLConverter().convert( asp.parseCompilationUnit() );
-      assertEquals( message,
-                    expected,
-                    result );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestConstStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestConstStatement.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestConstStatement.java
deleted file mode 100644
index ccfb640..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestConstStatement.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestConstStatement extends AbstractStatementTest
-{
-   @Test
-   public void testFullFeaturedConst() throws TokenException
-   {
-      assertStatement( "1",
-                       "const a : int = 4",
-                       "<const-list line=\"1\">"
-                             + "<name-type-init line=\"1\">"
-                             + "<name line=\"1\">a</name><type line=\"1\">int</type>"
-                             + "<init line=\"1\"><primary line=\"1\">4</primary>"
-                             + "</init></name-type-init></const-list>" );
-   }
-
-   @Test
-   public void testInitializedConst() throws TokenException
-   {
-      assertStatement( "1",
-                       "const a = 4",
-                       "<const-list line=\"1\"><name-type-init line=\"1\">"
-                             + "<name line=\"1\">a</name><type line=\"1\">"
-                             + "</type><init line=\"1\"><primary line=\"1\">4"
-                             + "</primary></init></name-type-init></const-list>" );
-   }
-
-   @Test
-   public void testSimpleConst() throws TokenException
-   {
-      assertStatement( "1",
-                       "const a",
-                       "<const-list line=\"1\"><name-type-init line=\"1\">"
-                             + "<name line=\"1\">a</name><type line=\"2\">"
-                             + "</type></name-type-init></const-list>" );
-   }
-
-   @Test
-   public void testTypedConst() throws TokenException
-   {
-      assertStatement( "1",
-                       "const a : Object",
-                       "<const-list line=\"1\"><name-type-init line=\"1\">"
-                             + "<name line=\"1\">a</name><type line=\"1\">Object</type>"
-                             + "</name-type-init></const-list>" );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestDoStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestDoStatement.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestDoStatement.java
deleted file mode 100644
index a66d2dd..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestDoStatement.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestDoStatement extends AbstractStatementTest
-{
-   @Test
-   public void testDo() throws TokenException
-   {
-      assertStatement( "1",
-                       "do{ trace( i ); } while( i++ );",
-                       "<do line=\"1\"><block line=\"1\">"
-                             + "<call line=\"1\"><primary line=\"1\">"
-                             + "trace</primary><arguments line=\"1\">"
-                             + "<primary line=\"1\">i</primary></arguments>"
-                             + "</call></block><condition line=\"1\">"
-                             + "<post-inc line=\"1\"><primary line=\"1\">"
-                             + "i</primary></post-inc></condition></do>" );
-   }
-
-   @Test
-   public void testDoWithEmptyStatement() throws TokenException
-   {
-      assertStatement( "1",
-                       "do ; while( i++ ); ",
-                       "<do line=\"1\"><stmt-empty line=\"1\">;</stmt-empty>"
-                             + "<condition line=\"1\"><post-inc line=\"1\">"
-                             + "<primary line=\"1\">i</primary></post-inc></condition></do>" );
-   }
-
-   @Test
-   public void testDoWithoutBlock() throws TokenException
-   {
-      assertStatement( "1",
-                       "do trace( i ); while( i++ ); ",
-                       "<do line=\"1\"><call line=\"1\">"
-                             + "<primary line=\"1\">trace</primary><arguments line=\"1\""
-                             + "><primary line=\"1\">i</primary>"
-                             + "</arguments></call><condition line=\"1\">"
-                             + "<post-inc line=\"1\"><primary line=\"1\""
-                             + ">i</primary></post-inc></condition></do>" );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestE4xExpression.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestE4xExpression.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestE4xExpression.java
deleted file mode 100644
index 7d6f874..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestE4xExpression.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestE4xExpression extends AbstractStatementTest
-{
-   @Test
-   public void testE4xFilter() throws TokenException
-   {
-      assertStatement( "",
-                       "myXml.(lala=\"lala\")",
-                       "<e4x-filter line=\"1\"><primary line=\"1\">myXml"
-                             + "</primary><assign line=\"1\"><primary line=\"1\">"
-                             + "lala</primary><op line=\"1\">=</op><primary line=\"1\">"
-                             + "\"lala\"</primary></assign></e4x-filter>" );
-
-      assertStatement( "",
-                       "doc.*.worm[1]",
-                       "<mul line=\"1\"><e4x-star line=\"1\"><primary line=\"1\""
-                             + ">doc</primary></e4x-star><op line=\"1\">*</op><primary "
-                             + "line=\"1\">.</primary></mul>" );
-
-      assertStatement( "",
-                       "doc.@worm",
-                       "<dot line=\"1\"><primary line=\"1\">doc</primary><primary "
-                             + "line=\"1\">@worm</primary></dot>" );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestEmptyStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestEmptyStatement.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestEmptyStatement.java
deleted file mode 100644
index 6133b33..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestEmptyStatement.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestEmptyStatement extends AbstractStatementTest
-{
-   @Test
-   public void testComplex() throws TokenException
-   {
-      assertStatement( "1",
-                       "{;1;;}",
-                       "<block line=\"1\"><stmt-empty line=\"1\">;"
-                             + "</stmt-empty><primary line=\"1\">1"
-                             + "</primary><stmt-empty line=\"1\">;</stmt-empty></block>" );
-   }
-
-   @Test
-   public void testSimple() throws TokenException
-   {
-      assertStatement( "1",
-                       ";",
-                       "<stmt-empty line=\"1\">;</stmt-empty>" );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestExpression.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestExpression.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestExpression.java
deleted file mode 100644
index 16308c9..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestExpression.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestExpression extends AbstractStatementTest
-{
-   @Test
-   public void testAddExpression() throws TokenException
-   {
-      assertStatement( "1",
-                       "5+6",
-                       "<add line=\"1\"><primary line=\"1\""
-                             + ">5</primary><op line=\"1\">+</op>" + "<primary line=\"1\">6</primary></add>" );
-   }
-
-   @Test
-   public void testAndExpression() throws TokenException
-   {
-      assertStatement( "1",
-                       "5&&6",
-                       "<and line=\"1\"><primary line=\"1\">5</primary>"
-                             + "<op line=\"1\">&&</op>" + "<primary line=\"1\">6</primary></and>" );
-   }
-
-   @Test
-   public void testAssignmentExpression() throws TokenException
-   {
-      assertStatement( "1",
-                       "x+=6",
-                       "<assign line=\"1\"><primary line=\"1\">x"
-                             + "</primary><op line=\"1\">+=</op><primary line=\"1\""
-                             + ">6</primary></assign>" );
-   }
-
-   @Test
-   public void testBitwiseAndExpression() throws TokenException
-   {
-      assertStatement( "1",
-                       "5&6",
-                       "<b-and line=\"1\"><primary line=\"1\">5"
-                             + "</primary><op line=\"1\">&</op><primary line=\"1\">6</primary></b-and>" );
-   }
-
-   @Test
-   public void testBitwiseOrExpression() throws TokenException
-   {
-      assertStatement( "1",
-                       "5|6",
-                       "<b-or line=\"1\"><primary line=\"1\">5"
-                             + "</primary><op line=\"1\">|</op><primary line=\"1\">6</primary></b-or>" );
-   }
-
-   @Test
-   public void testBitwiseXorExpression() throws TokenException
-   {
-      assertStatement( "1",
-                       "5^6",
-                       "<b-xor line=\"1\"><primary line=\"1\">5"
-                             + "</primary><op line=\"1\">^</op><primary line=\"1\">6</primary></b-xor>" );
-   }
-
-   @Test
-   public void testConditionalExpression() throws TokenException
-   {
-      assertStatement( "1",
-                       "true?5:6",
-                       "<conditional line=\"1\"><primary line=\"1\">"
-                             + "true</primary><primary line=\"1\">5" + "</primary><primary line=\"1\">6"
-                             + "</primary></conditional>" );
-   }
-
-   @Test
-   public void testDivision() throws TokenException
-   {
-      assertStatement( "",
-                       "offset = ( this[ axis.unscaled ] / 2 - ( rightPos ) / 2 );",
-                       "<assign line=\"1\"><primary line=\"1\">offset</primary><op line=\"1\">=</op>"
-                             + "<primary line=\"1\"><encapsulated line=\"1\"><add line=\"1\"><mul line=\"1\">"
-                             + "<arr-acc line=\"1\"><primary line=\"1\">this</primary><dot line=\"1\"><primary "
-                             + "line=\"1\">axis</primary><primary line=\"1\">unscaled</primary></dot></arr-acc>"
-                             + "<op line=\"1\">/</op><primary line=\"1\">2</primary></mul><op line=\"1\">-</op>"
-                             + "<mul line=\"1\"><primary line=\"1\"><encapsulated line=\"1\"><primary line=\"1\">"
-                             + "rightPos</primary></encapsulated></primary><op line=\"1\">/</op><primary line=\"1\">"
-                             + "2</primary></mul></add></encapsulated></primary></assign>" );
-   }
-
-   @Test
-   public void testEncapsulated() throws TokenException
-   {
-      assertStatement( "",
-                       "(dataProvider as ArrayCollection) = null",
-                       "<assign line=\"1\"><primary line=\"1\">"
-                             + "<encapsulated line=\"1\"><relation line=\"1\">"
-                             + "<primary line=\"1\">dataProvider</primary>"
-                             + "<as line=\"1\">as</as><primary line=\"1\">"
-                             + "ArrayCollection</primary></relation></encapsulated></primary>"
-                             + "<op line=\"1\">=</op><primary line=\"1\">" + "null</primary></assign>" );
-   }
-
-   @Test
-   public void testEqualityExpression() throws TokenException
-   {
-      assertStatement( "1",
-                       "5!==6",
-                       "<equality line=\"1\"><primary line=\"1\">5"
-                             + "</primary><op line=\"1\">!==</op><primary line=\"1\">6</primary></equality>" );
-   }
-
-   @Test
-   public void testExpressionList() throws TokenException
-   {
-      assertStatement( "1",
-                       "5&&6,5&&9",
-                       "<expr-list line=\"1\"><and line=\"1\">"
-                             + "<primary line=\"1\">5</primary><op line=\"1\">"
-                             + "&&</op><primary line=\"1\">6</primary></and><and line=\"1\""
-                             + "><primary line=\"1\">5</primary><op line=\"1\""
-                             + ">&&</op><primary line=\"1\">9</primary></and></expr-list>" );
-   }
-
-   @Test
-   public void testInstanceOf() throws TokenException
-   {
-      assertStatement( "bug237",
-                       "if (a instanceof b){}",
-                       "<if line=\"1\"><condition line=\"1\"><relation line=\"1\"><primary "
-                             + "line=\"1\">a</primary><op line=\"1\">instanceof</op><primary line=\"1\">"
-                             + "b</primary></relation></condition><block line=\"1\"></block></if>" );
-   }
-
-   @Test
-   public void testMulExpression() throws TokenException
-   {
-      assertStatement( "1",
-                       "5/6",
-                       "<mul line=\"1\"><primary line=\"1\">5"
-                             + "</primary><op line=\"1\">/</op><primary line=\"1\">6</primary></mul>" );
-   }
-
-   @Test
-   public void testNewExpression() throws TokenException
-   {
-      assertStatement( "",
-                       "new Event()",
-                       "<new line=\"1\"><call line=\"1\">"
-                             + "<primary line=\"1\">Event</primary>"
-                             + "<arguments line=\"1\"></arguments></call></new>" );
-
-      assertStatement( "",
-                       "new Event(\"lala\")",
-                       "<new line=\"1\"><call line=\"1\">"
-                             + "<primary line=\"1\">Event</primary>"
-                             + "<arguments line=\"1\"><primary line=\"1\">"
-                             + "\"lala\"</primary></arguments></call></new>" );
-
-   }
-
-   @Test
-   public void testOrExpression() throws TokenException
-   {
-      assertStatement( "1",
-                       "5||6",
-                       "<or line=\"1\"><primary line=\"1\">5"
-                             + "</primary><op line=\"1\">||</op><primary line=\"1\">6</primary></or>" );
-   }
-
-   @Test
-   public void testRelationalExpression() throws TokenException
-   {
-      assertStatement( "1",
-                       "5<=6",
-                       "<relation line=\"1\"><primary line=\"1\">5"
-                             + "</primary><op line=\"1\">&lt;=</op><primary line=\"1\""
-                             + ">6</primary></relation>" );
-   }
-
-   @Test
-   public void testShiftExpression() throws TokenException
-   {
-      assertStatement( "1",
-                       "5<<6",
-                       "<shift line=\"1\"><primary line=\"1\">5"
-                             + "</primary><op line=\"1\">&lt;&lt;</op><primary line=\"1\""
-                             + ">6</primary></shift>" );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestForStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestForStatement.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestForStatement.java
deleted file mode 100644
index afafbf2..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestForStatement.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestForStatement extends AbstractStatementTest
-{
-   @Test
-   public void testSimpleFor() throws TokenException
-   {
-      assertStatement( "1",
-                       "for( var i : int = 0; i < length; i++ ){ trace( i ); }",
-                       "<for line=\"1\"><init line=\"1\">"
-                             + "<var-list line=\"1\"><name-type-init line=\"1\""
-                             + "><name line=\"1\">i</name><type line=\"1\">int</type><init line=\"1\">"
-                             + "<primary line=\"1\">0</primary></init>"
-                             + "</name-type-init></var-list></init>"
-                             + "<cond line=\"1\"><relation line=\"1\">"
-                             + "<primary line=\"1\">i</primary><op line=\"1\""
-                             + ">&lt;</op><primary line=\"1\">length"
-                             + "</primary></relation></cond><iter line=\"1\">"
-                             + "<post-inc line=\"1\"><primary line=\"1\">i"
-                             + "</primary></post-inc></iter><block line=\"1\"><call line=\"1\""
-                             + "><primary line=\"1\">trace"
-                             + "</primary><arguments line=\"1\"><primary line=\"1\">i"
-                             + "</primary></arguments></call></block></for>" );
-
-      assertStatement( "",
-                       "        for (i = 0; i < n; i++)",
-                       "<for line=\"1\"><init line=\"1\">"
-                             + "<assign line=\"1\"><primary line=\"1\">i</primary><op line=\"1\">=</op>"
-                             + "<primary line=\"1\">0</primary></assign></init>"
-                             + "<cond line=\"1\"><relation line=\"1\"><primary line=\"1\">i</primary>"
-                             + "<op line=\"1\">&lt;</op><primary line=\"1\">n"
-                             + "</primary></relation></cond><iter line=\"1\">"
-                             + "<post-inc line=\"1\"><primary line=\"1\">i"
-                             + "</primary></post-inc></iter><primary line=\"2\">__END__</primary></for>" );
-   }
-
-   @Test
-   public void testSimpleForEach() throws TokenException
-   {
-      assertStatement( "1",
-                       "for each( var obj : Object in list ){ obj.print( i ); }",
-                       "<foreach line=\"1\"><var line=\"1\">"
-                             + "<name-type-init line=\"1\"><name line=\"1\""
-                             + ">obj</name><type line=\"1\">Object"
-                             + "</type></name-type-init></var><in line=\"1\">"
-                             + "<primary line=\"1\">list</primary></in>"
-                             + "<block line=\"1\"><dot line=\"1\">"
-                             + "<primary line=\"1\">obj</primary><call line=\"1\""
-                             + "><primary line=\"1\">print</primary>"
-                             + "<arguments line=\"1\"><primary line=\"1\">"
-                             + "i</primary></arguments></call></dot></block></foreach>" );
-
-      assertStatement( "1",
-                       "for each( obj in list ){}",
-                       "<foreach line=\"1\"><name line=\"1\">obj</name>"
-                             + "<in line=\"1\"><primary line=\"1\">list</primary>"
-                             + "</in><block line=\"1\"></block></foreach>" );
-
-      // assertStatement(
-      // "", "for each (var a:XML in classInfo..accessor) {}", "" );
-   }
-
-   @Test
-   public void testSimpleForIn() throws TokenException
-   {
-      assertStatement( "1",
-                       "for( var s : String in obj ){ trace( s, obj[ s ]); }",
-                       "<forin line=\"1\"><init line=\"1\">"
-                             + "<var-list line=\"1\"><name-type-init line=\"1\""
-                             + "><name line=\"1\">s</name>"
-                             + "<type line=\"1\">String</type></name-type-init>"
-                             + "</var-list></init><in line=\"1\"><primary line=\"1\""
-                             + ">obj</primary></in></forin>" );
-
-      assertStatement( "for in",
-                       "            for (p in events);",
-                       "<forin line=\"1\"><init line=\"1\">"
-                             + "<primary line=\"1\">p</primary></init><in line=\"1\""
-                             + "><primary line=\"1\">events</primary></in></forin>" );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestIfStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestIfStatement.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestIfStatement.java
deleted file mode 100644
index aecc7c2..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestIfStatement.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestIfStatement extends AbstractStatementTest
-{
-   @Test
-   public void testBug232() throws TokenException
-   {
-      assertStatement( "",
-                       "if (true || /* comment */!false) ) )",
-                       "<if line=\"1\"><condition line=\"1\"><or line=\"1\"><primary line=\"1\">"
-                             + "true</primary><op line=\"1\">||</op><not line=\"1\"><primary "
-                             + "line=\"1\">false</primary></not></or></condition><primary "
-                             + "line=\"1\">)</primary></if>" );
-   }
-
-   @Test
-   public void testIf() throws TokenException
-   {
-      assertStatement( "1",
-                       "if( true ){ trace( true ); }",
-                       "<if line=\"1\">"
-                             + "<condition line=\"1\">" + "<primary line=\"1\">true</primary></condition>"
-                             + "<block line=\"1\"><call line=\"1\">" + "<primary line=\"1\">trace"
-                             + "</primary><arguments line=\"1\">" + "<primary line=\"1\">true</primary>"
-                             + "</arguments></call></block></if>" );
-
-      assertStatement( "1",
-                       "if( \"i\" in oaderContext ){ }",
-                       "<if line=\"1\"><condition line=\"1\">"
-                             + "<relation line=\"1\"><primary line=\"1\">"
-                             + "\"i\"</primary><op line=\"1\">in</op>"
-                             + "<primary line=\"1\">oaderContext</primary>"
-                             + "</relation></condition><block line=\"1\"></block></if>" );
-
-      assertStatement( "internal",
-                       "if (col.mx_internal::contentSize) {col.mx_internal::_width = NaN;}",
-                       "<if line=\"1\"><condition line=\"1\">"
-                             + "<dot line=\"1\"><primary line=\"1\">col"
-                             + "</primary><dot line=\"1\"><primary line=\"1\">"
-                             + "mx_internal</primary><primary line=\"1\">contentSize"
-                             + "</primary></dot></dot></condition><block line=\"1\">"
-                             + "<dot line=\"1\"><primary line=\"1\">col"
-                             + "</primary><dot line=\"1\"><primary line=\"1\">"
-                             + "mx_internal</primary><assign line=\"1\">"
-                             + "<primary line=\"1\">_width</primary>"
-                             + "<op line=\"1\">=</op><primary line=\"1\">"
-                             + "NaN</primary></assign></dot></dot></block></if>" );
-   }
-
-   @Test
-   public void testIfElse() throws TokenException
-   {
-      assertStatement( "1",
-                       "if( true ){ trace( true ); } else { trace( false )}",
-                       "<if line=\"1\"><condition line=\"1\">"
-                             + "<primary line=\"1\">true" + "</primary></condition><block line=\"1\">"
-                             + "<call line=\"1\"><primary line=\"1\">trace"
-                             + "</primary><arguments line=\"1\">"
-                             + "<primary line=\"1\">true</primary></arguments>"
-                             + "</call></block><block line=\"1\">" + "<call line=\"1\">"
-                             + "<primary line=\"1\">trace</primary>" + "<arguments line=\"1\">"
-                             + "<primary line=\"1\">false</primary>" + "</arguments></call></block></if>" );
-   }
-
-   @Test
-   public void testIfWithArrayAccessor() throws TokenException
-   {
-      assertStatement( "",
-                       "if ( chart.getItemAt( 0 )[ xField ] > targetXFieldValue ){}",
-                       "<if line=\"1\"><condition line=\"1\"><dot line=\"1\""
-                             + "><primary line=\"1\">chart</primary><relation line=\"1\""
-                             + "><call line=\"1\"><primary line=\"1\""
-                             + ">getItemAt</primary><arguments line=\"1\"" + "><primary line=\"1\""
-                             + ">0</primary></arguments><array line=\"1\"" + "><primary line=\"1\""
-                             + ">xField</primary></array></call><op line=\"1\"" + ">&gt;</op><primary "
-                             + "line=\"1\">targetXFieldValue</primary>"
-                             + "</relation></dot></condition><block line=\"1\"" + "></block></if>" );
-   }
-
-   @Test
-   public void testIfWithEmptyStatement() throws TokenException
-   {
-      assertStatement( "1",
-                       "if( i++ ); ",
-                       "<if line=\"1\"><condition line=\"1\">"
-                             + "<post-inc line=\"1\"><primary line=\"1\">"
-                             + "i</primary></post-inc></condition><stmt-empty line=\"1\">;"
-                             + "</stmt-empty></if>" );
-   }
-
-   @Test
-   public void testIfWithoutBlock() throws TokenException
-   {
-      assertStatement( "1",
-                       "if( i++ ) trace( i ); ",
-                       "<if line=\"1\"><condition line=\"1\">"
-                             + "<post-inc line=\"1\"><primary line=\"1\">i"
-                             + "</primary></post-inc></condition><call line=\"1\">"
-                             + "<primary line=\"1\">trace</primary><arguments line=\"1\""
-                             + "><primary line=\"1\">i</primary>" + "</arguments></call></if>" );
-   }
-
-   @Test
-   public void testIfWithReturn() throws TokenException
-   {
-      assertStatement( "",
-                       "if ( true )return;",
-                       "<if line=\"1\"><condition line=\"1\"><primary line=\"1\""
-                             + ">true</primary></condition><return line=\"2\"" + "></return></if>" );
-
-      assertStatement( "",
-                       "if ( true )throw new Error();",
-                       "<if line=\"1\"><condition line=\"1\"><primary line=\"1\""
-                             + ">true</primary></condition><primary line=\"1\">" + "throw</primary></if>" );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestInterface.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestInterface.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestInterface.java
deleted file mode 100644
index 6cc46ae..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestInterface.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestInterface extends AbstractAs3ParserTest
-{
-   @Test
-   public void testExtends() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "public interface A extends B { } ",
-                            "<content line=\"2\"><interface line=\"2\">"
-                                  + "<name line=\"2\">A</name><mod-list line=\"2\">"
-                                  + "<mod line=\"2\">public</mod>"
-                                  + "</mod-list><extends line=\"2\">B</extends>"
-                                  + "<content line=\"2\"></content></interface></content>" );
-
-      assertPackageContent( "",
-                            "   public interface ITimelineEntryRenderer extends IFlexDisplayObject, IDataRenderer{}",
-                            "<content line=\"2\"><interface line=\"2\"><name line=\"2\""
-                                  + ">ITimelineEntryRenderer</name><mod-list line=\"2\">"
-                                  + "<mod line=\"2\">public</mod></mod-list><extends line=\"2\""
-                                  + ">IFlexDisplayObject</extends><extends line=\"2\">"
-                                  + "IDataRenderer</extends><content line=\"2\">"
-                                  + "</content></interface></content>" );
-   }
-
-   @Test
-   public void testInclude() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "public interface A extends B { include \"ITextFieldInterface.asz\" } ",
-                            "<content line=\"2\"><interface line=\"2\">"
-                                  + "<name line=\"2\">A</name><mod-list line=\"2\">"
-                                  + "<mod line=\"2\">public</mod></mod-list>" + "<extends line=\"2\">"
-                                  + "B</extends><content line=\"2\"><include line=\"2\">"
-                                  + "<primary line=\"2\">\"ITextFieldInterface.asz\"</primary>"
-                                  + "</include></content></interface></content>" );
-   }
-
-   private void assertPackageContent( final String message,
-                                      final String input,
-                                      final String expected ) throws TokenException
-   {
-      scn.setLines( new String[]
-      { "{",
-                  input,
-                  "}",
-                  "__END__" } );
-      asp.nextToken(); // first call
-      asp.nextToken(); // skip {
-      final String result = new ASTToXMLConverter().convert( asp.parsePackageContent() );
-      assertEquals( message,
-                    expected,
-                    result );
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestInterfaceContent.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestInterfaceContent.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestInterfaceContent.java
deleted file mode 100644
index 9c4508e..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestInterfaceContent.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestInterfaceContent extends AbstractAs3ParserTest
-{
-   @Test(timeout = 2)
-   public void testConditionalCompilation() throws TokenException
-   {
-      assertInterfaceContent( "with conditional compilation",
-
-                              "CONFIG::DEBUG { function output():String; } ",
-                              "<function line=\"2\"><name line=\"2\">"
-                                    + "output</name><parameter-list line=\"2\"></parameter-list>"
-                                    + "<type line=\"2\">String</type></function>" );
-
-   }
-
-   @Test
-   public void testImports() throws TokenException
-   {
-      assertInterfaceContent( "1",
-                              "import a.b.c;",
-                              "<import line=\"2\">a.b.c</import>" );
-
-      assertInterfaceContent( "2",
-                              "import a.b.c import x.y.z",
-                              "<import line=\"2\">a.b.c</import>"
-                                    + "<import line=\"2\">x.y.z</import>" );
-   }
-
-   @Test
-   public void testMethods() throws TokenException
-   {
-      assertInterfaceContent( "1",
-                              "function a()",
-                              "<function line=\"3\">"
-                                    + "<name line=\"2\">a</name>"
-                                    + "<parameter-list line=\"2\">"
-                                    + "</parameter-list><type line=\"3\">"
-                                    + "</type></function>" );
-
-      assertInterfaceContent( "2",
-                              "function set a( value : int ) : void",
-                              "<set line=\"3\"><name line=\"2\">a"
-                                    + "</name><parameter-list line=\"2\">"
-                                    + "<parameter line=\"2\">"
-                                    + "<name-type-init line=\"2\">"
-                                    + "<name line=\"2\">value</name>"
-                                    + "<type line=\"2\">int</type>"
-                                    + "</name-type-init></parameter></parameter-list>"
-                                    + "<type line=\"2\">void</type></set>" );
-
-      assertInterfaceContent( "3",
-                              "function get a() : int",
-                              "<get line=\"3\"><name line=\"2\">a"
-                                    + "</name><parameter-list line=\"2\">"
-                                    + "</parameter-list><type line=\"2\">int" + "</type></get>" );
-   }
-
-   private void assertInterfaceContent( final String message,
-                                        final String input,
-                                        final String expected ) throws TokenException
-   {
-      scn.setLines( new String[]
-      { "{",
-                  input,
-                  "}",
-                  "__END__" } );
-      asp.nextToken(); // first call
-      asp.nextToken(); // skip {
-      final String result = new ASTToXMLConverter().convert( asp.parseInterfaceContent() );
-      assertEquals( message,
-                    "<content line=\"2\">"
-                          + expected + "</content>",
-                    result );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestPackageContent.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestPackageContent.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestPackageContent.java
deleted file mode 100644
index f81df13..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestPackageContent.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestPackageContent extends AbstractAs3ParserTest
-{
-   @Test
-   public void testClass() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "public class A { }",
-                            "<content line=\"2\"><class line=\"2\">"
-                                  + "<name line=\"2\">A</name><mod-list line=\"2\">"
-                                  + "<mod line=\"2\">public</mod>" + "</mod-list><content line=\"2\">"
-                                  + "</content></class></content>" );
-   }
-
-   @Test
-   public void testClassWithAsDoc() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "/** AsDoc */ public class A { }",
-                            "<content line=\"2\"><class line=\"2\">"
-                                  + "<as-doc line=\"2\">/** AsDoc */</as-doc><name line=\"2\""
-                                  + ">A</name><mod-list line=\"2\"><mod line=\"2\""
-                                  + ">public</mod></mod-list><content line=\"2\">"
-                                  + "</content></class></content>" );
-   }
-
-   @Test
-   public void testClassWithAsDocComplex() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "/** AsDoc */ public class A { "
-                                  + "/** Member */ " + "public var tmp : Number; "
-                                  + "private var tmp2 : int; " + "/** Function */ "
-                                  + "protected function foo() : void { } }",
-                            "<content line=\"2\"><class line=\"2\"><as-doc line=\"2\""
-                                  + ">/** AsDoc */</as-doc><name line=\"2\">A</name>"
-                                  + "<mod-list line=\"2\"><mod line=\"2\">public</mod>"
-                                  + "</mod-list><content line=\"2\"><var-list line=\"2\">"
-                                  + "<mod-list line=\"2\"><mod line=\"2\">public</mod>"
-                                  + "</mod-list><name-type-init line=\"2\"><name line=\"2\">tmp</name>"
-                                  + "<type line=\"2\">Number</type></name-type-init><as-doc line=\"2\""
-                                  + ">/** Member */</as-doc></var-list><var-list line=\"2\">"
-                                  + "<mod-list line=\"2\"><mod line=\"2\">private</mod></mod-list>"
-                                  + "<name-type-init line=\"2\"><name line=\"2\">tmp2</name>"
-                                  + "<type line=\"2\">int</type></name-type-init></var-list><function "
-                                  + "line=\"2\"><as-doc line=\"2\">/** Function */</as-doc>"
-                                  + "<mod-list line=\"2\"><mod line=\"2\">protected</mod></mod-list>"
-                                  + "<name line=\"2\">foo</name><parameter-list line=\"2\">"
-                                  + "</parameter-list><type line=\"2\">void</type><block line=\"2\""
-                                  + "></block></function></content></class></content>" );
-   }
-
-   @Test
-   public void testClassWithComment() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "/* lala */ /** asDoc */ public class A { }",
-                            "<content line=\"2\"><class line=\"2\">"
-                                  + "<as-doc line=\"2\">/** asDoc */</as-doc><multi-line-comment "
-                                  + "line=\"2\">/* lala */</multi-line-comment><name line=\"2\""
-                                  + ">A</name><mod-list line=\"2\"><mod line=\"2\""
-                                  + ">public</mod></mod-list><content line=\"2\">"
-                                  + "</content></class></content>" );
-   }
-
-   @Test
-   public void testClassWithMetadata() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "[Bindable(name=\"abc\", value=\"123\")] public class A { }",
-                            "<content line=\"2\"><class line=\"2\">"
-                                  + "<name line=\"2\">A</name><meta-list line=\"2\">" + "<meta line=\"2\""
-                                  + ">Bindable ( name = \"abc\" , value = \"123\" )</meta>"
-                                  + "</meta-list><mod-list line=\"2\">" + "<mod line=\"2\">public"
-                                  + "</mod></mod-list><content line=\"2\"></content></class></content>" );
-   }
-
-   @Test
-   public void testClassWithMetadataAsDoc() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "/** Comment */ [Bindable] public class A { }",
-                            "<content line=\"2\"><class line=\"2\"><as-doc line=\"2\">"
-                                  + "/** Comment */</as-doc><name line=\"2\">A</name><meta-list "
-                                  + "line=\"2\"><meta line=\"2\">Bindable</meta></meta-list><mod-list "
-                                  + "line=\"2\"><mod line=\"2\">public</mod></mod-list><content "
-                                  + "line=\"2\"></content></class></content>" );
-   }
-
-   @Test
-   public void testClassWithMetadataComment() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "/* Comment */ [Bindable] public class A { }",
-                            "<content line=\"2\"><class line=\"2\">"
-                                  + "<multi-line-comment line=\"2\">/* Comment */"
-                                  + "</multi-line-comment><name line=\"2\">A</name>"
-                                  + "<meta-list line=\"2\"><meta line=\"2\">"
-                                  + "Bindable</meta></meta-list><mod-list line=\"2\"><mod "
-                                  + "line=\"2\">public</mod></mod-list><content line=\"2\""
-                                  + "></content></class></content>" );
-   }
-
-   @Test
-   public void testClassWithMetadataWithComment() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "/* lala */ /** asDoc */ [Bindable] public class A { }",
-                            "<content line=\"2\"><class line=\"2\"><as-doc line=\"2\">"
-                                  + "/** asDoc */</as-doc><multi-line-comment line=\"2\">"
-                                  + "/* lala */</multi-line-comment><name line=\"2\">A</name>"
-                                  + "<meta-list line=\"2\"><meta line=\"2\">Bindable</meta>"
-                                  + "</meta-list><mod-list line=\"2\"><mod line=\"2\">public"
-                                  + "</mod></mod-list><content line=\"2\"></content></class></content>" );
-   }
-
-   @Test
-   public void testClassWithSimpleMetadata() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "[Bindable] public class A { }",
-                            "<content line=\"2\"><class line=\"2\"><name line=\"2\""
-                                  + ">A</name><meta-list line=\"2\"><meta line=\"2\""
-                                  + ">Bindable</meta></meta-list><mod-list line=\"2\">"
-                                  + "<mod line=\"2\">public</mod></mod-list><content line=\"2\""
-                                  + "></content></class></content>" );
-   }
-
-   @Test
-   public void testImports() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "import a.b.c;",
-                            "<content line=\"2\"><import line=\"2\""
-                                  + ">a.b.c</import></content>" );
-
-      assertPackageContent( "2",
-                            "import a.b.c import x.y.z",
-                            "<content line=\"2\"><import line=\"2\">a.b.c"
-                                  + "</import><import line=\"2\">x.y.z</import></content>" );
-   }
-
-   @Test
-   public void testInterface() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "public interface A { }",
-                            "<content line=\"2\"><interface line=\"2\">"
-                                  + "<name line=\"2\">A</name><mod-list line=\"2\">"
-                                  + "<mod line=\"2\">public</mod>" + "</mod-list><content line=\"2\">"
-                                  + "</content></interface></content>" );
-   }
-
-   @Test
-   public void testMethodPackages() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "public function a() : void { }",
-                            "<content line=\"2\"><function line=\"2\">"
-                                  + "<mod-list line=\"2\"><mod line=\"2\">public</mod>"
-                                  + "</mod-list><name line=\"2\">a</name><parameter-list line=\"2\""
-                                  + "></parameter-list><type line=\"2\">void</type>"
-                                  + "<block line=\"2\"></block></function></content>" );
-   }
-
-   @Test
-   public void testUse() throws TokenException
-   {
-      assertPackageContent( "1",
-                            "use namespace myNamespace",
-                            "<content line=\"2\"><use line=\"2\""
-                                  + ">myNamespace</use></content>" );
-   }
-
-   @Test
-   public void testUseNameSpace() throws TokenException
-   {
-      assertPackageContent( "FlexPMD-108",
-                            "use namespace mx_internal;",
-                            "<content line=\"2\"><use line=\"2\">mx_internal</use></content>" );
-   }
-
-   private void assertPackageContent( final String message,
-                                      final String input,
-                                      final String expected ) throws TokenException
-   {
-      scn.setLines( new String[]
-      { "{",
-                  input,
-                  "}",
-                  "__END__" } );
-      asp.nextToken(); // first call
-      asp.nextToken(); // skip {
-      final String result = new ASTToXMLConverter().convert( asp.parsePackageContent() );
-      assertEquals( message,
-                    expected,
-                    result );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestPrimaryExpression.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestPrimaryExpression.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestPrimaryExpression.java
deleted file mode 100644
index 0670bf6..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestPrimaryExpression.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestPrimaryExpression extends AbstractAs3ParserTest
-{
-   @Test
-   public void testArrayLiteral() throws TokenException
-   {
-      assertPrimary( "[1,2,3]",
-                     "<array line=\"1\"><primary line=\"1\">1"
-                           + "</primary><primary line=\"1\">2</primary>"
-                           + "<primary line=\"1\">3</primary></array>" );
-   }
-
-   @Test
-   public void testBooleans() throws TokenException
-   {
-      assertPrimary( "true" );
-      assertPrimary( "false" );
-   }
-
-   @Test
-   public void testFunctionLiteral() throws TokenException
-   {
-      assertPrimary( "function ( a : Object ) : * { trace('test'); }",
-                     "<lambda line=\"1\"><parameter-list line=\"1\">"
-                           + "<parameter line=\"1\"><name-type-init line=\"1\">"
-                           + "<name line=\"1\">a</name><type line=\"1\">"
-                           + "Object</type></name-type-init></parameter></parameter-list>"
-                           + "<type line=\"1\">*</type><block line=\"1\">"
-                           + "<call line=\"1\"><primary line=\"1\">trace</primary>"
-                           + "<arguments line=\"1\"><primary line=\"1\">'test'"
-                           + "</primary></arguments></call></block></lambda>" );
-   }
-
-   @Test
-   public void testNull() throws TokenException
-   {
-      assertPrimary( "null" );
-   }
-
-   @Test
-   public void testNumbers() throws TokenException
-   {
-      assertPrimary( "1" );
-      assertPrimary( "0xff" );
-      assertPrimary( "0777" );
-      assertPrimary( ".12E5" );
-   }
-
-   @Test
-   public void testObjectLiteral() throws TokenException
-   {
-      assertPrimary( "{a:1,b:2}",
-                     "<object line=\"1\"><prop line=\"1\">"
-                           + "<name line=\"1\">a</name><value line=\"1\">"
-                           + "<primary line=\"1\">1</primary></value></prop><prop line=\"1\">"
-                           + "<name line=\"1\">b</name><value line=\"1\">"
-                           + "<primary line=\"1\">2</primary></value></prop></object>" );
-   }
-
-   @Test
-   public void testStrings() throws TokenException
-   {
-      assertPrimary( "\"string\"" );
-      assertPrimary( "'string'" );
-   }
-
-   @Test
-   public void testUndefined() throws TokenException
-   {
-      assertPrimary( "undefined" );
-   }
-
-   private void assertPrimary( final String input ) throws TokenException
-   {
-      assertPrimary( input,
-                     input );
-   }
-
-   private void assertPrimary( final String input,
-                               final String expected ) throws TokenException
-   {
-      scn.setLines( new String[]
-      { input,
-                  "__END__" } );
-      asp.nextToken();
-      final String result = new ASTToXMLConverter().convert( asp.parsePrimaryExpression() );
-      assertEquals( "unexpected",
-                    "<primary line=\"1\">"
-                          + expected + "</primary>",
-                    result );
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestReturnStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestReturnStatement.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestReturnStatement.java
deleted file mode 100644
index f1dd833..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestReturnStatement.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestReturnStatement extends AbstractStatementTest
-{
-   @Test
-   public void testEmptyReturn() throws TokenException
-   {
-      assertStatement( "1",
-                       "return",
-                       "<return line=\"2\"></return>" );
-
-      assertStatement( "2",
-                       "return;",
-                       "<return line=\"2\"></return>" );
-   }
-
-   @Test
-   public void testFlexPMD181a() throws TokenException
-   {
-      assertStatement( "1",
-                       "return (str1 === str2);",
-                       "<return line=\"1\"><primary line=\"1\"><encapsulated line=\"1\">"
-                             + "<equality line=\"1\"><primary line=\"1\">str1</primary><op line=\"1\">"
-                             + "===</op><primary line=\"1\">str2</primary></equality>"
-                             + "</encapsulated></primary></return>" );
-   }
-
-   @Test
-   public void testFlexPMD181b() throws TokenException
-   {
-      assertStatement( "1",
-                       "return testString(str, /^[a-zA-Z\\s]*$/);",
-                       "<return line=\"1\"><call line=\"1\"><primary line=\"1\">testString"
-                             + "</primary><arguments line=\"1\"><primary line=\"1\">str</primary>"
-                             + "<primary line=\"1\">/^[a-zA-Z\\s]*$/</primary></arguments></call></return>" );
-   }
-
-   @Test
-   public void testReturnArrayLiteral() throws TokenException
-   {
-      assertStatement( "1",
-                       "return []",
-                       "<return line=\"1\"><primary line=\"1\">"
-                             + "<array line=\"1\"></array></primary></return>" );
-      assertStatement( "2",
-                       "return [];",
-                       "<return line=\"1\"><primary line=\"1\">"
-                             + "<array line=\"1\"></array></primary></return>" );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestSwitchStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestSwitchStatement.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestSwitchStatement.java
deleted file mode 100644
index 89ce628..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestSwitchStatement.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestSwitchStatement extends AbstractStatementTest
-{
-   @Test
-   public void testFullFeatured() throws TokenException
-   {
-      assertStatement( "1",
-                       "switch( x ){ case 1 : trace('one'); break; default : trace('unknown'); }",
-                       "<switch line=\"1\"><condition line=\"1\">"
-                             + "<primary line=\"1\">x</primary>" + "</condition><cases line=\"1\">"
-                             + "<case line=\"1\"><primary line=\"1\">1</primary>"
-                             + "<switch-block line=\"1\"><call line=\"1\">"
-                             + "<primary line=\"1\">trace</primary><arguments line=\"1\">"
-                             + "<primary line=\"1\">'one'</primary></arguments>"
-                             + "</call><primary line=\"1\">break</primary>"
-                             + "</switch-block></case><case line=\"1\">" + "<default line=\"1\">"
-                             + "default</default><switch-block line=\"1\">"
-                             + "<call line=\"1\"><primary line=\"1\">trace" + "</primary>"
-                             + "<arguments line=\"1\">" + "<primary line=\"1\">'unknown'</primary>"
-                             + "</arguments></call></switch-block></case></cases></switch>" );
-      assertStatement( "1",
-                       "switch( x ){ case 1 : break; default:}",
-                       "<switch line=\"1\"><condition line=\"1\"><primary line=\"1\""
-                             + ">x</primary></condition><cases line=\"1\"><case line=\"1\""
-                             + "><primary line=\"1\">1</primary><switch-block line=\"1\""
-                             + "><primary line=\"1\">break</primary></switch-block></case>"
-                             + "<case line=\"1\"><default line=\"1\">default</default>"
-                             + "<switch-block line=\"1\"></switch-block></case></cases></switch>" );
-
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestTryCatchFinallyStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestTryCatchFinallyStatement.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestTryCatchFinallyStatement.java
deleted file mode 100644
index 45da07e..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestTryCatchFinallyStatement.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestTryCatchFinallyStatement extends AbstractStatementTest
-{
-   @Test
-   public void testCatch() throws TokenException
-   {
-      assertStatement( "1",
-                       "catch( e : Error ) {trace( true ); }",
-                       "<catch line=\"1\"><name line=\"1\">e"
-                             + "</name><type line=\"1\">Error</type><block line=\"1\">"
-                             + "<call line=\"1\"><primary line=\"1\">trace</primary>"
-                             + "<arguments line=\"1\"><primary line=\"1\">true"
-                             + "</primary></arguments></call></block></catch>" );
-   }
-
-   @Test
-   public void testFinally() throws TokenException
-   {
-      assertStatement( "1",
-                       "finally {trace( true ); }",
-                       "<finally line=\"1\"><block line=\"1\">"
-                             + "<call line=\"1\"><primary line=\"1\">"
-                             + "trace</primary><arguments line=\"1\"><primary line=\"1\">"
-                             + "true</primary></arguments></call></block></finally>" );
-   }
-
-   @Test
-   public void testTry() throws TokenException
-   {
-      assertStatement( "1",
-                       "try {trace( true ); }",
-                       "<try line=\"1\"><block line=\"1\">"
-                             + "<call line=\"1\"><primary line=\"1\">"
-                             + "trace</primary><arguments line=\"1\"><primary line=\"1\">"
-                             + "true</primary></arguments></call></block></try>" );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestUnaryExpression.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestUnaryExpression.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestUnaryExpression.java
deleted file mode 100644
index 41ca8d2..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestUnaryExpression.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestUnaryExpression extends AbstractStatementTest
-{
-   @Test
-   public void testArrayAccess() throws TokenException
-   {
-      assertStatement( "1",
-                       "x[0]",
-                       "<arr-acc line=\"1\"><primary line=\"1\">x<"
-                             + "/primary><primary line=\"1\">0</primary></arr-acc>" );
-   }
-
-   @Test
-   public void testComplex() throws TokenException
-   {
-      assertStatement( "1",
-                       "a.b['c'].d.e(1)",
-                       "<dot line=\"1\"><primary line=\"1\">a"
-                             + "</primary><dot line=\"1\"><arr-acc line=\"1\">"
-                             + "<primary line=\"1\">b</primary><primary line=\"1\">"
-                             + "'c'</primary></arr-acc><dot line=\"1\"><primary line=\"1\">"
-                             + "d</primary><call line=\"1\"><primary line=\"1\">e"
-                             + "</primary><arguments line=\"1\"><primary line=\"1\">1"
-                             + "</primary></arguments></call></dot></dot></dot>" );
-
-      assertStatement( "2",
-                       "a.b['c']['d'].e(1)",
-                       "<dot line=\"1\"><primary line=\"1\">a"
-                             + "</primary><dot line=\"1\"><arr-acc line=\"1\">"
-                             + "<primary line=\"1\">b</primary><primary line=\"1\">"
-                             + "'c'</primary><primary line=\"1\">'d'</primary>"
-                             + "</arr-acc><call line=\"1\"><primary line=\"1\">"
-                             + "e</primary><arguments line=\"1\"><primary line=\"1\">1"
-                             + "</primary></arguments></call></dot></dot>" );
-   }
-
-   @Test
-   public void testMethodCall() throws TokenException
-   {
-      assertStatement( "1",
-                       "method()",
-                       "<call line=\"1\"><primary line=\"1\">"
-                             + "method</primary><arguments line=\"1\"></arguments></call>" );
-
-      assertStatement( "2",
-                       "method( 1, \"two\" )",
-                       "<call line=\"1\"><primary line=\"1\">"
-                             + "method</primary><arguments line=\"1\"><primary line=\"1\">1"
-                             + "</primary><primary line=\"1\">\"two\"</primary></arguments></call>" );
-   }
-
-   @Test
-   public void testMultipleMethodCall() throws TokenException
-   {
-      assertStatement( "1",
-                       "method()()",
-                       "<call line=\"1\"><primary line=\"1\">"
-                             + "method</primary><arguments line=\"1\"></arguments>"
-                             + "<arguments line=\"1\"></arguments></call>" );
-   }
-
-   @Test
-   public void testParseUnaryExpressions() throws TokenException
-   {
-      assertStatement( "1",
-                       "++x",
-                       "<pre-inc line=\"1\"><primary line=\"1\">x</primary></pre-inc>" );
-      assertStatement( "2",
-                       "x++",
-                       "<post-inc line=\"2\"><primary line=\"1\">x</primary></post-inc>" );
-      assertStatement( "3",
-                       "--x",
-                       "<pre-dec line=\"1\"><primary line=\"1\">x</primary></pre-dec>" );
-      assertStatement( "4",
-                       "x--",
-                       "<post-dec line=\"2\"><primary line=\"1\">x</primary></post-dec>" );
-      assertStatement( "5",
-                       "+x",
-                       "<plus line=\"1\"><primary line=\"1\">x</primary></plus>" );
-      assertStatement( "6",
-                       "+ x",
-                       "<plus line=\"1\"><primary line=\"1\">x</primary></plus>" );
-      assertStatement( "7",
-                       "-x",
-                       "<minus line=\"1\"><primary line=\"1\">x</primary></minus>" );
-      assertStatement( "8",
-                       "- x",
-                       "<minus line=\"1\"><primary line=\"1\">x</primary></minus>" );
-      assertStatement( "9",
-                       "delete x",
-                       "<delete line=\"1\"><primary line=\"1\">x</primary></delete>" );
-      assertStatement( "a",
-                       "void x",
-                       "<void line=\"1\"><primary line=\"1\">x</primary></void>" );
-      assertStatement( "b",
-                       "typeof x",
-                       "<typeof line=\"1\"><primary line=\"1\">x</primary></typeof>" );
-      assertStatement( "c",
-                       "! x",
-                       "<not line=\"1\"><primary line=\"1\">x</primary></not>" );
-      assertStatement( "d",
-                       "~ x",
-                       "<b-not line=\"1\"><primary line=\"1\">x</primary></b-not>" );
-      assertStatement( "e",
-                       "x++",
-                       "<post-inc line=\"2\"><primary line=\"1\">x</primary></post-inc>" );
-      assertStatement( "f",
-                       "x--",
-                       "<post-dec line=\"2\"><primary line=\"1\">x</primary></post-dec>" );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestVarStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestVarStatement.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestVarStatement.java
deleted file mode 100644
index baa9584..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestVarStatement.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestVarStatement extends AbstractStatementTest
-{
-   @Test
-   public void testFlexPMD211() throws TokenException
-   {
-      assertStatement( "",
-                       "var a:Vector.<String> = new Vector.<String>();\nvar i:int;",
-                       "<var-list line=\"1\"><name-type-init line=\"1\"><name line=\"1\">a</name>"
-                             + "<vector line=\"1\"><type line=\"1\">String</type></vector>"
-                             + "<init line=\"1\"><new line=\"1\"><primary line=\"1\">Vector</primary>"
-                             + "<vector line=\"1\"><vector line=\"1\"><type line=\"1\">String</type>"
-                             + "</vector></vector><arguments line=\"1\"></arguments></new></init>"
-                             + "</name-type-init></var-list>" );
-   }
-
-   @Test
-   public void testFullFeaturedVar() throws TokenException
-   {
-      assertStatement( "1",
-                       "var a : int = 4",
-                       "<var-list line=\"1\">"
-                             + "<name-type-init line=\"1\">"
-                             + "<name line=\"1\">a</name><type line=\"1\">int</type>"
-                             + "<init line=\"1\"><primary line=\"1\">4</primary>"
-                             + "</init></name-type-init></var-list>" );
-
-      assertStatement( "1",
-                       "var a : int = 4, b : int = 2;",
-                       "<var-list line=\"1\"><name-type-init line=\"1\">"
-                             + "<name line=\"1\">a</name><type line=\"1\">int</type>"
-                             + "<init line=\"1\"><primary line=\"1\">4</primary></init>"
-                             + "</name-type-init><name-type-init line=\"1\">"
-                             + "<name line=\"1\">b</name><type line=\"1\">int</type>"
-                             + "<init line=\"1\"><primary line=\"1\">2</primary></init>"
-                             + "</name-type-init></var-list>" );
-
-      assertStatement( "with array",
-                       "var colors:Array = [0x2bc9f6, 0x0086ad];",
-                       "<var-list line=\"1\">"
-                             + "<name-type-init line=\"1\">"
-                             + "<name line=\"1\">colors</name><type line=\"1\">Array</type>"
-                             + "<init line=\"1\">" + "<primary line=\"1\"><array line=\"1\">"
-                             + "<primary line=\"1\">0x2bc9f6</primary>"
-                             + "<primary line=\"1\">0x0086ad</primary>"
-                             + "</array></primary></init></name-type-init></var-list>" );
-   }
-
-   @Test
-   public void testInitializedVar() throws TokenException
-   {
-      assertStatement( "1",
-                       "var a = 4",
-                       "<var-list line=\"1\"><name-type-init line=\"1\">"
-                             + "<name line=\"1\">a</name><type line=\"1\">"
-                             + "</type><init line=\"1\"><primary line=\"1\">4</primary>"
-                             + "</init></name-type-init></var-list>" );
-   }
-
-   @Test
-   public void testSimpleVar() throws TokenException
-   {
-      assertStatement( "1",
-                       "var a",
-                       "<var-list line=\"1\"><name-type-init line=\"1\">"
-                             + "<name line=\"1\">a</name><type line=\"2\">"
-                             + "</type></name-type-init></var-list>" );
-   }
-
-   @Test
-   public void testTypedVar() throws TokenException
-   {
-      assertStatement( "1",
-                       "var a : Object",
-                       "<var-list line=\"1\"><name-type-init line=\"1\">"
-                             + "<name line=\"1\">a</name><type line=\"1\">Object</type>"
-                             + "</name-type-init></var-list>" );
-   }
-
-   @Test
-   public void testVector() throws TokenException
-   {
-      assertStatement( "vector",
-                       "var v:Vector.<DisplayObject> = new Vector.<Sprite>();",
-                       "<var-list line=\"1\"><name-type-init line=\"1\"><name line=\"1\">v</name><vector line=\"1\"><type line=\"1\">DisplayObject</type></vector><init line=\"1\"><new line=\"1\"><primary line=\"1\">Vector</primary><vector line=\"1\"><vector line=\"1\"><type line=\"1\">Sprite</type></vector></vector><arguments line=\"1\"></arguments></new></init></name-type-init></var-list>" );
-
-      assertStatement( "vector",
-                       "var v:Vector.< Vector.< String > >",
-                       "<var-list line=\"1\"><name-type-init line=\"1\">"
-                             + "<name line=\"1\">" + "v</name><vector line=\"1\"><vector line=\"1\""
-                             + "><type line=\"1\""
-                             + ">String</type></vector></vector></name-type-init></var-list>" );
-
-      assertStatement( "vector",
-                       "var v:Vector.<Vector.<String>>;",
-                       "<var-list line=\"1\"><name-type-init line=\"1\">"
-                             + "<name line=\"1\">"
-                             + "v</name><vector line=\"1\"><vector line=\"1\"><type line=\"1\""
-                             + ">String</type></vector></vector></name-type-init></var-list>" );
-
-      assertStatement( "",
-                       "var HT:Vector.<BitString> = new Vector.<BitString>(251, true);",
-                       "<var-list line=\"1\"><name-type-init line=\"1\"><name line=\"1\">HT</name><vector line=\"1\"><type line=\"1\">BitString</type></vector><init line=\"1\"><new line=\"1\"><primary line=\"1\">Vector</primary><vector line=\"1\"><vector line=\"1\"><type line=\"1\">BitString</type></vector></vector><arguments line=\"1\"><primary line=\"1\">251</primary><primary line=\"1\">true</primary></arguments></new></init></name-type-init></var-list>" );
-   }
-}


[21/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/.pmd b/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/.pmd
new file mode 100644
index 0000000..b5adf0f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/.pmd
@@ -0,0 +1,975 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<pmd>
+    <useProjectRuleSet>false</useProjectRuleSet>
+    <ruleSetFile>.ruleset</ruleSetFile>
+    <rules>
+        <rule>
+            <name>LooseCoupling</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloneMethodMustImplementCloneable</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedImports</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SignatureDeclareThrowsException</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IfStmtsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>WhileLoopsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IfElseStmtsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ForLoopsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseSingleton</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanReturns</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanExpressions</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SwitchStmtsShouldHaveDefault</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDeeplyNestedIfStmts</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidReassigningParameters</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SwitchDensity</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConstructorCallsOverridableMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AccessorClassGeneration</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalFieldCouldBeStatic</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloseResource</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonStaticInitializer</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DefaultLabelNotLastInSwitchStmt</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonCaseLabelInSwitchStatement</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OptimizableToArrayCall</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BadComparison</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EqualsNull</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConfusingTernary</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InstantiationToGetClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IdempotentOperations</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimpleDateFormatNeedsLocale</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ImmutableField</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseLocaleWithCaseConversions</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidProtectedFieldInFinalClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AssignmentToNonFinalStatic</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingStaticMethodInNonInstantiatableClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidSynchronizedAtMethodLevel</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingBreakInSwitch</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseNotifyAllInsteadOfNotify</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidInstanceofChecksInCatchClause</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractClassWithoutAbstractMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyConditional</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CompareObjectsWithEquals</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PositionLiteralsFirstInComparisons</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryLocalBeforeReturn</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonThreadSafeSingleton</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UncommentedEmptyMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UncommentedEmptyConstructor</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidConstantsInterface</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnsynchronizedStaticDateFormatter</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PreserveStackTrace</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseCollectionIsEmpty</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassWithOnlyPrivateConstructorsShouldBeFinal</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyMethodInAbstractClassShouldBeAbstract</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SingularField</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReturnEmptyArrayRatherThanNull</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractClassWithoutAnyMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooFewBranchesForASwitchStatement</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCatchingThrowable</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SignatureDeclareThrowsException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExceptionAsFlowControl</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCatchingNPE</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingRawExceptionTypes</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingNullPointerException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidRethrowingException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotExtendJavaLangError</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotThrowExceptionInFinally</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingNewInstanceOfSameException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedPrivateField</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedLocalVariable</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedPrivateMethod</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedFormalParameter</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MoreThanOneLogger</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LoggerIsNotStaticFinal</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SystemPrintln</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidPrintStackTrace</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDuplicateLiterals</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringInstantiation</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringToString</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InefficientStringBuffering</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryCaseChange</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseStringBufferLength</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AppendCharacterWithChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConsecutiveLiteralAppends</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseIndexOfChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InefficientEmptyStringCheck</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InsufficientStringBufferDeclaration</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessStringValueOf</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringBufferInstantiationWithChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseEqualsToCompareStrings</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidStringBufferField</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceVectorWithList</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceHashtableWithMap</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceEnumerationWithIterator</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidEnumAsIdentifier</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidAssertAsIdentifier</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IntegerInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ByteInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LongInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseBeforeAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseAfterAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseTestAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4SuitesShouldUseSuiteAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitUseExpected</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseProperClassLoader</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MDBAndSessionBeanNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>RemoteSessionInterfaceNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalInterfaceSessionNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalHomeNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>RemoteInterfaceNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotCallSystemExit</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StaticEJBFieldShouldBeFinal</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotUseThreads</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalVariableCouldBeFinal</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodArgumentCouldBeFinal</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidInstantiatingObjectsInLoops</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseArrayListInsteadOfVector</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyStartsWith</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseStringBufferForStringAppends</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseArraysAsList</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidArrayLoops</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryWrapperObjectCreation</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AddEmptyString</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyCatchBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyIfStmt</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyWhileStmt</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyTryBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyFinallyBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptySwitchStatements</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JumbledIncrementer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ForLoopShouldBeWhileLoop</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryConversionTemporary</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OverrideBothEqualsAndHashcode</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoubleCheckedLocking</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReturnFromFinallyBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptySynchronizedBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryReturn</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyStaticInitializer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnconditionalIfStatement</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyStatementNotInLoop</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanInstantiation</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryFinalModifier</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CollapsibleIfStatements</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessOverridingMethod</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassCastExceptionWithToArray</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDecimalLiteralsInBigDecimalConstructor</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessOperationOnImmutable</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MisplacedNullCheck</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedNullCheckInEquals</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThreadGroup</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BrokenNullCheck</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BigIntegerInstantiation</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingOctalValues</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingHardCodedIP</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CheckResultSet</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidMultipleUnaryOperators</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyInitializer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodReturnsInternalArray</name>
+            <ruleset>Security Code Guidelines</ruleset>
+        </rule>
+        <rule>
+            <name>ArrayIsStoredDirectly</name>
+            <ruleset>Security Code Guidelines</ruleset>
+        </rule>
+        <rule>
+            <name>CouplingBetweenObjects</name>
+            <ruleset>Coupling Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveImports</name>
+            <ruleset>Coupling Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LooseCoupling</name>
+            <ruleset>Coupling Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DuplicateImports</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DontImportJavaLang</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedImports</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ImportFromSamePackage</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyStaticImports</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitStaticSuite</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitSpelling</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitAssertionsShouldIncludeMessage</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitTestsShouldIncludeAssert</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TestClassWithoutTestCases</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryBooleanAssertion</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertEqualsInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertSameInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertNullInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanAssertion</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NullAssignment</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OnlyOneReturn</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedModifier</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AssignmentInOperand</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AtLeastOneConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DontImportSun</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousOctalEscape</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CallSuperInConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryParentheses</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DefaultPackage</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanInversion</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DataflowAnomalyAnalysis</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFinalLocalVariable</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingShortType</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingVolatile</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingNativeCode</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidAccessibilityAlteration</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotCallGarbageCollectionExplicitly</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortVariable</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LongVariable</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>VariableNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractNaming</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDollarSigns</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodWithSameNameAsEnclosingClass</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousHashcodeMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousConstantFieldName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousEqualsMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFieldNameMatchingTypeName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFieldNameMatchingMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NoPackage</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PackageCase</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MisleadingVariableName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanGetMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NPathComplexity</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveMethodLength</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveParameterList</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveClassLength</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CyclomaticComplexity</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessivePublicCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyFields</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssMethodCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssTypeCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssConstructorCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyMethods</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyFinalizer</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeOnlyCallsSuperFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeOverloaded</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeDoesNotCallSuperFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeShouldBeProtected</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCallingFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseCorrectExceptionLogging</name>
+            <ruleset>Jakarta Commons Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ProperLogger</name>
+            <ruleset>Jakarta Commons Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BeanMembersShouldSerialize</name>
+            <ruleset>JavaBean Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingSerialVersionUID</name>
+            <ruleset>JavaBean Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ProperCloneImplementation</name>
+            <ruleset>Clone Implementation Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloneThrowsCloneNotSupportedException</name>
+            <ruleset>Clone Implementation Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloneMethodMustImplementCloneable</name>
+            <ruleset>Clone Implementation Rules</ruleset>
+        </rule>
+    </rules>
+    <includeDerivedFiles>false</includeDerivedFiles>
+    <violationsAsErrors>true</violationsAsErrors>
+</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/pom.xml
new file mode 100644
index 0000000..7cce253
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/pom.xml
@@ -0,0 +1,217 @@
+<!--
+
+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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-metrics-command-line</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Adobe Flex Metrics command line</name>
+
+    <properties>
+        <maven.jar.plugin.version>2.2</maven.jar.plugin.version>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>com.martiansoftware</groupId>
+            <artifactId>jsap</artifactId>
+            <version>${jsap.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <version>${project.version}</version>
+            <artifactId>flex-pmd-command-line-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>pmd</groupId>
+            <artifactId>pmd</artifactId>
+            <version>${pmd.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <version>${project.parent.version}</version>
+            <artifactId>flex-pmd-metrics</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <version>${project.parent.version}</version>
+            <artifactId>flex-pmd-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <version>${project.version}</version>
+            <artifactId>flex-pmd-files</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>as3-plugin-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>as3-parser</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>as3-parser-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>${commons-lang.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>flex-pmd-ruleset-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>dom4j</groupId>
+            <artifactId>dom4j</artifactId>
+            <version>${dom4j.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-test-resources</artifactId>
+            <version>${project.parent.version}</version>
+            <classifier>resources</classifier>
+            <type>zip</type>
+            <scope>provided</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+
+        <testResources>
+            <testResource>
+                <directory>${project.build.directory}/test/generated-resources</directory>
+            </testResource>
+        </testResources>
+
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-test-resources</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeGroupIds>${project.groupId}</includeGroupIds>
+                            <includes>**/*.as,**/*.mxml</includes>
+                            <outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
+                            <excludeTransitive>true</excludeTransitive>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>${maven.jar.plugin.version}</version>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>com.adobe.ac.pmd.metrics.commandline.FlexMetrics</mainClass>
+                            <packageName>com.adobe.ac.pmd.metrics.commandline</packageName>
+                            <addClasspath>true</addClasspath>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>${maven-antrun-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <id>package-ant-task</id>
+                        <phase>install</phase>
+                        <configuration>
+                            <tasks>
+                                <echo message="Building ant-task"/>
+                                <mkdir dir="${project.build.directory}/release"/>
+                                <echo message=""/>
+                                <echo message="Copying Flex Metrics dependencies..."/>
+                                <copy file="${project.build.directory}/${project.build.finalName}.jar"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:flex-pmd-command-line-api:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:as3-parser-api:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:as3-parser:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:flex-pmd-ruleset-api:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:flex-pmd-metrics:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:flex-pmd-files:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:as3-plugin-utils:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${dom4j:dom4j:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <echo message="Copying Command line dependencies..."/>
+                                <copy file="${pmd:pmd:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${commons-lang:commons-lang:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${com.martiansoftware:jsap:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <echo message="Extracting license..."/>
+                                <copy file="../../src/etc/header.txt"
+                                      tofile="${project.build.directory}/release/LICENSE.txt" overwrite="true"/>
+                                <echo message="Compressing zip..."/>
+                                <zip destfile="${project.build.directory}/${project.build.finalName}.zip"
+                                     basedir="${project.build.directory}/release" excludes="*.zip"/>
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/src/main/java/com/adobe/ac/pmd/metrics/commandline/FlexMetrics.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/src/main/java/com/adobe/ac/pmd/metrics/commandline/FlexMetrics.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/src/main/java/com/adobe/ac/pmd/metrics/commandline/FlexMetrics.java
new file mode 100644
index 0000000..13205e8
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/src/main/java/com/adobe/ac/pmd/metrics/commandline/FlexMetrics.java
@@ -0,0 +1,126 @@
+/*
+ * 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.metrics.commandline;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import net.sourceforge.pmd.PMDException;
+import net.sourceforge.pmd.cpd.ReportException;
+
+import org.dom4j.DocumentException;
+
+import com.adobe.ac.pmd.CommandLineOptions;
+import com.adobe.ac.pmd.CommandLineUtils;
+import com.adobe.ac.pmd.LoggerUtils;
+import com.martiansoftware.jsap.JSAP;
+import com.martiansoftware.jsap.JSAPException;
+import com.martiansoftware.jsap.JSAPResult;
+import com.martiansoftware.jsap.UnspecifiedParameterException;
+
+public final class FlexMetrics
+{
+   private static JSAPResult   config;
+   private static final Logger LOGGER = Logger.getLogger( FlexMetrics.class.getName() );
+
+   public static void main( final String[] args ) throws JSAPException,
+                                                 URISyntaxException,
+                                                 IOException,
+                                                 ReportException,
+                                                 PMDException,
+                                                 DocumentException
+   {
+      new LoggerUtils().loadConfiguration();
+      startFlexMetrics( args );
+      LOGGER.info( "FlexMetrics terminated" );
+      System.exit( 0 ); // NOPMD
+   }
+
+   static boolean areCommandLineOptionsCorrect( final String[] args ) throws JSAPException
+   {
+      final JSAP jsap = new JSAP();
+      config = parseCommandLineArguments( args,
+                                          jsap );
+
+      if ( !config.success() )
+      {
+         LOGGER.log( Level.SEVERE,
+                     "Usage: java "
+                           + FlexMetrics.class.getName() + " " + jsap.getUsage() );
+      }
+
+      return config.success();
+   }
+
+   static double getDoubleParameter( final CommandLineOptions option )
+   {
+      return config.getDouble( option.toString() );
+   }
+
+   static String getParameterValue( final CommandLineOptions option )
+   {
+      return config.getString( option.toString() );
+   }
+
+   static boolean startFlexMetrics( final String[] args ) throws JSAPException,
+                                                         PMDException,
+                                                         URISyntaxException,
+                                                         IOException,
+                                                         DocumentException
+   {
+      if ( areCommandLineOptionsCorrect( args ) )
+      {
+         final File sourceDirectory = new File( getParameterValue( CommandLineOptions.SOURCE_DIRECTORY ) );
+         final File outputDirectory = new File( getParameterValue( CommandLineOptions.OUTPUT ) );
+         double mxmlFactor = 0;
+         try
+         {
+            mxmlFactor = getDoubleParameter( CommandLineOptions.MXML_FACTOR );
+         }
+         catch ( final UnspecifiedParameterException e )
+         {
+         }
+
+         new com.adobe.ac.pmd.metrics.engine.FlexMetrics( sourceDirectory, mxmlFactor ).execute( outputDirectory );
+      }
+
+      return config.success();
+   }
+
+   private static JSAPResult parseCommandLineArguments( final String[] args,
+                                                        final JSAP jsap ) throws JSAPException
+   {
+      CommandLineUtils.registerParameter( jsap,
+                                          CommandLineOptions.SOURCE_DIRECTORY,
+                                          true );
+      CommandLineUtils.registerParameter( jsap,
+                                          CommandLineOptions.MXML_FACTOR,
+                                          false );
+      CommandLineUtils.registerParameter( jsap,
+                                          CommandLineOptions.OUTPUT,
+                                          true );
+
+      return jsap.parse( args );
+   }
+
+   private FlexMetrics()
+   {
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/src/main/test/com/adobe/ac/pmd/metrics/commandline/FlexMetricsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/src/main/test/com/adobe/ac/pmd/metrics/commandline/FlexMetricsTest.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/src/main/test/com/adobe/ac/pmd/metrics/commandline/FlexMetricsTest.java
new file mode 100644
index 0000000..12febb8
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/src/main/test/com/adobe/ac/pmd/metrics/commandline/FlexMetricsTest.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.metrics.commandline;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.util.logging.Logger;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+
+public class FlexMetricsTest extends FlexPmdTestBase
+{
+   @Test
+   public void testStartFlexMetrics()
+   {
+      try
+      {
+         final File outputFile = File.createTempFile( "metrics",
+                                                      "" );
+         FlexMetrics.startFlexMetrics( new String[]
+         { "-s",
+                     getTestDirectory().getAbsolutePath(),
+                     "-o",
+                     outputFile.getAbsolutePath() } );
+
+         assertTrue( "outputFile has not been created",
+                     outputFile.exists() );
+         assertTrue( "outputFile is empty",
+                     outputFile.length() > 0 );
+      }
+      catch ( final Exception e )
+      {
+         Logger.getAnonymousLogger().warning( e.getMessage() );
+         fail();
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/src/test/java/com/adobe/ac/pmd/metrics/commandline/FlexMetricsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/src/test/java/com/adobe/ac/pmd/metrics/commandline/FlexMetricsTest.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/src/test/java/com/adobe/ac/pmd/metrics/commandline/FlexMetricsTest.java
new file mode 100644
index 0000000..12febb8
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-command-line/src/test/java/com/adobe/ac/pmd/metrics/commandline/FlexMetricsTest.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.metrics.commandline;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.util.logging.Logger;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+
+public class FlexMetricsTest extends FlexPmdTestBase
+{
+   @Test
+   public void testStartFlexMetrics()
+   {
+      try
+      {
+         final File outputFile = File.createTempFile( "metrics",
+                                                      "" );
+         FlexMetrics.startFlexMetrics( new String[]
+         { "-s",
+                     getTestDirectory().getAbsolutePath(),
+                     "-o",
+                     outputFile.getAbsolutePath() } );
+
+         assertTrue( "outputFile has not been created",
+                     outputFile.exists() );
+         assertTrue( "outputFile is empty",
+                     outputFile.length() > 0 );
+      }
+      catch ( final Exception e )
+      {
+         Logger.getAnonymousLogger().warning( e.getMessage() );
+         fail();
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/.pmd b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/.pmd
new file mode 100644
index 0000000..b5adf0f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-maven-plugin/.pmd
@@ -0,0 +1,975 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<pmd>
+    <useProjectRuleSet>false</useProjectRuleSet>
+    <ruleSetFile>.ruleset</ruleSetFile>
+    <rules>
+        <rule>
+            <name>LooseCoupling</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloneMethodMustImplementCloneable</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedImports</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SignatureDeclareThrowsException</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IfStmtsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>WhileLoopsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IfElseStmtsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ForLoopsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseSingleton</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanReturns</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanExpressions</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SwitchStmtsShouldHaveDefault</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDeeplyNestedIfStmts</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidReassigningParameters</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SwitchDensity</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConstructorCallsOverridableMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AccessorClassGeneration</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalFieldCouldBeStatic</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloseResource</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonStaticInitializer</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DefaultLabelNotLastInSwitchStmt</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonCaseLabelInSwitchStatement</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OptimizableToArrayCall</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BadComparison</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EqualsNull</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConfusingTernary</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InstantiationToGetClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IdempotentOperations</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimpleDateFormatNeedsLocale</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ImmutableField</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseLocaleWithCaseConversions</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidProtectedFieldInFinalClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AssignmentToNonFinalStatic</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingStaticMethodInNonInstantiatableClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidSynchronizedAtMethodLevel</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingBreakInSwitch</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseNotifyAllInsteadOfNotify</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidInstanceofChecksInCatchClause</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractClassWithoutAbstractMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyConditional</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CompareObjectsWithEquals</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PositionLiteralsFirstInComparisons</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryLocalBeforeReturn</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonThreadSafeSingleton</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UncommentedEmptyMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UncommentedEmptyConstructor</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidConstantsInterface</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnsynchronizedStaticDateFormatter</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PreserveStackTrace</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseCollectionIsEmpty</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassWithOnlyPrivateConstructorsShouldBeFinal</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyMethodInAbstractClassShouldBeAbstract</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SingularField</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReturnEmptyArrayRatherThanNull</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractClassWithoutAnyMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooFewBranchesForASwitchStatement</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCatchingThrowable</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SignatureDeclareThrowsException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExceptionAsFlowControl</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCatchingNPE</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingRawExceptionTypes</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingNullPointerException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidRethrowingException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotExtendJavaLangError</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotThrowExceptionInFinally</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingNewInstanceOfSameException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedPrivateField</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedLocalVariable</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedPrivateMethod</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedFormalParameter</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MoreThanOneLogger</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LoggerIsNotStaticFinal</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SystemPrintln</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidPrintStackTrace</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDuplicateLiterals</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringInstantiation</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringToString</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InefficientStringBuffering</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryCaseChange</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseStringBufferLength</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AppendCharacterWithChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConsecutiveLiteralAppends</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseIndexOfChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InefficientEmptyStringCheck</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InsufficientStringBufferDeclaration</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessStringValueOf</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringBufferInstantiationWithChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseEqualsToCompareStrings</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidStringBufferField</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceVectorWithList</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceHashtableWithMap</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceEnumerationWithIterator</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidEnumAsIdentifier</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidAssertAsIdentifier</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IntegerInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ByteInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LongInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseBeforeAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseAfterAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseTestAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4SuitesShouldUseSuiteAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitUseExpected</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseProperClassLoader</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MDBAndSessionBeanNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>RemoteSessionInterfaceNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalInterfaceSessionNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalHomeNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>RemoteInterfaceNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotCallSystemExit</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StaticEJBFieldShouldBeFinal</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotUseThreads</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalVariableCouldBeFinal</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodArgumentCouldBeFinal</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidInstantiatingObjectsInLoops</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseArrayListInsteadOfVector</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyStartsWith</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseStringBufferForStringAppends</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseArraysAsList</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidArrayLoops</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryWrapperObjectCreation</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AddEmptyString</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyCatchBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyIfStmt</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyWhileStmt</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyTryBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyFinallyBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptySwitchStatements</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JumbledIncrementer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ForLoopShouldBeWhileLoop</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryConversionTemporary</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OverrideBothEqualsAndHashcode</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoubleCheckedLocking</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReturnFromFinallyBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptySynchronizedBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryReturn</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyStaticInitializer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnconditionalIfStatement</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyStatementNotInLoop</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanInstantiation</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryFinalModifier</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CollapsibleIfStatements</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessOverridingMethod</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassCastExceptionWithToArray</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDecimalLiteralsInBigDecimalConstructor</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessOperationOnImmutable</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MisplacedNullCheck</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedNullCheckInEquals</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThreadGroup</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BrokenNullCheck</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BigIntegerInstantiation</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingOctalValues</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingHardCodedIP</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CheckResultSet</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidMultipleUnaryOperators</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyInitializer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodReturnsInternalArray</name>
+            <ruleset>Security Code Guidelines</ruleset>
+        </rule>
+        <rule>
+            <name>ArrayIsStoredDirectly</name>
+            <ruleset>Security Code Guidelines</ruleset>
+        </rule>
+        <rule>
+            <name>CouplingBetweenObjects</name>
+            <ruleset>Coupling Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveImports</name>
+            <ruleset>Coupling Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LooseCoupling</name>
+            <ruleset>Coupling Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DuplicateImports</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DontImportJavaLang</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedImports</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ImportFromSamePackage</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyStaticImports</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitStaticSuite</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitSpelling</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitAssertionsShouldIncludeMessage</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitTestsShouldIncludeAssert</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TestClassWithoutTestCases</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryBooleanAssertion</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertEqualsInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertSameInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertNullInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanAssertion</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NullAssignment</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OnlyOneReturn</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedModifier</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AssignmentInOperand</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AtLeastOneConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DontImportSun</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousOctalEscape</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CallSuperInConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryParentheses</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DefaultPackage</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanInversion</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DataflowAnomalyAnalysis</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFinalLocalVariable</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingShortType</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingVolatile</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingNativeCode</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidAccessibilityAlteration</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotCallGarbageCollectionExplicitly</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortVariable</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LongVariable</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>VariableNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractNaming</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDollarSigns</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodWithSameNameAsEnclosingClass</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousHashcodeMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousConstantFieldName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousEqualsMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFieldNameMatchingTypeName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFieldNameMatchingMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NoPackage</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PackageCase</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MisleadingVariableName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanGetMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NPathComplexity</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveMethodLength</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveParameterList</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveClassLength</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CyclomaticComplexity</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessivePublicCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyFields</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssMethodCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssTypeCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssConstructorCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyMethods</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyFinalizer</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeOnlyCallsSuperFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeOverloaded</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeDoesNotCallSuperFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeShouldBeProtected</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCallingFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseCorrectExceptionLogging</name>
+            <ruleset>Jakarta Commons Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ProperLogger</name>
+            <ruleset>Jakarta Commons Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BeanMembersShouldSerialize</name>
+            <ruleset>JavaBean Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingSerialVersionUID</name>
+            <ruleset>JavaBean Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ProperCloneImplementation</name>
+            <ruleset>Clone Implementation Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloneThrowsCloneNotSupportedException</name>
+            <ruleset>Clone Implementation Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloneMethodMustImplementCloneable</name>
+            <ruleset>Clone Implementation Rules</ruleset>
+        </rule>
+    </rules>
+    <includeDerivedFiles>false</includeDerivedFiles>
+    <violationsAsErrors>true</violationsAsErrors>
+</pmd>


[07/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

Posted by cd...@apache.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/cairngorm/BindableModelLocatorRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/BindableModelLocatorRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/BindableModelLocatorRuleTest.java
new file mode 100644
index 0000000..11f0379
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/BindableModelLocatorRuleTest.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.cairngorm;
+
+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 BindableModelLocatorRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "cairngorm.BindableModelLocator.as", new ViolationPosition[]
+      { new ViolationPosition( 33 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new BindableModelLocatorRule();
+   }
+}

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/cairngorm/CairngormEventDispatcherCallExplicitlyRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/CairngormEventDispatcherCallExplicitlyRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/CairngormEventDispatcherCallExplicitlyRuleTest.java
new file mode 100644
index 0000000..d6a1c0a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/CairngormEventDispatcherCallExplicitlyRuleTest.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.cairngorm;
+
+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 CairngormEventDispatcherCallExplicitlyRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+      { new ViolationPosition( 110 ),
+                  new ViolationPosition( 114 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new CairngormEventDispatcherCallExplicitlyRule();
+   }
+}

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/cairngorm/FatControllerRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/FatControllerRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/FatControllerRuleTest.java
new file mode 100644
index 0000000..89276a2
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/FatControllerRuleTest.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.cairngorm;
+
+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 FatControllerRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "cairngorm.FatController.as", new ViolationPosition[]
+      { new ViolationPosition( 95 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new FatControllerRule();
+   }
+}

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/cairngorm/ModelLocatorReferencedMoreThanOncePerClassRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/ModelLocatorReferencedMoreThanOncePerClassRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/ModelLocatorReferencedMoreThanOncePerClassRuleTest.java
new file mode 100644
index 0000000..59294b2
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/ModelLocatorReferencedMoreThanOncePerClassRuleTest.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.cairngorm;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class ModelLocatorReferencedMoreThanOncePerClassRuleTest extends
+                                                               ReferenceModelLocatorOutsideTheMainApplicationRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "UnboundMetadata.as", new ViolationPosition[]
+      { new ViolationPosition( 50 ) } ) };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new ModelLocatorReferencedMoreThanOncePerClassRule();
+   }
+}

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/cairngorm/ReferenceModelLocatorOutsideTheMainApplicationRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/ReferenceModelLocatorOutsideTheMainApplicationRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/ReferenceModelLocatorOutsideTheMainApplicationRuleTest.java
new file mode 100644
index 0000000..7853bf7
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/ReferenceModelLocatorOutsideTheMainApplicationRuleTest.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.cairngorm;
+
+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 ReferenceModelLocatorOutsideTheMainApplicationRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "UnboundMetadata.as", new ViolationPosition[]
+       { new ViolationPosition( 43 ),
+                   new ViolationPosition( 45 ),
+                   new ViolationPosition( 50 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.mxml.IterationsList.mxml",
+                                         new ViolationPosition[]
+                                         { new ViolationPosition( 91 ),
+                                                     new ViolationPosition( 93 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "ModelLocator",
+                  "import com.my.MyModelLocator;" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new ReferenceModelLocatorOutsideTheMainApplicationRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "ModfrelLocator",
+                  "import com.my.MyModelLocafrtor;" };
+   }
+}

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/component/CallLaterDirectlyRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/component/CallLaterDirectlyRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/component/CallLaterDirectlyRuleTest.java
new file mode 100644
index 0000000..5d68156
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/component/CallLaterDirectlyRuleTest.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.component;
+
+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 CallLaterDirectlyRuleTest extends AbstractAstFlexRuleTest
+{
+
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "GenericType.as", new ViolationPosition[]
+      { new ViolationPosition( 41 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new CallLaterDirectlyRule();
+   }
+}

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/component/UpdateChildrenNumberInUpdateDisplayListRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/component/UpdateChildrenNumberInUpdateDisplayListRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/component/UpdateChildrenNumberInUpdateDisplayListRuleTest.java
new file mode 100644
index 0000000..dc83f66
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/component/UpdateChildrenNumberInUpdateDisplayListRuleTest.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.component;
+
+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 UpdateChildrenNumberInUpdateDisplayListRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "BadComponent.as", new ViolationPosition[]
+      { new ViolationPosition( 42 ),
+                  new ViolationPosition( 43 ),
+                  new ViolationPosition( 44 ),
+                  new ViolationPosition( 45 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UpdateChildrenNumberInUpdateDisplayListRule();
+   }
+}

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/css/StyleBlockInMxmlRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/css/StyleBlockInMxmlRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/css/StyleBlockInMxmlRuleTest.java
new file mode 100644
index 0000000..998c631
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/css/StyleBlockInMxmlRuleTest.java
@@ -0,0 +1,66 @@
+/*
+ * 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.css;
+
+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 StyleBlockInMxmlRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "Main.mxml", new ViolationPosition[]
+      { new ViolationPosition( 52 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "<mx:Style>",
+                  "  <mx:Style>   ",
+                  "<mx:Style>   ",
+                  "  <mx:Style>" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new StyleBlockInMxmlRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "<mx:VBox",
+                  "<Box",
+                  "<Canvas",
+                  "<VBox",
+                  "<mx:HBox",
+                  "<Accordion",
+                  "<Form",
+                  "<FormItem",
+                  "<LayoutContainer",
+                  "<Panel",
+                  "<ViewStack",
+                  "<mx:Style/>" };
+   }
+}

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/css/UseCssInsteadOfEmbedMetaDataRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/css/UseCssInsteadOfEmbedMetaDataRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/css/UseCssInsteadOfEmbedMetaDataRuleTest.java
new file mode 100644
index 0000000..a3d9409
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/css/UseCssInsteadOfEmbedMetaDataRuleTest.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.css;
+
+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 UseCssInsteadOfEmbedMetaDataRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "Title.as", new ViolationPosition[]
+      { new ViolationPosition( 38 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UseCssInsteadOfEmbedMetaDataRule();
+   }
+}

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/empty/EmptyCatchStatementRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/empty/EmptyCatchStatementRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/empty/EmptyCatchStatementRuleTest.java
new file mode 100644
index 0000000..b20e210
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/empty/EmptyCatchStatementRuleTest.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.empty;
+
+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 EmptyCatchStatementRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.ConfigProxy.as", new ViolationPosition[]
+      { new ViolationPosition( 57 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new EmptyCatchStatementRule();
+   }
+}

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/empty/EmptyIfStmtRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/empty/EmptyIfStmtRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/empty/EmptyIfStmtRuleTest.java
new file mode 100644
index 0000000..fcd8900
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/empty/EmptyIfStmtRuleTest.java
@@ -0,0 +1,49 @@
+/*
+ * 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.empty;
+
+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 EmptyIfStmtRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.Duane.mxml", new ViolationPosition[]
+       { new ViolationPosition( 91 ),
+                   new ViolationPosition( 87 ),
+                   new ViolationPosition( 83 ) } ),
+                  new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+                  { new ViolationPosition( 578 ),
+                              new ViolationPosition( 584 ) } ),
+                  new ExpectedViolation( "RadonDataGrid.as", new ViolationPosition[]
+                  { new ViolationPosition( 63 ),
+                              new ViolationPosition( 190 ) } ),
+                  new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+                  { new ViolationPosition( 106 ),
+                              new ViolationPosition( 113 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new EmptyIfStmtRule();
+   }
+}

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/event/ConstructorDispatchingEventRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/ConstructorDispatchingEventRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/ConstructorDispatchingEventRuleTest.java
new file mode 100644
index 0000000..e40d698
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/ConstructorDispatchingEventRuleTest.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.event;
+
+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 ConstructorDispatchingEventRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.BigImporterModel.as", new ViolationPosition[]
+      { new ViolationPosition( 58 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new ConstructorDispatchingEventRule();
+   }
+}

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/event/DefaultEventNameRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/DefaultEventNameRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/DefaultEventNameRuleTest.java
new file mode 100644
index 0000000..9d7a0a5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/DefaultEventNameRuleTest.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.event;
+
+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 DefaultEventNameRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "DefaultNameEvent.as", new ViolationPosition[]
+      { new ViolationPosition( 38 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new DefaultEventNameRule();
+   }
+}

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/event/DispatchHardCodedEventNameRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/DispatchHardCodedEventNameRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/DispatchHardCodedEventNameRuleTest.java
new file mode 100644
index 0000000..74d3700
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/DispatchHardCodedEventNameRuleTest.java
@@ -0,0 +1,61 @@
+/*
+ * 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.event;
+
+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 DispatchHardCodedEventNameRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.BigImporterModel.as", new ViolationPosition[]
+       { new ViolationPosition( 58 ) } ),
+                  new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+                  { new ViolationPosition( 110 ),
+                              new ViolationPosition( 111 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "dispatchEvent(new Event(\"change\" ));",
+                  "dispatchEvent( new Event('change') );",
+                  "dispatchEvent(new Event(\"change\"));",
+                  "dispatchEvent( new Event( 'selectedGroupFieldsChange' ) )" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new DispatchHardCodedEventNameRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "var i : int = 0;",
+                  "lala();",
+                  "dispatchEvent( new Event( CONST ) );",
+                  "dispatchEvent(new Event(Rule.CONST));" };
+   }
+}

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/event/EventMissingCloneFunctionRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/EventMissingCloneFunctionRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/EventMissingCloneFunctionRuleTest.java
new file mode 100644
index 0000000..23407fc
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/EventMissingCloneFunctionRuleTest.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.event;
+
+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 EventMissingCloneFunctionRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.SearchBarEvent.as", new ViolationPosition[]
+       { new ViolationPosition( 35 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.event.FirstCustomEvent.as",
+                                         new ViolationPosition[]
+                                         { new ViolationPosition( 33 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new EventMissingCloneFunctionRule();
+   }
+}

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/event/ListenForHardCodedEventNameRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/ListenForHardCodedEventNameRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/ListenForHardCodedEventNameRuleTest.java
new file mode 100644
index 0000000..bfded2d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/ListenForHardCodedEventNameRuleTest.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.event;
+
+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 ListenForHardCodedEventNameRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+      { new ViolationPosition( 109 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "addEventListener( \"change\", handleChange );",
+                  "addEventListener( 'change', handleChange );",
+                  "addEventListener(\"change\",handleChange);",
+                  "addEventListener( \"change\"," };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new ListenForHardCodedEventNameRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "addEventListener( CHANGE, handleChange );",
+                  "addEventListener(CHANGE,handleChange);",
+                  "addEventListener( CHANGE," };
+   }
+}

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/event/PublicVariableInCustomEventRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/PublicVariableInCustomEventRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/PublicVariableInCustomEventRuleTest.java
new file mode 100644
index 0000000..c4c4ff6
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/PublicVariableInCustomEventRuleTest.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.event;
+
+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 PublicVariableInCustomEventRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.event.DynamicCustomEvent.as", new ViolationPosition[]
+       { new ViolationPosition( 35 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.event.FirstCustomEvent.as",
+                                         new ViolationPosition[]
+                                         { new ViolationPosition( 35 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new PublicVariableInCustomEventRule();
+   }
+}

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/event/UnboundTypeInMetadataRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/UnboundTypeInMetadataRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/UnboundTypeInMetadataRuleTest.java
new file mode 100644
index 0000000..835bac2
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/UnboundTypeInMetadataRuleTest.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.event;
+
+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 UnboundTypeInMetadataRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.Nico.as", new ViolationPosition[]
+       { new ViolationPosition( 36 ) } ),
+                  new ExpectedViolation( "UnboundMetadata.as", new ViolationPosition[]
+                  { new ViolationPosition( 38 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UnboundTypeInMetadataRule();
+   }
+}

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/event/UntypedEventMetadataRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/UntypedEventMetadataRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/UntypedEventMetadataRuleTest.java
new file mode 100644
index 0000000..81ee608
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/UntypedEventMetadataRuleTest.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.event;
+
+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 UntypedEventMetadataRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "UnboundMetadata.as", new ViolationPosition[]
+      { new ViolationPosition( 39 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UntypedEventMetadataRule();
+   }
+}

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/flexunit/EmptyUnitTestTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/flexunit/EmptyUnitTestTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/flexunit/EmptyUnitTestTest.java
new file mode 100644
index 0000000..8d700f9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/flexunit/EmptyUnitTestTest.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.flexunit;
+
+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 EmptyUnitTestTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "flexunit.RaoulTest.as", new ViolationPosition[]
+       { new ViolationPosition( 54 ),
+                   new ViolationPosition( 60 ) } ),
+                  new ExpectedViolation( "flexunit.RulesetTest.as", new ViolationPosition[]
+                  { new ViolationPosition( 48 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new EmptyUnitTest();
+   }
+}

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/maintanability/AlertShowRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/AlertShowRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/AlertShowRuleTest.java
new file mode 100644
index 0000000..60f4ff9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/AlertShowRuleTest.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.maintanability;
+
+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 AlertShowRuleTest extends AbstractAstFlexRuleTest
+{
+   public static final ExpectedViolation[] VIOLATING_FILES = new ExpectedViolation[]
+                                                           { new ExpectedViolation( "flexpmd114.a.Test.as",
+                                                                                    new ViolationPosition[]
+                                                                                    { new ViolationPosition( 43 ) } ),
+               new ExpectedViolation( "flexpmd114.b.Test.as", new ViolationPosition[]
+               { new ViolationPosition( 43 ) } ),
+               new ExpectedViolation( "flexpmd114.c.Test.as", new ViolationPosition[]
+               { new ViolationPosition( 43 ) } ),
+               new ExpectedViolation( "com.adobe.ac.ncss.ConfigProxy.as", new ViolationPosition[]
+               { new ViolationPosition( 48 ) } )          };
+
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return VIOLATING_FILES;
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new AlertShowRule();
+   }
+}

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/maintanability/ArrayFieldWithNoArrayElementTypeRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/ArrayFieldWithNoArrayElementTypeRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/ArrayFieldWithNoArrayElementTypeRuleTest.java
new file mode 100644
index 0000000..b744b93
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/ArrayFieldWithNoArrayElementTypeRuleTest.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.maintanability;
+
+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 ArrayFieldWithNoArrayElementTypeRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "fu.main.flex.TestRunnerApplication.mxml", new ViolationPosition[]
+       { new ViolationPosition( 48 ) } ),
+                  new ExpectedViolation( "bug.FlexPMD233b.mxml", new ViolationPosition[]
+                  { new ViolationPosition( 66 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new ArrayFieldWithNoArrayElementTypeRule();
+   }
+}

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/maintanability/AvoidProtectedFieldInFinalClassRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/AvoidProtectedFieldInFinalClassRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/AvoidProtectedFieldInFinalClassRuleTest.java
new file mode 100644
index 0000000..780f244
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/AvoidProtectedFieldInFinalClassRuleTest.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.maintanability;
+
+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 AvoidProtectedFieldInFinalClassRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+      { new ViolationPosition( 44 ),
+                  new ViolationPosition( 89 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new AvoidProtectedFieldInFinalClassRule();
+   }
+}

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/maintanability/AvoidUseOfAsKeywordRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/AvoidUseOfAsKeywordRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/AvoidUseOfAsKeywordRuleTest.java
new file mode 100644
index 0000000..e5c64b7
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/AvoidUseOfAsKeywordRuleTest.java
@@ -0,0 +1,86 @@
+/*
+ * 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.maintanability;
+
+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.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class AvoidUseOfAsKeywordRuleTest extends AbstractAstFlexRuleTest
+{
+   protected static final Logger LOGGER      = Logger.getLogger( AvoidUseOfAsKeywordRuleTest.class.getName() );
+   private static final String   TEST_FOLDER = "/com/adobe/ac/ncss";
+
+   public AvoidUseOfAsKeywordRuleTest()
+   {
+      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( "LongSwitch.as", new ViolationPosition[]
+       { new ViolationPosition( 60 ),
+                   new ViolationPosition( 61 ) } ),
+                  new ExpectedViolation( "NestedSwitch.as", new ViolationPosition[]
+                  { new ViolationPosition( 50 ),
+                              new ViolationPosition( 51 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new AvoidUseOfAsKeywordRule();
+   }
+
+   @Override
+   protected File getTestDirectory()
+   {
+      return new File( super.getTestDirectory().getAbsolutePath()
+            + TEST_FOLDER );
+   }
+}

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/maintanability/AvoidUsingPublicStaticFieldRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/AvoidUsingPublicStaticFieldRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/AvoidUsingPublicStaticFieldRuleTest.java
new file mode 100644
index 0000000..70b7b14
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/AvoidUsingPublicStaticFieldRuleTest.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.maintanability;
+
+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 AvoidUsingPublicStaticFieldRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.FlexPMD115.as", new ViolationPosition[]
+       { new ViolationPosition( 36 ) } ),
+                  new ExpectedViolation( "Sorted.as", new ViolationPosition[]
+                  { new ViolationPosition( 47 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new AvoidUsingPublicStaticFieldRule();
+   }
+}

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/maintanability/AvoidUsingWithKeyWordRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/AvoidUsingWithKeyWordRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/AvoidUsingWithKeyWordRuleTest.java
new file mode 100644
index 0000000..754b52c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/AvoidUsingWithKeyWordRuleTest.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.maintanability;
+
+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 AvoidUsingWithKeyWordRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "GoodComponent.as", new ViolationPosition[]
+      { new ViolationPosition( 54 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new AvoidUsingWithKeyWordRule();
+   }
+}

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/maintanability/ClassAndExtensionAreIdenticalRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/ClassAndExtensionAreIdenticalRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/ClassAndExtensionAreIdenticalRuleTest.java
new file mode 100644
index 0000000..a6d10cb
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/ClassAndExtensionAreIdenticalRuleTest.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.maintanability;
+
+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 ClassAndExtensionAreIdenticalRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "GenericType.as", new ViolationPosition[]
+      { new ViolationPosition( 33 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new ClassAndExtensionAreIdenticalRule();
+   }
+}

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/maintanability/DynamicClassRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/DynamicClassRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/DynamicClassRuleTest.java
new file mode 100644
index 0000000..ef47656
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/DynamicClassRuleTest.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.maintanability;
+
+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 DynamicClassRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.event.DynamicCustomEvent.as", new ViolationPosition[]
+      { new ViolationPosition( 33 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new DynamicClassRule();
+   }
+}

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/maintanability/EmptyStatementRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/EmptyStatementRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/EmptyStatementRuleTest.java
new file mode 100644
index 0000000..8c9b6d8
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/EmptyStatementRuleTest.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.maintanability;
+
+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 EmptyStatementRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+       { new ViolationPosition( 113 ) } ),
+                  new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+                  { new ViolationPosition( 569 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.LongSwitch.as", new ViolationPosition[]
+                  { new ViolationPosition( 114 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new EmptyStatementRule();
+   }
+}

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/maintanability/ExcessiveImportRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/ExcessiveImportRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/ExcessiveImportRuleTest.java
new file mode 100644
index 0000000..0de5b39
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/ExcessiveImportRuleTest.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.maintanability;
+
+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 ExcessiveImportRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "cairngorm.LightController.as", new ViolationPosition[]
+       { new ViolationPosition( 94 ) } ),
+                  new ExpectedViolation( "cairngorm.FatController.as", new ViolationPosition[]
+                  { new ViolationPosition( 95 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.BigImporterModel.as", new ViolationPosition[]
+                  { new ViolationPosition( 54 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new ExcessiveImportRule();
+   }
+}

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/maintanability/NonStaticConstantFieldRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/NonStaticConstantFieldRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/NonStaticConstantFieldRuleTest.java
new file mode 100644
index 0000000..925f232
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/NonStaticConstantFieldRuleTest.java
@@ -0,0 +1,51 @@
+/*
+ * 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.maintanability;
+
+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 NonStaticConstantFieldRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.FlexPMD115.as", new ViolationPosition[]
+       { new ViolationPosition( 38 ),
+                   new ViolationPosition( 40 ) } ),
+                  new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+                  { new ViolationPosition( 45 ),
+                              new ViolationPosition( 46 ),
+                              new ViolationPosition( 47 ),
+                              new ViolationPosition( 48 ),
+                              new ViolationPosition( 50 ) } ),
+                  new ExpectedViolation( "Sorted.as", new ViolationPosition[]
+                  { new ViolationPosition( 43 ) } ),
+                  new ExpectedViolation( "GenericType.as", new ViolationPosition[]
+                  { new ViolationPosition( 36 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.ArrayVO.as", new ViolationPosition[]
+                  { new ViolationPosition( 39 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new NonStaticConstantFieldRule();
+   }
+}

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/maintanability/OnlyOneReturnRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/OnlyOneReturnRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/OnlyOneReturnRuleTest.java
new file mode 100644
index 0000000..2d545e6
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/OnlyOneReturnRuleTest.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.maintanability;
+
+import java.util.List;
+
+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 OnlyOneReturnRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+       { new ViolationPosition( 189 ),
+                   new ViolationPosition( 609 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.AbstractRowData.as", new ViolationPosition[]
+                  { new ViolationPosition( 66 ) } ) };
+
+   }
+
+   @Override
+   protected List< String > getIgnoreFiles()
+   {
+      final List< String > files = super.getIgnoreFiles();
+
+      files.add( "bug.FlexPMD181.as" );
+      return files;
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new OnlyOneReturnRule();
+   }
+}

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/maintanability/ProtectedStaticMethodRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/ProtectedStaticMethodRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/ProtectedStaticMethodRuleTest.java
new file mode 100644
index 0000000..f507ac8
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/ProtectedStaticMethodRuleTest.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.maintanability;
+
+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 ProtectedStaticMethodRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "Sorted.as", new ViolationPosition[]
+      { new ViolationPosition( 60 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new ProtectedStaticMethodRule();
+   }
+}

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/maintanability/ReferenceToVariableBindingFromItsInitializerRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/ReferenceToVariableBindingFromItsInitializerRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/ReferenceToVariableBindingFromItsInitializerRuleTest.java
new file mode 100644
index 0000000..148147a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/ReferenceToVariableBindingFromItsInitializerRuleTest.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.maintanability;
+
+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 ReferenceToVariableBindingFromItsInitializerRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.FlexPMD115.as", new ViolationPosition[]
+      { new ViolationPosition( 36 ),
+                  new ViolationPosition( 39 ),
+                  new ViolationPosition( 35 ),
+                  new ViolationPosition( 38 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new ReferenceToVariableBindingFromItsInitializerRule();
+   }
+}

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/maintanability/TrueFalseConditionRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/TrueFalseConditionRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/TrueFalseConditionRuleTest.java
new file mode 100644
index 0000000..b60b6aa
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/TrueFalseConditionRuleTest.java
@@ -0,0 +1,56 @@
+/*
+ * 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.maintanability;
+
+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 TrueFalseConditionRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+       { new ViolationPosition( 574 ),
+                   new ViolationPosition( 576 ),
+                   new ViolationPosition( 578 ),
+                   new ViolationPosition( 584 ) } ),
+                  new ExpectedViolation( "Looping.as", new ViolationPosition[]
+                  { new ViolationPosition( 44 ),
+                              new ViolationPosition( 57 ),
+                              new ViolationPosition( 66 ),
+                              new ViolationPosition( 69 ) } ),
+                  new ExpectedViolation( "RadonDataGrid.as", new ViolationPosition[]
+                  { new ViolationPosition( 63 ),
+                              new ViolationPosition( 194 ) } ),
+                  new ExpectedViolation( "bug.FlexPMD181.as", new ViolationPosition[]
+                  { new ViolationPosition( 2222 ) } ),
+                  new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+                  { new ViolationPosition( 106 ),
+                              new ViolationPosition( 113 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.AbstractRowData.as", new ViolationPosition[]
+                  { new ViolationPosition( 59 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new TrueFalseConditionRule();
+   }
+}


[17/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IPackage.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IPackage.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IPackage.java
new file mode 100644
index 0000000..5fd2069
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IPackage.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.nodes;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * Node representing a package. It contains the nested class node, the list of
+ * imports, and the package name.
+ * 
+ * @author xagnetti
+ */
+public interface IPackage extends INamable, INode
+{
+   /**
+    * @return
+    */
+   IClass getClassNode();
+
+   /**
+    * @return
+    */
+   String getFullyQualifiedClassName();
+
+   /**
+    * @return
+    */
+   List< IFunction > getFunctions();
+
+   /**
+    * @return
+    */
+   List< IParserNode > getImports();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IParameter.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IParameter.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IParameter.java
new file mode 100644
index 0000000..9a2057b
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IParameter.java
@@ -0,0 +1,24 @@
+/*
+ * 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.nodes;
+
+/**
+ * @author xagnetti
+ */
+public interface IParameter extends IVariable
+{
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IVariable.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IVariable.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IVariable.java
new file mode 100644
index 0000000..e8902b6
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IVariable.java
@@ -0,0 +1,33 @@
+/*
+ * 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.nodes;
+
+/**
+ * @author xagnetti
+ */
+public interface IVariable extends IMetaDataListHolder, INamableNode
+{
+   /**
+    * @return
+    */
+   IFieldInitialization getInitializationExpression();
+
+   /**
+    * @return
+    */
+   IIdentifierNode getType();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IVisible.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IVisible.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IVisible.java
new file mode 100644
index 0000000..7afd485
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IVisible.java
@@ -0,0 +1,28 @@
+/*
+ * 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.nodes;
+
+/**
+ * @author xagnetti
+ */
+public interface IVisible extends IModifiersHolder
+{
+   /**
+    * @return
+    */
+   boolean isPublic();
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/MetaData.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/MetaData.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/MetaData.java
new file mode 100644
index 0000000..48e30bf
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/MetaData.java
@@ -0,0 +1,85 @@
+/*
+ * 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.nodes;
+
+/**
+ * @author xagnetti
+ */
+public enum MetaData
+{
+   ARRAY_ELEMENT_TYPE("ArrayElementType"),
+   BEFORE("Before"),
+   BINDABLE("Bindable"),
+   DEFAULT_PROPERTY("DefaultProperty"),
+   DEPRECATED("Deprecated"),
+   EFFECT("Effect"),
+   EMBED("Embed"),
+   EVENT("Event"),
+   EXCLUDE("Exclude"),
+   EXCLUDE_CLASS("Exclude"),
+   ICON_FILE("IconFile"),
+   INSPECTABLE("Inspectable"),
+   INSTANCE_TYPE("InstanceType"),
+   NON_COMITTING_CHANGE_EVENT("NonCommittingChangeEvent"),
+   OTHER("Other"),
+   REMOTE_CLASS("RemoteClass"),
+   STYLE("Style"),
+   TEST("Test"),
+   TRANSIENT("Transient");
+
+   /**
+    * @param metaDataName
+    * @return
+    */
+   public static MetaData create( final String metaDataName )
+   {
+      MetaData metaData = null;
+
+      for ( final MetaData currentMetadata : values() )
+      {
+         if ( currentMetadata.toString().compareTo( metaDataName ) == 0 )
+         {
+            metaData = currentMetadata;
+            break;
+         }
+      }
+      if ( metaData == null )
+      {
+         metaData = MetaData.OTHER;
+         metaData.name = metaDataName;
+      }
+
+      return metaData;
+   }
+
+   private String name;
+
+   private MetaData( final String nameToBeSet )
+   {
+      name = nameToBeSet;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see java.lang.Enum#toString()
+    */
+   @Override
+   public String toString()
+   {
+      return name;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/Modifier.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/Modifier.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/Modifier.java
new file mode 100644
index 0000000..bd93b42
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/Modifier.java
@@ -0,0 +1,78 @@
+/*
+ * 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.nodes;
+
+import com.adobe.ac.pmd.parser.KeyWords;
+
+/**
+ * @author xagnetti
+ */
+public enum Modifier
+{
+   DYNAMIC, FINAL, INTERNAL, OVERRIDE, PRIVATE, PROTECTED, PUBLIC, STATIC, INTRINSIC;
+
+   /**
+    * @param name
+    * @return
+    */
+   public static Modifier create( final String name )
+   {
+      Modifier modifier = null;
+      if ( KeyWords.PUBLIC.toString().equals( name ) )
+      {
+         modifier = Modifier.PUBLIC;
+      }
+      else if ( KeyWords.PRIVATE.toString().equals( name ) )
+      {
+         modifier = Modifier.PRIVATE;
+      }
+      else if ( KeyWords.PROTECTED.toString().equals( name ) )
+      {
+         modifier = Modifier.PROTECTED;
+      }
+      else if ( KeyWords.INTERNAL.toString().equals( name ) )
+      {
+         modifier = Modifier.INTERNAL;
+      }
+      else if ( KeyWords.DYNAMIC.toString().equals( name ) )
+      {
+         modifier = Modifier.DYNAMIC;
+      }
+      else if ( KeyWords.OVERRIDE.toString().equals( name ) )
+      {
+         modifier = Modifier.OVERRIDE;
+      }
+      else if ( KeyWords.STATIC.toString().equals( name ) )
+      {
+         modifier = Modifier.STATIC;
+      }
+      else if ( KeyWords.FINAL.toString().equals( name ) )
+      {
+         modifier = Modifier.FINAL;
+      }
+      // class modifier AS2
+      else if ( KeyWords.INTRINSIC.toString().equals( name ) )
+      {
+         modifier = Modifier.INTRINSIC;
+      }
+      return modifier;
+   }
+
+   private Modifier()
+   {
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/AsDocNodeBase.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/AsDocNodeBase.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/AsDocNodeBase.java
new file mode 100644
index 0000000..9cdb774
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/AsDocNodeBase.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.nodes.asdoc.impl;
+
+/**
+ * @author xagnetti
+ */
+public class AsDocNodeBase
+{
+   private final String description;
+
+   /**
+    * @param descriptionToBeSet
+    */
+   public AsDocNodeBase( final String descriptionToBeSet )
+   {
+      super();
+      description = descriptionToBeSet;
+   }
+
+   /**
+    * @return
+    */
+   public String getDescription()
+   {
+      return description;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/ClassAsDocNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/ClassAsDocNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/ClassAsDocNode.java
new file mode 100644
index 0000000..f165771
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/ClassAsDocNode.java
@@ -0,0 +1,31 @@
+/*
+ * 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.nodes.asdoc.impl;
+
+/**
+ * @author xagnetti
+ */
+public class ClassAsDocNode extends AsDocNodeBase
+{
+   /**
+    * @param descriptionToBeSet
+    */
+   public ClassAsDocNode( final String descriptionToBeSet )
+   {
+      super( descriptionToBeSet );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/FunctionAsDocNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/FunctionAsDocNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/FunctionAsDocNode.java
new file mode 100644
index 0000000..c8edf41
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/FunctionAsDocNode.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.nodes.asdoc.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author xagnetti
+ */
+public class FunctionAsDocNode extends AsDocNodeBase
+{
+   private final List< ParameterAsDocNode > parameters;
+
+   /**
+    * @param descriptionToBeSet
+    */
+   public FunctionAsDocNode( final String descriptionToBeSet )
+   {
+      super( descriptionToBeSet );
+      parameters = new ArrayList< ParameterAsDocNode >();
+   }
+
+   /**
+    * @param param
+    */
+   public void addParameter( final ParameterAsDocNode param )
+   {
+      parameters.add( param );
+   }
+
+   /**
+    * @param index
+    * @return
+    */
+   public ParameterAsDocNode getParameter( final int index )
+   {
+      return parameters.get( index );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/ParameterAsDocNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/ParameterAsDocNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/ParameterAsDocNode.java
new file mode 100644
index 0000000..a41286a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/asdoc/impl/ParameterAsDocNode.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.nodes.asdoc.impl;
+
+/**
+ * @author xagnetti
+ */
+public class ParameterAsDocNode
+{
+   private final String description;
+   private final String name;
+
+   /**
+    * @param nameToBeSet
+    * @param descriptionToBeSet
+    */
+   public ParameterAsDocNode( final String nameToBeSet,
+                              final String descriptionToBeSet )
+   {
+      super();
+
+      name = nameToBeSet;
+      description = descriptionToBeSet;
+   }
+
+   /**
+    * @return
+    */
+   public String getDescription()
+   {
+      return description;
+   }
+
+   /**
+    * @return
+    */
+   public String getName()
+   {
+      return name;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/AbstractNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/AbstractNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/AbstractNode.java
new file mode 100644
index 0000000..41c0183
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/AbstractNode.java
@@ -0,0 +1,90 @@
+/*
+ * 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.nodes.impl;
+
+import java.util.logging.Logger;
+
+import com.adobe.ac.pmd.nodes.IMetaDataListHolder;
+import com.adobe.ac.pmd.nodes.IModifiersHolder;
+import com.adobe.ac.pmd.nodes.INode;
+import com.adobe.ac.pmd.nodes.Modifier;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * @author xagnetti
+ */
+abstract class AbstractNode implements INode
+{
+   protected static final Logger LOGGER = Logger.getLogger( "Node" );
+
+   /**
+    * @param metaDataHolder
+    * @param child
+    */
+   protected static void computeMetaDataList( final IMetaDataListHolder metaDataHolder,
+                                              final IParserNode child )
+   {
+      if ( child.numChildren() != 0 )
+      {
+         for ( final IParserNode metadataNode : child.getChildren() )
+         {
+            metaDataHolder.add( NodeFactory.createMetaData( metadataNode ) );
+         }
+      }
+   }
+
+   /**
+    * @param modifiable
+    * @param child
+    */
+   protected static final void computeModifierList( final IModifiersHolder modifiable,
+                                                    final IParserNode child )
+   {
+      if ( child.numChildren() != 0 )
+      {
+         for ( final IParserNode modifierNode : child.getChildren() )
+         {
+            final Modifier modifier = Modifier.create( modifierNode.getStringValue() );
+
+            modifiable.add( modifier );
+         }
+      }
+   }
+   private final IParserNode internalNode;
+
+   /**
+    * @param node
+    */
+   protected AbstractNode( final IParserNode node )
+   {
+      internalNode = node;
+   }
+
+   /**
+    * @return
+    */
+   public abstract AbstractNode compute();
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.INode#getInternalNode()
+    */
+   public IParserNode getInternalNode()
+   {
+      return internalNode;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/AttributeNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/AttributeNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/AttributeNode.java
new file mode 100644
index 0000000..accdb1d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/AttributeNode.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.nodes.impl;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * @author xagnetti
+ */
+class AttributeNode extends FieldNode implements IAttribute
+{
+   /**
+    * @param rootNode
+    */
+   protected AttributeNode( final IParserNode rootNode )
+   {
+      super( rootNode );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.impl.FieldNode#compute()
+    */
+   @Override
+   public AttributeNode compute()
+   {
+      return ( AttributeNode ) super.compute();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/ClassNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/ClassNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/ClassNode.java
new file mode 100644
index 0000000..8f39c78
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/ClassNode.java
@@ -0,0 +1,411 @@
+/*
+ * 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.nodes.impl;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IConstant;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.IMetaData;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.nodes.Modifier;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.NodeKind;
+
+/**
+ * @author xagnetti
+ */
+class ClassNode extends AbstractNode implements IClass
+{
+   private IParserNode                              asDoc;
+   private final List< IAttribute >                 attributes;
+   private IParserNode                              block;
+   private final List< IConstant >                  constants;
+   private IFunction                                constructor;
+   private String                                   extensionName;
+   private final List< IFunction >                  functions;
+   private List< IParserNode >                      implementations;
+   private final Map< MetaData, List< IMetaData > > metaDataList;
+   private final Set< Modifier >                    modifiers;
+   private final List< IParserNode >                multiLinesComments;
+   private IdentifierNode                           name;
+
+   /**
+    * @param node
+    */
+   protected ClassNode( final IParserNode node )
+   {
+      super( node );
+
+      modifiers = new HashSet< Modifier >();
+      metaDataList = new LinkedHashMap< MetaData, List< IMetaData > >();
+      implementations = new ArrayList< IParserNode >();
+      constants = new ArrayList< IConstant >();
+      attributes = new ArrayList< IAttribute >();
+      functions = new ArrayList< IFunction >();
+      multiLinesComments = new ArrayList< IParserNode >();
+      name = null;
+      asDoc = null;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.nodes.IMetaDataListHolder#add(com.adobe.ac.pmd.nodes.
+    * IMetaData)
+    */
+   public void add( final IMetaData metaData )
+   {
+      final MetaData metaDataImpl = MetaData.create( metaData.getName() );
+
+      if ( !metaDataList.containsKey( metaDataImpl ) )
+      {
+         metaDataList.put( metaDataImpl,
+                           new ArrayList< IMetaData >() );
+      }
+      metaDataList.get( metaDataImpl ).add( metaData );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.nodes.IModifiersHolder#add(com.adobe.ac.pmd.nodes.Modifier
+    * )
+    */
+   public void add( final Modifier modifier )
+   {
+      modifiers.add( modifier );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.impl.AbstractNode#compute()
+    */
+   @Override
+   public ClassNode compute()
+   {
+      if ( getInternalNode().numChildren() != 0 )
+      {
+         for ( final IParserNode node : getInternalNode().getChildren() )
+         {
+            if ( node.is( NodeKind.CONTENT ) )
+            {
+               computeClassContent( node );
+            }
+            else if ( node.is( NodeKind.MOD_LIST ) )
+            {
+               computeModifierList( this,
+                                    node );
+            }
+            else if ( node.is( NodeKind.NAME ) )
+            {
+               name = IdentifierNode.create( node );
+            }
+            else if ( node.is( NodeKind.META_LIST ) )
+            {
+               computeMetaDataList( this,
+                                    node );
+            }
+            else if ( node.is( NodeKind.AS_DOC ) )
+            {
+               asDoc = node;
+            }
+            else if ( node.is( NodeKind.MULTI_LINE_COMMENT ) )
+            {
+               multiLinesComments.add( node );
+            }
+            detectImplementations( node );
+            detectExtensions( node );
+         }
+         for ( final IFunction function : functions )
+         {
+            if ( name.toString().equals( function.getName() ) )
+            {
+               constructor = function;
+            }
+         }
+      }
+      return this;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IMetaDataListHolder#getAllMetaData()
+    */
+   public List< IMetaData > getAllMetaData()
+   {
+      final List< IMetaData > list = new ArrayList< IMetaData >();
+
+      for ( final Entry< MetaData, List< IMetaData > > entry : metaDataList.entrySet() )
+      {
+         list.addAll( entry.getValue() );
+      }
+
+      return list;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IAsDocHolder#getAsDoc()
+    */
+   public IParserNode getAsDoc()
+   {
+      return asDoc;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IClass#getAttributes()
+    */
+   public List< IAttribute > getAttributes()
+   {
+      return attributes;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IClass#getAverageCyclomaticComplexity()
+    */
+   public double getAverageCyclomaticComplexity()
+   {
+      if ( functions.isEmpty() )
+      {
+         return 0;
+      }
+      int totalCcn = 0;
+
+      for ( final IFunction function : functions )
+      {
+         totalCcn += function.getCyclomaticComplexity();
+      }
+
+      return totalCcn
+            / functions.size();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IClass#getBlock()
+    */
+   public final IParserNode getBlock()
+   {
+      return block;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IClass#getConstants()
+    */
+   public List< IConstant > getConstants()
+   {
+      return constants;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IClass#getConstructor()
+    */
+   public IFunction getConstructor()
+   {
+      return constructor;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IClass#getExtensionName()
+    */
+   public String getExtensionName()
+   {
+      return extensionName;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IClass#getFunctions()
+    */
+   public List< IFunction > getFunctions()
+   {
+      return functions;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IClass#getImplementations()
+    */
+   public List< IParserNode > getImplementations()
+   {
+      return implementations;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.nodes.IMetaDataListHolder#getMetaData(com.adobe.ac.pmd
+    * .nodes.MetaData)
+    */
+   public List< IMetaData > getMetaData( final MetaData metaDataName )
+   {
+      if ( metaDataList.containsKey( metaDataName ) )
+      {
+         return metaDataList.get( metaDataName );
+      }
+      else
+      {
+         return new ArrayList< IMetaData >();
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IMetaDataListHolder#getMetaDataCount()
+    */
+   public int getMetaDataCount()
+   {
+      return metaDataList.size();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.ICommentHolder#getMultiLinesComment()
+    */
+   public List< IParserNode > getMultiLinesComment()
+   {
+      return multiLinesComments;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.INamable#getName()
+    */
+   public String getName()
+   {
+      return name.toString();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.nodes.IModifiersHolder#is(com.adobe.ac.pmd.nodes.Modifier
+    * )
+    */
+   public boolean is( final Modifier modifier ) // NOPMD
+   {
+      return modifiers.contains( modifier );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IClass#isBindable()
+    */
+   public boolean isBindable()
+   {
+      return metaDataList.get( MetaData.BINDABLE ) != null;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IClass#isFinal()
+    */
+   public boolean isFinal()
+   {
+      return is( Modifier.FINAL );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IVisible#isPublic()
+    */
+   public boolean isPublic()
+   {
+      return is( Modifier.PUBLIC );
+   }
+
+   private void computeClassContent( final IParserNode classContentNode )
+   {
+      if ( classContentNode.numChildren() != 0 )
+      {
+         for ( final IParserNode node : classContentNode.getChildren() )
+         {
+            detectBlock( node );
+            detectFunction( node );
+            detectAttribute( node );
+            detectConstant( node );
+            if ( node.is( NodeKind.MULTI_LINE_COMMENT ) )
+            {
+               multiLinesComments.add( node );
+            }
+         }
+      }
+   }
+
+   private void detectAttribute( final IParserNode node )
+   {
+      if ( node.is( NodeKind.VAR_LIST ) )
+      {
+         attributes.add( new AttributeNode( node ).compute() );
+      }
+   }
+
+   private void detectBlock( final IParserNode node )
+   {
+      if ( node.is( NodeKind.BLOCK ) )
+      {
+         block = node;
+      }
+   }
+
+   private void detectConstant( final IParserNode node )
+   {
+      if ( node.is( NodeKind.CONST_LIST ) )
+      {
+         constants.add( new ConstantNode( node ).compute() );
+      }
+   }
+
+   private void detectExtensions( final IParserNode node )
+   {
+      if ( node.is( NodeKind.EXTENDS ) )
+      {
+         extensionName = node.getStringValue();
+      }
+   }
+
+   private void detectFunction( final IParserNode node )
+   {
+      if ( node.is( NodeKind.FUNCTION )
+            || node.is( NodeKind.GET ) || node.is( NodeKind.SET ) )
+      {
+         functions.add( new FunctionNode( node ).compute() );
+      }
+   }
+
+   private void detectImplementations( final IParserNode node )
+   {
+      if ( node.is( NodeKind.IMPLEMENTS_LIST ) )
+      {
+         implementations = node.getChildren();
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/ConstantNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/ConstantNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/ConstantNode.java
new file mode 100644
index 0000000..dd809c5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/ConstantNode.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.nodes.impl;
+
+import com.adobe.ac.pmd.nodes.IConstant;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * @author xagnetti
+ */
+class ConstantNode extends FieldNode implements IConstant
+{
+   /**
+    * @param rootNode
+    */
+   protected ConstantNode( final IParserNode rootNode )
+   {
+      super( rootNode );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.impl.FieldNode#compute()
+    */
+   @Override
+   public ConstantNode compute()
+   {
+      return ( ConstantNode ) super.compute();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/FieldInitializationNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/FieldInitializationNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/FieldInitializationNode.java
new file mode 100644
index 0000000..bde2b5a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/FieldInitializationNode.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.nodes.impl;
+
+import com.adobe.ac.pmd.nodes.IFieldInitialization;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * @author xagnetti
+ */
+class FieldInitializationNode extends AbstractNode implements IFieldInitialization
+{
+   /**
+    * @param node
+    * @return
+    */
+   static FieldInitializationNode create( final IParserNode node )
+   {
+      return new FieldInitializationNode( node );
+   }
+
+   /**
+    * @param node
+    */
+   protected FieldInitializationNode( final IParserNode node )
+   {
+      super( node );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.impl.AbstractNode#compute()
+    */
+   @Override
+   public FieldInitializationNode compute()
+   {
+      return this;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/FieldNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/FieldNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/FieldNode.java
new file mode 100644
index 0000000..a9db9d9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/FieldNode.java
@@ -0,0 +1,94 @@
+/*
+ * 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.nodes.impl;
+
+import com.adobe.ac.pmd.nodes.IField;
+import com.adobe.ac.pmd.nodes.Modifier;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.NodeKind;
+
+/**
+ * Base class for AttributeNode and for ConstantNode
+ * 
+ * @author xagnetti
+ */
+class FieldNode extends VariableNode implements IField
+{
+   private IParserNode asDocs;
+
+   /**
+    * @param rootNode
+    */
+   protected FieldNode( final IParserNode rootNode )
+   {
+      super( rootNode );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.impl.VariableNode#compute()
+    */
+   @Override
+   public FieldNode compute()
+   {
+      super.compute();
+
+      if ( getInternalNode().numChildren() != 0 )
+      {
+         for ( final IParserNode child : getInternalNode().getChildren() )
+         {
+            if ( child.is( NodeKind.MOD_LIST ) )
+            {
+               computeModifierList( this,
+                                    child );
+            }
+            else if ( child.is( NodeKind.AS_DOC ) )
+            {
+               asDocs = child;
+            }
+         }
+      }
+      return this;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IAsDocHolder#getAsDoc()
+    */
+   public IParserNode getAsDoc()
+   {
+      return asDocs;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IVisible#isPublic()
+    */
+   public boolean isPublic()
+   {
+      return is( Modifier.PUBLIC );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IField#isStatic()
+    */
+   public boolean isStatic()
+   {
+      return is( Modifier.STATIC );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/FormalNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/FormalNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/FormalNode.java
new file mode 100644
index 0000000..8aaacdb
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/FormalNode.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.nodes.impl;
+
+import com.adobe.ac.pmd.nodes.IParameter;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * @author xagnetti
+ */
+final class FormalNode extends VariableNode implements IParameter
+{
+   /**
+    * @param node
+    * @return
+    */
+   static FormalNode create( final IParserNode node )
+   {
+      return new FormalNode( node ).compute();
+   }
+
+   /**
+    * @param node
+    */
+   private FormalNode( final IParserNode node )
+   {
+      super( node );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.impl.VariableNode#compute()
+    */
+   @Override
+   public FormalNode compute()
+   {
+      return ( FormalNode ) super.compute();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/FunctionNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/FunctionNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/FunctionNode.java
new file mode 100644
index 0000000..6d61a9e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/FunctionNode.java
@@ -0,0 +1,444 @@
+/*
+ * 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.nodes.impl;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.IIdentifierNode;
+import com.adobe.ac.pmd.nodes.IMetaData;
+import com.adobe.ac.pmd.nodes.IParameter;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.nodes.Modifier;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.KeyWords;
+import com.adobe.ac.pmd.parser.NodeKind;
+
+/**
+ * @author xagnetti
+ */
+class FunctionNode extends AbstractNode implements IFunction
+{
+   private IParserNode                              asDoc;
+   private IParserNode                              body;
+   private int                                      cyclomaticComplexity;
+   private final Map< String, IParserNode >         localVariables;
+   private final Map< MetaData, List< IMetaData > > metaDataList;
+   private final Set< Modifier >                    modifiers;
+   private final List< IParserNode >                multiLinesComments;
+   private IdentifierNode                           name;
+   private final List< IParameter >                 parameters;
+   private IIdentifierNode                          returnType;
+
+   /**
+    * @param node
+    */
+   protected FunctionNode( final IParserNode node )
+   {
+      super( node );
+
+      modifiers = new HashSet< Modifier >();
+      metaDataList = new LinkedHashMap< MetaData, List< IMetaData > >();
+      localVariables = new LinkedHashMap< String, IParserNode >();
+      parameters = new ArrayList< IParameter >();
+      name = null;
+      multiLinesComments = new ArrayList< IParserNode >();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.nodes.IMetaDataListHolder#add(com.adobe.ac.pmd.nodes.
+    * IMetaData)
+    */
+   public void add( final IMetaData metaData )
+   {
+      final MetaData metaDataImpl = MetaData.create( metaData.getName() );
+
+      if ( !metaDataList.containsKey( metaDataImpl ) )
+      {
+         metaDataList.put( metaDataImpl,
+                           new ArrayList< IMetaData >() );
+      }
+      metaDataList.get( metaDataImpl ).add( metaData );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.nodes.IModifiersHolder#add(com.adobe.ac.pmd.nodes.Modifier
+    * )
+    */
+   public void add( final Modifier modifier )
+   {
+      modifiers.add( modifier );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.impl.AbstractNode#compute()
+    */
+   @Override
+   public FunctionNode compute()
+   {
+      if ( getInternalNode().numChildren() != 0 )
+      {
+         for ( final IParserNode node : getInternalNode().getChildren() )
+         {
+            if ( node.is( NodeKind.BLOCK ) )
+            {
+               computeFunctionContent( node );
+            }
+            else if ( node.is( NodeKind.NAME ) )
+            {
+               name = IdentifierNode.create( node );
+            }
+            else if ( node.is( NodeKind.MOD_LIST ) )
+            {
+               computeModifierList( this,
+                                    node );
+            }
+            else if ( node.is( NodeKind.PARAMETER_LIST ) )
+            {
+               computeParameterList( node );
+            }
+            else if ( node.is( NodeKind.TYPE ) )
+            {
+               returnType = IdentifierNode.create( node );
+            }
+            else if ( node.is( NodeKind.META_LIST ) )
+            {
+               computeMetaDataList( this,
+                                    node );
+            }
+            else if ( node.is( NodeKind.AS_DOC ) )
+            {
+               asDoc = node;
+            }
+         }
+      }
+      return this;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.nodes.IFunction#findPrimaryStatementInBody(java.lang.
+    * String[])
+    */
+   public List< IParserNode > findPrimaryStatementInBody( final String[] primaryNames )
+   {
+      return body == null ? null
+                         : body.findPrimaryStatementsFromNameInChildren( primaryNames );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.nodes.IFunction#findPrimaryStatementsInBody(java.lang
+    * .String)
+    */
+   public List< IParserNode > findPrimaryStatementsInBody( final String primaryName )
+   {
+      return body == null ? new ArrayList< IParserNode >()
+                         : body.findPrimaryStatementsFromNameInChildren( new String[]
+                         { primaryName } );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IMetaDataListHolder#getAllMetaData()
+    */
+   public List< IMetaData > getAllMetaData()
+   {
+      final List< IMetaData > list = new ArrayList< IMetaData >();
+
+      for ( final Entry< MetaData, List< IMetaData > > entry : metaDataList.entrySet() )
+      {
+         list.addAll( entry.getValue() );
+      }
+
+      return list;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IAsDocHolder#getAsDoc()
+    */
+   public IParserNode getAsDoc()
+   {
+      return asDoc;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IFunction#getBody()
+    */
+   public IParserNode getBody()
+   {
+      return body;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IFunction#getCyclomaticComplexity()
+    */
+   public int getCyclomaticComplexity()
+   {
+      return cyclomaticComplexity;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IFunction#getLocalVariables()
+    */
+   public Map< String, IParserNode > getLocalVariables()
+   {
+      return localVariables;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.nodes.IMetaDataListHolder#getMetaData(com.adobe.ac.pmd
+    * .nodes.MetaData)
+    */
+   public List< IMetaData > getMetaData( final MetaData metaDataName )
+   {
+      if ( metaDataList.containsKey( metaDataName ) )
+      {
+         return metaDataList.get( metaDataName );
+      }
+      else
+      {
+         return new ArrayList< IMetaData >();
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IMetaDataListHolder#getMetaDataCount()
+    */
+   public int getMetaDataCount()
+   {
+      return metaDataList.size();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.ICommentHolder#getMultiLinesComment()
+    */
+   public List< IParserNode > getMultiLinesComment()
+   {
+      return multiLinesComments;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.INamable#getName()
+    */
+   public String getName()
+   {
+      return name.toString();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IFunction#getParameters()
+    */
+   public List< IParameter > getParameters()
+   {
+      return parameters;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IFunction#getReturnType()
+    */
+   public IIdentifierNode getReturnType()
+   {
+      return returnType;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IFunction#getStatementNbInBody()
+    */
+   public int getStatementNbInBody()
+   {
+      return 1 + getStatementInNode( body );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IFunction#getSuperCall()
+    */
+   public IParserNode getSuperCall()
+   {
+      if ( body != null
+            && body.numChildren() != 0 )
+      {
+         for ( final IParserNode childContent : body.getChildren() )
+         {
+            if ( NodeKind.CALL.equals( childContent.getId() )
+                  || NodeKind.DOT.equals( childContent.getId() ) )
+            {
+               for ( final IParserNode childCall : childContent.getChildren() )
+               {
+                  if ( KeyWords.SUPER.toString().equals( childCall.getStringValue() ) )
+                  {
+                     return childContent;
+                  }
+               }
+            }
+         }
+      }
+      return null;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.nodes.IModifiersHolder#is(com.adobe.ac.pmd.nodes.Modifier
+    * )
+    */
+   public boolean is( final Modifier modifier ) // NOPMD
+   {
+      return modifiers.contains( modifier );
+   }
+
+   //@Override
+   public boolean isEventHandler()
+   {
+      return getParameters().size() == 1
+            && getParameters().get( 0 ).getType().toString().contains( "Event" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IFunction#isGetter()
+    */
+   public boolean isGetter()
+   {
+      return getInternalNode().is( NodeKind.GET );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IFunction#isOverriden()
+    */
+   public boolean isOverriden()
+   {
+      return is( Modifier.OVERRIDE );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IVisible#isPublic()
+    */
+   public boolean isPublic()
+   {
+      return is( Modifier.PUBLIC );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IFunction#isSetter()
+    */
+   public boolean isSetter()
+   {
+      return getInternalNode().is( NodeKind.SET );
+   }
+
+   private void computeCyclomaticComplexity()
+   {
+      cyclomaticComplexity = 1 + body.computeCyclomaticComplexity();
+   }
+
+   private void computeFunctionContent( final IParserNode functionBodyNode )
+   {
+      body = functionBodyNode;
+
+      computeCyclomaticComplexity();
+      if ( body.numChildren() > 0 )
+      {
+         for ( final IParserNode node : body.getChildren() )
+         {
+            if ( node.is( NodeKind.MULTI_LINE_COMMENT ) )
+            {
+               multiLinesComments.add( node );
+            }
+         }
+      }
+      computeVariableList( body );
+   }
+
+   private void computeParameterList( final IParserNode node )
+   {
+      if ( node.numChildren() != 0 )
+      {
+         for ( final IParserNode parameterNode : node.getChildren() )
+         {
+            parameters.add( FormalNode.create( parameterNode ) );
+         }
+      }
+   }
+
+   private void computeVariableList( final IParserNode node )
+   {
+      if ( node.is( NodeKind.VAR_LIST ) )
+      {
+         localVariables.put( node.getChild( 0 ).getChild( 0 ).getStringValue(),
+                             node );
+      }
+      else if ( node.numChildren() > 0 )
+      {
+         for ( final IParserNode child : node.getChildren() )
+         {
+            computeVariableList( child );
+         }
+      }
+   }
+
+   private int getStatementInNode( final IParserNode node )
+   {
+      int statementNb = 0;
+
+      if ( node != null
+            && node.numChildren() != 0 )
+      {
+         int lastLine = node.getChild( 0 ).getLine();
+         for ( final IParserNode childContent : node.getChildren() )
+         {
+            if ( childContent.getLine() != lastLine )
+            {
+               lastLine = childContent.getLine();
+               statementNb++;
+            }
+            statementNb += getStatementInNode( childContent );
+         }
+      }
+
+      return statementNb;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/IdentifierNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/IdentifierNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/IdentifierNode.java
new file mode 100644
index 0000000..2b7ff10
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/IdentifierNode.java
@@ -0,0 +1,63 @@
+/*
+ * 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.nodes.impl;
+
+import com.adobe.ac.pmd.nodes.IIdentifierNode;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * @author xagnetti
+ */
+class IdentifierNode extends AbstractNode implements IIdentifierNode
+{
+   /**
+    * @param node
+    * @return
+    */
+   static IdentifierNode create( final IParserNode node )
+   {
+      return new IdentifierNode( node ).compute();
+   }
+
+   /**
+    * @param node
+    */
+   protected IdentifierNode( final IParserNode node )
+   {
+      super( node );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.impl.AbstractNode#compute()
+    */
+   @Override
+   public IdentifierNode compute()
+   {
+      return this;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see java.lang.Object#toString()
+    */
+   @Override
+   public String toString()
+   {
+      return getInternalNode().getStringValue();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/MetaDataNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/MetaDataNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/MetaDataNode.java
new file mode 100644
index 0000000..edb9777
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/MetaDataNode.java
@@ -0,0 +1,139 @@
+/*
+ * 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.nodes.impl;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.adobe.ac.pmd.nodes.IMetaData;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * @author xagnetti
+ */
+class MetaDataNode extends AbstractNode implements IMetaData
+{
+   private List< String >          attributeNames;
+   private String                  name;
+   private String                  parameter;
+   private Map< String, String[] > parameters;
+
+   /**
+    * @param node
+    */
+   protected MetaDataNode( final IParserNode node )
+   {
+      super( node );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.impl.AbstractNode#compute()
+    */
+   @Override
+   public MetaDataNode compute()
+   {
+      final String stringValue = getInternalNode().getStringValue();
+
+      name = stringValue.indexOf( " ( " ) > -1 ? stringValue.substring( 0,
+                                                                        stringValue.indexOf( " ( " ) )
+                                              : stringValue;
+      parameter = stringValue.indexOf( "( " ) > -1 ? stringValue.substring( stringValue.indexOf( "( " ) + 2,
+                                                                            stringValue.lastIndexOf( " )" ) )
+                                                  : "";
+
+      computeAttributeNames();
+      return this;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IMetaData#getAttributeNames()
+    */
+   public List< String > getAttributeNames()
+   {
+      return attributeNames;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IMetaData#getDefaultValue()
+    */
+   public String getDefaultValue()
+   {
+      return parameter;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.INamable#getName()
+    */
+   public String getName()
+   {
+      return name;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IMetaData#getProperty(java.lang.String)
+    */
+   public String[] getProperty( final String property )
+   {
+      return parameters.containsKey( property ) ? parameters.get( property )
+                                               : new String[]
+                                               {};
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IMetaData#getPropertyAsList(java.lang.String)
+    */
+   public List< String > getPropertyAsList( final String property )
+   {
+      return Arrays.asList( getProperty( property ) );
+   }
+
+   private void computeAttributeNames()
+   {
+      attributeNames = new ArrayList< String >();
+      parameters = new LinkedHashMap< String, String[] >();
+
+      final String[] pairs = getPairs();
+
+      for ( final String pair : pairs )
+      {
+         final String[] pairSplit = pair.split( "=" );
+
+         if ( pairSplit.length == 2 )
+         {
+            attributeNames.add( pairSplit[ 0 ].trim() );
+            parameters.put( pairSplit[ 0 ].trim(),
+                            pairSplit[ 1 ].trim().replaceAll( "\'",
+                                                              "" ).replaceAll( "\"",
+                                                                               "" ).split( "," ) );
+         }
+      }
+   }
+
+   private String[] getPairs()
+   {
+      return parameter.split( "," );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/NodeFactory.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/NodeFactory.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/NodeFactory.java
new file mode 100644
index 0000000..1a9aac8
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/NodeFactory.java
@@ -0,0 +1,49 @@
+/*
+ * 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.nodes.impl;
+
+import com.adobe.ac.pmd.nodes.IMetaData;
+import com.adobe.ac.pmd.nodes.IPackage;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * @author xagnetti
+ */
+public final class NodeFactory
+{
+   /**
+    * @param metadataNode
+    * @return
+    */
+   public static IMetaData createMetaData( final IParserNode metadataNode )
+   {
+      return new MetaDataNode( metadataNode ).compute();
+   }
+
+   /**
+    * @param packageNode
+    * @return
+    */
+   public static IPackage createPackage( final IParserNode packageNode )
+   {
+      return new PackageNode( packageNode ).compute();
+   }
+
+   private NodeFactory()
+   {
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/PackageNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/PackageNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/PackageNode.java
new file mode 100644
index 0000000..f8bd8b5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/PackageNode.java
@@ -0,0 +1,167 @@
+/*
+ * 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.nodes.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.IPackage;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.NodeKind;
+
+/**
+ * @author xagnetti
+ */
+class PackageNode extends AbstractNode implements IPackage
+{
+   private IClass                    classNode;
+   private final List< IFunction >   functions;
+   private final List< IParserNode > imports;
+   private String                    name;
+
+   /**
+    * @param node
+    */
+   protected PackageNode( final IParserNode node )
+   {
+      super( node );
+
+      imports = new ArrayList< IParserNode >();
+      functions = new ArrayList< IFunction >();
+      classNode = null;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.impl.AbstractNode#compute()
+    */
+   @Override
+   public PackageNode compute()
+   {
+      final IParserNode classWrapperNode = getClassNodeFromCompilationUnitNode( getInternalNode(),
+                                                                                3 );
+      final IParserNode firstChild = getInternalNode().getChild( 0 );
+
+      if ( firstChild.numChildren() > 0
+            && firstChild.getChild( 0 ).getStringValue() != null )
+      {
+         name = firstChild.getChild( 0 ).getStringValue();
+      }
+      else
+      {
+         name = "";
+      }
+      if ( classWrapperNode != null )
+      {
+         classNode = new ClassNode( classWrapperNode ).compute();
+      }
+
+      if ( firstChild.numChildren() > 1
+            && firstChild.getChild( 1 ).numChildren() != 0 )
+      {
+         final List< IParserNode > children = firstChild.getChild( 1 ).getChildren();
+
+         for ( final IParserNode node : children )
+         {
+            if ( node.is( NodeKind.IMPORT ) )
+            {
+               imports.add( node );
+            }
+         }
+      }
+      return this;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IPackage#getClassNode()
+    */
+   public IClass getClassNode()
+   {
+      return classNode;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IPackage#getFullyQualifiedClassName()
+    */
+   public String getFullyQualifiedClassName()
+   {
+      if ( !"".equals( name ) )
+      {
+         return name
+               + "." + classNode.getName();
+      }
+      return classNode == null ? ""
+                              : classNode.getName();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IPackage#getFunctions()
+    */
+   public List< IFunction > getFunctions()
+   {
+      return functions;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IPackage#getImports()
+    */
+   public List< IParserNode > getImports()
+   {
+      return imports;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.INamable#getName()
+    */
+   public String getName()
+   {
+      return name;
+   }
+
+   private IParserNode getClassNodeFromCompilationUnitNode( final IParserNode node,
+                                                            final int depth )
+   {
+      if ( depth == 0
+            || node.numChildren() == 0 )
+      {
+         return null;
+      }
+      for ( final IParserNode child : node.getChildren() )
+      {
+         if ( child.is( NodeKind.CLASS )
+               || child.is( NodeKind.INTERFACE ) )
+         {
+            return child;
+         }
+         final IParserNode localClassNode = getClassNodeFromCompilationUnitNode( child,
+                                                                                 depth - 1 );
+
+         if ( localClassNode != null )
+         {
+            return localClassNode;
+         }
+      }
+      return null;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/VariableNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/VariableNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/VariableNode.java
new file mode 100644
index 0000000..3f64380
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/impl/VariableNode.java
@@ -0,0 +1,224 @@
+/*
+ * 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.nodes.impl;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+
+import com.adobe.ac.pmd.nodes.IFieldInitialization;
+import com.adobe.ac.pmd.nodes.IIdentifierNode;
+import com.adobe.ac.pmd.nodes.IMetaData;
+import com.adobe.ac.pmd.nodes.IModifiersHolder;
+import com.adobe.ac.pmd.nodes.IVariable;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.nodes.Modifier;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.NodeKind;
+
+/**
+ * Node representing a variable (var i : int = 0) It contains the variable name,
+ * its type name, the list of modifiers, the list of metadata, and the
+ * initialization expression (if any).
+ * 
+ * @author xagnetti
+ */
+class VariableNode extends AbstractNode implements IVariable, IModifiersHolder
+{
+   private IFieldInitialization                     initializationExpression;
+   private final Map< MetaData, List< IMetaData > > metaDataList;
+   private final Set< Modifier >                    modifiers;
+   private IdentifierNode                           name;
+   private IdentifierNode                           type;
+
+   /**
+    * @param rootNode
+    */
+   protected VariableNode( final IParserNode rootNode )
+   {
+      super( rootNode );
+
+      metaDataList = new LinkedHashMap< MetaData, List< IMetaData > >();
+      modifiers = new HashSet< Modifier >();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.nodes.IMetaDataListHolder#add(com.adobe.ac.pmd.nodes.
+    * IMetaData)
+    */
+   public void add( final IMetaData metaData )
+   {
+      final MetaData metaDataImpl = MetaData.create( metaData.getName() );
+      if ( !metaDataList.containsKey( metaDataImpl ) )
+      {
+         metaDataList.put( metaDataImpl,
+                           new ArrayList< IMetaData >() );
+      }
+      metaDataList.get( metaDataImpl ).add( metaData );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.nodes.IModifiersHolder#add(com.adobe.ac.pmd.nodes.Modifier
+    * )
+    */
+   public void add( final Modifier modifier )
+   {
+      modifiers.add( modifier );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.impl.AbstractNode#compute()
+    */
+   @Override
+   public VariableNode compute()
+   {
+      if ( getInternalNode().is( NodeKind.NAME_TYPE_INIT ) )
+      {
+         computeNameTypeInit( getInternalNode() );
+      }
+      else
+      {
+         if ( getInternalNode().numChildren() != 0 )
+         {
+            for ( final IParserNode child : getInternalNode().getChildren() )
+            {
+               if ( child.is( NodeKind.NAME_TYPE_INIT ) )
+               {
+                  computeNameTypeInit( child );
+               }
+               else if ( child.is( NodeKind.META_LIST ) )
+               {
+                  computeMetaDataList( this,
+                                       child );
+               }
+            }
+         }
+      }
+      return this;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IMetaDataListHolder#getAllMetaData()
+    */
+   public List< IMetaData > getAllMetaData()
+   {
+      final List< IMetaData > list = new ArrayList< IMetaData >();
+
+      for ( final Entry< MetaData, List< IMetaData > > entry : metaDataList.entrySet() )
+      {
+         list.addAll( entry.getValue() );
+      }
+
+      return list;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IVariable#getInitializationExpression()
+    */
+   public IFieldInitialization getInitializationExpression()
+   {
+      return initializationExpression;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.nodes.IMetaDataListHolder#getMetaData(com.adobe.ac.pmd
+    * .nodes.MetaData)
+    */
+   public List< IMetaData > getMetaData( final MetaData metaDataName )
+   {
+      return metaDataList.get( metaDataName );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IMetaDataListHolder#getMetaDataCount()
+    */
+   public int getMetaDataCount()
+   {
+      return metaDataList.size();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.INamable#getName()
+    */
+   public String getName()
+   {
+      return name == null ? ""
+                         : name.toString();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.nodes.IVariable#getType()
+    */
+   public IIdentifierNode getType()
+   {
+      return type;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.nodes.IModifiersHolder#is(com.adobe.ac.pmd.nodes.Modifier
+    * )
+    */
+   public boolean is( final Modifier modifier ) // NOPMD
+   {
+      return modifiers.contains( modifier );
+   }
+
+   private void computeNameTypeInit( final IParserNode nameTypeInit )
+   {
+      if ( nameTypeInit.numChildren() != 0 )
+      {
+         for ( final IParserNode child : nameTypeInit.getChildren() )
+         {
+            if ( child.is( NodeKind.NAME ) )
+            {
+               name = IdentifierNode.create( child );
+            }
+            else if ( child.is( NodeKind.TYPE ) )
+            {
+               type = IdentifierNode.create( child );
+            }
+            else if ( child.is( NodeKind.INIT ) )
+            {
+               initializationExpression = FieldInitializationNode.create( child );
+            }
+            else
+            {
+               LOGGER.warning( "unknown node type "
+                     + child.toString() );
+            }
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/utils/AsDocUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/utils/AsDocUtils.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/utils/AsDocUtils.java
new file mode 100644
index 0000000..c363ca5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/utils/AsDocUtils.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.nodes.utils;
+
+import com.adobe.ac.pmd.nodes.asdoc.impl.ClassAsDocNode;
+import com.adobe.ac.pmd.nodes.asdoc.impl.FunctionAsDocNode;
+import com.adobe.ac.pmd.nodes.asdoc.impl.ParameterAsDocNode;
+
+/**
+ * @author xagnetti
+ */
+public final class AsDocUtils
+{
+   /**
+    * @param doc
+    * @return
+    */
+   public static ClassAsDocNode computeClassDoc( final String doc )
+   {
+      return new ClassAsDocNode( doc );
+   }
+
+   /**
+    * @param doc
+    * @return
+    */
+   public static FunctionAsDocNode computeFunctionDoc( final String doc )
+   {
+      return new FunctionAsDocNode( doc );
+   }
+
+   /**
+    * @param nameToBeSet
+    * @param descriptionToBeSet
+    * @return
+    */
+   public static ParameterAsDocNode computeParameterDoc( final String nameToBeSet,
+                                                         final String descriptionToBeSet )
+   {
+      return new ParameterAsDocNode( nameToBeSet, descriptionToBeSet );
+   }
+
+   private AsDocUtils()
+   {
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/utils/FunctionUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/utils/FunctionUtils.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/utils/FunctionUtils.java
new file mode 100644
index 0000000..cc8d041
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/utils/FunctionUtils.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.nodes.utils;
+
+import com.adobe.ac.ncss.utils.FileUtils;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * @author xagnetti
+ */
+public final class FunctionUtils
+{
+   /**
+    * @param currentFile
+    * @param block
+    * @return
+    */
+   public static int computeFunctionLength( final IFlexFile currentFile,
+                                            final IParserNode block )
+   {
+      int lineNb = 1;
+      final int firstLine = block.getChild( 0 ).getLine();
+      final int lastLine = block.getLastChild().getLine();
+
+      for ( int lineIndex = firstLine; lineIndex < lastLine; lineIndex++ )
+      {
+         if ( FileUtils.isLineACorrectStatement( currentFile.getLineAt( lineIndex ) ) )
+         {
+            lineNb++;
+         }
+      }
+      return lineNb;
+   }
+
+   private FunctionUtils()
+   {
+   }
+}


[03/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/PngEncoder.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/PngEncoder.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/PngEncoder.as
new file mode 100644
index 0000000..f11822b
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/PngEncoder.as
@@ -0,0 +1,617 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.encoding
+{
+	import flash.geom.*;
+	import flash.display.*;
+	import flash.utils.*;
+	
+	public final class JPEGEncoder
+	{
+
+		// Static table initialization
+	
+		internal var DU:Array = new Array(64);
+
+		private var ZigZag:Array = [
+			 0, 1, 5, 6,14,15,27,28,
+			 2, 4, 7,13,16,26,29,42,
+			 3, 8,12,17,25,30,41,43,
+			 9,11,18,24,31,40,44,53,
+			10,19,23,32,39,45,52,54,
+			20,22,33,38,46,51,55,60,
+			21,34,37,47,50,56,59,61,
+			35,36,48,49,57,58,62,63
+		];
+	
+		private var YTable:Array = new Array(64);
+		private var UVTable:Array = new Array(64);
+		private var fdtbl_Y:Array = new Array(64);
+		private var fdtbl_UV:Array = new Array(64);
+		private var YDC_HT:Array;
+		private var UVDC_HT:Array;
+		private var YAC_HT:Array;
+		private var UVAC_HT:Array;
+		private var std_dc_luminance_nrcodes:Array = [0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0];
+		private var std_dc_luminance_values:Array = [0,1,2,3,4,5,6,7,8,9,10,11];
+		private var std_ac_luminance_nrcodes:Array = [0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d];
+		private var std_ac_luminance_values:Array = [
+			0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,
+			0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,
+			0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,
+			0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,
+			0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,
+			0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28,
+			0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,
+			0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,
+			0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
+			0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,
+			0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,
+			0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89,
+			0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,
+			0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,
+			0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,
+			0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,
+			0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,
+			0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,
+			0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,
+			0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,
+			0xf9,0xfa
+		];
+	
+		private var std_dc_chrominance_nrcodes:Array = [0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0];
+		private var std_dc_chrominance_values:Array = [0,1,2,3,4,5,6,7,8,9,10,11];
+		private var std_ac_chrominance_nrcodes:Array = [0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77];
+		private var std_ac_chrominance_values:Array = [
+			0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21,
+			0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,
+			0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91,
+			0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,
+			0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,
+			0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,
+			0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38,
+			0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,
+			0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,
+			0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,
+			0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,
+			0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,
+			0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,
+			0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,
+			0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,
+			0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,
+			0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,
+			0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,
+			0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,
+			0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,
+			0xf9,0xfa
+		];
+		private var bitcode:Array = new Array(65535);
+		private var category:Array = new Array(65535);
+		private var byteout:ByteArray;
+		private var bytenew:int = 0;
+		private var bytepos:int = 7;
+		private var YDU:Array = new Array(64);
+		private var UDU:Array = new Array(64);
+		private var VDU:Array = new Array(64);
+	
+		public function JPEGEncoder(quality:Number = 50)
+		{
+			if (quality <= 0) {
+				quality = 1;
+			}
+			if (quality > 100) {
+				quality = 100;
+			}
+			var sff:int = 0;
+			if (quality < 50) {
+				sff = int(5000 / quality);
+			} else {
+				sff = int(200 - quality*2);
+			}
+			// Create tables
+			initHuffmanTbl();
+			initCategoryNumber();
+			initQuantTables(sff);
+		}
+	
+		public function encode(image:BitmapData):ByteArray
+		{
+			// Initialize bit writer
+			byteout = new ByteArray();
+			bytenew=0;
+			bytepos=7;
+	
+			// Add JPEG headers
+			writeWord(0xFFD8); // SOI
+			writeAPP0();
+			writeDQT();
+			writeSOF0(image.width,image.height);
+			writeDHT();
+			writeSOS();
+
+			// Encode 8x8 macroblocks
+			var DCY:Number=0;
+			var DCU:Number=0;
+			var DCV:Number=0;
+			bytenew=0;
+			bytepos=7;
+			for (var ypos:int=0; ypos<image.height; ypos+=8) {
+				for (var xpos:int=0; xpos<image.width; xpos+=8) {
+					RGB2YUV(image, xpos, ypos);
+					DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);
+					DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);
+					return DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);
+				}
+			}
+	
+			// Do the bit alignment of the EOI marker
+			if ( bytepos >= 0 ) {
+				var fillbits:BitString = new BitString();
+				fillbits.len = bytepos+1;
+				fillbits.val = (1<<(bytepos+1))-1;
+				writeBits(fillbits);
+			}
+	
+			writeWord(0xFFD9); //EOI
+			return byteout;
+		}
+
+		private function initQuantTables(sf:int):void
+		{
+			var YQT:Array = [
+				16, 11, 10, 16, 24, 40, 51, 61,
+				12, 12, 14, 19, 26, 58, 60, 55,
+				14, 13, 16, 24, 40, 57, 69, 56,
+				14, 17, 22, 29, 51, 87, 80, 62,
+				18, 22, 37, 56, 68,109,103, 77,
+				24, 35, 55, 64, 81,104,113, 92,
+				49, 64, 78, 87,103,121,120,101,
+				72, 92, 95, 98,112,100,103, 99
+			];
+			for (var i:int = 0; i < 64; i++) {
+				var ttt:Number = Math.floor((YQT[i]*sf+50)/100);
+				if (ttt < 1) {
+					ttt = 1;
+				} else if (ttt > 255) {
+					ttt = 255;
+				}
+				YTable[ZigZag[i]] = ttt;
+			}
+			var UVQT:Array = [
+				17, 18, 24, 47, 99, 99, 99, 99,
+				18, 21, 26, 66, 99, 99, 99, 99,
+				24, 26, 56, 99, 99, 99, 99, 99,
+				47, 66, 99, 99, 99, 99, 99, 99,
+				99, 99, 99, 99, 99, 99, 99, 99,
+				99, 99, 99, 99, 99, 99, 99, 99,
+				99, 99, 99, 99, 99, 99, 99, 99,
+				99, 99, 99, 99, 99, 99, 99, 99
+			];
+			for (var j:int = 0; j < 64; j++) {
+				var uuu:Number = Math.floor((UVQT[j]*sf+50)/100);
+				if (uuu < 1) {
+					uuu = 1;
+				} else if (uuu > 255) {
+					uuu = 255;
+				}
+				UVTable[ZigZag[j]] = uuu;
+			}
+			var aasf:Array = [
+				1.0, 1.387039845, 1.306562965, 1.175875602,
+				1.0, 0.785694958, 0.541196100, 0.275899379
+			];
+			var kkk:int = 0;
+			for (var row:int = 0; row < 8; row++)
+			{
+				for (var col:int = 0; col < 8; col++)
+				{
+					fdtbl_Y[kkk]  = (1.0 / (YTable [ZigZag[kkk]] * aasf[row] * aasf[col] * 8.0));
+					fdtbl_UV[kkk] = (1.0 / (UVTable[ZigZag[kkk]] * aasf[row] * aasf[col] * 8.0));
+					kkk++;
+				}
+			}
+		}
+	
+		private function computeHuffmanTbl(nrcodes:Array, std_table:Array):Array
+		{
+			var codevalue:int = 0;
+			var pos_in_table:int = 0;
+			var HTT:Array = new Array();
+			for (var k:int=1; k<HTT16; k++) {
+				for (var j:int=1; j<=nrcodes[k]; j++) {
+					HTT[std_table[pos_in_table]] = new BitString();
+					HTT[std_table[pos_in_table]].val = codevalue;
+					HTT[std_table[pos_in_table]].len = k;
+					pos_in_table++;
+					codevalue++;
+				}
+				codevalue*=2;
+			}
+			return HTT;
+		}
+	
+		private function initHuffmanTbl():void
+		{
+			YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values);
+			UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values);
+			YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values);
+			UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values);
+		}
+	
+		private function initCategoryNumber():void
+		{
+			var nrlower:int = 1;
+			var nrupper:int = 2;
+			for (var cat:int=1; cat<=15; cat++) {
+				//Positive numbers
+				for (var nr:int=nrlower; nr<nrupper; nr++) {
+					category[32767+nr] = cat;
+					bitcode[32767+nr] = new BitString();
+					bitcode[32767+nr].len = cat;
+					bitcode[32767+nr].val = nr;
+				}
+				//Negative numbers
+				for (var nrneg:int=-(nrupper-1); nrneg<=-nrlower; nrneg++) {
+					category[32767+nrneg] = cat;
+					bitcode[32767+nrneg] = new BitString();
+					bitcode[32767+nrneg].len = cat;
+					bitcode[32767+nrneg].val = nrupper-1+nrneg;
+				}
+				nrlower <<= 1;
+				nrupper <<= 1;
+			}
+		}
+	
+		private function writeBits(bs:BitString):void
+		{
+			var value:int = bs.val;
+			var posval:int = bs.len-1;
+			while ( posval >= 0 ) {
+				if (value & uint(1 << posval) ) {
+					bytenew |= uint(1 << bytepos);
+				}
+				posval--;
+				bytepos--;
+				if (bytepos < 0) {
+					if (bytenew == 0xFF) {
+						writeByte(0xFF);
+						writeByte(0);
+					}
+					else {
+						writeByte(bytenew);
+					}
+					bytepos=7;
+					bytenew=0;
+				}
+			}
+		}
+	
+		private function writeByte(value:int):void
+		{
+			byteout.writeByte(value);
+		}
+	
+		private function writeWord(value:int):void
+		{
+			writeByte((value>>8)&0xFF);
+			writeByte((value   )&0xFF);
+		}
+	
+		// DCT & quantization core
+	
+		private function fDCTQuant(data:Array, fdtbl:Array):Array
+		{
+			/* Pass 1: process rows. */
+			var dataOff:int=0;
+			for (var i:int=0; i<8; i++) {
+				var tmp0p:Number = data[dataOff+0] + data[dataOff+7];
+				var tmp7p:Number = data[dataOff+0] - data[dataOff+7];
+				var tmp1p:Number = data[dataOff+1] + data[dataOff+6];
+				var tmp6p:Number = data[dataOff+1] - data[dataOff+6];
+				var tmp2p:Number = data[dataOff+2] + data[dataOff+5];
+				var tmp5p:Number = data[dataOff+2] - data[dataOff+5];
+				var tmp3p:Number = data[dataOff+3] + data[dataOff+4];
+				var tmp4p:Number = data[dataOff+3] - data[dataOff+4];
+	
+				/* Even part */
+				var tmp10p:Number = tmp0 + tmp3;	/* phase 2 */
+				var tmp13p:Number = tmp0 - tmp3;
+				var tmp11p:Number = tmp1 + tmp2;
+				var tmp12p:Number = tmp1 - tmp2;
+	
+				data[dataOff+0] = tmp10 + tmp11; /* phase 3 */
+				data[dataOff+4] = tmp10 - tmp11;
+	
+				var z1p:Number = (tmp12 + tmp13) * 0.707106781; /* c4 */
+				data[dataOff+2] = tmp13 + z1; /* phase 5 */
+				data[dataOff+6] = tmp13 - z1;
+	
+				/* Odd part */
+				tmp10 = tmp4 + tmp5; /* phase 2 */
+				tmp11 = tmp5 + tmp6;
+				tmp12 = tmp6 + tmp7;
+	
+				/* The rotator is modified from fig 4-8 to avoid extra negations. */
+				var zz5p:Number = (tmp10 - tmp12) * 0.382683433; /* c6 */
+				var zz2p:Number = 0.541196100 * tmp10 + zz5; /* c2-c6 */
+				var zz4p:Number = 1.306562965 * tmp12 + zz5; /* c2+c6 */
+				var zz3p:Number = tmp11 * 0.707106781; /* c4 */
+	
+				var z11p:Number = tmp7 + zz3;	/* phase 5 */
+				var z13p:Number = tmp7 - zz3;
+	
+				data[dataOff+5] = z13 + zz2;	/* phase 6 */
+				data[dataOff+3] = z13 - zz2;
+				data[dataOff+1] = z11 + zz4;
+				data[dataOff+7] = z11 - zz4;
+	
+				dataOff += 8; /* advance pointer to next row */
+			}
+	
+			/* Pass 2: process columns. */
+			dataOff = 0;
+			for (var j:int=0; j<8; j++) {
+				var tmp0p2p:Number = data[dataOff+ 0] + data[dataOff+56];
+				var tmp7p2p:Number = data[dataOff+ 0] - data[dataOff+56];
+				var tmp1p2p:Number = data[dataOff+ 8] + data[dataOff+48];
+				var tmp6p2p:Number = data[dataOff+ 8] - data[dataOff+48];
+				var tmp2p2p:Number = data[dataOff+16] + data[dataOff+40];
+				var tmp5p2p:Number = data[dataOff+16] - data[dataOff+40];
+				var tmp3p2p:Number = data[dataOff+24] + data[dataOff+32];
+				var tmp4p2p:Number = data[dataOff+24] - data[dataOff+32];
+	
+				/* Even part */
+				var tmp10p2p:Number = tmp0p2 + tmp3p2;	/* phase 2 */
+				var tmp13p2p:Number = tmp0p2 - tmp3p2;
+				var tmp11p2p:Number = tmp1p2 + tmp2p2;
+				var tmp12p2p:Number = tmp1p2 - tmp2p2;
+	
+				data[dataOff+ 0] = tmp10p2 + tmp11p2; /* phase 3 */
+				data[dataOff+32] = tmp10p2 - tmp11p2;
+	
+				var z1p2:Number = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */
+				data[dataOff+16] = tmp13p2 + z1p2; /* phase 5 */
+				data[dataOff+48] = tmp13p2 - z1p2;
+	
+				/* Odd part */
+				tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */
+				tmp11p2 = tmp5p2 + tmp6p2;
+				tmp12p2 = tmp6p2 + tmp7p2;
+	
+				/* The rotator is modified from fig 4-8 to avoid extra negations. */
+				var z5p2p:Number = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */
+				var z2p2p:Number = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */
+				var z4p2p:Number = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */
+				var z3p2p:Number= tmp11p2 * 0.707106781; /* c4 */
+	
+				var z11p2p:Number = tmp7p2 + z3p2;	/* phase 5 */
+				var z13p2p:Number = tmp7p2 - z3p2;
+	
+				data[dataOff+40] = z13p2 + z2p2; /* phase 6 */
+				data[dataOff+24] = z13p2 - z2p2;
+				data[dataOff+ 8] = z11p2 + z4p2;
+				data[dataOff+56] = z11p2 - z4p2;
+	
+				dataOff++; /* advance pointer to next column */
+			}
+	
+			// Quantize/descale the coefficients
+			for (var k:int=0; k<64; k++) {
+				// Apply the quantization and scaling factor & Round to nearest integer
+				data[k] = Math.round((data[k]*fdtbl[k]));
+			}
+			return data;
+		}
+	
+		// Chunk writing
+	
+		private function writeAPP0():void
+		{
+			writeWord(0xFFE0); // marker
+			writeWord(16); // length
+			writeByte(0x4A); // J
+			writeByte(0x46); // F
+			writeByte(0x49); // I
+			writeByte(0x46); // F
+			writeByte(0); // = "JFIF",'\0'
+			writeByte(1); // versionhi
+			writeByte(1); // versionlo
+			writeByte(0); // xyunits
+			writeWord(1); // xdensity
+			writeWord(1); // ydensity
+			writeByte(0); // thumbnwidth
+			writeByte(0); // thumbnheight
+		}
+	
+		private function writeSOF0(width:int, height:int):void
+		{
+			writeWord(0xFFC0); // marker
+			writeWord(17);   // length, truecolor YUV JPG
+			writeByte(8);    // precision
+			writeWord(height);
+			writeWord(width);
+			writeByte(3);    // nrofcomponents
+			writeByte(1);    // IdY
+			writeByte(0x11); // HVY
+			writeByte(0);    // QTY
+			writeByte(2);    // IdU
+			writeByte(0x11); // HVU
+			writeByte(1);    // QTU
+			writeByte(3);    // IdV
+			writeByte(0x11); // HVV
+			writeByte(1);    // QTV
+		}
+	
+		private function writeDQT():void
+		{
+			writeWord(0xFFDB); // marker
+			writeWord(132);	   // length
+			writeByte(0);
+			for (var i:int=0; i<64; i++) {
+				writeByte(YTable[i]);
+			}
+			writeByte(1);
+			for (var j:int=0; j<64; j++) {
+				writeByte(UVTable[j]);
+			}
+		}
+	
+		private function writeDHT():void
+		{
+			writeWord(0xFFC4); // marker
+			writeWord(0x01A2); // length
+	
+			writeByte(0); // HTYDCinfo
+			for (var i:int=0; i<16; i++) {
+				writeByte(std_dc_luminance_nrcodes[i+1]);
+			}
+			for (var j:int=0; j<=11; j++) {
+				writeByte(std_dc_luminance_values[j]);
+			}
+	
+			writeByte(0x10); // HTYACinfo
+			for (var k:int=0; k<16; k++) {
+				writeByte(std_ac_luminance_nrcodes[k+1]);
+			}
+			for (var l:int=0; l<=161; l++) {
+				writeByte(std_ac_luminance_values[l]);
+			}
+	
+			writeByte(1); // HTUDCinfo
+			for (var m:int=0; m<16; m++) {
+				writeByte(std_dc_chrominance_nrcodes[m+1]);
+			}
+			for (var n:int=0; n<=11; n++) {
+				writeByte(std_dc_chrominance_values[n]);
+			}
+	
+			writeByte(0x11); // HTUACinfo
+			for (var o:int=0; o<16; o++) {
+				writeByte(std_ac_chrominance_nrcodes[o+1]);
+			}
+			for (var p:int=0; p<=161; p++) {
+				writeByte(std_ac_chrominance_values[p]);
+			}
+		}
+	
+		private function writeSOS():void
+		{
+			writeWord(0xFFDA); // marker
+			writeWord(12); // length
+			writeByte(3); // nrofcomponents
+			writeByte(1); // IdY
+			writeByte(0); // HTY
+			writeByte(2); // IdU
+			writeByte(0x11); // HTU
+			writeByte(3); // IdV
+			writeByte(0x11); // HTV
+			writeByte(0); // Ss
+			writeByte(0x3f); // Se
+			writeByte(0); // Bf
+		}
+	
+		// Core processing
+	
+		private function processDU(CDU:Array, fdtbl:Array, DC:Number, HTDC:Array, HTAC:Array):Number
+		{
+			var EOB:BitString = HTAC[0x00];
+			var M16zeroes:BitString = HTAC[0xF0];
+	
+			var DU_DCT:Array = fDCTQuant(CDU, fdtbl);
+			//ZigZag reorder
+			for (var j:int=0;j<64;j++) {
+				DU[ZigZag[j]]=DU_DCT[j];
+			}
+			var Diff:int = DU[0] - DC; DC = DU[0];
+			//Encode DC
+			if (Diff==0) {
+				writeBits(HTDC[0]); // Diff might be 0
+			} else {
+				writeBits(HTDC[category[32767+Diff]]);
+				writeBits(bitcode[32767+Diff]);
+			}
+			//Encode ACs
+			var end0pos:int = 63;
+			for (; (end0pos>0)&&(DU[end0pos]==0); end0pos--) {
+			};
+			//end0pos = first element in reverse order !=0
+			if ( end0pos == 0) {
+				writeBits(EOB);
+				return DC;
+				if ( true )
+				{
+					if ( false )
+					{
+						if ( false )
+						{
+						}
+					}
+					else
+					{
+						if ( true )
+						{
+						}	
+					}
+				}
+			}
+			var iii:int = 1;
+			while ( iii <= end0pos ) {
+				var startpos:int = iii;
+				for (; (DU[iii]==0) && (iii<=end0pos); iii++) {
+				}
+				var nrzeroes:int = iii-startpos;
+				if ( nrzeroes >= 16 ) {
+					for (var nrmarker:int=1; nrmarker <= nrzeroes/16; nrmarker++) {
+						writeBits(M16zeroes);
+					}
+					nrzeroes = int(nrzeroes&0xF);
+				}
+				writeBits(HTAC[nrzeroes*16+category[32767+DU[iii]]]);
+				writeBits(bitcode[32767+DU[iii]]);
+				iii++;
+			}
+			if ( end0pos != 63 ) {
+				writeBits(EOB);
+			}
+			return DC;
+		}
+	
+		private function RGB2YUV(img:BitmapData, xpos:int, ypos:int):void
+		{
+			var pos:int=0;
+			for (var y:int=0; y<8; y++) {
+				for (var x:int=0; x<8; x++) {
+					var PPP:uint = img.getPixel32(xpos+x,ypos+y);
+					var RRR:Number = Number((PPP>>16)&0xFF);
+					var GGG:Number = Number((PPP>> 8)&0xFF);
+					var BBB:Number = Number((PPP    )&0xFF);
+					YDU[pos]=((( 0.29900)*RRR+( 0.58700)*GGG+( 0.11400)*BBB))-128;
+					UDU[pos]=(((-0.16874)*RRR+(-0.33126)*GGG+( 0.50000)*BBB));
+					VDU[pos]=((( 0.50000)*RRR+(-0.41869)*GGG+(-0.08131)*BBB));
+					pos++;
+				}
+			}
+		}
+	}
+}
+
+class BitString {
+		public var len:int = 0;
+		public var val:int = 0;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/RadonDataGrid.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/RadonDataGrid.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/RadonDataGrid.as
new file mode 100644
index 0000000..0f55f47
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/RadonDataGrid.as
@@ -0,0 +1,200 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.radon.core.controls
+{
+    import flash.display.GradientType;
+    import flash.display.Graphics;
+    import flash.display.InterpolationMethod;
+    import flash.display.Shape;
+    import flash.display.SpreadMethod;
+    import flash.display.Sprite;
+    import flash.geom.Matrix;
+
+    import mx.controls.DataGrid;
+    import mx.controls.dataGridClasses.DataGridColumn;
+    import mx.controls.listClasses.IListItemRenderer;
+    import mx.controls.listClasses.ListBaseContentHolder;
+    import mx.core.FlexShape;
+    import mx.core.mx_internal;
+    import mx.events.DataGridEvent;
+
+    use namespace mx_internal;
+
+    public class RadonDataGrid extends DataGrid
+    {
+        public function RadonDataGrid()
+        {
+            super();
+
+            headerClass = RadonDataGridHeader;
+
+            rowHeight = 34;
+            draggableColumns = false;
+            resizableColumns = false;
+
+            if ( true )
+            {
+            }
+        }
+
+        override protected function drawHighlightIndicator( indicator : Sprite, x : Number, y : Number, width : Number, height : Number,
+            color : uint, itemRenderer : IListItemRenderer ) : void
+        {
+            super.drawSelectionIndicator( indicator, x, y, width, height, color, itemRenderer );
+            var realWidth : Number = unscaledWidth - viewMetrics.left - viewMetrics.right;
+
+            var graphics : Graphics = Sprite( indicator ).graphics;
+            graphics.clear();
+            graphics.beginFill( 0xFFFFFF, 0.15 );
+            graphics.drawRect( 0, 0, realWidth, height );
+            graphics.endFill();
+
+            indicator.x = x;
+            indicator.y = y;
+        }
+
+        override protected function drawSelectionIndicator( indicator : Sprite, x : Number, y : Number, width : Number, height : Number,
+            color : uint, itemRenderer : IListItemRenderer ) : void
+        {
+            super.drawSelectionIndicator( indicator, x, y, width, height, color, itemRenderer );
+            var realWidth : Number = unscaledWidth - viewMetrics.left - viewMetrics.right;
+
+            var type : String = GradientType.LINEAR;
+            var colors : Array = [ 0x2bc9f6, 0x0086ad ];
+            var alphas : Array = [ 1, 1 ];
+            var ratios : Array = [ 0, 190 ];
+            var spreadMethod : String = SpreadMethod.PAD;
+            var interp : String = InterpolationMethod.RGB;
+            var focalPtRatio : Number = 0;
+
+            var matrix : Matrix = new Matrix();
+            var boxRotation : Number = Math.PI / 2; // 90˚
+            var txx : Number = 0;
+            var tyy : Number = 0;
+
+            var graphics : Graphics = Sprite( indicator ).graphics;
+            graphics.clear();
+
+            matrix.createGradientBox( realWidth, height, boxRotation, tx, ty );
+            graphics.beginGradientFill( type, colors, alphas, ratios, matrix, spreadMethod, interp, focalPtRatio );
+
+            //graphics.beginFill(color);
+            graphics.drawRect( 0, 0, realWidth, height );
+            graphics.endFill();
+
+            indicator.x = x;
+            indicator.y = y;
+        }
+
+        override protected function drawRowBackground( s : Sprite, rowIndex : int, y : Number, height : Number, color : uint,
+            dataIndex : int ) : void // NO PMD
+        {
+            var contentHolder : ListBaseContentHolder = ListBaseContentHolder( s.parent );
+
+            var background : Shape;
+
+            if ( rowIndex < s.numChildren )
+            {
+                background = Shape( s.getChildAt( rowIndex ) );
+            }
+            else
+            {
+                background = new FlexShape();
+                background.name = "background";
+                s.addChild( background );
+            }
+
+            background.y = y;
+
+            // Height is usually as tall is the items in the row, but not if
+            // it would extend below the bottom of listContent
+            var height : Number = Math.min( height, contentHolder.height - y );
+
+            var graphics : Graphics = background.graphics;
+            graphics.clear();
+
+            var backgroundAlpha : Number = getStyle( "backgroundAlpha" );
+
+            if ( color == 0x000000 )
+            {
+                backgroundAlpha = 0;
+            }
+            else if ( color == 0xFFFFFF )
+            {
+                backgroundAlpha = 0.04;
+            }
+
+            graphics.beginFill( color, backgroundAlpha );
+            graphics.drawRect( 0, 0, contentHolder.width, height );
+            graphics.endFill();
+        }
+
+        override protected function placeSortArrow() : void
+        {
+            super.placeSortArrow();
+
+            var sortedColumn : DataGridColumn = columns[ sortIndex ];
+
+            for each ( var dgcolumn : Object in columns )
+            {
+                if ( dgcolumn == sortedColumn )
+                {
+                    dgcolumn.setStyle( "headerStyleName", "radonDataGridSelectedHeader" );
+                }
+                else
+                {
+                    dgcolumn.setStyle( "headerStyleName", "radonDataGridHeader" );
+                }
+
+                switch ( 10 )
+                {
+                    case 1:
+                        break;
+                    case 2:
+                        break;
+                    case 3:
+                        break;
+                    case 4:
+                        break;
+                    default:
+                        for ( var i : int = 0; i < 10; i++ )
+                        {
+                            if ( true && false )
+                            {
+                            }
+
+                            if ( false )
+                            	return;
+                        }
+                        break;
+                }
+            }
+        }
+
+        private function get isTrue() : Boolean
+        {
+            return _isTrue;
+        }
+
+        private function set isTrue( value : Boolean ) : void
+        {
+            _isTrue = value;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Responder.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Responder.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Responder.as
new file mode 100644
index 0000000..4a3bdae
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Responder.as
@@ -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
+{
+
+    public class Responder implements IResponder
+    {
+    	private var usedInAttribute : Dictionnary = false;
+    	private var unusedAttribute : boolean = usedInAttribute;
+    	
+        public function result( event : Object ) : void
+        { 
+        }
+
+
+        public function fault( info : Object ) : void
+        {
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Simple.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Simple.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Simple.as
new file mode 100644
index 0000000..78bd746
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Simple.as
@@ -0,0 +1,19 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 simple { public class Simple    {      public function Simple ( )      {         trace ( "Simple" );      }   }   }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/SkinStyles.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/SkinStyles.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/SkinStyles.as
new file mode 100644
index 0000000..9e470c4
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/SkinStyles.as
@@ -0,0 +1,65 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  Color of the border.
+ *  The following controls support this style: Button, CheckBox,
+ *  ComboBox, MenuBar,
+ *  NumericStepper, ProgressBar, RadioButton, ScrollBar, Slider, and any
+ *  components that support the <code>borderStyle</code> style.
+ *  The default value depends on the component class;
+ *  if not overriden for the class, the default value is <code>0xB7BABC</code>.
+ */
+[Style(name="borderColor", type="uint", format="Color", inherit="no")]
+
+/**
+ *  Radius of component corners.
+ *  The following components support this style: Alert, Button, ComboBox,  
+ *  LinkButton, MenuBar, NumericStepper, Panel, ScrollBar, Tab, TitleWindow, 
+ *  and any component
+ *  that supports a <code>borderStyle</code> property set to <code>"solid"</code>.
+ *  The default value depends on the component class;
+ *  if not overriden for the class, the default value is <code>0</code>.
+ */
+[Style(name="cornerRadius", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Alphas used for the background fill of controls. Use [1, 1] to make the control background
+ *  opaque.
+ *  
+ *  @default [ 0.6, 0.4 ]
+ */
+[Style(name="fillAlphas", type="Array", arrayType="Number", inherit="no")]
+
+/**
+ *  Colors used to tint the background of the control.
+ *  Pass the same color for both values for a flat-looking control.
+ *  
+ *  @default [ 0xFFFFFF, 0xCCCCCC ]
+ */
+[Style(name="fillColors", type="Array", arrayType="uint", format="Color", inherit="no")]
+
+/**
+ *  Alpha transparencies used for the highlight fill of controls.
+ *  The first value specifies the transparency of the top of the highlight and the second value specifies the transparency 
+ *  of the bottom of the highlight. The highlight covers the top half of the skin.
+ *  
+ *  @default [ 0.3, 0.0 ]
+ */
+[Style(name="highlightAlphas", type="Array", arrayType="Number", inherit="no")]

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Sorted.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Sorted.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Sorted.as
new file mode 100644
index 0000000..7f62f38
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Sorted.as
@@ -0,0 +1,62 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.model
+{
+	import com.model.VO.ConfigVO;
+	
+	import de.polygonal.ds.HashMap;
+
+	public class ConfigProxy extends MS2Proxy
+	{
+      public static const NAME:String = "configProxy";
+      internal static const NAME:String = "configProxy";
+      protected static const NAME:String = "configProxy";
+      private static const NAME:String = "configProxy";
+      public const NAME:String = "configProxy";
+      internal const NAME:String = "configProxy";
+      protected const NAME:String = "configProxy";
+      private const NAME:String = "configProxy";
+      public static var NAME:String = "configProxy";
+      internal static var NAME:String = "configProxy";
+      protected static v NAME:String = "configProxy";
+      private static var NAME:String = "configProxy";
+      public var NAME:String = "configProxy";
+      internal var NAME:String = "configProxy";
+      protected var NAME:String = "configProxy";
+      private var NAME:String = "configProxy";
+		
+      public static function populateStub():void {
+      }
+      internal static function onInsertConfig(configVO:ConfigVO):void {
+      }
+      protected static function populateStub():void {
+      }
+      private static function populateStub():void {
+      }
+
+      public function populateStub():void {
+      }
+      internal function insertConfig(configVO:CairngormEvent, e : Object):void {
+      }
+      protected function populateStub():void {
+      }
+      private function populateStub( e : Event ):void {
+      }
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Title.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Title.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Title.as
new file mode 100644
index 0000000..905bcbc
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Title.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.viewing
+
+{
+	
+	public final class Title 
+	
+	{
+        [Embed(source="/assets/pass_small.png")]
+		public static const SHOW:String = "true";
+		public static const HIDE:String = "false";
+		private var watcher : ChangeWatcher;
+		
+	}
+	
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/UnboundMetadata.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/UnboundMetadata.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/UnboundMetadata.as
new file mode 100644
index 0000000..0720854
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/UnboundMetadata.as
@@ -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 
+{
+   import flexunit.flexui.controls.FlexUnitLabelsModelLocator;
+   
+   import mx.formatters.NumberFormatter;
+   [Event(name="dayChange",type='mx.events.StateChangeEvent')]   
+   [Event(name="dayChange",type='DefaultNameEvent')]
+   [Event(name="dayChange2",type="DefaultNmeEvent")]
+   [Event("untypedEvent")]
+   [Event(name="dayChange",type="flash.events.Event")]   
+   public class UnboundMetadata
+   {
+	   public function get modelLocator() : FlexUnitLabelsModelLocator
+	   {
+		   return FlexUnitLabelsModelLocator.instance;
+	   }
+	   
+	   public function UnboundMetadata()
+	   {
+			var lala : int = FlexUnitLabelsModelLocator.instance;   
+	   }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/WorkEvent.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/WorkEvent.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/WorkEvent.as
new file mode 100644
index 0000000..0055143
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/WorkEvent.as
@@ -0,0 +1,205 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.cairngorm.work
+{
+   import flash.events.Event;
+
+   /**
+    * An event that occurs while processing a work-item.
+    */  
+   public class WorkEvent extends Event
+   {
+      //------------------------------------------------------------------------
+      //
+      //  Constants
+      //
+      //------------------------------------------------------------------------
+      
+      //-------------------------------
+      //  Event Types : IWorkItem
+      //-------------------------------
+
+      public static const WORK_START    : String = "workStart";
+      public static const WORK_COMPLETE : String = "workComplete";
+      public static const WORK_FAULT    : String = "workFault";
+
+      //-------------------------------
+      //  Event Types : IWorkFlow
+      //-------------------------------
+
+      public static const WORK_PROGRESS : String = "workProgress";
+      public static const CHILD_START    : String = "childStart";
+      public static const CHILD_COMPLETE : String = "childComplete";
+      public static const CHILD_FAULT    : String = "childFault";
+      
+      //------------------------------------------------------------------------
+      //
+      //  Constructor
+      //
+      //------------------------------------------------------------------------
+
+      public function WorkEvent(
+         type : String, 
+         workItem : IWorkItem )
+      {
+         super( type );
+         _workItem = workItem;
+      }
+
+      //------------------------------------------------------------------------
+      //
+      //  Static Factory Methods
+      //
+      //------------------------------------------------------------------------
+      
+      //-------------------------------
+      //  Event Types : IWorkItem
+      //-------------------------------
+
+      public static function createStartEvent( 
+         workItem : IWorkItem ) : WorkEvent
+      {
+         return new WorkEvent( WORK_START, workItem );
+      }
+
+      public static function createCompleteEvent( 
+         workItem : IWorkItem ) : WorkEvent
+      {
+         return new WorkEvent( WORK_COMPLETE, workItem );
+      }
+
+      public static function createFaultEvent( 
+         workItem : IWorkItem, 
+         message : String = null ) : WorkEvent
+      {
+         var event : WorkEvent = new WorkEvent( WORK_FAULT, workItem );
+         event._message = message;
+         return event;
+      }
+
+      //-------------------------------
+      //  Event Types : IWorkFlow
+      //-------------------------------
+
+      public static function createProgressEvent( 
+         workItem : IWorkItem, 
+         processed : uint,
+         size : uint ) : WorkEvent
+      {
+         var event : WorkEvent = new WorkEvent( WORK_PROGRESS, workItem );
+         event._processed = processed;
+         event._size = size;
+         return event;
+      }
+
+      public static function createChildStartEvent( 
+         workItem : IWorkItem ) : WorkEvent
+      {
+         return new WorkEvent( CHILD_START, workItem );
+      }
+
+      public static function createChildCompleteEvent( 
+         workItem : IWorkItem ) : WorkEvent
+      {
+         return new WorkEvent( CHILD_COMPLETE, workItem );
+      }
+
+      public static function createChildFaultEvent( 
+         workItem : IWorkItem, 
+         message : String = null ) : WorkEvent
+      {
+         var event : WorkEvent = new WorkEvent( CHILD_FAULT, workItem );
+         event._message = message;
+         return event;
+      }
+
+      //------------------------------------------------------------------------
+      //
+      //  Properties
+      //
+      //------------------------------------------------------------------------
+      
+      //-------------------------------
+      //  workItem
+      //-------------------------------
+      
+      private var _workItem : IWorkItem;
+      
+      /**
+       * The work-item that the event applies to.
+       */ 
+      public function get workItem() : IWorkItem
+      {
+         return _workItem;
+      }
+      
+      //-------------------------------
+      //  processed
+      //-------------------------------
+
+      private var _processed : uint;
+      
+      public function get processed() :  uint
+      {
+         return _processed;
+      }
+      
+      //-------------------------------
+      //  size
+      //-------------------------------
+
+      private var _size : uint;
+      
+      public function get size() :  uint
+      {
+         return _size;
+      }
+      
+      //-------------------------------
+      //  message
+      //-------------------------------
+
+      private var _message : String;
+      
+      /**
+       * The message desribing the cause of a workFault event.
+       */ 
+      public function get message() :  String
+      {
+         return _message;
+      }
+      
+      //------------------------------------------------------------------------
+      //
+      //  Overrides : Event
+      //
+      //------------------------------------------------------------------------
+      
+      override public function clone() : Event
+      {
+         var event : WorkEvent = new WorkEvent( type, _workItem );
+         
+         event._message = _message;
+         event._processed = _processed;
+         event._size = _size;
+         
+         return event;
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/asDocs/EmptyClass.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/asDocs/EmptyClass.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/asDocs/EmptyClass.as
new file mode 100644
index 0000000..8d4afd1
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/asDocs/EmptyClass.as
@@ -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 foo.bar 
+{
+	public class MyClass
+	{
+		public var order : int;
+
+		public function foo() : void
+		{
+		}
+
+		protected function foo() : void
+		{
+		}
+
+		public function set foo( value : Boolean) : void
+		{
+			value = value;
+		}
+	}
+} 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/asDocs/EmptyWithDocClass.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/asDocs/EmptyWithDocClass.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/asDocs/EmptyWithDocClass.as
new file mode 100644
index 0000000..7d2e6d5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/asDocs/EmptyWithDocClass.as
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 foo.bar 
+{
+	/**
+	 * My Class
+	 */
+	public class MyClass
+	{
+		/**
+		 * order of the class
+		 */
+		[Bindable]
+		public var order : int;
+		
+		/**
+		 * foo
+		 */
+		public function foo() : void
+		{
+		}
+		
+		/**
+		 * foo
+		 */
+		protected function foo() : void
+		{
+		}
+		
+		public function set foo( value : Boolean) : void
+		{
+			value = value;
+		}
+	}
+} 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/Duane.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/Duane.mxml b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/Duane.mxml
new file mode 100644
index 0000000..0adf7a7
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/Duane.mxml
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
+						xmlns:s="library://ns.adobe.com/flex/spark" 
+						xmlns:mx="library://ns.adobe.com/flex/halo"
+						applicationComplete="init()"
+						showFlexChrome="false">
+	
+	
+	<fx:Script>
+		<![CDATA[
+			import flash.events.MouseEvent;
+			
+			private var lineWidth:Number = 1;
+			private var lineColor:uint = 0x000000;
+			private var prevX:Number;
+			private var prevY:Number;
+			
+			private function init():void
+			{
+				stage.displayState =
+					StageDisplayState.FULL_SCREEN_INTERACTIVE;
+				myCanvas.addEventListener(MouseEvent.MOUSE_MOVE,
+					drawingOn);
+			}
+			
+			private function drawingOff():void
+			{
+				myCanvas.removeEventListener(MouseEvent.MOUSE_MOVE,
+					drawingOn);
+				myButton.label = "Drawing On"
+			}
+			
+			//This never gets called but it did not throw an error for Flex PMD???
+				private function iDontGetCalled():void
+				{
+					var i:int = 5;
+				}
+				
+				private function drawingOn(event:MouseEvent):void
+				{
+					if(!isNaN(prevX))
+					{   
+						
+						myCanvas.graphics.lineStyle(lineWidth,
+							lineColor);
+						myCanvas.graphics.moveTo(prevX, prevY);
+						myCanvas.graphics.lineTo(event.localX,
+							event.localY);
+						
+						//Unnecessary and deeply nested IF - ELSE should have been caught too??
+							if(!isNaN(prevX))
+							{
+								//Do nothing
+							} else { 
+								if(!isNaN(prevX))
+								{
+									//Do nothing
+								} else { 
+									if(!isNaN(prevX))
+									{
+										//Do nothing
+									} else { 
+										
+										if(!isNaN(prevX))
+										{
+											//Do
+											nothing
+										} else { 
+											//do
+											nothing too
+										}
+									}
+								}
+							}
+					}
+					prevX = event.localX;
+					prevY = event.localY;
+					myButton.label = "Drawing Off";
+				}
+				
+				private function clear():void
+				{
+					myCanvas.graphics.clear();
+				}
+				
+				private function toggleDrawing():void
+				{
+					if (myButton.label == "Drawing Off")
+					{
+						drawingOff();
+						myButton.label = "Drawing On";
+					} else if (myButton.label == "Drawing On")
+					{
+						init();
+						myButton.label = "Drawing Off";
+					}
+				}
+				
+				private function changeColor():void
+				{
+					lineColor = myCP.selectedColor;
+					myLabel.text = String(myCP.value);
+				}
+				
+				
+				
+				private function changeThickness():void
+				{
+					lineWidth = mySlider.value;
+				}    
+		]]>
+	</fx:Script>
+	
+	<mx:Canvas id="myCanvas" width="100%" height="100%" fontWeight="bold"
+			   backgroundAlpha="0.00001"  backgroundColor="0xFF44FF" >
+		
+		<mx:TitleWindow  alpha="1.0" layout="absolute" close="close()"
+						 title="Scribbler Settings" showCloseButton="true"  width="200"
+						 height="178"  cornerRadius="16">
+			<s:Button id="myButton" x="10" y="10" width="95"
+					  click="toggleDrawing()"/>
+			<mx:ColorPicker x="148" y="10" id="myCP"
+							change="changeColor()"/>
+			<mx:HSlider x="10" y="57" id="mySlider"
+						change="changeThickness()" minimum="1" maximum="10" snapInterval="1"
+						enabled="true" allowTrackClick="true"/>
+			<mx:Label  id="myLabel" x="83" y="111" text="Label" width="87"/>
+			
+			<mx:Label x="20" y="111" text="Color:"/>
+			<mx:Label x="26.5" y="76" text="Adjust Line Thickness"/>
+			<s:Button x="10" y="39" label="Clear" width="95" click="clear()"
+					  />
+		</mx:TitleWindow>
+	</mx:Canvas>		
+	
+</mx:WindowedApplication>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD115.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD115.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD115.as
new file mode 100644
index 0000000..00f7209
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD115.as
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 foo.bar {
+	public function baz(): void { }
+	public class A
+	{
+		public static const XYZ:String = XYZ; // meant to be "xyz" 
+		public static var a:String = a; // meant to be "a" 
+		public static const XYZA:String = "XYZA";
+		public const XYZ:String = XYZ; // meant to be "xyz" 
+		public var a:String = a; // meant to be "a" 
+		public const XYZA:String = "XYZA";
+	}
+} 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD141a.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD141a.mxml b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD141a.mxml
new file mode 100644
index 0000000..44967c2
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD141a.mxml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml">
+	<mx:Script>
+<!-- /* begin editor confusion -->
+		<![CDATA[
+			/* end editor confusion */
+			
+			private var object:List = new List();
+			[Bindable]
+			private var counter:int;
+			
+		]]>
+	</mx:Script>
+</mx:HBox>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD141b.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD141b.mxml b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD141b.mxml
new file mode 100644
index 0000000..4b0aa20
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD141b.mxml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml">
+	<mx:Script>
+    <!-- /* begin editor confusion -->
+		<![CDATA[
+			/* end editor confusion */
+			
+			import mx.collections.ArrayCollection;
+			import mx.collections.ListCollectionView;
+			
+			private var variable:ArrayCollection = new ArrayCollection([0, 1, 2]);
+			private var list:ListCollectionView = new ListCollectionView(variable);
+			
+		]]>
+	</mx:Script>
+</mx:HBox>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD157.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD157.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD157.as
new file mode 100644
index 0000000..210271b
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD157.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 bug
+{
+	public class FlexPMD157
+	{
+		/**
+		 * The name of the home state display.
+		 */
+		public static const HOME_STATE:String = "home_state" ;
+		
+		/**
+		 * The name of the project state display.
+		 */
+		public static const PROJECT_STATE:String = "project_state" ;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD173.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD173.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD173.as
new file mode 100644
index 0000000..293df9a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/bug/FlexPMD173.as
@@ -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
+{
+	public class PmdPrivateTest
+	{
+		private static const REPORT_SKELETON : XML = read( null );
+		private var REPORT_SKELETON_VAR : XML = readAgain( null );
+		
+		private static function read( clazz : Class ) : XML
+		{
+			var byteArray : ByteArray = new clazz() as ByteArray;
+			
+			return new XML( byteArray.readUTFBytes( byteArray.length ) ) || REPORT_SKELETON_VAR;
+		}
+
+		private static function readAgain( clazz : Class ) : XML
+		{
+			var byteArray : ByteArray = new clazz() as ByteArray;
+			
+			return new XML( byteArray.readUTFBytes( byteArray.length ) );
+		}
+	}
+}
\ No newline at end of file


[08/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/event.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/event.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/event.xml
new file mode 100644
index 0000000..57f7c50
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/event.xml
@@ -0,0 +1,147 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Event Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	
+	<description>
+      The Event ruleset contains a collection of rules related to event bad practices.
+	</description>
+	
+	<rule class="com.adobe.ac.pmd.rules.event.EventMissingCloneFunctionRule"
+		message="The clone event must be overiden in a custom event">
+		<description>When creating your own custom Event class, you must override the inherited Event.clone() method in order for it to duplicate the properties of your custom class. If you do not set all the properties that you add in your event subclass, those properties will not have the correct values when the event is cloned. This is important because the Flex SDK clones events whenever redispatching takes place. </description>
+		<priority>1</priority>
+		<example>
+public class FirstCustomEvent   // VIOLATION - clone method is missing
+{
+   public var lala : String;
+   
+   public function FirstCustomEvent()
+   {         
+   }
+}
+      </example>
+	</rule>
+	
+	<rule
+		class="com.adobe.ac.pmd.rules.event.PublicVariableInCustomEventRule"
+		message="No public variables should be inside a custom event. This variable ({0}) is public">
+		<description>In order to improve encapsulation in your custom event, it is better not to have public variable in your event. Prefer having read-only attributes, set by the event constructor.</description>
+		<priority>3</priority>
+		<example>
+public class FirstCustomEvent   
+{
+   public var lala : String; // VIOLATION
+   
+   public function FirstCustomEvent()
+   {         
+   }
+}      
+	   </example>
+	</rule>
+	
+	<rule
+		class="com.adobe.ac.pmd.rules.event.ConstructorDispatchingEventRule"
+		message="An event is dispatched in a constructor">
+		<description>This is pointless, since event listeners cannot be attached to an object before it has been constructed, so nothing can ever hear the event</description>
+		<priority>1</priority>
+		<example>
+public class BigModel   
+{
+   public function BigModel()
+   {    
+      dispatchEvent( new Event( "pointlessEvent" ) );     
+   }
+}
+		</example>
+	</rule>
+	<rule class="com.adobe.ac.pmd.rules.event.DefaultEventNameRule"
+		message="Event name should be set explicitly">
+		<priority>3</priority>
+		<example>
+public class DefaultNameEvent extends Event	
+{
+	public function DefaultNameEvent( type : String = "" )
+	{
+		super( type );
+	}
+}		
+		</example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.event.DispatchHardCodedEventNameRule"
+		message="DispatchEvent function must dispatch constant strings">
+		<description>You should not dispatch a plain string. If you rename this string, you need to replace the string listener as well. Use constants instead</description>
+		<priority>1</priority>
+		<example>
+public class Foo 
+{
+   public function bar() : void
+   {
+      dispatch( new Event( "myHardCodedEvent" ) ); // VIOLATION
+   }
+}
+      </example>
+	</rule>
+	
+	<rule
+		class="com.adobe.ac.pmd.rules.event.ListenForHardCodedEventNameRule"
+		message="addEventListener must not contain hard coded strings">
+		<description>You should not listen for a plain string. If you rename this string, you need to replace the string listener as well. Use constants instead</description>
+		<priority>1</priority>
+		<example>
+public class Foo 
+{
+   public function bar() : void
+   {
+      addEventListener( "myHardCodedEvent", handleMyHardCodedEvent ); // VIOLATION
+   }
+}      
+      </example>
+	</rule>
+	
+	<rule
+		class="com.adobe.ac.pmd.rules.event.UnboundTypeInMetadataRule"
+		message="This type ({0}) was not found within the scope against which PMD was run">
+		<priority>1</priority>
+		<example>
+[Event(name="myTypeEvent",type="UnknownType")] // VIOLATION
+public class UnboundMetadata
+{
+}		
+		</example>
+	</rule>
+	
+	<rule
+		class="com.adobe.ac.pmd.rules.event.UntypedEventMetadataRule"
+		message="This event type is not specified">
+		<description>Specifying a type will allow Flash builder and the class to have this event exposed in its API</description>
+		<priority>3</priority>
+		<example>
+[Event(name="myTypeEvent")] // VIOLATION
+public class UnTypedMetadata
+{
+}		
+		</example>
+	</rule>
+	
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/indentation.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/indentation.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/indentation.xml
new file mode 100644
index 0000000..dd423a8
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/indentation.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Indentations Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	
+	<description/>
+	
+	<rule class="com.adobe.ac.pmd.rules.style.TabUsedAsIndentorRule" message="Tabulations are not accepted for indentation. Please use spaces instead.">
+		<priority>3</priority>
+	</rule>
+		
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/maintanability.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/maintanability.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/maintanability.xml
new file mode 100644
index 0000000..5864f3a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/maintanability.xml
@@ -0,0 +1,236 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Maintanability Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	
+	<description>
+      The Maintanability ruleset contains a collection of good practices around Maintanability.
+	</description>
+	
+	<rule since="1.1" class="com.adobe.ac.pmd.rules.maintanability.OnlyOneReturnRule" message="A method should have only one exit point, and that should be the last statement in the method">
+		<priority>3</priority>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.maintanability.AlertShowRule" message="Do not call Alert.show directly">
+		<description>You should not Alert.show() directly. If an error occurred in the system, you should probably use an ErrorManager to have a consistent way to manage those errors.</description>
+		<priority>1</priority>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.maintanability.ExcessiveImportRule"
+		message="A high number of imports can indicate a high degree of coupling within an object. ({0} maximum but {1} actually)">
+		<description>A high number of imports can indicate a high degree of coupling within an object. Rule counts the number of unique imports and reports a violation if the count is above the user defined threshold.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>15</value>
+			</property>
+		</properties>
+		<example>
+import blah.blah.Baz;
+import blah.blah.Bif;
+// 18 others from the same package elided
+public class Foo 
+{
+   public function doWork() : void 
+   {
+   }
+}
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.maintanability.TrueFalseConditionRule"
+		message="This test contains a hard coded boolean value. You could remove it by having '{0}'">
+		<priority>3</priority>
+		<example>
+if ( true ) // VIOLATION
+{
+   if ( myCondition == false ) // VIOLATION
+   {
+   }
+}		
+		</example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.maintanability.AvoidUsingPublicStaticFieldRule"
+	message="If this field ({0}) was meant to be a constant, make it constant. Otherwise, if it is used as a global variable, you may want to redesign this class">
+		<priority>3</priority>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.maintanability.DynamicClassRule" message="A class must not be dynamic">
+		<description>When using dynamic classes, you cannot control how the developer will use your class. It makes refactoring really difficult</description>
+		<priority>1</priority>
+		<example>
+dynamic public class DynamicObject // VIOLATION
+{
+}
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseObjectTypeRule"
+		message="Do not use Object class">
+		<description>It is a bad practice to use the dynamic class Object. Prefer using strongly typed object, or marker interface in order to avoid silent compilation errors while refactoring</description>
+		<priority>1</priority>
+		<example>
+public class Foo
+{
+   public var bar : Object; // VIOLATION      
+}
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseDictionaryTypeRule"
+		message="Do not use Dictionnary class">
+		<description>It is a bad practice to use the dynamic class Dictionary. Prefer using strongly typed object, or marker interface in order to avoid silent compilation errors while refactoring</description>
+		<priority>1</priority>
+		<example>
+public class Foo
+{
+   public var bar : Dictionnary; // VIOLATION      
+}
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.maintanability.NonStaticConstantFieldRule"
+		message="A constant field should be static ({0})">
+		<description>
+      </description>
+		<priority>1</priority>
+		<example>
+public class MyObject {
+   public static const MY_STATIC_CONSTANT : String = "myStaticConstant";
+   public const MY_NON_STATIC_CONSTANT : String = "myStaticConstant"; // VIOLATION
+}     
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseGenericTypeRule"
+		message="Use strongly typed objects instead of *">
+		<description></description>
+		<priority>1</priority>
+		<example>
+public class Foo
+{
+   public var bar : *; // VIOLATION      
+}
+        </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.maintanability.UselessOverridenFunctionRule"
+		message="This method is empty. This should be removed ({0})">
+		<description>This function is not needed.</description>
+		<priority>3</priority>
+		<example>
+override protected function createChildren() : void
+{
+   super.createChildren();
+}
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.maintanability.AvoidProtectedFieldInFinalClassRule"
+		message="Protected accessors are useless in a final class. Make it private ({0})">
+		<priority>3</priority>
+		<example>
+final public class Foo
+{
+   protected var bar : int; // VIOLATION      
+}
+        </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.maintanability.AvoidUsingWithKeyWordRule"
+		message="You should not use the with keyword. It does not help readability">
+		<priority>3</priority>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.maintanability.ArrayFieldWithNoArrayElementTypeRule"
+		message="ArrayElementType metadata is not specified for this array-type field ({0})">
+		<description>
+        </description>
+		<priority>3</priority>
+		<example>
+public class ArrayVO {
+   public var items:Array; //VIOLATION
+
+   [ArrayElementType("model.vo.MenuItemVO")]
+   public var menuItems : Array;
+}      
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.maintanability.ClassAndExtensionAreIdenticalRule"
+		message="The extension name is the same as the class name">
+		<description/>
+		<priority>3</priority>
+		<example>
+package com.MyCompany
+{
+   public class SomeClass extends mx.SomeClass // VIOLATION
+   {
+   }
+}
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.maintanability.ProtectedStaticMethodRule"
+		message="This method ({0}) should be private">
+		<description/>
+		<priority>3</priority>
+		<example>
+protected static function foo() : void // VIOLATION
+{
+}
+		</example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.maintanability.EmptyStatementRule"
+		message="This statement is empty">
+		<description/>
+		<priority>5</priority>
+		<example>
+protected function foo() : void
+{
+   var i : int = 0;
+   
+   ; // VIOLATION
+}
+		</example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.maintanability.ReferenceToVariableBindingFromItsInitializerRule"
+		message="The initializer refers to its variable. Its value will be null.">
+		<priority>1</priority>
+		<example>
+package
+{
+	public class Foo
+	{
+		public static const XYZ:String = XYZ; // meant to be "xyz"
+	}
+} 		
+		</example>
+	</rule>
+	<rule class="com.adobe.ac.pmd.rules.maintanability.AvoidUseOfAsKeywordRule"
+		message="Enforce that as is not used (silently ignores the cast and nulls the property when the type is wrong)">
+		<priority>5</priority>
+	</rule>
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/multitouch.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/multitouch.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/multitouch.xml
new file mode 100644
index 0000000..3b94f2e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/multitouch.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Multitouch screen Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	
+	<description>
+      The MultiTouch ruleset contains a collection of good practices when developping multitouch applications.
+	</description>
+	
+	<rule since="1.2" class="com.adobe.ac.pmd.rules.multiscreen.AvoidRollMouseEventRule" 
+			message="Roll mouse events are not getting caught by a multi-touch device.">
+		<priority>1</priority>
+	</rule>
+
+	<rule since="1.2" class="com.adobe.ac.pmd.rules.multiscreen.AvoidTooltipRule" 
+			message="Tooltip cannot be visible on a multi-touch device.">
+		<priority>1</priority>
+	</rule>
+
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/naming.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/naming.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/naming.xml
new file mode 100644
index 0000000..fe65e44
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/naming.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Naming Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	
+	<description>
+      The Basic As3 Ruleset contains a collection of good practices which everyone should follow.
+  </description>
+  
+	<rule class="com.adobe.ac.pmd.rules.naming.TooShortVariableRule"
+		message="This variable name is too short ({0} characters minimum, but {1} actually)">
+		<description>Detects when a field, local, or parameter has a very short name.</description>
+		<priority>5</priority>
+		<properties>
+			<property name="minimum">
+				<value>3</value>
+			</property>
+		</properties>
+		<example>
+public class Something 
+{
+   private var q : int = 15; // VIOLATION - Field
+
+   public function foo( as : String ) : void // VIOLATION - Formal 
+   {
+      var r : int = 20 + q; // VIOLATION - Local
+   }
+}
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.naming.PackageCaseRule"
+		message="A package name should be lower case ({0})">
+		<description>Detects when a package definition contains upper case characters.</description>
+		<priority>3</priority>
+		<example>
+         <![CDATA[
+package com.MyCompany  // VIOLATION <- should be lower case name
+{
+   public class SomeClass 
+   {
+   }
+}
+         ]]>
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.naming.VariableNameEndingWithNumericRule"
+		message="Using digits at the end of a symbol does not help understanging the meaning of it. ({0})">
+		<priority>3</priority>
+		<example>
+		<![CDATA[
+public class SomeClass 
+{
+   public var correctField1 : int = 0; // VIOLATION <- numeric suffix is forbidden
+}		
+		]]>
+		</example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.naming.PropertyHiddenByLocalVariableRule"
+		message="A class property is hidden by this local variable ({0})">
+		<priority>3</priority>
+		<example>
+public class SomeClass 
+{
+   public var myField : int = 0;
+   
+   public function foo() : void
+   {
+   	var myField : int = 9; // VIOLATION
+   }
+}
+		</example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.naming.IncorrectClassCase"
+		message="A class name must start by an uppercase character">
+		<description></description>
+		<priority>3</priority>
+		<example>
+public class foo // VIOLATION
+{
+}      
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.naming.WronglyNamedVariableRule"
+		message="This variable ({0}) seems to be incorrectly named. Let your creativity flow">
+		<priority>3</priority>	
+		<example>
+         <![CDATA[
+public class SomeClass 
+{
+   public var myField : int = 0; // VIOLATION <- my prefix is forbidden
+   
+   public function tmpFoo() : void // VIOLATION <- tmp prefix is forbidden
+   {
+   	var tempFoo : int = 9; // VIOLATION <- temp prefix is forbidden
+   }
+}		
+		]]>
+		</example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.naming.BooleanAttributeShouldContainIsHasRule"
+		message="Differentiate the Boolean variables from other variable types ({0}); for example: canAnimate, isConnected, or hasChildren.">
+		<priority>5</priority>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.naming.CapitalizeConstantsRule"
+		message="Constant variables should be in all CAPS with each word separated by an underscore ({0})">
+		<priority>3</priority>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.naming.InterfaceNamingRule"
+		message="Interface name should start with I">
+		<priority>1</priority>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.naming.TooLongFunctionNameRule"
+		message="This function name ({0}) is too long ({1} characters minimum, but {2} actually)">
+		<priority>5</priority>
+		<properties>
+			<property name="minimum">
+				<value>3</value>
+			</property>
+		</properties>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.naming.IncorrectEventHandlerNameRule"
+		message="This event handler name ({0}) is not correct. You should use [{1}] as prefix and [{2}] as suffix">
+		<priority>5</priority>
+		<properties>
+			<property name="prefix">
+				<value>on</value>
+			</property>
+			<property name="suffix">
+				<value></value>
+			</property>
+		</properties>
+	</rule>
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/parsley.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/parsley.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/parsley.xml
new file mode 100644
index 0000000..b29a92e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/parsley.xml
@@ -0,0 +1,148 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset 
+	name="Parsley Rules" 
+	xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
+	>
+
+	<description>
+      The Parsley Ruleset contains a collection of good practices related to Parsley.
+    </description>
+    
+	<rule 
+		class="com.adobe.ac.pmd.rules.parsley.InaccessibleMetaDataRule"
+		message="Parsley metadata should not be placed on inaccessible members.">
+		<description>Parsley can only process metadata that is placed onto public members.</description>
+		<priority>1</priority>
+		<example>
+[MessageHandler]
+private function doSomething() : void // VIOLATION 
+{      
+}      
+      </example>
+	</rule>
+
+	<rule 
+		class="com.adobe.ac.pmd.rules.parsley.MismatchedManagedEventRule"
+		message="Managed events should have matching [Event] metadata">
+		<description>Each managed event should have matching [Event] metadata.</description>
+		<priority>1</priority>
+		<example>
+[Event(name="message", type="my.package.MyEvemt")]
+[ManagedEvents(names="messag")] // VIOLATION
+public class MyClass  
+{      
+}      
+      </example>
+	</rule>
+
+	<rule 
+		class="com.adobe.ac.pmd.rules.parsley.MessageInterceptorSignatureRule"
+		message="The signature of the message interceptor {0} is not correct. {1}.">
+		<description></description>
+		<priority>1</priority>
+		<example>
+		<![CDATA[
+[MessageInterceptor(type="a.b.MyMessage")]
+public function messageInterceptor( processor : MessageProcessor ) : void
+{
+   processor.proceed();
+}
+
+[MessageInterceptor(type="a.b.MyMessage")]
+public function messageInterceptor() : void // VIOLATION
+{
+}
+
+[MessageInterceptor(type="a.b.MyMessage")]
+public function messageInterceptor( type : MyMessage ) : void // VIOLATION
+{
+   type.something();
+}
+
+[MessageInterceptor(type="a.b.MyMessage")]
+public function messageInterceptor( processor : MessageProcessor, type : MyMessage ) : void // VIOLATION
+{
+}]]>
+              </example>
+	</rule>
+
+	<rule 
+		class="com.adobe.ac.pmd.rules.parsley.MisplacedMetaDataRule"
+		message="This metadata {0} is misplaced">
+		<description></description>
+		<priority>1</priority>
+		<example>
+        </example>
+	</rule>
+
+	<rule 
+		class="com.adobe.ac.pmd.rules.parsley.RedundantMessageHandlerTypeAttributeRule"
+		message="This type metadata argument is redundant with the handler argument type">
+		<description></description>
+		<priority>3</priority>
+		<example>
+		<![CDATA[
+[MessageHandler(type="a.b.MyMessage")] // VIOLATION
+public function doSomething( message : MyMessage ) : void
+{
+   message.toString();
+}]]>
+        </example>
+	</rule>
+
+	<rule 
+		class="com.adobe.ac.pmd.rules.parsley.RedundantMethodAttributeRule"
+		message="This method metadata argument is redundant with the handler name">
+		<priority>3</priority>
+		<example> <![CDATA[
+[MessageHandler(method="doSomething")] // VIOLATION
+public function doSomething( message : MyMessage ) : void
+{
+   message.toString();
+}]]>
+        </example>
+	</rule>
+
+	<rule 
+		class="com.adobe.ac.pmd.rules.parsley.UnknownMetaDataAttributeRule"
+		message="This metadata attribute {0} is unknown">
+		<description></description>
+		<priority>1</priority>
+		<example>
+		<![CDATA[
+[AsyncInit(x="y")] // VIOLATION
+public class UnknownMetaDataAttribute
+{
+   [Inject(x="y")] // VIOLATION
+   public var inject;
+
+   [MessageHandler(x="y")] // VIOLATION
+   public function messageHandler() : void
+   {
+   }
+}]]>
+        </example>
+	</rule>
+
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/performance.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/performance.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/performance.xml
new file mode 100644
index 0000000..fc268e1
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/performance.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Performance Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	
+	<description>
+      This Ruleset contains a collection of good practices related to the performance (CPU and memory).
+  </description>
+  
+	<rule class="com.adobe.ac.pmd.rules.performance.DynamicFiltersUsedInPopup"
+		message="A popup should not use dynamic filters">
+		<description>Prefer using embed filters in assets</description>
+		<priority>3</priority>
+		<example>
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.performance.CyclomaticComplexityRule"
+		message="This method is too complex. Maximum complexity is {0}, but its cyclomatic complexity was {1}">
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>10</value>
+			</property>
+		</properties>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.performance.HeavyConstructorRule"
+		message="Constructor must be as lightweight as possible. No control statement allowed, whereas a cyclomatic complexe of {0} has been detected">
+		<description><![CDATA[The Just-In-Time compiler does not compile constructors. Make them as lightweight as possible, or move the complexity of the code to a method called by the constructor. Then the complexity will be compiled by the JIT.]]></description>
+		<priority>3</priority>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.performance.CreationPolicySetToAllRule"
+		message="creationPolicy to ALL impacts the performance significantly">
+		<priority>1</priority>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.performance.BindableClassRule"
+		message="Globally bindable classes can lead to unexpected behaviour especially when you have a setter to a property, and hits the performance of the application">
+		<priority>3</priority>	
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.performance.AvoidInstanciationInLoopRule"
+		message="Instanciating a variable in a loop can be expensive">
+		<description></description>
+		<priority>5</priority>
+		<example>
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.performance.AvoidDeclarationInLoopRule"
+		message="Declaring a variable in a loop can be expensive">
+		<description></description>
+		<priority>5</priority>
+		<example>
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.performance.DeeplyNestedIfRule"
+		message="Nested if statements are not a good design">
+		<priority>3</priority>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.performance.RecursiveStyleManagerRule"
+		message="Detect calls to the StyleManager that don’t pass “false” as the second parameter">
+		<description>A recursive style manager call can be a very expensive operation, causing parts of the UI to flicker visibly. Instead it is preferable to defer the creation of parts of the UI that depend on a runtime CSS SWF until after the SWF has been loaded. In this case a recursive call is not required.</description>
+		<priority>3</priority>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.performance.AvoidUsingMathFloorRule"
+		message="VM will automatically do the rounding when using an int, so it should be : var position:int = floatingValue;">
+		<priority>5</priority>
+		<example>
+var position:Number = Math.floor ( floatingValue ); 
+		</example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.performance.AvoidUsingMathCeilRule"
+		message="VM will automatically do the rounding when using an int, so should be : var position:int = floatingValue + 1;">
+		<priority>5</priority>
+		<example>
+var position:Number = Math.ceil ( floatingValue );
+		</example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.performance.AvoidUsingMathRoundRule"
+		message="manual calculation will be much faster : var position:int = (floatingValue > 0.0) ? int(floatingValue + 0.5) : int(floatingValue - 0.5);">
+		<priority>5</priority>
+		<example>
+var position:Number = Math.round ( floatingValue );
+		</example>
+	</rule>
+
+</ruleset>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/security.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/security.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/security.xml
new file mode 100644
index 0000000..02172a7
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/security.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Security Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	
+	<description>
+      The Security AS3 Ruleset contains a collection of best practices related to secure code.
+    </description>
+    
+	<rule class="com.adobe.ac.pmd.rules.security.InsecureExactSettingsRule"
+		message="Security.exactSettings is set to an insecure value">
+		<description>The security.exactSettings value should remain set at the default true value. Setting this value to false could make the SWF vulnerable to cross-domain attacks.</description>
+		<priority>1</priority>
+		<example>
+			//exactSettings should be left as the default
+   			Security.exactSettings = true;
+      	</example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.security.AllowAllSecureDomainRule"
+		message="Security.allowDomain is set to an insecure value">
+		<description>The security.allowDomain value of "*" will allow any domain to cross-script into the domain of this SWF and exercise its functionality.</description>
+		<priority>1</priority>
+		<example>
+			//The allowDomain settings should be specific
+   			Security.allowDomain("www.example.org");
+      	</example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.security.LocalConnectionStarRule"
+		message="LocalConnection.allowDomain is set to an insecure value">
+		<description>The LocalConnection.allowDomain value of "*" will allow any domain to connect to this SWF and call its functions.</description>
+		<priority>1</priority>
+		<example>
+			//The allowDomain setting should be specific
+   			LocalConnection.allowDomain("www.example.org");
+      	</example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.security.AllowInsecureDomainRule"
+		message="Potentially unnecessary use of allowInsecureDomain">
+		<description>Using allowInsecureDomain will allow untrusted content from an HTTP site to inject data into a trusted HTTPS connection which may comprimise the integrity of the HTTPS connection. The use of allowDomain is preferred.</description>
+		<priority>1</priority>
+		<example>
+			//Use the allowDomain setting instead
+   			LocalConnection.allowDomain("www.example.org");
+			Security.allowDomain("www.example.org");
+      	</example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.security.LSOSecureFalseRule"
+		message="The secure flag is set to false">
+		<description>If this SWF is being served over HTTPS then the secure flag should be set to true. This can help prevent sensitive SSL protected information from being shared within insecure HTTP content. If this SWF is served over HTTP then you can ignore this warning.</description>
+		<priority>5</priority>
+		<example>
+			//Setting secure values for LSOs
+   			LSO.getLocal(name, null, true);
+      	</example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.security.ImportLoadBestPracticeRule"
+		message="Set allowCodeImport to false when import loading images">
+		<description>If this loader is only intended to load image files (GIF,JPG,PNG) then be sure to set the allowCodeImport value to false. Setting this flag will reduce the chances of an untrusted SWF gaining access to your site. If your intent is to load a SWF, the URL for the request is a static value for a trusted site and/or you have already set the allowCodeImport flag, then you can ignore this warning.</description>
+		<priority>5</priority>
+	</rule>
+	
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/sizing.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/sizing.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/sizing.xml
new file mode 100644
index 0000000..78337d1
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/sizing.xml
@@ -0,0 +1,178 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Sizing Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	
+	<description>
+      The Sizing As3 Ruleset contains a collection of good practices related to code sizing.
+    </description>
+    
+	<rule class="com.adobe.ac.pmd.rules.sizing.TooManyFunctionRule"
+		message="Too many methods detected ({0} maximum, but {1} actually)">
+		<description>A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>10</value>
+			</property>
+		</properties>
+		<example>
+   public class Foo 
+   {
+      public function doWork() : void {}
+      public function doMoreWork() : void {}
+      public function doWorkAgain() : void {}
+      // [... more more public methods ...]
+   }
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.sizing.TooLongFunctionRule"
+		message="This function is far too long ({0} maximum, but {1} actually)">
+		<description>Violations of this rule usually indicate that the method has too much responsibility. Try to reduce the method size by creating helper methods and removing any copy/pasted code.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>20</value>
+			</property>
+		</properties>
+		<example>
+   public class Foo 
+   {
+      public function doSomething() : void
+      {
+         System.out.println("Hello world!");
+         System.out.println("Hello world!");
+         // 98 copies omitted for brevity.
+      }
+   }
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.sizing.TooLongSwitchCaseRule"
+		message="Long switch case detected ({0} lines maximum, but {1} actually)">
+		<description>A switch case statement should be either empty, or contain a break, or call another method.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>3</value>
+			</property>
+		</properties>
+		<example>
+   public class Bar   
+   {
+      public function foo() : void
+      {
+          var i : int = 4;
+          
+          switch( i )
+          {
+             case 1:
+                handleFirstCase();
+                break;
+             case 2: // VIOLATION
+                googleResquest.url = "";
+                handleSecondCaseFirstPart();
+                handleSecondCaseSecondPart();
+                break;
+          }
+      }
+   }
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.sizing.TooManyParametersRule"
+		message="Long parameter list detected ({0} maximum, but {1} actually)">
+		<description>Long parameter lists can indicate that a new object should be created to wrap the numerous parameters.  Basically, try to group the parameters together.
+      </description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>4</value>
+			</property>
+		</properties>
+		<example>
+   public class Foo 
+   {
+      public function addData( p0 : int, p1 : int, p2 : int, p3 : int, p4 : int, p5 : int,
+                                             p6 : int, p7 : int, p8 : int, p9 : int, p10 : int ) : void 
+      {
+      }
+   }
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.sizing.TooManyPublicRule"
+		message="Too many public fields or functions detected ({0} maximum, but {1} actually)">
+		<description>A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>10</value>
+			</property>
+		</properties>
+		<example>
+   public class Foo 
+   {
+      public var value : String;
+      public var something : Bar;
+      public var variable : Variable;
+
+      // [... more more public attributes ...]
+
+      public function doWork() : void {}
+      public function doMoreWork() : void {}
+      public function doWorkAgain() : void {}
+
+      // [... more more public methods ...]
+   }
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.sizing.TooManyFieldsRule"
+		message="Too many field detected ({0} maximum, but {1} actually)">
+		<description>Classes that have too many fields could be redesigned to have fewer fields, possibly  through some nested object grouping of some of the information.  For example, a class with  city/state/zipcode fields could instead have one Address field.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>5</value>
+			</property>
+		</properties>
+		<example>
+   public class Person 
+   {
+      private var one : String;
+      private var two : int;
+      private var three : int;
+
+      [... many more public fields ...]
+
+   }      
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.sizing.TooManyFieldInVORule"
+		message="Too many field detected ({0} maximum, but {1} actually)">
+		<priority>3</priority>
+	</rule>
+	
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/style.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/style.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/style.xml
new file mode 100644
index 0000000..776bc04
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/style.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Style Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	
+	<description>
+      The Architecture ruleset contains a collection of good practices around architecture.
+	</description>
+
+	<rule class="com.adobe.ac.pmd.rules.style.ConstructorNonEmptyReturnTypeRule"
+		message="A constructor should not have a return type">
+		<description>Even if this is syntactically correct, there should not be a return type for a constructor.</description>
+		<priority>5</priority>
+		<example>
+   public class VoidConstructor   
+   {
+      public function VoidConstructor() : void // VIOLATION
+      {         
+      }      
+   }
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.style.OverLongLineRule"
+		message="Too long line ({0} maximum, but {1} actually)">
+		<description></description>
+		<priority>5</priority>
+		<properties>
+			<property name="maximum">
+				<value>200</value>
+			</property>
+		</properties>
+		<example>
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.style.ImportFromSamePackageRule"
+		message="Imports from the same package are not necessary">
+		<description></description>
+		<priority>5</priority>
+		<example>
+package com.adobe.ac
+{
+   import com.adobe.ac.MyModel; // VIOLATION HERE
+
+   public class BigModel   
+   {
+      public var model : MyModel = null;
+   }
+}         
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.style.CopyrightMissingRule"
+		message="The copyright header is missing in this file">
+		<priority>5</priority>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.style.BadFormatLoggerRule"
+		message="The logger is not correctly formatted because {0}">
+		<description></description>
+		<priority>5</priority>
+		<example>
+      </example>
+	</rule>
+		
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/switches.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/switches.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/switches.xml
new file mode 100644
index 0000000..64d969c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/switches.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Switches Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	
+	<description>
+      The Architecture ruleset contains a collection of good practices around architecture.
+	</description>
+	
+	<rule
+		class="com.adobe.ac.pmd.rules.switchrules.SwitchStatementsShouldHaveDefaultRule"
+		message="A switch statement does not contain a default statement">
+		<description>Switch statements should have a default label in order to detect corner cases.</description>
+		<priority>1</priority>
+		<example>
+public class Foo 
+{
+   public funciton bar() : void 
+   {
+      var  x : int = 2;
+      switch (x) 
+      {
+         case 2: var j : int = 8;
+      }
+   }
+}     
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.switchrules.NestedSwitchRule"
+		message="Switch must not be nested">
+		<description>As a general practice, switch statement should not be used. Prefer using inheritance. It is even harder to read when switch statements are nested.</description>
+		<priority>3</priority>
+		<example>
+public function foo( a : Number, b : Number ) : void
+{
+    switch( a )
+    {
+       case 1:
+          break;
+       case 2:                   
+          switch ( b ) 
+          {
+            case 3 :
+               break;
+            case 4 :
+               break;
+          }
+          break;                     
+    }
+}
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.switchrules.NonBreakableSwitchCaseRule"
+		message="Switch case must include break statement">
+		<priority>1</priority>
+		<example>
+switch(event.type){
+  case GoogleSearchPanel.LAUNCH_GOOGLE_WEB_SEARCH:
+	  googleResquest.url = ""; // VIOLATION
+  case GoogleSearchPanel.LAUNCH_GOOGLE_IMAGE_SEARCH:                   
+  case GoogleSearchPanel.LAUNCH_GOOGLE_IMAGE_SEARCH2:                   
+	  googleResquest.url = "";
+	  break;
+  default:
+	  return;
+}
+      </example>
+	</rule>
+
+	
+	<rule
+		class="com.adobe.ac.pmd.rules.switchrules.TooFewBrancheInSwitchStatementRule"
+		message="There are too few branches in this switch statement ({0} minimum, but {1} actual)">
+		<description>Switch statements are designed for complex branches, and allow branches to share treatment. Using a switch for only 2 branches is ill advised, as switches are not as easy to understand as if. In this case, it's most likely is a good idea to use a if statement</description>
+		<priority>5</priority>
+		<properties>
+			<property name="minimum">
+				<value>3</value>
+			</property>
+		</properties>
+		<example>
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.switchrules.IdenticalSwitchCasesRule"
+		message="Two switch cases should not be identical">
+		<priority>1</priority>
+	</rule>
+		
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/unittest.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/unittest.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/unittest.xml
new file mode 100644
index 0000000..0cb6808
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/unittest.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="FlexUnit Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	
+	<description>
+      The FlexUnit Ruleset contains a collection of good practices related to FlexUnit (1 and 4).
+    </description>
+    
+	<rule class="com.adobe.ac.pmd.rules.flexunit.EmptyUnitTest"
+		message="A test should contain at least one assertion">
+		<priority>3</priority>
+	</rule>
+	
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/unused.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/unused.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/unused.xml
new file mode 100644
index 0000000..35ed526
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/unused.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<ruleset name="Unused Rules" xmlns="http://pmd.sf.net/ruleset/1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+	
+	<description>
+      The Architecture ruleset contains a collection of good practices around architecture.
+	</description>
+	
+	<rule class="com.adobe.ac.pmd.rules.unused.UnusedParameterRule"
+		message="This parameter ({0}) of this function is not used">
+		<description>
+      </description>
+		<priority>3</priority>
+		<example>
+      public function foo( param1 : Number, param2 : Number, param3 : Number, param4 : Number, param5 : Number ) : void // 4 violations
+      {
+         var i : int = param1;
+      }
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.unused.UnusedLocalVariableRule"
+		message="This variable ({0}) is not used">
+		<description>
+      </description>
+		<priority>3</priority>
+		<example>
+      public function foo() : void
+      {
+         var i : int = 0;// 1 violation
+      }
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.unused.UnusedPrivateMethodRule"
+		message="This private method ({0}) does not seem to be used">
+		<description>
+      </description>
+		<priority>1</priority>
+		<example>
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.unused.UnusedFieldRule"
+		message="This private attribute ({0}) does not seem to be used">
+		<description>
+      </description>
+		<priority>1</priority>
+		<example>
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.unused.EmptyPrivateMethodRule"
+		message="This private method ({0}) is used but its content is empty">
+		<description>
+      </description>
+		<priority>1</priority>
+		<example>
+      </example>
+	</rule>
+		
+</ruleset>

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/architecture/MonkeyPatchingRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/MonkeyPatchingRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/MonkeyPatchingRuleTest.java
new file mode 100644
index 0000000..cb73566
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/MonkeyPatchingRuleTest.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.architecture;
+
+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 MonkeyPatchingRuleTest extends AbstractFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "mx.controls.DateChooser2.as", new ViolationPosition[]
+      { new ViolationPosition( 0 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new MonkeyPatchingRule();
+   }
+}

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/architecture/UseInternalClassOutsideApiClassTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/UseInternalClassOutsideApiClassTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/UseInternalClassOutsideApiClassTest.java
new file mode 100644
index 0000000..1691f2f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/UseInternalClassOutsideApiClassTest.java
@@ -0,0 +1,48 @@
+/*
+ * 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.architecture;
+
+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 UseInternalClassOutsideApiClassTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "functional.func2.restricted.Func2RestrictedClass.as", new ViolationPosition[]
+       { new ViolationPosition( 34 ) } ),
+                  new ExpectedViolation( "functional.func1.restricted.Func1RestrictedClass.as",
+                                         new ViolationPosition[]
+                                         { new ViolationPosition( 35 ) } ),
+                  new ExpectedViolation( "functional.func2.api.Func2ExposedClass.as", new ViolationPosition[]
+                  { new ViolationPosition( 34 ) } ),
+                  new ExpectedViolation( "functional.func1.api.Func1ExposedClass.as", new ViolationPosition[]
+                  { new ViolationPosition( 36 ) } ),
+                  new ExpectedViolation( "functional.FunctionalClient.as", new ViolationPosition[]
+                  { new ViolationPosition( 34 ),
+                              new ViolationPosition( 36 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UseInternalClassOutsideApiClass();
+   }
+}
\ No newline at end of file

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/architecture/ViewComponentReferencedInModelRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/ViewComponentReferencedInModelRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/ViewComponentReferencedInModelRuleTest.java
new file mode 100644
index 0000000..1c6389d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/ViewComponentReferencedInModelRuleTest.java
@@ -0,0 +1,58 @@
+/*
+ * 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.architecture;
+
+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 ViewComponentReferencedInModelRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.BigImporterModel.as", new ViolationPosition[]
+      { new ViolationPosition( 35 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "import lala.view.MyObject;",
+                  "import MyObject   ",
+                  "   import lala.view.MyObject" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new ViewComponentReferencedInModelRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "mport lala.view.MyObject",
+                  " text=\"{ vfrfr().frfr.frf.lala }\"/>",
+                  " text=\"{vfrfr().frfr.frf.lala}\"/>",
+                  "public dynamic class DynamicObject {",
+                  "dynamic public class DynamicObject" };
+   }
+}

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/asdocs/AbstractAsDocRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/AbstractAsDocRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/AbstractAsDocRuleTest.java
new file mode 100644
index 0000000..818f546
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/AbstractAsDocRuleTest.java
@@ -0,0 +1,67 @@
+/*
+ * 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.asdocs;
+
+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.AbstractAstFlexRuleTest;
+
+public abstract class AbstractAsDocRuleTest extends AbstractAstFlexRuleTest
+{
+   protected static final Logger LOGGER      = Logger.getLogger( AbstractAsDocRuleTest.class.getName() );
+   protected static final String TEST_FOLDER = "/asDocs";
+
+   public AbstractAsDocRuleTest()
+   {
+      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 File getTestDirectory() // NO_UCD
+   {
+      return new File( super.getTestDirectory().getAbsolutePath()
+            + TEST_FOLDER );
+   }
+}
\ No newline at end of file

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/asdocs/AttributeAsDocMissingRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/AttributeAsDocMissingRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/AttributeAsDocMissingRuleTest.java
new file mode 100644
index 0000000..5360851
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/AttributeAsDocMissingRuleTest.java
@@ -0,0 +1,37 @@
+/*
+ * 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.asdocs;
+
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class AttributeAsDocMissingRuleTest extends AbstractAsDocRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "EmptyClass.as", new ViolationPosition[]
+      { new ViolationPosition( 35 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new AttributeAsDocMissingRule();
+   }
+}

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/asdocs/ClassAsDocMissingRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/ClassAsDocMissingRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/ClassAsDocMissingRuleTest.java
new file mode 100644
index 0000000..d42e1f0
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/ClassAsDocMissingRuleTest.java
@@ -0,0 +1,37 @@
+/*
+ * 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.asdocs;
+
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class ClassAsDocMissingRuleTest extends AbstractAsDocRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "EmptyClass.as", new ViolationPosition[]
+      { new ViolationPosition( 33 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new ClassAsDocMissingRule();
+   }
+}

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/asdocs/MethodAsDocMissingRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/MethodAsDocMissingRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/MethodAsDocMissingRuleTest.java
new file mode 100644
index 0000000..87c09aa
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/MethodAsDocMissingRuleTest.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.asdocs;
+
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class MethodAsDocMissingRuleTest extends AbstractAsDocRuleTest
+{
+
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "EmptyClass.as", new ViolationPosition[]
+      { new ViolationPosition( 37 ),
+                  new ViolationPosition( 41 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new MethodAsDocMissingRule();
+   }
+}

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/binding/BindingUtilsRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/BindingUtilsRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/BindingUtilsRuleTest.java
new file mode 100644
index 0000000..e2d18ff
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/BindingUtilsRuleTest.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.binding;
+
+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 BindingUtilsRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "cairngorm.FatController.as", new ViolationPosition[]
+      { new ViolationPosition( 90 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new BindingUtilsRule();
+   }
+}

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/binding/ChangeWatcherRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/ChangeWatcherRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/ChangeWatcherRuleTest.java
new file mode 100644
index 0000000..22cd7fc
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/ChangeWatcherRuleTest.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.binding;
+
+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 ChangeWatcherRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+      { new ViolationPosition( 35 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new ChangeWatcherRule();
+   }
+}

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/binding/TooLongBindingExpressionRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/TooLongBindingExpressionRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/TooLongBindingExpressionRuleTest.java
new file mode 100644
index 0000000..73d8214
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/TooLongBindingExpressionRuleTest.java
@@ -0,0 +1,56 @@
+/*
+ * 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.binding;
+
+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 TooLongBindingExpressionRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.mxml.IterationsList2.mxml", new ViolationPosition[]
+      { new ViolationPosition( 54 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { " text=\"{ vfrfr.frfr.frf.lala }\"/>",
+                  " text=\"{ vfrfr().frfr.frf.lala }\"/>",
+                  " text=\"{vfrfr().frfr.frf.lala}\"/>" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new TooLongBindingExpressionRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { " text=\"\"/>",
+                  "lala()",
+                  "<mx:Label text=\"{'a.b.c.d.e.f'}\" /> " };
+   }
+}

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/cairngorm/BadCairngormEventNameFormatRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/BadCairngormEventNameFormatRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/BadCairngormEventNameFormatRuleTest.java
new file mode 100644
index 0000000..82f2677
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/BadCairngormEventNameFormatRuleTest.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.cairngorm;
+
+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 BadCairngormEventNameFormatRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      final ViolationPosition[] positions =
+      { new ViolationPosition( 38 ) };
+
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "cairngorm.events.UncorrectConstructorEvent.as", positions ),
+                  new ExpectedViolation( "cairngorm.events.UncorrectConstantEvent.as", positions ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new BadCairngormEventNameFormatRule();
+   }
+}


[51/51] [partial] git commit: [flex-utilities] [refs/heads/develop] - 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

Posted by cd...@apache.org.
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

(A lot of tests are still failing, but I guess it has to be a community effort to fix all of them)
(Apache Flex and some other artifacts need to be manually deployed to your local maven repo in order for the build to work)


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/e43b7a87
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/e43b7a87
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/e43b7a87

Branch: refs/heads/develop
Commit: e43b7a87f3154e146ab368855398c7dd89ad3b19
Parents: 1da8320
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Wed Aug 27 00:39:39 2014 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Wed Aug 27 00:40:25 2014 +0200

----------------------------------------------------------------------
 FlexPMD/.pmd                                    |   25 +
 FlexPMD/as3-parser-api/.pmd                     |   25 -
 FlexPMD/as3-parser-api/pom.xml                  |   32 -
 .../com/adobe/ac/pmd/parser/IAS3Parser.java     |   47 -
 .../com/adobe/ac/pmd/parser/IParserNode.java    |   90 -
 .../java/com/adobe/ac/pmd/parser/KeyWords.java  |   88 -
 .../java/com/adobe/ac/pmd/parser/NodeKind.java  |  137 -
 .../java/com/adobe/ac/pmd/parser/Operators.java |  101 -
 .../parser/exceptions/NullTokenException.java   |   33 -
 .../pmd/parser/exceptions/TokenException.java   |   32 -
 .../exceptions/UnExpectedTokenException.java    |   55 -
 .../com/adobe/ac/pmd/parser/KeyWordsTest.java   |   31 -
 .../com/adobe/ac/pmd/parser/NodeKindTest.java   |   31 -
 .../com/adobe/ac/pmd/parser/OperatorsTest.java  |   33 -
 .../parser/exceptions/FlexPmdExceptionTest.java |   50 -
 FlexPMD/as3-parser/.pmd                         |   25 -
 FlexPMD/as3-parser/pom.xml                      |   46 -
 .../de/bokelberg/flex/parser/AS3Parser.java     | 2360 ------------------
 .../de/bokelberg/flex/parser/AS3Scanner.java    |  898 -------
 .../de/bokelberg/flex/parser/NestedNode.java    |  224 --
 .../java/de/bokelberg/flex/parser/Node.java     |  168 --
 .../flex/parser/AbstractAs3ParserTest.java      |   98 -
 .../flex/parser/AbstractStatementTest.java      |   36 -
 .../bokelberg/flex/parser/NestedNodeTest.java   |   91 -
 .../java/de/bokelberg/flex/parser/NodeTest.java |   57 -
 .../de/bokelberg/flex/parser/TestAS3Parser.java |   75 -
 .../bokelberg/flex/parser/TestAS3Scanner.java   |  362 ---
 .../flex/parser/TestAS3ScannerWithFiles.java    |   92 -
 .../de/bokelberg/flex/parser/TestClass.java     |  144 --
 .../bokelberg/flex/parser/TestClassContent.java |  307 ---
 .../flex/parser/TestCompilationUnit.java        |   90 -
 .../flex/parser/TestConstStatement.java         |   67 -
 .../bokelberg/flex/parser/TestDoStatement.java  |   61 -
 .../flex/parser/TestE4xExpression.java          |   46 -
 .../flex/parser/TestEmptyStatement.java         |   42 -
 .../bokelberg/flex/parser/TestExpression.java   |  204 --
 .../bokelberg/flex/parser/TestForStatement.java |  101 -
 .../bokelberg/flex/parser/TestIfStatement.java  |  136 -
 .../de/bokelberg/flex/parser/TestInterface.java |   76 -
 .../flex/parser/TestInterfaceContent.java       |   96 -
 .../flex/parser/TestPackageContent.java         |  220 --
 .../flex/parser/TestPrimaryExpression.java      |  114 -
 .../flex/parser/TestReturnStatement.java        |   70 -
 .../flex/parser/TestSwitchStatement.java        |   52 -
 .../parser/TestTryCatchFinallyStatement.java    |   58 -
 .../flex/parser/TestUnaryExpression.java        |  132 -
 .../bokelberg/flex/parser/TestVarStatement.java |  126 -
 .../flex/parser/TestWhileStatement.java         |   67 -
 .../src/test/resources/examples/Enum.as         |   84 -
 .../src/test/resources/examples/FisheyeBase.as  |  564 -----
 .../src/test/resources/examples/FlexPMD115.as   |   22 -
 .../src/test/resources/examples/FlexPMD195.as   |   51 -
 .../src/test/resources/examples/FlexPMD62.as    |   35 -
 .../src/test/resources/examples/FlexPMD98.as    |  440 ----
 .../src/test/resources/examples/JPEGEncoder.as  |  669 -----
 .../src/test/resources/examples/JPEGEncoder2.as |  671 -----
 .../toAS2/src/fw/data/request/ResultListener.as |   27 -
 .../resources/examples/unformatted/IContext.as  |   83 -
 .../resources/examples/unformatted/Simple.as    |   19 -
 .../resources/examples/unformatted/Title.as     |   32 -
 FlexPMD/as3-plugin-utils/pom.xml                |   34 -
 .../com/adobe/ac/ncss/filters/FlexFilter.java   |   44 -
 .../java/com/adobe/ac/ncss/utils/FileUtils.java |  197 --
 .../main/java/com/adobe/ac/pmd/LoggerUtils.java |   44 -
 .../com/adobe/ac/utils/StackTraceUtils.java     |   59 -
 .../src/main/resources/logger.properties        |   22 -
 .../com/adobe/ac/ncss/utils/TestFileUtils.java  |   83 -
 .../com/adobe/ac/utils/StackTraceUtilsTest.java |   45 -
 .../adobe/ac/ncss/flexunit/AbstractRowData.as   |  115 -
 .../adobe/ac/ncss/flexunit/FilterTestsModel.as  |   74 -
 .../com/adobe/ac/ncss/flexunit/TestCaseData.as  |  139 --
 .../ac/ncss/flexunit/TestFunctionRowData.as     |  217 --
 .../flexunit/TestRunnerBasePresentationModel.as |  315 ---
 .../flexunit/filter/AllTestFunctionStatus.as    |   36 -
 .../flexunit/filter/EmptyTestFunctionStatus.as  |   36 -
 .../flexunit/filter/ErrorTestFunctionStatus.as  |   36 -
 .../ncss/flexunit/filter/ITestFunctionStatus.as |   28 -
 .../flexunit/filter/TestfFunctionStatuses.as    |   32 -
 .../com/adobe/ac/ncss/mxml/IterationView.mxml   |  105 -
 .../com/adobe/ac/ncss/mxml/IterationsList.mxml  |   61 -
 FlexPMD/checkstyle.xml                          |   78 +
 FlexPMD/cleanup.profile.xml                     |   95 +
 FlexPMD/custom-ruleset/pom.xml                  |   12 +-
 FlexPMD/flex-formatter.properties               |   74 +
 FlexPMD/flex-pmd-ant-task/.pmd                  |   25 -
 FlexPMD/flex-pmd-ant-task/pom.xml               |  177 --
 .../flex-pmd-ant-task/src/main/assemble/bin.xml |   38 -
 .../com/adobe/ac/pmd/ant/FlexPmdAntTask.java    |  119 -
 .../adobe/ac/pmd/ant/FlexPmdAntTaskTest.java    |   82 -
 FlexPMD/flex-pmd-automator-workflow/pom.xml     |   56 -
 .../src/main/assembly/workflow.xml              |   46 -
 .../Contents/QuickLook/Preview.pdf              |  Bin 86091 -> 0 bytes
 .../Contents/document.wflow                     |  545 ----
 FlexPMD/flex-pmd-bundles/pom.xml                |  129 -
 FlexPMD/flex-pmd-command-line-api/.pmd          |   25 -
 FlexPMD/flex-pmd-command-line-api/pom.xml       |   41 -
 .../com/adobe/ac/pmd/CommandLineOptions.java    |   39 -
 .../java/com/adobe/ac/pmd/CommandLineUtils.java |   58 -
 .../com/adobe/ac/pmd/ICommandLineOptions.java   |   22 -
 .../adobe/ac/pmd/CommandLineOptionsTest.java    |   31 -
 .../com/adobe/ac/pmd/CommandLineUtilsTest.java  |   58 -
 FlexPMD/flex-pmd-command-line/.pmd              |   25 -
 FlexPMD/flex-pmd-command-line/pom.xml           |  198 --
 .../src/main/assemble/bin.xml                   |   41 -
 .../com/adobe/ac/pmd/commandline/FlexPMD.java   |  134 -
 .../adobe/ac/pmd/commandline/FlexPMDTest.java   |  187 --
 FlexPMD/flex-pmd-core/.p4ignore                 |    1 -
 FlexPMD/flex-pmd-core/.pmd                      |   25 -
 FlexPMD/flex-pmd-core/pom.xml                   |  105 -
 .../com/adobe/ac/pmd/FlexPmdParameters.java     |  123 -
 .../com/adobe/ac/pmd/FlexPmdViolations.java     |  244 --
 .../ac/pmd/engines/AbstractFlexPmdEngine.java   |  199 --
 .../com/adobe/ac/pmd/engines/FlexPMDFormat.java |   35 -
 .../adobe/ac/pmd/engines/FlexPmdXmlEngine.java  |  171 --
 .../adobe/ac/pmd/engines/PmdEngineUtils.java    |   66 -
 .../adobe/ac/pmd/AbstractEntireRulesetTest.java |   87 -
 .../com/adobe/ac/pmd/AllInOneRulesetTest.java   |   64 -
 .../pmd/AllInOneWithExclusionRulesetTest.java   |   38 -
 .../com/adobe/ac/pmd/FlexPmdParametersTest.java |   47 -
 .../com/adobe/ac/pmd/FlexPmdXmlEngineTest.java  |   82 -
 .../ac/pmd/LoadRulesetWithNonUTF8CharTest.java  |   38 -
 .../engines/AbstractTestFlexPmdEngineTest.java  |   73 -
 .../ac/pmd/engines/PmdEngineUtilsTest.java      |  103 -
 .../src/test/resources/allInOneRuleset.xml      |  600 -----
 .../resources/allInOneWithExclusionRuleset.xml  |  601 -----
 .../src/test/resources/broken_pmd.xml           |  703 ------
 .../flex-pmd-core/src/test/resources/pmd.xml    |   63 -
 .../flex-pmd-core/src/test/resources/pmd.xsd    |   57 -
 FlexPMD/flex-pmd-cpd-ant-task/pom.xml           |  151 --
 .../com/adobe/ac/cpd/ant/FlexCpdAntTask.java    |  173 --
 .../adobe/ac/cpd/ant/FlexCpdAntTaskTest.java    |   56 -
 FlexPMD/flex-pmd-cpd-command-line/pom.xml       |  187 --
 .../cpd/commandline/CpdCommandLineOptions.java  |   37 -
 .../com/adobe/ac/cpd/commandline/FlexCPD.java   |  195 --
 .../ac/cpd/commandline/FlexCpdParameters.java   |   60 -
 .../adobe/ac/cpd/commandline/FlexCPDTest.java   |  105 -
 FlexPMD/flex-pmd-cpd-maven-plugin/pom.xml       |  116 -
 .../com/adobe/ac/cpd/maven/FlexCpdMojo.java     |  201 --
 .../src/main/resources/flexPmd.properties       |   16 -
 .../com/adobe/ac/cpd/maven/FlexCpdMojoTest.java |   42 -
 FlexPMD/flex-pmd-cpd/pom.xml                    |   93 -
 .../java/com/adobe/ac/cpd/FlexLanguage.java     |   27 -
 .../java/com/adobe/ac/cpd/FlexTokenizer.java    |  132 -
 .../test/java/com/adobe/ac/cpd/FlexCpdTest.java |  121 -
 .../src/test/resources/test/FlexPMD119.mxml     |  107 -
 FlexPMD/flex-pmd-files/pom.xml                  |   82 -
 .../java/com/adobe/ac/pmd/FlexPmdTestBase.java  |   71 -
 .../com/adobe/ac/pmd/ResourcesManagerTest.java  |  104 -
 .../java/com/adobe/ac/pmd/files/IAs3File.java   |   24 -
 .../java/com/adobe/ac/pmd/files/IFlexFile.java  |   94 -
 .../java/com/adobe/ac/pmd/files/IMxmlFile.java  |   43 -
 .../ac/pmd/files/impl/AbstractFlexFile.java     |  259 --
 .../com/adobe/ac/pmd/files/impl/As3File.java    |   86 -
 .../com/adobe/ac/pmd/files/impl/FileUtils.java  |  163 --
 .../com/adobe/ac/pmd/files/impl/MxmlFile.java   |  334 ---
 .../java/net/sourceforge/pmd/PMDException.java  |   80 -
 .../com/adobe/ac/pmd/FlexPmdTestBaseTest.java   |   40 -
 .../adobe/ac/pmd/ResourcesManagerTestTest.java  |   32 -
 .../com/adobe/ac/pmd/files/MxmlFileTest.java    |  150 --
 .../ac/pmd/files/impl/AbstractFlexFileTest.java |  157 --
 .../adobe/ac/pmd/files/impl/As3FileTest.java    |   64 -
 .../adobe/ac/pmd/files/impl/FileUtilsTest.java  |  115 -
 .../ac/pmd/files/impl/FlexFileFactoryTest.java  |   63 -
 .../adobe/ac/pmd/files/impl/MxmlFileTest.java   |   50 -
 .../net/sourceforge/pmd/PMDExceptionTest.java   |   61 -
 FlexPMD/flex-pmd-flex-lib/.checkstyle           |   24 -
 .../org.maven.ide.eclipse.maven2Builder.launch  |   25 -
 FlexPMD/flex-pmd-flex-lib/pom.xml               |  207 --
 .../flex/com/adobe/ac/model/IDomainModel.as     |   26 -
 .../com/adobe/ac/model/IPresentationModel.as    |   26 -
 .../com/adobe/ac/pmd/api/IGetRulesetContent.as  |   28 -
 .../control/events/GetRulesetContentEvent.as    |   56 -
 .../flex/com/adobe/ac/pmd/model/Property.as     |   35 -
 .../flex/com/adobe/ac/pmd/model/RootRuleset.as  |  103 -
 .../main/flex/com/adobe/ac/pmd/model/Rule.as    |   92 -
 .../main/flex/com/adobe/ac/pmd/model/Ruleset.as |   63 -
 .../com/adobe/ac/pmd/model/ViolationPriority.as |   82 -
 .../ac/pmd/model/events/RulesetReceivedEvent.as |   48 -
 .../main/flex/com/adobe/ac/pmd/view/Title.mxml  |   36 -
 .../src/main/resources/assets/cancelledIcon.png |  Bin 1094 -> 0 bytes
 .../src/main/resources/assets/export.png        |  Bin 1205 -> 0 bytes
 .../main/resources/assets/icon_tool_trash.png   |  Bin 821 -> 0 bytes
 .../main/resources/assets/icon_tool_trash2.png  |  Bin 27190 -> 0 bytes
 .../src/main/resources/assets/todoLogo.png      |  Bin 1106 -> 0 bytes
 .../src/main/resources/assets/todoLogo_big.png  |  Bin 57083 -> 0 bytes
 .../flex-pmd-flex-lib/src/test/flex/AllTests.as |   36 -
 .../flex/com/adobe/ac/pmd/model/RuleTest.as     |   61 -
 .../flex/com/adobe/ac/pmd/model/RulesetTest.as  |   72 -
 FlexPMD/flex-pmd-flex-parent/pom.xml            |  125 -
 .../flex-pmd-flex/flex-pmd-flex-lib/.checkstyle |   24 +
 .../org.maven.ide.eclipse.maven2Builder.launch  |   25 +
 FlexPMD/flex-pmd-flex/flex-pmd-flex-lib/pom.xml |  196 ++
 .../flex-pmd-flex-lib/src/main/flex/Version.as  |    1 +
 .../flex/com/adobe/ac/model/IDomainModel.as     |   26 +
 .../com/adobe/ac/model/IPresentationModel.as    |   26 +
 .../com/adobe/ac/pmd/api/IGetRulesetContent.as  |   28 +
 .../control/events/GetRulesetContentEvent.as    |   56 +
 .../flex/com/adobe/ac/pmd/model/Property.as     |   35 +
 .../flex/com/adobe/ac/pmd/model/RootRuleset.as  |  103 +
 .../main/flex/com/adobe/ac/pmd/model/Rule.as    |   92 +
 .../main/flex/com/adobe/ac/pmd/model/Ruleset.as |   63 +
 .../com/adobe/ac/pmd/model/ViolationPriority.as |   82 +
 .../ac/pmd/model/events/RulesetReceivedEvent.as |   48 +
 .../main/flex/com/adobe/ac/pmd/view/Title.mxml  |   36 +
 .../src/main/resources/assets/cancelledIcon.png |  Bin 0 -> 1094 bytes
 .../src/main/resources/assets/export.png        |  Bin 0 -> 1205 bytes
 .../main/resources/assets/icon_tool_trash.png   |  Bin 0 -> 821 bytes
 .../main/resources/assets/icon_tool_trash2.png  |  Bin 0 -> 27190 bytes
 .../src/main/resources/assets/todoLogo.png      |  Bin 0 -> 1106 bytes
 .../src/main/resources/assets/todoLogo_big.png  |  Bin 0 -> 57083 bytes
 .../flex-pmd-flex-lib/src/test/flex/AllTests.as |   36 +
 .../flex/com/adobe/ac/pmd/model/RuleTest.as     |   61 +
 .../flex/com/adobe/ac/pmd/model/RulesetTest.as  |   72 +
 .../flex-pmd-ruleset-creator/build.properties   |   41 +
 .../flex-pmd-ruleset-creator/build.xml          |   75 +
 .../flexcover.properties                        |   89 +
 .../flex-pmd-ruleset-creator/flexcover.xml      |  191 ++
 .../html-template/index.template.html           |  121 +
 .../flex-pmd-ruleset-creator/pom.xml            |  221 ++
 .../src/main/flex/Main.mxml                     |  132 +
 .../src/main/flex/TestRunner-app.xml            |   45 +
 .../src/main/flex/TestViewRunner-app.xml        |   45 +
 .../src/main/flex/assets/add-10.png             |  Bin 0 -> 3128 bytes
 .../src/main/flex/assets/add-48.png             |  Bin 0 -> 3141 bytes
 .../src/main/flex/assets/arrow.ai               | 1121 +++++++++
 .../src/main/flex/assets/cancelledIcon.png      |  Bin 0 -> 1094 bytes
 .../src/main/flex/assets/down.png               |  Bin 0 -> 926 bytes
 .../src/main/flex/assets/icon_tool_trash.png    |  Bin 0 -> 821 bytes
 .../src/main/flex/assets/icon_tool_trash2.png   |  Bin 0 -> 27190 bytes
 .../src/main/flex/assets/todoLogo.png           |  Bin 0 -> 1106 bytes
 .../src/main/flex/assets/todoLogo_big.png       |  Bin 0 -> 57083 bytes
 .../src/main/flex/assets/up.png                 |  Bin 0 -> 924 bytes
 .../com/adobe/ac/pmd/api/IGetCustomRuleset.as   |   28 +
 .../com/adobe/ac/pmd/api/IGetRootRuleset.as     |   28 +
 .../flex/com/adobe/ac/pmd/control/Controller.as |   40 +
 .../control/commands/GetCustomRulesetCommand.as |   63 +
 .../control/commands/GetRootRulesetCommand.as   |   63 +
 .../commands/GetRulesetContentCommand.as        |   65 +
 .../pmd/control/events/GetCustomRulesetEvent.as |   48 +
 .../pmd/control/events/GetRootRulesetEvent.as   |   48 +
 .../adobe/ac/pmd/services/MyServiceLocator.mxml |   39 +
 .../ac/pmd/services/rulesets/RulesetDelegate.as |   96 +
 .../services/translators/PropertyTranslator.as  |   44 +
 .../translators/RootRulesetTranslator.as        |  107 +
 .../pmd/services/translators/RuleTranslator.as  |   98 +
 .../services/translators/RulesetTranslator.as   |   63 +
 .../flex/com/adobe/ac/pmd/view/RuleEditor.mxml  |  140 ++
 .../flex/com/adobe/ac/pmd/view/RuleEditorPM.as  |   33 +
 .../com/adobe/ac/pmd/view/RuleSetNavigator.mxml |  160 ++
 .../com/adobe/ac/pmd/view/RuleSetNavigatorPM.as |  162 ++
 .../pmd/view/events/SelectedRuleChangeEvent.as  |   48 +
 .../view/renderers/DeleteButtonRenderer.mxml    |   77 +
 .../src/main/locales/en_US/Main.properties      |   15 +
 .../src/main/resources/placeholder.txt          |   16 +
 .../src/test/flex/AllTests.as                   |   42 +
 .../flex/com/adobe/ac/pmd/model/RulesetTest.as  |   72 +
 .../services/translators/RuleTranslatorTest.as  |   59 +
 .../translators/RulesetTranslatorTest.as        |   45 +
 .../adobe/ac/pmd/view/RuleSetNavigatorPMTest.as |   80 +
 .../html-template/index.template.html           |  121 +
 .../flex-pmd-violations-viewer/pom.xml          |  186 ++
 .../src/main/flex/Main.mxml                     |   87 +
 .../src/main/flex/TestRunner.mxml               |   24 +
 .../com/adobe/ac/pmd/model/CharacterPosition.as |   44 +
 .../main/flex/com/adobe/ac/pmd/model/File.as    |   48 +
 .../flex/com/adobe/ac/pmd/model/Violation.as    |   82 +
 .../com/adobe/ac/pmd/model/ViolationPosition.as |   44 +
 .../com/adobe/ac/pmd/view/FilterResults.mxml    |   67 +
 .../com/adobe/ac/pmd/view/ResultsFormatter.as   |   41 +
 .../flex/com/adobe/ac/pmd/view/ResultsView.mxml |  142 ++
 .../adobe/ac/pmd/view/SelectedViolation.mxml    |  151 ++
 .../flex/com/adobe/ac/pmd/view/Summary.mxml     |   69 +
 .../flex/com/adobe/ac/pmd/view/UploadView.mxml  |   44 +
 .../adobe/ac/pmd/view/model/ResultsFilter.as    |   50 +
 .../com/adobe/ac/pmd/view/model/ResultsModel.as |  138 +
 .../com/adobe/ac/pmd/view/model/UploadModel.as  |  135 +
 .../adobe/ac/pmd/view/model/ViolationsModel.as  |   84 +
 .../src/test/flex/AllTests.as                   |   30 +
 FlexPMD/flex-pmd-flex/flexunit-theme/pom.xml    |   91 +
 .../src/main/resources/assets/cancelledIcon.png |  Bin 0 -> 1094 bytes
 .../src/main/resources/assets/export.png        |  Bin 0 -> 1205 bytes
 .../main/resources/assets/icon_tool_trash.png   |  Bin 0 -> 821 bytes
 .../main/resources/assets/icon_tool_trash2.png  |  Bin 0 -> 27190 bytes
 .../src/main/resources/assets/todoLogo.png      |  Bin 0 -> 1106 bytes
 .../src/main/resources/assets/todoLogo_big.png  |  Bin 0 -> 57083 bytes
 .../src/main/resources/css/default.css          |  285 +++
 .../skins/ButtonBarButton_disabledSkin.png      |  Bin 0 -> 1439 bytes
 .../skins/ButtonBarButton_downSkin.png          |  Bin 0 -> 1468 bytes
 .../skins/ButtonBarButton_overSkin.png          |  Bin 0 -> 1471 bytes
 .../ButtonBarButton_selectedDisabledSkin.png    |  Bin 0 -> 1455 bytes
 .../skins/ButtonBarButton_selectedUpSkin.png    |  Bin 0 -> 1469 bytes
 .../resources/skins/ButtonBarButton_upSkin.png  |  Bin 0 -> 1445 bytes
 .../skins/ButtonBarFirstButton_disabledSkin.png |  Bin 0 -> 1496 bytes
 .../skins/ButtonBarFirstButton_downSkin.png     |  Bin 0 -> 1497 bytes
 .../skins/ButtonBarFirstButton_overSkin.png     |  Bin 0 -> 1511 bytes
 ...uttonBarFirstButton_selectedDisabledSkin.png |  Bin 0 -> 1484 bytes
 .../ButtonBarFirstButton_selectedUpSkin.png     |  Bin 0 -> 1498 bytes
 .../skins/ButtonBarFirstButton_upSkin.png       |  Bin 0 -> 1490 bytes
 .../skins/ButtonBarLastButton_disabledSkin.png  |  Bin 0 -> 1489 bytes
 .../skins/ButtonBarLastButton_downSkin.png      |  Bin 0 -> 1520 bytes
 .../skins/ButtonBarLastButton_overSkin.png      |  Bin 0 -> 1499 bytes
 ...ButtonBarLastButton_selectedDisabledSkin.png |  Bin 0 -> 1489 bytes
 .../ButtonBarLastButton_selectedUpSkin.png      |  Bin 0 -> 1506 bytes
 .../skins/ButtonBarLastButton_upSkin.png        |  Bin 0 -> 1501 bytes
 .../resources/skins/Button_disabledSkin.png     |  Bin 0 -> 1509 bytes
 .../main/resources/skins/Button_downSkin.png    |  Bin 0 -> 1530 bytes
 .../main/resources/skins/Button_overSkin.png    |  Bin 0 -> 1535 bytes
 .../src/main/resources/skins/Button_upSkin.png  |  Bin 0 -> 1528 bytes
 .../skins/CursorManager_busyCursor.png          |  Bin 0 -> 2001 bytes
 .../resources/skins/DataGrid_borderSkin.png     |  Bin 0 -> 1497 bytes
 .../skins/DataGrid_columnDropIndicatorSkin.png  |  Bin 0 -> 1287 bytes
 .../skins/DataGrid_columnResizeSkin.png         |  Bin 0 -> 1248 bytes
 .../skins/DataGrid_headerBackgroundSkin.png     |  Bin 0 -> 1323 bytes
 .../skins/DataGrid_headerSeparatorSkin.png      |  Bin 0 -> 1240 bytes
 .../resources/skins/DataGrid_sortArrowSkin.png  |  Bin 0 -> 1336 bytes
 .../resources/skins/DataGrid_stretchCursor.png  |  Bin 0 -> 1461 bytes
 .../resources/skins/FormItem_indicatorSkin.png  |  Bin 0 -> 1327 bytes
 .../skins/HScrollArrowLeft_disabledSkin.png     |  Bin 0 -> 1277 bytes
 .../skins/HScrollArrowRight_disabledSkin.png    |  Bin 0 -> 1796 bytes
 .../skins/HScrollBar_leftArrowDownSkin.png      |  Bin 0 -> 1325 bytes
 .../skins/HScrollBar_leftArrowOverSkin.png      |  Bin 0 -> 1335 bytes
 .../skins/HScrollBar_leftArrowUpSkin.png        |  Bin 0 -> 1335 bytes
 .../skins/HScrollBar_rightArrowDownSkin.png     |  Bin 0 -> 1324 bytes
 .../skins/HScrollBar_rightArrowOverSkin.png     |  Bin 0 -> 1336 bytes
 .../skins/HScrollBar_rightArrowUpSkin.png       |  Bin 0 -> 1336 bytes
 .../skins/HScrollBar_thumbDownSkin.png          |  Bin 0 -> 1453 bytes
 .../resources/skins/HScrollBar_thumbIcon.png    |  Bin 0 -> 1252 bytes
 .../skins/HScrollBar_thumbOverSkin.png          |  Bin 0 -> 1552 bytes
 .../resources/skins/HScrollBar_thumbUpSkin.png  |  Bin 0 -> 1484 bytes
 .../skins/HScrollBar_trackDisabledSkin.png      |  Bin 0 -> 1394 bytes
 .../resources/skins/HScrollBar_trackSkin.png    |  Bin 0 -> 1393 bytes
 .../main/resources/skins/Panel_borderSkin.png   |  Bin 0 -> 2906 bytes
 .../skins/VScrollBar_downArrowDisabledSkin.png  |  Bin 0 -> 1347 bytes
 .../skins/VScrollBar_downArrowDownSkin.png      |  Bin 0 -> 1325 bytes
 .../skins/VScrollBar_downArrowOverSkin.png      |  Bin 0 -> 1335 bytes
 .../skins/VScrollBar_downArrowUpSkin.png        |  Bin 0 -> 1335 bytes
 .../skins/VScrollBar_thumbDownSkin.png          |  Bin 0 -> 1453 bytes
 .../resources/skins/VScrollBar_thumbIcon.png    |  Bin 0 -> 1252 bytes
 .../skins/VScrollBar_thumbOverSkin.png          |  Bin 0 -> 1434 bytes
 .../resources/skins/VScrollBar_thumbUpSkin.png  |  Bin 0 -> 1434 bytes
 .../skins/VScrollBar_trackDisabledSkin.png      |  Bin 0 -> 1394 bytes
 .../resources/skins/VScrollBar_trackSkin.png    |  Bin 0 -> 1393 bytes
 .../skins/VScrollBar_upArrowDisabledSkin.png    |  Bin 0 -> 1281 bytes
 .../skins/VScrollBar_upArrowDownSkin.png        |  Bin 0 -> 1324 bytes
 .../skins/VScrollBar_upArrowOverSkin.png        |  Bin 0 -> 1336 bytes
 .../skins/VScrollBar_upArrowUpSkin.png          |  Bin 0 -> 1336 bytes
 FlexPMD/flex-pmd-flex/pom.xml                   |  123 +
 FlexPMD/flex-pmd-hybrid-parent/pom.xml          |  279 ---
 .../flex-pmd-hybrid/flex-pmd-automator/pom.xml  |   56 +
 .../src/main/assembly/workflow.xml              |   46 +
 .../Contents/QuickLook/Preview.pdf              |  Bin 0 -> 86091 bytes
 .../Contents/document.wflow                     |  545 ++++
 .../flex-pmd-hybrid/flex-pmd-bundles/pom.xml    |  129 +
 FlexPMD/flex-pmd-hybrid/pom.xml                 |  278 +++
 FlexPMD/flex-pmd-java-parent/pom.xml            |   56 -
 FlexPMD/flex-pmd-java-parent/sonar.sh           |   17 -
 FlexPMD/flex-pmd-java/as3-parser-api/.pmd       |   25 +
 FlexPMD/flex-pmd-java/as3-parser-api/pom.xml    |   34 +
 .../com/adobe/ac/pmd/parser/IAS3Parser.java     |   47 +
 .../com/adobe/ac/pmd/parser/IParserNode.java    |   90 +
 .../java/com/adobe/ac/pmd/parser/KeyWords.java  |   88 +
 .../java/com/adobe/ac/pmd/parser/NodeKind.java  |  137 +
 .../java/com/adobe/ac/pmd/parser/Operators.java |  101 +
 .../parser/exceptions/NullTokenException.java   |   33 +
 .../pmd/parser/exceptions/TokenException.java   |   32 +
 .../exceptions/UnExpectedTokenException.java    |   55 +
 .../com/adobe/ac/pmd/parser/KeyWordsTest.java   |   31 +
 .../com/adobe/ac/pmd/parser/NodeKindTest.java   |   31 +
 .../com/adobe/ac/pmd/parser/OperatorsTest.java  |   33 +
 .../parser/exceptions/FlexPmdExceptionTest.java |   50 +
 FlexPMD/flex-pmd-java/as3-parser/.pmd           |   25 +
 FlexPMD/flex-pmd-java/as3-parser/pom.xml        |   47 +
 .../de/bokelberg/flex/parser/AS3Parser.java     | 2360 ++++++++++++++++++
 .../de/bokelberg/flex/parser/AS3Scanner.java    |  898 +++++++
 .../de/bokelberg/flex/parser/NestedNode.java    |  224 ++
 .../java/de/bokelberg/flex/parser/Node.java     |  168 ++
 .../flex/parser/AbstractAs3ParserTest.java      |   98 +
 .../flex/parser/AbstractStatementTest.java      |   36 +
 .../bokelberg/flex/parser/NestedNodeTest.java   |   91 +
 .../java/de/bokelberg/flex/parser/NodeTest.java |   57 +
 .../de/bokelberg/flex/parser/TestAS3Parser.java |   76 +
 .../bokelberg/flex/parser/TestAS3Scanner.java   |  362 +++
 .../flex/parser/TestAS3ScannerWithFiles.java    |   95 +
 .../de/bokelberg/flex/parser/TestClass.java     |  144 ++
 .../bokelberg/flex/parser/TestClassContent.java |  307 +++
 .../flex/parser/TestCompilationUnit.java        |   90 +
 .../flex/parser/TestConstStatement.java         |   67 +
 .../bokelberg/flex/parser/TestDoStatement.java  |   61 +
 .../flex/parser/TestE4xExpression.java          |   46 +
 .../flex/parser/TestEmptyStatement.java         |   42 +
 .../bokelberg/flex/parser/TestExpression.java   |  204 ++
 .../bokelberg/flex/parser/TestForStatement.java |  101 +
 .../bokelberg/flex/parser/TestIfStatement.java  |  136 +
 .../de/bokelberg/flex/parser/TestInterface.java |   76 +
 .../flex/parser/TestInterfaceContent.java       |   96 +
 .../flex/parser/TestPackageContent.java         |  220 ++
 .../flex/parser/TestPrimaryExpression.java      |  114 +
 .../flex/parser/TestReturnStatement.java        |   70 +
 .../flex/parser/TestSwitchStatement.java        |   52 +
 .../parser/TestTryCatchFinallyStatement.java    |   58 +
 .../flex/parser/TestUnaryExpression.java        |  132 +
 .../bokelberg/flex/parser/TestVarStatement.java |  126 +
 .../flex/parser/TestWhileStatement.java         |   67 +
 .../src/test/resources/examples/Enum.as         |   84 +
 .../src/test/resources/examples/FisheyeBase.as  |  564 +++++
 .../src/test/resources/examples/FlexPMD115.as   |   22 +
 .../src/test/resources/examples/FlexPMD195.as   |   51 +
 .../src/test/resources/examples/FlexPMD62.as    |   35 +
 .../src/test/resources/examples/FlexPMD98.as    |  440 ++++
 .../src/test/resources/examples/JPEGEncoder.as  |  669 +++++
 .../src/test/resources/examples/JPEGEncoder2.as |  671 +++++
 .../toAS2/src/fw/data/request/ResultListener.as |   27 +
 .../resources/examples/unformatted/IContext.as  |   83 +
 .../resources/examples/unformatted/Simple.as    |   19 +
 .../resources/examples/unformatted/Title.as     |   32 +
 FlexPMD/flex-pmd-java/as3-plugin-utils/pom.xml  |   35 +
 .../com/adobe/ac/ncss/filters/FlexFilter.java   |   44 +
 .../java/com/adobe/ac/ncss/utils/FileUtils.java |  197 ++
 .../main/java/com/adobe/ac/pmd/LoggerUtils.java |   44 +
 .../com/adobe/ac/utils/StackTraceUtils.java     |   59 +
 .../src/main/resources/logger.properties        |   22 +
 .../com/adobe/ac/ncss/utils/TestFileUtils.java  |   83 +
 .../com/adobe/ac/utils/StackTraceUtilsTest.java |   45 +
 .../adobe/ac/ncss/flexunit/AbstractRowData.as   |  115 +
 .../adobe/ac/ncss/flexunit/FilterTestsModel.as  |   74 +
 .../com/adobe/ac/ncss/flexunit/TestCaseData.as  |  139 ++
 .../ac/ncss/flexunit/TestFunctionRowData.as     |  217 ++
 .../flexunit/TestRunnerBasePresentationModel.as |  315 +++
 .../flexunit/filter/AllTestFunctionStatus.as    |   36 +
 .../flexunit/filter/EmptyTestFunctionStatus.as  |   36 +
 .../flexunit/filter/ErrorTestFunctionStatus.as  |   36 +
 .../ncss/flexunit/filter/ITestFunctionStatus.as |   28 +
 .../flexunit/filter/TestfFunctionStatuses.as    |   32 +
 .../com/adobe/ac/ncss/mxml/IterationView.mxml   |  105 +
 .../com/adobe/ac/ncss/mxml/IterationsList.mxml  |   61 +
 FlexPMD/flex-pmd-java/flex-pmd-ant-task/.pmd    |   25 +
 FlexPMD/flex-pmd-java/flex-pmd-ant-task/pom.xml |  190 ++
 .../flex-pmd-ant-task/src/main/assemble/bin.xml |   38 +
 .../com/adobe/ac/pmd/ant/FlexPmdAntTask.java    |  119 +
 .../adobe/ac/pmd/ant/FlexPmdAntTaskTest.java    |   82 +
 .../flex-pmd-command-line-api/.pmd              |   25 +
 .../flex-pmd-command-line-api/pom.xml           |   41 +
 .../com/adobe/ac/pmd/CommandLineOptions.java    |   39 +
 .../java/com/adobe/ac/pmd/CommandLineUtils.java |   58 +
 .../com/adobe/ac/pmd/ICommandLineOptions.java   |   22 +
 .../adobe/ac/pmd/CommandLineOptionsTest.java    |   31 +
 .../com/adobe/ac/pmd/CommandLineUtilsTest.java  |   58 +
 .../flex-pmd-java/flex-pmd-command-line/.pmd    |   25 +
 .../flex-pmd-java/flex-pmd-command-line/pom.xml |  196 ++
 .../src/main/assemble/bin.xml                   |   41 +
 .../com/adobe/ac/pmd/commandline/FlexPMD.java   |  134 +
 .../adobe/ac/pmd/commandline/FlexPMDTest.java   |  187 ++
 FlexPMD/flex-pmd-java/flex-pmd-core/.p4ignore   |    1 +
 FlexPMD/flex-pmd-java/flex-pmd-core/.pmd        |   25 +
 FlexPMD/flex-pmd-java/flex-pmd-core/pom.xml     |  105 +
 .../com/adobe/ac/pmd/FlexPmdParameters.java     |  123 +
 .../com/adobe/ac/pmd/FlexPmdViolations.java     |  244 ++
 .../ac/pmd/engines/AbstractFlexPmdEngine.java   |  199 ++
 .../com/adobe/ac/pmd/engines/FlexPMDFormat.java |   35 +
 .../adobe/ac/pmd/engines/FlexPmdXmlEngine.java  |  171 ++
 .../adobe/ac/pmd/engines/PmdEngineUtils.java    |   66 +
 .../adobe/ac/pmd/AbstractEntireRulesetTest.java |   87 +
 .../com/adobe/ac/pmd/AllInOneRulesetTest.java   |   64 +
 .../pmd/AllInOneWithExclusionRulesetTest.java   |   38 +
 .../com/adobe/ac/pmd/FlexPmdParametersTest.java |   47 +
 .../com/adobe/ac/pmd/FlexPmdXmlEngineTest.java  |   82 +
 .../ac/pmd/LoadRulesetWithNonUTF8CharTest.java  |   38 +
 .../engines/AbstractTestFlexPmdEngineTest.java  |   73 +
 .../ac/pmd/engines/PmdEngineUtilsTest.java      |  103 +
 .../src/test/resources/allInOneRuleset.xml      |  600 +++++
 .../resources/allInOneWithExclusionRuleset.xml  |  601 +++++
 .../src/test/resources/broken_pmd.xml           |  703 ++++++
 .../flex-pmd-core/src/test/resources/pmd.xml    |   63 +
 .../flex-pmd-core/src/test/resources/pmd.xsd    |   57 +
 .../flex-pmd-java/flex-pmd-cpd-ant-task/pom.xml |  161 ++
 .../com/adobe/ac/cpd/ant/FlexCpdAntTask.java    |  173 ++
 .../adobe/ac/cpd/ant/FlexCpdAntTaskTest.java    |   56 +
 .../flex-pmd-cpd-command-line/pom.xml           |  197 ++
 .../cpd/commandline/CpdCommandLineOptions.java  |   37 +
 .../com/adobe/ac/cpd/commandline/FlexCPD.java   |  195 ++
 .../ac/cpd/commandline/FlexCpdParameters.java   |   60 +
 .../adobe/ac/cpd/commandline/FlexCPDTest.java   |  105 +
 .../flex-pmd-cpd-maven-plugin/pom.xml           |  118 +
 .../com/adobe/ac/cpd/maven/FlexCpdMojo.java     |  201 ++
 .../src/main/resources/flexPmd.properties       |   16 +
 .../com/adobe/ac/cpd/maven/FlexCpdMojoTest.java |   42 +
 FlexPMD/flex-pmd-java/flex-pmd-cpd/pom.xml      |   93 +
 .../java/com/adobe/ac/cpd/FlexLanguage.java     |   27 +
 .../java/com/adobe/ac/cpd/FlexTokenizer.java    |  132 +
 .../test/java/com/adobe/ac/cpd/FlexCpdTest.java |  121 +
 .../src/test/resources/test/FlexPMD119.mxml     |  107 +
 FlexPMD/flex-pmd-java/flex-pmd-files/pom.xml    |   84 +
 .../java/com/adobe/ac/pmd/FlexPmdTestBase.java  |   71 +
 .../com/adobe/ac/pmd/ResourcesManagerTest.java  |  104 +
 .../java/com/adobe/ac/pmd/files/IAs3File.java   |   24 +
 .../java/com/adobe/ac/pmd/files/IFlexFile.java  |   94 +
 .../java/com/adobe/ac/pmd/files/IMxmlFile.java  |   43 +
 .../ac/pmd/files/impl/AbstractFlexFile.java     |  259 ++
 .../com/adobe/ac/pmd/files/impl/As3File.java    |   86 +
 .../com/adobe/ac/pmd/files/impl/FileUtils.java  |  163 ++
 .../com/adobe/ac/pmd/files/impl/MxmlFile.java   |  334 +++
 .../java/net/sourceforge/pmd/PMDException.java  |   80 +
 .../com/adobe/ac/pmd/FlexPmdTestBaseTest.java   |   40 +
 .../adobe/ac/pmd/ResourcesManagerTestTest.java  |   32 +
 .../com/adobe/ac/pmd/files/MxmlFileTest.java    |  150 ++
 .../ac/pmd/files/impl/AbstractFlexFileTest.java |  157 ++
 .../adobe/ac/pmd/files/impl/As3FileTest.java    |   64 +
 .../adobe/ac/pmd/files/impl/FileUtilsTest.java  |  115 +
 .../ac/pmd/files/impl/FlexFileFactoryTest.java  |   63 +
 .../adobe/ac/pmd/files/impl/MxmlFileTest.java   |   50 +
 .../net/sourceforge/pmd/PMDExceptionTest.java   |   61 +
 .../flex-pmd-java/flex-pmd-maven-plugin/pom.xml |  116 +
 .../adobe/ac/pmd/maven/AbstractFlexPmdMojo.java |  362 +++
 .../adobe/ac/pmd/maven/FlexPmdHtmlEngine.java   |  125 +
 .../com/adobe/ac/pmd/maven/FlexPmdMojo.java     |   40 +
 .../adobe/ac/pmd/maven/FlexPmdReportMojo.java   |   82 +
 .../com/adobe/ac/pmd/maven/FlexPmdMojoTest.java |   97 +
 .../ac/pmd/maven/FlexPmdReportMojoTest.java     |   86 +
 .../src/test/resources/rulesets/broken_pmd.xml  |  703 ++++++
 .../flex-pmd-metrics-ant-task/.pmd              |  975 ++++++++
 .../flex-pmd-metrics-ant-task/pom.xml           |  163 ++
 .../ac/pmd/metrics/ant/FlexMetricsAntTask.java  |   83 +
 .../pmd/metrics/ant/FlexMetricsAntTaskTest.java |   40 +
 .../flex-pmd-metrics-command-line/.pmd          |  975 ++++++++
 .../flex-pmd-metrics-command-line/pom.xml       |  217 ++
 .../ac/pmd/metrics/commandline/FlexMetrics.java |  126 +
 .../metrics/commandline/FlexMetricsTest.java    |   55 +
 .../metrics/commandline/FlexMetricsTest.java    |   55 +
 .../flex-pmd-metrics-maven-plugin/.pmd          |  975 ++++++++
 .../flex-pmd-metrics-maven-plugin/pom.xml       |  102 +
 .../ac/pmd/metrics/maven/FlexMetricsMojo.java   |  201 ++
 .../metrics/maven/FlexMetricsReportMojo.java    |  414 +++
 .../NcssAggregateReportGenerator.java           |  193 ++
 .../maven/generators/NcssReportGenerator.java   |  464 ++++
 .../generators/NcssReportGeneratorBase.java     |  220 ++
 .../pmd/metrics/maven/utils/ModuleReport.java   |   60 +
 .../pmd/metrics/maven/utils/NcssExecuter.java   |   48 +
 .../maven/utils/NumericNodeComparator.java      |   59 +
 .../src/main/resources/flexMetrics.properties   |   94 +
 .../pmd/metrics/maven/FlexMetricsMojoTest.java  |   60 +
 .../maven/FlexMetricsReportMojoTest.java        |   98 +
 FlexPMD/flex-pmd-java/flex-pmd-metrics/.pmd     |  975 ++++++++
 FlexPMD/flex-pmd-java/flex-pmd-metrics/pom.xml  |  100 +
 .../ac/pmd/metrics/AbstractNamedMetrics.java    |   38 +
 .../ac/pmd/metrics/AbstractPackagedMetrics.java |   89 +
 .../ac/pmd/metrics/AverageClassMetrics.java     |   57 +
 .../ac/pmd/metrics/AverageFunctionMetrics.java  |   39 +
 .../ac/pmd/metrics/AverageMetricsBase.java      |   53 +
 .../com/adobe/ac/pmd/metrics/ClassMetrics.java  |  128 +
 .../adobe/ac/pmd/metrics/FunctionMetrics.java   |   74 +
 .../java/com/adobe/ac/pmd/metrics/IMetrics.java |   22 +
 .../ac/pmd/metrics/InternalFunctionMetrics.java |   85 +
 .../com/adobe/ac/pmd/metrics/MetricUtils.java   |   70 +
 .../adobe/ac/pmd/metrics/PackageMetrics.java    |   95 +
 .../adobe/ac/pmd/metrics/ProjectMetrics.java    |  118 +
 .../ac/pmd/metrics/TotalPackageMetrics.java     |  107 +
 .../ac/pmd/metrics/engine/AbstractMetrics.java  |  234 ++
 .../ac/pmd/metrics/engine/FlexMetrics.java      |  148 ++
 .../adobe/ac/pmd/metrics/ClassMetricsTest.java  |  162 ++
 .../metrics/InternalFunctionMetricsTest.java    |   46 +
 .../adobe/ac/pmd/metrics/MetricUtilsTest.java   |   43 +
 .../ac/pmd/metrics/PackageMetricsTest.java      |   72 +
 .../ac/pmd/metrics/engine/FlexMetricsTest.java  |  161 ++
 .../flex-pmd-ruleset-api/.checkstyle            |   24 +
 FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/.pmd |   25 +
 .../flex-pmd-java/flex-pmd-ruleset-api/pom.xml  |  110 +
 .../java/com/adobe/ac/pmd/IFlexViolation.java   |   54 +
 .../com/adobe/ac/pmd/files/FileSetUtils.java    |  179 ++
 .../com/adobe/ac/pmd/nodes/IAsDocHolder.java    |   30 +
 .../java/com/adobe/ac/pmd/nodes/IAttribute.java |   24 +
 .../java/com/adobe/ac/pmd/nodes/IClass.java     |   81 +
 .../com/adobe/ac/pmd/nodes/ICommentHolder.java  |   32 +
 .../java/com/adobe/ac/pmd/nodes/IConstant.java  |   24 +
 .../java/com/adobe/ac/pmd/nodes/IField.java     |   28 +
 .../ac/pmd/nodes/IFieldInitialization.java      |   24 +
 .../java/com/adobe/ac/pmd/nodes/IFunction.java  |  100 +
 .../com/adobe/ac/pmd/nodes/IIdentifierNode.java |   25 +
 .../java/com/adobe/ac/pmd/nodes/IMetaData.java  |   47 +
 .../adobe/ac/pmd/nodes/IMetaDataListHolder.java |   46 +
 .../adobe/ac/pmd/nodes/IModifiersHolder.java    |   34 +
 .../java/com/adobe/ac/pmd/nodes/INamable.java   |   28 +
 .../com/adobe/ac/pmd/nodes/INamableNode.java    |   25 +
 .../main/java/com/adobe/ac/pmd/nodes/INode.java |   32 +
 .../java/com/adobe/ac/pmd/nodes/IPackage.java   |   50 +
 .../java/com/adobe/ac/pmd/nodes/IParameter.java |   24 +
 .../java/com/adobe/ac/pmd/nodes/IVariable.java  |   33 +
 .../java/com/adobe/ac/pmd/nodes/IVisible.java   |   28 +
 .../java/com/adobe/ac/pmd/nodes/MetaData.java   |   85 +
 .../java/com/adobe/ac/pmd/nodes/Modifier.java   |   78 +
 .../ac/pmd/nodes/asdoc/impl/AsDocNodeBase.java  |   42 +
 .../ac/pmd/nodes/asdoc/impl/ClassAsDocNode.java |   31 +
 .../pmd/nodes/asdoc/impl/FunctionAsDocNode.java |   54 +
 .../nodes/asdoc/impl/ParameterAsDocNode.java    |   55 +
 .../adobe/ac/pmd/nodes/impl/AbstractNode.java   |   90 +
 .../adobe/ac/pmd/nodes/impl/AttributeNode.java  |   44 +
 .../com/adobe/ac/pmd/nodes/impl/ClassNode.java  |  411 +++
 .../adobe/ac/pmd/nodes/impl/ConstantNode.java   |   44 +
 .../pmd/nodes/impl/FieldInitializationNode.java |   53 +
 .../com/adobe/ac/pmd/nodes/impl/FieldNode.java  |   94 +
 .../com/adobe/ac/pmd/nodes/impl/FormalNode.java |   53 +
 .../adobe/ac/pmd/nodes/impl/FunctionNode.java   |  444 ++++
 .../adobe/ac/pmd/nodes/impl/IdentifierNode.java |   63 +
 .../adobe/ac/pmd/nodes/impl/MetaDataNode.java   |  139 ++
 .../adobe/ac/pmd/nodes/impl/NodeFactory.java    |   49 +
 .../adobe/ac/pmd/nodes/impl/PackageNode.java    |  167 ++
 .../adobe/ac/pmd/nodes/impl/VariableNode.java   |  224 ++
 .../adobe/ac/pmd/nodes/utils/AsDocUtils.java    |   60 +
 .../adobe/ac/pmd/nodes/utils/FunctionUtils.java |   53 +
 .../ac/pmd/rules/core/AbstractAstFlexRule.java  | 1164 +++++++++
 .../pmd/rules/core/AbstractAstFlexRuleTest.java |   67 +
 .../rules/core/AbstractFlexMetaDataRule.java    |  111 +
 .../ac/pmd/rules/core/AbstractFlexRule.java     |  354 +++
 .../ac/pmd/rules/core/AbstractFlexRuleTest.java |  264 ++
 .../rules/core/AbstractForbiddenImportRule.java |   58 +
 .../pmd/rules/core/AbstractPrimaryAstRule.java  |   86 +
 .../rules/core/AbstractRegExpBasedRuleTest.java |   76 +
 .../pmd/rules/core/AbstractRegexpBasedRule.java |  116 +
 .../rules/core/AbstractXpathRelatedRule.java    |  244 ++
 .../adobe/ac/pmd/rules/core/IFlexAstRule.java   |   28 +
 .../com/adobe/ac/pmd/rules/core/IFlexRule.java  |   53 +
 .../com/adobe/ac/pmd/rules/core/Violation.java  |  323 +++
 .../ac/pmd/rules/core/ViolationPosition.java    |  106 +
 .../ac/pmd/rules/core/ViolationPriority.java    |   45 +
 .../AbstractMaximizedAstFlexRule.java           |   60 +
 .../thresholded/AbstractMaximizedFlexRule.java  |   60 +
 .../AbstractMaximizedRegexpBasedRule.java       |   61 +
 .../core/thresholded/IThresholdedRule.java      |   45 +
 .../src/main/resources/flexPmd.properties       |   26 +
 .../adobe/ac/pmd/files/FileSetUtilsTest.java    |   47 +
 .../com/adobe/ac/pmd/nodes/MetaDataTest.java    |   55 +
 .../adobe/ac/pmd/nodes/impl/ClassNodeTest.java  |  174 ++
 .../ac/pmd/nodes/impl/CommentNodeTest.java      |  163 ++
 .../adobe/ac/pmd/nodes/impl/FieldNodeTest.java  |   84 +
 .../ac/pmd/nodes/impl/FunctionNodeTest.java     |  271 ++
 .../ac/pmd/nodes/impl/MetaDataNodeTest.java     |  119 +
 .../ac/pmd/nodes/impl/PackageNodeTest.java      |  126 +
 .../ac/pmd/nodes/impl/VariableNodeTest.java     |   77 +
 .../ac/pmd/nodes/utils/AsDocUtilsTest.java      |   63 +
 .../ac/pmd/nodes/utils/FunctionUtilsTest.java   |   60 +
 .../com/adobe/ac/pmd/rules/core/EmptyRule.java  |   79 +
 .../adobe/ac/pmd/rules/core/EmptyRuleTest.java  |  134 +
 .../adobe/ac/pmd/rules/core/FlexRuleTest.java   |   94 +
 .../adobe/ac/pmd/rules/core/IgnoreRuleTest.java |  129 +
 .../pmd/rules/core/TestAbstractAstFlexRule.java |  146 ++
 .../pmd/rules/core/ViolationPriorityTest.java   |   35 +
 .../adobe/ac/pmd/rules/core/ViolationTest.java  |  236 ++
 .../adobe/ac/pmd/rules/core/WarningRule.java    |   57 +
 ...ceforge.pmd.eclipse.plugin.pmdBuilder.launch |   25 +
 FlexPMD/flex-pmd-java/flex-pmd-ruleset/.pmd     |  935 +++++++
 FlexPMD/flex-pmd-java/flex-pmd-ruleset/pom.xml  |   83 +
 .../rules/architecture/MonkeyPatchingRule.java  |   72 +
 .../UseInternalClassOutsideApiClass.java        |  126 +
 .../ViewComponentReferencedInModelRule.java     |   87 +
 .../ac/pmd/rules/asdocs/AbstractAsDocRule.java  |   37 +
 .../rules/asdocs/AttributeAsDocMissingRule.java |   53 +
 .../pmd/rules/asdocs/ClassAsDocMissingRule.java |   60 +
 .../rules/asdocs/MethodAsDocMissingRule.java    |   53 +
 .../ac/pmd/rules/binding/BindingUtilsRule.java  |   48 +
 .../ac/pmd/rules/binding/ChangeWatcherRule.java |   48 +
 .../binding/TooLongBindingExpressionRule.java   |  115 +
 .../BadCairngormEventNameFormatRule.java        |  119 +
 .../cairngorm/BindableModelLocatorRule.java     |   64 +
 ...rngormEventDispatcherCallExplicitlyRule.java |   74 +
 .../pmd/rules/cairngorm/FatControllerRule.java  |   97 +
 ...catorReferencedMoreThanOncePerClassRule.java |   53 +
 ...delLocatorOutsideTheMainApplicationRule.java |   73 +
 .../rules/component/CallLaterDirectlyRule.java  |   62 +
 ...teChildrenNumberInUpdateDisplayListRule.java |   66 +
 .../ac/pmd/rules/css/StyleBlockInMxmlRule.java  |   68 +
 .../css/UseCssInsteadOfEmbedMetaDataRule.java   |   84 +
 .../pmd/rules/empty/AbstractEmptyBlockRule.java |   37 +
 .../rules/empty/EmptyCatchStatementRule.java    |   53 +
 .../ac/pmd/rules/empty/EmptyIfStmtRule.java     |   53 +
 .../rules/event/AbstractEventRelatedRule.java   |   54 +
 .../event/ConstructorDispatchingEventRule.java  |   65 +
 .../pmd/rules/event/DefaultEventNameRule.java   |   53 +
 .../event/DispatchHardCodedEventNameRule.java   |   80 +
 .../event/EventMissingCloneFunctionRule.java    |   82 +
 .../event/ListenForHardCodedEventNameRule.java  |   80 +
 .../event/PublicVariableInCustomEventRule.java  |   57 +
 .../rules/event/UnboundTypeInMetadataRule.java  |   83 +
 .../rules/event/UntypedEventMetadataRule.java   |   71 +
 .../ac/pmd/rules/flexunit/EmptyUnitTest.java    |   99 +
 .../pmd/rules/maintanability/AlertShowRule.java |   74 +
 .../ArrayFieldWithNoArrayElementTypeRule.java   |   93 +
 .../AvoidProtectedFieldInFinalClassRule.java    |   92 +
 .../maintanability/AvoidUseOfAsKeywordRule.java |   48 +
 .../AvoidUsingPublicStaticFieldRule.java        |   59 +
 .../AvoidUsingWithKeyWordRule.java              |   57 +
 .../ClassAndExtensionAreIdenticalRule.java      |   68 +
 .../rules/maintanability/DynamicClassRule.java  |   65 +
 .../maintanability/EmptyStatementRule.java      |   49 +
 .../maintanability/ExcessiveImportRule.java     |   80 +
 .../NonStaticConstantFieldRule.java             |   59 +
 .../rules/maintanability/OnlyOneReturnRule.java |   72 +
 .../ProtectedStaticMethodRule.java              |   54 +
 ...ToVariableBindingFromItsInitializerRule.java |   91 +
 .../maintanability/TrueFalseConditionRule.java  |   84 +
 .../UselessOverridenFunctionRule.java           |   82 +
 .../AbstractUseForbiddenTypeRule.java           |  119 +
 .../forbiddentypes/UseDictionaryTypeRule.java   |   46 +
 .../forbiddentypes/UseGenericTypeRule.java      |   48 +
 .../forbiddentypes/UseObjectTypeRule.java       |   92 +
 .../multiscreen/AvoidRollMouseEventRule.java    |   69 +
 .../pmd/rules/multiscreen/AvoidTooltipRule.java |   68 +
 .../AbstractMoreThanEntryPointInMxmlRule.java   |  110 +
 .../ac/pmd/rules/mxml/CodeBehindInMxmlRule.java |   68 +
 .../mxml/MoreThanOneEntryPointInMxmlRule.java   |   47 +
 .../mxml/MoreThanTwoEntryPointsInMxmlRule.java  |   47 +
 .../mxml/OnlyOneScriptBlockPerMxmlRule.java     |   97 +
 .../pmd/rules/mxml/StaticMethodInMxmlRule.java  |   66 +
 .../pmd/rules/mxml/TooLongScriptBlockRule.java  |   99 +
 .../pmd/rules/mxml/TooManyStatesInMxmlRule.java |  159 ++
 .../BooleanAttributeShouldContainIsHasRule.java |   75 +
 .../rules/naming/CapitalizeConstantsRule.java   |   51 +
 .../ac/pmd/rules/naming/IncorrectClassCase.java |   56 +
 .../naming/IncorrectEventHandlerNameRule.java   |   79 +
 .../pmd/rules/naming/InterfaceNamingRule.java   |   41 +
 .../ac/pmd/rules/naming/PackageCaseRule.java    |   76 +
 .../PropertyHiddenByLocalVariableRule.java      |   75 +
 .../rules/naming/TooLongFunctionNameRule.java   |   55 +
 .../pmd/rules/naming/TooShortVariableRule.java  |  151 ++
 .../VariableNameEndingWithNumericRule.java      |  111 +
 .../rules/naming/WronglyNamedVariableRule.java  |  121 +
 .../ParameterizedRegExpBasedRule.java           |   91 +
 .../rules/parsley/InaccessibleMetaDataRule.java |  100 +
 .../MessageInterceptorSignatureRule.java        |   91 +
 .../parsley/MismatchedManagedEventRule.java     |   86 +
 .../rules/parsley/MisplacedMetaDataRule.java    |  120 +
 ...edundantMessageHandlerTypeAttributeRule.java |   99 +
 .../parsley/RedundantMethodAttributeRule.java   |   80 +
 .../parsley/UnknownMetaDataAttributeRule.java   |   79 +
 .../ac/pmd/rules/parsley/utils/MetaDataTag.java |  102 +
 .../rules/parsley/utils/ParsleyMetaData.java    |  276 ++
 .../AbstractAvoidNodeInLoopRule.java            |   85 +
 .../performance/AvoidDeclarationInLoopRule.java |   37 +
 .../AvoidInstanciationInLoopRule.java           |   44 +
 .../performance/AvoidUsingMathCeilRule.java     |   74 +
 .../performance/AvoidUsingMathFloorRule.java    |   74 +
 .../performance/AvoidUsingMathRoundRule.java    |   74 +
 .../rules/performance/BindableClassRule.java    |   66 +
 .../performance/CreationPolicySetToAllRule.java |   70 +
 .../performance/CyclomaticComplexityRule.java   |   77 +
 .../rules/performance/DeeplyNestedIfRule.java   |  123 +
 .../performance/DynamicFiltersUsedInPopup.java  |   68 +
 .../rules/performance/HeavyConstructorRule.java |   90 +
 .../performance/RecursiveStyleManagerRule.java  |   58 +
 .../rules/performance/UseTraceFunctionRule.java |   62 +
 .../security/AllowAllSecureDomainRule.java      |  100 +
 .../rules/security/AllowInsecureDomainRule.java |   90 +
 .../security/ImportLoadBestPracticeRule.java    |   90 +
 .../security/InsecureExactSettingsRule.java     |   89 +
 .../pmd/rules/security/LSOSecureFalseRule.java  |   94 +
 .../rules/security/LocalConnectionStarRule.java |   96 +
 .../pmd/rules/sizing/TooLongFunctionRule.java   |   90 +
 .../pmd/rules/sizing/TooLongSwitchCaseRule.java |   80 +
 .../pmd/rules/sizing/TooManyFieldInVORule.java  |   47 +
 .../ac/pmd/rules/sizing/TooManyFieldsRule.java  |  107 +
 .../pmd/rules/sizing/TooManyFunctionRule.java   |  103 +
 .../pmd/rules/sizing/TooManyParametersRule.java |   85 +
 .../ac/pmd/rules/sizing/TooManyPublicRule.java  |  120 +
 .../ac/pmd/rules/style/BadFormatLoggerRule.java |   83 +
 .../ConstructorNonEmptyReturnTypeRule.java      |   53 +
 .../pmd/rules/style/CopyrightMissingRule.java   |   95 +
 .../rules/style/ImportFromSamePackageRule.java  |   61 +
 .../ac/pmd/rules/style/OverLongLineRule.java    |  114 +
 .../pmd/rules/style/TabUsedAsIndentorRule.java  |   48 +
 .../switchrules/IdenticalSwitchCasesRule.java   |   73 +
 .../pmd/rules/switchrules/NestedSwitchRule.java |   58 +
 .../switchrules/NonBreakableSwitchCaseRule.java |   41 +
 .../SwitchStatementsShouldHaveDefaultRule.java  |   75 +
 .../TooFewBrancheInSwitchStatementRule.java     |  144 ++
 .../unused/AbstractUnusedVariableRule.java      |  130 +
 .../rules/unused/EmptyPrivateMethodRule.java    |   41 +
 .../ac/pmd/rules/unused/UnusedFieldRule.java    |  128 +
 .../rules/unused/UnusedLocalVariableRule.java   |   76 +
 .../pmd/rules/unused/UnusedParameterRule.java   |  239 ++
 .../rules/unused/UnusedPrivateMethodRule.java   |  183 ++
 .../resources/com/adobe/ac/pmd/all_flex.xml     |   48 +
 .../resources/com/adobe/ac/pmd/default_flex.xml |   46 +
 .../com/adobe/ac/pmd/rulesets/architecture.xml  |  118 +
 .../com/adobe/ac/pmd/rulesets/asdocs.xml        |   50 +
 .../com/adobe/ac/pmd/rulesets/basic_mxml.xml    |   65 +
 .../com/adobe/ac/pmd/rulesets/binding.xml       |   70 +
 .../com/adobe/ac/pmd/rulesets/cairngorm.xml     |  134 +
 .../com/adobe/ac/pmd/rulesets/component.xml     |   43 +
 .../resources/com/adobe/ac/pmd/rulesets/css.xml |   41 +
 .../com/adobe/ac/pmd/rulesets/empty.xml         |   66 +
 .../com/adobe/ac/pmd/rulesets/event.xml         |  147 ++
 .../com/adobe/ac/pmd/rulesets/indentation.xml   |   31 +
 .../adobe/ac/pmd/rulesets/maintanability.xml    |  236 ++
 .../com/adobe/ac/pmd/rulesets/multitouch.xml    |   39 +
 .../com/adobe/ac/pmd/rulesets/naming.xml        |  162 ++
 .../com/adobe/ac/pmd/rulesets/parsley.xml       |  148 ++
 .../com/adobe/ac/pmd/rulesets/performance.xml   |  114 +
 .../com/adobe/ac/pmd/rulesets/security.xml      |   86 +
 .../com/adobe/ac/pmd/rulesets/sizing.xml        |  178 ++
 .../com/adobe/ac/pmd/rulesets/style.xml         |   86 +
 .../com/adobe/ac/pmd/rulesets/switches.xml      |  111 +
 .../com/adobe/ac/pmd/rulesets/unittest.xml      |   34 +
 .../com/adobe/ac/pmd/rulesets/unused.xml        |   82 +
 .../architecture/MonkeyPatchingRuleTest.java    |   38 +
 .../UseInternalClassOutsideApiClassTest.java    |   48 +
 .../ViewComponentReferencedInModelRuleTest.java |   58 +
 .../pmd/rules/asdocs/AbstractAsDocRuleTest.java |   67 +
 .../asdocs/AttributeAsDocMissingRuleTest.java   |   37 +
 .../rules/asdocs/ClassAsDocMissingRuleTest.java |   37 +
 .../asdocs/MethodAsDocMissingRuleTest.java      |   39 +
 .../pmd/rules/binding/BindingUtilsRuleTest.java |   38 +
 .../rules/binding/ChangeWatcherRuleTest.java    |   38 +
 .../TooLongBindingExpressionRuleTest.java       |   56 +
 .../BadCairngormEventNameFormatRuleTest.java    |   41 +
 .../cairngorm/BindableModelLocatorRuleTest.java |   38 +
 ...rmEventDispatcherCallExplicitlyRuleTest.java |   39 +
 .../rules/cairngorm/FatControllerRuleTest.java  |   38 +
 ...rReferencedMoreThanOncePerClassRuleTest.java |   38 +
 ...ocatorOutsideTheMainApplicationRuleTest.java |   60 +
 .../component/CallLaterDirectlyRuleTest.java    |   39 +
 ...ildrenNumberInUpdateDisplayListRuleTest.java |   41 +
 .../pmd/rules/css/StyleBlockInMxmlRuleTest.java |   66 +
 .../UseCssInsteadOfEmbedMetaDataRuleTest.java   |   38 +
 .../empty/EmptyCatchStatementRuleTest.java      |   38 +
 .../ac/pmd/rules/empty/EmptyIfStmtRuleTest.java |   49 +
 .../ConstructorDispatchingEventRuleTest.java    |   38 +
 .../rules/event/DefaultEventNameRuleTest.java   |   38 +
 .../DispatchHardCodedEventNameRuleTest.java     |   61 +
 .../EventMissingCloneFunctionRuleTest.java      |   41 +
 .../ListenForHardCodedEventNameRuleTest.java    |   57 +
 .../PublicVariableInCustomEventRuleTest.java    |   41 +
 .../event/UnboundTypeInMetadataRuleTest.java    |   40 +
 .../event/UntypedEventMetadataRuleTest.java     |   38 +
 .../pmd/rules/flexunit/EmptyUnitTestTest.java   |   41 +
 .../rules/maintanability/AlertShowRuleTest.java |   47 +
 ...rrayFieldWithNoArrayElementTypeRuleTest.java |   40 +
 ...AvoidProtectedFieldInFinalClassRuleTest.java |   39 +
 .../AvoidUseOfAsKeywordRuleTest.java            |   86 +
 .../AvoidUsingPublicStaticFieldRuleTest.java    |   40 +
 .../AvoidUsingWithKeyWordRuleTest.java          |   38 +
 .../ClassAndExtensionAreIdenticalRuleTest.java  |   38 +
 .../maintanability/DynamicClassRuleTest.java    |   38 +
 .../maintanability/EmptyStatementRuleTest.java  |   42 +
 .../maintanability/ExcessiveImportRuleTest.java |   42 +
 .../NonStaticConstantFieldRuleTest.java         |   51 +
 .../maintanability/OnlyOneReturnRuleTest.java   |   53 +
 .../ProtectedStaticMethodRuleTest.java          |   38 +
 ...riableBindingFromItsInitializerRuleTest.java |   41 +
 .../TrueFalseConditionRuleTest.java             |   56 +
 .../UselessOverridenFunctionRuleTest.java       |   40 +
 .../UseDictionaryTypeRuleTest.java              |   39 +
 .../forbiddenttypes/UseGenericTypeRuleTest.java |   54 +
 .../forbiddenttypes/UseObjectTypeRuleTest.java  |   54 +
 .../AvoidRollMouseEventRuleTest.java            |   59 +
 .../rules/multiscreen/AvoidTooltipRuleTest.java |   55 +
 ...bstractMoreThanEntryPointInMxmlRuleTest.java |   36 +
 .../rules/mxml/CodeBehindInMxmlRuleTest.java    |   55 +
 .../MoreThanOneEntryPointInMxmlRuleTest.java    |   43 +
 .../MoreThanTwoEntryPointsInMxmlRuleTest.java   |   43 +
 .../mxml/OnlyOneScriptBlockPerMxmlRuleTest.java |   40 +
 .../rules/mxml/StaticMethodInMxmlRuleTest.java  |   38 +
 .../rules/mxml/TooLongScriptBlockRuleTest.java  |   45 +
 .../rules/mxml/TooManyStatesInMxmlRuleTest.java |   38 +
 ...leanAttributeShouldContainIsHasRuleTest.java |   36 +
 .../naming/CapitalizeConstantsRuleTest.java     |   46 +
 .../rules/naming/IncorrectClassCaseTest.java    |   38 +
 .../IncorrectEventHandlerNameRuleTest.java      |   47 +
 .../rules/naming/InterfaceNamingRuleTest.java   |   43 +
 .../pmd/rules/naming/PackageCaseRuleTest.java   |   46 +
 .../PropertyHiddenByLocalVariableRuleTest.java  |   38 +
 .../naming/TooLongFunctionNameRuleTest.java     |   38 +
 .../rules/naming/TooShortVariableRuleTest.java  |   69 +
 .../VariableNameEndingWithNumericRuleTest.java  |   77 +
 .../naming/WronglyNamedVariableRuleTest.java    |   70 +
 .../ParameterizedRegExpBasedRuleTest.java       |   41 +
 ...rizedRegExpBasedRuleWithEmptyRegexpTest.java |   36 +
 .../parsley/InaccessibleMetaDataRuleTest.java   |   43 +
 .../MessageInterceptorSignatureRuleTest.java    |   40 +
 .../parsley/MismatchedManagedEventRuleTest.java |   38 +
 .../parsley/MisplacedMetaDataRuleTest.java      |   67 +
 ...dantMessageHandlerTypeAttributeRuleTest.java |   38 +
 .../RedundantMethodAttributeRuleTest.java       |   38 +
 .../UnknownMetaDataAttributeRuleTest.java       |   40 +
 .../AvoidDeclarationInLoopRuleTest.java         |  100 +
 .../AvoidInstanciationInLoopRuleTest.java       |   50 +
 .../performance/AvoidUsingMathCeilRuleTest.java |   36 +
 .../AvoidUsingMathFloorRuleTest.java            |   39 +
 .../AvoidUsingMathRoundRuleTest.java            |   38 +
 .../performance/BindableClassRuleTest.java      |   40 +
 .../CreationPolicySetToAllRuleTest.java         |   53 +
 .../CyclomaticComplexityRuleTest.java           |   45 +
 .../performance/DeeplyNestedIfRuleTest.java     |   46 +
 .../DynamicFiltersUsedInPopupTest.java          |   60 +
 .../performance/HeavyConstructorRuleTest.java   |   46 +
 .../RecursiveStyleManagerRuleTest.java          |   39 +
 .../performance/UseTraceFunctionRuleTest.java   |   43 +
 .../security/AllowAllSecureDomainRuleTest.java  |   82 +
 .../security/AllowInsecureDomainRuleTest.java   |   55 +
 .../ImportLoadBestPracticeRuleTest.java         |   52 +
 .../security/InsecureExactSettingsRuleTest.java |   55 +
 .../rules/security/LSOSecureFalseRuleTest.java  |   59 +
 .../security/LocalConnectionStarRuleTest.java   |   57 +
 .../rules/sizing/TooLongFunctionRuleTest.java   |   54 +
 .../rules/sizing/TooLongSwitchCaseRuleTest.java |   47 +
 .../rules/sizing/TooManyFieldInVORuleTest.java  |   38 +
 .../pmd/rules/sizing/TooManyFieldsRuleTest.java |   44 +
 .../rules/sizing/TooManyFunctionRuleTest.java   |   42 +
 .../rules/sizing/TooManyParametersRuleTest.java |   44 +
 .../pmd/rules/sizing/TooManyPublicRuleTest.java |   42 +
 .../rules/style/BadFormatLoggerRuleTest.java    |   41 +
 .../ConstructorNonEmptyReturnTypeRuleTest.java  |   38 +
 .../rules/style/CopyrightMissingRuleTest.java   |   42 +
 .../style/ImportFromSamePackageRuleTest.java    |   38 +
 .../pmd/rules/style/OverLongLineRuleTest.java   |   55 +
 .../rules/style/TabUsedAsIndentorRuleTest.java  |   99 +
 .../IdenticalSwitchCasesRuleTest.java           |   38 +
 .../rules/switchrules/NestedSwitchRuleTest.java |   40 +
 .../NonBreakableSwitchCaseRuleTest.java         |   38 +
 ...itchStatementsShouldHaveDefaultRuleTest.java |   42 +
 .../TooFewBrancheInSwitchStatementRuleTest.java |   40 +
 .../unused/EmptyPrivateMethodRuleTest.java      |   49 +
 .../pmd/rules/unused/UnusedFieldRuleTest.java   |   44 +
 .../unused/UnusedLocalVariableRuleTest.java     |   84 +
 .../rules/unused/UnusedParameterRuleTest.java   |   53 +
 .../unused/UnusedPrivateMethodRuleTest.java     |   49 +
 .../flex-pmd-test-resources/pom.xml             |   57 +
 .../src/main/assembly/resources.xml             |   31 +
 .../src/main/resources/test/AbstractRowData.as  |  136 +
 .../main/resources/test/AbstractRowData.mxml    |   44 +
 .../src/main/resources/test/BadComponent.as     |   43 +
 .../src/main/resources/test/Color.as            |   29 +
 .../src/main/resources/test/DefaultNameEvent.as |   36 +
 .../resources/test/DeleteButtonRenderer.mxml    |  101 +
 .../src/main/resources/test/ErrorToltipSkin.as  |  317 +++
 .../src/main/resources/test/GenericType.as      |   37 +
 .../src/main/resources/test/GoodComponent.as    |   51 +
 .../test/LinkButtonExample_Exception.mxml       |   38 +
 .../src/main/resources/test/Looping.as          |   68 +
 .../src/main/resources/test/Main.mxml           |   45 +
 .../resources/test/MainWithModelLocator.mxml    |   42 +
 .../resources/test/MainWithNoCopyright.mxml     |   22 +
 .../src/main/resources/test/PngEncoder.as       |  617 +++++
 .../src/main/resources/test/RadonDataGrid.as    |  200 ++
 .../src/main/resources/test/Responder.as        |   36 +
 .../src/main/resources/test/Simple.as           |   19 +
 .../src/main/resources/test/SkinStyles.as       |   65 +
 .../src/main/resources/test/Sorted.as           |   62 +
 .../src/main/resources/test/Title.as            |   33 +
 .../src/main/resources/test/UnboundMetadata.as  |   41 +
 .../src/main/resources/test/WorkEvent.as        |  205 ++
 .../main/resources/test/asDocs/EmptyClass.as    |   38 +
 .../resources/test/asDocs/EmptyWithDocClass.as  |   51 +
 .../src/main/resources/test/bug/Duane.mxml      |  154 ++
 .../src/main/resources/test/bug/FlexPMD115.as   |   30 +
 .../main/resources/test/bug/FlexPMD141a.mxml    |   32 +
 .../main/resources/test/bug/FlexPMD141b.mxml    |   34 +
 .../src/main/resources/test/bug/FlexPMD157.as   |   33 +
 .../src/main/resources/test/bug/FlexPMD173.as   |   40 +
 .../src/main/resources/test/bug/FlexPMD181.as   | 2344 +++++++++++++++++
 .../src/main/resources/test/bug/FlexPMD232.as   |   36 +
 .../main/resources/test/bug/FlexPMD233a.mxml    |   91 +
 .../main/resources/test/bug/FlexPMD233b.mxml    |  300 +++
 .../src/main/resources/test/bug/FlexPMD61.as    |   42 +
 .../src/main/resources/test/bug/FlexPMD62.as    |   35 +
 .../src/main/resources/test/bug/FlexPMD88.as    |   41 +
 .../src/main/resources/test/bug/FlexPMD97.as    |   31 +
 .../src/main/resources/test/bug/Nico.as         |   30 +
 .../src/main/resources/test/bug/Security.as     |   36 +
 .../test/cairngorm/BindableModelLocator.as      |   23 +
 .../resources/test/cairngorm/FatController.as   |  183 ++
 .../resources/test/cairngorm/LightController.as |  201 ++
 .../test/cairngorm/NonBindableModelLocator.as   |   54 +
 .../cairngorm/events/CorrectConstantEvent.as    |   45 +
 .../cairngorm/events/CorrectConstructorEvent.as |   38 +
 .../cairngorm/events/UncorrectConstantEvent.as  |   40 +
 .../events/UncorrectConstructorEvent.as         |   38 +
 .../test/com/adobe/ac/AbstractRowData.as        |  118 +
 .../src/main/resources/test/com/adobe/ac/foo.as |   22 +
 .../resources/test/com/adobe/ac/ncss/ArrayVO.as |   46 +
 .../test/com/adobe/ac/ncss/BigImporterModel.as  |   78 +
 .../test/com/adobe/ac/ncss/BigModel.as          |   90 +
 .../test/com/adobe/ac/ncss/ConfigProxy.as       |   50 +
 .../test/com/adobe/ac/ncss/LongSwitch.as        |  132 +
 .../com/adobe/ac/ncss/MyCairngormCommand.as     |   30 +
 .../test/com/adobe/ac/ncss/NestedSwitch.as      |   59 +
 .../test/com/adobe/ac/ncss/SearchBarEvent.as    |   34 +
 .../test/com/adobe/ac/ncss/VoidConstructor.as   |   37 +
 .../adobe/ac/ncss/event/DynamicCustomEvent.as   |   35 +
 .../com/adobe/ac/ncss/event/FirstCustomEvent.as |   30 +
 .../adobe/ac/ncss/event/SecondCustomEvent.as    |   28 +
 .../com/adobe/ac/ncss/mxml/IterationsList.mxml  |   90 +
 .../com/adobe/ac/ncss/mxml/IterationsList2.mxml |   44 +
 .../com/adobe/ac/ncss/mxml/NestedComponent.mxml |   43 +
 .../adobe/cairngorm/work/SequenceWorkFlow.as    |   19 +
 .../src/main/resources/test/empty/Empty.as      |   18 +
 .../src/main/resources/test/empty/Empty.mxml    |   18 +
 .../src/main/resources/test/filters/MyPopup.as  |   28 +
 .../main/resources/test/filters/MyPopup.mxml    |   32 +
 .../main/resources/test/flexpmd114/a/Test.as    |   39 +
 .../main/resources/test/flexpmd114/b/Test.as    |   35 +
 .../main/resources/test/flexpmd114/c/Test.as    |   35 +
 .../main/resources/test/flexunit/RaoulTest.as   |   69 +
 .../main/resources/test/flexunit/RulesetTest.as |   62 +
 .../main/resources/test/fu/main/flex/Main.mxml  |   22 +
 .../fu/main/flex/TestRunnerApplication.mxml     |   50 +
 .../main/resources/test/fu/test/flex/MySuite.as |   26 +
 .../main/resources/test/fu/test/flex/MyTest.as  |   46 +
 .../test/functional/FunctionalClient.as         |   29 +
 .../functional/func1/api/Func1ExposedClass.as   |   29 +
 .../func1/restricted/Func1RestrictedClass.as    |   29 +
 .../functional/func2/api/Func2ExposedClass.as   |   28 +
 .../func2/restricted/Func2RestrictedClass.as    |   28 +
 .../resources/test/mx/controls/DateChooser2.as  |   25 +
 .../org/as3commons/concurrency/thread/Color.as  |   25 +
 .../test/parsley/InaccessibleMetaData.as        |   53 +
 .../InaccessibleMetaDataInternalClass.as        |   25 +
 .../test/parsley/MessageInterceptorSignature.as |   47 +
 .../test/parsley/MismatchedManagedEvent.as      |   28 +
 .../resources/test/parsley/MisplacedMetaData.as |   65 +
 .../RedundantMessageHandlerTypeAttribute.as     |   35 +
 .../test/parsley/RedundantMethodAttribute.as    |   35 +
 .../test/parsley/UnknownMetaDataAttribute.as    |   32 +
 .../resources/test/pseudo/look/IEditLook.as     |   24 +
 .../main/resources/test/schedule_internal.as    |   22 +
 .../test/src/fw/data/request/ResultListener.as  |   27 +
 FlexPMD/flex-pmd-java/pom.xml                   |   56 +
 FlexPMD/flex-pmd-java/sonar.sh                  |   17 +
 FlexPMD/flex-pmd-maven-plugin/pom.xml           |  115 -
 .../adobe/ac/pmd/maven/AbstractFlexPmdMojo.java |  362 ---
 .../adobe/ac/pmd/maven/FlexPmdHtmlEngine.java   |  125 -
 .../com/adobe/ac/pmd/maven/FlexPmdMojo.java     |   40 -
 .../adobe/ac/pmd/maven/FlexPmdReportMojo.java   |   82 -
 .../com/adobe/ac/pmd/maven/FlexPmdMojoTest.java |   97 -
 .../ac/pmd/maven/FlexPmdReportMojoTest.java     |   86 -
 .../src/test/resources/rulesets/broken_pmd.xml  |  703 ------
 FlexPMD/flex-pmd-metrics-ant-task/.pmd          |  975 --------
 FlexPMD/flex-pmd-metrics-ant-task/pom.xml       |  152 --
 .../ac/pmd/metrics/ant/FlexMetricsAntTask.java  |   83 -
 .../pmd/metrics/ant/FlexMetricsAntTaskTest.java |   40 -
 FlexPMD/flex-pmd-metrics-command-line/.pmd      |  975 --------
 FlexPMD/flex-pmd-metrics-command-line/pom.xml   |  201 --
 .../ac/pmd/metrics/commandline/FlexMetrics.java |  126 -
 .../metrics/commandline/FlexMetricsTest.java    |   55 -
 .../metrics/commandline/FlexMetricsTest.java    |   55 -
 FlexPMD/flex-pmd-metrics-maven-plugin/.pmd      |  975 --------
 FlexPMD/flex-pmd-metrics-maven-plugin/pom.xml   |  102 -
 .../ac/pmd/metrics/maven/FlexMetricsMojo.java   |  201 --
 .../metrics/maven/FlexMetricsReportMojo.java    |  414 ---
 .../pmd/metrics/maven/utils/NcssExecuter.java   |   48 -
 .../src/main/resources/flexMetrics.properties   |   94 -
 .../pmd/metrics/maven/FlexMetricsMojoTest.java  |   60 -
 .../maven/FlexMetricsReportMojoTest.java        |   98 -
 FlexPMD/flex-pmd-metrics/.pmd                   |  975 --------
 FlexPMD/flex-pmd-metrics/pom.xml                |   98 -
 .../ac/pmd/metrics/AbstractNamedMetrics.java    |   38 -
 .../ac/pmd/metrics/AbstractPackagedMetrics.java |   89 -
 .../ac/pmd/metrics/AverageClassMetrics.java     |   57 -
 .../ac/pmd/metrics/AverageFunctionMetrics.java  |   39 -
 .../ac/pmd/metrics/AverageMetricsBase.java      |   53 -
 .../com/adobe/ac/pmd/metrics/ClassMetrics.java  |  128 -
 .../adobe/ac/pmd/metrics/FunctionMetrics.java   |   74 -
 .../java/com/adobe/ac/pmd/metrics/IMetrics.java |   22 -
 .../ac/pmd/metrics/InternalFunctionMetrics.java |   85 -
 .../com/adobe/ac/pmd/metrics/MetricUtils.java   |   70 -
 .../adobe/ac/pmd/metrics/PackageMetrics.java    |   95 -
 .../adobe/ac/pmd/metrics/ProjectMetrics.java    |  118 -
 .../ac/pmd/metrics/TotalPackageMetrics.java     |  107 -
 .../ac/pmd/metrics/engine/AbstractMetrics.java  |  234 --
 .../ac/pmd/metrics/engine/FlexMetrics.java      |  148 --
 .../adobe/ac/pmd/metrics/ClassMetricsTest.java  |  162 --
 .../metrics/InternalFunctionMetricsTest.java    |   46 -
 .../adobe/ac/pmd/metrics/MetricUtilsTest.java   |   43 -
 .../ac/pmd/metrics/PackageMetricsTest.java      |   72 -
 .../ac/pmd/metrics/engine/FlexMetricsTest.java  |  161 --
 FlexPMD/flex-pmd-parent/.pmd                    |   25 -
 FlexPMD/flex-pmd-parent/checkstyle.xml          |   78 -
 FlexPMD/flex-pmd-parent/cleanup.profile.xml     |   95 -
 .../flex-pmd-parent/flex-formatter.properties   |   74 -
 FlexPMD/flex-pmd-parent/java-formatter.xml      |  772 ------
 FlexPMD/flex-pmd-parent/pmd.xml                 |  249 --
 FlexPMD/flex-pmd-parent/pom.xml                 |  455 ----
 FlexPMD/flex-pmd-parent/projectSet.psf          |   49 -
 FlexPMD/flex-pmd-parent/src/etc/header.txt      |   14 -
 FlexPMD/flex-pmd-ruleset-api/.checkstyle        |   24 -
 FlexPMD/flex-pmd-ruleset-api/.pmd               |   25 -
 FlexPMD/flex-pmd-ruleset-api/pom.xml            |  109 -
 .../java/com/adobe/ac/pmd/IFlexViolation.java   |   54 -
 .../com/adobe/ac/pmd/files/FileSetUtils.java    |  179 --
 .../com/adobe/ac/pmd/nodes/IAsDocHolder.java    |   30 -
 .../java/com/adobe/ac/pmd/nodes/IAttribute.java |   24 -
 .../java/com/adobe/ac/pmd/nodes/IClass.java     |   81 -
 .../com/adobe/ac/pmd/nodes/ICommentHolder.java  |   32 -
 .../java/com/adobe/ac/pmd/nodes/IConstant.java  |   24 -
 .../java/com/adobe/ac/pmd/nodes/IField.java     |   28 -
 .../ac/pmd/nodes/IFieldInitialization.java      |   24 -
 .../java/com/adobe/ac/pmd/nodes/IFunction.java  |  100 -
 .../com/adobe/ac/pmd/nodes/IIdentifierNode.java |   25 -
 .../java/com/adobe/ac/pmd/nodes/IMetaData.java  |   47 -
 .../adobe/ac/pmd/nodes/IMetaDataListHolder.java |   46 -
 .../adobe/ac/pmd/nodes/IModifiersHolder.java    |   34 -
 .../java/com/adobe/ac/pmd/nodes/INamable.java   |   28 -
 .../com/adobe/ac/pmd/nodes/INamableNode.java    |   25 -
 .../main/java/com/adobe/ac/pmd/nodes/INode.java |   32 -
 .../java/com/adobe/ac/pmd/nodes/IPackage.java   |   50 -
 .../java/com/adobe/ac/pmd/nodes/IParameter.java |   24 -
 .../java/com/adobe/ac/pmd/nodes/IVariable.java  |   33 -
 .../java/com/adobe/ac/pmd/nodes/IVisible.java   |   28 -
 .../java/com/adobe/ac/pmd/nodes/MetaData.java   |   85 -
 .../java/com/adobe/ac/pmd/nodes/Modifier.java   |   78 -
 .../ac/pmd/nodes/asdoc/impl/AsDocNodeBase.java  |   42 -
 .../ac/pmd/nodes/asdoc/impl/ClassAsDocNode.java |   31 -
 .../pmd/nodes/asdoc/impl/FunctionAsDocNode.java |   54 -
 .../nodes/asdoc/impl/ParameterAsDocNode.java    |   55 -
 .../adobe/ac/pmd/nodes/impl/AbstractNode.java   |   90 -
 .../adobe/ac/pmd/nodes/impl/AttributeNode.java  |   44 -
 .../com/adobe/ac/pmd/nodes/impl/ClassNode.java  |  411 ---
 .../adobe/ac/pmd/nodes/impl/ConstantNode.java   |   44 -
 .../pmd/nodes/impl/FieldInitializationNode.java |   53 -
 .../com/adobe/ac/pmd/nodes/impl/FieldNode.java  |   94 -
 .../com/adobe/ac/pmd/nodes/impl/FormalNode.java |   53 -
 .../adobe/ac/pmd/nodes/impl/FunctionNode.java   |  444 ----
 .../adobe/ac/pmd/nodes/impl/IdentifierNode.java |   63 -
 .../adobe/ac/pmd/nodes/impl/MetaDataNode.java   |  139 --
 .../adobe/ac/pmd/nodes/impl/NodeFactory.java    |   49 -
 .../adobe/ac/pmd/nodes/impl/PackageNode.java    |  167 --
 .../adobe/ac/pmd/nodes/impl/VariableNode.java   |  224 --
 .../adobe/ac/pmd/nodes/utils/AsDocUtils.java    |   60 -
 .../adobe/ac/pmd/nodes/utils/FunctionUtils.java |   53 -
 .../ac/pmd/rules/core/AbstractAstFlexRule.java  | 1164 ---------
 .../pmd/rules/core/AbstractAstFlexRuleTest.java |   67 -
 .../rules/core/AbstractFlexMetaDataRule.java    |  111 -
 .../ac/pmd/rules/core/AbstractFlexRule.java     |  354 ---
 .../ac/pmd/rules/core/AbstractFlexRuleTest.java |  264 --
 .../rules/core/AbstractForbiddenImportRule.java |   58 -
 .../pmd/rules/core/AbstractPrimaryAstRule.java  |   86 -
 .../rules/core/AbstractRegExpBasedRuleTest.java |   76 -
 .../pmd/rules/core/AbstractRegexpBasedRule.java |  116 -
 .../rules/core/AbstractXpathRelatedRule.java    |  244 --
 .../adobe/ac/pmd/rules/core/IFlexAstRule.java   |   28 -
 .../com/adobe/ac/pmd/rules/core/IFlexRule.java  |   53 -
 .../com/adobe/ac/pmd/rules/core/Violation.java  |  323 ---
 .../ac/pmd/rules/core/ViolationPosition.java    |  106 -
 .../ac/pmd/rules/core/ViolationPriority.java    |   45 -
 .../AbstractMaximizedAstFlexRule.java           |   60 -
 .../thresholded/AbstractMaximizedFlexRule.java  |   60 -
 .../AbstractMaximizedRegexpBasedRule.java       |   61 -
 .../core/thresholded/IThresholdedRule.java      |   45 -
 .../src/main/resources/flexPmd.properties       |   26 -
 .../adobe/ac/pmd/files/FileSetUtilsTest.java    |   47 -
 .../com/adobe/ac/pmd/nodes/MetaDataTest.java    |   55 -
 .../adobe/ac/pmd/nodes/impl/ClassNodeTest.java  |  174 --
 .../ac/pmd/nodes/impl/CommentNodeTest.java      |  163 --
 .../adobe/ac/pmd/nodes/impl/FieldNodeTest.java  |   84 -
 .../ac/pmd/nodes/impl/FunctionNodeTest.java     |  271 --
 .../ac/pmd/nodes/impl/MetaDataNodeTest.java     |  119 -
 .../ac/pmd/nodes/impl/PackageNodeTest.java      |  126 -
 .../ac/pmd/nodes/impl/VariableNodeTest.java     |   77 -
 .../ac/pmd/nodes/utils/AsDocUtilsTest.java      |   63 -
 .../ac/pmd/nodes/utils/FunctionUtilsTest.java   |   60 -
 .../com/adobe/ac/pmd/rules/core/EmptyRule.java  |   79 -
 .../adobe/ac/pmd/rules/core/EmptyRuleTest.java  |  134 -
 .../adobe/ac/pmd/rules/core/FlexRuleTest.java   |   94 -
 .../adobe/ac/pmd/rules/core/IgnoreRuleTest.java |  129 -
 .../pmd/rules/core/TestAbstractAstFlexRule.java |  146 --
 .../pmd/rules/core/ViolationPriorityTest.java   |   35 -
 .../adobe/ac/pmd/rules/core/ViolationTest.java  |  236 --
 .../adobe/ac/pmd/rules/core/WarningRule.java    |   57 -
 .../flex-pmd-ruleset-creator/build.properties   |   41 -
 FlexPMD/flex-pmd-ruleset-creator/build.xml      |   75 -
 .../flexcover.properties                        |   89 -
 FlexPMD/flex-pmd-ruleset-creator/flexcover.xml  |  191 --
 .../html-template/index.template.html           |  121 -
 FlexPMD/flex-pmd-ruleset-creator/pom.xml        |  218 --
 .../src/main/flex/Main.mxml                     |  132 -
 .../src/main/flex/TestRunner-app.xml            |   45 -
 .../src/main/flex/TestViewRunner-app.xml        |   45 -
 .../src/main/flex/assets/add-10.png             |  Bin 3128 -> 0 bytes
 .../src/main/flex/assets/add-48.png             |  Bin 3141 -> 0 bytes
 .../src/main/flex/assets/arrow.ai               | 1121 ---------
 .../src/main/flex/assets/cancelledIcon.png      |  Bin 1094 -> 0 bytes
 .../src/main/flex/assets/down.png               |  Bin 926 -> 0 bytes
 .../src/main/flex/assets/icon_tool_trash.png    |  Bin 821 -> 0 bytes
 .../src/main/flex/assets/icon_tool_trash2.png   |  Bin 27190 -> 0 bytes
 .../src/main/flex/assets/todoLogo.png           |  Bin 1106 -> 0 bytes
 .../src/main/flex/assets/todoLogo_big.png       |  Bin 57083 -> 0 bytes
 .../src/main/flex/assets/up.png                 |  Bin 924 -> 0 bytes
 .../com/adobe/ac/pmd/api/IGetCustomRuleset.as   |   28 -
 .../com/adobe/ac/pmd/api/IGetRootRuleset.as     |   28 -
 .../flex/com/adobe/ac/pmd/control/Controller.as |   40 -
 .../control/commands/GetCustomRulesetCommand.as |   63 -
 .../control/commands/GetRootRulesetCommand.as   |   63 -
 .../commands/GetRulesetContentCommand.as        |   65 -
 .../pmd/control/events/GetCustomRulesetEvent.as |   48 -
 .../pmd/control/events/GetRootRulesetEvent.as   |   48 -
 .../adobe/ac/pmd/services/MyServiceLocator.mxml |   39 -
 .../ac/pmd/services/rulesets/RulesetDelegate.as |   96 -
 .../services/translators/PropertyTranslator.as  |   44 -
 .../translators/RootRulesetTranslator.as        |  107 -
 .../pmd/services/translators/RuleTranslator.as  |   98 -
 .../services/translators/RulesetTranslator.as   |   63 -
 .../flex/com/adobe/ac/pmd/view/RuleEditor.mxml  |  140 --
 .../flex/com/adobe/ac/pmd/view/RuleEditorPM.as  |   33 -
 .../com/adobe/ac/pmd/view/RuleSetNavigator.mxml |  160 --
 .../com/adobe/ac/pmd/view/RuleSetNavigatorPM.as |  162 --
 .../pmd/view/events/SelectedRuleChangeEvent.as  |   48 -
 .../view/renderers/DeleteButtonRenderer.mxml    |   77 -
 .../src/main/locales/en_US/Main.properties      |   15 -
 .../src/main/resources/placeholder.txt          |   16 -
 .../src/test/flex/AllTests.as                   |   42 -
 .../flex/com/adobe/ac/pmd/model/RulesetTest.as  |   72 -
 .../services/translators/RuleTranslatorTest.as  |   59 -
 .../translators/RulesetTranslatorTest.as        |   45 -
 .../adobe/ac/pmd/view/RuleSetNavigatorPMTest.as |   80 -
 ...ceforge.pmd.eclipse.plugin.pmdBuilder.launch |   25 -
 FlexPMD/flex-pmd-ruleset/.pmd                   |  935 -------
 FlexPMD/flex-pmd-ruleset/pom.xml                |   81 -
 .../rules/architecture/MonkeyPatchingRule.java  |   72 -
 .../UseInternalClassOutsideApiClass.java        |  126 -
 .../ViewComponentReferencedInModelRule.java     |   87 -
 .../ac/pmd/rules/asdocs/AbstractAsDocRule.java  |   37 -
 .../rules/asdocs/AttributeAsDocMissingRule.java |   53 -
 .../pmd/rules/asdocs/ClassAsDocMissingRule.java |   60 -
 .../rules/asdocs/MethodAsDocMissingRule.java    |   53 -
 .../ac/pmd/rules/binding/BindingUtilsRule.java  |   48 -
 .../ac/pmd/rules/binding/ChangeWatcherRule.java |   48 -
 .../binding/TooLongBindingExpressionRule.java   |  115 -
 .../BadCairngormEventNameFormatRule.java        |  119 -
 .../cairngorm/BindableModelLocatorRule.java     |   64 -
 ...rngormEventDispatcherCallExplicitlyRule.java |   74 -
 .../pmd/rules/cairngorm/FatControllerRule.java  |   97 -
 ...catorReferencedMoreThanOncePerClassRule.java |   53 -
 ...delLocatorOutsideTheMainApplicationRule.java |   73 -
 .../rules/component/CallLaterDirectlyRule.java  |   62 -
 ...teChildrenNumberInUpdateDisplayListRule.java |   66 -
 .../ac/pmd/rules/css/StyleBlockInMxmlRule.java  |   68 -
 .../css/UseCssInsteadOfEmbedMetaDataRule.java   |   84 -
 .../pmd/rules/empty/AbstractEmptyBlockRule.java |   37 -
 .../rules/empty/EmptyCatchStatementRule.java    |   53 -
 .../ac/pmd/rules/empty/EmptyIfStmtRule.java     |   53 -
 .../rules/event/AbstractEventRelatedRule.java   |   54 -
 .../event/ConstructorDispatchingEventRule.java  |   65 -
 .../pmd/rules/event/DefaultEventNameRule.java   |   53 -
 .../event/DispatchHardCodedEventNameRule.java   |   80 -
 .../event/EventMissingCloneFunctionRule.java    |   82 -
 .../event/ListenForHardCodedEventNameRule.java  |   80 -
 .../event/PublicVariableInCustomEventRule.java  |   57 -
 .../rules/event/UnboundTypeInMetadataRule.java  |   83 -
 .../rules/event/UntypedEventMetadataRule.java   |   71 -
 .../ac/pmd/rules/flexunit/EmptyUnitTest.java    |   99 -
 .../pmd/rules/maintanability/AlertShowRule.java |   74 -
 .../ArrayFieldWithNoArrayElementTypeRule.java   |   93 -
 .../AvoidProtectedFieldInFinalClassRule.java    |   92 -
 .../maintanability/AvoidUseOfAsKeywordRule.java |   48 -
 .../AvoidUsingPublicStaticFieldRule.java        |   59 -
 .../AvoidUsingWithKeyWordRule.java              |   57 -
 .../ClassAndExtensionAreIdenticalRule.java      |   68 -
 .../rules/maintanability/DynamicClassRule.java  |   65 -
 .../maintanability/EmptyStatementRule.java      |   49 -
 .../maintanability/ExcessiveImportRule.java     |   80 -
 .../NonStaticConstantFieldRule.java             |   59 -
 .../rules/maintanability/OnlyOneReturnRule.java |   72 -
 .../ProtectedStaticMethodRule.java              |   54 -
 ...ToVariableBindingFromItsInitializerRule.java |   91 -
 .../maintanability/TrueFalseConditionRule.java  |   84 -
 .../UselessOverridenFunctionRule.java           |   82 -
 .../AbstractUseForbiddenTypeRule.java           |  119 -
 .../forbiddentypes/UseDictionaryTypeRule.java   |   46 -
 .../forbiddentypes/UseGenericTypeRule.java      |   48 -
 .../forbiddentypes/UseObjectTypeRule.java       |   92 -
 .../multiscreen/AvoidRollMouseEventRule.java    |   69 -
 .../pmd/rules/multiscreen/AvoidTooltipRule.java |   68 -
 .../AbstractMoreThanEntryPointInMxmlRule.java   |  110 -
 .../ac/pmd/rules/mxml/CodeBehindInMxmlRule.java |   68 -
 .../mxml/MoreThanOneEntryPointInMxmlRule.java   |   47 -
 .../mxml/MoreThanTwoEntryPointsInMxmlRule.java  |   47 -
 .../mxml/OnlyOneScriptBlockPerMxmlRule.java     |   97 -
 .../pmd/rules/mxml/StaticMethodInMxmlRule.java  |   66 -
 .../pmd/rules/mxml/TooLongScriptBlockRule.java  |   99 -
 .../pmd/rules/mxml/TooManyStatesInMxmlRule.java |  159 --
 .../BooleanAttributeShouldContainIsHasRule.java |   75 -
 .../rules/naming/CapitalizeConstantsRule.java   |   51 -
 .../ac/pmd/rules/naming/IncorrectClassCase.java |   56 -
 .../naming/IncorrectEventHandlerNameRule.java   |   79 -
 .../pmd/rules/naming/InterfaceNamingRule.java   |   41 -
 .../ac/pmd/rules/naming/PackageCaseRule.java    |   76 -
 .../PropertyHiddenByLocalVariableRule.java      |   75 -
 .../rules/naming/TooLongFunctionNameRule.java   |   55 -
 .../pmd/rules/naming/TooShortVariableRule.java  |  151 --
 .../VariableNameEndingWithNumericRule.java      |  111 -
 .../rules/naming/WronglyNamedVariableRule.java  |  121 -
 .../ParameterizedRegExpBasedRule.java           |   91 -
 .../rules/parsley/InaccessibleMetaDataRule.java |  100 -
 .../MessageInterceptorSignatureRule.java        |   91 -
 .../parsley/MismatchedManagedEventRule.java     |   86 -
 .../rules/parsley/MisplacedMetaDataRule.java    |  120 -
 ...edundantMessageHandlerTypeAttributeRule.java |   99 -
 .../parsley/RedundantMethodAttributeRule.java   |   80 -
 .../parsley/UnknownMetaDataAttributeRule.java   |   79 -
 .../ac/pmd/rules/parsley/utils/MetaDataTag.java |  102 -
 .../rules/parsley/utils/ParsleyMetaData.java    |  276 --
 .../AbstractAvoidNodeInLoopRule.java            |   85 -
 .../performance/AvoidDeclarationInLoopRule.java |   37 -
 .../AvoidInstanciationInLoopRule.java           |   44 -
 .../performance/AvoidUsingMathCeilRule.java     |   74 -
 .../performance/AvoidUsingMathFloorRule.java    |   74 -
 .../performance/AvoidUsingMathRoundRule.java    |   74 -
 .../rules/performance/BindableClassRule.java    |   66 -
 .../performance/CreationPolicySetToAllRule.java |   70 -
 .../performance/CyclomaticComplexityRule.java   |   77 -
 .../rules/performance/DeeplyNestedIfRule.java   |  123 -
 .../performance/DynamicFiltersUsedInPopup.java  |   68 -
 .../rules/performance/HeavyConstructorRule.java |   90 -
 .../performance/RecursiveStyleManagerRule.java  |   58 -
 .../rules/performance/UseTraceFunctionRule.java |   62 -
 .../security/AllowAllSecureDomainRule.java      |  100 -
 .../rules/security/AllowInsecureDomainRule.java |   90 -
 .../security/ImportLoadBestPracticeRule.java    |   90 -
 .../security/InsecureExactSettingsRule.java     |   89 -
 .../pmd/rules/security/LSOSecureFalseRule.java  |   94 -
 .../rules/security/LocalConnectionStarRule.java |   96 -
 .../pmd/rules/sizing/TooLongFunctionRule.java   |   90 -
 .../pmd/rules/sizing/TooLongSwitchCaseRule.java |   80 -
 .../pmd/rules/sizing/TooManyFieldInVORule.java  |   47 -
 .../ac/pmd/rules/sizing/TooManyFieldsRule.java  |  107 -
 .../pmd/rules/sizing/TooManyFunctionRule.java   |  103 -
 .../pmd/rules/sizing/TooManyParametersRule.java |   85 -
 .../ac/pmd/rules/sizing/TooManyPublicRule.java  |  120 -
 .../ac/pmd/rules/style/BadFormatLoggerRule.java |   83 -
 .../ConstructorNonEmptyReturnTypeRule.java      |   53 -
 .../pmd/rules/style/CopyrightMissingRule.java   |   95 -
 .../rules/style/ImportFromSamePackageRule.java  |   61 -
 .../ac/pmd/rules/style/OverLongLineRule.java    |  114 -
 .../pmd/rules/style/TabUsedAsIndentorRule.java  |   48 -
 .../switchrules/IdenticalSwitchCasesRule.java   |   73 -
 .../pmd/rules/switchrules/NestedSwitchRule.java |   58 -
 .../switchrules/NonBreakableSwitchCaseRule.java |   41 -
 .../SwitchStatementsShouldHaveDefaultRule.java  |   75 -
 .../TooFewBrancheInSwitchStatementRule.java     |  144 --
 .../unused/AbstractUnusedVariableRule.java      |  130 -
 .../rules/unused/EmptyPrivateMethodRule.java    |   41 -
 .../ac/pmd/rules/unused/UnusedFieldRule.java    |  128 -
 .../rules/unused/UnusedLocalVariableRule.java   |   76 -
 .../pmd/rules/unused/UnusedParameterRule.java   |  239 --
 .../rules/unused/UnusedPrivateMethodRule.java   |  183 --
 .../resources/com/adobe/ac/pmd/all_flex.xml     |   48 -
 .../resources/com/adobe/ac/pmd/default_flex.xml |   46 -
 .../com/adobe/ac/pmd/rulesets/architecture.xml  |  118 -
 .../com/adobe/ac/pmd/rulesets/asdocs.xml        |   50 -
 .../com/adobe/ac/pmd/rulesets/basic_mxml.xml    |   65 -
 .../com/adobe/ac/pmd/rulesets/binding.xml       |   70 -
 .../com/adobe/ac/pmd/rulesets/cairngorm.xml     |  134 -
 .../com/adobe/ac/pmd/rulesets/component.xml     |   43 -
 .../resources/com/adobe/ac/pmd/rulesets/css.xml |   41 -
 .../com/adobe/ac/pmd/rulesets/empty.xml         |   66 -
 .../com/adobe/ac/pmd/rulesets/event.xml         |  147 --
 .../com/adobe/ac/pmd/rulesets/indentation.xml   |   31 -
 .../adobe/ac/pmd/rulesets/maintanability.xml    |  236 --
 .../com/adobe/ac/pmd/rulesets/multitouch.xml    |   39 -
 .../com/adobe/ac/pmd/rulesets/naming.xml        |  162 --
 .../com/adobe/ac/pmd/rulesets/parsley.xml       |  148 --
 .../com/adobe/ac/pmd/rulesets/performance.xml   |  114 -
 .../com/adobe/ac/pmd/rulesets/security.xml      |   86 -
 .../com/adobe/ac/pmd/rulesets/sizing.xml        |  178 --
 .../com/adobe/ac/pmd/rulesets/style.xml         |   86 -
 .../com/adobe/ac/pmd/rulesets/switches.xml      |  111 -
 .../com/adobe/ac/pmd/rulesets/unittest.xml      |   34 -
 .../com/adobe/ac/pmd/rulesets/unused.xml        |   82 -
 .../architecture/MonkeyPatchingRuleTest.java    |   38 -
 .../UseInternalClassOutsideApiClassTest.java    |   48 -
 .../ViewComponentReferencedInModelRuleTest.java |   58 -
 .../pmd/rules/asdocs/AbstractAsDocRuleTest.java |   67 -
 .../asdocs/AttributeAsDocMissingRuleTest.java   |   37 -
 .../rules/asdocs/ClassAsDocMissingRuleTest.java |   37 -
 .../asdocs/MethodAsDocMissingRuleTest.java      |   39 -
 .../pmd/rules/binding/BindingUtilsRuleTest.java |   38 -
 .../rules/binding/ChangeWatcherRuleTest.java    |   38 -
 .../TooLongBindingExpressionRuleTest.java       |   56 -
 .../BadCairngormEventNameFormatRuleTest.java    |   41 -
 .../cairngorm/BindableModelLocatorRuleTest.java |   38 -
 ...rmEventDispatcherCallExplicitlyRuleTest.java |   39 -
 .../rules/cairngorm/FatControllerRuleTest.java  |   38 -
 ...rReferencedMoreThanOncePerClassRuleTest.java |   38 -
 ...ocatorOutsideTheMainApplicationRuleTest.java |   60 -
 .../component/CallLaterDirectlyRuleTest.java    |   39 -
 ...ildrenNumberInUpdateDisplayListRuleTest.java |   41 -
 .../pmd/rules/css/StyleBlockInMxmlRuleTest.java |   66 -
 .../UseCssInsteadOfEmbedMetaDataRuleTest.java   |   38 -
 .../empty/EmptyCatchStatementRuleTest.java      |   38 -
 .../ac/pmd/rules/empty/EmptyIfStmtRuleTest.java |   49 -
 .../ConstructorDispatchingEventRuleTest.java    |   38 -
 .../rules/event/DefaultEventNameRuleTest.java   |   38 -
 .../DispatchHardCodedEventNameRuleTest.java     |   61 -
 .../EventMissingCloneFunctionRuleTest.java      |   41 -
 .../ListenForHardCodedEventNameRuleTest.java    |   57 -
 .../PublicVariableInCustomEventRuleTest.java    |   41 -
 .../event/UnboundTypeInMetadataRuleTest.java    |   40 -
 .../event/UntypedEventMetadataRuleTest.java     |   38 -
 .../pmd/rules/flexunit/EmptyUnitTestTest.java   |   41 -
 .../rules/maintanability/AlertShowRuleTest.java |   47 -
 ...rrayFieldWithNoArrayElementTypeRuleTest.java |   40 -
 ...AvoidProtectedFieldInFinalClassRuleTest.java |   39 -
 .../AvoidUseOfAsKeywordRuleTest.java            |   86 -
 .../AvoidUsingPublicStaticFieldRuleTest.java    |   40 -
 .../AvoidUsingWithKeyWordRuleTest.java          |   38 -
 .../ClassAndExtensionAreIdenticalRuleTest.java  |   38 -
 .../maintanability/DynamicClassRuleTest.java    |   38 -
 .../maintanability/EmptyStatementRuleTest.java  |   42 -
 .../maintanability/ExcessiveImportRuleTest.java |   42 -
 .../NonStaticConstantFieldRuleTest.java         |   51 -
 .../maintanability/OnlyOneReturnRuleTest.java   |   53 -
 .../ProtectedStaticMethodRuleTest.java          |   38 -
 ...riableBindingFromItsInitializerRuleTest.java |   41 -
 .../TrueFalseConditionRuleTest.java             |   56 -
 .../UselessOverridenFunctionRuleTest.java       |   40 -
 .../UseDictionaryTypeRuleTest.java              |   39 -
 .../forbiddenttypes/UseGenericTypeRuleTest.java |   54 -
 .../forbiddenttypes/UseObjectTypeRuleTest.java  |   54 -
 .../AvoidRollMouseEventRuleTest.java            |   59 -
 .../rules/multiscreen/AvoidTooltipRuleTest.java |   55 -
 ...bstractMoreThanEntryPointInMxmlRuleTest.java |   36 -
 .../rules/mxml/CodeBehindInMxmlRuleTest.java    |   55 -
 .../MoreThanOneEntryPointInMxmlRuleTest.java    |   43 -
 .../MoreThanTwoEntryPointsInMxmlRuleTest.java   |   43 -
 .../mxml/OnlyOneScriptBlockPerMxmlRuleTest.java |   40 -
 .../rules/mxml/StaticMethodInMxmlRuleTest.java  |   38 -
 .../rules/mxml/TooLongScriptBlockRuleTest.java  |   45 -
 .../rules/mxml/TooManyStatesInMxmlRuleTest.java |   38 -
 ...leanAttributeShouldContainIsHasRuleTest.java |   36 -
 .../naming/CapitalizeConstantsRuleTest.java     |   46 -
 .../rules/naming/IncorrectClassCaseTest.java    |   38 -
 .../IncorrectEventHandlerNameRuleTest.java      |   47 -
 .../rules/naming/InterfaceNamingRuleTest.java   |   43 -
 .../pmd/rules/naming/PackageCaseRuleTest.java   |   46 -
 .../PropertyHiddenByLocalVariableRuleTest.java  |   38 -
 .../naming/TooLongFunctionNameRuleTest.java     |   38 -
 .../rules/naming/TooShortVariableRuleTest.java  |   69 -
 .../VariableNameEndingWithNumericRuleTest.java  |   77 -
 .../naming/WronglyNamedVariableRuleTest.java    |   70 -
 .../ParameterizedRegExpBasedRuleTest.java       |   41 -
 ...rizedRegExpBasedRuleWithEmptyRegexpTest.java |   36 -
 .../parsley/InaccessibleMetaDataRuleTest.java   |   43 -
 .../MessageInterceptorSignatureRuleTest.java    |   40 -
 .../parsley/MismatchedManagedEventRuleTest.java |   38 -
 .../parsley/MisplacedMetaDataRuleTest.java      |   67 -
 ...dantMessageHandlerTypeAttributeRuleTest.java |   38 -
 .../RedundantMethodAttributeRuleTest.java       |   38 -
 .../UnknownMetaDataAttributeRuleTest.java       |   40 -
 .../AvoidDeclarationInLoopRuleTest.java         |  100 -
 .../AvoidInstanciationInLoopRuleTest.java       |   50 -
 .../performance/AvoidUsingMathCeilRuleTest.java |   36 -
 .../AvoidUsingMathFloorRuleTest.java            |   39 -
 .../AvoidUsingMathRoundRuleTest.java            |   38 -
 .../performance/BindableClassRuleTest.java      |   40 -
 .../CreationPolicySetToAllRuleTest.java         |   53 -
 .../CyclomaticComplexityRuleTest.java           |   45 -
 .../performance/DeeplyNestedIfRuleTest.java     |   46 -
 .../DynamicFiltersUsedInPopupTest.java          |   60 -
 .../performance/HeavyConstructorRuleTest.java   |   46 -
 .../RecursiveStyleManagerRuleTest.java          |   39 -
 .../performance/UseTraceFunctionRuleTest.java   |   43 -
 .../security/AllowAllSecureDomainRuleTest.java  |   82 -
 .../security/AllowInsecureDomainRuleTest.java   |   55 -
 .../ImportLoadBestPracticeRuleTest.java         |   52 -
 .../security/InsecureExactSettingsRuleTest.java |   55 -
 .../rules/security/LSOSecureFalseRuleTest.java  |   59 -
 .../security/LocalConnectionStarRuleTest.java   |   57 -
 .../rules/sizing/TooLongFunctionRuleTest.java   |   54 -
 .../rules/sizing/TooLongSwitchCaseRuleTest.java |   47 -
 .../rules/sizing/TooManyFieldInVORuleTest.java  |   38 -
 .../pmd/rules/sizing/TooManyFieldsRuleTest.java |   44 -
 .../rules/sizing/TooManyFunctionRuleTest.java   |   42 -
 .../rules/sizing/TooManyParametersRuleTest.java |   44 -
 .../pmd/rules/sizing/TooManyPublicRuleTest.java |   42 -
 .../rules/style/BadFormatLoggerRuleTest.java    |   41 -
 .../ConstructorNonEmptyReturnTypeRuleTest.java  |   38 -
 .../rules/style/CopyrightMissingRuleTest.java   |   42 -
 .../style/ImportFromSamePackageRuleTest.java    |   38 -
 .../pmd/rules/style/OverLongLineRuleTest.java   |   55 -
 .../rules/style/TabUsedAsIndentorRuleTest.java  |   99 -
 .../IdenticalSwitchCasesRuleTest.java           |   38 -
 .../rules/switchrules/NestedSwitchRuleTest.java |   40 -
 .../NonBreakableSwitchCaseRuleTest.java         |   38 -
 ...itchStatementsShouldHaveDefaultRuleTest.java |   42 -
 .../TooFewBrancheInSwitchStatementRuleTest.java |   40 -
 .../unused/EmptyPrivateMethodRuleTest.java      |   49 -
 .../pmd/rules/unused/UnusedFieldRuleTest.java   |   44 -
 .../unused/UnusedLocalVariableRuleTest.java     |   84 -
 .../rules/unused/UnusedParameterRuleTest.java   |   53 -
 .../unused/UnusedPrivateMethodRuleTest.java     |   49 -
 FlexPMD/flex-pmd-test-resources/pom.xml         |   56 -
 .../src/main/assembly/resources.xml             |   31 -
 .../src/main/resources/test/AbstractRowData.as  |  136 -
 .../main/resources/test/AbstractRowData.mxml    |   44 -
 .../src/main/resources/test/BadComponent.as     |   43 -
 .../src/main/resources/test/Color.as            |   29 -
 .../src/main/resources/test/DefaultNameEvent.as |   36 -
 .../resources/test/DeleteButtonRenderer.mxml    |  101 -
 .../src/main/resources/test/ErrorToltipSkin.as  |  317 ---
 .../src/main/resources/test/GenericType.as      |   37 -
 .../src/main/resources/test/GoodComponent.as    |   51 -
 .../test/LinkButtonExample_Exception.mxml       |   38 -
 .../src/main/resources/test/Looping.as          |   68 -
 .../src/main/resources/test/Main.mxml           |   45 -
 .../resources/test/MainWithModelLocator.mxml    |   42 -
 .../resources/test/MainWithNoCopyright.mxml     |   22 -
 .../src/main/resources/test/PngEncoder.as       |  617 -----
 .../src/main/resources/test/RadonDataGrid.as    |  200 --
 .../src/main/resources/test/Responder.as        |   36 -
 .../src/main/resources/test/Simple.as           |   19 -
 .../src/main/resources/test/SkinStyles.as       |   65 -
 .../src/main/resources/test/Sorted.as           |   62 -
 .../src/main/resources/test/Title.as            |   33 -
 .../src/main/resources/test/UnboundMetadata.as  |   41 -
 .../src/main/resources/test/WorkEvent.as        |  205 --
 .../main/resources/test/asDocs/EmptyClass.as    |   38 -
 .../resources/test/asDocs/EmptyWithDocClass.as  |   51 -
 .../src/main/resources/test/bug/Duane.mxml      |  154 --
 .../src/main/resources/test/bug/FlexPMD115.as   |   30 -
 .../main/resources/test/bug/FlexPMD141a.mxml    |   32 -
 .../main/resources/test/bug/FlexPMD141b.mxml    |   34 -
 .../src/main/resources/test/bug/FlexPMD157.as   |   33 -
 .../src/main/resources/test/bug/FlexPMD173.as   |   40 -
 .../src/main/resources/test/bug/FlexPMD181.as   | 2344 -----------------
 .../src/main/resources/test/bug/FlexPMD232.as   |   36 -
 .../main/resources/test/bug/FlexPMD233a.mxml    |   91 -
 .../main/resources/test/bug/FlexPMD233b.mxml    |  300 ---
 .../src/main/resources/test/bug/FlexPMD61.as    |   42 -
 .../src/main/resources/test/bug/FlexPMD62.as    |   35 -
 .../src/main/resources/test/bug/FlexPMD88.as    |   41 -
 .../src/main/resources/test/bug/FlexPMD97.as    |   31 -
 .../src/main/resources/test/bug/Nico.as         |   30 -
 .../src/main/resources/test/bug/Security.as     |   36 -
 .../test/cairngorm/BindableModelLocator.as      |   23 -
 .../resources/test/cairngorm/FatController.as   |  183 --
 .../resources/test/cairngorm/LightController.as |  201 --
 .../test/cairngorm/NonBindableModelLocator.as   |   54 -
 .../cairngorm/events/CorrectConstantEvent.as    |   45 -
 .../cairngorm/events/CorrectConstructorEvent.as |   38 -
 .../cairngorm/events/UncorrectConstantEvent.as  |   40 -
 .../events/UncorrectConstructorEvent.as         |   38 -
 .../test/com/adobe/ac/AbstractRowData.as        |  118 -
 .../src/main/resources/test/com/adobe/ac/foo.as |   22 -
 .../resources/test/com/adobe/ac/ncss/ArrayVO.as |   46 -
 .../test/com/adobe/ac/ncss/BigImporterModel.as  |   78 -
 .../test/com/adobe/ac/ncss/BigModel.as          |   90 -
 .../test/com/adobe/ac/ncss/ConfigProxy.as       |   50 -
 .../test/com/adobe/ac/ncss/LongSwitch.as        |  132 -
 .../com/adobe/ac/ncss/MyCairngormCommand.as     |   30 -
 .../test/com/adobe/ac/ncss/NestedSwitch.as      |   59 -
 .../test/com/adobe/ac/ncss/SearchBarEvent.as    |   34 -
 .../test/com/adobe/ac/ncss/VoidConstructor.as   |   37 -
 .../adobe/ac/ncss/event/DynamicCustomEvent.as   |   35 -
 .../com/adobe/ac/ncss/event/FirstCustomEvent.as |   30 -
 .../adobe/ac/ncss/event/SecondCustomEvent.as    |   28 -
 .../com/adobe/ac/ncss/mxml/IterationsList.mxml  |   90 -
 .../com/adobe/ac/ncss/mxml/IterationsList2.mxml |   44 -
 .../com/adobe/ac/ncss/mxml/NestedComponent.mxml |   43 -
 .../adobe/cairngorm/work/SequenceWorkFlow.as    |   19 -
 .../src/main/resources/test/empty/Empty.as      |   18 -
 .../src/main/resources/test/empty/Empty.mxml    |   18 -
 .../src/main/resources/test/filters/MyPopup.as  |   28 -
 .../main/resources/test/filters/MyPopup.mxml    |   32 -
 .../main/resources/test/flexpmd114/a/Test.as    |   39 -
 .../main/resources/test/flexpmd114/b/Test.as    |   35 -
 .../main/resources/test/flexpmd114/c/Test.as    |   35 -
 .../main/resources/test/flexunit/RaoulTest.as   |   69 -
 .../main/resources/test/flexunit/RulesetTest.as |   62 -
 .../main/resources/test/fu/main/flex/Main.mxml  |   22 -
 .../fu/main/flex/TestRunnerApplication.mxml     |   50 -
 .../main/resources/test/fu/test/flex/MySuite.as |   26 -
 .../main/resources/test/fu/test/flex/MyTest.as  |   46 -
 .../test/functional/FunctionalClient.as         |   29 -
 .../functional/func1/api/Func1ExposedClass.as   |   29 -
 .../func1/restricted/Func1RestrictedClass.as    |   29 -
 .../functional/func2/api/Func2ExposedClass.as   |   28 -
 .../func2/restricted/Func2RestrictedClass.as    |   28 -
 .../resources/test/mx/controls/DateChooser2.as  |   25 -
 .../org/as3commons/concurrency/thread/Color.as  |   25 -
 .../test/parsley/InaccessibleMetaData.as        |   53 -
 .../InaccessibleMetaDataInternalClass.as        |   25 -
 .../test/parsley/MessageInterceptorSignature.as |   47 -
 .../test/parsley/MismatchedManagedEvent.as      |   28 -
 .../resources/test/parsley/MisplacedMetaData.as |   65 -
 .../RedundantMessageHandlerTypeAttribute.as     |   35 -
 .../test/parsley/RedundantMethodAttribute.as    |   35 -
 .../test/parsley/UnknownMetaDataAttribute.as    |   32 -
 .../resources/test/pseudo/look/IEditLook.as     |   24 -
 .../main/resources/test/schedule_internal.as    |   22 -
 .../test/src/fw/data/request/ResultListener.as  |   27 -
 .../html-template/index.template.html           |  121 -
 FlexPMD/flex-pmd-violations-viewer/pom.xml      |  191 --
 .../src/main/flex/Main.mxml                     |   87 -
 .../src/main/flex/TestRunner.mxml               |   24 -
 .../com/adobe/ac/pmd/model/CharacterPosition.as |   44 -
 .../main/flex/com/adobe/ac/pmd/model/File.as    |   48 -
 .../flex/com/adobe/ac/pmd/model/Violation.as    |   82 -
 .../com/adobe/ac/pmd/model/ViolationPosition.as |   44 -
 .../com/adobe/ac/pmd/view/FilterResults.mxml    |   67 -
 .../com/adobe/ac/pmd/view/ResultsFormatter.as   |   41 -
 .../flex/com/adobe/ac/pmd/view/ResultsView.mxml |  142 --
 .../adobe/ac/pmd/view/SelectedViolation.mxml    |  151 --
 .../flex/com/adobe/ac/pmd/view/Summary.mxml     |   69 -
 .../flex/com/adobe/ac/pmd/view/UploadView.mxml  |   44 -
 .../adobe/ac/pmd/view/model/ResultsFilter.as    |   50 -
 .../com/adobe/ac/pmd/view/model/ResultsModel.as |  138 -
 .../com/adobe/ac/pmd/view/model/UploadModel.as  |  135 -
 .../adobe/ac/pmd/view/model/ViolationsModel.as  |   84 -
 .../src/test/flex/AllTests.as                   |   30 -
 FlexPMD/flexunit-theme/pom.xml                  |   84 -
 .../src/main/resources/assets/cancelledIcon.png |  Bin 1094 -> 0 bytes
 .../src/main/resources/assets/export.png        |  Bin 1205 -> 0 bytes
 .../main/resources/assets/icon_tool_trash.png   |  Bin 821 -> 0 bytes
 .../main/resources/assets/icon_tool_trash2.png  |  Bin 27190 -> 0 bytes
 .../src/main/resources/assets/todoLogo.png      |  Bin 1106 -> 0 bytes
 .../src/main/resources/assets/todoLogo_big.png  |  Bin 57083 -> 0 bytes
 .../src/main/resources/css/default.css          |  285 ---
 .../skins/ButtonBarButton_disabledSkin.png      |  Bin 1439 -> 0 bytes
 .../skins/ButtonBarButton_downSkin.png          |  Bin 1468 -> 0 bytes
 .../skins/ButtonBarButton_overSkin.png          |  Bin 1471 -> 0 bytes
 .../ButtonBarButton_selectedDisabledSkin.png    |  Bin 1455 -> 0 bytes
 .../skins/ButtonBarButton_selectedUpSkin.png    |  Bin 1469 -> 0 bytes
 .../resources/skins/ButtonBarButton_upSkin.png  |  Bin 1445 -> 0 bytes
 .../skins/ButtonBarFirstButton_disabledSkin.png |  Bin 1496 -> 0 bytes
 .../skins/ButtonBarFirstButton_downSkin.png     |  Bin 1497 -> 0 bytes
 .../skins/ButtonBarFirstButton_overSkin.png     |  Bin 1511 -> 0 bytes
 ...uttonBarFirstButton_selectedDisabledSkin.png |  Bin 1484 -> 0 bytes
 .../ButtonBarFirstButton_selectedUpSkin.png     |  Bin 1498 -> 0 bytes
 .../skins/ButtonBarFirstButton_upSkin.png       |  Bin 1490 -> 0 bytes
 .../skins/ButtonBarLastButton_disabledSkin.png  |  Bin 1489 -> 0 bytes
 .../skins/ButtonBarLastButton_downSkin.png      |  Bin 1520 -> 0 bytes
 .../skins/ButtonBarLastButton_overSkin.png      |  Bin 1499 -> 0 bytes
 ...ButtonBarLastButton_selectedDisabledSkin.png |  Bin 1489 -> 0 bytes
 .../ButtonBarLastButton_selectedUpSkin.png      |  Bin 1506 -> 0 bytes
 .../skins/ButtonBarLastButton_upSkin.png        |  Bin 1501 -> 0 bytes
 .../resources/skins/Button_disabledSkin.png     |  Bin 1509 -> 0 bytes
 .../main/resources/skins/Button_downSkin.png    |  Bin 1530 -> 0 bytes
 .../main/resources/skins/Button_overSkin.png    |  Bin 1535 -> 0 bytes
 .../src/main/resources/skins/Button_upSkin.png  |  Bin 1528 -> 0 bytes
 .../skins/CursorManager_busyCursor.png          |  Bin 2001 -> 0 bytes
 .../resources/skins/DataGrid_borderSkin.png     |  Bin 1497 -> 0 bytes
 .../skins/DataGrid_columnDropIndicatorSkin.png  |  Bin 1287 -> 0 bytes
 .../skins/DataGrid_columnResizeSkin.png         |  Bin 1248 -> 0 bytes
 .../skins/DataGrid_headerBackgroundSkin.png     |  Bin 1323 -> 0 bytes
 .../skins/DataGrid_headerSeparatorSkin.png      |  Bin 1240 -> 0 bytes
 .../resources/skins/DataGrid_sortArrowSkin.png  |  Bin 1336 -> 0 bytes
 .../resources/skins/DataGrid_stretchCursor.png  |  Bin 1461 -> 0 bytes
 .../resources/skins/FormItem_indicatorSkin.png  |  Bin 1327 -> 0 bytes
 .../skins/HScrollArrowLeft_disabledSkin.png     |  Bin 1277 -> 0 bytes
 .../skins/HScrollArrowRight_disabledSkin.png    |  Bin 1796 -> 0 bytes
 .../skins/HScrollBar_leftArrowDownSkin.png      |  Bin 1325 -> 0 bytes
 .../skins/HScrollBar_leftArrowOverSkin.png      |  Bin 1335 -> 0 bytes
 .../skins/HScrollBar_leftArrowUpSkin.png        |  Bin 1335 -> 0 bytes
 .../skins/HScrollBar_rightArrowDownSkin.png     |  Bin 1324 -> 0 bytes
 .../skins/HScrollBar_rightArrowOverSkin.png     |  Bin 1336 -> 0 bytes
 .../skins/HScrollBar_rightArrowUpSkin.png       |  Bin 1336 -> 0 bytes
 .../skins/HScrollBar_thumbDownSkin.png          |  Bin 1453 -> 0 bytes
 .../resources/skins/HScrollBar_thumbIcon.png    |  Bin 1252 -> 0 bytes
 .../skins/HScrollBar_thumbOverSkin.png          |  Bin 1552 -> 0 bytes
 .../resources/skins/HScrollBar_thumbUpSkin.png  |  Bin 1484 -> 0 bytes
 .../skins/HScrollBar_trackDisabledSkin.png      |  Bin 1394 -> 0 bytes
 .../resources/skins/HScrollBar_trackSkin.png    |  Bin 1393 -> 0 bytes
 .../main/resources/skins/Panel_borderSkin.png   |  Bin 2906 -> 0 bytes
 .../skins/VScrollBar_downArrowDisabledSkin.png  |  Bin 1347 -> 0 bytes
 .../skins/VScrollBar_downArrowDownSkin.png      |  Bin 1325 -> 0 bytes
 .../skins/VScrollBar_downArrowOverSkin.png      |  Bin 1335 -> 0 bytes
 .../skins/VScrollBar_downArrowUpSkin.png        |  Bin 1335 -> 0 bytes
 .../skins/VScrollBar_thumbDownSkin.png          |  Bin 1453 -> 0 bytes
 .../resources/skins/VScrollBar_thumbIcon.png    |  Bin 1252 -> 0 bytes
 .../skins/VScrollBar_thumbOverSkin.png          |  Bin 1434 -> 0 bytes
 .../resources/skins/VScrollBar_thumbUpSkin.png  |  Bin 1434 -> 0 bytes
 .../skins/VScrollBar_trackDisabledSkin.png      |  Bin 1394 -> 0 bytes
 .../resources/skins/VScrollBar_trackSkin.png    |  Bin 1393 -> 0 bytes
 .../skins/VScrollBar_upArrowDisabledSkin.png    |  Bin 1281 -> 0 bytes
 .../skins/VScrollBar_upArrowDownSkin.png        |  Bin 1324 -> 0 bytes
 .../skins/VScrollBar_upArrowOverSkin.png        |  Bin 1336 -> 0 bytes
 .../skins/VScrollBar_upArrowUpSkin.png          |  Bin 1336 -> 0 bytes
 FlexPMD/java-formatter.xml                      |  772 ++++++
 FlexPMD/pmd.xml                                 |  249 ++
 FlexPMD/pom.xml                                 |  501 ++++
 FlexPMD/projectSet.psf                          |   49 +
 FlexPMD/src/etc/header.txt                      |   14 +
 1679 files changed, 77582 insertions(+), 76469 deletions(-)
----------------------------------------------------------------------



[11/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/IncorrectClassCase.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/IncorrectClassCase.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/IncorrectClassCase.java
new file mode 100644
index 0000000..560ca56
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/IncorrectClassCase.java
@@ -0,0 +1,56 @@
+/*
+ * 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.naming;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class IncorrectClassCase extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNode )
+   {
+      final char firstChar = classNode.getName().charAt( 0 );
+
+      if ( firstChar < 'A'
+            || firstChar > 'Z' )
+      {
+         addViolation( new ViolationPosition( 1, getCurrentFile().getLinesNb() ) );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/IncorrectEventHandlerNameRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/IncorrectEventHandlerNameRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/IncorrectEventHandlerNameRule.java
new file mode 100644
index 0000000..81b3506
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/IncorrectEventHandlerNameRule.java
@@ -0,0 +1,79 @@
+/*
+ * 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.naming;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import net.sourceforge.pmd.PropertyDescriptor;
+import net.sourceforge.pmd.properties.StringProperty;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+public class IncorrectEventHandlerNameRule extends AbstractAstFlexRule
+{
+   private static final String DEFAULT_PREFIX = "on";
+   private static final String DEFAULT_SUFFIX = "";
+   private static final String PREFIX_NAME    = "prefix";
+   private static final String SUFFIX_NAME    = "suffix";
+   private final String        prefix;
+   private final String        suffix;
+
+   public IncorrectEventHandlerNameRule()
+   {
+      super();
+      prefix = getStringProperty( propertyDescriptorFor( PREFIX_NAME ) );
+      suffix = getStringProperty( propertyDescriptorFor( SUFFIX_NAME ) );
+   }
+
+   @Override
+   protected void findViolations( final IFunction function )
+   {
+      if ( function.isEventHandler()
+            && !( function.getName().startsWith( prefix ) && function.getName().endsWith( suffix ) ) )
+      {
+         final IParserNode name = getNameFromFunctionDeclaration( function.getInternalNode() );
+
+         addViolation( name,
+                       name.getStringValue(),
+                       prefix,
+                       suffix );
+      }
+   }
+
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   @Override
+   protected final Map< String, PropertyDescriptor > propertiesByName()
+   {
+      final Map< String, PropertyDescriptor > properties = new LinkedHashMap< String, PropertyDescriptor >();
+
+      properties.put( PREFIX_NAME,
+                      new StringProperty( PREFIX_NAME, "", DEFAULT_PREFIX, properties.size() ) );
+      properties.put( SUFFIX_NAME,
+                      new StringProperty( SUFFIX_NAME, "", DEFAULT_SUFFIX, properties.size() ) );
+
+      return properties;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/InterfaceNamingRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/InterfaceNamingRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/InterfaceNamingRule.java
new file mode 100644
index 0000000..77dcb4d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/InterfaceNamingRule.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.naming;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.parser.NodeKind;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+public class InterfaceNamingRule extends AbstractAstFlexRule
+{
+   @Override
+   protected void findViolations( final IClass classNode )
+   {
+      if ( classNode.getInternalNode().is( NodeKind.INTERFACE )
+            && !classNode.getName().startsWith( "I" ) )
+      {
+         addViolation( classNode );
+      }
+   }
+
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/PackageCaseRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/PackageCaseRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/PackageCaseRule.java
new file mode 100644
index 0000000..005a621
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/PackageCaseRule.java
@@ -0,0 +1,76 @@
+/*
+ * 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.naming;
+
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.nodes.IPackage;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class PackageCaseRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IPackage)
+    */
+   @Override
+   protected final void findViolations( final IPackage packageNode )
+   {
+      if ( containsUpperCharacter( packageNode.getName() ) )
+      {
+         final IFlexViolation violation = addViolation( packageNode,
+                                                        packageNode.getName() );
+
+         violation.setEndColumn( packageNode.getName().length()
+               + violation.getBeginColumn() );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   private boolean containsUpperCharacter( final String packageName )
+   {
+      boolean found = false;
+
+      for ( int i = 1; i < packageName.length(); i++ )
+      {
+         final char currentChar = packageName.charAt( i );
+
+         if ( currentChar >= 'A'
+               && currentChar <= 'Z' && packageName.charAt( i - 1 ) == '.' )
+         {
+            found = true;
+
+            break;
+         }
+      }
+      return found;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/PropertyHiddenByLocalVariableRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/PropertyHiddenByLocalVariableRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/PropertyHiddenByLocalVariableRule.java
new file mode 100644
index 0000000..6c0dcaa
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/PropertyHiddenByLocalVariableRule.java
@@ -0,0 +1,75 @@
+/*
+ * 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.naming;
+
+import java.util.List;
+import java.util.Set;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.IVariable;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class PropertyHiddenByLocalVariableRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNode )
+   {
+      final List< IAttribute > variables = classNode.getAttributes();
+
+      if ( classNode.getFunctions() != null )
+      {
+         for ( final IFunction function : classNode.getFunctions() )
+         {
+            final Set< String > localVariables = function.getLocalVariables().keySet();
+
+            for ( final String localVariable : localVariables )
+            {
+               for ( final IVariable field : variables )
+               {
+                  if ( localVariable.equals( field.getName() ) )
+                  {
+                     addViolation( function.getLocalVariables().get( localVariable ),
+                                   field.getName() );
+                  }
+               }
+            }
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/TooLongFunctionNameRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/TooLongFunctionNameRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/TooLongFunctionNameRule.java
new file mode 100644
index 0000000..b7d319f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/TooLongFunctionNameRule.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.naming;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.AbstractMaximizedAstFlexRule;
+
+public class TooLongFunctionNameRule extends AbstractMaximizedAstFlexRule
+{
+   private static final int DEFAULT_THRESHOLD = 25;
+   private int              currentMethodNameLength;
+
+   @Override
+   public int getActualValueForTheCurrentViolation()
+   {
+      return currentMethodNameLength;
+   }
+
+   @Override
+   public int getDefaultThreshold()
+   {
+      return DEFAULT_THRESHOLD;
+   }
+
+   @Override
+   protected void findViolations( final IFunction function )
+   {
+      currentMethodNameLength = function.getName().length();
+      if ( currentMethodNameLength > getThreshold() )
+      {
+         addViolation( function );
+      }
+   }
+
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/TooShortVariableRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/TooShortVariableRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/TooShortVariableRule.java
new file mode 100644
index 0000000..6536e90
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/TooShortVariableRule.java
@@ -0,0 +1,151 @@
+/*
+ * 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.naming;
+
+import java.util.Map;
+import java.util.regex.Matcher;
+
+import net.sourceforge.pmd.PropertyDescriptor;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule;
+
+/**
+ * @author xagnetti
+ */
+public class TooShortVariableRule extends AbstractRegexpBasedRule implements IThresholdedRule
+{
+   public static final int DEFAULT_THRESHOLD = 3;
+   private int             length;
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#
+    * getActualValueForTheCurrentViolation()
+    */
+   public final int getActualValueForTheCurrentViolation()
+   {
+      return length;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getDefaultThreshold
+    * ()
+    */
+   public final int getDefaultThreshold()
+   {
+      return DEFAULT_THRESHOLD;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getThreshold()
+    */
+   public final int getThreshold()
+   {
+      return getIntProperty( propertyDescriptorFor( getThresholdName() ) );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule#getThresholdName
+    * ()
+    */
+   public final String getThresholdName()
+   {
+      return MINIMUM;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   public final boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.LOW;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected final String getRegexp()
+   {
+      return ".*var (.*):.*";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#isCurrentLineConcerned
+    * (java.lang.String)
+    */
+   @Override
+   protected boolean isCurrentLineConcerned( final String line )
+   {
+      return line.contains( "var" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected final boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      final Matcher matcher = getMatcher( line );
+      boolean result = false;
+
+      if ( !line.contains( "for" )
+            && matcher.matches() )
+      {
+         length = matcher.group( 1 ).trim().length();
+
+         result = length < getThreshold();
+      }
+      return result;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.CommonAbstractRule#propertiesByName()
+    */
+   @Override
+   protected final Map< String, PropertyDescriptor > propertiesByName()
+   {
+      return getThresholdedRuleProperties( this );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/VariableNameEndingWithNumericRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/VariableNameEndingWithNumericRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/VariableNameEndingWithNumericRule.java
new file mode 100644
index 0000000..4328498
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/VariableNameEndingWithNumericRule.java
@@ -0,0 +1,111 @@
+/*
+ * 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.naming;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.INamableNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class VariableNameEndingWithNumericRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNode )
+   {
+      super.findViolations( classNode );
+
+      findViolationsInNamableList( classNode.getAttributes() );
+      findViolationsInNamableList( classNode.getConstants() );
+      findViolationsInNamableList( classNode.getFunctions() );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected final void findViolations( final IFunction function )
+   {
+      findViolationsInNamableList( function.getParameters() );
+
+      for ( final String variableName : function.getLocalVariables().keySet() )
+      {
+         if ( isNameEndsWithNumeric( variableName ) )
+         {
+            addViolation( function.getLocalVariables().get( variableName ),
+                          variableName );
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   private void findViolationsInNamableList( final List< ? extends INamableNode > namables )
+   {
+      for ( final INamableNode namable : namables )
+      {
+         if ( isNameEndsWithNumeric( namable.getName() ) )
+         {
+            if ( namable instanceof IFunction )
+            {
+               final IFunction function = ( IFunction ) namable;
+
+               addViolation( function,
+                             function.getName() );
+            }
+            else
+            {
+               addViolation( namable,
+                             namable.getName() );
+            }
+         }
+      }
+   }
+
+   private boolean isNameEndsWithNumeric( final String name )
+   {
+      if ( name.length() == 0 )
+      {
+         return false;
+      }
+      final char lastCharacter = name.charAt( name.length() - 1 );
+
+      return Character.isDigit( lastCharacter );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/WronglyNamedVariableRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/WronglyNamedVariableRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/WronglyNamedVariableRule.java
new file mode 100644
index 0000000..d27a8ac
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/naming/WronglyNamedVariableRule.java
@@ -0,0 +1,121 @@
+/*
+ * 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.naming;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map.Entry;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IConstant;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.IVariable;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class WronglyNamedVariableRule extends AbstractAstFlexRule
+{
+   private static final String[] FORBIDDEN_NAMES =
+                                                 { "tmp",
+               "temp",
+               "foo",
+               "bar",
+               "object",
+               "evt"                            };
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(java.util
+    * .List)
+    */
+   @Override
+   protected final void findViolations( final List< IFunction > functions )
+   {
+      for ( final IFunction function : functions )
+      {
+         findViolationsInVariables( function.getParameters() );
+
+         for ( final Entry< String, IParserNode > variableNameEntrySet : function.getLocalVariables()
+                                                                                 .entrySet() )
+         {
+            checkWronglyNamedVariable( variableNameEntrySet.getKey(),
+                                       variableNameEntrySet.getValue() );
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromAttributes
+    * (java.util.List)
+    */
+   @Override
+   protected final void findViolationsFromAttributes( final List< IAttribute > attributes )
+   {
+      findViolationsInVariables( attributes );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromConstants
+    * (java.util.List)
+    */
+   @Override
+   protected final void findViolationsFromConstants( final List< IConstant > constants )
+   {
+      findViolationsInVariables( constants );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   private void checkWronglyNamedVariable( final String variableName,
+                                           final IParserNode variableNode )
+   {
+      for ( final String forbiddenName : FORBIDDEN_NAMES )
+      {
+         if ( variableName.startsWith( forbiddenName ) )
+         {
+            addViolation( variableNode,
+                          variableName );
+         }
+      }
+   }
+
+   private void findViolationsInVariables( final Collection< ? extends IVariable > variables )
+   {
+      for ( final IVariable variable : variables )
+      {
+         checkWronglyNamedVariable( variable.getName(),
+                                    variable.getInternalNode() );
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parameterized/ParameterizedRegExpBasedRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parameterized/ParameterizedRegExpBasedRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parameterized/ParameterizedRegExpBasedRule.java
new file mode 100644
index 0000000..36a9f3d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parameterized/ParameterizedRegExpBasedRule.java
@@ -0,0 +1,91 @@
+/*
+ * 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.parameterized;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import net.sourceforge.pmd.PropertyDescriptor;
+import net.sourceforge.pmd.properties.StringProperty;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class ParameterizedRegExpBasedRule extends AbstractRegexpBasedRule
+{
+   public static final String PROPERTY_NAME = "expression";
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#getRegexp()
+    */
+   @Override
+   protected String getRegexp()
+   {
+      return getStringProperty( propertyDescriptorFor( PROPERTY_NAME ) );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   protected boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule#
+    * isViolationDetectedOnThisMatchingLine(java.lang.String)
+    */
+   @Override
+   protected boolean isViolationDetectedOnThisMatchingLine( final String line )
+   {
+      return true;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see net.sourceforge.pmd.CommonAbstractRule#propertiesByName()
+    */
+   @Override
+   protected final Map< String, PropertyDescriptor > propertiesByName()
+   {
+      final Map< String, PropertyDescriptor > properties = new LinkedHashMap< String, PropertyDescriptor >();
+
+      properties.put( PROPERTY_NAME,
+                      new StringProperty( PROPERTY_NAME, "", "", properties.size() ) );
+
+      return properties;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/InaccessibleMetaDataRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/InaccessibleMetaDataRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/InaccessibleMetaDataRule.java
new file mode 100644
index 0000000..7963356
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/InaccessibleMetaDataRule.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.parsley;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.IMetaData;
+import com.adobe.ac.pmd.nodes.IMetaDataListHolder;
+import com.adobe.ac.pmd.nodes.IVisible;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.parsley.utils.ParsleyMetaData;
+
+/**
+ * @author xagnetti
+ */
+public final class InaccessibleMetaDataRule extends AbstractFlexMetaDataRule
+{
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule#
+    * findViolationsFromAttributeMetaData(com.adobe.ac.pmd.nodes.IAttribute)
+    */
+   @Override
+   protected void findViolationsFromAttributeMetaData( final IAttribute attribute )
+   {
+      findInaccessibleNodes( attribute,
+                             attribute );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule#
+    * findViolationsFromClassMetaData(com.adobe.ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected void findViolationsFromClassMetaData( final IClass classNode )
+   {
+      findInaccessibleNodes( classNode,
+                             classNode );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule#
+    * findViolationsFromFunctionMetaData(com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void findViolationsFromFunctionMetaData( final IFunction function )
+   {
+      findInaccessibleNodes( function,
+                             function );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   private void findInaccessibleNodes( final IMetaDataListHolder holder,
+                                       final IVisible visibility )
+   {
+      final List< IMetaData > allMetaData = holder.getMetaData( MetaData.OTHER );
+
+      if ( allMetaData != null )
+      {
+         for ( final IMetaData metaData : allMetaData )
+         {
+            if ( ParsleyMetaData.isParsleyMetaData( metaData.getName() )
+                  && !visibility.isPublic() )
+            {
+               addViolation( metaData );
+            }
+         }
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/MessageInterceptorSignatureRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/MessageInterceptorSignatureRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/MessageInterceptorSignatureRule.java
new file mode 100644
index 0000000..ecf89cf
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/MessageInterceptorSignatureRule.java
@@ -0,0 +1,91 @@
+/*
+ * 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.parsley;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.IMetaData;
+import com.adobe.ac.pmd.nodes.IParameter;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.parsley.utils.ParsleyMetaData;
+
+/**
+ * @author xagnetti
+ */
+public final class MessageInterceptorSignatureRule extends AbstractFlexMetaDataRule
+{
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule#
+    * findViolationsFromFunctionMetaData(com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void findViolationsFromFunctionMetaData( final IFunction function )
+   {
+      final List< IMetaData > interceptors = ParsleyMetaData.MESSAGE_INTERCEPTOR.getMetaDataList( function );
+      final IParserNode name = getNameFromFunctionDeclaration( function.getInternalNode() );
+
+      if ( !interceptors.isEmpty() )
+      {
+
+         if ( !function.isPublic() )
+         {
+            addViolation( name,
+                          name,
+                          name.getStringValue(),
+                          "It is not public" );
+         }
+         if ( function.getParameters().size() == 1 )
+         {
+            if ( !hasMessageProcessorParameter( function ) )
+            {
+               addViolation( name,
+                             name,
+                             name.getStringValue(),
+                             "The argument type should be MessageProcessor" );
+            }
+         }
+         else
+         {
+            addViolation( name,
+                          name,
+                          name.getStringValue(),
+                          "Its argument number is not 1" );
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   private boolean hasMessageProcessorParameter( final IFunction function )
+   {
+      final IParameter param = function.getParameters().get( 0 );
+      final String type = param.getType().toString();
+      return "MessageProcessor".equals( type );
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/MismatchedManagedEventRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/MismatchedManagedEventRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/MismatchedManagedEventRule.java
new file mode 100644
index 0000000..288595b
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/MismatchedManagedEventRule.java
@@ -0,0 +1,86 @@
+/*
+ * 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.parsley;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IMetaData;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.parsley.utils.ParsleyMetaData;
+
+/**
+ * @author xagnetti
+ */
+public final class MismatchedManagedEventRule extends AbstractFlexMetaDataRule
+{
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule#
+    * findViolationsFromClassMetaData(com.adobe.ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected void findViolationsFromClassMetaData( final IClass classNode )
+   {
+      final List< IMetaData > managedEvents = ParsleyMetaData.MANAGED_EVENTS.getMetaDataList( classNode );
+
+      final List< String > eventTypes = getEventTypes( classNode );
+
+      for ( final IMetaData data : managedEvents )
+      {
+         final List< String > types = data.getPropertyAsList( "names" );
+
+         for ( final String type : types )
+         {
+            if ( !eventTypes.contains( type ) )
+            {
+               addViolation( data,
+                             type );
+            }
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   private List< String > getEventTypes( final IClass classNode )
+   {
+      final ArrayList< String > types = new ArrayList< String >();
+
+      for ( final IMetaData data : classNode.getMetaData( MetaData.EVENT ) )
+      {
+         final String[] name = data.getProperty( "name" );
+         final String eventName = name.length == 0 ? data.getDefaultValue()
+                                                  : name[ 0 ];
+
+         types.add( eventName );
+      }
+
+      return types;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/MisplacedMetaDataRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/MisplacedMetaDataRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/MisplacedMetaDataRule.java
new file mode 100644
index 0000000..7730de0
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/MisplacedMetaDataRule.java
@@ -0,0 +1,120 @@
+/*
+ * 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.parsley;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.IMetaData;
+import com.adobe.ac.pmd.nodes.IMetaDataListHolder;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.parsley.utils.MetaDataTag;
+import com.adobe.ac.pmd.rules.parsley.utils.ParsleyMetaData;
+import com.adobe.ac.pmd.rules.parsley.utils.MetaDataTag.Location;
+
+/**
+ * @author xagnetti
+ */
+public final class MisplacedMetaDataRule extends AbstractFlexMetaDataRule
+{
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule#
+    * findViolationsFromAttributeMetaData(com.adobe.ac.pmd.nodes.IAttribute)
+    */
+   @Override
+   protected void findViolationsFromAttributeMetaData( final IAttribute attribute )
+   {
+      findDisallowedMetaData( attribute,
+                              MetaDataTag.Location.ATTRIBUTE );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule#
+    * findViolationsFromClassMetaData(com.adobe.ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected void findViolationsFromClassMetaData( final IClass classNode )
+   {
+      findDisallowedMetaData( classNode,
+                              MetaDataTag.Location.CLASS_DECLARATION );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule#
+    * findViolationsFromFunctionMetaData(com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void findViolationsFromFunctionMetaData( final IFunction function )
+   {
+      findDisallowedMetaData( function,
+                              MetaDataTag.Location.FUNCTION );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   private void findDisallowedMetaData( final IMetaDataListHolder holder,
+                                        final Location location )
+   {
+      final List< String > tags = getDisallowedTags( location );
+      final List< IMetaData > otherMetadata = holder.getMetaData( MetaData.OTHER );
+
+      if ( otherMetadata == null )
+      {
+         return;
+      }
+
+      for ( final IMetaData metaData : otherMetadata )
+      {
+         if ( tags.contains( metaData.getName() ) )
+         {
+            addViolation( metaData,
+                          metaData.getName() );
+         }
+      }
+   }
+
+   private List< String > getDisallowedTags( final Location location )
+   {
+      final List< String > tags = new ArrayList< String >();
+
+      for ( final MetaDataTag tag : ParsleyMetaData.ALL_TAGS )
+      {
+         if ( !tag.getPlacedOn().contains( location ) )
+         {
+            tags.add( tag.getName() );
+         }
+      }
+
+      return tags;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/RedundantMessageHandlerTypeAttributeRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/RedundantMessageHandlerTypeAttributeRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/RedundantMessageHandlerTypeAttributeRule.java
new file mode 100644
index 0000000..f40c6ce
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/RedundantMessageHandlerTypeAttributeRule.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.parsley;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.IIdentifierNode;
+import com.adobe.ac.pmd.nodes.IMetaData;
+import com.adobe.ac.pmd.nodes.IParameter;
+import com.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.parsley.utils.ParsleyMetaData;
+
+/**
+ * @author xagnetti
+ */
+public final class RedundantMessageHandlerTypeAttributeRule extends AbstractFlexMetaDataRule
+{
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule#
+    * findViolationsFromFunctionMetaData(com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void findViolationsFromFunctionMetaData( final IFunction function )
+   {
+      final List< IParameter > params = function.getParameters();
+
+      if ( params.size() == 1 )
+      {
+         final IIdentifierNode parameterType = params.get( 0 ).getType();
+         findMessageHandlersContainingType( function,
+                                            parameterType );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   private void findMessageHandlersContainingType( final IFunction function,
+                                                   final IIdentifierNode type )
+   {
+      final List< IMetaData > handlers = ParsleyMetaData.MESSAGE_HANDLER.getMetaDataList( function );
+
+      for ( final IMetaData handler : handlers )
+      {
+         final String parameterType = type.toString();
+         final String metaDataType = getMessageHandlerType( handler );
+
+         if ( metaDataType != null
+               && metaDataType.equals( parameterType ) )
+         {
+            addViolation( handler );
+         }
+      }
+   }
+
+   private String getMessageHandlerType( final IMetaData handler )
+   {
+      final String[] types = handler.getProperty( "type" );
+      String type = "";
+
+      if ( types.length > 0
+            && types[ 0 ].contains( "." ) )
+      {
+         type = types[ 0 ];
+         final int index = type.lastIndexOf( '.' ) + 1;
+
+         if ( index < type.length() )
+         {
+            type = type.substring( index );
+         }
+      }
+
+      return type;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/RedundantMethodAttributeRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/RedundantMethodAttributeRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/RedundantMethodAttributeRule.java
new file mode 100644
index 0000000..d8c2c32
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/RedundantMethodAttributeRule.java
@@ -0,0 +1,80 @@
+/*
+ * 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.parsley;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.IMetaData;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.parsley.utils.MetaDataTag;
+import com.adobe.ac.pmd.rules.parsley.utils.ParsleyMetaData;
+
+/**
+ * @author xagnetti
+ */
+public final class RedundantMethodAttributeRule extends AbstractFlexMetaDataRule
+{
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule#
+    * findViolationsFromFunctionMetaData(com.adobe.ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected void findViolationsFromFunctionMetaData( final IFunction function )
+   {
+      final List< IMetaData > metaData = function.getMetaData( MetaData.OTHER );
+      final List< String > parsleyTags = getTagsForFunctions();
+
+      for ( final IMetaData md : metaData )
+      {
+         if ( parsleyTags.contains( md.getName() )
+               && md.getAttributeNames().contains( "method" ) )
+         {
+            addViolation( md );
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   private List< String > getTagsForFunctions()
+   {
+      final List< String > tags = new ArrayList< String >();
+
+      for ( final MetaDataTag tag : ParsleyMetaData.ALL_TAGS )
+      {
+         if ( tag.getPlacedOn().contains( MetaDataTag.Location.FUNCTION ) )
+         {
+            tags.add( tag.getName() );
+         }
+      }
+
+      return tags;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/UnknownMetaDataAttributeRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/UnknownMetaDataAttributeRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/UnknownMetaDataAttributeRule.java
new file mode 100644
index 0000000..517bf59
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/UnknownMetaDataAttributeRule.java
@@ -0,0 +1,79 @@
+/*
+ * 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.parsley;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IMetaData;
+import com.adobe.ac.pmd.nodes.IMetaDataListHolder;
+import com.adobe.ac.pmd.nodes.MetaData;
+import com.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+import com.adobe.ac.pmd.rules.parsley.utils.MetaDataTag;
+import com.adobe.ac.pmd.rules.parsley.utils.ParsleyMetaData;
+
+/**
+ * @author xagnetti
+ */
+public final class UnknownMetaDataAttributeRule extends AbstractFlexMetaDataRule
+{
+   /*
+    * (non-Javadoc)
+    * @seecom.adobe.ac.pmd.rules.core.AbstractFlexMetaDataRule#
+    * findViolationsFromMetaDataList(com.adobe.ac.pmd.nodes.IMetaDataListHolder)
+    */
+   @Override
+   protected void findViolationsFromMetaDataList( final IMetaDataListHolder holder )
+   {
+      final List< IMetaData > items = holder.getMetaData( MetaData.OTHER );
+
+      if ( items == null )
+      {
+         return;
+      }
+
+      for ( final IMetaData metaData : items )
+      {
+         final MetaDataTag tag = ParsleyMetaData.getTag( metaData.getName() );
+
+         if ( tag != null )
+         {
+            final List< String > known = tag.getAttributes();
+            final List< String > actual = metaData.getAttributeNames();
+
+            for ( final String actualAttribute : actual )
+            {
+               if ( !known.contains( actualAttribute ) )
+               {
+                  addViolation( metaData,
+                                actualAttribute );
+               }
+            }
+         }
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.HIGH;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/utils/MetaDataTag.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/utils/MetaDataTag.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/utils/MetaDataTag.java
new file mode 100644
index 0000000..4e61e6e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/utils/MetaDataTag.java
@@ -0,0 +1,102 @@
+/*
+ * 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.parsley.utils;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IMetaData;
+import com.adobe.ac.pmd.nodes.IMetaDataListHolder;
+import com.adobe.ac.pmd.nodes.MetaData;
+
+/**
+ * @author xagnetti
+ */
+public final class MetaDataTag
+{
+   /**
+    * @author xagnetti
+    */
+   public enum Location
+   {
+      ATTRIBUTE, CLASS_DECLARATION, FUNCTION
+   };
+
+   private final String[]   attributes;
+
+   private final String     name;
+
+   private final Location[] placedOn;
+
+   /**
+    * @param nameToBeSet
+    * @param attributesToBeSet
+    * @param placedOnToBeSet
+    */
+   public MetaDataTag( final String nameToBeSet,
+                       final String[] attributesToBeSet,
+                       final Location[] placedOnToBeSet )
+   {
+      name = nameToBeSet;
+      attributes = attributesToBeSet;
+      placedOn = placedOnToBeSet;
+   }
+
+   /**
+    * @return
+    */
+   public List< String > getAttributes()
+   {
+      return Arrays.asList( attributes );
+   }
+
+   /**
+    * @param holder
+    * @return
+    */
+   public List< IMetaData > getMetaDataList( final IMetaDataListHolder holder )
+   {
+      final List< IMetaData > list = new ArrayList< IMetaData >();
+
+      for ( final IMetaData metaData : holder.getMetaData( MetaData.OTHER ) )
+      {
+         if ( metaData.getName().equals( name ) )
+         {
+            list.add( metaData );
+         }
+      }
+
+      return list;
+   }
+
+   /**
+    * @return
+    */
+   public String getName()
+   {
+      return name;
+   }
+
+   /**
+    * @return
+    */
+   public List< Location > getPlacedOn()
+   {
+      return Arrays.asList( placedOn );
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/utils/ParsleyMetaData.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/utils/ParsleyMetaData.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/utils/ParsleyMetaData.java
new file mode 100644
index 0000000..0a3109f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/parsley/utils/ParsleyMetaData.java
@@ -0,0 +1,276 @@
+/*
+ * 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.parsley.utils;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import com.adobe.ac.pmd.rules.parsley.utils.MetaDataTag.Location;
+
+public final class ParsleyMetaData
+{
+   private ParsleyMetaData()
+   {
+      super();
+   }
+ 
+   private static final String                     KEY                  = "key";
+
+   private static final String                     BUNDLE               = "bundle";
+
+   private static final String                     ORDER                = "order";
+
+   private static final String                     SINGLETON            = "singleton";
+
+   private static final String                     LAZY                 = "lazy";
+
+   private static final String                     MESSAGE_PROPERTIES   = "messageProperties";
+
+   private static final String                     PROPERTY             = "property";
+
+   private static final String                     TARGET_PROPERTY      = "targetProperty";
+
+   private static final String                     SCOPE                = "scope";
+
+   private static final String                     REQUIRED             = "required";
+
+   private static final String                     ERROR_EVENT          = "errorEvent";
+
+   private static final String                     COMPLETE_EVENT       = "completeEvent";
+
+   private static final String                     SELECTOR2            = "selector";
+
+   private static final String                     MESSAGE_PROPERTY     = "messageProperty";
+
+   private static final String                     TYPE                 = "type";
+
+   private static final String                     NAMES                = "names";
+
+   private static final String                     ID_PROPERTY          = "id";
+
+   private static final String                     METHOD               = "method";
+
+   private static final MetaDataTag.Location[]     CLASS_LOCATION       = new MetaDataTag.Location[]
+                                                                        { MetaDataTag.Location.CLASS_DECLARATION };
+
+   private static final MetaDataTag.Location[]     FUNCTION_LOCATION    = new MetaDataTag.Location[]
+                                                                        { MetaDataTag.Location.FUNCTION };
+
+   private static final MetaDataTag.Location[]     ATTR_FCTION_LOCATION = new MetaDataTag.Location[]
+                                                                        { MetaDataTag.Location.ATTRIBUTE,
+               MetaDataTag.Location.FUNCTION                           };
+
+   private static final MetaDataTag.Location[]     ATTRIBUTE_LOCATION   = new MetaDataTag.Location[]
+                                                                        { MetaDataTag.Location.ATTRIBUTE };
+
+   public static final MetaDataTag                 ASYNC_INIT           = new MetaDataTag( "AsyncInit",
+                                                                                           new String[]
+                                                                                           { COMPLETE_EVENT,
+               ERROR_EVENT                                                                },
+                                                                                           CLASS_LOCATION );
+
+   public static final MetaDataTag                 COMMAND_COMPLETE     = new MetaDataTag( "CommandComplete",
+                                                                                           new String[]
+                                                                                           {},
+                                                                                           FUNCTION_LOCATION );
+
+   public static final MetaDataTag                 DESTROY              = new MetaDataTag( "Destroy",
+                                                                                           new String[]
+                                                                                           { METHOD },
+                                                                                           FUNCTION_LOCATION );
+
+   public static final MetaDataTag                 FACTORY              = new MetaDataTag( "Factory",
+                                                                                           new String[]
+                                                                                           { METHOD },
+                                                                                           FUNCTION_LOCATION );
+
+   public static final MetaDataTag                 INIT                 = new MetaDataTag( "Init",
+                                                                                           new String[]
+                                                                                           { METHOD },
+                                                                                           FUNCTION_LOCATION );
+
+   public static final MetaDataTag                 INJECT               = new MetaDataTag( "Inject",
+                                                                                           new String[]
+                                                                                           { ID_PROPERTY,
+               REQUIRED                                                                   },
+                                                                                           ATTR_FCTION_LOCATION );
+
+   public static final MetaDataTag                 INJECT_CONSTRUCTOR   = new MetaDataTag( "InjectConstructor",
+                                                                                           new String[]
+                                                                                           {},
+                                                                                           CLASS_LOCATION );
+
+   public static final MetaDataTag                 INTERNAL             = new MetaDataTag( "Internal",
+                                                                                           new String[]
+                                                                                           {},
+                                                                                           ATTRIBUTE_LOCATION );
+
+   public static final MetaDataTag                 MANAGED_EVENTS       = new MetaDataTag( "ManagedEvents",
+                                                                                           new String[]
+                                                                                           { NAMES,
+               SCOPE                                                                      },
+                                                                                           CLASS_LOCATION );
+
+   public static final MetaDataTag                 MESSAGE_BINDING      = new MetaDataTag( "MessageBinding",
+                                                                                           new String[]
+                                                                                           { TYPE,
+               MESSAGE_PROPERTY,
+               SELECTOR2,
+               SCOPE,
+               TARGET_PROPERTY                                                            },
+                                                                                           ATTRIBUTE_LOCATION );
+
+   public static final MetaDataTag                 MESSAGE_DISPATCHER   = new MetaDataTag( "MessageDispatcher",
+                                                                                           new String[]
+                                                                                           { PROPERTY,
+               SCOPE                                                                      },
+                                                                                           ATTRIBUTE_LOCATION );
+
+   public static final MetaDataTag                 MESSAGE_ERROR        = new MetaDataTag( "MessageError",
+                                                                                           new String[]
+                                                                                           { TYPE,
+               SELECTOR2,
+               SCOPE,
+               METHOD                                                                     },
+                                                                                           FUNCTION_LOCATION );
+
+   public static final MetaDataTag                 MESSAGE_HANDLER      = new MetaDataTag( "MessageHandler",
+                                                                                           new String[]
+                                                                                           { TYPE,
+               MESSAGE_PROPERTIES,
+               SELECTOR2,
+               SCOPE,
+               METHOD                                                                     },
+                                                                                           FUNCTION_LOCATION );
+
+   public static final MetaDataTag                 MESSAGE_INTERCEPTOR  = new MetaDataTag( "MessageInterceptor",
+                                                                                           new String[]
+                                                                                           { TYPE,
+               SELECTOR2,
+               SCOPE,
+               METHOD                                                                     },
+                                                                                           FUNCTION_LOCATION );
+
+   public static final MetaDataTag                 OBJECT_DEFINITION    = new MetaDataTag( "ObjectDefinition",
+                                                                                           new String[]
+                                                                                           { LAZY,
+               SINGLETON,
+               ID_PROPERTY,
+               ORDER                                                                      },
+                                                                                           ATTRIBUTE_LOCATION );
+
+   public static final MetaDataTag                 RESOURCE_BINDING     = new MetaDataTag( "ResourceBinding",
+                                                                                           new String[]
+                                                                                           { BUNDLE,
+               KEY,
+               PROPERTY                                                                   },
+                                                                                           ATTRIBUTE_LOCATION );
+
+   public static final MetaDataTag                 SELECTOR             = new MetaDataTag( "Selector",
+                                                                                           new String[]
+                                                                                           {},
+                                                                                           ATTRIBUTE_LOCATION );
+
+   public static final MetaDataTag                 TARGET               = new MetaDataTag( "Target",
+                                                                                           new String[]
+                                                                                           {},
+                                                                                           ATTRIBUTE_LOCATION );
+
+   public static final MetaDataTag[]               ALL_TAGS             =
+                                                                        { INJECT,
+               INJECT_CONSTRUCTOR,
+               MANAGED_EVENTS,
+               MESSAGE_BINDING,
+               MESSAGE_DISPATCHER,
+               MESSAGE_ERROR,
+               MESSAGE_HANDLER,
+               MESSAGE_INTERCEPTOR,
+               COMMAND_COMPLETE,
+               ASYNC_INIT,
+               INIT,
+               DESTROY,
+               RESOURCE_BINDING,
+               FACTORY,
+               OBJECT_DEFINITION,
+               TARGET,
+               INTERNAL                                                };
+
+   private static final Map< String, MetaDataTag > TAG_MAP              = new LinkedHashMap< String, MetaDataTag >();
+
+   static
+   {
+      TAG_MAP.put( INJECT.getName(),
+                   INJECT );
+      TAG_MAP.put( COMMAND_COMPLETE.getName(),
+                   COMMAND_COMPLETE );
+      TAG_MAP.put( INJECT_CONSTRUCTOR.getName(),
+                   INJECT_CONSTRUCTOR );
+      TAG_MAP.put( MANAGED_EVENTS.getName(),
+                   MANAGED_EVENTS );
+      TAG_MAP.put( MESSAGE_BINDING.getName(),
+                   MESSAGE_BINDING );
+      TAG_MAP.put( MESSAGE_DISPATCHER.getName(),
+                   MESSAGE_DISPATCHER );
+      TAG_MAP.put( MESSAGE_ERROR.getName(),
+                   MESSAGE_ERROR );
+      TAG_MAP.put( MESSAGE_HANDLER.getName(),
+                   MESSAGE_HANDLER );
+      TAG_MAP.put( MESSAGE_INTERCEPTOR.getName(),
+                   MESSAGE_INTERCEPTOR );
+      TAG_MAP.put( ASYNC_INIT.getName(),
+                   ASYNC_INIT );
+      TAG_MAP.put( INIT.getName(),
+                   INIT );
+      TAG_MAP.put( DESTROY.getName(),
+                   DESTROY );
+      TAG_MAP.put( RESOURCE_BINDING.getName(),
+                   RESOURCE_BINDING );
+      TAG_MAP.put( FACTORY.getName(),
+                   FACTORY );
+      TAG_MAP.put( OBJECT_DEFINITION.getName(),
+                   OBJECT_DEFINITION );
+      TAG_MAP.put( TARGET.getName(),
+                   TARGET );
+      TAG_MAP.put( INTERNAL.getName(),
+                   INTERNAL );
+   }
+
+   public static MetaDataTag getTag( final String name )
+   {
+      return TAG_MAP.get( name );
+   }
+
+   public static boolean isParsleyMetaData( final String name )
+   {
+      return TAG_MAP.containsKey( name );
+   }
+   
+   public static Map< String, MetaDataTag > getPossibleMetaDataFromLocation( Location location )
+   {
+      Map< String, MetaDataTag > tags = new HashMap< String, MetaDataTag >();
+      
+      for ( MetaDataTag metaDataTag : ALL_TAGS )
+      {
+         if ( metaDataTag.getPlacedOn().contains( location ) )
+         {
+            tags.put( metaDataTag.getName(), metaDataTag );
+         }
+      }
+      return tags;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AbstractAvoidNodeInLoopRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AbstractAvoidNodeInLoopRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AbstractAvoidNodeInLoopRule.java
new file mode 100644
index 0000000..d6dc5ee
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AbstractAvoidNodeInLoopRule.java
@@ -0,0 +1,85 @@
+/*
+ * 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.parser.IParserNode;
+import com.adobe.ac.pmd.parser.NodeKind;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRule;
+
+public abstract class AbstractAvoidNodeInLoopRule extends AbstractAstFlexRule
+{
+   private int loopLevel = 0;
+
+   protected int getLoopLevel()
+   {
+      return loopLevel;
+   }
+
+   protected abstract boolean isNodeForbidden( final IParserNode ast );
+
+   @Override
+   protected final void visitFor( final IParserNode ast )
+   {
+      loopLevel++;
+      super.visitFor( ast );
+      loopLevel--;
+   }
+
+   @Override
+   protected final void visitForEach( final IParserNode ast )
+   {
+      loopLevel++;
+      super.visitForEach( ast );
+      loopLevel--;
+   }
+
+   @Override
+   protected final void visitStatement( final IParserNode ast )
+   {
+      super.visitStatement( ast );
+
+      if ( ast != null
+            && !ast.is( NodeKind.WHILE ) && !ast.is( NodeKind.FOR ) && !ast.is( NodeKind.FOREACH )
+            && !ast.is( NodeKind.FOR ) )
+      {
+         searchForbiddenNode( ast );
+      }
+   }
+
+   @Override
+   protected final void visitWhile( final IParserNode ast )
+   {
+      loopLevel++;
+      super.visitWhile( ast );
+      loopLevel--;
+   }
+
+   private void searchForbiddenNode( final IParserNode ast )
+   {
+      if ( ast.numChildren() > 0 )
+      {
+         for ( final IParserNode child : ast.getChildren() )
+         {
+            searchForbiddenNode( child );
+         }
+      }
+      if ( isNodeForbidden( ast ) )
+      {
+         addViolation( ast );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidDeclarationInLoopRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidDeclarationInLoopRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidDeclarationInLoopRule.java
new file mode 100644
index 0000000..a6ec154
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidDeclarationInLoopRule.java
@@ -0,0 +1,37 @@
+/*
+ * 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.parser.IParserNode;
+import com.adobe.ac.pmd.parser.NodeKind;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+public class AvoidDeclarationInLoopRule extends AbstractAvoidNodeInLoopRule
+{
+   @Override
+   protected ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   @Override
+   protected boolean isNodeForbidden( final IParserNode ast )
+   {
+      return ast.getId() != null
+            && ( ast.is( NodeKind.VAR ) || ast.is( NodeKind.VAR_LIST ) ) && getLoopLevel() != 0;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidInstanciationInLoopRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidInstanciationInLoopRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidInstanciationInLoopRule.java
new file mode 100644
index 0000000..d4c8a1e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/main/java/com/adobe/ac/pmd/rules/performance/AvoidInstanciationInLoopRule.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.performance;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.NodeKind;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+/**
+ * @author xagnetti
+ */
+public class AvoidInstanciationInLoopRule extends AbstractAvoidNodeInLoopRule
+{
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.AbstractFlexRule#getDefaultPriority()
+    */
+   @Override
+   protected final ViolationPriority getDefaultPriority()
+   {
+      return ViolationPriority.NORMAL;
+   }
+
+   @Override
+   protected boolean isNodeForbidden( final IParserNode ast )
+   {
+      return ast.getId() != null
+            && ast.is( NodeKind.NEW ) && getLoopLevel() != 0;
+   }
+}


[44/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/EmptyTestFunctionStatus.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/EmptyTestFunctionStatus.as b/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/EmptyTestFunctionStatus.as
deleted file mode 100644
index c88d844..0000000
--- a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/EmptyTestFunctionStatus.as
+++ /dev/null
@@ -1,36 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 flexunit.flexui.data.filter
-{
-   import flexunit.flexui.controls.FlexUnitLabels;
-   import flexunit.flexui.data.TestFunctionRowData;
-   
-   public class EmptyTestFunctionStatus implements ITestFunctionStatus
-   {
-      public function isTestFunctionVisible( test : TestFunctionRowData ) : Boolean
-      {
-         return test.assertionsMade == 0;
-      }
-      
-      public function get label() : String
-      {
-         return FlexUnitLabels.EMPTY;
-      }
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/ErrorTestFunctionStatus.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/ErrorTestFunctionStatus.as b/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/ErrorTestFunctionStatus.as
deleted file mode 100644
index 55ad184..0000000
--- a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/ErrorTestFunctionStatus.as
+++ /dev/null
@@ -1,36 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 flexunit.flexui.data.filter
-{
-   import flexunit.flexui.controls.FlexUnitLabels;
-   import flexunit.flexui.data.TestFunctionRowData;
-
-   public class ErrorTestFunctionStatus implements ITestFunctionStatus
-   {
-      public function isTestFunctionVisible( test : TestFunctionRowData ) : Boolean
-      {
-         return ! test.testSuccessful;
-      }
-      
-      public function get label() : String
-      {
-         return FlexUnitLabels.FAILURES_AND_ERRORS;
-      }
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/ITestFunctionStatus.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/ITestFunctionStatus.as b/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/ITestFunctionStatus.as
deleted file mode 100644
index fe17266..0000000
--- a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/ITestFunctionStatus.as
+++ /dev/null
@@ -1,28 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 flexunit.flexui.data.filter
-{
-   import flexunit.flexui.data.TestFunctionRowData;
-   
-   public interface ITestFunctionStatus
-   {
-      function isTestFunctionVisible( test : TestFunctionRowData ) : Boolean;
-      function get label() : String;
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/TestfFunctionStatuses.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/TestfFunctionStatuses.as b/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/TestfFunctionStatuses.as
deleted file mode 100644
index 1f21549..0000000
--- a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/TestfFunctionStatuses.as
+++ /dev/null
@@ -1,32 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 flexunit.flexui.data.filter
-{
-   public class TestfFunctionStatuses
-   {
-      public static const ALL : ITestFunctionStatus = new AllTestFunctionStatus();
-      public static const EMPTY : ITestFunctionStatus = new EmptyTestFunctionStatus();
-      public static const ERRORS_AND_FAILURES : ITestFunctionStatus = new ErrorTestFunctionStatus();
-      
-      public static function toArray() : Array
-      {
-         return [ ALL, EMPTY, ERRORS_AND_FAILURES ];
-      }
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/mxml/IterationView.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/mxml/IterationView.mxml b/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/mxml/IterationView.mxml
deleted file mode 100644
index 2ff3397..0000000
--- a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/mxml/IterationView.mxml
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-  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.
-
--->
-<mx:Panel 
-   xmlns:mx="http://www.adobe.com/2006/mxml"
-   xmlns:ns1="com.adobe.ac.anthology.view.iteration.*"
-   xmlns:component="com.adobe.ac.anthology.utils.components.*"
-   title="MyIterations" 
-   horizontalAlign="left"
-   visible="{ model.selectedRelease != null }">
-
-    <mx:Script>
-    <![CDATA[
-       import com.adobe.ac.anthology.model.object.Iteration;
-       import com.adobe.ac.anthology.model.AnthologyModelLocator;
-       import com.adobe.ac.anthology.model.ProjectModel;
-      import com.adobe.cairngorm.business.ServiceLocator;
-      import com.adobe.ac.anthology.control.event.iteration.*;
-      import com.adobe.ac.anthology.utils.FormTools;
-      
-      [Bindable]
-      private var model : ProjectModel = AnthologyModelLocator.instance.projectModel;
-      
-      private function addIteration() : void
- 	   {
- 	      model.selectedRelease.addIteration( new Iteration() );
- 	   }
- 	   
- 	   private function changeIteration() : void
- 	   {
- 	      model.selectedIteration = dg.selectedItem as Iteration;
- 	   }
-
-    ]]>
-    </mx:Script>
-    <mx:HBox height="320"> 
-    
-    <ns1:DetailedIterationWithControl
-       id="detailedIterationForm"
-       iteration="{ model.selectedIteration }" />
-	     
-    <mx:VRule
-       height="100%"
-       strokeColor="#DDDDDD"/>   
- 
-    <mx:VBox
-       paddingTop="15"
-       paddingLeft="15"
-       paddingRight="15"
-       paddingBottom="15">
-     
-      <mx:Text text="List of Iterations"/>
-      
-      <component:ScrawlGrid
-            id="dg"
-            dataProvider="{ model.selectedRelease.iterations }"
-            width="200" height="220"
-            change="changeIteration()">
-            
-         <component:columns>
-               
-            <mx:DataGridColumn
-               dataField="iterationNumber"
-               headerText="#"/>
-               
-            <mx:DataGridColumn
-               dataField="startDate"
-               headerText="Start Date"
-               editable="false"/>
-               
-            <mx:DataGridColumn 
-               dataField="endDate" 
-               headerText="End Date"/>
-               
-         </component:columns>
-         
-      </component:ScrawlGrid>
-      
-      <mx:HBox width="200">
-      
-         <mx:Button label="Add Iteration"
-            click="addIteration()"/>
-            
-      </mx:HBox>
-  
-    </mx:VBox>
- 
-  </mx:HBox>   
-</mx:Panel>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/mxml/IterationsList.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/mxml/IterationsList.mxml b/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/mxml/IterationsList.mxml
deleted file mode 100644
index 317d24d..0000000
--- a/FlexPMD/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/mxml/IterationsList.mxml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-  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.
-
--->
-<component:ScrawlGrid xmlns:mx="http://www.adobe.com/2006/mxml"
-   xmlns:component="com.adobe.ac.anthology.utils.components.*">
-   <!--
-       lalala 
-       -->
-   <mx:Script>
-      <![CDATA[
-         import com.adobe.ac.anthology.model.object.Iteration;
-         
-         import mx.collections.ArrayCollection;
-         
-         
-         private var _selectedIteration : Iteration;
-         
-         public function set selectedIteration(value : Iteration) : void
-         {
-           for (var i : uint = 0; i < (dataProvider as ArrayCollection).length; i++) {
-         		var currentId : uint = dataProvider[i].id;
-         		if (currentId == value.id) {
-         			selectedItem = dataProvider[i];
-         			return;
-         		}	
-         	}
-         }
-         
-         private function displayTitle(item : Object, column : DataGridColumn) : String
-         {
-            var i  : Iteration = Iteration( item );
-            
-            return "#" + i.iterationNumber.toString() + " " + i.status;
-         }
-         
-      ]]>
-   </mx:Script>
-   
-   <component:columns>
-   
-      <mx:DataGridColumn dataField="iterationNumber" headerText="Iterations" labelFunction="displayTitle"/>
-      
-   </component:columns>   
-   
-</component:ScrawlGrid>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/checkstyle.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/checkstyle.xml b/FlexPMD/checkstyle.xml
new file mode 100644
index 0000000..a7cb9ab
--- /dev/null
+++ b/FlexPMD/checkstyle.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+	<!--
+		This configuration file was written by the eclipse-cs plugin
+		configuration editor
+	-->
+	<!--
+		Checkstyle-Configuration: AdobeProfessionalSerives Description: Adobe
+		Professional Services checkstyle ruleset
+	-->
+<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+<module name="Checker">
+	<property name="severity" value="warning" />
+	<module name="TreeWalker">
+		<module name="AbstractClassName" />
+		<module name="ConstantName" />
+		<module name="LocalFinalVariableName" />
+		<module name="LocalVariableName" />
+		<module name="MemberName" />
+		<module name="MethodName" />
+		<module name="ParameterName" />
+		<module name="StaticVariableName" />
+		<module name="TypeName" />
+		<module name="FileLength" />
+		<module name="LineLength">
+			<property name="max" value="120" />
+		</module>
+		<module name="MethodLength">
+			<property name="max" value="50" />
+		</module>
+		<module name="ParameterNumber">
+			<property name="max" value="4" />
+		</module>
+		<module name="AvoidInlineConditionals">
+			<property name="severity" value="ignore" />
+		</module>
+		<module name="DefaultComesLast" />
+		<module name="EmptyStatement" />
+		<module name="ExplicitInitialization">
+			<property name="severity" value="ignore" />
+		</module>
+		<module name="FallThrough" />
+		<module name="HiddenField" />
+		<module name="IllegalInstantiation" />
+		<module name="IllegalCatch" />
+		<module name="IllegalThrows" />
+		<module name="MagicNumber">
+			<property name="severity" value="ignore" />
+		</module>
+		<module name="ParameterAssignment" />
+		<module name="SimplifyBooleanExpression" />
+		<module name="SimplifyBooleanReturn" />
+		<module name="SuperClone" />
+		<module name="UnnecessaryParentheses" />
+		<module name="FinalClass" />
+		<module name="DesignForExtension">
+			<property name="severity" value="ignore" />
+		</module>
+		<module name="ArrayTypeStyle" />
+	</module>
+</module>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/cleanup.profile.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/cleanup.profile.xml b/FlexPMD/cleanup.profile.xml
new file mode 100644
index 0000000..f437848
--- /dev/null
+++ b/FlexPMD/cleanup.profile.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+	<!-- Profile to be imported in Eclipse clean-up tool -->
+<profiles version="2">
+	<profile kind="CleanUpProfile" name="Ac" version="2">
+		<setting
+			id="cleanup.use_this_for_non_static_field_access_only_if_necessary"
+			value="true" />
+		<setting id="cleanup.always_use_blocks" value="true" />
+		<setting id="cleanup.qualify_static_method_accesses_with_declaring_class"
+			value="false" />
+		<setting id="cleanup.remove_unused_private_fields" value="true" />
+		<setting id="cleanup.always_use_this_for_non_static_method_access"
+			value="false" />
+		<setting id="cleanup.qualify_static_field_accesses_with_declaring_class"
+			value="false" />
+		<setting
+			id="cleanup.use_this_for_non_static_method_access_only_if_necessary"
+			value="true" />
+		<setting id="cleanup.remove_unused_private_types" value="true" />
+		<setting id="cleanup.always_use_parentheses_in_expressions"
+			value="false" />
+		<setting
+			id="cleanup.qualify_static_member_accesses_through_instances_with_declaring_class"
+			value="true" />
+		<setting id="cleanup.remove_unused_local_variables" value="true" />
+		<setting id="cleanup.add_missing_override_annotations" value="true" />
+		<setting id="cleanup.remove_trailing_whitespaces_all" value="true" />
+		<setting id="cleanup.organize_imports" value="true" />
+		<setting id="cleanup.remove_unnecessary_nls_tags" value="true" />
+		<setting id="cleanup.add_missing_methods" value="false" />
+		<setting id="cleanup.remove_trailing_whitespaces_ignore_empty"
+			value="false" />
+		<setting id="cleanup.use_parentheses_in_expressions" value="true" />
+		<setting id="cleanup.make_type_abstract_if_missing_method"
+			value="false" />
+		<setting id="cleanup.sort_members" value="true" />
+		<setting
+			id="cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class"
+			value="true" />
+		<setting id="cleanup.use_blocks_only_for_return_and_throw"
+			value="false" />
+		<setting id="cleanup.use_blocks" value="true" />
+		<setting id="cleanup.make_private_fields_final" value="true" />
+		<setting id="cleanup.remove_unused_private_methods" value="true" />
+		<setting id="cleanup.correct_indentation" value="false" />
+		<setting id="cleanup.use_this_for_non_static_field_access"
+			value="true" />
+		<setting id="cleanup.remove_unnecessary_casts" value="true" />
+		<setting id="cleanup.sort_members_all" value="true" />
+		<setting id="cleanup.format_source_code_changes_only" value="false" />
+		<setting id="cleanup.make_local_variable_final" value="true" />
+		<setting id="cleanup.never_use_parentheses_in_expressions"
+			value="true" />
+		<setting id="cleanup.remove_trailing_whitespaces" value="true" />
+		<setting id="cleanup.convert_to_enhanced_for_loop" value="true" />
+		<setting id="cleanup.format_source_code" value="false" />
+		<setting id="cleanup.add_missing_nls_tags" value="false" />
+		<setting id="cleanup.add_missing_annotations" value="true" />
+		<setting id="cleanup.use_this_for_non_static_method_access"
+			value="true" />
+		<setting id="cleanup.make_variable_declarations_final" value="true" />
+		<setting id="cleanup.make_parameters_final" value="true" />
+		<setting id="cleanup.remove_private_constructors" value="true" />
+		<setting id="cleanup.add_generated_serial_version_id" value="false" />
+		<setting id="cleanup.add_missing_deprecated_annotations"
+			value="true" />
+		<setting id="cleanup.qualify_static_member_accesses_with_declaring_class"
+			value="true" />
+		<setting id="cleanup.always_use_this_for_non_static_field_access"
+			value="false" />
+		<setting id="cleanup.never_use_blocks" value="false" />
+		<setting id="cleanup.add_serial_version_id" value="false" />
+		<setting id="cleanup.add_default_serial_version_id" value="true" />
+		<setting id="cleanup.remove_unused_imports" value="true" />
+		<setting id="cleanup.remove_unused_private_members" value="true" />
+	</profile>
+</profiles>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/custom-ruleset/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/custom-ruleset/pom.xml b/FlexPMD/custom-ruleset/pom.xml
index 529c782..ca04ee2 100644
--- a/FlexPMD/custom-ruleset/pom.xml
+++ b/FlexPMD/custom-ruleset/pom.xml
@@ -19,11 +19,13 @@ limitations under the License.
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.adobe.flexpmd</groupId>
+
+    <groupId>org.apache.flex.pmd</groupId>
 	<artifactId>custom-ruleset</artifactId>
 	<version>0.0.1-SNAPSHOT</version>
 	<packaging>jar</packaging>
-	<name>Custom FlexPMD ruleset</name>
+
+    <name>Custom FlexPMD ruleset</name>
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -33,17 +35,17 @@ limitations under the License.
 
 	<dependencies>
 		<dependency>
-			<groupId>com.adobe.ac</groupId>
+			<groupId>org.apache.flex.pmd</groupId>
 			<artifactId>flex-pmd-core</artifactId>
 			<version>${flexpmd.version}</version>
 		</dependency>
 		<dependency>
-			<groupId>com.adobe.ac</groupId>
+			<groupId>org.apache.flex.pmd</groupId>
 			<artifactId>flex-pmd-ruleset-api</artifactId>
 			<version>${flexpmd.version}</version>
 		</dependency>
 		<dependency>
-			<groupId>com.adobe.ac</groupId>
+			<groupId>org.apache.flex.pmd</groupId>
 			<artifactId>flex-pmd-files</artifactId>
 			<version>${flexpmd.version}</version>
 		</dependency>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-formatter.properties
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-formatter.properties b/FlexPMD/flex-formatter.properties
new file mode 100644
index 0000000..84976c6
--- /dev/null
+++ b/FlexPMD/flex-formatter.properties
@@ -0,0 +1,74 @@
+# 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.
+
+#FlexPrettyPrintSettings
+#Mon May 18 16:11:58 CEST 2009
+Actionscript.spacesBeforeComma=0
+Actionscript.newLineAfterBindable=true
+Actionscript.putCatchOnNewLine=true
+MXML.spacesAroundEquals=0
+Actionscript.wrapArrayDeclMode=8
+Actionscript.useBraceStyle=false
+Actionscript.advancedSpacesInsideLiteralBraces=0
+MXML.attrWrapMode=52
+Actionscript.alwaysGenerateIndent=false
+MXML.keepBlankLines=true
+MXML.attrsToKeepOnSameLine=1
+MXML.spacesBeforeEmptyTagEnd=0
+MXML.wrapIndentStyle=1000
+Actionscript.spacesAfterLabel=1
+Actionscript.advancedSpacesAroundEqualsInOptionalParameters=1
+MXML.tagsCannotFormat=mx\:String,
+Actionscript.breakLinesBeforeComma=false
+Actionscript.collapseSpacesForAdjacentParens=false
+Actionscript.advancedUseSpacesAroundEqualsInOptionalParameters=true
+Actionscript.advancedSpacesInsideArrayRefBrackets=0
+Actionscript.blankLinesBeforeFunctions=1
+Actionscript.useGlobalSpacesInsideParens=true
+MXML.sortAttrData=%namespace%\n%properties%\n%styles%\n%events%\n%effects%\n
+Actionscript.wrapMethodDeclMode=8
+Actionscript.blankLinesBeforeClasses=1
+MXML.useAttrsToKeepOnSameLine=false
+Actionscript.putElseOnNewLine=true
+MXML.maxLineLength=100
+Actionscript.spacesBeforeControlOpenParen=1
+MXML.sortExtraAttrs=true
+MXML.blankLinesBeforeTags=0
+Actionscript.spacesInsideParens=1
+Actionscript.maxLineLength=120
+Actionscript.putEmptyStatementsOnNewLine=true
+Flex.useTabs=false
+Actionscript.keepSLCommentsOnColumn1=true
+MXML.sortAttrMode=2
+Actionscript.spacesAroundBinarySymbolicOperator=1
+MXML.tagsToHaveBlankLinesAddedBeforeThem=
+Actionscript.wrapEmbeddedXMLMode=2
+Actionscript.spacesAfterComma=1
+Actionscript.advancedSpacesInsideArrayDeclBrackets=0
+Actionscript.advancedSpacesInsideParens=0
+Actionscript.blankLinesBeforeControlStatements=1
+Actionscript.wrapIndentStyle=1000
+Actionscript.wrapExpressionMode=8
+Actionscript.putOpenBraceOnNewLine=true
+MXML.attrsPerLine=1
+Actionscript.spacesAroundAssignment=1
+Actionscript.spacesAroundColons=1
+Actionscript.keepBlankLines=true
+Actionscript.keepElseIfOnSameLine=true
+MXML.attrGroups=name\=properties|sort\=13|wrap\=54|attrs\=id,width,height,styleName,label,text,allowDisjointSelection,allowMultipleSelection,allowThumbOverlap,allowTrackClick,autoLayout,autoRepeat,automationName,cachePolicy,class,clipContent,condenseWhite,conversion,creationIndex,creationPolicy,currentState,data,dataDescriptor,dataProvider,dataTipFormatFunction,dayNames,defaultButton,direction,disabledDays,disabledRanges,displayedMonth,displayedYear,doubleClickEnabled,emphasized,enabled,explicitHeight,explicitMaxHeight,explicitMaxWidth,explicitMinHeight,explicitMinWidth,explicitWidth,firstDayOfWeek,focusEnabled,fontContext,horizontalLineScrollSize,horizontalPageScrollSize,horizontalScrollBar,horizontalScrollPolicy,horizontalScrollPosition,htmlText,icon,iconField,imeMode,includeInLayout,indeterminate,labelField,labelFunction,labelPlacement,labels,layout,lineScrollSize,listData,liveDragging,maxChars,maxHeight,maxScrollPosition,maxWidth,maxYear,maximum,measuredHeight,measuredMinHeight,
 measuredMinWidth,measuredWidth,menuBarItemRenderer,menuBarItems,menus,minHeight,minScrollPosition,minWidth,minYear,minimum,mode,monthNames,monthSymbol,mouseFocusEnabled,pageScrollSize,pageSize,percentHeight,percentWidth,scaleX,scaleY,scrollPosition,selectable,selectableRange,selected,selectedDate,selectedField,selectedIndex,selectedRanges,showDataTip,showRoot,showToday,sliderDataTipClass,sliderThumbClass,snapInterval,source,states,stepSize,stickyHighlighting,text,thumbCount,tickInterval,tickValues,toggle,toolTip,transitions,truncateToFit,validationSubField,value,value,verticalLineScrollSize,verticalPageScrollSize,verticalScrollBar,verticalScrollPolicy,verticalScrollPosition,x,y,yearNavigationEnabled,yearSymbol,|\nname\=events|sort\=11|wrap\=54|attrs\=add,buttonDown,change,childAdd,childIndexChange,childRemove,clickHandler,complete,creationComplete,currentStateChange,currentStateChanging,dataChange,dragComplete,dragDrop,dragEnter,dragExit,dragOver,effectEnd,effectStart,enterState,exi
 tState,hide,initialize,invalid,itemClick,itemRollOut,itemRollOver,menuHide,menuShow,mouseDownOutside,mouseWheelOutside,move,preinitialize,progress,record,remove,resize,scroll,show,thumbDrag,thumbPress,thumbRelease,toolTipCreate,toolTipEnd,toolTipHide,toolTipShow,toolTipShown,toolTipStart,updateComplete,valid,valueCommit,|\nname\=styles|sort\=11|wrap\=54|attrs\=backgroundAlpha,backgroundAttachment,backgroundColor,backgroundDisabledColor,backgroundImage,backgroundSize,backgroundSkin,barColor,barSkin,borderColor,borderSides,borderSkin,borderStyle,borderThickness,bottom,color,cornerRadius,dataTipOffset,dataTipPrecision,dataTipStyleName,disabledColor,disabledIcon,disabledIconColor,disabledSkin,disbledOverlayAlpha,downArrowDisabledSkin,downArrowDownSkin,downArrowOverSkin,downArrowUpSkin,downIcon,downSkin,dropShadowColor,dropShadowEnabled,errorColor,fillAlphas,fillColors,focusAlpha,focusBlendMode,focusRoundedCorners,focusSkin,focusThickness,fontAntiAliasType,fontFamily,fontGridFitType,font
 Sharpness,fontSize,fontStyle,fontThickness,fontWeight,fontfamily,headerColors,headerStyleName,highlightAlphas,horizontalAlign,horizontalCenter,horizontalGap,horizontalScrollBarStyleName,icon,iconColor,indeterminateMoveInterval,indeterminateSkin,itemDownSkin,itemOverSkin,itemUpSkin,kerning,labelOffset,labelStyleName,labelWidth,leading,left,letterSpacing,maskSkin,menuStyleName,nextMonthDisabledSkin,nextMonthDownSkin,nextMonthOverSkin,nextMonthSkin,nextMonthUpSkin,nextYearDisabledSkin,nextYearDownSkin,nextYearOverSkin,nextYearSkin,nextYearUpSkin,overIcon,overSkin,paddingBottom,paddingLeft,paddingRight,paddingTop,prevMonthDisabledSkin,prevMonthDownSkin,prevMonthOverSkin,prevMonthSkin,prevMonthUpSkin,prevYearDisabledSkin,prevYearDownSkin,prevYearOverSkin,prevYearSkin,prevYearUpSkin,repeatDelay,repeatInterval,right,rollOverColor,rollOverIndicatorSkin,selectedDisabledIcon,selectedDisabledSkin,selectedDownIcon,selectedDownSkin,selectedOverIcon,selectedOverSkin,selectedUpIcon,selectedUpSkin,
 selectionColor,selectionIndicatorSkin,shadowColor,shadowDirection,shadowDistance,showTrackHighlight,skin,slideDuration,slideEasingFunction,strokeColor,strokeWidth,textAlign,textDecoration,textIndent,textRollOverColor,textSelectedColor,themeColor,thumbDisabledSkin,thumbDownSkin,thumbIcon,thumbOffset,thumbOverSkin,thumbUpSkin,tickColor,tickLength,tickOffset,tickThickness,todayColor,todayIndicatorSkin,todayStyleName,top,tracHighlightSkin,trackColors,trackHeight,trackMargin,trackSkin,upArrowDisabledSkin,upArrowDownSkin,upArrowOverSkin,upArrowUpSkin,upIcon,upSkin,verticalAlign,verticalCenter,verticalGap,verticalScrollBarStyleName,weekDayStyleName,|\nname\=effects|sort\=11|wrap\=54|attrs\=addedEffect,completeEffect,creationCompleteEffect,focusInEffect,focusOutEffect,hideEffect,mouseDownEffect,mouseUpEffect,moveEffect,removedEffect,resizeEffect,rollOutEffect,rollOverEffect,showEffect,|\nname\=namespace|sort\=11|wrap\=54|attrs\=xmlns\:.*,|\n
+MXML.addNewlineAfterLastAttr=true
+Actionscript.braceStyle=5
+Actionscript.wrapMethodCallMode=8
+MXML.tagsCanFormat=mx\:List,

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-ant-task/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ant-task/.pmd b/FlexPMD/flex-pmd-ant-task/.pmd
deleted file mode 100644
index b5c19d9..0000000
--- a/FlexPMD/flex-pmd-ant-task/.pmd
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-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.
-
--->
-<pmd>
-    <useProjectRuleSet>false</useProjectRuleSet>
-    <ruleSetFile>../flex-pmd-parent/pmd.xml</ruleSetFile>
-    <includeDerivedFiles>false</includeDerivedFiles>
-    <violationsAsErrors>true</violationsAsErrors>
-</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-ant-task/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ant-task/pom.xml b/FlexPMD/flex-pmd-ant-task/pom.xml
deleted file mode 100644
index d3328d2..0000000
--- a/FlexPMD/flex-pmd-ant-task/pom.xml
+++ /dev/null
@@ -1,177 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-  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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-ant-task</artifactId>
-	<name>Adobe Flex PMD Ant task</name>
-
-  <parent>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-java-parent</artifactId>
-	<version>1.3-SNAPSHOT</version>
-	<relativePath>../flex-pmd-java-parent/pom.xml</relativePath>
-  </parent>
-  
-  	<description />
-	<packaging>jar</packaging>
-
-	<build>
-		<testResources>
-			<testResource>
-				<directory>${project.build.directory}/test/generated-resources</directory>
-			</testResource>
-		</testResources>
-
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>unpack-test-resources</id>
-						<phase>generate-resources</phase>
-						<goals>
-							<goal>unpack-dependencies</goal>
-						</goals>
-						<configuration>
-							<includeGroupIds>${project.groupId}</includeGroupIds>
-							<includes>**/*.as,**/*.mxml</includes>
-							<outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
-							<excludeTransitive>true</excludeTransitive>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-			
-			<plugin>
-				<artifactId>maven-antrun-plugin</artifactId>
-				<version>${maven-antrun-plugin.version}</version>
-				<executions>
-					<execution>
-						<id>package-ant-task</id>
-						<phase>install</phase>
-						<configuration>
-							<tasks>
-								<echo message="Building ant-task" />
-								<mkdir dir="${project.build.directory}/release" />
-								<echo message="" />
-								<echo message="Copying Flex PMD dependencies..." />
-								<copy file="${project.build.directory}/${project.build.finalName}.jar" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.flex-pmd-core.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.flex-pmd-ruleset.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.flex-pmd-files.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.flex-pmd-ruleset-api.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.as3-parser.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.as3-parser-api.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<echo message="Copying Ant dependencies..." />
-								<copy file="${maven.dependency.com.adobe.ac.as3-plugin-utils.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.pmd.pmd.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.org.apache.ant.ant.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.commons-lang.commons-lang.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.plexus.plexus-utils.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<echo message="Extracting license..." />
-								<copy file="../flex-pmd-parent/src/etc/header.txt" tofile="${project.build.directory}/release/LICENSE.txt" overwrite="true" />
-								<echo message="Compressing zip..." />
-								<zip destfile="${project.build.directory}/${project.build.finalName}.zip" basedir="${project.build.directory}/release" excludes="*.zip" />
-							</tasks>
-						</configuration>
-						<goals>
-							<goal>run</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-
-
-	<dependencies>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<version>${project.version}</version>
-			<artifactId>flex-pmd-core</artifactId>
-		</dependency>
-		
-		<dependency>
-			<groupId>org.apache.ant</groupId>
-			<artifactId>ant</artifactId>
-			<version>${ant.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-test-resources</artifactId>
-			<version>${project.parent.version}</version>
-			<classifier>resources</classifier>
-			<type>zip</type>
-			<scope>provided</scope>
-		</dependency>
-
-		<!-- Dependencies for packaging from ANT -->
-
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<version>${project.version}</version>
-			<artifactId>flex-pmd-ruleset</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<version>${project.version}</version>
-			<artifactId>flex-pmd-ruleset-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<version>${project.version}</version>
-			<artifactId>flex-pmd-files</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<artifactId>as3-plugin-utils</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<artifactId>as3-parser</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<artifactId>as3-parser-api</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>pmd</groupId>
-			<artifactId>pmd</artifactId>
-			<version>${pmd.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>plexus</groupId>
-			<artifactId>plexus-utils</artifactId>
-			<version>${plexus-utils.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>commons-lang</groupId>
-			<artifactId>commons-lang</artifactId>
-			<version>${commons-lang.version}</version>
-		</dependency>
-	</dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-ant-task/src/main/assemble/bin.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ant-task/src/main/assemble/bin.xml b/FlexPMD/flex-pmd-ant-task/src/main/assemble/bin.xml
deleted file mode 100644
index 134549d..0000000
--- a/FlexPMD/flex-pmd-ant-task/src/main/assemble/bin.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<!--
-
-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.
-
--->
-<assembly>
-  <id>ant</id>
-  <formats>
-    <format>jar</format>
-  </formats>
-  <includeBaseDirectory>false</includeBaseDirectory>
-  <dependencySets>
-    <dependencySet>
-      <includes>
-         <include>com.adobe.ac:flex-pmd-core</include>
-         <include>org.apache.ant:ant</include>
-         <include>com.adobe.ac:as3-parser</include>
-         <include>com.adobe.ac:as3-plugin-utils</include>
-         <include>com.adobe.ac:flex-pmd-ruleset</include>
-         <include>com.adobe.ac:flex-pmd-ruleset-api</include>
-         <include>pmd:pmd</include>
-      </includes>
-    </dependencySet>
-  </dependencySets>    
-</assembly>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-ant-task/src/main/java/com/adobe/ac/pmd/ant/FlexPmdAntTask.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ant-task/src/main/java/com/adobe/ac/pmd/ant/FlexPmdAntTask.java b/FlexPMD/flex-pmd-ant-task/src/main/java/com/adobe/ac/pmd/ant/FlexPmdAntTask.java
deleted file mode 100644
index 40e7167..0000000
--- a/FlexPMD/flex-pmd-ant-task/src/main/java/com/adobe/ac/pmd/ant/FlexPmdAntTask.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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.ant;
-
-import java.io.File;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-
-import com.adobe.ac.pmd.FlexPmdParameters;
-import com.adobe.ac.pmd.FlexPmdViolations;
-import com.adobe.ac.pmd.LoggerUtils;
-import com.adobe.ac.pmd.engines.FlexPmdXmlEngine;
-import com.adobe.ac.pmd.engines.PmdEngineUtils;
-
-public class FlexPmdAntTask extends Task // NO_UCD
-{
-   private boolean failOnError;
-   private boolean failOnRuleViolation;
-   private File    outputDirectory;
-   private String  packageToExclude;
-   private File    ruleSet;
-   private File    sourceDirectory;
-
-   @Override
-   public final void execute()
-   {
-      try
-      {
-         presetParameters();
-
-         new LoggerUtils().loadConfiguration();
-
-         final FlexPmdXmlEngine engine = new FlexPmdXmlEngine( new FlexPmdParameters( packageToExclude,
-                                                                                      outputDirectory,
-                                                                                      ruleSet,
-                                                                                      sourceDirectory ) );
-         final FlexPmdViolations violations = new FlexPmdViolations();
-
-         engine.executeReport( violations );
-
-         if ( failOnError )
-         {
-            final String message = PmdEngineUtils.findFirstViolationError( violations );
-
-            if ( message.length() > 0 )
-            {
-               throw new BuildException( message );
-            }
-         }
-         if ( failOnRuleViolation
-               && !violations.getViolations().isEmpty() )
-         {
-            throw new BuildException( "At least one violation has been found" );
-         }
-      }
-      catch ( final Exception e )
-      {
-         throw new BuildException( e );
-      }
-   }
-
-   public final String getPackageToExclude()
-   {
-      return packageToExclude;
-   }
-
-   public final void setFailOnError( final boolean failOnErrorToBeSet )
-   {
-      failOnError = failOnErrorToBeSet;
-   }
-
-   public final void setFailOnRuleViolation( final boolean failOnRuleViolation )
-   {
-      this.failOnRuleViolation = failOnRuleViolation;
-   }
-
-   public final void setOutputDirectory( final File outputDirectoryToBeSet )
-   {
-      outputDirectory = outputDirectoryToBeSet;
-   }
-
-   public final void setPackageToExclude( final String packageToExcludeToBeSet )
-   {
-      packageToExclude = packageToExcludeToBeSet;
-   }
-
-   public final void setRuleSet( final File ruleSetToBeSet )
-   {
-      ruleSet = ruleSetToBeSet;
-   }
-
-   public final void setSourceDirectory( final File sourceDirectoryToBeSet )
-   {
-      sourceDirectory = sourceDirectoryToBeSet;
-   }
-
-   private void presetParameters()
-   {
-      if ( packageToExclude == null )
-      {
-         packageToExclude = "";
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-ant-task/src/test/java/com/adobe/ac/pmd/ant/FlexPmdAntTaskTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ant-task/src/test/java/com/adobe/ac/pmd/ant/FlexPmdAntTaskTest.java b/FlexPMD/flex-pmd-ant-task/src/test/java/com/adobe/ac/pmd/ant/FlexPmdAntTaskTest.java
deleted file mode 100644
index 256e871..0000000
--- a/FlexPMD/flex-pmd-ant-task/src/test/java/com/adobe/ac/pmd/ant/FlexPmdAntTaskTest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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.ant;
-
-import java.io.File;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.junit.Test;
-
-import com.adobe.ac.pmd.FlexPmdTestBase;
-
-public class FlexPmdAntTaskTest extends FlexPmdTestBase
-{
-   private static final String TARGET = "target";
-
-   @Test(expected = BuildException.class)
-   public void testExecuteWithFailOnError()
-   {
-      final FlexPmdAntTask task = new FlexPmdAntTask();
-      final Project project = new Project();
-
-      task.setFailOnError( true );
-      task.setSourceDirectory( getTestDirectory() );
-      task.setOutputDirectory( new File( TARGET ) );
-      task.setProject( project );
-      task.execute();
-   }
-
-   @Test(expected = BuildException.class)
-   public void testExecuteWithFailOnViolation()
-   {
-      final FlexPmdAntTask task = new FlexPmdAntTask();
-      final Project project = new Project();
-
-      task.setFailOnRuleViolation( true );
-      task.setPackageToExclude( "" );
-      task.setRuleSet( null );
-      task.setSourceDirectory( getTestDirectory() );
-      task.setOutputDirectory( new File( TARGET ) );
-      task.setProject( project );
-      task.execute();
-   }
-
-   @Test(expected = BuildException.class)
-   public void testExecuteWithoutSettingParameters()
-   {
-      final FlexPmdAntTask task = new FlexPmdAntTask();
-      final Project project = new Project();
-
-      task.setProject( project );
-      task.execute();
-   }
-
-   @Test
-   public void testExecuteWithParameters()
-   {
-      final FlexPmdAntTask task = new FlexPmdAntTask();
-      final Project project = new Project();
-
-      task.setSourceDirectory( getTestDirectory() );
-      task.setOutputDirectory( new File( TARGET ) );
-      task.setProject( project );
-      task.execute();
-      new File( TARGET
-            + "/pmd.xml" ).delete();
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-automator-workflow/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-automator-workflow/pom.xml b/FlexPMD/flex-pmd-automator-workflow/pom.xml
deleted file mode 100644
index d896492..0000000
--- a/FlexPMD/flex-pmd-automator-workflow/pom.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<!--
-
-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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-automator</artifactId>
-	<packaging>pom</packaging>
-	<name>Adobe Flex PMD Mac OSX Automator workflow</name>
-
-	<parent>
-		<artifactId>flex-pmd-hybrid-parent</artifactId>
-		<groupId>com.adobe.ac</groupId>
-		<version>1.3-SNAPSHOT</version>
-		<relativePath>../flex-pmd-hybrid-parent/pom.xml</relativePath>
-	</parent>
-
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-assembly-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>bundle-automator-workflow</id>
-						<goals>
-							<goal>single</goal>
-						</goals>
-						<phase>install</phase>
-						<configuration>
-							<descriptors>
-								<descriptor>src/main/assembly/workflow.xml</descriptor>
-							</descriptors>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-automator-workflow/src/main/assembly/workflow.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-automator-workflow/src/main/assembly/workflow.xml b/FlexPMD/flex-pmd-automator-workflow/src/main/assembly/workflow.xml
deleted file mode 100644
index a7cf1e3..0000000
--- a/FlexPMD/flex-pmd-automator-workflow/src/main/assembly/workflow.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<!--
-
-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.
-
--->
-<assembly>
-    <id>workflow</id>
-    <formats>
-        <format>zip</format>
-    </formats>
-    <includeBaseDirectory>false</includeBaseDirectory>
-    <fileSets>
-        <fileSet>
-            <directory>src/main/automator</directory>
-            <outputDirectory></outputDirectory>
-        </fileSet>
-        <fileSet>
-        	<directory>../flex-pmd-command-line/target/release</directory>
-            <outputDirectory>command-line</outputDirectory>
-        </fileSet>
-        <fileSet>
-        	<directory>../flex-pmd-violations-viewer/target</directory>
-            <outputDirectory>violations-viewer</outputDirectory>
-            <excludes>
-            	<exclude>**/*.xml</exclude>
-            	<exclude>classes</exclude>
-            	<exclude>css</exclude>
-            	<exclude>images</exclude>
-            	<exclude>site</exclude>
-            </excludes>
-        </fileSet>
-    </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-automator-workflow/src/main/automator/run.FlexPMD.workflow/Contents/QuickLook/Preview.pdf
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-automator-workflow/src/main/automator/run.FlexPMD.workflow/Contents/QuickLook/Preview.pdf b/FlexPMD/flex-pmd-automator-workflow/src/main/automator/run.FlexPMD.workflow/Contents/QuickLook/Preview.pdf
deleted file mode 100644
index aded733..0000000
Binary files a/FlexPMD/flex-pmd-automator-workflow/src/main/automator/run.FlexPMD.workflow/Contents/QuickLook/Preview.pdf and /dev/null differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-automator-workflow/src/main/automator/run.FlexPMD.workflow/Contents/document.wflow
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-automator-workflow/src/main/automator/run.FlexPMD.workflow/Contents/document.wflow b/FlexPMD/flex-pmd-automator-workflow/src/main/automator/run.FlexPMD.workflow/Contents/document.wflow
deleted file mode 100644
index 462d407..0000000
--- a/FlexPMD/flex-pmd-automator-workflow/src/main/automator/run.FlexPMD.workflow/Contents/document.wflow
+++ /dev/null
@@ -1,545 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-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.
-
--->
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>AMApplicationBuild</key>
-	<string>153</string>
-	<key>AMApplicationVersion</key>
-	<string>2.0</string>
-	<key>AMDocumentVersion</key>
-	<string>2</string>
-	<key>actions</key>
-	<array>
-		<dict>
-			<key>action</key>
-			<dict>
-				<key>AMAccepts</key>
-				<dict>
-					<key>Container</key>
-					<string>List</string>
-					<key>Optional</key>
-					<true/>
-					<key>Types</key>
-					<array>
-						<string>com.apple.applescript.alias-object</string>
-					</array>
-				</dict>
-				<key>AMActionVersion</key>
-				<string>1.1</string>
-				<key>AMParameterProperties</key>
-				<dict>
-					<key>defaultLocation</key>
-					<dict>
-						<key>isPathPopUp</key>
-						<true/>
-						<key>variableUUIDsInMenu</key>
-						<array/>
-					</dict>
-					<key>granularity</key>
-					<dict/>
-					<key>multipleSelection</key>
-					<dict/>
-					<key>promptMessage</key>
-					<dict>
-						<key>tokenizedValue</key>
-						<array>
-							<string>Choose a source folder for executing FlexPMD against</string>
-						</array>
-					</dict>
-				</dict>
-				<key>AMProvides</key>
-				<dict>
-					<key>Container</key>
-					<string>List</string>
-					<key>Types</key>
-					<array>
-						<string>com.apple.applescript.alias-object</string>
-					</array>
-				</dict>
-				<key>ActionBundlePath</key>
-				<string>/System/Library/Automator/Ask for Finder Items.action</string>
-				<key>ActionName</key>
-				<string>Ask for Finder Items</string>
-				<key>ActionParameters</key>
-				<dict>
-					<key>defaultLocation</key>
-					<string>~</string>
-					<key>granularity</key>
-					<integer>1</integer>
-					<key>multipleSelection</key>
-					<false/>
-					<key>promptMessage</key>
-					<string>Choose a source folder for executing FlexPMD against</string>
-				</dict>
-				<key>Application</key>
-				<array>
-					<string>Finder</string>
-				</array>
-				<key>BundleIdentifier</key>
-				<string>com.apple.Automator.AskForFinderItems</string>
-				<key>CFBundleVersion</key>
-				<string>1.1</string>
-				<key>CanShowSelectedItemsWhenRun</key>
-				<true/>
-				<key>CanShowWhenRun</key>
-				<false/>
-				<key>Category</key>
-				<array>
-					<string>AMCategoryFilesAndFolders</string>
-				</array>
-				<key>Class Name</key>
-				<string>AMAppleScriptAction</string>
-				<key>InputUUID</key>
-				<string>048C977D-98A1-423E-8435-0D294C8AEACB</string>
-				<key>Keywords</key>
-				<array>
-					<string>Find</string>
-					<string>Item</string>
-					<string>File</string>
-					<string>Folder</string>
-					<string>Ask</string>
-					<string>Choose</string>
-					<string>Prompt</string>
-				</array>
-				<key>OutputUUID</key>
-				<string>85D7C03F-8983-4BF2-83C6-7DF3F3838515</string>
-				<key>StartAction</key>
-				<false/>
-				<key>UUID</key>
-				<string>B38DA4F4-3B0A-479A-8996-6FEFB5CE76DE</string>
-				<key>UnlocalizedApplications</key>
-				<array>
-					<string>Finder</string>
-				</array>
-				<key>arguments</key>
-				<dict>
-					<key>0</key>
-					<dict>
-						<key>default value</key>
-						<string>~/Desktop</string>
-						<key>name</key>
-						<string>defaultLocation</string>
-						<key>required</key>
-						<string>0</string>
-						<key>type</key>
-						<string>0</string>
-						<key>uuid</key>
-						<string>0</string>
-					</dict>
-					<key>1</key>
-					<dict>
-						<key>default value</key>
-						<false/>
-						<key>name</key>
-						<string>multipleSelection</string>
-						<key>required</key>
-						<string>0</string>
-						<key>type</key>
-						<string>0</string>
-						<key>uuid</key>
-						<string>1</string>
-					</dict>
-					<key>2</key>
-					<dict>
-						<key>default value</key>
-						<string>Choose a Finder Item:</string>
-						<key>name</key>
-						<string>promptMessage</string>
-						<key>required</key>
-						<string>0</string>
-						<key>type</key>
-						<string>0</string>
-						<key>uuid</key>
-						<string>2</string>
-					</dict>
-					<key>3</key>
-					<dict>
-						<key>default value</key>
-						<integer>0</integer>
-						<key>name</key>
-						<string>granularity</string>
-						<key>required</key>
-						<string>0</string>
-						<key>type</key>
-						<string>0</string>
-						<key>uuid</key>
-						<string>3</string>
-					</dict>
-				</dict>
-				<key>isViewVisible</key>
-				<true/>
-				<key>location</key>
-				<string>457.500000:586.000000</string>
-				<key>nibPath</key>
-				<string>/System/Library/Automator/Ask for Finder Items.action/Contents/Resources/English.lproj/main.nib</string>
-			</dict>
-			<key>isViewVisible</key>
-			<true/>
-		</dict>
-		<dict>
-			<key>action</key>
-			<dict>
-				<key>AMAccepts</key>
-				<dict>
-					<key>Container</key>
-					<string>List</string>
-					<key>Optional</key>
-					<true/>
-					<key>Types</key>
-					<array>
-						<string>com.apple.cocoa.string</string>
-					</array>
-				</dict>
-				<key>AMActionVersion</key>
-				<string>2.0.1</string>
-				<key>AMParameterProperties</key>
-				<dict>
-					<key>COMMAND_STRING</key>
-					<dict/>
-					<key>CheckedForUserDefaultShell</key>
-					<dict/>
-					<key>inputMethod</key>
-					<dict/>
-					<key>shell</key>
-					<dict/>
-					<key>source</key>
-					<dict/>
-				</dict>
-				<key>AMProvides</key>
-				<dict>
-					<key>Container</key>
-					<string>List</string>
-					<key>Types</key>
-					<array>
-						<string>com.apple.cocoa.string</string>
-					</array>
-				</dict>
-				<key>ActionBundlePath</key>
-				<string>/System/Library/Automator/Run Shell Script.action</string>
-				<key>ActionName</key>
-				<string>Run Shell Script</string>
-				<key>ActionParameters</key>
-				<dict>
-					<key>COMMAND_STRING</key>
-					<string>#####################
-#  Script Variables #
-#####################
-
-#
-# The FlexPMD version
-#
-flexPmdVersion=1.0.RC3
-
-#
-# The directory where the FlexPMD automator workflow has been extracted
-#
-flexPmdWorkflowLocation="/Users/xagnetti/Work/repositories/opensource.adobe/flexpmd/trunk/flex-pmd-automator-workflow/target/flex-pmd-automator-${flexPmdVersion}-workflow"
-
-#
-# The directory where the FlexPMD command line client is stored
-#
-flexPmdCommandLineDirectory=${flexPmdWorkflowLocation}/command-line
-
-#
-# The directory where the FlexPMD violations viewer application is stored
-#
-viewerDirectory=${flexPmdWorkflowLocation}/violations-viewer
-
-#
-# The temporary directory where files are stored by the script
-#
-tmpDirectory=~/flexpmd
-
-
-#####################
-#    Script Core    #
-#####################
-
-tmpSourceDirectory=${tmpDirectory}/sourceDirectory
-resultDirectory=${tmpDirectory}
-tmpStdout=${tmpDirectory}/stdout
-tmpStderr=${tmpDirectory}/stderr
-
-rm -rf ${tmpDirectory}
-mkdir ${tmpDirectory}
-rm ${tmpSourceDirectory}
-rm ${resultDirectory}/pmd.xml
-rm ${tmpStderr}
-rm ${tmpStdout}
-
-cat &gt; ${tmpSourceDirectory}
-
-sourceDirectory=`cat ${tmpSourceDirectory}`
-
-cd ${flexPmdCommandLineDirectory}
-
-java -jar flex-pmd-command-line-${flexPmdVersion}.jar -s "${sourceDirectory}" -o ${resultDirectory} &gt; ${tmpStdout} 2&gt; ${tmpStderr}
-
-report=${resultDirectory}/pmd.xml
-
-echo file://${viewerDirectory}/flex-pmd-violations-viewer-${flexPmdVersion}.html?report=$report
-</string>
-					<key>CheckedForUserDefaultShell</key>
-					<true/>
-					<key>inputMethod</key>
-					<integer>0</integer>
-					<key>shell</key>
-					<string>/bin/bash</string>
-					<key>source</key>
-					<string></string>
-				</dict>
-				<key>Application</key>
-				<array>
-					<string>Automator</string>
-				</array>
-				<key>BundleIdentifier</key>
-				<string>com.apple.RunShellScript</string>
-				<key>CFBundleVersion</key>
-				<string>2.0.1</string>
-				<key>CanShowSelectedItemsWhenRun</key>
-				<false/>
-				<key>CanShowWhenRun</key>
-				<true/>
-				<key>Category</key>
-				<array>
-					<string>AMCategoryUtilities</string>
-				</array>
-				<key>Class Name</key>
-				<string>RunShellScriptAction</string>
-				<key>InputUUID</key>
-				<string>403A6D3E-FD99-4B71-8D42-C1C2E54807E3</string>
-				<key>Keywords</key>
-				<array>
-					<string>Shell</string>
-					<string>Script</string>
-					<string>Command</string>
-					<string>Run</string>
-					<string>Unix</string>
-				</array>
-				<key>OutputUUID</key>
-				<string>457C1F3B-569E-467A-95C7-DAFC85801AD5</string>
-				<key>ShowWhenRun</key>
-				<false/>
-				<key>UUID</key>
-				<string>7F7B8E52-6DD4-47FA-AF9D-74246B8DFA1A</string>
-				<key>UnlocalizedApplications</key>
-				<array>
-					<string>Automator</string>
-				</array>
-				<key>arguments</key>
-				<dict>
-					<key>0</key>
-					<dict>
-						<key>default value</key>
-						<integer>0</integer>
-						<key>name</key>
-						<string>inputMethod</string>
-						<key>required</key>
-						<string>0</string>
-						<key>type</key>
-						<string>0</string>
-						<key>uuid</key>
-						<string>0</string>
-					</dict>
-					<key>1</key>
-					<dict>
-						<key>default value</key>
-						<string>/bin/sh</string>
-						<key>name</key>
-						<string>shell</string>
-						<key>required</key>
-						<string>0</string>
-						<key>type</key>
-						<string>0</string>
-						<key>uuid</key>
-						<string>1</string>
-					</dict>
-					<key>2</key>
-					<dict>
-						<key>default value</key>
-						<string></string>
-						<key>name</key>
-						<string>source</string>
-						<key>required</key>
-						<string>0</string>
-						<key>type</key>
-						<string>0</string>
-						<key>uuid</key>
-						<string>2</string>
-					</dict>
-					<key>3</key>
-					<dict>
-						<key>default value</key>
-						<string></string>
-						<key>name</key>
-						<string>COMMAND_STRING</string>
-						<key>required</key>
-						<string>0</string>
-						<key>type</key>
-						<string>0</string>
-						<key>uuid</key>
-						<string>3</string>
-					</dict>
-					<key>4</key>
-					<dict>
-						<key>default value</key>
-						<false/>
-						<key>name</key>
-						<string>CheckedForUserDefaultShell</string>
-						<key>required</key>
-						<string>0</string>
-						<key>type</key>
-						<string>0</string>
-						<key>uuid</key>
-						<string>4</string>
-					</dict>
-				</dict>
-				<key>isViewVisible</key>
-				<true/>
-				<key>location</key>
-				<string>457.500000:431.000000</string>
-				<key>nibPath</key>
-				<string>/System/Library/Automator/Run Shell Script.action/Contents/Resources/English.lproj/main.nib</string>
-			</dict>
-			<key>isViewVisible</key>
-			<true/>
-		</dict>
-		<dict>
-			<key>action</key>
-			<dict>
-				<key>AMAccepts</key>
-				<dict>
-					<key>Container</key>
-					<string>List</string>
-					<key>Optional</key>
-					<false/>
-					<key>Types</key>
-					<array>
-						<string>com.apple.cocoa.url</string>
-					</array>
-				</dict>
-				<key>AMActionVersion</key>
-				<string>1.0</string>
-				<key>AMParameterProperties</key>
-				<dict/>
-				<key>AMProvides</key>
-				<dict>
-					<key>Container</key>
-					<string>List</string>
-					<key>Types</key>
-					<array>
-						<string>com.apple.cocoa.url</string>
-					</array>
-				</dict>
-				<key>AMRequiredResources</key>
-				<array/>
-				<key>ActionBundlePath</key>
-				<string>/System/Library/Automator/Display Webpages 2.action</string>
-				<key>ActionName</key>
-				<string>Display Webpages</string>
-				<key>ActionParameters</key>
-				<dict/>
-				<key>Application</key>
-				<array>
-					<string>Safari</string>
-				</array>
-				<key>BundleIdentifier</key>
-				<string>com.apple.Automator.Display_Webpages</string>
-				<key>CFBundleVersion</key>
-				<string>1.0</string>
-				<key>CanShowSelectedItemsWhenRun</key>
-				<false/>
-				<key>CanShowWhenRun</key>
-				<false/>
-				<key>Category</key>
-				<array>
-					<string>AMCategoryInternet</string>
-				</array>
-				<key>Class Name</key>
-				<string>Display_Webpages</string>
-				<key>InputUUID</key>
-				<string>84EA6E4D-9337-4CF6-9976-60DA2E4DB5FC</string>
-				<key>Keywords</key>
-				<array>
-					<string>URL</string>
-					<string>Web</string>
-					<string>Display</string>
-					<string>Open</string>
-					<string>Show</string>
-				</array>
-				<key>OutputUUID</key>
-				<string>8F04C323-3143-449D-8C71-0C5CACC0C875</string>
-				<key>UUID</key>
-				<string>89B93EE5-8B2B-48D4-B0D9-1AC49BB0AA6D</string>
-				<key>UnlocalizedApplications</key>
-				<array>
-					<string>Safari</string>
-				</array>
-				<key>arguments</key>
-				<dict/>
-			</dict>
-		</dict>
-	</array>
-	<key>connectors</key>
-	<dict>
-		<key>073CDD95-EB15-47E3-AE4D-9667F1C01ECF</key>
-		<dict>
-			<key>from</key>
-			<string>B38DA4F4-3B0A-479A-8996-6FEFB5CE76DE - B38DA4F4-3B0A-479A-8996-6FEFB5CE76DE</string>
-			<key>to</key>
-			<string>7F7B8E52-6DD4-47FA-AF9D-74246B8DFA1A - 7F7B8E52-6DD4-47FA-AF9D-74246B8DFA1A</string>
-		</dict>
-		<key>56A224D4-DCA7-469A-974D-DAAAFF5B5871</key>
-		<dict>
-			<key>from</key>
-			<string>7F7B8E52-6DD4-47FA-AF9D-74246B8DFA1A - 7F7B8E52-6DD4-47FA-AF9D-74246B8DFA1A</string>
-			<key>to</key>
-			<string>89B93EE5-8B2B-48D4-B0D9-1AC49BB0AA6D - 89B93EE5-8B2B-48D4-B0D9-1AC49BB0AA6D</string>
-		</dict>
-	</dict>
-	<key>state</key>
-	<dict>
-		<key>EditorSplitViewPosition</key>
-		<real>576</real>
-		<key>MainSplitViewPosition_v2</key>
-		<real>525</real>
-		<key>windowFrame</key>
-		<string>{{0, 51}, {1440, 827}}</string>
-		<key>windowFrameTopLeft</key>
-		<string>{{0, 0}, {1440, 827}}</string>
-		<key>workflowViewScrollPosition</key>
-		<string>{{0, 0}, {915, 576}}</string>
-	</dict>
-	<key>variables</key>
-	<array>
-		<dict>
-			<key>UUID</key>
-			<string>12F77683-5982-4DA7-A149-C34344BC6E5E</string>
-			<key>identifier</key>
-			<string>com.apple.Automator.Variable.Path</string>
-			<key>name</key>
-			<string>New Path</string>
-			<key>value</key>
-			<string>~/Desktop</string>
-		</dict>
-	</array>
-</dict>
-</plist>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-bundles/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-bundles/pom.xml b/FlexPMD/flex-pmd-bundles/pom.xml
deleted file mode 100644
index 4251e89..0000000
--- a/FlexPMD/flex-pmd-bundles/pom.xml
+++ /dev/null
@@ -1,129 +0,0 @@
-<!--
-
-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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>${project.parent.artifactId}-all-in-one-bundle</artifactId>
-	<name>Adobe Flex PMD All-in-one bundle</name>
-	<packaging>pom</packaging>
-
-	<parent>
-		<artifactId>flex-pmd-hybrid-parent</artifactId>
-		<groupId>com.adobe.ac</groupId>
-		<version>1.3-SNAPSHOT</version>
-		<relativePath>../flex-pmd-hybrid-parent/pom.xml</relativePath>
-	</parent>
-
-	<dependencies>
-	
-
-		<dependency>
-			<groupId>com.martiansoftware</groupId>
-			<artifactId>jsap</artifactId>
-			<version>${jsap.version}</version>
-		</dependency>
-		
-		<!-- FlexPMD -->
-	
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-ant-task</artifactId>
-			<version>${project.parent.version}</version>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-command-line</artifactId>
-			<version>${project.parent.version}</version>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-automator</artifactId>
-			<version>${project.parent.version}</version>
-			<type>pom</type>
-			<scope>compile</scope>
-		</dependency>
-
-		<!-- FlexCPD -->
-
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-cpd-ant-task</artifactId>
-			<version>${project.parent.version}</version>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-cpd-command-line</artifactId>
-			<version>${project.parent.version}</version>
-			<scope>compile</scope>
-		</dependency>
-
-		<!-- FlexMetrics -->
-		
-	    <dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-metrics-ant-task</artifactId>
-			<version>${project.parent.version}</version>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-metrics-command-line</artifactId>
-			<version>${project.parent.version}</version>
-			<scope>compile</scope>
-		</dependency>
-
-	</dependencies>
-
-	<build>
-		<plugins>
-
-			<plugin>
-				<artifactId>maven-antrun-plugin</artifactId>
-				<version>${maven-antrun-plugin.version}</version>
-				<executions>
-					<execution>
-						<id>package-ant-task</id>
-						<phase>install</phase>
-						<configuration>
-							<tasks>
-								<mkdir dir="${project.build.directory}/release" />
-								<unzip src="${project.build.directory}/../../flex-pmd-ant-task/target/flex-pmd-ant-task-${project.parent.version}.zip" dest="${project.build.directory}/release" />
-								<unzip src="${project.build.directory}/../../flex-pmd-cpd-ant-task/target/flex-pmd-cpd-ant-task-${project.parent.version}.zip" dest="${project.build.directory}/release" />
-								<unzip src="${project.build.directory}/../../flex-pmd-metrics-ant-task/target/flex-pmd-metrics-ant-task-${project.parent.version}.zip" dest="${project.build.directory}/release" />
-								<unzip src="${project.build.directory}/../../flex-pmd-command-line/target/flex-pmd-command-line-${project.parent.version}.zip" dest="${project.build.directory}/release" />
-								<unzip src="${project.build.directory}/../../flex-pmd-cpd-command-line/target/flex-pmd-cpd-command-line-${project.parent.version}.zip" dest="${project.build.directory}/release" />
-								<unzip src="${project.build.directory}/../../flex-pmd-metrics-command-line/target/flex-pmd-metrics-command-line-${project.parent.version}.zip" dest="${project.build.directory}/release" />
-								<unzip src="${project.build.directory}/../../flex-pmd-automator-workflow/target/flex-pmd-automator-${project.parent.version}-workflow.zip" dest="${project.build.directory}/release" />
-								<delete dir="${project.build.directory}/release/command-line" />
-								<zip destfile="${project.build.directory}/${project.build.finalName}.zip" basedir="${project.build.directory}/release" excludes="*.zip" />
-							</tasks>
-						</configuration>
-						<goals>
-							<goal>run</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-
-		</plugins>
-	</build>
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-command-line-api/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-command-line-api/.pmd b/FlexPMD/flex-pmd-command-line-api/.pmd
deleted file mode 100644
index b5c19d9..0000000
--- a/FlexPMD/flex-pmd-command-line-api/.pmd
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-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.
-
--->
-<pmd>
-    <useProjectRuleSet>false</useProjectRuleSet>
-    <ruleSetFile>../flex-pmd-parent/pmd.xml</ruleSetFile>
-    <includeDerivedFiles>false</includeDerivedFiles>
-    <violationsAsErrors>true</violationsAsErrors>
-</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-command-line-api/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-command-line-api/pom.xml b/FlexPMD/flex-pmd-command-line-api/pom.xml
deleted file mode 100644
index cdd9c3e..0000000
--- a/FlexPMD/flex-pmd-command-line-api/pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<!--
-
-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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-command-line-api</artifactId>
-	<name>Adobe Flex PMD Command line API</name>
-
-
-  <parent>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-java-parent</artifactId>
-	<version>1.3-SNAPSHOT</version>
-	<relativePath>../flex-pmd-java-parent/pom.xml</relativePath>
-  </parent>
-  
-	<dependencies>
-		<dependency>
-			<groupId>com.martiansoftware</groupId>
-			<artifactId>jsap</artifactId>
-			<version>${jsap.version}</version>
-		</dependency>
-	</dependencies>
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/CommandLineOptions.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/CommandLineOptions.java b/FlexPMD/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/CommandLineOptions.java
deleted file mode 100644
index e8aa66e..0000000
--- a/FlexPMD/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/CommandLineOptions.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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;
-
-public enum CommandLineOptions implements ICommandLineOptions
-{
-   EXLUDE_PACKAGE("excludePackage"),
-   MXML_FACTOR("mxmlFactor"),
-   OUTPUT("outputDirectory"),
-   RULE_SET("ruleSet"),
-   SOURCE_DIRECTORY("sourceDirectory");
-
-   private String name;
-
-   private CommandLineOptions( final String nameToBeSet )
-   {
-      name = nameToBeSet;
-   }
-
-   @Override
-   public String toString()
-   {
-      return name;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/CommandLineUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/CommandLineUtils.java b/FlexPMD/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/CommandLineUtils.java
deleted file mode 100644
index ba212a4..0000000
--- a/FlexPMD/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/CommandLineUtils.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.martiansoftware.jsap.FlaggedOption;
-import com.martiansoftware.jsap.JSAP;
-import com.martiansoftware.jsap.JSAPException;
-
-public final class CommandLineUtils
-{
-   public static List< File > computeSourceList( final String source )
-   {
-      if ( !source.contains( "," ) )
-      {
-         return null;
-      }
-      final List< File > sourceList = new ArrayList< File >();
-      for ( int i = 0; i < source.split( "," ).length; i++ )
-      {
-         sourceList.add( new File( source.split( "," )[ i ] ) ); // NOPMD
-      }
-      return sourceList;
-   }
-
-   public static void registerParameter( final JSAP jsap,
-                                         final ICommandLineOptions option,
-                                         final boolean required ) throws JSAPException
-   {
-      final String optionName = option.toString();
-
-      jsap.registerParameter( new FlaggedOption( optionName ).setStringParser( JSAP.STRING_PARSER )
-                                                             .setRequired( required )
-                                                             .setShortFlag( optionName.charAt( 0 ) )
-                                                             .setLongFlag( optionName ) );
-   }
-
-   private CommandLineUtils()
-   {
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/ICommandLineOptions.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/ICommandLineOptions.java b/FlexPMD/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/ICommandLineOptions.java
deleted file mode 100644
index 8d0e250..0000000
--- a/FlexPMD/flex-pmd-command-line-api/src/main/java/com/adobe/ac/pmd/ICommandLineOptions.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * 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;
-
-public interface ICommandLineOptions
-{
-
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-command-line-api/src/test/java/com/adobe/ac/pmd/CommandLineOptionsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-command-line-api/src/test/java/com/adobe/ac/pmd/CommandLineOptionsTest.java b/FlexPMD/flex-pmd-command-line-api/src/test/java/com/adobe/ac/pmd/CommandLineOptionsTest.java
deleted file mode 100644
index 9ced093..0000000
--- a/FlexPMD/flex-pmd-command-line-api/src/test/java/com/adobe/ac/pmd/CommandLineOptionsTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-
-public class CommandLineOptionsTest
-{
-   @Test
-   public void testToString()
-   {
-      assertEquals( "outputDirectory",
-                    CommandLineOptions.OUTPUT.toString() );
-   }
-}


[18/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/engine/AbstractMetrics.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/engine/AbstractMetrics.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/engine/AbstractMetrics.java
new file mode 100644
index 0000000..53e4fec
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/engine/AbstractMetrics.java
@@ -0,0 +1,234 @@
+/*
+ * 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.metrics.engine;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileOutputStream;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.logging.Logger;
+
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.DocumentHelper;
+import org.dom4j.io.OutputFormat;
+import org.dom4j.io.XMLWriter;
+
+import com.adobe.ac.ncss.filters.FlexFilter;
+import com.adobe.ac.pmd.metrics.ClassMetrics;
+import com.adobe.ac.pmd.metrics.FunctionMetrics;
+import com.adobe.ac.pmd.metrics.PackageMetrics;
+import com.adobe.ac.pmd.metrics.ProjectMetrics;
+
+public abstract class AbstractMetrics
+{
+   private static class DirectoryFilter implements FileFilter
+   {
+      public boolean accept( final File file )
+      {
+         return file.isDirectory();
+      }
+   }
+
+   private static final Logger LOGGER = Logger.getLogger( AbstractMetrics.class.getName() );
+
+   private static Collection< File > listFiles( final File directory,
+                                                final FilenameFilter filter,
+                                                final boolean recurse )
+   {
+      final Collection< File > files = new ArrayList< File >();
+      final File[] entries = directory.listFiles();
+      for ( final File entry : entries )
+      {
+         if ( filter == null
+               || filter.accept( directory,
+                                 entry.getName() ) )
+         {
+            files.add( entry );
+         }
+         if ( recurse
+               && entry.isDirectory() )
+         {
+            files.addAll( listFiles( entry,
+                                     filter,
+                                     recurse ) );
+         }
+      }
+      return files;
+   }
+
+   private static Collection< File > listNonEmptyDirectories( final File rootDirectory,
+                                                              final boolean recurse )
+   {
+      final Collection< File > files = new ArrayList< File >();
+      final File[] entries = rootDirectory.listFiles( new DirectoryFilter() );
+      final FlexFilter flexFilter = new FlexFilter();
+
+      for ( final File entry : entries )
+      {
+         if ( entry.isDirectory()
+               && !listFiles( entry,
+                              flexFilter,
+                              false ).isEmpty() )
+         {
+            files.add( entry );
+         }
+         if ( recurse
+               && entry.isDirectory() )
+         {
+            files.addAll( listNonEmptyDirectories( entry,
+                                                   recurse ) );
+         }
+      }
+      return files;
+   }
+
+   private Collection< File > nonEmptyDirectories = null;
+   private File               sourceDirectory     = null;
+
+   public AbstractMetrics( final File sourceDirectoryPath )
+   {
+      super();
+      if ( sourceDirectoryPath != null )
+      {
+         this.nonEmptyDirectories = listNonEmptyDirectories( sourceDirectoryPath,
+                                                             true );
+         this.nonEmptyDirectories.add( sourceDirectoryPath );
+         this.sourceDirectory = sourceDirectoryPath;
+      }
+   }
+
+   public void execute( final File outputFile ) throws DocumentException,
+                                               IOException
+   {
+      final String builtReport = buildReport( loadMetrics() );
+      final Document document = DocumentHelper.parseText( builtReport );
+      final OutputFormat format = OutputFormat.createPrettyPrint();
+
+      if ( !outputFile.exists() )
+      {
+         if ( outputFile.createNewFile() == false )
+         {
+            LOGGER.warning( "Could not create a new output file" );
+         }
+      }
+
+      final XMLWriter writer = new XMLWriter( new FileOutputStream( outputFile ), format );
+      writer.write( document );
+      writer.close();
+   }
+
+   public abstract ProjectMetrics loadMetrics();
+
+   protected Collection< File > getNonEmptyDirectories()
+   {
+      return nonEmptyDirectories;
+   }
+
+   protected File getSourceDirectory()
+   {
+      return sourceDirectory;
+   }
+
+   private String addFunctions( final ProjectMetrics metrics )
+   {
+      final StringBuffer buffer = new StringBuffer( 250 );
+
+      buffer.append( "<functions>" );
+
+      for ( final FunctionMetrics functionMetrics : metrics.getFunctions() )
+      {
+         buffer.append( functionMetrics.toXmlString() );
+      }
+
+      buffer.append( MessageFormat.format( "<function_averages>"
+                                                 + "<ncss>{0}</ncss>" + "<javadocs>{1}</javadocs>"
+                                                 + "<javadoc_lines>{1}</javadoc_lines>"
+                                                 + "<single_comment_lines>0</single_comment_lines>"
+                                                 + "<multi_comment_lines>0</multi_comment_lines>"
+                                                 + "</function_averages><ncss>{2}</ncss>" + "</functions>",
+                                           String.valueOf( metrics.getAverageFunctions()
+                                                                  .getAverageStatements() ),
+                                           String.valueOf( metrics.getAverageFunctions().getAverageDocs() ),
+                                           String.valueOf( metrics.getTotalPackages().getTotalStatements() ) ) );
+
+      return buffer.toString();
+   }
+
+   private String addObjects( final ProjectMetrics metrics )
+   {
+      final StringBuffer buffer = new StringBuffer( 300 );
+
+      buffer.append( "<objects>" );
+
+      for ( final ClassMetrics classMetrics : metrics.getClasses() )
+      {
+         buffer.append( classMetrics.toXmlString() );
+      }
+
+      buffer.append( MessageFormat.format( "<averages>"
+                                                 + "<classes>{0}</classes>" + "<functions>{1}</functions>"
+                                                 + "<ncss>{2}</ncss>" + "<javadocs>{3}</javadocs>"
+                                                 + "<javadoc_lines>{3}</javadoc_lines>"
+                                                 + "<single_comment_lines>0</single_comment_lines>"
+                                                 + "<multi_comment_lines>0</multi_comment_lines>"
+                                                 + "</averages><ncss>{4}</ncss>" + "</objects>",
+                                           String.valueOf( metrics.getClasses().size() ),
+                                           String.valueOf( metrics.getAverageObjects().getAverageFunctions() ),
+                                           String.valueOf( metrics.getAverageObjects().getAverageStatements() ),
+                                           String.valueOf( metrics.getAverageObjects().getAverageDocs() ),
+                                           String.valueOf( metrics.getTotalPackages().getTotalStatements() ) ) );
+      return buffer.toString();
+   }
+
+   private String addPackages( final ProjectMetrics metrics )
+   {
+      final StringBuffer buffer = new StringBuffer( 228 );
+
+      buffer.append( "<packages>" );
+
+      for ( final PackageMetrics packageMetrics : metrics.getPackages() )
+      {
+         buffer.append( packageMetrics.toXmlString() );
+      }
+
+      buffer.append( metrics.getTotalPackages().getContreteXml() );
+      buffer.append( "</packages>" );
+
+      return buffer.toString();
+   }
+
+   private String buildReport( final ProjectMetrics metrics )
+   {
+      final StringBuffer buf = new StringBuffer( 70 );
+
+      buf.append( "<?xml version=\"1.0\"?><javancss><date>"
+            + metrics.getDate() + "</date><time>" + metrics.getTime() + "</time>" );
+
+      buf.append( addPackages( metrics ) );
+      buf.append( addObjects( metrics ) );
+      buf.append( addFunctions( metrics ) );
+
+      buf.append( "</javancss>" );
+
+      return buf.toString();
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/engine/FlexMetrics.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/engine/FlexMetrics.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/engine/FlexMetrics.java
new file mode 100644
index 0000000..f50a44e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/engine/FlexMetrics.java
@@ -0,0 +1,148 @@
+/*
+ * 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.metrics.engine;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.logging.Logger;
+
+import net.sourceforge.pmd.PMDException;
+
+import com.adobe.ac.ncss.filters.FlexFilter;
+import com.adobe.ac.ncss.utils.FileUtils;
+import com.adobe.ac.pmd.files.FileSetUtils;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.metrics.AverageClassMetrics;
+import com.adobe.ac.pmd.metrics.AverageFunctionMetrics;
+import com.adobe.ac.pmd.metrics.ClassMetrics;
+import com.adobe.ac.pmd.metrics.InternalFunctionMetrics;
+import com.adobe.ac.pmd.metrics.MetricUtils;
+import com.adobe.ac.pmd.metrics.PackageMetrics;
+import com.adobe.ac.pmd.metrics.ProjectMetrics;
+import com.adobe.ac.pmd.metrics.TotalPackageMetrics;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IPackage;
+
+public final class FlexMetrics extends AbstractMetrics
+{
+   private static final FlexFilter       FLEX_FILTER = new FlexFilter();
+   private static final Logger           LOGGER      = Logger.getLogger( FlexMetrics.class.getName() );
+
+   private final Map< String, IPackage > asts;
+   private final double                  mxmlFactor;
+
+   public FlexMetrics( final File sourceDirectoryPath,
+                       final double mxmlFactorToBeSet )
+   {
+      super( sourceDirectoryPath );
+
+      asts = initAst();
+      mxmlFactor = mxmlFactorToBeSet;
+   }
+
+   @Override
+   public ProjectMetrics loadMetrics()
+   {
+      final ProjectMetrics metrics = new ProjectMetrics();
+
+      for ( final File directory : getNonEmptyDirectories() )
+      {
+         final Collection< File > classesInPackage = FileUtils.listFiles( directory,
+                                                                          FLEX_FILTER,
+                                                                          false );
+
+         if ( directory.isDirectory()
+               && !classesInPackage.isEmpty() )
+         {
+            final String packageFullName = MetricUtils.getQualifiedName( getSourceDirectory(),
+                                                                         directory );
+            int functionsInPackage = 0;
+            int ncssInPackage = 0;
+            int asDocsInPackage = 0;
+            int multipleLineCommentInPackage = 0;
+            final int importsInPackage = 0;
+
+            for ( final File fileInPackage : classesInPackage )
+            {
+               IClass classNode = null;
+               InternalFunctionMetrics functionMetrics = null;
+               final IFlexFile file = com.adobe.ac.pmd.files.impl.FileUtils.create( fileInPackage,
+                                                                                    getSourceDirectory() );
+               if ( asts.containsKey( file.getFullyQualifiedName() )
+                     && asts.get( file.getFullyQualifiedName() ).getClassNode() != null )
+               {
+                  classNode = asts.get( file.getFullyQualifiedName() ).getClassNode();
+                  functionsInPackage += classNode.getFunctions().size();
+                  functionMetrics = InternalFunctionMetrics.create( metrics,
+                                                                    packageFullName,
+                                                                    classNode );
+                  asDocsInPackage += functionMetrics.getAsDocsInClass();
+                  multipleLineCommentInPackage += functionMetrics.getMultipleLineCommentInClass();
+                  ncssInPackage += functionMetrics.getNcssInClass();
+               }
+               final ClassMetrics classMetrics = ClassMetrics.create( packageFullName,
+                                                                      fileInPackage,
+                                                                      functionMetrics,
+                                                                      classNode,
+                                                                      file,
+                                                                      mxmlFactor );
+               asDocsInPackage += classMetrics.getAsDocs();
+               multipleLineCommentInPackage += classMetrics.getMultiLineComments();
+               metrics.getClassMetrics().add( classMetrics );
+            }
+            metrics.getPackageMetrics().add( PackageMetrics.create( classesInPackage,
+                                                                    packageFullName,
+                                                                    functionsInPackage,
+                                                                    ncssInPackage,
+                                                                    asDocsInPackage,
+                                                                    multipleLineCommentInPackage,
+                                                                    importsInPackage ) );
+         }
+      }
+      setFinalMetrics( metrics );
+
+      return metrics;
+   }
+
+   private Map< String, IPackage > initAst()
+   {
+      Map< String, IPackage > result = new LinkedHashMap< String, IPackage >();
+      try
+      {
+         result = FileSetUtils.computeAsts( com.adobe.ac.pmd.files.impl.FileUtils.computeFilesList( getSourceDirectory(),
+                                                                                                    null,
+                                                                                                    "",
+                                                                                                    null ) );
+      }
+      catch ( final PMDException e )
+      {
+         LOGGER.warning( e.getMessage() );
+      }
+      return result;
+   }
+
+   private void setFinalMetrics( final ProjectMetrics metrics )
+   {
+      metrics.setTotalPackages( TotalPackageMetrics.create( metrics.getPackageMetrics() ) );
+      metrics.setAverageFunctions( AverageFunctionMetrics.create( metrics.getFunctionMetrics(),
+                                                                  metrics.getTotalPackages() ) );
+      metrics.setAverageObjects( AverageClassMetrics.create( metrics.getClassMetrics(),
+                                                             metrics.getTotalPackages() ) );
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/ClassMetricsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/ClassMetricsTest.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/ClassMetricsTest.java
new file mode 100644
index 0000000..4faf944
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/ClassMetricsTest.java
@@ -0,0 +1,162 @@
+/*
+ * 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.metrics;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.FileSetUtils;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.impl.NodeFactory;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+public class ClassMetricsTest extends FlexPmdTestBase
+{
+   @Test
+   public void testBug157() throws PMDException
+   {
+      final IFlexFile file = getTestFiles().get( "bug.FlexPMD157.as" );
+      final IParserNode ast = FileSetUtils.buildAst( file );
+      final IClass classNode = NodeFactory.createPackage( ast ).getClassNode();
+      final ClassMetrics classMetrics = ClassMetrics.create( "bug",
+                                                             new File( file.getFilePath() ),
+                                                             InternalFunctionMetrics.create( new ProjectMetrics(),
+                                                                                             file.getFullyQualifiedName(),
+                                                                                             classNode ),
+                                                             classNode,
+                                                             file,
+                                                             0 );
+
+      assertEquals( "<object><name>bug.FlexPMD157</name><ccn>0</ccn><ncss>3</ncss><javadocs>0</javadocs>"
+                          + "<javadoc_lines>0</javadoc_lines><multi_comment_lines>0</multi_comment_lines>"
+                          + "<single_comment_lines>0</single_comment_lines><functions>0</functions></object>",
+                    classMetrics.toXmlString() );
+   }
+
+   @Test
+   public void testBug181() throws PMDException
+   {
+      final IFlexFile file = getTestFiles().get( "bug.FlexPMD181.as" );
+      final IParserNode ast = FileSetUtils.buildAst( file );
+      final IClass classNode = NodeFactory.createPackage( ast ).getClassNode();
+      final ClassMetrics classMetrics = ClassMetrics.create( "bug",
+                                                             new File( file.getFilePath() ),
+                                                             InternalFunctionMetrics.create( new ProjectMetrics(),
+                                                                                             file.getFullyQualifiedName(),
+                                                                                             classNode ),
+                                                             classNode,
+                                                             file,
+                                                             0 );
+
+      assertEquals( "<object><name>bug.FlexPMD181</name><ccn>3</ccn><ncss>379</ncss><javadocs>1403"
+                          + "</javadocs><javadoc_lines>1403</javadoc_lines><multi_comment_lines>4"
+                          + "</multi_comment_lines><single_comment_lines>0</single_comment_lines>"
+                          + "<functions>81</functions></object>",
+                    classMetrics.toXmlString() );
+   }
+
+   @Test
+   public void testBug232() throws PMDException
+   {
+      final IFlexFile file = getTestFiles().get( "bug.FlexPMD232.as" );
+      final IParserNode ast = FileSetUtils.buildAst( file );
+      final IClass classNode = NodeFactory.createPackage( ast ).getClassNode();
+      final ClassMetrics classMetrics = ClassMetrics.create( "bug",
+                                                             new File( file.getFilePath() ),
+                                                             InternalFunctionMetrics.create( new ProjectMetrics(),
+                                                                                             file.getFullyQualifiedName(),
+                                                                                             classNode ),
+                                                             classNode,
+                                                             file,
+                                                             0 );
+
+      assertEquals( "<object><name>bug.FlexPMD232</name><ccn>4</ccn><ncss>7</ncss><javadocs>0</javadocs>"
+                          + "<javadoc_lines>0</javadoc_lines><multi_comment_lines>0</multi_comment_lines>"
+                          + "<single_comment_lines>0</single_comment_lines><functions>1</functions></object>",
+                    classMetrics.toXmlString() );
+   }
+
+   @Test
+   public void testBug233() throws PMDException
+   {
+      final IFlexFile file = getTestFiles().get( "bug.Duane.mxml" );
+      final IParserNode ast = FileSetUtils.buildAst( file );
+      final IClass classNode = NodeFactory.createPackage( ast ).getClassNode();
+      final ClassMetrics classMetrics = ClassMetrics.create( "bug",
+                                                             new File( file.getFilePath() ),
+                                                             InternalFunctionMetrics.create( new ProjectMetrics(),
+                                                                                             file.getFullyQualifiedName(),
+                                                                                             classNode ),
+                                                             classNode,
+                                                             file,
+                                                             1 );
+
+      assertEquals( "<object><name>bug.Duane</name><ccn>1</ccn><ncss>217</ncss><javadocs>0</javadocs>"
+                          + "<javadoc_lines>0</javadoc_lines><multi_comment_lines>0</multi_comment_lines>"
+                          + "<single_comment_lines>0</single_comment_lines><functions>8</functions></object>",
+                    classMetrics.toXmlString() );
+   }
+
+   @Test
+   public void testToXmlString() throws PMDException
+   {
+      final IFlexFile file = getTestFiles().get( "RadonDataGrid.as" );
+      final IParserNode ast = FileSetUtils.buildAst( file );
+      final IClass classNode = NodeFactory.createPackage( ast ).getClassNode();
+      final ClassMetrics classMetrics = ClassMetrics.create( "com.adobe.ac",
+                                                             new File( file.getFilePath() ),
+                                                             InternalFunctionMetrics.create( new ProjectMetrics(),
+                                                                                             file.getFullyQualifiedName(),
+                                                                                             classNode ),
+                                                             classNode,
+                                                             file,
+                                                             0 );
+
+      assertEquals( "<object><name>com.adobe.ac.RadonDataGrid</name><ccn>3</ccn><ncss>87</ncss><javadocs>0</javadocs>"
+                          + "<javadoc_lines>0</javadoc_lines><multi_comment_lines>0</multi_comment_lines>"
+                          + "<single_comment_lines>0</single_comment_lines><functions>7</functions></object>",
+                    classMetrics.toXmlString() );
+   }
+
+   @Test
+   public void testToXmlStringWithMultiLineComments() throws PMDException
+   {
+      final IFlexFile file = getTestFiles().get( "bug.FlexPMD60.as" );
+      final IParserNode ast = FileSetUtils.buildAst( file );
+      final IClass classNode = NodeFactory.createPackage( ast ).getClassNode();
+      final ClassMetrics classMetrics = ClassMetrics.create( "bug",
+                                                             new File( file.getFilePath() ),
+                                                             InternalFunctionMetrics.create( new ProjectMetrics(),
+                                                                                             file.getFullyQualifiedName(),
+                                                                                             classNode ),
+                                                             classNode,
+                                                             file,
+                                                             0 );
+
+      assertEquals( "<object><name>bug.FlexPMD60</name><ccn>1</ccn><ncss>4</ncss><javadocs>9</javadocs>"
+                          + "<javadoc_lines>9</javadoc_lines><multi_comment_lines>7</multi_comment_lines>"
+                          + "<single_comment_lines>0</single_comment_lines><functions>1</functions></object>",
+                    classMetrics.toXmlString() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/InternalFunctionMetricsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/InternalFunctionMetricsTest.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/InternalFunctionMetricsTest.java
new file mode 100644
index 0000000..b59ba0d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/InternalFunctionMetricsTest.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.metrics;
+
+import static org.junit.Assert.assertEquals;
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.FileSetUtils;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.impl.NodeFactory;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+public class InternalFunctionMetricsTest extends FlexPmdTestBase
+{
+   @Test
+   public void testCreate() throws PMDException
+   {
+      final IFlexFile file = getTestFiles().get( "bug.FlexPMD60.as" );
+      final IParserNode ast = FileSetUtils.buildAst( file );
+      final IClass classNode = NodeFactory.createPackage( ast ).getClassNode();
+      final InternalFunctionMetrics classMetrics = InternalFunctionMetrics.create( new ProjectMetrics(),
+                                                                                   "bug",
+                                                                                   classNode );
+
+      assertEquals( 1,
+                    classMetrics.getMultipleLineCommentInClass() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/MetricUtilsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/MetricUtilsTest.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/MetricUtilsTest.java
new file mode 100644
index 0000000..7ede89f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/MetricUtilsTest.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.metrics;
+
+import static org.junit.Assert.assertEquals;
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.FileSetUtils;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.impl.NodeFactory;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+public class MetricUtilsTest extends FlexPmdTestBase
+{
+   @Test
+   public void testComputeMultiLineComments() throws PMDException
+   {
+      final IFlexFile file = getTestFiles().get( "bug.FlexPMD60.as" );
+      final IParserNode ast = FileSetUtils.buildAst( file );
+      final IClass classNode = NodeFactory.createPackage( ast ).getClassNode();
+
+      assertEquals( 6,
+                    MetricUtils.computeMultiLineComments( classNode ) );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/PackageMetricsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/PackageMetricsTest.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/PackageMetricsTest.java
new file mode 100644
index 0000000..91835d3
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/PackageMetricsTest.java
@@ -0,0 +1,72 @@
+/*
+ * 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.metrics;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+import java.util.ArrayList;
+
+import org.junit.Test;
+
+public class PackageMetricsTest
+{
+   private final PackageMetrics comAdobePackage;
+   private final PackageMetrics emptyPackage;
+
+   public PackageMetricsTest()
+   {
+      comAdobePackage = PackageMetrics.create( new ArrayList< File >(),
+                                               "com.adobe.ac",
+                                               2,
+                                               3,
+                                               4,
+                                               5,
+                                               1 );
+      emptyPackage = PackageMetrics.create( new ArrayList< File >(),
+                                            "",
+                                            2,
+                                            3,
+                                            4,
+                                            5,
+                                            2 );
+   }
+
+   @Test
+   public void testGetContreteXml()
+   {
+      assertEquals( "<functions>2</functions><classes>0</classes>",
+                    comAdobePackage.getContreteXml() );
+      assertEquals( "<functions>2</functions><classes>0</classes>",
+                    emptyPackage.getContreteXml() );
+   }
+
+   @Test
+   public void testToXmlString()
+   {
+      assertEquals( "<package><name>com.adobe.ac</name><ccn>0</ccn><ncss>5</ncss><javadocs>4</javadocs>"
+                          + "<javadoc_lines>4</javadoc_lines><multi_comment_lines>5</multi_comment_lines>"
+                          + "<single_comment_lines>0</single_comment_lines>"
+                          + "<functions>2</functions><classes>0</classes></package>",
+                    comAdobePackage.toXmlString() );
+      assertEquals( "<package><name>.</name><ccn>0</ccn><ncss>6</ncss><javadocs>4</javadocs>"
+                          + "<javadoc_lines>4</javadoc_lines><multi_comment_lines>5</multi_comment_lines>"
+                          + "<single_comment_lines>0</single_comment_lines>"
+                          + "<functions>2</functions><classes>0</classes></package>",
+                    emptyPackage.toXmlString() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/engine/FlexMetricsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/engine/FlexMetricsTest.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/engine/FlexMetricsTest.java
new file mode 100644
index 0000000..1f05f28
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/test/java/com/adobe/ac/pmd/metrics/engine/FlexMetricsTest.java
@@ -0,0 +1,161 @@
+/*
+ * 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.metrics.engine;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.dom4j.DocumentException;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.metrics.ProjectMetrics;
+
+public class FlexMetricsTest extends FlexPmdTestBase
+{
+   private static final int     TOTAL_CLASSES_NUMBER   = 105;
+   private static final int     TOTAL_FUNCTIONS_NUMBER = 335;
+   private final FlexMetrics    flexMetrics;
+   private final ProjectMetrics projectMetrics;
+
+   public FlexMetricsTest()
+   {
+      super();
+
+      flexMetrics = new FlexMetrics( getTestDirectory(), 0 );
+      projectMetrics = flexMetrics.loadMetrics();
+   }
+
+   @Test
+   public void execute() throws DocumentException,
+                        IOException
+   {
+      final File outputFile = new File( "target/javancss.xml" );
+
+      flexMetrics.execute( outputFile );
+
+      assertTrue( outputFile.exists() );
+   }
+
+   @Test
+   public void loadAverageMetrics()
+   {
+      assertEquals( 5,
+                    Math.round( projectMetrics.getAverageFunctions().getAverageStatements() ) );
+      assertEquals( 3,
+                    Math.round( projectMetrics.getAverageObjects().getAverageFunctions() ) );
+      assertEquals( 15,
+                    Math.round( projectMetrics.getAverageObjects().getAverageStatements() ) );
+      assertEquals( 30,
+                    Math.round( projectMetrics.getAverageObjects().getAverageDocs() ) );
+      assertEquals( 2,
+                    Math.round( projectMetrics.getAverageObjects().getAverageMultipleComments() + 0.95 ) );
+   }
+
+   @Test
+   public void loadClassMetrics()
+   {
+      assertEquals( TOTAL_CLASSES_NUMBER,
+                    projectMetrics.getClasses().size() );
+      assertEquals( 0,
+                    projectMetrics.getClasses().get( 3 ).getFunctions() );
+      assertEquals( "bug.FlexPMD233a",
+                    projectMetrics.getClasses().get( 10 ).getFullName() );
+      assertEquals( 1,
+                    projectMetrics.getClasses().get( 10 ).getNonCommentStatements() );
+      assertEquals( "bug.FlexPMD60",
+                    projectMetrics.getClasses().get( 12 ).getFullName() );
+      assertEquals( 7,
+                    projectMetrics.getClasses().get( 12 ).getMultiLineComments() );
+      assertEquals( "bug.FlexPMD61",
+                    projectMetrics.getClasses().get( 13 ).getFullName() );
+      assertEquals( 3,
+                    projectMetrics.getClasses().get( 13 ).getFunctions() );
+      assertEquals( 9,
+                    projectMetrics.getClasses().get( 13 ).getNonCommentStatements() );
+      assertEquals( "cairngorm.FatController",
+                    projectMetrics.getClasses().get( 20 ).getFullName() );
+      assertEquals( 3,
+                    projectMetrics.getClasses().get( 20 ).getAsDocs() );
+   }
+
+   @Test
+   public void loadFunctionMetrics()
+   {
+      assertEquals( TOTAL_FUNCTIONS_NUMBER,
+                    projectMetrics.getFunctions().size() );
+      assertEquals( "TestEvent",
+                    projectMetrics.getFunctions().get( 103 ).getName() );
+      assertEquals( 3,
+                    projectMetrics.getFunctions().get( 103 ).getNonCommentStatements() );
+      assertEquals( "clone",
+                    projectMetrics.getFunctions().get( 104 ).getName() );
+      assertEquals( 2,
+                    projectMetrics.getFunctions().get( 104 ).getNonCommentStatements() );
+      assertEquals( "BugDemo",
+                    projectMetrics.getFunctions().get( 107 ).getName() );
+      assertEquals( 10,
+                    projectMetrics.getFunctions().get( 107 ).getNonCommentStatements() );
+   }
+
+   @Test
+   public void loadPackageMetrics()
+   {
+      assertEquals( 30,
+                    projectMetrics.getPackages().size() );
+      assertEquals( "",
+                    projectMetrics.getPackages()
+                                  .get( projectMetrics.getPackages().size() - 1 )
+                                  .getPackageName() );
+      assertEquals( 17,
+                    projectMetrics.getPackages().get( 1 ).getClasses() );
+      assertEquals( "bug",
+                    projectMetrics.getPackages().get( 1 ).getFullName() );
+      assertEquals( 104,
+                    projectMetrics.getPackages().get( 1 ).getFunctions() );
+      assertEquals( 400,
+                    projectMetrics.getPackages().get( 1 ).getNonCommentStatements() );
+      assertEquals( "bug",
+                    projectMetrics.getPackages().get( 1 ).getPackageName() );
+   }
+
+   @Test
+   public void loadTotalPackageMetrics()
+   {
+      assertEquals( TOTAL_CLASSES_NUMBER,
+                    projectMetrics.getTotalPackages().getTotalClasses() );
+      assertEquals( TOTAL_FUNCTIONS_NUMBER,
+                    projectMetrics.getTotalPackages().getTotalFunctions() );
+      assertEquals( 1615,
+                    projectMetrics.getTotalPackages().getTotalStatements() );
+      assertEquals( 3188,
+                    projectMetrics.getTotalPackages().getTotalAsDocs() );
+      assertEquals( 110,
+                    projectMetrics.getTotalPackages().getTotalMultiLineComment() );
+   }
+
+   @Test
+   public void testBug157()
+   {
+      assertEquals( "org.as3commons.concurrency.thread",
+                    projectMetrics.getPackageMetrics().get( 24 ).getFullName() );
+
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/.checkstyle
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/.checkstyle b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/.checkstyle
new file mode 100644
index 0000000..245c5ee
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/.checkstyle
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<fileset-config file-format-version="1.2.0" simple-config="true">
+    <fileset name="all" enabled="true" check-config-name="AC" local="false">
+        <file-match-pattern match-pattern="." include-pattern="true"/>
+    </fileset>
+</fileset-config>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/.pmd b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/.pmd
new file mode 100644
index 0000000..b5c19d9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/.pmd
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<pmd>
+    <useProjectRuleSet>false</useProjectRuleSet>
+    <ruleSetFile>../flex-pmd-parent/pmd.xml</ruleSetFile>
+    <includeDerivedFiles>false</includeDerivedFiles>
+    <violationsAsErrors>true</violationsAsErrors>
+</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/pom.xml
new file mode 100644
index 0000000..4983ceb
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/pom.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-ruleset-api</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Adobe Flex PMD RuleSet API</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>${commons-lang.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>as3-plugin-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>pmd</groupId>
+            <artifactId>pmd</artifactId>
+            <version>${pmd.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>as3-parser</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-files</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-test-resources</artifactId>
+            <version>${project.version}</version>
+            <classifier>resources</classifier>
+            <type>zip</type>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <testResources>
+            <testResource>
+                <directory>${project.build.directory}/test/generated-resources</directory>
+            </testResource>
+            <testResource>
+                <directory>${basedir}/src/test/resources</directory>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-test-resources</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeGroupIds>${project.groupId}</includeGroupIds>
+                            <includes>**/*.as,**/*.mxml</includes>
+                            <outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
+                            <excludeTransitive>true</excludeTransitive>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/IFlexViolation.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/IFlexViolation.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/IFlexViolation.java
new file mode 100644
index 0000000..efdc6b5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/IFlexViolation.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;
+
+import net.sourceforge.pmd.IRuleViolation;
+
+import com.adobe.ac.pmd.files.IFlexFile;
+
+public interface IFlexViolation extends Comparable< IFlexViolation >, IRuleViolation
+{
+   /**
+    * @param messageToAppend
+    */
+   void appendToMessage( final String messageToAppend );
+
+   /**
+    * @return the rule message
+    */
+   String getRuleMessage();
+
+   /**
+    * @param replacement
+    * @param index
+    */
+   void replacePlaceholderInMessage( final String replacement,
+                                     final int index );
+
+   /**
+    * @param column
+    */
+   void setEndColumn( final int column );
+
+   /**
+    * @param violatedFile
+    * @param ruleSetName
+    * @return
+    */
+   String toXmlString( final IFlexFile violatedFile,
+                       final String ruleSetName );
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/files/FileSetUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/files/FileSetUtils.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/files/FileSetUtils.java
new file mode 100644
index 0000000..e7c6ad0
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/files/FileSetUtils.java
@@ -0,0 +1,179 @@
+/*
+ * 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.files;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.logging.Logger;
+
+import net.sourceforge.pmd.PMDException;
+
+import com.adobe.ac.pmd.nodes.IPackage;
+import com.adobe.ac.pmd.nodes.impl.NodeFactory;
+import com.adobe.ac.pmd.parser.IAS3Parser;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+import de.bokelberg.flex.parser.AS3Parser;
+
+/**
+ * @author xagnetti
+ */
+public final class FileSetUtils
+{
+   private static final ThreadPoolExecutor EXECUTOR = ( ThreadPoolExecutor ) Executors.newFixedThreadPool( 5 );
+   private static final Logger             LOGGER   = Logger.getLogger( FileSetUtils.class.getName() );
+
+   /**
+    * @param file
+    * @return
+    * @throws PMDException
+    */
+   public static IParserNode buildAst( final IFlexFile file ) throws PMDException
+   {
+      IParserNode rootNode = null;
+
+      try
+      {
+         rootNode = tryToBuildAst( file );
+      }
+      catch ( final IOException e )
+      {
+         throw new PMDException( "While building AST: Cannot read "
+               + file.getFullyQualifiedName(), e );
+      }
+      catch ( final TokenException e )
+      {
+         throw new PMDException( "TokenException thrown while building AST on "
+               + file.getFullyQualifiedName() + " with message: " + e.getMessage(), e );
+      }
+      return rootNode;
+   }
+
+   /**
+    * @param file
+    * @return
+    * @throws PMDException
+    * @throws InterruptedException
+    * @throws ExecutionException
+    */
+   public static IParserNode buildThreadedAst( final IFlexFile file ) throws PMDException,
+                                                                     InterruptedException,
+                                                                     ExecutionException
+   {
+      final List< Callable< Object >> toRun = new ArrayList< Callable< Object >>();
+      toRun.add( new Callable< Object >()
+      {
+         public Object call() throws PMDException
+         {
+            return buildAst( file );
+         }
+      } );
+      final List< Future< Object >> futures = EXECUTOR.invokeAll( toRun,
+                                                                  5,
+                                                                  TimeUnit.SECONDS );
+      return ( IParserNode ) futures.get( 0 ).get();
+   }
+
+   /**
+    * @param files
+    * @return
+    * @throws PMDException
+    */
+   public static Map< String, IPackage > computeAsts( final Map< String, IFlexFile > files ) throws PMDException
+   {
+      final Map< String, IPackage > asts = new LinkedHashMap< String, IPackage >();
+
+      for ( final Entry< String, IFlexFile > fileEntry : files.entrySet() )
+      {
+         final IFlexFile file = fileEntry.getValue();
+
+         try
+         {
+            final IParserNode node = buildThreadedAst( file );
+
+            asts.put( file.getFullyQualifiedName(),
+                      NodeFactory.createPackage( node ) );
+         }
+         catch ( final InterruptedException e )
+         {
+            LOGGER.warning( buildLogMessage( file,
+                                             e.getMessage() ) );
+         }
+         catch ( final NoClassDefFoundError e )
+         {
+            LOGGER.warning( buildLogMessage( file,
+                                             e.getMessage() ) );
+         }
+         catch ( final ExecutionException e )
+         {
+            LOGGER.warning( buildLogMessage( file,
+                                             e.getMessage() ) );
+         }
+         catch ( final CancellationException e )
+         {
+            LOGGER.warning( buildLogMessage( file,
+                                             e.getMessage() ) );
+         }
+      }
+      return asts;
+   }
+
+   /**
+    * @param file
+    * @param message
+    * @return
+    */
+   protected static String buildLogMessage( final IFlexFile file,
+                                            final String message )
+   {
+      return "While building AST on "
+            + file.getFullyQualifiedName() + ", an error occured: " + message;
+   }
+
+   private static IParserNode tryToBuildAst( final IFlexFile file ) throws IOException,
+                                                                   TokenException
+   {
+      IParserNode rootNode;
+      final IAS3Parser parser = new AS3Parser();
+      if ( file instanceof IMxmlFile )
+      {
+         rootNode = parser.buildAst( file.getFilePath(),
+                                     ( ( IMxmlFile ) file ).getScriptBlock() );
+      }
+      else
+      {
+         rootNode = parser.buildAst( file.getFilePath() );
+      }
+      return rootNode;
+   }
+
+   private FileSetUtils()
+   {
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IAsDocHolder.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IAsDocHolder.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IAsDocHolder.java
new file mode 100644
index 0000000..d4885e2
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IAsDocHolder.java
@@ -0,0 +1,30 @@
+/*
+ * 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.nodes;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * @author xagnetti
+ */
+public interface IAsDocHolder extends INode
+{
+   /**
+    * @return AsDoc information
+    */
+   IParserNode getAsDoc();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IAttribute.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IAttribute.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IAttribute.java
new file mode 100644
index 0000000..c07b309
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IAttribute.java
@@ -0,0 +1,24 @@
+/*
+ * 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.nodes;
+
+/**
+ * @author xagnetti
+ */
+public interface IAttribute extends IField
+{
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IClass.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IClass.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IClass.java
new file mode 100644
index 0000000..01235b2
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IClass.java
@@ -0,0 +1,81 @@
+/*
+ * 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.nodes;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * Node representing a class. It contains different lists (constants, variables,
+ * functions, implementations, ...), but also a reference to its constructor (if
+ * any), the extension name (if any), and its name.
+ * 
+ * @author xagnetti
+ */
+public interface IClass extends IVisible, IMetaDataListHolder, INamableNode, IAsDocHolder, ICommentHolder
+{
+   /**
+    * @return
+    */
+   List< IAttribute > getAttributes();
+
+   /**
+    * @return
+    */
+   double getAverageCyclomaticComplexity();
+
+   /**
+    * @return
+    */
+   IParserNode getBlock();
+
+   /**
+    * @return
+    */
+   List< IConstant > getConstants();
+
+   /**
+    * @return
+    */
+   IFunction getConstructor();
+
+   /**
+    * @return
+    */
+   String getExtensionName();
+
+   /**
+    * @return
+    */
+   List< IFunction > getFunctions();
+
+   /**
+    * @return
+    */
+   List< IParserNode > getImplementations();
+
+   /**
+    * @return
+    */
+   boolean isBindable();
+
+   /**
+    * @return
+    */
+   boolean isFinal();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/ICommentHolder.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/ICommentHolder.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/ICommentHolder.java
new file mode 100644
index 0000000..5094f90
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/ICommentHolder.java
@@ -0,0 +1,32 @@
+/*
+ * 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.nodes;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * @author xagnetti
+ */
+public interface ICommentHolder
+{
+   /**
+    * @return
+    */
+   List< IParserNode > getMultiLinesComment();
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IConstant.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IConstant.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IConstant.java
new file mode 100644
index 0000000..d5b8f39
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IConstant.java
@@ -0,0 +1,24 @@
+/*
+ * 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.nodes;
+
+/**
+ * @author xagnetti
+ */
+public interface IConstant extends IField
+{
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IField.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IField.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IField.java
new file mode 100644
index 0000000..81a2979
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IField.java
@@ -0,0 +1,28 @@
+/*
+ * 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.nodes;
+
+/**
+ * @author xagnetti
+ */
+public interface IField extends IVariable, IVisible, IAsDocHolder
+{
+   /**
+    * @return
+    */
+   boolean isStatic();
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IFieldInitialization.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IFieldInitialization.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IFieldInitialization.java
new file mode 100644
index 0000000..87d6980
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IFieldInitialization.java
@@ -0,0 +1,24 @@
+/*
+ * 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.nodes;
+
+/**
+ * @author xagnetti
+ */
+public interface IFieldInitialization extends INode
+{
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IFunction.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IFunction.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IFunction.java
new file mode 100644
index 0000000..e2124f1
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IFunction.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.nodes;
+
+import java.util.List;
+import java.util.Map;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * Node representing a Function It contains the function name, its parameters,
+ * its return type, its modifiers, its metadata
+ * 
+ * @author xagnetti
+ */
+public interface IFunction extends IVisible, IMetaDataListHolder, INamableNode, IAsDocHolder, ICommentHolder
+{
+   /**
+    * Finds recursively a statement in the function body from a list of names
+    * 
+    * @param primaryNames statement name
+    * @return corresponding node
+    */
+   List< IParserNode > findPrimaryStatementInBody( final String[] primaryNames );
+
+   /**
+    * Finds recursively a statement in the function body from its name
+    * 
+    * @param primaryName statement name
+    * @return corresponding node
+    */
+   List< IParserNode > findPrimaryStatementsInBody( final String primaryName );
+
+   /**
+    * @return
+    */
+   IParserNode getBody();
+
+   /**
+    * @return
+    */
+   int getCyclomaticComplexity();
+
+   /**
+    * @return
+    */
+   Map< String, IParserNode > getLocalVariables();
+
+   /**
+    * @return
+    */
+   List< IParameter > getParameters();
+
+   /**
+    * @return
+    */
+   IIdentifierNode getReturnType();
+
+   /**
+    * @return
+    */
+   int getStatementNbInBody();
+
+   /**
+    * @return Extracts the super call node (if any) from the function content
+    *         block
+    */
+   IParserNode getSuperCall();
+
+   boolean isEventHandler();
+
+   /**
+    * @return
+    */
+   boolean isGetter();
+
+   /**
+    * @return
+    */
+   boolean isOverriden();
+
+   /**
+    * @return
+    */
+   boolean isSetter();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IIdentifierNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IIdentifierNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IIdentifierNode.java
new file mode 100644
index 0000000..28b5d11
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IIdentifierNode.java
@@ -0,0 +1,25 @@
+/*
+ * 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.nodes;
+
+/**
+ * @author xagnetti
+ */
+public interface IIdentifierNode extends INode
+{
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IMetaData.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IMetaData.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IMetaData.java
new file mode 100644
index 0000000..ac6fd0b
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IMetaData.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.nodes;
+
+import java.util.List;
+
+/**
+ * @author xagnetti
+ */
+public interface IMetaData extends INamable, INode
+{
+   /**
+    * @return
+    */
+   List< String > getAttributeNames();
+
+   /**
+    * @return
+    */
+   String getDefaultValue();
+
+   /**
+    * @param property
+    * @return
+    */
+   String[] getProperty( final String property );
+
+   /**
+    * @param property
+    * @return
+    */
+   List< String > getPropertyAsList( final String property );
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IMetaDataListHolder.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IMetaDataListHolder.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IMetaDataListHolder.java
new file mode 100644
index 0000000..2622556
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IMetaDataListHolder.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.nodes;
+
+import java.util.List;
+
+/**
+ * @author xagnetti
+ */
+public interface IMetaDataListHolder
+{
+   /**
+    * @param metaData
+    */
+   void add( IMetaData metaData );
+
+   /**
+    * @return
+    */
+   List< IMetaData > getAllMetaData();
+
+   /**
+    * @param metaDataName
+    * @return
+    */
+   List< IMetaData > getMetaData( MetaData metaDataName );
+
+   /**
+    * @return
+    */
+   int getMetaDataCount();
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IModifiersHolder.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IModifiersHolder.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IModifiersHolder.java
new file mode 100644
index 0000000..8ed7eb5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/IModifiersHolder.java
@@ -0,0 +1,34 @@
+/*
+ * 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.nodes;
+
+/**
+ * @author xagnetti
+ */
+public interface IModifiersHolder
+{
+   /**
+    * @param modifier
+    */
+   void add( Modifier modifier );
+
+   /**
+    * @param modifier
+    * @return
+    */
+   boolean is( Modifier modifier ); // NOPMD
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/INamable.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/INamable.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/INamable.java
new file mode 100644
index 0000000..2ebad51
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/INamable.java
@@ -0,0 +1,28 @@
+/*
+ * 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.nodes;
+
+/**
+ * @author xagnetti
+ */
+public interface INamable
+{
+   /**
+    * @return
+    */
+   String getName();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/INamableNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/INamableNode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/INamableNode.java
new file mode 100644
index 0000000..24ea835
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/INamableNode.java
@@ -0,0 +1,25 @@
+/*
+ * 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.nodes;
+
+/**
+ * @author xagnetti
+ */
+public interface INamableNode extends INode, INamable
+{
+
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/INode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/INode.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/INode.java
new file mode 100644
index 0000000..04f4c9e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/nodes/INode.java
@@ -0,0 +1,32 @@
+/*
+ * 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.nodes;
+
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * FlexPmdNode which wraps the parser node into a concrete type
+ * 
+ * @author xagnetti
+ */
+public interface INode
+{
+   /**
+    * @return
+    */
+   IParserNode getInternalNode();
+}


[06/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

Posted by cd...@apache.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/maintanability/UselessOverridenFunctionRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/UselessOverridenFunctionRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/UselessOverridenFunctionRuleTest.java
new file mode 100644
index 0000000..c85e5c6
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/UselessOverridenFunctionRuleTest.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.maintanability;
+
+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 UselessOverridenFunctionRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "GoodComponent.as", new ViolationPosition[]
+       { new ViolationPosition( 38 ) } ),
+                  new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+                  { new ViolationPosition( 138 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UselessOverridenFunctionRule();
+   }
+}

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/maintanability/forbiddenttypes/UseDictionaryTypeRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/forbiddenttypes/UseDictionaryTypeRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/forbiddenttypes/UseDictionaryTypeRuleTest.java
new file mode 100644
index 0000000..9b69058
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/forbiddenttypes/UseDictionaryTypeRuleTest.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.maintanability.forbiddenttypes;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+import com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseDictionaryTypeRule;
+
+public class UseDictionaryTypeRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "Responder.as", new ViolationPosition[]
+      { new ViolationPosition( 36 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UseDictionaryTypeRule();
+   }
+}

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/maintanability/forbiddenttypes/UseGenericTypeRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/forbiddenttypes/UseGenericTypeRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/forbiddenttypes/UseGenericTypeRuleTest.java
new file mode 100644
index 0000000..f88a8e4
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/forbiddenttypes/UseGenericTypeRuleTest.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.maintanability.forbiddenttypes;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+import com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseGenericTypeRule;
+
+public class UseGenericTypeRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "GenericType.as", new ViolationPosition[]
+      { new ViolationPosition( 39 ),
+                  new ViolationPosition( 46 ),
+                  new ViolationPosition( 35 ),
+                  new ViolationPosition( 36 ),
+                  new ViolationPosition( 37 ) } ) };
+   }
+
+   @Override
+   protected List< String > getIgnoreFiles()
+   {
+      final List< String > files = super.getIgnoreFiles();
+
+      files.add( "bug.FlexPMD181.as" );
+      return files;
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UseGenericTypeRule();
+   }
+}

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/maintanability/forbiddenttypes/UseObjectTypeRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/forbiddenttypes/UseObjectTypeRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/forbiddenttypes/UseObjectTypeRuleTest.java
new file mode 100644
index 0000000..6f8933a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/maintanability/forbiddenttypes/UseObjectTypeRuleTest.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.maintanability.forbiddenttypes;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+import com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseObjectTypeRule;
+
+public class UseObjectTypeRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "pseudo.look.IEditLook.as", new ViolationPosition[]
+       { new ViolationPosition( 34 ),
+                   new ViolationPosition( 35 ) } ),
+                  new ExpectedViolation( "flexpmd114.a.Test.as", new ViolationPosition[]
+                  { new ViolationPosition( 42 ) } ),
+                  new ExpectedViolation( "flexpmd114.b.Test.as", new ViolationPosition[]
+                  { new ViolationPosition( 42 ) } ),
+                  new ExpectedViolation( "flexpmd114.c.Test.as", new ViolationPosition[]
+                  { new ViolationPosition( 42 ) } ),
+                  new ExpectedViolation( "Looping.as", new ViolationPosition[]
+                  { new ViolationPosition( 63 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.ConfigProxy.as", new ViolationPosition[]
+                  { new ViolationPosition( 42 ) } ),
+                  new ExpectedViolation( "Sorted.as", new ViolationPosition[]
+                  { new ViolationPosition( 67 ) } ),
+                  new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+                  { new ViolationPosition( 52 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UseObjectTypeRule();
+   }
+}

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/multiscreen/AvoidRollMouseEventRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/multiscreen/AvoidRollMouseEventRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/multiscreen/AvoidRollMouseEventRuleTest.java
new file mode 100644
index 0000000..0e4f98c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/multiscreen/AvoidRollMouseEventRuleTest.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.multiscreen;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegExpBasedRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+
+public class AvoidRollMouseEventRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      {};
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "mouseOut=\"onojverojr\"",
+                  "addEventListener( MouseEvent.MOUSE_OUT, onMousOut );",
+                  "mouseOver",
+                  "MOUSE_OVER",
+                  "rollOut",
+                  "ROLL_OUT",
+                  "rollOver",
+                  "ROLL_OVER" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new AvoidRollMouseEventRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "addEventListener( CHANGE, handleChange );",
+                  "addEventListener(CHANGE,handleChange);",
+                  "addEventListener( CHANGE," };
+   }
+}

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/multiscreen/AvoidTooltipRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/multiscreen/AvoidTooltipRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/multiscreen/AvoidTooltipRuleTest.java
new file mode 100644
index 0000000..d5a6786
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/multiscreen/AvoidTooltipRuleTest.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.multiscreen;
+
+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 AvoidTooltipRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "DeleteButtonRenderer.mxml", new ViolationPosition[]
+      { new ViolationPosition( 36 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "<mx:Button id=\"b1\" label=\"Click Me\" toolTip=\"This Button does nothing.\"/>",
+                  "myButton.toolTip = \"Click this new button to create another button.\"; " };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new AvoidTooltipRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "addEventListener( CHANGE, handleChange );",
+                  "addEventListener(CHANGE,handleChange);",
+                  "addEventListener( CHANGE," };
+   }
+}

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/mxml/AbstractMoreThanEntryPointInMxmlRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/AbstractMoreThanEntryPointInMxmlRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/AbstractMoreThanEntryPointInMxmlRuleTest.java
new file mode 100644
index 0000000..49c96d1
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/AbstractMoreThanEntryPointInMxmlRuleTest.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.mxml;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public abstract class AbstractMoreThanEntryPointInMxmlRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.mxml.IterationsList.mxml", iterationsListViolations() ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.mxml.IterationsList2.mxml",
+                                         iterationsList2Violations() ) };
+   }
+
+   abstract protected ViolationPosition[] iterationsList2Violations();
+
+   abstract protected ViolationPosition[] iterationsListViolations();
+}
\ No newline at end of file

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/mxml/CodeBehindInMxmlRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/CodeBehindInMxmlRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/CodeBehindInMxmlRuleTest.java
new file mode 100644
index 0000000..cb3d1ae
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/CodeBehindInMxmlRuleTest.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.mxml;
+
+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 CodeBehindInMxmlRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "Main.mxml", new ViolationPosition[]
+      { new ViolationPosition( 58 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "<Script>",
+                  "<mx:Script",
+                  "<mx:Script source=",
+                  "<Script source=" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new CodeBehindInMxmlRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "Script" };
+   }
+}

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/mxml/MoreThanOneEntryPointInMxmlRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/MoreThanOneEntryPointInMxmlRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/MoreThanOneEntryPointInMxmlRuleTest.java
new file mode 100644
index 0000000..a46d82c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/MoreThanOneEntryPointInMxmlRuleTest.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.mxml;
+
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class MoreThanOneEntryPointInMxmlRuleTest extends AbstractMoreThanEntryPointInMxmlRuleTest
+{
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new MoreThanOneEntryPointInMxmlRule();
+   }
+
+   @Override
+   protected ViolationPosition[] iterationsList2Violations()
+   {
+      return new ViolationPosition[]
+      {};
+   }
+
+   @Override
+   protected ViolationPosition[] iterationsListViolations()
+   {
+      return new ViolationPosition[]
+      { new ViolationPosition( 74 ) };
+   }
+}

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/mxml/MoreThanTwoEntryPointsInMxmlRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/MoreThanTwoEntryPointsInMxmlRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/MoreThanTwoEntryPointsInMxmlRuleTest.java
new file mode 100644
index 0000000..c5a7f6a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/MoreThanTwoEntryPointsInMxmlRuleTest.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.mxml;
+
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class MoreThanTwoEntryPointsInMxmlRuleTest extends AbstractMoreThanEntryPointInMxmlRuleTest
+{
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new MoreThanTwoEntryPointsInMxmlRule();
+   }
+
+   @Override
+   protected ViolationPosition[] iterationsList2Violations()
+   {
+      return new ViolationPosition[]
+      {};
+   }
+
+   @Override
+   protected ViolationPosition[] iterationsListViolations()
+   {
+      return new ViolationPosition[]
+      { new ViolationPosition( 74 ) };
+   }
+}

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/mxml/OnlyOneScriptBlockPerMxmlRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/OnlyOneScriptBlockPerMxmlRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/OnlyOneScriptBlockPerMxmlRuleTest.java
new file mode 100644
index 0000000..c7282ea
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/OnlyOneScriptBlockPerMxmlRuleTest.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.mxml;
+
+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 OnlyOneScriptBlockPerMxmlRuleTest extends AbstractFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "Main.mxml", new ViolationPosition[]
+       { new ViolationPosition( 1 ) } ),
+                  new ExpectedViolation( "AbstractRowData.mxml", new ViolationPosition[]
+                  { new ViolationPosition( 1 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new OnlyOneScriptBlockPerMxmlRule();
+   }
+}

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/mxml/StaticMethodInMxmlRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/StaticMethodInMxmlRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/StaticMethodInMxmlRuleTest.java
new file mode 100644
index 0000000..af6a3d0
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/StaticMethodInMxmlRuleTest.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.mxml;
+
+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 StaticMethodInMxmlRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.mxml.IterationsList2.mxml", new ViolationPosition[]
+      { new ViolationPosition( 48 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new StaticMethodInMxmlRule();
+   }
+}

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/mxml/TooLongScriptBlockRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/TooLongScriptBlockRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/TooLongScriptBlockRuleTest.java
new file mode 100644
index 0000000..31f025d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/TooLongScriptBlockRuleTest.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.mxml;
+
+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 TooLongScriptBlockRuleTest extends AbstractFlexRuleTest
+{
+   @Override
+   public AbstractFlexRule getRule()
+   {
+      return new TooLongScriptBlockRule();
+   }
+
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.Duane.mxml", new ViolationPosition[]
+       { new ViolationPosition( 42, 142 ) } ),
+                  new ExpectedViolation( "bug.FlexPMD233b.mxml", new ViolationPosition[]
+                  { new ViolationPosition( 63, 143 ) } ),
+                  new ExpectedViolation( "DeleteButtonRenderer.mxml", new ViolationPosition[]
+                  { new ViolationPosition( 49, 103 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.mxml.IterationsList.mxml",
+                                         new ViolationPosition[]
+                                         { new ViolationPosition( 40, 94 ) } ) };
+   }
+}

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/mxml/TooManyStatesInMxmlRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/TooManyStatesInMxmlRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/TooManyStatesInMxmlRuleTest.java
new file mode 100644
index 0000000..a790c89
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/mxml/TooManyStatesInMxmlRuleTest.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.mxml;
+
+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 TooManyStatesInMxmlRuleTest extends AbstractFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "DeleteButtonRenderer.mxml", new ViolationPosition[]
+      { new ViolationPosition( 1 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new TooManyStatesInMxmlRule();
+   }
+}

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/naming/BooleanAttributeShouldContainIsHasRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/BooleanAttributeShouldContainIsHasRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/BooleanAttributeShouldContainIsHasRuleTest.java
new file mode 100644
index 0000000..2077fb9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/BooleanAttributeShouldContainIsHasRuleTest.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.naming;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+
+public class BooleanAttributeShouldContainIsHasRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      {};
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new BooleanAttributeShouldContainIsHasRule();
+   }
+}

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/naming/CapitalizeConstantsRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/CapitalizeConstantsRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/CapitalizeConstantsRuleTest.java
new file mode 100644
index 0000000..6be17b1
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/CapitalizeConstantsRuleTest.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.naming;
+
+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 CapitalizeConstantsRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+       { new ViolationPosition( 45 ),
+                   new ViolationPosition( 46 ) } ),
+                  new ExpectedViolation( "bug.FlexPMD233b.mxml", new ViolationPosition[]
+                  { new ViolationPosition( 66 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.ArrayVO.as", new ViolationPosition[]
+                  { new ViolationPosition( 39 ),
+                              new ViolationPosition( 40 ) } ),
+                  new ExpectedViolation( "GenericType.as", new ViolationPosition[]
+                  { new ViolationPosition( 36 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new CapitalizeConstantsRule();
+   }
+}

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/naming/IncorrectClassCaseTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/IncorrectClassCaseTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/IncorrectClassCaseTest.java
new file mode 100644
index 0000000..12b2dd0
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/IncorrectClassCaseTest.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.naming;
+
+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 IncorrectClassCaseTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.foo.as", new ViolationPosition[]
+      { new ViolationPosition( 1, 34 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new IncorrectClassCase();
+   }
+}

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/naming/IncorrectEventHandlerNameRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/IncorrectEventHandlerNameRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/IncorrectEventHandlerNameRuleTest.java
new file mode 100644
index 0000000..c6d998d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/IncorrectEventHandlerNameRuleTest.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.naming;
+
+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 IncorrectEventHandlerNameRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.Duane.mxml", new ViolationPosition[]
+       { new ViolationPosition( 71 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.MyCairngormCommand.as", new ViolationPosition[]
+                  { new ViolationPosition( 35 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.NestedSwitch.as", new ViolationPosition[]
+                  { new ViolationPosition( 35 ) } ),
+                  new ExpectedViolation( "parsley.InaccessibleMetaData.as", new ViolationPosition[]
+                  { new ViolationPosition( 54 ),
+                              new ViolationPosition( 60 ) } ),
+                  new ExpectedViolation( "Sorted.as", new ViolationPosition[]
+                  { new ViolationPosition( 71 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new IncorrectEventHandlerNameRule();
+   }
+}

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/naming/InterfaceNamingRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/InterfaceNamingRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/InterfaceNamingRuleTest.java
new file mode 100644
index 0000000..b9cd65a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/InterfaceNamingRuleTest.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.naming;
+
+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 InterfaceNamingRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "Color.as", new ViolationPosition[]
+       { new ViolationPosition( 35 ) } ),
+                  new ExpectedViolation( "src.fw.data.request.ResultListener.as", new ViolationPosition[]
+                  { new ViolationPosition( 33 ) } ),
+                  new ExpectedViolation( "org.as3commons.concurrency.thread.Color.as",
+                                         new ViolationPosition[]
+                                         { new ViolationPosition( 33 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new InterfaceNamingRule();
+   }
+}

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/naming/PackageCaseRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/PackageCaseRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/PackageCaseRuleTest.java
new file mode 100644
index 0000000..bf901fd
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/PackageCaseRuleTest.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.naming;
+
+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 PackageCaseRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "cairngorm.FatController.as", new ViolationPosition[]
+       { new ViolationPosition( -1 ) } ),
+                  new ExpectedViolation( "FTestError10.IpStack1.as", new ViolationPosition[]
+                  { new ViolationPosition( -1 ) } ),
+                  new ExpectedViolation( "FTestError10.IpStack2.as", new ViolationPosition[]
+                  { new ViolationPosition( -1 ) } ),
+                  new ExpectedViolation( "src.epg.StateExit_AS2.as", new ViolationPosition[]
+                  { new ViolationPosition( -1 ) } ),
+                  new ExpectedViolation( "src.fw.data.request.ResultListener.as", new ViolationPosition[]
+                  { new ViolationPosition( -1 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new PackageCaseRule();
+   }
+}

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/naming/PropertyHiddenByLocalVariableRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/PropertyHiddenByLocalVariableRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/PropertyHiddenByLocalVariableRuleTest.java
new file mode 100644
index 0000000..0acbb32
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/PropertyHiddenByLocalVariableRuleTest.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.naming;
+
+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 PropertyHiddenByLocalVariableRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.VoidConstructor.as", new ViolationPosition[]
+      { new ViolationPosition( 40 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new PropertyHiddenByLocalVariableRule();
+   }
+}

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/naming/TooLongFunctionNameRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/TooLongFunctionNameRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/TooLongFunctionNameRuleTest.java
new file mode 100644
index 0000000..a5e67a0
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/TooLongFunctionNameRuleTest.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.naming;
+
+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 TooLongFunctionNameRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "flexunit.RulesetTest.as", new ViolationPosition[]
+      { new ViolationPosition( 53 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new TooLongFunctionNameRule();
+   }
+}

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/naming/TooShortVariableRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/TooShortVariableRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/TooShortVariableRuleTest.java
new file mode 100644
index 0000000..ca187cd
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/TooShortVariableRuleTest.java
@@ -0,0 +1,69 @@
+/*
+ * 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.naming;
+
+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 TooShortVariableRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.Duane.mxml", new ViolationPosition[]
+       { new ViolationPosition( 68 ) } ),
+                  new ExpectedViolation( "bug.FlexPMD233b.mxml", new ViolationPosition[]
+                  { new ViolationPosition( 102 ) } ),
+                  new ExpectedViolation( "flexpmd114.a.Test.as", new ViolationPosition[]
+                  { new ViolationPosition( 42 ) } ),
+                  new ExpectedViolation( "flexpmd114.b.Test.as", new ViolationPosition[]
+                  { new ViolationPosition( 42 ) } ),
+                  new ExpectedViolation( "flexpmd114.c.Test.as", new ViolationPosition[]
+                  { new ViolationPosition( 42 ) } ),
+                  new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+                  { new ViolationPosition( 47 ) } ),
+                  new ExpectedViolation( "Looping.as", new ViolationPosition[]
+                  { new ViolationPosition( 63 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "  var toto : int = 0;",
+                  "  var i : int = 0;",
+                  "var ii : int = 0;",
+                  "var iii : int = 0;",
+                  "for ( var i : int = 0; i < 10; i++ ){}" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new TooShortVariableRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "function lala() : Number",
+                  "lala();" };
+   }
+}

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/naming/VariableNameEndingWithNumericRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/VariableNameEndingWithNumericRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/VariableNameEndingWithNumericRuleTest.java
new file mode 100644
index 0000000..41465a7
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/VariableNameEndingWithNumericRuleTest.java
@@ -0,0 +1,77 @@
+/*
+ * 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.naming;
+
+import java.util.List;
+
+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 VariableNameEndingWithNumericRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+       { new ViolationPosition( 405 ),
+                   new ViolationPosition( 441 ),
+                   new ViolationPosition( 459 ) } ),
+                  new ExpectedViolation( "src.epg.StateExit_AS2.as", new ViolationPosition[]
+                  { new ViolationPosition( 62 ),
+                              new ViolationPosition( 63 ),
+                              new ViolationPosition( 69 ),
+                              new ViolationPosition( 70 ),
+                              new ViolationPosition( 71 ),
+                              new ViolationPosition( 60 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.BigModel.as", new ViolationPosition[]
+                  { new ViolationPosition( 82 ),
+                              new ViolationPosition( 86 ),
+                              new ViolationPosition( 90 ),
+                              new ViolationPosition( 94 ),
+                              new ViolationPosition( 98 ) } ),
+                  new ExpectedViolation( "cairngorm.LightController.as", new ViolationPosition[]
+                  { new ViolationPosition( 115 ),
+                              new ViolationPosition( 134 ),
+                              new ViolationPosition( 153 ),
+                              new ViolationPosition( 172 ),
+                              new ViolationPosition( 191 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.BigImporterModel.as", new ViolationPosition[]
+                  { new ViolationPosition( 62 ),
+                              new ViolationPosition( 62 ),
+                              new ViolationPosition( 62 ),
+                              new ViolationPosition( 62 ),
+                              new ViolationPosition( 62 ),
+                              new ViolationPosition( 64 ) } ) };
+   }
+
+   @Override
+   protected List< String > getIgnoreFiles()
+   {
+      final List< String > files = super.getIgnoreFiles();
+
+      files.add( "bug.FlexPMD181.as" );
+      return files;
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new VariableNameEndingWithNumericRule();
+   }
+}

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/naming/WronglyNamedVariableRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/WronglyNamedVariableRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/WronglyNamedVariableRuleTest.java
new file mode 100644
index 0000000..e698ae5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/naming/WronglyNamedVariableRuleTest.java
@@ -0,0 +1,70 @@
+/*
+ * 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.naming;
+
+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 WronglyNamedVariableRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+       { 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( 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 ExpectedViolation( "GenericType.as", new ViolationPosition[]
+                  { new ViolationPosition( 44 ),
+                              new ViolationPosition( 46 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.ConfigProxy.as", new ViolationPosition[]
+                  { new ViolationPosition( 42 ) } ),
+                  new ExpectedViolation( "bug.FlexPMD141a.mxml", new ViolationPosition[]
+                  { new ViolationPosition( 40 ) } ),
+                  new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+                  { new ViolationPosition( 52 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new WronglyNamedVariableRule();
+   }
+}

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/parameterized/ParameterizedRegExpBasedRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parameterized/ParameterizedRegExpBasedRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parameterized/ParameterizedRegExpBasedRuleTest.java
new file mode 100644
index 0000000..09d15d4
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parameterized/ParameterizedRegExpBasedRuleTest.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.parameterized;
+
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRuleTest;
+import com.adobe.ac.pmd.rules.maintanability.AlertShowRuleTest;
+
+public class ParameterizedRegExpBasedRuleTest extends AbstractFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return AlertShowRuleTest.VIOLATING_FILES;
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      final ParameterizedRegExpBasedRule rule = new ParameterizedRegExpBasedRule();
+
+      rule.setProperty( rule.propertyDescriptorFor( ParameterizedRegExpBasedRule.PROPERTY_NAME ),
+                        ".*\\s+Alert.show\\(.*" );
+      rule.compilePattern();
+      return rule;
+   }
+}

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/parameterized/ParameterizedRegExpBasedRuleWithEmptyRegexpTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parameterized/ParameterizedRegExpBasedRuleWithEmptyRegexpTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parameterized/ParameterizedRegExpBasedRuleWithEmptyRegexpTest.java
new file mode 100644
index 0000000..182b5a9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parameterized/ParameterizedRegExpBasedRuleWithEmptyRegexpTest.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.parameterized;
+
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRuleTest;
+
+public class ParameterizedRegExpBasedRuleWithEmptyRegexpTest extends AbstractFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      {};
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new ParameterizedRegExpBasedRule();
+   }
+}

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/parsley/InaccessibleMetaDataRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/InaccessibleMetaDataRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/InaccessibleMetaDataRuleTest.java
new file mode 100644
index 0000000..dd3062b
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/InaccessibleMetaDataRuleTest.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.parsley;
+
+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 InaccessibleMetaDataRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "parsley.InaccessibleMetaData.as", new ViolationPosition[]
+       { new ViolationPosition( 38, 38 ),
+                   new ViolationPosition( 47, 47 ),
+                   new ViolationPosition( 59, 59 ) } ),
+                  new ExpectedViolation( "parsley.InaccessibleMetaDataInternalClass.as",
+                                         new ViolationPosition[]
+                                         { new ViolationPosition( 33, 33 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new InaccessibleMetaDataRule();
+   }
+}
\ No newline at end of file

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/parsley/MessageInterceptorSignatureRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/MessageInterceptorSignatureRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/MessageInterceptorSignatureRuleTest.java
new file mode 100644
index 0000000..497faf3
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/MessageInterceptorSignatureRuleTest.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.parsley;
+
+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 MessageInterceptorSignatureRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "parsley.MessageInterceptorSignature.as", new ViolationPosition[]
+      { new ViolationPosition( 42, 42 ),
+                  new ViolationPosition( 47, 47 ),
+                  new ViolationPosition( 53, 53 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new MessageInterceptorSignatureRule();
+   }
+}

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/parsley/MismatchedManagedEventRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/MismatchedManagedEventRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/MismatchedManagedEventRuleTest.java
new file mode 100644
index 0000000..95d0736
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/MismatchedManagedEventRuleTest.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.parsley;
+
+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 MismatchedManagedEventRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "parsley.MismatchedManagedEvent.as", new ViolationPosition[]
+      { new ViolationPosition( 36, 36 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new MismatchedManagedEventRule();
+   }
+}

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/parsley/MisplacedMetaDataRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/MisplacedMetaDataRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/MisplacedMetaDataRuleTest.java
new file mode 100644
index 0000000..5097b09
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/MisplacedMetaDataRuleTest.java
@@ -0,0 +1,67 @@
+/*
+ * 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.parsley;
+
+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 MisplacedMetaDataRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "parsley.MisplacedMetaData.as", new ViolationPosition[]
+      { new ViolationPosition( 48, 48 ),
+                  new ViolationPosition( 49, 49 ),
+                  new ViolationPosition( 50, 50 ),
+                  new ViolationPosition( 51, 51 ),
+                  new ViolationPosition( 52, 52 ),
+                  new ViolationPosition( 53, 53 ),
+                  new ViolationPosition( 54, 54 ),
+                  new ViolationPosition( 55, 55 ),
+                  new ViolationPosition( 58, 58 ),
+                  new ViolationPosition( 63, 63 ),
+                  new ViolationPosition( 64, 64 ),
+                  new ViolationPosition( 65, 65 ),
+                  new ViolationPosition( 66, 66 ),
+                  new ViolationPosition( 67, 67 ),
+                  new ViolationPosition( 68, 68 ),
+                  new ViolationPosition( 69, 69 ),
+                  new ViolationPosition( 70, 70 ),
+                  new ViolationPosition( 33, 33 ),
+                  new ViolationPosition( 34, 34 ),
+                  new ViolationPosition( 35, 35 ),
+                  new ViolationPosition( 36, 36 ),
+                  new ViolationPosition( 37, 37 ),
+                  new ViolationPosition( 38, 38 ),
+                  new ViolationPosition( 39, 39 ),
+                  new ViolationPosition( 40, 40 ),
+                  new ViolationPosition( 41, 41 ),
+                  new ViolationPosition( 42, 42 ),
+                  new ViolationPosition( 43, 43 ),
+                  new ViolationPosition( 44, 44 ),
+                  new ViolationPosition( 45, 45 ), } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new MisplacedMetaDataRule();
+   }
+}

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/parsley/RedundantMessageHandlerTypeAttributeRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/RedundantMessageHandlerTypeAttributeRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/RedundantMessageHandlerTypeAttributeRuleTest.java
new file mode 100644
index 0000000..f6c21ef
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/RedundantMessageHandlerTypeAttributeRuleTest.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.parsley;
+
+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 RedundantMessageHandlerTypeAttributeRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "parsley.RedundantMessageHandlerTypeAttribute.as", new ViolationPosition[]
+      { new ViolationPosition( 41, 41 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new RedundantMessageHandlerTypeAttributeRule();
+   }
+}

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/parsley/RedundantMethodAttributeRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/RedundantMethodAttributeRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/RedundantMethodAttributeRuleTest.java
new file mode 100644
index 0000000..2dfffc6
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/RedundantMethodAttributeRuleTest.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.parsley;
+
+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 RedundantMethodAttributeRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "parsley.RedundantMethodAttribute.as", new ViolationPosition[]
+      { new ViolationPosition( 41, 41 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new RedundantMethodAttributeRule();
+   }
+}

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/parsley/UnknownMetaDataAttributeRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/UnknownMetaDataAttributeRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/UnknownMetaDataAttributeRuleTest.java
new file mode 100644
index 0000000..ab877f8
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/parsley/UnknownMetaDataAttributeRuleTest.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.parsley;
+
+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 UnknownMetaDataAttributeRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "parsley.UnknownMetaDataAttribute.as", new ViolationPosition[]
+      { new ViolationPosition( 36, 36 ),
+                  new ViolationPosition( 39, 39 ),
+                  new ViolationPosition( 33, 33 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UnknownMetaDataAttributeRule();
+   }
+}


[28/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/JPEGEncoder2.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/JPEGEncoder2.as b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/JPEGEncoder2.as
new file mode 100644
index 0000000..3bcf7d1
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/JPEGEncoder2.as
@@ -0,0 +1,671 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import flash.display.BitmapData;
+	import flash.utils.ByteArray;
+	
+	public final class JPEGEncoder
+	{
+		// Static table initialization
+		private const ZigZag:Vector.<int> = Vector.<int>([
+			0, 1, 5, 6,14,15,27,28,
+			2, 4, 7,13,16,26,29,42,
+			3, 8,12,17,25,30,41,43,
+			9,11,18,24,31,40,44,53,
+			10,19,23,32,39,45,52,54,
+			20,22,33,38,46,51,55,60,
+			21,34,37,47,50,56,59,61,
+			35,36,48,49,57,58,62,63
+		]);
+		private var a:Vector.<String> = new Vector.<String>(); 
+		private var YTable:Vector.<int> = new Vector.<int>(64, true);
+		private var UVTable:Vector.<int> = new Vector.<int>(64, true);
+		private var outputfDCTQuant:Vector.<int> = new Vector.<int>(64, true);
+		private var fdtbl_Y:Vector.<Number> = new Vector.<Number>(64, true);
+		private var fdtbl_UV:Vector.<Number> = new Vector.<Number>(64, true);
+		private var sf:int;
+		
+		private const aasf:Vector.<Number> = Vector.<Number>([
+			1.0, 1.387039845, 1.306562965, 1.175875602,
+			1.0, 0.785694958, 0.541196100, 0.275899379
+		]);
+		
+		private var YQT:Vector.<int> = Vector.<int>([
+			16, 11, 10, 16, 24, 40, 51, 61,
+			12, 12, 14, 19, 26, 58, 60, 55,
+			14, 13, 16, 24, 40, 57, 69, 56,
+			14, 17, 22, 29, 51, 87, 80, 62,
+			18, 22, 37, 56, 68,109,103, 77,
+			24, 35, 55, 64, 81,104,113, 92,
+			49, 64, 78, 87,103,121,120,101,
+			72, 92, 95, 98,112,100,103, 99
+		]);
+		
+		private const UVQT:Vector.<int> = Vector.<int>([
+			17, 18, 24, 47, 99, 99, 99, 99,
+			18, 21, 26, 66, 99, 99, 99, 99,
+			24, 26, 56, 99, 99, 99, 99, 99,
+			47, 66, 99, 99, 99, 99, 99, 99,
+			99, 99, 99, 99, 99, 99, 99, 99,
+			99, 99, 99, 99, 99, 99, 99, 99,
+			99, 99, 99, 99, 99, 99, 99, 99,
+			99, 99, 99, 99, 99, 99, 99, 99
+		]);
+		
+		private function initQuantTables(sf:int):void
+		{
+			var a:Vector.<String> = new Vector.<String>();
+			var i:int;
+			const I64:int = 64;
+			const I8:int = 8;
+			for (i = 0; i < I64; ++i)
+			{
+				var t:int = int((YQT[i]*sf+50)*0.01);
+				if (t < 1) {
+					t = 1;
+				} else if (t > 255) {
+					t = 255;
+				}
+				YTable[ZigZag[i]] = t;
+			}
+			
+			for (i = 0; i < I64; i++)
+			{
+				var u:int = int((UVQT[i]*sf+50)*0.01);
+				if (u < 1) {
+					u = 1;
+				} else if (u > 255) {
+					u = 255;
+				}
+				UVTable[ZigZag[i]] = u;
+			}
+			i = 0;
+			for (var row:int = 0; row < I8; ++row)
+			{
+				for (var col:int = 0; col < I8; ++col)
+				{
+					fdtbl_Y[i]  = (1 / (YTable [ZigZag[i]] * aasf[row] * aasf[col] * I8));
+					fdtbl_UV[i] = (1 / (UVTable[ZigZag[i]] * aasf[row] * aasf[col] * I8));
+					i++;
+				}
+			}
+		}
+		
+		private var YDC_HT:Vector.<BitString>;
+		private var UVDC_HT:Vector.<BitString>;
+		private var YAC_HT:Vector.<BitString>;
+		private var UVAC_HT:Vector.<BitString>;
+		
+		private function computeHuffmanTbl(nrcodes:Vector.<int>, std_table:Vector.<int>):Vector.<BitString>
+		{
+			var codevalue:int = 0;
+			var pos_in_table:int = 0;
+			var HT:Vector.<BitString> = new Vector.<BitString>(251, true);
+			var bitString:BitString;
+			for (var k:int=1; k<=16; ++k)
+			{
+				for (var j:int=1; j<=nrcodes[k]; ++j)
+				{
+					HT[std_table[pos_in_table]] = bitString = new BitString();
+					bitString.val = codevalue;
+					bitString.len = k;
+					pos_in_table++;
+					codevalue++;
+				}
+				codevalue<<=1;
+			}
+			return HT;
+		}
+		
+		private var std_dc_luminance_nrcodes:Vector.<int> = Vector.<int>([0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0]);
+		private var std_dc_luminance_values:Vector.<int> = Vector.<int>([0,1,2,3,4,5,6,7,8,9,10,11]);
+		private var std_ac_luminance_nrcodes:Vector.<int> = Vector.<int>([0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d]);
+		private var std_ac_luminance_values:Vector.<int> = Vector.<int>([0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,
+			0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,
+			0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,
+			0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,
+			0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,
+			0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28,
+			0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,
+			0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,
+			0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
+			0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,
+			0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,
+			0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89,
+			0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,
+			0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,
+			0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,
+			0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,
+			0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,
+			0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,
+			0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,
+			0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,
+			0xf9,0xfa]);
+		
+		private var std_dc_chrominance_nrcodes:Vector.<int> = Vector.<int>([0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0]);
+		private var std_dc_chrominance_values:Vector.<int> = Vector.<int>([0,1,2,3,4,5,6,7,8,9,10,11]);
+		private var std_ac_chrominance_nrcodes:Vector.<int> = Vector.<int>([0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77]);
+		private var std_ac_chrominance_values:Vector.<int> = Vector.<int>([0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21,
+			0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,
+			0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91,
+			0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,
+			0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,
+			0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,
+			0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38,
+			0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,
+			0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,
+			0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,
+			0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,
+			0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,
+			0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,
+			0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,
+			0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,
+			0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,
+			0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,
+			0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,
+			0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,
+			0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,
+			0xf9,0xfa
+		]);
+		
+		private function initHuffmanTbl():void
+		{
+			YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values);
+			UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values);
+			YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values);
+			UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values);
+		}
+		
+		private var bitcode:Vector.<BitString> = new Vector.<BitString>(65535, true);
+		private var category:Vector.<int> = new Vector.<int>(65535, true);
+		
+		private function initCategoryNumber():void
+		{
+			var nrlower:int = 1;
+			var nrupper:int = 2;
+			var bitString:BitString;
+			const I15:int = 15;
+			var pos:int;
+			for (var cat:int=1; cat<=I15; ++cat)
+			{
+				//Positive numbers
+				for (var nr:int=nrlower; nr<nrupper; ++nr)
+				{
+					pos = int(32767+nr);
+					category[pos] = cat;
+					bitcode[pos] = bitString = new BitString();
+					bitString.len = cat;
+					bitString.val = nr;
+				}
+				//Negative numbers
+				for (var nrneg:int=-(nrupper-1); nrneg<=-nrlower; ++nrneg)
+				{
+					pos = int(32767+nrneg);
+					category[pos] = cat;
+					bitcode[pos] = bitString = new BitString();
+					bitString.len = cat;
+					bitString.val = nrupper-1+nrneg;
+				}
+				nrlower <<= 1;
+				nrupper <<= 1;
+			}
+		}
+		
+		// IO functions
+		
+		private var byteout:ByteArray;
+		private var bytenew:int = 0;
+		private var bytepos:int = 7;
+		
+		private function writeBits(bs:BitString):void
+		{
+			var value:int = bs.val;
+			var posval:int = bs.len-1;
+			while ( posval >= 0 )
+			{
+				if (value & uint(1 << posval) )
+					bytenew |= uint(1 << bytepos);
+				posval--;
+				bytepos--;
+				if (bytepos < 0)
+				{
+					if (bytenew == 0xFF)
+					{
+						byteout.writeByte(0xFF);
+						byteout.writeByte(0);
+					}
+					else byteout.writeByte(bytenew);
+					bytepos=7;
+					bytenew=0;
+				}
+			}
+		}
+		
+		// DCT & quantization core
+		
+		private function fDCTQuant(data:Vector.<Number>, fdtbl:Vector.<Number>):Vector.<int>
+		{
+			/* Pass 1: process rows. */
+			var dataOff:int=0;
+			var d0:Number, d1:Number, d2:Number, d3:Number, d4:Number, d5:Number, d6:Number, d7:Number;
+			var i:int;
+			const I8:int = 8;
+			const I64:int = 64;
+			for (i=0; i<I8; ++i)
+			{	
+				d0 = data[int(dataOff)];
+				d1 = data[int(dataOff+1)];
+				d2 = data[int(dataOff+2)];
+				d3 = data[int(dataOff+3)];
+				d4 = data[int(dataOff+4)];
+				d5 = data[int(dataOff+5)];
+				d6 = data[int(dataOff+6)];
+				d7 = data[int(dataOff+7)];
+				
+				var tmp0:Number = d0 + d7;
+				var tmp7:Number = d0 - d7;
+				var tmp1:Number = d1 + d6;
+				var tmp6:Number = d1 - d6;
+				var tmp2:Number = d2 + d5;
+				var tmp5:Number = d2 - d5;
+				var tmp3:Number = d3 + d4;
+				var tmp4:Number = d3 - d4;
+				
+				/* Even part */
+				var tmp10:Number = tmp0 + tmp3;	/* phase 2 */
+				var tmp13:Number = tmp0 - tmp3;
+				var tmp11:Number = tmp1 + tmp2;
+				var tmp12:Number = tmp1 - tmp2;
+				
+				data[int(dataOff)] = tmp10 + tmp11; /* phase 3 */
+				data[int(dataOff+4)] = tmp10 - tmp11;
+				
+				var z1:Number = (tmp12 + tmp13) * 0.707106781; /* c4 */
+				data[int(dataOff+2)] = tmp13 + z1; /* phase 5 */
+				data[int(dataOff+6)] = tmp13 - z1;
+				
+				/* Odd part */
+				tmp10 = tmp4 + tmp5; /* phase 2 */
+				tmp11 = tmp5 + tmp6;
+				tmp12 = tmp6 + tmp7;
+				
+				/* The rotator is modified from fig 4-8 to avoid extra negations. */
+				var z5:Number = (tmp10 - tmp12) * 0.382683433; /* c6 */
+				var z2:Number = 0.541196100 * tmp10 + z5; /* c2-c6 */
+				var z4:Number = 1.306562965 * tmp12 + z5; /* c2+c6 */
+				var z3:Number = tmp11 * 0.707106781; /* c4 */
+				
+				var z11:Number = tmp7 + z3;	/* phase 5 */
+				var z13:Number = tmp7 - z3;
+				
+				data[int(dataOff+5)] = z13 + z2;	/* phase 6 */
+				data[int(dataOff+3)] = z13 - z2;
+				data[int(dataOff+1)] = z11 + z4;
+				data[int(dataOff+7)] = z11 - z4;
+				
+				dataOff += 8; /* advance pointer to next row */
+			}
+			
+			/* Pass 2: process columns. */
+			dataOff = 0;
+			for (i=0; i<I8; ++i)
+			{
+				d0 = data[int(dataOff)];
+				d1 = data[int(dataOff + 8)];
+				d2 = data[int(dataOff + 16)];
+				d3 = data[int(dataOff + 24)];
+				d4 = data[int(dataOff + 32)];
+				d5 = data[int(dataOff + 40)];
+				d6 = data[int(dataOff + 48)];
+				d7 = data[int(dataOff + 56)];
+				
+				var tmp0p2:Number = d0 + d7;
+				var tmp7p2:Number = d0 - d7;
+				var tmp1p2:Number = d1 + d6;
+				var tmp6p2:Number = d1 - d6;
+				var tmp2p2:Number = d2 + d5;
+				var tmp5p2:Number = d2 - d5;
+				var tmp3p2:Number = d3 + d4;
+				var tmp4p2:Number = d3 - d4;
+				
+				/* Even part */
+				var tmp10p2:Number = tmp0p2 + tmp3p2;	/* phase 2 */
+				var tmp13p2:Number = tmp0p2 - tmp3p2;
+				var tmp11p2:Number = tmp1p2 + tmp2p2;
+				var tmp12p2:Number = tmp1p2 - tmp2p2;
+				
+				data[int(dataOff)] = tmp10p2 + tmp11p2; /* phase 3 */
+				data[int(dataOff+32)] = tmp10p2 - tmp11p2;
+				
+				var z1p2:Number = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */
+				data[int(dataOff+16)] = tmp13p2 + z1p2; /* phase 5 */
+				data[int(dataOff+48)] = tmp13p2 - z1p2;
+				
+				/* Odd part */
+				tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */
+				tmp11p2 = tmp5p2 + tmp6p2;
+				tmp12p2 = tmp6p2 + tmp7p2;
+				
+				/* The rotator is modified from fig 4-8 to avoid extra negations. */
+				var z5p2:Number = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */
+				var z2p2:Number = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */
+				var z4p2:Number = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */
+				var z3p2:Number= tmp11p2 * 0.707106781; /* c4 */
+				
+				var z11p2:Number = tmp7p2 + z3p2;	/* phase 5 */
+				var z13p2:Number = tmp7p2 - z3p2;
+				
+				data[int(dataOff+40)] = z13p2 + z2p2; /* phase 6 */
+				data[int(dataOff+24)] = z13p2 - z2p2;
+				data[int(dataOff+ 8)] = z11p2 + z4p2;
+				data[int(dataOff+56)] = z11p2 - z4p2;
+				
+				dataOff++; /* advance pointer to next column */
+			}
+			
+			// Quantize/descale the coefficients
+			var fDCTQuant:Number;
+			for (i=0; i<I64; ++i)
+			{
+				// Apply the quantization and scaling factor & Round to nearest integer
+				fDCTQuant = data[int(i)]*fdtbl[int(i)];
+				outputfDCTQuant[int(i)] = (fDCTQuant > 0.0) ? int(fDCTQuant + 0.5) : int(fDCTQuant - 0.5);
+			}
+			return outputfDCTQuant;
+		}
+		
+		// Chunk writing
+		private function writeAPP0():void
+		{
+			byteout.writeShort(0xFFE0); // marker
+			byteout.writeShort(16); // length
+			byteout.writeByte(0x4A); // J
+			byteout.writeByte(0x46); // F
+			byteout.writeByte(0x49); // I
+			byteout.writeByte(0x46); // F
+			byteout.writeByte(0); // = "JFIF",'\0'
+			byteout.writeByte(1); // versionhi
+			byteout.writeByte(1); // versionlo
+			byteout.writeByte(0); // xyunits
+			byteout.writeShort(1); // xdensity
+			byteout.writeShort(1); // ydensity
+			byteout.writeByte(0); // thumbnwidth
+			byteout.writeByte(0); // thumbnheight
+		}
+		
+		private function writeSOF0(width:int, height:int):void
+		{
+			byteout.writeShort(0xFFC0); // marker
+			byteout.writeShort(17);   // length, truecolor YUV JPG
+			byteout.writeByte(8);    // precision
+			byteout.writeShort(height);
+			byteout.writeShort(width);
+			byteout.writeByte(3);    // nrofcomponents
+			byteout.writeByte(1);    // IdY
+			byteout.writeByte(0x11); // HVY
+			byteout.writeByte(0);    // QTY
+			byteout.writeByte(2);    // IdU
+			byteout.writeByte(0x11); // HVU
+			byteout.writeByte(1);    // QTU
+			byteout.writeByte(3);    // IdV
+			byteout.writeByte(0x11); // HVV
+			byteout.writeByte(1);    // QTV
+		}
+		
+		private function writeDQT():void
+		{
+			byteout.writeShort(0xFFDB); // marker
+			byteout.writeShort(132);	   // length
+			byteout.writeByte(0);
+			
+			var i:int;
+			const I64:int = 64;
+			for (i=0; i<I64; ++i)
+				byteout.writeByte(YTable[i]);
+			
+			byteout.writeByte(1);
+			
+			for (i=0; i<I64; ++i)
+				byteout.writeByte(UVTable[i]);
+		}
+		
+		private function writeDHT():void
+		{
+			byteout.writeShort(0xFFC4); // marker
+			byteout.writeShort(0x01A2); // length
+			
+			byteout.writeByte(0); // HTYDCinfo
+			var i:int;
+			const I11:int = 11;
+			const I16:int = 16;
+			const I161:int = 161;
+			for (i=0; i<I16; ++i)
+				byteout.writeByte(std_dc_luminance_nrcodes[int(i+1)]);
+			
+			for (i=0; i<=I11; ++i)
+				byteout.writeByte(std_dc_luminance_values[int(i)]);
+			
+			byteout.writeByte(0x10); // HTYACinfo
+			
+			for (i=0; i<I16; ++i)
+				byteout.writeByte(std_ac_luminance_nrcodes[int(i+1)]);
+			
+			for (i=0; i<=I161; ++i)
+				byteout.writeByte(std_ac_luminance_values[int(i)]);
+			
+			byteout.writeByte(1); // HTUDCinfo
+			
+			for (i=0; i<I16; ++i)
+				byteout.writeByte(std_dc_chrominance_nrcodes[int(i+1)]);
+			
+			for (i=0; i<=I11; ++i)
+				byteout.writeByte(std_dc_chrominance_values[int(i)]);
+			
+			byteout.writeByte(0x11); // HTUACinfo
+			
+			for (i=0; i<I16; ++i)
+				byteout.writeByte(std_ac_chrominance_nrcodes[int(i+1)]);
+			
+			for (i=0; i<=I161; ++i)
+				byteout.writeByte(std_ac_chrominance_values[int(i)]);
+		}
+		
+		private function writeSOS():void
+		{
+			byteout.writeShort(0xFFDA); // marker
+			byteout.writeShort(12); // length
+			byteout.writeByte(3); // nrofcomponents
+			byteout.writeByte(1); // IdY
+			byteout.writeByte(0); // HTY
+			byteout.writeByte(2); // IdU
+			byteout.writeByte(0x11); // HTU
+			byteout.writeByte(3); // IdV
+			byteout.writeByte(0x11); // HTV
+			byteout.writeByte(0); // Ss
+			byteout.writeByte(0x3f); // Se
+			byteout.writeByte(0); // Bf
+		}
+		
+		// Core processing
+		internal var DU:Vector.<int> = new Vector.<int>(64, true);
+		
+		private function processDU(CDU:Vector.<Number>, fdtbl:Vector.<Number>, DC:Number, HTDC:Vector.<BitString>, HTAC:Vector.<BitString>):Number
+		{
+			var EOB:BitString = HTAC[0x00];
+			var M16zeroes:BitString = HTAC[0xF0];
+			var pos:int;
+			const I16:int = 16;
+			const I63:int = 63;
+			const I64:int = 64;
+			var DU_DCT:Vector.<int> = fDCTQuant(CDU, fdtbl);
+			//ZigZag reorder
+			for (var j:int=0;j<I64;++j) {
+				DU[ZigZag[j]]=DU_DCT[j];
+			}
+			var Diff:int = DU[0] - DC; DC = DU[0];
+			//Encode DC
+			if (Diff==0) {
+				writeBits(HTDC[0]); // Diff might be 0
+			} else {
+				pos = int(32767+Diff);
+				writeBits(HTDC[category[pos]]);
+				writeBits(bitcode[pos]);
+			}
+			//Encode ACs
+			const end0pos:int = 63;
+			for (; (end0pos>0)&&(DU[end0pos]==0); end0pos--) {};
+			//end0pos = first element in reverse order !=0
+			if ( end0pos == 0) {
+				writeBits(EOB);
+				return DC;
+			}
+			var i:int = 1;
+			var lng:int;
+			while ( i <= end0pos ) {
+				var startpos:int = i;
+				for (; (DU[i]==0) && (i<=end0pos); ++i) {}
+				var nrzeroes:int = i-startpos;
+				if ( nrzeroes >= I16 ) {
+					lng = nrzeroes>>4;
+					for (var nrmarker:int=1; nrmarker <= lng; ++nrmarker)
+						writeBits(M16zeroes);
+					nrzeroes = int(nrzeroes&0xF);
+				}
+				pos = int(32767+DU[i]);
+				writeBits(HTAC[int((nrzeroes<<4)+category[pos])]);
+				writeBits(bitcode[pos]);
+				i++;
+			}
+			if ( end0pos != I63 ) {
+				writeBits(EOB);
+			}
+			return DC;
+		}
+		
+		private var YDU:Vector.<Number> = new Vector.<Number>(64, true);
+		private var UDU:Vector.<Number> = new Vector.<Number>(64, true);
+		private var VDU:Vector.<Number> = new Vector.<Number>(64, true);
+		
+		private function RGB2YUV(img:BitmapData, xpos:int, ypos:int):void
+		{
+			var pos:int=0;
+			const I8:int = 8;
+			for (var y:int=0; y<I8; ++y) {
+				for (var x:int=0; x<I8; ++x) {
+					var P:uint = img.getPixel32(xpos+x,ypos+y);
+					var R:int = (P>>16)&0xFF;
+					var G:int = (P>> 8)&0xFF;
+					var B:int = (P    )&0xFF;
+					YDU[int(pos)]=((( 0.29900)*R+( 0.58700)*G+( 0.11400)*B))-0x80;
+					UDU[int(pos)]=(((-0.16874)*R+(-0.33126)*G+( 0.50000)*B));
+					VDU[int(pos)]=((( 0.50000)*R+(-0.41869)*G+(-0.08131)*B));
+					++pos;
+				}
+			}
+		}
+		
+		public function JPEGEncoder(quality:int=50)
+		{
+			if (quality <= 0)
+				quality = 1;
+			
+			if (quality > 100)
+				quality = 100;
+			
+			sf = quality < 50 ? int(5000 / quality) : int(200 - (quality<<1));
+			init();
+		}
+		
+		private function init():void
+		{
+			ZigZag.fixed = true;
+			aasf.fixed = true;
+			YQT.fixed = true;
+			UVQT.fixed = true;
+			std_ac_chrominance_nrcodes.fixed = true;
+			std_ac_chrominance_values.fixed = true;
+			std_ac_luminance_nrcodes.fixed = true;
+			std_ac_luminance_values.fixed = true;
+			std_dc_chrominance_nrcodes.fixed = true;
+			std_dc_chrominance_values.fixed = true;
+			std_dc_luminance_nrcodes.fixed = true;
+			std_dc_luminance_values.fixed = true;
+			// Create tables
+			initHuffmanTbl();
+			initCategoryNumber();
+			initQuantTables(sf);
+		}
+		
+		public function encode(image:BitmapData):ByteArray
+		{
+			// Initialize bit writer
+			byteout = new ByteArray();
+			
+			bytenew=0;
+			bytepos=7;
+			
+			// Add JPEG headers
+			byteout.writeShort(0xFFD8); // SOI
+			writeAPP0();
+			writeDQT();
+			writeSOF0(image.width,image.height);
+			writeDHT();
+			writeSOS();
+			
+			// Encode 8x8 macroblocks
+			var DCY:Number=0;
+			var DCU:Number=0;
+			var DCV:Number=0;
+			bytenew=0;
+			bytepos=7;
+			
+			var width:int = image.width;
+			var height:int = image.height;
+			
+			for (var ypos:int=0; ypos<height; ypos+=8)
+			{
+				for (var xpos:int=0; xpos<width; xpos+=8)
+				{
+					RGB2YUV(image, xpos, ypos);
+					DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);
+					DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);
+					DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);
+				}
+			}
+			
+			// Do the bit alignment of the EOI marker
+			if ( bytepos >= 0 )
+			{
+				var fillbits:BitString = new BitString();
+				fillbits.len = bytepos+1;
+				fillbits.val = (1<<(bytepos+1))-1;
+				writeBits(fillbits);
+			}
+			byteout.writeShort(0xFFD9); //EOI
+			return byteout;
+		}
+	}
+}
+
+final class BitString
+{
+	public var len:int = 0;
+	public var val:int = 0;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/toAS2/src/fw/data/request/ResultListener.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/toAS2/src/fw/data/request/ResultListener.as b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/toAS2/src/fw/data/request/ResultListener.as
new file mode 100644
index 0000000..f225da6
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/toAS2/src/fw/data/request/ResultListener.as
@@ -0,0 +1,27 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+import src.fw.data.request.Request;
+interface src.fw.data.request.ResultListener
+{
+	public function onResultLoad(request:Request) : Void;
+
+	public function onResultError(request:Request) : Void;
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/unformatted/IContext.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/unformatted/IContext.as b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/unformatted/IContext.as
new file mode 100644
index 0000000..ee1fe67
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/unformatted/IContext.as
@@ -0,0 +1,83 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.commons.context
+{
+	import flash.events.IEventDispatcher;
+	
+	/**
+	 * Interface IContext.
+	 * 
+	 * @author  (resp. mv)
+	 */
+	public interface IContext extends IEventDispatcher
+	{
+		
+		/** 
+		 * Get Value for given key.
+		 * All contexts are searched for the given key.
+		 * 
+ 		 * @param key the name of the attribute to search.
+		 * @result the found value for given key or null.
+		 */
+		function getValue(key:String) : Object;
+
+		/**
+		 * Put a value into the context for a given key.
+		 * 
+		 * @param key the key to store this object.
+		 * @param value the value of the given key.
+		 */
+		function putValue(key:String, value:Object) : void;
+		
+		/**
+		 * Get the context of given type.
+		 * 
+		 * @param contextType the type of the context.
+		 * @result the context of the given type or null.
+		 */
+		function getContext(contextType:String) : IContext;
+		
+		/**
+		 * Get the owner of this context.
+		 * @return the owner, if there is one, or null.
+		 */ 
+		 [Deprecated("There is no owner any longer. Do not use this property")]
+		function get owner() : IContextOwner;
+
+		/**
+	 	 * Parent context. (e.g. for managing "shared" resources).
+	 	 * All contextes build a tree. With this getter you get the parent of this context inside the tree.
+	 	 */
+		function get parentContext() : IContext;
+		
+		/**
+		 * Get the resource for given url.
+		 * @param key the url or key of the asset.
+		 * @return the object of given url with following type:
+		 * MediaType.Text  := String
+		 * MediaType.Audio := com.commons.media.ISound
+		 * MediaType.Image := DisplayObject
+		 * MediaType.FlexModule := DisplayObject
+		 * MediaType.Video := NetStream
+		 * MediaType.FlashApplication := DisplayObject
+		 * MediaType.FlexStyleDeclaration := null
+		 */
+		function getResource(key:String) : Object;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/unformatted/Simple.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/unformatted/Simple.as b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/unformatted/Simple.as
new file mode 100644
index 0000000..78bd746
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/unformatted/Simple.as
@@ -0,0 +1,19 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 simple { public class Simple    {      public function Simple ( )      {         trace ( "Simple" );      }   }   }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/unformatted/Title.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/unformatted/Title.as b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/unformatted/Title.as
new file mode 100644
index 0000000..e2301fb
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-parser/src/test/resources/examples/unformatted/Title.as
@@ -0,0 +1,32 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.viewing
+
+{
+	
+	public final class Title 
+	
+	{
+		
+		public static const SHOW:String = "true";
+		public static const HIDE:String = "false";
+		
+	}
+	
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/pom.xml b/FlexPMD/flex-pmd-java/as3-plugin-utils/pom.xml
new file mode 100644
index 0000000..b907520
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/pom.xml
@@ -0,0 +1,35 @@
+<!--
+
+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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>as3-plugin-utils</artifactId>
+    <packaging>jar</packaging>
+
+    <name>As3 Maven plugin Utils</name>
+    <url>http://maven.apache.org</url>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/java/com/adobe/ac/ncss/filters/FlexFilter.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/java/com/adobe/ac/ncss/filters/FlexFilter.java b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/java/com/adobe/ac/ncss/filters/FlexFilter.java
new file mode 100644
index 0000000..e9590bb
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/java/com/adobe/ac/ncss/filters/FlexFilter.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.ncss.filters;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.Locale;
+
+/**
+ * @author xagnetti
+ */
+public class FlexFilter implements FilenameFilter
+{
+   /*
+    * (non-Javadoc)
+    * @see java.io.FilenameFilter#accept(java.io.File, java.lang.String)
+    */
+   public boolean accept( final File dir,
+                          final String name )
+   {
+      boolean accepted = false;
+
+      if ( !new File( dir, name ).isDirectory() )
+      {
+         accepted = name.toLowerCase( Locale.US ).endsWith( ".as" )
+               || name.toLowerCase( Locale.US ).endsWith( ".mxml" );
+      }
+      return accepted;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/java/com/adobe/ac/ncss/utils/FileUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/java/com/adobe/ac/ncss/utils/FileUtils.java b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/java/com/adobe/ac/ncss/utils/FileUtils.java
new file mode 100644
index 0000000..c75eb12
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/java/com/adobe/ac/ncss/utils/FileUtils.java
@@ -0,0 +1,197 @@
+/*
+ * 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.ncss.utils;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.logging.Logger;
+
+import com.adobe.ac.utils.StackTraceUtils;
+
+/**
+ * @author xagnetti
+ */
+public final class FileUtils
+{
+   public static class FilePathComparator implements Comparator< File >
+   {
+      public int compare( final File arg0,
+                          final File arg1 )
+      {
+         return arg0.getAbsolutePath().compareTo( arg1.getAbsolutePath() );
+      }
+   }
+
+   public static final Logger LOGGER = Logger.getLogger( FileUtils.class.getName() );
+
+   /**
+    * @param line
+    * @return
+    */
+   public static boolean isLineACorrectStatement( final String line )
+   {
+      return line.compareTo( "" ) != 0
+            && lrtrim( line ).compareTo( "{" ) != 0 && lrtrim( line ).compareTo( "}" ) != 0
+            && line.endsWith( ";" );
+   }
+
+   /**
+    * @param directory
+    * @param filter
+    * @param recurse
+    * @return
+    */
+   public static Collection< File > listFiles( final File directory,
+                                               final FilenameFilter filter,
+                                               final boolean recurse )
+   {
+      final ArrayList< File > files = listFilesRecurse( directory,
+                                                        filter,
+                                                        recurse );
+      Collections.sort( files,
+                        new FilePathComparator() );
+      return files;
+   }
+
+   /**
+    * @param sourceDirectory
+    * @param filter
+    * @param recurse
+    * @return
+    */
+   public static Collection< File > listFiles( final List< File > sourceDirectory,
+                                               final FilenameFilter filter,
+                                               final boolean recurse )
+   {
+      final ArrayList< File > files = new ArrayList< File >();
+
+      for ( final File topDirectory : sourceDirectory )
+      {
+         files.addAll( listFilesRecurse( topDirectory,
+                                         filter,
+                                         recurse ) );
+      }
+
+      Collections.sort( files,
+                        new FilePathComparator() );
+      return files;
+   }
+
+   /**
+    * @param file
+    * @return
+    */
+   public static List< String > readFile( final File file )
+   {
+      final List< String > result = new ArrayList< String >();
+
+      BufferedReader inReader = null;
+      try
+      {
+         final Reader reader = new InputStreamReader( new FileInputStream( file ), "UTF-8" );
+         inReader = new BufferedReader( reader );
+
+         String line = readLine( inReader );
+
+         while ( line != null )
+         {
+            result.add( line );
+            line = readLine( inReader );
+         }
+         inReader.close();
+      }
+      catch ( final IOException e )
+      {
+         StackTraceUtils.print( e );
+      }
+      return result;
+   }
+
+   private static ArrayList< File > listFilesRecurse( final File directory,
+                                                      final FilenameFilter filter,
+                                                      final boolean recurse )
+   {
+      final ArrayList< File > files = new ArrayList< File >();
+      final File[] entries = directory.listFiles();
+
+      if ( entries != null )
+      {
+         for ( final File entry : entries )
+         {
+            if ( filter == null
+                  || filter.accept( directory,
+                                    entry.getName() ) )
+            {
+               files.add( entry );
+            }
+            if ( recurse
+                  && entry.isDirectory() )
+            {
+               files.addAll( listFilesRecurse( entry,
+                                               filter,
+                                               recurse ) );
+            }
+         }
+      }
+      return files;
+   }
+
+   private static String lrtrim( final String source )
+   {
+      return ltrim( rtrim( source ) );
+   }
+
+   /* remove leading whitespace */
+   private static String ltrim( final String source )
+   {
+      return source.replaceAll( "^\\s+",
+                                "" );
+   }
+
+   private static String readLine( final BufferedReader inReader ) throws IOException
+   {
+      final String line = inReader.readLine();
+
+      if ( line != null )
+      {
+         return line.replaceAll( "\uFEFF",
+                                 "" );
+      }
+      return null;
+   }
+
+   /* remove trailing whitespace */
+   private static String rtrim( final String source )
+   {
+      return source.replaceAll( "\\s+$",
+                                "" );
+   }
+
+   private FileUtils()
+   {
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/java/com/adobe/ac/pmd/LoggerUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/java/com/adobe/ac/pmd/LoggerUtils.java b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/java/com/adobe/ac/pmd/LoggerUtils.java
new file mode 100644
index 0000000..007db33
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/java/com/adobe/ac/pmd/LoggerUtils.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;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.logging.LogManager;
+
+public final class LoggerUtils
+{
+   public void loadConfiguration()
+   {
+      try
+      {
+         if ( System.getProperty( "java.util.logging.config.file" ) == null )
+         {
+            final InputStream resourceAsStream = getClass().getResourceAsStream( "/logger.properties" );
+            LogManager.getLogManager().readConfiguration( resourceAsStream );
+         }
+      }
+      catch ( final SecurityException e )
+      {
+         e.printStackTrace();
+      }
+      catch ( final IOException e )
+      {
+         e.printStackTrace();
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/java/com/adobe/ac/utils/StackTraceUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/java/com/adobe/ac/utils/StackTraceUtils.java b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/java/com/adobe/ac/utils/StackTraceUtils.java
new file mode 100644
index 0000000..179d1f5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/java/com/adobe/ac/utils/StackTraceUtils.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.utils;
+
+/**
+ * @author xagnetti
+ */
+public final class StackTraceUtils
+{
+   /**
+    * Pretty print the first two lines of the stacktrace of the given exception
+    * 
+    * @param exception Exception to print
+    * @return The first two lines of the stacktrace
+    */
+   public static String print( final Exception exception )
+   {
+      final StringBuffer buffer = new StringBuffer();
+
+      buffer.append( exception.getMessage()
+            + " at " + exception.getStackTrace()[ 0 ] + "\n" );
+      buffer.append( exception.getStackTrace()[ 1 ]
+            + "\n" + exception.getStackTrace()[ 2 ] );
+      return buffer.toString();
+   }
+
+   /**
+    * Pretty print the first two lines of the stacktrace of the given exception,
+    * specifying which file the exception was thrown on.
+    * 
+    * @param fileName current fileName
+    * @param exception exception thrown
+    * @return error message
+    */
+   public static String print( final String fileName,
+                               final Exception exception )
+   {
+      return "on "
+            + fileName + " " + print( exception );
+   }
+
+   private StackTraceUtils()
+   {
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/resources/logger.properties
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/resources/logger.properties b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/resources/logger.properties
new file mode 100644
index 0000000..da1fe6f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/main/resources/logger.properties
@@ -0,0 +1,22 @@
+# 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.
+
+com.adobe.ac.cpd.commandline.FlexCPD.level=SEVERE
+com.adobe.ac.pmd.commandline.FlexPMD.level=SEVERE
+com.adobe.ac.pmd.metrics.commandline.FlexMetrics.level=SEVERE
+com.adobe.ac.pmd.files.FileSetUtils.level=WARNING
+com.adobe.ac.pmd.rules.core.AbstractFlexRule.leve=INFO
+com.adobe.ac.pmd.FlexPmdViolations.level=WARNING
+com.adobe.ac.pmd.ResourcesManagerTest.level=WARNING

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/java/com/adobe/ac/ncss/utils/TestFileUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/java/com/adobe/ac/ncss/utils/TestFileUtils.java b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/java/com/adobe/ac/ncss/utils/TestFileUtils.java
new file mode 100644
index 0000000..70c50c5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/java/com/adobe/ac/ncss/utils/TestFileUtils.java
@@ -0,0 +1,83 @@
+/*
+ * 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.ncss.utils;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.junit.Test;
+
+import com.adobe.ac.ncss.filters.FlexFilter;
+
+public class TestFileUtils extends TestCase
+{
+   @Test
+   public void testIsLineACorrectStatement()
+   {
+      assertFalse( FileUtils.isLineACorrectStatement( "    { " ) );
+      assertFalse( FileUtils.isLineACorrectStatement( "    } " ) );
+      assertFalse( FileUtils.isLineACorrectStatement( "{" ) );
+      assertFalse( FileUtils.isLineACorrectStatement( "}" ) );
+      assertFalse( FileUtils.isLineACorrectStatement( "    class MyModel " ) );
+      assertFalse( FileUtils.isLineACorrectStatement( "class MyModel" ) );
+      assertFalse( FileUtils.isLineACorrectStatement( "function lala() : void" ) );
+      assertFalse( FileUtils.isLineACorrectStatement( "var i : int" ) );
+      assertFalse( FileUtils.isLineACorrectStatement( "lalla; cdcdvf" ) );
+      assertTrue( FileUtils.isLineACorrectStatement( "var i : int;" ) );
+      assertTrue( FileUtils.isLineACorrectStatement( "  foo( bar );" ) );
+      assertTrue( FileUtils.isLineACorrectStatement( "lalla;" ) );
+   }
+
+   @Test
+   public void testListFiles()
+   {
+      assertEquals( 12,
+                    FileUtils.listFiles( new File( "src/test/resources" ),
+                                         new FlexFilter(),
+                                         true ).size() );
+
+      final List< File > sourceDirectory = new ArrayList< File >();
+
+      sourceDirectory.add( new File( "src/test/resources/com/adobe/ac/ncss/flexunit" ) );
+      sourceDirectory.add( new File( "src/test/resources/com/adobe/ac/ncss/mxml" ) );
+
+      assertEquals( 12,
+                    FileUtils.listFiles( sourceDirectory,
+                                         new FlexFilter(),
+                                         true ).size() );
+
+      assertEquals( 0,
+                    FileUtils.listFiles( new File( "./src/main/java" ),
+                                         new FlexFilter(),
+                                         true ).size() );
+   }
+
+   @Test
+   public void testReadFile() throws IOException
+   {
+      assertEquals( 61,
+                    FileUtils.readFile( new File( "./src/test/resources/com/adobe/ac/ncss/mxml/IterationsList.mxml" ) )
+                             .size() );
+
+      assertEquals( 0,
+                    FileUtils.readFile( new File( "./DoNotExistFile.as" ) ).size() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/java/com/adobe/ac/utils/StackTraceUtilsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/java/com/adobe/ac/utils/StackTraceUtilsTest.java b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/java/com/adobe/ac/utils/StackTraceUtilsTest.java
new file mode 100644
index 0000000..e5613fe
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/java/com/adobe/ac/utils/StackTraceUtilsTest.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.utils;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class StackTraceUtilsTest
+{
+   @SuppressWarnings("serial")
+   private static class CustomException extends Exception
+   {
+      public CustomException( final String message )
+      {
+         super( message );
+      }
+   }
+
+   @Test
+   public void testPrint()
+   {
+      final Exception exception = new CustomException( "message" );
+
+      assertEquals( "stackTrace is not correct",
+                    "message at com.adobe.ac.utils.StackTraceUtilsTest.testPrint(StackTraceUtilsTest.java:37)\n"
+                          + "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n"
+                          + "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)",
+                    StackTraceUtils.print( exception ) );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/AbstractRowData.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/AbstractRowData.as b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/AbstractRowData.as
new file mode 100644
index 0000000..2c71803
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/AbstractRowData.as
@@ -0,0 +1,115 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flexunit.flexui.data
+{
+   import flexunit.flexui.controls.FlexUnitLabels;
+   
+   import mx.formatters.NumberFormatter;
+   
+   /**
+    * Abstract class representing a row in the test cases tree.
+    * A row can be either a test class (node) or a test case (leaf)
+    */   
+   public class AbstractRowData
+   {
+      public var label : String;
+      public var qualifiedClassName : String;
+      public var testSuccessful : Boolean;
+      public var testIsFailure : Boolean;
+
+      /**
+       * @return the class name from the qualified class name
+       */      
+      public function get className() : String
+      {
+         if ( qualifiedClassName )
+         {
+            var splitIndex : int = qualifiedClassName.lastIndexOf( "::" );
+
+            if ( splitIndex >= 0 )
+            {
+               return qualifiedClassName.substring( splitIndex + 2 );
+            }
+         }
+
+         return qualifiedClassName;
+      }
+
+      /**
+       * Abstract method. Defined in TestCaseRowData and in TestClassRowData
+       * 
+       * @return the count of assertions which have been made either in average if
+       * the current row is a test class or in total if the current row is a test case
+       */
+      public function get assertionsMade() : Number
+      {
+         throw new Error( "TestSummaryRowData::assertionsMade is an abstract method" );
+      }
+
+      public function get failIcon() : Class
+      {
+         throw new Error( "TestSummaryRowData::failIcon is an abstract method" );
+      }
+
+      public function get passIcon() : Class
+      {
+         throw new Error( "TestSummaryRowData::passIcon is an abstract method" );
+      }
+      
+      /**
+       * Abstract method which allows the legend to be correctly formatted.
+       *  
+       * @return true for the TestClassRowData and false for the TestCaseRowData
+       */      
+      public function get isAverage() : Boolean
+      {
+         throw new Error( "TestSummaryRowData::isAverage is an abstract method" );
+      }
+      
+      public function get formattedAssertionsMade() : String
+      {
+         var f : NumberFormatter = new NumberFormatter();
+         
+         f.precision = 2;
+         f.rounding = "nearest";
+         
+         return f.format( assertionsMade );
+      }
+      
+      /**
+       * @return the correcly formatted (no typos) legend for the number of assertions
+       * made.
+       * 
+       * Can return :
+       *  - 0 assertions have been made in average
+       *  - 0 assertions have been made in total
+       *  - 1 assertion has been made in average
+       *  - 1 assertion has been made in total
+       *  - 2 assertions have been made in average
+       *  - 2 assertions have been made in total
+       */      
+      public function get assertionsMadeLegend() : String
+      {
+         return FlexUnitLabels.formatAssertions( 
+                           formattedAssertionsMade,
+                           assertionsMade,
+                           isAverage );
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/FilterTestsModel.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/FilterTestsModel.as b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/FilterTestsModel.as
new file mode 100644
index 0000000..f0ac496
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/FilterTestsModel.as
@@ -0,0 +1,74 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flexunit.flexui.data
+{
+   import flash.events.EventDispatcher;
+   
+   import flexunit.flexui.data.filter.ITestFunctionStatus;
+   import flexunit.flexui.event.TestRunnerBasePresentationModelProperyChangedEvent;
+   
+   import mx.collections.IList;
+
+   [Event( 
+      name="filterChanged", 
+      type="flash.events.Event")]
+   
+   public class FilterTestsModel extends EventDispatcher
+   {
+      public var filter : String;
+      
+      private var _selectedTestFunctionStatus : ITestFunctionStatus;
+
+      public function searchFilterFunc( item : Object ) : Boolean
+      {
+         if ( item is TestCaseData )
+         {
+            var testClassSum : TestCaseData = item as TestCaseData;
+
+            testClassSum.filterText = filter;
+            testClassSum.selectedTestFunctionStatus = _selectedTestFunctionStatus;
+            testClassSum.refresh();
+
+            var testCaseChildren : IList = testClassSum.children;
+
+            if ( testCaseChildren && testCaseChildren.length > 0 )
+            {
+               return true;
+            }
+         }
+
+         return false;
+      }
+      
+      public function set selectedTestFunctionStatus( value : ITestFunctionStatus ) : void
+      {
+         _selectedTestFunctionStatus = value;
+         
+         dispatchEvent(
+               new TestRunnerBasePresentationModelProperyChangedEvent( 
+                     TestRunnerBasePresentationModelProperyChangedEvent.FILTER_CHANGED, 
+                     true ) );
+      }
+
+      public function get selectedTestFunctionStatus() : ITestFunctionStatus
+      {
+         return _selectedTestFunctionStatus;
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestCaseData.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestCaseData.as b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestCaseData.as
new file mode 100644
index 0000000..23b05a9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestCaseData.as
@@ -0,0 +1,139 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flexunit.flexui.data
+{
+   import flexunit.flexui.data.filter.ITestFunctionStatus;
+   import flexunit.flexui.data.filter.TestfFunctionStatuses;
+   
+   import mx.collections.ArrayCollection;
+   import mx.collections.IList;
+   import mx.collections.ListCollectionView;
+
+   public class TestCaseData extends AbstractRowData
+   {
+      public var testFunctions : IList = new ArrayCollection();
+      public var filterText : String;
+      public var selectedTestFunctionStatus : ITestFunctionStatus = TestfFunctionStatuses.ALL;
+      
+      [Embed(source="/assets/pass_small.png")]
+      private static var passImg : Class;
+
+      [Embed(source="/assets/fail_small.png")]
+      private static var failImg : Class;
+
+      private var _testsNumber : int;
+      private var _testsPassedNumber : int;
+
+      public function TestCaseData( testFunction : TestFunctionRowData )
+      {
+         label = testFunction.className;
+         qualifiedClassName = testFunction.qualifiedClassName;
+         testFunctions = new ArrayCollection();
+         testSuccessful = true;
+         _testsNumber = 0;
+         _testsPassedNumber = 0;
+      }
+
+      public function get children() : IList
+      {
+         return testFunctions;
+      }
+
+      override public function get failIcon() : Class
+      {
+         return failImg;
+      }
+
+      override public function get passIcon() : Class
+      {
+         return passImg;
+      }
+      
+      override public function get isAverage() : Boolean
+      {
+         return true;
+      }
+
+      public function get testsNumber() : int
+      {
+         return _testsNumber;
+      }
+
+      public function get passedTestsNumber() : int
+      {
+         return _testsPassedNumber;
+      }
+      
+      override public function get assertionsMade() : Number
+      {
+         var currentAssertionsMade : Number = 0;
+         
+         for each ( var test : TestFunctionRowData in testFunctions )
+         {
+            currentAssertionsMade += test.assertionsMade;
+         }
+         
+         if ( testFunctions.length > 0 )
+         {
+            return currentAssertionsMade / testFunctions.length;
+         }
+         return 0;
+      }
+      
+      public function addTest( testFunctionToAdd : TestFunctionRowData ) : void
+      {
+         testFunctionToAdd.parentTestCaseSummary = this;
+         if ( ! testFunctionToAdd.testSuccessful )
+         {
+            testSuccessful = false;
+         }
+         else
+         {
+            _testsPassedNumber++;
+         }
+         _testsNumber++;
+         testFunctions.addItem( testFunctionToAdd );
+      }
+
+      public function refresh() : void
+      {
+         var filteredChildren : ListCollectionView = testFunctions as ListCollectionView;
+         if ( filteredChildren )
+         {
+            filteredChildren.filterFunction = searchFilterFunc;
+            filteredChildren.refresh();
+         }
+      }
+
+      private function searchFilterFunc( item : Object ) : Boolean
+      {
+         var testFunction : TestFunctionRowData = item as TestFunctionRowData;
+         if ( ( className && className.toLowerCase().indexOf( filterText.toLowerCase() ) != - 1 ) ||
+              filterText == null ||
+              filterText == "" ||
+              testFunction.isVisibleOnFilterText( filterText.toLowerCase() ) )
+         {
+            if ( selectedTestFunctionStatus.isTestFunctionVisible( testFunction ) )
+               return true;
+         }
+
+         return false;
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestFunctionRowData.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestFunctionRowData.as b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestFunctionRowData.as
new file mode 100644
index 0000000..3024d1a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestFunctionRowData.as
@@ -0,0 +1,217 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flexunit.flexui.data
+{
+   import flexunit.flexui.patterns.*;
+   import flexunit.framework.TestCase;
+   
+   import mx.formatters.NumberFormatter;
+
+   public class TestFunctionRowData extends AbstractRowData
+   {
+      public static const EMPTY_STRING : String = "-";
+
+      private const patterns : Array =
+          [
+             new AssertNotContainedPattern(),
+             new AssertNoMatchPattern(),
+             new AssertMatchPattern(),
+             new AssertContainedPattern(),
+             new AssertEventOcurredPattern(),
+             new AssertEqualsPattern(),
+             new AssertNotNullPattern(),
+             new AssertNotUndefinedPattern(),
+             new AssertNullPattern(),
+             new AssertUndefinedPattern(),
+             new FailAsyncCallPattern()
+          ];
+
+      public var testCase : TestCase;
+      public var testMethodName : String;
+      public var parentTestCaseSummary : TestCaseData;
+      public var expectedResult : String;
+      public var actualResult : String;
+
+      private var _errorMessage : String;
+      private var _stackTrace : String;
+      private var _error : Error;
+      private var _location : String;
+      private var _line : Number;
+
+      [Embed(source="/assets/pass_mini.png")]
+      private static var passImgMini : Class;
+
+      [Embed(source="/assets/fail_mini.png")]
+      private static var failImgMini : Class;
+
+      override public function get failIcon() : Class
+      {
+         return failImgMini;
+      }
+
+      override public function get passIcon() : Class
+      {
+         return passImgMini;
+      }
+      
+      override public function get assertionsMade() : Number
+      {
+         return testCase.assertionsMade;
+      }
+
+      override public function get formattedAssertionsMade() : String
+      {
+         var f : NumberFormatter = new NumberFormatter();
+         
+         f.precision = 0;
+         f.rounding = "nearest";
+         
+         return f.format( assertionsMade );
+      }
+      
+      override public function get isAverage() : Boolean
+      {
+         return false;
+      }
+
+      public function set error( value : Error ) : void
+      {
+         _error = value;
+
+         _errorMessage = error ? error.message : EMPTY_STRING;
+         expectedResult = EMPTY_STRING;
+         actualResult = EMPTY_STRING;
+
+         if ( error != null && error.getStackTrace() )
+         {
+            _stackTrace = formatStack( value.getStackTrace().replace( "<", "&lt;" ).replace( ">", "&gt;" ) );
+
+            for ( var i : int = 0 ; i < patterns.length; i++ )
+            {
+               var pattern : AbstractPattern = AbstractPattern( patterns[ i ] );
+
+               if( pattern.match( error.message ) )
+               {
+                  pattern.apply( this );
+                  break;
+               }
+            }
+         }
+      }
+
+      public function get error() : Error
+      {
+         return _error;
+      }
+
+      public function get errorMessage() : String
+      {
+         return _errorMessage;
+      }
+
+      public function get location() : String
+      {
+         if( _location )
+         {
+            return _location + " (l." + _line + ")";
+         }
+         return EMPTY_STRING;
+      }
+
+      public function get stackTrace() : String
+      {
+         return _stackTrace;
+      }
+      
+      public function get stackTraceToolTip() : String
+      {
+         if ( _stackTrace == null )
+            return null;
+            
+         var regexp : RegExp = /\(\)\[.*\\.*\:(\d*)\]/gm;
+         var array : Array = _stackTrace.split( "<br/>" );
+         var stackTraceToolTip : String = "";
+         
+         for ( var i : int = 0; i < array.length; i++ )
+         {
+            stackTraceToolTip += array[ i ].toString().replace( regexp, "() at l.$1" ) + "<br/>";
+         }
+         return stackTraceToolTip;
+      }
+      
+      public function isVisibleOnFilterText( filter : String ) : Boolean
+      {
+         return testMethodName.toLowerCase().indexOf( filter ) > -1 ||
+                actualResult.toLowerCase().indexOf( filter ) > -1 ||
+                expectedResult.toLowerCase().indexOf( filter ) > -1
+      }
+
+      private function extractLocation( line : String ) : Boolean
+      {
+
+         var location : RegExp = /(.*):(\d+)\]$/
+         var splittedLine : Array = line.split( "\\" );
+         var results : Array = location.exec( splittedLine[ splittedLine.length - 1 ] ) as Array;
+
+         if( results && results.length == 3 )
+         {
+            _location = results[ 1 ];
+            _line = results [ 2 ];
+
+            return true;
+         }
+
+        return false;
+      }
+
+      private function formatStack( stackTrace : String ) : String
+      {
+         var replaceNewLine : RegExp = /\n/mg;
+         var html : String = stackTrace.replace( replaceNewLine, "<br/>" );
+         var formattedStack : String = "";
+         var isFirst : Boolean = true;
+
+         for ( var i : int = 1; i < html.split( "<br/>" ).length; i++ )
+         {
+            var currentLine : String = html.split( "<br/>" )[ i ];
+            var matchingFlexunit : RegExp = /(at flexunit.*)$/g;
+            var matchingFlash : RegExp = /(at flash.*)$/g;
+            var matchingFlex : RegExp = /(at mx.*)$/g;
+            var matchingFunction : RegExp = /at Function\/http:\/\/adobe\.com\/AS3\//
+
+            if( ! matchingFlex.test( currentLine ) &&
+                ! matchingFlexunit.test( currentLine ) &&
+                ! matchingFlash.test( currentLine ) &&
+                ! matchingFunction.test( currentLine ) )
+            {
+               if( isFirst && extractLocation( currentLine ) )
+               {
+                  isFirst = false;
+               }
+               formattedStack += "<b>" + currentLine + "</b><br/>";
+            }
+            else
+            {
+               formattedStack += currentLine + "<br/>";
+            }
+         }
+         return formattedStack;
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestRunnerBasePresentationModel.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestRunnerBasePresentationModel.as b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestRunnerBasePresentationModel.as
new file mode 100644
index 0000000..872ffee
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/TestRunnerBasePresentationModel.as
@@ -0,0 +1,315 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flexunit.flexui.data
+{
+   import flash.events.Event;
+   import flash.events.EventDispatcher;
+   import flash.utils.getTimer;
+   
+   import flexunit.flexui.event.TestRunnerBasePresentationModelProperyChangedEvent;
+   import flexunit.framework.TestCase;
+   
+   import mx.collections.ArrayCollection;
+   import mx.collections.IList;
+   import mx.collections.ListCollectionView;
+
+   [Event( name="rowSelectedChanged",          type="flash.events.Event")]
+   [Event( name="testSuiteRunDurationChanged", type="flash.events.Event")]
+   [Event( name="totalErrorsChanged",          type="flash.events.Event")]
+   [Event( name="totalFailuresChanged",        type="flash.events.Event")]
+   [Event( name="progressChanged",             type="flash.events.Event")]
+   [Event( name="filterChanged",               type="flash.events.Event")]
+   [Event( name="filterEnableChanged",         type="flash.events.Event")]
+
+   public class TestRunnerBasePresentationModel extends EventDispatcher
+   {
+      public var totalTests : int;
+      public var filterModel : FilterTestsModel = new FilterTestsModel();
+      private var _rowSelected : AbstractRowData;
+
+      private var _totalErrors : int;
+      private var _totalFailures : int;
+      private var _numTestsRun : int;
+
+      private var _testSuiteStartTime : int;
+      private var _testSuiteEndTime : int;
+
+
+      private var _allTestsTreeCollection : ListCollectionView;
+      private var _errorTestsTreeCollection : ListCollectionView;
+      private var _testClassMap : Object = new Object();
+      private var _errorTestClassMap : Object = new Object();
+      private var _filterSectionEnabled : Boolean = false;
+      private var _testsRunning : Boolean;
+      private var errorHasBeenFound : Boolean = false;
+      
+      public function TestRunnerBasePresentationModel()
+      {
+         filterModel.addEventListener( 
+            TestRunnerBasePresentationModelProperyChangedEvent.FILTER_CHANGED,
+            handleFilterChanged )
+      }
+      
+      public function get dataProvider() : ListCollectionView
+      {
+         if( _testsRunning )
+         {
+            return _errorTestsTreeCollection;
+         }
+         else
+         {
+            return _allTestsTreeCollection;
+         }
+      }
+      
+      public function get testsRunning() : Boolean
+      {
+         return _testsRunning;
+      }
+
+      public function set filterSectionEnabled( value : Boolean ) : void
+      {
+         _filterSectionEnabled = value;
+
+         dispatchPropertyChanged(
+               TestRunnerBasePresentationModelProperyChangedEvent.FILTER_ENABLE_CHANGED );
+      }
+
+      public function get filterSectionEnabled() : Boolean
+      {
+         return _filterSectionEnabled;
+      }
+
+      public function set numTestsRun( value : int ) : void
+      {
+         _numTestsRun = value;
+
+         dispatchPropertyChanged(
+               TestRunnerBasePresentationModelProperyChangedEvent.PROGRESS_CHANGED );
+      }
+
+      public function get numTestsRun() : int
+      {
+         return _numTestsRun;
+      }
+
+      public function get totalFailures() : int
+      {
+         return _totalFailures;
+      }
+
+      public function get totalErrors() : int
+      {
+         return _totalErrors;
+      }
+
+      public function get suiteDurationFormatted() : String
+      {
+         return ( ( _testSuiteEndTime - _testSuiteStartTime ) / 1000 ) + " seconds";
+      }
+
+      public function set rowSelected( value : AbstractRowData ) : void
+      {
+         _rowSelected = value;
+
+         dispatchPropertyChanged(
+               TestRunnerBasePresentationModelProperyChangedEvent.ROW_SELECTED_CHANGED );
+      }
+
+      public function get rowSelected() : AbstractRowData
+      {
+         return _rowSelected;
+      }
+
+      public function get testFunctionSelected() : TestFunctionRowData
+      {
+         return _rowSelected as TestFunctionRowData;
+      }
+
+      public function get testCaseSelected() : TestCaseData
+      {
+         return _rowSelected as TestCaseData;
+      }
+
+      public function addFailure() : void
+      {
+         _totalFailures++;
+
+         dispatchPropertyChanged(
+               TestRunnerBasePresentationModelProperyChangedEvent.TOTAL_FAILURES_CHANGED );
+      }
+
+      public function addError() : void
+      {
+         _totalErrors++;
+
+         dispatchPropertyChanged(
+               TestRunnerBasePresentationModelProperyChangedEvent.TOTAL_ERRORS_CHANGED );
+      }
+
+      public function launchTests() : void
+      {
+         _testsRunning = true;
+         _testSuiteStartTime = getTimer();
+
+         _allTestsTreeCollection = new ArrayCollection();
+         _allTestsTreeCollection.filterFunction = filterModel.searchFilterFunc;
+         
+         _errorTestsTreeCollection = new ArrayCollection();         
+      }
+
+      public function endTimer() : void
+      {
+         _testsRunning = false;
+         
+         _testSuiteEndTime = getTimer();
+
+         dispatchPropertyChanged(
+               TestRunnerBasePresentationModelProperyChangedEvent.TOTAL_FAILURES_CHANGED );
+         dispatchPropertyChanged(
+               TestRunnerBasePresentationModelProperyChangedEvent.TEST_SUITE_RUN_DURATION_CHANGED );
+         dispatchPropertyChanged(
+               TestRunnerBasePresentationModelProperyChangedEvent.TOTAL_ERRORS_CHANGED );
+      }
+
+      public function addTestRowToHierarchicalList(
+                  testCase : TestCase,
+                  error : Error,
+                  success : Boolean,
+                  isFailure : Boolean ) : TestFunctionRowData
+      {
+         var rowToAdd : TestFunctionRowData = new TestFunctionRowData();
+         var parentRow : TestCaseData;
+
+         rowToAdd.label = testCase.methodName;
+         rowToAdd.qualifiedClassName = testCase.className;
+         rowToAdd.testSuccessful = success;
+         rowToAdd.testIsFailure = isFailure;
+         rowToAdd.testMethodName = testCase.methodName;
+         rowToAdd.testCase = testCase;
+         rowToAdd.error = error;
+         
+
+         parentRow = findTestCaseParentRowInAllTests( rowToAdd );
+
+         if ( parentRow && parentRow.testFunctions as IList )
+         {
+            parentRow.addTest( rowToAdd );
+         }
+
+         if( ! success )
+         {
+            parentRow = findTestCaseParentRowInErrorTests( rowToAdd );
+            
+            if ( parentRow && parentRow.testFunctions as IList )
+            {
+               parentRow.addTest( rowToAdd );
+            }
+         }
+
+         return rowToAdd;
+      }
+
+      private function findTestCaseParentRowInAllTests( 
+               testFunction : TestFunctionRowData ) : TestCaseData
+      {
+         var testCaseParentRow : TestCaseData;
+
+         // Check local _currentTestClassRow to see if it's the correct Test Class Summary object
+         if ( testCaseSelected &&
+              testCaseSelected.qualifiedClassName == testFunction.qualifiedClassName )
+         {
+            testCaseParentRow = testCaseSelected;
+         }
+         else if ( _testClassMap[ testFunction.qualifiedClassName ] != null )
+         {
+            // Lookup testClassName in object map
+            testCaseParentRow = _testClassMap[ testFunction.qualifiedClassName ] as TestCaseData;
+         }
+
+         if ( ! errorHasBeenFound )
+         {
+            rowSelected = testFunction;
+         }
+
+         if ( testCaseParentRow )
+         {
+            return testCaseParentRow;
+         }
+         else
+         {
+            // Else create a new row and add it to the list
+            testCaseParentRow = new TestCaseData( testFunction );
+            
+            // Mark _currentTestClassRow and add the new testClassName to object map
+
+            _testClassMap[ testFunction.qualifiedClassName ] = testCaseParentRow;
+
+            _allTestsTreeCollection.addItem( testCaseParentRow );
+         }
+
+         return testCaseParentRow;
+      }
+
+      private function findTestCaseParentRowInErrorTests( 
+               testFunction : TestFunctionRowData ) : TestCaseData
+      {
+         var testCaseParentRow : TestCaseData;
+
+         if ( _errorTestClassMap[ testFunction.qualifiedClassName ] != null )
+         {
+            // Lookup testClassName in object map
+            testCaseParentRow = _errorTestClassMap[ testFunction.qualifiedClassName ] as TestCaseData;
+         }
+
+         if ( testCaseParentRow )
+         {
+            return testCaseParentRow;
+         }
+         else
+         {
+            // Else create a new row and add it to the list
+            testCaseParentRow = new TestCaseData( testFunction );
+
+            // Mark _currentTestClassRow and add the new testClassName to object map
+
+            rowSelected = testFunction;
+            
+            errorHasBeenFound = true;
+
+            _errorTestClassMap[ testFunction.qualifiedClassName ] = testCaseParentRow;
+
+            _errorTestsTreeCollection.addItem( testCaseParentRow );
+         }
+
+         return testCaseParentRow;
+      }
+      
+      private function handleFilterChanged( event : Event ) : void
+      {
+         dispatchEvent( event.clone() );
+      }
+      
+      private function dispatchPropertyChanged( type : String ) : void
+      {
+         dispatchEvent(
+               new TestRunnerBasePresentationModelProperyChangedEvent( type ) );
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/AllTestFunctionStatus.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/AllTestFunctionStatus.as b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/AllTestFunctionStatus.as
new file mode 100644
index 0000000..5de75ef
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/as3-plugin-utils/src/test/resources/com/adobe/ac/ncss/flexunit/filter/AllTestFunctionStatus.as
@@ -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 flexunit.flexui.data.filter
+{
+   import flexunit.flexui.controls.FlexUnitLabels;
+   import flexunit.flexui.data.TestFunctionRowData;
+
+   public class AllTestFunctionStatus implements ITestFunctionStatus
+   {
+      public function isTestFunctionVisible( test : TestFunctionRowData ) : Boolean
+      {
+         return true;
+      }
+      
+      public function get label() : String
+      {
+         return FlexUnitLabels.ALL;
+      }
+   }
+}
\ No newline at end of file


[43/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-command-line-api/src/test/java/com/adobe/ac/pmd/CommandLineUtilsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-command-line-api/src/test/java/com/adobe/ac/pmd/CommandLineUtilsTest.java b/FlexPMD/flex-pmd-command-line-api/src/test/java/com/adobe/ac/pmd/CommandLineUtilsTest.java
deleted file mode 100644
index 305315c..0000000
--- a/FlexPMD/flex-pmd-command-line-api/src/test/java/com/adobe/ac/pmd/CommandLineUtilsTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-import com.martiansoftware.jsap.JSAP;
-import com.martiansoftware.jsap.JSAPException;
-
-public class CommandLineUtilsTest
-{
-   @Test
-   public void testComputeSourceList()
-   {
-      assertEquals( 3,
-                    CommandLineUtils.computeSourceList( "lala,toto,tyty" ).size() );
-      assertNull( CommandLineUtils.computeSourceList( "lala" ) );
-   }
-
-   @Test
-   public void testRegisterParameter() throws JSAPException
-   {
-      final JSAP jsap = new JSAP();
-
-      CommandLineUtils.registerParameter( jsap,
-                                          new ICommandLineOptions()
-                                          {
-                                             @Override
-                                             public String toString()
-                                             {
-                                                return "name";
-                                             }
-                                          },
-                                          true );
-
-      assertTrue( jsap.getByShortFlag( 'n' ) != null );
-      assertNull( jsap.getByShortFlag( 'm' ) );
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-command-line/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-command-line/.pmd b/FlexPMD/flex-pmd-command-line/.pmd
deleted file mode 100644
index b5c19d9..0000000
--- a/FlexPMD/flex-pmd-command-line/.pmd
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-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.
-
--->
-<pmd>
-    <useProjectRuleSet>false</useProjectRuleSet>
-    <ruleSetFile>../flex-pmd-parent/pmd.xml</ruleSetFile>
-    <includeDerivedFiles>false</includeDerivedFiles>
-    <violationsAsErrors>true</violationsAsErrors>
-</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-command-line/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-command-line/pom.xml b/FlexPMD/flex-pmd-command-line/pom.xml
deleted file mode 100644
index f930a8a..0000000
--- a/FlexPMD/flex-pmd-command-line/pom.xml
+++ /dev/null
@@ -1,198 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-  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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-command-line</artifactId>
-	<name>Adobe Flex PMD Command line</name>
-
-	<parent>
-		<groupId>com.adobe.ac</groupId>
-		<artifactId>flex-pmd-java-parent</artifactId>
-		<version>1.3-SNAPSHOT</version>
-		<relativePath>../flex-pmd-java-parent/pom.xml</relativePath>
-	</parent>
-
-	<description />
-	<packaging>jar</packaging>
-
-	<properties>
-		<maven.jar.plugin.version>2.2</maven.jar.plugin.version>
-	</properties>
-
-	<dependencies>
-		<dependency>
-			<groupId>com.martiansoftware</groupId>
-			<artifactId>jsap</artifactId>
-			<version>${jsap.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<version>${project.version}</version>
-			<artifactId>flex-pmd-core</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<version>${project.version}</version>
-			<artifactId>${project.artifactId}-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<version>${project.version}</version>
-			<artifactId>flex-pmd-ruleset</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-test-resources</artifactId>
-			<version>${project.parent.version}</version>
-			<classifier>resources</classifier>
-			<type>zip</type>
-			<scope>provided</scope>
-		</dependency>
-
-		<!-- Dependencies for packaging from ANT -->
-
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<version>${project.version}</version>
-			<artifactId>flex-pmd-files</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<version>${project.version}</version>
-			<artifactId>flex-pmd-ruleset-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<artifactId>as3-plugin-utils</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<artifactId>as3-parser</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<artifactId>as3-parser-api</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>pmd</groupId>
-			<artifactId>pmd</artifactId>
-			<version>${pmd.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>plexus</groupId>
-			<artifactId>plexus-utils</artifactId>
-			<version>${plexus-utils.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>commons-lang</groupId>
-			<artifactId>commons-lang</artifactId>
-			<version>${commons-lang.version}</version>
-		</dependency>
-	</dependencies>
-
-	<build>
-
-		<testResources>
-			<testResource>
-				<directory>${project.build.directory}/test/generated-resources</directory>
-			</testResource>
-		</testResources>
-
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>unpack-test-resources</id>
-						<phase>generate-resources</phase>
-						<goals>
-							<goal>unpack-dependencies</goal>
-						</goals>
-						<configuration>
-							<includeGroupIds>${project.groupId}</includeGroupIds>
-							<includes>**/*.as,**/*.mxml</includes>
-							<outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
-							<excludeTransitive>true</excludeTransitive>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<version>${maven.jar.plugin.version}</version>
-				<configuration>
-					<archive>
-						<manifest>
-							<mainClass>com.adobe.ac.pmd.commandline.FlexPMD</mainClass>
-							<packageName>com.adobe.ac.pmd.commandline</packageName>
-							<addClasspath>true</addClasspath>
-						</manifest>
-					</archive>
-				</configuration>
-			</plugin>
-			<plugin>
-				<artifactId>maven-antrun-plugin</artifactId>
-				<version>${maven-antrun-plugin.version}</version>
-				<executions>
-					<execution>
-						<id>package-ant-task</id>
-						<phase>install</phase>
-						<configuration>
-							<tasks>
-								<echo message="Building ant-task" />
-								<mkdir dir="${project.build.directory}/release" />
-								<echo message="" />
-								<echo message="Copying Flex PMD dependencies..." />
-								<copy file="${project.build.directory}/${project.build.finalName}.jar" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.flex-pmd-command-line-api.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.flex-pmd-core.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.flex-pmd-ruleset.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.flex-pmd-files.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.flex-pmd-ruleset-api.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.as3-parser-api.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.adobe.ac.as3-parser.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<echo message="Copying Command line dependencies..." />
-								<copy file="${maven.dependency.com.adobe.ac.as3-plugin-utils.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.pmd.pmd.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.plexus.plexus-utils.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.commons-lang.commons-lang.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<copy file="${maven.dependency.com.martiansoftware.jsap.jar.path}" todir="${project.build.directory}/release" overwrite="true" />
-								<echo message="Extracting license..." />
-								<copy file="../flex-pmd-parent/src/etc/header.txt" tofile="${project.build.directory}/release/LICENSE.txt" overwrite="true" />
-								<echo message="Compressing zip..." />
-								<zip destfile="${project.build.directory}/${project.build.finalName}.zip" basedir="${project.build.directory}/release" excludes="*.zip" />
-							</tasks>
-						</configuration>
-						<goals>
-							<goal>run</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-command-line/src/main/assemble/bin.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-command-line/src/main/assemble/bin.xml b/FlexPMD/flex-pmd-command-line/src/main/assemble/bin.xml
deleted file mode 100644
index 3f5dd15..0000000
--- a/FlexPMD/flex-pmd-command-line/src/main/assemble/bin.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<!--
-
-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.
-
--->
-<assembly>
-  <id>command-line</id>
-  <formats>
-    <format>jar</format>
-  </formats>  
-  <fileSets>
-   <fileSet>
-      
-   </fileSet>
-  </fileSets>
-  <dependencySets>
-    <dependencySet>
-      <includes>
-         <include>com.adobe.ac:flex-pmd-core</include>
-         <include>com.adobe.ac:as3-parser</include>
-         <include>com.adobe.ac:as3-plugin-utils</include>
-         <include>com.adobe.ac:flex-pmd-ruleset</include>
-         <include>com.adobe.ac:flex-pmd-ruleset-api</include>
-         <include>com.martiansoftware:jsap</include>
-      </includes>
-    </dependencySet>
-  </dependencySets>    
-</assembly>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-command-line/src/main/java/com/adobe/ac/pmd/commandline/FlexPMD.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-command-line/src/main/java/com/adobe/ac/pmd/commandline/FlexPMD.java b/FlexPMD/flex-pmd-command-line/src/main/java/com/adobe/ac/pmd/commandline/FlexPMD.java
deleted file mode 100644
index 4b293fa..0000000
--- a/FlexPMD/flex-pmd-command-line/src/main/java/com/adobe/ac/pmd/commandline/FlexPMD.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * 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.commandline;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import net.sourceforge.pmd.PMDException;
-
-import com.adobe.ac.pmd.CommandLineOptions;
-import com.adobe.ac.pmd.CommandLineUtils;
-import com.adobe.ac.pmd.FlexPmdParameters;
-import com.adobe.ac.pmd.FlexPmdViolations;
-import com.adobe.ac.pmd.LoggerUtils;
-import com.adobe.ac.pmd.engines.FlexPmdXmlEngine;
-import com.martiansoftware.jsap.JSAP;
-import com.martiansoftware.jsap.JSAPException;
-import com.martiansoftware.jsap.JSAPResult;
-
-public final class FlexPMD // NO_UCD
-{
-   private static JSAPResult   config;
-   private static final Logger LOGGER = Logger.getLogger( FlexPMD.class.getName() );
-
-   /**
-    * @param args
-    * @throws JSAPException
-    * @throws PMDException
-    * @throws URISyntaxException
-    * @throws IOException
-    * @throws Exception
-    */
-   public static void main( final String[] args ) throws JSAPException,
-                                                 PMDException,
-                                                 URISyntaxException,
-                                                 IOException
-   {
-      new LoggerUtils().loadConfiguration();
-      startFlexPMD( args );
-      LOGGER.info( "FlexPMD terminated" );
-      System.exit( 0 ); // NOPMD
-   }
-
-   static boolean areCommandLineOptionsCorrect( final String[] args ) throws JSAPException
-   {
-      final JSAP jsap = new JSAP();
-      config = parseCommandLineArguments( args,
-                                          jsap );
-
-      if ( !config.success() )
-      {
-         LOGGER.log( Level.SEVERE,
-                     "Usage: java "
-                           + FlexPMD.class.getName() + " " + jsap.getUsage() );
-      }
-
-      return config.success();
-   }
-
-   static String getParameterValue( final CommandLineOptions option )
-   {
-      return config.getString( option.toString() );
-   }
-
-   static boolean startFlexPMD( final String[] args ) throws JSAPException,
-                                                     PMDException,
-                                                     URISyntaxException,
-                                                     IOException
-   {
-      if ( areCommandLineOptionsCorrect( args ) )
-      {
-         final String rulesetRef = getParameterValue( CommandLineOptions.RULE_SET );
-         final String excludePackage = getParameterValue( CommandLineOptions.EXLUDE_PACKAGE );
-         final String source = getParameterValue( CommandLineOptions.SOURCE_DIRECTORY );
-         final File sourceDirectory = source.contains( "," ) ? null
-                                                            : new File( source );
-         final List< File > sourceList = CommandLineUtils.computeSourceList( source );
-         final File outputDirectory = new File( getParameterValue( CommandLineOptions.OUTPUT ) );
-         final FlexPmdParameters parameters = new FlexPmdParameters( excludePackage == null ? ""
-                                                                                           : excludePackage,
-                                                                     outputDirectory,
-                                                                     rulesetRef == null ? null
-                                                                                       : new File( rulesetRef ),
-                                                                     sourceDirectory,
-                                                                     sourceList );
-         final FlexPmdXmlEngine engine = new FlexPmdXmlEngine( parameters );
-
-         engine.executeReport( new FlexPmdViolations() );
-      }
-
-      return config.success();
-   }
-
-   private static JSAPResult parseCommandLineArguments( final String[] args,
-                                                        final JSAP jsap ) throws JSAPException
-   {
-      CommandLineUtils.registerParameter( jsap,
-                                          CommandLineOptions.SOURCE_DIRECTORY,
-                                          true );
-      CommandLineUtils.registerParameter( jsap,
-                                          CommandLineOptions.OUTPUT,
-                                          true );
-      CommandLineUtils.registerParameter( jsap,
-                                          CommandLineOptions.RULE_SET,
-                                          false );
-      CommandLineUtils.registerParameter( jsap,
-                                          CommandLineOptions.EXLUDE_PACKAGE,
-                                          false );
-
-      return jsap.parse( args );
-   }
-
-   private FlexPMD()
-   {
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-command-line/src/test/java/com/adobe/ac/pmd/commandline/FlexPMDTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-command-line/src/test/java/com/adobe/ac/pmd/commandline/FlexPMDTest.java b/FlexPMD/flex-pmd-command-line/src/test/java/com/adobe/ac/pmd/commandline/FlexPMDTest.java
deleted file mode 100644
index 764b118..0000000
--- a/FlexPMD/flex-pmd-command-line/src/test/java/com/adobe/ac/pmd/commandline/FlexPMDTest.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * 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.commandline;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.URISyntaxException;
-
-import junit.framework.Assert;
-import net.sourceforge.pmd.PMDException;
-
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.io.SAXReader;
-import org.junit.Test;
-
-import com.adobe.ac.pmd.CommandLineOptions;
-import com.adobe.ac.pmd.FlexPmdTestBase;
-import com.martiansoftware.jsap.JSAPException;
-
-public class FlexPMDTest extends FlexPmdTestBase
-{
-   @Test
-   public void testAreCommandLineOptionsCorrect() throws FileNotFoundException,
-                                                 JSAPException,
-                                                 PMDException,
-                                                 URISyntaxException
-   {
-      assertFalse( FlexPMD.areCommandLineOptionsCorrect( new String[]
-      {} ) );
-
-      assertFalse( FlexPMD.areCommandLineOptionsCorrect( new String[]
-      { "-y",
-                  "sourceDirectory",
-                  "-p",
-                  "outPutDirectory" } ) );
-
-      assertTrue( FlexPMD.areCommandLineOptionsCorrect( new String[]
-      { "-s",
-                  "sourceDirectory",
-                  "-o",
-                  "target",
-                  "-r",
-                  "valid.xml" } ) );
-
-      assertTrue( FlexPMD.areCommandLineOptionsCorrect( new String[]
-      { "-s",
-                  "sourceDirectory",
-                  "-o",
-                  "target" } ) );
-   }
-
-   @Test
-   public void testFlexPMD114() throws JSAPException,
-                               PMDException,
-                               URISyntaxException,
-                               IOException,
-                               DocumentException
-   {
-      final String[] args = new String[]
-      { "-s",
-                  getTestDirectory().getAbsolutePath()
-                        + File.separatorChar + "flexpmd114",
-                  "-o",
-                  new File( "target/test2" ).getAbsolutePath() };
-
-      FlexPMD.startFlexPMD( args );
-
-      assertEquals( 3,
-                    loadDocument( new File( "target/test2/pmd.xml" ) ).selectNodes( "//pmd/file" ).size() );
-   }
-
-   @Test
-   public void testFlexPMD88() throws JSAPException,
-                              PMDException,
-                              URISyntaxException,
-                              IOException,
-                              DocumentException
-   {
-      final String[] args = new String[]
-      { "-s",
-                  getTestDirectory().getAbsolutePath()
-                        + File.separatorChar + "bug" + File.separatorChar + "FlexPMD88.as",
-                  "-o",
-                  new File( "target/test3" ).getAbsolutePath() };
-
-      FlexPMD.startFlexPMD( args );
-
-      Assert.assertTrue( loadDocument( new File( "target/test3/pmd.xml" ) ).selectNodes( "//pmd/file[1]/violation" )
-                                                                           .size() > 0 );
-   }
-
-   @Test
-   public void testGetCommandLineValue() throws JSAPException
-   {
-      FlexPMD.areCommandLineOptionsCorrect( new String[]
-      { "-s",
-                  "sourceDirectory",
-                  "-o",
-                  "target",
-                  "-r",
-                  "valid.xml" } );
-
-      assertEquals( "sourceDirectory",
-                    FlexPMD.getParameterValue( CommandLineOptions.SOURCE_DIRECTORY ) );
-      assertEquals( "target",
-                    FlexPMD.getParameterValue( CommandLineOptions.OUTPUT ) );
-      assertEquals( "valid.xml",
-                    FlexPMD.getParameterValue( CommandLineOptions.RULE_SET ) );
-   }
-
-   @Test
-   public void testStartFlexPMD() throws JSAPException,
-                                 PMDException,
-                                 URISyntaxException,
-                                 IOException
-   {
-      final String[] args = new String[]
-      { "-s",
-                  getTestDirectory().getAbsolutePath(),
-                  "-o",
-                  new File( "target/test" ).getAbsolutePath(),
-                  "--excludePackage",
-                  "cairngorm." };
-
-      FlexPMD.startFlexPMD( args );
-   }
-
-   @Test
-   public void testStartFlexPMDOnAFile() throws JSAPException,
-                                        PMDException,
-                                        URISyntaxException,
-                                        IOException
-   {
-      final String filePath = getTestFiles().get( "AbstractRowData.as" ).getFilePath();
-
-      final String[] args = new String[]
-      { "-s",
-                  filePath,
-                  "-o",
-                  new File( "target/test" ).getAbsolutePath(),
-                  "--excludePackage",
-                  "cairngorm." };
-
-      FlexPMD.startFlexPMD( args );
-   }
-
-   @Test
-   public void testStartFlexPMDOnSeveralFolders() throws JSAPException,
-                                                 PMDException,
-                                                 URISyntaxException,
-                                                 IOException
-   {
-      final String[] args = new String[]
-      { "-s",
-                  new File( "target/test/bug" ).getAbsolutePath()
-                        + "," + new File( "target/test/cairngorm" ).getAbsolutePath(),
-                  "-o",
-                  new File( "target/test" ).getAbsolutePath(), };
-
-      FlexPMD.startFlexPMD( args );
-   }
-
-   private Document loadDocument( final File outputFile ) throws DocumentException
-   {
-      return new SAXReader().read( outputFile );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/.p4ignore
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/.p4ignore b/FlexPMD/flex-pmd-core/.p4ignore
deleted file mode 100644
index eb5a316..0000000
--- a/FlexPMD/flex-pmd-core/.p4ignore
+++ /dev/null
@@ -1 +0,0 @@
-target

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/.pmd b/FlexPMD/flex-pmd-core/.pmd
deleted file mode 100644
index b5c19d9..0000000
--- a/FlexPMD/flex-pmd-core/.pmd
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-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.
-
--->
-<pmd>
-    <useProjectRuleSet>false</useProjectRuleSet>
-    <ruleSetFile>../flex-pmd-parent/pmd.xml</ruleSetFile>
-    <includeDerivedFiles>false</includeDerivedFiles>
-    <violationsAsErrors>true</violationsAsErrors>
-</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/pom.xml b/FlexPMD/flex-pmd-core/pom.xml
deleted file mode 100644
index 1c9b175..0000000
--- a/FlexPMD/flex-pmd-core/pom.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-  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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-core</artifactId>
-	<name>Adobe Flex PMD Core</name>
-	<description />
-	<packaging>jar</packaging>
-
-  <parent>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-java-parent</artifactId>
-	<version>1.3-SNAPSHOT</version>
-	<relativePath>../flex-pmd-java-parent/pom.xml</relativePath>
-  </parent>
-  
-	<properties>
-		<doxia-core.version>1.0-alpha-4</doxia-core.version>
-	</properties>
-
-	<dependencies>
-	   <dependency>
-			<groupId>doxia</groupId>
-			<artifactId>doxia-core</artifactId>
-			<version>${doxia-core.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-ruleset-api</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<!-- Test dependencies -->
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-test-resources</artifactId>
-			<version>${project.version}</version>
-			<classifier>resources</classifier>
-			<type>zip</type>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>${project.parent.groupId}</groupId>
-			<artifactId>flex-pmd-ruleset</artifactId>
-			<version>${project.parent.version}</version>
-			<scope>test</scope>
-		</dependency>
-	</dependencies>
-
-	<build>
-		<testResources>
-			<testResource>
-				<directory>${project.build.directory}/test/generated-resources</directory>
-			</testResource>
-			<testResource>
-				<directory>${basedir}/src/test/resources</directory>
-			</testResource>
-		</testResources>
-		<resources>
-			<resource>
-				<directory>${project.build.directory}/test/generated-resources</directory>
-			</resource>
-		</resources>
-
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>unpack-test-resources</id>
-						<phase>generate-resources</phase>
-						<goals>
-							<goal>unpack-dependencies</goal>
-						</goals>
-						<configuration>
-							<includeGroupIds>${project.groupId}</includeGroupIds>
-							<includes>**/*.as,**/*.mxml,**/*.xml</includes>
-							<outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
-							<excludeTransitive>true</excludeTransitive>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/FlexPmdParameters.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/FlexPmdParameters.java b/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/FlexPmdParameters.java
deleted file mode 100644
index 5bab526..0000000
--- a/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/FlexPmdParameters.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * 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;
-
-import java.io.File;
-import java.util.List;
-
-public class FlexPmdParameters
-{
-   private final String       excludePackage;
-   private final boolean      failOnError;
-   private final boolean      failOnRuleViolation;
-   private final File         outputDirectory;
-   private final File         ruleSet;
-   private final File         source;
-   private final List< File > sourceList;
-
-   public FlexPmdParameters( final String excludePackageToBeSet,
-                             final boolean failOnErrorToBeSet,
-                             final boolean failOnRuleViolationToBeSet,
-                             final File outputDirectoryToBeSet,
-                             final File ruleSetToBeSet,
-                             final File sourceToBeSet )
-   {
-      this( excludePackageToBeSet,
-            failOnErrorToBeSet,
-            failOnRuleViolationToBeSet,
-            outputDirectoryToBeSet,
-            ruleSetToBeSet,
-            sourceToBeSet,
-            null );
-   }
-
-   public FlexPmdParameters( final String excludePackageToBeSet,
-                             final boolean failOnErrorToBeSet,
-                             final boolean failOnRuleViolationToBeSet,
-                             final File outputDirectoryToBeSet,
-                             final File ruleSetToBeSet,
-                             final File sourceToBeSet,
-                             final List< File > sourceListToBeSet )
-   {
-      super();
-      excludePackage = excludePackageToBeSet;
-      failOnError = failOnErrorToBeSet;
-      failOnRuleViolation = failOnRuleViolationToBeSet;
-      outputDirectory = outputDirectoryToBeSet;
-      ruleSet = ruleSetToBeSet;
-      source = sourceToBeSet;
-      sourceList = sourceListToBeSet;
-   }
-
-   public FlexPmdParameters( final String excludePackageToBeSet,
-                             final File outputDirectoryToBeSet,
-                             final File ruleSetToBeSet,
-                             final File sourceToBeSet )
-   {
-      this( excludePackageToBeSet, false, false, outputDirectoryToBeSet, ruleSetToBeSet, sourceToBeSet, null );
-   }
-
-   public FlexPmdParameters( final String excludePackageToBeSet,
-                             final File outputDirectoryToBeSet,
-                             final File ruleSetToBeSet,
-                             final File sourceToBeSet,
-                             final List< File > sourceListToBeSet )
-   {
-      this( excludePackageToBeSet,
-            false,
-            false,
-            outputDirectoryToBeSet,
-            ruleSetToBeSet,
-            sourceToBeSet,
-            sourceListToBeSet );
-   }
-
-   public final String getExcludePackage()
-   {
-      return excludePackage;
-   }
-
-   public final File getOutputDirectory()
-   {
-      return outputDirectory;
-   }
-
-   public final File getRuleSet()
-   {
-      return ruleSet;
-   }
-
-   public final File getSource()
-   {
-      return source;
-   }
-
-   public List< File > getSourceList()
-   {
-      return sourceList;
-   }
-
-   public final boolean isFailOnError()
-   {
-      return failOnError;
-   }
-
-   public boolean isFailOnRuleViolation()
-   {
-      return failOnRuleViolation;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/FlexPmdViolations.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/FlexPmdViolations.java b/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/FlexPmdViolations.java
deleted file mode 100644
index 607610d..0000000
--- a/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/FlexPmdViolations.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * 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;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import net.sourceforge.pmd.PMDException;
-import net.sourceforge.pmd.Rule;
-import net.sourceforge.pmd.RuleReference;
-import net.sourceforge.pmd.RuleSet;
-
-import com.adobe.ac.pmd.files.FileSetUtils;
-import com.adobe.ac.pmd.files.IFlexFile;
-import com.adobe.ac.pmd.files.impl.FileUtils;
-import com.adobe.ac.pmd.nodes.IPackage;
-import com.adobe.ac.pmd.rules.core.IFlexAstRule;
-import com.adobe.ac.pmd.rules.core.IFlexRule;
-import com.adobe.ac.utils.StackTraceUtils;
-
-public class FlexPmdViolations implements Serializable
-{
-   private static final Logger                            LOGGER;
-
-   /**
-    * 
-    */
-   private static final long                              serialVersionUID = -3683680443330143504L;
-
-   static
-   {
-      LOGGER = Logger.getLogger( FlexPmdViolations.class.getName() );
-   }
-
-   private Map< String, IPackage >                        asts;
-   private Map< String, IFlexFile >                       files;
-   private boolean                                        hasBeenComputed;
-   private final Map< String, IFlexRule >                 rules;
-   private final Map< IFlexRule, Long >                   ruleSpeeds;
-   private final Map< IFlexFile, List< IFlexViolation > > violations;
-
-   public FlexPmdViolations()
-   {
-      violations = new LinkedHashMap< IFlexFile, List< IFlexViolation > >();
-      rules = new LinkedHashMap< String, IFlexRule >();
-      ruleSpeeds = new LinkedHashMap< IFlexRule, Long >();
-      hasBeenComputed = false;
-   }
-
-   public final void computeViolations( final File source,
-                                        final List< File > sourceList,
-                                        final RuleSet ruleSet,
-                                        final String packageToExclude ) throws PMDException
-   {
-      hasBeenComputed = true;
-
-      if ( ruleSet != null )
-      {
-         computeRules( ruleSet );
-         computeFiles( source,
-                       sourceList,
-                       packageToExclude,
-                       ruleSet.getExcludePatterns() );
-         computeAsts();
-         processRules();
-         sortViolations();
-      }
-   }
-
-   public final Map< IFlexFile, List< IFlexViolation >> getViolations()
-   {
-      return violations;
-   }
-
-   public final boolean hasViolationsBeenComputed()
-   {
-      return hasBeenComputed;
-   }
-
-   private void computeAsts() throws PMDException
-   {
-      LOGGER.info( "computing Asts" );
-
-      final long startTime = System.currentTimeMillis();
-      asts = FileSetUtils.computeAsts( files );
-
-      LOGGER.info( "computed Asts in "
-            + ( System.currentTimeMillis() - startTime ) + " ms" );
-   }
-
-   private void computeFiles( final File source,
-                              final List< File > sourceList,
-                              final String packageToExclude,
-                              final List< String > excludePatterns ) throws PMDException
-   {
-      LOGGER.info( "computing FilesList" );
-
-      final long startTime = System.currentTimeMillis();
-
-      files = FileUtils.computeFilesList( source,
-                                          sourceList,
-                                          packageToExclude,
-                                          excludePatterns );
-      LOGGER.info( "computed FilesList in "
-            + ( System.currentTimeMillis() - startTime ) + " ms" );
-   }
-
-   private void computeRules( final RuleSet ruleSet )
-   {
-      LOGGER.info( "computing RulesList" );
-
-      final long startTime = System.currentTimeMillis();
-      Set< String > excludes = new HashSet< String >( ruleSet.getExcludePatterns() );
-
-      for ( Rule rule : ruleSet.getRules() )
-      {
-         while ( rule instanceof RuleReference )
-         {
-            excludes = ( ( RuleReference ) rule ).getRuleSetReference().getExcludes();
-            rule = ( ( RuleReference ) rule ).getRule();
-         }
-         final IFlexRule flexRule = ( IFlexRule ) rule;
-
-         if ( excludes != null
-               && !excludes.isEmpty() )
-         {
-            flexRule.setExcludes( excludes );
-         }
-         rules.put( flexRule.getRuleName(),
-                    flexRule );
-      }
-
-      LOGGER.info( "computed RulesList in "
-            + ( System.currentTimeMillis() - startTime ) + " ms" );
-   }
-
-   private void processFile( final IFlexRule currentRule,
-                             final IFlexFile currentFile )
-   {
-      try
-      {
-         final String fullyQualifiedName = currentFile.getFullyQualifiedName();
-         final IPackage ast = currentRule instanceof IFlexAstRule ? asts.get( fullyQualifiedName )
-                                                                 : null;
-         final List< IFlexViolation > foundViolations = currentRule.processFile( currentFile,
-                                                                                 ast,
-                                                                                 files );
-
-         if ( !foundViolations.isEmpty() )
-         {
-            if ( violations.containsKey( currentFile ) )
-            {
-               violations.get( currentFile ).addAll( foundViolations );
-            }
-            else
-            {
-               violations.put( currentFile,
-                               foundViolations );
-            }
-         }
-      }
-      catch ( final Exception e )
-      {
-         LOGGER.warning( StackTraceUtils.print( currentFile.getFullyQualifiedName(),
-                                                e ) );
-      }
-   }
-
-   private void processRule( final IFlexRule currentRule )
-   {
-      LOGGER.fine( "Processing "
-            + currentRule.getRuleName() + "..." );
-
-      for ( final Entry< String, IFlexFile > currentFileEntry : files.entrySet() )
-      {
-         processFile( currentRule,
-                      currentFileEntry.getValue() );
-      }
-   }
-
-   private void processRule( final String currentRuleName,
-                             final IFlexRule currentRule )
-   {
-      final long startTime = System.currentTimeMillis();
-
-      processRule( currentRule );
-      final long ellapsedTime = System.currentTimeMillis()
-            - startTime;
-
-      if ( LOGGER.isLoggable( Level.FINE ) )
-      {
-         LOGGER.fine( "rule "
-               + currentRuleName + " computed in " + ellapsedTime + "ms" );
-      }
-      if ( LOGGER.isLoggable( Level.FINER ) )
-      {
-         ruleSpeeds.put( currentRule,
-                         ellapsedTime );
-      }
-   }
-
-   private void processRules()
-   {
-      for ( final Entry< String, IFlexRule > currentRuleEntry : rules.entrySet() )
-      {
-         processRule( currentRuleEntry.getKey(),
-                      currentRuleEntry.getValue() );
-      }
-   }
-
-   private void sortViolations()
-   {
-      for ( final Entry< String, IFlexFile > entry : files.entrySet() )
-      {
-         if ( violations.containsKey( entry.getValue() ) )
-         {
-            Collections.sort( violations.get( entry.getValue() ) );
-         }
-      }
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/AbstractFlexPmdEngine.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/AbstractFlexPmdEngine.java b/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/AbstractFlexPmdEngine.java
deleted file mode 100644
index be8f747..0000000
--- a/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/AbstractFlexPmdEngine.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * 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.engines;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URISyntaxException;
-import java.util.List;
-import java.util.logging.Logger;
-
-import net.sourceforge.pmd.PMDException;
-import net.sourceforge.pmd.RuleSet;
-import net.sourceforge.pmd.RuleSetFactory;
-
-import org.apache.commons.lang.StringUtils;
-import org.codehaus.plexus.util.IOUtil;
-
-import com.adobe.ac.pmd.FlexPmdParameters;
-import com.adobe.ac.pmd.FlexPmdViolations;
-import com.adobe.ac.pmd.IFlexViolation;
-import com.adobe.ac.utils.StackTraceUtils;
-
-public abstract class AbstractFlexPmdEngine
-{
-   private static final Logger LOGGER = Logger.getLogger( AbstractFlexPmdEngine.class.getName() );
-
-   private static int computeViolationNumber( final FlexPmdViolations flexPmdViolations )
-   {
-      int foundViolations = 0;
-      for ( final List< IFlexViolation > violations : flexPmdViolations.getViolations().values() )
-      {
-         foundViolations += violations.size();
-      }
-      LOGGER.info( "Violations number found: "
-            + foundViolations );
-      return foundViolations;
-   }
-
-   private static File extractDefaultRuleSet() throws URISyntaxException,
-                                              IOException
-   {
-      final String rulesetURI = "/com/adobe/ac/pmd/default_flex.xml";
-      final InputStream resourceAsStream = AbstractFlexPmdEngine.class.getResourceAsStream( rulesetURI );
-      final File temporaryRuleset = File.createTempFile( "default_flex",
-                                                         ".xml" );
-      temporaryRuleset.deleteOnExit();
-      final FileOutputStream writter = new FileOutputStream( temporaryRuleset );
-      IOUtil.copy( resourceAsStream,
-                   writter );
-
-      resourceAsStream.close();
-      return temporaryRuleset;
-   }
-
-   private final File         outputDirectory;
-   private final String       packageToExclude;
-   private RuleSet            ruleSet;
-   private final File         source;
-   private final List< File > sourceList;
-
-   public AbstractFlexPmdEngine( final FlexPmdParameters parameters )
-   {
-      super();
-
-      source = parameters.getSource();
-      sourceList = parameters.getSourceList();
-      outputDirectory = parameters.getOutputDirectory();
-      packageToExclude = parameters.getExcludePackage();
-      try
-      {
-         ruleSet = loadRuleset( parameters.getRuleSet() );
-      }
-      catch ( final URISyntaxException e )
-      {
-         LOGGER.warning( StackTraceUtils.print( e ) );
-      }
-      catch ( final IOException e )
-      {
-         LOGGER.warning( StackTraceUtils.print( e ) );
-      }
-   }
-
-   /**
-    * @param flexPmdViolations
-    * @return The number of violations with the given ruleset and the result
-    *         wrapper in case of reuse
-    * @throws PMDException
-    * @throws URISyntaxException
-    * @throws IOException
-    */
-   public final void executeReport( final FlexPmdViolations flexPmdViolations ) throws PMDException
-   {
-      if ( source == null
-            && sourceList == null )
-      {
-         throw new PMDException( "unspecified sourceDirectory" );
-      }
-      if ( outputDirectory == null )
-      {
-         throw new PMDException( "unspecified outputDirectory" );
-      }
-
-      if ( ruleSet != null )
-      {
-         if ( !flexPmdViolations.hasViolationsBeenComputed() )
-         {
-            computeViolations( flexPmdViolations );
-         }
-         computeViolationNumber( flexPmdViolations );
-         writeAnyReport( flexPmdViolations );
-      }
-   }
-
-   public final RuleSet getRuleSet()
-   {
-      return ruleSet;
-   }
-
-   protected File getOutputDirectory()
-   {
-      return outputDirectory;
-   }
-
-   protected abstract void writeReport( final FlexPmdViolations pmd ) throws PMDException;
-
-   private void computeViolations( final FlexPmdViolations flexPmdViolations ) throws PMDException
-   {
-      final long startTime = System.currentTimeMillis();
-
-      flexPmdViolations.computeViolations( source,
-                                           sourceList,
-                                           ruleSet,
-                                           packageToExclude );
-      final long ellapsedTime = System.currentTimeMillis()
-            - startTime;
-      LOGGER.info( "It took "
-            + ellapsedTime + "ms to compute violations" );
-   }
-
-   private File extractRuleset( final File ruleSetFile ) throws URISyntaxException,
-                                                        IOException
-   {
-      return ruleSetFile == null ? extractDefaultRuleSet()
-                                : ruleSetFile;
-   }
-
-   private String getReportType()
-   {
-      return StringUtils.substringBefore( StringUtils.substringAfter( getClass().getName(),
-                                                                      "FlexPmd" ),
-                                          "Engine" );
-   }
-
-   private RuleSet loadRuleset( final File ruleSetFile ) throws URISyntaxException,
-                                                        IOException
-   {
-      final File realRuleSet = extractRuleset( ruleSetFile );
-      final FileInputStream inputStream = new FileInputStream( realRuleSet );
-      final RuleSet loadedRuleSet = new RuleSetFactory().createRuleSet( inputStream );
-
-      LOGGER.info( "Ruleset: "
-            + realRuleSet.getAbsolutePath() );
-      LOGGER.info( "Rules number in the ruleSet: "
-            + loadedRuleSet.getRules().size() );
-      inputStream.close();
-
-      return loadedRuleSet;
-   }
-
-   private void writeAnyReport( final FlexPmdViolations flexPmdViolations ) throws PMDException
-   {
-      long startTime;
-      long ellapsedTime;
-      startTime = System.currentTimeMillis();
-      writeReport( flexPmdViolations );
-      ellapsedTime = System.currentTimeMillis()
-            - startTime;
-
-      LOGGER.info( "It took "
-            + ellapsedTime + "ms to write the " + getReportType() + " report" );
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/FlexPMDFormat.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/FlexPMDFormat.java b/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/FlexPMDFormat.java
deleted file mode 100644
index f3f11d4..0000000
--- a/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/FlexPMDFormat.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.engines;
-
-public enum FlexPMDFormat
-{
-   HTML("flexPmd.html"), XML("pmd.xml");
-
-   private final String name;
-
-   private FlexPMDFormat( final String formatName )
-   {
-      name = formatName;
-   }
-
-   @Override
-   public String toString()
-   {
-      return name;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/FlexPmdXmlEngine.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/FlexPmdXmlEngine.java b/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/FlexPmdXmlEngine.java
deleted file mode 100644
index 4835993..0000000
--- a/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/FlexPmdXmlEngine.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * 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.engines;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.net.URISyntaxException;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.logging.Logger;
-
-import net.sourceforge.pmd.PMDException;
-
-import com.adobe.ac.pmd.FlexPmdParameters;
-import com.adobe.ac.pmd.FlexPmdViolations;
-import com.adobe.ac.pmd.IFlexViolation;
-import com.adobe.ac.pmd.files.IFlexFile;
-
-public class FlexPmdXmlEngine extends AbstractFlexPmdEngine
-{
-   private static final Logger LOGGER = Logger.getLogger( FlexPmdXmlEngine.class.getName() );
-
-   public FlexPmdXmlEngine( final FlexPmdParameters parameters ) throws URISyntaxException,
-                                                                IOException
-   {
-      super( parameters );
-   }
-
-   @Override
-   protected final void writeReport( final FlexPmdViolations pmd ) throws PMDException
-   {
-      final File realOutputDirectory = getOutputDirectory();
-      final String filePath = realOutputDirectory.getAbsoluteFile()
-            + File.separator + FlexPMDFormat.XML.toString();
-
-      makeSureOutputDirectoryExists( realOutputDirectory );
-
-      Writer writter = null;
-      try
-      {
-         LOGGER.finest( "Start writting XML report" );
-         LOGGER.info( "Creating report in <"
-               + filePath + ">" );
-
-         writter = new OutputStreamWriter( new FileOutputStream( filePath ), "UTF-8" );
-         writeReportHeader( writter );
-         writeFileViolations( pmd,
-                              writter );
-         writeReportFooter( writter );
-         writter.close();
-      }
-      catch ( final IOException e )
-      {
-         throw new PMDException( "Error creating file "
-               + filePath, e );
-      }
-      finally
-      {
-         finalizeReport( writter );
-      }
-   }
-
-   private void finalizeReport( final Writer writter )
-   {
-      LOGGER.finest( "End writting XML report" );
-
-      if ( writter != null )
-      {
-         try
-         {
-            LOGGER.finest( "Closing the XML writter" );
-            writter.close();
-         }
-         catch ( final IOException e )
-         {
-            LOGGER.warning( Arrays.toString( e.getStackTrace() ) );
-         }
-         LOGGER.finest( "Closed the XML writter" );
-      }
-   }
-
-   private void formatFileFiolation( final Writer writter,
-                                     final IFlexFile sourceFile,
-                                     final Collection< IFlexViolation > violations,
-                                     final String sourceFilePath ) throws IOException
-   {
-      if ( !violations.isEmpty() )
-      {
-         if ( sourceFilePath.charAt( 2 ) == ':' )
-         {
-            writter.write( "   <file name=\""
-                  + sourceFilePath.substring( 1,
-                                              sourceFilePath.length() ) + "\">" + getNewLine() );
-         }
-         else
-         {
-            writter.write( "   <file name=\""
-                  + sourceFilePath + "\">" + getNewLine() );
-
-         }
-         for ( final IFlexViolation violation : violations )
-         {
-            writter.write( violation.toXmlString( sourceFile,
-                                                  violation.getRule().getRuleSetName() ) );
-         }
-         writter.write( "   </file>"
-               + getNewLine() );
-      }
-   }
-
-   private String getNewLine()
-   {
-      return System.getProperty( "line.separator" );
-   }
-
-   private void makeSureOutputDirectoryExists( final File realOutputDirectory )
-   {
-      if ( !realOutputDirectory.exists()
-            && !realOutputDirectory.mkdirs() )
-      {
-         LOGGER.severe( "Unable to create an output folder" );
-      }
-   }
-
-   private void writeFileViolations( final FlexPmdViolations pmd,
-                                     final Writer writter ) throws IOException
-   {
-      for ( final IFlexFile sourceFile : pmd.getViolations().keySet() )
-      {
-         final Collection< IFlexViolation > violations = pmd.getViolations().get( sourceFile );
-         final String sourceFilePath = sourceFile.getFilePath();
-
-         formatFileFiolation( writter,
-                              sourceFile,
-                              violations,
-                              sourceFilePath );
-      }
-   }
-
-   private void writeReportFooter( final Writer writter ) throws IOException
-   {
-      writter.write( "</pmd>"
-            + getNewLine() );
-   }
-
-   private void writeReportHeader( final Writer writter ) throws IOException
-   {
-      writter.write( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-            + getNewLine() );
-      writter.write( "<pmd version=\"4.2.1\" timestamp=\""
-            + new Date().toString() + "\">" + getNewLine() );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/PmdEngineUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/PmdEngineUtils.java b/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/PmdEngineUtils.java
deleted file mode 100644
index 7c48a9e..0000000
--- a/FlexPMD/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/PmdEngineUtils.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.engines;
-
-import java.text.MessageFormat;
-import java.util.List;
-import java.util.Map.Entry;
-
-import com.adobe.ac.pmd.FlexPmdViolations;
-import com.adobe.ac.pmd.IFlexViolation;
-import com.adobe.ac.pmd.files.IFlexFile;
-import com.adobe.ac.pmd.rules.core.ViolationPriority;
-
-public final class PmdEngineUtils
-{
-   public static String findFirstViolationError( final FlexPmdViolations violations )
-   {
-      final StringBuffer buffer = new StringBuffer();
-      final String message = "An error violation has been found on the file {0} at "
-            + "line {1}, with the rule \"{2}\": {3}";
-      final MessageFormat form = new MessageFormat( message );
-
-      for ( final Entry< IFlexFile, List< IFlexViolation >> violatedFile : violations.getViolations()
-                                                                                     .entrySet() )
-      {
-         for ( final IFlexViolation violation : violatedFile.getValue() )
-         {
-            if ( violation.getRule().getPriority() == Integer.parseInt( ViolationPriority.HIGH.toString() ) )
-            {
-               final String[] formatArgument = computeArgumentFormat( violation );
-               buffer.append( form.format( formatArgument ) );
-               buffer.append( '\n' );
-            }
-         }
-      }
-      return buffer.toString();
-   }
-
-   private static String[] computeArgumentFormat( final IFlexViolation violation )
-   {
-      final String[] formatArgument = new String[]
-      { violation.getFilename(),
-                  String.valueOf( violation.getBeginLine() ),
-                  violation.getRule().getRuleClass(),
-                  violation.getRuleMessage() };
-      return formatArgument;
-   }
-
-   private PmdEngineUtils()
-   {
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AbstractEntireRulesetTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AbstractEntireRulesetTest.java b/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AbstractEntireRulesetTest.java
deleted file mode 100644
index 9c5102f..0000000
--- a/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AbstractEntireRulesetTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * 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;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import net.sourceforge.pmd.PMDException;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.engines.FlexPmdXmlEngine;
-
-import junit.framework.TestCase;
-
-public abstract class AbstractEntireRulesetTest extends TestCase
-{
-
-   protected static final String OUTPUT_DIRECTORY_URL = "target/report/";
-
-   public AbstractEntireRulesetTest()
-   {
-      super();
-   }
-
-   protected abstract int getRulesNb();
-
-   protected abstract int getViolatedFilesNb();
-
-   protected abstract String getRuleSetPath();
-
-   public AbstractEntireRulesetTest( String name )
-   {
-      super( name );
-   }
-
-   @Test
-   public void testLoadRuleSet() throws URISyntaxException,
-                                   PMDException,
-                                   IOException
-   {
-      final File sourceDirectory = new File( getClass().getResource( "/test" ).toURI().getPath() );
-      final URL ruleSetUrl = getClass().getResource( getRuleSetPath() );
-   
-      assertNotNull( "RuleSet has not been found",
-                     ruleSetUrl );
-   
-      assertNotNull( "RuleSet has not been found",
-                     ruleSetUrl.toURI() );
-   
-      assertNotNull( "RuleSet has not been found",
-                     ruleSetUrl.toURI().getPath() );
-   
-      final File outputDirectory = new File( OUTPUT_DIRECTORY_URL );
-      final File ruleSetFile = new File( ruleSetUrl.toURI().getPath() );
-      final FlexPmdXmlEngine engine = new FlexPmdXmlEngine( new FlexPmdParameters( "",
-                                                                                   outputDirectory,
-                                                                                   ruleSetFile,
-                                                                                   sourceDirectory ) );
-      final FlexPmdViolations flexPmdViolations = new FlexPmdViolations();
-   
-      engine.executeReport( flexPmdViolations );
-   
-      assertEquals( "Number of rules found is not correct",
-                    getRulesNb(),
-                    engine.getRuleSet().size() );
-      assertEquals( getViolatedFilesNb(),
-                    flexPmdViolations.getViolations().size() );
-   }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AllInOneRulesetTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AllInOneRulesetTest.java b/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AllInOneRulesetTest.java
deleted file mode 100644
index 62f1484..0000000
--- a/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AllInOneRulesetTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-
-import net.sourceforge.pmd.PMDException;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.engines.FlexPmdXmlEngine;
-
-public class AllInOneRulesetTest extends AbstractEntireRulesetTest
-{
-   @Test
-   public void testLoadUncorrectRuleSet() throws URISyntaxException,
-                                         PMDException,
-                                         IOException
-   {
-      final File sourceDirectory = new File( getClass().getResource( "/test" ).toURI().getPath() );
-      final File outputDirectory = new File( OUTPUT_DIRECTORY_URL );
-
-      final FlexPmdXmlEngine engine = new FlexPmdXmlEngine( new FlexPmdParameters( "",
-                                                                                   outputDirectory,
-                                                                                   new File( "nonExist" ),
-                                                                                   sourceDirectory ) );
-
-      engine.executeReport( new FlexPmdViolations() );
-   }
-
-   @Override
-   protected String getRuleSetPath()
-   {
-      return "/allInOneRuleset.xml";
-   }
-
-   @Override
-   protected int getRulesNb()
-   {
-      return 43;
-   }
-
-   @Override
-   protected int getViolatedFilesNb()
-   {
-      return 50;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AllInOneWithExclusionRulesetTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AllInOneWithExclusionRulesetTest.java b/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AllInOneWithExclusionRulesetTest.java
deleted file mode 100644
index 10322f1..0000000
--- a/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AllInOneWithExclusionRulesetTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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;
-
-public class AllInOneWithExclusionRulesetTest extends AbstractEntireRulesetTest
-{
-   @Override
-   protected String getRuleSetPath()
-   {
-      return "/allInOneWithExclusionRuleset.xml";
-   }
-
-   @Override
-   protected int getRulesNb()
-   {
-      return 43;
-   }
-
-   @Override
-   protected int getViolatedFilesNb()
-   {
-      return 36;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/FlexPmdParametersTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/FlexPmdParametersTest.java b/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/FlexPmdParametersTest.java
deleted file mode 100644
index 94b1ff9..0000000
--- a/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/FlexPmdParametersTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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;
-
-import java.io.File;
-import java.util.ArrayList;
-
-import junit.framework.Assert;
-
-import org.junit.Test;
-
-public class FlexPmdParametersTest
-{
-   @Test
-   public void testFlexPmdParametersStringBooleanBooleanFileFileFile()
-   {
-      final FlexPmdParameters parameters = new FlexPmdParameters( "", true, true, null, null, null );
-
-      Assert.assertTrue( parameters.isFailOnError() );
-      Assert.assertTrue( parameters.isFailOnRuleViolation() );
-   }
-
-   @Test
-   public void testFlexPmdParametersStringFileFileFileListOfFile()
-   {
-      final File file = new File( "" );
-      final ArrayList< File > sourceList = new ArrayList< File >();
-      final FlexPmdParameters parameters = new FlexPmdParameters( "", file, file, file, sourceList );
-
-      Assert.assertEquals( sourceList,
-                           parameters.getSourceList() );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/FlexPmdXmlEngineTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/FlexPmdXmlEngineTest.java b/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/FlexPmdXmlEngineTest.java
deleted file mode 100644
index d84641c..0000000
--- a/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/FlexPmdXmlEngineTest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.validation.SchemaFactory;
-
-import org.xml.sax.SAXException;
-
-import com.adobe.ac.pmd.engines.AbstractFlexPmdEngine;
-import com.adobe.ac.pmd.engines.AbstractTestFlexPmdEngineTest;
-import com.adobe.ac.pmd.engines.FlexPMDFormat;
-import com.adobe.ac.pmd.engines.FlexPmdXmlEngine;
-
-public class FlexPmdXmlEngineTest extends AbstractTestFlexPmdEngineTest
-{
-   private static final String OUTPUT_DIRECTORY_URL = "target/report/";
-
-   public FlexPmdXmlEngineTest( final String name )
-   {
-      super( name );
-   }
-
-   @Override
-   protected AbstractFlexPmdEngine getFlexPmdEngine( final File sourceDirectory,
-                                                     final File outputDirectory,
-                                                     final String packageToExclude,
-                                                     final File ruleSet ) throws URISyntaxException,
-                                                                         IOException
-   {
-      return new FlexPmdXmlEngine( new FlexPmdParameters( packageToExclude,
-                                                          outputDirectory,
-                                                          ruleSet,
-                                                          sourceDirectory ) );
-   }
-
-   @Override
-   protected void onTestExecuteReportDone()
-   {
-      final File outXmlReport = new File( OUTPUT_DIRECTORY_URL
-            + FlexPMDFormat.XML.toString() );
-
-      final SchemaFactory factory = SchemaFactory.newInstance( "http://www.w3.org/2001/XMLSchema" );
-
-      final URL schemaResource = getClass().getResource( "/pmd.xsd" );
-
-      assertNotNull( "pmd.xsd is not loaded",
-                     schemaResource );
-
-      try
-      {
-         factory.newSchema( schemaResource ).newValidator().validate( new StreamSource( outXmlReport ) );
-      }
-      catch ( final SAXException e )
-      {
-         fail( e.getMessage() );
-      }
-      catch ( final IOException e )
-      {
-         fail( e.getMessage() );
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/LoadRulesetWithNonUTF8CharTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/LoadRulesetWithNonUTF8CharTest.java b/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/LoadRulesetWithNonUTF8CharTest.java
deleted file mode 100644
index 69eb795..0000000
--- a/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/LoadRulesetWithNonUTF8CharTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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;
-
-public class LoadRulesetWithNonUTF8CharTest extends AbstractEntireRulesetTest
-{
-   @Override
-   protected String getRuleSetPath()
-   {
-      return "/broken_pmd.xml";
-   }
-
-   @Override
-   protected int getRulesNb()
-   {
-      return 70;
-   }
-
-   @Override
-   protected int getViolatedFilesNb()
-   {
-      return 66;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/engines/AbstractTestFlexPmdEngineTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/engines/AbstractTestFlexPmdEngineTest.java b/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/engines/AbstractTestFlexPmdEngineTest.java
deleted file mode 100644
index df495f5..0000000
--- a/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/engines/AbstractTestFlexPmdEngineTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.engines;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import junit.framework.TestCase;
-import net.sourceforge.pmd.PMDException;
-
-import org.junit.Test;
-import org.xml.sax.SAXException;
-
-import com.adobe.ac.pmd.FlexPmdViolations;
-
-public abstract class AbstractTestFlexPmdEngineTest extends TestCase
-{
-   private static final String OUTPUT_DIRECTORY_URL = "target/report/";
-
-   public AbstractTestFlexPmdEngineTest( final String name )
-   {
-      super( name );
-   }
-
-   @Test
-   public final void testExecuteReport() throws PMDException,
-                                        SAXException,
-                                        URISyntaxException,
-                                        IOException
-   {
-      final URL sourceDirectoryResource = getClass().getResource( "/test" );
-
-      assertNotNull( "Source directory is not found as a resource",
-                     sourceDirectoryResource );
-
-      assertNotNull( "Source directory is not found as a resource",
-                     sourceDirectoryResource.toURI() );
-
-      final File sourceDirectory = new File( sourceDirectoryResource.toURI().getPath() );
-      final File outputDirectory = new File( OUTPUT_DIRECTORY_URL );
-
-      getFlexPmdEngine( sourceDirectory,
-                        outputDirectory,
-                        "",
-                        null ).executeReport( new FlexPmdViolations() );
-
-      onTestExecuteReportDone();
-   }
-
-   protected abstract AbstractFlexPmdEngine getFlexPmdEngine( final File sourceDirectory,
-                                                              final File outputDirectory,
-                                                              final String packageToExclude,
-                                                              final File ruleSet ) throws URISyntaxException,
-                                                                                  IOException;
-
-   protected abstract void onTestExecuteReportDone();
-}
\ No newline at end of file


[25/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/allInOneWithExclusionRuleset.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/allInOneWithExclusionRuleset.xml b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/allInOneWithExclusionRuleset.xml
new file mode 100644
index 0000000..ca22972
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/allInOneWithExclusionRuleset.xml
@@ -0,0 +1,601 @@
+<!--
+
+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.
+
+-->
+<ruleset name="All Flex Rules Without AsDocs folder"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	<description />
+	<exclude-pattern>.*/com/.*</exclude-pattern>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.mxml.MoreThanTwoEntryPointsInMxmlRule"
+		message="There are more than 2 public variables in this MXML component">
+		<description />
+		<priority>3</priority>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.binding.TooLongBindingExpressionRule"
+		message="This binding expression is too long">
+		<description>A Binding expression is executed as soon as one of the bindable attributes changed. If a binding expression contains too many expression, there could be some performance issue.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>3</value>
+			</property>
+		</properties>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.mxml.TooLongScriptBlockRule"
+		message="This script block is too long">
+		<description />
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>50</value>
+			</property>
+		</properties>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.DynamicClassRule"
+		message="A class must not be dynamic">
+		<description>When using dynamic classes, you cannot control how the developer will use your classe. It makes refactoring really difficult.</description>
+		<priority>1</priority>
+		<example><![CDATA[
+dynamic public class DynamicObject // VIOLATION
+   {
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.event.EventMissingCloneFunctionRule"
+		message="The clone event must be overiden in a custom event">
+		<description>Why do you need to override clone? Well, the clone method creates a copy of your event (or object - whatever object has the clone event; this isn't limited to Event objects). The default clone method inherited by the Event class or whatever class your custom class extends, will return an event object of the type of that class, not your custom event subclass. In the situations where a clone is needed, it is needed to be of the same type of your class, not the class it extends.</description>
+		<priority>1</priority>
+		<example><![CDATA[
+public class FirstCustomEvent   // VIOLATION - clone method is missing
+   {
+      public var lala : String;
+      
+      public function FirstCustomEvent()
+      {         
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.event.PublicVariableInCustomEventRule"
+		message="No public variables should be inside a custom event">
+		<description>In order to improve encapsulation in your custom event, it is better not to have public variable in your event. Prefer having read-only attributes, set by the event constructor.</description>
+		<priority>3</priority>
+		<example><![CDATA[
+public class FirstCustomEvent   
+   {
+      public var lala : String; // VIOLATION
+      
+      public function FirstCustomEvent()
+      {         
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.style.ConstructorNonEmptyReturnTypeRule"
+		message="A constructor should not have a return type">
+		<description>Even if this is syntaxically correct, there should not be a return type for a constructor.</description>
+		<priority>3</priority>
+		<example><![CDATA[
+public class VoidConstructor   
+   {
+      public function VoidConstructor() : void
+      {         
+      }      
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.switchrules.SwitchStatementsShouldHaveDefaultRule"
+		message="A switch statement does not contain a default statement">
+		<description>Switch statements should have a default label in order to detect corner cases.</description>
+		<priority>1</priority>
+		<example><![CDATA[
+public class Foo 
+   {
+      public funciton bar() : void 
+      {
+         var  x : int = 2;
+         switch (x) 
+         {
+            case 2: var j : int = 8;
+         }
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseObjectTypeRule"
+		message="Do not use Object class.">
+		<description>It is a bad practice to use the dynamic class Object. Prefer using strongly typed object, or marker interface in order to avoid silent compilation errors while refactoring</description>
+		<priority>1</priority>
+		<example><![CDATA[
+public class Foo
+   {
+      public var bar : Object; // VIOLATION      
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.switchrules.NestedSwitchRule"
+		message="Switch must not be nested.">
+		<description>As a general practice, switch statement should not be used. Prefer using inheritance. It is even harder to read when siwtch statements are nested.</description>
+		<priority>3</priority>
+		<example><![CDATA[
+public function foo( a : Number, b : Number ) : void
+      {
+          switch( a )
+          {
+             case 1:
+                break;
+             case 2:                   
+                switch ( b ) 
+                {
+                  case 3 :
+                     break;
+                  case 4 :
+                     break;
+                }
+                break;                     
+          }
+      }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.maintanability.ArrayFieldWithNoArrayElementTypeRule"
+		message="ArrayElementType metadata is not specified for an array-type field">
+		<description />
+		<priority>3</priority>
+		<example><![CDATA[
+public class ArrayVO {
+      public var items:Array; //VIOLATION
+
+      [ArrayElementType("model.vo.MenuItemVO")]
+      public var menuItems : Array;
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.maintanability.NonStaticConstantFieldRule" message="A constant field should be static">
+		<description />
+		<priority>1</priority>
+		<example><![CDATA[
+public class MyObject {
+      public static const MY_STATIC_CONSTANT : String = "myStaticConstant";
+      public const MY_NON_STATIC_CONSTANT : String = "myStaticConstant"; // VIOLATION
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.unused.UnusedParameterRule" message="You should use all the parameters of a function">
+		<description />
+		<priority>1</priority>
+		<example><![CDATA[
+public function foo( param1 : Number, param2 : Number, param3 : Number, param4 : Number, param5 : Number ) : void // 4 violations
+      {
+         var i : int = param1;
+      }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.unused.UnusedLocalVariableRule"
+		message="You should delete an unused variable">
+		<description />
+		<priority>3</priority>
+		<example><![CDATA[
+public function foo() : void
+      {
+         var i : int = 0;// 1 violation
+      }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.unused.UnusedPrivateMethodRule"
+		message="This private method does not seem to be used">
+		<description />
+		<priority>3</priority>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.switchrules.TooFewBrancheInSwitchStatementRule"
+		message="There are too few branches in this swicth statement">
+		<description>Switch statements are designed for complex branches, and allow branches to share treatement. Using a switch for only 2 branches is ill advised, as switches are not as easy to understand as if. In this case, it's most likely is a good idea to use a if statement</description>
+		<priority>5</priority>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.style.BadFormatLoggerRule"
+		message="The loger is not correctly formatted">
+		<description />
+		<priority>5</priority>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.performance.AvoidInstanciationInLoopRule"
+		message="Instanciating a variable in a loop can be expensive">
+		<description />
+		<priority>3</priority>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.architecture.ViewComponentReferencedInModelRule"
+		message="A view component should not be referenced in a model class">
+		<description />
+		<priority>3</priority>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseGenericTypeRule"
+		message="Use strongly typed objects instead of *">
+		<description />
+		<priority>1</priority>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.event.DispatchHardCodedEventNameRule"
+		message="DispatchEvent function must dispatch constant strings">
+		<description>You should not dispatch a plain string. If you rename this string, you need to replace the string listener as well. Use constants instead</description>
+		<priority>3</priority>
+		<example><![CDATA[
+public class Foo 
+   {
+      public function bar() : void
+      {
+         dispatch( new Event( "myHardCodedEvent" ) ); // VIOLATION
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.event.ListenForHardCodedEventNameRule"
+		message="addEventListener must not contain hard coded strings.">
+		<description>You should not listen for a plain string. If you rename this string, you need to replace the string listener as well. Use constants instead</description>
+		<priority>3</priority>
+		<example><![CDATA[
+public class Foo 
+   {
+      public function bar() : void
+      {
+         addEventListener( "myHardCodedEvent", handleMyHardCodedEvent ); // VIOLATION
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.AlertShowRule"
+		message="Do not call Alert.show directly.">
+		<description>You should not Alert.show() directly. If an error occured in the system, you should probably use an ErrorManager to have a consistent way to manage those errors.</description>
+		<priority>1</priority>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.empty.EmptyIfStmtRule"
+		message="No statements in this if statement">
+		<description>Empty If Statement finds instances where a condition is checked but nothing is done about it.</description>
+		<priority>3</priority>
+		<example><![CDATA[
+public class Foo 
+   {
+      public function bar( x : int ) : void
+      {
+         if ( x == 0 ) 
+         {
+            // VIOLATION
+         }
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.ExcessiveImportRule"
+		message="A high number of imports can indicate a high degree of coupling within an object.">
+		<description>A high number of imports can indicate a high degree of coupling within an object. Rule counts the number of unique imports and reports a violation if the count is above the user defined threshold.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>15</value>
+			</property>
+		</properties>
+		<example><![CDATA[
+import blah.blah.Baz;
+   import blah.blah.Bif;
+   // 18 others from the same package elided
+   public class Foo 
+   {
+      public function doWork() : void 
+      {
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.binding.BindingUtilsRule"
+		message="If you need to use BindingUtils, you should probably consider refactoring using events">
+		<description />
+		<priority>3</priority>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.style.OverLongLineRule"
+		message="Too long line ({0} maximum)">
+		<description />
+		<priority>5</priority>
+		<properties>
+			<property name="maximum">
+				<value>120</value>
+			</property>
+		</properties>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.style.ImportFromSamePackageRule"
+		message="Imports from the same package are not necessary">
+		<description />
+		<priority>1</priority>
+		<example><![CDATA[
+package com.adobe.ac
+{
+   import com.adobe.ac.MyModel; // VIOLATION HERE
+
+   public class BigModel   
+   {
+      public var model : MyModel = null;
+   }
+}
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.naming.IncorrectClassCase"
+		message="A class name must start by a majuscule character">
+		<description />
+		<priority>3</priority>
+		<example><![CDATA[
+public class foo
+   {
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.cairngorm.BindableModelLocatorRule"
+		message="A modelLocator must not be Bindable at a class level">
+		<description>A bindable ModelLocator could leads to performance issues due to bindings</description>
+		<priority>1</priority>
+		<example><![CDATA[
+[Bindable]
+   public class BindableModelLocator // VIOLATION 
+   {      
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.cairngorm.ReferenceModelLocatorOutsideTheMainApplicationRule"
+		message="The ModelLocator should be only accessible from the main application file">
+		<description>The ModelLocator should be only accessible from the main application file. Then sub-models should be injected to the nested views.</description>
+		<priority>3</priority>
+		<example><![CDATA[
+package business
+{
+   import model.MyModelLocator; // VIOLATION
+   
+   public class MyBusinessClass 
+   } 
+}
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.cairngorm.FatControllerRule"
+		message="A FrontController must nor add all its commands within the Controller constructor.">
+		<description>Try split them into methods where you add commands depending on their fonctional area.</description>
+		<priority>3</priority>
+		<example><![CDATA[
+package control
+{
+   import control.GetItems1Command;
+   import control.GetItems1Event;
+   import control.GetItems2Command;
+   import control.GetItems2Event;
+   // A lot of other imports
+   
+   public class MyFrontController // VIOLATION
+   {
+      public function MyFrontController()
+      {
+         addCommand( 
+            GetItems1Event.EVENT_NAME,
+            GetItems1Command );
+
+         addCommand( 
+            GetItems2Event.EVENT_NAME,
+            GetItems2Command );
+
+         // A lot of other addCommand
+      }
+   } 
+}
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.cairngorm.BadCairngormEventNameFormatRule"
+		message="A Cairngorm event name should contain the function area name before the actual event name">
+		<description>You would have something like 'productManagement.getProducts' as an event name.</description>
+		<priority>3</priority>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.sizing.TooManyFunctionRule" message="Too many methods detected">
+		<description>A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>10</value>
+			</property>
+		</properties>
+		<example><![CDATA[
+public class Foo 
+   {
+      public function doWork() : void {}
+      public function doMoreWork() : void {}
+      public function doWorkAgain() : void {}
+      // [... more more public methods ...]
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.sizing.TooLongFunctionRule" message="This function is far long">
+		<description>Violations of this rule usually indicate that the method is doing too much. Try to reduce the method size by creating helper methods and removing any copy/pasted code.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>25</value>
+			</property>
+		</properties>
+		<example><![CDATA[
+public class Foo 
+   {
+      public function doSomething() : void
+      {
+         System.out.println("Hello world!");
+         System.out.println("Hello world!");
+         // 98 copies omitted for brevity.
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.sizing.TooLongSwitchCaseRule"
+		message="Long switch case detected">
+		<description>A switch case statement should be either empty, or contain a break, or call another method.</description>
+		<priority>3</priority>
+		<example><![CDATA[
+public class Bar   
+   {
+      public function foo() : void
+      {
+          var i : int = 4;
+          
+          switch( i )
+          {
+             case 1:
+                handleFirstCase();
+                break;
+             case 2: // VIOLATION
+                googleResquest.url = "";
+                handleSecondCaseFirstPart();
+                handleSecondCaseSecondPart();
+                break;
+          }
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.sizing.TooManyParametersRule"
+		message="Long parameter list detected">
+		<description>Long parameter lists can indicate that a new object should be created to wrap the numerous parameters.  Basically, try to group the parameters together.</description>
+		<priority>1</priority>
+		<properties>
+			<property name="maximum">
+				<value>4</value>
+			</property>
+		</properties>
+		<example><![CDATA[
+public class Foo 
+   {
+      public function addData( p0 : int, p1 : int, p2 : int, p3 : int, p4 : int, p5 : int,
+                                             p6 : int, p7 : int, p8 : int, p9 : int, p10 : int ) : void 
+      {
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.sizing.TooManyPublicRule"
+		message="Too much public fields or functions detected">
+		<description>A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>10</value>
+			</property>
+		</properties>
+		<example><![CDATA[
+public class Foo 
+   {
+      public var value : String;
+      public var something : Bar;
+      public var variable : Variable;
+
+      // [... more more public attributes ...]
+
+      public function doWork() : void {}
+      public function doMoreWork() : void {}
+      public function doWorkAgain() : void {}
+
+      // [... more more public methods ...]
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.sizing.TooManyFieldsRule"
+		message="Too many field detected">
+		<description>Classes that have too many fields could be redesigned to have fewer fields, possibly  through some nested object grouping of some of the information.  For example, a class with  city/state/zip fields could instead have one Address field.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>5</value>
+			</property>
+		</properties>
+		<example><![CDATA[
+public class Person 
+   {
+      private var one : String;
+      private var two : int;
+      private var three : int;
+
+      [... many more public fields ...]
+
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.naming.TooShortVariableRule"
+		message="This variable name is too short">
+		<description>Detects when a field, local, or parameter has a very short name.</description>
+		<priority>5</priority>
+		<example><![CDATA[
+public class Something 
+   {
+      private var q : int = 15; // VIOLATION - Field
+	
+      public function foo( as : String ) : void // VIOLATION - Formal 
+      {
+         var r : int = 20 + q; // VIOLATION - Local
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.naming.PackageCaseRule"
+		message="A package name should be lower case">
+		<description>Detects when a package definition contains upper case characters.</description>
+		<priority>3</priority>
+		<example><![CDATA[
+
+   package com.MyCompany  // VIOLATION <- should be lower case name
+   {
+      public class SomeClass 
+      {
+      }
+   }
+         
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.css.StyleBlockInMxmlRule"
+		message="The style block is embed in the MXML file">
+		<description>It is not a good practice to embed style blocks inside the MXML component. Prefer using external css files.</description>
+		<priority>3</priority>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.performance.DynamicFiltersUsedInPopup"
+		message="A popup should use dynamic filters">
+		<description>Prefer using embed filters in assets</description>
+		<priority>3</priority>
+	</rule>
+</ruleset>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/broken_pmd.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/broken_pmd.xml b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/broken_pmd.xml
new file mode 100644
index 0000000..7a828ae
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/broken_pmd.xml
@@ -0,0 +1,703 @@
+<!--
+
+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.
+
+-->
+<ruleset name="All Flex Rules" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd" xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <description/>
+  <rule since="" class="com.adobe.ac.pmd.rules.architecture.MonkeyPatchingRule" message="This class looks to be duplicated with a SDK class">
+    <description>Monkey patching can be a risky undertaking because it is not using intended extensibility points and thus may have unintended consequences or make migration to newer versions of the SDK more difficult</description>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.mxml.MoreThanOneEntryPointInMxmlRule" message="There is more than 1 public variable in this MXML component">
+    <description/>
+    <priority>3</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.mxml.MoreThanTwoEntryPointsInMxmlRule" message="There are more than 2 public variables in this MXML component">
+    <description/>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.mxml.TooLongScriptBlockRule" message="This script block is too long ({0} maximum, but {1} actually)">
+    <description/>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>50</value>
+      </property>
+    </properties>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.mxml.CodeBehindInMxmlRule" message="Avoid using code behind files">
+    <description>Code behind files are tightly coupled with the view, not unit-testable, not easy to navigate the code base and not reusable. Try using presentation model pattern, or observer pattern</description>
+    <priority>5</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.binding.BindingUtilsRule" message="BindingUtils class uses hard coded strings, which won't be picked up by the compiler if you rename this attribute. You should probably consider refactoring using events">
+    <description/>
+    <priority>1</priority>
+    <example><![CDATA[public class Controller extends FrontController
+{
+   public function Controller()
+   {
+   	 BindingUtils.bindSetter(setContent, value, "content"); // VIOLATION
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.binding.ChangeWatcherRule" message="ChangeWatcher class uses hard coded strings to specify the attribute name, to listen to. Prefer listening to events or setters">
+    <description/>
+    <priority>1</priority>
+    <example><![CDATA[public final class Title 
+{
+	private var watcher : ChangeWatcher; // VIOLATION
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.binding.TooLongBindingExpressionRule" message="This binding expression is too long ({0} dots maximum, but {1} actually)">
+    <description>A Binding expression is executed as soon as one of the bindable attributes changed. If a binding expression contains too many expression, there could be some performance issue.</description>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>3</value>
+      </property>
+    </properties>
+    <example><![CDATA[
+<mx:Label text="{ vfrfr.frfr.frf.lala }"/> <!-- Violation-->
+		]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.component.UpdateChildrenNumberInUpdateDisplayListRule" message="Flex specific - Do not add or remove displayable children from updateDisplayList">
+    <description>UpdateDisplayList is called everytime a child is invalidated. So calling addChild or removeChild in this function could be really CPU consuming</description>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.component.CallLaterDirectlyRule" message="Flex specific - Don't call 'callLater' explicitly">
+    <description>If you needed to call 'callLater' explicitly, then you probably did not extend the correct component life cycle.</description>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.css.StyleBlockInMxmlRule" message="The style block is embed in the MXML file">
+    <description>It is not a good practice to embed style blocks inside the MXML component. Prefer using external CSS files.</description>
+    <priority>3</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.css.UseCssInsteadOfEmbedMetaDataRule" message="Embed metadata detected in source code where a stylesheet may be cleaner">
+    <description/>
+    <priority>5</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.empty.EmptyCatchStatementRule" message="This catch statement is empty">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[public class Foo 
+{
+   public function bar( x : int ) : void
+   {
+      try
+      {
+      }
+      catch( e : Exception )         // VIOLATION
+      {
+      }
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.empty.EmptyIfStmtRule" message="No statements in this if statement">
+    <description>Empty If Statement finds instances where a condition is checked but nothing is done about it.</description>
+    <priority>3</priority>
+    <example><![CDATA[public class Foo 
+{
+   public function bar( x : int ) : void
+   {
+      if ( x == 0 ) 
+      {
+         // VIOLATION
+      }
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.event.EventMissingCloneFunctionRule" message="The clone event must be overiden in a custom event">
+    <description>When creating your own custom Event class, you must override the inherited Event.clone() method in order for it to duplicate the properties of your custom class. If you do not set all the properties that you add in your event subclass, those properties will not have the correct values when the event is cloned. This is important because the Flex SDK clones events whenever redispatching takes place.</description>
+    <priority>1</priority>
+    <example><![CDATA[public class FirstCustomEvent   // VIOLATION - clone method is missing
+{
+   public var lala : String;
+   
+   public function FirstCustomEvent()
+   {         
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.event.PublicVariableInCustomEventRule" message="No public variables should be inside a custom event. This variable ({0}) is public">
+    <description>In order to improve encapsulation in your custom event, it is better not to have public variable in your event. Prefer having read-only attributes, set by the event constructor.</description>
+    <priority>3</priority>
+    <example><![CDATA[public class FirstCustomEvent   
{
   public var lala : String; // VIOLATION
   
   public function FirstCustomEvent( dfsfd)
   {         
   }
}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.event.ConstructorDispatchingEventRule" message="An event is dispatched in a constructor">
+    <description>This is pointless, since event listeners cannot be attached to an object before it has been constructed, so nothing can ever hear the event</description>
+    <priority>1</priority>
+    <example><![CDATA[public class BigModel   
+{
+   public function BigModel()
+   {    
+      dispatchEvent( new Event( "pointlessEvent" ) );     
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.event.ListenForHardCodedEventNameRule" message="addEventListener must not contain hard coded strings">
+    <description>You should not listen for a plain string. If you rename this string, you need to replace the string listener as well. Use constants instead</description>
+    <priority>1</priority>
+    <example><![CDATA[public class Foo 
+{
+   public function bar() : void
+   {
+      addEventListener( "myHardCodedEvent", handleMyHardCodedEvent ); // VIOLATION
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.event.UnboundTypeInMetadataRule" message="This type ({0}) was not found within the scope against which PMD was run">
+    <description/>
+    <priority>1</priority>
+    <example><![CDATA[[Event(name="myTypeEvent",type="UnknownType")] // VIOLATION
+public class UnboundMetadata
+{
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.event.UntypedEventMetadataRule" message="This event type is not specified">
+    <description>Specifying a type will allow Flash builder and the class to have this event exposed in its API</description>
+    <priority>3</priority>
+    <example><![CDATA[[Event(name="myTypeEvent")] // VIOLATION
+public class UnTypedMetadata
+{
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.ExcessiveImportRule" message="A high number of imports can indicate a high degree of coupling within an object. ({0} maximum but {1} actually)">
+    <description>A high number of imports can indicate a high degree of coupling within an object. Rule counts the number of unique imports and reports a violation if the count is above the user defined threshold.</description>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>15</value>
+      </property>
+    </properties>
+    <example><![CDATA[import blah.blah.Baz;
+import blah.blah.Bif;
+// 18 others from the same package elided
+public class Foo 
+{
+   public function doWork() : void 
+   {
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.TrueFalseConditionRule" message="This test contains a hard coded boolean value. You could remove it by having '{0}'">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[if ( true ) // VIOLATION
+{
+   if ( myCondition == false ) // VIOLATION
+   {
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.DynamicClassRule" message="A class must not be dynamic">
+    <description>When using dynamic classes, you cannot control how the developer will use your class. It makes refactoring really difficult</description>
+    <priority>3</priority>
+    <example><![CDATA[dynamic public class DynamicObject // VIOLATION
+{
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseObjectTypeRule" message="Do not use Object class">
+    <description>It is a bad practice to use the dynamic class Object. Prefer using strongly typed object, or marker interface in order to avoid silent compilation errors while refactoring</description>
+    <priority>5</priority>
+    <example><![CDATA[public class Foo
+{
+   public var bar : Object; // VIOLATION      
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.NonStaticConstantFieldRule" message="A constant field should be static ({0})">
+    <description/>
+    <priority>1</priority>
+    <example><![CDATA[public class MyObject {
+   public static const MY_STATIC_CONSTANT : String = "myStaticConstant";
+   public const MY_NON_STATIC_CONSTANT : String = "myStaticConstant"; // VIOLATION
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.UselessOverridenFunctionRule" message="This method is empty. This should be removed ({0})">
+    <description>This function is not needed.</description>
+    <priority>3</priority>
+    <example><![CDATA[override protected function createChildren() : void
+{
+   super.createChildren();
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.AvoidProtectedFieldInFinalClassRule" message="Protected accessors are useless in a final class. Make it private ({0})">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[final public class Foo
+{
+   protected var bar : int; // VIOLATION      
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.AvoidUsingWithKeyWordRule" message="You should not use the with keyword. It does not help readability">
+    <description/>
+    <priority>3</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.ArrayFieldWithNoArrayElementTypeRule" message="ArrayElementType metadata is not specified for this array-type field ({0})">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[public class ArrayVO {
+   public var items:Array; //VIOLATION
+
+   [ArrayElementType("model.vo.MenuItemVO")]
+   public var menuItems : Array;
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.ClassAndExtensionAreIdenticalRule" message="The extension name is the same as the class name">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[package com.MyCompany
+{
+   public class SomeClass extends mx.SomeClass // VIOLATION
+   {
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.ProtectedStaticMethodRule" message="This method ({0}) should be private">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[protected static function foo() : void // VIOLATION
+{
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.EmptyStatementRule" message="This statement is empty">
+    <description/>
+    <priority>5</priority>
+    <example><![CDATA[protected function foo() : void
+{
+   var i : int = 0;
+   
+   ; // VIOLATION
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.naming.TooShortVariableRule" message="This variable name is too short ({0} characters minimum, but {1} actually)">
+    <description>Detects when a field, local, or parameter has a very short name.</description>
+    <priority>1</priority>
+    <properties>
+      <property name="minimum">
+        <value>3</value>
+      </property>
+    </properties>
+    <example><![CDATA[public class Something 
+{
+   private var q : int = 15; // VIOLATION - Field
+
+   public function foo( as : String ) : void // VIOLATION - Formal 
+   {
+      var r : int = 20 + q; // VIOLATION - Local
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.naming.PackageCaseRule" message="A package name should be lower case ({0})">
+    <description>Detects when a package definition contains upper case characters.</description>
+    <priority>3</priority>
+    <example><![CDATA[
+package com.MyCompany  // VIOLATION <- should be lower case name
+{
+   public class SomeClass 
+   {
+   }
+}
+         ]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.naming.VariableNameEndingWithNumericRule" message="Using digits at the end of a symbol does not help understanging the meaning of it. ({0})">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[
+public class SomeClass 
+{
+   public var correctField1 : int = 0; // VIOLATION <- numeric suffix is forbidden
+}		
+		]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.naming.PropertyHiddenByLocalVariableRule" message="A class property is hidden by this local variable ({0})">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[public class SomeClass 
+{
+   public var myField : int = 0;
+   
+   public function foo() : void
+   {
+   	var myField : int = 9; // VIOLATION
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.naming.WronglyNamedVariableRule" message="This variable ({0}) seems to be incorrectly named. Let your creativity flow">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[
+public class SomeClass 
+{
+   public var myField : int = 0; // VIOLATION <- my prefix is forbidden
+   
+   public function tmpFoo() : void // VIOLATION <- tmp prefix is forbidden
+   {
+   	var tempFoo : int = 9; // VIOLATION <- temp prefix is forbidden
+   }
+}		
+		]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.parsley.InaccessibleMetaDataRule" message="Parsley metadata should not be placed on inaccessible members.">
+    <description>Parsley can only process metadata that is placed onto public members.</description>
+    <priority>1</priority>
+    <example><![CDATA[[MessageHandler]
+private function doSomething() : void // VIOLATION 
+{      
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.parsley.MismatchedManagedEventRule" message="Managed events should have matching [Event] metadata">
+    <description>Each managed event should have matching [Event] metadata.</description>
+    <priority>1</priority>
+    <example><![CDATA[[Event(name="message", type="my.package.MyEvemt")]
+[ManagedEvents(names="messag")] // VIOLATION
+public class MyClass  
+{      
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.parsley.MessageInterceptorSignatureRule" message="The signature of the message interceptor {0} is not correct. {1}.">
+    <description/>
+    <priority>1</priority>
+    <example><![CDATA[
+[MessageInterceptor(type="a.b.MyMessage")]
+public function messageInterceptor( processor : MessageProcessor ) : void
+{
+   processor.proceed();
+}
+
+[MessageInterceptor(type="a.b.MyMessage")]
+public function messageInterceptor() : void // VIOLATION
+{
+}
+
+[MessageInterceptor(type="a.b.MyMessage")]
+public function messageInterceptor( type : MyMessage ) : void // VIOLATION
+{
+   type.something();
+}
+
+[MessageInterceptor(type="a.b.MyMessage")]
+public function messageInterceptor( processor : MessageProcessor, type : MyMessage ) : void // VIOLATION
+{
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.parsley.MisplacedMetaDataRule" message="This metadata {0} is misplaced">
+    <description/>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.parsley.RedundantMessageHandlerTypeAttributeRule" message="This type metadata argument is redundant with the handler argument type">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[
+[MessageHandler(type="a.b.MyMessage")] // VIOLATION
+public function doSomething( message : MyMessage ) : void
+{
+   message.toString();
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.parsley.RedundantMethodAttributeRule" message="This method metadata argument is redundant with the handler name">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[
+[MessageHandler(method="doSomething")] // VIOLATION
+public function doSomething( message : MyMessage ) : void
+{
+   message.toString();
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.parsley.UnknownMetaDataAttributeRule" message="This metadata attribute {0} is unknown">
+    <description/>
+    <priority>1</priority>
+    <example><![CDATA[
+[AsyncInit(x="y")] // VIOLATION
+public class UnknownMetaDataAttribute
+{
+   [Inject(x="y")] // VIOLATION
+   public var inject;
+
+   [MessageHandler(x="y")] // VIOLATION
+   public function messageHandler() : void
+   {
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.performance.DynamicFiltersUsedInPopup" message="A popup should not use dynamic filters">
+    <description>Prefer using embed filters in assets</description>
+    <priority>3</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.performance.CyclomaticComplexityRule" message="This method is too complex. Maximum complexity is {0}, but its cyclomatic complexity was {1}">
+    <description/>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>10</value>
+      </property>
+    </properties>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.performance.HeavyConstructorRule" message="Constructor must be as lightweight as possible. No control statement allowed, whereas a cyclomatic complexe of {0} has been detected">
+    <description>The Just-In-Time compiler does not compile constructors. Make them as lightweight as possible, or move the complexity of the code to a method called by the constructor. Then the complexity will be compiled by the JIT.</description>
+    <priority>3</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.performance.CreationPolicySetToAllRule" message="creationPolicy to ALL impacts the performance significantly">
+    <description/>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.performance.DeeplyNestedIfRule" message="Nested if statements are not a good design">
+    <description/>
+    <priority>3</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.performance.RecursiveStyleManagerRule" message="Detect calls to the StyleManager that don’t pass “false” as the second parameter">
+    <description>A recursive style manager call can be a very expensive operation, causing parts of the UI to flicker visibly. Instead it is preferable to defer the creation of parts of the UI that depend on a runtime CSS SWF until after the SWF has been loaded. In this case a recursive call is not required.</description>
+    <priority>3</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooManyFunctionRule" message="Too many methods detected ({0} maximum, but {1} actually)">
+    <description>A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.</description>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>25</value>
+      </property>
+    </properties>
+    <example><![CDATA[public class Foo 
+   {
+      public function doWork() : void {}
+      public function doMoreWork() : void {}
+      public function doWorkAgain() : void {}
+      // [... more more public methods ...]
+   }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooLongFunctionRule" message="This function is far too long ({0} maximum, but {1} actually)">
+    <description>Violations of this rule usually indicate that the method has too much responsibility. Try to reduce the method size by creating helper methods and removing any copy/pasted code.</description>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>20</value>
+      </property>
+    </properties>
+    <example><![CDATA[public class Foo 
+   {
+      public function doSomething() : void
+      {
+         System.out.println("Hello world!");
+         System.out.println("Hello world!");
+         // 98 copies omitted for brevity.
+      }
+   }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooLongSwitchCaseRule" message="Long switch case detected ({0} lines maximum, but {1} actually)">
+    <description>A switch case statement should be either empty, or contain a break, or call another method.</description>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>3</value>
+      </property>
+    </properties>
+    <example><![CDATA[public class Bar   
+   {
+      public function foo() : void
+      {
+          var i : int = 4;
+          
+          switch( i )
+          {
+             case 1:
+                handleFirstCase();
+                break;
+             case 2: // VIOLATION
+                googleResquest.url = "";
+                handleSecondCaseFirstPart();
+                handleSecondCaseSecondPart();
+                break;
+          }
+      }
+   }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooManyParametersRule" message="Long parameter list detected ({0} maximum, but {1} actually)">
+    <description>Long parameter lists can indicate that a new object should be created to wrap the numerous parameters.  Basically, try to group the parameters together.</description>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>4</value>
+      </property>
+    </properties>
+    <example><![CDATA[public class Foo 
+   {
+      public function addData( p0 : int, p1 : int, p2 : int, p3 : int, p4 : int, p5 : int,
+                                             p6 : int, p7 : int, p8 : int, p9 : int, p10 : int ) : void 
+      {
+      }
+   }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooManyPublicRule" message="Too many public fields or functions detected ({0} maximum, but {1} actually)">
+    <description>A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.</description>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>15</value>
+      </property>
+    </properties>
+    <example><![CDATA[public class Foo 
+   {
+      public var value : String;
+      public var something : Bar;
+      public var variable : Variable;
+
+      // [... more more public attributes ...]
+
+      public function doWork() : void {}
+      public function doMoreWork() : void {}
+      public function doWorkAgain() : void {}
+
+      // [... more more public methods ...]
+   }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooManyFieldsRule" message="Too many field detected ({0} maximum, but {1} actually)">
+    <description>Classes that have too many fields could be redesigned to have fewer fields, possibly  through some nested object grouping of some of the information.  For example, a class with  city/state/zipcode fields could instead have one Address field.</description>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>15</value>
+      </property>
+    </properties>
+    <example><![CDATA[public class Person 
+   {
+      private var one : String;
+      private var two : int;
+      private var three : int;
+
+      [... many more public fields ...]
+
+   }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.style.ConstructorNonEmptyReturnTypeRule" message="A constructor should not have a return type">
+    <description>Even if this is syntactically correct, there should not be a return type for a constructor.</description>
+    <priority>5</priority>
+    <example><![CDATA[public class VoidConstructor   
+   {
+      public function VoidConstructor() : void // VIOLATION
+      {         
+      }      
+   }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.style.OverLongLineRule" message="Too long line ({0} maximum, but {1} actually)">
+    <description/>
+    <priority>5</priority>
+    <properties>
+      <property name="maximum">
+        <value>120</value>
+      </property>
+    </properties>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.style.ImportFromSamePackageRule" message="Imports from the same package are not necessary">
+    <description/>
+    <priority>5</priority>
+    <example><![CDATA[package com.adobe.ac
+{
+   import com.adobe.ac.MyModel; // VIOLATION HERE
+
+   public class BigModel   
+   {
+      public var model : MyModel = null;
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.style.BadFormatLoggerRule" message="The logger is not correctly formatted because {0}">
+    <description/>
+    <priority>5</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.switchrules.SwitchStatementsShouldHaveDefaultRule" message="A switch statement does not contain a default statement">
+    <description>Switch statements should have a default label in order to detect corner cases.</description>
+    <priority>1</priority>
+    <example><![CDATA[public class Foo 
+   {
+      public funciton bar() : void 
+      {
+         var  x : int = 2;
+         switch (x) 
+         {
+            case 2: var j : int = 8;
+         }
+      }
+   }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.switchrules.NestedSwitchRule" message="Switch must not be nested">
+    <description>As a general practice, switch statement should not be used. Prefer using inheritance. It is even harder to read when switch statements are nested.</description>
+    <priority>3</priority>
+    <example><![CDATA[public function foo( a : Number, b : Number ) : void
+      {
+          switch( a )
+          {
+             case 1:
+                break;
+             case 2:                   
+                switch ( b ) 
+                {
+                  case 3 :
+                     break;
+                  case 4 :
+                     break;
+                }
+                break;                     
+          }
+      }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.switchrules.TooFewBrancheInSwitchStatementRule" message="There are too few branches in this switch statement ({0} minimum, but {1} actual)">
+    <description>Switch statements are designed for complex branches, and allow branches to share treatment. Using a switch for only 2 branches is ill advised, as switches are not as easy to understand as if. In this case, it's most likely is a good idea to use a if statement</description>
+    <priority>5</priority>
+    <properties>
+      <property name="minimum">
+        <value>3</value>
+      </property>
+    </properties>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.switchrules.IdenticalSwitchCasesRule" message="Two switch cases should not be identical">
+    <description/>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.flexunit.EmptyUnitTest" message="A test should contain at least one assertion">
+    <description/>
+    <priority>3</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.unused.UnusedParameterRule" message="This parameter ({0}) of this function is not used">
+    <description/>
+    <priority>1</priority>
+    <example><![CDATA[public function foo( param1 : Number, param2 : Number, param3 : Number, param4 : Number, param5 : Number ) : void // 4 violations
+      {
+         var i : int = param1;
+      }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.unused.UnusedLocalVariableRule" message="This variable ({0}) is not used">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[public function foo() : void
+      {
+         var i : int = 0;// 1 violation
+      }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.unused.UnusedPrivateMethodRule" message="This private method ({0}) does not seem to be used">
+    <description/>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.unused.UnusedFieldRule" message="This private attribute ({0}) does not seem to be used">
+    <description/>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.unused.EmptyPrivateMethodRule" message="This private method ({0}) is used but its content is empty">
+    <description/>
+    <priority>1</priority>
+  </rule>
+    
+</ruleset>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/pmd.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/pmd.xml b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/pmd.xml
new file mode 100644
index 0000000..6b9ac1d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/pmd.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+<pmd version="4.2.1" timestamp="Fri Aug 08 08:31:02 PDT 2008">
+   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/AbstractRowData.as">
+      <violation beginline="41" endline="121" begincolumn="7" endcolumn="7" rule="TooManyFunction" ruleset="Basic As3 Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="1">A constructor should not have a return type</violation>
+      <violation beginline="41" endline="118" begincolumn="7" endcolumn="7" rule="TooManyFunction" ruleset="Basic As3 Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="1">A constructor should not have a return type</violation>
+      <violation beginline="29" endline="29" begincolumn="9" endcolumn="29" rule="PackageCase" ruleset="Basic Common Flex Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="3">A package name should be lower case</violation>
+      <violation beginline="44" endline="44" begincolumn="0" endcolumn="44" rule="DeadCode" ruleset="Basic Common Flex Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="3">There are some dead code here.</violation>
+      <violation beginline="49" endline="62" begincolumn="0" endcolumn="9" rule="DeadCode" ruleset="Basic Common Flex Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="3">There are some dead code here.</violation>
+      <violation beginline="98" endline="100" begincolumn="12" endcolumn="10" rule="EmptyIfStmt" ruleset="Basic Common Flex Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="3">No statements in this if statement</violation>
+      <violation beginline="101" endline="101" begincolumn="0" endcolumn="36" rule="DispatchHardCodedEventName" ruleset="Basic Common Flex Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="3">DispatchEvent function must dispatch constant strings</violation>
+      <violation beginline="102" endline="102" begincolumn="0" endcolumn="38" rule="DispatchHardCodedEventName" ruleset="Basic Common Flex Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="3">DispatchEvent function must dispatch constant strings</violation>
+      <violation beginline="97" endline="97" begincolumn="0" endcolumn="57" rule="TooShortVariable" ruleset="Basic Common Flex Rules" package="" class="AbstractRowData.as" externalInfoUrl="" priority="5">This variable name is too short</violation>
+   </file>
+   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/com/adobe/ac/ncss/BigModel.as">
+      <violation beginline="5" endline="28" begincolumn="7" endcolumn="7" rule="TooManyFunction" ruleset="Basic As3 Rules" package="com.adobe.ac.ncss" class="BigModel.as" externalInfoUrl="" priority="1">A constructor should not have a return type</violation>
+      <violation beginline="8" endline="8" begincolumn="0" endcolumn="22" rule="TooShortVariable" ruleset="Basic Common Flex Rules" package="com.adobe.ac.ncss" class="BigModel.as" externalInfoUrl="" priority="5">This variable name is too short</violation>
+   </file>
+   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/com/adobe/ac/ncss/event/DynamicCustomEvent.as">
+      <violation beginline="3" endline="3" begincolumn="0" endcolumn="43" rule="DynamicClass" ruleset="Basic As3 Rules" package="com.adobe.ac.ncss.event" class="DynamicCustomEvent.as" externalInfoUrl="" priority="1">A class must not be dynamic</violation>
+      <violation beginline="5" endline="5" begincolumn="0" endcolumn="31" rule="PublicVariableInCustomEvent" ruleset="Basic As3 Rules" package="com.adobe.ac.ncss.event" class="DynamicCustomEvent.as" externalInfoUrl="" priority="3">No public variables should be inside a custom event</violation>
+   </file>
+   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/com/adobe/ac/ncss/event/FirstCustomEvent.as">
+      <violation beginline="0" endline="0" begincolumn="0" endcolumn="0" rule="EventMissingCloneFunction" ruleset="Basic As3 Rules" package="com.adobe.ac.ncss.event" class="FirstCustomEvent.as" externalInfoUrl="" priority="1">The clone event must be overiden in a custom event</violation>
+      <violation beginline="5" endline="5" begincolumn="0" endcolumn="31" rule="PublicVariableInCustomEvent" ruleset="Basic As3 Rules" package="com.adobe.ac.ncss.event" class="FirstCustomEvent.as" externalInfoUrl="" priority="3">No public variables should be inside a custom event</violation>
+   </file>
+   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/com/adobe/ac/ncss/mxml/IterationsList.mxml">
+      <violation beginline="18" endline="18" begincolumn="0" endcolumn="72" rule="MoreThanTwoEntryPointsInMxml" ruleset="Basic MXML Rules" package="com.adobe.ac.ncss.mxml" class="IterationsList.mxml" externalInfoUrl="" priority="3">There are more than 2 public variables in this MXML component</violation>
+      <violation beginline="18" endline="18" begincolumn="0" endcolumn="72" rule="MoreThanOneEntryPointInMxml" ruleset="Basic MXML Rules" package="com.adobe.ac.ncss.mxml" class="IterationsList.mxml" externalInfoUrl="" priority="5">There are more than 1 public variable in this MXML component</violation>
+      <violation beginline="20" endline="20" begincolumn="0" endcolumn="86" rule="TooShortVariable" ruleset="Basic Common Flex Rules" package="com.adobe.ac.ncss.mxml" class="IterationsList.mxml" externalInfoUrl="" priority="5">This variable name is too short</violation>
+      <violation beginline="31" endline="31" begincolumn="0" endcolumn="51" rule="TooShortVariable" ruleset="Basic Common Flex Rules" package="com.adobe.ac.ncss.mxml" class="IterationsList.mxml" externalInfoUrl="" priority="5">This variable name is too short</violation>
+   </file>
+   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/com/adobe/ac/ncss/SearchBarEvent.as">
+      <violation beginline="0" endline="0" begincolumn="0" endcolumn="0" rule="EventMissingCloneFunction" ruleset="Basic As3 Rules" package="com.adobe.ac.ncss" class="SearchBarEvent.as" externalInfoUrl="" priority="1">The clone event must be overiden in a custom event</violation>
+   </file>
+   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/com/adobe/ac/ncss/event/SecondCustomEvent.as">
+      <violation beginline="0" endline="0" begincolumn="0" endcolumn="0" rule="EventMissingCloneFunction" ruleset="Basic As3 Rules" package="com.adobe.ac.ncss.event" class="SecondCustomEvent.as" externalInfoUrl="" priority="1">The clone event must be overiden in a custom event</violation>
+   </file>
+   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/com/adobe/ac/ncss/TestResult.as">
+      <violation beginline="61" endline="64" begincolumn="0" endcolumn="11" rule="DeadCode" ruleset="Basic Common Flex Rules" package="com.adobe.ac.ncss" class="TestResult.as" externalInfoUrl="" priority="3">There are some dead code here.</violation>
+   </file>
+   <file name="C:/Documents and Settings/Administrator/.hudson/jobs/FlexPmd/workspace/flex-pmd-core/target/test-classes/test/com/adobe/ac/ncss/VoidConstructor.as">
+      <violation beginline="6" endline="7" begincolumn="7" endcolumn="10" rule="ConstructorNonEmptyReturnType" ruleset="Basic As3 Rules" package="com.adobe.ac.ncss" class="VoidConstructor.as" externalInfoUrl="" priority="3">A constructor should not have a return type</violation>
+      <violation beginline="8" endline="8" begincolumn="0" endcolumn="22" rule="TooShortVariable" ruleset="Basic Common Flex Rules" package="com.adobe.ac.ncss" class="VoidConstructor.as" externalInfoUrl="" priority="5">This variable name is too short</violation>
+   </file>
+</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/pmd.xsd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/pmd.xsd b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/pmd.xsd
new file mode 100644
index 0000000..92c59a3
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/pmd.xsd
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+<!--W3C Schema generated by XMLSpy v2007 rel. 3 sp1 (http://www.altova.com)-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+	<xs:element name="violation">
+		<xs:complexType>
+			<xs:simpleContent>
+				<xs:extension base="xs:string">
+					<xs:attribute name="ruleset" use="required" type="xs:string"/>
+					<xs:attribute name="rule" use="required" type="xs:string"/>
+					<xs:attribute name="priority" use="required" type="xs:int"/>
+					<xs:attribute name="package" use="required" type="xs:string"/>
+					<xs:attribute name="externalInfoUrl" use="required" type="xs:string"/>
+					<xs:attribute name="endline" use="required" type="xs:int"/>
+					<xs:attribute name="endcolumn" use="required" type="xs:int"/>
+					<xs:attribute name="class" use="required" type="xs:string"/>
+					<xs:attribute name="beginline" use="required" type="xs:int"/>
+					<xs:attribute name="begincolumn" use="required" type="xs:int"/>
+				</xs:extension>
+			</xs:simpleContent>
+		</xs:complexType>
+	</xs:element>
+	<xs:element name="pmd">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element ref="file" maxOccurs="unbounded"/>
+			</xs:sequence>
+			<xs:attribute name="version" use="required" type="xs:string"/>
+			<xs:attribute name="timestamp" use="required" type="xs:string"/>
+		</xs:complexType>
+	</xs:element>
+	<xs:element name="file">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element ref="violation" maxOccurs="unbounded"/>
+			</xs:sequence>
+			<xs:attribute name="name" use="required" type="xs:string"/>
+		</xs:complexType>
+	</xs:element>
+</xs:schema>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd-ant-task/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd-ant-task/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-cpd-ant-task/pom.xml
new file mode 100644
index 0000000..bb55333
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd-ant-task/pom.xml
@@ -0,0 +1,161 @@
+<!--
+
+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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-cpd-ant-task</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Adobe Flex CPD Ant task</name>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>pmd</groupId>
+            <artifactId>pmd</artifactId>
+            <version>${pmd.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <version>${project.parent.version}</version>
+            <artifactId>flex-pmd-cpd</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ant</groupId>
+            <artifactId>ant</artifactId>
+            <version>${ant.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <version>${project.version}</version>
+            <artifactId>flex-pmd-files</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>as3-plugin-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>as3-parser</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>as3-parser-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-test-resources</artifactId>
+            <version>${project.parent.version}</version>
+            <classifier>resources</classifier>
+            <type>zip</type>
+            <scope>provided</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <testResources>
+            <testResource>
+                <directory>${project.build.directory}/test/generated-resources</directory>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-test-resources</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeGroupIds>${project.groupId}</includeGroupIds>
+                            <includes>**/*.as,**/*.mxml</includes>
+                            <outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
+                            <excludeTransitive>true</excludeTransitive>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>${maven-antrun-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <id>package-ant-task</id>
+                        <phase>install</phase>
+                        <configuration>
+                            <tasks>
+                                <echo message="Building ant-task"/>
+                                <mkdir dir="${project.build.directory}/release"/>
+                                <echo message=""/>
+                                <echo message="Copying Flex PMD dependencies..."/>
+                                <copy file="${project.build.directory}/${project.build.finalName}.jar"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:flex-pmd-cpd:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${pmd:pmd:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <echo message="Copying Ant dependencies..."/>
+                                <copy file="${org.apache.flex.pmd:flex-pmd-files:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:as3-parser:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:as3-parser-api:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.ant:ant:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:as3-plugin-utils:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <echo message="Extracting license..."/>
+                                <copy file="../../src/etc/header.txt"
+                                      tofile="${project.build.directory}/release/LICENSE.txt" overwrite="true"/>
+                                <echo message="Compressing zip..."/>
+                                <zip destfile="${project.build.directory}/${project.build.finalName}.zip"
+                                     basedir="${project.build.directory}/release" excludes="*.zip"/>
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd-ant-task/src/main/java/com/adobe/ac/cpd/ant/FlexCpdAntTask.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd-ant-task/src/main/java/com/adobe/ac/cpd/ant/FlexCpdAntTask.java b/FlexPMD/flex-pmd-java/flex-pmd-cpd-ant-task/src/main/java/com/adobe/ac/cpd/ant/FlexCpdAntTask.java
new file mode 100644
index 0000000..1f1a438
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd-ant-task/src/main/java/com/adobe/ac/cpd/ant/FlexCpdAntTask.java
@@ -0,0 +1,173 @@
+/*
+ * 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.cpd.ant;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.sourceforge.pmd.cpd.CPD;
+import net.sourceforge.pmd.cpd.FileReporter;
+import net.sourceforge.pmd.cpd.Renderer;
+import net.sourceforge.pmd.cpd.ReportException;
+import net.sourceforge.pmd.cpd.XMLRenderer;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.FileSet;
+
+import com.adobe.ac.cpd.FlexLanguage;
+import com.adobe.ac.cpd.FlexTokenizer;
+import com.adobe.ac.pmd.LoggerUtils;
+
+public class FlexCpdAntTask extends Task
+{
+   private String                encoding          = System.getProperty( "file.encoding" );
+   private final List< FileSet > filesets          = new ArrayList< FileSet >();
+   private int                   minimumTokenCount = FlexTokenizer.DEFAULT_MINIMUM_TOKENS;
+   private File                  outputFile;
+
+   public void addFileset( final FileSet set )
+   {
+      filesets.add( set );
+   }
+
+   @Override
+   public void execute()
+   {
+      try
+      {
+         validateFields();
+         new LoggerUtils().loadConfiguration();
+
+         log( "Starting run, minimumTokenCount is "
+                    + minimumTokenCount,
+              Project.MSG_INFO );
+
+         log( "Tokenizing files",
+              Project.MSG_INFO );
+         final CPD cpd = new CPD( minimumTokenCount, new FlexLanguage() );
+         cpd.setEncoding( encoding );
+         tokenizeFiles( cpd );
+
+         log( "Starting to analyze code",
+              Project.MSG_INFO );
+         final long timeTaken = analyzeCode( cpd );
+         log( "Done analyzing code; that took "
+               + timeTaken + " milliseconds" );
+
+         log( "Generating report",
+              Project.MSG_INFO );
+         report( cpd );
+      }
+      catch ( final IOException ioe )
+      {
+         log( ioe.toString(),
+              Project.MSG_ERR );
+         throw new BuildException( "IOException during task execution", ioe );
+      }
+      catch ( final ReportException re )
+      {
+         log( re.toString(),
+              Project.MSG_ERR );
+         throw new BuildException( "ReportException during task execution", re );
+      }
+   }
+
+   public void setEncoding( final String encodingValue )
+   {
+      encoding = encodingValue;
+   }
+
+   public void setMinimumTokenCount( final int minimumTokenCountToBeSet )
+   {
+      minimumTokenCount = minimumTokenCountToBeSet;
+   }
+
+   public void setOutputFile( final File outputFileToBeSet )
+   {
+      outputFile = outputFileToBeSet;
+   }
+
+   private long analyzeCode( final CPD cpd )
+   {
+      final long start = System.currentTimeMillis();
+      cpd.go();
+      final long stop = System.currentTimeMillis();
+      return stop
+            - start;
+   }
+
+   private File getFile( final DirectoryScanner directoryScanner,
+                         final String includedFile )
+   {
+      final File file = new File( directoryScanner.getBasedir()
+            + System.getProperty( "file.separator" ) + includedFile );
+      log( "Tokenizing "
+                 + file.getAbsolutePath(),
+           Project.MSG_VERBOSE );
+      return file;
+   }
+
+   private void report( final CPD cpd ) throws ReportException
+   {
+      final Renderer renderer = new XMLRenderer( encoding );
+      FileReporter reporter;
+      if ( outputFile == null )
+      {
+         reporter = new FileReporter( encoding );
+      }
+      else if ( outputFile.isAbsolute() )
+      {
+         reporter = new FileReporter( outputFile, encoding );
+      }
+      else
+      {
+         reporter = new FileReporter( new File( getProject().getBaseDir(), outputFile.toString() ), encoding );
+      }
+      reporter.report( renderer.render( cpd.getMatches() ) );
+   }
+
+   private void tokenizeFiles( final CPD cpd ) throws IOException
+   {
+      for ( final FileSet fileSet : filesets )
+      {
+         final DirectoryScanner directoryScanner = fileSet.getDirectoryScanner( getProject() );
+         final String[] includedFiles = directoryScanner.getIncludedFiles();
+         for ( final String includedFile : includedFiles )
+         {
+            cpd.add( getFile( directoryScanner,
+                              includedFile ) );
+         }
+      }
+   }
+
+   private void validateFields()
+   {
+      if ( minimumTokenCount == 0 )
+      {
+         throw new BuildException( "minimumTokenCount is required and must be greater than zero" );
+      }
+      else if ( filesets.isEmpty() )
+      {
+         throw new BuildException( "Must include at least one FileSet" );
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-cpd-ant-task/src/test/java/com/adobe/ac/cpd/ant/FlexCpdAntTaskTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-cpd-ant-task/src/test/java/com/adobe/ac/cpd/ant/FlexCpdAntTaskTest.java b/FlexPMD/flex-pmd-java/flex-pmd-cpd-ant-task/src/test/java/com/adobe/ac/cpd/ant/FlexCpdAntTaskTest.java
new file mode 100644
index 0000000..c4aaf38
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-cpd-ant-task/src/test/java/com/adobe/ac/cpd/ant/FlexCpdAntTaskTest.java
@@ -0,0 +1,56 @@
+/*
+ * 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.cpd.ant;
+
+import java.io.File;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.FileSet;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+
+public class FlexCpdAntTaskTest extends FlexPmdTestBase
+{
+   @Test
+   public void testExecute()
+   {
+      final FlexCpdAntTask task = new FlexCpdAntTask();
+      final FileSet set = new FileSet();
+      final Project project = new Project();
+
+      set.setDir( getTestDirectory() );
+      task.setProject( project );
+      task.addFileset( set );
+      task.execute();
+   }
+
+   @Test
+   public void testParameter()
+   {
+      final FlexCpdAntTask task = new FlexCpdAntTask();
+      final String encodingValue = "encoding";
+      final String desc = "desc";
+      final int minimumTokenCountToBeSet = 10;
+      final File outputFile = null;
+
+      task.setDescription( desc );
+      task.setEncoding( encodingValue );
+      task.setOutputFile( outputFile );
+      task.setMinimumTokenCount( minimumTokenCountToBeSet );
+   }
+}


[19/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/.pmd b/FlexPMD/flex-pmd-java/flex-pmd-metrics/.pmd
new file mode 100644
index 0000000..b5adf0f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/.pmd
@@ -0,0 +1,975 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<pmd>
+    <useProjectRuleSet>false</useProjectRuleSet>
+    <ruleSetFile>.ruleset</ruleSetFile>
+    <rules>
+        <rule>
+            <name>LooseCoupling</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloneMethodMustImplementCloneable</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedImports</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SignatureDeclareThrowsException</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IfStmtsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>WhileLoopsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IfElseStmtsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ForLoopsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseSingleton</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanReturns</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanExpressions</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SwitchStmtsShouldHaveDefault</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDeeplyNestedIfStmts</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidReassigningParameters</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SwitchDensity</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConstructorCallsOverridableMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AccessorClassGeneration</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalFieldCouldBeStatic</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloseResource</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonStaticInitializer</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DefaultLabelNotLastInSwitchStmt</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonCaseLabelInSwitchStatement</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OptimizableToArrayCall</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BadComparison</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EqualsNull</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConfusingTernary</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InstantiationToGetClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IdempotentOperations</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimpleDateFormatNeedsLocale</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ImmutableField</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseLocaleWithCaseConversions</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidProtectedFieldInFinalClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AssignmentToNonFinalStatic</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingStaticMethodInNonInstantiatableClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidSynchronizedAtMethodLevel</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingBreakInSwitch</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseNotifyAllInsteadOfNotify</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidInstanceofChecksInCatchClause</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractClassWithoutAbstractMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyConditional</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CompareObjectsWithEquals</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PositionLiteralsFirstInComparisons</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryLocalBeforeReturn</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonThreadSafeSingleton</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UncommentedEmptyMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UncommentedEmptyConstructor</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidConstantsInterface</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnsynchronizedStaticDateFormatter</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PreserveStackTrace</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseCollectionIsEmpty</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassWithOnlyPrivateConstructorsShouldBeFinal</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyMethodInAbstractClassShouldBeAbstract</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SingularField</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReturnEmptyArrayRatherThanNull</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractClassWithoutAnyMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooFewBranchesForASwitchStatement</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCatchingThrowable</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SignatureDeclareThrowsException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExceptionAsFlowControl</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCatchingNPE</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingRawExceptionTypes</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingNullPointerException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidRethrowingException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotExtendJavaLangError</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotThrowExceptionInFinally</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingNewInstanceOfSameException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedPrivateField</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedLocalVariable</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedPrivateMethod</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedFormalParameter</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MoreThanOneLogger</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LoggerIsNotStaticFinal</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SystemPrintln</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidPrintStackTrace</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDuplicateLiterals</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringInstantiation</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringToString</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InefficientStringBuffering</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryCaseChange</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseStringBufferLength</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AppendCharacterWithChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConsecutiveLiteralAppends</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseIndexOfChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InefficientEmptyStringCheck</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InsufficientStringBufferDeclaration</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessStringValueOf</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringBufferInstantiationWithChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseEqualsToCompareStrings</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidStringBufferField</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceVectorWithList</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceHashtableWithMap</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceEnumerationWithIterator</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidEnumAsIdentifier</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidAssertAsIdentifier</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IntegerInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ByteInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LongInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseBeforeAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseAfterAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseTestAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4SuitesShouldUseSuiteAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitUseExpected</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseProperClassLoader</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MDBAndSessionBeanNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>RemoteSessionInterfaceNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalInterfaceSessionNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalHomeNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>RemoteInterfaceNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotCallSystemExit</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StaticEJBFieldShouldBeFinal</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotUseThreads</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalVariableCouldBeFinal</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodArgumentCouldBeFinal</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidInstantiatingObjectsInLoops</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseArrayListInsteadOfVector</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyStartsWith</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseStringBufferForStringAppends</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseArraysAsList</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidArrayLoops</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryWrapperObjectCreation</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AddEmptyString</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyCatchBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyIfStmt</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyWhileStmt</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyTryBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyFinallyBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptySwitchStatements</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JumbledIncrementer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ForLoopShouldBeWhileLoop</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryConversionTemporary</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OverrideBothEqualsAndHashcode</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoubleCheckedLocking</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReturnFromFinallyBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptySynchronizedBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryReturn</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyStaticInitializer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnconditionalIfStatement</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyStatementNotInLoop</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanInstantiation</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryFinalModifier</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CollapsibleIfStatements</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessOverridingMethod</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassCastExceptionWithToArray</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDecimalLiteralsInBigDecimalConstructor</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessOperationOnImmutable</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MisplacedNullCheck</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedNullCheckInEquals</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThreadGroup</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BrokenNullCheck</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BigIntegerInstantiation</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingOctalValues</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingHardCodedIP</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CheckResultSet</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidMultipleUnaryOperators</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyInitializer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodReturnsInternalArray</name>
+            <ruleset>Security Code Guidelines</ruleset>
+        </rule>
+        <rule>
+            <name>ArrayIsStoredDirectly</name>
+            <ruleset>Security Code Guidelines</ruleset>
+        </rule>
+        <rule>
+            <name>CouplingBetweenObjects</name>
+            <ruleset>Coupling Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveImports</name>
+            <ruleset>Coupling Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LooseCoupling</name>
+            <ruleset>Coupling Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DuplicateImports</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DontImportJavaLang</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedImports</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ImportFromSamePackage</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyStaticImports</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitStaticSuite</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitSpelling</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitAssertionsShouldIncludeMessage</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitTestsShouldIncludeAssert</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TestClassWithoutTestCases</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryBooleanAssertion</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertEqualsInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertSameInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertNullInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanAssertion</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NullAssignment</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OnlyOneReturn</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedModifier</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AssignmentInOperand</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AtLeastOneConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DontImportSun</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousOctalEscape</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CallSuperInConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryParentheses</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DefaultPackage</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanInversion</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DataflowAnomalyAnalysis</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFinalLocalVariable</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingShortType</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingVolatile</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingNativeCode</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidAccessibilityAlteration</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotCallGarbageCollectionExplicitly</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortVariable</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LongVariable</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>VariableNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractNaming</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDollarSigns</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodWithSameNameAsEnclosingClass</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousHashcodeMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousConstantFieldName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousEqualsMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFieldNameMatchingTypeName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFieldNameMatchingMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NoPackage</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PackageCase</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MisleadingVariableName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanGetMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NPathComplexity</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveMethodLength</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveParameterList</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveClassLength</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CyclomaticComplexity</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessivePublicCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyFields</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssMethodCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssTypeCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssConstructorCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyMethods</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyFinalizer</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeOnlyCallsSuperFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeOverloaded</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeDoesNotCallSuperFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeShouldBeProtected</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCallingFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseCorrectExceptionLogging</name>
+            <ruleset>Jakarta Commons Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ProperLogger</name>
+            <ruleset>Jakarta Commons Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BeanMembersShouldSerialize</name>
+            <ruleset>JavaBean Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingSerialVersionUID</name>
+            <ruleset>JavaBean Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ProperCloneImplementation</name>
+            <ruleset>Clone Implementation Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloneThrowsCloneNotSupportedException</name>
+            <ruleset>Clone Implementation Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloneMethodMustImplementCloneable</name>
+            <ruleset>Clone Implementation Rules</ruleset>
+        </rule>
+    </rules>
+    <includeDerivedFiles>false</includeDerivedFiles>
+    <violationsAsErrors>true</violationsAsErrors>
+</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-metrics/pom.xml
new file mode 100644
index 0000000..1998f76
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/pom.xml
@@ -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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-metrics</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Adobe Flex Metrics</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>as3-plugin-utils</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>flex-pmd-files</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>flex-pmd-ruleset-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>dom4j</groupId>
+            <artifactId>dom4j</artifactId>
+            <version>${dom4j.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-test-resources</artifactId>
+            <version>${project.parent.version}</version>
+            <classifier>resources</classifier>
+            <type>zip</type>
+            <scope>provided</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+
+        <testResources>
+            <testResource>
+                <directory>${project.build.directory}/test/generated-resources</directory>
+            </testResource>
+        </testResources>
+
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-test-resources</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeGroupIds>${project.groupId}</includeGroupIds>
+                            <includes>**/*.as,**/*.mxml</includes>
+                            <outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
+                            <excludeTransitive>true</excludeTransitive>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+
+    </build>
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AbstractNamedMetrics.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AbstractNamedMetrics.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AbstractNamedMetrics.java
new file mode 100644
index 0000000..da9e4b7
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AbstractNamedMetrics.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.metrics;
+
+public abstract class AbstractNamedMetrics extends AbstractPackagedMetrics
+{
+   private final String name;
+
+   protected AbstractNamedMetrics( final int nonCommentStatements,
+                                   final String nameToBeSet,
+                                   final String packageName,
+                                   final int ccn,
+                                   final int asDocs,
+                                   final int multiLineCommentsToBeSet )
+   {
+      super( nonCommentStatements, packageName, ccn, asDocs, multiLineCommentsToBeSet );
+      name = nameToBeSet;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AbstractPackagedMetrics.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AbstractPackagedMetrics.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AbstractPackagedMetrics.java
new file mode 100644
index 0000000..59a707d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AbstractPackagedMetrics.java
@@ -0,0 +1,89 @@
+/*
+ * 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.metrics;
+
+import java.text.MessageFormat;
+
+public abstract class AbstractPackagedMetrics implements IMetrics
+{
+   private final int    asDocs;
+   private final int    ccn;
+   private final int    multiLineComments;
+   private final int    nonCommentStatements;
+   private final String packageName;
+
+   protected AbstractPackagedMetrics( final int nonCommentStatementsToBeSet,
+                                      final String packageNameToBeSet,
+                                      final int ccnToBeSet,
+                                      final int asDocsToBeSet,
+                                      final int multiLineCommentsToBeSet )
+   {
+      super();
+      nonCommentStatements = nonCommentStatementsToBeSet;
+      packageName = packageNameToBeSet;
+      ccn = ccnToBeSet;
+      asDocs = asDocsToBeSet;
+      multiLineComments = multiLineCommentsToBeSet;
+   }
+
+   public int getAsDocs()
+   {
+      return asDocs;
+   }
+
+   public abstract String getFullName();
+
+   public abstract String getMetricsName();
+
+   public int getMultiLineComments()
+   {
+      return multiLineComments;
+   }
+
+   public int getNonCommentStatements()
+   {
+      return getNcss()
+            + nonCommentStatements;
+   }
+
+   public String getPackageName()
+   {
+      return packageName;
+   }
+
+   public String toXmlString()
+   {
+      return new StringBuffer().append( MessageFormat.format( "<{0}><name>{1}</name><ccn>{2}</ccn><ncss>{3}</ncss>"
+                                                                    + "<javadocs>{4}</javadocs>"
+                                                                    + "<javadoc_lines>{4}</javadoc_lines>"
+                                                                    + "<multi_comment_lines>{5}</multi_comment_lines>"
+                                                                    + "<single_comment_lines>0</single_comment_lines>"
+                                                                    + "{6}</{7}>",
+                                                              getMetricsName(),
+                                                              getFullName().equals( "" ) ? "."
+                                                                                        : getFullName(),
+                                                              String.valueOf( ccn ),
+                                                              String.valueOf( getNonCommentStatements() ),
+                                                              String.valueOf( asDocs ),
+                                                              String.valueOf( multiLineComments ),
+                                                              getContreteXml(),
+                                                              getMetricsName() ) )
+                               .toString();
+   }
+
+   protected abstract int getNcss();
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AverageClassMetrics.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AverageClassMetrics.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AverageClassMetrics.java
new file mode 100644
index 0000000..b0f0daf
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AverageClassMetrics.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.metrics;
+
+import java.util.List;
+
+public final class AverageClassMetrics extends AverageMetricsBase
+{
+   public static AverageClassMetrics create( final List< ClassMetrics > classMetrics,
+                                             final TotalPackageMetrics totalPackageMetrics )
+   {
+      int functions = 0;
+
+      for ( final ClassMetrics metrics : classMetrics )
+      {
+         functions += metrics.getFunctions();
+      }
+      return new AverageClassMetrics( totalPackageMetrics.getTotalStatements(),
+                                      functions,
+                                      totalPackageMetrics.getTotalAsDocs(),
+                                      totalPackageMetrics.getTotalMultiLineComment(),
+                                      classMetrics.size() );
+   }
+
+   private final double averageFunctions;
+
+   private AverageClassMetrics( final double nonCommentStatements,
+                                final double functions,
+                                final double asDocs,
+                                final double multipleComments,
+                                final double totalClassNumber )
+   {
+      super( totalClassNumber, asDocs, nonCommentStatements, multipleComments );
+      averageFunctions = totalClassNumber > 0 ? functions
+                                                   / totalClassNumber
+                                             : 0;
+   }
+
+   public double getAverageFunctions()
+   {
+      return averageFunctions;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AverageFunctionMetrics.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AverageFunctionMetrics.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AverageFunctionMetrics.java
new file mode 100644
index 0000000..5d3fe5d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AverageFunctionMetrics.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.metrics;
+
+import java.util.List;
+
+public final class AverageFunctionMetrics extends AverageMetricsBase
+{
+   public static AverageFunctionMetrics create( final List< FunctionMetrics > functionMetrics,
+                                                final TotalPackageMetrics totalPackageMetrics )
+   {
+      return new AverageFunctionMetrics( totalPackageMetrics.getTotalStatements(),
+                                         totalPackageMetrics.getTotalAsDocs(),
+                                         totalPackageMetrics.getTotalMultiLineComment(),
+                                         functionMetrics.size() );
+   }
+
+   private AverageFunctionMetrics( final double nonCommentStatements,
+                                   final double asDocs,
+                                   final double multipleComments,
+                                   final double totalFunctions )
+   {
+      super( totalFunctions, asDocs, nonCommentStatements, multipleComments );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AverageMetricsBase.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AverageMetricsBase.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AverageMetricsBase.java
new file mode 100644
index 0000000..13b7fc9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/AverageMetricsBase.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.metrics;
+
+public class AverageMetricsBase
+{
+   private final double averageDocs;
+   private final double averageMultipleComments;
+   private final double averageStatements;
+
+   protected AverageMetricsBase( final double total,
+                                 final double asDocs,
+                                 final double totalStatements,
+                                 final double mutlipleComments )
+   {
+      super();
+      this.averageStatements = totalStatements
+            / total;
+      this.averageDocs = asDocs
+            / total;
+      this.averageMultipleComments = mutlipleComments
+            / total;
+   }
+
+   public double getAverageDocs()
+   {
+      return averageDocs;
+   }
+
+   public double getAverageMultipleComments()
+   {
+      return averageMultipleComments;
+   }
+
+   public double getAverageStatements()
+   {
+      return averageStatements;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/ClassMetrics.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/ClassMetrics.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/ClassMetrics.java
new file mode 100644
index 0000000..639579a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/ClassMetrics.java
@@ -0,0 +1,128 @@
+/*
+ * 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.metrics;
+
+import java.io.File;
+
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.nodes.IClass;
+
+public final class ClassMetrics extends AbstractNamedMetrics
+{
+   public static ClassMetrics create( final String packageFullName,
+                                      final File fileInPackage,
+                                      final InternalFunctionMetrics functionMetrics,
+                                      final IClass classNode,
+                                      final IFlexFile file,
+                                      final double mxmlFactor )
+   {
+      final int average = classNode == null ? 0
+                                           : ( int ) Math.round( classNode.getAverageCyclomaticComplexity() );
+      final int asDocs = ( classNode == null
+            || classNode.getAsDoc() == null ? 0
+                                           : MetricUtils.computeNbOfLines( classNode.getAsDoc()
+                                                                                    .getStringValue() ) )
+            + ( functionMetrics == null ? 0
+                                       : functionMetrics.getAsDocsInClass() );
+      final int multiLineComments = ( classNode == null ? 0
+                                                       : MetricUtils.computeMultiLineComments( classNode ) )
+            + ( functionMetrics == null ? 0
+                                       : functionMetrics.getMultipleLineCommentInClass() );
+      final int nonCommentStatements = computeStatements( functionMetrics,
+                                                          file,
+                                                          mxmlFactor );
+      return new ClassMetrics( nonCommentStatements, // NOPMD
+                               classNode == null ? 0
+                                                : classNode.getFunctions().size(),
+                               fileInPackage.getName().replace( ".as",
+                                                                "" ).replace( ".mxml",
+                                                                              "" ),
+                               packageFullName,
+                               average,
+                               asDocs,
+                               multiLineComments,
+                               classNode );
+   }
+
+   private static int computeStatements( final InternalFunctionMetrics functionMetrics,
+                                         final IFlexFile file,
+                                         final double mxmlFactor )
+   {
+      int stts = functionMetrics == null ? 0
+                                        : functionMetrics.getNcssInClass();
+      if ( file.isMxml() )
+      {
+         stts += file.getLinesNb()
+               * mxmlFactor;
+      }
+      return stts;
+   }
+
+   private final IClass classNode;
+   private final int    functions;
+
+   private ClassMetrics( final int nonCommentStatements,
+                         final int functionsToBeSet,
+                         final String name,
+                         final String packageName,
+                         final int ccn,
+                         final int asDocs,
+                         final int multiLineCommentsToBeSet,
+                         final IClass classNodeToBeSet )
+   {
+      super( nonCommentStatements, name, packageName, ccn, asDocs, multiLineCommentsToBeSet );
+
+      functions = functionsToBeSet;
+      this.classNode = classNodeToBeSet;
+   }
+
+   public String getContreteXml()
+   {
+      return "<functions>"
+            + functions + "</functions>";
+   }
+
+   @Override
+   public String getFullName()
+   {
+      return getPackageName().compareTo( "" ) == 0 ? getName()
+                                                  : getPackageName()
+                                                        + "." + getName();
+   }
+
+   public int getFunctions()
+   {
+      return functions;
+   }
+
+   @Override
+   public String getMetricsName()
+   {
+      return "object";
+   }
+
+   @Override
+   protected int getNcss()
+   {
+      if ( classNode == null )
+      {
+         return 1;
+      }
+      return 1
+            + classNode.getAttributes().size() + classNode.getConstants().size() + functions;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/FunctionMetrics.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/FunctionMetrics.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/FunctionMetrics.java
new file mode 100644
index 0000000..4a4cad9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/FunctionMetrics.java
@@ -0,0 +1,74 @@
+/*
+ * 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.metrics;
+
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+
+public final class FunctionMetrics extends AbstractNamedMetrics
+{
+   static FunctionMetrics create( final String packageFullName,
+                                  final IClass classNode,
+                                  final IFunction function,
+                                  final int asDocs,
+                                  final int multipleDoc )
+   {
+      return new FunctionMetrics( function.getStatementNbInBody(), // NOPMD
+                                  function.getName(),
+                                  packageFullName.compareTo( "" ) == 0 ? classNode.getName()
+                                                                      : packageFullName
+                                                                            + "." + classNode.getName(),
+                                  function.getCyclomaticComplexity(),
+                                  asDocs,
+                                  multipleDoc );
+   }
+
+   private FunctionMetrics( final int nonCommentStatements,
+                            final String name,
+                            final String packageName,
+                            final int ccn,
+                            final int asDocs,
+                            final int multiLineCommentsToBeSet )
+   {
+      super( nonCommentStatements, name, packageName, ccn, asDocs, multiLineCommentsToBeSet );
+   }
+
+   public String getContreteXml()
+   {
+      return "";
+   }
+
+   @Override
+   public String getFullName()
+   {
+      return getPackageName().compareTo( "" ) == 0 ? getName()
+                                                  : getPackageName()
+                                                        + "::" + getName();
+   }
+
+   @Override
+   public String getMetricsName()
+   {
+      return "function";
+   }
+
+   @Override
+   protected int getNcss()
+   {
+      return 1;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/IMetrics.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/IMetrics.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/IMetrics.java
new file mode 100644
index 0000000..7c7f814
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/IMetrics.java
@@ -0,0 +1,22 @@
+/*
+ * 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.metrics;
+
+public interface IMetrics
+{
+   String getContreteXml();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/InternalFunctionMetrics.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/InternalFunctionMetrics.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/InternalFunctionMetrics.java
new file mode 100644
index 0000000..974837d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/InternalFunctionMetrics.java
@@ -0,0 +1,85 @@
+/*
+ * 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.metrics;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+
+public final class InternalFunctionMetrics
+{
+   public static InternalFunctionMetrics create( final ProjectMetrics metrics,
+                                                 final String packageFullName,
+                                                 final IClass classNode )
+   {
+      int ncssInClass = 0;
+      int asDocsInClass = 0;
+      int multipleLineCommentInClass = 0;
+
+      for ( final IFunction function : classNode.getFunctions() )
+      {
+         final int multipleDoc = MetricUtils.computeMultiLineComments( function );
+         final int asDocs = MetricUtils.computeAsDocs( function );
+
+         ncssInClass += function.getStatementNbInBody();
+         multipleLineCommentInClass += multipleDoc;
+
+         asDocsInClass += asDocs;
+
+         metrics.getFunctionMetrics().add( FunctionMetrics.create( packageFullName,
+                                                                   classNode,
+                                                                   function,
+                                                                   asDocs,
+                                                                   multipleDoc ) );
+      }
+
+      for ( final IAttribute attribute : classNode.getAttributes() )
+      {
+         asDocsInClass += MetricUtils.computeAsDocs( attribute );
+      }
+
+      return new InternalFunctionMetrics( ncssInClass, asDocsInClass, multipleLineCommentInClass );
+   }
+
+   private final int asDocsInClass;
+   private final int multipleLineCommentInClass;
+   private final int ncssInClass;
+
+   private InternalFunctionMetrics( final int ncssInClassToBeSet,
+                                    final int asDocsInClassToBeSet,
+                                    final int multipleLineCommentInClassToBeSet )
+   {
+      ncssInClass = ncssInClassToBeSet;
+      asDocsInClass = asDocsInClassToBeSet;
+      multipleLineCommentInClass = multipleLineCommentInClassToBeSet;
+   }
+
+   public int getAsDocsInClass()
+   {
+      return asDocsInClass;
+   }
+
+   public int getMultipleLineCommentInClass()
+   {
+      return multipleLineCommentInClass;
+   }
+
+   public int getNcssInClass()
+   {
+      return ncssInClass;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/MetricUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/MetricUtils.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/MetricUtils.java
new file mode 100644
index 0000000..8dc8fe2
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/MetricUtils.java
@@ -0,0 +1,70 @@
+/*
+ * 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.metrics;
+
+import java.io.File;
+
+import com.adobe.ac.pmd.nodes.IAsDocHolder;
+import com.adobe.ac.pmd.nodes.ICommentHolder;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+public final class MetricUtils
+{
+   public static int computeAsDocs( final IAsDocHolder attribute )
+   {
+      return attribute.getAsDoc() == null ? 0
+                                         : computeNbOfLines( attribute.getAsDoc().getStringValue() );
+   }
+
+   public static int computeMultiLineComments( final ICommentHolder commentHolder )
+   {
+      int lines = 0;
+
+      for ( final IParserNode comment : commentHolder.getMultiLinesComment() )
+      {
+         lines += comment.getStringValue() == null ? 0
+                                                  : MetricUtils.computeNbOfLines( comment.getStringValue() );
+      }
+      return lines;
+   }
+
+   public static int computeNbOfLines( final String lines )
+   {
+      return lines.split( "\\n" ).length;
+   }
+
+   public static String getQualifiedName( final File sourceDirectory,
+                                          final File file )
+   {
+      final String qualifiedName = file.getAbsolutePath().replace( sourceDirectory.getAbsolutePath(),
+                                                                   "" ).replace( "/",
+                                                                                 "." ).replace( "\\",
+                                                                                                "." ).trim();
+
+      if ( qualifiedName.length() > 0
+            && qualifiedName.charAt( 0 ) == '.' )
+      {
+         return qualifiedName.substring( 1 );
+      }
+
+      return qualifiedName;
+   }
+
+   private MetricUtils()
+   {
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/PackageMetrics.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/PackageMetrics.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/PackageMetrics.java
new file mode 100644
index 0000000..1757c1f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/PackageMetrics.java
@@ -0,0 +1,95 @@
+/*
+ * 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.metrics;
+
+import java.io.File;
+import java.text.MessageFormat;
+import java.util.Collection;
+
+public final class PackageMetrics extends AbstractPackagedMetrics
+{
+   public static PackageMetrics create( final Collection< File > classesInPackage,
+                                        final String packageFullName,
+                                        final int functionsInPackage,
+                                        final int ncssInPackage,
+                                        final int asDocsInPackage,
+                                        final int multipleLineCommentInPackage,
+                                        final int imports )
+   {
+      return new PackageMetrics( ncssInPackage,// NOPMD
+                                 functionsInPackage,
+                                 classesInPackage.size(),
+                                 packageFullName,
+                                 asDocsInPackage,
+                                 multipleLineCommentInPackage,
+                                 imports );
+   }
+
+   private final int classes;
+   private final int functions;
+   private final int imports;
+
+   private PackageMetrics( final int nonCommentStatements,
+                           final int functionsToBeSet,
+                           final int classesToBeSet,
+                           final String packageName,
+                           final int asDocs,
+                           final int multiLineComments,
+                           final int importsToBeSet )
+   {
+      super( nonCommentStatements, packageName, 0, asDocs, multiLineComments );
+      functions = functionsToBeSet;
+      classes = classesToBeSet;
+      imports = importsToBeSet;
+   }
+
+   public int getClasses()
+   {
+      return classes;
+   }
+
+   public String getContreteXml()
+   {
+      return new StringBuffer().append( MessageFormat.format( "<functions>{0}</functions>"
+                                                                    + "<classes>{1}</classes>",
+                                                              String.valueOf( functions ),
+                                                              String.valueOf( classes ) ) ).toString();
+   }
+
+   @Override
+   public String getFullName()
+   {
+      return getPackageName();
+   }
+
+   public int getFunctions()
+   {
+      return functions;
+   }
+
+   @Override
+   public String getMetricsName()
+   {
+      return "package";
+   }
+
+   @Override
+   protected int getNcss()
+   {
+      return imports + 1;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/ProjectMetrics.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/ProjectMetrics.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/ProjectMetrics.java
new file mode 100644
index 0000000..800587d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/ProjectMetrics.java
@@ -0,0 +1,118 @@
+/*
+ * 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.metrics;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+
+public final class ProjectMetrics
+{
+   private AverageFunctionMetrics        averageFunctions;
+   private AverageClassMetrics           averageObjects;
+   private final List< ClassMetrics >    classMetrics;
+   private final String                  date;
+   private final List< FunctionMetrics > functionMetrics;
+   private final List< PackageMetrics >  packageMetrics;
+   private final String                  time;
+   private TotalPackageMetrics           totalPackages;
+
+   public ProjectMetrics()
+   {
+      super();
+
+      final Date now = new Date();
+
+      date = new SimpleDateFormat( "yyyy-M-d", Locale.US ).format( now );
+      time = new SimpleDateFormat( "k:m:s", Locale.US ).format( now );
+      classMetrics = new ArrayList< ClassMetrics >();
+      functionMetrics = new ArrayList< FunctionMetrics >();
+      packageMetrics = new ArrayList< PackageMetrics >();
+   }
+
+   public AverageFunctionMetrics getAverageFunctions()
+   {
+      return averageFunctions;
+   }
+
+   public AverageClassMetrics getAverageObjects()
+   {
+      return averageObjects;
+   }
+
+   public List< ClassMetrics > getClasses()
+   {
+      return classMetrics;
+   }
+
+   public List< ClassMetrics > getClassMetrics()
+   {
+      return classMetrics;
+   }
+
+   public String getDate()
+   {
+      return date;
+   }
+
+   public List< FunctionMetrics > getFunctionMetrics()
+   {
+      return functionMetrics;
+   }
+
+   public List< FunctionMetrics > getFunctions()
+   {
+      return functionMetrics;
+   }
+
+   public List< PackageMetrics > getPackageMetrics()
+   {
+      return packageMetrics;
+   }
+
+   public List< PackageMetrics > getPackages()
+   {
+      return packageMetrics;
+   }
+
+   public String getTime()
+   {
+      return time;
+   }
+
+   public TotalPackageMetrics getTotalPackages()
+   {
+      return totalPackages;
+   }
+
+   public void setAverageFunctions( final AverageFunctionMetrics averageFunctionsToBeSet )
+   {
+      averageFunctions = averageFunctionsToBeSet;
+   }
+
+   public void setAverageObjects( final AverageClassMetrics averageObjectsToBeSet )
+   {
+      averageObjects = averageObjectsToBeSet;
+   }
+
+   public void setTotalPackages( final TotalPackageMetrics totalPackagesToBeSet )
+   {
+      totalPackages = totalPackagesToBeSet;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/TotalPackageMetrics.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/TotalPackageMetrics.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/TotalPackageMetrics.java
new file mode 100644
index 0000000..19630a9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics/src/main/java/com/adobe/ac/pmd/metrics/TotalPackageMetrics.java
@@ -0,0 +1,107 @@
+/*
+ * 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.metrics;
+
+import java.text.MessageFormat;
+import java.util.List;
+
+public final class TotalPackageMetrics implements IMetrics
+{
+   public static TotalPackageMetrics create( final List< PackageMetrics > packageMetrics )
+   {
+      int nonCommentStatement = 0;
+      int functions = 0;
+      int classes = 0;
+      int asDocs = 0;
+      int multipleLineComments = 0;
+
+      for ( final PackageMetrics metrics : packageMetrics )
+      {
+         nonCommentStatement += metrics.getNonCommentStatements();
+         functions += metrics.getFunctions();
+         classes += metrics.getClasses();
+         asDocs += metrics.getAsDocs();
+         multipleLineComments += metrics.getMultiLineComments();
+      }
+      return new TotalPackageMetrics( nonCommentStatement, functions, classes, asDocs, multipleLineComments );
+   }
+
+   private final int totalAsDocs;
+   private final int totalClasses;
+   private final int totalFunctions;
+   private final int totalMultiLineComment;
+   private final int totalStatements;
+
+   private TotalPackageMetrics( final int totalStatementsToBeSet,
+                                final int totalFunctionsToBeSet,
+                                final int totalClassesToBeSet,
+                                final int totalAsDocsToBeSet,
+                                final int totalMultiLineCommentToBeSet )
+   {
+      super();
+
+      totalStatements = totalStatementsToBeSet;
+      totalFunctions = totalFunctionsToBeSet;
+      totalClasses = totalClassesToBeSet;
+      totalAsDocs = totalAsDocsToBeSet;
+      totalMultiLineComment = totalMultiLineCommentToBeSet;
+   }
+
+   public String getContreteXml()
+   {
+      return new StringBuffer().append( MessageFormat.format( "<total>"
+                                                                    + "<classes>{0}</classes>"
+                                                                    + "<functions>{1}</functions>"
+                                                                    + "<ncss>{2}</ncss>"
+                                                                    + "<javadocs>{3}</javadocs>"
+                                                                    + "<javadoc_lines>{3}</javadoc_lines>"
+                                                                    + "<single_comment_lines>0</single_comment_lines>"
+                                                                    + "<multi_comment_lines>{4}</multi_comment_lines>"
+                                                                    + "</total>",
+                                                              String.valueOf( totalClasses ),
+                                                              String.valueOf( totalFunctions ),
+                                                              String.valueOf( totalStatements ),
+                                                              String.valueOf( totalAsDocs ),
+                                                              String.valueOf( totalMultiLineComment ) ) )
+                               .toString();
+   }
+
+   public int getTotalAsDocs()
+   {
+      return totalAsDocs;
+   }
+
+   public int getTotalClasses()
+   {
+      return totalClasses;
+   }
+
+   public int getTotalFunctions()
+   {
+      return totalFunctions;
+   }
+
+   public int getTotalMultiLineComment()
+   {
+      return totalMultiLineComment;
+   }
+
+   public int getTotalStatements()
+   {
+      return totalStatements;
+   }
+}


[26/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/FlexPmdViolations.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/FlexPmdViolations.java b/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/FlexPmdViolations.java
new file mode 100644
index 0000000..607610d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/FlexPmdViolations.java
@@ -0,0 +1,244 @@
+/*
+ * 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;
+
+import java.io.File;
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import net.sourceforge.pmd.PMDException;
+import net.sourceforge.pmd.Rule;
+import net.sourceforge.pmd.RuleReference;
+import net.sourceforge.pmd.RuleSet;
+
+import com.adobe.ac.pmd.files.FileSetUtils;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.files.impl.FileUtils;
+import com.adobe.ac.pmd.nodes.IPackage;
+import com.adobe.ac.pmd.rules.core.IFlexAstRule;
+import com.adobe.ac.pmd.rules.core.IFlexRule;
+import com.adobe.ac.utils.StackTraceUtils;
+
+public class FlexPmdViolations implements Serializable
+{
+   private static final Logger                            LOGGER;
+
+   /**
+    * 
+    */
+   private static final long                              serialVersionUID = -3683680443330143504L;
+
+   static
+   {
+      LOGGER = Logger.getLogger( FlexPmdViolations.class.getName() );
+   }
+
+   private Map< String, IPackage >                        asts;
+   private Map< String, IFlexFile >                       files;
+   private boolean                                        hasBeenComputed;
+   private final Map< String, IFlexRule >                 rules;
+   private final Map< IFlexRule, Long >                   ruleSpeeds;
+   private final Map< IFlexFile, List< IFlexViolation > > violations;
+
+   public FlexPmdViolations()
+   {
+      violations = new LinkedHashMap< IFlexFile, List< IFlexViolation > >();
+      rules = new LinkedHashMap< String, IFlexRule >();
+      ruleSpeeds = new LinkedHashMap< IFlexRule, Long >();
+      hasBeenComputed = false;
+   }
+
+   public final void computeViolations( final File source,
+                                        final List< File > sourceList,
+                                        final RuleSet ruleSet,
+                                        final String packageToExclude ) throws PMDException
+   {
+      hasBeenComputed = true;
+
+      if ( ruleSet != null )
+      {
+         computeRules( ruleSet );
+         computeFiles( source,
+                       sourceList,
+                       packageToExclude,
+                       ruleSet.getExcludePatterns() );
+         computeAsts();
+         processRules();
+         sortViolations();
+      }
+   }
+
+   public final Map< IFlexFile, List< IFlexViolation >> getViolations()
+   {
+      return violations;
+   }
+
+   public final boolean hasViolationsBeenComputed()
+   {
+      return hasBeenComputed;
+   }
+
+   private void computeAsts() throws PMDException
+   {
+      LOGGER.info( "computing Asts" );
+
+      final long startTime = System.currentTimeMillis();
+      asts = FileSetUtils.computeAsts( files );
+
+      LOGGER.info( "computed Asts in "
+            + ( System.currentTimeMillis() - startTime ) + " ms" );
+   }
+
+   private void computeFiles( final File source,
+                              final List< File > sourceList,
+                              final String packageToExclude,
+                              final List< String > excludePatterns ) throws PMDException
+   {
+      LOGGER.info( "computing FilesList" );
+
+      final long startTime = System.currentTimeMillis();
+
+      files = FileUtils.computeFilesList( source,
+                                          sourceList,
+                                          packageToExclude,
+                                          excludePatterns );
+      LOGGER.info( "computed FilesList in "
+            + ( System.currentTimeMillis() - startTime ) + " ms" );
+   }
+
+   private void computeRules( final RuleSet ruleSet )
+   {
+      LOGGER.info( "computing RulesList" );
+
+      final long startTime = System.currentTimeMillis();
+      Set< String > excludes = new HashSet< String >( ruleSet.getExcludePatterns() );
+
+      for ( Rule rule : ruleSet.getRules() )
+      {
+         while ( rule instanceof RuleReference )
+         {
+            excludes = ( ( RuleReference ) rule ).getRuleSetReference().getExcludes();
+            rule = ( ( RuleReference ) rule ).getRule();
+         }
+         final IFlexRule flexRule = ( IFlexRule ) rule;
+
+         if ( excludes != null
+               && !excludes.isEmpty() )
+         {
+            flexRule.setExcludes( excludes );
+         }
+         rules.put( flexRule.getRuleName(),
+                    flexRule );
+      }
+
+      LOGGER.info( "computed RulesList in "
+            + ( System.currentTimeMillis() - startTime ) + " ms" );
+   }
+
+   private void processFile( final IFlexRule currentRule,
+                             final IFlexFile currentFile )
+   {
+      try
+      {
+         final String fullyQualifiedName = currentFile.getFullyQualifiedName();
+         final IPackage ast = currentRule instanceof IFlexAstRule ? asts.get( fullyQualifiedName )
+                                                                 : null;
+         final List< IFlexViolation > foundViolations = currentRule.processFile( currentFile,
+                                                                                 ast,
+                                                                                 files );
+
+         if ( !foundViolations.isEmpty() )
+         {
+            if ( violations.containsKey( currentFile ) )
+            {
+               violations.get( currentFile ).addAll( foundViolations );
+            }
+            else
+            {
+               violations.put( currentFile,
+                               foundViolations );
+            }
+         }
+      }
+      catch ( final Exception e )
+      {
+         LOGGER.warning( StackTraceUtils.print( currentFile.getFullyQualifiedName(),
+                                                e ) );
+      }
+   }
+
+   private void processRule( final IFlexRule currentRule )
+   {
+      LOGGER.fine( "Processing "
+            + currentRule.getRuleName() + "..." );
+
+      for ( final Entry< String, IFlexFile > currentFileEntry : files.entrySet() )
+      {
+         processFile( currentRule,
+                      currentFileEntry.getValue() );
+      }
+   }
+
+   private void processRule( final String currentRuleName,
+                             final IFlexRule currentRule )
+   {
+      final long startTime = System.currentTimeMillis();
+
+      processRule( currentRule );
+      final long ellapsedTime = System.currentTimeMillis()
+            - startTime;
+
+      if ( LOGGER.isLoggable( Level.FINE ) )
+      {
+         LOGGER.fine( "rule "
+               + currentRuleName + " computed in " + ellapsedTime + "ms" );
+      }
+      if ( LOGGER.isLoggable( Level.FINER ) )
+      {
+         ruleSpeeds.put( currentRule,
+                         ellapsedTime );
+      }
+   }
+
+   private void processRules()
+   {
+      for ( final Entry< String, IFlexRule > currentRuleEntry : rules.entrySet() )
+      {
+         processRule( currentRuleEntry.getKey(),
+                      currentRuleEntry.getValue() );
+      }
+   }
+
+   private void sortViolations()
+   {
+      for ( final Entry< String, IFlexFile > entry : files.entrySet() )
+      {
+         if ( violations.containsKey( entry.getValue() ) )
+         {
+            Collections.sort( violations.get( entry.getValue() ) );
+         }
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/AbstractFlexPmdEngine.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/AbstractFlexPmdEngine.java b/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/AbstractFlexPmdEngine.java
new file mode 100644
index 0000000..be8f747
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/AbstractFlexPmdEngine.java
@@ -0,0 +1,199 @@
+/*
+ * 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.engines;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URISyntaxException;
+import java.util.List;
+import java.util.logging.Logger;
+
+import net.sourceforge.pmd.PMDException;
+import net.sourceforge.pmd.RuleSet;
+import net.sourceforge.pmd.RuleSetFactory;
+
+import org.apache.commons.lang.StringUtils;
+import org.codehaus.plexus.util.IOUtil;
+
+import com.adobe.ac.pmd.FlexPmdParameters;
+import com.adobe.ac.pmd.FlexPmdViolations;
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.utils.StackTraceUtils;
+
+public abstract class AbstractFlexPmdEngine
+{
+   private static final Logger LOGGER = Logger.getLogger( AbstractFlexPmdEngine.class.getName() );
+
+   private static int computeViolationNumber( final FlexPmdViolations flexPmdViolations )
+   {
+      int foundViolations = 0;
+      for ( final List< IFlexViolation > violations : flexPmdViolations.getViolations().values() )
+      {
+         foundViolations += violations.size();
+      }
+      LOGGER.info( "Violations number found: "
+            + foundViolations );
+      return foundViolations;
+   }
+
+   private static File extractDefaultRuleSet() throws URISyntaxException,
+                                              IOException
+   {
+      final String rulesetURI = "/com/adobe/ac/pmd/default_flex.xml";
+      final InputStream resourceAsStream = AbstractFlexPmdEngine.class.getResourceAsStream( rulesetURI );
+      final File temporaryRuleset = File.createTempFile( "default_flex",
+                                                         ".xml" );
+      temporaryRuleset.deleteOnExit();
+      final FileOutputStream writter = new FileOutputStream( temporaryRuleset );
+      IOUtil.copy( resourceAsStream,
+                   writter );
+
+      resourceAsStream.close();
+      return temporaryRuleset;
+   }
+
+   private final File         outputDirectory;
+   private final String       packageToExclude;
+   private RuleSet            ruleSet;
+   private final File         source;
+   private final List< File > sourceList;
+
+   public AbstractFlexPmdEngine( final FlexPmdParameters parameters )
+   {
+      super();
+
+      source = parameters.getSource();
+      sourceList = parameters.getSourceList();
+      outputDirectory = parameters.getOutputDirectory();
+      packageToExclude = parameters.getExcludePackage();
+      try
+      {
+         ruleSet = loadRuleset( parameters.getRuleSet() );
+      }
+      catch ( final URISyntaxException e )
+      {
+         LOGGER.warning( StackTraceUtils.print( e ) );
+      }
+      catch ( final IOException e )
+      {
+         LOGGER.warning( StackTraceUtils.print( e ) );
+      }
+   }
+
+   /**
+    * @param flexPmdViolations
+    * @return The number of violations with the given ruleset and the result
+    *         wrapper in case of reuse
+    * @throws PMDException
+    * @throws URISyntaxException
+    * @throws IOException
+    */
+   public final void executeReport( final FlexPmdViolations flexPmdViolations ) throws PMDException
+   {
+      if ( source == null
+            && sourceList == null )
+      {
+         throw new PMDException( "unspecified sourceDirectory" );
+      }
+      if ( outputDirectory == null )
+      {
+         throw new PMDException( "unspecified outputDirectory" );
+      }
+
+      if ( ruleSet != null )
+      {
+         if ( !flexPmdViolations.hasViolationsBeenComputed() )
+         {
+            computeViolations( flexPmdViolations );
+         }
+         computeViolationNumber( flexPmdViolations );
+         writeAnyReport( flexPmdViolations );
+      }
+   }
+
+   public final RuleSet getRuleSet()
+   {
+      return ruleSet;
+   }
+
+   protected File getOutputDirectory()
+   {
+      return outputDirectory;
+   }
+
+   protected abstract void writeReport( final FlexPmdViolations pmd ) throws PMDException;
+
+   private void computeViolations( final FlexPmdViolations flexPmdViolations ) throws PMDException
+   {
+      final long startTime = System.currentTimeMillis();
+
+      flexPmdViolations.computeViolations( source,
+                                           sourceList,
+                                           ruleSet,
+                                           packageToExclude );
+      final long ellapsedTime = System.currentTimeMillis()
+            - startTime;
+      LOGGER.info( "It took "
+            + ellapsedTime + "ms to compute violations" );
+   }
+
+   private File extractRuleset( final File ruleSetFile ) throws URISyntaxException,
+                                                        IOException
+   {
+      return ruleSetFile == null ? extractDefaultRuleSet()
+                                : ruleSetFile;
+   }
+
+   private String getReportType()
+   {
+      return StringUtils.substringBefore( StringUtils.substringAfter( getClass().getName(),
+                                                                      "FlexPmd" ),
+                                          "Engine" );
+   }
+
+   private RuleSet loadRuleset( final File ruleSetFile ) throws URISyntaxException,
+                                                        IOException
+   {
+      final File realRuleSet = extractRuleset( ruleSetFile );
+      final FileInputStream inputStream = new FileInputStream( realRuleSet );
+      final RuleSet loadedRuleSet = new RuleSetFactory().createRuleSet( inputStream );
+
+      LOGGER.info( "Ruleset: "
+            + realRuleSet.getAbsolutePath() );
+      LOGGER.info( "Rules number in the ruleSet: "
+            + loadedRuleSet.getRules().size() );
+      inputStream.close();
+
+      return loadedRuleSet;
+   }
+
+   private void writeAnyReport( final FlexPmdViolations flexPmdViolations ) throws PMDException
+   {
+      long startTime;
+      long ellapsedTime;
+      startTime = System.currentTimeMillis();
+      writeReport( flexPmdViolations );
+      ellapsedTime = System.currentTimeMillis()
+            - startTime;
+
+      LOGGER.info( "It took "
+            + ellapsedTime + "ms to write the " + getReportType() + " report" );
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/FlexPMDFormat.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/FlexPMDFormat.java b/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/FlexPMDFormat.java
new file mode 100644
index 0000000..f3f11d4
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/FlexPMDFormat.java
@@ -0,0 +1,35 @@
+/*
+ * 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.engines;
+
+public enum FlexPMDFormat
+{
+   HTML("flexPmd.html"), XML("pmd.xml");
+
+   private final String name;
+
+   private FlexPMDFormat( final String formatName )
+   {
+      name = formatName;
+   }
+
+   @Override
+   public String toString()
+   {
+      return name;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/FlexPmdXmlEngine.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/FlexPmdXmlEngine.java b/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/FlexPmdXmlEngine.java
new file mode 100644
index 0000000..4835993
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/FlexPmdXmlEngine.java
@@ -0,0 +1,171 @@
+/*
+ * 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.engines;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.net.URISyntaxException;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.logging.Logger;
+
+import net.sourceforge.pmd.PMDException;
+
+import com.adobe.ac.pmd.FlexPmdParameters;
+import com.adobe.ac.pmd.FlexPmdViolations;
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.files.IFlexFile;
+
+public class FlexPmdXmlEngine extends AbstractFlexPmdEngine
+{
+   private static final Logger LOGGER = Logger.getLogger( FlexPmdXmlEngine.class.getName() );
+
+   public FlexPmdXmlEngine( final FlexPmdParameters parameters ) throws URISyntaxException,
+                                                                IOException
+   {
+      super( parameters );
+   }
+
+   @Override
+   protected final void writeReport( final FlexPmdViolations pmd ) throws PMDException
+   {
+      final File realOutputDirectory = getOutputDirectory();
+      final String filePath = realOutputDirectory.getAbsoluteFile()
+            + File.separator + FlexPMDFormat.XML.toString();
+
+      makeSureOutputDirectoryExists( realOutputDirectory );
+
+      Writer writter = null;
+      try
+      {
+         LOGGER.finest( "Start writting XML report" );
+         LOGGER.info( "Creating report in <"
+               + filePath + ">" );
+
+         writter = new OutputStreamWriter( new FileOutputStream( filePath ), "UTF-8" );
+         writeReportHeader( writter );
+         writeFileViolations( pmd,
+                              writter );
+         writeReportFooter( writter );
+         writter.close();
+      }
+      catch ( final IOException e )
+      {
+         throw new PMDException( "Error creating file "
+               + filePath, e );
+      }
+      finally
+      {
+         finalizeReport( writter );
+      }
+   }
+
+   private void finalizeReport( final Writer writter )
+   {
+      LOGGER.finest( "End writting XML report" );
+
+      if ( writter != null )
+      {
+         try
+         {
+            LOGGER.finest( "Closing the XML writter" );
+            writter.close();
+         }
+         catch ( final IOException e )
+         {
+            LOGGER.warning( Arrays.toString( e.getStackTrace() ) );
+         }
+         LOGGER.finest( "Closed the XML writter" );
+      }
+   }
+
+   private void formatFileFiolation( final Writer writter,
+                                     final IFlexFile sourceFile,
+                                     final Collection< IFlexViolation > violations,
+                                     final String sourceFilePath ) throws IOException
+   {
+      if ( !violations.isEmpty() )
+      {
+         if ( sourceFilePath.charAt( 2 ) == ':' )
+         {
+            writter.write( "   <file name=\""
+                  + sourceFilePath.substring( 1,
+                                              sourceFilePath.length() ) + "\">" + getNewLine() );
+         }
+         else
+         {
+            writter.write( "   <file name=\""
+                  + sourceFilePath + "\">" + getNewLine() );
+
+         }
+         for ( final IFlexViolation violation : violations )
+         {
+            writter.write( violation.toXmlString( sourceFile,
+                                                  violation.getRule().getRuleSetName() ) );
+         }
+         writter.write( "   </file>"
+               + getNewLine() );
+      }
+   }
+
+   private String getNewLine()
+   {
+      return System.getProperty( "line.separator" );
+   }
+
+   private void makeSureOutputDirectoryExists( final File realOutputDirectory )
+   {
+      if ( !realOutputDirectory.exists()
+            && !realOutputDirectory.mkdirs() )
+      {
+         LOGGER.severe( "Unable to create an output folder" );
+      }
+   }
+
+   private void writeFileViolations( final FlexPmdViolations pmd,
+                                     final Writer writter ) throws IOException
+   {
+      for ( final IFlexFile sourceFile : pmd.getViolations().keySet() )
+      {
+         final Collection< IFlexViolation > violations = pmd.getViolations().get( sourceFile );
+         final String sourceFilePath = sourceFile.getFilePath();
+
+         formatFileFiolation( writter,
+                              sourceFile,
+                              violations,
+                              sourceFilePath );
+      }
+   }
+
+   private void writeReportFooter( final Writer writter ) throws IOException
+   {
+      writter.write( "</pmd>"
+            + getNewLine() );
+   }
+
+   private void writeReportHeader( final Writer writter ) throws IOException
+   {
+      writter.write( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+            + getNewLine() );
+      writter.write( "<pmd version=\"4.2.1\" timestamp=\""
+            + new Date().toString() + "\">" + getNewLine() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/PmdEngineUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/PmdEngineUtils.java b/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/PmdEngineUtils.java
new file mode 100644
index 0000000..7c48a9e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/main/java/com/adobe/ac/pmd/engines/PmdEngineUtils.java
@@ -0,0 +1,66 @@
+/*
+ * 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.engines;
+
+import java.text.MessageFormat;
+import java.util.List;
+import java.util.Map.Entry;
+
+import com.adobe.ac.pmd.FlexPmdViolations;
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+public final class PmdEngineUtils
+{
+   public static String findFirstViolationError( final FlexPmdViolations violations )
+   {
+      final StringBuffer buffer = new StringBuffer();
+      final String message = "An error violation has been found on the file {0} at "
+            + "line {1}, with the rule \"{2}\": {3}";
+      final MessageFormat form = new MessageFormat( message );
+
+      for ( final Entry< IFlexFile, List< IFlexViolation >> violatedFile : violations.getViolations()
+                                                                                     .entrySet() )
+      {
+         for ( final IFlexViolation violation : violatedFile.getValue() )
+         {
+            if ( violation.getRule().getPriority() == Integer.parseInt( ViolationPriority.HIGH.toString() ) )
+            {
+               final String[] formatArgument = computeArgumentFormat( violation );
+               buffer.append( form.format( formatArgument ) );
+               buffer.append( '\n' );
+            }
+         }
+      }
+      return buffer.toString();
+   }
+
+   private static String[] computeArgumentFormat( final IFlexViolation violation )
+   {
+      final String[] formatArgument = new String[]
+      { violation.getFilename(),
+                  String.valueOf( violation.getBeginLine() ),
+                  violation.getRule().getRuleClass(),
+                  violation.getRuleMessage() };
+      return formatArgument;
+   }
+
+   private PmdEngineUtils()
+   {
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AbstractEntireRulesetTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AbstractEntireRulesetTest.java b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AbstractEntireRulesetTest.java
new file mode 100644
index 0000000..9c5102f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AbstractEntireRulesetTest.java
@@ -0,0 +1,87 @@
+/*
+ * 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;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.engines.FlexPmdXmlEngine;
+
+import junit.framework.TestCase;
+
+public abstract class AbstractEntireRulesetTest extends TestCase
+{
+
+   protected static final String OUTPUT_DIRECTORY_URL = "target/report/";
+
+   public AbstractEntireRulesetTest()
+   {
+      super();
+   }
+
+   protected abstract int getRulesNb();
+
+   protected abstract int getViolatedFilesNb();
+
+   protected abstract String getRuleSetPath();
+
+   public AbstractEntireRulesetTest( String name )
+   {
+      super( name );
+   }
+
+   @Test
+   public void testLoadRuleSet() throws URISyntaxException,
+                                   PMDException,
+                                   IOException
+   {
+      final File sourceDirectory = new File( getClass().getResource( "/test" ).toURI().getPath() );
+      final URL ruleSetUrl = getClass().getResource( getRuleSetPath() );
+   
+      assertNotNull( "RuleSet has not been found",
+                     ruleSetUrl );
+   
+      assertNotNull( "RuleSet has not been found",
+                     ruleSetUrl.toURI() );
+   
+      assertNotNull( "RuleSet has not been found",
+                     ruleSetUrl.toURI().getPath() );
+   
+      final File outputDirectory = new File( OUTPUT_DIRECTORY_URL );
+      final File ruleSetFile = new File( ruleSetUrl.toURI().getPath() );
+      final FlexPmdXmlEngine engine = new FlexPmdXmlEngine( new FlexPmdParameters( "",
+                                                                                   outputDirectory,
+                                                                                   ruleSetFile,
+                                                                                   sourceDirectory ) );
+      final FlexPmdViolations flexPmdViolations = new FlexPmdViolations();
+   
+      engine.executeReport( flexPmdViolations );
+   
+      assertEquals( "Number of rules found is not correct",
+                    getRulesNb(),
+                    engine.getRuleSet().size() );
+      assertEquals( getViolatedFilesNb(),
+                    flexPmdViolations.getViolations().size() );
+   }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AllInOneRulesetTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AllInOneRulesetTest.java b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AllInOneRulesetTest.java
new file mode 100644
index 0000000..62f1484
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AllInOneRulesetTest.java
@@ -0,0 +1,64 @@
+/*
+ * 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;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.engines.FlexPmdXmlEngine;
+
+public class AllInOneRulesetTest extends AbstractEntireRulesetTest
+{
+   @Test
+   public void testLoadUncorrectRuleSet() throws URISyntaxException,
+                                         PMDException,
+                                         IOException
+   {
+      final File sourceDirectory = new File( getClass().getResource( "/test" ).toURI().getPath() );
+      final File outputDirectory = new File( OUTPUT_DIRECTORY_URL );
+
+      final FlexPmdXmlEngine engine = new FlexPmdXmlEngine( new FlexPmdParameters( "",
+                                                                                   outputDirectory,
+                                                                                   new File( "nonExist" ),
+                                                                                   sourceDirectory ) );
+
+      engine.executeReport( new FlexPmdViolations() );
+   }
+
+   @Override
+   protected String getRuleSetPath()
+   {
+      return "/allInOneRuleset.xml";
+   }
+
+   @Override
+   protected int getRulesNb()
+   {
+      return 43;
+   }
+
+   @Override
+   protected int getViolatedFilesNb()
+   {
+      return 50;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AllInOneWithExclusionRulesetTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AllInOneWithExclusionRulesetTest.java b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AllInOneWithExclusionRulesetTest.java
new file mode 100644
index 0000000..10322f1
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/AllInOneWithExclusionRulesetTest.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;
+
+public class AllInOneWithExclusionRulesetTest extends AbstractEntireRulesetTest
+{
+   @Override
+   protected String getRuleSetPath()
+   {
+      return "/allInOneWithExclusionRuleset.xml";
+   }
+
+   @Override
+   protected int getRulesNb()
+   {
+      return 43;
+   }
+
+   @Override
+   protected int getViolatedFilesNb()
+   {
+      return 36;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/FlexPmdParametersTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/FlexPmdParametersTest.java b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/FlexPmdParametersTest.java
new file mode 100644
index 0000000..94b1ff9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/FlexPmdParametersTest.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;
+
+import java.io.File;
+import java.util.ArrayList;
+
+import junit.framework.Assert;
+
+import org.junit.Test;
+
+public class FlexPmdParametersTest
+{
+   @Test
+   public void testFlexPmdParametersStringBooleanBooleanFileFileFile()
+   {
+      final FlexPmdParameters parameters = new FlexPmdParameters( "", true, true, null, null, null );
+
+      Assert.assertTrue( parameters.isFailOnError() );
+      Assert.assertTrue( parameters.isFailOnRuleViolation() );
+   }
+
+   @Test
+   public void testFlexPmdParametersStringFileFileFileListOfFile()
+   {
+      final File file = new File( "" );
+      final ArrayList< File > sourceList = new ArrayList< File >();
+      final FlexPmdParameters parameters = new FlexPmdParameters( "", file, file, file, sourceList );
+
+      Assert.assertEquals( sourceList,
+                           parameters.getSourceList() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/FlexPmdXmlEngineTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/FlexPmdXmlEngineTest.java b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/FlexPmdXmlEngineTest.java
new file mode 100644
index 0000000..d84641c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/FlexPmdXmlEngineTest.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;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.SchemaFactory;
+
+import org.xml.sax.SAXException;
+
+import com.adobe.ac.pmd.engines.AbstractFlexPmdEngine;
+import com.adobe.ac.pmd.engines.AbstractTestFlexPmdEngineTest;
+import com.adobe.ac.pmd.engines.FlexPMDFormat;
+import com.adobe.ac.pmd.engines.FlexPmdXmlEngine;
+
+public class FlexPmdXmlEngineTest extends AbstractTestFlexPmdEngineTest
+{
+   private static final String OUTPUT_DIRECTORY_URL = "target/report/";
+
+   public FlexPmdXmlEngineTest( final String name )
+   {
+      super( name );
+   }
+
+   @Override
+   protected AbstractFlexPmdEngine getFlexPmdEngine( final File sourceDirectory,
+                                                     final File outputDirectory,
+                                                     final String packageToExclude,
+                                                     final File ruleSet ) throws URISyntaxException,
+                                                                         IOException
+   {
+      return new FlexPmdXmlEngine( new FlexPmdParameters( packageToExclude,
+                                                          outputDirectory,
+                                                          ruleSet,
+                                                          sourceDirectory ) );
+   }
+
+   @Override
+   protected void onTestExecuteReportDone()
+   {
+      final File outXmlReport = new File( OUTPUT_DIRECTORY_URL
+            + FlexPMDFormat.XML.toString() );
+
+      final SchemaFactory factory = SchemaFactory.newInstance( "http://www.w3.org/2001/XMLSchema" );
+
+      final URL schemaResource = getClass().getResource( "/pmd.xsd" );
+
+      assertNotNull( "pmd.xsd is not loaded",
+                     schemaResource );
+
+      try
+      {
+         factory.newSchema( schemaResource ).newValidator().validate( new StreamSource( outXmlReport ) );
+      }
+      catch ( final SAXException e )
+      {
+         fail( e.getMessage() );
+      }
+      catch ( final IOException e )
+      {
+         fail( e.getMessage() );
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/LoadRulesetWithNonUTF8CharTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/LoadRulesetWithNonUTF8CharTest.java b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/LoadRulesetWithNonUTF8CharTest.java
new file mode 100644
index 0000000..69eb795
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/LoadRulesetWithNonUTF8CharTest.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;
+
+public class LoadRulesetWithNonUTF8CharTest extends AbstractEntireRulesetTest
+{
+   @Override
+   protected String getRuleSetPath()
+   {
+      return "/broken_pmd.xml";
+   }
+
+   @Override
+   protected int getRulesNb()
+   {
+      return 70;
+   }
+
+   @Override
+   protected int getViolatedFilesNb()
+   {
+      return 66;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/engines/AbstractTestFlexPmdEngineTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/engines/AbstractTestFlexPmdEngineTest.java b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/engines/AbstractTestFlexPmdEngineTest.java
new file mode 100644
index 0000000..df495f5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/engines/AbstractTestFlexPmdEngineTest.java
@@ -0,0 +1,73 @@
+/*
+ * 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.engines;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import junit.framework.TestCase;
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Test;
+import org.xml.sax.SAXException;
+
+import com.adobe.ac.pmd.FlexPmdViolations;
+
+public abstract class AbstractTestFlexPmdEngineTest extends TestCase
+{
+   private static final String OUTPUT_DIRECTORY_URL = "target/report/";
+
+   public AbstractTestFlexPmdEngineTest( final String name )
+   {
+      super( name );
+   }
+
+   @Test
+   public final void testExecuteReport() throws PMDException,
+                                        SAXException,
+                                        URISyntaxException,
+                                        IOException
+   {
+      final URL sourceDirectoryResource = getClass().getResource( "/test" );
+
+      assertNotNull( "Source directory is not found as a resource",
+                     sourceDirectoryResource );
+
+      assertNotNull( "Source directory is not found as a resource",
+                     sourceDirectoryResource.toURI() );
+
+      final File sourceDirectory = new File( sourceDirectoryResource.toURI().getPath() );
+      final File outputDirectory = new File( OUTPUT_DIRECTORY_URL );
+
+      getFlexPmdEngine( sourceDirectory,
+                        outputDirectory,
+                        "",
+                        null ).executeReport( new FlexPmdViolations() );
+
+      onTestExecuteReportDone();
+   }
+
+   protected abstract AbstractFlexPmdEngine getFlexPmdEngine( final File sourceDirectory,
+                                                              final File outputDirectory,
+                                                              final String packageToExclude,
+                                                              final File ruleSet ) throws URISyntaxException,
+                                                                                  IOException;
+
+   protected abstract void onTestExecuteReportDone();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/engines/PmdEngineUtilsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/engines/PmdEngineUtilsTest.java b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/engines/PmdEngineUtilsTest.java
new file mode 100644
index 0000000..cc9a80a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/java/com/adobe/ac/pmd/engines/PmdEngineUtilsTest.java
@@ -0,0 +1,103 @@
+/*
+ * 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.engines;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.FlexPmdViolations;
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.IFlexRule;
+import com.adobe.ac.pmd.rules.core.Violation;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+import com.adobe.ac.pmd.rules.core.ViolationPriority;
+
+public class PmdEngineUtilsTest extends FlexPmdTestBase
+{
+   private class ErrorRule extends AbstractFlexRule implements IFlexRule
+   {
+      @Override
+      protected List< IFlexViolation > findViolationsInCurrentFile()
+      {
+         return new ArrayList< IFlexViolation >();
+      }
+
+      @Override
+      protected ViolationPriority getDefaultPriority()
+      {
+         return ViolationPriority.HIGH;
+      }
+
+      @Override
+      protected boolean isConcernedByTheCurrentFile()
+      {
+         return true;
+      }
+   }
+
+   private class WarningRule extends AbstractFlexRule
+   {
+      @Override
+      protected List< IFlexViolation > findViolationsInCurrentFile()
+      {
+         return new ArrayList< IFlexViolation >();
+      }
+
+      @Override
+      protected ViolationPriority getDefaultPriority()
+      {
+         return ViolationPriority.NORMAL;
+      }
+
+      @Override
+      protected boolean isConcernedByTheCurrentFile()
+      {
+         return true;
+      }
+   }
+
+   @Test
+   public void testFindFirstViolationError()
+   {
+      final FlexPmdViolations violations = new FlexPmdViolations();
+      final List< IFlexViolation > abstractRowDataViolations = new ArrayList< IFlexViolation >();
+
+      assertEquals( "",
+                    PmdEngineUtils.findFirstViolationError( violations ) );
+
+      final IFlexFile abstractRowDataFlexFile = getTestFiles().get( "AbstractRowData.as" );
+
+      abstractRowDataViolations.add( new Violation( new ViolationPosition( 0 ),
+                                                    new ErrorRule(),
+                                                    abstractRowDataFlexFile ) );
+      abstractRowDataViolations.add( new Violation( new ViolationPosition( 0 ),
+                                                    new WarningRule(),
+                                                    abstractRowDataFlexFile ) );
+      violations.getViolations().put( abstractRowDataFlexFile,
+                                      abstractRowDataViolations );
+      assertEquals( "An error violation has been found on the file AbstractRowData.as at line 0, with the rule"
+                          + " \"com.adobe.ac.pmd.engines.PmdEngineUtilsTest$ErrorRule\": \n",
+                    PmdEngineUtils.findFirstViolationError( violations ) );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/allInOneRuleset.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/allInOneRuleset.xml b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/allInOneRuleset.xml
new file mode 100644
index 0000000..aff76df
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-core/src/test/resources/allInOneRuleset.xml
@@ -0,0 +1,600 @@
+<!--
+
+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.
+
+-->
+<ruleset name="All Flex Rules"
+	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
+	xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	<description />
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.mxml.MoreThanTwoEntryPointsInMxmlRule"
+		message="There are more than 2 public variables in this MXML component">
+		<description />
+		<priority>3</priority>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.binding.TooLongBindingExpressionRule"
+		message="This binding expression is too long">
+		<description>A Binding expression is executed as soon as one of the bindable attributes changed. If a binding expression contains too many expression, there could be some performance issue.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>3</value>
+			</property>
+		</properties>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.mxml.TooLongScriptBlockRule"
+		message="This script block is too long">
+		<description />
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>50</value>
+			</property>
+		</properties>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.DynamicClassRule"
+		message="A class must not be dynamic">
+		<description>When using dynamic classes, you cannot control how the developer will use your classe. It makes refactoring really difficult.</description>
+		<priority>1</priority>
+		<example><![CDATA[
+dynamic public class DynamicObject // VIOLATION
+   {
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.event.EventMissingCloneFunctionRule"
+		message="The clone event must be overiden in a custom event">
+		<description>Why do you need to override clone? Well, the clone method creates a copy of your event (or object - whatever object has the clone event; this isn't limited to Event objects). The default clone method inherited by the Event class or whatever class your custom class extends, will return an event object of the type of that class, not your custom event subclass. In the situations where a clone is needed, it is needed to be of the same type of your class, not the class it extends.</description>
+		<priority>1</priority>
+		<example><![CDATA[
+public class FirstCustomEvent   // VIOLATION - clone method is missing
+   {
+      public var lala : String;
+      
+      public function FirstCustomEvent()
+      {         
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.event.PublicVariableInCustomEventRule"
+		message="No public variables should be inside a custom event">
+		<description>In order to improve encapsulation in your custom event, it is better not to have public variable in your event. Prefer having read-only attributes, set by the event constructor.</description>
+		<priority>3</priority>
+		<example><![CDATA[
+public class FirstCustomEvent   
+   {
+      public var lala : String; // VIOLATION
+      
+      public function FirstCustomEvent()
+      {         
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.style.ConstructorNonEmptyReturnTypeRule"
+		message="A constructor should not have a return type">
+		<description>Even if this is syntaxically correct, there should not be a return type for a constructor.</description>
+		<priority>3</priority>
+		<example><![CDATA[
+public class VoidConstructor   
+   {
+      public function VoidConstructor() : void
+      {         
+      }      
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.switchrules.SwitchStatementsShouldHaveDefaultRule"
+		message="A switch statement does not contain a default statement">
+		<description>Switch statements should have a default label in order to detect corner cases.</description>
+		<priority>1</priority>
+		<example><![CDATA[
+public class Foo 
+   {
+      public funciton bar() : void 
+      {
+         var  x : int = 2;
+         switch (x) 
+         {
+            case 2: var j : int = 8;
+         }
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseObjectTypeRule"
+		message="Do not use Object class.">
+		<description>It is a bad practice to use the dynamic class Object. Prefer using strongly typed object, or marker interface in order to avoid silent compilation errors while refactoring</description>
+		<priority>1</priority>
+		<example><![CDATA[
+public class Foo
+   {
+      public var bar : Object; // VIOLATION      
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.switchrules.NestedSwitchRule"
+		message="Switch must not be nested.">
+		<description>As a general practice, switch statement should not be used. Prefer using inheritance. It is even harder to read when siwtch statements are nested.</description>
+		<priority>3</priority>
+		<example><![CDATA[
+public function foo( a : Number, b : Number ) : void
+      {
+          switch( a )
+          {
+             case 1:
+                break;
+             case 2:                   
+                switch ( b ) 
+                {
+                  case 3 :
+                     break;
+                  case 4 :
+                     break;
+                }
+                break;                     
+          }
+      }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.maintanability.ArrayFieldWithNoArrayElementTypeRule"
+		message="ArrayElementType metadata is not specified for an array-type field">
+		<description />
+		<priority>3</priority>
+		<example><![CDATA[
+public class ArrayVO {
+      public var items:Array; //VIOLATION
+
+      [ArrayElementType("model.vo.MenuItemVO")]
+      public var menuItems : Array;
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.maintanability.NonStaticConstantFieldRule" message="A constant field should be static">
+		<description />
+		<priority>1</priority>
+		<example><![CDATA[
+public class MyObject {
+      public static const MY_STATIC_CONSTANT : String = "myStaticConstant";
+      public const MY_NON_STATIC_CONSTANT : String = "myStaticConstant"; // VIOLATION
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.unused.UnusedParameterRule" message="You should use all the parameters of a function">
+		<description />
+		<priority>1</priority>
+		<example><![CDATA[
+public function foo( param1 : Number, param2 : Number, param3 : Number, param4 : Number, param5 : Number ) : void // 4 violations
+      {
+         var i : int = param1;
+      }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.unused.UnusedLocalVariableRule"
+		message="You should delete an unused variable">
+		<description />
+		<priority>3</priority>
+		<example><![CDATA[
+public function foo() : void
+      {
+         var i : int = 0;// 1 violation
+      }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.unused.UnusedPrivateMethodRule"
+		message="This private method does not seem to be used">
+		<description />
+		<priority>3</priority>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.switchrules.TooFewBrancheInSwitchStatementRule"
+		message="There are too few branches in this swicth statement">
+		<description>Switch statements are designed for complex branches, and allow branches to share treatement. Using a switch for only 2 branches is ill advised, as switches are not as easy to understand as if. In this case, it's most likely is a good idea to use a if statement</description>
+		<priority>5</priority>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.style.BadFormatLoggerRule"
+		message="The loger is not correctly formatted">
+		<description />
+		<priority>5</priority>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.performance.AvoidInstanciationInLoopRule"
+		message="Instanciating a variable in a loop can be expensive">
+		<description />
+		<priority>3</priority>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.architecture.ViewComponentReferencedInModelRule"
+		message="A view component should not be referenced in a model class">
+		<description />
+		<priority>3</priority>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseGenericTypeRule"
+		message="Use strongly typed objects instead of *">
+		<description />
+		<priority>1</priority>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.event.DispatchHardCodedEventNameRule"
+		message="DispatchEvent function must dispatch constant strings">
+		<description>You should not dispatch a plain string. If you rename this string, you need to replace the string listener as well. Use constants instead</description>
+		<priority>3</priority>
+		<example><![CDATA[
+public class Foo 
+   {
+      public function bar() : void
+      {
+         dispatch( new Event( "myHardCodedEvent" ) ); // VIOLATION
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.event.ListenForHardCodedEventNameRule"
+		message="addEventListener must not contain hard coded strings.">
+		<description>You should not listen for a plain string. If you rename this string, you need to replace the string listener as well. Use constants instead</description>
+		<priority>3</priority>
+		<example><![CDATA[
+public class Foo 
+   {
+      public function bar() : void
+      {
+         addEventListener( "myHardCodedEvent", handleMyHardCodedEvent ); // VIOLATION
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.AlertShowRule"
+		message="Do not call Alert.show directly.">
+		<description>You should not Alert.show() directly. If an error occured in the system, you should probably use an ErrorManager to have a consistent way to manage those errors.</description>
+		<priority>1</priority>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.empty.EmptyIfStmtRule"
+		message="No statements in this if statement">
+		<description>Empty If Statement finds instances where a condition is checked but nothing is done about it.</description>
+		<priority>3</priority>
+		<example><![CDATA[
+public class Foo 
+   {
+      public function bar( x : int ) : void
+      {
+         if ( x == 0 ) 
+         {
+            // VIOLATION
+         }
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.ExcessiveImportRule"
+		message="A high number of imports can indicate a high degree of coupling within an object.">
+		<description>A high number of imports can indicate a high degree of coupling within an object. Rule counts the number of unique imports and reports a violation if the count is above the user defined threshold.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>15</value>
+			</property>
+		</properties>
+		<example><![CDATA[
+import blah.blah.Baz;
+   import blah.blah.Bif;
+   // 18 others from the same package elided
+   public class Foo 
+   {
+      public function doWork() : void 
+      {
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.binding.BindingUtilsRule"
+		message="If you need to use BindingUtils, you should probably consider refactoring using events">
+		<description />
+		<priority>3</priority>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.style.OverLongLineRule"
+		message="Too long line ({0} maximum)">
+		<description />
+		<priority>5</priority>
+		<properties>
+			<property name="maximum">
+				<value>120</value>
+			</property>
+		</properties>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.style.ImportFromSamePackageRule"
+		message="Imports from the same package are not necessary">
+		<description />
+		<priority>1</priority>
+		<example><![CDATA[
+package com.adobe.ac
+{
+   import com.adobe.ac.MyModel; // VIOLATION HERE
+
+   public class BigModel   
+   {
+      public var model : MyModel = null;
+   }
+}
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.naming.IncorrectClassCase"
+		message="A class name must start by a majuscule character">
+		<description />
+		<priority>3</priority>
+		<example><![CDATA[
+public class foo
+   {
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.cairngorm.BindableModelLocatorRule"
+		message="A modelLocator must not be Bindable at a class level">
+		<description>A bindable ModelLocator could leads to performance issues due to bindings</description>
+		<priority>1</priority>
+		<example><![CDATA[
+[Bindable]
+   public class BindableModelLocator // VIOLATION 
+   {      
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.cairngorm.ReferenceModelLocatorOutsideTheMainApplicationRule"
+		message="The ModelLocator should be only accessible from the main application file">
+		<description>The ModelLocator should be only accessible from the main application file. Then sub-models should be injected to the nested views.</description>
+		<priority>3</priority>
+		<example><![CDATA[
+package business
+{
+   import model.MyModelLocator; // VIOLATION
+   
+   public class MyBusinessClass 
+   } 
+}
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.cairngorm.FatControllerRule"
+		message="A FrontController must nor add all its commands within the Controller constructor.">
+		<description>Try split them into methods where you add commands depending on their fonctional area.</description>
+		<priority>3</priority>
+		<example><![CDATA[
+package control
+{
+   import control.GetItems1Command;
+   import control.GetItems1Event;
+   import control.GetItems2Command;
+   import control.GetItems2Event;
+   // A lot of other imports
+   
+   public class MyFrontController // VIOLATION
+   {
+      public function MyFrontController()
+      {
+         addCommand( 
+            GetItems1Event.EVENT_NAME,
+            GetItems1Command );
+
+         addCommand( 
+            GetItems2Event.EVENT_NAME,
+            GetItems2Command );
+
+         // A lot of other addCommand
+      }
+   } 
+}
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.cairngorm.BadCairngormEventNameFormatRule"
+		message="A Cairngorm event name should contain the function area name before the actual event name">
+		<description>You would have something like 'productManagement.getProducts' as an event name.</description>
+		<priority>3</priority>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.sizing.TooManyFunctionRule" message="Too many methods detected">
+		<description>A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>10</value>
+			</property>
+		</properties>
+		<example><![CDATA[
+public class Foo 
+   {
+      public function doWork() : void {}
+      public function doMoreWork() : void {}
+      public function doWorkAgain() : void {}
+      // [... more more public methods ...]
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.sizing.TooLongFunctionRule" message="This function is far long">
+		<description>Violations of this rule usually indicate that the method is doing too much. Try to reduce the method size by creating helper methods and removing any copy/pasted code.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>25</value>
+			</property>
+		</properties>
+		<example><![CDATA[
+public class Foo 
+   {
+      public function doSomething() : void
+      {
+         System.out.println("Hello world!");
+         System.out.println("Hello world!");
+         // 98 copies omitted for brevity.
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.sizing.TooLongSwitchCaseRule"
+		message="Long switch case detected">
+		<description>A switch case statement should be either empty, or contain a break, or call another method.</description>
+		<priority>3</priority>
+		<example><![CDATA[
+public class Bar   
+   {
+      public function foo() : void
+      {
+          var i : int = 4;
+          
+          switch( i )
+          {
+             case 1:
+                handleFirstCase();
+                break;
+             case 2: // VIOLATION
+                googleResquest.url = "";
+                handleSecondCaseFirstPart();
+                handleSecondCaseSecondPart();
+                break;
+          }
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.sizing.TooManyParametersRule"
+		message="Long parameter list detected">
+		<description>Long parameter lists can indicate that a new object should be created to wrap the numerous parameters.  Basically, try to group the parameters together.</description>
+		<priority>1</priority>
+		<properties>
+			<property name="maximum">
+				<value>4</value>
+			</property>
+		</properties>
+		<example><![CDATA[
+public class Foo 
+   {
+      public function addData( p0 : int, p1 : int, p2 : int, p3 : int, p4 : int, p5 : int,
+                                             p6 : int, p7 : int, p8 : int, p9 : int, p10 : int ) : void 
+      {
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.sizing.TooManyPublicRule"
+		message="Too much public fields or functions detected">
+		<description>A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>10</value>
+			</property>
+		</properties>
+		<example><![CDATA[
+public class Foo 
+   {
+      public var value : String;
+      public var something : Bar;
+      public var variable : Variable;
+
+      // [... more more public attributes ...]
+
+      public function doWork() : void {}
+      public function doMoreWork() : void {}
+      public function doWorkAgain() : void {}
+
+      // [... more more public methods ...]
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.sizing.TooManyFieldsRule"
+		message="Too many field detected">
+		<description>Classes that have too many fields could be redesigned to have fewer fields, possibly  through some nested object grouping of some of the information.  For example, a class with  city/state/zip fields could instead have one Address field.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>5</value>
+			</property>
+		</properties>
+		<example><![CDATA[
+public class Person 
+   {
+      private var one : String;
+      private var two : int;
+      private var three : int;
+
+      [... many more public fields ...]
+
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.naming.TooShortVariableRule"
+		message="This variable name is too short">
+		<description>Detects when a field, local, or parameter has a very short name.</description>
+		<priority>5</priority>
+		<example><![CDATA[
+public class Something 
+   {
+      private var q : int = 15; // VIOLATION - Field
+	
+      public function foo( as : String ) : void // VIOLATION - Formal 
+      {
+         var r : int = 20 + q; // VIOLATION - Local
+      }
+   }
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.naming.PackageCaseRule"
+		message="A package name should be lower case">
+		<description>Detects when a package definition contains upper case characters.</description>
+		<priority>3</priority>
+		<example><![CDATA[
+
+   package com.MyCompany  // VIOLATION <- should be lower case name
+   {
+      public class SomeClass 
+      {
+      }
+   }
+         
+           ]]></example>
+	</rule>
+	<rule since="0.1" class="com.adobe.ac.pmd.rules.css.StyleBlockInMxmlRule"
+		message="The style block is embed in the MXML file">
+		<description>It is not a good practice to embed style blocks inside the MXML component. Prefer using external css files.</description>
+		<priority>3</priority>
+	</rule>
+	<rule since="0.1"
+		class="com.adobe.ac.pmd.rules.performance.DynamicFiltersUsedInPopup"
+		message="A popup should use dynamic filters">
+		<description>Prefer using embed filters in assets</description>
+		<priority>3</priority>
+	</rule>
+</ruleset>
\ No newline at end of file


[46/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestWhileStatement.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestWhileStatement.java b/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestWhileStatement.java
deleted file mode 100644
index 159d101..0000000
--- a/FlexPMD/as3-parser/src/test/java/de/bokelberg/flex/parser/TestWhileStatement.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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 de.bokelberg.flex.parser;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-public class TestWhileStatement extends AbstractStatementTest
-{
-   @Test
-   public void testWhile() throws TokenException
-   {
-      assertStatement( "1",
-                       "while( i++ ){ trace( i ); }",
-                       "<while line=\"1\">"
-                             + "<condition line=\"1\">"
-                             + "<post-inc line=\"1\">"
-                             + "<primary line=\"1\">i</primary>"
-                             + "</post-inc>"
-                             + "</condition>"
-                             + "<block line=\"1\"><call line=\"1\">"
-                             + "<primary line=\"1\">trace</primary>"
-                             + "<arguments line=\"1\"><primary line=\"1\">i</primary>"
-                             + "</arguments></call>" + "</block>" + "</while>" );
-   }
-
-   @Test
-   public void testWhileWithEmptyStatement() throws TokenException
-   {
-      assertStatement( "1",
-                       "while( i++ ); ",
-                       "<while line=\"1\">"
-                             + "<condition line=\"1\">"
-                             + "<post-inc line=\"1\">"
-                             + "<primary line=\"1\">i</primary>"
-                             + "</post-inc></condition><stmt-empty line=\"1\">;</stmt-empty></while>" );
-   }
-
-   @Test
-   public void testWhileWithoutBlock() throws TokenException
-   {
-      assertStatement( "1",
-                       "while( i++ ) trace( i ); ",
-                       "<while line=\"1\">"
-                             + "<condition line=\"1\">"
-                             + "<post-inc line=\"1\">"
-                             + "<primary line=\"1\">i</primary>"
-                             + "</post-inc></condition><call line=\"1\">"
-                             + "<primary line=\"1\">trace</primary><arguments line=\"1\">"
-                             + "<primary line=\"1\">i</primary></arguments></call></while>" );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/resources/examples/Enum.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/resources/examples/Enum.as b/FlexPMD/as3-parser/src/test/resources/examples/Enum.as
deleted file mode 100644
index 358e103..0000000
--- a/FlexPMD/as3-parser/src/test/resources/examples/Enum.as
+++ /dev/null
@@ -1,84 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 org.granite.util 
-{	
-	import flash.utils.IDataInput;
-	import flash.utils.IDataOutput;
-	import flash.utils.IExternalizable;
-	import flash.utils.getQualifiedClassName;
-	
-	public class Enum implements IExternalizable
-	{
-		private var _name:String;
-		
-		public function Enum(name:String, restrictor:Restrictor) {
-			_name = (restrictor is Restrictor ? name : constantOf(name).name);
-		}
-		
-		public function get name():String {
-			return _name;
-		}
-		
-		protected function getConstants():Array {
-			throw new Error("Should be overriden");
-		}
-		
-		protected function constantOf(name:String):Enum {
-			for each (var o:* in getConstants()) {
-				var enum:Enum = Enum(o);
-				if (enum.name == name)
-					return enum;
-			}
-			throw new ArgumentError("Invalid " + getQualifiedClassName(this) + " value: " + name);
-		}
-		
-		public function readExternal(input:IDataInput):void {
-			_name = constantOf(input.readObject() as String).name;
-		}
-		
-		public function writeExternal(output:IDataOutput):void {
-			output.writeObject(_name);
-		}
-		
-		public static function normalize(enum:Enum):Enum {
-			return (enum == null ? null : enum.constantOf(enum.name));
-		}
-		
-		public static function readEnum(input:IDataInput):Enum {
-			return normalize(input.readObject() as Enum);
-		}
-		
-		public function toString():String {
-			return name;
-		}
-		
-		public function equals(other:Enum):Boolean {
-			return other === this || (
-				other != null &&
-				getQualifiedClassName(this) == getQualifiedClassName(other) &&
-				other.name == this.name
-			);
-		}
-		
-		protected static function get _():Restrictor { // NO PMD ProtectedStaticMethod
-			return new Restrictor();
-		}
-	}
-}
-class Restrictor {}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/resources/examples/FisheyeBase.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/resources/examples/FisheyeBase.as b/FlexPMD/as3-parser/src/test/resources/examples/FisheyeBase.as
deleted file mode 100644
index 123ca0e..0000000
--- a/FlexPMD/as3-parser/src/test/resources/examples/FisheyeBase.as
+++ /dev/null
@@ -1,564 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 qs.controls.fisheyeClasses
-{
-    import flash.display.DisplayObject;
-    import flash.display.Sprite;
-    import flash.events.Event;
-    import flash.events.MouseEvent;
-    import mx.core.ClassFactory;
-    import mx.core.IDataRenderer;
-    import mx.core.IFactory;
-    import mx.core.UIComponent;
-    import qs.controls.CachedLabel;
-    import qs.controls.LayoutAnimator;
-
-    /** the horizontal alignment.  */
-    [Style( name="horizontalAlign", type="String", enumeration="left,center,right,justified", inherit="no" )]
-    /** the vertical alignment */
-    [Style( name="verticalAlign", type="String", enumeration="top,center,bottom,justified", inherit="no" )]
-    /** the amount of space, in pixels, between invidual items */
-    [Style( name="defaultSpacing", type="Number", inherit="no" )]
-    /** the amount of space, in pixels, between invidual items when hilighted*/
-    [Style( name="hilightSpacing", type="Number", inherit="no" )]
-    /** the property on the item renderer to assign to when the renderer' state changes */
-    [Style( name="stateProperty", type="String", inherit="no" )]
-    /** the value to assign to 'stateProperty' on the renderer when the item is hilighted */
-    [Style( name="rolloverValue", type="String", inherit="no" )]
-    /** the value to assign to 'stateProperty' on the renderer when the item is selected */
-    [Style( name="selectedValue", type="String", inherit="no" )]
-    /** the value to assign to 'stateProperty' on the renderer when some other item is selected */
-    [Style( name="unselectedValue", type="String", inherit="no" )]
-    /** the value to assign to 'stateProperty' on the renderer when the item is in its default state */
-    [Style( name="defaultValue", type="String", inherit="no" )]
-    /** the scale factor assigned to renderers when no item is hilighted or selected */
-    [Style( name="defaultScale", type="Number", inherit="no" )]
-    /** the minimum scale factor assigned to renderers on screen. The actual scale factor assigned to
-     * an item will range between minScale and hilightMaxScale based on its distance from the hilighted or selected item */
-    [Style( name="hilightMinScale", type="Number", inherit="no" )]
-    /** the maximum scale factor assigned to renderers on screen. The actual scale factor assigned to
-     * an item will range between minScale and hilightMaxScale based on its distance from the hilighted or selected item */
-    [Style( name="hilightMaxScale", type="Number", inherit="no" )]
-    /** how quickly or slowly items scale down from the hilightMaxScale value to minScale value.  A value of 1 will scale linearly down from the hilighted item out to the item at scaleRadius.
-     * A value higher than wone will descend slowly from the hilight, then drop off quicker at the edge. A value lower than one will drop off quickly from the hilight Should be greater than 0*/
-    [Style( name="hilightScaleSlope", type="Number", inherit="no" )]
-    /** The radius, in items, around the hilighted item that are affected by the hilight. A value of 1 means only the hilighted item will scale. A value of three means the hilighted item plus the two items
-     * to either side will scale up. How much each item scales is affected by the scaleSlope style.*/
-    [Style( name="hilightScaleRadius", type="Number", inherit="no" )]
-    /** how quickly items animate to their target location when the layout of the renderers change.  A value of 1 will
-     * snap instantly to the new value, while a value of 0 will never change */
-    [Style( name="animationSpeed", type="Number", inherit="no" )]
-    [Event( name="change", type="flash.events.Event" )]
-    [Event( name="loaded", type="flash.events.Event" )]
-    [DefaultProperty( "dataProvider" )]
-    public class FisheyeBase extends UIComponent
-    {
-        public static const LOADED : String = "loaded";
-
-        /** the data items driving the component
-         */
-        private var _items : Array = [];
-
-        /** when a new dataprovider is assigned, we keep it in reserve until we have a chance
-         * to generate new renderers for it.  This is the temporary holding pen for those new items
-         */
-        private var _pendingItems : Array;
-
-        protected var itemsChanged : Boolean = false;
-
-        /** true if the renderers need to be regenerated */
-        protected var renderersDirty : Boolean = true;
-
-        /** the renderers representing the data items, one for each item */
-        protected var renderers : Array = [];
-
-        /** the currently hilighted item
-         */
-        protected var hilightedItemIndex : Number = NaN;
-
-        /** the currently selected item
-         */
-        protected var selectedItemIndex : Number = NaN;
-
-        /** @private */
-        private var _selectionEnabled : Boolean = true;
-
-        /** the factory that generates item renderers
-         */
-        private var _itemRendererFactory : IFactory;
-
-        /**
-         * the object that manages animating the children layout
-         */
-        protected var animator : LayoutAnimator;
-
-        /** Constructor */
-        public function FisheyeBase()
-        {
-            super();
-            _itemRendererFactory = new ClassFactory( CachedLabel );
-            addEventListener( MouseEvent.MOUSE_MOVE, updateHilight );
-            addEventListener( MouseEvent.ROLL_OUT, removeHilight );
-            addEventListener( MouseEvent.MOUSE_DOWN, updateSelection );
-            var maskShape : Sprite = new Sprite();
-            addChild( maskShape );
-            mask = maskShape;
-            maskShape.graphics.beginFill( 0 );
-            maskShape.graphics.drawRect( 0, 0, 10, 10 );
-            maskShape.graphics.endFill();
-            animator = new LayoutAnimator();
-            animator.layoutFunction = generateLayout;
-        }
-
-        //-----------------------------------------------------------------
-        /** the data source
-         */
-        public function set dataProvider( value : Array ) : void
-        {
-            _pendingItems = value;
-            renderersDirty = true;
-            itemsChanged = true;
-            invalidateProperties();
-            dispatchEvent( new Event( LOADED ) );
-        }
-
-        public function get dataProvider() : Array
-        {
-            return _items;
-        }
-
-        //-----------------------------------------------------------------
-        public function set selectionEnabled( value : Boolean ) : void
-        {
-            if ( _selectionEnabled == value )
-                return;
-            _selectionEnabled = value;
-            selectedIndex = selectedIndex;
-        }
-
-        public function get selectionEnabled() : Boolean
-        {
-            return _selectionEnabled;
-        }
-
-        [Bindable( "change" )]
-        public function get selectedItem() : Object
-        {
-            return ( isNaN( selectedItemIndex ) ? null : _items[ selectedItemIndex ] );
-        }
-
-        public function set selectedItem( value : Object ) : void
-        {
-            var newIndex : Number;
-
-            for ( var i : int = 0; i < _items.length; i++ )
-            {
-                if ( value == _items[ i ] )
-                {
-                    newIndex = i;
-                    break;
-                }
-            }
-            selectedIndex = newIndex;
-        }
-
-        [Bindable( "change" )]
-        public function get selectedIndex() : int
-        {
-            return ( isNaN( selectedItemIndex ) ? -1 : selectedItemIndex );
-        }
-
-        public function set selectedIndex( value : int ) : void
-        {
-            var v : Number = ( value < 0 || value >= _items.length ) ? NaN : value;
-
-            if ( v != selectedItemIndex )
-            {
-                selectedItemIndex = v;
-                updateState();
-                animator.invalidateLayout();
-                dispatchEvent( new Event( LOADED ) );
-            }
-        }
-
-        //-----------------------------------------------------------------
-        /* These private get properties are wrappers around styles that return defaults if unset.
-         *  It saves me from having to write a CSS selector, which
-         *  I really should do at some point */
-        protected function get defaultSpacingWithDefault() : Number
-        {
-            var result : Number = getStyle( "defaultSpacing" );
-
-            if ( isNaN( result ) )
-                result = 0;
-            return result;
-        }
-
-        protected function get maxScaleWithDefault() : Number
-        {
-            var result : Number = getStyle( "hilightMaxScale" );
-
-            if ( isNaN( result ) )
-                result = 1;
-            return result;
-        }
-
-        //-----------------------------------------------------------------
-        /**
-         * by making the itemRenderer be of type IFactory,
-         * developers can define it inline using the <Component> tag
-         */
-        public function get itemRenderer() : IFactory
-        {
-            return _itemRendererFactory;
-        }
-
-        public function set itemRenderer( value : IFactory ) : void
-        {
-            _itemRendererFactory = value;
-            renderersDirty = true;
-            invalidateProperties();
-        }
-
-        //-----------------------------------------------------------------
-        override protected function commitProperties() : void
-        {
-            // its now safe to switch over new dataProviders.
-            if ( _pendingItems != null )
-            {
-                _items = _pendingItems;
-                _pendingItems = null;
-            }
-            itemsChanged = false;
-
-            if ( renderersDirty )
-            {
-                // something has forced us to reallocate our renderers. start by throwing out the old ones.
-                renderersDirty = false;
-                var mask : DisplayObject = mask;
-
-                for ( var i : int = numChildren - 1; i >= 0; i-- )
-                    removeChildAt( i );
-                addChild( mask );
-                renderers = [];
-
-                // allocate new renderers, assign the data.
-                for ( i = 0; i < _items.length; i++ )
-                {
-                    var renderer : UIComponent = _itemRendererFactory.newInstance();
-                    IDataRenderer( renderer ).data = _items[ i ];
-                    renderers[ i ] = renderer;
-                    addChild( renderer );
-                }
-                animator.items = renderers;
-            }
-            invalidateSize();
-        }
-
-        private function removeHilight( e : MouseEvent ) : void
-        {
-            // called on rollout. Clear out any hilight, and reset our layout.
-            hilightedItemIndex = NaN;
-            updateState();
-            animator.invalidateLayout();
-        }
-
-        /** finds the item that would be closest to the x/y position if it were hilighted
-         */
-        protected function findItemForPosition( xPos : Number, yPos : Number ) : Number
-        {
-            return NaN;
-        }
-
-        /** called on mouse click to set or clear the selection */
-        protected function updateSelection( e : MouseEvent ) : void
-        {
-            if ( _selectionEnabled == false )
-                return;
-            var newSelection : Number = findItemForPosition( this.mouseX, this.mouseY );
-
-            if ( selectedItemIndex == newSelection )
-                selectedIndex = -1;
-            else
-                selectedIndex = newSelection;
-            updateState();
-            animator.invalidateLayout();
-        }
-
-        /** called on mouse move to update the hilight */
-        private function updateHilight( e : MouseEvent ) : void
-        {
-            var newHilight : Number = findItemForPosition( this.mouseX, this.mouseY );
-
-            if ( newHilight == hilightedItemIndex )
-                return;
-            hilightedItemIndex = newHilight;
-            updateState();
-            animator.invalidateLayout();
-        }
-
-        /**
-         * update the state properties of all of the items, based on
-         * the current hilighted and/or selected items
-         */
-        protected function updateState() : void
-        {
-            var stateProperty : String = getStyle( "stateProperty" );
-
-            if ( stateProperty != null )
-            {
-                var rolloverState : String = getStyle( "rolloverValue" );
-                var selectedState : String = getStyle( "selectedValue" );
-                var unselectedValue : String = getStyle( "unselectedValue" );
-
-                if ( unselectedValue == null || ( isNaN( selectedItemIndex ) && isNaN( hilightedItemIndex ) ) )
-                    unselectedValue = getStyle( "defaultValue" );
-
-                for ( var i : int = 0; i < renderers.length; i++ )
-                {
-                    renderers[ i ][ stateProperty ] = ( i == selectedItemIndex ) ? selectedState : ( i == hilightedItemIndex ) ? rolloverState : unselectedValue;
-                }
-            }
-        }
-
-        /**
-         * each item get scaled down based on its distance from the hliighted item.  this is the equation we use
-         * to figure out how much to scale down. The basic idea is this...we have two parameters that play a part
-         * in how quickly we scale down, scaleRadius and scaleSlope.  scaleRadius is the number of items on either
-         * side of the hilighted item (inclusive) that we should be able to use to scale down.  scaleSlope affects
-         * how whether we scale down quickly with the first few items in the radius, or the last few items.
-         * This equation essentially does that.
-         */
-        private function calcDistanceFactor( params : FisheyeParameters, distance : Number ) : Number
-        {
-            var mult : Number = 1 / params.scaleRadius;
-            return Math.max( 0, 1 - Math.pow( distance * mult, params.scaleSlope ) );
-        }
-
-        /**
-         * populates a set of items to fit into the distance axisLength, assuming nothing is hilighted, so they
-         * all scale the same. It will attempt to scale them to match the defaultScale style */
-        protected function populateMajorAxisForDefault( pdata : Array, axis : FisheyeAxis,
-                                                        axisLength : Number ) : FisheyeParameters
-        {
-            var vp : Number;
-            var itemCount : int = pdata.length;
-            var params : FisheyeParameters = new FisheyeParameters();
-            populateParameters( params, false );
-            var summedSpacing : Number = params.spacing * ( itemCount - 1 );
-            var sizeSum : Number = 0;
-            var pdataInst : FisheyeItem;
-
-            for ( var i : int = 0; i < itemCount; i++ )
-                sizeSum += pdata[ i ][ axis.EOM ];
-
-            if ( sizeSum > 0 )
-            {
-                var maximumMinScale : Number = ( axisLength - summedSpacing ) / sizeSum;
-                params.minScale = Math.min( params.minScale, maximumMinScale );
-            }
-            vp = 0;
-
-            for ( i = 0; i < itemCount; i++ )
-            {
-                pdataInst = pdata[ i ];
-                pdataInst.scale = params.minScale;
-                pdataInst[ axis.pos ] = vp;
-                vp += pdataInst[ axis.EOM ] * params.minScale + params.spacing;
-            }
-            return params;
-        }
-
-        /**
-         * takes the parameters used in the fisheye equation, and adjusts them as best as possible to make sure the
-         * items can fit into distance 'axisScale.'  Right now it does this by scaling down the minScale parameter if necessary. That's
-         * not entirely sufficient, but it does a pretty good job.  For future work:  If that's not sufficient, adjust the scaleRadius, scaleSlope,
-         * and spacing parameter
-         */
-        private function adjustParameters( pdata : Array, targetIndex : Number, params : FisheyeParameters,
-                                           axisSize : Number, axis : FisheyeAxis ) : void
-        {
-            var itemCount : int = pdata.length;
-            var summedSpacing : Number = params.spacing * ( itemCount - 1 );
-            var maxSum : Number = 0;
-            var minSum : Number = 0;
-
-            // given the constraint:
-            // W(0) * S(0) + spacing + W(1) * S(1) + spacing + ... + W(N) * S(N) <= unscaledWidth
-            // here we adjust the numbers that go into the calculation of S(i) to fit.
-            // right now that just means adjusting minScale downward if necessary. We'll probably add some more complex heuristic later.
-            for ( var i : int = 0; i < itemCount; i++ )
-            {
-                var pdataInst : FisheyeItem = pdata[ i ];
-                var distanceFromItem : Number = Math.abs( targetIndex - i );
-                var distanceFactor : Number = calcDistanceFactor( params, distanceFromItem );
-                var maxFactor : Number = params.maxScale * distanceFactor;
-                var minFactor : Number = ( 1 - distanceFactor );
-                var itemSize : Number = pdataInst[ axis.EOM ];
-                maxSum += itemSize * maxFactor;
-                minSum += itemSize * minFactor;
-            }
-            var minScale : Number = ( minSum > 0 ) ? ( ( axisSize - summedSpacing - maxSum ) / minSum ) : 0;
-            // if we've got lots of extra space, we might calculate that we need to make our ends _larger_ to fill the space. We don't want
-            // to do that. So let's contrain it to minScale. 
-            minScale = Math.min( params.minScale, minScale );
-            params.minScale = minScale;
-        }
-
-        /**
-         * populate a parameters structure from the various styles
-         */
-        private function populateParameters( params : FisheyeParameters, hilighted : Boolean ) : void
-        {
-            if ( hilighted == false )
-            {
-                params.minScale = getStyle( "defaultScale" );
-
-                if ( isNaN( params.minScale ) )
-                    params.minScale = .5;
-                params.spacing = defaultSpacingWithDefault;
-            }
-            else
-            {
-                params.minScale = getStyle( "hilightMinScale" );
-
-                if ( isNaN( params.minScale ) )
-                {
-                    params.minScale = getStyle( "defaultScale" );
-
-                    if ( isNaN( params.minScale ) )
-                        params.minScale = .5;
-                }
-                params.spacing = getStyle( "hilightSpacing" );
-
-                if ( isNaN( params.spacing ) )
-                    params.spacing = defaultSpacingWithDefault;
-            }
-            params.maxScale = getStyle( "hilightMaxScale" );
-
-            if ( isNaN( params.maxScale ) )
-                params.maxScale = 1;
-            params.scaleRadius = getStyle( "hilightScaleRadius" );
-
-            if ( isNaN( params.scaleRadius ) )
-                params.scaleRadius = 2;
-            params.scaleRadius = Math.max( 1, params.scaleRadius );
-            params.scaleSlope = getStyle( "hilightScaleSlope" );
-
-            if ( isNaN( params.scaleSlope ) )
-                params.scaleSlope = .75;
-        }
-
-        /**
-         * populates a set of items to fit into the distance axisLength, assuming targetIndex is hilighted.
-         */
-        protected function populateMajorAxisFor( pdata : Array, targetIndex : Number, axisSize : Number,
-                                                 axis : FisheyeAxis ) : FisheyeParameters
-        {
-            var vp : Number;
-            var itemCount : int = pdata.length;
-            var pdataInst : FisheyeItem;
-            var params : FisheyeParameters = new FisheyeParameters();
-            populateParameters( params, true );
-            adjustParameters( pdata, targetIndex, params, axisSize, axis );
-            vp = 0;
-
-            for ( var i : int = 0; i < itemCount; i++ )
-            {
-                pdataInst = pdata[ i ];
-                var distanceFromItem : Number = Math.abs( targetIndex - i );
-                var distanceFactor : Number = calcDistanceFactor( params, distanceFromItem );
-                var scale : Number = Math.max( 0,
-                                               params.minScale + ( params.maxScale - params.minScale ) * ( distanceFactor ) );
-                pdataInst[ axis.pos ] = vp;
-                pdataInst.scale = scale;
-                vp += pdataInst[ axis.EOM ] * scale + params.spacing;
-            }
-            return params;
-        }
-
-        /**
-         * given a set of scaled and laid out items, adjust them forward or backward to match the align property
-         */
-        protected function align( pdata : Array, axis : FisheyeAxis ) : void
-        {
-            var majorAlignValue : String = getStyle( axis.align );
-            var itemCount : int = pdata.length;
-            var pdataInst : FisheyeItem;
-
-            if ( itemCount == 0 )
-                return;
-
-            switch ( majorAlignValue )
-            {
-                case "right":
-                case "bottom":
-                    pdataInst = pdata[ itemCount - 1 ];
-                    var offset : Number = this[ axis.unscaled ] - ( pdataInst[ axis.pos ] + pdata[ itemCount - 1 ][ axis.EOM ] * pdataInst.scale );
-                    for ( var i : int = 0; i < itemCount; i++ )
-                    {
-                        pdata[ i ][ axis.pos ] += offset;
-                    }
-                    break;
-                case "left":
-                case "top":
-                    break;
-                case "center":
-                default:
-                    var midIndex : int = Math.floor( itemCount / 2 );
-                    pdataInst = pdata[ itemCount - 1 ];
-                    var rightPos : Number = pdataInst[ axis.pos ] + pdataInst[ axis.EOM ] * pdataInst.scale;
-                    offset = ( this[ axis.unscaled ] / 2 - ( rightPos ) / 2 );
-                    for ( i = 0; i < itemCount; i++ )
-                    {
-                        pdata[ i ][ axis.pos ] += offset;
-                    }
-                    break;
-            }
-        }
-
-        /**
-         * overridden in the subclasses
-         */
-        protected function generateLayout() : void
-        {
-        }
-
-        override protected function updateDisplayList( unscaledWidth : Number, unscaledHeight : Number ) : void
-        {
-            graphics.clear();
-            graphics.moveTo( 0, 0 );
-            graphics.beginFill( 0, 0 );
-            graphics.drawRect( 0, 0, unscaledWidth, unscaledHeight );
-            // update the mask
-            mask.width = unscaledWidth;
-            mask.height = unscaledHeight;
-            animator.invalidateLayout();
-        }
-
-        override public function styleChanged( styleProp : String ) : void
-        {
-            if ( styleProp == "animationSpeed" )
-                animator.animationSpeed = getStyle( "animationSpeed" );
-            invalidateSize();
-            invalidateDisplayList();
-            animator.invalidateLayout();
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/resources/examples/FlexPMD115.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/resources/examples/FlexPMD115.as b/FlexPMD/as3-parser/src/test/resources/examples/FlexPMD115.as
deleted file mode 100644
index ca9191c..0000000
--- a/FlexPMD/as3-parser/src/test/resources/examples/FlexPMD115.as
+++ /dev/null
@@ -1,22 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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 foo.bar 
-{
-	public function baz() : void { }
-} 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/resources/examples/FlexPMD195.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/resources/examples/FlexPMD195.as b/FlexPMD/as3-parser/src/test/resources/examples/FlexPMD195.as
deleted file mode 100644
index 65ba179..0000000
--- a/FlexPMD/as3-parser/src/test/resources/examples/FlexPMD195.as
+++ /dev/null
@@ -1,51 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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
-{
-	import flash.display.Sprite;
-	
-	public class FlexPMD195 extends Sprite {
-		public function computeJustifyAdjustment(lineArray:Array, firstLineIndex:int, numLines:int):Number
-		{
-			adj = 0;
-			
-			if (numLines == 1)
-			{
-				return 0; // do nothing
-			}
-			
-			// first line unchanged
-			var firstLine:IVerticalJustificationLine = lineArray[firstLineIndex];
-			var firstBaseLine:Number = getBaseline(firstLine);
-			
-			// descent of the last line on the bottom of the frame
-			var lastLine:IVerticalJustificationLine = lineArray[firstLineIndex + numLines - 1];
-			var frameBottom:Number = _textFrame.compositionHeight - Number(_textFrame.effectivePaddingBottom);
-			var allowance:Number = frameBottom - getBottomOfLine(lastLine);
-			if (allowance < 0)
-			{
-				return 0; // Some text scrolled out; don't justify
-			}
-			var lastBaseLine:Number = getBaseline(lastLine);
-			
-			adj = allowance/(lastBaseLine - firstBaseLine); // multiplicative factor by which the space between consecutive lines is increased
-			return adj;
-		} 
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/resources/examples/FlexPMD62.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/resources/examples/FlexPMD62.as b/FlexPMD/as3-parser/src/test/resources/examples/FlexPMD62.as
deleted file mode 100644
index 8f8bba7..0000000
--- a/FlexPMD/as3-parser/src/test/resources/examples/FlexPMD62.as
+++ /dev/null
@@ -1,35 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.test.testy.ui.components {
-	
-	import flash.display.Sprite;
-	
-	public class Link extends Sprite {
-		
-		protected var _linkText:String = ''; // NO PMD
-		protected var _style:String;
-		
-		public function Link(text:String = '', style:String = null) // NO PMD
-		{
-			_style = style;
-			_linkText = text;
-		}
-		
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/resources/examples/FlexPMD98.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/resources/examples/FlexPMD98.as b/FlexPMD/as3-parser/src/test/resources/examples/FlexPMD98.as
deleted file mode 100644
index 353395b..0000000
--- a/FlexPMD/as3-parser/src/test/resources/examples/FlexPMD98.as
+++ /dev/null
@@ -1,440 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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
-{
-	import flash.display.*;
-	import flash.events.Event;
-	import flash.text.*;
-	import flash.utils.*;
-	
-	/**
-	 *   An app to test function call performance
-	 *   @author Jackson Dunstan
-	 */
-	public class FunctionPerformanceTest extends Base implements IInterface
-	{
-		private function privateFunction(): void {}
-		protected function protectedFunction(): void {}
-		internal function internalFunction(): void {}
-		public function publicFunction(): void {}
-		
-		private function get privateGetFunction(): int { return 0; }
-		protected function get protectedGetFunction(): int { return 0; }
-		internal function get internalGetFunction(): int { return 0; }
-		public function get publicGetFunction(): int { return 0; }
-		
-		private function set privateSetFunction(val:int): void {}
-		protected function set protectedSetFunction(val:int): void {}
-		internal function set internalSetFunction(val:int): void {}
-		public function set publicSetFunction(val:int): void {}
-		
-		private static function staticPrivateFunction(): void {}
-		protected static function staticProtectedFunction(): void {}
-		internal static function staticInternalFunction(): void {}
-		public static function staticPublicFunction(): void {}
-		
-		override protected function overrideProtectedFunction(): void {}
-		override internal function overrideInternalFunction(): void {}
-		override public function overridePublicFunction(): void {}
-		
-		final private function finalPrivateFunction(): void {}
-		final protected function finalProtectedFunction(): void {}
-		final internal function finalInternalFunction(): void {}
-		final public function finalPublicFunction(): void {}
-		
-		final override protected function finalOverrideProtectedFunction(): void {}
-		final override internal function finalOverrideInternalFunction(): void {}
-		final override public function finalOverridePublicFunction(): void {}
-		
-		public function interfaceFunction(): void {}
-		
-		private var __logger:TextField; 
-		
-		/**
-		 *   Application entry point
-		 */
-		public function FunctionPerformanceTest()
-		{
-			stage.align = StageAlign.TOP_LEFT;
-			stage.scaleMode = StageScaleMode.NO_SCALE;
-			__logger = new TextField();
-			__logger.autoSize = TextFieldAutoSize.LEFT;
-			addChild(__logger);
-			
-			addEventListener(Event.ENTER_FRAME, testDynamicFunctions);
-		}
-		
-		private function testDynamicFunctions(ev:Event): void
-		{
-			var beforeTime:int;
-			var i:int;
-			const NUM_ITERATIONS:int = 10000000;
-			
-			function localFunction(): void {}
-			var functionVarFunction:Function = function(): void {}
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				plainFunction();
-			}
-			log("Plain: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				localFunction();
-			}
-			log("Local: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				functionVarFunction();
-			}
-			log("Function var: " + (getTimer()-beforeTime));
-			
-			log("");
-			
-			removeEventListener(Event.ENTER_FRAME, testDynamicFunctions);
-			addEventListener(Event.ENTER_FRAME, testMethods);
-		}
-		
-		private function testMethods(ev:Event): void
-		{
-			var beforeTime:int;
-			var i:int;
-			const NUM_ITERATIONS:int = 10000000;
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				privateFunction();
-			}
-			log("Private: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				protectedFunction();
-			}
-			log("Protected: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				internalFunction();
-			}
-			log("Internal: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				publicFunction();
-			}
-			log("Public: " + (getTimer()-beforeTime));
-			
-			log("");
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				this.privateFunction();
-			}
-			log("this.Private: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				this.protectedFunction();
-			}
-			log("this.Protected: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				this.internalFunction();
-			}
-			log("this.Internal: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				this.publicFunction();
-			}
-			log("this.Public: " + (getTimer()-beforeTime));
-			
-			log("");
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				staticPrivateFunction();
-			}
-			log("Static private: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				staticProtectedFunction();
-			}
-			log("Static protected: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				staticInternalFunction();
-			}
-			log("Static internal: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				staticPublicFunction();
-			}
-			log("Static public: " + (getTimer()-beforeTime));
-			
-			log("");
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				overrideProtectedFunction();
-			}
-			log("Override protected: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				overrideInternalFunction();
-			}
-			log("Override internal: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				overridePublicFunction();
-			}
-			log("Override public: " + (getTimer()-beforeTime));
-			
-			log("");
-			
-			removeEventListener(Event.ENTER_FRAME, testMethods);
-			addEventListener(Event.ENTER_FRAME, testSupersAndInterfaces);
-		}
-		
-		private function testSupersAndInterfaces(ev:Event): void
-		{
-			var beforeTime:int;
-			var i:int;
-			const NUM_ITERATIONS:int = 10000000;
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				super.overrideProtectedFunction();
-			}
-			log("Super protected: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				super.overrideInternalFunction();
-			}
-			log("Super internal: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				super.overridePublicFunction();
-			}
-			log("Super public: " + (getTimer()-beforeTime));
-			
-			log("");
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				interfaceFunction();
-			}
-			log("Interface direct: " + (getTimer()-beforeTime));
-			
-			var inter:IInterface = this;
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				inter.interfaceFunction();
-			}
-			log("Interface via interface: " + (getTimer()-beforeTime));
-			
-			var clazz:FunctionPerformanceTest = this;
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				clazz.interfaceFunction();
-			}
-			log("Interface via class: " + (getTimer()-beforeTime));
-			
-			log("");
-			
-			removeEventListener(Event.ENTER_FRAME, testSupersAndInterfaces);
-			addEventListener(Event.ENTER_FRAME, testGettersAndSetters);
-		}
-		
-		private function testGettersAndSetters(ev:Event): void
-		{
-			var beforeTime:int;
-			var i:int;
-			const NUM_ITERATIONS:int = 10000000;
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				privateGetFunction;
-			}
-			log("Private Get: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				protectedGetFunction;
-			}
-			log("Protected Get: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				internalGetFunction;
-			}
-			log("Internal Get: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				publicGetFunction;
-			}
-			log("Public Get: " + (getTimer()-beforeTime));
-			
-			log("");
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				privateSetFunction = 0;
-			}
-			log("Private Set: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				protectedSetFunction = 0;
-			}
-			log("Protected Set: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				internalSetFunction = 0;
-			}
-			log("Internal Set: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				publicSetFunction = 0;
-			}
-			log("Public Set: " + (getTimer()-beforeTime));
-			
-			log("");
-			
-			removeEventListener(Event.ENTER_FRAME, testGettersAndSetters);
-			addEventListener(Event.ENTER_FRAME, testFinals);
-		}
-		
-		private function testFinals(ev:Event): void
-		{
-			var beforeTime:int;
-			var i:int;
-			const NUM_ITERATIONS:int = 10000000;
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				finalPrivateFunction();
-			}
-			log("Final Private: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				finalProtectedFunction();
-			}
-			log("Final Protected: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				finalInternalFunction();
-			}
-			log("Final Internal: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				finalPublicFunction();
-			}
-			log("Final Public: " + (getTimer()-beforeTime));
-			
-			log("");
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				finalOverrideProtectedFunction();
-			}
-			log("Final Override protected: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				finalOverrideInternalFunction();
-			}
-			log("Final Override internal: " + (getTimer()-beforeTime));
-			
-			beforeTime = getTimer();
-			for (i = 0; i < NUM_ITERATIONS; ++i)
-			{
-				finalOverridePublicFunction();
-			}
-			log("Final Override public: " + (getTimer()-beforeTime));
-			
-			removeEventListener(Event.ENTER_FRAME, testFinals);
-		}
-		
-		private function log(msg:*): void
-		{
-			__logger.appendText(msg + "\n");
-		}
-	}
-}
-function plainFunction(): void {}
-interface IInterface
-{
-	function interfaceFunction(): void;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/src/test/resources/examples/JPEGEncoder.as
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/src/test/resources/examples/JPEGEncoder.as b/FlexPMD/as3-parser/src/test/resources/examples/JPEGEncoder.as
deleted file mode 100644
index c3c85cc..0000000
--- a/FlexPMD/as3-parser/src/test/resources/examples/JPEGEncoder.as
+++ /dev/null
@@ -1,669 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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
-{
-	import flash.display.BitmapData;
-	import flash.utils.ByteArray;
-	
-	public final class JPEGEncoder
-	{
-		// Static table initialization
-		private const ZigZag:Vector.<int> = Vector.<int>([
-			0, 1, 5, 6,14,15,27,28,
-			2, 4, 7,13,16,26,29,42,
-			3, 8,12,17,25,30,41,43,
-			9,11,18,24,31,40,44,53,
-			10,19,23,32,39,45,52,54,
-			20,22,33,38,46,51,55,60,
-			21,34,37,47,50,56,59,61,
-			35,36,48,49,57,58,62,63
-		]);
-		private var YTable:Vector.<int> = new Vector.<int>(64, true);
-		private var UVTable:Vector.<int> = new Vector.<int>(64, true);
-		private var outputfDCTQuant:Vector.<int> = new Vector.<int>(64, true);
-		private var fdtbl_Y:Vector.<Number> = new Vector.<Number>(64, true);
-		private var fdtbl_UV:Vector.<Number> = new Vector.<Number>(64, true);
-		private var sf:int;
-		
-		private const aasf:Vector.<Number> = Vector.<Number>([
-			1.0, 1.387039845, 1.306562965, 1.175875602,
-			1.0, 0.785694958, 0.541196100, 0.275899379
-		]);
-		
-		private var YQT:Vector.<int> = Vector.<int>([
-			16, 11, 10, 16, 24, 40, 51, 61,
-			12, 12, 14, 19, 26, 58, 60, 55,
-			14, 13, 16, 24, 40, 57, 69, 56,
-			14, 17, 22, 29, 51, 87, 80, 62,
-			18, 22, 37, 56, 68,109,103, 77,
-			24, 35, 55, 64, 81,104,113, 92,
-			49, 64, 78, 87,103,121,120,101,
-			72, 92, 95, 98,112,100,103, 99
-		]);
-		
-		private const UVQT:Vector.<int> = Vector.<int>([
-			17, 18, 24, 47, 99, 99, 99, 99,
-			18, 21, 26, 66, 99, 99, 99, 99,
-			24, 26, 56, 99, 99, 99, 99, 99,
-			47, 66, 99, 99, 99, 99, 99, 99,
-			99, 99, 99, 99, 99, 99, 99, 99,
-			99, 99, 99, 99, 99, 99, 99, 99,
-			99, 99, 99, 99, 99, 99, 99, 99,
-			99, 99, 99, 99, 99, 99, 99, 99
-		]);
-		
-		private function initQuantTables(sf:int):void
-		{
-			var i:int;
-			const I64:int = 64;
-			const I8:int = 8;
-			for (i = 0; i < I64; ++i)
-			{
-				var t:int = int((YQT[i]*sf+50)*0.01);
-				if (t < 1) {
-					t = 1;
-				} else if (t > 255) {
-					t = 255;
-				}
-				YTable[ZigZag[i]] = t;
-			}
-			
-			for (i = 0; i < I64; i++)
-			{
-				var u:int = int((UVQT[i]*sf+50)*0.01);
-				if (u < 1) {
-					u = 1;
-				} else if (u > 255) {
-					u = 255;
-				}
-				UVTable[ZigZag[i]] = u;
-			}
-			i = 0;
-			for (var row:int = 0; row < I8; ++row)
-			{
-				for (var col:int = 0; col < I8; ++col)
-				{
-					fdtbl_Y[i]  = (1 / (YTable [ZigZag[i]] * aasf[row] * aasf[col] * I8));
-					fdtbl_UV[i] = (1 / (UVTable[ZigZag[i]] * aasf[row] * aasf[col] * I8));
-					i++;
-				}
-			}
-		}
-		
-		private var YDC_HT:Vector.<BitString>;
-		private var UVDC_HT:Vector.<BitString>;
-		private var YAC_HT:Vector.<BitString>;
-		private var UVAC_HT:Vector.<BitString>;
-		
-		private function computeHuffmanTbl(nrcodes:Vector.<int>, std_table:Vector.<int>):Vector.<BitString>
-		{
-			var codevalue:int = 0;
-			var pos_in_table:int = 0;
-			var HT:Vector.<BitString> = new Vector.<BitString>(251, true);
-			var bitString:BitString;
-			for (var k:int=1; k<=16; ++k)
-			{
-				for (var j:int=1; j<=nrcodes[k]; ++j)
-				{
-					HT[std_table[pos_in_table]] = bitString = new BitString();
-					bitString.val = codevalue;
-					bitString.len = k;
-					pos_in_table++;
-					codevalue++;
-				}
-				codevalue<<=1;
-			}
-			return HT;
-		}
-		
-		private var std_dc_luminance_nrcodes:Vector.<int> = Vector.<int>([0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0]);
-		private var std_dc_luminance_values:Vector.<int> = Vector.<int>([0,1,2,3,4,5,6,7,8,9,10,11]);
-		private var std_ac_luminance_nrcodes:Vector.<int> = Vector.<int>([0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d]);
-		private var std_ac_luminance_values:Vector.<int> = Vector.<int>([0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,
-			0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,
-			0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,
-			0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,
-			0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,
-			0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28,
-			0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,
-			0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,
-			0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
-			0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,
-			0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,
-			0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89,
-			0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,
-			0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,
-			0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,
-			0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,
-			0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,
-			0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,
-			0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,
-			0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,
-			0xf9,0xfa]);
-		
-		private var std_dc_chrominance_nrcodes:Vector.<int> = Vector.<int>([0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0]);
-		private var std_dc_chrominance_values:Vector.<int> = Vector.<int>([0,1,2,3,4,5,6,7,8,9,10,11]);
-		private var std_ac_chrominance_nrcodes:Vector.<int> = Vector.<int>([0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77]);
-		private var std_ac_chrominance_values:Vector.<int> = Vector.<int>([0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21,
-			0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,
-			0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91,
-			0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,
-			0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,
-			0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,
-			0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38,
-			0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,
-			0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,
-			0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,
-			0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,
-			0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,
-			0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,
-			0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,
-			0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,
-			0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,
-			0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,
-			0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,
-			0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,
-			0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,
-			0xf9,0xfa
-		]);
-		
-		private function initHuffmanTbl():void
-		{
-			YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values);
-			UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values);
-			YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values);
-			UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values);
-		}
-		
-		private var bitcode:Vector.<BitString> = new Vector.<BitString>(65535, true);
-		private var category:Vector.<int> = new Vector.<int>(65535, true);
-		
-		private function initCategoryNumber():void
-		{
-			var nrlower:int = 1;
-			var nrupper:int = 2;
-			var bitString:BitString;
-			const I15:int = 15;
-			var pos:int;
-			for (var cat:int=1; cat<=I15; ++cat)
-			{
-				//Positive numbers
-				for (var nr:int=nrlower; nr<nrupper; ++nr)
-				{
-					pos = int(32767+nr);
-					category[pos] = cat;
-					bitcode[pos] = bitString = new BitString();
-					bitString.len = cat;
-					bitString.val = nr;
-				}
-				//Negative numbers
-				for (var nrneg:int=-(nrupper-1); nrneg<=-nrlower; ++nrneg)
-				{
-					pos = int(32767+nrneg);
-					category[pos] = cat;
-					bitcode[pos] = bitString = new BitString();
-					bitString.len = cat;
-					bitString.val = nrupper-1+nrneg;
-				}
-				nrlower <<= 1;
-				nrupper <<= 1;
-			}
-		}
-		
-		// IO functions
-		
-		private var byteout:ByteArray;
-		private var bytenew:int = 0;
-		private var bytepos:int = 7;
-		
-		private function writeBits(bs:BitString):void
-		{
-			var value:int = bs.val;
-			var posval:int = bs.len-1;
-			while ( posval >= 0 )
-			{
-				if (value & uint(1 << posval) )
-					bytenew |= uint(1 << bytepos);
-				posval--;
-				bytepos--;
-				if (bytepos < 0)
-				{
-					if (bytenew == 0xFF)
-					{
-						byteout.writeByte(0xFF);
-						byteout.writeByte(0);
-					}
-					else byteout.writeByte(bytenew);
-					bytepos=7;
-					bytenew=0;
-				}
-			}
-		}
-		
-		// DCT & quantization core
-		
-		private function fDCTQuant(data:Vector.<Number>, fdtbl:Vector.<Number>):Vector.<int>
-		{
-			/* Pass 1: process rows. */
-			var dataOff:int=0;
-			var d0:Number, d1:Number, d2:Number, d3:Number, d4:Number, d5:Number, d6:Number, d7:Number;
-			var i:int;
-			const I8:int = 8;
-			const I64:int = 64;
-			for (i=0; i<I8; ++i)
-			{	
-				d0 = data[int(dataOff)];
-				d1 = data[int(dataOff+1)];
-				d2 = data[int(dataOff+2)];
-				d3 = data[int(dataOff+3)];
-				d4 = data[int(dataOff+4)];
-				d5 = data[int(dataOff+5)];
-				d6 = data[int(dataOff+6)];
-				d7 = data[int(dataOff+7)];
-				
-				var tmp0:Number = d0 + d7;
-				var tmp7:Number = d0 - d7;
-				var tmp1:Number = d1 + d6;
-				var tmp6:Number = d1 - d6;
-				var tmp2:Number = d2 + d5;
-				var tmp5:Number = d2 - d5;
-				var tmp3:Number = d3 + d4;
-				var tmp4:Number = d3 - d4;
-				
-				/* Even part */
-				var tmp10:Number = tmp0 + tmp3;	/* phase 2 */
-				var tmp13:Number = tmp0 - tmp3;
-				var tmp11:Number = tmp1 + tmp2;
-				var tmp12:Number = tmp1 - tmp2;
-				
-				data[int(dataOff)] = tmp10 + tmp11; /* phase 3 */
-				data[int(dataOff+4)] = tmp10 - tmp11;
-				
-				var z1:Number = (tmp12 + tmp13) * 0.707106781; /* c4 */
-				data[int(dataOff+2)] = tmp13 + z1; /* phase 5 */
-				data[int(dataOff+6)] = tmp13 - z1;
-				
-				/* Odd part */
-				tmp10 = tmp4 + tmp5; /* phase 2 */
-				tmp11 = tmp5 + tmp6;
-				tmp12 = tmp6 + tmp7;
-				
-				/* The rotator is modified from fig 4-8 to avoid extra negations. */
-				var z5:Number = (tmp10 - tmp12) * 0.382683433; /* c6 */
-				var z2:Number = 0.541196100 * tmp10 + z5; /* c2-c6 */
-				var z4:Number = 1.306562965 * tmp12 + z5; /* c2+c6 */
-				var z3:Number = tmp11 * 0.707106781; /* c4 */
-				
-				var z11:Number = tmp7 + z3;	/* phase 5 */
-				var z13:Number = tmp7 - z3;
-				
-				data[int(dataOff+5)] = z13 + z2;	/* phase 6 */
-				data[int(dataOff+3)] = z13 - z2;
-				data[int(dataOff+1)] = z11 + z4;
-				data[int(dataOff+7)] = z11 - z4;
-				
-				dataOff += 8; /* advance pointer to next row */
-			}
-			
-			/* Pass 2: process columns. */
-			dataOff = 0;
-			for (i=0; i<I8; ++i)
-			{
-				d0 = data[int(dataOff)];
-				d1 = data[int(dataOff + 8)];
-				d2 = data[int(dataOff + 16)];
-				d3 = data[int(dataOff + 24)];
-				d4 = data[int(dataOff + 32)];
-				d5 = data[int(dataOff + 40)];
-				d6 = data[int(dataOff + 48)];
-				d7 = data[int(dataOff + 56)];
-				
-				var tmp0p2:Number = d0 + d7;
-				var tmp7p2:Number = d0 - d7;
-				var tmp1p2:Number = d1 + d6;
-				var tmp6p2:Number = d1 - d6;
-				var tmp2p2:Number = d2 + d5;
-				var tmp5p2:Number = d2 - d5;
-				var tmp3p2:Number = d3 + d4;
-				var tmp4p2:Number = d3 - d4;
-				
-				/* Even part */
-				var tmp10p2:Number = tmp0p2 + tmp3p2;	/* phase 2 */
-				var tmp13p2:Number = tmp0p2 - tmp3p2;
-				var tmp11p2:Number = tmp1p2 + tmp2p2;
-				var tmp12p2:Number = tmp1p2 - tmp2p2;
-				
-				data[int(dataOff)] = tmp10p2 + tmp11p2; /* phase 3 */
-				data[int(dataOff+32)] = tmp10p2 - tmp11p2;
-				
-				var z1p2:Number = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */
-				data[int(dataOff+16)] = tmp13p2 + z1p2; /* phase 5 */
-				data[int(dataOff+48)] = tmp13p2 - z1p2;
-				
-				/* Odd part */
-				tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */
-				tmp11p2 = tmp5p2 + tmp6p2;
-				tmp12p2 = tmp6p2 + tmp7p2;
-				
-				/* The rotator is modified from fig 4-8 to avoid extra negations. */
-				var z5p2:Number = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */
-				var z2p2:Number = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */
-				var z4p2:Number = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */
-				var z3p2:Number= tmp11p2 * 0.707106781; /* c4 */
-				
-				var z11p2:Number = tmp7p2 + z3p2;	/* phase 5 */
-				var z13p2:Number = tmp7p2 - z3p2;
-				
-				data[int(dataOff+40)] = z13p2 + z2p2; /* phase 6 */
-				data[int(dataOff+24)] = z13p2 - z2p2;
-				data[int(dataOff+ 8)] = z11p2 + z4p2;
-				data[int(dataOff+56)] = z11p2 - z4p2;
-				
-				dataOff++; /* advance pointer to next column */
-			}
-			
-			// Quantize/descale the coefficients
-			var fDCTQuant:Number;
-			for (i=0; i<I64; ++i)
-			{
-				// Apply the quantization and scaling factor & Round to nearest integer
-				fDCTQuant = data[int(i)]*fdtbl[int(i)];
-				outputfDCTQuant[int(i)] = (fDCTQuant > 0.0) ? int(fDCTQuant + 0.5) : int(fDCTQuant - 0.5);
-			}
-			return outputfDCTQuant;
-		}
-		
-		// Chunk writing
-		private function writeAPP0():void
-		{
-			byteout.writeShort(0xFFE0); // marker
-			byteout.writeShort(16); // length
-			byteout.writeByte(0x4A); // J
-			byteout.writeByte(0x46); // F
-			byteout.writeByte(0x49); // I
-			byteout.writeByte(0x46); // F
-			byteout.writeByte(0); // = "JFIF",'\0'
-			byteout.writeByte(1); // versionhi
-			byteout.writeByte(1); // versionlo
-			byteout.writeByte(0); // xyunits
-			byteout.writeShort(1); // xdensity
-			byteout.writeShort(1); // ydensity
-			byteout.writeByte(0); // thumbnwidth
-			byteout.writeByte(0); // thumbnheight
-		}
-		
-		private function writeSOF0(width:int, height:int):void
-		{
-			byteout.writeShort(0xFFC0); // marker
-			byteout.writeShort(17);   // length, truecolor YUV JPG
-			byteout.writeByte(8);    // precision
-			byteout.writeShort(height);
-			byteout.writeShort(width);
-			byteout.writeByte(3);    // nrofcomponents
-			byteout.writeByte(1);    // IdY
-			byteout.writeByte(0x11); // HVY
-			byteout.writeByte(0);    // QTY
-			byteout.writeByte(2);    // IdU
-			byteout.writeByte(0x11); // HVU
-			byteout.writeByte(1);    // QTU
-			byteout.writeByte(3);    // IdV
-			byteout.writeByte(0x11); // HVV
-			byteout.writeByte(1);    // QTV
-		}
-		
-		private function writeDQT():void
-		{
-			byteout.writeShort(0xFFDB); // marker
-			byteout.writeShort(132);	   // length
-			byteout.writeByte(0);
-			
-			var i:int;
-			const I64:int = 64;
-			for (i=0; i<I64; ++i)
-				byteout.writeByte(YTable[i]);
-			
-			byteout.writeByte(1);
-			
-			for (i=0; i<I64; ++i)
-				byteout.writeByte(UVTable[i]);
-		}
-		
-		private function writeDHT():void
-		{
-			byteout.writeShort(0xFFC4); // marker
-			byteout.writeShort(0x01A2); // length
-			
-			byteout.writeByte(0); // HTYDCinfo
-			var i:int;
-			const I11:int = 11;
-			const I16:int = 16;
-			const I161:int = 161;
-			for (i=0; i<I16; ++i)
-				byteout.writeByte(std_dc_luminance_nrcodes[int(i+1)]);
-			
-			for (i=0; i<=I11; ++i)
-				byteout.writeByte(std_dc_luminance_values[int(i)]);
-			
-			byteout.writeByte(0x10); // HTYACinfo
-			
-			for (i=0; i<I16; ++i)
-				byteout.writeByte(std_ac_luminance_nrcodes[int(i+1)]);
-			
-			for (i=0; i<=I161; ++i)
-				byteout.writeByte(std_ac_luminance_values[int(i)]);
-			
-			byteout.writeByte(1); // HTUDCinfo
-			
-			for (i=0; i<I16; ++i)
-				byteout.writeByte(std_dc_chrominance_nrcodes[int(i+1)]);
-			
-			for (i=0; i<=I11; ++i)
-				byteout.writeByte(std_dc_chrominance_values[int(i)]);
-			
-			byteout.writeByte(0x11); // HTUACinfo
-			
-			for (i=0; i<I16; ++i)
-				byteout.writeByte(std_ac_chrominance_nrcodes[int(i+1)]);
-			
-			for (i=0; i<=I161; ++i)
-				byteout.writeByte(std_ac_chrominance_values[int(i)]);
-		}
-		
-		private function writeSOS():void
-		{
-			byteout.writeShort(0xFFDA); // marker
-			byteout.writeShort(12); // length
-			byteout.writeByte(3); // nrofcomponents
-			byteout.writeByte(1); // IdY
-			byteout.writeByte(0); // HTY
-			byteout.writeByte(2); // IdU
-			byteout.writeByte(0x11); // HTU
-			byteout.writeByte(3); // IdV
-			byteout.writeByte(0x11); // HTV
-			byteout.writeByte(0); // Ss
-			byteout.writeByte(0x3f); // Se
-			byteout.writeByte(0); // Bf
-		}
-		
-		// Core processing
-		internal var DU:Vector.<int> = new Vector.<int>(64, true);
-		
-		private function processDU(CDU:Vector.<Number>, fdtbl:Vector.<Number>, DC:Number, HTDC:Vector.<BitString>, HTAC:Vector.<BitString>):Number
-		{
-			var EOB:BitString = HTAC[0x00];
-			var M16zeroes:BitString = HTAC[0xF0];
-			var pos:int;
-			const I16:int = 16;
-			const I63:int = 63;
-			const I64:int = 64;
-			var DU_DCT:Vector.<int> = fDCTQuant(CDU, fdtbl);
-			//ZigZag reorder
-			for (var j:int=0;j<I64;++j) {
-				DU[ZigZag[j]]=DU_DCT[j];
-			}
-			var Diff:int = DU[0] - DC; DC = DU[0];
-			//Encode DC
-			if (Diff==0) {
-				writeBits(HTDC[0]); // Diff might be 0
-			} else {
-				pos = int(32767+Diff);
-				writeBits(HTDC[category[pos]]);
-				writeBits(bitcode[pos]);
-			}
-			//Encode ACs
-			const end0pos:int = 63;
-			for (; (end0pos>0)&&(DU[end0pos]==0); end0pos--) {};
-			//end0pos = first element in reverse order !=0
-			if ( end0pos == 0) {
-				writeBits(EOB);
-				return DC;
-			}
-			var i:int = 1;
-			var lng:int;
-			while ( i <= end0pos ) {
-				var startpos:int = i;
-				for (; (DU[i]==0) && (i<=end0pos); ++i) {}
-				var nrzeroes:int = i-startpos;
-				if ( nrzeroes >= I16 ) {
-					lng = nrzeroes>>4;
-					for (var nrmarker:int=1; nrmarker <= lng; ++nrmarker)
-						writeBits(M16zeroes);
-					nrzeroes = int(nrzeroes&0xF);
-				}
-				pos = int(32767+DU[i]);
-				writeBits(HTAC[int((nrzeroes<<4)+category[pos])]);
-				writeBits(bitcode[pos]);
-				i++;
-			}
-			if ( end0pos != I63 ) {
-				writeBits(EOB);
-			}
-			return DC;
-		}
-		
-		private var YDU:Vector.<Number> = new Vector.<Number>(64, true);
-		private var UDU:Vector.<Number> = new Vector.<Number>(64, true);
-		private var VDU:Vector.<Number> = new Vector.<Number>(64, true);
-		
-		private function RGB2YUV(img:BitmapData, xpos:int, ypos:int):void
-		{
-			var pos:int=0;
-			const I8:int = 8;
-			for (var y:int=0; y<I8; ++y) {
-				for (var x:int=0; x<I8; ++x) {
-					var P:uint = img.getPixel32(xpos+x,ypos+y);
-					var R:int = (P>>16)&0xFF;
-					var G:int = (P>> 8)&0xFF;
-					var B:int = (P    )&0xFF;
-					YDU[int(pos)]=((( 0.29900)*R+( 0.58700)*G+( 0.11400)*B))-0x80;
-					UDU[int(pos)]=(((-0.16874)*R+(-0.33126)*G+( 0.50000)*B));
-					VDU[int(pos)]=((( 0.50000)*R+(-0.41869)*G+(-0.08131)*B));
-					++pos;
-				}
-			}
-		}
-		
-		public function JPEGEncoder(quality:int=50)
-		{
-			if (quality <= 0)
-				quality = 1;
-			
-			if (quality > 100)
-				quality = 100;
-			
-			sf = quality < 50 ? int(5000 / quality) : int(200 - (quality<<1));
-			init();
-		}
-		
-		private function init():void
-		{
-			ZigZag.fixed = true;
-			aasf.fixed = true;
-			YQT.fixed = true;
-			UVQT.fixed = true;
-			std_ac_chrominance_nrcodes.fixed = true;
-			std_ac_chrominance_values.fixed = true;
-			std_ac_luminance_nrcodes.fixed = true;
-			std_ac_luminance_values.fixed = true;
-			std_dc_chrominance_nrcodes.fixed = true;
-			std_dc_chrominance_values.fixed = true;
-			std_dc_luminance_nrcodes.fixed = true;
-			std_dc_luminance_values.fixed = true;
-			// Create tables
-			initHuffmanTbl();
-			initCategoryNumber();
-			initQuantTables(sf);
-		}
-		
-		public function encode(image:BitmapData):ByteArray
-		{
-			// Initialize bit writer
-			byteout = new ByteArray();
-			
-			bytenew=0;
-			bytepos=7;
-			
-			// Add JPEG headers
-			byteout.writeShort(0xFFD8); // SOI
-			writeAPP0();
-			writeDQT();
-			writeSOF0(image.width,image.height);
-			writeDHT();
-			writeSOS();
-			
-			// Encode 8x8 macroblocks
-			var DCY:Number=0;
-			var DCU:Number=0;
-			var DCV:Number=0;
-			bytenew=0;
-			bytepos=7;
-			
-			var width:int = image.width;
-			var height:int = image.height;
-			
-			for (var ypos:int=0; ypos<height; ypos+=8)
-			{
-				for (var xpos:int=0; xpos<width; xpos+=8)
-				{
-					RGB2YUV(image, xpos, ypos);
-					DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);
-					DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);
-					DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);
-				}
-			}
-			
-			// Do the bit alignment of the EOI marker
-			if ( bytepos >= 0 )
-			{
-				var fillbits:BitString = new BitString();
-				fillbits.len = bytepos+1;
-				fillbits.val = (1<<(bytepos+1))-1;
-				writeBits(fillbits);
-			}
-			byteout.writeShort(0xFFD9); //EOI
-			return byteout;
-		}
-	}
-}
-
-final class BitString
-{
-	public var len:int = 0;
-	public var val:int = 0;
-}
\ No newline at end of file


[04/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

Posted by cd...@apache.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/switchrules/IdenticalSwitchCasesRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/switchrules/IdenticalSwitchCasesRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/switchrules/IdenticalSwitchCasesRuleTest.java
new file mode 100644
index 0000000..12b860e
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/switchrules/IdenticalSwitchCasesRuleTest.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.switchrules;
+
+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 IdenticalSwitchCasesRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.LongSwitch.as", new ViolationPosition[]
+      { new ViolationPosition( 58 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new IdenticalSwitchCasesRule();
+   }
+}

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/switchrules/NestedSwitchRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/switchrules/NestedSwitchRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/switchrules/NestedSwitchRuleTest.java
new file mode 100644
index 0000000..be995c4
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/switchrules/NestedSwitchRuleTest.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.switchrules;
+
+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 NestedSwitchRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.LongSwitch.as", new ViolationPosition[]
+       { new ViolationPosition( 53 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.NestedSwitch.as", new ViolationPosition[]
+                  { new ViolationPosition( 43 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new NestedSwitchRule();
+   }
+}

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/switchrules/NonBreakableSwitchCaseRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/switchrules/NonBreakableSwitchCaseRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/switchrules/NonBreakableSwitchCaseRuleTest.java
new file mode 100644
index 0000000..e6ec6de
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/switchrules/NonBreakableSwitchCaseRuleTest.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.switchrules;
+
+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 NonBreakableSwitchCaseRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.LongSwitch.as", new ViolationPosition[]
+      { new ViolationPosition( 134 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new NonBreakableSwitchCaseRule();
+   }
+}

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/switchrules/SwitchStatementsShouldHaveDefaultRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/switchrules/SwitchStatementsShouldHaveDefaultRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/switchrules/SwitchStatementsShouldHaveDefaultRuleTest.java
new file mode 100644
index 0000000..e581a14
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/switchrules/SwitchStatementsShouldHaveDefaultRuleTest.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.switchrules;
+
+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 SwitchStatementsShouldHaveDefaultRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.LongSwitch.as", new ViolationPosition[]
+       { new ViolationPosition( 53 ),
+                   new ViolationPosition( 41 ),
+                   new ViolationPosition( 92 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.NestedSwitch.as", new ViolationPosition[]
+                  { new ViolationPosition( 43 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new SwitchStatementsShouldHaveDefaultRule();
+   }
+}

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/switchrules/TooFewBrancheInSwitchStatementRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/switchrules/TooFewBrancheInSwitchStatementRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/switchrules/TooFewBrancheInSwitchStatementRuleTest.java
new file mode 100644
index 0000000..060a151
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/switchrules/TooFewBrancheInSwitchStatementRuleTest.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.switchrules;
+
+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 TooFewBrancheInSwitchStatementRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.LongSwitch.as", new ViolationPosition[]
+       { new ViolationPosition( 53 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.NestedSwitch.as", new ViolationPosition[]
+                  { new ViolationPosition( 43 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new TooFewBrancheInSwitchStatementRule();
+   }
+}

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/unused/EmptyPrivateMethodRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/unused/EmptyPrivateMethodRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/unused/EmptyPrivateMethodRuleTest.java
new file mode 100644
index 0000000..4ce2bfc
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/unused/EmptyPrivateMethodRuleTest.java
@@ -0,0 +1,49 @@
+/*
+ * 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.unused;
+
+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 EmptyPrivateMethodRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.FlexPMD97.as", new ViolationPosition[]
+       { new ViolationPosition( 39 ) } ),
+                  new ExpectedViolation( "Sorted.as", new ViolationPosition[]
+                  { new ViolationPosition( 62 ),
+                              new ViolationPosition( 71 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.BigModel.as", new ViolationPosition[]
+                  { new ViolationPosition( 82 ),
+                              new ViolationPosition( 86 ),
+                              new ViolationPosition( 90 ),
+                              new ViolationPosition( 94 ),
+                              new ViolationPosition( 98 ) } ),
+                  new ExpectedViolation( "cairngorm.events.CorrectConstantEvent.as", new ViolationPosition[]
+                  { new ViolationPosition( 53 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new EmptyPrivateMethodRule();
+   }
+}

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/unused/UnusedFieldRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/unused/UnusedFieldRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/unused/UnusedFieldRuleTest.java
new file mode 100644
index 0000000..d106a07
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/unused/UnusedFieldRuleTest.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.unused;
+
+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 UnusedFieldRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "Responder.as", new ViolationPosition[]
+       { new ViolationPosition( 37 ) } ),
+                  new ExpectedViolation( "Sorted.as", new ViolationPosition[]
+                  { new ViolationPosition( 54 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.BigModel.as", new ViolationPosition[]
+                  { new ViolationPosition( 42 ) } ),
+                  new ExpectedViolation( "Title.as", new ViolationPosition[]
+                  { new ViolationPosition( 41 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UnusedFieldRule();
+   }
+}

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/unused/UnusedLocalVariableRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/unused/UnusedLocalVariableRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/unused/UnusedLocalVariableRuleTest.java
new file mode 100644
index 0000000..c18fc9d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/unused/UnusedLocalVariableRuleTest.java
@@ -0,0 +1,84 @@
+/*
+ * 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.unused;
+
+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 UnusedLocalVariableRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "src.epg.StateExit_AS2.as", new ViolationPosition[]
+       { new ViolationPosition( 62 ),
+                   new ViolationPosition( 63 ),
+                   new ViolationPosition( 67 ),
+                   new ViolationPosition( 68 ),
+                   new ViolationPosition( 69 ),
+                   new ViolationPosition( 70 ),
+                   new ViolationPosition( 71 ),
+                   new ViolationPosition( 72 ),
+                   new ViolationPosition( 73 ),
+                   new ViolationPosition( 74 ),
+                   new ViolationPosition( 75 ),
+                   new ViolationPosition( 76 ),
+                   new ViolationPosition( 77 ) } ),
+                  new ExpectedViolation( "DeleteButtonRenderer.mxml", new ViolationPosition[]
+                  { new ViolationPosition( 69 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.VoidConstructor.as", new ViolationPosition[]
+                  { new ViolationPosition( 40 ) } ),
+                  new ExpectedViolation( "RadonDataGrid.as", new ViolationPosition[]
+                  { new ViolationPosition( 100 ),
+                              new ViolationPosition( 101 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.BigModel.as", new ViolationPosition[]
+                  { new ViolationPosition( 47 ) } ),
+                  new ExpectedViolation( "UnboundMetadata.as", new ViolationPosition[]
+                  { new ViolationPosition( 50 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.BigImporterModel.as", new ViolationPosition[]
+                  { new ViolationPosition( 64 ) } ),
+                  new ExpectedViolation( "GenericType.as", new ViolationPosition[]
+                  { new ViolationPosition( 46 ) } ),
+                  new ExpectedViolation( "ErrorToltipSkin.as", new ViolationPosition[]
+                  { new ViolationPosition( 163 ),
+                              new ViolationPosition( 165 ),
+                              new ViolationPosition( 166 ),
+                              new ViolationPosition( 183 ),
+                              new ViolationPosition( 184 ) } ),
+                  new ExpectedViolation( "bug.Duane.mxml", new ViolationPosition[]
+                  { new ViolationPosition( 68 ) } ),
+                  new ExpectedViolation( "bug.FlexPMD88.as", new ViolationPosition[]
+                  { new ViolationPosition( 42 ),
+                              new ViolationPosition( 43 ),
+                              new ViolationPosition( 44 ),
+                              new ViolationPosition( 45 ) } ),
+                  new ExpectedViolation( "flexpmd114.a.Test.as", new ViolationPosition[]
+                  { new ViolationPosition( 42 ) } ),
+                  new ExpectedViolation( "flexpmd114.b.Test.as", new ViolationPosition[]
+                  { new ViolationPosition( 42 ) } ),
+                  new ExpectedViolation( "flexpmd114.c.Test.as", new ViolationPosition[]
+                  { new ViolationPosition( 42 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UnusedLocalVariableRule();
+   }
+}

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/unused/UnusedParameterRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/unused/UnusedParameterRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/unused/UnusedParameterRuleTest.java
new file mode 100644
index 0000000..74660db
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/unused/UnusedParameterRuleTest.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.unused;
+
+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 UnusedParameterRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      new LinkedHashMap< String, ViolationPosition[] >();
+
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "FileReferenceList.as", new ViolationPosition[]
+       { new ViolationPosition( 70 ) } ),
+                  new ExpectedViolation( "cairngorm.NonBindableModelLocator.as", new ViolationPosition[]
+                  { new ViolationPosition( 43 ) } ),
+                  new ExpectedViolation( "bug.FlexPMD232.as", new ViolationPosition[]
+                  { new ViolationPosition( 35 ),
+                              new ViolationPosition( 35 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.BigImporterModel.as", new ViolationPosition[]
+                  { new ViolationPosition( 62 ),
+                              new ViolationPosition( 62 ),
+                              new ViolationPosition( 62 ) } ),
+                  new ExpectedViolation( "Sorted.as", new ViolationPosition[]
+                  { new ViolationPosition( 67 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UnusedParameterRule();
+   }
+}

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/unused/UnusedPrivateMethodRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/unused/UnusedPrivateMethodRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/unused/UnusedPrivateMethodRuleTest.java
new file mode 100644
index 0000000..a2c9f5c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/unused/UnusedPrivateMethodRuleTest.java
@@ -0,0 +1,49 @@
+/*
+ * 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.unused;
+
+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 UnusedPrivateMethodRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.Duane.mxml", new ViolationPosition[]
+       { new ViolationPosition( 66 ) } ),
+                  new ExpectedViolation( "Sorted.as", new ViolationPosition[]
+                  { new ViolationPosition( 71 ) } ),
+                  new ExpectedViolation( "cairngorm.LightController.as", new ViolationPosition[]
+                  { new ViolationPosition( 191 ) } ),
+                  new ExpectedViolation( "RadonDataGrid.as", new ViolationPosition[]
+                  { new ViolationPosition( 207 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.BigModel.as", new ViolationPosition[]
+                  { new ViolationPosition( 86 ),
+                              new ViolationPosition( 90 ),
+                              new ViolationPosition( 94 ),
+                              new ViolationPosition( 98 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UnusedPrivateMethodRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/pom.xml
new file mode 100644
index 0000000..f1b8a78
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/pom.xml
@@ -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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-test-resources</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Adobe Flex PMD RuleSet test resources</name>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>make shared resources</id>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/assembly/resources.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/assembly/resources.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/assembly/resources.xml b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/assembly/resources.xml
new file mode 100644
index 0000000..e3287ee
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/assembly/resources.xml
@@ -0,0 +1,31 @@
+<!--
+
+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.
+
+-->
+<assembly>
+    <id>resources</id>
+    <formats>
+        <format>zip</format>
+    </formats>
+    <includeBaseDirectory>false</includeBaseDirectory>
+    <fileSets>
+        <fileSet>
+            <directory>src/main/resources</directory>
+            <outputDirectory></outputDirectory>
+        </fileSet>
+    </fileSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/AbstractRowData.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/AbstractRowData.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/AbstractRowData.as
new file mode 100644
index 0000000..bbf54ce
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/AbstractRowData.as
@@ -0,0 +1,136 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flexUnit.flexui.data
+{
+   import flexunit.flexui.controls.FlexUnitLabelsModelLocator;
+   
+   import mx.binding.utils.ChangeWatcher;
+   import mx.formatters.NumberFormatter;
+   
+   /**
+    * Abstract class representing a row in the test cases tree.
+    * A row can be either a test class (node) or a test case (leaf)
+    */   
+   final public class AbstractRowData
+   {
+      protected var logger : ILogger;
+      public const logger : ILogger;
+                                 public const logger : ILogger = Log.getLogger( "flexUnit.flexui.data.AbstractRowData" );
+                                 public const LOGGER : ILogger = Log.getLogger( "flexUnit.flexui.data.AbstractRowData" );
+                                 public const LOG : ILogger = Log.getLogger( "flexUnit.AbstractRowData" );
+                                 public static const LOG : ILogger = Log.getLogger( "flexUnit.flexui.data.AbstractRowData" );
+                                 public const LOG : ILogger = Log.getLogger( "flexUnit.flexui.data.AbstractRowData" );
+      // public var testIsFailure : Boolean;
+                                 public var objectUse : Object;
+
+      /**
+       * @return the class name from the qualified class name
+       */      
+      /*public function get className() : String
+      {
+         if ( qualifiedClassName )
+         {
+            var splitIndex : int = qualifiedClassName.lastIndexOf( "::" );
+
+            if ( splitIndex >= 0 )
+            {
+               return qualifiedClassName.substring( splitIndex + 2 );
+            }
+         }
+
+         return qualifiedClassName;
+      }*/
+
+      /**
+       * Abstract method. Defined in TestCaseRowData and in TestClassRowData
+       * 
+       * @return the count of assertions which have been made either in average if
+       * the current row is a test class or in total if the current row is a test case
+       */
+       // One line comment
+      public function get assertionsMade() : Number
+      {
+         throw new Error( "TestSummaryRowData::assertionsMade is an abstract method" );
+      }
+
+      public function get failIcon() : Class
+      {
+         throw new Error( "TestSummaryRowData::failIcon is an abstract method" );
+      }
+
+      protected function get passIcon() : Class
+      {
+         throw new Error( "TestSummaryRowData::passIcon is an abstract method" );
+      }
+      
+      /**
+       * Abstract method which allows the legend to be correctly formatted.
+       *  
+       * @return true for the TestClassRowData and false for the TestCaseRowData
+       */      
+      public function get isAverage() : Boolean
+      {
+         throw new Error( "TestSummaryRowData::isAverage is an abstract method" );
+      }
+      
+      public function get formattedAssertionsMade() : String
+      {
+         if(true)
+         {
+         }
+         addEventListener("lalaEvent");
+         CairngormEventDispatcher.getInstance().dispatchEvent(new Event("lalaEvent"));
+         dispatchEvent( new Event( "lalaEvent" ) );
+         dispatchEvent( new Event( EVENT ) );
+         if( true );
+         CairngormEventDispatcher.getInstance().addEventListener(CONSTANT, onHearing);
+         return f.format( assertionsMade );
+      }
+      
+      /**
+       * @return the correcly formatted (no typos) legend for the number of assertions
+       * made.
+       * 
+       * Can return :
+       *  - 0 assertions have been made in average
+       *  - 0 assertions have been made in total
+       *  - 1 assertion has been made in average
+       *  - 1 assertion has been made in total
+       *  - 2 assertions have been made in average
+       *  - 2 assertions have been made in total
+       */      
+      public function get assertionsMadeLegend() : String
+      {
+         return FlexUnitLabels.formatAssertions( 
+                           formattedAssertionsMade,
+                           assertionsMade,
+                           isAverage );
+      }
+      
+      override protected function createChildren() : void
+      {
+         super.createChildren();
+      }
+	  
+	  override protected function updateDisplayList( width : int, height : int ) : void
+	  {
+		  super.updateDisplayList( width * 2, height );
+	  }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/AbstractRowData.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/AbstractRowData.mxml b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/AbstractRowData.mxml
new file mode 100644
index 0000000..c31373b
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/AbstractRowData.mxml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
+                xmlns="*">
+
+    <mx:Script>
+        <![CDATA[
+            public override function closePopup() : void
+            {
+                if ( useWithPopUpWrapper )
+                {
+                    dispatchEvent( new Event( CLOSE_POPUP_EVENT ) );
+                } else
+                {
+                    super.closePopup( event );
+                }
+            }
+        ]]>
+    </mx:Script>
+
+    <mx:Script>
+        <![CDATA[
+            
+        ]]>
+    </mx:Script>
+
+</mx:Application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/BadComponent.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/BadComponent.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/BadComponent.as
new file mode 100644
index 0000000..f45be51
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/BadComponent.as
@@ -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.view
+{
+   import mx.controls.Label;
+   import mx.core.UIComponent;
+   
+   public class BadComponent extends UIComponent
+   {
+      override protected function updateDisplayList( w : Number, h : Number ) : void
+      {
+         super.updateDisplayList( w, h );
+         
+         addChild( new Label() );
+         addChildAt( new Label() );
+         removeChild( new Label() );
+         removeChildAt( 0 );
+      }
+      
+      override protected function createChildren() : void
+      {
+         super.createChildren();
+         
+         addMyChildren();
+      }
+   }   
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Color.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Color.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Color.as
new file mode 100644
index 0000000..aec4604
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Color.as
@@ -0,0 +1,29 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.colors
+
+{
+	
+	public interface Color
+	
+	{
+		function foo() : void;
+	}
+	
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/DefaultNameEvent.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/DefaultNameEvent.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/DefaultNameEvent.as
new file mode 100644
index 0000000..6d95245
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/DefaultNameEvent.as
@@ -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
+{
+	public class DefaultNameEvent extends Event	
+	{
+		public static const DAY_CHANGE : String = "dayChange";
+		public static const DELAYED_MIDNIGHT_REFRESH : String = "delayedMidnightRefresh";
+
+		public function DefaultNameEvent( type : String = "" )
+		{
+			super( type );
+		}
+		
+		override public function clone() : Event
+		{
+			return new DefaultNameEvent( type );
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/DeleteButtonRenderer.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/DeleteButtonRenderer.mxml b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/DeleteButtonRenderer.mxml
new file mode 100644
index 0000000..ea6dfd4
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/DeleteButtonRenderer.mxml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:Button xmlns:mx="http://www.adobe.com/2006/mxml"
+    icon="@Embed(source='/assets/icon_tool_trash2.png')"
+    toolTip="Remove this rule ({ rule.shortName }) from your ruleset..."
+    skin="mx.skins.ProgrammaticSkin"
+    buttonMode="true"
+    click="onClick()"
+    mouseChildren="false"
+    useHandCursor="true"
+    >
+
+    <mx:Metadata>
+       [Event(name="ruleRemoved", type="flash.events.Event")]
+    </mx:Metadata>
+
+    <mx:Script>
+        <![CDATA[
+            import com.adobe.ac.pmd.model.Rule;
+
+            import mx.controls.AdvancedDataGrid;
+            import mx.controls.listClasses.ListBase;
+            import mx.events.FlexEvent;
+            import mx.events.ListEvent;
+
+            public static const RULE_REMOVED : String = "ruleRemoved";
+
+            [Bindable]
+            private var rule : Rule;
+
+            private var grid : AdvancedDataGrid;
+
+            override public function set data( value : Object ) : void
+            {
+                super.data = value;
+
+                rule = value as Rule;
+                var ith : int = -1 + +1 + ith++ + -- ith;
+                if ( grid )
+                {
+                    changeVisibility();
+                }
+            }
+
+            override protected function commitProperties() : void
+            {
+                super.commitProperties();
+
+                grid = AdvancedDataGrid( owner );
+                visible = false;
+                grid.addEventListener( ListEvent.CHANGE, onChange );
+            }
+
+            private function changeVisibility() : void
+            {
+                visible = grid.isItemSelected( data ) && rule != null;
+            }
+
+            private function onChange( event : ListEvent ) : void
+            {
+                changeVisibility();
+            }
+
+            private function onClick() : void
+            {
+                if ( rule )
+                {
+                    rule.remove();
+
+                    dispatchEvent( new Event( RULE_REMOVED, true ) );
+                }
+            }
+        ]]>
+    </mx:Script>
+
+	<mx:states>
+		<mx:State/>
+		<mx:State/>
+		<mx:State/>
+		<mx:State/>
+		<mx:State/>
+	</mx:states>
+
+</mx:Button>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/ErrorToltipSkin.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/ErrorToltipSkin.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/ErrorToltipSkin.as
new file mode 100644
index 0000000..e15d298
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/ErrorToltipSkin.as
@@ -0,0 +1,317 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.radon.core.skin
+{
+
+	import flash.display.GradientType;
+	import flash.display.Graphics;
+	import flash.display.InterpolationMethod;
+	import flash.display.SpreadMethod;
+	import flash.filters.DropShadowFilter;
+	import flash.geom.Matrix;
+
+	import mx.core.EdgeMetrics;
+	import mx.graphics.RectangularDropShadow;
+	import mx.skins.RectangularBorder;
+
+	/**
+	 *  The skin for a ToolTip.
+	 */
+	public class ErrorToolTipSkin extends RectangularBorder
+	{
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Constructor.
+		 */
+		public function ErrorToolTipSkin() 
+		{
+			super(); 
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Variables
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		private var dropShadow:RectangularDropShadow;
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden properties
+		//
+		//--------------------------------------------------------------------------
+
+		//----------------------------------
+		//  borderMetrics
+		//----------------------------------
+
+		/**
+		 *  @private
+		 *  Storage for the borderMetrics property.
+		 */
+		private var _borderMetrics:EdgeMetrics;
+
+		/**
+		 *  @private
+		 */
+		override public function get borderMetrics():EdgeMetrics
+		{     
+			if (_borderMetrics)
+				return _borderMetrics;
+
+			var borderStyle:String = getStyle("borderStyle");
+			switch (borderStyle)
+			{
+				case "errorTipRight":
+				{
+					_borderMetrics = new EdgeMetrics(15, 1, 3, 3);
+					break;
+				}
+
+				case "errorTipAbove":
+				{
+					_borderMetrics = new EdgeMetrics(3, 1, 3, 15);
+					break;
+				}
+
+				case "errorTipBelow":
+				{
+					_borderMetrics = new EdgeMetrics(3, 13, 3, 3);
+					break;
+				}
+
+				default: // "toolTip"
+				{
+					_borderMetrics = new EdgeMetrics(3, 1, 3, 3);
+					break;
+				}
+			}
+
+			return _borderMetrics;
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 *  If borderStyle may have changed, clear the cached border metrics.
+		 */
+		override public function styleChanged(styleProp:String):void
+		{
+			if (styleProp == "borderStyle" ||
+				styleProp == "styleName" ||
+				styleProp == null)
+			{
+				_borderMetrics = null;
+			}
+
+			invalidateDisplayList();
+		}
+
+		/**
+		 *  @private
+		 *  Draw the background and border.
+		 */
+		override protected function updateDisplayList(w:Number, h:Number):void
+		{  
+			super.updateDisplayList(w, h);
+
+			var borderStyle:String = getStyle("borderStyle");
+			var backgroundColor:uint = getStyle("backgroundColor");
+			var backgroundAlpha:Number= getStyle("backgroundAlpha");
+			var borderColor:uint = getStyle("borderColor");
+			var cornerRadius:Number = getStyle("cornerRadius");
+			var shadowColor:uint = getStyle("shadowColor");
+			var shadowAlpha:Number = 0.1;
+
+			var graphics:Graphics = graphics;
+			graphics.clear();
+
+			filters = [];
+
+			var type:String = GradientType.LINEAR;
+			var colors:Array = [0xff8300, 0xff4200];
+			var alphas:Array = [1, 1];
+			var ratios:Array = [0, 125 ];
+			var spreadMethod:String = SpreadMethod.PAD;
+			var interp:String = InterpolationMethod.RGB;
+			var focalPtRatio:Number = 0;
+
+			var matrix:Matrix = new Matrix();
+			var boxRotation:Number = Math.PI/2; // 90Ëš
+			var txx:Number = 0;
+			var tyy:Number = 0;
+
+			switch (borderStyle)
+			{
+				case "toolTip":
+				{
+					// face
+					drawRoundRect(
+						3, 1, w - 6, h - 4, cornerRadius,
+						backgroundColor, backgroundAlpha) 
+
+					if (!dropShadow)
+						dropShadow = new RectangularDropShadow();
+
+					dropShadow.distance = 3;
+					dropShadow.angle = 90;
+					dropShadow.color = 0;
+					dropShadow.alpha = 0.4;
+
+					dropShadow.tlRadius = cornerRadius + 2;
+					dropShadow.trRadius = cornerRadius + 2;
+					dropShadow.blRadius = cornerRadius + 2;
+					dropShadow.brRadius = cornerRadius + 2;
+
+					dropShadow.drawShadow(graphics, 3, 0, w - 6, h - 4);
+
+					break;
+				}
+
+				case "errorTipRight":
+				{
+					// border 
+					matrix.createGradientBox(w - 11, h - 2, boxRotation, tx, ty);
+					graphics.beginGradientFill(
+						type, 
+						colors,
+						alphas,
+						ratios, 
+						matrix, 
+						spreadMethod, 
+						interp, 
+						focalPtRatio);
+
+					drawRoundRect(
+						11, 0, w - 11, h - 2, 0 );
+
+					// left pointer 
+					graphics.beginGradientFill(
+						type, 
+						colors,
+						alphas,
+						ratios, 
+						matrix, 
+						spreadMethod, 
+						interp, 
+						focalPtRatio);
+
+					graphics.moveTo(11, 7);
+					graphics.lineTo(0, 13);
+					graphics.lineTo(11, 19);
+					graphics.moveTo(11, 7);
+					graphics.endFill();
+
+					filters = [ new DropShadowFilter(2, 90, 0, 0.4) ];
+					break;
+				}
+
+				case "errorTipAbove":
+				{
+					// border 
+					matrix.createGradientBox(w, h - 13, boxRotation, tx, ty);
+					graphics.beginGradientFill(
+						type, 
+						colors,
+						alphas,
+						ratios, 
+						matrix, 
+						spreadMethod, 
+						interp, 
+						focalPtRatio);
+
+					drawRoundRect(
+						0, 0, w, h - 13, 0 ); 
+
+					// bottom pointer 
+					graphics.beginGradientFill(
+						type, 
+						colors,
+						alphas,
+						ratios, 
+						matrix, 
+						spreadMethod, 
+						interp, 
+						focalPtRatio);
+
+					graphics.moveTo(9, h - 13);
+					graphics.lineTo(15, h - 2);
+					graphics.lineTo(21, h - 13);
+					graphics.moveTo(9, h - 13);
+					graphics.endFill();
+
+					filters = [ new DropShadowFilter(2, 90, 0, 0.4) ];
+					break;
+				}
+
+				case "errorTipBelow":
+				{
+					// border 
+					matrix.createGradientBox(w, h - 13, boxRotation, tx, ty);
+					graphics.beginGradientFill(
+						type, 
+						colors,
+						alphas,
+						ratios, 
+						matrix, 
+						spreadMethod, 
+						interp, 
+						focalPtRatio);
+
+					drawRoundRect(
+						0, 11, w, h - 13, 0 );
+
+					// top pointer 
+					graphics.beginGradientFill(
+						type, 
+						colors,
+						alphas,
+						ratios, 
+						matrix, 
+						spreadMethod, 
+						interp, 
+						focalPtRatio);
+
+					graphics.moveTo(9, 11);
+					graphics.lineTo(15, 0);
+					graphics.lineTo(21, 11);
+					graphics.moveTo(10, 11);
+					graphics.endFill();
+
+					filters = [ new DropShadowFilter(2, 90, 0, 0.4) ];
+					break;
+				}
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/GenericType.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/GenericType.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/GenericType.as
new file mode 100644
index 0000000..94d42f5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/GenericType.as
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flexUnit.flexui.data
+{
+   public class GenericType extends com.adobe.ac.GenericType
+   {
+      public var logger : *;
+      public const logger : *;
+      public static const LOG : * = Log.getLogger( "flexUnit.flexui.data.AbstractRowData" );
+
+      public function get assertionsMade() : *
+      {
+         callLater( assertionsMadeLegend, [ null ] );
+      }
+
+      public override function set assertionsMadeLegend( fooBar : * ) : void
+      {
+      	var tmp : * = new Object();
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/GoodComponent.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/GoodComponent.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/GoodComponent.as
new file mode 100644
index 0000000..520cb20
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/GoodComponent.as
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.view
+{
+   import mx.controls.Label;
+   import mx.core.UIComponent;
+   
+   public class GoodComponent extends UIComponent
+   {
+      override protected function updateDisplayList( w : Number, h : Number ) : void
+      {
+         super.updateDisplayList( w, h );
+      }
+      
+      override protected function createChildren() : void
+      {
+         super.createChildren();
+         
+         addChild( new Label() );
+         addChildAt( new Label() );
+         removeChild( new Label() );
+         removeChildAt( 0 );
+         
+         var myDirect : MyObject;
+         
+         with( myDirect )
+         {
+         	i = "";
+         }
+		 StyleManaer.loadStyles( something, false );
+		 StyleManager.loadStyles( something );
+		 StyleManager.loadStyles( something, true ); 
+      }
+   }   
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/LinkButtonExample_Exception.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/LinkButtonExample_Exception.mxml b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/LinkButtonExample_Exception.mxml
new file mode 100644
index 0000000..67509df
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/LinkButtonExample_Exception.mxml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<!-- Simple example to demonstrate the LinkButton control. -->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
+
+    <mx:Script>
+		import mx.controls.Alert;		
+    </mx:Script>
+
+    <mx:Panel title="LinkButton Control Example" 
+        height="75%" width="75%" horizontalAlign="center"
+        paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
+       
+        <mx:Label width="100%" 
+            text="Select the LinkButton control to open the Alert control."/>
+
+        <mx:LinkButton label="LinkButton control" color="#0000FF" fontWeight="bold" 
+            click="Alert.show('LinkButton selected!');"/>
+
+    </mx:Panel>
+</mx:Application>  

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Looping.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Looping.as b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Looping.as
new file mode 100644
index 0000000..75161a9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Looping.as
@@ -0,0 +1,68 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+   import com.model.VO.ConfigVO;
+   
+   import de.polygonal.ds.HashMap;
+
+   public class Looping
+   {
+      public function Looping()
+      {
+         for ( var i : int = 0; i < 10; i++ )
+         {
+            new Foo();
+            while( true )
+            {
+               new Object();
+            }
+            for each ( var i : Object in list )
+            {
+               new Object();
+            }
+         }
+         new Object();
+         for each ( var i : Object in list )
+         {
+            new Foo();
+            while( true )
+            {
+               new Object();
+            }
+            for each ( var i : Object in list )
+            {
+               var o : Object = new Object();
+            }
+         }
+         while( true )
+         {
+            new Foo();
+            while( true )
+            {
+               new Object();
+            }
+            for each ( var i : Object in list )
+            {
+               new Object();
+            }
+         }
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Main.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Main.mxml b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Main.mxml
new file mode 100644
index 0000000..119e4c9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/Main.mxml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:Application xmlns:lcds="com.adobe.ac.lcds.*"
+                xmlns:mx="http://www.adobe.com/2006/mxml"
+                creationPolicy="all"
+                backgroundColor="#E57000"
+                horizontalAlign="left"
+                creationComplete="ds.fill(products, 'all')"
+                addedToStage="callLater( myFunction )"
+                xmlns="*">
+
+    <mx:Script>
+        <![CDATA[
+            import mx.data.mxml.DataService;
+            import mx.data.events.DataConflictEvent;
+            import mx.data.Conflicts;
+            import mx.data.Conflict;
+        ]]>
+    </mx:Script>
+
+    <mx:Style>
+.myStyle
+{
+}      
+   </mx:Style>
+
+    <mx:Script source="myCodeBehind.as"/>
+</mx:Application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/MainWithModelLocator.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/MainWithModelLocator.mxml b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/MainWithModelLocator.mxml
new file mode 100644
index 0000000..dbf8840
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/MainWithModelLocator.mxml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"
+	backgroundColor="#E57000" horizontalAlign="left"
+	creationComplete="ds.fill(products, 'all')" xmlns:lcds="com.adobe.ac.lcds.*">
+
+	<mx:Script>
+		<![CDATA[
+		   import mx.data.mxml.DataService;
+		
+      import com.adobe.ac.MyModelLocator;
+		import mx.data.events.DataConflictEvent;
+		import mx.data.Conflicts;
+		import mx.data.Conflict;
+		import mx.controls.Alert;		
+		]]>
+	</mx:Script>
+
+   <mx:Style source="my.css"/>
+
+   <mx:Style 
+      source="my.css"
+      />
+   
+</mx:Application>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/MainWithNoCopyright.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/MainWithNoCopyright.mxml b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/MainWithNoCopyright.mxml
new file mode 100644
index 0000000..1baa53d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-test-resources/src/main/resources/test/MainWithNoCopyright.mxml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"
+	>
+</mx:Application>
\ No newline at end of file


[16/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractAstFlexRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractAstFlexRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractAstFlexRule.java
new file mode 100644
index 0000000..6d0da0f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractAstFlexRule.java
@@ -0,0 +1,1164 @@
+/*
+ * 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.core;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.logging.Logger;
+
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IConstant;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.INode;
+import com.adobe.ac.pmd.nodes.IPackage;
+import com.adobe.ac.pmd.parser.IParserNode;
+import com.adobe.ac.pmd.parser.NodeKind;
+import com.adobe.ac.utils.StackTraceUtils;
+
+/**
+ * Abstract class for AST-based rule Extends this class if your rule is only
+ * detectable in an AS script block, which can be converted into an Abstract
+ * Syntax Tree. Then you will be able to either use the visitor pattern, or to
+ * iterate from the package node, in order to find your violation(s).
+ * 
+ * @author xagnetti
+ */
+public abstract class AbstractAstFlexRule extends AbstractFlexRule implements IFlexAstRule
+{
+   /**
+    *
+    */
+   protected enum FunctionType
+   {
+      GETTER, NORMAL, SETTER
+   }
+
+   /**
+    *
+    */
+   protected enum VariableOrConstant
+   {
+      CONSTANT, VARIABLE
+   }
+
+   /**
+    *
+    */
+   protected enum VariableScope
+   {
+      IN_CLASS, IN_FUNCTION
+   }
+
+   private interface ExpressionVisitor
+   {
+      void visitExpression( final IParserNode ast );
+   }
+
+   private static final Logger LOGGER = Logger.getLogger( AbstractAstFlexRule.class.getName() );
+
+   /**
+    * @param functionNode
+    * @return
+    */
+   /**
+    * @param functionNode
+    * @return
+    */
+   protected static IParserNode getNameFromFunctionDeclaration( final IParserNode functionNode )
+   {
+      IParserNode nameChild = null;
+
+      for ( final IParserNode child : functionNode.getChildren() )
+      {
+         if ( child.is( NodeKind.NAME ) )
+         {
+            nameChild = child;
+            break;
+         }
+      }
+      return nameChild;
+   }
+
+   /**
+    * @param fieldNode
+    * @return
+    */
+   protected static IParserNode getTypeFromFieldDeclaration( final IParserNode fieldNode )
+   {
+      return fieldNode.getChild( 0 ).getChild( 1 );
+   }
+
+   private final List< IFlexViolation > violations;
+
+   /**
+    * 
+    */
+   public AbstractAstFlexRule()
+   {
+      super();
+
+      violations = new ArrayList< IFlexViolation >();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile
+    * ()
+    */
+   @Override
+   public boolean isConcernedByTheCurrentFile()
+   {
+      return true;
+   }
+
+   /**
+    * @param function
+    * @return the added violation positioned on the given function node
+    */
+   protected final IFlexViolation addViolation( final IFunction function )
+   {
+      final IParserNode name = getNameFromFunctionDeclaration( function.getInternalNode() );
+
+      return addViolation( name,
+                           name,
+                           name.getStringValue() );
+   }
+
+   /**
+    * @param function
+    * @param messageToReplace
+    * @return
+    */
+   protected final IFlexViolation addViolation( final IFunction function,
+                                                final String messageToReplace )
+   {
+      final IParserNode name = getNameFromFunctionDeclaration( function.getInternalNode() );
+
+      return addViolation( name,
+                           name,
+                           messageToReplace );
+   }
+
+   /**
+    * @param violatingNode
+    * @return the added violation replacing the threshold value in the message
+    *         if any.
+    */
+   protected final IFlexViolation addViolation( final INode violatingNode )
+   {
+      return addViolation( violatingNode.getInternalNode(),
+                           violatingNode.getInternalNode() );
+   }
+
+   /**
+    * @param violatingNode
+    * @return the added violation replacing the threshold value in the message
+    *         if any.
+    */
+   protected final IFlexViolation addViolation( final INode violatingNode,
+                                                final String... messageToReplace )
+   {
+      return addViolation( violatingNode.getInternalNode(),
+                           violatingNode.getInternalNode(),
+                           messageToReplace );
+   }
+
+   /**
+    * @param violatingNode
+    * @param endNode
+    * @return the added violation replacing the threshold value in the message
+    *         if any.
+    */
+   protected final IFlexViolation addViolation( final IParserNode violatingNode )
+   {
+      return addViolation( violatingNode,
+                           violatingNode );
+   }
+
+   /**
+    * @param beginningNode
+    * @param endNode
+    * @param messageToReplace
+    * @return the add violation replacing the {0} token by the specified message
+    */
+   protected final IFlexViolation addViolation( final IParserNode beginningNode,
+                                                final IParserNode endNode,
+                                                final String... messageToReplace )
+   {
+      if ( isAlreadyViolationAdded( beginningNode ) )
+      {
+         return null;
+      }
+      final IFlexViolation violation = addViolation( ViolationPosition.create( beginningNode.getLine(),
+                                                                               endNode.getLine(),
+                                                                               beginningNode.getColumn(),
+                                                                               endNode.getColumn() ) );
+
+      for ( int i = 0; i < messageToReplace.length; i++ )
+      {
+         violation.replacePlaceholderInMessage( messageToReplace[ i ],
+                                                i );
+      }
+
+      return violation;
+   }
+
+   /**
+    * @param violatingNode
+    * @param endNode
+    * @param messageToReplace
+    * @return the add violation replacing the {0} token by the specified message
+    */
+   protected final IFlexViolation addViolation( final IParserNode violatingNode,
+                                                final String... messageToReplace )
+   {
+      return addViolation( violatingNode,
+                           violatingNode,
+                           messageToReplace );
+   }
+
+   /**
+    * @param violationPosition
+    * @return the added violation positioned at the given position
+    */
+   protected final IFlexViolation addViolation( final ViolationPosition violationPosition )
+   {
+      return addViolation( violations,
+                           violationPosition );
+   }
+
+   /**
+    * find the violations list from the given class node
+    * 
+    * @param classNode
+    */
+   protected void findViolations( final IClass classNode )
+   {
+      findViolationsFromAttributes( classNode.getAttributes() );
+      findViolationsFromConstants( classNode.getConstants() );
+      findViolations( classNode.getFunctions() );
+      if ( classNode.getConstructor() != null )
+      {
+         findViolationsFromConstructor( classNode.getConstructor() );
+      }
+   }
+
+   /**
+    * find violations in every function in a class
+    * 
+    * @param function
+    */
+   protected void findViolations( final IFunction function )
+   {
+   }
+
+   /**
+    * Override this method if you need to find violations from the package ( or
+    * any subsequent node like class or function)
+    * 
+    * @param packageNode
+    */
+   protected void findViolations( final IPackage packageNode )
+   {
+      final IClass classNode = packageNode.getClassNode();
+
+      if ( classNode != null )
+      {
+         findViolations( classNode );
+      }
+   }
+
+   /**
+    * find the violations list from the given functions list
+    * 
+    * @param functions
+    */
+   protected void findViolations( final List< IFunction > functions )
+   {
+      for ( final IFunction function : functions )
+      {
+         findViolations( function );
+      }
+   }
+
+   /**
+    * find the violations list from the given class variables list
+    * 
+    * @param variables
+    */
+   protected void findViolationsFromAttributes( final List< IAttribute > variables )
+   {
+   }
+
+   /**
+    * find the violations list from the given class constants list
+    * 
+    * @param constants
+    */
+   protected void findViolationsFromConstants( final List< IConstant > constants )
+   {
+   }
+
+   /**
+    * find the violations list from the given class constructor node
+    * 
+    * @param constructor
+    */
+   protected void findViolationsFromConstructor( final IFunction constructor )
+   {
+   }
+
+   /**
+    * Find violations in the current file
+    */
+   @Override
+   protected final List< IFlexViolation > findViolationsInCurrentFile()
+   {
+      try
+      {
+         if ( getCurrentPackageNode() != null )
+         {
+            visitCompilationUnit( getCurrentPackageNode().getInternalNode() );
+            findViolations( getCurrentPackageNode() );
+         }
+      }
+      catch ( final Exception e )
+      {
+         LOGGER.warning( "on "
+               + getCurrentFile().getFilePath() );
+         LOGGER.warning( StackTraceUtils.print( e ) );
+      }
+      final List< IFlexViolation > copy = new ArrayList< IFlexViolation >( violations );
+
+      violations.clear();
+
+      return copy;
+   }
+
+   /**
+    * @param statementNode
+    */
+   protected void visitAs( final IParserNode statementNode )
+   {
+   }
+
+   /**
+    * @param catchNode
+    */
+   protected void visitCatch( final IParserNode catchNode )
+   {
+      visitNameTypeInit( catchNode.getChild( 0 ) );
+      visitBlock( catchNode.getChild( 1 ) );
+   }
+
+   /**
+    * @param classNode
+    */
+   protected void visitClass( final IParserNode classNode )
+   {
+      IParserNode content = null;
+      for ( final IParserNode node : classNode.getChildren() )
+      {
+         if ( node.is( NodeKind.CONTENT ) )
+         {
+            content = node;
+            break;
+         }
+      }
+      visitClassContent( content );
+   }
+
+   /**
+    * Visit the condition of a if, while, ...
+    * 
+    * @param condition
+    */
+   protected void visitCondition( final IParserNode condition )
+   {
+      visitExpression( condition );
+   }
+
+   /**
+    * @param doNode
+    */
+   protected void visitDo( final IParserNode doNode )
+   {
+      visitBlock( doNode.getChild( 0 ) );
+      visitCondition( doNode.getChild( 1 ) );
+   }
+
+   /**
+    * @param ifNode
+    */
+   protected void visitElse( final IParserNode ifNode )
+   {
+      visitBlock( ifNode.getChild( 2 ) );
+   }
+
+   /**
+    * Visit empty statement
+    * 
+    * @param statementNode
+    */
+   protected void visitEmptyStatetement( final IParserNode statementNode )
+   {
+   }
+
+   /**
+    * @param finallyNode
+    */
+   protected void visitFinally( final IParserNode finallyNode )
+   {
+      if ( isNodeNavigable( finallyNode ) )
+      {
+         visitBlock( finallyNode.getChild( 0 ) );
+      }
+   }
+
+   /**
+    * @param forNode
+    */
+   protected void visitFor( final IParserNode forNode )
+   {
+      visitBlock( forNode.getChild( 3 ) );
+   }
+
+   /**
+    * @param foreachNode
+    */
+   protected void visitForEach( final IParserNode foreachNode )
+   {
+      visitBlock( foreachNode.getChild( 2 ) );
+   }
+
+   /**
+    * @param functionNode
+    * @param type
+    */
+   protected void visitFunction( final IParserNode functionNode,
+                                 final FunctionType type )
+   {
+      final Iterator< IParserNode > iterator = functionNode.getChildren().iterator();
+      IParserNode currentNode = iterator.next();
+
+      while ( currentNode.is( NodeKind.META_LIST )
+            || currentNode.is( NodeKind.MOD_LIST ) || currentNode.is( NodeKind.AS_DOC )
+            || currentNode.is( NodeKind.MULTI_LINE_COMMENT ) )
+      {
+         currentNode = iterator.next();
+      }
+      currentNode = iterator.next();
+      visitParameters( currentNode );
+      currentNode = iterator.next();
+      visitFunctionReturnType( currentNode );
+      try
+      {
+         // Intrinsic functions in AS2
+         currentNode = iterator.next();
+         visitFunctionBody( currentNode );
+      }
+      catch ( final NoSuchElementException e )
+      {
+      }
+   }
+
+   /**
+    * @param functionReturnTypeNode
+    */
+   protected void visitFunctionReturnType( final IParserNode functionReturnTypeNode )
+   {
+      visitBlock( functionReturnTypeNode );
+   }
+
+   /**
+    * @param ifNode
+    */
+   protected void visitIf( final IParserNode ifNode )
+   {
+      visitCondition( ifNode.getChild( 0 ) );
+      visitThen( ifNode );
+      if ( ifNode.numChildren() == 3 )
+      {
+         visitElse( ifNode );
+      }
+   }
+
+   /**
+    * @param interfaceNode
+    */
+   protected void visitInterface( final IParserNode interfaceNode )
+   {
+   }
+
+   /**
+    * @param methodCallNode
+    */
+   protected void visitMethodCall( final IParserNode methodCallNode )
+   {
+      final Iterator< IParserNode > iterator = methodCallNode.getChildren().iterator();
+      visitExpression( iterator.next() );
+      do
+      {
+         visitExpressionList( iterator.next() );
+      }
+      while ( iterator.hasNext() );
+   }
+
+   /**
+    * @param newExpression
+    */
+   protected void visitNewExpression( final IParserNode newExpression )
+   {
+      visitExpression( newExpression.getChild( 0 ) );
+      visitExpressionList( newExpression.getChild( 1 ) );
+   }
+
+   protected void visitOperator( final IParserNode statementNode )
+   {
+   }
+
+   /**
+    * @param functionParametersNode
+    */
+   protected void visitParameters( final IParserNode functionParametersNode )
+   {
+      if ( isNodeNavigable( functionParametersNode ) )
+      {
+         for ( final IParserNode node2 : functionParametersNode.getChildren() )
+         {
+            visitNameTypeInit( node2.getChild( 0 ) );
+         }
+      }
+   }
+
+   protected void visitRelationalExpression( final IParserNode ast )
+   {
+      visitExpression( ast,
+                       NodeKind.RELATION,
+                       new ExpressionVisitor()
+                       {
+                          public void visitExpression( final IParserNode ast )
+                          {
+                             visitShiftExpression( ast );
+                          }
+                       } );
+   }
+
+   /**
+    * @param ast
+    */
+   protected void visitReturn( final IParserNode ast )
+   {
+      if ( isNodeNavigable( ast ) )
+      {
+         visitExpression( ast.getChild( 0 ) );
+      }
+   }
+
+   /**
+    * @param statementNode
+    */
+   protected void visitStatement( final IParserNode statementNode )
+   {
+      switch ( statementNode.getId() )
+      {
+      case OP:
+         visitOperator( statementNode );
+         break;
+      case AS:
+         visitAs( statementNode );
+         break;
+      case RETURN:
+         visitReturn( statementNode );
+         break;
+      case IF:
+         visitIf( statementNode );
+         break;
+      case FOR:
+         visitFor( statementNode );
+         break;
+      case FOREACH:
+         visitForEach( statementNode );
+         break;
+      case DO:
+         visitDo( statementNode );
+         break;
+      case WHILE:
+         visitWhile( statementNode );
+         break;
+      case SWITCH:
+         visitSwitch( statementNode );
+         break;
+      case TRY:
+         visitTry( statementNode );
+         break;
+      case CATCH:
+         visitCatch( statementNode );
+         break;
+      case FINALLY:
+         visitFinally( statementNode );
+         break;
+      case STMT_EMPTY:
+         visitEmptyStatetement( statementNode );
+         break;
+      case LEFT_CURLY_BRACKET:
+         visitBlock( statementNode );
+         break;
+      default:
+         visitExpressionList( statementNode );
+      }
+   }
+
+   /**
+    * @param switchNode
+    */
+   protected void visitSwitch( final IParserNode switchNode )
+   {
+      final Iterator< IParserNode > iterator = switchNode.getChildren().iterator();
+
+      visitExpression( iterator.next() );
+
+      final IParserNode cases = iterator.next();
+
+      for ( final IParserNode caseNode : cases.getChildren() )
+      {
+         final IParserNode child = caseNode.getChild( 0 );
+
+         if ( child.is( NodeKind.DEFAULT ) )
+         {
+            visitSwitchDefaultCase( caseNode.getChild( 1 ) );
+         }
+         else
+         {
+            visitSwitchCase( caseNode.getChild( 1 ) );
+            visitExpression( child );
+         }
+      }
+   }
+
+   /**
+    * @param switchCaseNode
+    */
+   protected void visitSwitchCase( final IParserNode switchCaseNode )
+   {
+      visitBlock( switchCaseNode );
+   }
+
+   /**
+    * @param defaultCaseNode
+    */
+   protected void visitSwitchDefaultCase( final IParserNode defaultCaseNode )
+   {
+      visitBlock( defaultCaseNode );
+   }
+
+   /**
+    * @param ifNode
+    */
+   protected void visitThen( final IParserNode ifNode )
+   {
+      visitBlock( ifNode.getChild( 1 ) );
+   }
+
+   /**
+    * @param ast
+    */
+   protected void visitTry( final IParserNode ast )
+   {
+      visitBlock( ast.getChild( 0 ) );
+   }
+
+   /**
+    * @param node
+    */
+   protected void visitVariableInitialization( final IParserNode node )
+   {
+      visitExpression( node );
+   }
+
+   /**
+    * @param variableNode
+    * @param varOrConst
+    * @param scope
+    */
+   protected void visitVarOrConstList( final IParserNode variableNode,
+                                       final VariableOrConstant varOrConst,
+                                       final VariableScope scope )
+   {
+      final Iterator< IParserNode > iterator = variableNode.getChildren().iterator();
+
+      IParserNode node = iterator.next();
+      while ( node.is( NodeKind.META_LIST )
+            || node.is( NodeKind.MOD_LIST ) )
+      {
+         node = iterator.next();
+      }
+      while ( node != null )
+      {
+         visitNameTypeInit( node );
+         node = iterator.hasNext() ? iterator.next()
+                                  : null;
+      }
+   }
+
+   /**
+    * @param whileNode
+    */
+   protected void visitWhile( final IParserNode whileNode )
+   {
+      visitCondition( whileNode.getChild( 0 ) );
+      visitBlock( whileNode.getChild( 1 ) );
+   }
+
+   private boolean isAlreadyViolationAdded( final IParserNode nodeToBeAdded )
+   {
+      for ( final IFlexViolation violation : violations )
+      {
+         if ( violation.getBeginLine() == nodeToBeAdded.getLine()
+               && violation.getBeginColumn() == nodeToBeAdded.getColumn() )
+         {
+            return true;
+         }
+      }
+      return false;
+   }
+
+   private boolean isNodeNavigable( final IParserNode node )
+   {
+      return node != null
+            && node.numChildren() != 0;
+   }
+
+   private void visitAdditiveExpression( final IParserNode ast )
+   {
+      visitExpression( ast,
+                       NodeKind.ADD,
+                       new ExpressionVisitor()
+                       {
+                          public void visitExpression( final IParserNode ast )
+                          {
+                             visitMultiplicativeExpression( ast );
+                          }
+                       } );
+   }
+
+   private void visitAndExpression( final IParserNode ast )
+   {
+      visitExpression( ast,
+                       NodeKind.AND,
+                       new ExpressionVisitor()
+                       {
+                          public void visitExpression( final IParserNode ast )
+                          {
+                             visitBitwiseOrExpression( ast );
+                          }
+                       } );
+   }
+
+   private void visitArrayAccessor( final IParserNode ast )
+   {
+      final Iterator< IParserNode > iterator = ast.getChildren().iterator();
+      visitExpression( iterator.next() );
+      do
+      {
+         visitExpression( iterator.next() );
+      }
+      while ( iterator.hasNext() );
+   }
+
+   private void visitBitwiseAndExpression( final IParserNode ast )
+   {
+      visitExpression( ast,
+                       NodeKind.B_AND,
+                       new ExpressionVisitor()
+                       {
+                          public void visitExpression( final IParserNode ast )
+                          {
+                             visitEqualityExpression( ast );
+                          }
+                       } );
+   }
+
+   private void visitBitwiseOrExpression( final IParserNode ast )
+   {
+      visitExpression( ast,
+                       NodeKind.B_OR,
+                       new ExpressionVisitor()
+                       {
+                          public void visitExpression( final IParserNode ast )
+                          {
+                             visitBitwiseXorExpression( ast );
+                          }
+                       } );
+   }
+
+   private void visitBitwiseXorExpression( final IParserNode ast )
+   {
+      visitExpression( ast,
+                       NodeKind.B_XOR,
+                       new ExpressionVisitor()
+                       {
+                          public void visitExpression( final IParserNode ast )
+                          {
+                             visitBitwiseAndExpression( ast );
+                          }
+                       } );
+   }
+
+   private void visitBlock( final IParserNode ast )
+   {
+      if ( isNodeNavigable( ast ) )
+      {
+         for ( final IParserNode node : ast.getChildren() )
+         {
+            visitStatement( node );
+         }
+      }
+      else if ( ast != null )
+      {
+         visitStatement( ast );
+      }
+   }
+
+   private void visitClassContent( final IParserNode ast )
+   {
+      if ( isNodeNavigable( ast ) )
+      {
+         for ( final IParserNode node : ast.getChildren() )
+         {
+            if ( node.is( NodeKind.VAR_LIST ) )
+            {
+               visitVarOrConstList( node,
+                                    VariableOrConstant.VARIABLE,
+                                    VariableScope.IN_CLASS );
+            }
+            else if ( node.is( NodeKind.CONST_LIST ) )
+            {
+               visitVarOrConstList( node,
+                                    VariableOrConstant.CONSTANT,
+                                    VariableScope.IN_CLASS );
+            }
+         }
+         for ( final IParserNode node : ast.getChildren() )
+         {
+            if ( node.is( NodeKind.FUNCTION ) )
+            {
+               visitFunction( node,
+                              FunctionType.NORMAL );
+            }
+            else if ( node.is( NodeKind.SET ) )
+            {
+               visitFunction( node,
+                              FunctionType.SETTER );
+            }
+            else if ( node.is( NodeKind.GET ) )
+            {
+               visitFunction( node,
+                              FunctionType.GETTER );
+            }
+         }
+      }
+   }
+
+   private void visitCompilationUnit( final IParserNode ast )
+   {
+      for ( final IParserNode node : ast.getChildren() )
+      {
+         if ( node.is( NodeKind.PACKAGE )
+               && node.numChildren() >= 2 )
+         {
+            visitPackageContent( node.getChild( 1 ) );
+         }
+         if ( !node.is( NodeKind.PACKAGE )
+               && node.numChildren() > 0 )
+         {
+            visitPackageContent( node );
+         }
+      }
+   }
+
+   private void visitConditionalExpression( final IParserNode ast )
+   {
+      if ( ast != null )
+      {
+         if ( ast.is( NodeKind.CONDITIONAL ) )
+         {
+            final Iterator< IParserNode > iterator = ast.getChildren().iterator();
+            final IParserNode node = iterator.next();
+
+            visitOrExpression( node );
+
+            while ( iterator.hasNext() )
+            {
+               visitExpression( iterator.next() );
+               visitExpression( iterator.next() );
+            }
+         }
+         else
+         {
+            visitOrExpression( ast );
+         }
+      }
+   }
+
+   private void visitEqualityExpression( final IParserNode ast )
+   {
+      visitExpression( ast,
+                       NodeKind.EQUALITY,
+                       new ExpressionVisitor()
+                       {
+                          public void visitExpression( final IParserNode ast )
+                          {
+                             visitRelationalExpression( ast );
+                          }
+                       } );
+   }
+
+   private void visitExpression( final IParserNode ast )
+   {
+      visitExpression( ast,
+                       NodeKind.ASSIGN,
+                       new ExpressionVisitor()
+                       {
+                          public void visitExpression( final IParserNode ast )
+                          {
+                             visitConditionalExpression( ast );
+                          }
+                       } );
+   }
+
+   private void visitExpression( final IParserNode ast,
+                                 final NodeKind kind,
+                                 final ExpressionVisitor visitor )
+   {
+      if ( ast.is( kind ) )
+      {
+         final Iterator< IParserNode > iterator = ast.getChildren().iterator();
+         final IParserNode node = iterator.next();
+
+         visitor.visitExpression( node );
+
+         while ( iterator.hasNext() )
+         {
+            iterator.next();
+            visitor.visitExpression( iterator.next() );
+         }
+      }
+      else
+      {
+         visitor.visitExpression( ast );
+      }
+   }
+
+   private void visitExpressionList( final IParserNode ast )
+   {
+      if ( isNodeNavigable( ast ) )
+      {
+         for ( final IParserNode node : ast.getChildren() )
+         {
+            visitExpression( node );
+         }
+      }
+   }
+
+   private void visitFunctionBody( final IParserNode node )
+   {
+      visitBlock( node );
+   }
+
+   private void visitMultiplicativeExpression( final IParserNode ast )
+   {
+      visitExpression( ast,
+                       NodeKind.MULTIPLICATION,
+                       new ExpressionVisitor()
+                       {
+                          public void visitExpression( final IParserNode ast )
+                          {
+                             visitUnaryExpression( ast );
+                          }
+                       } );
+   }
+
+   private void visitNameTypeInit( final IParserNode ast )
+   {
+      if ( ast != null
+            && ast.numChildren() != 0 )
+      {
+         final Iterator< IParserNode > iterator = ast.getChildren().iterator();
+         IParserNode node;
+
+         iterator.next();
+         iterator.next();
+
+         if ( iterator.hasNext() )
+         {
+            node = iterator.next();
+            visitVariableInitialization( node );
+         }
+      }
+   }
+
+   private void visitObjectInitialization( final IParserNode ast )
+   {
+      if ( isNodeNavigable( ast ) )
+      {
+         for ( final IParserNode node : ast.getChildren() )
+         {
+            visitExpression( node.getChild( 1 ) );
+         }
+      }
+   }
+
+   private void visitOrExpression( final IParserNode ast )
+   {
+      visitExpression( ast,
+                       NodeKind.OR,
+                       new ExpressionVisitor()
+                       {
+                          public void visitExpression( final IParserNode ast )
+                          {
+                             visitAndExpression( ast );
+                          }
+                       } );
+   }
+
+   private void visitPackageContent( final IParserNode ast )
+   {
+      if ( isNodeNavigable( ast ) )
+      {
+         for ( final IParserNode node : ast.getChildren() )
+         {
+            if ( node.is( NodeKind.CLASS ) )
+            {
+               visitClass( node );
+            }
+            else if ( node.is( NodeKind.INTERFACE ) )
+            {
+               visitInterface( node );
+            }
+         }
+      }
+   }
+
+   private void visitPrimaryExpression( final IParserNode ast )
+   {
+      if ( ast.is( NodeKind.NEW ) )
+      {
+         visitNewExpression( ast );
+      }
+      else if ( ast.numChildren() != 0
+            && ast.is( NodeKind.ARRAY ) )
+      {
+         visitExpressionList( ast );
+      }
+      else if ( ast.is( NodeKind.OBJECT ) )
+      {
+         visitObjectInitialization( ast );
+      }
+      else if ( ast.is( NodeKind.E4X_ATTR ) )
+      {
+         final IParserNode node = ast.getChild( 0 );
+
+         if ( !node.is( NodeKind.NAME )
+               && !node.is( NodeKind.STAR ) )
+         {
+            visitExpression( node );
+         }
+      }
+      else
+      {
+         visitExpressionList( ast );
+      }
+   }
+
+   private void visitShiftExpression( final IParserNode ast )
+   {
+      visitExpression( ast,
+                       NodeKind.SHIFT,
+                       new ExpressionVisitor()
+                       {
+                          public void visitExpression( final IParserNode ast )
+                          {
+                             visitAdditiveExpression( ast );
+                          }
+                       } );
+   }
+
+   private void visitUnaryExpression( final IParserNode ast )
+   {
+      switch ( ast.getId() )
+      {
+      case PRE_INC:
+      case PRE_DEC:
+      case MINUS:
+      case PLUS:
+         visitUnaryExpression( ast.getChild( 0 ) );
+         break;
+      default:
+         visitUnaryExpressionNotPlusMinus( ast );
+      }
+   }
+
+   private void visitUnaryExpressionNotPlusMinus( final IParserNode ast )
+   {
+      switch ( ast.getId() )
+      {
+      case DELETE:
+      case VOID:
+      case TYPEOF:
+      case NOT:
+      case B_NOT:
+         visitExpression( ast.getChild( 0 ) );
+         break;
+      default:
+         visitUnaryPostfixExpression( ast );
+      }
+   }
+
+   private void visitUnaryPostfixExpression( final IParserNode ast )
+   {
+      switch ( ast.getId() )
+      {
+      case ARRAY_ACCESSOR:
+         visitArrayAccessor( ast );
+         break;
+      case DOT:
+      case E4X_FILTER:
+         visitExpression( ast.getChild( 0 ) );
+         visitExpression( ast.getChild( 1 ) );
+         break;
+      case POST_INC:
+      case POST_DEC:
+         visitPrimaryExpression( ast.getChild( 0 ) );
+         break;
+      case CALL:
+         visitMethodCall( ast );
+         break;
+      case E4X_STAR:
+         visitExpression( ast.getChild( 0 ) );
+         break;
+      default:
+         visitPrimaryExpression( ast );
+         break;
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractAstFlexRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractAstFlexRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractAstFlexRuleTest.java
new file mode 100644
index 0000000..35aa5e6
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractAstFlexRuleTest.java
@@ -0,0 +1,67 @@
+/*
+ * 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.core;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.files.IAs3File;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.files.IMxmlFile;
+import com.adobe.ac.pmd.nodes.IPackage;
+import com.adobe.ac.pmd.nodes.impl.NodeFactory;
+import com.adobe.ac.pmd.parser.IAS3Parser;
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+import de.bokelberg.flex.parser.AS3Parser;
+
+public abstract class AbstractAstFlexRuleTest extends AbstractFlexRuleTest
+{
+   @Override
+   protected List< IFlexViolation > processFile( final String resourcePath ) throws IOException,
+                                                                            TokenException
+   {
+      if ( !getIgnoreFiles().contains( resourcePath ) )
+      {
+         final IAS3Parser parser = new AS3Parser();
+         final IFlexFile file = getTestFiles().get( resourcePath );
+
+         IPackage rootNode = null;
+
+         if ( file == null )
+         {
+            throw new IOException( resourcePath
+                  + " is not found" );
+         }
+         if ( file instanceof IAs3File )
+         {
+            rootNode = NodeFactory.createPackage( parser.buildAst( file.getFilePath() ) );
+         }
+         else
+         {
+            rootNode = NodeFactory.createPackage( parser.buildAst( file.getFilePath(),
+                                                                   ( ( IMxmlFile ) file ).getScriptBlock() ) );
+         }
+         return getRule().processFile( file,
+                                       rootNode,
+                                       getTestFiles() );
+      }
+      return new ArrayList< IFlexViolation >();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractFlexMetaDataRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractFlexMetaDataRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractFlexMetaDataRule.java
new file mode 100644
index 0000000..a1f0552
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractFlexMetaDataRule.java
@@ -0,0 +1,111 @@
+/*
+ * 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.core;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IAttribute;
+import com.adobe.ac.pmd.nodes.IClass;
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.nodes.IMetaDataListHolder;
+
+/**
+ * @author xagnetti
+ */
+public abstract class AbstractFlexMetaDataRule extends AbstractAstFlexRule
+{
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IClass)
+    */
+   @Override
+   protected final void findViolations( final IClass classNode )
+   {
+      super.findViolations( classNode );
+
+      if ( classNode.getMetaDataCount() > 0 )
+      {
+         findViolationsFromMetaDataList( classNode );
+         findViolationsFromClassMetaData( classNode );
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected final void findViolations( final IFunction function )
+   {
+      if ( function.getMetaDataCount() > 0 )
+      {
+         findViolationsFromMetaDataList( function );
+         findViolationsFromFunctionMetaData( function );
+      }
+   }
+
+   /**
+    * @param function
+    */
+   protected void findViolationsFromAttributeMetaData( final IAttribute attribute )
+   {
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolationsFromAttributes
+    * (java.util.List)
+    */
+   @Override
+   protected final void findViolationsFromAttributes( final List< IAttribute > variables )
+   {
+      for ( final IAttribute attribute : variables )
+      {
+         if ( attribute.getMetaDataCount() > 0 )
+         {
+            findViolationsFromMetaDataList( attribute );
+            findViolationsFromAttributeMetaData( attribute );
+         }
+      }
+   }
+
+   /**
+    * @param classNode
+    */
+   protected void findViolationsFromClassMetaData( final IClass classNode )
+   {
+   }
+
+   /**
+    * @param function
+    */
+   protected void findViolationsFromFunctionMetaData( final IFunction function )
+   {
+   }
+
+   /**
+    * @param holder
+    */
+   protected void findViolationsFromMetaDataList( final IMetaDataListHolder holder )
+   {
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractFlexRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractFlexRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractFlexRule.java
new file mode 100644
index 0000000..2611ccf
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractFlexRule.java
@@ -0,0 +1,354 @@
+/*
+ * 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.core;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.logging.Logger;
+import java.util.regex.Pattern;
+
+import net.sourceforge.pmd.CommonAbstractRule;
+import net.sourceforge.pmd.PropertyDescriptor;
+import net.sourceforge.pmd.RuleContext;
+import net.sourceforge.pmd.properties.IntegerProperty;
+import net.sourceforge.pmd.rules.regex.RegexHelper;
+
+import org.apache.commons.lang.StringUtils;
+
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.nodes.IPackage;
+import com.adobe.ac.pmd.rules.core.thresholded.IThresholdedRule;
+
+/**
+ * Abstract FlexPMD rule. Extends this class if you want to find violations at a
+ * very low level. Otherwise extends AbstractAstFlexRule, or
+ * AbstractRegexpBasedRule.
+ * 
+ * @author xagnetti
+ */
+public abstract class AbstractFlexRule extends CommonAbstractRule implements IFlexRule
+{
+   protected static final String    MAXIMUM            = "maximum";
+   protected static final String    MINIMUM            = "minimum";
+   private static final String      AS3_COMMENT_TOKEN  = "//";
+   private static final Logger      LOGGER             = Logger.getLogger( AbstractFlexRule.class.getName() );
+   private static final String      MXML_COMMENT_TOKEN = "<!--";
+   private IFlexFile                currentFile;
+   private IPackage                 currentPackageNode;
+   private Set< String >            excludes;
+   private Map< String, IFlexFile > filesInSourcePath;
+
+   /**
+    * 
+    */
+   public AbstractFlexRule()
+   {
+      super();
+
+      setDefaultPriority();
+   }
+
+   /**
+    * not used in FlexPMD
+    */
+   public final void apply( final List< ? > astCompilationUnits,
+                            final RuleContext ctx )
+   {
+   }
+
+   /**
+    * @return Extracts the rulename from the qualified name of the underlying
+    *         class
+    */
+   public final String getRuleName()
+   {
+      final String qualifiedClassName = this.getClass().getName();
+      final String className = StringUtils.substringAfter( qualifiedClassName,
+                                                           "." );
+
+      return className.replace( "Rule",
+                                "" );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.IFlexRule#processFile(com.adobe.ac.pmd.files
+    * .IFlexFile, com.adobe.ac.pmd.nodes.IPackage, java.util.Map)
+    */
+   public final List< IFlexViolation > processFile( final IFlexFile file,
+                                                    final IPackage packageNode,
+                                                    final Map< String, IFlexFile > files )
+   {
+      List< IFlexViolation > violations = new ArrayList< IFlexViolation >();
+
+      currentFile = file;
+      filesInSourcePath = files;
+      currentPackageNode = packageNode;
+
+      if ( isConcernedByTheCurrentFile()
+            && !isFileExcluded( file ) )
+      {
+         onRuleStart();
+         violations = findViolationsInCurrentFile();
+      }
+
+      return violations;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.rules.core.IFlexRule#setExcludes(java.util.Set)
+    */
+   public void setExcludes( final Set< String > excludesToBeSet )
+   {
+      excludes = excludesToBeSet;
+   }
+
+   /**
+    * @param violatedLine
+    * @return
+    */
+   boolean isViolationIgnored( final String violatedLine )
+   {
+      final boolean containsNoPmd = lineContainsNoPmd( violatedLine,
+                                                       MXML_COMMENT_TOKEN )
+            || lineContainsNoPmd( violatedLine,
+                                  AS3_COMMENT_TOKEN );
+
+      if ( !containsNoPmd )
+      {
+         return false;
+      }
+      final String name = getRuleName().replaceAll( "Rule",
+                                                    "" );
+      final String ruleName = name.contains( "." ) ? StringUtils.substringAfterLast( name,
+                                                                                     "." )
+                                                  : name;
+      final String strippedLine = computeStrippedLine( violatedLine );
+      return strippedLineContainsNoPmdAndRuleName( MXML_COMMENT_TOKEN,
+                                                   ruleName,
+                                                   strippedLine )
+            || strippedLineContainsNoPmdAndRuleName( AS3_COMMENT_TOKEN,
+                                                     ruleName,
+                                                     strippedLine );
+   }
+
+   /**
+    * @param violations
+    * @param position
+    * @return
+    */
+   protected final IFlexViolation addViolation( final List< IFlexViolation > violations,
+                                                final ViolationPosition position )
+   {
+      final IFlexViolation violation = new Violation( position, this, getCurrentFile() );
+      final int beginLine = position.getBeginLine();
+
+      prettyPrintMessage( violation );
+
+      if ( beginLine == -1
+            || beginLine == 0 )
+      {
+         violations.add( violation );
+      }
+      else if ( beginLine <= getCurrentFile().getLinesNb() )
+      {
+         if ( isViolationIgnored( getCurrentFile().getLineAt( beginLine ) ) )
+         {
+            LOGGER.info( getRuleName()
+                  + " has been ignored in " + getCurrentFile().getFilename() + " (" + beginLine + ")" );
+         }
+         else
+         {
+            violations.add( violation );
+         }
+      }
+
+      return violation;
+   }
+
+   protected final IFlexViolation addViolation( final List< IFlexViolation > violations,
+                                                final ViolationPosition position,
+                                                final String... messageToReplace )
+   {
+      final IFlexViolation violation = addViolation( violations,
+                                                     position );
+
+      for ( int i = 0; i < messageToReplace.length; i++ )
+      {
+         violation.replacePlaceholderInMessage( messageToReplace[ i ],
+                                                i );
+      }
+
+      return violation;
+   }
+
+   /**
+    * @return
+    */
+   protected abstract List< IFlexViolation > findViolationsInCurrentFile();
+
+   /**
+    * @return the current file under investigation
+    */
+   protected IFlexFile getCurrentFile()
+   {
+      return currentFile;
+   }
+
+   /**
+    * @return
+    */
+   protected final IPackage getCurrentPackageNode()
+   {
+      return currentPackageNode;
+   }
+
+   /**
+    * @return
+    */
+   protected abstract ViolationPriority getDefaultPriority();
+
+   /**
+    * @return
+    */
+   protected final Map< String, IFlexFile > getFilesInSourcePath()
+   {
+      return filesInSourcePath;
+   }
+
+   /**
+    * @param rule
+    * @return
+    */
+   protected final Map< String, PropertyDescriptor > getThresholdedRuleProperties( final IThresholdedRule rule )
+   {
+      final Map< String, PropertyDescriptor > properties = new LinkedHashMap< String, PropertyDescriptor >();
+
+      properties.put( rule.getThresholdName(),
+                      new IntegerProperty( rule.getThresholdName(),
+                                           "",
+                                           rule.getDefaultThreshold(),
+                                           properties.size() ) );
+
+      return properties;
+   }
+
+   /**
+    * @return is this rule concerned by the current file
+    */
+   protected abstract boolean isConcernedByTheCurrentFile();
+
+   /**
+    * Called when the rule is started on the current file
+    */
+   protected void onRuleStart()
+   {
+   }
+
+   private String computeStrippedLine( final String violatedLine )
+   {
+      final String comment_token = getCurrentFile().isMxml() ? MXML_COMMENT_TOKEN
+                                                            : AS3_COMMENT_TOKEN;
+      String strippedLine = violatedLine;
+
+      if ( violatedLine.indexOf( comment_token
+            + " N" ) > 0 )
+      {
+         strippedLine = StringUtils.strip( violatedLine.substring( violatedLine.indexOf( comment_token
+               + " N" ) ) );
+      }
+      else if ( violatedLine.indexOf( comment_token
+            + "N" ) > 0 )
+      {
+         strippedLine = StringUtils.strip( violatedLine.substring( violatedLine.indexOf( comment_token
+               + "N" ) ) );
+      }
+      return strippedLine;
+   }
+
+   private boolean isFileExcluded( final IFlexFile file )
+   {
+      if ( excludes != null )
+      {
+         for ( final String exclusion : excludes )
+         {
+            final Pattern pattern = Pattern.compile( exclusion );
+
+            if ( RegexHelper.isMatch( pattern,
+                                      file.getFilePath() ) )
+            {
+               return true;
+            }
+         }
+      }
+      return false;
+   }
+
+   private boolean lineContainsNoPmd( final String violatedLine,
+                                      final String comment_token )
+   {
+      return violatedLine.contains( comment_token
+            + " No PMD" )
+            || violatedLine.contains( comment_token
+                  + " NO PMD" ) || violatedLine.contains( comment_token
+                  + " NOPMD" ) || violatedLine.contains( comment_token
+                  + "NOPMD" );
+   }
+
+   private void prettyPrintMessage( final IFlexViolation violation )
+   {
+      final int nbOfBraces = violation.getRuleMessage().split( "\\{" ).length - 1;
+
+      if ( this instanceof IThresholdedRule )
+      {
+         final IThresholdedRule thresholdeRule = ( IThresholdedRule ) this;
+
+         violation.replacePlaceholderInMessage( String.valueOf( thresholdeRule.getThreshold() ),
+                                                nbOfBraces - 2 );
+         violation.replacePlaceholderInMessage( String.valueOf( thresholdeRule.getActualValueForTheCurrentViolation() ),
+                                                nbOfBraces - 1 );
+      }
+      if ( getDescription() != null )
+      {
+         violation.appendToMessage( ". " );
+         violation.appendToMessage( getDescription() );
+      }
+   }
+
+   private void setDefaultPriority()
+   {
+      setPriority( Integer.valueOf( getDefaultPriority().toString() ) );
+   }
+
+   private boolean strippedLineContainsNoPmdAndRuleName( final String comment_token,
+                                                         final String ruleName,
+                                                         final String strippedLine )
+   {
+      return strippedLine.endsWith( comment_token
+            + " No PMD" )
+            || strippedLine.endsWith( comment_token
+                  + " NO PMD" ) || strippedLine.endsWith( comment_token
+                  + " NOPMD" ) || strippedLine.endsWith( comment_token
+                  + "NOPMD" ) || strippedLine.contains( ruleName );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractFlexRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractFlexRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractFlexRuleTest.java
new file mode 100644
index 0000000..ac44b0c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractFlexRuleTest.java
@@ -0,0 +1,264 @@
+/*
+ * 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.core;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.parser.exceptions.TokenException;
+
+public abstract class AbstractFlexRuleTest extends FlexPmdTestBase
+{
+   final static class AssertPosition
+   {
+      public static AssertPosition create( final String message,
+                                           final int expectedLine,
+                                           final int actualLine )
+      {
+         return new AssertPosition( message, expectedLine, actualLine );
+      }
+
+      public int    actualLine;
+      public int    expectedLine;
+      public String message;
+
+      private AssertPosition( final String messageToBeSet,
+                              final int expectedLineToBeSet,
+                              final int actualLineToBeSet )
+      {
+         super();
+         message = messageToBeSet;
+         expectedLine = expectedLineToBeSet;
+         actualLine = actualLineToBeSet;
+      }
+   }
+
+   protected final static class ExpectedViolation
+   {
+      protected String              file;
+      protected ViolationPosition[] positions;
+
+      public ExpectedViolation( final String fileToBeSet,
+                                final ViolationPosition[] positionsToBeSet )
+      {
+         super();
+         file = fileToBeSet;
+         positions = positionsToBeSet;
+      }
+   }
+
+   protected static StringBuffer buildFailuresMessage( final List< AssertPosition > failures )
+   {
+      final StringBuffer message = new StringBuffer( 42 );
+
+      for ( final AssertPosition assertPosition : failures )
+      {
+         message.append( assertPosition.message
+               + ": expected <" + assertPosition.expectedLine + "> but actually <"
+               + assertPosition.actualLine + ">\n" );
+      }
+      return message;
+   }
+
+   protected static List< AssertPosition > buildFailureViolations( final String resourcePath,
+                                                                   final ViolationPosition[] expectedPositions,
+                                                                   final List< IFlexViolation > violations )
+   {
+      List< AssertPosition > failures;
+      failures = new ArrayList< AssertPosition >();
+
+      for ( int i = 0; i < expectedPositions.length; i++ )
+      {
+         final IFlexViolation violation = violations.get( i );
+         final ViolationPosition expectedPosition = expectedPositions[ i ];
+
+         if ( expectedPosition.getBeginLine() != violation.getBeginLine() )
+         {
+            failures.add( AssertPosition.create( BEGIN_LINE_NOT_CORRECT
+                                                       + " at " + i + "th violation on " + resourcePath,
+                                                 expectedPosition.getBeginLine(),
+                                                 violation.getBeginLine() ) );
+         }
+         if ( expectedPosition.getEndLine() != violation.getEndLine() )
+         {
+            failures.add( AssertPosition.create( END_LINE_NOT_CORRECT
+                                                       + " at " + i + "th violation on " + resourcePath,
+                                                 expectedPosition.getEndLine(),
+                                                 violation.getEndLine() ) );
+         }
+      }
+      return failures;
+   }
+
+   protected static StringBuffer buildMessageName( final Map< String, List< IFlexViolation >> violatedFiles )
+   {
+      final StringBuffer buffer = new StringBuffer( 100 );
+
+      for ( final String violatedFileName : violatedFiles.keySet() )
+      {
+         final List< IFlexViolation > violations = violatedFiles.get( violatedFileName );
+
+         buffer.append( violatedFileName
+               + " should not contain any violations " + " (" + violations.size() + " found" );
+
+         if ( violations.size() == 1 )
+         {
+            buffer.append( " at "
+                  + violations.get( 0 ).getBeginLine() + ":" + violations.get( 0 ).getEndLine() );
+         }
+         buffer.append( ")\n" );
+      }
+      return buffer;
+   }
+
+   /**
+    * Test case which contains non-concerned files by the given rule
+    * 
+    * @throws TokenException
+    * @throws IOException
+    */
+   @Test
+   public final void testProcessNonViolatingFiles() throws IOException,
+                                                   TokenException
+   {
+      final Map< String, List< IFlexViolation >> violatedFiles = extractActualViolatedFiles();
+      final StringBuffer buffer = buildMessageName( violatedFiles );
+
+      if ( !violatedFiles.isEmpty() )
+      {
+         fail( buffer.toString() );
+      }
+   }
+
+   /**
+    * Test case which contains violating files
+    */
+   @Test
+   public final void testProcessViolatingFiles()
+   {
+      final Map< String, ViolationPosition[] > expectedPositions = computeExpectedViolations( getExpectedViolatingFiles() );
+
+      for ( final String fileName : expectedPositions.keySet() )
+      {
+         assertViolations( fileName,
+                           expectedPositions.get( fileName ) );
+      }
+   }
+
+   protected abstract ExpectedViolation[] getExpectedViolatingFiles();
+
+   protected List< String > getIgnoreFiles()
+   {
+      return new ArrayList< String >();
+   }
+
+   protected abstract AbstractFlexRule getRule();
+
+   protected List< IFlexViolation > processFile( final String resourcePath ) throws IOException,
+                                                                            TokenException
+   {
+      if ( !getIgnoreFiles().contains( resourcePath ) )
+      {
+         return getRule().processFile( getTestFiles().get( resourcePath ),
+                                       null,
+                                       getTestFiles() );
+      }
+      return new ArrayList< IFlexViolation >();
+   }
+
+   private void assertViolations( final String resourcePath,
+                                  final ViolationPosition[] expectedPositions )
+   {
+      try
+      {
+         final List< IFlexViolation > violations = processFile( resourcePath );
+
+         assertEquals( VIOLATIONS_NUMBER_NOT_CORRECT
+                             + " for " + resourcePath,
+                       expectedPositions.length,
+                       violations.size() );
+
+         if ( expectedPositions.length != 0 )
+         {
+            printFailures( buildFailureViolations( resourcePath,
+                                                   expectedPositions,
+                                                   violations ) );
+         }
+      }
+      catch ( final IOException e )
+      {
+         fail( e.getMessage() );
+      }
+      catch ( final TokenException e )
+      {
+         fail( e.getMessage() );
+      }
+   }
+
+   private Map< String, ViolationPosition[] > computeExpectedViolations( final ExpectedViolation[] expectedViolatingFiles )
+   {
+      final Map< String, ViolationPosition[] > expectedViolations = new LinkedHashMap< String, ViolationPosition[] >();
+
+      for ( final ExpectedViolation expectedViolatingFile : expectedViolatingFiles )
+      {
+         expectedViolations.put( expectedViolatingFile.file,
+                                 expectedViolatingFile.positions );
+      }
+      return expectedViolations;
+   }
+
+   private Map< String, List< IFlexViolation >> extractActualViolatedFiles() throws IOException,
+                                                                            TokenException
+   {
+      final Map< String, List< IFlexViolation > > violatedFiles = new LinkedHashMap< String, List< IFlexViolation > >();
+      final Map< String, ViolationPosition[] > expectedPositions = computeExpectedViolations( getExpectedViolatingFiles() );
+
+      for ( final Map.Entry< String, IFlexFile > fileNameEntry : getTestFiles().entrySet() )
+      {
+         if ( !expectedPositions.containsKey( fileNameEntry.getKey() ) )
+         {
+            final List< IFlexViolation > violations = processFile( fileNameEntry.getKey() );
+
+            if ( !violations.isEmpty() )
+            {
+               violatedFiles.put( fileNameEntry.getKey(),
+                                  violations );
+            }
+         }
+      }
+      return violatedFiles;
+   }
+
+   private void printFailures( final List< AssertPosition > failures )
+   {
+      if ( !failures.isEmpty() )
+      {
+         fail( buildFailuresMessage( failures ).toString() );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractForbiddenImportRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractForbiddenImportRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractForbiddenImportRule.java
new file mode 100644
index 0000000..5c54876
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractForbiddenImportRule.java
@@ -0,0 +1,58 @@
+/*
+ * 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.core;
+
+import com.adobe.ac.pmd.nodes.IPackage;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * @author xagnetti
+ */
+public abstract class AbstractForbiddenImportRule extends AbstractAstFlexRule
+{
+
+   /**
+    * 
+    */
+   public AbstractForbiddenImportRule()
+   {
+      super();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IPackage)
+    */
+   @Override
+   protected final void findViolations( final IPackage packageNode )
+   {
+      for ( final IParserNode importNode : packageNode.getImports() )
+      {
+         if ( importNode.getStringValue().contains( getForbiddenImport() ) )
+         {
+            addViolation( importNode );
+         }
+      }
+   }
+
+   /**
+    * @return
+    */
+   protected abstract String getForbiddenImport();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractPrimaryAstRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractPrimaryAstRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractPrimaryAstRule.java
new file mode 100644
index 0000000..7479a2a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractPrimaryAstRule.java
@@ -0,0 +1,86 @@
+/*
+ * 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.core;
+
+import java.util.List;
+
+import com.adobe.ac.pmd.nodes.IFunction;
+import com.adobe.ac.pmd.parser.IParserNode;
+
+/**
+ * Abstract rule which find a primary (or a couple of primaries) in a body
+ * function.
+ * 
+ * @author xagnetti
+ */
+public abstract class AbstractPrimaryAstRule extends AbstractAstFlexRule
+{
+   /**
+    * @param statement
+    * @param function
+    */
+   protected abstract void addViolation( IParserNode statement,
+                                         IFunction function );
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractAstFlexRule#findViolations(com.adobe
+    * .ac.pmd.nodes.IFunction)
+    */
+   @Override
+   protected final void findViolations( final IFunction function )
+   {
+      final List< IParserNode > firstStatements = function.findPrimaryStatementsInBody( getFirstPrimaryToFind() );
+      if ( !firstStatements.isEmpty() )
+      {
+         for ( final IParserNode firstStatement : firstStatements )
+         {
+            if ( getSecondPrimaryToFind() == null )
+            {
+               addViolation( firstStatement,
+                             function );
+            }
+            else
+            {
+               final List< IParserNode > secondStatements = function.findPrimaryStatementsInBody( getSecondPrimaryToFind() );
+               if ( !secondStatements.isEmpty() )
+               {
+                  for ( final IParserNode secondStatement : secondStatements )
+                  {
+                     addViolation( secondStatement,
+                                   function );
+                  }
+               }
+            }
+         }
+      }
+   }
+
+   /**
+    * @return
+    */
+   protected abstract String getFirstPrimaryToFind();
+
+   /**
+    * @return
+    */
+   protected String getSecondPrimaryToFind()
+   {
+      return null;
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractRegExpBasedRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractRegExpBasedRuleTest.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractRegExpBasedRuleTest.java
new file mode 100644
index 0000000..527e1cf
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractRegExpBasedRuleTest.java
@@ -0,0 +1,76 @@
+/*
+ * 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.core;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import junit.framework.Assert;
+
+import org.junit.Test;
+
+public abstract class AbstractRegExpBasedRuleTest extends AbstractFlexRuleTest
+{
+   @Test
+   public void testDoesCurrentLineMacthCorrectLine()
+   {
+      final AbstractRegexpBasedRule rule = getRegexpBasedRule();
+
+      if ( getMatchableLines().length == 0 )
+      {
+         Assert.fail( "the getMatchableLines() is empty" );
+      }
+      for ( int i = 0; i < getMatchableLines().length; i++ )
+      {
+         final String correctLine = getMatchableLines()[ i ];
+
+         assertTrue( "This line (\""
+                           + correctLine + "\") should be matched",
+                     rule.doesCurrentLineMacthes( correctLine ) );
+      }
+   }
+
+   @Test
+   public void testDoesCurrentLineMacthIncorrectLine()
+   {
+      final AbstractRegexpBasedRule rule = getRegexpBasedRule();
+
+      if ( getUnmatchableLines().length == 0 )
+      {
+         Assert.fail( "the getUnmatchableLines() is empty" );
+      }
+      for ( int i = 0; i < getUnmatchableLines().length; i++ )
+      {
+         final String incorrectLine = getUnmatchableLines()[ i ];
+
+         assertFalse( "This line  (\""
+                            + incorrectLine + "\") should not be matched",
+                      rule.doesCurrentLineMacthes( incorrectLine ) );
+      }
+   }
+
+   protected abstract String[] getMatchableLines();
+
+   protected abstract AbstractRegexpBasedRule getRegexpBasedRule();
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return getRegexpBasedRule();
+   }
+
+   protected abstract String[] getUnmatchableLines();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractRegexpBasedRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractRegexpBasedRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractRegexpBasedRule.java
new file mode 100644
index 0000000..cfc71de
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractRegexpBasedRule.java
@@ -0,0 +1,116 @@
+/*
+ * 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.core;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.adobe.ac.pmd.IFlexViolation;
+
+/**
+ * @author xagnetti
+ */
+public abstract class AbstractRegexpBasedRule extends AbstractFlexRule
+{
+   private Pattern pattern;
+
+   /**
+    * 
+    */
+   public AbstractRegexpBasedRule()
+   {
+      super();
+      compilePattern();
+   }
+
+   /**
+    * 
+    */
+   public final void compilePattern()
+   {
+      pattern = Pattern.compile( getRegexp() );
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#findViolationsInCurrentFile()
+    */
+   @Override
+   public final List< IFlexViolation > findViolationsInCurrentFile()
+   {
+      final List< IFlexViolation > violations = new ArrayList< IFlexViolation >();
+
+      if ( "".compareTo( getRegexp() ) != 0 )
+      {
+         for ( int i = 1; i <= getCurrentFile().getLinesNb(); i++ )
+         {
+            final String line = getCurrentFile().getLineAt( i );
+
+            if ( isCurrentLineConcerned( line )
+                  && doesCurrentLineMacthes( line ) && isViolationDetectedOnThisMatchingLine( line )
+                  && !line.contains( "/*" ) && !line.contains( "//" ) )
+            {
+               addViolation( violations,
+                             ViolationPosition.create( i,
+                                                       i,
+                                                       0,
+                                                       line.length() ) );
+            }
+         }
+      }
+      return violations;
+   }
+
+   /**
+    * @param line
+    * @return
+    */
+   final boolean doesCurrentLineMacthes( final String line )
+   {
+      return getMatcher( line ).matches();
+   }
+
+   /**
+    * @param line
+    * @return
+    */
+   protected final Matcher getMatcher( final String line )
+   {
+      final Matcher matcher = pattern.matcher( line );
+
+      return matcher;
+   }
+
+   /**
+    * @return
+    */
+   protected abstract String getRegexp();
+
+   protected boolean isCurrentLineConcerned( final String line )
+   {
+      return true;
+   }
+
+   /**
+    * @param line
+    * @return
+    */
+   protected abstract boolean isViolationDetectedOnThisMatchingLine( final String line );
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractXpathRelatedRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractXpathRelatedRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractXpathRelatedRule.java
new file mode 100644
index 0000000..72dadfb
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/AbstractXpathRelatedRule.java
@@ -0,0 +1,244 @@
+/*
+ * 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.core;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.logging.Logger;
+
+import javax.xml.XMLConstants;
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.utils.StackTraceUtils;
+
+/**
+ * @author xagnetti
+ */
+public abstract class AbstractXpathRelatedRule extends AbstractFlexRule
+{
+   /**
+    * @author xagnetti
+    */
+   public class NamespaceContextMap implements NamespaceContext
+   {
+      private final Map< String, String > prefixMap;
+
+      /**
+       * Constructor that takes a map of XML prefix-namespaceURI values. A
+       * defensive copy is made of the map. An IllegalArgumentException will be
+       * thrown if the map attempts to remap the standard prefixes defined in
+       * the NamespaceContext contract.
+       * 
+       * @param prefixMappings a map of prefix:namespaceURI values
+       */
+      public NamespaceContextMap( final Map< String, String > prefixMappings )
+      {
+         prefixMap = createPrefixMap( prefixMappings );
+      }
+
+      /**
+       * Convenience constructor.
+       * 
+       * @param mappingPairs pairs of prefix-namespaceURI values
+       */
+      public NamespaceContextMap( final String... mappingPairs )
+      {
+         this( toMap( mappingPairs ) );
+      }
+
+      /*
+       * (non-Javadoc)
+       * @see
+       * javax.xml.namespace.NamespaceContext#getNamespaceURI(java.lang.String)
+       */
+      public String getNamespaceURI( final String prefix )
+      {
+         prefixMap.get( prefix );
+         return prefixMap.get( prefix );
+      }
+
+      /*
+       * (non-Javadoc)
+       * @see javax.xml.namespace.NamespaceContext#getPrefix(java.lang.String)
+       */
+      public String getPrefix( final String namespaceURI )
+      {
+         return null;
+      }
+
+      /*
+       * (non-Javadoc)
+       * @see javax.xml.namespace.NamespaceContext#getPrefixes(java.lang.String)
+       */
+      public Iterator< String > getPrefixes( final String namespaceURI )
+      {
+         return null;
+      }
+
+      private void addConstant( final Map< String, String > map,
+                                final String prefix,
+                                final String nsURI )
+      {
+         map.put( prefix,
+                  nsURI );
+      }
+
+      private Map< String, String > createPrefixMap( final Map< String, String > prefixMappings )
+      {
+         final Map< String, String > map = new LinkedHashMap< String, String >( prefixMappings );
+         addConstant( map,
+                      XMLConstants.XML_NS_PREFIX,
+                      XMLConstants.XML_NS_URI );
+         addConstant( map,
+                      XMLConstants.XMLNS_ATTRIBUTE,
+                      XMLConstants.XMLNS_ATTRIBUTE_NS_URI );
+         return Collections.unmodifiableMap( map );
+      }
+
+   }
+
+   protected static final Logger LOGGER = Logger.getLogger( AbstractXpathRelatedRule.class.getName() );
+
+   private static Map< String, String > toMap( final String... mappingPairs )
+   {
+      final Map< String, String > prefixMappings = new LinkedHashMap< String, String >( mappingPairs.length / 2 );
+      for ( int i = 0; i < mappingPairs.length; i++ )
+      {
+         prefixMappings.put( mappingPairs[ i ],
+                             mappingPairs[ ++i ] );
+      }
+      return prefixMappings;
+   }
+
+   /**
+    * @param doc
+    * @param xPath
+    * @return
+    * @throws XPathExpressionException
+    */
+   protected abstract Object evaluate( final Document doc,
+                                       final XPath xPath ) throws XPathExpressionException;
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#findViolationsInCurrentFile()
+    */
+   @Override
+   protected List< IFlexViolation > findViolationsInCurrentFile()
+   {
+      final ArrayList< IFlexViolation > violations = new ArrayList< IFlexViolation >();
+
+      try
+      {
+         final Document doc = buildDocument();
+         final XPath xPath = buildXPath();
+
+         onEvaluated( violations,
+                      doc,
+                      xPath );
+      }
+      catch ( final XPathExpressionException e )
+      {
+         LOGGER.warning( StackTraceUtils.print( getCurrentFile().getFilename(),
+                                                e ) );
+      }
+      catch ( final FileNotFoundException e )
+      {
+         LOGGER.warning( StackTraceUtils.print( getCurrentFile().getFilename(),
+                                                e ) );
+      }
+      catch ( final ParserConfigurationException e )
+      {
+         LOGGER.warning( StackTraceUtils.print( getCurrentFile().getFilename(),
+                                                e ) );
+      }
+      catch ( final SAXException e )
+      {
+         LOGGER.warning( StackTraceUtils.print( getCurrentFile().getFilename(),
+                                                e ) );
+      }
+      catch ( final IOException e )
+      {
+         LOGGER.warning( StackTraceUtils.print( getCurrentFile().getFilename(),
+                                                e ) );
+      }
+
+      return violations;
+   }
+
+   /**
+    * @return
+    */
+   protected abstract String getXPathExpression();
+
+   /*
+    * (non-Javadoc)
+    * @see
+    * com.adobe.ac.pmd.rules.core.AbstractFlexRule#isConcernedByTheCurrentFile()
+    */
+   @Override
+   protected boolean isConcernedByTheCurrentFile()
+   {
+      return getCurrentFile().isMxml();
+   }
+
+   /**
+    * @param violations
+    * @param doc
+    * @param xPath
+    * @throws XPathExpressionException
+    */
+   protected abstract void onEvaluated( final List< IFlexViolation > violations,
+                                        final Document doc,
+                                        final XPath xPath ) throws XPathExpressionException;
+
+   private Document buildDocument() throws ParserConfigurationException,
+                                   SAXException,
+                                   IOException
+   {
+      final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+      factory.setNamespaceAware( true );
+      final DocumentBuilder builder = factory.newDocumentBuilder();
+      return builder.parse( getCurrentFile().getFilePath() );
+   }
+
+   private XPath buildXPath()
+   {
+      final XPathFactory xPathFactory = XPathFactory.newInstance();
+      final XPath xPath = xPathFactory.newXPath();
+      xPath.setNamespaceContext( new NamespaceContextMap( "mx", "http://www.adobe.com/2006/mxml" ) );
+      return xPath;
+   }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/IFlexAstRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/IFlexAstRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/IFlexAstRule.java
new file mode 100644
index 0000000..7cfcee4
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/IFlexAstRule.java
@@ -0,0 +1,28 @@
+/*
+ * 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.core;
+
+/**
+ * @author xagnetti
+ */
+public interface IFlexAstRule extends IFlexRule
+{
+   /**
+    * @return true if the current file is concerned
+    */
+   boolean isConcernedByTheCurrentFile();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/IFlexRule.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/IFlexRule.java b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/IFlexRule.java
new file mode 100644
index 0000000..3eb94e4
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-ruleset-api/src/main/java/com/adobe/ac/pmd/rules/core/IFlexRule.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.core;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import net.sourceforge.pmd.Rule;
+
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.nodes.IPackage;
+
+/**
+ * @author xagnetti
+ */
+public interface IFlexRule extends Rule
+{
+   /**
+    * @return ruleName
+    */
+   String getRuleName();
+
+   /**
+    * @param file
+    * @param rootNode
+    * @param files
+    * @return
+    */
+   List< IFlexViolation > processFile( final IFlexFile file,
+                                       final IPackage rootNode,
+                                       final Map< String, IFlexFile > files );
+
+   /**
+    * @param excludes
+    */
+   void setExcludes( final Set< String > excludes );
+}
\ No newline at end of file


[42/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/engines/PmdEngineUtilsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/engines/PmdEngineUtilsTest.java b/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/engines/PmdEngineUtilsTest.java
deleted file mode 100644
index cc9a80a..0000000
--- a/FlexPMD/flex-pmd-core/src/test/java/com/adobe/ac/pmd/engines/PmdEngineUtilsTest.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * 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.engines;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.FlexPmdTestBase;
-import com.adobe.ac.pmd.FlexPmdViolations;
-import com.adobe.ac.pmd.IFlexViolation;
-import com.adobe.ac.pmd.files.IFlexFile;
-import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
-import com.adobe.ac.pmd.rules.core.IFlexRule;
-import com.adobe.ac.pmd.rules.core.Violation;
-import com.adobe.ac.pmd.rules.core.ViolationPosition;
-import com.adobe.ac.pmd.rules.core.ViolationPriority;
-
-public class PmdEngineUtilsTest extends FlexPmdTestBase
-{
-   private class ErrorRule extends AbstractFlexRule implements IFlexRule
-   {
-      @Override
-      protected List< IFlexViolation > findViolationsInCurrentFile()
-      {
-         return new ArrayList< IFlexViolation >();
-      }
-
-      @Override
-      protected ViolationPriority getDefaultPriority()
-      {
-         return ViolationPriority.HIGH;
-      }
-
-      @Override
-      protected boolean isConcernedByTheCurrentFile()
-      {
-         return true;
-      }
-   }
-
-   private class WarningRule extends AbstractFlexRule
-   {
-      @Override
-      protected List< IFlexViolation > findViolationsInCurrentFile()
-      {
-         return new ArrayList< IFlexViolation >();
-      }
-
-      @Override
-      protected ViolationPriority getDefaultPriority()
-      {
-         return ViolationPriority.NORMAL;
-      }
-
-      @Override
-      protected boolean isConcernedByTheCurrentFile()
-      {
-         return true;
-      }
-   }
-
-   @Test
-   public void testFindFirstViolationError()
-   {
-      final FlexPmdViolations violations = new FlexPmdViolations();
-      final List< IFlexViolation > abstractRowDataViolations = new ArrayList< IFlexViolation >();
-
-      assertEquals( "",
-                    PmdEngineUtils.findFirstViolationError( violations ) );
-
-      final IFlexFile abstractRowDataFlexFile = getTestFiles().get( "AbstractRowData.as" );
-
-      abstractRowDataViolations.add( new Violation( new ViolationPosition( 0 ),
-                                                    new ErrorRule(),
-                                                    abstractRowDataFlexFile ) );
-      abstractRowDataViolations.add( new Violation( new ViolationPosition( 0 ),
-                                                    new WarningRule(),
-                                                    abstractRowDataFlexFile ) );
-      violations.getViolations().put( abstractRowDataFlexFile,
-                                      abstractRowDataViolations );
-      assertEquals( "An error violation has been found on the file AbstractRowData.as at line 0, with the rule"
-                          + " \"com.adobe.ac.pmd.engines.PmdEngineUtilsTest$ErrorRule\": \n",
-                    PmdEngineUtils.findFirstViolationError( violations ) );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/test/resources/allInOneRuleset.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/test/resources/allInOneRuleset.xml b/FlexPMD/flex-pmd-core/src/test/resources/allInOneRuleset.xml
deleted file mode 100644
index aff76df..0000000
--- a/FlexPMD/flex-pmd-core/src/test/resources/allInOneRuleset.xml
+++ /dev/null
@@ -1,600 +0,0 @@
-<!--
-
-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.
-
--->
-<ruleset name="All Flex Rules"
-	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
-	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
-	xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<description />
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.mxml.MoreThanTwoEntryPointsInMxmlRule"
-		message="There are more than 2 public variables in this MXML component">
-		<description />
-		<priority>3</priority>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.binding.TooLongBindingExpressionRule"
-		message="This binding expression is too long">
-		<description>A Binding expression is executed as soon as one of the bindable attributes changed. If a binding expression contains too many expression, there could be some performance issue.</description>
-		<priority>3</priority>
-		<properties>
-			<property name="maximum">
-				<value>3</value>
-			</property>
-		</properties>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.mxml.TooLongScriptBlockRule"
-		message="This script block is too long">
-		<description />
-		<priority>3</priority>
-		<properties>
-			<property name="maximum">
-				<value>50</value>
-			</property>
-		</properties>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.DynamicClassRule"
-		message="A class must not be dynamic">
-		<description>When using dynamic classes, you cannot control how the developer will use your classe. It makes refactoring really difficult.</description>
-		<priority>1</priority>
-		<example><![CDATA[
-dynamic public class DynamicObject // VIOLATION
-   {
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.event.EventMissingCloneFunctionRule"
-		message="The clone event must be overiden in a custom event">
-		<description>Why do you need to override clone? Well, the clone method creates a copy of your event (or object - whatever object has the clone event; this isn't limited to Event objects). The default clone method inherited by the Event class or whatever class your custom class extends, will return an event object of the type of that class, not your custom event subclass. In the situations where a clone is needed, it is needed to be of the same type of your class, not the class it extends.</description>
-		<priority>1</priority>
-		<example><![CDATA[
-public class FirstCustomEvent   // VIOLATION - clone method is missing
-   {
-      public var lala : String;
-      
-      public function FirstCustomEvent()
-      {         
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.event.PublicVariableInCustomEventRule"
-		message="No public variables should be inside a custom event">
-		<description>In order to improve encapsulation in your custom event, it is better not to have public variable in your event. Prefer having read-only attributes, set by the event constructor.</description>
-		<priority>3</priority>
-		<example><![CDATA[
-public class FirstCustomEvent   
-   {
-      public var lala : String; // VIOLATION
-      
-      public function FirstCustomEvent()
-      {         
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.style.ConstructorNonEmptyReturnTypeRule"
-		message="A constructor should not have a return type">
-		<description>Even if this is syntaxically correct, there should not be a return type for a constructor.</description>
-		<priority>3</priority>
-		<example><![CDATA[
-public class VoidConstructor   
-   {
-      public function VoidConstructor() : void
-      {         
-      }      
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.switchrules.SwitchStatementsShouldHaveDefaultRule"
-		message="A switch statement does not contain a default statement">
-		<description>Switch statements should have a default label in order to detect corner cases.</description>
-		<priority>1</priority>
-		<example><![CDATA[
-public class Foo 
-   {
-      public funciton bar() : void 
-      {
-         var  x : int = 2;
-         switch (x) 
-         {
-            case 2: var j : int = 8;
-         }
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseObjectTypeRule"
-		message="Do not use Object class.">
-		<description>It is a bad practice to use the dynamic class Object. Prefer using strongly typed object, or marker interface in order to avoid silent compilation errors while refactoring</description>
-		<priority>1</priority>
-		<example><![CDATA[
-public class Foo
-   {
-      public var bar : Object; // VIOLATION      
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.switchrules.NestedSwitchRule"
-		message="Switch must not be nested.">
-		<description>As a general practice, switch statement should not be used. Prefer using inheritance. It is even harder to read when siwtch statements are nested.</description>
-		<priority>3</priority>
-		<example><![CDATA[
-public function foo( a : Number, b : Number ) : void
-      {
-          switch( a )
-          {
-             case 1:
-                break;
-             case 2:                   
-                switch ( b ) 
-                {
-                  case 3 :
-                     break;
-                  case 4 :
-                     break;
-                }
-                break;                     
-          }
-      }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.maintanability.ArrayFieldWithNoArrayElementTypeRule"
-		message="ArrayElementType metadata is not specified for an array-type field">
-		<description />
-		<priority>3</priority>
-		<example><![CDATA[
-public class ArrayVO {
-      public var items:Array; //VIOLATION
-
-      [ArrayElementType("model.vo.MenuItemVO")]
-      public var menuItems : Array;
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.maintanability.NonStaticConstantFieldRule" message="A constant field should be static">
-		<description />
-		<priority>1</priority>
-		<example><![CDATA[
-public class MyObject {
-      public static const MY_STATIC_CONSTANT : String = "myStaticConstant";
-      public const MY_NON_STATIC_CONSTANT : String = "myStaticConstant"; // VIOLATION
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.unused.UnusedParameterRule" message="You should use all the parameters of a function">
-		<description />
-		<priority>1</priority>
-		<example><![CDATA[
-public function foo( param1 : Number, param2 : Number, param3 : Number, param4 : Number, param5 : Number ) : void // 4 violations
-      {
-         var i : int = param1;
-      }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.unused.UnusedLocalVariableRule"
-		message="You should delete an unused variable">
-		<description />
-		<priority>3</priority>
-		<example><![CDATA[
-public function foo() : void
-      {
-         var i : int = 0;// 1 violation
-      }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.unused.UnusedPrivateMethodRule"
-		message="This private method does not seem to be used">
-		<description />
-		<priority>3</priority>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.switchrules.TooFewBrancheInSwitchStatementRule"
-		message="There are too few branches in this swicth statement">
-		<description>Switch statements are designed for complex branches, and allow branches to share treatement. Using a switch for only 2 branches is ill advised, as switches are not as easy to understand as if. In this case, it's most likely is a good idea to use a if statement</description>
-		<priority>5</priority>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.style.BadFormatLoggerRule"
-		message="The loger is not correctly formatted">
-		<description />
-		<priority>5</priority>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.performance.AvoidInstanciationInLoopRule"
-		message="Instanciating a variable in a loop can be expensive">
-		<description />
-		<priority>3</priority>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.architecture.ViewComponentReferencedInModelRule"
-		message="A view component should not be referenced in a model class">
-		<description />
-		<priority>3</priority>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseGenericTypeRule"
-		message="Use strongly typed objects instead of *">
-		<description />
-		<priority>1</priority>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.event.DispatchHardCodedEventNameRule"
-		message="DispatchEvent function must dispatch constant strings">
-		<description>You should not dispatch a plain string. If you rename this string, you need to replace the string listener as well. Use constants instead</description>
-		<priority>3</priority>
-		<example><![CDATA[
-public class Foo 
-   {
-      public function bar() : void
-      {
-         dispatch( new Event( "myHardCodedEvent" ) ); // VIOLATION
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.event.ListenForHardCodedEventNameRule"
-		message="addEventListener must not contain hard coded strings.">
-		<description>You should not listen for a plain string. If you rename this string, you need to replace the string listener as well. Use constants instead</description>
-		<priority>3</priority>
-		<example><![CDATA[
-public class Foo 
-   {
-      public function bar() : void
-      {
-         addEventListener( "myHardCodedEvent", handleMyHardCodedEvent ); // VIOLATION
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.AlertShowRule"
-		message="Do not call Alert.show directly.">
-		<description>You should not Alert.show() directly. If an error occured in the system, you should probably use an ErrorManager to have a consistent way to manage those errors.</description>
-		<priority>1</priority>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.empty.EmptyIfStmtRule"
-		message="No statements in this if statement">
-		<description>Empty If Statement finds instances where a condition is checked but nothing is done about it.</description>
-		<priority>3</priority>
-		<example><![CDATA[
-public class Foo 
-   {
-      public function bar( x : int ) : void
-      {
-         if ( x == 0 ) 
-         {
-            // VIOLATION
-         }
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.ExcessiveImportRule"
-		message="A high number of imports can indicate a high degree of coupling within an object.">
-		<description>A high number of imports can indicate a high degree of coupling within an object. Rule counts the number of unique imports and reports a violation if the count is above the user defined threshold.</description>
-		<priority>3</priority>
-		<properties>
-			<property name="maximum">
-				<value>15</value>
-			</property>
-		</properties>
-		<example><![CDATA[
-import blah.blah.Baz;
-   import blah.blah.Bif;
-   // 18 others from the same package elided
-   public class Foo 
-   {
-      public function doWork() : void 
-      {
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.binding.BindingUtilsRule"
-		message="If you need to use BindingUtils, you should probably consider refactoring using events">
-		<description />
-		<priority>3</priority>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.style.OverLongLineRule"
-		message="Too long line ({0} maximum)">
-		<description />
-		<priority>5</priority>
-		<properties>
-			<property name="maximum">
-				<value>120</value>
-			</property>
-		</properties>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.style.ImportFromSamePackageRule"
-		message="Imports from the same package are not necessary">
-		<description />
-		<priority>1</priority>
-		<example><![CDATA[
-package com.adobe.ac
-{
-   import com.adobe.ac.MyModel; // VIOLATION HERE
-
-   public class BigModel   
-   {
-      public var model : MyModel = null;
-   }
-}
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.naming.IncorrectClassCase"
-		message="A class name must start by a majuscule character">
-		<description />
-		<priority>3</priority>
-		<example><![CDATA[
-public class foo
-   {
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.cairngorm.BindableModelLocatorRule"
-		message="A modelLocator must not be Bindable at a class level">
-		<description>A bindable ModelLocator could leads to performance issues due to bindings</description>
-		<priority>1</priority>
-		<example><![CDATA[
-[Bindable]
-   public class BindableModelLocator // VIOLATION 
-   {      
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.cairngorm.ReferenceModelLocatorOutsideTheMainApplicationRule"
-		message="The ModelLocator should be only accessible from the main application file">
-		<description>The ModelLocator should be only accessible from the main application file. Then sub-models should be injected to the nested views.</description>
-		<priority>3</priority>
-		<example><![CDATA[
-package business
-{
-   import model.MyModelLocator; // VIOLATION
-   
-   public class MyBusinessClass 
-   } 
-}
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.cairngorm.FatControllerRule"
-		message="A FrontController must nor add all its commands within the Controller constructor.">
-		<description>Try split them into methods where you add commands depending on their fonctional area.</description>
-		<priority>3</priority>
-		<example><![CDATA[
-package control
-{
-   import control.GetItems1Command;
-   import control.GetItems1Event;
-   import control.GetItems2Command;
-   import control.GetItems2Event;
-   // A lot of other imports
-   
-   public class MyFrontController // VIOLATION
-   {
-      public function MyFrontController()
-      {
-         addCommand( 
-            GetItems1Event.EVENT_NAME,
-            GetItems1Command );
-
-         addCommand( 
-            GetItems2Event.EVENT_NAME,
-            GetItems2Command );
-
-         // A lot of other addCommand
-      }
-   } 
-}
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.cairngorm.BadCairngormEventNameFormatRule"
-		message="A Cairngorm event name should contain the function area name before the actual event name">
-		<description>You would have something like 'productManagement.getProducts' as an event name.</description>
-		<priority>3</priority>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.sizing.TooManyFunctionRule" message="Too many methods detected">
-		<description>A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.</description>
-		<priority>3</priority>
-		<properties>
-			<property name="maximum">
-				<value>10</value>
-			</property>
-		</properties>
-		<example><![CDATA[
-public class Foo 
-   {
-      public function doWork() : void {}
-      public function doMoreWork() : void {}
-      public function doWorkAgain() : void {}
-      // [... more more public methods ...]
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.sizing.TooLongFunctionRule" message="This function is far long">
-		<description>Violations of this rule usually indicate that the method is doing too much. Try to reduce the method size by creating helper methods and removing any copy/pasted code.</description>
-		<priority>3</priority>
-		<properties>
-			<property name="maximum">
-				<value>25</value>
-			</property>
-		</properties>
-		<example><![CDATA[
-public class Foo 
-   {
-      public function doSomething() : void
-      {
-         System.out.println("Hello world!");
-         System.out.println("Hello world!");
-         // 98 copies omitted for brevity.
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.sizing.TooLongSwitchCaseRule"
-		message="Long switch case detected">
-		<description>A switch case statement should be either empty, or contain a break, or call another method.</description>
-		<priority>3</priority>
-		<example><![CDATA[
-public class Bar   
-   {
-      public function foo() : void
-      {
-          var i : int = 4;
-          
-          switch( i )
-          {
-             case 1:
-                handleFirstCase();
-                break;
-             case 2: // VIOLATION
-                googleResquest.url = "";
-                handleSecondCaseFirstPart();
-                handleSecondCaseSecondPart();
-                break;
-          }
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.sizing.TooManyParametersRule"
-		message="Long parameter list detected">
-		<description>Long parameter lists can indicate that a new object should be created to wrap the numerous parameters.  Basically, try to group the parameters together.</description>
-		<priority>1</priority>
-		<properties>
-			<property name="maximum">
-				<value>4</value>
-			</property>
-		</properties>
-		<example><![CDATA[
-public class Foo 
-   {
-      public function addData( p0 : int, p1 : int, p2 : int, p3 : int, p4 : int, p5 : int,
-                                             p6 : int, p7 : int, p8 : int, p9 : int, p10 : int ) : void 
-      {
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.sizing.TooManyPublicRule"
-		message="Too much public fields or functions detected">
-		<description>A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.</description>
-		<priority>3</priority>
-		<properties>
-			<property name="maximum">
-				<value>10</value>
-			</property>
-		</properties>
-		<example><![CDATA[
-public class Foo 
-   {
-      public var value : String;
-      public var something : Bar;
-      public var variable : Variable;
-
-      // [... more more public attributes ...]
-
-      public function doWork() : void {}
-      public function doMoreWork() : void {}
-      public function doWorkAgain() : void {}
-
-      // [... more more public methods ...]
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.sizing.TooManyFieldsRule"
-		message="Too many field detected">
-		<description>Classes that have too many fields could be redesigned to have fewer fields, possibly  through some nested object grouping of some of the information.  For example, a class with  city/state/zip fields could instead have one Address field.</description>
-		<priority>3</priority>
-		<properties>
-			<property name="maximum">
-				<value>5</value>
-			</property>
-		</properties>
-		<example><![CDATA[
-public class Person 
-   {
-      private var one : String;
-      private var two : int;
-      private var three : int;
-
-      [... many more public fields ...]
-
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.naming.TooShortVariableRule"
-		message="This variable name is too short">
-		<description>Detects when a field, local, or parameter has a very short name.</description>
-		<priority>5</priority>
-		<example><![CDATA[
-public class Something 
-   {
-      private var q : int = 15; // VIOLATION - Field
-	
-      public function foo( as : String ) : void // VIOLATION - Formal 
-      {
-         var r : int = 20 + q; // VIOLATION - Local
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.naming.PackageCaseRule"
-		message="A package name should be lower case">
-		<description>Detects when a package definition contains upper case characters.</description>
-		<priority>3</priority>
-		<example><![CDATA[
-
-   package com.MyCompany  // VIOLATION <- should be lower case name
-   {
-      public class SomeClass 
-      {
-      }
-   }
-         
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.css.StyleBlockInMxmlRule"
-		message="The style block is embed in the MXML file">
-		<description>It is not a good practice to embed style blocks inside the MXML component. Prefer using external css files.</description>
-		<priority>3</priority>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.performance.DynamicFiltersUsedInPopup"
-		message="A popup should use dynamic filters">
-		<description>Prefer using embed filters in assets</description>
-		<priority>3</priority>
-	</rule>
-</ruleset>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/test/resources/allInOneWithExclusionRuleset.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/test/resources/allInOneWithExclusionRuleset.xml b/FlexPMD/flex-pmd-core/src/test/resources/allInOneWithExclusionRuleset.xml
deleted file mode 100644
index ca22972..0000000
--- a/FlexPMD/flex-pmd-core/src/test/resources/allInOneWithExclusionRuleset.xml
+++ /dev/null
@@ -1,601 +0,0 @@
-<!--
-
-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.
-
--->
-<ruleset name="All Flex Rules Without AsDocs folder"
-	xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
-	xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
-	xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<description />
-	<exclude-pattern>.*/com/.*</exclude-pattern>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.mxml.MoreThanTwoEntryPointsInMxmlRule"
-		message="There are more than 2 public variables in this MXML component">
-		<description />
-		<priority>3</priority>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.binding.TooLongBindingExpressionRule"
-		message="This binding expression is too long">
-		<description>A Binding expression is executed as soon as one of the bindable attributes changed. If a binding expression contains too many expression, there could be some performance issue.</description>
-		<priority>3</priority>
-		<properties>
-			<property name="maximum">
-				<value>3</value>
-			</property>
-		</properties>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.mxml.TooLongScriptBlockRule"
-		message="This script block is too long">
-		<description />
-		<priority>3</priority>
-		<properties>
-			<property name="maximum">
-				<value>50</value>
-			</property>
-		</properties>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.DynamicClassRule"
-		message="A class must not be dynamic">
-		<description>When using dynamic classes, you cannot control how the developer will use your classe. It makes refactoring really difficult.</description>
-		<priority>1</priority>
-		<example><![CDATA[
-dynamic public class DynamicObject // VIOLATION
-   {
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.event.EventMissingCloneFunctionRule"
-		message="The clone event must be overiden in a custom event">
-		<description>Why do you need to override clone? Well, the clone method creates a copy of your event (or object - whatever object has the clone event; this isn't limited to Event objects). The default clone method inherited by the Event class or whatever class your custom class extends, will return an event object of the type of that class, not your custom event subclass. In the situations where a clone is needed, it is needed to be of the same type of your class, not the class it extends.</description>
-		<priority>1</priority>
-		<example><![CDATA[
-public class FirstCustomEvent   // VIOLATION - clone method is missing
-   {
-      public var lala : String;
-      
-      public function FirstCustomEvent()
-      {         
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.event.PublicVariableInCustomEventRule"
-		message="No public variables should be inside a custom event">
-		<description>In order to improve encapsulation in your custom event, it is better not to have public variable in your event. Prefer having read-only attributes, set by the event constructor.</description>
-		<priority>3</priority>
-		<example><![CDATA[
-public class FirstCustomEvent   
-   {
-      public var lala : String; // VIOLATION
-      
-      public function FirstCustomEvent()
-      {         
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.style.ConstructorNonEmptyReturnTypeRule"
-		message="A constructor should not have a return type">
-		<description>Even if this is syntaxically correct, there should not be a return type for a constructor.</description>
-		<priority>3</priority>
-		<example><![CDATA[
-public class VoidConstructor   
-   {
-      public function VoidConstructor() : void
-      {         
-      }      
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.switchrules.SwitchStatementsShouldHaveDefaultRule"
-		message="A switch statement does not contain a default statement">
-		<description>Switch statements should have a default label in order to detect corner cases.</description>
-		<priority>1</priority>
-		<example><![CDATA[
-public class Foo 
-   {
-      public funciton bar() : void 
-      {
-         var  x : int = 2;
-         switch (x) 
-         {
-            case 2: var j : int = 8;
-         }
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseObjectTypeRule"
-		message="Do not use Object class.">
-		<description>It is a bad practice to use the dynamic class Object. Prefer using strongly typed object, or marker interface in order to avoid silent compilation errors while refactoring</description>
-		<priority>1</priority>
-		<example><![CDATA[
-public class Foo
-   {
-      public var bar : Object; // VIOLATION      
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.switchrules.NestedSwitchRule"
-		message="Switch must not be nested.">
-		<description>As a general practice, switch statement should not be used. Prefer using inheritance. It is even harder to read when siwtch statements are nested.</description>
-		<priority>3</priority>
-		<example><![CDATA[
-public function foo( a : Number, b : Number ) : void
-      {
-          switch( a )
-          {
-             case 1:
-                break;
-             case 2:                   
-                switch ( b ) 
-                {
-                  case 3 :
-                     break;
-                  case 4 :
-                     break;
-                }
-                break;                     
-          }
-      }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.maintanability.ArrayFieldWithNoArrayElementTypeRule"
-		message="ArrayElementType metadata is not specified for an array-type field">
-		<description />
-		<priority>3</priority>
-		<example><![CDATA[
-public class ArrayVO {
-      public var items:Array; //VIOLATION
-
-      [ArrayElementType("model.vo.MenuItemVO")]
-      public var menuItems : Array;
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.maintanability.NonStaticConstantFieldRule" message="A constant field should be static">
-		<description />
-		<priority>1</priority>
-		<example><![CDATA[
-public class MyObject {
-      public static const MY_STATIC_CONSTANT : String = "myStaticConstant";
-      public const MY_NON_STATIC_CONSTANT : String = "myStaticConstant"; // VIOLATION
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.unused.UnusedParameterRule" message="You should use all the parameters of a function">
-		<description />
-		<priority>1</priority>
-		<example><![CDATA[
-public function foo( param1 : Number, param2 : Number, param3 : Number, param4 : Number, param5 : Number ) : void // 4 violations
-      {
-         var i : int = param1;
-      }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.unused.UnusedLocalVariableRule"
-		message="You should delete an unused variable">
-		<description />
-		<priority>3</priority>
-		<example><![CDATA[
-public function foo() : void
-      {
-         var i : int = 0;// 1 violation
-      }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.unused.UnusedPrivateMethodRule"
-		message="This private method does not seem to be used">
-		<description />
-		<priority>3</priority>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.switchrules.TooFewBrancheInSwitchStatementRule"
-		message="There are too few branches in this swicth statement">
-		<description>Switch statements are designed for complex branches, and allow branches to share treatement. Using a switch for only 2 branches is ill advised, as switches are not as easy to understand as if. In this case, it's most likely is a good idea to use a if statement</description>
-		<priority>5</priority>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.style.BadFormatLoggerRule"
-		message="The loger is not correctly formatted">
-		<description />
-		<priority>5</priority>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.performance.AvoidInstanciationInLoopRule"
-		message="Instanciating a variable in a loop can be expensive">
-		<description />
-		<priority>3</priority>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.architecture.ViewComponentReferencedInModelRule"
-		message="A view component should not be referenced in a model class">
-		<description />
-		<priority>3</priority>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseGenericTypeRule"
-		message="Use strongly typed objects instead of *">
-		<description />
-		<priority>1</priority>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.event.DispatchHardCodedEventNameRule"
-		message="DispatchEvent function must dispatch constant strings">
-		<description>You should not dispatch a plain string. If you rename this string, you need to replace the string listener as well. Use constants instead</description>
-		<priority>3</priority>
-		<example><![CDATA[
-public class Foo 
-   {
-      public function bar() : void
-      {
-         dispatch( new Event( "myHardCodedEvent" ) ); // VIOLATION
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.event.ListenForHardCodedEventNameRule"
-		message="addEventListener must not contain hard coded strings.">
-		<description>You should not listen for a plain string. If you rename this string, you need to replace the string listener as well. Use constants instead</description>
-		<priority>3</priority>
-		<example><![CDATA[
-public class Foo 
-   {
-      public function bar() : void
-      {
-         addEventListener( "myHardCodedEvent", handleMyHardCodedEvent ); // VIOLATION
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.AlertShowRule"
-		message="Do not call Alert.show directly.">
-		<description>You should not Alert.show() directly. If an error occured in the system, you should probably use an ErrorManager to have a consistent way to manage those errors.</description>
-		<priority>1</priority>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.empty.EmptyIfStmtRule"
-		message="No statements in this if statement">
-		<description>Empty If Statement finds instances where a condition is checked but nothing is done about it.</description>
-		<priority>3</priority>
-		<example><![CDATA[
-public class Foo 
-   {
-      public function bar( x : int ) : void
-      {
-         if ( x == 0 ) 
-         {
-            // VIOLATION
-         }
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.maintanability.ExcessiveImportRule"
-		message="A high number of imports can indicate a high degree of coupling within an object.">
-		<description>A high number of imports can indicate a high degree of coupling within an object. Rule counts the number of unique imports and reports a violation if the count is above the user defined threshold.</description>
-		<priority>3</priority>
-		<properties>
-			<property name="maximum">
-				<value>15</value>
-			</property>
-		</properties>
-		<example><![CDATA[
-import blah.blah.Baz;
-   import blah.blah.Bif;
-   // 18 others from the same package elided
-   public class Foo 
-   {
-      public function doWork() : void 
-      {
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.binding.BindingUtilsRule"
-		message="If you need to use BindingUtils, you should probably consider refactoring using events">
-		<description />
-		<priority>3</priority>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.style.OverLongLineRule"
-		message="Too long line ({0} maximum)">
-		<description />
-		<priority>5</priority>
-		<properties>
-			<property name="maximum">
-				<value>120</value>
-			</property>
-		</properties>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.style.ImportFromSamePackageRule"
-		message="Imports from the same package are not necessary">
-		<description />
-		<priority>1</priority>
-		<example><![CDATA[
-package com.adobe.ac
-{
-   import com.adobe.ac.MyModel; // VIOLATION HERE
-
-   public class BigModel   
-   {
-      public var model : MyModel = null;
-   }
-}
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.naming.IncorrectClassCase"
-		message="A class name must start by a majuscule character">
-		<description />
-		<priority>3</priority>
-		<example><![CDATA[
-public class foo
-   {
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.cairngorm.BindableModelLocatorRule"
-		message="A modelLocator must not be Bindable at a class level">
-		<description>A bindable ModelLocator could leads to performance issues due to bindings</description>
-		<priority>1</priority>
-		<example><![CDATA[
-[Bindable]
-   public class BindableModelLocator // VIOLATION 
-   {      
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.cairngorm.ReferenceModelLocatorOutsideTheMainApplicationRule"
-		message="The ModelLocator should be only accessible from the main application file">
-		<description>The ModelLocator should be only accessible from the main application file. Then sub-models should be injected to the nested views.</description>
-		<priority>3</priority>
-		<example><![CDATA[
-package business
-{
-   import model.MyModelLocator; // VIOLATION
-   
-   public class MyBusinessClass 
-   } 
-}
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.cairngorm.FatControllerRule"
-		message="A FrontController must nor add all its commands within the Controller constructor.">
-		<description>Try split them into methods where you add commands depending on their fonctional area.</description>
-		<priority>3</priority>
-		<example><![CDATA[
-package control
-{
-   import control.GetItems1Command;
-   import control.GetItems1Event;
-   import control.GetItems2Command;
-   import control.GetItems2Event;
-   // A lot of other imports
-   
-   public class MyFrontController // VIOLATION
-   {
-      public function MyFrontController()
-      {
-         addCommand( 
-            GetItems1Event.EVENT_NAME,
-            GetItems1Command );
-
-         addCommand( 
-            GetItems2Event.EVENT_NAME,
-            GetItems2Command );
-
-         // A lot of other addCommand
-      }
-   } 
-}
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.cairngorm.BadCairngormEventNameFormatRule"
-		message="A Cairngorm event name should contain the function area name before the actual event name">
-		<description>You would have something like 'productManagement.getProducts' as an event name.</description>
-		<priority>3</priority>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.sizing.TooManyFunctionRule" message="Too many methods detected">
-		<description>A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.</description>
-		<priority>3</priority>
-		<properties>
-			<property name="maximum">
-				<value>10</value>
-			</property>
-		</properties>
-		<example><![CDATA[
-public class Foo 
-   {
-      public function doWork() : void {}
-      public function doMoreWork() : void {}
-      public function doWorkAgain() : void {}
-      // [... more more public methods ...]
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.sizing.TooLongFunctionRule" message="This function is far long">
-		<description>Violations of this rule usually indicate that the method is doing too much. Try to reduce the method size by creating helper methods and removing any copy/pasted code.</description>
-		<priority>3</priority>
-		<properties>
-			<property name="maximum">
-				<value>25</value>
-			</property>
-		</properties>
-		<example><![CDATA[
-public class Foo 
-   {
-      public function doSomething() : void
-      {
-         System.out.println("Hello world!");
-         System.out.println("Hello world!");
-         // 98 copies omitted for brevity.
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.sizing.TooLongSwitchCaseRule"
-		message="Long switch case detected">
-		<description>A switch case statement should be either empty, or contain a break, or call another method.</description>
-		<priority>3</priority>
-		<example><![CDATA[
-public class Bar   
-   {
-      public function foo() : void
-      {
-          var i : int = 4;
-          
-          switch( i )
-          {
-             case 1:
-                handleFirstCase();
-                break;
-             case 2: // VIOLATION
-                googleResquest.url = "";
-                handleSecondCaseFirstPart();
-                handleSecondCaseSecondPart();
-                break;
-          }
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.sizing.TooManyParametersRule"
-		message="Long parameter list detected">
-		<description>Long parameter lists can indicate that a new object should be created to wrap the numerous parameters.  Basically, try to group the parameters together.</description>
-		<priority>1</priority>
-		<properties>
-			<property name="maximum">
-				<value>4</value>
-			</property>
-		</properties>
-		<example><![CDATA[
-public class Foo 
-   {
-      public function addData( p0 : int, p1 : int, p2 : int, p3 : int, p4 : int, p5 : int,
-                                             p6 : int, p7 : int, p8 : int, p9 : int, p10 : int ) : void 
-      {
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.sizing.TooManyPublicRule"
-		message="Too much public fields or functions detected">
-		<description>A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.</description>
-		<priority>3</priority>
-		<properties>
-			<property name="maximum">
-				<value>10</value>
-			</property>
-		</properties>
-		<example><![CDATA[
-public class Foo 
-   {
-      public var value : String;
-      public var something : Bar;
-      public var variable : Variable;
-
-      // [... more more public attributes ...]
-
-      public function doWork() : void {}
-      public function doMoreWork() : void {}
-      public function doWorkAgain() : void {}
-
-      // [... more more public methods ...]
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.sizing.TooManyFieldsRule"
-		message="Too many field detected">
-		<description>Classes that have too many fields could be redesigned to have fewer fields, possibly  through some nested object grouping of some of the information.  For example, a class with  city/state/zip fields could instead have one Address field.</description>
-		<priority>3</priority>
-		<properties>
-			<property name="maximum">
-				<value>5</value>
-			</property>
-		</properties>
-		<example><![CDATA[
-public class Person 
-   {
-      private var one : String;
-      private var two : int;
-      private var three : int;
-
-      [... many more public fields ...]
-
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.naming.TooShortVariableRule"
-		message="This variable name is too short">
-		<description>Detects when a field, local, or parameter has a very short name.</description>
-		<priority>5</priority>
-		<example><![CDATA[
-public class Something 
-   {
-      private var q : int = 15; // VIOLATION - Field
-	
-      public function foo( as : String ) : void // VIOLATION - Formal 
-      {
-         var r : int = 20 + q; // VIOLATION - Local
-      }
-   }
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.naming.PackageCaseRule"
-		message="A package name should be lower case">
-		<description>Detects when a package definition contains upper case characters.</description>
-		<priority>3</priority>
-		<example><![CDATA[
-
-   package com.MyCompany  // VIOLATION <- should be lower case name
-   {
-      public class SomeClass 
-      {
-      }
-   }
-         
-           ]]></example>
-	</rule>
-	<rule since="0.1" class="com.adobe.ac.pmd.rules.css.StyleBlockInMxmlRule"
-		message="The style block is embed in the MXML file">
-		<description>It is not a good practice to embed style blocks inside the MXML component. Prefer using external css files.</description>
-		<priority>3</priority>
-	</rule>
-	<rule since="0.1"
-		class="com.adobe.ac.pmd.rules.performance.DynamicFiltersUsedInPopup"
-		message="A popup should use dynamic filters">
-		<description>Prefer using embed filters in assets</description>
-		<priority>3</priority>
-	</rule>
-</ruleset>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-core/src/test/resources/broken_pmd.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-core/src/test/resources/broken_pmd.xml b/FlexPMD/flex-pmd-core/src/test/resources/broken_pmd.xml
deleted file mode 100644
index 7a828ae..0000000
--- a/FlexPMD/flex-pmd-core/src/test/resources/broken_pmd.xml
+++ /dev/null
@@ -1,703 +0,0 @@
-<!--
-
-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.
-
--->
-<ruleset name="All Flex Rules" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd" xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <description/>
-  <rule since="" class="com.adobe.ac.pmd.rules.architecture.MonkeyPatchingRule" message="This class looks to be duplicated with a SDK class">
-    <description>Monkey patching can be a risky undertaking because it is not using intended extensibility points and thus may have unintended consequences or make migration to newer versions of the SDK more difficult</description>
-    <priority>1</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.mxml.MoreThanOneEntryPointInMxmlRule" message="There is more than 1 public variable in this MXML component">
-    <description/>
-    <priority>3</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.mxml.MoreThanTwoEntryPointsInMxmlRule" message="There are more than 2 public variables in this MXML component">
-    <description/>
-    <priority>1</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.mxml.TooLongScriptBlockRule" message="This script block is too long ({0} maximum, but {1} actually)">
-    <description/>
-    <priority>3</priority>
-    <properties>
-      <property name="maximum">
-        <value>50</value>
-      </property>
-    </properties>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.mxml.CodeBehindInMxmlRule" message="Avoid using code behind files">
-    <description>Code behind files are tightly coupled with the view, not unit-testable, not easy to navigate the code base and not reusable. Try using presentation model pattern, or observer pattern</description>
-    <priority>5</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.binding.BindingUtilsRule" message="BindingUtils class uses hard coded strings, which won't be picked up by the compiler if you rename this attribute. You should probably consider refactoring using events">
-    <description/>
-    <priority>1</priority>
-    <example><![CDATA[public class Controller extends FrontController
-{
-   public function Controller()
-   {
-   	 BindingUtils.bindSetter(setContent, value, "content"); // VIOLATION
-   }
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.binding.ChangeWatcherRule" message="ChangeWatcher class uses hard coded strings to specify the attribute name, to listen to. Prefer listening to events or setters">
-    <description/>
-    <priority>1</priority>
-    <example><![CDATA[public final class Title 
-{
-	private var watcher : ChangeWatcher; // VIOLATION
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.binding.TooLongBindingExpressionRule" message="This binding expression is too long ({0} dots maximum, but {1} actually)">
-    <description>A Binding expression is executed as soon as one of the bindable attributes changed. If a binding expression contains too many expression, there could be some performance issue.</description>
-    <priority>3</priority>
-    <properties>
-      <property name="maximum">
-        <value>3</value>
-      </property>
-    </properties>
-    <example><![CDATA[
-<mx:Label text="{ vfrfr.frfr.frf.lala }"/> <!-- Violation-->
-		]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.component.UpdateChildrenNumberInUpdateDisplayListRule" message="Flex specific - Do not add or remove displayable children from updateDisplayList">
-    <description>UpdateDisplayList is called everytime a child is invalidated. So calling addChild or removeChild in this function could be really CPU consuming</description>
-    <priority>1</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.component.CallLaterDirectlyRule" message="Flex specific - Don't call 'callLater' explicitly">
-    <description>If you needed to call 'callLater' explicitly, then you probably did not extend the correct component life cycle.</description>
-    <priority>1</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.css.StyleBlockInMxmlRule" message="The style block is embed in the MXML file">
-    <description>It is not a good practice to embed style blocks inside the MXML component. Prefer using external CSS files.</description>
-    <priority>3</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.css.UseCssInsteadOfEmbedMetaDataRule" message="Embed metadata detected in source code where a stylesheet may be cleaner">
-    <description/>
-    <priority>5</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.empty.EmptyCatchStatementRule" message="This catch statement is empty">
-    <description/>
-    <priority>3</priority>
-    <example><![CDATA[public class Foo 
-{
-   public function bar( x : int ) : void
-   {
-      try
-      {
-      }
-      catch( e : Exception )         // VIOLATION
-      {
-      }
-   }
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.empty.EmptyIfStmtRule" message="No statements in this if statement">
-    <description>Empty If Statement finds instances where a condition is checked but nothing is done about it.</description>
-    <priority>3</priority>
-    <example><![CDATA[public class Foo 
-{
-   public function bar( x : int ) : void
-   {
-      if ( x == 0 ) 
-      {
-         // VIOLATION
-      }
-   }
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.event.EventMissingCloneFunctionRule" message="The clone event must be overiden in a custom event">
-    <description>When creating your own custom Event class, you must override the inherited Event.clone() method in order for it to duplicate the properties of your custom class. If you do not set all the properties that you add in your event subclass, those properties will not have the correct values when the event is cloned. This is important because the Flex SDK clones events whenever redispatching takes place.</description>
-    <priority>1</priority>
-    <example><![CDATA[public class FirstCustomEvent   // VIOLATION - clone method is missing
-{
-   public var lala : String;
-   
-   public function FirstCustomEvent()
-   {         
-   }
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.event.PublicVariableInCustomEventRule" message="No public variables should be inside a custom event. This variable ({0}) is public">
-    <description>In order to improve encapsulation in your custom event, it is better not to have public variable in your event. Prefer having read-only attributes, set by the event constructor.</description>
-    <priority>3</priority>
-    <example><![CDATA[public class FirstCustomEvent   
{
   public var lala : String; // VIOLATION
   
   public function FirstCustomEvent( dfsfd)
   {         
   }
}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.event.ConstructorDispatchingEventRule" message="An event is dispatched in a constructor">
-    <description>This is pointless, since event listeners cannot be attached to an object before it has been constructed, so nothing can ever hear the event</description>
-    <priority>1</priority>
-    <example><![CDATA[public class BigModel   
-{
-   public function BigModel()
-   {    
-      dispatchEvent( new Event( "pointlessEvent" ) );     
-   }
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.event.ListenForHardCodedEventNameRule" message="addEventListener must not contain hard coded strings">
-    <description>You should not listen for a plain string. If you rename this string, you need to replace the string listener as well. Use constants instead</description>
-    <priority>1</priority>
-    <example><![CDATA[public class Foo 
-{
-   public function bar() : void
-   {
-      addEventListener( "myHardCodedEvent", handleMyHardCodedEvent ); // VIOLATION
-   }
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.event.UnboundTypeInMetadataRule" message="This type ({0}) was not found within the scope against which PMD was run">
-    <description/>
-    <priority>1</priority>
-    <example><![CDATA[[Event(name="myTypeEvent",type="UnknownType")] // VIOLATION
-public class UnboundMetadata
-{
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.event.UntypedEventMetadataRule" message="This event type is not specified">
-    <description>Specifying a type will allow Flash builder and the class to have this event exposed in its API</description>
-    <priority>3</priority>
-    <example><![CDATA[[Event(name="myTypeEvent")] // VIOLATION
-public class UnTypedMetadata
-{
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.ExcessiveImportRule" message="A high number of imports can indicate a high degree of coupling within an object. ({0} maximum but {1} actually)">
-    <description>A high number of imports can indicate a high degree of coupling within an object. Rule counts the number of unique imports and reports a violation if the count is above the user defined threshold.</description>
-    <priority>3</priority>
-    <properties>
-      <property name="maximum">
-        <value>15</value>
-      </property>
-    </properties>
-    <example><![CDATA[import blah.blah.Baz;
-import blah.blah.Bif;
-// 18 others from the same package elided
-public class Foo 
-{
-   public function doWork() : void 
-   {
-   }
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.TrueFalseConditionRule" message="This test contains a hard coded boolean value. You could remove it by having '{0}'">
-    <description/>
-    <priority>3</priority>
-    <example><![CDATA[if ( true ) // VIOLATION
-{
-   if ( myCondition == false ) // VIOLATION
-   {
-   }
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.DynamicClassRule" message="A class must not be dynamic">
-    <description>When using dynamic classes, you cannot control how the developer will use your class. It makes refactoring really difficult</description>
-    <priority>3</priority>
-    <example><![CDATA[dynamic public class DynamicObject // VIOLATION
-{
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseObjectTypeRule" message="Do not use Object class">
-    <description>It is a bad practice to use the dynamic class Object. Prefer using strongly typed object, or marker interface in order to avoid silent compilation errors while refactoring</description>
-    <priority>5</priority>
-    <example><![CDATA[public class Foo
-{
-   public var bar : Object; // VIOLATION      
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.NonStaticConstantFieldRule" message="A constant field should be static ({0})">
-    <description/>
-    <priority>1</priority>
-    <example><![CDATA[public class MyObject {
-   public static const MY_STATIC_CONSTANT : String = "myStaticConstant";
-   public const MY_NON_STATIC_CONSTANT : String = "myStaticConstant"; // VIOLATION
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.UselessOverridenFunctionRule" message="This method is empty. This should be removed ({0})">
-    <description>This function is not needed.</description>
-    <priority>3</priority>
-    <example><![CDATA[override protected function createChildren() : void
-{
-   super.createChildren();
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.AvoidProtectedFieldInFinalClassRule" message="Protected accessors are useless in a final class. Make it private ({0})">
-    <description/>
-    <priority>3</priority>
-    <example><![CDATA[final public class Foo
-{
-   protected var bar : int; // VIOLATION      
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.AvoidUsingWithKeyWordRule" message="You should not use the with keyword. It does not help readability">
-    <description/>
-    <priority>3</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.ArrayFieldWithNoArrayElementTypeRule" message="ArrayElementType metadata is not specified for this array-type field ({0})">
-    <description/>
-    <priority>3</priority>
-    <example><![CDATA[public class ArrayVO {
-   public var items:Array; //VIOLATION
-
-   [ArrayElementType("model.vo.MenuItemVO")]
-   public var menuItems : Array;
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.ClassAndExtensionAreIdenticalRule" message="The extension name is the same as the class name">
-    <description/>
-    <priority>3</priority>
-    <example><![CDATA[package com.MyCompany
-{
-   public class SomeClass extends mx.SomeClass // VIOLATION
-   {
-   }
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.ProtectedStaticMethodRule" message="This method ({0}) should be private">
-    <description/>
-    <priority>3</priority>
-    <example><![CDATA[protected static function foo() : void // VIOLATION
-{
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.EmptyStatementRule" message="This statement is empty">
-    <description/>
-    <priority>5</priority>
-    <example><![CDATA[protected function foo() : void
-{
-   var i : int = 0;
-   
-   ; // VIOLATION
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.naming.TooShortVariableRule" message="This variable name is too short ({0} characters minimum, but {1} actually)">
-    <description>Detects when a field, local, or parameter has a very short name.</description>
-    <priority>1</priority>
-    <properties>
-      <property name="minimum">
-        <value>3</value>
-      </property>
-    </properties>
-    <example><![CDATA[public class Something 
-{
-   private var q : int = 15; // VIOLATION - Field
-
-   public function foo( as : String ) : void // VIOLATION - Formal 
-   {
-      var r : int = 20 + q; // VIOLATION - Local
-   }
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.naming.PackageCaseRule" message="A package name should be lower case ({0})">
-    <description>Detects when a package definition contains upper case characters.</description>
-    <priority>3</priority>
-    <example><![CDATA[
-package com.MyCompany  // VIOLATION <- should be lower case name
-{
-   public class SomeClass 
-   {
-   }
-}
-         ]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.naming.VariableNameEndingWithNumericRule" message="Using digits at the end of a symbol does not help understanging the meaning of it. ({0})">
-    <description/>
-    <priority>3</priority>
-    <example><![CDATA[
-public class SomeClass 
-{
-   public var correctField1 : int = 0; // VIOLATION <- numeric suffix is forbidden
-}		
-		]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.naming.PropertyHiddenByLocalVariableRule" message="A class property is hidden by this local variable ({0})">
-    <description/>
-    <priority>3</priority>
-    <example><![CDATA[public class SomeClass 
-{
-   public var myField : int = 0;
-   
-   public function foo() : void
-   {
-   	var myField : int = 9; // VIOLATION
-   }
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.naming.WronglyNamedVariableRule" message="This variable ({0}) seems to be incorrectly named. Let your creativity flow">
-    <description/>
-    <priority>3</priority>
-    <example><![CDATA[
-public class SomeClass 
-{
-   public var myField : int = 0; // VIOLATION <- my prefix is forbidden
-   
-   public function tmpFoo() : void // VIOLATION <- tmp prefix is forbidden
-   {
-   	var tempFoo : int = 9; // VIOLATION <- temp prefix is forbidden
-   }
-}		
-		]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.parsley.InaccessibleMetaDataRule" message="Parsley metadata should not be placed on inaccessible members.">
-    <description>Parsley can only process metadata that is placed onto public members.</description>
-    <priority>1</priority>
-    <example><![CDATA[[MessageHandler]
-private function doSomething() : void // VIOLATION 
-{      
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.parsley.MismatchedManagedEventRule" message="Managed events should have matching [Event] metadata">
-    <description>Each managed event should have matching [Event] metadata.</description>
-    <priority>1</priority>
-    <example><![CDATA[[Event(name="message", type="my.package.MyEvemt")]
-[ManagedEvents(names="messag")] // VIOLATION
-public class MyClass  
-{      
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.parsley.MessageInterceptorSignatureRule" message="The signature of the message interceptor {0} is not correct. {1}.">
-    <description/>
-    <priority>1</priority>
-    <example><![CDATA[
-[MessageInterceptor(type="a.b.MyMessage")]
-public function messageInterceptor( processor : MessageProcessor ) : void
-{
-   processor.proceed();
-}
-
-[MessageInterceptor(type="a.b.MyMessage")]
-public function messageInterceptor() : void // VIOLATION
-{
-}
-
-[MessageInterceptor(type="a.b.MyMessage")]
-public function messageInterceptor( type : MyMessage ) : void // VIOLATION
-{
-   type.something();
-}
-
-[MessageInterceptor(type="a.b.MyMessage")]
-public function messageInterceptor( processor : MessageProcessor, type : MyMessage ) : void // VIOLATION
-{
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.parsley.MisplacedMetaDataRule" message="This metadata {0} is misplaced">
-    <description/>
-    <priority>1</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.parsley.RedundantMessageHandlerTypeAttributeRule" message="This type metadata argument is redundant with the handler argument type">
-    <description/>
-    <priority>3</priority>
-    <example><![CDATA[
-[MessageHandler(type="a.b.MyMessage")] // VIOLATION
-public function doSomething( message : MyMessage ) : void
-{
-   message.toString();
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.parsley.RedundantMethodAttributeRule" message="This method metadata argument is redundant with the handler name">
-    <description/>
-    <priority>3</priority>
-    <example><![CDATA[
-[MessageHandler(method="doSomething")] // VIOLATION
-public function doSomething( message : MyMessage ) : void
-{
-   message.toString();
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.parsley.UnknownMetaDataAttributeRule" message="This metadata attribute {0} is unknown">
-    <description/>
-    <priority>1</priority>
-    <example><![CDATA[
-[AsyncInit(x="y")] // VIOLATION
-public class UnknownMetaDataAttribute
-{
-   [Inject(x="y")] // VIOLATION
-   public var inject;
-
-   [MessageHandler(x="y")] // VIOLATION
-   public function messageHandler() : void
-   {
-   }
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.performance.DynamicFiltersUsedInPopup" message="A popup should not use dynamic filters">
-    <description>Prefer using embed filters in assets</description>
-    <priority>3</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.performance.CyclomaticComplexityRule" message="This method is too complex. Maximum complexity is {0}, but its cyclomatic complexity was {1}">
-    <description/>
-    <priority>3</priority>
-    <properties>
-      <property name="maximum">
-        <value>10</value>
-      </property>
-    </properties>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.performance.HeavyConstructorRule" message="Constructor must be as lightweight as possible. No control statement allowed, whereas a cyclomatic complexe of {0} has been detected">
-    <description>The Just-In-Time compiler does not compile constructors. Make them as lightweight as possible, or move the complexity of the code to a method called by the constructor. Then the complexity will be compiled by the JIT.</description>
-    <priority>3</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.performance.CreationPolicySetToAllRule" message="creationPolicy to ALL impacts the performance significantly">
-    <description/>
-    <priority>1</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.performance.DeeplyNestedIfRule" message="Nested if statements are not a good design">
-    <description/>
-    <priority>3</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.performance.RecursiveStyleManagerRule" message="Detect calls to the StyleManager that don’t pass “false” as the second parameter">
-    <description>A recursive style manager call can be a very expensive operation, causing parts of the UI to flicker visibly. Instead it is preferable to defer the creation of parts of the UI that depend on a runtime CSS SWF until after the SWF has been loaded. In this case a recursive call is not required.</description>
-    <priority>3</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooManyFunctionRule" message="Too many methods detected ({0} maximum, but {1} actually)">
-    <description>A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.</description>
-    <priority>3</priority>
-    <properties>
-      <property name="maximum">
-        <value>25</value>
-      </property>
-    </properties>
-    <example><![CDATA[public class Foo 
-   {
-      public function doWork() : void {}
-      public function doMoreWork() : void {}
-      public function doWorkAgain() : void {}
-      // [... more more public methods ...]
-   }]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooLongFunctionRule" message="This function is far too long ({0} maximum, but {1} actually)">
-    <description>Violations of this rule usually indicate that the method has too much responsibility. Try to reduce the method size by creating helper methods and removing any copy/pasted code.</description>
-    <priority>3</priority>
-    <properties>
-      <property name="maximum">
-        <value>20</value>
-      </property>
-    </properties>
-    <example><![CDATA[public class Foo 
-   {
-      public function doSomething() : void
-      {
-         System.out.println("Hello world!");
-         System.out.println("Hello world!");
-         // 98 copies omitted for brevity.
-      }
-   }]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooLongSwitchCaseRule" message="Long switch case detected ({0} lines maximum, but {1} actually)">
-    <description>A switch case statement should be either empty, or contain a break, or call another method.</description>
-    <priority>3</priority>
-    <properties>
-      <property name="maximum">
-        <value>3</value>
-      </property>
-    </properties>
-    <example><![CDATA[public class Bar   
-   {
-      public function foo() : void
-      {
-          var i : int = 4;
-          
-          switch( i )
-          {
-             case 1:
-                handleFirstCase();
-                break;
-             case 2: // VIOLATION
-                googleResquest.url = "";
-                handleSecondCaseFirstPart();
-                handleSecondCaseSecondPart();
-                break;
-          }
-      }
-   }]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooManyParametersRule" message="Long parameter list detected ({0} maximum, but {1} actually)">
-    <description>Long parameter lists can indicate that a new object should be created to wrap the numerous parameters.  Basically, try to group the parameters together.</description>
-    <priority>3</priority>
-    <properties>
-      <property name="maximum">
-        <value>4</value>
-      </property>
-    </properties>
-    <example><![CDATA[public class Foo 
-   {
-      public function addData( p0 : int, p1 : int, p2 : int, p3 : int, p4 : int, p5 : int,
-                                             p6 : int, p7 : int, p8 : int, p9 : int, p10 : int ) : void 
-      {
-      }
-   }]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooManyPublicRule" message="Too many public fields or functions detected ({0} maximum, but {1} actually)">
-    <description>A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.</description>
-    <priority>3</priority>
-    <properties>
-      <property name="maximum">
-        <value>15</value>
-      </property>
-    </properties>
-    <example><![CDATA[public class Foo 
-   {
-      public var value : String;
-      public var something : Bar;
-      public var variable : Variable;
-
-      // [... more more public attributes ...]
-
-      public function doWork() : void {}
-      public function doMoreWork() : void {}
-      public function doWorkAgain() : void {}
-
-      // [... more more public methods ...]
-   }]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooManyFieldsRule" message="Too many field detected ({0} maximum, but {1} actually)">
-    <description>Classes that have too many fields could be redesigned to have fewer fields, possibly  through some nested object grouping of some of the information.  For example, a class with  city/state/zipcode fields could instead have one Address field.</description>
-    <priority>3</priority>
-    <properties>
-      <property name="maximum">
-        <value>15</value>
-      </property>
-    </properties>
-    <example><![CDATA[public class Person 
-   {
-      private var one : String;
-      private var two : int;
-      private var three : int;
-
-      [... many more public fields ...]
-
-   }]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.style.ConstructorNonEmptyReturnTypeRule" message="A constructor should not have a return type">
-    <description>Even if this is syntactically correct, there should not be a return type for a constructor.</description>
-    <priority>5</priority>
-    <example><![CDATA[public class VoidConstructor   
-   {
-      public function VoidConstructor() : void // VIOLATION
-      {         
-      }      
-   }]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.style.OverLongLineRule" message="Too long line ({0} maximum, but {1} actually)">
-    <description/>
-    <priority>5</priority>
-    <properties>
-      <property name="maximum">
-        <value>120</value>
-      </property>
-    </properties>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.style.ImportFromSamePackageRule" message="Imports from the same package are not necessary">
-    <description/>
-    <priority>5</priority>
-    <example><![CDATA[package com.adobe.ac
-{
-   import com.adobe.ac.MyModel; // VIOLATION HERE
-
-   public class BigModel   
-   {
-      public var model : MyModel = null;
-   }
-}]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.style.BadFormatLoggerRule" message="The logger is not correctly formatted because {0}">
-    <description/>
-    <priority>5</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.switchrules.SwitchStatementsShouldHaveDefaultRule" message="A switch statement does not contain a default statement">
-    <description>Switch statements should have a default label in order to detect corner cases.</description>
-    <priority>1</priority>
-    <example><![CDATA[public class Foo 
-   {
-      public funciton bar() : void 
-      {
-         var  x : int = 2;
-         switch (x) 
-         {
-            case 2: var j : int = 8;
-         }
-      }
-   }]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.switchrules.NestedSwitchRule" message="Switch must not be nested">
-    <description>As a general practice, switch statement should not be used. Prefer using inheritance. It is even harder to read when switch statements are nested.</description>
-    <priority>3</priority>
-    <example><![CDATA[public function foo( a : Number, b : Number ) : void
-      {
-          switch( a )
-          {
-             case 1:
-                break;
-             case 2:                   
-                switch ( b ) 
-                {
-                  case 3 :
-                     break;
-                  case 4 :
-                     break;
-                }
-                break;                     
-          }
-      }]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.switchrules.TooFewBrancheInSwitchStatementRule" message="There are too few branches in this switch statement ({0} minimum, but {1} actual)">
-    <description>Switch statements are designed for complex branches, and allow branches to share treatment. Using a switch for only 2 branches is ill advised, as switches are not as easy to understand as if. In this case, it's most likely is a good idea to use a if statement</description>
-    <priority>5</priority>
-    <properties>
-      <property name="minimum">
-        <value>3</value>
-      </property>
-    </properties>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.switchrules.IdenticalSwitchCasesRule" message="Two switch cases should not be identical">
-    <description/>
-    <priority>1</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.flexunit.EmptyUnitTest" message="A test should contain at least one assertion">
-    <description/>
-    <priority>3</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.unused.UnusedParameterRule" message="This parameter ({0}) of this function is not used">
-    <description/>
-    <priority>1</priority>
-    <example><![CDATA[public function foo( param1 : Number, param2 : Number, param3 : Number, param4 : Number, param5 : Number ) : void // 4 violations
-      {
-         var i : int = param1;
-      }]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.unused.UnusedLocalVariableRule" message="This variable ({0}) is not used">
-    <description/>
-    <priority>3</priority>
-    <example><![CDATA[public function foo() : void
-      {
-         var i : int = 0;// 1 violation
-      }]]></example>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.unused.UnusedPrivateMethodRule" message="This private method ({0}) does not seem to be used">
-    <description/>
-    <priority>1</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.unused.UnusedFieldRule" message="This private attribute ({0}) does not seem to be used">
-    <description/>
-    <priority>1</priority>
-  </rule>
-  <rule since="" class="com.adobe.ac.pmd.rules.unused.EmptyPrivateMethodRule" message="This private method ({0}) is used but its content is empty">
-    <description/>
-    <priority>1</priority>
-  </rule>
-    
-</ruleset>
\ No newline at end of file


[22/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/test/resources/rulesets/broken_pmd.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/test/resources/rulesets/broken_pmd.xml b/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/test/resources/rulesets/broken_pmd.xml
new file mode 100644
index 0000000..7a828ae
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/test/resources/rulesets/broken_pmd.xml
@@ -0,0 +1,703 @@
+<!--
+
+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.
+
+-->
+<ruleset name="All Flex Rules" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd" xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <description/>
+  <rule since="" class="com.adobe.ac.pmd.rules.architecture.MonkeyPatchingRule" message="This class looks to be duplicated with a SDK class">
+    <description>Monkey patching can be a risky undertaking because it is not using intended extensibility points and thus may have unintended consequences or make migration to newer versions of the SDK more difficult</description>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.mxml.MoreThanOneEntryPointInMxmlRule" message="There is more than 1 public variable in this MXML component">
+    <description/>
+    <priority>3</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.mxml.MoreThanTwoEntryPointsInMxmlRule" message="There are more than 2 public variables in this MXML component">
+    <description/>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.mxml.TooLongScriptBlockRule" message="This script block is too long ({0} maximum, but {1} actually)">
+    <description/>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>50</value>
+      </property>
+    </properties>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.mxml.CodeBehindInMxmlRule" message="Avoid using code behind files">
+    <description>Code behind files are tightly coupled with the view, not unit-testable, not easy to navigate the code base and not reusable. Try using presentation model pattern, or observer pattern</description>
+    <priority>5</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.binding.BindingUtilsRule" message="BindingUtils class uses hard coded strings, which won't be picked up by the compiler if you rename this attribute. You should probably consider refactoring using events">
+    <description/>
+    <priority>1</priority>
+    <example><![CDATA[public class Controller extends FrontController
+{
+   public function Controller()
+   {
+   	 BindingUtils.bindSetter(setContent, value, "content"); // VIOLATION
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.binding.ChangeWatcherRule" message="ChangeWatcher class uses hard coded strings to specify the attribute name, to listen to. Prefer listening to events or setters">
+    <description/>
+    <priority>1</priority>
+    <example><![CDATA[public final class Title 
+{
+	private var watcher : ChangeWatcher; // VIOLATION
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.binding.TooLongBindingExpressionRule" message="This binding expression is too long ({0} dots maximum, but {1} actually)">
+    <description>A Binding expression is executed as soon as one of the bindable attributes changed. If a binding expression contains too many expression, there could be some performance issue.</description>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>3</value>
+      </property>
+    </properties>
+    <example><![CDATA[
+<mx:Label text="{ vfrfr.frfr.frf.lala }"/> <!-- Violation-->
+		]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.component.UpdateChildrenNumberInUpdateDisplayListRule" message="Flex specific - Do not add or remove displayable children from updateDisplayList">
+    <description>UpdateDisplayList is called everytime a child is invalidated. So calling addChild or removeChild in this function could be really CPU consuming</description>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.component.CallLaterDirectlyRule" message="Flex specific - Don't call 'callLater' explicitly">
+    <description>If you needed to call 'callLater' explicitly, then you probably did not extend the correct component life cycle.</description>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.css.StyleBlockInMxmlRule" message="The style block is embed in the MXML file">
+    <description>It is not a good practice to embed style blocks inside the MXML component. Prefer using external CSS files.</description>
+    <priority>3</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.css.UseCssInsteadOfEmbedMetaDataRule" message="Embed metadata detected in source code where a stylesheet may be cleaner">
+    <description/>
+    <priority>5</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.empty.EmptyCatchStatementRule" message="This catch statement is empty">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[public class Foo 
+{
+   public function bar( x : int ) : void
+   {
+      try
+      {
+      }
+      catch( e : Exception )         // VIOLATION
+      {
+      }
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.empty.EmptyIfStmtRule" message="No statements in this if statement">
+    <description>Empty If Statement finds instances where a condition is checked but nothing is done about it.</description>
+    <priority>3</priority>
+    <example><![CDATA[public class Foo 
+{
+   public function bar( x : int ) : void
+   {
+      if ( x == 0 ) 
+      {
+         // VIOLATION
+      }
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.event.EventMissingCloneFunctionRule" message="The clone event must be overiden in a custom event">
+    <description>When creating your own custom Event class, you must override the inherited Event.clone() method in order for it to duplicate the properties of your custom class. If you do not set all the properties that you add in your event subclass, those properties will not have the correct values when the event is cloned. This is important because the Flex SDK clones events whenever redispatching takes place.</description>
+    <priority>1</priority>
+    <example><![CDATA[public class FirstCustomEvent   // VIOLATION - clone method is missing
+{
+   public var lala : String;
+   
+   public function FirstCustomEvent()
+   {         
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.event.PublicVariableInCustomEventRule" message="No public variables should be inside a custom event. This variable ({0}) is public">
+    <description>In order to improve encapsulation in your custom event, it is better not to have public variable in your event. Prefer having read-only attributes, set by the event constructor.</description>
+    <priority>3</priority>
+    <example><![CDATA[public class FirstCustomEvent   
{
   public var lala : String; // VIOLATION
   
   public function FirstCustomEvent( dfsfd)
   {         
   }
}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.event.ConstructorDispatchingEventRule" message="An event is dispatched in a constructor">
+    <description>This is pointless, since event listeners cannot be attached to an object before it has been constructed, so nothing can ever hear the event</description>
+    <priority>1</priority>
+    <example><![CDATA[public class BigModel   
+{
+   public function BigModel()
+   {    
+      dispatchEvent( new Event( "pointlessEvent" ) );     
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.event.ListenForHardCodedEventNameRule" message="addEventListener must not contain hard coded strings">
+    <description>You should not listen for a plain string. If you rename this string, you need to replace the string listener as well. Use constants instead</description>
+    <priority>1</priority>
+    <example><![CDATA[public class Foo 
+{
+   public function bar() : void
+   {
+      addEventListener( "myHardCodedEvent", handleMyHardCodedEvent ); // VIOLATION
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.event.UnboundTypeInMetadataRule" message="This type ({0}) was not found within the scope against which PMD was run">
+    <description/>
+    <priority>1</priority>
+    <example><![CDATA[[Event(name="myTypeEvent",type="UnknownType")] // VIOLATION
+public class UnboundMetadata
+{
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.event.UntypedEventMetadataRule" message="This event type is not specified">
+    <description>Specifying a type will allow Flash builder and the class to have this event exposed in its API</description>
+    <priority>3</priority>
+    <example><![CDATA[[Event(name="myTypeEvent")] // VIOLATION
+public class UnTypedMetadata
+{
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.ExcessiveImportRule" message="A high number of imports can indicate a high degree of coupling within an object. ({0} maximum but {1} actually)">
+    <description>A high number of imports can indicate a high degree of coupling within an object. Rule counts the number of unique imports and reports a violation if the count is above the user defined threshold.</description>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>15</value>
+      </property>
+    </properties>
+    <example><![CDATA[import blah.blah.Baz;
+import blah.blah.Bif;
+// 18 others from the same package elided
+public class Foo 
+{
+   public function doWork() : void 
+   {
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.TrueFalseConditionRule" message="This test contains a hard coded boolean value. You could remove it by having '{0}'">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[if ( true ) // VIOLATION
+{
+   if ( myCondition == false ) // VIOLATION
+   {
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.DynamicClassRule" message="A class must not be dynamic">
+    <description>When using dynamic classes, you cannot control how the developer will use your class. It makes refactoring really difficult</description>
+    <priority>3</priority>
+    <example><![CDATA[dynamic public class DynamicObject // VIOLATION
+{
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.forbiddentypes.UseObjectTypeRule" message="Do not use Object class">
+    <description>It is a bad practice to use the dynamic class Object. Prefer using strongly typed object, or marker interface in order to avoid silent compilation errors while refactoring</description>
+    <priority>5</priority>
+    <example><![CDATA[public class Foo
+{
+   public var bar : Object; // VIOLATION      
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.NonStaticConstantFieldRule" message="A constant field should be static ({0})">
+    <description/>
+    <priority>1</priority>
+    <example><![CDATA[public class MyObject {
+   public static const MY_STATIC_CONSTANT : String = "myStaticConstant";
+   public const MY_NON_STATIC_CONSTANT : String = "myStaticConstant"; // VIOLATION
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.UselessOverridenFunctionRule" message="This method is empty. This should be removed ({0})">
+    <description>This function is not needed.</description>
+    <priority>3</priority>
+    <example><![CDATA[override protected function createChildren() : void
+{
+   super.createChildren();
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.AvoidProtectedFieldInFinalClassRule" message="Protected accessors are useless in a final class. Make it private ({0})">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[final public class Foo
+{
+   protected var bar : int; // VIOLATION      
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.AvoidUsingWithKeyWordRule" message="You should not use the with keyword. It does not help readability">
+    <description/>
+    <priority>3</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.ArrayFieldWithNoArrayElementTypeRule" message="ArrayElementType metadata is not specified for this array-type field ({0})">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[public class ArrayVO {
+   public var items:Array; //VIOLATION
+
+   [ArrayElementType("model.vo.MenuItemVO")]
+   public var menuItems : Array;
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.ClassAndExtensionAreIdenticalRule" message="The extension name is the same as the class name">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[package com.MyCompany
+{
+   public class SomeClass extends mx.SomeClass // VIOLATION
+   {
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.ProtectedStaticMethodRule" message="This method ({0}) should be private">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[protected static function foo() : void // VIOLATION
+{
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.maintanability.EmptyStatementRule" message="This statement is empty">
+    <description/>
+    <priority>5</priority>
+    <example><![CDATA[protected function foo() : void
+{
+   var i : int = 0;
+   
+   ; // VIOLATION
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.naming.TooShortVariableRule" message="This variable name is too short ({0} characters minimum, but {1} actually)">
+    <description>Detects when a field, local, or parameter has a very short name.</description>
+    <priority>1</priority>
+    <properties>
+      <property name="minimum">
+        <value>3</value>
+      </property>
+    </properties>
+    <example><![CDATA[public class Something 
+{
+   private var q : int = 15; // VIOLATION - Field
+
+   public function foo( as : String ) : void // VIOLATION - Formal 
+   {
+      var r : int = 20 + q; // VIOLATION - Local
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.naming.PackageCaseRule" message="A package name should be lower case ({0})">
+    <description>Detects when a package definition contains upper case characters.</description>
+    <priority>3</priority>
+    <example><![CDATA[
+package com.MyCompany  // VIOLATION <- should be lower case name
+{
+   public class SomeClass 
+   {
+   }
+}
+         ]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.naming.VariableNameEndingWithNumericRule" message="Using digits at the end of a symbol does not help understanging the meaning of it. ({0})">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[
+public class SomeClass 
+{
+   public var correctField1 : int = 0; // VIOLATION <- numeric suffix is forbidden
+}		
+		]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.naming.PropertyHiddenByLocalVariableRule" message="A class property is hidden by this local variable ({0})">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[public class SomeClass 
+{
+   public var myField : int = 0;
+   
+   public function foo() : void
+   {
+   	var myField : int = 9; // VIOLATION
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.naming.WronglyNamedVariableRule" message="This variable ({0}) seems to be incorrectly named. Let your creativity flow">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[
+public class SomeClass 
+{
+   public var myField : int = 0; // VIOLATION <- my prefix is forbidden
+   
+   public function tmpFoo() : void // VIOLATION <- tmp prefix is forbidden
+   {
+   	var tempFoo : int = 9; // VIOLATION <- temp prefix is forbidden
+   }
+}		
+		]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.parsley.InaccessibleMetaDataRule" message="Parsley metadata should not be placed on inaccessible members.">
+    <description>Parsley can only process metadata that is placed onto public members.</description>
+    <priority>1</priority>
+    <example><![CDATA[[MessageHandler]
+private function doSomething() : void // VIOLATION 
+{      
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.parsley.MismatchedManagedEventRule" message="Managed events should have matching [Event] metadata">
+    <description>Each managed event should have matching [Event] metadata.</description>
+    <priority>1</priority>
+    <example><![CDATA[[Event(name="message", type="my.package.MyEvemt")]
+[ManagedEvents(names="messag")] // VIOLATION
+public class MyClass  
+{      
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.parsley.MessageInterceptorSignatureRule" message="The signature of the message interceptor {0} is not correct. {1}.">
+    <description/>
+    <priority>1</priority>
+    <example><![CDATA[
+[MessageInterceptor(type="a.b.MyMessage")]
+public function messageInterceptor( processor : MessageProcessor ) : void
+{
+   processor.proceed();
+}
+
+[MessageInterceptor(type="a.b.MyMessage")]
+public function messageInterceptor() : void // VIOLATION
+{
+}
+
+[MessageInterceptor(type="a.b.MyMessage")]
+public function messageInterceptor( type : MyMessage ) : void // VIOLATION
+{
+   type.something();
+}
+
+[MessageInterceptor(type="a.b.MyMessage")]
+public function messageInterceptor( processor : MessageProcessor, type : MyMessage ) : void // VIOLATION
+{
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.parsley.MisplacedMetaDataRule" message="This metadata {0} is misplaced">
+    <description/>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.parsley.RedundantMessageHandlerTypeAttributeRule" message="This type metadata argument is redundant with the handler argument type">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[
+[MessageHandler(type="a.b.MyMessage")] // VIOLATION
+public function doSomething( message : MyMessage ) : void
+{
+   message.toString();
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.parsley.RedundantMethodAttributeRule" message="This method metadata argument is redundant with the handler name">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[
+[MessageHandler(method="doSomething")] // VIOLATION
+public function doSomething( message : MyMessage ) : void
+{
+   message.toString();
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.parsley.UnknownMetaDataAttributeRule" message="This metadata attribute {0} is unknown">
+    <description/>
+    <priority>1</priority>
+    <example><![CDATA[
+[AsyncInit(x="y")] // VIOLATION
+public class UnknownMetaDataAttribute
+{
+   [Inject(x="y")] // VIOLATION
+   public var inject;
+
+   [MessageHandler(x="y")] // VIOLATION
+   public function messageHandler() : void
+   {
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.performance.DynamicFiltersUsedInPopup" message="A popup should not use dynamic filters">
+    <description>Prefer using embed filters in assets</description>
+    <priority>3</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.performance.CyclomaticComplexityRule" message="This method is too complex. Maximum complexity is {0}, but its cyclomatic complexity was {1}">
+    <description/>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>10</value>
+      </property>
+    </properties>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.performance.HeavyConstructorRule" message="Constructor must be as lightweight as possible. No control statement allowed, whereas a cyclomatic complexe of {0} has been detected">
+    <description>The Just-In-Time compiler does not compile constructors. Make them as lightweight as possible, or move the complexity of the code to a method called by the constructor. Then the complexity will be compiled by the JIT.</description>
+    <priority>3</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.performance.CreationPolicySetToAllRule" message="creationPolicy to ALL impacts the performance significantly">
+    <description/>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.performance.DeeplyNestedIfRule" message="Nested if statements are not a good design">
+    <description/>
+    <priority>3</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.performance.RecursiveStyleManagerRule" message="Detect calls to the StyleManager that don’t pass “false” as the second parameter">
+    <description>A recursive style manager call can be a very expensive operation, causing parts of the UI to flicker visibly. Instead it is preferable to defer the creation of parts of the UI that depend on a runtime CSS SWF until after the SWF has been loaded. In this case a recursive call is not required.</description>
+    <priority>3</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooManyFunctionRule" message="Too many methods detected ({0} maximum, but {1} actually)">
+    <description>A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.</description>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>25</value>
+      </property>
+    </properties>
+    <example><![CDATA[public class Foo 
+   {
+      public function doWork() : void {}
+      public function doMoreWork() : void {}
+      public function doWorkAgain() : void {}
+      // [... more more public methods ...]
+   }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooLongFunctionRule" message="This function is far too long ({0} maximum, but {1} actually)">
+    <description>Violations of this rule usually indicate that the method has too much responsibility. Try to reduce the method size by creating helper methods and removing any copy/pasted code.</description>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>20</value>
+      </property>
+    </properties>
+    <example><![CDATA[public class Foo 
+   {
+      public function doSomething() : void
+      {
+         System.out.println("Hello world!");
+         System.out.println("Hello world!");
+         // 98 copies omitted for brevity.
+      }
+   }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooLongSwitchCaseRule" message="Long switch case detected ({0} lines maximum, but {1} actually)">
+    <description>A switch case statement should be either empty, or contain a break, or call another method.</description>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>3</value>
+      </property>
+    </properties>
+    <example><![CDATA[public class Bar   
+   {
+      public function foo() : void
+      {
+          var i : int = 4;
+          
+          switch( i )
+          {
+             case 1:
+                handleFirstCase();
+                break;
+             case 2: // VIOLATION
+                googleResquest.url = "";
+                handleSecondCaseFirstPart();
+                handleSecondCaseSecondPart();
+                break;
+          }
+      }
+   }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooManyParametersRule" message="Long parameter list detected ({0} maximum, but {1} actually)">
+    <description>Long parameter lists can indicate that a new object should be created to wrap the numerous parameters.  Basically, try to group the parameters together.</description>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>4</value>
+      </property>
+    </properties>
+    <example><![CDATA[public class Foo 
+   {
+      public function addData( p0 : int, p1 : int, p2 : int, p3 : int, p4 : int, p5 : int,
+                                             p6 : int, p7 : int, p8 : int, p9 : int, p10 : int ) : void 
+      {
+      }
+   }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooManyPublicRule" message="Too many public fields or functions detected ({0} maximum, but {1} actually)">
+    <description>A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.</description>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>15</value>
+      </property>
+    </properties>
+    <example><![CDATA[public class Foo 
+   {
+      public var value : String;
+      public var something : Bar;
+      public var variable : Variable;
+
+      // [... more more public attributes ...]
+
+      public function doWork() : void {}
+      public function doMoreWork() : void {}
+      public function doWorkAgain() : void {}
+
+      // [... more more public methods ...]
+   }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.sizing.TooManyFieldsRule" message="Too many field detected ({0} maximum, but {1} actually)">
+    <description>Classes that have too many fields could be redesigned to have fewer fields, possibly  through some nested object grouping of some of the information.  For example, a class with  city/state/zipcode fields could instead have one Address field.</description>
+    <priority>3</priority>
+    <properties>
+      <property name="maximum">
+        <value>15</value>
+      </property>
+    </properties>
+    <example><![CDATA[public class Person 
+   {
+      private var one : String;
+      private var two : int;
+      private var three : int;
+
+      [... many more public fields ...]
+
+   }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.style.ConstructorNonEmptyReturnTypeRule" message="A constructor should not have a return type">
+    <description>Even if this is syntactically correct, there should not be a return type for a constructor.</description>
+    <priority>5</priority>
+    <example><![CDATA[public class VoidConstructor   
+   {
+      public function VoidConstructor() : void // VIOLATION
+      {         
+      }      
+   }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.style.OverLongLineRule" message="Too long line ({0} maximum, but {1} actually)">
+    <description/>
+    <priority>5</priority>
+    <properties>
+      <property name="maximum">
+        <value>120</value>
+      </property>
+    </properties>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.style.ImportFromSamePackageRule" message="Imports from the same package are not necessary">
+    <description/>
+    <priority>5</priority>
+    <example><![CDATA[package com.adobe.ac
+{
+   import com.adobe.ac.MyModel; // VIOLATION HERE
+
+   public class BigModel   
+   {
+      public var model : MyModel = null;
+   }
+}]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.style.BadFormatLoggerRule" message="The logger is not correctly formatted because {0}">
+    <description/>
+    <priority>5</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.switchrules.SwitchStatementsShouldHaveDefaultRule" message="A switch statement does not contain a default statement">
+    <description>Switch statements should have a default label in order to detect corner cases.</description>
+    <priority>1</priority>
+    <example><![CDATA[public class Foo 
+   {
+      public funciton bar() : void 
+      {
+         var  x : int = 2;
+         switch (x) 
+         {
+            case 2: var j : int = 8;
+         }
+      }
+   }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.switchrules.NestedSwitchRule" message="Switch must not be nested">
+    <description>As a general practice, switch statement should not be used. Prefer using inheritance. It is even harder to read when switch statements are nested.</description>
+    <priority>3</priority>
+    <example><![CDATA[public function foo( a : Number, b : Number ) : void
+      {
+          switch( a )
+          {
+             case 1:
+                break;
+             case 2:                   
+                switch ( b ) 
+                {
+                  case 3 :
+                     break;
+                  case 4 :
+                     break;
+                }
+                break;                     
+          }
+      }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.switchrules.TooFewBrancheInSwitchStatementRule" message="There are too few branches in this switch statement ({0} minimum, but {1} actual)">
+    <description>Switch statements are designed for complex branches, and allow branches to share treatment. Using a switch for only 2 branches is ill advised, as switches are not as easy to understand as if. In this case, it's most likely is a good idea to use a if statement</description>
+    <priority>5</priority>
+    <properties>
+      <property name="minimum">
+        <value>3</value>
+      </property>
+    </properties>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.switchrules.IdenticalSwitchCasesRule" message="Two switch cases should not be identical">
+    <description/>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.flexunit.EmptyUnitTest" message="A test should contain at least one assertion">
+    <description/>
+    <priority>3</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.unused.UnusedParameterRule" message="This parameter ({0}) of this function is not used">
+    <description/>
+    <priority>1</priority>
+    <example><![CDATA[public function foo( param1 : Number, param2 : Number, param3 : Number, param4 : Number, param5 : Number ) : void // 4 violations
+      {
+         var i : int = param1;
+      }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.unused.UnusedLocalVariableRule" message="This variable ({0}) is not used">
+    <description/>
+    <priority>3</priority>
+    <example><![CDATA[public function foo() : void
+      {
+         var i : int = 0;// 1 violation
+      }]]></example>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.unused.UnusedPrivateMethodRule" message="This private method ({0}) does not seem to be used">
+    <description/>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.unused.UnusedFieldRule" message="This private attribute ({0}) does not seem to be used">
+    <description/>
+    <priority>1</priority>
+  </rule>
+  <rule since="" class="com.adobe.ac.pmd.rules.unused.EmptyPrivateMethodRule" message="This private method ({0}) is used but its content is empty">
+    <description/>
+    <priority>1</priority>
+  </rule>
+    
+</ruleset>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-ant-task/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-ant-task/.pmd b/FlexPMD/flex-pmd-java/flex-pmd-metrics-ant-task/.pmd
new file mode 100644
index 0000000..b5adf0f
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-ant-task/.pmd
@@ -0,0 +1,975 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<pmd>
+    <useProjectRuleSet>false</useProjectRuleSet>
+    <ruleSetFile>.ruleset</ruleSetFile>
+    <rules>
+        <rule>
+            <name>LooseCoupling</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloneMethodMustImplementCloneable</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedImports</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SignatureDeclareThrowsException</name>
+            <ruleset>Type Resolution Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IfStmtsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>WhileLoopsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IfElseStmtsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ForLoopsMustUseBraces</name>
+            <ruleset>Braces Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseSingleton</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanReturns</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanExpressions</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SwitchStmtsShouldHaveDefault</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDeeplyNestedIfStmts</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidReassigningParameters</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SwitchDensity</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConstructorCallsOverridableMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AccessorClassGeneration</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalFieldCouldBeStatic</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloseResource</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonStaticInitializer</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DefaultLabelNotLastInSwitchStmt</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonCaseLabelInSwitchStatement</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OptimizableToArrayCall</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BadComparison</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EqualsNull</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConfusingTernary</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InstantiationToGetClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IdempotentOperations</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimpleDateFormatNeedsLocale</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ImmutableField</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseLocaleWithCaseConversions</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidProtectedFieldInFinalClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AssignmentToNonFinalStatic</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingStaticMethodInNonInstantiatableClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidSynchronizedAtMethodLevel</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingBreakInSwitch</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseNotifyAllInsteadOfNotify</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidInstanceofChecksInCatchClause</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractClassWithoutAbstractMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyConditional</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CompareObjectsWithEquals</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PositionLiteralsFirstInComparisons</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryLocalBeforeReturn</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NonThreadSafeSingleton</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UncommentedEmptyMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UncommentedEmptyConstructor</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidConstantsInterface</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnsynchronizedStaticDateFormatter</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PreserveStackTrace</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseCollectionIsEmpty</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassWithOnlyPrivateConstructorsShouldBeFinal</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyMethodInAbstractClassShouldBeAbstract</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SingularField</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReturnEmptyArrayRatherThanNull</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractClassWithoutAnyMethod</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooFewBranchesForASwitchStatement</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCatchingThrowable</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SignatureDeclareThrowsException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExceptionAsFlowControl</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCatchingNPE</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingRawExceptionTypes</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingNullPointerException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidRethrowingException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotExtendJavaLangError</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotThrowExceptionInFinally</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThrowingNewInstanceOfSameException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedPrivateField</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedLocalVariable</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedPrivateMethod</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedFormalParameter</name>
+            <ruleset>Unused Code Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MoreThanOneLogger</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LoggerIsNotStaticFinal</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SystemPrintln</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidPrintStackTrace</name>
+            <ruleset>Java Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDuplicateLiterals</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringInstantiation</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringToString</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InefficientStringBuffering</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryCaseChange</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseStringBufferLength</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AppendCharacterWithChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ConsecutiveLiteralAppends</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseIndexOfChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InefficientEmptyStringCheck</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InsufficientStringBufferDeclaration</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessStringValueOf</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringBufferInstantiationWithChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseEqualsToCompareStrings</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidStringBufferField</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceVectorWithList</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceHashtableWithMap</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReplaceEnumerationWithIterator</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidEnumAsIdentifier</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidAssertAsIdentifier</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IntegerInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ByteInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LongInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseBeforeAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseAfterAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4TestShouldUseTestAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4SuitesShouldUseSuiteAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitUseExpected</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseProperClassLoader</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MDBAndSessionBeanNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>RemoteSessionInterfaceNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalInterfaceSessionNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalHomeNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>RemoteInterfaceNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotCallSystemExit</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StaticEJBFieldShouldBeFinal</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotUseThreads</name>
+            <ruleset>J2EE Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LocalVariableCouldBeFinal</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodArgumentCouldBeFinal</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidInstantiatingObjectsInLoops</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseArrayListInsteadOfVector</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyStartsWith</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseStringBufferForStringAppends</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseArraysAsList</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidArrayLoops</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryWrapperObjectCreation</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AddEmptyString</name>
+            <ruleset>Optimization Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyCatchBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyIfStmt</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyWhileStmt</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyTryBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyFinallyBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptySwitchStatements</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JumbledIncrementer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ForLoopShouldBeWhileLoop</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryConversionTemporary</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OverrideBothEqualsAndHashcode</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoubleCheckedLocking</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReturnFromFinallyBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptySynchronizedBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryReturn</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyStaticInitializer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnconditionalIfStatement</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyStatementNotInLoop</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanInstantiation</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryFinalModifier</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CollapsibleIfStatements</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessOverridingMethod</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassCastExceptionWithToArray</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDecimalLiteralsInBigDecimalConstructor</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UselessOperationOnImmutable</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MisplacedNullCheck</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedNullCheckInEquals</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidThreadGroup</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BrokenNullCheck</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BigIntegerInstantiation</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingOctalValues</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingHardCodedIP</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CheckResultSet</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidMultipleUnaryOperators</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyInitializer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodReturnsInternalArray</name>
+            <ruleset>Security Code Guidelines</ruleset>
+        </rule>
+        <rule>
+            <name>ArrayIsStoredDirectly</name>
+            <ruleset>Security Code Guidelines</ruleset>
+        </rule>
+        <rule>
+            <name>CouplingBetweenObjects</name>
+            <ruleset>Coupling Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveImports</name>
+            <ruleset>Coupling Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LooseCoupling</name>
+            <ruleset>Coupling Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DuplicateImports</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DontImportJavaLang</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedImports</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ImportFromSamePackage</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyStaticImports</name>
+            <ruleset>Import Statement Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitStaticSuite</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitSpelling</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitAssertionsShouldIncludeMessage</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnitTestsShouldIncludeAssert</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TestClassWithoutTestCases</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryBooleanAssertion</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertEqualsInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertSameInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertNullInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SimplifyBooleanAssertion</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NullAssignment</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>OnlyOneReturn</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnusedModifier</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AssignmentInOperand</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AtLeastOneConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DontImportSun</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousOctalEscape</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CallSuperInConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UnnecessaryParentheses</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DefaultPackage</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanInversion</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DataflowAnomalyAnalysis</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFinalLocalVariable</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingShortType</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingVolatile</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidUsingNativeCode</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidAccessibilityAlteration</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>DoNotCallGarbageCollectionExplicitly</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortVariable</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>LongVariable</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ShortMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>VariableNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AbstractNaming</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidDollarSigns</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MethodWithSameNameAsEnclosingClass</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousHashcodeMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousConstantFieldName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>SuspiciousEqualsMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFieldNameMatchingTypeName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidFieldNameMatchingMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NoPackage</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>PackageCase</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MisleadingVariableName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BooleanGetMethodName</name>
+            <ruleset>Naming Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NPathComplexity</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveMethodLength</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveParameterList</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessiveClassLength</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CyclomaticComplexity</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ExcessivePublicCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyFields</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssMethodCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssTypeCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>NcssConstructorCount</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>TooManyMethods</name>
+            <ruleset>Code Size Rules</ruleset>
+        </rule>
+        <rule>
+            <name>EmptyFinalizer</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeOnlyCallsSuperFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeOverloaded</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeDoesNotCallSuperFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>FinalizeShouldBeProtected</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidCallingFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseCorrectExceptionLogging</name>
+            <ruleset>Jakarta Commons Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ProperLogger</name>
+            <ruleset>Jakarta Commons Logging Rules</ruleset>
+        </rule>
+        <rule>
+            <name>BeanMembersShouldSerialize</name>
+            <ruleset>JavaBean Rules</ruleset>
+        </rule>
+        <rule>
+            <name>MissingSerialVersionUID</name>
+            <ruleset>JavaBean Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ProperCloneImplementation</name>
+            <ruleset>Clone Implementation Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloneThrowsCloneNotSupportedException</name>
+            <ruleset>Clone Implementation Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CloneMethodMustImplementCloneable</name>
+            <ruleset>Clone Implementation Rules</ruleset>
+        </rule>
+    </rules>
+    <includeDerivedFiles>false</includeDerivedFiles>
+    <violationsAsErrors>true</violationsAsErrors>
+</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-ant-task/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-ant-task/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-metrics-ant-task/pom.xml
new file mode 100644
index 0000000..b6be1d8
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-ant-task/pom.xml
@@ -0,0 +1,163 @@
+<!--
+
+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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-metrics-ant-task</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Adobe Flex Metrics Ant task</name>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>pmd</groupId>
+            <artifactId>pmd</artifactId>
+            <version>${pmd.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <version>${project.parent.version}</version>
+            <artifactId>flex-pmd-metrics</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ant</groupId>
+            <artifactId>ant</artifactId>
+            <version>${ant.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <version>${project.version}</version>
+            <artifactId>flex-pmd-files</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>as3-plugin-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>as3-parser</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>as3-parser-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-test-resources</artifactId>
+            <version>${project.parent.version}</version>
+            <classifier>resources</classifier>
+            <type>zip</type>
+            <scope>provided</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+
+        <testResources>
+            <testResource>
+                <directory>${project.build.directory}/test/generated-resources</directory>
+            </testResource>
+        </testResources>
+
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-test-resources</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeGroupIds>${project.groupId}</includeGroupIds>
+                            <includes>**/*.as,**/*.mxml</includes>
+                            <outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
+                            <excludeTransitive>true</excludeTransitive>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>${maven-antrun-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <id>package-ant-task</id>
+                        <phase>install</phase>
+                        <configuration>
+                            <tasks>
+                                <echo message="Building ant-task"/>
+                                <mkdir dir="${project.build.directory}/release"/>
+                                <echo message=""/>
+                                <echo message="Copying Flex PMD dependencies..."/>
+                                <copy file="${project.build.directory}/${project.build.finalName}.jar"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:flex-pmd-metrics:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${pmd:pmd:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <echo message="Copying Ant dependencies..."/>
+                                <copy file="${org.apache.flex.pmd:flex-pmd-files:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:as3-parser:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:as3-parser-api:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.ant:ant:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <copy file="${org.apache.flex.pmd:as3-plugin-utils:jar}"
+                                      todir="${project.build.directory}/release" overwrite="true"/>
+                                <echo message="Extracting license..."/>
+                                <copy file="../../src/etc/header.txt"
+                                      tofile="${project.build.directory}/release/LICENSE.txt" overwrite="true"/>
+                                <echo message="Compressing zip..."/>
+                                <zip destfile="${project.build.directory}/${project.build.finalName}.zip"
+                                     basedir="${project.build.directory}/release" excludes="*.zip"/>
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-ant-task/src/main/java/com/adobe/ac/pmd/metrics/ant/FlexMetricsAntTask.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-ant-task/src/main/java/com/adobe/ac/pmd/metrics/ant/FlexMetricsAntTask.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics-ant-task/src/main/java/com/adobe/ac/pmd/metrics/ant/FlexMetricsAntTask.java
new file mode 100644
index 0000000..28741f5
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-ant-task/src/main/java/com/adobe/ac/pmd/metrics/ant/FlexMetricsAntTask.java
@@ -0,0 +1,83 @@
+/*
+ * 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.metrics.ant;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.dom4j.DocumentException;
+
+import com.adobe.ac.pmd.LoggerUtils;
+import com.adobe.ac.pmd.metrics.engine.FlexMetrics;
+
+public class FlexMetricsAntTask extends Task
+{
+   private double mxmlFactor;
+
+   private File   outputFile;
+
+   private File   sourceDirectory;
+
+   @Override
+   public final void execute()
+   {
+      new LoggerUtils().loadConfiguration();
+      validateFields();
+
+      try
+      {
+         new FlexMetrics( sourceDirectory, mxmlFactor ).execute( outputFile );
+      }
+      catch ( final DocumentException e )
+      {
+         throw new BuildException( e );
+      }
+      catch ( final IOException e )
+      {
+         throw new BuildException( e );
+      }
+   }
+
+   public void setMxmlFactor( final double mxmlFactorToBeSet )
+   {
+      this.mxmlFactor = mxmlFactorToBeSet;
+   }
+
+   public final void setOutputFile( final File outputFileToBeSet )
+   {
+      outputFile = outputFileToBeSet;
+   }
+
+   public final void setSourceDirectory( final File sourceDirectoryToBeSet )
+   {
+      sourceDirectory = sourceDirectoryToBeSet;
+   }
+
+   private void validateFields()
+   {
+      if ( outputFile == null )
+      {
+         throw new BuildException( "outputFile is required" );
+      }
+      else if ( sourceDirectory == null )
+      {
+         throw new BuildException( "sourceDirectory is required" );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-metrics-ant-task/src/test/java/com/adobe/ac/pmd/metrics/ant/FlexMetricsAntTaskTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-metrics-ant-task/src/test/java/com/adobe/ac/pmd/metrics/ant/FlexMetricsAntTaskTest.java b/FlexPMD/flex-pmd-java/flex-pmd-metrics-ant-task/src/test/java/com/adobe/ac/pmd/metrics/ant/FlexMetricsAntTaskTest.java
new file mode 100644
index 0000000..8df1538
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-metrics-ant-task/src/test/java/com/adobe/ac/pmd/metrics/ant/FlexMetricsAntTaskTest.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.metrics.ant;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+
+public class FlexMetricsAntTaskTest extends FlexPmdTestBase
+{
+   @Test
+   public void testExecute() throws IOException
+   {
+      final FlexMetricsAntTask ant = new FlexMetricsAntTask();
+
+      final File outPut = File.createTempFile( "metrics",
+                                               "output" );
+
+      ant.setOutputFile( outPut );
+      ant.setSourceDirectory( getTestDirectory() );
+      ant.execute();
+   }
+}


[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

Posted by cd...@apache.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/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" };
+   }
+}


[23/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/FileUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/FileUtils.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/FileUtils.java
new file mode 100644
index 0000000..12450f8
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/FileUtils.java
@@ -0,0 +1,163 @@
+/*
+ * 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.files.impl;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import net.sourceforge.pmd.PMDException;
+
+import com.adobe.ac.ncss.filters.FlexFilter;
+import com.adobe.ac.pmd.files.IFlexFile;
+
+/**
+ * @author xagnetti
+ */
+public final class FileUtils
+{
+   /**
+    * @param source
+    * @param sourceList
+    * @param packageToExclude
+    * @param excludePatterns
+    * @return
+    * @throws PMDException
+    */
+   public static Map< String, IFlexFile > computeFilesList( final File source,
+                                                            final List< File > sourceList,
+                                                            final String packageToExclude,
+                                                            final List< String > excludePatterns ) throws PMDException
+   {
+      final Map< String, IFlexFile > files = new LinkedHashMap< String, IFlexFile >();
+      final FlexFilter flexFilter = new FlexFilter();
+      final Collection< File > foundFiles = getFlexFiles( source,
+                                                          sourceList,
+                                                          flexFilter );
+
+      for ( final File sourceFile : foundFiles )
+      {
+         final AbstractFlexFile file = create( sourceFile,
+                                               source );
+
+         if ( ( "".equals( packageToExclude ) || !file.getFullyQualifiedName().startsWith( packageToExclude ) )
+               && !currentPackageIncludedInExcludePatterns( file.getFullyQualifiedName(),
+                                                            excludePatterns ) )
+         {
+            files.put( file.getFullyQualifiedName(),
+                       file );
+         }
+      }
+
+      return files;
+   }
+
+   /**
+    * @param sourceFile
+    * @param sourceDirectory
+    * @return
+    */
+   public static AbstractFlexFile create( final File sourceFile,
+                                          final File sourceDirectory )
+   {
+      AbstractFlexFile file;
+
+      if ( sourceFile.getName().endsWith( ".as" ) )
+      {
+         file = new As3File( sourceFile, sourceDirectory );
+      }
+      else
+      {
+         file = new MxmlFile( sourceFile, sourceDirectory );
+      }
+
+      return file;
+   }
+
+   /**
+    * @param file
+    * @return
+    * @throws IOException
+    */
+   public static String[] readLines( final File file ) throws IOException
+   {
+      final List< String > lines = com.adobe.ac.ncss.utils.FileUtils.readFile( file );
+
+      return lines.toArray( new String[ lines.size() ] );
+   }
+
+   private static boolean currentPackageIncludedInExcludePatterns( final String fullyQualifiedName,
+                                                                   final List< String > excludePatterns )
+   {
+      if ( excludePatterns != null )
+      {
+         for ( final String excludePattern : excludePatterns )
+         {
+            if ( fullyQualifiedName.startsWith( excludePattern ) )
+            {
+               return true;
+            }
+         }
+      }
+      return false;
+   }
+
+   private static Collection< File > getFlexFiles( final File source,
+                                                   final List< File > sourceList,
+                                                   final FlexFilter flexFilter ) throws PMDException
+   {
+      if ( source == null
+            && sourceList == null )
+      {
+         throw new PMDException( "sourceDirectory is not specified", null );
+      }
+      Collection< File > foundFiles;
+      if ( source == null )
+      {
+         foundFiles = com.adobe.ac.ncss.utils.FileUtils.listFiles( sourceList,
+                                                                   flexFilter,
+                                                                   true );
+      }
+      else
+      {
+         if ( source.isDirectory() )
+         {
+            foundFiles = com.adobe.ac.ncss.utils.FileUtils.listFiles( source,
+                                                                      flexFilter,
+                                                                      true );
+         }
+         else
+         {
+            foundFiles = new ArrayList< File >();
+            foundFiles.add( source );
+         }
+      }
+      if ( foundFiles.isEmpty() )
+      {
+         return new ArrayList< File >();
+      }
+      return foundFiles;
+   }
+
+   private FileUtils()
+   {
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/MxmlFile.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/MxmlFile.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/MxmlFile.java
new file mode 100644
index 0000000..7438c53
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/com/adobe/ac/pmd/files/impl/MxmlFile.java
@@ -0,0 +1,334 @@
+/*
+ * 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.files.impl;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.adobe.ac.pmd.files.IMxmlFile;
+
+/**
+ * @author xagnetti
+ */
+class MxmlFile extends AbstractFlexFile implements IMxmlFile
+{
+   private static final String METADATA_TAG    = "Metadata";
+   private String[]            actualScriptBlock;
+   private int                 endLine;
+   private boolean             mainApplication = false;
+   private String[]            scriptBlock;
+   private int                 startLine;
+
+   /**
+    * @param file
+    * @param rootDirectory
+    */
+   protected MxmlFile( final File file,
+                       final File rootDirectory )
+   {
+      super( file, rootDirectory );
+
+      computeIfIsMainApplication();
+      if ( getLinesNb() > 0 )
+      {
+         extractScriptBlock();
+      }
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IMxmlFile#getActualScriptBlock()
+    */
+   public final String[] getActualScriptBlock()
+   {
+      return actualScriptBlock; // NOPMD
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IMxmlFile#getBeginningScriptBlock()
+    */
+   public int getBeginningScriptBlock()
+   {
+      return startLine;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.impl.AbstractFlexFile#getCommentClosingTag()
+    */
+   @Override
+   public final String getCommentClosingTag()
+   {
+      return "-->";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.impl.AbstractFlexFile#getCommentOpeningTag()
+    */
+   @Override
+   public final String getCommentOpeningTag()
+   {
+      return "<!--";
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IMxmlFile#getEndingScriptBlock()
+    */
+   public int getEndingScriptBlock()
+   {
+      return endLine;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IMxmlFile#getScriptBlock()
+    */
+   public final String[] getScriptBlock()
+   {
+      return scriptBlock; // NOPMD by xagnetti on 7/7/09 3:15 PM
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.IFlexFile#getSingleLineComment()
+    */
+   public String getSingleLineComment()
+   {
+      return getCommentOpeningTag();
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.impl.AbstractFlexFile#isMainApplication()
+    */
+   @Override
+   public final boolean isMainApplication()
+   {
+      return mainApplication;
+   }
+
+   /*
+    * (non-Javadoc)
+    * @see com.adobe.ac.pmd.files.impl.AbstractFlexFile#isMxml()
+    */
+   @Override
+   public final boolean isMxml()
+   {
+      return true;
+   }
+
+   private void computeIfIsMainApplication()
+   {
+      for ( final String line : getLines() )
+      {
+         if ( line.contains( "Application " )
+               && line.charAt( 0 ) == '<' )
+         {
+            mainApplication = true;
+            break;
+         }
+      }
+   }
+
+   private int computeScriptOffSet( final int startingLineIndex )
+   {
+      int currentLineIndex = startingLineIndex + 1;
+      while ( getLines().get( currentLineIndex ).contains( "CDATA[" )
+            || getLines().get( currentLineIndex ).contains( "//" ) || containsCloseComment( currentLineIndex )
+            || getLines().get( currentLineIndex ).trim().equals( "" ) )
+      {
+         currentLineIndex++;
+      }
+      return currentLineIndex
+            - startingLineIndex;
+   }
+
+   private boolean containsCloseComment( final int currentLineIndex )
+   {
+      final boolean closedAsComment = getLines().get( currentLineIndex ).contains( "/*" )
+            && getLines().get( currentLineIndex ).contains( "*/" );
+      final boolean closeMxmlComment = getLines().get( currentLineIndex ).contains( "<!--" )
+            && getLines().get( currentLineIndex ).contains( "-->" );
+      return closedAsComment
+            || closeMxmlComment;
+   }
+
+   private void copyScriptLinesKeepingOriginalLineIndices()
+   {
+      final List< String > scriptLines = extractScriptLines();
+      final List< String > metaDataLines = extractMetaDataLines();
+      final String packageLine = "package "
+            + getPackageName() + "{";
+      final String classLine = "class "
+            + getClassName().split( "\\." )[ 0 ] + "{";
+
+      scriptLines.set( 0,
+                       packageLine );
+
+      if ( metaDataLines.isEmpty()
+            || metaDataLines.get( 0 ).compareTo( "HostComponent" ) == 0 )
+      {
+         if ( scriptLines.size() > 1 )
+         {
+            scriptLines.set( 1,
+                             classLine );
+         }
+      }
+      else
+      {
+         final int firstMetaDataLine = getFirstMetaDataLine( getLines() );
+
+         for ( int i = firstMetaDataLine; i < firstMetaDataLine
+               + metaDataLines.size(); i++ )
+         {
+            scriptLines.set( i,
+                             metaDataLines.get( i
+                                   - firstMetaDataLine ) );
+         }
+         scriptLines.set( firstMetaDataLine
+                                + metaDataLines.size(),
+                          classLine );
+      }
+
+      scriptLines.set( scriptLines.size() - 1,
+                       "}}" );
+      scriptBlock = scriptLines.toArray( new String[ scriptLines.size() ] );
+   }
+
+   private List< String > extractMetaDataLines()
+   {
+      final ArrayList< String > metaDataLines = new ArrayList< String >();
+      int currentLineIndex = 0;
+      int start = 0;
+      int end = 0;
+
+      for ( final String line : getLines() )
+      {
+         if ( line.contains( METADATA_TAG ) )
+         {
+            if ( line.contains( "</" ) )
+            {
+               end = currentLineIndex
+                     - ( getLines().get( currentLineIndex - 1 ).contains( "]]>" ) ? 1
+                                                                                 : 0 );
+               if ( line.contains( "<fx" )
+                     || line.contains( "<mx" ) )
+               {
+                  start = end;
+               }
+               break;
+            }
+            if ( line.contains( "<" ) )
+            {
+               start = currentLineIndex
+                     + ( getLines().get( currentLineIndex + 1 ).contains( "CDATA[" ) ? 2
+                                                                                    : 1 );
+            }
+         }
+         currentLineIndex++;
+      }
+      metaDataLines.addAll( getLines().subList( start,
+                                                end ) );
+      return metaDataLines;
+   }
+
+   private void extractScriptBlock()
+   {
+      int currentLineIndex = 0;
+      startLine = 0;
+      endLine = 0;
+
+      for ( final String line : getLines() )
+      {
+         if ( line.contains( "Script" ) )
+         {
+            if ( line.contains( "</" ) )
+            {
+               endLine = currentLineIndex
+                     - ( getLines().get( currentLineIndex - 1 ).contains( "]]>" ) ? 1
+                                                                                 : 0 );
+               break;
+            }
+            else if ( line.contains( "<" ) )
+            {
+               startLine = currentLineIndex
+                     + computeScriptOffSet( currentLineIndex );
+            }
+         }
+         currentLineIndex++;
+      }
+
+      copyScriptLinesKeepingOriginalLineIndices();
+   }
+
+   private List< String > extractScriptLines()
+   {
+      final List< String > scriptLines = new ArrayList< String >();
+
+      for ( int j = 0; j < startLine; j++ )
+      {
+         scriptLines.add( "" );
+      }
+      if ( startLine < endLine )
+      {
+         actualScriptBlock = getLines().subList( startLine,
+                                                 endLine ).toArray( new String[ endLine
+               - startLine ] );
+         scriptLines.addAll( new ArrayList< String >( getLines().subList( startLine,
+                                                                          endLine ) ) );
+      }
+      for ( int j = endLine; j < getLines().size(); j++ )
+      {
+         scriptLines.add( "" );
+      }
+      return scriptLines;
+   }
+
+   private int getFirstMetaDataLine( final List< String > lines )
+   {
+      for ( int i = 0; i < lines.size(); i++ )
+      {
+         final String line = lines.get( i );
+
+         if ( line.contains( METADATA_TAG )
+               && line.contains( "<" ) )
+         {
+            return i;
+         }
+      }
+      return 0;
+   }
+
+   // private String printMetaData( final List< String > metaDataLines )
+   // {
+   // final StringBuffer buffer = new StringBuffer();
+   // if ( metaDataLines == null
+   // || metaDataLines.isEmpty() )
+   // {
+   // return "";
+   // }
+   // for ( final String line : metaDataLines )
+   // {
+   // buffer.append( line );
+   // }
+   // return buffer + " ";
+   // }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/net/sourceforge/pmd/PMDException.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/net/sourceforge/pmd/PMDException.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/net/sourceforge/pmd/PMDException.java
new file mode 100644
index 0000000..ce150c9
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/main/java/net/sourceforge/pmd/PMDException.java
@@ -0,0 +1,80 @@
+/*
+ * 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 net.sourceforge.pmd;
+
+/**
+ * A convenience exception wrapper. Contains the original exception, if any.
+ * Also, contains a severity number (int). Zero implies no severity. The higher
+ * the number the greater the severity.
+ * 
+ * @author Donald A. Leckie
+ * @version $Revision: 5681 $, $Date: 2007-11-30 14:00:56 -0800 (Fri, 30 Nov
+ *          2007) $
+ * @since August 30, 2002
+ */
+public class PMDException extends Exception
+{
+   private static final long serialVersionUID = 6938647389367956874L;
+
+   private int               severity;
+
+   /**
+    * @param message
+    */
+   public PMDException( final String message )
+   {
+      super( message );
+   }
+
+   /**
+    * @param message
+    * @param reason
+    */
+   public PMDException( final String message,
+                        final Exception reason )
+   {
+      super( message, reason );
+   }
+
+   /**
+    * Returns the cause of this exception or <code>null</code>
+    * 
+    * @return the cause of this exception or <code>null</code>
+    * @deprecated use {@link #getCause()} instead
+    */
+   @Deprecated
+   public Exception getReason()
+   {
+      return ( Exception ) getCause();
+   }
+
+   /**
+    * @return
+    */
+   public int getSeverity()
+   {
+      return severity;
+   }
+
+   /**
+    * @param severityToBeSet
+    */
+   public void setSeverity( final int severityToBeSet )
+   {
+      severity = severityToBeSet;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/FlexPmdTestBaseTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/FlexPmdTestBaseTest.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/FlexPmdTestBaseTest.java
new file mode 100644
index 0000000..3fede84
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/FlexPmdTestBaseTest.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;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import junit.framework.Assert;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.files.IFlexFile;
+
+public class FlexPmdTestBaseTest
+{
+   @Test
+   public void testSetTestFiles()
+   {
+      final FlexPmdTestBase testBase = new FlexPmdTestBase();
+      final Map< String, IFlexFile > testFilesToBeSet = new LinkedHashMap< String, IFlexFile >();
+
+      testBase.setTestFiles( testFilesToBeSet );
+      Assert.assertEquals( testFilesToBeSet,
+                           testBase.getTestFiles() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/ResourcesManagerTestTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/ResourcesManagerTestTest.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/ResourcesManagerTestTest.java
new file mode 100644
index 0000000..fe4848a
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/ResourcesManagerTestTest.java
@@ -0,0 +1,32 @@
+/*
+ * 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;
+
+import junit.framework.Assert;
+
+import org.junit.Test;
+
+public class ResourcesManagerTestTest
+{
+   @Test
+   public void testGetInstance()
+   {
+      final ResourcesManagerTest manager = ResourcesManagerTest.getInstance();
+
+      Assert.assertNotNull( manager.getTestFiles() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/MxmlFileTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/MxmlFileTest.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/MxmlFileTest.java
new file mode 100644
index 0000000..948115d
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/MxmlFileTest.java
@@ -0,0 +1,150 @@
+/*
+ * 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.files;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+
+public class MxmlFileTest extends FlexPmdTestBase
+{
+   private IMxmlFile bug141;
+   private IMxmlFile bug233a;
+   private IMxmlFile bug233b;
+   private IMxmlFile deleteRenderer;
+   private IMxmlFile iterationsList;
+   private IMxmlFile nestedComponent;
+
+   @Before
+   public void setUp()
+   {
+      bug141 = ( IMxmlFile ) getTestFiles().get( "bug.FlexPMD141a.mxml" );
+      bug233a = ( IMxmlFile ) getTestFiles().get( "bug.FlexPMD233a.mxml" );
+      bug233b = ( IMxmlFile ) getTestFiles().get( "bug.FlexPMD233b.mxml" );
+      iterationsList = ( IMxmlFile ) getTestFiles().get( "com.adobe.ac.ncss.mxml.IterationsList.mxml" );
+      nestedComponent = ( IMxmlFile ) getTestFiles().get( "com.adobe.ac.ncss.mxml.NestedComponent.mxml" );
+      deleteRenderer = ( IMxmlFile ) getTestFiles().get( "DeleteButtonRenderer.mxml" );
+   }
+
+   @Test
+   public void testCommentTags()
+   {
+      assertEquals( "<!--",
+                    iterationsList.getCommentOpeningTag() );
+      assertEquals( "-->",
+                    iterationsList.getCommentClosingTag() );
+   }
+
+   @Test
+   public void testFlexPMD141()
+   {
+      final String[] lines = bug141.getScriptBlock();
+
+      assertEquals( "package bug{",
+                    lines[ 0 ] );
+      assertEquals( "class FlexPMD141a{",
+                    lines[ 1 ] );
+      assertEquals( Integer.valueOf( 32 ),
+                    Integer.valueOf( lines.length ) );
+      assertEquals( "",
+                    lines[ 22 ] );
+      assertEquals( "",
+                    lines[ 23 ] );
+      assertEquals( "",
+                    lines[ 24 ] );
+      assertEquals( "private var object:List = new List();",
+                    lines[ 25 ].trim() );
+      assertEquals( "}}",
+                    lines[ lines.length - 1 ] );
+   }
+
+   @Test
+   public void testFlexPMD233()
+   {
+      final String[] lines = bug233a.getScriptBlock();
+
+      Assert.assertEquals( "",
+                           lines[ 47 ] );
+
+      Assert.assertEquals( 80,
+                           bug233b.getActualScriptBlock().length );
+   }
+
+   @Test
+   public void testGetActionScriptScriptBlock()
+   {
+      final String[] deleteRendererLines = deleteRenderer.getScriptBlock();
+
+      assertEquals( "package {",
+                    deleteRendererLines[ 0 ] );
+      assertEquals( "       [Event(name=\"ruleRemoved\", type=\"flash.events.Event\")]",
+                    deleteRendererLines[ 29 ] );
+      assertEquals( "class DeleteButtonRenderer{",
+                    deleteRendererLines[ 30 ] );
+      assertEquals( Integer.valueOf( 101 ),
+                    Integer.valueOf( deleteRendererLines.length ) );
+      assertEquals( "            import com.adobe.ac.pmd.model.Rule;",
+                    deleteRendererLines[ 35 ] );
+      assertEquals( "}}",
+                    deleteRendererLines[ deleteRendererLines.length - 1 ] );
+   }
+
+   @Test
+   public void testGetMxmlScriptBlock()
+   {
+      final String[] iterationsListLines = iterationsList.getScriptBlock();
+
+      assertEquals( "package com.adobe.ac.ncss.mxml{",
+                    iterationsListLines[ 0 ] );
+      assertEquals( "class IterationsList{",
+                    iterationsListLines[ 1 ] );
+      assertEquals( "         import com.adobe.ac.anthology.model.object.IterationModelLocator;",
+                    iterationsListLines[ 26 ] );
+      assertEquals( "}}",
+                    iterationsListLines[ iterationsListLines.length - 1 ] );
+      assertEquals( Integer.valueOf( 90 ),
+                    Integer.valueOf( iterationsListLines.length ) );
+   }
+
+   @Test
+   public void testGetMxmlScriptBlock2()
+   {
+      final String[] nestedLines = nestedComponent.getScriptBlock();
+
+      assertEquals( "package com.adobe.ac.ncss.mxml{",
+                    nestedLines[ 0 ] );
+      assertEquals( "class NestedComponent{",
+                    nestedLines[ 1 ] );
+      assertEquals( Integer.valueOf( 43 ),
+                    Integer.valueOf( nestedLines.length ) );
+      assertEquals( "}}",
+                    nestedLines[ nestedLines.length - 1 ] );
+   }
+
+   @Test
+   public void testScriptBlockLines()
+   {
+      assertEquals( Integer.valueOf( 26 ),
+                    Integer.valueOf( iterationsList.getBeginningScriptBlock() ) );
+      assertEquals( Integer.valueOf( 80 ),
+                    Integer.valueOf( iterationsList.getEndingScriptBlock() ) );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/AbstractFlexFileTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/AbstractFlexFileTest.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/AbstractFlexFileTest.java
new file mode 100644
index 0000000..97715fe
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/AbstractFlexFileTest.java
@@ -0,0 +1,157 @@
+/*
+ * 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.files.impl;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.FileNotFoundException;
+import java.net.URISyntaxException;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.Assert;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.IAs3File;
+import com.adobe.ac.pmd.files.IMxmlFile;
+
+public class AbstractFlexFileTest extends FlexPmdTestBase
+{
+   private IAs3File  as3;
+   private IMxmlFile mainMxml;
+   private IMxmlFile mxml;
+
+   @Before
+   public void init() throws FileNotFoundException,
+                     URISyntaxException
+   {
+      as3 = ( IAs3File ) getTestFiles().get( "AbstractRowData.as" );
+      mainMxml = ( IMxmlFile ) getTestFiles().get( "Main.mxml" );
+      mxml = ( IMxmlFile ) getTestFiles().get( "com.adobe.ac.ncss.mxml.IterationsList.mxml" );
+   }
+
+   @Test
+   public void testContains()
+   {
+      assertTrue( as3.contains( "logger",
+                                buildSetContaining( 0 ) ) );
+      assertFalse( as3.contains( "loggerr",
+                                 buildSetContaining( 0 ) ) );
+      assertFalse( as3.contains( "addEventListener",
+                                 buildSetContaining( 97,
+                                                     102 ) ) );
+   }
+
+   @Test
+   public void testEquals()
+   {
+      Assert.assertTrue( as3.equals( as3 ) );
+      Assert.assertFalse( mxml.equals( as3 ) );
+      Assert.assertFalse( as3.equals( mxml ) );
+   }
+
+   @Test
+   public void testFlexPMD152()
+   {
+      Assert.assertEquals( "com.something",
+                           AbstractFlexFile.computePackageName( "C:/somePath/ProjectName/com/something/Test.mxml",
+                                                                "C:/somePath/ProjectName",
+                                                                "Test.mxml",
+                                                                "/" ) );
+
+      Assert.assertEquals( "com.something",
+                           AbstractFlexFile.computePackageName( "C:/somePath/ProjectName/com/something/Test.mxml",
+                                                                "C:/somePath/ProjectName/",
+                                                                "Test.mxml",
+                                                                "/" ) );
+   }
+
+   @Test
+   public void testGetClassName()
+   {
+      assertEquals( "AbstractRowData.as",
+                    as3.getClassName() );
+      assertEquals( "IterationsList.mxml",
+                    mxml.getClassName() );
+   }
+
+   @Test
+   public void testGetFileName()
+   {
+      Assert.assertEquals( "AbstractRowData.as",
+                           as3.getFilename() );
+   }
+
+   @Test
+   public void testGetFilePath()
+   {
+      assertNotNull( as3.getFilePath() );
+      assertNotNull( mxml.getFilePath() );
+      assertNotNull( mainMxml.getFilePath() );
+   }
+
+   @Test
+   public void testGetPackageName()
+   {
+      assertEquals( "",
+                    as3.getPackageName() );
+      assertEquals( "com.adobe.ac.ncss.mxml",
+                    mxml.getPackageName() );
+   }
+
+   @Test
+   public void testGetPath()
+   {
+      assertEquals( "AbstractRowData.as",
+                    as3.getFullyQualifiedName() );
+      assertEquals( "com.adobe.ac.ncss.mxml.IterationsList.mxml",
+                    mxml.getFullyQualifiedName() );
+   }
+
+   @Test
+   public void testIsMainApplication()
+   {
+      assertFalse( as3.isMainApplication() );
+      assertFalse( mxml.isMainApplication() );
+      assertTrue( mainMxml.isMainApplication() );
+   }
+
+   @Test
+   public void testIsMxml()
+   {
+      assertFalse( as3.isMxml() );
+      assertTrue( mxml.isMxml() );
+   }
+
+   private Set< Integer > buildSetContaining( final int... lines )
+   {
+
+      final HashSet< Integer > hashSet = new HashSet< Integer >();
+
+      for ( final int line : lines )
+      {
+         hashSet.add( line );
+      }
+      return hashSet;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/As3FileTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/As3FileTest.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/As3FileTest.java
new file mode 100644
index 0000000..c783e55
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/As3FileTest.java
@@ -0,0 +1,64 @@
+/*
+ * 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.files.impl;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.IAs3File;
+
+public class As3FileTest extends FlexPmdTestBase
+{
+   private IAs3File data;
+
+   @Before
+   public void setUp()
+   {
+      data = ( IAs3File ) getTestFiles().get( "AbstractRowData.as" );
+   }
+
+   @Test
+   public void testGetCommentClosingTag()
+   {
+      assertEquals( "*/",
+                    data.getCommentClosingTag() );
+   }
+
+   @Test
+   public void testGetCommentOpeningTag()
+   {
+      assertEquals( "/*",
+                    data.getCommentOpeningTag() );
+   }
+
+   @Test
+   public void testGetLineAt()
+   {
+      assertEquals( "      public const logger : ILogger;",
+                    data.getLineAt( 33 ) );
+   }
+
+   @Test
+   public void testGetSingleLineComment()
+   {
+      assertEquals( "//",
+                    data.getSingleLineComment() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/FileUtilsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/FileUtilsTest.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/FileUtilsTest.java
new file mode 100644
index 0000000..4c26497
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/FileUtilsTest.java
@@ -0,0 +1,115 @@
+/*
+ * 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.files.impl;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Assert;
+import net.sourceforge.pmd.PMDException;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.IFlexFile;
+
+public class FileUtilsTest extends FlexPmdTestBase
+{
+   @Test
+   public void testComputeFilesList() throws PMDException
+   {
+      Map< String, IFlexFile > files;
+      files = FileUtils.computeFilesList( getTestDirectory(),
+                                          null,
+                                          "",
+                                          null );
+
+      Assert.assertEquals( 98,
+                           files.size() );
+
+      final List< String > excludePatterns = new ArrayList< String >();
+      excludePatterns.add( "bug" );
+      files = FileUtils.computeFilesList( getTestDirectory(),
+                                          null,
+                                          "",
+                                          excludePatterns );
+
+      Assert.assertEquals( 82,
+                           files.size() );
+   }
+
+   @Test
+   public void testComputeFilesListWithEmptySourceFolder() throws PMDException
+   {
+      final Map< String, IFlexFile > files = FileUtils.computeFilesList( new File( getTestDirectory().getAbsolutePath()
+                                                                               + "/" + "empty/emptyFolder" ),
+                                                                         null,
+                                                                         "",
+                                                                         null );
+
+      Assert.assertEquals( 1,
+                           files.size() );
+   }
+
+   @Test
+   public void testComputeFilesListWithoutSource()
+   {
+      try
+      {
+         FileUtils.computeFilesList( null,
+                                     null,
+                                     "",
+                                     null );
+         Assert.fail();
+      }
+      catch ( final PMDException e )
+      {
+         Assert.assertEquals( "sourceDirectory is not specified",
+                              e.getMessage() );
+      }
+   }
+
+   @Test
+   public void testComputeFilesListWithSourceFile() throws PMDException
+   {
+      final Map< String, IFlexFile > files = FileUtils.computeFilesList( new File( getTestFiles().get( "AbstractRowData.as" )
+                                                                                                 .getFilePath() ),
+                                                                         null,
+                                                                         "",
+                                                                         null );
+
+      Assert.assertEquals( 1,
+                           files.size() );
+   }
+
+   @Test
+   public void testComputeFilesListWithSourceList() throws PMDException
+   {
+      final List< File > sourceList = new ArrayList< File >();
+
+      sourceList.add( getTestDirectory() );
+      final Map< String, IFlexFile > files = FileUtils.computeFilesList( null,
+                                                                         sourceList,
+                                                                         "",
+                                                                         null );
+
+      Assert.assertEquals( 98,
+                           files.size() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/FlexFileFactoryTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/FlexFileFactoryTest.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/FlexFileFactoryTest.java
new file mode 100644
index 0000000..842f3e6
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/FlexFileFactoryTest.java
@@ -0,0 +1,63 @@
+/*
+ * 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.files.impl;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.IAs3File;
+import com.adobe.ac.pmd.files.IFlexFile;
+import com.adobe.ac.pmd.files.IMxmlFile;
+
+public class FlexFileFactoryTest extends FlexPmdTestBase
+{
+   @Test
+   public void testCreate()
+   {
+      assertTrue( "",
+                  create( new File( getTestFiles().get( "AbstractRowData.as" ).getFilePath() ),
+                          new File( "" ) ) instanceof IAs3File );
+      assertTrue( "",
+                  create( new File( getTestFiles().get( "Main.mxml" ).getFilePath() ),
+                          new File( "" ) ) instanceof IMxmlFile );
+      assertTrue( "",
+                  create( new File( getTestFiles().get( "com.adobe.ac.ncss.mxml.IterationsList.mxml" )
+                                                  .getFilePath() ),
+                          new File( "" ) ) instanceof IMxmlFile );
+   }
+
+   private IFlexFile create( final File sourceFile,
+                             final File sourceDirectory )
+   {
+      IFlexFile file;
+
+      if ( sourceFile.getName().endsWith( ".as" ) )
+      {
+         file = new As3File( sourceFile, sourceDirectory );
+      }
+      else
+      {
+         file = new MxmlFile( sourceFile, sourceDirectory );
+      }
+
+      return file;
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/MxmlFileTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/MxmlFileTest.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/MxmlFileTest.java
new file mode 100644
index 0000000..e51bc29
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/files/impl/MxmlFileTest.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.files.impl;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdTestBase;
+import com.adobe.ac.pmd.files.IMxmlFile;
+
+public class MxmlFileTest extends FlexPmdTestBase
+{
+   private IMxmlFile data;
+
+   @Before
+   public void setUp()
+   {
+      data = ( IMxmlFile ) getTestFiles().get( "Main.mxml" );
+   }
+
+   @Test
+   public void testGetActualScriptBlock()
+   {
+      assertEquals( Integer.valueOf( 4 ),
+                    Integer.valueOf( data.getActualScriptBlock().length ) );
+   }
+
+   @Test
+   public void testGetSingleLineComment()
+   {
+      assertEquals( "<!--",
+                    data.getSingleLineComment() );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/net/sourceforge/pmd/PMDExceptionTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/net/sourceforge/pmd/PMDExceptionTest.java b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/net/sourceforge/pmd/PMDExceptionTest.java
new file mode 100644
index 0000000..550d982
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/net/sourceforge/pmd/PMDExceptionTest.java
@@ -0,0 +1,61 @@
+/*
+ * 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 net.sourceforge.pmd;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class PMDExceptionTest
+{
+   @SuppressWarnings("deprecation")
+   @Test
+   public void testGetReason()
+   {
+      final Exception reason = new Exception();
+      final PMDException exception = new PMDException( "message", reason );
+
+      assertEquals( reason,
+                    exception.getReason() );
+   }
+
+   @Test
+   public void testPMDExceptionString()
+   {
+      assertEquals( "message",
+                    new PMDException( "message" ).getMessage() );
+   }
+
+   @Test
+   public void testPMDExceptionStringException()
+   {
+      final PMDException exception = new PMDException( "message", new Exception() );
+
+      assertEquals( "message",
+                    exception.getMessage() );
+   }
+
+   @Test
+   public void testSetSeverity()
+   {
+      final PMDException exception = new PMDException( "message" );
+
+      exception.setSeverity( 1 );
+      assertEquals( Integer.valueOf( 1 ),
+                    Integer.valueOf( exception.getSeverity() ) );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/pom.xml b/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/pom.xml
new file mode 100644
index 0000000..049ef0c
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/pom.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>flex-pmd-java</artifactId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flex-pmd-maven-plugin</artifactId>
+    <packaging>maven-plugin</packaging>
+
+    <name>Adobe Flex PMD Maven plugin</name>
+
+    <build>
+        <testResources>
+            <testResource>
+                <directory>${project.build.directory}/test/generated-resources</directory>
+            </testResource>
+            <testResource>
+                <directory>src/test/resources</directory>
+            </testResource>
+        </testResources>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-test-resources</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeGroupIds>${project.groupId}</includeGroupIds>
+                            <includes>**/*.as,**/*.mxml</includes>
+                            <outputDirectory>${project.build.directory}/test/generated-resources</outputDirectory>
+                            <excludeTransitive>true</excludeTransitive>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-test-resources</artifactId>
+            <version>${project.parent.version}</version>
+            <type>zip</type>
+            <classifier>resources</classifier>
+            <scope>provided</scope>
+            <optional>false</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+            <version>${maven-plugin-api.version}</version>
+            <type>jar</type>
+            <optional>false</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.reporting</groupId>
+            <artifactId>maven-reporting-impl</artifactId>
+            <version>${maven-reporting-impl.version}</version>
+            <type>jar</type>
+            <optional>false</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-pmd-plugin</artifactId>
+            <version>${maven-pmd-plugin.version}</version>
+            <type>maven-plugin</type>
+            <optional>false</optional>
+        </dependency>
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-core</artifactId>
+            <version>${project.parent.version}</version>
+            <type>jar</type>
+            <optional>false</optional>
+        </dependency>
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>flex-pmd-ruleset</artifactId>
+            <version>${project.parent.version}</version>
+            <type>jar</type>
+            <optional>false</optional>
+        </dependency>
+    </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/main/java/com/adobe/ac/pmd/maven/AbstractFlexPmdMojo.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/main/java/com/adobe/ac/pmd/maven/AbstractFlexPmdMojo.java b/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/main/java/com/adobe/ac/pmd/maven/AbstractFlexPmdMojo.java
new file mode 100644
index 0000000..df314e1
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/main/java/com/adobe/ac/pmd/maven/AbstractFlexPmdMojo.java
@@ -0,0 +1,362 @@
+/*
+ * 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.maven;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URL;
+import java.util.Locale;
+import java.util.ResourceBundle;
+import java.util.logging.Logger;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.reporting.AbstractMavenReport;
+import org.apache.maven.reporting.MavenReportException;
+import org.codehaus.doxia.site.renderer.SiteRenderer;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+import com.adobe.ac.pmd.FlexPmdParameters;
+import com.adobe.ac.pmd.FlexPmdViolations;
+import com.adobe.ac.pmd.LoggerUtils;
+import com.adobe.ac.pmd.engines.AbstractFlexPmdEngine;
+import com.adobe.ac.pmd.engines.FlexPmdXmlEngine;
+import com.adobe.ac.pmd.engines.PmdEngineUtils;
+
+abstract class AbstractFlexPmdMojo extends AbstractMavenReport
+{
+   protected static final Logger LOGGER      = Logger.getLogger( AbstractFlexPmdMojo.class.getName() );
+
+   private static final String   OUTPUT_NAME = "flexpmd";
+
+   protected static ResourceBundle getBundle( final Locale locale )
+   {
+      return ResourceBundle.getBundle( "flexPmd",
+                                       locale,
+                                       FlexPmdReportMojo.class.getClassLoader() ); // NOPMD
+   }
+
+   /**
+    * Location of the file.
+    * 
+    * @parameter expression="${flexpmd.excludePackage}"
+    */
+   private String       excludePackage = "";
+
+   /**
+    * Build fails if an violation error occurs.
+    * 
+    * @parameter expression="${flexpmd.failOnError}"
+    */
+   private boolean      failOnError;
+
+   /**
+    * Build fails if an violation error occurs.
+    * 
+    * @parameter expression="${flexpmd.failOnRuleViolation}"
+    */
+   private boolean      failOnRuleViolation;
+
+   /**
+    * Location of the file.
+    * 
+    * @parameter expression="${project.build.directory}"
+    * @required
+    */
+   private File         outputDirectory;
+
+   /**
+    * @parameter expression="${project}"
+    * @required
+    * @readonly
+    */
+   private MavenProject project;
+
+   /**
+    * Location of the file.
+    * 
+    * @parameter expression="${flexpmd.ruleset}"
+    */
+   private File         ruleSet;
+
+   /**
+    * @parameter 
+    *            expression="${component.org.codehaus.doxia.site.renderer.SiteRenderer}"
+    * @required
+    * @readonly
+    */
+   private SiteRenderer siteRenderer;
+
+   /**
+    * Specifies the location of the source files to be used.
+    * 
+    * @parameter expression="${project.build.sourceDirectory}"
+    * @required
+    */
+   private File         sourceDirectory;
+
+   /**
+    * URL of the file
+    * 
+    * @parameter expression="${flexpmd.url}"
+    */
+   private URL          url;
+
+   public AbstractFlexPmdMojo()
+   {
+      super();
+      excludePackage = "";
+   }
+
+   public AbstractFlexPmdMojo( final MavenProject projectToBeSet,
+                               final FlexPmdParameters parameters )
+   {
+      this();
+
+      project = projectToBeSet;
+      outputDirectory = parameters.getOutputDirectory();
+      ruleSet = parameters.getRuleSet();
+      sourceDirectory = parameters.getSource();
+      failOnError = parameters.isFailOnError();
+      failOnRuleViolation = parameters.isFailOnRuleViolation();
+      excludePackage = parameters.getExcludePackage();
+   }
+
+   public final String getDescription( final Locale locale )
+   {
+      return getBundle( locale ).getString( "report.flexPmd.description" );
+   }
+
+   public final String getName( final Locale locale )
+   {
+      return getBundle( locale ).getString( "report.flexPmd.name" );
+   }
+
+   public final String getOutputName()
+   {
+      return OUTPUT_NAME;
+   }
+
+   @Override
+   protected final void executeReport( final Locale locale ) throws MavenReportException
+   {
+      new LoggerUtils().loadConfiguration();
+      getLog().info( "FlexPmdMojo starts" );
+      getLog().info( "   failOnError     "
+            + failOnError );
+      getLog().info( "   ruleSet         "
+            + ruleSet );
+      getLog().info( "   sourceDirectory "
+            + sourceDirectory );
+      getLog().info( "   ruleSetURL      "
+            + url );
+      try
+      {
+         final AbstractFlexPmdEngine engine = new FlexPmdXmlEngine( new FlexPmdParameters( excludePackage,
+                                                                                           failOnError,
+                                                                                           failOnRuleViolation,
+                                                                                           outputDirectory,
+                                                                                           getRuleSet(),
+                                                                                           sourceDirectory ) );
+         final FlexPmdViolations violations = new FlexPmdViolations();
+         engine.executeReport( violations );
+
+         onXmlReportExecuted( violations,
+                              locale );
+      }
+      catch ( final Exception e )
+      {
+         throw new MavenReportException( "A system exception has been thrown", e );
+      }
+   }
+
+   protected final String getExcludePackage()
+   {
+      return excludePackage;
+   }
+
+   @Override
+   protected final String getOutputDirectory()
+   {
+      return outputDirectory.getAbsolutePath();
+   }
+
+   protected final File getOutputDirectoryFile()
+   {
+      return outputDirectory;
+   }
+
+   @Override
+   protected final MavenProject getProject()
+   {
+      return project;
+   }
+
+   protected final File getRuleSet()
+   {
+      if ( ruleSet == null )
+      {
+         try
+         {
+            getRulesetFromURL();
+         }
+         catch ( final IOException ioe )
+         {
+            throw new RuntimeException( "Could not get ruleset from URL", ioe );
+         }
+         catch ( final Exception e )
+         {
+            // if this goes wrong, we're experiencing an unrecoverable
+            // error, so we'll fall back on the default rules
+         }
+      }
+      return ruleSet;
+   }
+
+   @Override
+   protected final SiteRenderer getSiteRenderer()
+   {
+      return siteRenderer;
+   }
+
+   protected final File getSourceDirectory()
+   {
+      return sourceDirectory;
+   }
+
+   protected void onXmlReportExecuted( final FlexPmdViolations violations,
+                                       final Locale locale ) throws MavenReportException
+   {
+      if ( failOnError )
+      {
+         final String message = PmdEngineUtils.findFirstViolationError( violations );
+
+         if ( message.length() > 0 )
+         {
+            throw new MavenReportException( message );
+         }
+      }
+      if ( failOnRuleViolation
+            && !violations.getViolations().isEmpty() )
+      {
+         throw new MavenReportException( "At least one violation has been found" );
+      }
+   }
+
+   protected final void setSiteRenderer( final SiteRenderer siteRendererToBeSet ) // NO_UCD
+   {
+      this.siteRenderer = siteRendererToBeSet;
+   }
+
+   /**
+    * @throws ParserConfigurationException
+    * @throws SAXException
+    * @throws SAXException
+    * @throws TransformerException
+    * @throws TransformerFactoryConfigurationError
+    * @throws IOException
+    */
+   private void getRulesetFromURL() throws ParserConfigurationException,
+                                   SAXException,
+                                   TransformerFactoryConfigurationError,
+                                   TransformerException,
+                                   IOException
+   {
+      getLog().info( "getting RuleSet from URL" );
+      if ( url == null )
+      {
+         getLog().info( "Ruleset URL is not set" );
+         return;
+      }
+      ruleSet = File.createTempFile( "pmdRuleset",
+                                     "" );
+
+      final DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+
+      try
+      {
+         final Document pmdRules = db.parse( url.toExternalForm() );
+         writeToFile( pmdRules,
+                      ruleSet );
+      }
+      catch ( final SAXException sax )
+      {
+         saveUTF8SafeXML();
+      }
+   }
+
+   private void saveUTF8SafeXML() throws IOException,
+                                 FileNotFoundException
+   {
+      final InputStream inputstream = url.openStream();
+      final OutputStream outputstream = new FileOutputStream( ruleSet );
+      int thisByteAsInt;
+      while ( ( thisByteAsInt = inputstream.read() ) != -1 )
+      {
+         outputstream.write( stripNonValidXMLCharacters( ( byte ) thisByteAsInt ) );
+
+      }
+      inputstream.close();
+      outputstream.flush();
+      outputstream.close();
+   }
+
+   private byte stripNonValidXMLCharacters( final byte in )
+   {
+      byte current; // Used to reference the current character.
+
+      current = in;
+      if ( current == 0x9
+            || current == 0xA || current == 0xD || current >= 0x20 && current <= 0xD7FF || current >= 0xE000
+            && current <= 0xFFFD || current >= 0x10000 && current <= 0x10FFFF )
+      {
+         return current;
+      }
+      return '\n';
+   }
+
+   private void writeToFile( final Document pmdRules,
+                             final File ruleSet ) throws TransformerFactoryConfigurationError,
+                                                 IOException,
+                                                 TransformerException
+   {
+      final Transformer transformer = TransformerFactory.newInstance().newTransformer();
+      transformer.setOutputProperty( OutputKeys.INDENT,
+                                     "yes" );
+      final StreamResult result = new StreamResult( new FileWriter( ruleSet ) );
+      final DOMSource source = new DOMSource( pmdRules );
+      transformer.transform( source,
+                             result );
+
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/main/java/com/adobe/ac/pmd/maven/FlexPmdHtmlEngine.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/main/java/com/adobe/ac/pmd/maven/FlexPmdHtmlEngine.java b/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/main/java/com/adobe/ac/pmd/maven/FlexPmdHtmlEngine.java
new file mode 100644
index 0000000..33715fa
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/main/java/com/adobe/ac/pmd/maven/FlexPmdHtmlEngine.java
@@ -0,0 +1,125 @@
+/*
+ * 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.maven;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.List;
+import java.util.ResourceBundle;
+
+import net.sourceforge.pmd.PMDException;
+import net.sourceforge.pmd.Report;
+import net.sourceforge.pmd.RuleContext;
+import net.sourceforge.pmd.renderers.HTMLRenderer;
+
+import org.apache.maven.plugin.pmd.PmdFileInfo;
+import org.apache.maven.plugin.pmd.PmdReportListener;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.doxia.sink.Sink;
+
+import com.adobe.ac.pmd.FlexPmdParameters;
+import com.adobe.ac.pmd.FlexPmdViolations;
+import com.adobe.ac.pmd.IFlexViolation;
+import com.adobe.ac.pmd.engines.AbstractFlexPmdEngine;
+import com.adobe.ac.pmd.engines.FlexPMDFormat;
+import com.adobe.ac.pmd.files.IFlexFile;
+
+class FlexPmdHtmlEngine extends AbstractFlexPmdEngine
+{
+   private final boolean        aggregate;
+   private final ResourceBundle bundle;
+   private final MavenProject   project;
+   private final Sink           sink;
+
+   protected FlexPmdHtmlEngine( final Sink sinkToBeSet,
+                                final ResourceBundle bundleToBeSet,
+                                final boolean aggregateToBeSet,
+                                final MavenProject projectToBeSet,
+                                final FlexPmdParameters parameters )
+   {
+      super( parameters );
+
+      sink = sinkToBeSet;
+      bundle = bundleToBeSet;
+      aggregate = aggregateToBeSet;
+      project = projectToBeSet;
+   }
+
+   @Override
+   protected final void writeReport( final FlexPmdViolations pmd ) throws PMDException
+   {
+      writeReport( getOutputDirectory(),
+                   computeReport( pmd ) );
+   }
+
+   private Report computeReport( final FlexPmdViolations pmd )
+   {
+      final Report report = new Report();
+      final RuleContext ruleContext = new RuleContext();
+      final PmdReportListener reportSink = new PmdReportListener( sink, bundle, aggregate );
+
+      report.addListener( reportSink );
+      ruleContext.setReport( report );
+      reportSink.beginDocument();
+      report.start();
+
+      for ( final IFlexFile file : pmd.getViolations().keySet() )
+      {
+         final File javaFile = new File( file.getFilePath() ); // NOPMD
+         final List< IFlexViolation > violations = pmd.getViolations().get( file );
+
+         reportSink.beginFile( javaFile,
+                               new PmdFileInfo( project, javaFile.getParentFile(), "" ) ); // NOPMD
+         ruleContext.setSourceCodeFilename( file.getPackageName()
+               + "." + file.getClassName() );
+
+         for ( final IFlexViolation violation : violations )
+         {
+            report.addRuleViolation( violation );
+            reportSink.ruleViolationAdded( violation );
+         }
+         reportSink.endFile( javaFile );
+      }
+
+      reportSink.endDocument();
+      report.end();
+
+      return report;
+   }
+
+   private void writeReport( final File outputDirectory,
+                             final Report report ) throws PMDException
+   {
+      final HTMLRenderer renderer = new HTMLRenderer( "", "" );
+
+      try
+      {
+         final FileWriter fileWriter = new FileWriter( new File( outputDirectory.getAbsolutePath()
+               + "/" + FlexPMDFormat.HTML.toString() ) );
+
+         renderer.render( fileWriter,
+                          report );
+         renderer.getWriter().flush();
+         fileWriter.close();
+      }
+      catch ( final IOException e )
+      {
+         throw new PMDException( "unable to write the HTML report", e );
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/main/java/com/adobe/ac/pmd/maven/FlexPmdMojo.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/main/java/com/adobe/ac/pmd/maven/FlexPmdMojo.java b/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/main/java/com/adobe/ac/pmd/maven/FlexPmdMojo.java
new file mode 100644
index 0000000..f428eba
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/main/java/com/adobe/ac/pmd/maven/FlexPmdMojo.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.maven;
+
+import org.apache.maven.project.MavenProject;
+
+import com.adobe.ac.pmd.FlexPmdParameters;
+
+/**
+ * @goal check
+ * @phase verify
+ * @execute goal="report"
+ */
+public class FlexPmdMojo extends AbstractFlexPmdMojo // NO_UCD
+{
+   public FlexPmdMojo()
+   {
+      super();
+   }
+
+   public FlexPmdMojo( final MavenProject projectToBeSet,
+                       final FlexPmdParameters parameters )
+   {
+      super( projectToBeSet, parameters );
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/main/java/com/adobe/ac/pmd/maven/FlexPmdReportMojo.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/main/java/com/adobe/ac/pmd/maven/FlexPmdReportMojo.java b/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/main/java/com/adobe/ac/pmd/maven/FlexPmdReportMojo.java
new file mode 100644
index 0000000..dabed45
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/main/java/com/adobe/ac/pmd/maven/FlexPmdReportMojo.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.maven;
+
+import java.util.Locale;
+
+import net.sourceforge.pmd.PMDException;
+
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.reporting.MavenReportException;
+
+import com.adobe.ac.pmd.FlexPmdParameters;
+import com.adobe.ac.pmd.FlexPmdViolations;
+
+/**
+ * @author xagnetti
+ * @goal report
+ * @phase site
+ */
+public class FlexPmdReportMojo extends AbstractFlexPmdMojo
+{
+   /**
+    * Specifies the location of the source files to be used.
+    * 
+    * @parameter default-value="false"
+    * @required
+    * @readonly
+    */
+   private boolean aggregate;
+
+   public FlexPmdReportMojo()
+   {
+      super();
+   }
+
+   public FlexPmdReportMojo( final MavenProject projectToBeSet,
+                             final FlexPmdParameters parameters )
+   {
+      super( projectToBeSet, parameters );
+   }
+
+   @Override
+   protected void onXmlReportExecuted( final FlexPmdViolations violations,
+                                       final Locale locale ) throws MavenReportException
+   {
+      super.onXmlReportExecuted( violations,
+                                 locale );
+
+      final FlexPmdParameters parameters = new FlexPmdParameters( getExcludePackage(),
+                                                                  getOutputDirectoryFile(),
+                                                                  getRuleSet(),
+                                                                  getSourceDirectory() );
+      final FlexPmdHtmlEngine flexPmdHtmlEngine = new FlexPmdHtmlEngine( getSink(),
+                                                                         getBundle( locale ),
+                                                                         aggregate,
+                                                                         getProject(),
+                                                                         parameters );
+
+      try
+      {
+         flexPmdHtmlEngine.executeReport( violations );
+      }
+      catch ( final PMDException e )
+      {
+         throw new MavenReportException( "An exception has been thrown while executing the HTML report", e );
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/test/java/com/adobe/ac/pmd/maven/FlexPmdMojoTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/test/java/com/adobe/ac/pmd/maven/FlexPmdMojoTest.java b/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/test/java/com/adobe/ac/pmd/maven/FlexPmdMojoTest.java
new file mode 100644
index 0000000..39ff497
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/test/java/com/adobe/ac/pmd/maven/FlexPmdMojoTest.java
@@ -0,0 +1,97 @@
+/*
+ * 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.maven;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.net.URL;
+import java.util.Locale;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.codehaus.doxia.site.renderer.DefaultSiteRenderer;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdParameters;
+import com.adobe.ac.pmd.FlexPmdTestBase;
+
+public class FlexPmdMojoTest extends FlexPmdTestBase
+{
+   @Test
+   public void testExecuteReport()
+   {
+      executeReport( false,
+                     null );
+   }
+
+   @Test
+   public void testExecuteReportFailOnError()
+   {
+      executeReport( true,
+                     null );
+   }
+
+   @Test
+   public void testExecuteReportWithCustomRuleset()
+   {
+      final URL resource = this.getClass().getResource( "/rulesets/broken_pmd.xml" );
+      executeReport( true,
+                     new File( resource.getFile() ) );
+   }
+
+   private void executeReport( final boolean failOnError,
+                               final File ruleset )
+   {
+      final File outputDirectoryToBeSet = new File( "target/pmd" );
+
+      outputDirectoryToBeSet.mkdirs();
+
+      final FlexPmdMojo mojo = new FlexPmdMojo( new MavenProjectStub(),
+                                                new FlexPmdParameters( "",
+                                                                       failOnError,
+                                                                       false,
+                                                                       outputDirectoryToBeSet,
+                                                                       ruleset,
+                                                                       getTestDirectory() ) );
+
+      mojo.setSiteRenderer( new DefaultSiteRenderer() );
+      assertNotNull( "",
+                     mojo.getName( Locale.ENGLISH ) );
+
+      try
+      {
+         mojo.execute();
+         if ( failOnError )
+         {
+            fail( "One expection should have been thrown" );
+         }
+      }
+      catch ( final MojoExecutionException e )
+      {
+         if ( !failOnError )
+         {
+            fail( "No expections should have been thrown" );
+         }
+      }
+      finally
+      {
+         new File( "target/pmd.xml" ).delete();
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/test/java/com/adobe/ac/pmd/maven/FlexPmdReportMojoTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/test/java/com/adobe/ac/pmd/maven/FlexPmdReportMojoTest.java b/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/test/java/com/adobe/ac/pmd/maven/FlexPmdReportMojoTest.java
new file mode 100644
index 0000000..54767cf
--- /dev/null
+++ b/FlexPMD/flex-pmd-java/flex-pmd-maven-plugin/src/test/java/com/adobe/ac/pmd/maven/FlexPmdReportMojoTest.java
@@ -0,0 +1,86 @@
+/*
+ * 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.maven;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.codehaus.doxia.site.renderer.DefaultSiteRenderer;
+import org.junit.Test;
+
+import com.adobe.ac.pmd.FlexPmdParameters;
+import com.adobe.ac.pmd.FlexPmdTestBase;
+
+public class FlexPmdReportMojoTest extends FlexPmdTestBase
+{
+   @Test
+   public void testExecuteReport() throws MojoExecutionException
+   {
+      new File( "target/site" ).mkdirs();
+      final FlexPmdReportMojo mojo = new FlexPmdReportMojo( new MavenProjectStub(),
+                                                            new FlexPmdParameters( "",
+                                                                                   false,
+                                                                                   false,
+                                                                                   new File( "target" ),
+                                                                                   null,
+                                                                                   getTestDirectory() ) );
+
+      mojo.setSiteRenderer( new DefaultSiteRenderer() );
+      assertNotNull( "",
+                     mojo.getName( Locale.ENGLISH ) );
+
+      mojo.execute();
+   }
+
+   @Test
+   public void testExecuteReportOnNoViolationsSourcePath() throws MojoExecutionException
+   {
+      new File( "target/site" ).mkdirs();
+      final FlexPmdReportMojo mojo = new FlexPmdReportMojo( new MavenProjectStub(),
+                                                            new FlexPmdParameters( "",
+                                                                                   false,
+                                                                                   false,
+                                                                                   new File( "target" ),
+                                                                                   null,
+                                                                                   new File( getTestDirectory().getAbsoluteFile()
+                                                                                         + "/fu" ) ) );
+
+      mojo.setSiteRenderer( new DefaultSiteRenderer() );
+      assertNotNull( "",
+                     mojo.getName( Locale.ENGLISH ) );
+
+      mojo.execute();
+   }
+
+   @Test
+   public void testGetBundle()
+   {
+      final Locale[] availableLocales = Locale.getAvailableLocales();
+      final ResourceBundle bundle = AbstractFlexPmdMojo.getBundle( availableLocales[ 0 ] );
+      final ResourceBundle englishBundle = AbstractFlexPmdMojo.getBundle( Locale.ENGLISH );
+
+      assertNotNull( "",
+                     bundle );
+      assertNotNull( "",
+                     englishBundle );
+   }
+}


[50/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

Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/.pmd b/FlexPMD/.pmd
new file mode 100644
index 0000000..791de4a
--- /dev/null
+++ b/FlexPMD/.pmd
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+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.
+
+-->
+<pmd>
+    <useProjectRuleSet>false</useProjectRuleSet>
+    <ruleSetFile>./pmd.xml</ruleSetFile>
+    <includeDerivedFiles>false</includeDerivedFiles>
+    <violationsAsErrors>true</violationsAsErrors>
+</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser-api/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser-api/.pmd b/FlexPMD/as3-parser-api/.pmd
deleted file mode 100644
index b5c19d9..0000000
--- a/FlexPMD/as3-parser-api/.pmd
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-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.
-
--->
-<pmd>
-    <useProjectRuleSet>false</useProjectRuleSet>
-    <ruleSetFile>../flex-pmd-parent/pmd.xml</ruleSetFile>
-    <includeDerivedFiles>false</includeDerivedFiles>
-    <violationsAsErrors>true</violationsAsErrors>
-</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser-api/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser-api/pom.xml b/FlexPMD/as3-parser-api/pom.xml
deleted file mode 100644
index a302c53..0000000
--- a/FlexPMD/as3-parser-api/pom.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--
-
-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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>com.adobe.ac</groupId>
-  <artifactId>as3-parser-api</artifactId>
-  <name>As3 Parser API</name>
-
-  <parent>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-java-parent</artifactId>
-	<version>1.3-SNAPSHOT</version>
-	<relativePath>../flex-pmd-java-parent/pom.xml</relativePath>
-  </parent>
-  
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/IAS3Parser.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/IAS3Parser.java b/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/IAS3Parser.java
deleted file mode 100644
index 5d30939..0000000
--- a/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/IAS3Parser.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.parser;
-
-import java.io.IOException;
-
-import com.adobe.ac.pmd.parser.exceptions.TokenException;
-
-/**
- * @author xagnetti
- */
-public interface IAS3Parser
-{
-   /**
-    * @param filePath
-    * @return
-    * @throws IOException
-    * @throws TokenException
-    */
-   IParserNode buildAst( final String filePath ) throws IOException,
-                                                TokenException;
-
-   /**
-    * @param filePath
-    * @param scriptBlockLines
-    * @return
-    * @throws IOException
-    * @throws TokenException
-    */
-   IParserNode buildAst( final String filePath,
-                         final String[] scriptBlockLines ) throws IOException,
-                                                          TokenException;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/IParserNode.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/IParserNode.java b/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/IParserNode.java
deleted file mode 100644
index 91d8506..0000000
--- a/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/IParserNode.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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.parser;
-
-import java.util.List;
-
-/**
- * @author xagnetti
- */
-public interface IParserNode
-{
-   /**
-    * @return the cyclomatic complexity of the current node
-    */
-   int computeCyclomaticComplexity();
-
-   /**
-    * @param type
-    * @return count recursivly the number of children which are of type "type"
-    */
-   int countNodeFromType( final NodeKind type );
-
-   /**
-    * @param names
-    * @return the list of IParserNode which names is contained in the given
-    *         names array
-    */
-   List< IParserNode > findPrimaryStatementsFromNameInChildren( final String[] names );
-
-   /**
-    * @param index
-    * @return the indexth child
-    */
-   IParserNode getChild( final int index );
-
-   /**
-    * @return the entire list of chilren
-    */
-   List< IParserNode > getChildren();
-
-   /**
-    * @return node's column
-    */
-   int getColumn();
-
-   /**
-    * @return node's type
-    */
-   NodeKind getId();
-
-   /**
-    * @return the node's last child
-    */
-   IParserNode getLastChild();
-
-   /**
-    * @return nodes's line
-    */
-   int getLine();
-
-   /**
-    * @return node's string value
-    */
-   String getStringValue();
-
-   /**
-    * @param expectedType
-    * @return true if the node's type is identical to the given name
-    */
-   boolean is( final NodeKind expectedType ); // NOPMD
-
-   /**
-    * @return the children number
-    */
-   int numChildren();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/KeyWords.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/KeyWords.java b/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/KeyWords.java
deleted file mode 100644
index 5a60a18..0000000
--- a/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/KeyWords.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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.parser;
-
-/**
- * @author xagnetti
- */
-public enum KeyWords
-{
-   AS("as"),
-   CASE("case"),
-   CATCH("catch"),
-   CLASS("class"),
-   CONST("const"),
-   DEFAULT("default"),
-   DELETE("delete"),
-   DO("do"),
-   DYNAMIC("dynamic"),
-   EACH("each"),
-   ELSE("else"),
-   EOF("__END__"),
-   EXTENDS("extends"),
-   FINAL("final"),
-   FINALLY("finally"),
-   FOR("for"),
-   FUNCTION("function"),
-   GET("get"),
-   IF("if"),
-   IMPLEMENTS("implements"),
-   IMPORT("import"),
-   IN("in"),
-   INCLUDE("include"),
-   INCLUDE_AS2("#include"),
-   INSTANCE_OF("instanceof"),
-   INTERFACE("interface"),
-   INTERNAL("internal"),
-   INTRINSIC("intrinsic"),
-   IS("is"),
-   NAMESPACE("namespace"),
-   NEW("new"),
-   OVERRIDE("override"),
-   PACKAGE("package"),
-   PRIVATE("private"),
-   PROTECTED("protected"),
-   PUBLIC("public"),
-   RETURN("return"),
-   SET("set"),
-   STATIC("static"),
-   SUPER("super"),
-   SWITCH("switch"),
-   TRY("try"),
-   TYPEOF("typeof"),
-   USE("use"),
-   VAR("var"),
-   VOID("void"),
-   WHILE("while");
-
-   private final String name;
-
-   private KeyWords( final String nameToBeSet )
-   {
-      name = nameToBeSet;
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see java.lang.Enum#toString()
-    */
-   @Override
-   public String toString()
-   {
-      return name;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/NodeKind.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/NodeKind.java b/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/NodeKind.java
deleted file mode 100644
index 0259068..0000000
--- a/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/NodeKind.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * 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.parser;
-
-/**
- * @author xagnetti
- */
-public enum NodeKind
-{
-   ADD("add"),
-   AND("and"),
-   ARGUMENTS("arguments"),
-   ARRAY("array"),
-   ARRAY_ACCESSOR("arr-acc"),
-   AS("as"),
-   AS_DOC("as-doc"),
-   ASSIGN("assign"),
-   B_AND("b-and"),
-   B_NOT("b-not"),
-   B_OR("b-or"),
-   B_XOR("b-xor"),
-   BLOCK("block"),
-   CALL("call"),
-   CASE("case"),
-   CASES("cases"),
-   CATCH("catch"),
-   CLASS("class"),
-   COMPILATION_UNIT("compilation-unit"),
-   COND("cond"),
-   CONDITION("condition"),
-   CONDITIONAL("conditional"),
-   CONST("const"),
-   CONST_LIST("const-list"),
-   CONTENT("content"),
-   DEFAULT("default"),
-   DELETE("delete"),
-   DO("do"),
-   DOT("dot"),
-   E4X_ATTR("e4x-attr"),
-   E4X_FILTER("e4x-filter"),
-   E4X_STAR("e4x-star"),
-   ENCAPSULATED("encapsulated"),
-   EQUALITY("equality"),
-   EXPR_LIST("expr-list"),
-   EXTENDS("extends"),
-   FINALLY("finally"),
-   FOR("for"),
-   FOREACH("foreach"),
-   FORIN("forin"),
-   FUNCTION("function"),
-   GET("get"),
-   IF("if"),
-   IMPLEMENTS("implements"),
-   IMPLEMENTS_LIST("implements-list"),
-   IMPORT("import"),
-   IN("in"),
-   INCLUDE("include"),
-   INIT("init"),
-   INTERFACE("interface"),
-   ITER("iter"),
-   LAMBDA("lambda"),
-   LEFT_CURLY_BRACKET("{"),
-   META("meta"),
-   META_LIST("meta-list"),
-   MINUS("minus"),
-   MOD_LIST("mod-list"),
-   MODIFIER("mod"),
-   MULTI_LINE_COMMENT("multi-line-comment"),
-   MULTIPLICATION("mul"),
-   NAME("name"),
-   NAME_TYPE_INIT("name-type-init"),
-   NEW("new"),
-   NOT("not"),
-   OBJECT("object"),
-   OP("op"),
-   OR("or"),
-   PACKAGE("package"),
-   PARAMETER("parameter"),
-   PARAMETER_LIST("parameter-list"),
-   PLUS("plus"),
-   POST_DEC("post-dec"),
-   POST_INC("post-inc"),
-   PRE_DEC("pre-dec"),
-   PRE_INC("pre-inc"),
-   PRIMARY("primary"),
-   PROP("prop"),
-   RELATION("relation"),
-   REST("rest"),
-   RETURN("return"),
-   SET("set"),
-   SHIFT("shift"),
-   STAR("star"),
-   STMT_EMPTY("stmt-empty"),
-   SWITCH("switch"),
-   SWITCH_BLOCK("switch-block"),
-   TRY("try"),
-   TYPE("type"),
-   TYPEOF("typeof"),
-   USE("use"),
-   VALUE("value"),
-   VAR("var"),
-   VAR_LIST("var-list"),
-   VECTOR("vector"),
-   VOID("void"),
-   WHILE("while");
-
-   private String name;
-
-   private NodeKind( final String nameToBeSet )
-   {
-      name = nameToBeSet;
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see java.lang.Enum#toString()
-    */
-   @Override
-   public String toString()
-   {
-      return name;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/Operators.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/Operators.java b/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/Operators.java
deleted file mode 100644
index 1b379dc..0000000
--- a/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/Operators.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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.parser;
-
-/**
- * @author xagnetti
- */
-public enum Operators
-{
-   AND("&&"),
-   AND_AS2("and"),
-   AND_EQUAL("&="),
-   AT("@"),
-   B_AND("&"),
-   B_OR("|"),
-   B_XOR("^"),
-   COLUMN(":"),
-   COMMA(","),
-   DECREMENT("--"),
-   DIVIDED_EQUAL("/="),
-   DOT("."),
-   DOUBLE_COLUMN("::"),
-   DOUBLE_EQUAL("=="),
-   DOUBLE_EQUAL_AS2("eq"),
-   DOUBLE_QUOTE("\""),
-   DOUBLE_SHIFT_LEFT("<<"),
-   DOUBLE_SHIFT_RIGHT(">>"),
-   EQUAL("="),
-   INCREMENT("++"),
-   INFERIOR("<"),
-   INFERIOR_AS2("lt"),
-   INFERIOR_OR_EQUAL("<="),
-   INFERIOR_OR_EQUAL_AS2("le"),
-   LEFT_CURLY_BRACKET("{"),
-   LEFT_PARENTHESIS("("),
-   LEFT_SQUARE_BRACKET("["),
-   LOGICAL_OR("||"),
-   LOGICAL_OR_AS2("or"),
-   MINUS("-"),
-   MINUS_EQUAL("-="),
-   MODULO("%"),
-   MODULO_EQUAL("%="),
-   NON_EQUAL("!="),
-   NON_EQUAL_AS2_1("ne"),
-   NON_EQUAL_AS2_2("<>"),
-   NON_STRICTLY_EQUAL("!=="),
-   OR_EQUAL("|="),
-   PLUS("+"),
-   PLUS_AS2("add"),
-   PLUS_EQUAL("+="),
-   QUESTION_MARK("?"),
-   REST_PARAMETERS("..."),
-   RIGHT_CURLY_BRACKET("}"),
-   RIGHT_PARENTHESIS(")"),
-   RIGHT_SQUARE_BRACKET("]"),
-   SEMI_COLUMN(";"),
-   SIMPLE_QUOTE("'"),
-   SLASH("/"),
-   STRICTLY_EQUAL("==="),
-   SUPERIOR(">"),
-   SUPERIOR_AS2("gt"),
-   SUPERIOR_OR_EQUAL(">="),
-   SUPERIOR_OR_EQUAL_AS2("ge"),
-   TIMES("*"),
-   TIMES_EQUAL("*="),
-   TRIPLE_SHIFT_LEFT("<<<"),
-   TRIPLE_SHIFT_RIGHT(">>>"),
-   VECTOR_START(".<"),
-   XOR_EQUAL("^=");
-
-   private String symbol;
-
-   private Operators( final String symbolToBeSet )
-   {
-      symbol = symbolToBeSet;
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see java.lang.Enum#toString()
-    */
-   @Override
-   public String toString()
-   {
-      return symbol;
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/NullTokenException.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/NullTokenException.java b/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/NullTokenException.java
deleted file mode 100644
index 3ce539d..0000000
--- a/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/NullTokenException.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.parser.exceptions;
-
-/**
- * @author xagnetti
- */
-@SuppressWarnings("serial")
-public class NullTokenException extends TokenException
-{
-   /**
-    * @param fileName
-    */
-   public NullTokenException( final String fileName )
-   {
-      super( "null token in "
-            + fileName + "." );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/TokenException.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/TokenException.java b/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/TokenException.java
deleted file mode 100644
index 819216b..0000000
--- a/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/TokenException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.parser.exceptions;
-
-/**
- * @author xagnetti
- */
-@SuppressWarnings("serial")
-public class TokenException extends Exception
-{
-   /**
-    * @param message
-    */
-   protected TokenException( final String message )
-   {
-      super( message );
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/UnExpectedTokenException.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/UnExpectedTokenException.java b/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/UnExpectedTokenException.java
deleted file mode 100644
index 7a11432..0000000
--- a/FlexPMD/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/UnExpectedTokenException.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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.parser.exceptions;
-
-/**
- * @author xagnetti
- */
-@SuppressWarnings("serial")
-public class UnExpectedTokenException extends TokenException
-{
-   public static class Position
-   {
-      private final int column;
-      private final int line;
-
-      public Position( final int lineToBeSet,
-                       final int columnToBeSet )
-      {
-         super();
-         line = lineToBeSet;
-         column = columnToBeSet;
-      }
-   }
-
-   /**
-    * @param tokenText
-    * @param tokenPosition
-    * @param fileName
-    * @param expected
-    */
-   public UnExpectedTokenException( final String tokenText,
-                                    final Position tokenPosition,
-                                    final String fileName,
-                                    final String expected )
-   {
-      super( "Unexpected token: \""
-            + tokenText + "\" in file (" + fileName + ") at " + tokenPosition.line + ":"
-            + tokenPosition.column + ". Expecting \"" + expected + "\"" );
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/KeyWordsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/KeyWordsTest.java b/FlexPMD/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/KeyWordsTest.java
deleted file mode 100644
index 5ce85b0..0000000
--- a/FlexPMD/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/KeyWordsTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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.parser;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-
-public class KeyWordsTest
-{
-   @Test
-   public void testToString()
-   {
-      assertEquals( "as",
-                    KeyWords.AS.toString() );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/NodeKindTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/NodeKindTest.java b/FlexPMD/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/NodeKindTest.java
deleted file mode 100644
index 80f4fa7..0000000
--- a/FlexPMD/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/NodeKindTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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.parser;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-
-public class NodeKindTest
-{
-   @Test
-   public void testToString()
-   {
-      assertEquals( "add",
-                    NodeKind.ADD.toString() );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/OperatorsTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/OperatorsTest.java b/FlexPMD/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/OperatorsTest.java
deleted file mode 100644
index c395b9f..0000000
--- a/FlexPMD/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/OperatorsTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.parser;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-
-public class OperatorsTest
-{
-   @Test
-   public void testToString()
-   {
-      assertEquals( "&&",
-                    Operators.AND.toString() );
-      assertEquals( "and",
-                    Operators.AND_AS2.toString() );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/exceptions/FlexPmdExceptionTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/exceptions/FlexPmdExceptionTest.java b/FlexPMD/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/exceptions/FlexPmdExceptionTest.java
deleted file mode 100644
index d13def2..0000000
--- a/FlexPMD/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/exceptions/FlexPmdExceptionTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.parser.exceptions;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-
-import com.adobe.ac.pmd.parser.exceptions.UnExpectedTokenException.Position;
-
-public class FlexPmdExceptionTest
-{
-   private static final String MY_FILE_NAME = "myFileName";
-
-   @Test
-   public void testNullTokenException()
-   {
-      assertEquals( "null token in "
-                          + MY_FILE_NAME + ".",
-                    new NullTokenException( MY_FILE_NAME ).getMessage() );
-   }
-
-   @Test
-   public void testTokenException()
-   {
-      assertEquals( "myMessage",
-                    new TokenException( "myMessage" ).getMessage() );
-   }
-
-   @Test
-   public void testUnexpectedTokenException()
-   {
-      assertEquals( "Unexpected token: \"tokenText\" in file (myFileName) at 1:1. Expecting \"token\"",
-                    new UnExpectedTokenException( "tokenText", new Position( 1, 1 ), MY_FILE_NAME, "token" ).getMessage() );
-   }
-}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/.pmd
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/.pmd b/FlexPMD/as3-parser/.pmd
deleted file mode 100644
index b5c19d9..0000000
--- a/FlexPMD/as3-parser/.pmd
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-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.
-
--->
-<pmd>
-    <useProjectRuleSet>false</useProjectRuleSet>
-    <ruleSetFile>../flex-pmd-parent/pmd.xml</ruleSetFile>
-    <includeDerivedFiles>false</includeDerivedFiles>
-    <violationsAsErrors>true</violationsAsErrors>
-</pmd>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/as3-parser/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/as3-parser/pom.xml b/FlexPMD/as3-parser/pom.xml
deleted file mode 100644
index e2c6f5c..0000000
--- a/FlexPMD/as3-parser/pom.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<!--
-
-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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>com.adobe.ac</groupId>
-  <artifactId>as3-parser</artifactId>
-  <packaging>jar</packaging>
-  <name>As3 Parser</name>
-
-  <parent>
-	<groupId>com.adobe.ac</groupId>
-	<artifactId>flex-pmd-java-parent</artifactId>
-	<version>1.3-SNAPSHOT</version>
-	<relativePath>../flex-pmd-java-parent/pom.xml</relativePath>
-  </parent>
-  
-  <dependencies>
-      <dependency>
-         <groupId>${project.groupId}</groupId>
-         <version>${project.parent.version}</version>
-         <artifactId>${project.artifactId}-api</artifactId>
-      </dependency>
-      <dependency>
-         <groupId>${project.groupId}</groupId>
-         <version>${project.parent.version}</version>
-         <artifactId>flex-pmd-files</artifactId>
-      </dependency>
-  </dependencies>
-  
-</project>