Voronoi Treemaps for the Visualization of Software Metrics

Voronoi Treemaps for the Visualization of Software Metrics

Voronoi Treemaps for the Visualization of Software Metrics Michael Balzer Oliver Deussen University of Konstanz, Germany University of Konstanz, Germany Claus Lewerentz Brandenburg University of Technology Cottbus, Germany Abstract 1 Introduction Software systems are very complex hierarchical structures consist- ing of thousands of entities and millions of lines of code. Typical hierarchy levels of software entities are nested subsystems, pack- ages, modules, functions, classes, methods, and attributes, whereby in large systems one may find up to 20 or more levels. In particular, object-oriented software systems are constructed using an explicit and rich hierarchical structure provided by modelling and program- ming languages like UML or Java/C++. Good quality assurance of these often extensive and complex systems, their components, and their development process, has become a decisive competitive ad- vantage. The concerning methods and tools that support the devel- opers in the stages of analysis, design, implementation, and docu- mentation of the software, are therefore of fundamental importance. Software metrics are quantitative measures of the degree to which a software system, a component, or process possesses a given at- tribute [of the IEEE Computer Society 1990]. They allow the identification of problem areas, the illustration of tendencies, and thereby help to improve the quality of software products as well as to increase the efficiency of the development process. In the con- text of program comprehension and quality analysis of large soft- ware systems, a enormous number of software metrics have been defined. These are used to quantitatively characterize properties of software entities, and to provide numerical abstractions of the enti- ties themselves [Pfleeger et al. 1997]. Examples of software metrics are the widely used lines of code measure or the number of public In this paper we present a hierarchy-based visualization ap- attributes in a class. proach for software metrics using Treemaps. Contrary to existing rectangle-based Treemap layout algorithms, we introduce layouts In the field of software visualization different approaches exist to based on arbitrary polygons that are advantageous with respect to address the problem of creating visual representations of hierarchi- the aspect ratio between width and height of the objects and the cal software systems. 2D and 3D graphs focus on the relational identification of boundaries between and within the hierarchy lev- structure of software entities including the hierarchy aspects [Lew- els in the Treemap. The layouts are computed by the iterative relax- erentz and Noack 2003; Noack 2003]. In such approaches met- ation of Voronoi tessellations. Additionally, we describe techniques rics values are represented by visual attributes like size or color of that allow the user to investigate software metric data of complex graph nodes denoting the software entities. Other tools like Code- systems by utilizing transparencies in combination with interactive Crawler [Demeyer et al. 1999] focus on the metrics aspect, espe- zooming. cially to represent multiple metric values for one software entity. A well known early tool for visualizing software metric data is CR Categories: D.2.8 [Software Engineering]: Metrics—; I.3.8 SeeSoft [Eick et al. 1992], which arranges lines of code as pixels [Computer Graphics]: Applications—; in a box, whereby their color stands for a certain value of a cho- sen metric. The newer tool Visual Insight [Eick et al. 2002] offers Keywords: Treemaps, Software Metrics, Voronoi Diagrams some visualizations for software metrics, although these represen- tations are mostly bar, line, and pie charts, matrix views, and graph representations. However, the hierarchy of the entities as a funda- mental characteristic of software systems is ignored by these and many other existing visualization tools. Most of the metrics-based approaches do neither support the hierarchical structure nor the re- quirements to create metrics-based views on higher abstraction lev- els. Additionally, an important advantage of using the hierarchy in the visualization is to clearly represent even extensive software systems [Balzer et al. 2004]. One of the rare tools in the domain of software visualization that follows this hierarchy-based approach is GAMMATELLA [Orso et al. 2003]. It visualizes program-execution data for deployed soft- ware by using Treemaps [Johnson and Shneiderman 1991], an in the information visualization community well-known and popular 3 Previous Work on Treemaps approach for hierarchical data. Here a given area is recursively subdivided by a given hierarchy without producing holes or over- Treemaps were introduced by Shneiderman and Johnson in lappings. The existing layout algorithms for Treemaps are solely 1991 [Johnson and Shneiderman 1991]. Originally designed to vi- restricted to rectangular subdivisions, which however are disadvan- sualize files on a hard drive, Treemaps have been applied to a wide tageous with respect to the aspect ratio between width and height of variety of domains ranging from financial analysis [Jungmeister and the objects and the identification of boundaries between and within Turo 1992; Wattenberg 1998] to sports reporting [Jin and Banks the hierarchy levels. 1997]. The basic idea is to subdivide a given area without producing In this paper we present a method allowing us to generate Treemaps holes or overlappings. Therefore the area is alternately divided hor- consisting of arbitrary polygons that enable a meaningful visual- izontally and vertically according to the hierarchy of the objects and ization of software metrics based on the hierarchy of a software the given proportion between the considered objects. Figure 2 illus- system. In the following section we address the data and the char- trates this method with a simple example. Each node has a name acteristics of the visualized software metrics. In Section 3 previous and an associated size. The Treemap is constructed via recursive work on Treemaps is outlined. Our approach of Voronoi Treemaps subdivision of the initial rectangle. The size of each sub-rectangle is presented in Section 4. Section 5 deals with assisting the user corresponds to the size of the node. The direction of the subdi- in the exploration of the data in the Treemaps. Section 6 summa- vision alternates per level: first horizontally, next vertically, again rizes our approach and discusses our future work. Examples of our horizontally, etc. The initial rectangle is partitioned into smaller Voronoi Treemap visualizations of software metrics are shown in rectangles, so that the size of each rectangle reflects the size of the Section 7. leaf. As a result of its construction, the Treemap reflects the struc- ture of the tree. This original Treemap layout algorithm is called Slice-and-Dice. 2 Underlying Data Our structural models of object-oriented software distinguish five types of software entities: packages, classes, methods, attributes, and files. Each package can contain other packages, classes, and files. Each class can contain other classes, methods, and attributes. The schema of the models is shown in Figure 1. Figure 2: Tree diagram and corresponding Treemap A negative effect in these layouts is however, that the subdivision in each step is solely done in one dimension. As result, thin elon- gated rectangles with a high aspect ratio between width and height emerge, if many objects or objects with high diversity in size are considered. Such long rectangles are difficult to see, select, com- pare in size, and label [Turo and Johnson 1992; Bruls et al. 2000]. Figure 1: Schema for hierarchical models of object-oriented soft- Figure 3 presents an example. ware systems This issue is addressed by Ordered Treemaps [Shneiderman and Wattenberg 2001], Squarified Treemaps [Bruls et al. 2000], Clus- Such models can be automatically extracted from the source code tered Treemaps [Wattenberg 1999], and some other layout algo- of object-oriented software systems. In our experiments we used rithms. These layouts subdivide the area of the initial rectangle in the tool Sotograph [Software-Tomography GmbH ] to extract the one step by both dimensions, meaning horizontally and vertically at models from Java programs. The extracted models are stored in the same time. The main optimization criterion of these layout algo- files in Rigi Standard Format [Wong 1998]. Through the separation rithms is the approximation of the sub-rectangles to the shape of a of extraction from visualization, and the use of a standard exchange square, whereby the aspect ratio between width and height of each format, it is possible to visualize data from many sources. In partic- rectangle converges to one. Aside from the aspect ratio criterion, ular, they can be applied to software in any programming language other criteria are considered as well. For example the order of the for which an appropriate extractor is available. objects or the nearness to a given point in the initial area, whereby the other criteria are often closely related to the respective applica- After extracting the models we possess a number of different soft- tion domain. A demonstrative member of this group of advanced ware metrics for the different entity types. They range from the Treemap layout algorithms is presented in Figure 4, showing the indication of size of the entities over the use by other entities, to same data set as in Figure 3 with a Squarified Treemap layout that cyclic dependencies,

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    9 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us