Keyword Based Contextual Dependency Graph Model for Source Code to API Documentation Mapping

Author(s):  
Nakul Sharma ◽  
Prasanth Yalla
2019 ◽  
Vol 8 (2) ◽  
pp. 5888-5895

Natural language processing on software systems usually contain high dimensional noisy and irrelevant features which lead to inaccurate and poor contextual similarity between the project source code and its API documentation. Most of the traditional source code analysis models are independent of finding and extracting the relevant features for contextual similarity. As the size of the project source code and its related API documentation increases, these models incorporate the contextual similarity between the source code and API documentation for code analysis. One of the best solutions for this problem is finding the essential features using the source code dependency graph. In this paper, the dependency graph is used to compute the contextual similarity computation between the source code metrics and its API documents. A novel contextual similarity measure is used to find the relationship between the project source code metrics to the API documents. Proposed model is evaluated on different project source codes and API documents in terms of pre-processing, context similarity and runtime. Experimental results show that the proposed model has high computational efficiency compared to the existing models on the large size datasets


Author(s):  
Raquel Fialho de Queiroz Lafetá ◽  
Thiago Fialho de Queiroz Lafetá ◽  
Marcelo de Almeida Maia

A substantial effort, in general, is required for understanding APIs of application frameworks. High-quality API documentation may alleviate the effort, but the production of such documentation still poses a major challenge for modern frameworks. To facilitate the production of framework instantiation documentation, we hypothesize that the framework code itself and the code of existing instantiations provide useful information. However, given the size and complexity of existent code, automated approaches are required to assist the documentation production. Our goal is to assess an automated approach for constructing relevant documentation for framework instantiation based on source code analysis of the framework itself and of existing instantiations. The criterion for defining whether documentation is relevant would be to compare the documentation with an traditional framework documentation, considering the time spent and correctness during instantiation activities, information usefulness, complexity of the activity, navigation, satisfaction, information localization and clarity. We propose an automated approach for constructing relevant documentation for framework instantiation based on source code analysis of the framework itself and of existing instantiations. The proposed approach generates documentation in a cookbook style, where the recipes are programming activities using the necessary API elements driven by the framework features. We performed an empirical study, consisting of three experiments with 44 human subjects executing real framework instantiations aimed at comparing the use of the proposed cookbooks to traditional manual framework documentation (baseline). Our empirical assessment shows that the generated cookbooks performed better or, at least, with non-significant difference when compared to the traditional documentation, evidencing the effectiveness of the approach.


Author(s):  
Pratiksha Gautam ◽  
Hemraj Saini

Code clones are copied fragments that occur at different levels of abstraction and may have different origins in a software system. This article presents an approach which shows the significant parts of source code. Further, by using significant parts of a source code, a control flow graph can be generated. This control flow graph represents the statements of a code/program in the form of basic blocks or nodes and the edges represent the control flow between those basic blocks. A hybrid approach, named the Program Dependence Graph (PDG) is also presented in this article for the detection of non-trivial code clones. The program dependency graph approach consists of two approaches as a control dependency graph and a data dependency graph. The control dependency graph is generated by using a control flow graph. This article proposes an approach which can easily generate control flow graphs and by using control flow graph and reduced flowgraph approach, the trivial software clone, a similar textual structure, can be detected.The proposed approach is based on a tokenization concept.


2022 ◽  
Vol 29 (2) ◽  
pp. 1-33
Author(s):  
April Yi Wang ◽  
Dakuo Wang ◽  
Jaimie Drozdal ◽  
Michael Muller ◽  
Soya Park ◽  
...  

Computational notebooks allow data scientists to express their ideas through a combination of code and documentation. However, data scientists often pay attention only to the code, and neglect creating or updating their documentation during quick iterations. Inspired by human documentation practices learned from 80 highly-voted Kaggle notebooks, we design and implement Themisto, an automated documentation generation system to explore how human-centered AI systems can support human data scientists in the machine learning code documentation scenario. Themisto facilitates the creation of documentation via three approaches: a deep-learning-based approach to generate documentation for source code, a query-based approach to retrieve online API documentation for source code, and a user prompt approach to nudge users to write documentation. We evaluated Themisto in a within-subjects experiment with 24 data science practitioners, and found that automated documentation generation techniques reduced the time for writing documentation, reminded participants to document code they would have ignored, and improved participants’ satisfaction with their computational notebook.


2014 ◽  
Vol 11 (12) ◽  
pp. 13-25 ◽  
Author(s):  
Cheng Fang ◽  
Jun Liu ◽  
Zhenming Lei
Keyword(s):  

2013 ◽  
Vol 24 (1) ◽  
pp. 20-35 ◽  
Author(s):  
Kaiping Liu ◽  
Hee Beng Kuan Tan ◽  
Xu Chen

Database is a major component of many software systems. This paper proposes a novel graph called the attribute dependency graph to reveal the dependencies between attributes in a database application and also the programs involved. The authors propose an approach to automatically extract the attribute dependency graph out of a database application from its source code through inter-procedural static program analysis. The extracted information is a straightforward indicator that benefits the maintenance process, particularly for impact analysis on the modifications in a database application. A tool has been developed to implement the proposed approach for PHP-based database applications. Case studies have also been conducted to demonstrate the use of our approach.


2019 ◽  
Author(s):  
J Kyle Medley ◽  
Joseph Hellerstein ◽  
Herbert M Sauro

The SBML standard is used in a number of online repositories for storing systems biology models, yet there is currently no Web–capable JavaScript library that can read and write the SBML format. This is a severe limitation since the Web has become a universal means of software distribution, and the graphical capabilities of modern web browsers offer a powerful means for building rich, interactive applications. Also, there is a growing developer population specialized in web technologies that is poised to take advantage of the universality of the web to build the next generation of tools in systems biology and other fields. However, current solutions require server– side processing in order to support existing standards in modeling. We present libsbmljs, a JavaScript / WebAssembly library for Node.js and the Web with full support for all SBML extensions. Our library is an enabling technology for online SBML editors, model–building tools, and web–based simulators, and runs entirely in the browser without the need for any dedicated server resources. We provide NPM packages, an extensive set of examples, JavaScript API documentation, and an online demo that allows users to read and validate the SBML content of any model in the BioModels and BiGG databases. We also provide instructions and scripts to allow users to build a copy of libsbmljs against any libSBML version. Although our library supports all existing SBML extensions, we cover how to add additional extensions to the wrapper, should any arise in the future. To demonstrate the utility of this implementation, we also provide a demo at https://libsbmljsdemo.github.io/ with a proof–of–concept SBML simulator that supports ODE and stochastic simulations for SBML core models. Our project is hosted at https://libsbmljs.github.io/, which contains links to examples, API documentation, and all source code files and build scripts used to create libsbmljs. Our source code is licensed under the Apache 2.0 open source license.


Author(s):  
April Wang ◽  
Dakuo Wang ◽  
Xuye Liu ◽  
Lingfei Wu

Computational notebooks allow data scientists to express their ideas through a combination of code and documentation. However, data scientists often pay attention only to the code and neglect the creation of the documentation in a notebook. In this work, we present a human-centered automation system, Themisto, that can support users to easily create documentation via three approaches: 1) We have developed and reported a GNN-augmented code documentation generation algorithm in a previous paper, which can generate documentation for a given source code; 2) Themisto also implements a query-based approach to retrieve the online API documentation as the summary for certain types of source code; 3) Lastly, Themistoalso enables a user prompt approach to motivate users to write documentation for some use cases that automation does not work well.


Sign in / Sign up

Export Citation Format

Share Document