Source Code Compare Engine

662 views

Published on

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
662
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Source Code Compare Engine

  1. 1. 적용점검도구 개요<br />1<br />제작기간<br />2010.08.11 ~ 2010.11.01<br />제작환경<br />전자정부 표준프레임워크 +jQuery<br />기능목록 관리<br />실행환경 적용점검<br />기능점수 산정<br />산출내역서 산정<br />LOC 측정<br />주요기능<br />Samsung SDS Software Engineering Team Heo June<br />
  2. 2. 적용점검도구 프로세스<br />2<br />기능목록 등록<br />소스코드 등록<br />실행파일 등록<br />실행환경 검사<br />기능점수 계산<br />산출내역서 작성<br />Samsung SDS Software Engineering Team Heo June<br />
  3. 3. 실행환경 검사<br />3<br />실행환경 적용점검<br />전자정부 실행환경이 사용되었는지 여부와 사용횟수를 점검함<br />등록된 소스코드를 분석하여 import된 클래스들을 파악<br />사용된 실행환경 클래스의 파일크기를 확인하여 변동이 있는지 점검<br />1<br />1<br />실행환경 클래스가 import 된 경우 실행환경이 사용된 것으로 판단<br />사용된 실행환경 클래스의 파일명을 점검하여 다른 클래스가 사용되었는지 점검<br />2<br />2<br />판단된 소스코드의 목록을 화면에 표시<br />변경이 일어난 클래스의 목록을 화면에 표시<br />3<br />3<br />실행환경 변경감지<br />실행환경 클래스가 변경되거나 다른 클래스가 사용되었는지 점검함<br />Samsung SDS Software Engineering Team Heo June<br />
  4. 4. 기능목록 – 공통컴포넌트 자동매칭<br />4<br />기능개요<br />등록된 기능목록들이 어떤 공통컴포넌트를 사용하였는지 자동으로 연결하고, 사용된 소스코드들을 분석하여 자동으로 검사해줌.<br />자유게시판<br />게시판<br />BoardMstVO.java<br />DmsBoardVo.java<br />BoardVO.java<br />DmsBoardService.java<br />BoardService.java<br />DmsBoardServiceImpl.java<br />BoardServiceImpl.java<br />DmsBoardServiceDao.java<br />BoardServiceDao.java<br />DmsBoardServiceController.java<br />BoardServiceController.java<br />Role관리<br />롤관리<br />DmsRoleManageVo.java<br />RoleManagementVO.java<br />DmsRoleManageService.java<br />RoleManagementService.java<br />DmsRoleManageServiceImpl.java<br />RoleManagementServiceImpl.java<br />DmsAdminRoleManageServiceImpl.java<br />RoleManagementServiceDao.java<br />DmsRoleManageServiceDao.java<br />RoleManagementServiceController.java<br />DmsRoleManageServiceController.java<br />Samsung SDS Software Engineering Team Heo June<br />
  5. 5. 컴포넌트간 자동매칭<br />5<br />자유게시판<br />자료실관리<br />20%<br />두 기능간의 편집거리를 구함<br />유사도 = 편집거리 / 긴 문자열의 길이<br />유사도가 같은 경우 짧은 기능명이 우선<br />기능명 길이가 같은 경우 사전거리를 판단<br />1<br />2<br />3<br />4<br />게시판<br />60%<br />게시판생성관리<br />14.29%<br />익명게시판<br />60%<br />권한관리<br />0%<br />롤관리<br />0%<br />경고메시지<br />0%<br />문자열변환<br />0%<br />Samsung SDS Software Engineering Team Heo June<br />
  6. 6. 소스코드간 자동매칭<br />6<br />자유게시판<br />게시판<br />kr.go.mopas.igss.dms.cmm.brd<br />Value Object<br />BoardMstVO.java<br />DmsBoardVo.java<br />DmsPdsVo.java<br />BoardVO.java<br />DmsBoardTitleVo.java<br />Service Interface<br />DmsBoardService.java<br />BoardService.java<br />DmsPdsService.java<br />Service Class<br />DmsBoardServiceImpl.java<br />BoardServiceImpl.java<br />DmsPdsServiceImpl.java<br />비교횟수: ∑(M∙N)<br />M : 해당 패키지내, 해당 분류의 개발클래스 수<br />N : 해당 분류의 공통컴포넌트 클래스 수<br />Samsung SDS Software Engineering Team Heo June<br />
  7. 7. 소스코드간 자동매칭<br />6<br />자유게시판<br />게시판<br />kr.go.mopas.igss.dms.cmm.brd<br />Value Object<br />BoardMstVO.java<br />34.2%<br />DmsBoardVo.java<br />12.21%<br />11.14%<br />DmsPdsVo.java<br />83.63%<br />64.96%<br />BoardVO.java<br />24.74%<br />DmsBoardTitleVo.java<br />Service Interface<br />DmsBoardService.java<br />100%<br />BoardService.java<br />75.42%<br />DmsPdsService.java<br />Service Class<br />DmsBoardServiceImpl.java<br />89.32%<br />BoardServiceImpl.java<br />64.34%<br />DmsPdsServiceImpl.java<br />비교횟수: ∑(M∙N)<br />M : 해당 패키지내, 해당 분류의 개발클래스 수<br />N : 해당 분류의 공통컴포넌트 클래스 수<br />Samsung SDS Software Engineering Team Heo June<br />
  8. 8. 소스코드간 자동매칭<br />6<br />자유게시판<br />게시판<br />kr.go.mopas.igss.dms.cmm.brd<br />Value Object<br />BoardMstVO.java<br />34.2%<br />DmsBoardVo.java<br />12.21%<br />11.14%<br />DmsPdsVo.java<br />83.63%<br />64.96%<br />BoardVO.java<br />24.74%<br />DmsBoardTitleVo.java<br />Service Interface<br />DmsBoardService.java<br />100%<br />BoardService.java<br />75.42%<br />DmsPdsService.java<br />Service Class<br />DmsBoardServiceImpl.java<br />89.32%<br />BoardServiceImpl.java<br />64.34%<br />DmsPdsServiceImpl.java<br />비교횟수: ∑(M∙N)<br />M : 해당 패키지내, 해당 분류의 개발클래스 수<br />N : 해당 분류의 공통컴포넌트 클래스 수<br />Samsung SDS Software Engineering Team Heo June<br />
  9. 9. 소스코드 비교<br />7<br />구문<br />Statement<br />함수<br />Method<br />클래스<br />Class<br />컴포넌트<br />Component<br />Samsung SDS Software Engineering Team Heo June<br />
  10. 10. 구문 비교<br />8<br />구문<br />Statement<br />intsearchCondition = 10;<br />intsearchType = 10; // 검색조건<br />1<br />Step 1 : Setup Statement<br />Samsung SDS Software Engineering Team Heo June<br />
  11. 11. 구문 비교<br />8<br />구문<br />Statement<br />intsearchCondition = 10;<br />intsearchType = 10; // 검색조건<br />1<br />Field Declaration<br />Field Declaration<br />Comment<br />intsearchCondition = 10;<br />intsearchType = 10; // 검색조건<br />2<br />Variable Name<br />Initialization Value<br />Variable Name<br />Initialization Value<br />Step 2 : Parsing&Disassemble<br />Samsung SDS Software Engineering Team Heo June<br />
  12. 12. 구문 비교<br />8<br />구문<br />Statement<br />intsearchCondition = 10;<br />intsearchType = 10; // 검색조건<br />1<br />Field Declaration<br />Field Declaration<br />Comment<br />intsearchCondition = 10;<br />intsearchType = 10; // 검색조건<br />2<br />Variable Name<br />Initialization Value<br />Variable Name<br />Initialization Value<br />intsearchcondition10<br />intsearchtype10<br />3<br />Step 3 : Normalization<br />Samsung SDS Software Engineering Team Heo June<br />
  13. 13. 구문 비교<br />8<br />구문<br />Statement<br />intsearchCondition = 10;<br />intsearchType = 10; // 검색조건<br />1<br />Field Declaration<br />Field Declaration<br />Comment<br />intsearchCondition = 10;<br />intsearchType = 10; // 검색조건<br />2<br />Variable Name<br />Initialization Value<br />Variable Name<br />Initialization Value<br />intsearchcondition10<br />intsearchtype10<br />3<br />4<br />intsearchcondition10<br />intsearchtype10<br />Step 4 : Measuring Edit Distance<br />Samsung SDS Software Engineering Team Heo June<br />
  14. 14. 구문 비교<br />8<br />Levenshtein Distance<br />Addition<br />1<br />apple<br />applet<br />Deletion<br />2<br />computers<br />computer<br />Substitution<br />3<br />pray<br />play<br />Damerau - Levenshtein Distance<br />Transposition<br />4<br />slay<br />lays<br />Samsung SDS Software Engineering Team Heo June<br />
  15. 15. 구문 비교<br />8<br />Edit Distance<br />intsearchcondition10<br />intsearchtype10<br />intsearchcondition10<br />intsearchtype10<br />Transposition 1<br />intsearchtondicion10<br />intsearchtype10<br />Substitution 3<br />intsearchtypeicion10<br />intsearchtype10<br />Deletion 3<br />intsearchtype10<br />intsearchtype10<br />Distance : 1+3+3 = 7<br />Samsung SDS Software Engineering Team Heo June<br />
  16. 16. 함수 비교<br />9<br />Method A<br />Method A’<br />Statement 1<br />Statement A<br />함수<br />Method<br />Statement 2<br />Statement B<br />Statement 3<br />Statement C<br />Statement 4<br />Statement D<br />Statement E<br />Samsung SDS Software Engineering Team Heo June<br />
  17. 17. 함수 비교<br />9<br />Method A<br />Method A`<br />Statement 1<br />Statement A<br />함수<br />Method<br />Statement 2<br />Statement B<br />Statement 3<br />Statement C<br />Statement 4<br />Statement D<br />Statement E<br />Samsung SDS Software Engineering Team Heo June<br />
  18. 18. 함수 비교<br />9<br />Method A<br />Method A`<br />Statement 1<br />Statement A<br />54<br />함수<br />Method<br />21<br />Statement 2<br />Statement B<br />531<br />76<br />Statement 3<br />Statement C<br />142<br />Statement 4<br />Statement D<br />Statement E<br />Samsung SDS Software Engineering Team Heo June<br />
  19. 19. 함수 비교<br />9<br />Method A<br />Method A`<br />Statement 1<br />Statement A<br />54<br />함수<br />Method<br />21<br />Statement 2<br />Statement B<br />531<br />76<br />Statement 3<br />Statement C<br />142<br />Statement 4<br />Statement D<br />Statement E<br />Samsung SDS Software Engineering Team Heo June<br />
  20. 20. 함수 비교<br />9<br />Method A<br />Method A`<br />Statement A<br />함수<br />Method<br />Statement 2<br />Statement 3<br />Statement C<br />Statement 4<br />Statement D<br />Statement E<br />Method distance : 21<br />Samsung SDS Software Engineering Team Heo June<br />
  21. 21. 함수 비교<br />9<br />Method A<br />Method A`<br />Statement A<br />함수<br />0<br />Method<br />Statement 2<br />782<br />461<br />Statement 3<br />Statement C<br />241<br />Statement 4<br />Statement D<br />Statement E<br />Method distance : 21<br />Samsung SDS Software Engineering Team Heo June<br />
  22. 22. 함수 비교<br />9<br />Method A<br />Method A`<br />Statement A<br />함수<br />0<br />Method<br />Statement 2<br />782<br />461<br />Statement 3<br />Statement C<br />241<br />Statement 4<br />Statement D<br />Statement E<br />Method distance : 21<br />Samsung SDS Software Engineering Team Heo June<br />
  23. 23. 함수 비교<br />9<br />Method A<br />Method A`<br />함수<br />Method<br />Statement 3<br />Statement C<br />Statement 4<br />Statement D<br />Statement E<br />Method distance : 21<br />Samsung SDS Software Engineering Team Heo June<br />
  24. 24. 함수 비교<br />9<br />Method A<br />Method A`<br />함수<br />Method<br />Statement 3<br />Statement C<br />241<br />56<br />Statement 4<br />Statement D<br />84<br />Statement E<br />Method distance : 21<br />Samsung SDS Software Engineering Team Heo June<br />
  25. 25. 함수 비교<br />9<br />Method A<br />Method A`<br />함수<br />Method<br />Statement 3<br />Statement C<br />241<br />56<br />Statement 4<br />Statement D<br />84<br />Statement E<br />Method distance : 21<br />Samsung SDS Software Engineering Team Heo June<br />
  26. 26. 함수 비교<br />9<br />Method A<br />Method A`<br />함수<br />Method<br />Statement C<br />Statement 4<br />Statement E<br />Method distance : 77<br />Samsung SDS Software Engineering Team Heo June<br />
  27. 27. 함수 비교<br />9<br />Method A<br />Method A`<br />함수<br />Method<br />Statement C<br />377<br />Statement 4<br />59<br />Statement E<br />Method distance : 77<br />Samsung SDS Software Engineering Team Heo June<br />
  28. 28. 함수 비교<br />9<br />Method A<br />Method A`<br />함수<br />Method<br />Statement C<br />377<br />Statement 4<br />59<br />Statement E<br />Method distance : 77<br />Samsung SDS Software Engineering Team Heo June<br />
  29. 29. 함수 비교<br />9<br />Method A<br />Method A`<br />함수<br />Method<br />Statement C<br />Method distance : 136<br />Samsung SDS Software Engineering Team Heo June<br />
  30. 30. 함수 비교<br />9<br />Method A<br />Method A`<br />함수<br />Method<br />Statement C<br />467<br />Method distance : 136<br />Samsung SDS Software Engineering Team Heo June<br />
  31. 31. 함수 비교<br />9<br />Method A<br />Method A`<br />함수<br />Method<br />Method distance : 603<br />Samsung SDS Software Engineering Team Heo June<br />
  32. 32. 클래스 비교<br />10<br />Class A<br />Class A’<br />Method 1<br />Method A<br />603<br />807<br />851<br />클래스<br />Class<br />241<br />Method 2<br />Method B<br />956<br />1021<br />988<br />Method 3<br />Method C<br />1514<br />Method 4<br />Method D<br />207<br />Method 5<br />Samsung SDS Software Engineering Team Heo June<br />
  33. 33. 클래스 비교<br />10<br />Class A<br />Class A’<br />Method 1<br />Method A<br />603<br />807<br />851<br />클래스<br />Class<br />241<br />Method 2<br />Method B<br />956<br />1021<br />988<br />Method 3<br />Method C<br />1514<br />Method 4<br />Method D<br />207<br />Method 5<br />Samsung SDS Software Engineering Team Heo June<br />
  34. 34. 클래스 비교<br />10<br />Class A<br />Class A’<br />Method 1<br />Method A<br />603<br />807<br />851<br />클래스<br />Class<br />241<br />Method 2<br />Method B<br />956<br />1021<br />988<br />Method 3<br />Method C<br />1514<br />Method 4<br />Method D<br />207<br />Method 5<br />Class distance : 241<br />Class weight : 956<br />Samsung SDS Software Engineering Team Heo June<br />
  35. 35. 클래스 비교<br />10<br />Class A<br />Class A’<br />Method A<br />클래스<br />Class<br />Method 2<br />Method 3<br />Method C<br />Method 4<br />Method D<br />Method 5<br />Class distance : 241<br />Class weight : 956<br />Samsung SDS Software Engineering Team Heo June<br />
  36. 36. 클래스 비교<br />10<br />Class A<br />Class A’<br />Class distance : 4021<br />클래스<br />Class<br />Class weight : 25156<br />Class distance / Class weight = 4021 / 25156 = 0.1598<br />Class change rate : 15.98%<br />Class similarity rate : 84.02%<br />Samsung SDS Software Engineering Team Heo June<br />
  37. 37. 컴포넌트 비교<br />11<br />Class A<br />Class A’<br />Distance : 4021 / Weight : 25156 <br />Class B<br />Class B’<br />컴포넌트<br />Distance : 0 / Weight : 10547<br />Component<br />Class C<br />Class C’<br />Distance : 7214 / Weight : 8792<br />Class D<br />Distance : 598 / Weight : 598<br />Weighted Average = (4021+7214+598) / (25156+10547+8792+598)<br /> = 11833 / 45093<br /> = 0.2624<br />Component change rate : 26.24%<br />Component similarity rate : 73.76%<br />Samsung SDS Software Engineering Team Heo June<br />

×