Buggy code:
public final class FieldInfos implements Iterable < FieldInfo > { static final class FieldNumberBiMap { private final Map < Integer , String > numberToName ; private final Map < String , Integer > nameToNumber ; private int lowestUnassignedFieldNumber = - 1 ; FieldNumberBiMap ( ) { } synchronized int addOrGet ( String fieldName , int preferredFieldNumber ) { } synchronized void setIfNotSet ( int fieldNumber , String fieldName ) { } synchronized boolean containsConsistent ( Integer number , String name ) { } } private final SortedMap < Integer , FieldInfo > byNumber = new TreeMap < Integer , FieldInfo > ( ) ; private final HashMap < String , FieldInfo > byName = new HashMap < String , FieldInfo > ( ) ; private final FieldInfos . FieldNumberBiMap globalFieldNumbers ; private boolean hasFreq ; private boolean hasProx ; private boolean hasVectors ; private long version ; public FieldInfos ( FieldInfo [ ] infos , boolean hasFreq , boolean hasProx , boolean hasVectors ) { } public FieldInfos ( ) { } public void add ( FieldInfos other ) { } FieldInfos ( FieldInfos . FieldNumberBiMap globalFieldNumbers ) { } private void putInternal ( FieldInfo fi ) { } private int nextFieldNumber ( String name , int preferredFieldNumber ) { } @ Override public synchronized Object clone ( ) { } public boolean hasProx ( ) { } public boolean hasFreq ( ) { } public synchronized void addOrUpdateIndexed ( Collection < String > names , boolean storeTermVectors ) { } public synchronized void addOrUpdate ( Collection < String > names , boolean isIndexed ) { } public synchronized void addOrUpdate ( String name , boolean isIndexed ) { } public synchronized void addOrUpdate ( String name , boolean isIndexed , boolean storeTermVector ) { } public synchronized void addOrUpdate ( String name , boolean isIndexed , boolean storeTermVector , boolean omitNorms ) { } public synchronized FieldInfo addOrUpdate ( String name , boolean isIndexed , boolean storeTermVector , boolean omitNorms , boolean storePayloads , IndexOptions indexOptions , DocValues . Type docValues , DocValues . Type normType ) { } public FieldInfo addOrUpdate ( String name , IndexableFieldType fieldType ) { } private synchronized FieldInfo addOrUpdateInternal ( String name , int preferredFieldNumber , boolean isIndexed , boolean storeTermVector , boolean omitNorms , boolean storePayloads , IndexOptions indexOptions , DocValues . Type docValues , DocValues . Type normType ) { } public synchronized FieldInfo add ( FieldInfo fi ) { } private FieldInfo addInternal ( String name , int fieldNumber , boolean isIndexed , boolean storeTermVector , boolean omitNorms , boolean storePayloads , IndexOptions indexOptions , DocValues . Type docValuesType , DocValues . Type normType ) { } public int fieldNumber ( String fieldName ) { } public FieldInfo fieldInfo ( String fieldName ) { } public String fieldName ( int fieldNumber ) { } public FieldInfo fieldInfo ( int fieldNumber ) { } public Iterator < FieldInfo > iterator ( ) { } public int size ( ) { } public boolean hasVectors ( ) { } public boolean hasNorms ( ) { for ( FieldInfo fi : this ) { <START_BUG> if ( ( fi . isIndexed ) && ( ! ( fi . omitNorms ) ) ) { <END_BUG> return true ; } } return false ; } public final boolean isReadOnly ( ) { } final synchronized long getVersion ( ) { } final FieldInfos asReadOnly ( ) { } public boolean anyDocValuesFields ( ) { } static FieldInfos from ( FieldInfos other ) { } }

Fix:
if ( fi . normsPresent ( ) ) {