Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking elements from the spoon model with a test framework #84

Merged
merged 1 commit into from
Oct 15, 2020

Conversation

martinezmatias
Copy link
Contributor

Store in metadata of ctmethods and ctinvocations the test framework that identifies them as their test cases / assertions, respectively.
It is not the best way to do the link, but that one it does not requires to modify the API.

identifies them as their test cases / assertions, respectively.
@monperrus
Copy link
Member

LGTM, merge?

@martinezmatias
Copy link
Contributor Author

fine for me

@monperrus monperrus merged commit 14e9ffd into STAMP-project:master Oct 15, 2020
@monperrus
Copy link
Member

Do we need to release on Maven Central?

@martinezmatias
Copy link
Contributor Author

Do we need to release on Maven Central?

Yes, this change allows flacoco to know which runner to use

@martinezmatias
Copy link
Contributor Author

At least in the project I use for test (D4J Math-85) the results are pretty similar:

(GZoltarFaultLocalization.java:272) - Suspicious: 0 line org.apache.commons.math.distribution.NormalDistributionTest l: 168, susp 1
(GZoltarFaultLocalization.java:272) - Suspicious: 1 line org.apache.commons.math.distribution.NormalDistributionTest l: 169, susp 1
(GZoltarFaultLocalization.java:272) - Suspicious: 2 line org.apache.commons.math.distribution.AbstractContinuousDistribution l: 97, susp 1
(GZoltarFaultLocalization.java:272) - Suspicious: 3 line org.apache.commons.math.distribution.AbstractContinuousDistribution l: 100, susp 1
(GZoltarFaultLocalization.java:272) - Suspicious: 4 line org.apache.commons.math.distribution.AbstractContinuousDistribution l: 104, susp 1
(GZoltarFaultLocalization.java:272) - Suspicious: 5 line org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils l: 199, susp 1
(GZoltarFaultLocalization.java:272) - Suspicious: 6 line org.apache.commons.math.special.Gamma l: 181, susp 0.707
(GZoltarFaultLocalization.java:272) - Suspicious: 7 line org.apache.commons.math.distribution.NormalDistributionImpl l: 128, susp 0.707
(GZoltarFaultLocalization.java:272) - Suspicious: 8 line org.apache.commons.math.distribution.NormalDistributionImpl l: 129, susp 0.707
(GZoltarFaultLocalization.java:272) - Suspicious: 9 line org.apache.commons.math.distribution.NormalDistributionImpl l: 131, susp 0.707
(GZoltarFaultLocalization.java:272) - Suspicious: 10 line org.apache.commons.math.distribution.NormalDistributionImpl l: 132, susp 0.707
(GZoltarFaultLocalization.java:272) - Suspicious: 11 line org.apache.commons.math.distribution.NormalDistributionImpl l: 178, susp 0.707
(GZoltarFaultLocalization.java:272) - Suspicious: 12 line org.apache.commons.math.distribution.NormalDistributionImpl l: 181, susp 0.707
(GZoltarFaultLocalization.java:272) - Suspicious: 13 line org.apache.commons.math.distribution.NormalDistributionImpl l: 184, susp 0.707
(GZoltarFaultLocalization.java:272) - Suspicious: 14 line org.apache.commons.math.distribution.NormalDistributionImpl l: 200, susp 0.707
(GZoltarFaultLocalization.java:272) - Suspicious: 15 line org.apache.commons.math.distribution.NormalDistributionImpl l: 203, susp 0.707
(GZoltarFaultLocalization.java:272) - Suspicious: 16 line org.apache.commons.math.distribution.NormalDistributionImpl l: 206, susp 0.707
(GZoltarFaultLocalization.java:272) - Suspicious: 17 line org.apache.commons.math.distribution.NormalDistributionImpl l: 221, susp 0.707
(GZoltarFaultLocalization.java:272) - Suspicious: 18 line org.apache.commons.math.distribution.NormalDistributionImpl l: 223, susp 0.707
(GZoltarFaultLocalization.java:272) - Suspicious: 19 line org.apache.commons.math.distribution.NormalDistributionImpl l: 224, susp 0.707
(GZoltarFaultLocalization.java:272) - Suspicious: 20 line org.apache.commons.math.distribution.NormalDistributionImpl l: 229, susp 0.707
(GZoltarFaultLocalization.java:272) - Suspicious: 21 line org.apache.commons.math.distribution.NormalDistributionImpl l: 162, susp 0.577
(GZoltarFaultLocalization.java:272) - Suspicious: 22 line org.apache.commons.math.distribution.NormalDistributionImpl l: 156, susp 0.5
(GZoltarFaultLocalization.java:272) - Suspicious: 23 line org.apache.commons.math.distribution.NormalDistributionImpl l: 159, susp 0.5
[INFO ] fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.searchSuspicious(GZoltarFaultLocalization.java:284) - Gzoltar found: 24 with susp > 0.5, we consider: 24
[DEBUG] 

