Automatic Segmentation of Method Code into Meaningful Blocks: Design and Evaluation. Issue 1 (18th February 2013)
- Record Type:
- Journal Article
- Title:
- Automatic Segmentation of Method Code into Meaningful Blocks: Design and Evaluation. Issue 1 (18th February 2013)
- Main Title:
- Automatic Segmentation of Method Code into Meaningful Blocks: Design and Evaluation
- Authors:
- Wang, Xiaoran
Pollock, Lori
Vijay‐Shanker, K.
Pinzger, Martin
Poshyvanyk, Denys - Abstract:
- <abstract abstract-type="main"> <title>SUMMARY</title> <p>Good programming practice and guidelines suggest that programmers use both vertical and horizontal spacing to visibly delineate between code segments that represent different algorithmic steps or high‐level actions. Unfortunately, programmers do not always follow these guidelines. Editors and integrated development environments (IDEs) can easily indent codes based on syntax, but they do not currently support automatic blank line insertion, which presents more significant challenges involving the semantics.</p> <p>This paper presents and evaluates a heuristic solution to the automatic blank line insertion problem by leveraging both program structure and naming information to identify 'meaningful blocks', consecutive statements that logically implement a high‐level action. Our tool, SEGMENT, takes as input a Java method and outputs a segmented version that separates meaningful blocks by vertical spacing. We report on several studies involving human judgments to evaluate the effectiveness of the automatic blank line insertion algorithm, for different size methods and for different levels of programmer expertise. The results indicate strong positive overall opinion of SEGMENT's effectiveness in comparison with both developer‐written blank lines and blank lines inserted by newcomers to the code. The results vary only slightly among short and long methods, and among novice and advanced programmers. SEGMENT assists in making<abstract abstract-type="main"> <title>SUMMARY</title> <p>Good programming practice and guidelines suggest that programmers use both vertical and horizontal spacing to visibly delineate between code segments that represent different algorithmic steps or high‐level actions. Unfortunately, programmers do not always follow these guidelines. Editors and integrated development environments (IDEs) can easily indent codes based on syntax, but they do not currently support automatic blank line insertion, which presents more significant challenges involving the semantics.</p> <p>This paper presents and evaluates a heuristic solution to the automatic blank line insertion problem by leveraging both program structure and naming information to identify 'meaningful blocks', consecutive statements that logically implement a high‐level action. Our tool, SEGMENT, takes as input a Java method and outputs a segmented version that separates meaningful blocks by vertical spacing. We report on several studies involving human judgments to evaluate the effectiveness of the automatic blank line insertion algorithm, for different size methods and for different levels of programmer expertise. The results indicate strong positive overall opinion of SEGMENT's effectiveness in comparison with both developer‐written blank lines and blank lines inserted by newcomers to the code. The results vary only slightly among short and long methods, and among novice and advanced programmers. SEGMENT assists in making users obtain an overall picture of a method's actions and comprehend it quicker as well as provides hints for internal documentation placement. Copyright © 2013 John Wiley &amp; Sons, Ltd.</p> </abstract> … (more)
- Is Part Of:
- Journal of software. Volume 26:Issue 1(2014:Jan.)
- Journal:
- Journal of software
- Issue:
- Volume 26:Issue 1(2014:Jan.)
- Issue Display:
- Volume 26, Issue 1 (2014)
- Year:
- 2014
- Volume:
- 26
- Issue:
- 1
- Issue Sort Value:
- 2014-0026-0001-0000
- Page Start:
- 27
- Page End:
- 49
- Publication Date:
- 2013-02-18
- Subjects:
- Software engineering -- Periodicals
Computer software -- Development -- Periodicals
Software maintenance -- Periodicals
005.1 - Journal URLs:
- http://onlinelibrary.wiley.com/journal/10.1002/(ISSN)2047-7481 ↗
http://onlinelibrary.wiley.com/ ↗ - DOI:
- 10.1002/smr.1581 ↗
- Languages:
- English
- ISSNs:
- 2047-7473
- Deposit Type:
- Legaldeposit
- View Content:
- Available online (eLD content is only available in our Reading Rooms) ↗
- Physical Locations:
- British Library DSC - BLDSS-3PM
British Library HMNTS - ELD Digital store - Ingest File:
- 3027.xml