FAST: an Eclipse Plug-In for Test-Driven Reuse Diplom Thesis

Total Page:16

File Type:pdf, Size:1020Kb

FAST: an Eclipse Plug-In for Test-Driven Reuse Diplom Thesis FAST: An Eclipse Plug-in for Test-Driven Reuse Diplom Thesis by Monika Krug presented at Chair of Software Technology Professor Colin Atkinson, Ph. D. Department of Mathematics and Computer Science University of Mannheim September 2007 II Abstract FAST: An Eclipse Plug-in for Test-Driven Reuse The code search engines that have emerged over the last few years, in particular merobase.com, simplify the task of finding software components on the Internet based on their interfaces, e. g. Java classes by their method signatures. However, matching signatures do not ensure that the discovered components do what the developer expects from them, i. e. that they are semantically correct. The goal of this thesis is to develop the FAST (Fully Automated Search and Test) Eclipse plug-in that will support Test-Driven Reuse, also known as Extreme Harvesting. FAST will parse the JUnit test case written by the developer at the beginning of the development cycle and find and download Java classes that fit its syntax, i. e. have the right method names, parameter and return types. The plug-in will then run the JUnit test case on each class that was found to determine which of them really do what the developer needs them to do and which ones only happen to fit syntactically. That way Agile Development and reuse come together. III IV Content 1 Introduction....................................................................................................................... ..................1 1.1 Motivation.................................................................................................................. .................1 1.2 Task....................................................................................................................... ......................1 1.3 Structure................................................................................................................... ...................1 2 Agile Development.................................................................................................................. ............2 2.1 Extreme Programming (XP)........................................................................................ ................3 2.2 Crystal Family............................................................................................................ .................4 2.3 Dynamic Systems Development Method (DSDM).............................................................. ........5 2.4 Scrum................................................................................................................... .......................5 2.5 Pragmatic Programming.............................................................................................. ................6 2.6 Agile Modeling................................................................................................................... .........6 2.7 XBreed................................................................................................................ ........................7 2.8 Can Open Source Development Be Agile?................................................................ ..................8 2.9 Test-Driven Development (TDD)............................................................................ ..................10 2.10 JUnit...................................................................................................................... ..................13 3 Reuse................................................................................................................................... ..............15 3.1 Recall and Precision........................................................................................... .......................17 3.2 Repositories.................................................................................................................. .............18 3.3 Source Code Search Engines.................................................................................... .................21 4 Test-Driven Reuse.................................................................................................... .........................33 4.1 Categorization and Evaluation of Test-Driven Reuse........................................ ........................42 4.2 Integrated IDE Support for Reuse............................................................................................ ..47 5 The FAST Plug-in...................................................................................................................... ........50 5.1 What FAST Does............................................................................................................ ...........50 5.2 Overview over the Architecture.................................................................................... .............53 5.3 The Parser: Determining Interfaces from Test Cases.............................................. ...................53 5.4 Interaction with Merobase....................................................................................... ..................58 5.5 Creating a Plug-in............................................................................................................. .........59 5.6 Creating Projects Programmatically................................................................... .......................61 5.7 Running the JUnit Test Cases Programmatically...................................................... .................62 5.8 Non-proactiveness of FAST.................................................................................................... ...62 6 Evaluation of the Plug-in..................................................................................................... ..............64 6.1 Parser Tests...................................................................................................................... ..........64 6.2 Complete Tests................................................................................................. .........................73 7 Conclusion................................................................................................................................... ......87 7.1 Future Work for the FAST plug-in.................................................................................. ...........88 7.2 Future Work for Component Search Engines.......................................................................... ...89 V VI 1 Introduction 1.1 Motivation Agile Development and reuse both aim to enhance productivity and code quality, and there is little doubt that they both achieve these goals [54] [14]. So far they have been considered complementary, if not opposite concepts, because the lack of documentation and other non-code artifacts in Agile Development seems to preclude reuse [2]. It would be useful to bring the two together and shorten development time even further, thus saving a lot of money in software production, as the software industry is one of the few that almost exclusively rely on manpower. The higher code quality will save bug-fixing costs. Also in a non-commercial open-source environment, avoiding “reinventing the wheel” [55] will produce higher quality software and save the scarce resource of development time during the free time of the volunteer programmers, therefore resulting in more free software within the same time. The emergence of code search engines over the past few years has made it easier to find existing software components. Yet still there is little reuse. When the developer does not anticipate the existence of a component, he or she will not bother to start up a code search engine and formulate a query. This would be a distraction from his or her current train of thought or developing activity, therefore no attempt of reuse is made [11] [46] [50]. The correct formulation of the query may be another hurdle [7]. Additionally, when a large number of components fit the query, it can be cumbersome to manually download the components found by the search engine and test them one-by- one to find those that really do what the developer wants and don't only happen to have matching signatures. So what is needed to enable Test-Driven Reuse and thus bring Agile Development and reuse together is integrated support in the development environment [4] [7], here Eclipse, to retrieve components that fit a test case with only a few mouse-clicks, and have those components tested automatically. 1.2 Task The task was to develop an Eclipse plug-in that would parse a JUnit test case and determine the names, parameter and return types of the methods which the not-yet-developed Java class under test needs to have, formulate a suitable search query and send it to merobase.com, download the classes that are found, generate and adapter class if necessary, compile the downloaded classes and run the JUnit test case on those that compile successfully. 1.3 Structure As this thesis is about bringing Agile Development and reuse together, it will begin with background information and previous research on Agile Development on the one hand, in particular of course Test- Driven Development, and reuse on the other hand, in particular repositories and code search engines. Then it will explain how the two come together in Test-Driven Reuse, also called Extreme Harvesting. The remainder of this thesis will be about the FAST plug-in, its evaluation and possible future development. 1 2 Agile Development Agile or lightweight development methods
Recommended publications
  • LPC-Link2 Debug Probe Firmware Programming Rev
    LPC-Link2 Debug Probe Firmware Programming Rev. 2.1.0 — 22 January, 2020 User Guide NXP Semiconductors LPC-Link2 Debug Probe Firmware Programming 22 January, 2020 Copyright © 2015-2018 NXP Semiconductors All rights reserved. LPC-Link2 Debug Probe Firmware Programming - All information provided in this document is subject to legal disclaimers © 2015-2018 NXP Semiconductors. All rights reserved. User Guide Rev. 2.1.0 — 22 January, 2020 ii NXP Semiconductors LPC-Link2 Debug Probe Firmware Programming 1. Revision History .................................................................................................. 1 1.1. 2.1.1 ........................................................................................................ 1 1.2. v2.0.0 ....................................................................................................... 1 1.3. v1.8.2 ....................................................................................................... 1 1.4. v1.5.2 ....................................................................................................... 1 1.5. v1.5 ......................................................................................................... 1 2. Introduction ......................................................................................................... 2 3. Quick Start .......................................................................................................... 3 4. Debug Firmware Variants and Drivers .................................................................
    [Show full text]
  • Management of Programmable Safety Systems
    MANAGEMENT OF PROGRAMMABLE SAFETY SYSTEMS erhtjhtyhy JOE LENNER Argonne National Laboratory Advanced Photon Source Safety Interlocks Group 9/11/2019 MANAGEMENT OF PROGRAMMABLE SAFETY SYSTEMS Applicable Standards . IEC 61508 is the parent standard – Applicable in any situation – Used when no applicable child IEC 61800-5-2 standard exists Elec Drives – Very general, many requirements are EN 50128 Railway overly complex ISO 13849 . Child Standards Machinery IEC – Specialize the requirements of IEC 60601 61508 61508 for a specific application Medical Dev IEC 62061 – If you meet the requirements of the Machinery child, you meet the relevant IEC 61511 IEC Process Ind. 50156 requirements of 61508 Furnaces . Best fit for Accelerators – IEC 62061 – ISO 13849 – IEC 61511 2 MANAGEMENT OF PROGRAMMABLE SAFETY SYSTEMS Certified hardware benefits . Use of a single PLC – Eliminates redundant systems and associated wiring. – Ability to clearly separate safety from non-safety tasks – Built-in diagnostics – Safety I/O allows reduction of relays . Programming – Use of certified and proven functions reduces programming effort • Easier to apply = Less errors – Reduces safety and standard programs/tasks • Reduced size of safety program • Reduces review & test time 3 MANAGEMENT OF PROGRAMMABLE SAFETY SYSTEMS Vendor Software Management . Programming tool updates – Only when necessary • The “Microsoft“ effect • Development platform support . Firmware Updates – Quarterly reviews unless alert 4 MANAGEMENT OF PROGRAMMABLE SAFETY SYSTEMS Software . The latest generation
    [Show full text]
  • Visual Programming: a Programming Tool for Increasing Mathematics Achivement
    ARTICLES VISUAL PROGRAMMING: A PROGRAMMING TOOL FOR INCREASING MATHEMATICS ACHIVEMENT By CHERYL SWANIER * CHERYL D. SEALS ** ELODIE BILLIONNIERE *** * Associate Professor, Mathematics and Computer Science Department, Fort Valley State University ** Associate Professor, Computer Science and Software Engineering Department, Auburn University *** Doctoral Student, Computer Science and Engineering Department, Arizona State University ABSTRACT This paper aims to address the need of increasing student achievement in mathematics using a visual programming language such as Scratch. This visual programming language facilitates creating an environment where students in K-12 education can develop mathematical simulations while learning a visual programming language at the same time. Furthermore, the study of visual programming tools as a means to increase student achievement in mathematics could possibly generate interests within the computer-supported collaborative learning community. According to Jerome Bruner in Children Learn By Doing, "knowing how something is put together is worth a thousand facts about it. It permits you to go beyond it” (Bruner, 1984, p.183). Keywords : Achievement, Creativity, End User Programming, Mathematics Education, K-12, Learning, Scratch, Squeak, Visual Programming INTRODUCTION programming language as a tool to create Across the nation, math scores lag (Lewin, 2006). Students mathematical tutorials. Additionally, this paper provides a are performing lower than ever. Lewin reports, for “the modicum of information as it relates to the educational second time in a generation, education officials are value of visual programming to mathematical rethinking the teaching of math in American schools” achievement. Peppler and Kafai (2007) indicate “game (p.1). It is imperative that higher education, industry, and players program their own games and learn about K-12 collaborate to ascertain a viable solution to the software and interface design.
    [Show full text]
  • Reflections on Applying the Growth Mindset Approach to Computer Programming Courses
    2018 Proceedings of the EDSIG Conference ISSN: 2473-3857 Norfolk, Virginia USA v4 n4641 Reflections on Applying the Growth Mindset Approach to Computer Programming Courses Katherine Carl Payne [email protected] Jeffry Babb [email protected] Amjad Abdullat [email protected] Department of Computer Information and Decision Management West Texas A&M University Canyon, Texas 79016, USA Abstract This paper provides motivation for the exploration of the adoption of Growth Mindset techniques in computer programming courses. This motivation is provided via an ethnographic account of the implementation of Growth Mindset concepts in the design and delivery of two consecutive computer programming courses. We present components of a Growth Mindset approach to STEM education and illustrate how they can be implemented in computing courses. Experiences of an instructor in two consecutive computer programming courses at a private regional undergraduate university in the southwestern United States are described and analyzed. Six students enrolled in the required Java course in the fall semester opted to take the elective Python course in the spring semester. Keywords: Growth mindset, reflective teaching practice, computer programming, STEM education, pedagogy 1. INTRODUCTION The work of Carol Dweck on what is termed the “Growth Mindset” has received significant As educators in STEM courses, we frequently hear attention in primary and secondary math students utter the phrase “I’m not a technical education and has recently experienced a person” or “I’m not good with computers.” I renaissance through application to math higher receive messages from concerned students education (Silva & White, 2013). Her work and expressing this sentiment every semester.
    [Show full text]
  • A Social Information Foraging Approach to Improving End-User
    A Social Information Foraging Approach to Improving End-User Developers’ Productivity A dissertation submitted to the Graduate School of the University of Cincinnati in partial fulfillment of the requirements for the degree of Doctor of Philosophy in the Department of Electrical Engineering and Computer Science of the College of Engineering and Applied Science by Xiaoyu Jin B.S. University of Cincinnati October 2017 Committee Chair: Nan Niu, Ph.D. i Abstract Software engineering is the application of engineering to the development of software in a systematic method. Traditionally, professional software engineers use technologies and practices from a variety of fields to improve their productivity in creating software and to improve the quality of the delivered product. The practices come from aspects of software requirements, software design, software testing, software development process, and software quality, etc. Nowadays, more and more non-professional developers start to write programs not as their job function, but as means to support their main goal, which is something else, such as accounting, designing a webpage, doing office work, scientific research, entertainment, etc. The number of non-professional developers is already several times the number of professional programmers, and even students of elementary school start to learn simple programming tool skills. However, due to the varied purposes of developing software, the software engineering practices for these non-professional developers can be quite different from the practices for professional developers. The programming behavior of non-professional developers has characteristic of opportunistic, which lacks systematic guidelines, and the software created by them tends to lack enough quality considerations. Therefore, support from software engineering area is needed to improve end-user programmers’ productivity and to increase the quality of the software developed.
    [Show full text]
  • Knowledge and Skills Requirements for the Software Design and Testing of Automotive Applications Jernej Zabavnik, Andreas Riel, M
    Knowledge and skills requirements for the software design and testing of automotive applications Jernej Zabavnik, Andreas Riel, M. Marguč, Miran Rodič To cite this version: Jernej Zabavnik, Andreas Riel, M. Marguč, Miran Rodič. Knowledge and skills requirements for the software design and testing of automotive applications. SAAEI 2019, Jul 2019, Cordoba, Spain. hal-02335566 HAL Id: hal-02335566 https://hal.archives-ouvertes.fr/hal-02335566 Submitted on 28 Oct 2019 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. > REPLACE THIS LINE WITH YOUR PAPERLIBRO IDENTIFICATION DE ACTAS - NUMBERSAAEI 2019 (DOUBLE-CLICK HERE TO EDIT) < 1 Knowledge and skills requirements for the software design and testing of automotive applications J. Zabavnik, A. Riel, M. Marguč, M. Rodič software development process is upgraded with the processes Abstract— The required knowledge and skills that should be and methods prescribed in IEC/ISO 26262 [2], the functional provided to the novice developer, designing and testing the safety safety standard for the electrical, electronic and programmable critical device in automotive industry using Hardware-in-the- electronic devices in road vehicles. Automotive SPICE and Loop (HiL), are presented in the paper.
    [Show full text]
  • Programming Tool
    programming tool Wizard 5.5 USER MANUAL Conditions of use Intended use Wizard 5 is a PC based configuration tool intended to provide access to programmable settings of the control system, enabling customisation of driving parameters and performance to suit the needs and preferences of individual users. Warnings Performance adjustments must only be made by healthcare professionals, or by persons who completely understand the programming parameters, the adjustment process, the configuration of the vehicle, and the capabilities of the driver. Inappropriate settings can make the vehicle uncontrollable or unstable. An uncontrollable or unstable vehicle can cause an unsafe situation such as a crash, with the risk of serious injury to the driver or bystanders, or damage to the vehicle or surrounding property. After you have programmed the vehicle, test the vehicle thoroughly according to the testing procedure for the control system that is installed on the vehicle, as described in the relevant installation manual(s). Check that the vehicle drives safely and that the performance of the vehicle is appropriate to the capabilities and needs of the user. If the vehicle does not perform as intended, reprogram the vehicle and test again. Repeat this procedure until the vehicle performs as intended. If the intended performance cannot be reached, contact your service agent. It is the responsibility of the health care professional to make sure that the user is capable of understanding and physically operating the programmed features and functions. With inappropriate programming settings, certain features and options may not be accessible or perform as expected. While the programming tool is writing a program to the vehicle, if the programming tool is disconnected from the vehicle, or you abort the download manually, or the programming tool indicates “Failed” or “Disconnected”, or the PC is turned off or crashes, then the download is not complete and the vehicle cannot be used.
    [Show full text]
  • Leveraging Graphical User Interface Automation for Generic Robot Programming
    robotics Article Leveraging Graphical User Interface Automation for Generic Robot Programming Tudor B. Ionescu Human-Machine Interaction Group, Vienna University of Technology, 1040 Vienna, Austria; [email protected]; Tel.: +43-(1)-58801-33001 Abstract: A novel approach to generic (or generalized) robot programming and a novel simplified, block-based programming environment, called “Assembly”, are introduced. The approach lever- ages the newest graphical user interface automation tools and techniques to generate programs in various proprietary robot programming environments by emulating user interactions in those environments. The “Assembly” tool is used to generate robot-independent intermediary program models, which are translated into robot-specific programs using a graphical user interface automation toolchain. The generalizability of the approach to list, tree, and block-based programming is assessed using three different robot programming environments, two of which are proprietary. The results of this evaluation suggest that the proposed approach is feasible for an entire range of programming models and thus enables the generation of programs in various proprietary robot programming envi- ronments. In educational settings, the automated generation of programs fosters learning different robot programming models by example. For experts, the proposed approach provides a means for generating program (or task) templates, which can be adjusted to the needs of the application at hand on the shop floor. Keywords: generic robot programming; GUI automation; robotic process automation; graphical pro- gramming; block-based programming Citation: Ionescu, T.B. Leveraging 1. Introduction Graphical User Interface Automation Recent advances in safe, collaborative robotics technology and the increasing avail- for Generic Robot Programming. ability of open source robot hardware facilitated the emergence of numerous new vendors Robotics 2021, 10, 3.
    [Show full text]
  • Applying Software Engineering Techniques to the Development of Robotic Systems
    Applying Software Engineering Techniques to the Development of Robotic Systems Claudia Pons1;2, Gabriela Ar´evalo1;2, Gonzalo Zabala1, Ricardo Mor´an1 1 CAETI - UAI, Buenos Aires, Argentina 2 CONICET Avda. Rivadavia 1917 (1033), Buenos Aires, Argentina fgabrielag.arevalo, claudia.pons,[email protected], [email protected] Abstract. In these days most robotic systems tend to be complex to maintain and reuse because existing frameworks are based mainly on code-driven approaches. This means the software development process is reduced to the implementation of systems using specific programming languages. During the constant evolution, the systems grow in size and in complexity. Even when these approaches address the needs of robotic- focused markets, currently used methodologies and toolsets fail to cope with the needs of such complex software development process. The gen- eral objective of our project is the definition of a methodological frame- work supported by a set of tools to deal with the requirements of the robotic software development process. A major challenge is to make the step from code-driven to model-driven in the development of robotic software systems. Separating robotics knowledge from short-cycled im- plementation technologies is essential to foster reuse and maintenance. In this paper we report our initial results. Keywords: robotic software system, software development process, soft- ware engineering. 1 Introduction Robotic systems (RSs) play an increasing role in everyday life. The need for robotic systems in industrial and educational settings increases and becomes more demanding. While robotic systems grow to be more and more complex, the need to apply the engineering principles to their software development process is a major challenge in these days.
    [Show full text]
  • An Exploration of the Role of Visual Programming Tools in the Development of Young Children’S Computational Thinking
    An Exploration of the Role of Visual Programming Tools in the Development of Young Children’s Computational Thinking Simon P. Rose, M. P. Jacob Habgood and Tim Jay Sheffield Hallam University, Sheffield, UK [email protected] [email protected] [email protected] Abstract: Programming tools are being used in education to teach computer science to children as young as 5 years old. This research aims to explore young children’s approaches to programming in two tools with contrasting programming interfaces, ScratchJr and Lightbot, and considers the impact of programming approaches on developing computational thinking. A study was conducted using two versions of a Lightbot-style game, either using a ScratchJr-like or Lightbot style programming interface. A test of non-verbal reasoning was used to perform a matched assignment of 40, 6 and 7-year-olds to the two conditions. Each child then played their version of the game for 30 minutes. The results showed that both groups had similar overall performance, but as expected, the children using the ScratchJr-like interface performed more program manipulation or ‘tinkering’. The most interesting finding was that non-verbal reasoning was a predictor of program manipulation, but only for the ScratchJr-like condition. Children approached the ScratchJr-like program differently depending on prior ability. More research is required to establish how children use programming tools and how these approaches influence computational thinking. Keywords: Visual programming, Education, Computational thinking, K-12, Lightbot, Scratch 1. Introduction This paper focuses on two tools used to teach programming to young children, ScratchJr (Flannery et al., 2013) and Lightbot (Lightbot Inc., 2016).
    [Show full text]
  • VIAVI Instrument Programming Tool (VIP Tool™) User Guide
    VIAVI Instrument Programming Tool (VIP Tool™) User Guide Contents Introduction to the VIP Tool ............................................................................................... 1 Overview ........................................................................................................................... 1 Intended User .................................................................................................................... 1 System Requirements ....................................................................................................... 1 Installing VIP Tool ............................................................................................................... 2 A Sample VIP Tool Directory Structure .............................................................................. 2 Enabling the VIP Tool ........................................................................................................ 2 Establishing an Ethernet Connection to the Instrument .................................................. 4 Connection Types ............................................................................................................. 4 Direct Connection ............................................................................................................................ 4 Network Connection ........................................................................................................................ 4 Configuring the Instrument’s Network Connection ............................................................
    [Show full text]
  • Blending Classroom Teaching and Learning with Qr Codes
    10th INTERNATIONAL CONFERENCE ON MOBILE LEARNING 2014 ii PROCEEDINGS OF THE 10th INTERNATIONAL CONFERENCE ON MOBILE LEARNING 2014 MADRID, SPAIN 28 FEBRUARY – 2 MARCH, 2014 Organised by IADIS International Association for Development of the Information Society iii Copyright 2014 IADIS Press All rights reserved This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, re-use of illustrations, recitation, broadcasting, reproduction on microfilms or in any other way, and storage in data banks. Permission for use must always be obtained from IADIS Press. Please contact [email protected] Edited by Inmaculada Arnedillo Sánchez and Pedro Isaías Associate Editor: Luís Rodrigues ISBN: 978-989-8704-02-3 iv TABLE OF CONTENTS FOREWORD xi PROGRAM COMMITTEE xiii KEYNOTE LECTURE xvii PANEL xviii FULL PAPERS SUPPORTING TEACHERS TO DESIGN AND USE MOBILE 3 COLLABORATIVE LEARNING GAMES Iza Marfisi-Schottman and Sébastien George EBOOKS AS PDF FILES, IN EPUB FORMAT OR AS INTERACTIVE IBOOKS? 11 DIGITAL BOOKS IN PHYSICS LESSONS OF SECONDARY EDUCATION Manfred Lohr MOBILE LEARNING AND EARLY AGE MATHEMATICS 19 Shir Peled and Shimon Schocken M-LEARNING – ON PATH TO INTEGRATION WITH ORGANISATION 26 SYSTEMS Shilpa Srivastava and Ved Prakash Gulati IMPROVING HISTORY LEARNING THROUGH CULTURAL HERITAGE, 34 LOCAL HISTORY AND TECHNOLOGY Graça Magro, Joaquim Ramos de Carvalho and Maria José Marcelino INTRIGUE AT THE MUSEUM: FACILITATING ENGAGEMENT 41 AND LEARNING
    [Show full text]