28,725 research outputs found

    Untangling Java Code Changes

    Get PDF
    Pull requests are a critical approach for developers to collaborate in software development, which also initiates the following code review and integration. However, tangled pull requests can be introduced into version control systems via committing unrelated or multi-purposes code changes in one single pull request, which have been found to bring a negative impact on code recommendation systems and bug prediction models in the previous research. In this thesis, we conduct a case study on 640 pull requests among 8 popular open-source Java projects from GitHub. Through manual analysis, we find that 47% of the pull requests are tangled. In order to further understand the characteristics of tangled pull requests, we perform a qualitative annotation and classify the reasons for tangled pull requests. We find that 75% are tangled because bug fixing, feature improvement, or new feature adding are committed with an update in test code. The remaining 25% of pull requests are tangled because developers commit two or more unrelated bug fixing, feature improvement, test code adding or modifying, new feature adding, feature improvement and bug fixing, and other combinations inside one pull request. We also propose an approach to predict whether a pull request is tangled or not with an AUC of 0.87. Furthermore, we also predict whether two lines of code changes belong to the same task, which achieves an AUC of 0.74

    The effects of change decomposition on code review -- a controlled experiment

    Get PDF
    Background: Code review is a cognitively demanding and time-consuming process. Previous qualitative studies hinted at how decomposing change sets into multiple yet internally coherent ones would improve the reviewing process. So far, literature provided no quantitative analysis of this hypothesis. Aims: (1) Quantitatively measure the effects of change decomposition on the outcome of code review (in terms of number of found defects, wrongly reported issues, suggested improvements, time, and understanding); (2) Qualitatively analyze how subjects approach the review and navigate the code, building knowledge and addressing existing issues, in large vs. decomposed changes. Method: Controlled experiment using the pull-based development model involving 28 software developers among professionals and graduate students. Results: Change decomposition leads to fewer wrongly reported issues, influences how subjects approach and conduct the review activity (by increasing context-seeking), yet impacts neither understanding the change rationale nor the number of found defects. Conclusions: Change decomposition reduces the noise for subsequent data analyses but also significantly supports the tasks of the developers in charge of reviewing the changes. As such, commits belonging to different concepts should be separated, adopting this as a best practice in software engineering

    Untangling Fine-Grained Code Changes

    Get PDF
    After working for some time, developers commit their code changes to a version control system. When doing so, they often bundle unrelated changes (e.g., bug fix and refactoring) in a single commit, thus creating a so-called tangled commit. Sharing tangled commits is problematic because it makes review, reversion, and integration of these commits harder and historical analyses of the project less reliable. Researchers have worked at untangling existing commits, i.e., finding which part of a commit relates to which task. In this paper, we contribute to this line of work in two ways: (1) A publicly available dataset of untangled code changes, created with the help of two developers who accurately split their code changes into self contained tasks over a period of four months; (2) a novel approach, EpiceaUntangler, to help developers share untangled commits (aka. atomic commits) by using fine-grained code change information. EpiceaUntangler is based and tested on the publicly available dataset, and further evaluated by deploying it to 7 developers, who used it for 2 weeks. We recorded a median success rate of 91% and average one of 75%, in automatically creating clusters of untangled fine-grained code changes

    The Impact of Systematic Edits in History Slicing

    Full text link
    While extracting a subset of a commit history, specifying the necessary portion is a time-consuming task for developers. Several commit-based history slicing techniques have been proposed to identify dependencies between commits and to extract a related set of commits using a specific commit as a slicing criterion. However, the resulting subset of commits become large if commits for systematic edits whose changes do not depend on each other exist. We empirically investigated the impact of systematic edits on history slicing. In this study, commits in which systematic edits were detected are split between each file so that unnecessary dependencies between commits are eliminated. In several histories of open source systems, the size of history slices was reduced by 13.3-57.2% on average after splitting the commits for systematic edits.Comment: 5 pages, MSR 201

    Impact of tangled magnetic fields on AGN-blown bubbles

    Full text link
    There is growing consensus that feedback from AGN is the main mechanism responsible for stopping cooling flows in clusters of galaxies. AGN are known to inflate buoyant bubbles that supply mechanical power to the intracluster gas (ICM). High Reynolds number hydrodynamical simulations show that such bubbles get entirely disrupted within 100 Myr, as they rise in cluster atmospheres, which is contrary to observations. This artificial mixing has consequences for models trying to quantify the amount of heating and star formation in cool core clusters of galaxies. It has been suggested that magnetic fields can stabilize bubbles against disruption. We perform MHD simulations of fossil bubbles in the presence of tangled magnetic fields using the high order PENCIL code. We focus on the physically-motivated case where thermal pressure dominates over magnetic pressure and consider randomly oriented fields with and without maximum helicity and a case where large scale external fields drape the bubble.We find that helicity has some stabilizing effect. However, unless the coherence length of magnetic fields exceeds the bubble size, the bubbles are quickly shredded. As observations of Hydra A suggest that lengthscale of magnetic fields may be smaller then typical bubble size, this may suggest that other mechanisms, such as viscosity, may be responsible for stabilizing the bubbles. However, since Faraday rotation observations of radio lobes do not constrain large scale ICM fields well if they are aligned with the bubble surface, the draping case may be a viable alternative solution to the problem. A generic feature found in our simulations is the formation of magnetic wakes where fields are ordered and amplified. We suggest that this effect could prevent evaporation by thermal conduction of cold Halpha filaments observed in the Perseus cluster.Comment: accepted for publication in MNRAS, (downgraded resolution figures, color printing recommended

    FixMiner: Mining Relevant Fix Patterns for Automated Program Repair

    Get PDF
    Patching is a common activity in software development. It is generally performed on a source code base to address bugs or add new functionalities. In this context, given the recurrence of bugs across projects, the associated similar patches can be leveraged to extract generic fix actions. While the literature includes various approaches leveraging similarity among patches to guide program repair, these approaches often do not yield fix patterns that are tractable and reusable as actionable input to APR systems. In this paper, we propose a systematic and automated approach to mining relevant and actionable fix patterns based on an iterative clustering strategy applied to atomic changes within patches. The goal of FixMiner is thus to infer separate and reusable fix patterns that can be leveraged in other patch generation systems. Our technique, FixMiner, leverages Rich Edit Script which is a specialized tree structure of the edit scripts that captures the AST-level context of the code changes. FixMiner uses different tree representations of Rich Edit Scripts for each round of clustering to identify similar changes. These are abstract syntax trees, edit actions trees, and code context trees. We have evaluated FixMiner on thousands of software patches collected from open source projects. Preliminary results show that we are able to mine accurate patterns, efficiently exploiting change information in Rich Edit Scripts. We further integrated the mined patterns to an automated program repair prototype, PARFixMiner, with which we are able to correctly fix 26 bugs of the Defects4J benchmark. Beyond this quantitative performance, we show that the mined fix patterns are sufficiently relevant to produce patches with a high probability of correctness: 81% of PARFixMiner's generated plausible patches are correct.Comment: 31 pages, 11 figure

    Three-dimensional Magnetohydrodynamic Simulations of Buoyant Bubbles in Galaxy Clusters

    Full text link
    We report results of 3D MHD simulations of the dynamics of buoyant bubbles in magnetized galaxy cluster media. The simulations are three dimensional extensions of two dimensional calculations reported by Jones & De Young (2005). Initially spherical bubbles and briefly inflated spherical bubbles all with radii a few times smaller than the intracluster medium (ICM) scale height were followed as they rose through several ICM scale heights. Such bubbles quickly evolve into a toroidal form that, in the absence of magnetic influences, is stable against fragmentation in our simulations. This ring formation results from (commonly used) initial conditions that cause ICM material below the bubbles to drive upwards through the bubble, creating a vortex ring; that is, hydrostatic bubbles develop into "smoke rings", if they are initially not very much smaller or very much larger than the ICM scale height. Even modest ICM magnetic fields with beta = P_gas/P_mag ~ 10^3 can influence the dynamics of the bubbles, provided the fields are not tangled on scales comparable to or smaller than the size of the bubbles. Quasi-uniform, horizontal fields with initial beta ~ 10^2 bifurcated our bubbles before they rose more than about a scale height of the ICM, and substantially weaker fields produced clear distortions. On the other hand, tangled magnetic fields with similar, modest strengths are generally less easily amplified by the bubble motions and are thus less influential in bubble evolution. Inclusion of a comparably strong, tangled magnetic field inside the initial bubbles had little effect on our bubble evolution, since those fields were quickly diminished through expansion of the bubble and reconnection of the initial field.Comment: 20 pages, 12 figures. Accepted for publication in The Astrophysical Journa
    • …
    corecore