Eclipse API Usage The Good and The Bad
Eclipse API Usage: The Good and The Bad John Businge, Alexander Serebrenik, Mark van den Brand
Ugandan Software Engineering and Technology (SET) 6 -6 -2021 PAGE 1
The Eclipse Framework P 1 Software Engineering and Technology (SET) P 2 P 3 P 4 Eclipse Thirdparty Plug-ins (ETPs) 6 -6 -2021 PAGE 2
The Eclipse Framework … Eclipse APIs(“good”) • no “internal” • stable, • supported P 1 Software Engineering and Technology (SET) Eclipse non-APIs (“bad”) • “internal” • unstable, • discouraged, • unsupported Eclipse Framework P 2 P 3 P 4 Eclipse Thirdparty Plug-ins (ETPs) 6 -6 -2021 PAGE 3
Research Questions … • Qn. 1 – To what extent developers depend on “bad” APIs? • Qn. 2 – Do developers continue to use “bad” APIs? • Qn. 3 – Can we identify differences between ETPs that use “bad” APIs and those that do not? • Qn. 4 – What are the commonly used “bad” APIs? Software Engineering and Technology (SET) 6 -6 -2021 PAGE 5
Qn. 1 – The extent to which developers depend on “bad” APIs? • ETP-APIs: all versions ETPs dependent on “good” APIs. • ETP-non-API: ETPs with at least one version dependent on a “bad” API Software Engineering and Technology (SET) 6 -6 -2021 PAGE 6
Qn. 1 – The extent to which developers depend on “bad” APIs? ………. . Release Year 2003 2004 2005 2006 2007 2008 2009 2010 Total ETP – Total <80 -- 395> <35 -- 93> <77 -- 323> <33 -- 93> <73 -- 322> <41 -- 98> <97 -- 368> <61 -- 128> <57 -- 200> <37 -- 123> <62 -- 154> <38 -- 90> <40 -- 72> <25 -- 34> <26 -- 39> <16 -- 28> <512 -- 1873> <286 -- 687> <Total # of ETPs released in a given year Software Engineering and Technology (SET) ETP-API ETP-non-API <45 -- 302> <44 -- 230> <32 -- 224> <36 -- 240> <20 -- 77> <24 -- 64> <15 -- 38> <10 -- 11> <226 -- 1186> -- Total accumulated # of versions until 2010 > 6 -6 -2021 PAGE 7
Qn. 1 – The extent to which developers depend on “bad” APIs? ………. . Release Year 2003 2004 2005 2006 2007 2008 2009 2010 Total ETP – Total ETP-API <80 -- 395> <35 -- 93> <77 -- 323> <33 -- 93> <73 -- 322> <41 -- 98> <97 -- 368> <61 -- 128> <57 -- 200> <37 -- 123> <62 -- 154> <38 -- 90> <40 -- 72> <25 -- 34> <26 -- 39> <16 -- 28> <512 -- 1873> <286 -- 687> ETP-non-API <45 -- 302> <44 -- 230> <32 -- 224> <36 -- 240> <20 -- 77> <24 -- 64> <15 -- 38> <10 -- 11> <226 -- 1186> 55. 8% 44. 2% <Total # of ETPs released in a given year -- Total accumulated # of versions until 2010> Software Engineering and Technology (SET) 6 -6 -2021 PAGE 8
Qn. 2 Continued use of “bad” APIs • ETP-non-APIs: − only bad ETPs: all versions depend on a bad API − good-bad ETPs: earlier versions depend solely on good APIs and latter versions depend on a bad API − bad-good ETPs: earlier versions depend on a bad API and latter versions depend solely on good APIs − Oscillating ETPs: oscillating between versions that depend solely on good APIs and versions that depend on a bad API Software Engineering and Technology (SET) 6 -6 -2021 PAGE 9
Qn. 2 Continued use of “bad” APIs … Eclipse Rel. “only bad” “good-bad” “bad-good” “oscillating” 2003 <33 -- 183> <8 -- 55> <0 -- 0> <3 -- 64> 2004 <35 -- 143> <4 -- 33> <3 -- 24> <2 -- 30> 2005 <29 -- 171> <3 -- 45> <1 -- 8> <0 -- 0> 2006 <25 -- 138> <8 -- 64> <1 -- 6> <2 -- 32> 2007 <16 -- 36> <3 -- 23> <0 -- 0> <1 -- 18> 2008 <22 -- 60> <2 -- 4> <0 -- 0> 2009 <11 -- 18> <3 -- 17> <1 -- 3> <0 -- 0> 2010 <10 -- 11> <0 -- 0> Total <181 -- 760> <31 -- 241> <6 -- 41> <8 -- 144> Software Engineering and Technology (SET) 6 -6 -2021 PAGE 10
Qn. 2 Continued use of “bad” APIs … Eclipse Rel. “only bad” “good-bad” “bad-good” “oscillating” 2003 <33 -- 183> <8 -- 55> <0 -- 0> <3 -- 64> 2004 <35 -- 143> <4 -- 33> <3 -- 24> <2 -- 30> 2005 <29 -- 171> <3 -- 45> <1 -- 8> <0 -- 0> 2006 <25 -- 138> <8 -- 64> <1 -- 6> <2 -- 32> 2007 <16 -- 36> <3 -- 23> <0 -- 0> <1 -- 18> 2008 <22 -- 60> <2 -- 4> <0 -- 0> 2009 <11 -- 18> <3 -- 17> <1 -- 3> <0 -- 0> 2010 <10 -- 11> <0 -- 0> Total <181 -- 760> <31 -- 241> <6 -- 41> <8 -- 144> • Much more “only bad” ETPs than “bad-good” ETPs • Elimination of “bad” APIs in evolving ETPs is limited. • More “good-bad” ETPs than “bad-good” ETPs • Conjecture: Functionality the ETPs require available solely in “bad” APIs Software Engineering and Technology (SET) 6 -6 -2021 PAGE 11
Qn. 3 Differences between ETPs that use “good” and “bad” APIs • Metric Analysis: only good ETPs vs only bad ETPs. − NOF - the number of Java files. − NOF-D - the number of Java files that have at least one import statement related to Eclipse SDK interfaces. − D-Tot - the number of import statements related to Eclipse SDK interfaces. − D-Uniq - the number of unique import statements related to Eclipse SDK interfaces. Software Engineering and Technology (SET) 6 -6 -2021 PAGE 12
Qn. 3 Differences between ETPs that use “good” and “bad” APIs • Metric Analysis: only good ETPs vs only bad ETPs. − NOF - the number of Java files. Size Metrics − NOF-D - the number of Java files that have at least one import statement related to Eclipse SDK interfaces. − D-Tot - the number of import statements related to Eclipse SDK interfaces. Eclipse Use Functionality Metrics − D-Uniq - the number of unique import statements related to Eclipse SDK interfaces. Software Engineering and Technology (SET) 6 -6 -2021 PAGE 13
Qn. 3 Differences between ETPs that use “good” and “bad” APIs ……Histogram Software Engineering and Technology (SET) 6 -6 -2021 PAGE 14
Qn. 3 Differences between ETPs that use “good” and “bad” APIs ……Histogram • only good ETPs are more concentrated to the left and long and only bad ETPs spread and short • only bad ETPs use extensive functionality from Eclipse SDK compared to only good ETPs • Metrics NOF, NOF-D and D-Tot exhibit similar trends • only bad ETPs are comparatively larger than only good ETPs and also use more functionality from Eclipse SDK • Supported by a formal statistical analysis Software Engineering and Technology (SET) 6 -6 -2021 PAGE 15
Qn. 4 Commonly used “bad” APIs • Commonly used “bad” APIs candidates for “good” APIs in future Eclipse releases. • 181 only bad ETPs 1, 717 “bad” APIs • 1, 525 of the 1, 717 still exist in Eclipse SDK 3. 7 • 161 of the 1, 525 are used by at least 2 ETPs “bad” API org. eclipse. jdt. internal. ui. Java. Plugin org. eclipse. jdt. internal. core. Java. Project org. eclipse. ui. internal. ide. IDEWorkbench. Plugin org. eclipse. jdt. internal. corext. util. Java. Model. Util org. eclipse. jdt. internal. ui. Java. Plugin. Images Software Engineering and Technology (SET) # ETPs 28 15 14 12 11 6 -6 -2021 PAGE 19
Qn. 4 Commonly used “bad” APIs …. . Histogram Software Engineering and Technology (SET) 6 -6 -2021 PAGE 20
Qn. 4 Commonly used “bad” APIs …. . • Distribution is positively skewed: many bad-APIs-used -by-few-ETPs and few bad. APIs-used-by-many-ETPs • The ETPs that have common bad APIs are a small subset of the 181 ETPs • ETPs use a diverse set of non. APIs Software Engineering and Technology (SET) 6 -6 -2021 PAGE 21
Conclusions • Qn. 1 – To what extent developers depend on “bad” APIs? 44. 2% of the 512 ETPs used “bad” APIs • Qn. 2 – Do developers continue to use “bad” APIs? Yes: Elimination of “bad” APIs in evolving ETPs is limited • Qn. 3 – What are the differences between ETPs that use “bad” APIs and those that do not? only bad ETPs are comparatively larger than only good ETPs and also use more functionality from Eclipse SDK • Qn. 4 – What are the commonly used “bad” APIs? ETPs use a diverse set of non-APIs Software Engineering and Technology (SET) 6 -6 -2021 PAGE 24
Future Work • Survival of the ETPs in new releases of Eclipse • Predicting compatibility of an ETP in new releases of Eclipse Software Engineering and Technology (SET) 6 -6 -2021 PAGE 25
Thank you! • Questions? ? Software Engineering and Technology (SET) 6 -6 -2021 PAGE 26
- Slides: 21