Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JJUG_CCC_2017_Spring_to_upload.pdf

Kengo TODA
May 23, 2017
69

 JJUG_CCC_2017_Spring_to_upload.pdf

Kengo TODA

May 23, 2017
Tweet

More Decks by Kengo TODA

Transcript

  1. © Works Applications Co.,Ltd. #ccc_f3 2017 May/20th, JJUG CCC 2017

    Spring SpotBugs(FindBugs)ʹΑΔ େن໛ERPͷίʔυ඼࣭վળ 1
  2. © Works Applications Co.,Ltd. #ccc_f3 Agenda ‣ ࣗݾ঺հ ‣ 2017೥5݄ݱࡏͷJava੩తղੳπʔϧػೳɾಈ޲ൺֱ

    ‣ େن໛ERPͷίʔυ඼๊࣭͕͑Δ໰୊ͱͦͷղܾ ‣ ։ൃ͍ͯ͠Δ૊৫ͱͦͷ੡඼ ‣ ߦ͍ͬͯΔ޻෉ͱࠓޙͷల๬ 2
  3. © Works Applications Co.,Ltd. #ccc_f3 ͜ͷηογϣϯͰಘΒΕΔ΋ͷ ‣ େن໛։ൃʹͯӡ༻Մೳͳίʔυ඼࣭վળख๏ ‣ άϩʔόϧͰେن໛ͳJava։ൃʹ͓͍ͯඞਢͱͳΔ


    ʮίʔυ඼࣭ͷఈ্͛ʯͷ࣮ફతͳख๏ ‣ ࣾ಺FW΍ϥΠϒϥϦͷ࢖͍ํΛ޿ΊΔख๏ͱͯ͠
 ׆༻Ͱ͖Δ੩తղੳπʔϧϓϥάΠϯͷ։ൃख๏ 3
  4. © Works Applications Co.,Ltd. #ccc_f3 JJUG CCCͷCCCͱ͸ʁ 1. ΫϥεɾνϣοτɾίϯύΠϧσΩϧ 2.

    ௒ɾίʔσΟϯάɾίϯςετ 3. ΫϩεɾίϛϡχςΟɾΧϯϑΝϨϯε 5
  5. © Works Applications Co.,Ltd. #ccc_f3 ࣗݾ঺հ ✤ https://github.com/ KengoTODA/ ✤

    ᷂ϫʔΫεΞϓϦέʔγϣϯζ
 ݚڀ։ൃΤϯδχΞ ✤ ήʔϜ͕࡞Γͨͯ͘HSP2ʹ
 खΛग़͠ɺϑϦʔιϑτ΢ΣΞ ࡞ՈΛܦͯɺೖࣾ͠R&Dʹ ✤ SpotBugsͷதͷਓ JVM Simulator Maven3 ebook 6
  6. © Works Applications Co.,Ltd. #ccc_f3 ൺֱର৅Java੩తղੳπʔϧ ‣ Checkstyle ‣ PMD

    ‣ FindBugs / SpotBugs ‣ Checker Framework ‣ Google error-prone 9
  7. © Works Applications Co.,Ltd. #ccc_f3 Checkstyle ‣ ιʔείʔυղੳͳͷͰίϯύΠϧͳ͠Ͱ࣮ߦͰ͖Δ ‣ ଟ࠼ͳIDEɾϏϧυπʔϧʹରԠ

    ‣ ίʔσΟϯάن໿ͷ֬ೝ͕ओ໨త ‣ ϓϥάΠϯ࣮૷ʹඞཁͳ஌͕ࣝগͳ͍ ‣ http://checkstyle.sourceforge.net/ 10
  8. © Works Applications Co.,Ltd. #ccc_f3 PMD ‣ ιʔείʔυղੳͳͷͰίϯύΠϧͳ͠Ͱ࣮ߦͰ͖Δ ‣ ଟ࠼ͳIDEɾϏϧυπʔϧͦͯ͠ݴޠʹରԠ

    ‣ CPDʢίϐϖݕग़ʣػೳ΋౥ࡌ ‣ ϓϥάΠϯ࣮૷͸ΘΓͱෳࡶ ‣ https://pmd.github.io/ 11
  9. © Works Applications Co.,Ltd. #ccc_f3 FindBugs ‣ όΠτίʔυղੳͳͷͰίʔυʹͳ͍৘ใʢ਌Ϋϥεɺ
 ґଘઌɺΞϊςʔγϣϯ౳ʣ΋CLASSPATH͔Βิ׬Ͱ͖Δ ‣

    ଟ࠼ͳIDEɾϏϧυπʔϧʹରԠ ‣ ϓϥάΠϯ࣮૷ʹ͸JVM΍όΠτίʔυͷ஌͕ࣝ͋Δͱྑ ͍ ‣ https://spotbugs.github.io/ 12
  10. © Works Applications Co.,Ltd. #ccc_f3 SpotBugsͱ͸ʁ ‣ FindBugsͷ։ൃ͕͠͹Β͘ࢭ·͍ͬͯͨʢ3.0.1͸2೥ ऑલͷϦϦʔεʣ ‣

    3.1.0ϦϦʔε४උˍίϛϡχςΟܗ੒த ✤ FindBugsίϛϡχςΟʹ͓͚Δྫͷ݅ͷహ຤ɺͦ͠ ͯSpotBugsͱ͸Կ͔ 13
  11. © Works Applications Co.,Ltd. #ccc_f3 ࢀߟɿJSR305Ξϊςʔγϣϯͷࠓ ‣ javax.annotation ύοέʔδʹؚ·ΕΔ
 ˏNonnull

    ΍ˏUntaintedͳͲͷΞϊςʔγϣϯ ‣ JSR305͕Dormantͱͳͬͨޙ΋FindBugs͕഑෍͍ͯͨ͠ ‣ SpotBugsʹΑΔϝϯςφϯε༧ఆແ͠ ‣ ܕύϥϝʔλʹ࢖͏͜ͱ΋Ͱ͖ͳ͍ͷͰ
 ࠓޙԺ΍͔ʹஔ͖׵͑ΒΕ͍ͯ͘ͷͰ͸ 14
  12. © Works Applications Co.,Ltd. #ccc_f3 Checker Framework ‣ Java8ͷJSR 308

    (Annotations on Java Types) Λར༻͢Δ ‣ ଟ࠼ͳIDEɾϏϧυπʔϧʹରԠ ‣ JDKʹؚ·ΕΔΫϥεͷৼΔ෣͍Λσʔλϕʔεʹ࣋ͭ ‣ https://checkerframework.org/ 15
  13. © Works Applications Co.,Ltd. #ccc_f3 Google error-prone ‣ ίϯύΠϧ࣌ʹղੳ͢ΔͷͰίʔυʹͳ͍৘ใ΋र͍΍͍͢ ‣

    ιʔείʔυͷࣗಈमਖ਼Λ౰ॳ͔Βҙ͍ࣝͯ͠Δʁ ‣ EclipseඇରԠʢcom.sun.* ύοέʔδʹґଘͷͨΊʣ ‣ ৭ʑϞμϯͰϓϥάΠϯ࣮૷΋͠΍͍͢ ‣ GoogleࣾһҎ֎͔ΒͷPR͸ʢ࣮੷ͱͯ͠ʣड͚෇͚ͯͳ͍ ‣ http://errorprone.info/ 16 Refs: http://dl.acm.org/citation.cfm?id=2486877
  14. © Works Applications Co.,Ltd. #ccc_f3 ࠓ࢖͏ͳΒͲͷπʔϧʁ 17 ʘ Target Standard

    Rules Note Checkstyle 7.7 AST 152 checks codingن໿ PMD 5.6.1 AST 287 rules (PMD Java) ଟݴޠରԠ SpotBugs 3.1.0−RC2 Bytecode 453 patterns (+9 experimentals) plugin๛෋ Checker Fw 2.1.11 AST (Compiler֦ு) 19 checkers JSR308ରԠ error-prone v2.0.19 AST (Compiler֦ு) 145 patterns (+61 experimentals) কདྷʹظ଴
  15. © Works Applications Co.,Ltd. #ccc_f3 ࠓ࢖͏ͳΒͲͷπʔϧʁ ‣ ͱʹ͔͘਺Λग़͍ͨ͠ ‣ SpotBugs

    + Checker Framework ‣ Type AnnotationΛ࢖͑͹SpotBugsʹݟ͚ͭΒΕͳ͍໰୊΋
 ᖰΓग़ͤΔՄೳੑ͕͋Δ ‣ ղੳʹ࣌ؒΛ͔͚ͨ͘ͳ͍ ‣ error-proneͰίϯύΠϧ࣌νΣοΫ ‣ PMDΛίϯύΠϥͱฒྻ࣮ߦ 18
  16. © Works Applications Co.,Ltd. #ccc_f3 ࠓ࢖͏ͳΒͲͷπʔϧʁ ‣ JavaεΩϧͷߴ͍։ൃऀ͕ἧ͍ͬͯΔ ‣ Ξϊςʔγϣϯͷར༻Λଅਐ͠Checker

    FrameworkΛ׆༻͢Δ ‣ ఆظతͳSpotBugsͰࡉ͔͍໰୊΋ᖰΓग़͢ ‣ ։ൃऀͷJavaεΩϧʹ͹Β͖͕ͭ͋Δ ‣ CheckstyleͰ࠷௿ݶͷಡΈ΍͢͞Λ୲อ͢Δ ‣ CPDͰίϐϖʹܯࠂΛ͢Δʢઅ౓ͷ͋ΔίϐϖΛଅ͢ʣ ‣ ಈ࡞Λܰͨ͘͠PMD΍SpotBugsΛ͜·Ίʹճ͠࠷௿ݶͷϛεΛ๷͙ 19
  17. © Works Applications Co.,Ltd. #ccc_f3 Agenda ‣ ࣗݾ঺հ ‣ 2017೥5݄ݱࡏͷJava੩తղੳπʔϧػೳɾಈ޲ൺֱ

    ‣ େن໛ERPͷίʔυ඼๊࣭͕͑Δ໰୊ͱͦͷղܾ ‣ ։ൃ͍ͯ͠Δ૊৫ͱͦͷ੡඼ ‣ ߦ͍ͬͯΔ޻෉ͱࠓޙͷల๬ 20
  18. © Works Applications Co.,Ltd. #ccc_f3 גࣜձࣾ ϫʔΫεΞϓϦέʔγϣϯζͱ͸ ✤ ERPύοέʔδͷ։ൃΛߦ͍ͬͯΔاۀ ✤

    γϯΨϙʔϧɺதࠃɺΠϯυɺΞϝϦΧ౳ʹ΋ڌ఺ ✤ ίϯγϡʔϚΞϓϦͷΑ͏ͳϢʔβϏϦςΟͱ
 εϐʔυΛ࣋ͭERPʮHUEʢAI WorksʣʯΛ
 ։ൃɾఏڙ 22
  19. © Works Applications Co.,Ltd. #ccc_f3 HUEͷ࣮૷ ✤ ୤RDB͢ΔͳͲ଎౓ʹͩ͜Θ͍ͬͯͯɺ ✤ MSA͠ͳ͍ͱࢮ͵ఔ౓ʹ͸ࢁ΄ͲαʔϏε͕͋Γɺ

    ✤ ಙౡʹݚڀॴ࡞ΔϨϕϧͰࣗવݴޠॲཧʹຊؾͰɺ ✤ 100msୡ੒ͷͨΊʹAWS LambdaΛಋೖ͢ΔͳͲ
 ৽͍͜͠ͱ΋৭ʑ΍͍ͬͯΔɻ 23
  20. © Works Applications Co.,Ltd. #ccc_f3 HUEͷ࣮૷Λࢧ͑Δਓ ✤ ඇৗʹଟ࠼Ͱ௕ॴ΋ଟ͍ ✤ ౦ژɾେࡕɾνΣϯφΠɾ্ւɾγϯΨϙʔϧͳͲʹ


    ։ൃڌ఺͕෼ࢄ͍ͯ͠Δ ✤ ड͚ͨڭҭ΍ৗ͔ࣝΒͯ͠େ͖͘ҧ͏ ✤ ϑϩϯτΤϯυɺϑϨʔϜϫʔΫɺϞόΠϧɺػցֶशɺ
 όονɺ෼ࢄॲཧͱ͍༷ͬͨʑͳઐ໳Ո͕ڞଘ ✤ εΩϧͷͳ͍৽ਓ͕૿͑ଓ͚͍ͯΔঢ়ଶ 24
  21. © Works Applications Co.,Ltd. #ccc_f3 HUEͷ࣮૷Λࢧ͑Δਓ ✤ ඇৗʹଟ࠼Ͱ௕ॴ΋ଟ͍ ✤ ౦ژɾେࡕɾνΣϯφΠɾ্ւɾγϯΨϙʔϧͳͲʹ


    ։ൃڌ఺͕෼ࢄ͍ͯ͠Δ ✤ ड͚ͨڭҭ΍ৗ͔ࣝΒͯ͠େ͖͘ҧ͏ ✤ ϑϩϯτΤϯυɺϑϨʔϜϫʔΫɺϞόΠϧɺػցֶशɺ
 όονɺ෼ࢄॲཧͱ͍༷ͬͨʑͳઐ໳Ո͕ڞଘ ✤ εΩϧͷͳ͍৽ਓ͕૿͑ଓ͚͍ͯΔঢ়ଶ 25 ໰ɿ ߴ଎ʹ૿͍͑ͯ͘ ։ൃऀͷΩϟονΞοϓΛ গͳ͍ίϛϡχέʔγϣϯͰ ͲͷΑ͏ʹॿ͚Δ͔ʁ
  22. © Works Applications Co.,Ltd. #ccc_f3 ͳͥSpotBugs͔ ✤ ࣾ಺ͷਓࡐͱࢿ࢈ ✤ ಺෦࣮૷ʹ໌Δ͍ෳ਺ͷ։ൃऀ

    ✤ ϓϥάΠϯ࣮૷ܦݧͷ஝ੵ ✤ Eclipse࿈ܞ ✤ HUE͸EclipseΛඪ४IDEͱ͍ͯ͠Δ ✤ Java8αϙʔτ ✤ FindBugs 3.0.1͸Lambdaͷѻ͍ʹ
 ໰୊͕͋Δ 26
  23. © Works Applications Co.,Ltd. #ccc_f3 Agenda ‣ ࣗݾ঺հ ‣ 2017೥5݄ݱࡏͷJava੩తղੳπʔϧػೳɾಈ޲ൺֱ

    ‣ େن໛ERPͷίʔυ඼๊࣭͕͑Δ໰୊ͱͦͷղܾ ‣ ։ൃ͍ͯ͠Δ૊৫ͱͦͷ੡඼ ‣ ߦ͍ͬͯΔ޻෉ͱࠓޙͷల๬ 27
  24. © Works Applications Co.,Ltd. #ccc_f3 աڈͷࣦഊ ✤ σϑΥϧτઃఆͷ··FindBugs΍CheckstyleΛ
 ϩʔΧϧϏϧυ΍ϓϨϚʔδϏϧυʹಋೖ͠ɺ
 ੜ࢈ੑΛେ͖͘Լ͛ͨ

    ✤ ϓϨϚʔδϏϧυ͕1͔͔࣌ؒۙͬͯ͘͠·ͬͨ ✤ mvn -Dfindbugs.skip ΍ <findbugs.skip>true
 </findbugs.skip> ͕౰ͨΓલʹͳͬͯ͠·ͬͨ 29
  25. © Works Applications Co.,Ltd. #ccc_f3 աڈͷࣦഊ ✤ σϑΥϧτઃఆͷ··FindBugsΛEclipseʹಋೖ͠ɺ
 ੜ࢈ੑΛେ͖͘Լ͛ͨ ✤

    ϫʔΫεϖʔεʹ10Λ௒͑ΔϓϩδΣΫτΛৗ࣌༻ ҙͯ͠։ൃ͢Δਓ͕ଟ͔ͬͨ ✤ Eclipse PluginʹύϑΥʔϚϯε্ͷ͕ܽؕ͋ͬͨ 30
  26. © Works Applications Co.,Ltd. #ccc_f3 MSAͰ૊৫ԣஅͳղੳ͸ඞཁ͔ʁ ✤ ඞཁ ✤ ੩తղੳ͸nice

    to haveͰ͸ͳ͘must to have ✤ ͦΕͧΕҟͳΔਓࡐɾ޻਺Λ͍࣋ͬͯΔͷͰ
 ׬શʹ࣏ࣗʹ೚ͤΔͱ͍࣮ͭࢪ͞ΕΔͷ͔ෆ໌ྎ ✤ ։ൃޮ཰ΛԼ͛ͳ͍ํ๏Λ୳͢ඞཁ͕͋Δ 32
  27. © Works Applications Co.,Ltd. #ccc_f3 ༏ઌ౓ ໢ཏੑ ʢϝϦοτʣ ࣦഊΛ౿·͑ͯ ✤

    ։ൃޮ཰ʹଥڠ͠ͳ͍ ✤ ۃྗ։ൃऀͷ೔ৗۀ຿Λ
 ϒϩοΫ͠ͳ͍ख๏Λ୳͢ ✤ ޮ཰௿ԼΛೲಘͤ͞ΒΕΔ
 Ձ஋Λग़͢ ✤ ͪΌΜͱத਎Λཧղͯ͠࢖͏ ✤ ݁ہ͸όονϓϩάϥϜͳͷͰ
 ׳Εͨख๏ͰϓϩϑΝΠϧՄೳ ։ൃޮ཰ ʢೲಘʣ 33
  28. © Works Applications Co.,Ltd. #ccc_f3 ௐࠪɿͳͥFindBugs͸஗͍ͷ͔ʁ ✤ 10਺೥લͷৗࣝʹ΋ͱ͍࣮ͮͨ૷ ʢSpotBugs 3.1.0-RC1Ͱղফʣ

    ✤ MapΛ࢖ͬͨ String#intern() ૬౰ͷࣗલॲཧ ✤ ListΠϯελϯεΛ࢖͍·Θͨ͢Ίͷܭࢉॲཧ ✤ Eclipse GUIΛසൟʹߋ৽͗͢͠Δ ʢSpotBugs 3.1.0-RC2Ͱղফʣ ✤ ղੳର৅͕มΘΔͨͼʹUIΛߋ৽ ✤ γϯάϧεϨουʢίΞΛ࢖͍੾Εͳ͍ʣ 34
  29. © Works Applications Co.,Ltd. #ccc_f3 ௐࠪɿ؀ڥมߋͰߴ଎ԽͰ͖Δʁ ✤ ΄΅Ͱ͖ͳ͍ ✤ FindBugs͸CPU

    bound͕ͩγϯάϧεϨουͳόον ✤ ෳ਺ίΞΛ৯͍੾͍ͬͯΔͷ͸JITίϯύΠϥͷεϨου
 ʢ-XX:CICompilerCountͰ૿ݮՄ͕ͩ଎౓ʹ΄΅د༩ͳ͠ʣ ✤ OOME΍GC stormΛى͜͞ͳ͍ఔ౓ͷϝϞϦΛ༩͑Ε͹
 ͋ͱ͸CPUίΞ૿΍ͯ͠΋ϝϞϦ૿΍ͯ͠΋มԽͳ͠ 35
  30. © Works Applications Co.,Ltd. #ccc_f3 ௐࠪɿGuava v19.0ղੳͷϚΠΫϩϕϯν ʢ4 CPU coresʣ

    36 128m 256m 512m 1g 2
 (Default) OOME 18.2s 18.0s 18.2s 3 OOME 19.2s 18.2s 18.0s 4 OOME 24.8s 24.7s 23.6s -XX:CICompilerCount -Xmx & -Xms refs: https://github.com/spotbugs/spotbugs/pull/128
  31. © Works Applications Co.,Ltd. #ccc_f3 ௐࠪɿGuava v19.0ղੳͷϚΠΫϩϕϯν ʢ2 CPU coresʣ

    37 2g Default 26.0s G1GC 28.7s G1GC + UseStringDeduplication 29.1s GCઃఆʢJava8ʣ -Xmx & -Xms refs: https://github.com/spotbugs/spotbugs/pull/128
  32. © Works Applications Co.,Ltd. #ccc_f3 ௐࠪɿઃఆͰfindbugs-maven-pluginΛ ߴ଎Խ͢Δʹ͸ ✤ onlyAnalyzeͰର৅ΫϥεΛ࡟Γɺ
 visitorsͰར༻DetectorΛ࡟Δ͜ͱͰߴ଎ʹͳΔ

    ✤ ൃݟ͍ͨ͠όάʹ༏ઌ౓Λ͚ͭΔ͜ͱ͕؊ཁ ✤ ExcludeFilterͰର৅ϑΝΠϧΛ࡟ͬͯ΋଎͘ͳΒͳ͍ ✤ Filter͸ॲཧͷ݁Ռʹରͯ͠Өڹ͢ΔͨΊ 38
  33. © Works Applications Co.,Ltd. #ccc_f3 ௐࠪɿeffortͷޮՌʢTBUʣ 39 ACCUR ATE_EX CEPTIO

    NS MODEL _INSTA NCEOF TRACK _GUAR ANTEE D_VAL UE_DER EFS_IN_ NULL_P OINTER _ANAL YSIS TRACK _VALUE _NUMB ERS_IN_ NULL_P OINTER _ANAL YSIS INTERP ROCED URAL_ ANALY SIS INTERP ROCED URAL_ ANALY SIS_OF_ REFERE NCED_ CLASSE S CONSE RVE_SP ACE SKIP_ HUGE _MET HODS min ✓ ✓ less ✓ ✓ ✓ default, more ✓ ✓ ✓ ✓ ✓ ✓ max ✓ ✓ ✓ ✓ ✓ ✓ Refs: FindBugs.java
  34. © Works Applications Co.,Ltd. #ccc_f3 ํ਑ ✤ ଎౓ॏࢹͷૈ͍ղੳͱɺ໢ཏੑॏࢹͷղੳΛ૊Έ߹Θ ͤΔ ✤

    ϓϨϚʔδϏϧυͰ͸มߋ͞ΕͨΫϥε͚ͩΛղੳ ✤ र͍࿙ΕΔ໰୊͸೔࣍ͷղੳͰൃݟɾใࠂ 41
  35. © Works Applications Co.,Ltd. #ccc_f3 ॏ͘໢ཏੑͷߴ͍ղੳʢ֓ཁʣ ✤ Jenkins + SonarQubeͰ։ൃ͕׆ൃͰͳ͍࣌ؒଳʹ࣮ࢪ

    ✤ ॏେͰͳ͍Ϩϕϧͷϧʔϧ΋ؚΊ࣮ͯࢪ ✤ ։ൃऀ͕͍ͭͰ΋ΞΫηεͰ͖ΔSonarQubeΛఏڙ ✤ Readme΍ϓϩδΣΫτҰཡϖʔδʹBadgeΛදࣔ͠
 ҰཡੑͱSonarQube΁ͷಋઢΛ֬อ 42
  36. © Works Applications Co.,Ltd. #ccc_f3 ॏ͘໢ཏੑͷߴ͍ղੳʢ݁Ռʣ ✤ 50ͷϓϩδΣΫτ͔Β3,000ͷ໰୊Λݟ͚ͭɺ
 1ϲ݄Ͱ͏ͪ900Λղফͨ͠ ✤

    String.format() ΍ logger.info() ͷϑΥʔϚοτҟৗ ✤ ϚϧνεϨουϓϩάϥϛϯάΞϯνύλʔϯ 43
  37. © Works Applications Co.,Ltd. #ccc_f3 ૉૣ͘ૈ͍ղੳʢ֓ཁʣ ✤ ॏେͳ໰୊Λத৺ʹௐࠪ ✤ ಠࣗMavenϓϥάΠϯͰfindbugs-maven-pluginΛ

    ϥοϓ ✤ มߋ͞Εͨ.javaϑΝΠϧҰཡ͔Βߋ৽͞ΕͨՄೳੑ ͷ͋ΔclassϑΝΠϧͷҰཡΛSpotBugsʹ౉͢ 44
  38. © Works Applications Co.,Ltd. #ccc_f3 ࠓޙͷల๬ ✤ ͞Βʹଟ͘ͷϦϙδτϦ΁ͷಋೖ ✤ Type

    AnnotationΛஈ֊తʹಋೖ͢Δ ✤ ٕज़ʹͩ͜ΘΓͷڧ͍ɺڞ௨Ϟδϡʔϧ։ൃऀʹ
 ڠྗΛґཔ͢Δ 46
  39. © Works Applications Co.,Ltd. #ccc_f3 ཁ݅ͷ໌֬Խ 49 ✤ ཁ݅ʹԠ֦ͯ͡ு͢΂͖਌Ϋϥε͕มΘΔ ✤

    OperandStackͷঢ়ଶΛ௥͏ˠOpcodeStackDetector ✤ ΞϊςʔγϣϯΛ֬ೝ͢ΔˠAnnotationDetector
  40. © Works Applications Co.,Ltd. #ccc_f3 ϓϩδΣΫτͷ࡞੒ 50 $ mvn archetype:generate

    \ -DarchetypeGroupId=com.github.spotbugs \ -DarchetypeArtifactId=spotbugs-archetype \ -DarchetypeVersion=0.1.0 Refs: https://github.com/spotbugs/spotbugs-archetype
  41. © Works Applications Co.,Ltd. #ccc_f3 JUnitͰಈ࡞֬ೝ͠ͳ͕Β࣮૷ 51 ✤ ʮόάͱͯ͠ݟ͚͍ͭͨঢ়ଶʯΛ࣮૷ ✤

    ʮόάͱͯ͠ݟ͔ͭΔ΂͖Ͱͳ͍ঢ়ଶʯΛ࣮૷ ✤ classϑΝΠϧΛςετ࣮ߦલʹੜ੒
  42. © Works Applications Co.,Ltd. #ccc_f3 ࢀߟ৘ใ ‣ ϥϜμࣜ΍ετϦʔϜ API ΍৽͍͠೔࣌

    API ͚ͩ ͡Όͳ͍ʂ
 Java8 ͷλΠϓɾΞϊςʔγϣϯ͋ͷख͜ͷख ‣ http://waman.hatenablog.com/entry/ 2014/05/08/063959 65
  43. © Works Applications Co.,Ltd. #ccc_f3 ࢀߟ৘ใ ‣ Type Annotation for

    Static Program Analysis ‣ https://www.slideshare.net/skrb/type-annotation- for-static-program-analysis 66
  44. © Works Applications Co.,Ltd. #ccc_f3 ࢀߟ৘ใ ✤ G1: from garbage

    collector to waste management consultant ✤ https://blogs.oracle.com/java-platform-group/ g1%3a-from-garbage-collector-to-waste- management-consultant 67
  45. © Works Applications Co.,Ltd. #ccc_f3 ࢀߟ৘ใ ✤ G1 GC ͓͞Β͍ͱ

    #jjug_ccc Ͱൃදͨ͠࿩ ✤ http://cco.hatenablog.jp/entry/ 2015/12/01/011223 68
  46. © Works Applications Co.,Ltd. #ccc_f3 ࢀߟ৘ใ ✤ The Google FindBugs

    fixit ✤ http://dl.acm.org/citation.cfm?id=1831738 69