Buggy code:
public class FileDataModel implements DataModel { private static final Logger log = LoggerFactory . getLogger ( FileDataModel . class ) ; private static final long MIN_RELOAD_INTERVAL_MS = 60 * 1000L ; private static final char UNKNOWN_DELIMITER = '' ; private final File dataFile ; private long lastModified ; private char delimiter ; private boolean loaded ; private DataModel delegate ; private final ReentrantLock reloadLock ; public FileDataModel ( File dataFile ) throws FileNotFoundException { } public File getDataFile ( ) { } protected void reload ( ) { } private Iterable < File > findUpdateFiles ( ) { } protected void processFile ( File dataOrUpdateFile , Map < String , List < Preference > > data ) { } private static char determineDelimiter ( String line ) { } protected void processLine ( String line , Map < String , List < Preference > > data , Map < String , Item > itemCache ) { } private void checkLoaded ( ) { } @ Override public Iterable < ? extends User > getUsers ( ) throws TasteException { } @ Override public User getUser ( Object id ) throws TasteException { } @ Override public Iterable < ? extends Item > getItems ( ) throws TasteException { } @ Override public Item getItem ( Object id ) throws TasteException { } @ Override public Iterable < ? extends Preference > getPreferencesForItem ( Object itemID ) throws TasteException { } @ Override public Preference [ ] getPreferencesForItemAsArray ( Object itemID ) throws TasteException { } @ Override public int getNumItems ( ) throws TasteException { } @ Override public int getNumUsers ( ) throws TasteException { } @ Override public int getNumUsersWithPreferenceFor ( Object ... itemIDs ) throws TasteException { } @ Override public void setPreference ( Object userID , Object itemID , double value ) { } @ Override public void removePreference ( Object userID , Object itemID ) { } @ Override public void refresh ( Collection < Refreshable > alreadyRefreshed ) { } protected User buildUser ( String id , List < Preference > prefs ) { <START_BUG> if ( ( ! ( prefs . isEmpty ( ) ) ) || ( ( prefs . get ( 0 ) ) instanceof BooleanPreference ) ) { <END_BUG> FastSet < Object > itemIDs = new FastSet < Object > ( prefs . size ( ) ) ; for ( Preference pref : prefs ) { itemIDs . add ( pref . getItem ( ) . getID ( ) ) ; } return new org . apache . mahout . cf . taste . impl . model . BooleanPrefUser < String > ( id , itemIDs ) ; } return new org . apache . mahout . cf . taste . impl . model . GenericUser < String > ( id , prefs ) ; } protected Item buildItem ( String id ) { } protected Preference buildPreference ( User user , Item item , double value ) { } @ Override public String toString ( ) { } private final class UserIteratableOverData implements Iterable < User > { private final Map < String , List < Preference > > data ; private UserIteratableOverData ( Map < String , List < Preference > > data ) { } @ Override public Iterator < User > iterator ( ) { } } private final class UserIteratorOverData implements Iterator < User > { private final Iterator < Map . Entry < String , List < Preference > > > dataIterator ; private UserIteratorOverData ( Iterator < Map . Entry < String , List < Preference > > > dataIterator ) { } @ Override public boolean hasNext ( ) { } @ Override public User next ( ) { } @ Override public void remove ( ) { } } }

Fix:
if ( ( ! ( prefs . isEmpty ( ) ) ) && ( ( prefs . get ( 0 ) ) instanceof BooleanPreference ) ) {