stg-tud / MUBench

Other
54 stars 30 forks source link

MuBench review website showing duplicate and multiple code snippets for a single misuse #417

Closed anam-dodhy closed 6 years ago

anam-dodhy commented 6 years ago

Steps to Reproduce:

  1. Experiment 2 (Precision) was executed over dataset: https://github.com/anam-dodhy/MUBench/tree/master/data/aliyun-oss-java-sdk Experiment 2 (Precision) was successfully executed. Experiment 3 (Recall) was executed over dataset: https://github.com/anam-dodhy/MUBench/tree/master/data/mpush
  2. Then the results of the datasets were successfully published on the review webiste along with their metadata.

Got:

Multiple code snippets in the Review Website are displayed against a selected misuse which are not related to the misuse itself. In some cases, the same code snippet is just repeated several times. Please find below example of such two cases for the datasets given above. Moreover, this issue is seen for almost all datasets in all three experiments.

Experiment: 2 (Precision) Detector: Findbugs Dataset: aliyun-oss-java-sdk https://github.com/anam-dodhy/MUBench/tree/master/data/aliyun-oss-java-sdk Finding: 19 experiment 2

Experiment: 3 (Recall) Detector: Findbugs Dataset: mpush https://github.com/anam-dodhy/MUBench/tree/master/data/mpush Misuse: 3 experiment 3

Expected:

One code snippet for each misuse.

cc @akwick

salsolatragus commented 6 years ago

Thank you very much for reporting this issue. Luckily, it has already been fixed with d28583d .

If you set up your review site July 2018 or later, it should be sufficient to replace src/Models/Misuse.php with the current version of that file from master.

Please report back if this doesn't solve the problem for you.

akwick commented 6 years ago

It worked, but I had to replace the following files as well:

salsolatragus commented 6 years ago

Thanks for reporting back! Admittedly, by replacing the Misuse.php file you pulled some changes that needed corresponding changes in other file. Glad the number of files to replace was still relatively small. To fix your concrete problem, it probably would've been sufficient to just replace the one changed method in misuse.php, but a full upgrade, like you did, is the cleaner solution anyways ;)