Giter Site home page Giter Site logo

tracesim's Introduction

TraceSim

TraceSim is a method for measuring stacktrace similarity.

We describe details of algorithm in our MaLTeSQuE 2020 paper "TraceSim: A Method for Calculating Stack Trace Similarity", which can be found here: https://arxiv.org/abs/2009.12590.

Also, we implement other well-known methods for comparison on our data.

Usage

python main.py
    --stacktrace_dir [path_to_dir_with_stacktraces]
    --labels_path [path_to_labels] 
    --method tracesim

We assume that

  • stacktrace_dir is a directory with json files. See example of report file with stacktrace below. Expected that report files have name like id.json, where id is stacktrace id.
  • labels_path is a csv file with header rid1,rid2,label.
  • method mean name of the method for measure similarity. One of the lerch, moroo, rebucket, cosine, levenshtein, brodie, prefix. Also, you can pass all for all methods comparison.

Report example

{
  "id": 123,
  "timestamp": 1.942130912798E12,
  "class": [
    "java.lang.ClassNotFoundException",
    "java.lang.RuntimeException"
  ],
  "frames": [
    [
      "java.lang.ClassLoader.loadClass",
      "java.lang.Class.forName0",
      "java.lang.Class.forName",
      "java.util.concurrent.FutureTask.run",
      "java.util.concurrent.ThreadPoolExecutor.runWorker",
      "java.util.concurrent.ThreadPoolExecutor$Worker.run",
      "java.lang.Thread.run"
    ]
  ]
}
  • id - unique id of report
  • timestamp - timestamp of error occurring
  • class - classes of thrown exceptions
  • frames - one element list of list of method calls

This file should located in stacktrace_dir and have name 123.json

Of course, this report is not real :)

Labels example

The file with labels contains information about whether two reports are is similar or not. We consider reports similar if they belong to the same group, and different otherwise.

Thus, for reports 123 and 124 from the same group, 123,124,1 will be written in the file. For report 125 from another group, 123,125,0 will be recorded. Also, by definition, it is correct to write 123,123,1, but you should not do this.

In this case, the label file may look like this

rid1,rid2,label
123,124,1
123,125,0
124,125,0

tracesim's People

Contributors

akhvorov avatar

Stargazers

Zo-Hasina Rasatavohary avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.