20 research outputs found

    GAMMA: Revisiting Template-based Automated Program Repair via Mask Prediction

    Full text link
    Automated program repair (APR) aims to fix software bugs without human intervention and template-based APR has been widely investigated with promising results. However, it is challenging for template-based APR to select the appropriate donor code, which is an important repair ingredient for generating candidate patches. Inappropriate donor code may cause plausible but incorrect patch generation even with correct fix patterns, limiting the repair performance. In this paper, we aim to revisit template-based APR, and propose GAMMA, to directly leverage large pre-trained language models for donor code generation. Our main insight is that instead of retrieving donor code in the local buggy file, we can directly predict the correct code tokens based on the context code snippets and repair patterns by a cloze task. Specifically, (1) GAMMA revises a variety of fix templates from state-of-the-art template-based APR techniques (i.e., TBar) and transforms them into mask patterns. (2) GAMMA adopts a pre-trained language model to predict the correct code for masked code as a fill-in-the-blank task. The experimental results demonstrate that GAMMA correctly repairs 82 bugs on Defects4J-v1.2, which achieves 20.59\% (14 bugs) and 26.15\% (17 bugs) improvement over the previous state-of-the-art template-based approach TBar and learning-based one Recoder. Furthermore, GAMMA repairs 45 bugs and 22 bugs from the additional Defects4J-v2.0 and QuixBugs, indicating the generalizability of GAMMA in addressing the dataset overfitting issue. We also prove that adopting other pre-trained language models can provide substantial advancement, e.g., CodeBERT-based and ChatGPT-based GAMMA is able to fix 80 and 67 bugs on Defects4J-v1.2, indicating the scalability of GAMMA. Overall, our study highlights the promising future of adopting pre-trained models to generate correct patches on top of fix patterns.Comment: Accepted to 38th IEEE/ACM International Conference on Automated Software Engineering (ASE2023

    A Critical Review of Large Language Model on Software Engineering: An Example from ChatGPT and Automated Program Repair

    Full text link
    Large Language Models (LLMs) have been gaining increasing attention and demonstrated promising performance across a variety of Software Engineering (SE) tasks, such as Automated Program Repair (APR), code summarization, and code completion. For example, ChatGPT, the latest black-box LLM, has been investigated by numerous recent research studies and has shown impressive performance in various tasks. However, there exists a potential risk of data leakage since these LLMs are usually close-sourced with unknown specific training details, e.g., pre-training datasets. In this paper, we seek to review the bug-fixing capabilities of ChatGPT on a clean APR benchmark with different research objectives. We first introduce {\benchmark}, a new benchmark with buggy and the corresponding fixed programs from competitive programming problems starting from 2023, after the training cutoff point of ChatGPT. The results on {\benchmark} show that ChatGPT is able to fix 109 out of 151 buggy programs using the basic prompt within 35 independent rounds, outperforming state-of-the-art LLMs CodeT5 and PLBART by 27.5\% and 62.4\% prediction accuracy. We also investigate the impact of three types of prompts, i.e., problem description, error feedback, and bug localization, leading to additional 34 fixed bugs. Besides, we provide additional discussion from the interactive nature of ChatGPT to illustrate the capacity of a dialog-based repair workflow with 9 additional fixed bugs. Inspired by the findings, we further pinpoint various challenges and opportunities for advanced SE study equipped with such LLMs (e.g.,~ChatGPT) in the near future. More importantly, our work calls for more research on the reevaluation of the achievements obtained by existing black-box LLMs across various SE tasks, not limited to ChatGPT on APR

    Study on multivariate regression model of indoor and outdoor particulate pollution in severe cold area of China

    Get PDF
    At present, the widespread existence of haze phenomenon has a serious impact on indoor air quality. Indoor particulate pollution has been paid more and more attention by the society. However, the correlation and diffusion mechanism of indoor and outdoor particulate matter are still controversial. In order to explore the correlation between indoor and outdoor particulate matter of different building types in heating season and non-heating season, the indoor and outdoor particulate concentrations and meteorological parameters of 110 stations in severe cold area of China were monitored by experiments. The analysis shows that indoor and outdoor temperature, humidity, air velocity, wind direction and atmospheric pressure are the main factors affecting indoor and outdoor particulate concentration. And based on these factors, it can model the indoor predicted particulate concentrations by multivariate regression. It also shows a significant difference in the relationship between the concentration of particulate matter and factors of indoor and outdoor particulate matter. Therefore, this study provides a good premise for exploring the health risks and control measures of particulate matter

    Determination of dezocine in rabbit plasma by liquid chromatography-mass spectrometry and its application

    Get PDF
    A sensitive and selective liquid chromatography-mass spectrometry (LC–MS) method for determination of dezocine in rabbit plasma was developed and validated. After addition of diazepam as internal standard (IS), liquid–liquid extraction (LLE) was used for sample preparation, and chromatography involved Agilent SB-C18 column (2.1 mmx50 mm, 3.5 um) using 0.1 % formic acid in water and acetonitrile as a mobile phase with gradient elution. Detection involved positive ion mode electrospray ionization (ESI), and selective ion monitoring (SIM) mode was used for quantification of target fragment ions m/z 245.8 for dezocine and m/z 284.8 for diazepam (internal standard, IS). The assay was linear over the range of 5–500 ng/mL for dezocine, with a lower limit of quantitation (LLOQ) of 5 ng/mL for dezocine. Intra- and inter-day precisions were less than 13 % and the accuracies were in the range of 93.1-105.2 % for dezocine. This developed method was successfully applied for the determination of dezocine in rabbit plasma for pharmacokinetic study.Colegio de Farmacéuticos de la Provincia de Buenos Aire

    Fractional Hermite interpolation for non-smooth functions. ETNA - Electronic Transactions on Numerical Analysis

    No full text
    The interpolation of functions plays a fundamental role in numerical analysis. The highly accurate approximation of non-smooth functions is a challenge in science and engineering as traditional polynomial interpolation cannot characterize the singular features of these functions. This paper aims at designing a fractional Hermite interpolation for non-smooth functions based on the local fractional Taylor expansion and at deriving the corresponding explicit formula and its error remainder. We also present a piecewise hybrid Hermite interpolation scheme, a combination of fractional Hermite interpolation and traditional Hermite interpolation. Some numerical examples are presented to show the high accuracy of the fractional Hermite interpolation method

    Long-term efficacy and stability of miniscrew-assisted rapid palatal expansion in mid to late adolescents and adults: a systematic review and meta-analysis

    No full text
    Abstract Background The purpose of this study is to investigate the long-term efficacy and stability of Miniscrew-assisted Rapid Palatal Expansion (MARPE), including its primary outcomes, namely the nasomaxillary complex transverse skeletal and dental expansion, and related secondary outcomes. Methods Electronic databases and manual literature searches, up to October 31, 2022, were performed. The eligibility criteria were the following: studies on patients with transverse maxillary deficiency treated with MARPE in adults and adolescents over 13.5 years of age. Results Ultimately, twelve articles were included in the analysis, one prospective and eleven retrospective observational studies. Five studies showed a moderate risk of bias, while the remaining seven studies were at a serious risk of bias. The GRADE quality of evidence was very low. MARPE is an effective treatment modality for transverse maxillary deficiency (mean success rate: 93.87%). Patients showed increased mean in the skeletal and dental transverse expansion. The basal bone composition, mean alveolar bone and mean dental expansion accounted for 48.85, 7.52, and 43.63% of the total expansion, respectively. There was a certain degree of skeletal and dental relapse over time. MARPE could also cause dental, alveolar, and periodontal side effects, and have an impact on other craniofacial bones, upper airway, and facial soft tissue. Conclusions MARPE is an effective treatment for transverse maxillary deficiency, with a high success rate and a certain degree of skeletal and dental relapse over time

    Stachydrine, a Bioactive Equilibrist for Synephrine, Identified from Four <i>Citrus</i> Chinese Herbs

    No full text
    Four Chinese herbs from the Citrus genus, namely Aurantii Fructus Immaturus (Zhishi), Aurantii Fructus (Zhiqiao), Citri Reticulatae Pericarpium Viride (Qingpi) and Citri Reticulatae Pericarpium (Chenpi), are widely used for treating various cardiovascular and gastrointestinal diseases. Many ingredients have already been identified from these herbs, and their various bioactivities provide some interpretations for the pharmacological functions of these herbs. However, the complex functions of these herbs imply undisclosed cholinergic activity. To discover some ingredients with cholinergic activity and further clarify possible reasons for the complex pharmacological functions presented by these herbs, depending on the extended structure–activity relationships of cholinergic and anti-cholinergic agents, a simple method was established here for quickly discovering possible choline analogs using a specific TLC method, and then stachydrine and choline were first identified from these Citrus herb decoctions based on their NMR and HRMS data. After this, two TLC scanning (TLCS) methods were first established for the quantitative analyses of stachydrine and choline, and the contents of the two ingredients and synephrine in 39 samples were determined using the valid TLCS and HPLC methods, respectively. The results showed that the contents of stachydrine (3.04‰) were 2.4 times greater than those of synephrine (1.25‰) in Zhiqiao and about one-third to two-thirds of those of Zhishi, Qingpi and Chenpi. Simultaneously, the contents of stachydrine, choline and synephrine in these herbs present similar decreasing trends with the delay of harvest time; e.g., those of stachydrine decrease from 5.16‰ (Zhishi) to 3.04‰ (Zhike) and from 1.98‰ (Qingpi) to 1.68‰ (Chenpi). Differently, the contents of synephrine decrease the fastest, while those of stachydrine decrease the slowest. Based on these results, compared with the pharmacological activities and pharmacokinetics reported for stachydrine and synephrine, it is indicated that stachydrine can be considered as a bioactive equilibrist for synephrine, especially in the cardio-cerebrovascular protection from these citrus herbs. Additionally, the results confirmed that stachydrine plays an important role in the pharmacological functions of these citrus herbs, especially in dual-directionally regulating the uterus, and in various beneficial effects on the cardio-cerebrovascular system, kidneys and liver

    Probabilistic Analysis of Extreme Discharges and Precipitations with a Nonparametric Copula Model

    No full text
    Urumqi River is an important river in the Xinjiang autonomous region, China, where floods or droughts are the major concerns of the local communities. This river's discharge is mainly influenced by the natural factors such as precipitation and climates, rather than human activities. This paper quantifies the interdependent structure between Urumqi River's discharge and precipitation using a nonparametric Copula method. It then analyzes the relationship between the extreme discharges of this river and extreme precipitation of the region. Comparison between simulation result and real data is conducted to verify the rationality of the model. Furthermore, the conditional probabilities of maximum and minimum discharge at different precipitation levels are also investigated using the Copula distribution functions. The results show a strong relationship between large discharge and heavy precipitation in this region. The upper dependence coefficient is nearly 0.6 and the probability of large discharge reaches 0.64 when the rainfall is greater than 159.56 mm. The relationship between small discharge and rainfall is insignificant. The lower dependence coefficient is zero, suggesting that the base flow and snowmelt from Tianshan likely contribute to Urumqi River's discharge during the dry season.National Natural Science Foundation of China [41471001, 41402210, 41272245, 11601244]; Scientific Research Foundation for Qingjiang Scholars of Jiangxi University of Science and Technology [JXUSTQJBJ2017002]; innovation team training plan of the Tianjin Education Committee [TD12-5037]; US National Science Foundation-Division of Earth Sciences [1014594]; Outstanding Oversea Professorship award through Jilin University from Department of Education, China; Global Expert award through Tianjin Normal University from the Thousand Talents Plan of Tianjin CityOpen access journal.This item from the UA Faculty Publications collection is made available by the University of Arizona with support from the University of Arizona Libraries. If you have questions, please contact us at [email protected]

    Groundwater Nitrate Contamination and Driving Forces from Intensive Cropland in the North China Plain

    No full text
    High nitrate in groundwater is a serious problem especially in highly active agricultural areas. In this paper, the concentration and spatial distribution of groundwater nitrate in cropland area in the North China Plain were assessed by statistical and geostatistical techniques. Nitrate concentration in groundwater reached a maximum of 526.58 mg/L, and 47.2%, 21.33% and 11.13% of samples had levels in excess of nitrate safety threshold concentration (50 mg/L) in shallow, middle-deep and deep groundwater, respectively. And NO3- content significantly decreased with groundwater depth. Groundwater nitrate concentrations under vegetable area are significantly higher than ones under grain and orchard. And there are great differences in spatial distribution of nitrate in the North China Plain and pollution hotspot areas are mainly in Shandong Province. Based on both multiple regressions combined with principal component analysis (PCA), significant variables for nitrate variation in three types of ground water were found: population per unit area, percentage of vegetable area, percentage of grain crop area, livestock per unit area, annual precipitation and annual mean temperature for shallow groundwater; population per unit area and percentage of vegetable area for middle-deep groundwater; percentage of vegetable area, percentage of grain crop area and livestock per unit area for deep groundwater
    corecore