3,543 research outputs found
Learning based Methods for Code Runtime Complexity Prediction
Predicting the runtime complexity of a programming code is an arduous task.
In fact, even for humans, it requires a subtle analysis and comprehensive
knowledge of algorithms to predict time complexity with high fidelity, given
any code. As per Turing's Halting problem proof, estimating code complexity is
mathematically impossible. Nevertheless, an approximate solution to such a task
can help developers to get real-time feedback for the efficiency of their code.
In this work, we model this problem as a machine learning task and check its
feasibility with thorough analysis. Due to the lack of any open source dataset
for this task, we propose our own annotated dataset CoRCoD: Code Runtime
Complexity Dataset, extracted from online judges. We establish baselines using
two different approaches: feature engineering and code embeddings, to achieve
state of the art results and compare their performances. Such solutions can be
widely useful in potential applications like automatically grading coding
assignments, IDE-integrated tools for static code analysis, and others.Comment: 14 pages, 2 figures, 8 table
Do Bugs Propagate? An Empirical Analysis of Temporal Correlations Among Software Bugs
The occurrences of bugs are not isolated events, rather they may interact, affect each other, and trigger other latent bugs. Identifying and understanding bug correlations could help developers localize bug origins, predict potential bugs, and design better architectures of software artifacts to prevent bug affection. Many studies in the defect prediction and fault localization literature implied the dependence and interactions between multiple bugs, but few of them explicitly investigate the correlations of bugs across time steps and how bugs affect each other. In this paper, we perform social network analysis on the temporal correlations between bugs across time steps on software artifact ties, i.e., software graphs. Adopted from the correlation analysis methodology in social networks, we construct software graphs of three artifact ties such as function calls and type hierarchy and then perform longitudinal logistic regressions of time-lag bug correlations on these graphs. Our experiments on four open-source projects suggest that bugs can propagate as observed on certain artifact tie graphs. Based on our findings, we propose a hybrid artifact tie graph, a synthesis of a few well-known software graphs, that exhibits a higher degree of bug propagation. Our findings shed light on research for better bug prediction and localization models and help developers to perform maintenance actions to prevent consequential bugs
- …