if (count > 0) fillFilteredChildren(elementType, result);
return result;
}
private int countChildren(final IElementType elementType) {
int count = 0;
<BUG>for (StubElement childStub : getChildrenStubs()) {

if (childStub.getStubType() == elementType) count++;</BUG>
}
return count;

if (count > 0) fillFilteredChildren(elementType, result);
return result;
}
private int countChildren(final IElementType elementType) {
int count = 0;
List<StubElement> childrenStubs = getChildrenStubs();
for (int i = 0, childrenStubsSize = childrenStubs.size(); i < childrenStubsSize; i++) {
StubElement childStub = childrenStubs.get(i);
if (childStub.getStubType() == elementType) count++;
}
return count;