(FlacocoFaultLocalization.java:93) - Flacoco Test Result Total:1517, fails: 1
(FlacocoFaultLocalization.java:106) - Suspicious: 1 line org.apache.commons.math.distribution.AbstractContinuousDistribution l: 97, susp 1.0
(FlacocoFaultLocalization.java:106) - Suspicious: 2 line org.apache.commons.math.distribution.AbstractContinuousDistribution l: 88, susp 1.0
(FlacocoFaultLocalization.java:106) - Suspicious: 3 line org.apache.commons.math.distribution.NormalDistributionImpl l: 181, susp 1.0
(FlacocoFaultLocalization.java:106) - Suspicious: 4 line org.apache.commons.math.distribution.NormalDistributionImpl l: 184, susp 1.0
(FlacocoFaultLocalization.java:106) - Suspicious: 5 line org.apache.commons.math.distribution.NormalDistributionImpl l: 178, susp 1.0
(FlacocoFaultLocalization.java:106) - Suspicious: 6 line org.apache.commons.math.distribution.NormalDistributionImpl l: 206, susp 1.0
(FlacocoFaultLocalization.java:106) - Suspicious: 7 line org.apache.commons.math.distribution.NormalDistributionImpl l: 200, susp 1.0
(FlacocoFaultLocalization.java:106) - Suspicious: 8 line org.apache.commons.math.distribution.NormalDistributionImpl l: 203, susp 1.0
(FlacocoFaultLocalization.java:106) - Suspicious: 9 line org.apache.commons.math.distribution.NormalDistributionImpl l: 229, susp 1.0
(FlacocoFaultLocalization.java:106) - Suspicious: 10 line org.apache.commons.math.distribution.NormalDistributionImpl l: 221, susp 1.0
(FlacocoFaultLocalization.java:106) - Suspicious: 11 line org.apache.commons.math.distribution.NormalDistributionImpl l: 224, susp 1.0
(FlacocoFaultLocalization.java:106) - Suspicious: 12 line org.apache.commons.math.distribution.NormalDistributionImpl l: 223, susp 1.0
(FlacocoFaultLocalization.java:106) - Suspicious: 13 line org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils l: 199, susp 1.0
(FlacocoFaultLocalization.java:106) - Suspicious: 14 line org.apache.commons.math.distribution.AbstractContinuousDistribution l: 100, susp 1.0
(FlacocoFaultLocalization.java:106) - Suspicious: 15 line org.apache.commons.math.distribution.AbstractContinuousDistribution l: 104, susp 1.0
(FlacocoFaultLocalization.java:106) - Suspicious: 16 line org.apache.commons.math.distribution.NormalDistributionImpl l: 132, susp 0.7071067811865475
(FlacocoFaultLocalization.java:106) - Suspicious: 17 line org.apache.commons.math.distribution.NormalDistributionImpl l: 131, susp 0.7071067811865475
(FlacocoFaultLocalization.java:106) - Suspicious: 18 line org.apache.commons.math.distribution.NormalDistributionImpl l: 129, susp 0.7071067811865475
(FlacocoFaultLocalization.java:106) - Suspicious: 19 line org.apache.commons.math.distribution.NormalDistributionImpl l: 128, susp 0.7071067811865475
(FlacocoFaultLocalization.java:106) - Suspicious: 20 line org.apache.commons.math.special.Gamma l: 181, susp 0.7071067811865475
(FlacocoFaultLocalization.java:106) - Suspicious: 21 line org.apache.commons.math.distribution.NormalDistributionImpl l: 88, susp 0.4082482904638631
(FlacocoFaultLocalization.java:106) - Suspicious: 22 line org.apache.commons.math.distribution.NormalDistributionImpl l: 72, susp 0.4082482904638631
(FlacocoFaultLocalization.java:106) - Suspicious: 23 line org.apache.commons.math.distribution.NormalDistributionImpl l: 126, susp 0.4082482904638631
(FlacocoFaultLocalization.java:106) - Suspicious: 24 line org.apache.commons.math.special.Gamma l: 162, susp 0.35355339059327373
(FlacocoFaultLocalization.java:106) - Suspicious: 25 line org.apache.commons.math.MaxIterationsExceededException l: 44, susp 0.35355339059327373
(FlacocoFaultLocalization.java:106) - Suspicious: 26 line org.apache.commons.math.MaxIterationsExceededException l: 43, susp 0.35355339059327373
(FlacocoFaultLocalization.java:106) - Suspicious: 27 line org.apache.commons.math.MaxIterationsExceededException l: 45, susp 0.35355339059327373
(FlacocoFaultLocalization.java:106) - Suspicious: 28 line org.apache.commons.math.distribution.AbstractContinuousDistribution l: 62, susp 0.30151134457776363
(FlacocoFaultLocalization.java:106) - Suspicious: 29 line org.apache.commons.math.distribution.AbstractContinuousDistribution l: 69, susp 0.30151134457776363

@martinezmatias
Copy link
Contributor Author

Now, the challenge is to reduce the execution time: Flacoco takes 211 seconds while Gzoltar 17 secs :/

@monperrus
Copy link
Member

test-runner 2.2.0 released on Central

@martinezmatias
Copy link
Contributor Author

great, thanks! I'll update flacoco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants