SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 30 day free trial to unlock unlimited reading.
8.
動作に影響しない(スタイル等)修正が
コードレビューで重要
Microsoftが従業員873人にコードレビューの目的をイン
タビュー, レビューコメントから分析[1]
8
[1] Alberto Bacchelli and Christian Bird. Expectations, outcomes, and challenges
of modern code review. In Proc. ICSE’13, pp. 712–721
27.
編集距離を利用した
スタイル修正事例の収集
• 仮定:編集距離が短いものはスタイル修正
27
編集距離が1以下の修正のうち89%は
スタイル修正
編集距離=1 編集距離=2
-
if␣(i␣==␣0){
+
{
- if (i == 0){
+ if (j == 0){
- if (i == 0){
+ if (j == 1){
編集距離=0 (空白,改行のみ)
28.
変更トークンごとの編集距離
28
print(“String”) if (i == 0){
文字列リテラル
識別子
数字リテラル
記号
編集距離=1 編集距離=2
if (i == 0){ if (i == 0){
-
if␣(i␣==␣0){
+
␣␣if(i==0)n
{
- if (i == 0){
+ if (j == 0){
- if (i == 0){
+ if (j == 1){
変更トークン
編集距離
編集距離=0 (空白,改行のみ)