As shown in the SimFix paper, the code snippet size is 10. (i.e., given faulty line n, the snippet ranges from n-5 to n+4 ).
But when I use SimFix to repair Math 57, I got such log:
Sat Apr 20 13:15:33 PDT 2019 org.apache.commons.math.stat.clustering.KMeansPlusPlusClusterer,321
0 s for the statement.
Sat Apr 20 13:15:33 PDT 2019 **org.apache.commons.math.stat.clustering.KMeansPlusPlusClusterer,196**
----------------------------------------
----------------------------------------
Pass Single Test : [=>0,0]
while(resultSet.size()<k){
double sum=0;
for(int i=0;i<pointSet.size();i++){
final T p=pointSet.get(i);
final Cluster<T> nearest=getNearestCluster(resultSet,p);
final double d=p.distanceFrom(nearest.getCenter());
sum+=d*d;
dx2[i]=sum;
}
final double r=random.nextDouble()*sum;
for(int i=0;i<dx2.length;i++){
if(dx2[i]>=r){
final T p=pointSet.remove(i);
resultSet.add(new Cluster<T>(p));
break;
}
}
}
Time : 19/04/20 13:17
----------------------------------------
----------------------------------------
This log indicates that SimFix chose the org.apache.commons.math.stat.clustering.KMeansPlusPlusClusterer,196 as buggy line, but the whole code snippet spans from KMeansPlusPlusClusterer:175 to KMeansPlusPlusClusterer:196. This is out of my expection and also the expected snippet size.
Therefore, I would like to ask that if there are some points I missed in the process.
Sorry for interrupting you with this question.
As shown in the SimFix paper, the code snippet size is 10. (i.e., given faulty line n, the snippet ranges from n-5 to n+4 ).
But when I use SimFix to repair Math 57, I got such log:
This log indicates that SimFix chose the org.apache.commons.math.stat.clustering.KMeansPlusPlusClusterer,196 as buggy line, but the whole code snippet spans from KMeansPlusPlusClusterer:175 to KMeansPlusPlusClusterer:196. This is out of my expection and also the expected snippet size.
Therefore, I would like to ask that if there are some points I missed in the process.
Any help would be much appreciated.
Regards, Dale.