Exploring Tools and Strategies Used During Regular Expression Composition Tasks
Regular expressions are frequently found in programming projects. Studies have found that developers can accurately determine whether a string matches a regular expression. However, we still do not know the challenges associated with composing regular expressions.
We conduct an exploratory case study to reveal the tools and strategies developers use during regular expression composition. In this study, 29 students are tasked with composing regular expressions that pass unit tests illustrating the intended behavior. The tasks are in Java and the Eclipse IDE was set up with JUnit tests. Participants had one hour to work and could use any Eclipse tools, web search, or web-based tools they desired. Screen-capture software recorded all interactions with browsers and the IDE. We analyzed the videos quantitatively by transcribing logs and extracting personas. Our results show that participants were 30% successful (28 of 94 attempts) at achieving a 100% pass rate on the unit tests. When participants used tools frequently, as in the case of the novice tester and the knowledgeable tester personas, or when they guess at a solution prior to searching, they are more likely to pass all the unit tests. We also found that compile errors often arise when participants searched for a result and copy/pasted the regular expression from another language into their Java files. These results point to future research into making regular expression composition easier for programmers, such as integrating visualization into the IDE to reduce context switching or providing language migration support when reusing regular expressions written in another language to reduce compile errors.
Sun 26 MayDisplayed time zone: Eastern Time (US & Canada) change
09:45 - 10:35 | Session VI : Tools for comprehensionICPC 2019 Technical Research / ICPC 2019 Replications at Laurier Chair(s): Alexandre Bergel University of Chile | ||
09:45 20mFull-paper | Replication Can Improve Prior Results: A GitHub Study of Pull Request Acceptance ICPC 2019 Replications Di Chen North Carolina State University, USA, Kathryn Stolee North Carolina State University, Tim Menzies North Carolina State University | ||
10:05 10mShort-paper | Do Extracted State Machine Models Help to Understand Embedded Software? ICPC 2019 Technical Research | ||
10:15 20mFull-paper | Exploring Tools and Strategies Used During Regular Expression Composition Tasks ICPC 2019 Technical Research Gina Bai North Carolina State University, Brian Clee , Nischal Shrestha , Carl Chapman , Cimone Wright , Kathryn Stolee North Carolina State University Pre-print |