SCG News

Empirically-Grounded Construction of Bug Prediction and Detection Tools

Haidar Osman. Empirically-Grounded Construction of Bug Prediction and Detection Tools. PhD thesis, University of Bern, December 2017. Details.


There is an increasing demand on high-quality software as software bugs have an economic impact not only on software projects, but also on national economies in general. Software quality is achieved via the main quality assurance activities of testing and code reviewing. However, these activities are expensive, thus they need to be carried out efficiently. Auxiliary software quality tools such as bug detection and bug prediction tools help developers focus their testing and reviewing activities on the parts of software that more likely contain bugs. However, these tools are far from adoption as mainstream development tools. Previous research points to their inability to adapt to the peculiarities of projects and their high rate of false positives as the main obstacles of their adoption. We propose empirically-grounded analysis to improve the adaptability and efficiency of bug detection and prediction tools. For a bug detector to be efficient, it needs to detect bugs that are conspicuous, frequent, and specific to a software project. We empirically show that the null-related bugs fulfill these criteria and are worth building detectors for. We analyze the null dereferencing problem and find that its root cause lie in methods that return null. We propose an empirical solution this problem that depends on the wisdom of the crowd. For each API method, we extract the nullability measure that expresses how often the return value of this method is checked against null in the ecosystem of the API. We use nullability to annotate API methods with nullness annotation and warn developers about missing and excessive null checks. For a bug predictor to be efficient, it needs to be optimized as both a machine learning model and a software quality tool. We empirically show how feature selection and hyperparameter optimizations improve prediction accuracy. Then we optimize bug prediction to locate the maximum number of bugs in the minimum amount of code by finding the most cost-effective combination of bug prediction configurations, i.e. dependent variables, machine learning model, and response variable. We show that using both source code and change metrics as dependent variables, applying feature selection on them, then using an optimized Random Forest to predict the number of bugs results in the most cost-effective bug predictor. Throughout this thesis, we show how empirically-grounded analysis helps us achieve efficient bug prediction and detection tools and adapt them to the characteristics of each software project.

Posted by scg at 23 November 2017, 5:15 pm comment link

Improving live debugging of concurrent threads through thread histories

Max Leske, Andrei Chiş, and Oscar Nierstrasz. Improving live debugging of concurrent threads through thread histories. In Science of Computer Programming, 2017. Details.


Concurrency issues are inherently harder to identify and fix than issues in sequential programs, due to aspects like indeterminate order of access to shared resources and thread synchronisation. Live debuggers are often used by developers to gain insights into the behaviour of concurrent programs by exploring the call stacks of threads. Nevertheless, contemporary live debuggers for concurrent programs are usually sequential debuggers augmented with the ability to display different threads in isolation. To these debuggers every thread call stack begins with a designated start routine and the calls that led to the creation of the thread are not visible, as they are part of a different thread. This requires developers to manually link stack traces belonging to related but distinct threads, adding another burden to the already difficult act of debugging concurrent programs. To improve debugging of concurrent programs we address the problem of incomplete call stacks in debuggers through a thread and debugger model that enables live debugging of child threads within the context of their parent threads. The proposed debugger operates on a virtual thread that merges together multiple relevant threads. To better understand the features of debuggers for concurrent programs we present an in-depth discussion of the concurrency related features in current live debuggers. We test the applicability of the proposed model by instantiating it for simple threads, local and remote promises, and a remote object-oriented database. Starting from these use cases we further discuss implementation details ensuring a practical approach.

Posted by scg at 20 November 2017, 4:15 pm comment link

ClubAdmin — Implementing a Sports Club Event Manager

Dominik Fankhauser. ClubAdmin — Implementing a Sports Club Event Manager. Bachelor’s thesis, University of Bern, November 2017. Details.


Today, no existing club management software offers clubs a possibility to organize the human resources at their events in an adequate way. Available applications do not provide organizing committees with enough functionality to ensure that tasks and responsibilities are distributed fairly between a club’s members over the course of a full season. Instead, clubs often rely on techniques such as e-mail and spreadsheets to keep track of the tasks at an event or the member collaboration throughout a season. The use of these simple techniques and processes increases the complexity for the responsible event managers. Their work needs more communication, takes more time, and is more error prone. On the other hand, club members need to keep in mind when and where they have to help at upcoming events as they do not have a way to look up this information except for contacting the responsible person directly. In this thesis we describe the web application ClubAdmin which has been developed for the floorball club Unihockeyteam Eggiwil1. Aside from member, sponsor, and open issue management modules, our system provides an event management module which is accessible to the board (as the event organizer) and to the club members. The club can manage all aspects of event management such that existing cumbersome workflows are fully replaced.

Posted by scg at 14 November 2017, 4:15 pm comment link

Moldable Tools for Object-oriented Development

Andrei Chiş, Tudor Gîrba, Juraj Kubelka, Oscar Nierstrasz, Stefan Reichhart, and Aliaksei Syrel. Moldable Tools for Object-oriented Development. In Bertrand Meyer Manuel Mazzara (Ed.), PAUSE: Present And Ulterior Software Engineering, p. 77—101, Springer, Cham, 2017. Details.


Object-oriented programming aims to facilitate navigation between domain concepts and the code that addresses those domains by enabling developers to directly model those domain concepts in the code. To make informed decisions developers then formulate detailed and domain-specific questions about their systems in terms of domain concepts, and use tools to explore available information and answer those questions. Development tools however focus mainly on object-oriented idioms and do not expose or exploit domain concepts constructed on top of object-oriented programming idioms. Analysis tools are typically not tightly integrated with development tools. This has a negative effect on program comprehension, increasing the effort and the time for obtaining answers. To improve program comprehension we propose to better integrate domain concepts and program comprehension tools into the development environment through moldable tools. Moldable tools are development tools that are aware of the current development context and support inexpensive creation of domain-specific extensions. We elaborate on the idea of moldable tools and show how to apply moldable tools to support object-oriented programming. Through practical examples we show how developers can embed domain concepts into their development tools.

Posted by scg at 13 November 2017, 9:32 am comment link

Mining Inline Cache Data to Order Inferred Types in Dynamic Languages

Nevena Milojković, Clément Béra, Mohammad Ghafari, and Oscar Nierstrasz. Mining Inline Cache Data to Order Inferred Types in Dynamic Languages. In Science of Computer Programming, Elsevier, Special Issue on Adv. Dynamic Languages, 2017. Details.


The lack of static type information in dynamically-typed languages often poses obstacles for developers. Type inference algorithms can help, but inferring precise type information requires complex algorithms that are often slow. A simple approach that considers only the locally used interface of variables can identify potential classes for variables, but popular interfaces can generate a large number of false positives. We propose an approach called inline-cache type inference (ICTI) to augment the precision of fast and simple type inference algorithms. ICTI uses type information available in the inline caches during multiple software runs, to provide a ranked list of possible classes that most likely represent a variable’s type. We evaluate ICTI through a proof-of-concept that we implement in Pharo Smalltalk. The analysis of the top-n+2 inferred types (where n is the number of recorded run-time types for a variable) for 5486 variables from four different software systems shows that ICTI produces promising results for about 75% of the variables. For more than 90% of variables, the correct run-time type is present among first six inferred types. Our ordering shows a twofold improvement when compared with the unordered basic approach, i.e., for a significant number of variables for which the basic approach offered ambiguous results, ICTI was able to promote the correct type to the top of the list.

Posted by scg at 6 November 2017, 10:15 am comment link
<< 1 2 3 4 5 6 7 8 9 10 >>
Last changed by scg on 14 August 2017