Files
logseq/pages/hls__icse2023-paper1237_1665137801464_0.md
T
2025-06-05 22:07:12 +02:00

16 KiB
Raw Blame History

file-path:: ../assets/icse2023-paper1237_1665137801464_0.pdf file:: icse2023-paper1237_1665137801464_0.pdf title:: hls__icse2023-paper1237_1665137801464_0

  • dditional developers code is impacted and requires its errors to be co-evolved accordingl ls-type:: annotation hl-page:: 1 id:: 63413ae7-c384-40d3-a6de-c6ba1cb01480
  • fully automatic code co-evolution approach ls-type:: annotation hl-page:: 1 id:: 63413afc-ca69-4a90-82de-80b602efa23c
  • every matched pattern has a corresponding resolution to co-evolve its error ls-type:: annotation hl-page:: 1 id:: 63413ef3-df50-4f81-b472-a893cb565084
  • 82% of precision and 81% of recall , varying from 48% to 100% for precision and recall respectively. ls-type:: annotation hl-page:: 1 id:: 63413f9f-c7e5-4817-9ba7-3e270620a837
  • % ls-type:: annotation hl-page:: 1 id:: 63413fa8-d3ae-455d-a28e-a264b7979ade
  • ther transitive and indirect errors may appear in the code that need to be part of the co-evolution as well. ls-type:: annotation hl-page:: 1 id:: 63414117-0f48-4efb-8d87-53240ea63f25
  • it is essential to support an automatic co-evolution of code when metamodels evolve ls-type:: annotation hl-page:: 1 id:: 6341413b-751f-4a12-918d-fe489921cefd
  • a new fully automated co-evolution approach of metamodels and cod ls-type:: annotation hl-page:: 1 id:: 6341422c-c8cc-4aa8-b1ad-cf0b13b9d886 hl-stamp:: 1666618435799 hl-color:: green
  • direct and indirect code errors ls-type:: annotation hl-page:: 1 id:: 63414233-0c27-4f8a-9186-76ece6a3783b hl-stamp:: 1666618433388 hl-color:: green
  • pattern matching of the direct error ls-type:: annotation hl-page:: 1 id:: 63414265-b402-4614-8892-8b5e7ef34721 hl-stamp:: 1666618439752 hl-color:: green
  • every matched pattern has a corresponding resolution to co-evolve its error with knowledge present in the metamodel evolution change. ls-type:: annotation hl-page:: 1 id:: 63414276-edf8-465c-bd50-3ae99d29e5eb hl-stamp:: 1666618462360 hl-color:: green
  • ur automatic co-evolution impact the original code behavio ls-type:: annotation hl-page:: 2 id:: 634142b2-bcf3-46a5-9244-8b195c029157
  • We further generate a report of the applied resolutions for each error to help developers in understanding the co-evolution. ls-type:: annotation hl-page:: 2 id:: 634142d8-d40c-45f3-bc61-cd508e53166f
  • have been evolved several times. ls-type:: annotation hl-page:: 2 id:: 63414320-1e41-4204-b0aa-fa677fa7d6fa
  • Deleting the metaclass ProjectDiscovery ls-type:: annotation hl-page:: 2 id:: 63414503-64a6-438a-b00f-f41db3cdaab3
  • enaming the property totalExecutionTimeInSeconds to discoveryTimeInSeconds in metaclass Discovery ls-type:: annotation hl-page:: 2 id:: 6341450a-007d-4026-ac5b-2016706b9038
  • oving the property discoveryTimeInSeconds(after its rename) from metaclass Discovery to DiscoveryIteration ls-type:: annotation hl-page:: 2 id:: 63414c20-99af-4343-a220-245be728ef3e
  • ProjectDiscovery ls-type:: annotation hl-page:: 2 id:: 634150f9-40c2-4db2-8064-7cff9da44534
  • Alternatively, they could also be replaced by a default value rather than removing the whole instruction. ls-type:: annotation hl-page:: 2 id:: 63415116-f905-4144-af56-723224ee9f3c
  • o maintaining the developers code with minimal removal co-evolutio ls-type:: annotation hl-page:: 2 id:: 63415122-4bce-444b-8a2d-3c38a8b3c4a1 hl-stamp:: 1666619437755 hl-color:: purple
  • our automated co-evolution of code with evolving metamodels ls-type:: annotation hl-page:: 3 id:: 63417332-0fdf-4013-a06e-977f51c3a77e
  • how we retrieve the caused errors due to metamodel evolution and the regeneration of the code API ls-type:: annotation hl-page:: 3 id:: 63417430-3610-43be-812b-15969bb19a0e
  • pattern matching proces ls-type:: annotation hl-page:: 3 id:: 6341743a-790c-497b-a138-db70d4eb16ae
  • errors in the additional Java code that depends on the newly generated code API ls-type:: annotation hl-page:: 3 id:: 6341749c-4931-45e2-8a57-d20cffcac020
  • The metamodel changes provide the ingredients and necessary information that are used for the co-evolution ls-type:: annotation hl-page:: 3 id:: 63417552-32f3-4652-94bc-b735f7eb0ffe
  • test case ls-type:: annotation hl-page:: 3 id:: 63417561-0327-479e-ad6b-307cd29dab46
  • atomic and complex change ls-type:: annotation hl-page:: 3 id:: 634175da-748d-485c-a186-2998de311b5e
  • compilation result of the code ls-type:: annotation hl-page:: 4 id:: 6341763d-8231-4408-8b91-639612a112a4
  • , it relies on the compilation result of the code as a more of a dynamic impact analysis to detect the code errors that must be co-evolved ls-type:: annotation hl-page:: 4 id:: 63417647-5264-40ba-8dfb-2f24fab49c6b
  • This is necessary and useful in our approach as we will need to keep updating the list of errors after co-evolving each given error. We detail this process in the next subsections ls-type:: annotation hl-page:: 4 id:: 63417717-ee18-4ab7-8490-2c2957813957
  • Marker ls-type:: annotation hl-page:: 4 id:: 63417735-f4ec-421f-9b1f-de5ca31a6606
  • attern matching ls-type:: annotation hl-page:: 4 id:: 63417755-ad4c-41b8-ae02-31b739eded9b
  • metamodel element M E ls-type:: annotation hl-page:: 4 id:: 634177a0-893e-4b0a-9a97-b63d13b7b349
  • additional code ls-type:: annotation hl-page:: 4 id:: 634177bd-1ec5-4809-94a1-79bfec8142d9 hl-stamp:: 1666624672243 hl-color:: red
  • Pattern of the generated code elements ls-type:: annotation hl-page:: 5 id:: 634177f8-fe5e-4fab-b2a6-f69d4c98c9d0
  • This classification is essential to match the different errors with their corresponding pattern usages in the code, before to co-evolve them with the appropriate resolution strategy ls-type:: annotation hl-page:: 4 id:: 63417871-f8d2-4b1c-874c-a259a542e28d
  • a Java clas ls-type:: annotation hl-page:: 4 id:: 634182db-f090-4ebe-920e-4563df83906b
  • an erro ls-type:: annotation hl-page:: 4 id:: 634182dd-f7c4-4b46-bc28-d3dd968cde94
  • st of metamodel changes ls-type:: annotation hl-page:: 4 id:: 634182e5-03ff-429c-895e-46998b277f2a
  • SimpleName ls-type:: annotation hl-page:: 4 id:: 634182f5-9964-4aa1-8e1e-f125bc3c1a64
  • QualifiedName ls-type:: annotation hl-page:: 4 id:: 634182f7-e025-45e2-8ebe-e5f81ce520bc
  • SingleVariable ls-type:: annotation hl-page:: 4 id:: 634182f9-5383-4455-b5db-54199d9e1016
  • Method ls-type:: annotation hl-page:: 4 id:: 634182fa-377e-4e72-89ec-40cc5d0afadd
  • Declaration ls-type:: annotation hl-page:: 4 id:: 634182fc-2c4f-49fc-8ce3-31082d75537e
  • The approach is based on pattern matching of the direct errors with 1) their cause evolution changes in the metamodel and2) the pattern usages of the generated code elements from the metamodel ls-type:: annotation hl-page:: 1 hl-color:: green id:: 635685cc-d4fc-4f71-99c3-83b04784f2ff hl-stamp:: 1666614751966
  • indirect errors are nonetheless resolved with the existing quick fixes of the IDE ls-type:: annotation hl-page:: 1 hl-color:: yellow id:: 635686e4-9376-4751-8d09-e116bf1c169d hl-stamp:: 1666615020667
  • We evaluated our approach on nine Eclipse projects from OCL, Modisco and Papyrus over several evolved versions of three metamodels. ls-type:: annotation hl-page:: 1 hl-color:: green id:: 63568762-28bc-4be6-9cca-f2c5a1f9adc7
  • Indeed, when a metamodel evolves and as the core API is re-generated again, the additional code implemented by developers can be impacted. As a consequence, the additional code must be coevolved according ls-type:: annotation hl-page:: 1 hl-color:: purple id:: 635693d3-4ea0-43dd-b210-429bdf9a7171
  • only few works addressed the challenge of metamodels and code co-evolutio ls-type:: annotation hl-page:: 1 hl-color:: green id:: 63569427-e182-4fc6-90a1-6f198be0d964
  • We evaluate our approach on three Eclipse EMF implementations, namely OCL [29], Modisco [30], and Papyrus [31] ls-type:: annotation hl-page:: 2 hl-color:: purple id:: 635694e9-4a71-40e5-9bca-f3c634a1a130
  • Our automatic co-evolution approach were able to match 631 pattern usages and applied631 resolutions for the direct errors. 63 out of the 66 indirect errors were resolved with 5 quick fixes ls-type:: annotation hl-page:: 2 hl-color:: yellow id:: 63569538-16f7-465a-9085-d9409a751bb6
  • ”Modisco Discovery Benchmark” metamode ls-type:: annotation hl-page:: 2 hl-color:: green id:: 6356974f-d78a-465a-970b-66dbb7cb141b
  • Excerpt of Modisco Benchmark metamodel in version 0.9.0 ls-type:: annotation hl-page:: 2 hl-color:: red id:: 63569785-8999-4c2e-b13c-44a54cbd3ff8
  • Listing 2 shows the two classes Report and CDOProjectDiscoveryImpl of the additional code in the same project ”Modisco Dsicovery Benchmark” and in an another dependent project, namely the ”Modisco Java Discoverer Benchmark” project ls-type:: annotation hl-page:: 2 hl-color:: green id:: 635697e1-6bba-46ff-a2a6-de24366ddf3c
  • pattern matching step 3 ls-type:: annotation hl-page:: 3 hl-color:: green id:: 6356a3cc-a071-4e82-945d-21a513957ec4
  • that is a connection layer to our co-evolution approach with the existing change detection approaches ls-type:: annotation hl-page:: 3 hl-color:: purple id:: 6356a4c2-f130-4781-9d8d-eb07701c47c1
  • he matched patterns for the erroneous code usage of an evolved metamodel elemen ls-type:: annotation hl-page:: 4 hl-color:: yellow id:: 6356ae68-ffc8-4db9-b6d3-fb6764b8bbbd
  • several patterns can be matched for a given error ls-type:: annotation hl-page:: 4 hl-color:: yellow id:: 6356aeb1-963c-4288-bace-c553eba74171
  • rename ls-type:: annotation hl-page:: 4 hl-color:: yellow id:: 6356af6d-46e3-4661-9be7-a9898eb332d0
  • move ls-type:: annotation hl-page:: 4 hl-color:: yellow id:: 6356af6f-fb2c-4f34-b4f6-6cc6d8f07807
  • Both with the code pattern usages of a literal, i.e., BenchmarkPackage. DISCOVERY TOTAL EXECUTION TIME IN SECONDS. The matched patterns are RenameProperty_Literal and MoveProperty_Literal. In total, we define 33 patterns that we match with the code usages and metamodel changes. Due to lack of space we attach their list as a supplementary material. ls-type:: annotation hl-page:: 4 hl-color:: yellow id:: 6356afa7-ce45-464a-8472-6a888a4ce811
  • . The latter are errors that do not use a generated code elemen ls-type:: annotation hl-page:: 4 hl-color:: red id:: 6356b0ac-17c7-4b2b-9dae-a0cc7b1a6116
  • the error unimplemented method m() of a class C is indirect if not matched with a metamodel change and is repaired with its quick fix add the unimplemented method ls-type:: annotation hl-page:: 4 hl-color:: red id:: 6356b0f9-57a4-49a0-bd39-97461aa6192f
  • Generalize multiplicity of property p from a single to multiple values ls-type:: annotation hl-page:: 7 hl-color:: red id:: 6356b197-d4aa-49a8-ae16-f5aeeb90baf0
  • move ls-type:: annotation hl-page:: 5 hl-color:: red id:: 6356b1df-6dbd-4a94-ab7e-d35ccb301918
    • Moved
  • . the ls-type:: annotation hl-page:: 5 hl-color:: red id:: 6356b23b-54ec-47c0-9187-a8dc53b7c407
  • Note that if new errors are introduced after applying a resolution, they will be handled in the next iterations similarly with our pattern matching and co-evolution algorithms. ls-type:: annotation hl-page:: 5 hl-color:: red id:: 6356b29e-a4a0-4eae-8c33-ff33e66f8804
  • valuation process and the data se ls-type:: annotation hl-page:: 6 hl-color:: green id:: 6356b53e-6786-4249-be97-3f394e0aee1d
  • ability to repair the errors, its time performance and its correctness by using recall and precision metrics ls-type:: annotation hl-page:: 6 hl-color:: green id:: 6356b552-1a66-4538-b2eb-75747122a9ea
  • eplace the original metamodel by the evolved metamodel ls-type:: annotation hl-page:: 6 hl-color:: green id:: 6356b59a-5480-4f5b-9ecf-950aa06810a7
  • we regenerate the code API with EMF ls-type:: annotation hl-page:: 6 hl-color:: green id:: 6356b5a1-c55c-48ca-92cf-c05681e19771
  • System.nanoT ime() for time measuremen ls-type:: annotation hl-page:: 6 hl-color:: red id:: 6356b5df-4d73-4324-8c05-53955584aec0
  • co-evolved how they were manually coevolved by developers ls-type:: annotation hl-page:: 6 hl-color:: red id:: 6356b631-83a3-4025-87b2-4d7ae428fad4
  • To do so, we rely on Evosuite [45], a popular tool for test cases generation, as it is widely used by research and by developers ls-type:: annotation hl-page:: 6 hl-color:: yellow id:: 6356b68c-fa20-4c45-943d-cf05386d8414
  • Thus, the three case studies cover standard, academic, and industrial languages that have evolved several times for more than 10 years of continuous development period. ls-type:: annotation hl-page:: 6 hl-color:: green id:: 6356b6f6-5b2a-4ba2-8f09-d83bea69b51e
  • Handling the scenario code co-evolution due to multiple metamodels evolution is left for future work. ls-type:: annotation hl-page:: 6 hl-color:: purple id:: 6356bcef-4142-438f-87f7-0df27582382f
  • 330 atomic changes, including 19 complex changes in the three metamodels ls-type:: annotation hl-page:: 7 hl-color:: green id:: 6356be4b-0809-4b31-a07a-d62565f472c2
  • LOC ls-type:: annotation hl-page:: 8 hl-color:: yellow id:: 6356be9a-b3d6-4dbc-add3-cbd385090a2b
  • correctly ls-type:: annotation hl-page:: 7 hl-color:: yellow id:: 6356bec7-0278-41d9-80cf-8a3d9e59419b
  • ests execution before and after co-evolution. ls-type:: annotation hl-page:: 7 hl-color:: yellow id:: 6356bef7-8937-48f0-a7fa-b2a0d60ec61f
  • . o ls-type:: annotation hl-page:: 7 hl-color:: red id:: 6356bf7c-bfb5-4761-b599-0b77ce46e80a
  • hus, reducing significantly the burden of manual intervention from developers required only in 2 out 9 projects while covering all co-evolution cases. ls-type:: annotation hl-page:: 7 hl-color:: yellow id:: 6356bfa7-db55-4fc1-83a9-47a049ce4714 hl-stamp:: 1666629549621
  • the errors in its usages were corrected automaticall ls-type:: annotation hl-page:: 7 hl-color:: red id:: 6356c030-abb1-4cf9-aaf8-aae34d80803a
  • 771 direct errors, a total of 631 patterns were matched and 631 resolutions were applied. ls-type:: annotation hl-page:: 7 hl-color:: yellow id:: 6356c19a-ae8e-431b-95ae-6bfc985a821a
  • To assess and measure precision and recall of our automatic co-evolution, we first compared it with the the manual co-evolution of the code that developers went through ls-type:: annotation hl-page:: 8 hl-color:: yellow id:: 6356c209-652c-4276-9ad4-60bd0660cfc8
  • Whereas, the developers manual co-evolution consisted in deleting them. This may hint on a lack of an automated coevolution support that would have easily maintained the code in the new version rather than deleting it. ls-type:: annotation hl-page:: 9 hl-color:: yellow id:: 6356c2dd-d1dc-4103-a911-cd4fe7f787d8
  • to check the behavioral effect of the co-evolution we observed the tests execution that we generated for the original and co-evolved cod ls-type:: annotation hl-page:: 9 hl-color:: yellow id:: 6356c321-2c39-4811-84f2-36ebd5a957a1
  • Generated tests for original and coevolved code further showed that our co-evolution is not impacting the original code behavior w.r.t. the generated tests. ls-type:: annotation hl-page:: 9 hl-color:: yellow id:: 6356c3d7-ca9b-4062-b6e0-c97443a6ded9
  • Nguyen et al. [57] also proposed an approach that guides developers in adapting code by learning adaptation patterns from previously migrated code ls-type:: annotation hl-page:: 10 hl-color:: yellow id:: 6356c4a5-53cb-481e-ba35-614997f071c5
  • For indirect errors that could not be matched, we apply the available quick fix to repair it. ls-type:: annotation hl-page:: 10 hl-color:: yellow id:: 6356c5bd-c5a5-419b-ac00-6ba360f33a02
  • errors ls-type:: annotation hl-page:: 10 hl-color:: yellow id:: 6356ca63-0f75-43e8-8167-73a6dec1d012