for a component than it would actually have taken us
to implement it. In order to avoid this kind of
pitfalls, our process model forces the reuse engineer,
for each one of the components, to speculate on
whether it is really worthy of implementing using
reusable code. There are two possible scenarios
where searching for reusable code should be
discouraged:
• The component needed is very specific,
therefore a lot of time might be spent in
searching accompanied by a high probability of
not returning any results.
• The implementation of the component is trivial;
therefore it will take less time for an
experienced programmer to implement it, than
for the reuse engineer to spot reusable code that
will cover its requirement.
If the reuse engineer decides that the component
is not worth searching for reusable solutions he is
left with only one option; implementing it from
scratch. Looking at the model, though, one notices a
different step to proceed than from scratch
implementation: “SEARCH FOR TRIVIAL
CODE”. Developers were reusing code way before
open source, or the various source code repositories
flourish. This need for reuse comes from the
empirical observation that some snippets of code are
being found in most of software projects. Reading
from or writing to a file, connecting to a database,
creating a comparator in Java, are functionalities we
meet so often, when it comes to software
engineering, that have come to be considered
bibliography code. It is this kind of code that we opt
for the reuse engineer to find implemented by
following the “SEARCH FOR TRIVIAL CODE
PATH”. This way, even when seeking for reusable
components leads to a dead-end the reuse engineer
can be sure that has exhausted every possible way of
performing effective code reuse. After retrieving as
many snippets of code as possible, the code is being
adapted in the needs of the component under
development, the code of the component is being
finalized, and the reuse engineer is ready to move on
to the next component. Of course, when all kinds of
search fail, implementing from scratch is inevitable.
Finally we are going to examine the case where
the component under development cannot be found
as is in a repository of open source code and the
reuse engineer needs to break it to simpler
components of less functionality. No matter how
complex a component he is dealing with, the reuse
engineer needs to be sure that it does not exist in
some code forge. Therefore, as our model illustrates,
he performs a search to forges. After receiving no
results he must examine whether the component can
be further decomposed to simpler components. If not
this means he deals with a component of medium or
little complexity and therefore the whole process
goes back to the previous paragraph where we
discussed the role of the “SEARCH FOR TRIVIAL
CODE” search / implementation model. In case the
component can be decomposed to simpler ones our
process model will consider them as
“UNIMPLEMENTED COMPONENTS” and the
reuse process will continue as normal.
We define the proposed model as semi-
automated because, as it became clear by this
section, the presence of the reuse engineer, is
considered essential. When we speak about a reuse
engineer, we refer to an expert, a software engineer
trained to develop software using reusable code. As
we already explained, normal developers can take on
that role or in more systematic reuse approaches this
role can be assigned to persons with this specific
task as part of a development team.
5 RELATED WORK
(Crnkovic et. al., 2006) present a modification of the
waterfall process for component reuse, in which
there are two processes one for developing reusable
components and another for developing systems
with these reusable components. The authors discuss
in detail the modifications of the activities of the
waterfall model for system development with
component reuse. To connect these two
aforementioned processes they include an additional
process called ‘Component Assessment’ which
should be carried out as much as possible
independently from the system development to
reduce time-to-market. In general an assessment
activity should comprise the following: (a)
Component discovery, (b) Component selection
according its suitability for current and/or future
products, (c) Component verification, and (d)
Storage of the component and its metadata for future
reference. Our proposed process can be used by
reuse engineers to carry out the component
discovery and selection in a more systematic way
when they reuse FLOS software.
Some proposed processes for component
retrieval from the Internet repositories aim at
pushing the automation of this process as much as
possible.
In (Hummel and Atkinson, 2007) a process
called Extreme Harvesting is proposed, which uses
A SEMI-AUTOMATED PROCESS FOR OPEN SOURCE CODE REUSE
183