Coder Social home page Coder Social logo

gu-youngfeng / tensamplingstudy1 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 7.12 MB

This project is cloned from the open-source implementation in paper "A Comparison of 10 Sampling Algorithms for Configurable Systems." This Study1 implements the sampling algorithms on ideal condition (non-constraints).

License: Apache License 2.0

C 98.55% C++ 0.56% Java 0.88%
configuration-sampling ideal-condition icse-2016

tensamplingstudy1's Introduction

TenSamplingStudy1

1. About the project

This project is cloned from the open-source implementation in paper "A Comparison of 10 Sampling Algorithms for Configurable Systems.", some Chinese comments will be added into the code. The original code can be download from

http://www.dsc.ufcg.edu.br/~spg/sampling/

Please cite the paper if you want to reuse this project.

Fl¨¢vio Medeiros, et al. "A Comparison of 10 Sampling Algorithms for Configurable Systems." IEEE/ACM International Conference on Software Engineering IEEE, 2016.

2. Inside the project

Brief introduction of project constructure.

  1. Folder bin/ saved the bytecode of Java code.
  2. Folder bugs/ included the fault related files in 24 C projects, followed by each file there are some .config files which gave the different configurations to trigger the corresponding fault.
  3. Folder tables/ contained the covering array in T-wise algorithms.
  4. Folder src/ saved the relative Java code.
  5. File bugs.xls detailed the information of 135 faults.

3. Bugs Fixing

1. We should remove the Line 120 in checkers.BugChecker.java, since it will mislead the calculation on Line 137.
...
/** LINE 119 */ List<List<String>> samplings = algorithm.getSamples(new File(BugsChecker.SOURCE_LOCATION + project + "/" + path));
/** LINE 120 */ this.configurations += samplings.size();
...
/** LINE 136 */// Total number of configuration / total number of files in all projects.
/** LINE 137 */System.out.println("Configurations per file:" + ((double)configurations)/50078);
...
2. We should replace the Math.pow(directives.size(), 2) with Math.pow(2, directives.size()) on Line 28 and 47 in core.algorithms.RandomSampling.java, since $2^n$ should be written in Math.pow(2,n).
...
/** LINE 28 */ && NUMBER_CONFIGS < Math.pow(directives.size(), 2)) {
...
/** LINE 47 */ if (NUMBER_CONFIGS >= Math.pow(directives.size(), 2)) {
...

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.