Skip to content

Commit 4a03059

Browse files
committed
stats table
1 parent e06a502 commit 4a03059

3 files changed

Lines changed: 97 additions & 2 deletions

File tree

statistics/analyze.R

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
2+
# NAME,TYPE,LANGUAGE,FILES,LOCS,DATABASE,LICENSE,URL
3+
DATA_FILE="./data.csv"
4+
5+
latexTable <- function(){
6+
7+
dt <- read.csv(DATA_FILE,header=T)
8+
9+
dt = dt[order(dt$TYPE, dt$LANGUAGE, -dt$LOCS, dt$NAME),]
10+
11+
TABLE = "./statistics_table_emb.tex"
12+
unlink(TABLE)
13+
sink(TABLE, append = TRUE, split = TRUE)
14+
15+
cat("\\begin{tabular}{lll rr ll}\\\\ \n")
16+
cat("\\toprule \n")
17+
cat("SUT & Type & Language & \\#Files & \\#LOCs & Database & URL \\\\ \n")
18+
cat("\\midrule \n")
19+
20+
for (i in 1:nrow(dt)){
21+
22+
row = dt[i,]
23+
cat("\\emph{",row$NAME,"}",sep="")
24+
25+
cat(" & ", row$TYPE)
26+
cat(" & ", row$LANGUAGE)
27+
cat(" & ", row$FILES)
28+
cat(" & ", row$LOCS)
29+
30+
databases = gsub(";", ", ", row$DATABASE)
31+
cat(" & ", databases)
32+
33+
url = row$URL
34+
if(url == "UNDEFINED"){
35+
cat(" & - ")
36+
} else {
37+
cat(" & \\url{", url,"}",sep="")
38+
}
39+
40+
cat(" \\\\ \n")
41+
}
42+
43+
cat("\\midrule \n")
44+
cat("Total",nrow(dt))
45+
cat(" & & & ")
46+
cat(sum(dt$FILES))
47+
cat(" & ")
48+
cat(sum(dt$LOCS))
49+
cat(" & ")
50+
cat(length(dt$DATABASE[dt$DATABASE != ""]))
51+
cat(" & ")
52+
cat(" \\\\ \n")
53+
54+
cat("\\bottomrule \n")
55+
cat("\\end{tabular} \n")
56+
57+
sink()
58+
}

statistics/data.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ graphql-ncs,GraphQL,Kotlin,8,548,,UNDEFINED,UNDEFINED
2626
graphql-scs,GraphQL,Kotlin,13,577,,UNDEFINED,UNDEFINED
2727
react-finland,GraphQL,TypeScript,461,16206,,UNDEFINED,https://github.com/ReactFinland/graphql-api
2828
ecommerce-server,GraphQL,TypeScript,49,1815,PostgreSQL,MIT,https://github.com/react-shop/react-ecommerce
29-
rpc-thrift-ncs,RPC-Thrift,9,585,,UNDEFINED,UNDEFINED
30-
rpc-thrift-scs,RPC-Thrift,14,772,,UNDEFINED,UNDEFINED
29+
rpc-thrift-ncs,RPC-Thrift,Java,9,585,,UNDEFINED,UNDEFINED
30+
rpc-thrift-scs,RPC-Thrift,Java,14,772,,UNDEFINED,UNDEFINED
3131

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
\begin{tabular}{lll rr ll}\\
2+
\toprule
3+
SUT & Type & Language & \#Files & \#LOCs & Database & URL \\
4+
\midrule
5+
\emph{timbuctoo} & GraphQL & Java & 1113 & 107729 & Neo4j & \url{https://github.com/HuygensING/timbuctoo} \\
6+
\emph{patio-api} & GraphQL & Java & 178 & 18048 & PostgreSQL & \url{https://github.com/patio-team/patio-api} \\
7+
\emph{petclinic-graphql} & GraphQL & Java & 89 & 5212 & PostgreSQL & \url{https://github.com/spring-petclinic/spring-petclinic-graphql} \\
8+
\emph{graphql-scs} & GraphQL & Kotlin & 13 & 577 & & - \\
9+
\emph{graphql-ncs} & GraphQL & Kotlin & 8 & 548 & & - \\
10+
\emph{react-finland} & GraphQL & TypeScript & 461 & 16206 & & \url{https://github.com/ReactFinland/graphql-api} \\
11+
\emph{ecommerce-server} & GraphQL & TypeScript & 49 & 1815 & PostgreSQL & \url{https://github.com/react-shop/react-ecommerce} \\
12+
\emph{languagetool} & REST & Java & 1385 & 174781 & & \url{https://github.com/languagetool-org/languagetool} \\
13+
\emph{ocvn-rest} & REST & Java & 526 & 45521 & H2, MongoDB & \url{https://github.com/devgateway/ocvn} \\
14+
\emph{genome-nexus} & REST & Java & 405 & 30004 & MongoDB & \url{https://github.com/genome-nexus/genome-nexus} \\
15+
\emph{market} & REST & Java & 124 & 9861 & H2 & \url{https://github.com/aleksey-lukyanets/market} \\
16+
\emph{scout-api} & REST & Java & 93 & 9736 & H2 & \url{https://github.com/mikaelsvensson/scout-api} \\
17+
\emph{catwatch} & REST & Java & 106 & 9636 & H2 & \url{https://github.com/zalando-incubator/catwatch} \\
18+
\emph{proxyprint} & REST & Java & 73 & 8338 & H2 & \url{https://github.com/ProxyPrint/proxyprint-kitchen} \\
19+
\emph{cwa-verification} & REST & Java & 47 & 3955 & H2 & \url{https://github.com/corona-warn-app/cwa-verification-server} \\
20+
\emph{gestaohospital-rest} & REST & Java & 33 & 3506 & MongoDB & \url{https://github.com/ValchanOficial/GestaoHospital} \\
21+
\emph{features-service} & REST & Java & 39 & 2275 & H2 & \url{https://github.com/JavierMF/features-service} \\
22+
\emph{restcountries} & REST & Java & 24 & 1977 & & \url{https://github.com/apilayer/restcountries} \\
23+
\emph{rest-scs} & REST & Java & 13 & 862 & & - \\
24+
\emph{rest-ncs} & REST & Java & 9 & 605 & & - \\
25+
\emph{cyclotron} & REST & JavaScript & 25 & 5803 & MongoDB & \url{https://github.com/ExpediaInceCommercePlatform/cyclotron} \\
26+
\emph{spacex-api} & REST & JavaScript & 63 & 4966 & MongoDB & \url{https://github.com/r-spacex/SpaceX-API} \\
27+
\emph{disease-sh-api} & REST & JavaScript & 57 & 3343 & Redis & \url{https://github.com/disease-sh/API} \\
28+
\emph{js-rest-scs} & REST & JavaScript & 13 & 1046 & & - \\
29+
\emph{js-rest-ncs} & REST & JavaScript & 8 & 775 & & - \\
30+
\emph{rest-news} & REST & Kotlin & 11 & 857 & H2 & \url{https://github.com/arcuri82/testing_security_development_enterprise_systems} \\
31+
\emph{realworld-app} & REST & TypeScript & 37 & 1229 & MySQL & \url{https://github.com/lujakob/nestjs-realworld-example-app} \\
32+
\emph{rpc-thrift-scs} & RPC-Thrift & Java & 14 & 772 & & - \\
33+
\emph{rpc-thrift-ncs} & RPC-Thrift & Java & 9 & 585 & & - \\
34+
\midrule
35+
Total 29 & & & 5025 & 470568 & 18 & \\
36+
\bottomrule
37+
\end{tabular}

0 commit comments

Comments
 (0)