The STUDIA UNIVERSITATIS BABEŞ-BOLYAI issue article summary

The summary of the selected article appears at the bottom of the page. In order to get back to the contents of the issue this article belongs to you have to access the link from the title. In order to see all the articles of the archive which have as author/co-author one of the authors mentioned below, you have to access the link from the author's name.

 
       
         
    STUDIA INFORMATICA - Issue no. Sp. Issue 1 / 2014  
         
  Article:   EVALUATING COMMENT-TO-AST ASSIGNMENT HEURISTICS FOR C++ PROGRAMS.

Authors:  ZOLTÁN PORKOLÁB.
 
       
         
  Abstract:   Comments are integral part of the source code of software.They preserve the intentions of the developers, document constraints and highlight implementation details. Good comments help us to understand the code base and make maintenance easier. Most of the software tools ignore comments because they take no part in code generation. However, there are cases when comments should be taken into account: refactoring tools need to move code along with their comments and code comprehension tools need to show comments related to a given context. Since these tools are working on the abstract syntax tree (AST), comments should be assigned to the appropriate AST nodes.Assigning comments to AST nodes is a non-straightforward task. Most methods use heuristics that place the comment to the proper AST node.This article improves existing heuristics. We identify corresponding AST nodes by distance and type. We also manage to contract consecutive connected comments. Macro-related comments are handled in a special way. We quantify the correctness of comment assignments and evaluate the different solutions on open source C++   projects comparing our method with existing tools. Our method may be useful for other programming languages with respective modi fications.

2010 Mathematics Subject Classi cation. 68N15, 68N20.1998 CR Categories and Descriptors. D.1.0 [Software]: Programming Techniques - General ; D.3.3 [Software]: Programming Languages - Language Constructs and Features D.2.7 [Software]: Programming Languages - Distribution, Maintenance, and Enhancement - Documentation.

Key words and phrases. Source Code Comments, Abstract Syntax Tree.
 
         
     
         
         
      Back to previous page