For practical experiments with an industrial strength project, the partner net-linx AG provided the source code of its emerging product nxCom.
The product is a three tier solution providing a business directory service. There is a core business logic module, a maintance interface implemented with Java Swing and a customer web interface using Java Server Pages.
The experiments where limited to the business logic module. It consists of 245 classes and 17131 lines of code. Persistence is realized using the Versant ODBMS and the Java Versant Interface (JVI) [VC]. The OCL toolkit does not work together with JVI due to a bug in the latter. (This bug has been fixed after submission of this paper.) A detailed analysis can be found in appendix . For the test a special developer configuration was used, which employs a XML file for realizing persistence.
For experimentation 10 invariants have been developed and inserted into this module. It wouldn't make much sense to give an introduction into the business logic module, therefore the actual constraints have been transformed into analogous counterparts for the Person - Company model used in [WK99]:
employers->forAll(employees->includes(self))
isMarried implies (wife->isEmpty xor husband->isEmpty)
employees->size>0
uppername=name.toUpper
Original Code | Instrumented Code | |
Size of Source Code | 1.1 MB | 3.2 MB |
Lines of Code | 17131 | 43587 |
(Re-)Instrumentation | 36 s | 91 s |
(Re-)Cleaning | 23 s | 73 s |
Running the instrumented code revealed a number of constraint violations. Some of them have been reconstructed by hand, and turned out to be inconsistencies in the test data. Due to the amount it was not possible to correct these inconsistencies within this work.