Software developers need to cope with complexity of Application Programming Interfaces (apis) of external libraries or frameworks. However, typical apis provide several thousands of methods to their client programs, a...
详细信息
ISBN:
(纸本)9781479984695
Software developers need to cope with complexity of Application Programming Interfaces (apis) of external libraries or frameworks. However, typical apis provide several thousands of methods to their client programs, and such large apis are difficult to learn and use. An api method is generally used within client programs along with other methods of the api of interest. Despite this, co-usage relationships between api methods are often not documented. We propose a technique for mining Multi-Level api Usage Patterns (MLUP) to exhibit the co-usage relationships between methods of the api of interest across interfering usage scenarios. We detect multi-level usage patterns as distinct groups of api methods, where each group is uniformly used across variable client programs, independently of usage contexts. We evaluated our technique through the usage of four apis having up to 22 client programs per api. For all the studied apis, our technique was able to detect usage patterns that are, almost all, highly consistent and highly cohesive across a considerable variability of client programs.
Designing an effective api is essential for library developers as it is the lens through which clients will judge its usability and benefits, as well as the main friction point when the library evolves. Despite its im...
详细信息
ISBN:
(纸本)9798400705861
Designing an effective api is essential for library developers as it is the lens through which clients will judge its usability and benefits, as well as the main friction point when the library evolves. Despite its importance, defining the boundaries of an api is a challenging task, mainly due to the diverse mechanisms provided by programming languages that have non-trivial interplays. In this paper, we present a novel conceptual framework designed to assist library maintainers in understanding the interactions allowed by their apis via the use of syntactic usage models. These customizable models enable library maintainers to improve their design ahead of release, reducing friction during evolution. The complementary syntactic usage footprints and coverage scores, inferred from client code using the api (e.g., documentation samples, tests, third-party clients), enable developers to understand in-the-wild uses of their apis and to reflect on the adequacy of their tests and documentation. We implement these models for Java libraries in a new tool UCov and demonstrate its capabilities on three libraries exhibiting diverse styles of interaction: jsoup, commons- cli, and spark. Our exploratory case study shows that UCov provides valuable information regarding api design and fine-grained analysis of client code to identify under-tested and under-documented library code.
Software developers need to cope with the complexity of Application Programming Interfaces (apis) of external libraries or frameworks. Typical apis provide thousands of methods to their client programs, and these meth...
详细信息
ISBN:
(纸本)9781509014286
Software developers need to cope with the complexity of Application Programming Interfaces (apis) of external libraries or frameworks. Typical apis provide thousands of methods to their client programs, and these methods are not used independently of each other. Much existing work has provided different techniques to mine api usage patterns based on client programs in order to help developers understanding and using existing libraries. Other techniques propose to overcome the strong constraint of clients' dependency and infer api usage patterns only using the library source code. In this paper, we propose a cooperative usage pattern mining technique (COUPminer) that combines client-based and library-based usage pattern mining. We evaluated our technique through four apis and the obtained results show that the cooperative approach allows taking advantage at the same time from the precision of client-based technique and from the generalizability of library-based techniques.
Developer forums are one of the most popular and useful Q&A websites on api usages. The analysis of api forums can be a critical step towards automated question and answer approaches. In this poster, we empiricall...
详细信息
ISBN:
(纸本)9781450371223
Developer forums are one of the most popular and useful Q&A websites on api usages. The analysis of api forums can be a critical step towards automated question and answer approaches. In this poster, we empirically study three api forums: Twitter, eBay, and AdWords, to investigate the characteristics of question-answering process. We observe that +60% of the posts on all forums were answered with api method names or documentation. +85% of the questions were answered by api development teams and the answers from api development teams drew fewer follow-up questions. Our results provide empirical evidence in future work to build automated solutions to answer developer questions on api forums.
While many maintainability metrics have been explicitly designed for service-based systems, tool-supported approaches to automatically collect these metrics are lacking. Especially in the context of microservices, dec...
详细信息
ISBN:
(纸本)9783030591540;9783030591557
While many maintainability metrics have been explicitly designed for service-based systems, tool-supported approaches to automatically collect these metrics are lacking. Especially in the context of microservices, decentralization and technological heterogeneity may pose challenges for static analysis. We therefore propose the modular and extensible RAMA approach (RESTful api Metric Analyzer) to calculate such metrics from machine-readable interface descriptions of RESTful services. We also provide prototypical tool support, the RAMA CLI, which currently parses the formats Openapi, RAML, and WADL and calculates 10 structural service-based metrics proposed in scientific literature. To make RAMA measurement results more actionable, we additionally designed a repeatable benchmark for quartile-based threshold ranges (green, yellow, orange, red). In an exemplary run, we derived thresholds for all RAMA CLI metrics from the interface descriptions of 1,737 publicly available RESTful apis. Researchers and practitioners can use RAMA to evaluate the maintainability of RESTful services or to support the empirical evaluation of new service interface metrics.
Learning to use existing or new software libraries is a difficult task for software developers, which would impede their productivity. Much existing work has provided different techniques to mine api usage patterns fr...
详细信息
ISBN:
(纸本)9781467381598
Learning to use existing or new software libraries is a difficult task for software developers, which would impede their productivity. Much existing work has provided different techniques to mine api usage patterns from client programs in order to help developers on understanding and using existing libraries. However, considering only client programs to identify api usage patterns is a strong constraint as the client programs source code is not always available or the clients themselves do not exist yet for newly released apis. In this paper, we propose a technique for mining Non Client-based Usage Patterns (NCBUP-miner). We detect unordered api usage patterns as distinct groups of api methods that are structurally and semantically related and thus may contribute together to the implementation of a particular functionality for potential client programs. We evaluated our technique through four apis. The obtained results are comparable to those of client-based approaches in terms of usage-patterns cohesion.
We develop a tool to generate an interactive api document that includes static and dynamic aspects of code examples. Our technique can help developers interactively eliminate redundant information in the sample code o...
详细信息
ISBN:
(纸本)9781538675700
We develop a tool to generate an interactive api document that includes static and dynamic aspects of code examples. Our technique can help developers interactively eliminate redundant information in the sample code on the documents. The developers can then focus on the part of the sample code they are interested in through our generated document.
Developers often need to search for appropriate apis for their programming tasks. Although most libraries have api reference documentation, it is not easy to find appropriate apis due to the lexical gap and knowledge ...
详细信息
ISBN:
(数字)9781450359375
ISBN:
(纸本)9781450359375
Developers often need to search for appropriate apis for their programming tasks. Although most libraries have api reference documentation, it is not easy to find appropriate apis due to the lexical gap and knowledge gap between the natural language description of the programming task and the api description in api documentation. Here, the lexical gap refers to the fact that the same semantic meaning can be expressed by different words, and the knowledge gap refers to the fact that api documentation mainly describes api functionality and structure but lacks other types of information like concepts and purposes, which are usually the key information in the task description. In this paper, we propose an api recommendation approach named BIKER (Li-Information source based KnowledgE Recommendation) to tackle these two gaps. To bridge the lexical gap, BIKER uses word embedding technique to calculate the similarity score between two text descriptions. Inspired by our survey findings that developers incorporate Stack Overflow posts and api documentation for bridging the knowledge gap, BIKER leverages Stack Overflow posts to extract candidate apis for a program task, and ranks candidate apis by considering the query's similarity with both Stack Overflow posts and api documentation. It also summarizes supplementary information (e.g., api description, code examples in Stack Overflow posts) for each api to help developers select the apis that are most relevant to their tasks. Our evaluation with 413 api-related questions confirms the effectiveness of BIKER for both class-and method-level api recommendation, compared with state-of-the-art baselines. Our user study with 28 Java developers further demonstrates the practicality of BIKER for api search.
api developers have been working hard to evolve apis to provide more simple, powerful, and robust api libraries. Although api evolution has been studied for multiple domains, such as Web and Android development, api e...
详细信息
ISBN:
(纸本)9780738146690
api developers have been working hard to evolve apis to provide more simple, powerful, and robust api libraries. Although api evolution has been studied for multiple domains, such as Web and Android development, api evolution for deep learning frameworks has not yet been studied. It is not very clear how and why apis evolve in deep learning frameworks, and yet these are being more and more heavily used in industry. To fill this gap, we conduct a large-scale and in-depth study on the api evolution of Tensorflow 2, which is currently the most popular deep learning framework. We first extract 6,329 api changes by mining api documentation of Tensorflow 2 across multiple versions and mapping api changes into functional categories on the Tensorflow 2 framework to analyze their api evolution trends. We then investigate the key reasons for api changes by referring to multiple information sources, e.g., api documentation, commits and StackOverflow. Finally, we compare api evolution in non-deep learning projects to that of Tensorflow 2, and identify some key implications for users, researchers, and api developers.
We present Apatite, a new tool that aids users in learning and understanding a complex api by visualizing the common associations between its various components. Current object-oriented api documentation is usually na...
详细信息
ISBN:
(纸本)9781605589299
We present Apatite, a new tool that aids users in learning and understanding a complex api by visualizing the common associations between its various components. Current object-oriented api documentation is usually navigated in a fixed tree structure, starting with a package and then filtering by a specific class. For large apis, this scheme is overly restrictive, because it prevents users from locating a particular action without first knowing which class it belongs to. Apatite's design instead enables users to search across any level of an api's hierarchy. This is made possible by the introduction of a novel interaction technique that presents popular items from multiple categories simultaneously, determining their relevance by approximating the strength of their association using search engine data. The design of Apatite was refined through iterative usability testing, and it has been released publicly as a web application.
暂无评论