blob: ff5541db7545cc014fb35418074d1889216c665b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# Cross-referencing code and requirement
---
Example for generating identifier for requirements from user stories:
```bash
# Try to delete ./example/srs_with_id.txt and then run this command
python ./src/storode.py ./example/srs.txt
```
Example for generating web pages:
```bash
# Try to delete ./doc and run this command
python ./src/storode.py ./example/srs_with_id.txt ./example/src
```
A cross-referencing document will be generated at
./doc/example-srs_with_id.html. Open example-srs_with_id.html in a
web browser to view it.
Example for testing collision rate of cut of MD5 digest:
```bash
python ./src/collision.py
```
I cloned this project from https://gitee.com/dragondove/storode. I
fixed the following two bugs.
Bug#1:
>python ./src/storode.py ../englishpal/app/englishpal-srs_with_id.txt ../englishpal/app
Traceback (most recent call last):
File "./src/storode.py", line 241, in <module>
for line in file.readlines():
UnicodeDecodeError: 'gbk' codec can't decode byte 0x9d in position 6578: illegal multibyte sequence
Bug#2:
>python ./src/storode.py ../englishpal/app/englishpal-srs_with_id.txt ../englishpal/app
Traceback (most recent call last):
File "./src/storode.py", line 340, in <module>
with open(requirement_out_file, 'w') as out_file:
FileNotFoundError: [Errno 2] No such file or directory: './doc/englishpal-srs_with_id.html'
References
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 金雄镕. (2020). Cross-referencing requirements and source code to reduce software maintenance cost. 浙江师范大学大学毕业论文.
- 韩金彤. (2021). 将代码与需求互索引可以降低维护费用吗? 浙江师范大学大学毕业论文.
|