Databases Reference
In-Depth Information
activities call for such technical support. Section 2.4 outlines issues and challenges
in using peers as information resources in code search, and addresses cognitive as
well as social issues in communicating with the “right” person to obtain the sought
information in a timely manner. Finally, Section 2.5 lists how the existing search
mechanisms would further help a developer in interacting with source code.
2.2 Anatomy of Code Reuse
This section focuses on a developer's code search activity (see the small right oval in
Fig. 2.1 ). From the cognitive perspective for the activities involved in code search,
we present two dimensions for depicting code reuse 2 that underlie a wide variety of
code search activities.
The first dimension is for what purpose a developer uses existing code for a
current programming task. The second dimension is the way in which the developer
uses existing code.
2.2.1 The Efficacy Dimension of Code Reuse
The first dimension, which we call the efficacy of code reuse, characterizes the
purpose of, the motivation for, or the developer's foreseeable gain in using exist-
ing code.
There are two types of efficacy in code reuse. The first one is efficacy through
code texture , and the other is efficacy through code functionality (Fig. 2.2 ).
Efficacy through code texture is established when a developer brings the texture
(i.e., literal character strings) of an existing code segment into the program that he
or she is currently editing.
Efficacy through functionality is recognized by a developer when the developer
is provided with the functionality of an existing code segment that he or she needs
in a program.
Fig. 2.2 The efficacy dimen-
sion: through code texture
( left ) and through code func-
tionality ( right )
2 Note that by “code reuse,” we mean a developer's action of simply using existing code in the
developer's task, and do not necessarily mean a part of more established areas of research on
software reuse in software engineering.
Search WWH ::




Custom Search