Language: Go
Label: vulnerable
CWE: CWE-366 \u2014 Race Condition within a Thread
If two threads of execution use a resource simultaneously, there exists the possibility that resources may be used while invalid, in turn making the state of execution undefined.

Code:
func (as *AnswerActivityService) DeleteQuestion(ctx context.Context, questionID string, createdAt time.Time,
	voteCount int) (err error) {
	if voteCount >= 3 {
		log.Infof("There is no need to roll back the reputation by answering likes above the target value. %s %d", questionID, voteCount)
		return nil
	}
	if createdAt.Before(time.Now().AddDate(0, 0, -60)) {
		log.Infof("There is no need to roll back the reputation by answer's existence time meets the target. %s %s", questionID, createdAt.String())
		return nil
	}
	return as.questionActivityRepo.DeleteQuestion(ctx, questionID)
}