Skip to content

Joining dataframes incorrectly when plotting bug survival  #161

@cloudymonstera

Description

@cloudymonstera

Hi there,
when bug dataframes are aggregated, the level name 'Fuzzer' is missing, then re-joining and sorting by 'Fuzzer' terminates the plotting. This procedure lies in https://github.com/HexHive/magma/blob/v1.2/tools/report_df/MatplotlibPlotter.py#L306C17-L306C17.

Concretely, the original dataframe of bug lifetime is like:

Fuzzer       afl           aflfast           aflplusplus           fairfuzz           moptafl
Metric   reached triggered reached triggered     reached triggered  reached triggered reached triggered
BugID
PNG001      15.0  604800.0    15.0  604800.0    604800.0  604800.0     15.0  604800.0    15.0  604800.0
PNG003      10.0      15.0    10.0      15.0    604800.0  604800.0     10.0      15.0    10.0      15.0
PNG004      15.0  604800.0    15.0  604800.0    604800.0  604800.0     15.0  604800.0    15.0  604800.0
PNG005      15.0  604800.0    15.0  604800.0    604800.0  604800.0     15.0  604800.0    15.0  604800.0
PNG006      15.0  604800.0    15.0  604800.0    604800.0  604800.0     15.0  604800.0    15.0  604800.0
PNG007      15.0  604800.0    15.0  604800.0    604800.0  604800.0     15.0  604800.0    15.0  604800.0
TIF003  604800.0  604800.0    15.0  604800.0    604800.0  604800.0     15.0  604800.0    15.0  604800.0
TIF007  604800.0  604800.0    60.0  604800.0    604800.0  604800.0     80.0     580.0    20.0      45.0
TIF012  604800.0  604800.0    10.0  604800.0    604800.0  604800.0     10.0  604800.0    10.0     225.0
TIF014  604800.0  604800.0    60.0  604800.0    604800.0  604800.0     80.0  604800.0    20.0     225.0

and the newly aggregated columns are:

          reached  triggered
BugID
PNG001  120972.0   604800.0
PNG003  120968.0   120972.0
PNG004  120972.0   604800.0
PNG005  120972.0   604800.0
PNG006  120972.0   604800.0
PNG007  120972.0   604800.0
TIF003  241929.0   604800.0
TIF007  241952.0   363005.0
TIF012  241926.0   483885.0
TIF014  241952.0   483885.0

However, the re-joined dataframe is:

                      afl   aflfast  aflplusplus  fairfuzz   moptafl  Aggregate
BugID
PNG001 reached        15.0      15.0     604800.0      15.0      15.0   120972.0
       triggered  604800.0  604800.0     604800.0  604800.0  604800.0   604800.0
PNG003 reached        10.0      10.0     604800.0      10.0      10.0   120968.0
       triggered      15.0      15.0     604800.0      15.0      15.0   120972.0
PNG004 reached        15.0      15.0     604800.0      15.0      15.0   120972.0
       triggered  604800.0  604800.0     604800.0  604800.0  604800.0   604800.0
PNG005 reached        15.0      15.0     604800.0      15.0      15.0   120972.0
       triggered  604800.0  604800.0     604800.0  604800.0  604800.0   604800.0
PNG006 reached        15.0      15.0     604800.0      15.0      15.0   120972.0
       triggered  604800.0  604800.0     604800.0  604800.0  604800.0   604800.0
PNG007 reached        15.0      15.0     604800.0      15.0      15.0   120972.0
       triggered  604800.0  604800.0     604800.0  604800.0  604800.0   604800.0
TIF003 reached    604800.0      15.0     604800.0      15.0      15.0   241929.0
       triggered  604800.0  604800.0     604800.0  604800.0  604800.0   604800.0
TIF007 reached    604800.0      60.0     604800.0      80.0      20.0   241952.0
       triggered  604800.0  604800.0     604800.0     580.0      45.0   363005.0
TIF012 reached    604800.0      10.0     604800.0      10.0      10.0   241926.0
       triggered  604800.0  604800.0     604800.0  604800.0     225.0   483885.0
TIF014 reached    604800.0      60.0     604800.0      80.0      20.0   241952.0
       triggered  604800.0  604800.0     604800.0  604800.0     225.0   483885.0

The problem is that, how to join dataframes with aggregate column to fit in the following table, html and css?

Any help would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions