4,167 research outputs found

    Dealing with clones in software : a practical approach from detection towards management

    Get PDF
    Despite the fact that duplicated fragments of code also called code clones are considered one of the prominent code smells that may exist in software, cloning is widely practiced in industrial development. The larger the system, the more people involved in its development and the more parts developed by different teams result in an increased possibility of having cloned code in the system. While there are particular benefits of code cloning in software development, research shows that it might be a source of various troubles in evolving software. Therefore, investigating and understanding clones in a software system is important to manage the clones efficiently. However, when the system is fairly large, it is challenging to identify and manage those clones properly. Among the various types of clones that may exist in software, research shows detection of near-miss clones where there might be minor to significant differences (e.g., renaming of identifiers and additions/deletions/modifications of statements) among the cloned fragments is costly in terms of time and memory. Thus, there is a great demand of state-of-the-art technologies in dealing with clones in software. Over the years, several tools have been developed to detect and visualize exact and similar clones. However, usually the tools are standalone and do not integrate well with a software developer's workflow. In this thesis, first, a study is presented on the effectiveness of a fingerprint based data similarity measurement technique named 'simhash' in detecting clones in large scale code-base. Based on the positive outcome of the study, a time efficient detection approach is proposed to find exact and near-miss clones in software, especially in large scale software systems. The novel detection approach has been made available as a highly configurable and fully fledged standalone clone detection tool named 'SimCad', which can be configured for detection of clones in both source code and non-source code based data. Second, we show a robust use of the clone detection approach studied earlier by assembling its detection service as a portable library named 'SimLib'. This library can provide tightly coupled (integrated) clone detection functionality to other applications as opposed to loosely coupled service provided by a typical standalone tool. Because of being highly configurable and easily extensible, this library allows the user to customize its clone detection process for detecting clones in data having diverse characteristics. We performed a user study to get some feedback on installation and use of the 'SimLib' API (Application Programming Interface) and to uncover its potential use as a third-party clone detection library. Third, we investigated on what tools and techniques are currently in use to detect and manage clones and understand their evolution. The goal was to find how those tools and techniques can be made available to a developer's own software development platform for convenient identification, tracking and management of clones in the software. Based on that, we developed a clone-aware software development platform named 'SimEclipse' to promote the practical use of code clone research and to provide better support for clone management in software. Finally, we evaluated 'SimEclipse' by conducting a user study on its effectiveness, usability and information management. We believe that both researchers and developers would enjoy and utilize the benefit of using these tools in different aspect of code clone research and manage cloned code in software systems

    Stereo: editing clones refactored as code generators

    Get PDF
    International audienceClone detection is a largely mature technology able to detect many code duplications, also called clones, in software systems of practically any size. The classic approaches to clone management are either clone removal, which consists in refactoring clones as an available language abstraction, or clone tracking, using a so-called linked editor, able to propagate changes between clone instances. However, past studies have shown that clone removal is not always feasible due to the limited expressiveness of language abstractions, or not desirable because of the abstraction overhead or the risks inherent to the refactoring. Linked editors, on the other hand, provide costless abstraction at no risk, but have their own issues, such as limited expressiveness, scalability, and controllability. This paper presents a new approach in which clones are safely refactored as code generators, but the unmodified code is presented to the maintainers with the same look-and-feel as in a linked editor. This solution has good expressiveness, scalability, and controllability properties. A prototype such editor is presented along with a first application within an industrial project

    The Love/Hate Relationship with the C Preprocessor: An Interview Study

    Get PDF
    The C preprocessor has received strong criticism in academia, among others regarding separation of concerns, error proneness, and code obfuscation, but is widely used in practice. Many (mostly academic) alternatives to the preprocessor exist, but have not been adopted in practice. Since developers continue to use the preprocessor despite all criticism and research, we ask how practitioners perceive the C preprocessor. We performed interviews with 40 developers, used grounded theory to analyze the data, and cross-validated the results with data from a survey among 202 developers, repository mining, and results from previous studies. In particular, we investigated four research questions related to why the preprocessor is still widely used in practice, common problems, alternatives, and the impact of undisciplined annotations. Our study shows that developers are aware of the criticism the C preprocessor receives, but use it nonetheless, mainly for portability and variability. Many developers indicate that they regularly face preprocessor-related problems and preprocessor-related bugs. The majority of our interviewees do not see any current C-native technologies that can entirely replace the C preprocessor. However, developers tend to mitigate problems with guidelines, even though those guidelines are not enforced consistently. We report the key insights gained from our study and discuss implications for practitioners and researchers on how to better use the C preprocessor to minimize its negative impact

    Can intelligence explode?

    Get PDF
    The technological singularity refers to a hypothetical scenario in which technological advances virtually explode. The most popular scenario is the creation of super-intelligent algorithms that recursively create ever higher intelligences. It took many decades for these ideas to spread from science fiction to popular science magazines and finally to attract the attention of serious philosophers. David Chalmers' (JCS, 2010) article is the first comprehensive philosophical analysis of the singularity in a respected philosophy journal. The motivation of my article is to augment Chalmers' and to discuss some issues not addressed by him, in particular what it could mean for intelligence to explode. In this course, I will (have to) provide a more careful treatment of what intelligence actually is, separate speed from intelligence explosion, compare what super-intelligent participants and classical human observers might experience and do, discuss immediate implications for the diversity and value of life, consider possible bounds on intelligence, and contemplate intelligences right at the singularity

    The politics of female friendship in contemporary speculative fiction

    Full text link
    Ce projet examine comment la politique et l’amitié sont actualisées dans la fiction spéculative du XXIe siècle à travers différents médias. Cette thèse aborde la manière dont ces relations interpersonnelles affectent la sphère sociale et le statu quo des mondes fictifs à l’étude. Pour orienter la discussion, j’utilise le concept d’autonomie relationnelle qui reconnaît l’interdépendance des individus autonomes et de la communauté en général et l’éthique du care qui environne la moralité comme étant relationnelle et contextualisée. L’utilisation conjointe de ces deux cadres me permet de discuter de la façon dont les amitiés sont propices à la participation politique. Le premier chapitre présente une discussion globale de The Handmaid’s Tale (1985) de Margaret Atwood et notamment de son influence au sein du genre de la fiction spéculative féministe. Ensuite, dans une première section, je me concentre sur les notions d’autonomie par rapport à l’adaptation graphique du roman d’Atwood par Renée Nault (2019), que je compare avec la bande dessinée Bitch Planet de Kelly Sue DeConnick et Valentine de Landro (2013-2017). Dans une seconde section, je me concentre sur l’éthique du care en tant que processus pouvant favoriser des amitiés empreintes d’implications politiques en analysant l’adaptation télévisée de The Handmaid’s Tale, produite par Hulu, et la série Orphan Black, produite par BBC America. La fiction spéculative permet d’expérimenter librement avec différentes idées politiques et de comprendre comment la société pourrait réagir dans des scénarios extrêmes. Ces expériences de pensée reflètent nos propres luttes et lacunes politiques et pourraient ultimement indiquer de meilleures façons de résoudre les problèmes actuels.This project examines how politics and friendship are actualized in speculative fiction across different media in the twenty-first century. This thesis discusses how these interpersonal relationships affect the social sphere and the status quo of the fictional worlds in question. To guide the discussion, I use the concept of relational autonomy, which recognizes the interconnectedness of both autonomous individuals and the community at large, and ethics of care, which understands morality as relational and contextualized. I use these two frameworks in tandem to discuss how friendships are conducive to political participation. The first chapter presents an overarching discussion of Margaret Atwood's The Handmaid's Tale (1985) in its legacy to the feminist speculative fiction genre. Following, in the first section, I focus on notions of autonomy in relation to Renée Nault's graphic novel adaptation of Atwood’s novel (2019) and contrast it with Kelly Sue DeConnick and Valentine de Landro’s comic Bitch Planet (2013-2017). In the second section, I focus on the ethics of care as a process that can foster friendships with political implications by analyzing Hulu's TV adaptation of The Handmaid's Tale and BBC America's Orphan Black. SF offers the freedom to test different political ideas and to understand how society might react in extreme scenarios. These thought experiments reflect our own political struggles and shortcomings; ultimately, they might point at better ways to solve current problems

    A Mutational Hotspot and Strong Selection Contribute to the Order of Mutations Selected for during Escherichia coli Adaptation to the Gut

    Get PDF
    The relative role of drift versus selection underlying the evolution of bacterial species within the gut microbiota remains poorly understood. The large sizes of bacterial populations in this environment suggest that even adaptive mutations with weak effects, thought to be the most frequently occurring, could substantially contribute to a rapid pace of evolutionary change in the gut. We followed the emergence of intra-species diversity in a commensal Escherichia coli strain that previously acquired an adaptive mutation with strong effect during one week of colonization of the mouse gut. Following this first step, which consisted of inactivating a metabolic operon, one third of the subsequent adaptive mutations were found to have a selective effect as high as the first. Nevertheless, the order of the adaptive steps was strongly affected by a mutational hotspot with an exceptionally high mutation rate of 10-5. The pattern of polymorphism emerging in the populations evolving within different hosts was characterized by periodic selection, which reduced diversity, but also frequency-dependent selection, actively maintaining genetic diversity. Furthermore, the continuous emergence of similar phenotypes due to distinct mutations, known as clonal interference, was pervasive. Evolutionary change within the gut is therefore highly repeatable within and across hosts, with adaptive mutations of selection coefficients as strong as 12% accumulating without strong constraints on genetic background. In vivo competitive assays showed that one of the second steps (focA) exhibited positive epistasis with the first, while another (dcuB) exhibited negative epistasis. The data shows that strong effect adaptive mutations continuously recur in gut commensal bacterial species.Deutsche Forschungs gemeinschaft grant: (SFB 680); Fundação para a Ciência e a Tecnologia grant: (SFRH/BPD/1117 25/2015)
    • …
    corecore