OpenOffice++: Improving the Quality of Open Source Software


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

OpenOffice++: Improving the Quality of Open Source Software

  1. 2. OpenOffice++ <ul><ul><li>Improving the Quality of Open Source Software </li></ul></ul>Rudolf Ferenc, PhD Árpád Beszédes, PhD Tibor Gyimóthy, PhD University of Szeged FrontEndART Ltd. Hungary Zsolt Bagoly, PhD Dániel Darabos MultiRacio Ltd. Hungary GVOP-3.1.1.-2004-05-345/3.0
  2. 3. Agenda <ul><li>Introduction </li></ul><ul><li>The OpenOffice++ R&D project </li></ul><ul><li>Source code quality assurance today </li></ul><ul><li>Goal of the project </li></ul><ul><li>Columbus quality assurance tools </li></ul><ul><li>Tasks of the project </li></ul><ul><li>Results </li></ul>
  3. 4. Our previous open source activities <ul><li>The official code-size and performance benchmark of GCC </li></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><li>Various compiler optimizations in GCC </li></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><li>Monitoring the quality of Mozilla </li></ul><ul><ul><li> </li></ul></ul><ul><li>Improvement of the JFFS2 filesystem </li></ul><ul><ul><li> </li></ul></ul>
  4. 5. The OpenOffice++ R&D project <ul><li>OpenOffice++: Improving the Quality of Open Source Software </li></ul><ul><ul><li>Funded by EU-supported Hungarian national grant no. GVOP-3.1.1.-2004-05-0345/3.0 and by MultiRacio Ltd. </li></ul></ul><ul><li>Participants </li></ul><ul><ul><li>MultiRacio Ltd., Hungary </li></ul></ul><ul><ul><li>Department of Software Engineering, University of Szeged, Hungary </li></ul></ul><ul><li>Size & duration </li></ul><ul><ul><li>0.54 M€ (0.4 M€ grant and 0.14 M€ by MultiRacio) </li></ul></ul><ul><ul><li>2004-11-01 – 2006-12-31 </li></ul></ul>
  5. 6. Similar projects <ul><li>Software Quality Observatory for Open Source Software (SQO-OSS) </li></ul><ul><ul><li>2.5 M€ EU FP6 fund ( ) </li></ul></ul><ul><li>Quality of Open Source Software (QUALOSS) </li></ul><ul><ul><li>3 M€ EU FP6 fund ( ) </li></ul></ul><ul><li>Free / libre / open source software metrics and benchmarking study (FLOSSMETRICS) </li></ul><ul><ul><li>0.58 M€ EU fund ( ) </li></ul></ul><ul><li>Vulnerability Discovery and Remediation, Open Source Hardening project </li></ul><ul><ul><li>1.24 M$ US Department of Homeland Security fund </li></ul></ul>
  6. 7. Quality decrease <ul><li>Idealized and actual failure curves for software </li></ul>
  7. 8. Quality assurance today <ul><li>Currently, in most of the cases, quality assurance of source code means testing ! </li></ul><ul><li>That's good! </li></ul><ul><li>But it is not enough ! </li></ul><ul><ul><li>See e.g. the ISO/IEC 9126 & CMMI standards </li></ul></ul><ul><li>Tool-supported source code analysis is needed! </li></ul><ul><li>The quality assurance of OO.o source code is fundamental! </li></ul>
  8. 9. Goal of the OpenOffice++ project <ul><li>Develop methods and tools for the quality assurance of OO.o C++ source code </li></ul><ul><ul><li>Adapt the Columbus software maintenance methodology and tool set </li></ul></ul><ul><ul><ul><li>FrontEndART Ltd. (spin-off company of the university) </li></ul></ul></ul><ul><ul><ul><li>Originally an R&D project supported by Nokia </li></ul></ul></ul><ul><ul><ul><li>Partners: Nokia, evoSoft, GraphiSoft, Nuance-Recognita, … </li></ul></ul></ul><ul><li>Analyze the source code of OO.o </li></ul><ul><ul><li>Static source code analysis </li></ul></ul><ul><li>Fix the source code </li></ul><ul><ul><li>Manual work </li></ul></ul>
  9. 10. Columbus quality assurance tools <ul><li>Robust static source code analyzers </li></ul><ul><ul><li>C, C++, Java, C# languages </li></ul></ul><ul><ul><li>Build models (abstract semantic graphs, flow graphs) of source code conforming to well-defined metamodels from source code </li></ul></ul><ul><ul><li>Programming interface (API) in C++ </li></ul></ul><ul><ul><li>Enables whole-system analysis </li></ul></ul><ul><li>Source code analysis methodologies </li></ul><ul><ul><li>Integration into compilation environments </li></ul></ul><ul><ul><li>Compiler wrapping </li></ul></ul><ul><ul><li>Analysis performed transparently in parallel with compilation </li></ul></ul>
  10. 11. <ul><li>Reverse engineering </li></ul><ul><ul><li>Creation of high-level documents from code </li></ul></ul><ul><ul><ul><li>UML diagrams, XML, HTML, design pattern detection, call-graph, etc. </li></ul></ul></ul><ul><li>Source code auditing </li></ul><ul><ul><li>Calculating metrics, detecting bugs & bad smells, checking conformance to coding guidelines </li></ul></ul><ul><li>Monitoring system </li></ul><ul><ul><li>Analysis results are continuously stored in a SQL database </li></ul></ul><ul><ul><li>Web browser access to the data through diagrams, charts and reports </li></ul></ul> Columbus quality assurance tools
  11. 12. Tasks of the project <ul><li>Steps taken during the OOo++ project </li></ul><ul><li>1. Set up software quality indicators </li></ul><ul><ul><li>62 pages study (in hungarian) </li></ul></ul><ul><ul><li>Tibor Gyimóthy, Rudolf Ferenc and István Siket. Empirical validation of object-oriented metrics on open source software for fault prediction . IEEE Transactions on Software Engineering, 31(10):897–910, 2005. </li></ul></ul><ul><li>Main observations </li></ul><ul><ul><li>Some metrics are good indicators of software quality </li></ul></ul><ul><ul><li>Some metrics are good predictors of bugs ! </li></ul></ul>
  12. 13. Tasks of the project – Metrics <ul><li>2. Calculate Metrics </li></ul><ul><ul><li>„You can’t manage what you can’t control, and you can’t control what you don’t measure.” (Tom DeMarco) </li></ul></ul><ul><li> 2.0.4 source code </li></ul><ul><ul><li>More than a decade of development </li></ul></ul><ul><ul><li>5 million program lines </li></ul></ul><ul><ul><li>27 thousand classes </li></ul></ul><ul><ul><li>330 thousand functions </li></ul></ul>
  13. 14. Tasks of the project – Bad smells <ul><li>3. Detect bad smells </li></ul><ul><ul><li>Bad smells indicate design problems and degrade software quality and maintainability </li></ul></ul><ul><li>Bad smells in the code can be automatically detected </li></ul><ul><li>Detection was enhanced by machine learning </li></ul>
  14. 15. <ul><li>Machine learning database </li></ul><ul><ul><li>Manual evaluation of the detected bad smells </li></ul></ul><ul><ul><li>We analyzed and categorized 6238 bad smells </li></ul></ul><ul><ul><ul><li>Manual work by MultiRacio, who has 5 years experience with OO.o source code </li></ul></ul></ul><ul><ul><li>We enhanced the detection algorithm with machine learning </li></ul></ul>Tasks of the project – Bad smells
  15. 16. <ul><li>4. Identify coding errors </li></ul><ul><ul><li>Detect coding constructs leading to errors </li></ul></ul><ul><li>We manually analyzed the OO.o issue database </li></ul><ul><ul><li>We looked for bugfixes from the past to find repeatedly occurring problems (4605 issues!) </li></ul></ul><ul><ul><li>We created new OO.o-specific rules </li></ul></ul>Tasks of the project – Bug detection Memory problems Dangerous constructs
  16. 17. Tasks of the project – Bug detection <ul><li>Examples of serious problems </li></ul>
  17. 18. Tasks of the project – Evaluation <ul><li>5. Evaluate the quality of source code </li></ul><ul><ul><li>50 pages study </li></ul></ul><ul><ul><li>the complexity of the code is surprisingly low, but </li></ul></ul><ul><ul><li>the high coupling value of the classes may cause problems </li></ul></ul>Complexit y index Coupling index
  18. 19. Tasks of the project – Evaluation <ul><li>We compared the source code quality of the main versions of during the project </li></ul><ul><ul><li>1.1.4 / 1.1.5 / 2.0.0 / 2.0.1 / 2.0.2 / 2.0.3 / 2.0.4 </li></ul></ul><ul><ul><li>The size increased a lot </li></ul></ul><ul><ul><li>Unfortunately, the number of problems in the code increased as well </li></ul></ul>
  19. 20. Tasks of the project – Evaluation <ul><li>The most problematic classes are the following </li></ul>
  20. 21. Tasks of the project – Bugfixing <ul><li>6. Perform bugfixes </li></ul><ul><li>Phase I. (before machine learning) </li></ul><ul><ul><li>Based on bad smells, 55 bugfixes in 38 files </li></ul></ul><ul><li>Phase II. (improved algorithm based on machine learning) </li></ul><ul><ul><li>Fixing the most problematic code segments </li></ul></ul><ul><ul><li>129 bugfixes in 58 files </li></ul></ul><ul><li>Altogether 184 bugfixes </li></ul>
  21. 22. Tasks of the project – Bugfixing <ul><li>The bugfixes were prepared for versions 1.1.5 – 2.0 </li></ul><ul><li>From the 184 bugfixes only 9 were not compatible with 2.1.0 code </li></ul><ul><ul><li>5 out of 9 were already fixed in code, in the 4 remaining positions the code changed significantly </li></ul></ul><ul><li>We submitted the bugfixes (patches) to the OO.o developer community and most of them were accepted </li></ul>
  22. 23. <ul><li>The results of the analysis are open and publicly available </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li>We continue the analysis, and </li></ul><ul><li>welcome your support! :-) </li></ul>
  23. 24. <ul><li>Questions? </li></ul><ul><li>Links </li></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul>