View Javadoc

1   package net.sf.mavenhist.extractor.findbugs;
2   
3   /**
4    * Extracts the number of files containing findbugs violations.
5    */
6   public class FindbugsViolationsExtractor extends AbstractFindbugsExtractor {
7     
8     /**
9      * {@inheritDoc}
10     */
11    protected String getXPath(String version) {
12      if ("1.2.0".equals(version)) {
13        return "count(//BugInstance) div 2";
14      }
15      return "count(//BugInstance)";
16    }
17    
18    /**
19     * {@inheritDoc}
20     */
21    protected String getVersionXPath() {
22      return "/BugCollection/@version";
23    }
24    
25    /**
26     * {@inheritDoc}
27     */
28    public String getName() {
29      return "fbviolations";
30    }
31  }