One of the main challenges faced by today’s developers is keeping up with the staggering amount of source code that needs to be read and understood. In order to help developers with this problem and reduce the costs associated with it, one solution is to use simple textual descriptions of source code entities that developers can grasp easily, while capturing the code semantics precisely. We propose an approach to automatically determine such descriptions, based on automated text summarization technology and structural information.
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Poster Supporting Program Comprehension with Source Code Summarization
1. SoftwarE Visualization and Evolution REsearch Group Colectivo de Investigación en Ingeniería de Software
Supporting Program Comprehension with
Source Code Summarization
Sonia Haiduc*, Jairo Aponte** and Andrian Marcus*
* Wayne State University, Detroit, MI, USA
** Universidad Nacional de Colombia, Bogotá, Colombia
Skimming code
Reading code
PROBLEM
• Before performing maintenance on a system,
developers need to understand its source code
• Programmers formulate hypotheses and use
searching and browsing to navigate the code
• Programmers have two choices:
– Skim over the names of source code entities
– Read the source code of software entities
+ Fast
– Insufficient information – Slow
– Shallow understanding SOLUTION: Automated Code Summaries – Too much information
+ Deep understanding
What should be included in Description: VFS virtual file system read write
mkdir directory path save +
How should the code
the code summaries? Internal classes: DirectoryEntry
Methods: listDirectory, mkdir, constructPath +
+ summaries be generated?
Fields: WRITE_CAP, READ_CAP, lock
Semantic Information
+
What does the source code do? Sub-classes: FileVFS, FavoritesVFS
Other: ...
+
●
Identifiers and comments ●
Automatic text summarization
SEMANTIC Information Structural Information
How does the code work?
●
Static analysis
●
Class relationships
●
Callers, callees Description: options set pane browser toolbar plugin +
editing appearance properties save
+ What code entities
●
Members of a class Classes: AbstractOptionPane, BrowserOptionPane +
●
Parameters, local variables, etc
Methods: save, restore, getDefault
Similar packages: org.gjt.sp.jedit.gui
+ should we summarize?
Other: ... ●
Methods, method sequences
STRUCTURAL Information ●
Classes, packages, etc.
How do developers Are different summaries
generate code summaries? + Faster than reading all the code needed for different tasks?
+ More information than skimming
+ Deeper understanding than skimming
How good are the How useful are the
automatic summaries when How should we evaluate automatic code
compared to manual ones? code summaries? summaries for SE tasks?
STUDY SETUP PRELIMINARY RESULTS
●
6 developers, 12 methods in Atunes • Automatic code summaries have good overlap with manual code
●
Used semantic information: 5 most relevant terms summaries
●
Manual vs. automatic summaries • Method, class, and parameter names could improve automatic summaries
ICSE New Ideas and Emerging Results Track (ICSE NIER) Cape Town, South Africa May 2-8, 2010