138 research outputs found

    Recommending Analogical APIs via Knowledge Graph Embedding

    Full text link
    Library migration, which re-implements the same software behavior by using a different library instead of using the current one, has been widely observed in software evolution. One essential part of library migration is to find an analogical API that could provide the same functionality as current ones. However, given the large number of libraries/APIs, manually finding an analogical API could be very time-consuming and error-prone. Researchers have developed multiple automated analogical API recommendation techniques. Documentation-based methods have particularly attracted significant interest. Despite their potential, these methods have limitations, such as a lack of comprehensive semantic understanding in documentation and scalability challenges. In this work, we propose KGE4AR, a novel documentation-based approach that leverages knowledge graph (KG) embedding to recommend analogical APIs during library migration. Specifically, KGE4AR proposes a novel unified API KG to comprehensively and structurally represent three types of knowledge in documentation, which can better capture the high-level semantics. Moreover, KGE4AR then proposes to embed the unified API KG into vectors, enabling more effective and scalable similarity calculation. We build KGE4AR' s unified API KG for 35,773 Java libraries and assess it in two API recommendation scenarios: with and without target libraries. Our results show that KGE4AR substantially outperforms state-of-the-art documentation-based techniques in both evaluation scenarios in terms of all metrics (e.g., 47.1%-143.0% and 11.7%-80.6% MRR improvements in each scenario). Additionally, we explore KGE4AR' s scalability, confirming its effective scaling with the growing number of libraries.Comment: Accepted by FSE 202

    ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generation

    Full text link
    In this work, we make the first attempt to evaluate LLMs in a more challenging code generation scenario, i.e. class-level code generation. We first manually construct the first class-level code generation benchmark ClassEval of 100 class-level Python code generation tasks with approximately 500 person-hours. Based on it, we then perform the first study of 11 state-of-the-art LLMs on class-level code generation. Based on our results, we have the following main findings. First, we find that all existing LLMs show much worse performance on class-level code generation compared to on standalone method-level code generation benchmarks like HumanEval; and the method-level coding ability cannot equivalently reflect the class-level coding ability among LLMs. Second, we find that GPT-4 and GPT-3.5 still exhibit dominate superior than other LLMs on class-level code generation, and the second-tier models includes Instruct-Starcoder, Instruct-Codegen, and Wizardcoder with very similar performance. Third, we find that generating the entire class all at once (i.e. holistic generation strategy) is the best generation strategy only for GPT-4 and GPT-3.5, while method-by-method generation (i.e. incremental and compositional) is better strategies for the other models with limited ability of understanding long instructions and utilizing the middle information. Lastly, we find the limited model ability of generating method-dependent code and discuss the frequent error types in generated classes. Our benchmark is available at https://github.com/FudanSELab/ClassEval

    Assessment of absorption of four lignan constituents of JingNing particles in rat gut using in situ single-pass intestinal perfusion

    Get PDF
    Purpose: To study small intestinal absorption of schisadrol A, schisandrol B, schizandrin A and schisandrin B in JingNing particles using in situ single-pass intestinal perfusion (SPIP).Methods: Absorption rate constant (Ka) and apparent permeability (Papp) of the drugs at different concentrations in various parts of rat small intestine (duodenum, jejunum and ileum) were determined using SPIP. JingNing particles were also perfused in situ at different pH in the entire rat intestine. Ethanol extract of Schisandra chinensis (standard) at low concentration was perfused in the duodenum for comparison with extract of JingNing particles.Results: The order of apparent permeability of the four lignans was schisandrol A < schisandrol B < schizandrin A < schisandrin B. Ka and Papp values of the four lignans in JingNing particles were concentration-dependent. Absorption increased in the rank order: ileum > duodenum > jejunum. Optimum absorption pH was 6.50. Polygala tenuifolia extract and volatile oil of Rhizoma acori tatarinowii significantly (p < 0.05) enhanced the absorption of the four lignans.Conclusion: The four lignans were well absorbed in the intestinal tract, particularly the ileum, probably through carrier-mediated transport. The alcohol extract of Polygala tenuifolia and volatile oil of Rhizoma acori graminei enhanced the absorption of the four lignans.Keywords: JingNing, Intestinal absorption, Polygala tenuifolia, Rhizoma acori graminei, Lignans, Schisandrol, Schisandrin, Single-pass intestinal perfusio

    Anthropogenic Noise Aggravates the Toxicity of Cadmium on Some Physiological Characteristics of the Blood Clam Tegillarca granosa

    Get PDF
    Widespread applications of cadmium (Cd) in various products have caused Cd contamination in marine ecosystems. Meanwhile, human activities in the ocean have also generated an increasing amount of noise in recent decades. Although anthropogenic noise and Cd contaminants could be present simultaneously in marine environments, the physiological responses of marine bivalve mollusks upon coexposure to anthropogenic noise and toxic metal contaminants, including Cd remain unclear. Therefore, the combined effects of anthropogenic noise and Cd on the physiological characteristics of the blood clam Tegillarca granosa were investigated in this study. The results showed that 10 days of coexposure to anthropogenic noise and Cd can enhance adverse impacts on metabolic processes, as indicated by the clearance rate, respiration rate, ammonium excretion rate, and O:N ratio of T. granosa. In addition, both the ATP content, ATP synthase activity and genes encoding important enzymes in ATP synthesis significantly declined after coexposures to anthropogenic noise and Cd, which have resulted from reduced feeding activity and respiration. Furthermore, the expressions of neurotransmitter-related genes (MAO, AChE, and mAChR3) were all significantly down-regulated after coexposure to anthropogenic noise and Cd, which suggests an enhanced neurotoxicity under coexposure. In conclusion, our study demonstrated that anthropogenic noise and Cd would have synergetic effects on the feeding activity, metabolism, and ATP synthesis of T. granosa, which may be due to the add-on of stress responses and neurotransmitter disturbances

    Development of SSR marker by RNA-seq and its application in genotyping pearl sac in pearl oyster Pinctada fucata martensii

    Get PDF
    Background: Pearl oyster Pinctada fucata martensii is cultured for producing round nucleated pearls. Pearl production involves a surgical operation where a mantle tissue graft from a donor oyster and a round nucleus are implanted in the gonad of a host oyster. Whether the mantle graft implanted in the gonad of a host oyster contributes to the formation of a pearl sac that secretes pearl nacre to form a pearl should be determined. In April 2012, two full-sib families were separately used as donor and host oysters for a nucleus insertion operation. The pearl sac was sampled from the host oysters at day 60 after nucleus operation. A large number of simple sequence repeat (SSR) markers were developed using Illumina HiSeq\u2122 2000 platform. The two full-sib families were also used to mine diagnostic SSR markers for genotyping donor oyster, host oyster, and pearl sac. Results: A total of 3168 microsatellite lociwere identified in 39,078 unigenes, and 1977 SSR primerswere designed by Primer 3.0. Forty-seven SSR primers were validated, and the rate of successful amplification was 72.3%. Two diagnostic SSR primers could successfully genotype pearl sac, donor oyster, and host oyster. Donor and host oysters were both homogenous, and the alleles in pearl sac were identical to those in donor and host oysters. Conclusions: The present results confirmed that themantle graft implanted in the gonad of host oyster contributed to the formation of the pearl sac in pearl oyster P. fucata martensii

    Three-Dimensional Manganese Oxide@Carbon Networks as Free-Standing, High-Loading Cathodes for High-Performance Zinc-Ion Batteries

    Get PDF
    Zinc-ion batteries (ZIBs), which are inexpensive and environmentally friendly, have a lot of potential for use in grid-scale energy storage systems, but their use is constrained by the availability of suitable cathode materials. MnO2-based cathodes are emerging as a promising contenders, due to the great availability and safety, as well as the device's stable output voltage platform (1.5 V). Improving the slow kinetics of MnO2-based cathodes caused by low electrical conductivity and mass diffusion rate is a challenge for their future use in next-generation rapid charging devices. Herein, the aforementioned challenges are overcome by proposing a sodium-intercalated manganese oxide (NMO) with 3D varying thinness carbon nanotubes (VTCNTs) networks as appropriate free-standing, binder-free cathodes (NMO/VTCNTs) without any heat treatment. A network construction strategy based on CNTs of different diameters is proposed for the first time to provide high specific capacity while achieving high mass loading. The specific capacity of as-prepared cathodes is significantly increased. The resulting free-standing binder-free cathodes achieve excellent capacity (329 mAh g−1 after 120 cycles at 0.2 A g−1 and 225 mAh g−1 after 200 cycles at 1 A g−1) and long-term cycling stability (158 mAh g−1 at 2 A g−1 after 1000 cycles)

    Three-Dimensional Manganese Oxide@Carbon Networks as Free-Standing, High-Loading Cathodes for High-Performance Zinc-Ion Batteries

    Get PDF
    Zinc-ion batteries (ZIBs), which are inexpensive and environmentally friendly, have a lot of potential for use in grid-scale energy storage systems, but their use is constrained by the availability of suitable cathode materials. MnO2-based cathodes are emerging as a promising contenders, due to the great availability and safety, as well as the device's stable output voltage platform (1.5 V). Improving the slow kinetics of MnO2-based cathodes caused by low electrical conductivity and mass diffusion rate is a challenge for their future use in next-generation rapid charging devices. Herein, the aforementioned challenges are overcome by proposing a sodium-intercalated manganese oxide (NMO) with 3D varying thinness carbon nanotubes (VTCNTs) networks as appropriate free-standing, binder-free cathodes (NMO/VTCNTs) without any heat treatment. A network construction strategy based on CNTs of different diameters is proposed for the first time to provide high specific capacity while achieving high mass loading. The specific capacity of as-prepared cathodes is significantly increased. The resulting free-standing binder-free cathodes achieve excellent capacity (329 mAh g−1 after 120 cycles at 0.2 A g−1 and 225 mAh g−1 after 200 cycles at 1 A g−1) and long-term cycling stability (158 mAh g−1 at 2 A g−1 after 1000 cycles)

    When It's Heavier: Interfacial and Solvation Chemistry of Isotopes in Aqueous Electrolytes for Zn-ion Batteries

    Get PDF
    The electrochemical effect of isotope (EEI) of water is introduced in the Zn-ion batteries (ZIBs) electrolyte to deal with the challenge of severe side reactions and massive gas production. Due to the low diffusion and strong coordination of ions in D2O, the possibility of side reactions is decreased, resulting in a broader electrochemically stable potential window, less pH change, and less zinc hydroxide sulfate (ZHS) generation during cycling. Moreover, we demonstrate that D2O eliminates the different ZHS phases generated by the change of bound water during cycling because of the consistently low local ion and molecule concentration, resulting in a stable interface between the electrode and electrolyte. The full cells with D2O-based electrolyte demonstrated more stable cycling performance which displayed ∼100 % reversible efficiencies after 1,000 cycles with a wide voltage window of 0.8–2.0 V and 3,000 cycles with a normal voltage window of 0.8–1.9 V at a current density of 2 A g−1
    • …
    corecore