Presentation is loading. Please wait.

Presentation is loading. Please wait.

Extracting a Unified Directory Tree to Compare Similar Software Products Yusuke Sakaguchi, Takashi Ishio, Tetsuya Kanda, Katsuro Inoue Department of Computer.

Similar presentations


Presentation on theme: "Extracting a Unified Directory Tree to Compare Similar Software Products Yusuke Sakaguchi, Takashi Ishio, Tetsuya Kanda, Katsuro Inoue Department of Computer."— Presentation transcript:

1 Extracting a Unified Directory Tree to Compare Similar Software Products Yusuke Sakaguchi, Takashi Ishio, Tetsuya Kanda, Katsuro Inoue Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

2 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Background: Similar software products Clone-and-own approach –Copying and modifying an existing product –Importing libraries A Ver.1.0 Fix a bug Clone-and-own t A Ver.1.1 B Ver.1.0 B Ver.1.1 C Ver.1.0 Clone-and-own Must fix the bug

3 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Software Product Line Engineering Promising for managing derived software products To apply the approach to existing products, developers need to understand the commonalities and variabilities of them. –Duszynski et al. [1] proposed to compare source code in corresponding directories among similar products. Developers must know corresponding directories among products (which directories should be compared). 2 [1] S. Duszynski, J. Knodel, and M. Becker “Analyzing the source code of multiple software variants for reuse potential,” Reverse Engineering, 2011

4 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University The correspondence of directories Some existing techniques [2], [3] can extract corresponding directories between two similar products. Cannot analyze more than two products at a time. 3 [2] K. Yoshimura, D. Ganesan, and D. Muthig “Assessing merge potential of existing engine control systems into a product line” Software Engineering for Automotive Systems, 2006 [3] D. Holten and J. J. van Wijk “Visual comparison of hierarchically organized data” Joint Eurographics / IEEE - VGTC Conference on Visualization, 2008

5 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University The proposed method Automatically extract a unified directory tree representing corresponding directories among multiple products Key idea –Corresponding directories have similar source files 4

6 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University S1S2 S3 src a a a bb b c c Our prototype Input –Source code of some products Output –a unified directory tree 5 b ac src S1S2 S3 src a b c a b S1S2 S3 src a a a bb b c c 3 3 2 2 1 Directory trees Directory graph Spanning tree

7 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Node of directory graph 6

8 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Similarity 7

9 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Example 8 b ac src S1S2 S3 src a b c a b The same color nodes are similar. White nodes have no files.

10 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Example 9 a a a bb b c c

11 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Special Treatment 10 Directories without files  A single node represents such directories if their subdirectories are represented by the same node Root directories  A root node represents all the root directories of products, irrespective of product similarity.

12 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Example 11 b ac src S1S2 S3 src a b c a b

13 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Example 12 S1S2 S3 src a a a bb b c c

14 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Connecting nodes Weighted arcs –The number of parent-subdirectory relationship among two nodes. 13 S1S2 S3 src a a a bb b c c S1S2 S3 src a a a bb b c c 3 3 2 2 1 parent-subdirectory relationship

15 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Greedy tree extraction 14

16 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Greedy loop 19 S1S2 S3 src a a a bb b c c 3 3 2 2 1

17 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Directory Viewer 16 Tree View shows the unified directory tree. If a node contains multiple directories having different source code, the node is colored in blue. Different code included

18 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Directory Viewer 17 File List View shows a table of file names and their MD5 hash values contained in a selected node. A black hash value indicates that the file content is different from another product. Different contents

19 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Directory Viewer 18 File Matrix View shows the similarity of files having the same file name selected in a file list view. A darker (yellow/red) color indicates a lower similarity.

20 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Case study Input products –Android OS : 4.2 –CPU : Qualcomm MSM8974 19 ProductVendor Mobile Network Operator Release#Dirs FJL22Fujitsuau2013/117,683 301FFujitsuSoftBank2013/127,708 F-01FFujitsuNTT DOCOMO 2013/107,582 SO-01FSonyNTT DOCOMO 2013/105,840

21 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Output A predetermined similarity threshold th = 0.8 Execution time : 42 minutes –Two Intel Xeon (2.27Ghz, 4cores) –24GB RAM The resultant unified directory tree comprises 9,037 nodes. –673 nodes contain different contents from other products. 20

22 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Example: kernel node 21 --------------Fujitsu-------------- --Sony-- Makefile AndroidKernel.mk Developer-specific options for the kernel build is mainly written in this file.

23 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Example: Product-specific directory 22 (Fujitsu) external (Sony) external chronium external (Fujitsu) chronium (Sony) chronium (Fujitsu/Sony) Common subdirectories (Sony) Unique subdirectories Different Common Unique to Sony InputOutput

24 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Conclusion and Future Work Our tool visualizes a unified directory tree. We conducted a case study using four Android products. –The tool enabled us to quickly focus on directories having different contents. Future work: Controlled experiment to evaluate –The effectiveness for source code comparison tasks. 23

25 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 24

26 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Creating node Can analyze the differences among the directories 25 0.90.85 0.9 0.7

27 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Aligning the tree with a specific product root : {,, }s1s2s3 nsrc : {,, }s1/srcs2/srcs3/src na : {,, } s1/src/a s2/src/a s3/src/a nb : {,, } s1/src/a/b s2/src/b s3/src/b nc : {, } s1/src/c s2/src/c 2 30 Focus on S1

28 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Directory Viewer 27 Scope Button

29 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Tree View 28 S1 : cS2 : c S1 : b S2 : b S3 : b DifferenceSimilar Different file Path

30 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Example: kernel node 29 --------------Fujitsu-------------- --Sony-- MAINTAINERS Lack some non-ASCII characters

31 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University File List View 30 セルは、まとめられた各ディレクトリに対 する 各ファイルのハッシュ値 – ファイル内容が異なる場合黒く描画 フルパスをクリックするとファイル管理 ツールでそのディレクトリが開く ディレクトリ b を選択

32 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University File Matrix View After one of the cells is selected, an external diff tool (e.g.,WinMerge) is executed in order to compare two files. 31


Download ppt "Extracting a Unified Directory Tree to Compare Similar Software Products Yusuke Sakaguchi, Takashi Ishio, Tetsuya Kanda, Katsuro Inoue Department of Computer."

Similar presentations


Ads by Google