Skip to content

Commit 1b3f77f

Browse files
committed
Merge branch 'master' of github.com:ecu-sle-lab/mysql-query-construction-analysis
2 parents 6a4147f + 1987877 commit 1b3f77f

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

QCPAnalysis/src/QCPAnalysis/QCP4SubcaseAnalysis.rsc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ public void analyzeQCP4(){
5050
}
5151
sublist += p.dynamicpart@at;
5252
}
53-
for(q <- sublist) println(q.dynamicpart@at);*/
53+
for(q <- sublist) println(q);*/
5454

5555
// for validation of column, table, and database name grouping
56-
for(q <- groupDynamicSnippetsByRole(qcp4)["Column, Table, or Database Name"]) println(q.dynamicpart@at);
56+
//for(q <- groupDynamicSnippetsByRole(qcp4)["Column, Table, or Database Name"]) println(q.dynamicpart@at);
5757

5858
// for validation of other grouping
5959
//for(q <- groupDynamicSnippetsByRole(qcp4)["Column, Table, or Database Name"]) println(q.dynamicpart@at);

QCPAnalysis/src/QCPAnalysis/QueryStringAnalysis.rsc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ import List;
3131

3232
loc cfglocb = |project://QCPAnalysis/cfgs/binary|;
3333
loc cfglocp = |project://QCPAnalysis/cfgs/plain|;
34-
35-
// See the Wiki of this GitHub Repository for more detailed information on pattern classifications
3634

3735
// represents a Query string (parameter to a mysql_query call)
3836
data QueryString = querystring(loc callloc, list[QuerySnippet] snippets, PatternFlags flags);
@@ -196,7 +194,7 @@ public set[QueryString] getQCP(str id){
196194
}
197195
public set[loc] getQCPLocs(str id) = {q.callloc | q <- getQCP(id)};
198196
199-
// builds and classifies all query strings based on the Query Construction Patterns in the wiki
197+
// builds and classifies all query strings based on the Query Construction Patterns
200198
public set[QueryString] buildAndClassifyQueryStrings(){
201199
Corpus corpus = getCorpus();
202200
set[QueryString] corpusres = {};
@@ -347,7 +345,8 @@ public set[QueryString] buildAndClassifyQueryStrings(){
347345
qs.flags.unclassified = false;
348346
qs.flags.qcp4 = true;
349347
}
350-
else{
348+
349+
else if(call(_,[actualParameter(scalar(string(_)),false),_*]) !:= c){
351350
println("unclassified query found at <qs.callloc>");
352351
}
353352
sysres += qs;

QCPAnalysis/src/QCPAnalysis/WriteResults.rsc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public str qcp4RolesAsLatexTable(set[QueryString] qs){
8181
'\\npfourdigitsep
8282
'\\begin{table}
8383
'\\centering
84-
'\\caption{Counts of Each QCP4 Dynamic Part Grouped by Role\\label{qcp4-roles}}
84+
'\\caption{Counts of Each QCP4 Dynamic Part Grouped by Role\\label{tbl:qcp4-roles}}
8585
'\\ra{1.2}
8686
'\\begin{tabularx}{\\columnwidth}{Xrrr} \\toprule
8787
'Role & Number of Occurrences\\\\ \\midrule

0 commit comments

Comments
 (0)