118 research outputs found

    ContrastRepair: Enhancing Conversation-Based Automated Program Repair via Contrastive Test Case Pairs

    Full text link
    Automated Program Repair (APR) aims to automatically generate patches for rectifying software bugs. Recent strides in Large Language Models (LLM), such as ChatGPT, have yielded encouraging outcomes in APR, especially within the conversation-driven APR framework. Nevertheless, the efficacy of conversation-driven APR is contingent on the quality of the feedback information. In this paper, we propose ContrastRepair, a novel conversation-based APR approach that augments conversation-driven APR by providing LLMs with contrastive test pairs. A test pair consists of a failing test and a passing test, which offer contrastive feedback to the LLM. Our key insight is to minimize the difference between the generated passing test and the given failing test, which can better isolate the root causes of bugs. By providing informative and specific feedback, ContrastRepair enables the LLM to produce effective bug fixes. The implementation of ContrastRepair is based on the state-of-the-art LLM, ChatGPT, and it iteratively interacts with ChatGPT until plausible patches are generated. We evaluate ContrastRepair on multiple benchmark datasets, including Defects4j, QuixBugs, and HumanEval-Java. The results demonstrate that ContrastRepair significantly outperforms existing methods, achieving a new state-of-the-art in program repair. For instance, among Defects4j 1.2 and 2.0, ContrastRepair correctly repairs 143 out of all 337 bug cases, while the best-performing baseline fixes 124 bugs

    Real-Time Neural Signals of Disorder and Order Perception

    Get PDF
    Order and disorder are prevalent in everyday life, yet little is known about the neural real-time processing that occurs during the perception of disorder relative to order. In the present study, from a cognitive perspective, by adopting the ERP method, we aimed to examine the elicited real-time neural signals of disorder and order perception when participants processed physical environmental and basic visual disorder and order pictures in an irrelevant red or green rectangle detection task, and we attempted to test the hypothesis of cognitive disfluency in disorder perception. Generally, we observed that at each measured time interval, the ERPs elicited by order stimuli were more positive (less negative) in amplitude than those elicited by disorder stimuli at the frontal electrodes (represented by F7/F8, FT7/FT8, Fz, and FCz), whereas at the posterior electrodes (represented by P7/P8, PO7/PO8, Pz, and POz), the opposite was true. These data reveal for the first time the neural underpinnings of disorder and order perception, extending our understanding of the nature of disorder and order. This study also contributes to the cognitive fluency literature and indirectly expands the research on disorder and order stimuli in cognitive fluency

    Rough Set Approach to Incomplete Multiscale Information System

    Get PDF
    Multiscale information system is a new knowledge representation system for expressing the knowledge with different levels of granulations. In this paper, by considering the unknown values, which can be seen everywhere in real world applications, the incomplete multiscale information system is firstly investigated. The descriptor technique is employed to construct rough sets at different scales for analyzing the hierarchically structured data. The problem of unravelling decision rules at different scales is also addressed. Finally, the reduct descriptors are formulated to simplify decision rules, which can be derived from different scales. Some numerical examples are employed to substantiate the conceptual arguments

    Use of Hot Water Pressure Wash Surface Preparation and HRCSA Coatings in Bridge Maintenance

    Get PDF
    (c)1036338 (wo) 3In this Transportation Research Synthesis (TRS), state-of-the-art practice of highway bridge maintenance painting using high-ratio calcium sulfonate alkyd (HRCSA) and hot water pressure wash (HWPW) is reviewed and different state DOTs are surveyed. In summary, low-toxic HRCSA causes less pollution, eliminates waiting time between layers of coatings, and performs well for corrosion prevention. However, like any other protective coating system, optimum HRCSA performance requires following the manufacturer\u2019s specifications. Contrary to what the term \u201cone-coat system\u201d may suggest, HRCSA application is a multi-step process that requires HWPW surface preparation. Based on the literature review and survey findings, without further testing and trials, HRCSA is recommended only for maintenance tasks that can strictly fulfill the manufacturer\u2019s specifications, i.e., an initial HWPW followed by the multi-step process and sufficient drying time before an extreme weather event

    Meta analysis of heavy metal and pesticide pollution status of nine medicinal and edible substances

    Get PDF
    ObjectiveTo evaluate the heavy metal and pesticide pollution status of nine medicinal and edible substances, including Eucommia ulmoides leaves, Codonopsis pilosula, Cistanche deserticola, Dendrobium candidum, Astragalus membranaceus, Panax quinquefolium, Gastrodia elata, Ganoderma lucidum, and Corni Fructus.MethodsPubMed, China National Knowledge Network (CNKI), VIP, and Wanfang databases were searched to obtain research literature published from 2000 to 2022 on heavy metals, pesticides, and environmental pollutants in nine medicinal and edible substances. The literature was screened according to the inclusion and exclusion criteria, and the included studies were analyzed and pooled into estimates using meta-analysis.ResultsA total of 106 studies encompassing seven heavy metals, including lead (Pb), cadmium (Cd), mercury (Hg), arsenic (As), chromium (Cr), copper (Cu), and nickel (Ni), and 42 pesticides, including organochlorine, pyrethroid, and organophosphorus, of nine types of medicinal and edible substances used as food collected from 23 provinces (municipalities) were comprehensively analyzed. The average heavy metal content in the medicinal and edible substances used as food was 0.22 mg/kg (95%CI: 0.13~0.39), and the average heavy metal content of Eucommia ulmoides leaves was the highest (2.80 mg/kg, 95%CI: 0.75~10.37), followed by Dendrobium candidum with an average value of 0.30 mg/kg (95%CI: 0.18~0.49). The average value of heavy metals in the other medicinal and edible substances was lower than 0.30 mg/kg. Among the seven heavy metals analyzed, the Cu exhibited the highest content, followed by Cd and Pb. Subgroup analysis showed that the contents of the seven heavy metals in medicinal and edible substances collected from different locations had high heterogeneity (P<0.05). The meta-analysis showed that heterogeneity existed in the mean values of 42 pesticides (P<0.05), and the total mean values of pentachloronitrobenzene, BHC and DDT in Dendrobium candidum, Panax quinquefolium, Cistanche deserticola, Astragalus membranaceus, and Gastrodia elata were the highest.ConclusionThere are differences in the categories and contamination levels of heavy metals and pesticides in medicinal and edible substances. Heavy metal pollution is related to the origin and type of medicinal and edible substances. Prohibited pesticides can be detected in certain medicinal and edible substances, and further traceability analyses of pollutants in medicinal and edible substances should be conducted. The supervision and monitoring of the production and processing of medicinal and edible substances should be strengthened

    Villain Stardom in Socialist China: Chen Qiang and the Cultural Politics of Affect

    Get PDF
    Despite playing various kinds of roles across genres from 1949 to 1965, Chen Qiang acquired stardom mainly due to his remarkable screen performance as villainous landlords in socialist China. His villain stardom is an aberrant case, compared to the majority of film stars in Chinese socialist cinema who encouraged identification and emulation and helped propagate socialist ideology to reform Chinese citizens. Paying special attention to socio-historically specific film exhibition practices and the actor's own reflections on his villain performance, this article argues that Chen's stardom functioned as an important affective technology within a wider and complex Communist propaganda enterprise in that it helped cultivate class hatred necessary for the Communist revolution and socialist land reform campaigns. Through this case study, the article suggests that close engagement with both cultural–historical specificities of cinema and recent critical theories of affect open up a space for researching the diversified star phenomena in contemporary China

    Dynamical alterations of brain function and gut microbiome in weight loss

    Get PDF
    ObjectiveIntermittent energy restriction (IER) is an effective weight loss strategy. However, little is known about the dynamic effects of IER on the brain-gut-microbiome axis.MethodsIn this study, a total of 25 obese individuals successfully lost weight after a 2-month IER intervention. FMRI was used to determine the activity of brain regions. Metagenomic sequencing was performed to identify differentially abundant gut microbes and pathways in from fecal samples.ResultsOur results showed that IER longitudinally reduced the activity of obese-related brain regions at different timepoints, including the inferior frontal orbital gyrus in the cognitive control circuit, the putamen in the emotion and learning circuit, and the anterior cingulate cortex in the sensory circuit. IER longitudinally reduced E. coli abundance across multiple timepoints while elevating the abundance of obesity-related Faecalibacterium prausnitzii, Parabacteroides distasonis, and Bacterokles uniformis. Correlation analysis revealed longitudinally correlations between gut bacteria abundance alterations and brain activity changes.ConclusionsThere was dynamical alteration of BGM axis (the communication of E. coli with specific brain regions) during the weight loss under the IER
    corecore