Program: 178706
Project: 178706
Buggy source:
private PortalCoord generatePortal(V10Location block,BlockFace face){
  PortalCoord portal=new PortalCoord();
  portal.block=block;
  Block rb=block.getHandle().getBlock();
switch (face) {
case DOWN:
case UP:
    if (!plugin.config.CompactPortal || plugin.config.FillPortalBack < 0) {
      portal.border.add(new V10Location(rb.getRelative(BlockFace.NORTH)));
      if (!plugin.config.CompactPortal) {
        portal.border.add(new V10Location(rb.getRelative(BlockFace.NORTH_WEST)));
        portal.border.add(new V10Location(rb.getRelative(BlockFace.WEST)));
        portal.border.add(new V10Location(rb.getRelative(BlockFace.SOUTH_WEST)));
        portal.border.add(new V10Location(rb.getRelative(BlockFace.SOUTH)));
        portal.border.add(new V10Location(rb.getRelative(BlockFace.SOUTH_EAST)));
        portal.border.add(new V10Location(rb.getRelative(BlockFace.EAST)));
        portal.border.add(new V10Location(rb.getRelative(BlockFace.NORTH_EAST)));
      }
    }
  portal.inside.add(new V10Location(rb));
portal.destLoc=new V10Location(rb.getRelative(face));
face=face.getOppositeFace();
portal.behind.add(new V10Location(rb.getRelative(face)));
portal.tpFace=face;
portal.vertical=true;
return portal;
case NORTH:
case NORTH_EAST:
face=BlockFace.SOUTH;
break;
case EAST:
case SOUTH_EAST:
face=BlockFace.WEST;
break;
case SOUTH:
case SOUTH_WEST:
face=BlockFace.NORTH;
break;
default :
face=BlockFace.NORTH;
break;
}
portal.tpFace=face;
switch (face) {
case NORTH:
case SOUTH:
face=BlockFace.EAST;
break;
default :
face=BlockFace.NORTH;
}
if (!plugin.config.CompactPortal || plugin.config.FillPortalBack < 0) {
portal.border.add(new V10Location(rb.getRelative(BlockFace.DOWN,2)));
if (!plugin.config.CompactPortal) {
portal.border.add(new V10Location(rb.getRelative(BlockFace.UP)));
Block block2=rb.getRelative(face);
for (int i=0; i < 3; i++) portal.border.add(new V10Location(block2.getRelative(BlockFace.DOWN,i)));
block2=rb.getRelative(face.getOppositeFace());
for (int i=0; i < 3; i++) portal.border.add(new V10Location(block2.getRelative(BlockFace.DOWN,i)));
}
}
portal.inside.add(block);
Block block2=rb.getRelative(BlockFace.DOWN);
portal.inside.add(new V10Location(block2));
portal.destLoc=new V10Location(block2.getRelative(portal.tpFace));
portal.vertical=false;
block2.getRelative(portal.tpFace.getOppositeFace());
portal.behind.add(new V10Location(block2));
portal.behind.add(new V10Location(block2.getRelative(BlockFace.UP)));
return portal;
}

Fixed version (ground truth):
private PortalCoord generatePortal(V10Location block,BlockFace face){
  PortalCoord portal=new PortalCoord();
  portal.block=block;
  Block rb=block.getHandle().getBlock();
switch (face) {
case DOWN:
case UP:
    if (!plugin.config.CompactPortal || plugin.config.FillPortalBack < 0) {
      portal.border.add(new V10Location(rb.getRelative(BlockFace.NORTH)));
      if (!plugin.config.CompactPortal) {
        portal.border.add(new V10Location(rb.getRelative(BlockFace.NORTH_WEST)));
        portal.border.add(new V10Location(rb.getRelative(BlockFace.WEST)));
        portal.border.add(new V10Location(rb.getRelative(BlockFace.SOUTH_WEST)));
        portal.border.add(new V10Location(rb.getRelative(BlockFace.SOUTH)));
        portal.border.add(new V10Location(rb.getRelative(BlockFace.SOUTH_EAST)));
        portal.border.add(new V10Location(rb.getRelative(BlockFace.EAST)));
        portal.border.add(new V10Location(rb.getRelative(BlockFace.NORTH_EAST)));
      }
    }
  portal.inside.add(new V10Location(rb));
portal.destLoc=new V10Location(rb.getRelative(face));
face=face.getOppositeFace();
portal.behind.add(new V10Location(rb.getRelative(face)));
portal.tpFace=face;
portal.vertical=true;
return portal;
case NORTH:
case NORTH_EAST:
face=BlockFace.SOUTH;
break;
case EAST:
case SOUTH_EAST:
face=BlockFace.WEST;
break;
case SOUTH:
case SOUTH_WEST:
face=BlockFace.NORTH;
break;
default :
face=BlockFace.NORTH;
break;
}
portal.tpFace=face;
switch (face) {
case NORTH:
case SOUTH:
face=BlockFace.EAST;
break;
default :
face=BlockFace.NORTH;
}
if (!plugin.config.CompactPortal || plugin.config.FillPortalBack < 0) {
Block block2=rb.getRelative(BlockFace.DOWN,2);
portal.border.add(new V10Location(block2));
if (!plugin.config.CompactPortal) {
block2=block2.getRelative(face);
portal.border.add(new V10Location(block2));
for (int i=0; i < 3; i++) {
block2=block2.getRelative(BlockFace.UP);
portal.border.add(new V10Location(block2));
}
face=face.getOppositeFace();
for (int i=0; i < 2; i++) {
block2=block2.getRelative(face);
portal.border.add(new V10Location(block2));
}
for (int i=0; i < 3; i++) {
block2=block2.getRelative(BlockFace.DOWN);
portal.border.add(new V10Location(block2));
}
}
}
portal.inside.add(block);
Block block2=rb.getRelative(BlockFace.DOWN);
portal.inside.add(new V10Location(block2));
portal.destLoc=new V10Location(block2.getRelative(portal.tpFace.getOppositeFace()));
portal.vertical=false;
block2.getRelative(portal.tpFace);
portal.behind.add(new V10Location(block2));
portal.behind.add(new V10Location(block2.getRelative(BlockFace.UP)));
return portal;
}