Building successful and meaningful interoperation with external software apis requires satisfying their conceptual interoperability constraints. These constraints, which we call the COINs, include structure, dynamic, ...
详细信息
ISBN:
(纸本)9783319489926;9783319489919
Building successful and meaningful interoperation with external software apis requires satisfying their conceptual interoperability constraints. These constraints, which we call the COINs, include structure, dynamic, and quality specifications that if missed they lead to costly implications of unexpected mismatches and running-late projects. However, for software architects and analysts, manual analysis of unstructured text in api documents to identify conceptual interoperability constraints is a tedious and time-consuming task that requires knowledge about constraint types. In this paper, we present our empirically-based research in addressing the aforementioned issues by utilizing machine learning techniques. We started with a multiple-case study through which we contributed a ground truth dataset. Then, we built a model for this dataset and tested its robustness through experiments using different machine learning text-classification algorithms. The results show that our model enables achieving 70.4% precision and 70.2% recall in identifying seven classes of constraints (i.e., Syntax, Semantic, Structure, Dynamic, Context, Quality, and Not-COIN). This achievement increases to 81.9% precision and 82.0% recall when identifying two classes (i.e., COIN, Not-COIN). Finally, we implemented a tool prototype to demonstrate the value of our findings for architects in a practical context.
Developers frequently have to learn new Web apis provided by other teams or organizations. documentation, especially code examples, supports learning and influences the consumers' perception of an api. Nevertheles...
详细信息
ISBN:
(纸本)9789897585692
Developers frequently have to learn new Web apis provided by other teams or organizations. documentation, especially code examples, supports learning and influences the consumers' perception of an api. Nevertheless, documentation repeatedly fails to address consumers' information needs. Therefore, we identify four major challenges of creating and maintaining public Web api documentation from a provider perspective which are unknown customer needs, the difficulty of balancing the coverage of varying information needs and keeping documentation concise, the high effort of creating and maintaining documentation, and missing internal guidance and governance for creating api documentation. In addition, we derive 46 best practices candidates for code examples as part of Web api documentation from literature and 13 expert interviews. Moreover, we evaluate a subset of eight of these candidates in the context of the Web api documentation for a public GraphQL api in a case study with 12 participants. As a result, we validate the analyzed eight best practices candidates to be best practices for public Web api documentation.
Smart contracts are gaining popularity as a means to support transparent, traceable, and self-executing decentralized applications, which enable the exchange of value in a trustless environment. Developers of smart co...
详细信息
ISBN:
(纸本)9781450394758
Smart contracts are gaining popularity as a means to support transparent, traceable, and self-executing decentralized applications, which enable the exchange of value in a trustless environment. Developers of smart contracts rely on various libraries, such as OpenZeppelin for Solidity contracts, to improve application quality and reduce development costs. The api documentations of these libraries are important sources of information for developers who are unfamiliar with the apis. Yet, maintaining high-quality documentations is non-trivial, and errors in documentations may place barriers for developers to learn the correct usages of apis. In this paper, we propose a technique, DOCCON, to detect inconsistencies between documentations and the corresponding code for Solidity smart contract libraries. Our fact-based approach allows inconsistencies of different severity levels to be queried, from a database containing precomputed facts about the api code and documentations. DOCCON successfully detected high-priority api documentation errors in popular smart contract libraries, including mismatching parameters, missing requirements, outdated descriptions, etc. Our experiment result shows that DOCCON achieves good precision and is applicable to different libraries: 29 and 22 out of our reported 40 errors have been confirmed and fixed by library developers so far.
The learning and usage of an api is supported by official documentation. Like source code, api documentation is itself a software product. Several research results show that bad design in api documentation can make th...
详细信息
ISBN:
(纸本)9781728196305
The learning and usage of an api is supported by official documentation. Like source code, api documentation is itself a software product. Several research results show that bad design in api documentation can make the reuse of api features difficult. Indeed, similar to code smells or code anti-patterns, poorly designed api documentation can also exhibit `smells'. Such documentation smells can be described as bad documentation styles that do not necessarily produce an incorrect documentation but nevertheless make the documentation difficult to properly understand and to use. Recent research on api documentation has focused on finding content inaccuracies in api documentation and to complement api documentation with external resources (e.g., crowd-shared code examples). We are aware of no research that focused on the automatic detection of api documentation smells. This paper makes two contributions. First, we produce a catalog of five api documentation smells by consulting literature on api documentation presentation problems. We create a benchmark dataset of 1,000 api documentation units by exhaustively and manually validating the presence of the five smells in Java official api reference and instruction documentation. Second, we conduct a survey of 21 professional software developers to validate the catalog. The developers agreed that they frequently encounter all five smells in api official documentation and 95.2% of them reported that the presence of the documentation smells negatively affects their productivity. The participants wished for tool support to automatically detect and fix the smells in api official documentation. We develop a suite of rule-based, deep and shallow machine learning classifiers to automatically detect the smells. The best performing classifier BERT, a deep learning model, achieves Fl-scores of 0.75 - 0.97.
As different versions of the same application might be implemented based on different platforms/programming languages, it is significantly important to build an automated migration tool for the application programming...
详细信息
ISBN:
(纸本)9781665477048
As different versions of the same application might be implemented based on different platforms/programming languages, it is significantly important to build an automated migration tool for the application programming interface (api) mapping relations between different platforms/programming languages. In this paper, we propose an approach to discover api mappings based on the api documentation. We first divide the information in the api documentation into different types of entities, relations, and attributes to construct their respective api documentation Graphs (ADGs). Then, we encode nodes, edges and triplets of ADGs and input them to a new graph neural network (GNN) for entity alignment to obtain the api mappings between the two different platforms/programming languages. Taking HarmonyOS and Android as representative cases, we evaluate our approach based on their api documentation. The results show that our approach improves top-1, top-5, and top-10 accuracies by 50.57%, 56.25%, and 52.66%, respectively, compared with documentation-based baselines.
Developers often face difficulties in using different api methods during the software development process. Answering api related questions on api Q&A forums often costs api development teams a lot of time. To help...
详细信息
Developers often face difficulties in using different api methods during the software development process. Answering api related questions on api Q&A forums often costs api development teams a lot of time. To help save time for api development teams, we propose a deep learning-based approach, namely Rap4DQ, to identify relevant web api documentation for developer's api related questions on api Q&A forums. Rap4DQ learns representation vectors for questions and api documentation separately using Gated Recurrent Unit (GRU) and adds different weights to reflect the various importance of varied api documents during training. Rap4DQ is designed to train on positive and negative samples with a loss function that minimizes the distances between questions and their relevant documentation, but maximizes the distances between questions and their irrelevant documentation. In the end, we construct a learning-to-rank layer to rank the api documentation based on learned representation vectors from GRUs. We have conducted several experiments to evaluate Rap4DQ on three popular and large api Q&A forums, Twitter, eBay, and AdWords. The results show that Rap4DQ can outperform all baselines by having a relative improvement up to 84.3% in terms of AUC. Rap4DQ can obtain a high AUC of 0.84, 0.88, and 0.94 on identifying relevant api documentation on Twitter, eBay, and AdWords, respectively.
Reading reference documentation is an important part of programming with application programming interfaces (apis). Reference documentation complements the api by providing information not obvious from the api syntax....
详细信息
Reading reference documentation is an important part of programming with application programming interfaces (apis). Reference documentation complements the api by providing information not obvious from the api syntax. To improve the quality of reference documentation and the efficiency with which the relevant information it contains can be accessed, we must first understand its content. We report on a study of the nature and organization of knowledge contained in the reference documentation of the hundreds of apis provided as a part of two major technology platforms: Java SDK 6 and .NET 4.0. Our study involved the development of a taxonomy of knowledge types based on grounded methods and independent empirical validation. Seventeen trained coders used the taxonomy to rate a total of 5,574 randomly sampled documentation units to assess the knowledge they contain. Our results provide a comprehensive perspective on the patterns of knowledge in api documentation: observations about the types of knowledge it contains and how this knowledge is distributed throughout the documentation. The taxonomy and patterns of knowledge we present in this paper can be used to help practitioners evaluate the content of their api documentation, better organize their documentation, and limit the amount of low-value content. They also provide a vocabulary that can help structure and facilitate discussions about the content of apis.
The development of efficient data science applications is often impeded by unbearably long execution time and rapid RAM exhaustion. Since api documentation is the primary information source for troubleshooting, we inv...
详细信息
ISBN:
(纸本)9781450367684
The development of efficient data science applications is often impeded by unbearably long execution time and rapid RAM exhaustion. Since api documentation is the primary information source for troubleshooting, we investigate how performance concerns are documented in popular data science libraries. Our quantitative results reveal the prevalence of data science apis that are documented in performance-related context and the infrequent maintenance activities on such documentation. Our qualitative analyses further reveal that crowd documentation like Stack Overflow and GitHub are highly complementary to official documentation in terms of the api coverage, the knowledge distribution, as well as the specific information conveyed through performance-related content. Data science practitioners could benefit from our findings by learning a more targeted search strategy for resolving performance issues. Researchers can be more assured of the advantages of integrating both the official and the crowd documentation to achieve a holistic view on the performance concerns in data science development.
Software clones are detrimental to software maintenance and evolution and as a result many clone detectors have been proposed. These tools target clone detection in software applications written in a single programmin...
详细信息
ISBN:
(纸本)9781728125084
Software clones are detrimental to software maintenance and evolution and as a result many clone detectors have been proposed. These tools target clone detection in software applications written in a single programming language. However, a software application may be written in different languages for different platforms to improve the application's platform compatibility and adoption by users of different platforms. Cross language clones (CLCs) introduce additional challenges when maintaining multi-platform applications and would likely go undetected using existing tools. In this paper, we propose CLCDSA, a cross language clone detector which can detect CLCs without extensive processing of the source code and without the need to generate an intermediate representation. The proposed CLCDSA model analyzes different syntactic features of source code across different programming languages to detect CLCs. To support large scale clone detection, the CLCDSA model uses an action filter based on cross language api call similarity to discard non-potential clones. The design methodology of CLCDSA is twofold: (a) it detects CLCs on the fly by comparing the similarity of features, and (b) it uses a deep neural network based feature vector learning model to learn the features and detect CLCs. Early evaluation of the model observed an average precision, recall and F-measure score of 0.55, 0.86, and 0.64 respectively for the first phase and 0.61, 0.93, and 0.71 respectively for the second phase which indicates that CLCDSA outperforms all available models in detecting cross language clones.
Smart contracts are gaining popularity as a means to support transparent, traceable, and self-executing decentralized applications, which enable the exchange of value in a trustless environment. Developers of smart co...
详细信息
ISBN:
(纸本)9781450394758
Smart contracts are gaining popularity as a means to support transparent, traceable, and self-executing decentralized applications, which enable the exchange of value in a trustless environment. Developers of smart contracts rely on various libraries, such as OpenZeppelin for Solidity contracts, to improve application quality and reduce development costs. The api documentations of these libraries are important sources of information for developers who are unfamiliar with the apis. Yet, maintaining high-quality documentations is non-trivial, and errors in documentations may place barriers for developers to learn the correct usages of apis. In this paper, we propose a technique, DocCon, to detect inconsistencies between documentations and the corresponding code for Solidity smart contract libraries. Our fact-based approach allows inconsistencies of different severity levels to be queried, from a database containing precomputed facts about the api code and documentations. DocCon successfully detected high-priority api documentation errors in popular smart contract libraries, including mismatching parameters, missing requirements, outdated descriptions, etc. Our experiment result shows that DocCon achieves good precision and is applicable to different libraries: 29 and 22 out of our reported 40 errors have been confirmed and fixed by library developers so far.
暂无评论