55from pathlib import Path
66import json
77import os
8- import requests
98import shutil
109import subprocess
1110import tempfile
1211import sys
1312
1413
15- defaultModelPath = "java/ql/lib/semmle/code/java/frameworks"
1614lgtmSlugToModelFile = {
1715 # "apache/commons-beanutils": "apache/BeanUtilsGenerated.qll",
1816 # "apache/commons-codec": "apache/CodecGenerated.qll",
1917 # "apache/commons-lang": "apache/Lang3Generated.qll",
20- "apache/commons-io" : "apache/IOGenerated.qll " ,
18+ "apache/commons-io" : "org. apache.commons.io " ,
2119}
2220
2321
@@ -36,13 +34,12 @@ def regenerateModel(lgtmSlug, extractedDb):
3634 print ("ERROR: slug " + lgtmSlug +
3735 " is not mapped to a model file in script " + sys .argv [0 ])
3836 sys .exit (1 )
39- modelFile = defaultModelPath + "/" + lgtmSlugToModelFile [lgtmSlug ]
37+ modelFile = lgtmSlugToModelFile [lgtmSlug ]
4038 codeQlRoot = findGitRoot ()
41- targetModel = codeQlRoot + "/" + modelFile
4239 subprocess .check_call ([codeQlRoot + "/java/ql/src/utils/model-generator/GenerateFlowModel.py" ,
43- "--with-summaries" , "--with-sinks" ,
44- extractedDb , targetModel ])
45- print ("Regenerated " + targetModel )
40+ "--with-summaries" , "--with-sinks" , "--with-negative-summaries" ,
41+ extractedDb , modelFile ])
42+ print ("Regenerated " + modelFile )
4643 shutil .rmtree (tmpDir )
4744
4845
0 commit comments