Buggy code:
public class PlatRoadPaved extends PlatRoad { protected static long connectedkeyForPavedRoads = 0 ; protected static final int sidewalkWidth = 3 ; protected static final int lightpostHeight = 3 ; protected static final int crossDitchEdge = 7 ; protected static final int vaultWidth = 5 ; protected static final int vaultDoorOffset = 2 ; protected static final int waterOffset = 3 ; protected static final Material airMaterial = Material . AIR ; protected static final Material lightpostbaseMaterial = Material . DOUBLE_STEP ; protected static final Material lightpostMaterial = Material . FENCE ; protected static final Material lightMaterial = Material . GLOWSTONE ; protected static final Material manpipeMaterial = Material . OBSIDIAN ; protected static final Material sewerWallMaterial = Material . MOSSY_COBBLESTONE ; protected static final Material vineMaterial = Material . VINE ; protected static final byte airId = ( ( byte ) ( PlatRoadPaved . airMaterial . getId ( ) ) ) ; protected static final byte sewerFloorId = ( ( byte ) ( COBBLESTONE . getId ( ) ) ) ; protected static final byte sewerWallId = ( ( byte ) ( PlatRoadPaved . sewerWallMaterial . getId ( ) ) ) ; protected static final byte plumbingId = ( ( byte ) ( OBSIDIAN . getId ( ) ) ) ; protected static final byte doorBrickId = ( ( byte ) ( BRICK . getId ( ) ) ) ; protected static final byte doorIronId = ( ( byte ) ( IRON_FENCE . getId ( ) ) ) ; protected static final byte waterId = ( ( byte ) ( WATER . getId ( ) ) ) ; protected static final byte pavementId = ( ( byte ) ( STONE . getId ( ) ) ) ; protected static final byte sidewalkId = ( ( byte ) ( STEP . getId ( ) ) ) ; protected static byte medianId = ( ( byte ) ( GLOWSTONE . getId ( ) ) ) ; public PlatRoadPaved ( Random rand , PlatMapContext context ) { } @ Override public void generateChunk ( PlatMap platmap , ByteChunk chunk , PlatMapContext context , int platX , int platZ ) { } protected void doPavement ( PlatMapContext context , SurroundingRoads roads , ByteChunk chunk ) { chunk . setLayer ( context . streetLevel , PlatRoadPaved . pavementId ) ; int pStart = ( ByteChunk . WIDTH ) > > 1 ; <START_BUG> int pEnd = pStart + 1 ; <END_BUG> RoadOrientation ro = roads . getOrientation ( ) ; if ( ro . equals ( NS ) ) { for ( int i = 0 ; i < 3 ; i ++ ) { int line = i * 5 ; int lineEnd = line + 4 ; chunk . setBlocks ( pStart , pEnd , context . streetLevel , ( ( context . streetLevel ) + 1 ) , line , lineEnd , PlatRoadPaved . medianId ) ; } } else if ( ro . equals ( WE ) ) { for ( int i = 0 ; i < 3 ; i ++ ) { int line = i * 5 ; int lineEnd = line + 4 ; chunk . setBlocks ( line , lineEnd , context . streetLevel , ( ( context . streetLevel ) + 1 ) , pStart , pEnd , PlatRoadPaved . medianId ) ; } } } protected void doSewer ( PlatMapContext context , ByteChunk chunk , int sewerY , SurroundingRoads roads , int base1Y , int base2Y ) { } protected void doPlumbing ( PlatMapContext context , ByteChunk chunk , int base2Y , int base3Y , int plumbingY ) { } protected void doSidewalk ( SurroundingRoads roads , PlatMapContext context , ByteChunk chunk , int sidewalkLevel ) { } protected void generateCrosswalks ( SurroundingRoads roads , RealChunk chunk , int sidewalkLevel ) { } @ Override public void generateBlocks ( PlatMap platmap , RealChunk chunk , PlatMapContext context , int platX , int platZ ) { } protected void generateLightPost ( RealChunk chunk , PlatMapContext context , int x , int z ) { } protected void generateManhole ( RealChunk chunk , int x , int y1 , int y2 , int z ) { } protected void generateRoundedOut ( ByteChunk chunk , PlatMapContext context , int x , int z , boolean toNorth , boolean toEast ) { } protected void generateCeilingInset ( ByteChunk chunk , PlatMapContext context , int x1 , int x2 , int y1 , int z1 , int z2 , boolean insetS , boolean insetN , boolean insetE , boolean insetW ) { } protected void generateVault ( ByteChunk chunk , PlatMapContext context , int x1 , int x2 , int y1 , int z1 , int z2 , boolean doorNS , boolean doorEW ) { } private int minTreasureId = IRON_SPADE . getId ( ) ; private int maxTreasureId = ROTTEN_FLESH . getId ( ) ; private int countTreasureIds = ( maxTreasureId ) - ( minTreasureId ) ; protected void populateVault ( RealChunk chunk , PlatMapContext context , int x1 , int x2 , int y1 , int z1 , int z2 ) { } protected CreatureType pickTrick ( ) { } protected Material pickPlumbingTreasure ( ) { } @ Override public PlatType getType ( ) { } }

Fix:
int pEnd = pStart + 2 ;