astor icon indicating copy to clipboard operation
astor copied to clipboard

gcd example - Astor finds a solution, however continues to generate more variants

Open ssk1216 opened this issue 3 years ago • 0 comments

package gcd;

public class GCD {

public int computegcd(int a, int b) {
	if (a == 0) 
	{
		return a;
	}
	while (b != 0)
		if (a > b)
			a = a - b;else
			b = b - a;
	**return b;**  //  buggy statement
}

}

13:20:52 [main] INFO Line:452 AstorCoreEngine - -Found Solution, child variant #6

However it contnues to generate more variants , Why does that happen? Shouldn't it stop iterating

Also , couple of questions:

  1. If there are multiple suspicious statements with various suspicious value, which is the .java file in which a selection of these statements are done to create new variants.
  2. When there is a tie between the suspicious values, how is the choice done?
  3. Which .java writes the variant to the folder for saveall:true option (I am trying to check the various variants generated)

ssk1216 avatar Jul 19 '21 09:07 ssk1216