Sonar CPD обнаружение блоков дубликацииJAVA

Программисты JAVA общаются здесь
Anonymous
Sonar CPD обнаружение блоков дубликации

Сообщение Anonymous »

Я сделал так много анализа о том, как сонар CPD обнаруживает дублирующие блоки. Но я не могу запустить именно то, что требуется для обнаружения блоков или строк кода. System.out.println("this is good");
System.out.println("this is good");

System.out.println("this is good");
System.out.println("this is good");

System.out.println("this is good");

System.out.println("this is good");

System.out.println("this is good");

System.out.println("this is good");

System.out.println("this is good");

System.out.println("this is good");
< /code>

Позже я попытался дать блоки дупликации < /p>

try
{
connection = null;
}
catch(Exception e){
e.printStackTrace();
}
try
{
connection = null;
}
catch(Exception e){
e.printStackTrace();
}
try{
connection = null;
}
catch(Exception e){
e.printStackTrace();
}
try{
connection = null;
}
catch(Exception e){
e.printStackTrace();
}
< /code>

Здесь он рассматривает как два блока, даже если в нем есть много блоков. />http://docs.sonarsource.org/3.1/apidocs ... ne.htmlсон>

Подробнее здесь: https://stackoverflow.com/questions/148 ... plications

Вернуться в «JAVA»