Using Stack Overflow content to assist in code review. (27th May 2019)
- Record Type:
- Journal Article
- Title:
- Using Stack Overflow content to assist in code review. (27th May 2019)
- Main Title:
- Using Stack Overflow content to assist in code review
- Authors:
- Sharma, Shipra
Sodhi, Balwinder - Abstract:
- Summary: An essential goal for programmers is to minimize the cost of identifying and correcting defects in source code. Code review is commonly used for identifying programming defects. However, manual code review has some shortcomings: (1) it is time‐consuming and (2) outcomes are subjective and depend on the skills of reviewers. An automated approach for assisting in code reviews is thus highly desirable. We present a tool for assisting in code review and results from our experiments evaluating the tool in different scenarios. The tool leveraged content available from professional programmer support forums (eg, StackOverflow.com) to determine potential defectiveness of a given piece of source code. The defectiveness is expressed on the scale of { Likely defective, neutral, unlikely to be defective }. The basic idea employed in the tool is (1) to identify a set P of discussion posts on Stack Overflow such that each p ∈ P contains source code fragment(s), which sufficiently resemble the input code C being reviewed, and (2) to determine the likelihood of C being defective by considering all p ∈ P . A novel aspect of our approach is to use document fingerprinting for comparing two pieces of source code. Our choice of document fingerprinting technique is inspired by source code plagiarism detection tools where it has proven to be very successful. In the experiments that we performed to verify the effectiveness of our approach, source code samples from more than 300 GitHubSummary: An essential goal for programmers is to minimize the cost of identifying and correcting defects in source code. Code review is commonly used for identifying programming defects. However, manual code review has some shortcomings: (1) it is time‐consuming and (2) outcomes are subjective and depend on the skills of reviewers. An automated approach for assisting in code reviews is thus highly desirable. We present a tool for assisting in code review and results from our experiments evaluating the tool in different scenarios. The tool leveraged content available from professional programmer support forums (eg, StackOverflow.com) to determine potential defectiveness of a given piece of source code. The defectiveness is expressed on the scale of { Likely defective, neutral, unlikely to be defective }. The basic idea employed in the tool is (1) to identify a set P of discussion posts on Stack Overflow such that each p ∈ P contains source code fragment(s), which sufficiently resemble the input code C being reviewed, and (2) to determine the likelihood of C being defective by considering all p ∈ P . A novel aspect of our approach is to use document fingerprinting for comparing two pieces of source code. Our choice of document fingerprinting technique is inspired by source code plagiarism detection tools where it has proven to be very successful. In the experiments that we performed to verify the effectiveness of our approach, source code samples from more than 300 GitHub open‐source repositories were taken as input. An F1 score of 0.94 has been achieved in identifying correct/relevant results. … (more)
- Is Part Of:
- Software, practice & experience. Volume 49:Number 8(2019)
- Journal:
- Software, practice & experience
- Issue:
- Volume 49:Number 8(2019)
- Issue Display:
- Volume 49, Issue 8 (2019)
- Year:
- 2019
- Volume:
- 49
- Issue:
- 8
- Issue Sort Value:
- 2019-0049-0008-0000
- Page Start:
- 1255
- Page End:
- 1277
- Publication Date:
- 2019-05-27
- Subjects:
- automated software engineering -- code review -- crowd knowledge -- software development -- Stack Overflow
Computer software -- Periodicals
Computer programming -- Periodicals
Computer programs -- Periodicals
005.3 - Journal URLs:
- http://onlinelibrary.wiley.com/ ↗
- DOI:
- 10.1002/spe.2706 ↗
- Languages:
- English
- ISSNs:
- 0038-0644
- Deposit Type:
- Legaldeposit
- View Content:
- Available online (eLD content is only available in our Reading Rooms) ↗
- Physical Locations:
- British Library DSC - 8321.453000
British Library DSC - BLDSS-3PM
British Library STI - ELD Digital store - Ingest File:
- 11003.xml