<commit_before>package uk.org.taverna.scufl2.api.iterationstrategy;


import uk.org.taverna.scufl2.api.common.Child;
import uk.org.taverna.scufl2.api.common.Visitor;
import uk.org.taverna.scufl2.api.common.WorkflowBean;


/**
 * @author <NAME>
 *
 */
public class IterationStrategy implements WorkflowBean,
		Child<IterationStrategyStack>,
IterationStrategyParent {

	private IterationStrategyStack parent;
	private IterationStrategyNode rootStrategyNode;

	public IterationStrategy() {
		super();
	}

	@Override
	public boolean accept(Visitor visitor) {
		if (visitor.visitEnter(this)) {
			getRootStrategyNode().accept(visitor);
		}
		return visitor.visitLeave(this);
	}

	public IterationStrategyStack getParent() {
		return parent;
	}

	public IterationStrategyNode getRootStrategyNode() {
		return rootStrategyNode;
	}<commit_msg>check if rootstrategynode is null before recursing<commit_after>package uk.org.taverna.scufl2.api.iterationstrategy;


import uk.org.taverna.scufl2.api.common.Child;
import uk.org.taverna.scufl2.api.common.Visitor;
import uk.org.taverna.scufl2.api.common.WorkflowBean;


/**
 * @author <NAME>
 *
 */
public class IterationStrategy implements WorkflowBean,
		Child<IterationStrategyStack>,
IterationStrategyParent {

	private IterationStrategyStack parent;
	private IterationStrategyNode rootStrategyNode;

	public IterationStrategy() {
		super();
	}

	@Override
	public boolean accept(Visitor visitor) {
		if (visitor.visitEnter(this) && getRootStrategyNode() != null) {
			getRootStrategyNode().accept(visitor);
		}
		return visitor.visitLeave(this);
	}

	public IterationStrategyStack getParent() {
		return parent;
	}

	public IterationStrategyNode getRootStrategyNode() {
		return rootStrategyNode;
	}
{'fraction_non_alphanumeric': 0.10229885057471265, 'fraction_numerical': 0.004597701149425287, 'mean_word_length': 5.520599250936329, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '22291', 'n_tokens_mistral': 587, 'n_tokens_neox': 553, 'n_words': 100}