Program: 61591
Project: 61591
Buggy source:
/** 
 * Create a Gen Mutation for a given CtElement
 * @param ctElementPointed
 * @param className
 * @param suspValue
 * @return
 * @throws IllegalAccessException
 */
@Override protected GenOperationInstance createOperationForGen(Gen gen) throws IllegalAccessException {
  GenSuspicious genSusp=(GenSuspicious)gen;
  GenProgMutationOperation operationType=(GenProgMutationOperation)repairActionSpace.getNextMutation(genSusp.getSuspicious().getSuspiciousValue());
  if (operationType == null) {
    log.debug("String_Node_Str");
    return null;
  }
  CtElement targetStmt=genSusp.getCodeElement();
  GenOperationInstance operation=new GenOperationInstance();
  operation.setOriginal(targetStmt);
  operation.setOperationApplied(operationType);
  operation.setGen(genSusp);
  setParentToGenOperator(operation,genSusp);
  Ingredient fix=null;
  if (operationType.equals(GenProgMutationOperation.INSERT_AFTER) || operationType.equals(GenProgMutationOperation.INSERT_BEFORE)) {
    fix=this.getFixIngredient(gen,targetStmt,operationType);
    if (operationType.equals(GenProgMutationOperation.INSERT_AFTER)) {
      operation.setLocationInParent(operation.getLocationInParent() + 1);
    }
  }
  if (operationType.equals(GenProgMutationOperation.REPLACE)) {
    fix=this.getFixIngredient(gen,targetStmt,gen.getCodeElement().getClass().getSimpleName(),operationType);
  }
  if (!operationType.equals(GenProgMutationOperation.DELETE) && fix == null) {
    log.error("String_Node_Str");
    return null;
  }
  if (fix != null) {
    operation.setModified(fix.getCode());
    operation.setIngredientScope(fix.getScope());
  }
  return operation;
}

Fixed version (ground truth):
/** 
 * Create a Gen Mutation for a given CtElement
 * @param ctElementPointed
 * @param className
 * @param suspValue
 * @return
 * @throws IllegalAccessException
 */
@Override protected GenOperationInstance createOperationForGen(Gen gen) throws IllegalAccessException {
  GenSuspicious genSusp=(GenSuspicious)gen;
  GenProgMutationOperation operationType=(GenProgMutationOperation)repairActionSpace.getNextMutation(genSusp.getSuspicious().getSuspiciousValue());
  if (operationType == null) {
    log.debug("String_Node_Str");
    return null;
  }
  CtElement targetStmt=genSusp.getCodeElement();
  GenOperationInstance operation=new GenOperationInstance();
  operation.setOriginal(targetStmt);
  operation.setOperationApplied(operationType);
  operation.setGen(genSusp);
  setParentToGenOperator(operation,genSusp);
  Ingredient fix=null;
  if (operationType.equals(GenProgMutationOperation.INSERT_AFTER) || operationType.equals(GenProgMutationOperation.INSERT_BEFORE)) {
    fix=this.getFixIngredient(gen,targetStmt,operationType);
    if (operationType.equals(GenProgMutationOperation.INSERT_AFTER)) {
      operation.setLocationInParent(operation.getLocationInParent() + 1);
    }
  }
  if (operationType.equals(GenProgMutationOperation.REPLACE)) {
    fix=this.getFixIngredient(gen,targetStmt,gen.getCodeElement().getClass().getSimpleName(),operationType);
  }
  if (!operationType.equals(GenProgMutationOperation.DELETE) && fix == null) {
    log.debug("String_Node_Str");
    return null;
  }
  if (fix != null) {
    operation.setModified(fix.getCode());
    operation.setIngredientScope(fix.getScope());
  }
  return operation;
}