# Incorporating Code Structure and Quality in Deep Code Search
## 5 Evaluation
### Results
\begin{table}
\begin{tabular}{c l c c c c c} \hline \hline \multirow{2}{*}{**No.**} & \multirow{2}{*}{**Query**} & \multicolumn{5}{c}{**FRank**} \\  & & **DCS** & **AD** & **PD** & **PAD** & **SQD** \\ \hline
1 & how to check if a map contains a key in go? & NF & NF & 1 & 7 & 1 \\
2 & how to convert an int value to string in go? & NF & 2 & 7 & 2 & 3 \\
3 & how to check if a file exists in go? & 1 & 2 & 1 & 1 & 2 \\
4 & how to find the type of an object in go? & NF & 2 & 1 & 1 & 4 \\
5 & read a file in lines & 1 & NF & NF & 6 & NF \\
6 & how to multiply duration by integer? & 8 & 3 & 4 & 1 & 2 \\
7 & how to generate a random string of a fixed length in go? & 5 & 1 & NF & 1 & NF \\
8 & checking the equality of two slices & 3 & NF & NF & NF & 3 \\
9 & how can i read from standard input in the console? & NF & 10 & NF & 10 & NF \\
10 & how to write to a file using go & 2 & 1 & 1 & 1 & 1 \\
11 & how do i send a json string in a post request in go & 3 & 5 & 2 & 4 & 10 \\
12 & getting a slice of keys from a map & NF & NF & 1 & 9 & 8 \\
13 & convert string to int in go? & 4 & 1 & 10 & 9 & 5 \\
14 & how to get the directory of the currently running file? & NF & 1 & 6 & NF & 1 \\
15 & convert byte slice to io.Reader & NF & NF & NF & NF & NF \\
16 & how to set headers in http get request? & 4 & 1 & 1 & 1 & 3 \\
17 & how to trim leading and trailing white spaces of a string? & NF & 4 & 8 & NF & 1 \\
18 & how to connect to mysql from go? & 9 & NF & NF & NF & NF \\
19 & how to parse unix timestamp to time.Time & NF & NF & 2 & 2 & 10 \\
20 & subtracting time.duration from time in go & 3 & 2 & NF & NF & NF \\
21 & convert string to time & 3 & NF & 9 & 6 & 1 \\
22 & how to set timeout for http get requests in golang? & NF & NF & 2 & NF & 5 \\
23 & how to set http status code on http responsewriter & NF & 2 & 3 & 10 & NF \\
24 & how to stop a goroutine & NF & NF & NF & NF & 7 \\
25 & how to find out element position in slice? & NF & NF & NF & 5 & NF \\
26 & partly json unmarshal into a map in go & 6 & 3 & NF & 1 & 6 \\
27 & how to index characters in a golang string? & 10 & NF & 1 & NF & NF \\
28 & how to get the name of a function in go? & 3 & NF & NF & NF & 1 \\
29 & convert go map to json & 7 & 2 & NF & 2 & 3 \\
30 & convert interface to int & 1 & NF & 9 & 10 & NF \\
31 & how to convert a bolt to a string in go? & NF & 9 & 2 & 2 & 1 \\
32 & obtain user’s home directory & NF & 4 & 9 & NF & NF \\
33 & how do i convert a string to a lower case representation & NF & 1 & NF & 1 & 6 \\
34 & how do i compare strings in golang? & NF & 4 & 7 & 6 & NF \\
35 & mkdir if not exists using golang & NF & 3 & NF & 3 & NF \\
36 & sort a map by values & NF & NF & 1 & 5 & 2 \\
37 & how to check if a string is numeric in go & NF & NF & NF & NF & 4 \\
38 & convert an integer to a float number & 1 & 5 & NF & NF & NF \\
39 & delete max in BTree & 1 & NF & 3 & 5 & 1 \\
40 & how to clone a map & 1 & NF & NF & NF & 1 \\
41 & string to date conversion & 2 & NF & NF & NF & NF \\
42 & get database config & 1 & NF & 4 & 2 & 1 \\
43 & convert string to duration & 1 & 3 & NF & 1 & 2 \\
44 & generate random integers within a specific range & 7 & NF & NF & NF & NF \\
45 & generate an md5 hash & 5 & NF & NF & 3 & 3 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The evaluation queries and the corresponding FRank. implies that program slice performs better than AST in expressing the semantic information of code snippets. We speculate that this is because program slicing removes the special features in AST and uses more generalized common features instead. In the training process, we use MRR as an indicator of model convergence. We take the result that MRR is no longer improved in 30 consecutive epochs as the condition to stop training. Figure 7 shows the MRR of each epoch of validation set in the training process. We can observe that SQ-DeepCS achieves better MRR over nearly all epochs and stops training in the 144 th epoch, 26.5% less than DeepCS (196 th epoch). The results show that our model converges faster than DeepCS.