Abstract: |
In software development, it is crucially important to effectively capture, record and maintain traceability links in a lightweight way. For example, we often would like to know “what documents (rationale) a programmer referred to, to write this code fragment”, which is supposed to be solved by the traceability links. Most of previous work are retrospective approaches based on information retrieval techniques, but they are likely to generate many false positive traceability links; i.e., their accuracy is low. Unlike retrospective approaches, this paper proposes a novel lightweight prospective approach, which we call TCC (tracer-carrying code). TCC uses a hash value as a tracer (global ID), widely used in distributed version control systems like Git. TCC automatically embeds a TCC tracer into source code as a side-effect of users’ copy&paste operation, so users have no need to explicitly handle tracers (e.g., users have no need to copy&pastes URLs). TCC also caches the referred original text into Git repository. Thus, users can always view the original text later by simply clicking the tracer, even after its URL or file path is changed, or the original text is modified or removed. To show the feasibility of our TCC approach, we developed several TCC prototype systems for Emacs editor, Google Chrome browser, Chrome PDF viewer, and macOS system clipboard. We applied them to the development of a simple iPhone application, which shows a good result; our TCC is quite effective and useful to establish and maintain pinpointable traceability links in a lightweight way. Also several important findings are obtained. |