On the Use of Context in Recommending Exception Handling Code Examples

07/06/2018
by   Mohammad Masudur Rahman, et al.
0

Studies show that software developers often either misuse exception handling features or use them inefficiently, and such a practice may lead an undergoing software project to a fragile, insecure and non-robust application system. In this paper, we propose a context-aware code recommendation approach that recommends exception handling code examples from a number of popular open source code repositories hosted at GitHub. It collects the code examples exploiting GitHub code search API, and then analyzes, filters and ranks them against the code under development in the IDE by leveraging not only the structural (i.e., graph-based) and lexical features but also the heuristic quality measures of exception handlers in the examples. Experiments with 4,400 code examples and 65 exception handling scenarios as well as comparisons with four existing approaches show that the proposed approach is highly promising.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/19/2019

Recommendation of Exception Handling Code in Mobile App Development

In modern programming languages, exception handling is an effective mech...
research
10/15/2022

Code Recommendation for Open Source Software Developers

Open Source Software (OSS) is forming the spines of technology infrastru...
research
08/02/2017

Revisiting Exception Handling Practices with Exception Flow Analysis

Modern programming languages, such as Java and C#, typically provide fea...
research
04/07/2021

Towards Optimal Use of Exception Handling Information for Function Detection

Function entry detection is critical for security of binary code. Conven...
research
09/24/2022

Are Machine Programming Systems using Right Source-Code Measures to Select Code Repositories?

Machine programming (MP) is an emerging field at the intersection of det...
research
12/03/2018

On the Relationship Between Modularity and Stability in Software Packages

Modular and well-written software is an ideal that programmers strive to...
research
05/04/2023

Improving Code Example Recommendations on Informal Documentation Using BERT and Query-Aware LSH: A Comparative Study

The study of code example recommendation has been conducted extensively ...

Please sign up or login with your details

Forgot password? Click here to reset