Buggy code:
public class NavigationHistory implements INavigationHistory { private static final int CAPACITY = 50 ; private NavigationHistoryAction backwardAction ; private NavigationHistoryAction forwardAction ; private int ignoreEntries ; private ArrayList history = new ArrayList ( NavigationHistory . CAPACITY ) ; Map perTabHistoryMap = new HashMap ( ) ; private ArrayList editors = new ArrayList ( NavigationHistory . CAPACITY ) ; private WorkbenchPage page ; private int activeEntry = 0 ; public NavigationHistory ( final WorkbenchPage page ) { } private Display getDisplay ( ) { } private boolean isPerTabHistoryEnabled ( ) { <START_BUG> return ( ( org . eclipse . ui . internal . tweaklets . TabBehaviour ) ( org . eclipse . ui . internal . tweaklets . Tweaklets . get ( org . eclipse . ui . internal . tweaklets . TabBehaviour . class ) ) ) . isPerTabHistoryEnabled ( ) ; <END_BUG> } public void markEditor ( final IEditorPart part ) { } public void markLocation ( IEditorPart part ) { } NavigationHistoryEntry [ ] getBackwardEntries ( ) { } NavigationHistoryEntry [ ] getForwardEntries ( ) { } public INavigationLocation [ ] getLocations ( ) { } public INavigationLocation getCurrentLocation ( ) { } public void dispose ( ) { } void setForwardAction ( NavigationHistoryAction action ) { } void setBackwardAction ( NavigationHistoryAction action ) { } private NavigationHistoryEntry getEntry ( int index ) { } private void add ( NavigationHistoryEntry entry ) { } private void removeForwardEntries ( ) { } private void addEntry ( IEditorPart part ) { } private void printEntries ( String label ) { } boolean canForward ( ) { } boolean canBackward ( ) { } private void updateActions ( ) { } private void gotoEntry ( NavigationHistoryEntry entry ) { } private void updateEntry ( NavigationHistoryEntry activeEntry ) { } void forward ( ) { } void backward ( ) { } private void shiftEntry ( boolean forward ) { } void shiftCurrentEntry ( NavigationHistoryEntry entry , boolean forward ) { } void saveState ( IMemento memento ) { } void restoreState ( IMemento memento ) { } public NavigationHistoryEntry createEntry ( IWorkbenchPage page , IEditorPart part , INavigationLocation location ) { } public void disposeEntry ( NavigationHistoryEntry entry ) { } void checkDuplicates ( NavigationHistoryEditorInfo info ) { } private static class PerTabHistory { LinkedList backwardEntries = new LinkedList ( ) ; NavigationHistoryEntry currentEntry = null ; LinkedList forwardEntries = new LinkedList ( ) ; } private void setNewCurrentEntryForTab ( NavigationHistory . PerTabHistory perTabHistory , NavigationHistoryEntry entry ) { } private Object getCookieForTab ( IEditorPart part ) { } private void markLocationForTab ( IEditorPart part ) { } public void updateCookieForTab ( Object oldCookie , Object newCookie ) { } private void gotoEntryForTab ( NavigationHistoryEntry target , boolean forward ) { } private void forwardForTab ( ) { } private void backwardForTab ( ) { } private boolean hasEntriesForTab ( boolean forward ) { } private NavigationHistoryEntry [ ] getEntriesForTab ( boolean forward ) { } private void disposeHistoryForTabs ( ) { } void disposeHistoryForTab ( Object editorTabCookie ) { } private void removeEntriesForTab ( LinkedList entries ) { } }

Fix:
return ( ( org . eclipse . ui . internal . tweaklets . TabBehaviour ) ( org . eclipse . ui . internal . tweaklets . Tweaklets . get ( TabBehaviour . KEY ) ) ) . isPerTabHistoryEnabled ( ) ;