1 / 23

ソフトウェアデザイン工学 EPM の適用結果報告

ソフトウェアデザイン工学 EPM の適用結果報告. 2007 年 2 月 2 日 (株)日立システムアンドサービス 十九川博幸. Group1 (規模推移). 初期登録 12/8. テストコードの削除. Group2 (規模推移). 初期登録 12/8. Group3 (規模推移). 初期登録 12/8. Group4 (規模推移). 初期登録 12/8. テストコードの削除. Group5 (規模推移). 初期登録 12/8. Group1 ( CVS バージョン). Group2 ( CVS バージョン). Group3 ( CVS バージョン).

jena
Télécharger la présentation

ソフトウェアデザイン工学 EPM の適用結果報告

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ソフトウェアデザイン工学EPMの適用結果報告 2007年2月2日 (株)日立システムアンドサービス 十九川博幸

  2. Group1(規模推移) 初期登録12/8 テストコードの削除

  3. Group2(規模推移) 初期登録12/8

  4. Group3(規模推移) 初期登録12/8

  5. Group4(規模推移) 初期登録12/8 テストコードの削除

  6. Group5(規模推移) 初期登録12/8

  7. Group1(CVSバージョン)

  8. Group2(CVSバージョン)

  9. Group3(CVSバージョン)

  10. Group4(CVSバージョン)

  11. Group5(CVSバージョン)

  12. EPMのモニタ結果 規模推移  ・テストコードの削除などで一時的に減少しているグループがあるが、特に異常な状態は見受けられなかった  ・急激なコード増の時期があるが、CVS詳細情報と見比べても、特に異常な状態は見受けられなかった (バグ情報と比較できれば、効果的な評価ができると思われる) CVSバージョン情報(バージョン毎のCVS操作回数)  ・バージョン1.1(初期登録のまま修正なし)が110件弱存在する  ・Group2と3は、バージョン1.2(1回だけ修正)の比率が高く、全体の修正回数が少ない(作り込み品質が良かったか、バグをたたき出せていない) (バグ情報と比較できれば、効果的な評価ができると思われる)

  13. ソースコードの静的解析 JAVAのコーディング規約違反などの好ましくないコーディングを、ツールを使ってチェックすることができる ここでいう「好ましくないコード」は、バグでは無く、勘違いやミスを誘発しやすいコードを指す 今回は、PMDというJAVAソースコード解析ツールを使用して、 2007/01/29 11:00時点のソースコード(StockStateDAO)に対して静的解析を行った 各班の解析結果を報告します。 PMDの詳細は、下記URLを参照ください http://pmd.sourceforge.net/ http://www.ibm.com/jp/developerworks/java/050121/j_j-pmd.html

  14. 雛型の指摘(1) ・Private field 'conn' could be made final; it is only initialized in the declaration or constructor. 該当のコーディング private Connection conn; 重要度:軽微 原因:コネクション用変数のfinal指定忘れ

  15. 雛型の指摘(2) ・Avoid variables with short names like rs 該当のコーディング ResultSet rs = null; 重要度:軽微 原因:命名規則の問題(変数名が短すぎる)

  16. Group1の指摘 ・Avoid empty if statements 該当のコーディング if(count == 0){ } 重要度:実装途中の可能性あり 原因:空のIfステートメントあり

  17. Group2の指摘 特になし

  18. Group3の指摘(1) ・Avoid using if statements without curly braces 該当のコーディング if(rs != null) rs.close(); 重要度:軽微 原因:If文の{}忘れ

  19. Group3の指摘(2) ・Avoid variables with short names like sd 該当のコーディング StockData sd = null; 重要度:軽微 原因:命名規則の問題(変数名が短すぎる)

  20. Group4の指摘 ・Ensure that resources like this ResultSet object are closed after use 該当のコーディング ResultSet rs = null; finallyブロックが無い 重要度:重大 原因:リソースのclose漏れ(finallyブロックでcloseできていない)

  21. Group5の指摘(1) ・Avoid unused imports such as 'org.apache.xalan.lib.sql.SQLErrorDocument' 該当のコーディング import org.apache.xalan.lib.sql.SQLErrorDocument; 重要度:実装途中の可能性あり 原因:使用されていないimport文

  22. Group5の指摘(2) ・Avoid empty catch blocks 該当のコーディング catch (SQLException e) { // if (LOGGER.isErrorEnabled()) { // LOGGER.error(e.getMessage(), e); // } } 重要度:実装途中の可能性あり 原因:catch文のblockが空

  23. ソースコードの静的解析2 この他、StockManagerとStockDAOに対して静的解析を実施した結果、次のような指摘が摘出された This call to Collection.toArray() may be optimizable Avoid unused local variables such as 'sn'. Avoid using while statements without curly braces Avoid using if...else statements without curly braces Avoid using if statements without curly braces

More Related