#Source	file	SLOC	Nt	RCt	Coverage	Nt	RCt	Coverage	
data() { cat <<EOF
ArrayList	150	48	15	140	(93)	93	12	140	(93)	
EnumMap	239	5	8	7	(3)	20	10	12	(5)	
HashMap	360	176	30	347	(96)	136	25	347	(96)	
HashSet	46	39	22	44	(96)	125	21	44	(96)	
Hashtable	355	157	25	325	(92)	252	26	329	(93)	
IHashMap	392	134	34	333	(85)	182	17	335	(85)	
LHashMap	103	129	25	96	(93)	153	24	96	(93)	
LHashSet	9	24	16	9	(100)	69	15	9	(100)	
LinkedList	227	53	17	225	(99)	172	18	225	(99)	
PQueue	203	103	13	155	(76)	120	14	147	(72)	
Properties	249	47	18	102	(41)	79	35	102	(41)	
Stack	17	26	8	17	(100)	45	7	17	(100)	
TreeMap	562	106	26	526	(94)	227	28	525	(93)	
TreeSet	62	186	26	59	(95)	124	27	59	(95)	
Vector	200	176	20	195	(98)	36	19	196	(98)	
WHashMap	338	110	21	300	(89)	201	24	300	(89)	
EOF
}

data | cut -f2,6,7,10 | sed 's/[()]//g' | grep -v Source | 
sort -n | tee /tmp/dat
gnuplot<<EOF
set size 0.5,0.5
#set ytics (0, "25%" 25, "50%" 50,"75%" 75, "100%" 100)
set title "JAVA utils"
set xtics (0,250,500)
set xrange [-75:600]
set yrange [-5:109]
set ylabel "coverage"
set xlabel "SLOC"
set nokey
set terminal postscript eps "Helvetica" 15
set output "/tmp/f.eps"
plot "/tmp/dat"  using 1:4 
EOF

epstopdf /tmp/f.eps
open /tmp/f.pdf

gnuplot<<EOF
set size 0.5,0.5
#set ytics (0, "25%" 25, "50%" 50,"75%" 75, "100%" 100)
set title "JAVA utils"
set xtics (0,250,500)
set xrange [-75:600]
#set yrange [-5:109]
set ytics (0,150,300,450)
set yrange [-20:500]
set ylabel "runtime (secs)"
set xlabel "SLOC"
set nokey
set terminal postscript eps "Helvetica" 15
set output "/tmp/ftime.eps"
plot "/tmp/dat"  using 1:3 
EOF

epstopdf /tmp/ftime.eps
open /tmp/ftime.pdf


data1() { cat<<EOF
ArrayStack	37	6	6	37	(100)	
BagUtils	14	52	7	14	(100)	
BeanMap	212	19	76	138	(65)	
BinaryHeap	149	123	18	148	(99)	
BoundedFifoBuffer	89	6	11	89	(100)	
BufferOver?owException	9	3	4	9	(100)	
BufferUnder?owException	9	3	5	9	(100)	
BufferUtils	12	2	6	12	(100)	
ClosureUtils	34	3	10	22	(65)	
CollectionUtils	329	301	45	211	(64)	
ComparatorUtils	33	13	10	33	(100)	
CursorableLinkedList	528	170	41	496	(94)	
DefaultMapEntry	25	2	5	24	(96)	
DoubleOrderedMap	521	164	26	480	(92)	
EnumerationUtils	3	2	7	3	(100)	
FactoryUtils	8	2	7	8	(100)	
FastArrayList	519	334	49	481	(93)	
FastHashMap	258	167	24	223	(86)	
FastTreeMap	288	239	37	262	(91)	
FunctorException	36	4	12	29	(81)	
HashBag	5	8	9	5	(100)	
IteratorUtils	114	455	54	97	(85)	
LRUMap	44	76	28	44	(100)	
ListUtils	64	53	10	28	(44)	
MultiHashMap	138	36	20	128	(93)	
PredicateUtils	31	64	9	31	(100)	
ReferenceMap	297	161	23	247	(83)	
SequencedHashMap	236	105	41	232	(98)	
SetUtils	30	42	8	19	(63)	
StaticBucketMap	214	324	36	199	(93)	
SynchronizedPriorityQueue	11	2	4	9	(82)	
TransformerUtils	39	3	11	27	(69)	
TreeBag	10	10	10	10	(100)	
UnboundedFifoBuffer	81	32	48	81	(100)
EOF
}
data1 | cut -f2,3,6 | sed 's/[()]//g' | grep -v Source |
sort -n | tee /tmp/dat1

gnuplot<<EOF
set size 0.5,0.5
set title "Apache classes"
set xtics (0,250,500)
set xrange [-75:600]

set ytics (0,20,40,60,80,100)
set yrange [-5:109]
set ylabel "coverage"
set xlabel "SLOC"
set nokey
set terminal postscript eps "Helvetica" 15
set output "/tmp/g.eps"
plot "/tmp/dat1" using 1:3 
EOF

epstopdf /tmp/g.eps
open /tmp/g.pdf

gnuplot<<EOF
set size 0.5,0.5
set ytics (0,150,300,450)
set yrange [-20:500]
set ylabel "runtime (secs)"

set title "Apache classes"
set xtics (0,250,500)
set xrange [-75:600]
#set yrange [-5:109]
set xlabel "SLOC"
set nokey
set terminal postscript eps "Helvetica" 15
set output "/tmp/gtime.eps"
plot "/tmp/dat1" using 1:2 
EOF

epstopdf /tmp/gtime.eps
open /tmp/gtime.pdf
