698 research outputs found

    Proactive Empirical Assessment of New Language Feature Adoption via Automated Refactoring: The Case of Java 8 Default Methods

    Full text link
    Programming languages and platforms improve over time, sometimes resulting in new language features that offer many benefits. However, despite these benefits, developers may not always be willing to adopt them in their projects for various reasons. In this paper, we describe an empirical study where we assess the adoption of a particular new language feature. Studying how developers use (or do not use) new language features is important in programming language research and engineering because it gives designers insight into the usability of the language to create meaning programs in that language. This knowledge, in turn, can drive future innovations in the area. Here, we explore Java 8 default methods, which allow interfaces to contain (instance) method implementations. Default methods can ease interface evolution, make certain ubiquitous design patterns redundant, and improve both modularity and maintainability. A focus of this work is to discover, through a scientific approach and a novel technique, situations where developers found these constructs useful and where they did not, and the reasons for each. Although several studies center around assessing new language features, to the best of our knowledge, this kind of construct has not been previously considered. Despite their benefits, we found that developers did not adopt default methods in all situations. Our study consisted of submitting pull requests introducing the language feature to 19 real-world, open source Java projects without altering original program semantics. This novel assessment technique is proactive in that the adoption was driven by an automatic refactoring approach rather than waiting for developers to discover and integrate the feature themselves. In this way, we set forth best practices and patterns of using the language feature effectively earlier rather than later and are able to possibly guide (near) future language evolution. We foresee this technique to be useful in assessing other new language features, design patterns, and other programming idioms

    Analyzing the Adoption Rate of Local Variable Type Inference in Open-source Java 10 Projects

    Get PDF
    Type Inference is used in programming languages to improve writability. In this paper, we will be looking more specifically at Local Variable Type Inference (LVTI). For those unfamiliar with LVTI, we will also give an in-depth explanation of what it is and how it works. There is a lot of debate surrounding Type Inference in modern day programming languages. More specifically, whether the costs associated with LVTI outweigh the benefits. It has found its way into many higher-level languages including C#, C++, JavaScript, Swift, Kotlin, Rust, Go, etc. In this paper, we will look at the usefulness of LVTI and its popularity since the release of Java 10. Our study will show that LVTI in Java has not received widespread adoption. We will also explain a possible reason for this is based on the information we have gather from our empirical study which involved statically analyzing 6 popular open source Java 10 projects. We will also discuss different scenarios in which Type Inference can obscure different programming errors

    Redesigning the jMetal Multi-Objective Optimization Framework

    Get PDF
    jMetal, an open source, Java-based framework for multi-objective optimization with metaheuristics, has become a valuable tool for many researches in the area as well as for some industrial partners in the last ten years. Our experience using and maintaining it during that time, as well as the received comments and suggestions, have helped us improve the jMetal design and identify significant features to incorporate. This paper revisits the jMetal architecture, describing its refined new design, which relies on design patterns, principles from object-oriented design, and a better use of the Java language features to improve the quality of the code, without disregarding jMetal ever goals of simplicity, facility of use, flexibility, extensibility and portability. Among the newly incorporated features, jMetal supports live interaction with running algorithms and parallel execution of algorithms.Universidad de Málaga. Campus de Excelencia Internacional Andalucía Tech

    OpenJML: Software verification for Java 7 using JML, OpenJDK, and Eclipse

    Full text link
    OpenJML is a tool for checking code and specifications of Java programs. We describe our experience building the tool on the foundation of JML, OpenJDK and Eclipse, as well as on many advances in specification-based software verification. The implementation demonstrates the value of integrating specification tools directly in the software development IDE and in automating as many tasks as possible. The tool, though still in progress, has now been used for several college-level courses on software specification and verification and for small-scale studies on existing Java programs.Comment: In Proceedings F-IDE 2014, arXiv:1404.578
    • …
    corecore