|
|
Code Confusion in White Box Crowdsourced Software Testing
|
Luo Run, Huang Song, Chen Hao, Chen MingYu
|
|
|
Table 1. Package generation algorithm
|
|
Algorithm: package generation algorithm | function: DeclInPkgs Input: declaration list of N declarations Output: package list of M packages | 1. func DeclInPkgs (str [ ]string, m int) [ ][ ][ ]string{ 2. var result [ ][ ][ ]string 3. n:=len(str) 4. split(n,m) // Decomposing a positive integer n into m positive integers (recursion) 5. newstr:=wholeArrange(str) // The str is fully arranged to generate a newstr [] string 6. for _,i:=range newstr{ 7. According to the M numbers, extract the declaration from the declaration list I and package it into a package 8. Put the generated new package into the package list } 9. return result 10. } |
|
|
|