Buggy code:
public static final int OBJ_TYPE_MASK_LEN = 5 ; public static final int OBJ_TYPE_MASK = ( 1 << ( MapRenderingTypes . OBJ_TYPE_MASK_LEN ) ) - 1 ; public static final int MASK_13 = ( 1 << 13 ) - 1 ; public static final int MASK_12 = ( 1 << 12 ) - 1 ; public static final int MASK_4 = ( 1 << 4 ) - 1 ; public static final int MASK_5 = ( 1 << 5 ) - 1 ; public static final int MASK_10 = ( 1 << 10 ) - 1 ; public static final char REF_CHAR = ( ( char ) ( 25 ) ) ; public static final char DELIM_CHAR = ( ( char ) ( 24 ) ) ; public static final byte RESTRICTION_NO_RIGHT_TURN = 1 ; public static final byte RESTRICTION_NO_LEFT_TURN = 2 ; public static final byte RESTRICTION_NO_U_TURN = 3 ; public static final byte RESTRICTION_NO_STRAIGHT_ON = 4 ; public static final byte RESTRICTION_ONLY_RIGHT_TURN = 5 ; public static final byte RESTRICTION_ONLY_LEFT_TURN = 6 ; public static final byte RESTRICTION_ONLY_STRAIGHT_ON = 7 ; public static int getMainObjectType ( int type ) { } public static int getObjectSubType ( int type ) { } private String resourceName = null ; private Map < String , MapRenderingTypes . MapRulType > types = null ; private TIntByteMap objectsToMinZoom = null ; private static Map < String , AmenityType > amenityTagValToType = null ; private static Map < String , String > amenityTagValToPrefix = null ; private static String TAG_DELIMETER = "&&" ; private Map < AmenityType , Map < String , String > > amenityTypeNameToTagVal = null ; private Map < String , AmenityType > amenityNameToType = null ; public MapRenderingTypes ( String fileName ) { } private static MapRenderingTypes DEFAULT_INSTANCE = null ; public static MapRenderingTypes getDefault ( ) { } private static final int POLYGON_WITH_CENTER_TYPE = 9 ; private static final int DEFAULT_POLYGON_BUILDING = 10 ; public static class MapRulType { private String tag ; private Integer nullRule ; private Map < String , Integer > rules = new LinkedHashMap < String , Integer > ( ) ; private Map < String , String > nameNullTag = new LinkedHashMap < String , String > ( ) ; public MapRulType ( String tag , String nameNullTag ) { } public String getTag ( ) { } public Map < String , String > getNameNullTag ( ) { } public Collection < String > getValuesSet ( ) { } public void registerType ( int minZoom , String val , int pointRule , int polylineRule , int polygonRule , int type , int subtype ) { } public boolean registered ( String val ) { } public boolean registeredAsNull ( ) { } private int encodeRule ( int minZoom , int pointRule , int polylineRule , int polygonRule , int type , int subtype ) { } public int getPointRule ( String val ) { } public int getPolylineRule ( String val ) { } public int getPolygonRule ( String val ) { } public int getMinZoom ( String val ) { } public int getType ( String val ) { } public int getSubType ( String val ) { } public int getType ( String val , int mask ) { } } public Map < String , MapRenderingTypes . MapRulType > getEncodingRuleTypes ( ) { } public int encodeEntityWithType ( Entity e , int zoom , boolean multipolygon , List < Integer > additionalTypes ) { } public static boolean isOneWayWay ( int highwayAttributes ) { } public static boolean isRoundabout ( int highwayAttributes ) { } public static int getWayLayer ( int type ) { } public static int getNegativeWayLayer ( int type ) { } public static int getMaxSpeedIfDefined ( int highwayAttributes ) { } public static int getHighwayAttributes ( Entity e ) { } private static int getLayerAttributes ( Entity e ) { String l = e . getTag ( LAYER ) ; if ( l != null ) { if ( l . startsWith ( "+" ) ) { l = l . substring ( 1 ) ; } int la = 0 ; try { la = Integer . parseInt ( l ) ; } catch ( NumberFormatException es ) { } if ( la < 0 ) { return 1 ; } else if ( la > 0 ) { return 2 ; } } else if ( ( e . getTag ( BRIDGE ) ) != null ) { return 2 ; } else <START_BUG> if ( ( e . getTag ( TUNNEL ) ) != null ) { <END_BUG> return 1 ; } return 0 ; } public static boolean isLayerUnder ( int attr ) { } public String getEntityName ( Entity e ) { } private void initAmenityMap ( ) { } public TIntByteMap getObjectTypeMinZoom ( ) { } public Map < AmenityType , Map < String , String > > getAmenityTypeNameToTagVal ( ) { } public Map < String , AmenityType > getAmenityNameToType ( ) { } private void registerAmenity ( String tag , String val , int type , int subtype ) { } private static final int INIT_RULE_TYPES = 0 ; private static final int INIT_AMENITY_MAP = 1 ; private static final int INIT_TYPE_ZOOM = 2 ; private void init ( final int st ) { } private void stepSubtype ( int st , int minZoom , String tag , String val , int type , int subtype , int polygonRule , int polylineRule , int pointRule , String nameNullTag ) { } public static String getAmenitySubtype ( String tag , String val ) { } public static String getAmenitySubtypePrefix ( String tag , String val ) { } public static AmenityType getAmenityType ( String tag , String val ) { } private static void initAmenityTagValToType ( ) { } public static void main ( String [ ] args ) { } }

Fix:
if ( ( ( e . getTag ( TUNNEL ) ) != null ) && ( ! ( e . getTag ( TUNNEL ) . equalsIgnoreCase ( "no" ) ) ) ) {