Regression testing is applied to modified software to provide confidence th
at the changed parts behave as intended and that the unchanged parts have n
ot been adversely affected by the modifications. To reduce the cost of regr
ession testing, test cases are selected from the test suite that was used t
o test the original version of the software this process is called regressi
on test selection. A safe regression-test-selection algorithm selects every
test case in the test suite that may reveal a fault in the modified softwa
re. Safe regression-test-selection techniques can help to reduce the time r
equired to perform regression testing because they select only a portion of
the test suite for use in the testing but guarantee that the faults reveal
ed by this subset will be the same as those revealed by running the entire
test suite. This paper presents the first safe regression-test-selection te
chnique that, based on the use of a suitable representation, handles the fe
atures of the Java language. Unlike other safe regression test selection te
chniques, the presented technique also handles incomplete programs. The tec
hnique can thus be safely applied in the (very common) case of Java softwar
e that uses external libraries or components; the analysis of the external
code is not required for the technique to select test cases for such softwa
re. The paper also describes RETEST, a regression-test-selection system tha
t implements our technique, and a set of empirical studies that demonstrate
that the regression-test-selection algorithm can be effective in reducing
the size of the test suite.