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

Potential issue with test code statement generation in ConstructionPathSynthesizer #271

Open
darienchong opened this issue Mar 1, 2022 · 0 comments

Comments

@darienchong
Copy link
Collaborator

Context

When running EvoObj on the two methods indicated in shell/src/test/java/feature/objectconstruction/testgeneration/testcase/IncompleteOcgTest.java, there is some odd behaviour that occurs when processing certain InstanceFieldVariableWrapper nodes in the Object Construction Graph (OCG) to produce test case statements. The DepVariableWrapper nodes obtained from the targetVariable for that node are ThatVariableWrapper, and not InstanceFieldVariableWrappers as expected.

Steps to Reproduce

Please break down here below all the needed steps to reproduce the issue.
[If possible, please upload an example of the project you are generating tests for.]

  1. Run the methods (firstExample, secondExample) in debug mode.
  2. Observe the test case statement generation in ConstructionPathSynthesizer (possibly using breakpoints at/near the while condition e.g. at L169 ofConstructionPathSynthesizer)
  3. Tracing the execution, note how on processing the second/third nodes of the OCG a ThisVariableWrapper node is processed for a node in the OCG that does not correspond to a this variable.
  4. Test case does not contain relevant statements to get the desired field.
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

No branches or pull requests

1 participant