Program: 75105
Project: 75105
Buggy source:
/** 
 * Create a set checkpoint method invocation for an assignment block.
 * @param ast The {@link AST} object.
 * @return The statement that tests whether the checkpoint objects of thecurrent object and the new value are the same; if not, assign the checkpoint object of the current object to the checkpoint of the new value.
 */
private Statement _createSetCheckpointInvocation(AST ast){
  InfixExpression test=ast.newInfixExpression();
  InfixExpression condition1=ast.newInfixExpression();
  condition1.setLeftOperand(ast.newSimpleName("String_Node_Str"));
  condition1.setOperator(InfixExpression.Operator.NOT_EQUALS);
  condition1.setRightOperand(ast.newNullLiteral());
  InfixExpression condition2=ast.newInfixExpression();
  condition2.setLeftOperand(ast.newSimpleName(CHECKPOINT_NAME));
  condition2.setOperator(InfixExpression.Operator.NOT_EQUALS);
  FieldAccess access=ast.newFieldAccess();
  access.setExpression(ast.newSimpleName("String_Node_Str"));
  access.setName(ast.newSimpleName(CHECKPOINT_NAME));
  condition2.setRightOperand(access);
  test.setLeftOperand(condition1);
  test.setOperator(InfixExpression.Operator.CONDITIONAL_AND);
  test.setRightOperand(condition2);
  IfStatement ifStatement=ast.newIfStatement();
  ifStatement.setExpression(test);
  Block thenBranch=ast.newBlock();
  ifStatement.setThenStatement(thenBranch);
  MethodInvocation setCheckpoint=ast.newMethodInvocation();
  setCheckpoint.setExpression(ast.newSimpleName("String_Node_Str"));
  setCheckpoint.setName(ast.newSimpleName(SET_CHECKPOINT_NAME));
  setCheckpoint.arguments().add(ast.newSimpleName(CHECKPOINT_NAME));
  thenBranch.statements().add(ast.newExpressionStatement(setCheckpoint));
  return ifStatement;
}

Fixed version (ground truth):
/** 
 * Create a set checkpoint method invocation for an assignment block.
 * @param ast The {@link AST} object.
 * @return The statement that tests whether the checkpoint objects of thecurrent object and the new value are the same; if not, assign the checkpoint object of the current object to the checkpoint of the new value.
 */
private Statement _createSetCheckpointInvocation(AST ast){
  InfixExpression test=ast.newInfixExpression();
  InfixExpression condition1=ast.newInfixExpression();
  condition1.setLeftOperand(ast.newSimpleName("String_Node_Str"));
  condition1.setOperator(InfixExpression.Operator.NOT_EQUALS);
  condition1.setRightOperand(ast.newNullLiteral());
  InfixExpression condition2=ast.newInfixExpression();
  condition2.setLeftOperand(ast.newSimpleName(CHECKPOINT_NAME));
  condition2.setOperator(InfixExpression.Operator.NOT_EQUALS);
  MethodInvocation getCheckpoint=ast.newMethodInvocation();
  getCheckpoint.setExpression(ast.newSimpleName("String_Node_Str"));
  getCheckpoint.setName(ast.newSimpleName(_getGetCheckpointMethodName(false)));
  condition2.setRightOperand(getCheckpoint);
  test.setLeftOperand(condition1);
  test.setOperator(InfixExpression.Operator.CONDITIONAL_AND);
  test.setRightOperand(condition2);
  IfStatement ifStatement=ast.newIfStatement();
  ifStatement.setExpression(test);
  Block thenBranch=ast.newBlock();
  ifStatement.setThenStatement(thenBranch);
  MethodInvocation setCheckpoint=ast.newMethodInvocation();
  setCheckpoint.setExpression(ast.newSimpleName("String_Node_Str"));
  setCheckpoint.setName(ast.newSimpleName(SET_CHECKPOINT_NAME));
  setCheckpoint.arguments().add(ast.newSimpleName(CHECKPOINT_NAME));
  thenBranch.statements().add(ast.newExpressionStatement(setCheckpoint));
  return ifStatement;
}