Clover Coverage Report - Atlassian Core
Coverage timestamp: Sun Nov 30 2008 18:33:35 CST
16   76   12   1.45
2   54   0.75   11
11     1.09  
1    
 
 
  MathBean       Line # 13 16 12 69% 0.6896552
 
  (8)
 
1    /*
2    * Created by IntelliJ IDEA.
3    * User: owen
4    * Date: Jan 30, 2003
5    * Time: 10:29:22 AM
6    * CVS Revision: $Revision: 1.7 $
7    * Last CVS Commit: $Date: 2004/01/22 01:15:21 $
8    * Author of last CVS Commit: $Author: dloeng $
9    * To change this template use Options | File Templates.
10    */
11    package com.atlassian.core.bean;
12   
 
13    public class MathBean
14    {
 
15  3 toggle public int getPercentageWidth(int numberOfColumns, int column)
16    {
17  3 int columnWidth = divide(100, numberOfColumns);
18  3 if (numberOfColumns == column)
19  1 return subtract(100, multiply(columnWidth, subtract(numberOfColumns, 1)));
20    else
21  2 return columnWidth;
22    }
23   
 
24  0 toggle public long getPercentage(double portion, double total)
25    {
26   
27  0 long columnWidth = Math.round((portion / total) * 100);
28  0 return columnWidth;
29    }
30   
 
31  1 toggle public long getPercentage(long portion, long total)
32    {
33  1 long columnWidth = Math.round(((double) portion / (double) total) * 100);
34  1 return columnWidth;
35    }
36   
 
37  1 toggle public int add(int i1, int i2)
38    {
39  1 return i1 + i2;
40    }
41   
 
42  3 toggle public int subtract(int i1, int i2)
43    {
44  3 return i1 - i2;
45    }
46   
 
47  0 toggle public long substract(long i1, long i2)
48    {
49  0 return i1 - i2;
50    }
51   
 
52  2 toggle public int multiply(int i1, int i2)
53    {
54  2 return i1 * i2;
55    }
56   
 
57  4 toggle public int divide(int i1, int i2)
58    {
59  4 return i1 / i2;
60    }
61   
 
62  2 toggle public long divide(long l1, long l2)
63    {
64  2 return l1 / l2;
65    }
66   
 
67  0 toggle public long max(long l1, long l2)
68    {
69  0 return Math.max(l1, l2);
70    }
71   
 
72  0 toggle public long min(long l1, long l2)
73    {
74  0 return Math.min(l1, l2);
75    }
76    }