SimplyHover: Improving comprehension of else statements

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Code comprehension is a vital mental process in any maintenanceactivity. It becomes decisive in large code blocks, in particular thosethat are governed by if-else statements. These large blocks increasethe spatial distance between the if statement and its else counterpart or other dependent else statements. This increased spatialcomplexity makes it hard for the developer to recall the if logicalexpression that he has just read and understood, so he needs to goback and read it again, then understand it, and eventually negate itto get the else implicit logical expression. In extreme cases the if-elsepair might occur in different pages so the developer has to scrollback and forth to grasp them both. Furthermore, to understandthe else implicit negated expression he might want to go back tothe farthest if statement and understand the aggregated logicalexpression all the way to the else which makes the understandingof the else even harder.In this work, we introduce SimplyHover, a plug-in for the EclipseIDE that brings the if condition next to its else counterpart orone of its descendants saving the developer to go back and forthover and over again. Furthermore, SimplyHover presents to thedeveloper, when he hovers over else, the if conditions in theirnegated form and even lets him write his own simplification for that.In some cases, the tool even suggests its own simplification of theaggregated expression. To demonstrate the usage and usefulness ofSimplyHover, a few code snippets from real software are presented.

Original languageEnglish (US)
Title of host publicationProceedings - 2020 IEEE/ACM 28th International Conference on Program Comprehension, ICPC 2020
PublisherIEEE Computer Society
Pages456-460
Number of pages5
ISBN (Electronic)9781450379588
DOIs
StatePublished - Jul 13 2020
Event28th IEEE/ACM International Conference on Program Comprehension, ICPC 2020, collocated with the 42nd International Conference on Software Engineering, ICSE 2020 - Seoul, Korea, Republic of
Duration: Jul 13 2020Jul 15 2020

Publication series

NameIEEE International Conference on Program Comprehension

Conference

Conference28th IEEE/ACM International Conference on Program Comprehension, ICPC 2020, collocated with the 42nd International Conference on Software Engineering, ICSE 2020
CountryKorea, Republic of
CitySeoul
Period7/13/207/15/20

Keywords

  • Code comprehension
  • If-else
  • Tool

ASJC Scopus subject areas

  • Hardware and Architecture
  • Software

Fingerprint Dive into the research topics of 'SimplyHover: Improving comprehension of else statements'. Together they form a unique fingerprint.

Cite this