cerulean

          FindBugs

          FindBugs,http://findbugs.sourceforge.net/
          發現代碼中潛在bug的工具,有eclipse的插件,安裝后右鍵單擊java project name,點擊Find Bugs,切換到FindBugs得perspective可以看到結果,速度還比較快,比之前用過的一個(雖然已經記不得名字了)快一些~具體的效果還是要逐個分析。

          Bug categories:

          Correctness bug
          Probable bug - an apparent coding mistake resulting in code that was probably not what the developer intended. We strive for a low false positive rate.
          Bad Practice
          Violations of recommended and essential coding practice. Examples include hash code and equals problems, cloneable idiom, dropped exceptions, serializable problems, and misuse of finalize. We strive to make this analysis accurate, although some groups may not care about some of the bad practices.
          Dodgy
          Code that is confusing, anomalous, or written in a way that leads itself to errors. Examples include dead local stores, switch fall through, unconfirmed casts, and redundant null check of value known to be null. More false positives accepted. In previous versions of FindBugs, this category was known as Style.
          Multithreaded correctness
               Incorrect lazy initialization and update of static field
               Calls Thread.sleep() with a lock held: better to use wait(lock)
               Synchronization on interned String could deadlock: 最好不用字符串,以免重復
          Performance
               invokes inefficient new String() constructor
               concatenates strings using + in a loop: better to use append StringBuffer
               inner class usage


          posted on 2009-08-14 16:04 cerulean 閱讀(993) 評論(0)  編輯  收藏 所屬分類: Java

          導航

          <2009年8月>
          2627282930311
          2345678
          9101112131415
          16171819202122
          23242526272829
          303112345

          統計

          常用鏈接

          留言簿(3)

          隨筆分類

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 莫力| 稷山县| 新安县| 嘉善县| 含山县| 临潭县| 那坡县| 嵊泗县| 元阳县| 新昌县| 昆明市| 乌鲁木齐县| 陕西省| 安多县| 禹城市| 扬州市| 杭锦后旗| 乌兰浩特市| 苏州市| 平乡县| 定结县| 五莲县| 双城市| 石泉县| 内江市| 达拉特旗| 温宿县| 济源市| 城步| 安阳市| 安西县| 金寨县| 晋宁县| 关岭| 如皋市| 兴国县| 海口市| 肃北| 车致| 海门市| 平定县|