You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for commit in RepositoryMining(working_dir).traverse_commits():
files_changed = [ (x.new_path if x.new_path is not None else x.old_path) for x in commit.modifications ]
commit_filter = ""
for line in line_rex.findall(commit.msg):
if line.strip() != '' and not line.startswith("git-svn-id"):
if commit_filter != '':
commit_filter = commit_filter + "\n"
commit_filter = commit_filter + line.strip()
blob = TextBlob(commit_filter)
sentiment = blob.sentiment.polarity
subjectivity = blob.sentiment.subjectivity
for file in files_changed:
outfile.write("{},{},\"{}\",{},{},{},{}\n".format(project,commit.hash,commit_filter.replace("\n","\\n").replace(",",".").replace("\"","\\\""),file,sentiment,subjectivity,commit.hash in fix_commits))