Ejemplo n.º 1
0
 def __init__(self):
     self.vcs = GitProvider(config.getRepoDir())
     self.ccdb = CCDatabase(config.getCcDbFile())
     self.codeChecker = CodeChecker(config.getRepoDir())
Ejemplo n.º 2
0
 def __init__(self):
     self.vcs = GitProvider(config.getRepoDir())
     self.ccdb = CCDatabase(config.getCcDbFile())
     self.codeChecker = CodeChecker(config.getRepoDir())
     self.checkers = Checkers()
     self.loadCommitList()
Ejemplo n.º 3
0
    if bugData.getChecker() == 'clang-diagnostic-unused-parameter':
        return fixUnusedParam(code, bugData)
    if bugData.getChecker() == 'clang-diagnostic-constant-conversion':
        return fixConstConv(code, bugData)
    return None


ccdb = CCDatabase(config.getCcDbFile())
db = sqlite3.connect('../Results/db.sqlite')
cursor = db.cursor()
cursor.execute('SELECT * FROM bugs')
dataFromDb = cursor.fetchall()
bugs = []
bugsPerFile = {}
BUG_NOT_PROCESSED = 0
vcs = GitProvider(config.getRepoDir())
checkers = Checkers()
currentCommit = vcs.getAllVersions(config.getBranch())[0]
bugDataList = {}
fileContents = {}
codechecker = CodeChecker(config.getRepoDir())

if len(dataFromDb) > 0:
    print("Skipping steps 1-2, DB already filled with data")
    for bug in dataFromDb:
        if bug[2] not in bugsPerFile:
            bugsPerFile[bug[2]] = []
        if bug[3] == BUG_NOT_PROCESSED:
            bugDataList[bug[0]] = ccdb.getNotResolvedBugData(bug[0])
            bugsPerFile[bug[2]].append(bug[0])
else: