Name

Simian Plugin

Version

0.5

Product Versions

1.0.5

Author(s)

Marty Andrews

Homepage

 

Price

Free

License

BSD

JavaDocs

n/a

IssueTracking

n/a

Download JAR

simian-bamboo-0.5.jar

Download Source

simian-bamboo.zip

Description/Features

Shows duplication statistics for your build as reported by Simian.

At a basic level, the simian-bamboo plugin will show you the summary data produced by Simian when it is run on your build. This includes the number of significant lines of code (ie. a count not including blank lines or comments), and a count of the duplicate lines in your code. This gives you an indication of how much copy-and-paste style activity has occurred in your system and where to go to fix it.

In addition to the summary details, the simian-bamboo plugin gives you some feedback on how bad the percentage of duplication is in your system, based on the author's experience. Four levels, ranging from "Excellent" (0% duplication) to "Bad" (>10% duplication) are shown in the results page.

In order to help you locate and fix duplication in your system, the simian-bamboo plugin will list the top 10 worst sets of duplicate code found on the results page as well.

Finally, the summary page for your build plan includes a Simian graph which plots both lines of code and duplicate lines of code on the same graph, allowing you to see how duplication was affected over time in your build. Perhaps a rush towards the end of a release caused some copy and paste activity in the team.

Plotting multiple data sets an the same graph is one of the interesting features of the simian-bamboo plugin. The Bamboo API has support built in for single data sets, but not for multiple data sets. The graph data needed to be built by hand, and the graph generated in a way that Bamboo still rendered correctly. See the code attached for how that is done.

Usage

  1. Copy the simian-bamboo-0.5.jar file into your <BAMBOO_HOME>/webapp/WEB-INF/lib directory and restart Bamboo
  2. In the configuration of your plan, there should be a new Simian section on the 'Builder Configuration' tab. Here you can specify whether your plan generates Simian reports, and if so, the location of the XML report file.
  3. You should now see a Simian tab on your Plan and on any new builds that generate Simian report files.

Examples

To make use of the simian-bamboo plugin in your build, you need to have Simian running against your code. If you are using Ant to build your project, use a target something like this:

<target name="simian">
    <simian failOnDuplication="false">
        <fileset dir="src" includes="**/*.java"/>
        <formatter type="xml" tofile="build/simian-log.xml"/>
    </simian>
</target>

By setting failOnDuplication to false, your build will still pass if you have duplication, but you will still get the output recorded. Using a formatter of type xml will produce a file the the simian-bamboo plugin can parse and produce results for. This file location will be entered into the plan configuration as shown in simian-plan-configuration.png.

Version History

Version

Date

Description

0.5

9 May 2007

Initial stable version

Screenshots

4 Comments

  1. The Simian plugin is broken when using it with Bamboo 1.2 ... is there a chance you (the author) can fix it?

    Thanks,
    Max Horváth

  2. Still not working for current Bamboo (1.2.2) ... anyone in for making it work again?

  3. I might take a crack at fixing this if I can get simian working against our Python codebase....

  4. I'd love to get an updated plugin that works with current Bamboo... please??