soachishti / moss.py

Python client for Moss: A System for Detecting Software Similarity
MIT License
387 stars 75 forks source link

Not working with cpp files #22

Closed mkaraev closed 5 years ago

mkaraev commented 5 years ago

import mosspy import config

user_id = 867764230 m = mosspy.Moss(user_id, "cc")

working_dir = config.source_codes_dir

m.addBaseFile(working_dir + "a_plus_b.cpp")

m.addBaseFile("submission/test_student.py")

Submission Files

m.addFile(working_dir + "a_plus_b_1.cpp") m.addFile(working_dir + "a_plus_b.cpp")

url = m.send() # Submission Report URL

print ("Report Url: " + url)

Save report file

m.saveWebPage(url, "submission/report.html")

Download whole report locally including code diff links

mosspy.download_report(url, "submission/report/", connections=8)

moss didn't find any matching lines, but these two codes are similar

soachishti commented 5 years ago

Hi @mkaraev , Moss ignore the content of base file in the submission files. As you are adding same submission file in "base file", the moss behavior is correct.