Statement (Statement statement) { Statement candidateForSplitting = null; int sizeCandidateForSplitting = Integer.MAX_VALUE; int succsCandidateForSplitting = Integer.MAX_VALUE; for (Statement stat : statement.getStats()) { Set<Statement> setPreds = stat.getNeighboursSet(EdgeType.REGULAR, EdgeDirection.BACKWARD); if (setPreds.size() > 1) { int succCount = stat.getNeighboursSet(EdgeType.REGULAR, EdgeDirection.FORWARD).size(); if (succCount <= succsCandidateForSplitting) { int size = getStatementSize(stat) * (setPreds.size() - 1); if (succCount < succsCandidateForSplitting || size < sizeCandidateForSplitting) { candidateForSplitting = stat; sizeCandidateForSplitting = size; succsCandidateForSplitting = succCount; } } } } return candidateForSplitting; }