Application Programming Interfaces (APIs) represent key tools for software developers to build complex software systems. However, several studies have revealed that even major API providers tend to have incomplete or inconsistent API documentation. This can severely hamper the API comprehension and, as a consequence, the quality of the software built on them. In this paper, we propose DRONE (Detect and Repair of dOcumentatioN dEfects), a framework to automatically detect and repair defects from API documents by leveraging techniques from program analysis, natural language processing, and constraint solving. Specifically, we target at the directives of API documents, which are related to parameter constraints and exception handling declarations. Furthermore, in presence of defects, we also provide a prototypical repair recommendation system. We evaluate our approach on parts of the well-documented APIs of JDK 1.8 APIs (including javaFX) and Android 7.0 (level 24). Across the two empirical studies, our approach can detect API defects with an average F-measure of 79.9%, 71.7%, and 81.4%, respectively. The API repairing capability has also been evaluated on the generated recommendations in a further experiment. User judgments indicate that the constraint information is addressed correctly and concisely in the rendered directives.
Application programming interfaces (APIs) documentation is the official reference of the APIs. Defects in API documentation pose serious hurdles to their comprehension and usage. In this paper, we present DRONE, a tool that can automatically detect the directive defects in APIs documents and recommend repair solutions to fix them. Particularly, DRONE focuses on four defect types related to parameter usage constraints. To achieve this, DRONE leverages techniques from static program analysis, natural language processing and logic reasoning. The implementation is based on the Eclipse-plugin architecture, which provides an integrated user interface. Extensive experiments demonstrate the efficacy of the tool.
Amorphous MgNi+x%B(x=0,2,5,10) hydrogen storage alloys have been prepared by mechanical alloying (MA) and tested as hydrogen storage electrodes. The addition of boron can promote the MgNi alloy to form amorphous phase, increase the atom ratio of Ni/Mg at the alloy powders’ surface, and improve the thermal stability of MgNi alloy. The discharge capacity, the high rate dischargeability (HRD) and the exchange current density of the alloy electrodes all increased first, and then decreased with increasing the addition of boron. The maximum discharge capacity, the HRD400 and the exchange current density of the alloy with 5%B were 411.6mAh/g, 58.3% and 293.5mA/g respectively, which were 21.8%, 40.0% and 351.5% higher respectively, comparing with that of no boron addition. The electrochemical cycle stability of the alloy electrodes increased with increasing boron additions, and compared with no boron addition, the cycle capacity retention rate S20 of the alloy with 10%B increased 64.2%.
In hydrostatic bearing, the applied load is carried through the compensatory effect of restrictors. Different throttle methods will bring different oil film rigidity and carrying capacity. There are mainly four types restrictors such as capillary,orifice,slide valve and film feedback restrictors. The mathematical models of carrying capacity and oil film rigidity of the hydrostatic bearings throttled by the restrictors mentioned above were presented. The oil film rigidity of hydrostatic bearings throttled by different restrictors were analyzed. Reynolds equation was provided and the numerical solution model was constructed. The pressure fields show the static performances of hydrostatic bearing with different restrictors.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.