Program: 178701
Project: 178701
Buggy source:
public void create(){
  byte color;
  if (orange)   color=(byte)plugin.util.getRightPortalColor(owner.colorPreset);
 else   color=(byte)plugin.util.getLeftPortalColor(owner.colorPreset);
  Block rb;
  BlockHolder bh;
  for (  V10Location loc : border) {
    if (plugin.portalManager.insideBlocks.containsKey(loc))     plugin.portalManager.insideBlocks.get(loc).delete();
    if (plugin.portalManager.behindBlocks.containsKey(loc))     plugin.portalManager.behindBlocks.get(loc).delete();
    rb=loc.getHandle().getBlock();
    bh=new BlockHolder(rb);
    if (plugin.gelManager.gelMap.containsKey(bh))     bh=plugin.gelManager.gelMap.get(bh);
    plugin.portalManager.oldBlocks.put(loc,bh);
    rb.setType(Material.WOOL);
    rb.setData(color);
    plugin.portalManager.borderBlocks.put(loc,this);
  }
  for (  V10Location loc : inside) {
    if (loc != null) {
      rb=loc.getHandle().getBlock();
      bh=new BlockHolder(rb);
      if (plugin.gelManager.gelMap.containsKey(bh))       bh=plugin.gelManager.gelMap.get(bh);
      plugin.portalManager.oldBlocks.put(loc,bh);
    }
  }
  if (plugin.config.FillPortalBack > -1) {
    for (    V10Location loc : behind) {
      if (plugin.portalManager.borderBlocks.containsKey(loc))       plugin.portalManager.borderBlocks.get(loc).delete();
      if (plugin.portalManager.insideBlocks.containsKey(loc))       plugin.portalManager.insideBlocks.get(loc).delete();
      rb=loc.getHandle().getBlock();
      bh=new BlockHolder(rb);
      if (plugin.gelManager.gelMap.containsKey(bh))       bh=plugin.gelManager.gelMap.get(bh);
      plugin.portalManager.oldBlocks.put(loc,bh);
      if (plugin.config.CompactPortal) {
        rb.setType(Material.WOOL);
        rb.setData(color);
      }
 else {
        rb.setTypeId(plugin.config.FillPortalBack);
      }
      plugin.portalManager.behindBlocks.put(loc,this);
    }
  }
  if (getDestination() == null)   close();
 else {
    open();
    if (getDestination().isRegionPortal())     plugin.regionManager.getRegion(centerBlock).regionPortalOpened(orange);
 else     getDestination().open();
  }
  if (isRegionPortal())   plugin.regionManager.getRegion(centerBlock).regionPortalCreated(orange);
  V10Location oloc;
  V10Location loc;
  int i;
  oloc=inside[0].clone();
  plugin.portalManager.insideBlocks.put(inside[0],this);
  if (inside[1] != null)   plugin.portalManager.insideBlocks.put(inside[1],this);
  if (horizontal) {
    for (int y=-1; y < 2; y++) {
      if (y != 0) {
        loc=new V10Location(oloc.world,oloc.x,oloc.y + y,oloc.z);
        plugin.portalManager.awayBlocksY.put(loc,this);
        if (y < 1)         i=0;
 else         i=1;
        awayBlocksY[i]=loc;
      }
      for (int x=-1; x < 2; x++) {
        for (int z=-1; z < 2; z++) {
          loc=new V10Location(oloc.world,oloc.x + x,oloc.y + y,oloc.z + z);
          plugin.portalManager.awayBlocks.put(loc,this);
          awayBlocks.add(loc);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void create(){
  byte color;
  if (orange)   color=(byte)plugin.util.getRightPortalColor(owner.colorPreset);
 else   color=(byte)plugin.util.getLeftPortalColor(owner.colorPreset);
  Block rb;
  BlockHolder bh;
  for (  V10Location loc : border) {
    if (plugin.portalManager.insideBlocks.containsKey(loc))     plugin.portalManager.insideBlocks.get(loc).delete();
    if (plugin.portalManager.behindBlocks.containsKey(loc))     plugin.portalManager.behindBlocks.get(loc).delete();
    rb=loc.getHandle().getBlock();
    bh=new BlockHolder(rb);
    if (plugin.gelManager.gelMap.containsKey(bh)) {
      bh=plugin.gelManager.gelMap.get(bh);
      plugin.gelManager.removeGel(bh);
    }
    plugin.portalManager.oldBlocks.put(loc,bh);
    rb.setType(Material.WOOL);
    rb.setData(color);
    plugin.portalManager.borderBlocks.put(loc,this);
  }
  for (  V10Location loc : inside) {
    if (loc != null) {
      rb=loc.getHandle().getBlock();
      bh=new BlockHolder(rb);
      if (plugin.gelManager.gelMap.containsKey(bh)) {
        bh=plugin.gelManager.gelMap.get(bh);
        plugin.gelManager.removeGel(bh);
      }
      plugin.portalManager.oldBlocks.put(loc,bh);
    }
  }
  if (plugin.config.FillPortalBack > -1) {
    for (    V10Location loc : behind) {
      if (plugin.portalManager.borderBlocks.containsKey(loc))       plugin.portalManager.borderBlocks.get(loc).delete();
      if (plugin.portalManager.insideBlocks.containsKey(loc))       plugin.portalManager.insideBlocks.get(loc).delete();
      rb=loc.getHandle().getBlock();
      bh=new BlockHolder(rb);
      if (plugin.gelManager.gelMap.containsKey(bh)) {
        bh=plugin.gelManager.gelMap.get(bh);
        plugin.gelManager.removeGel(bh);
      }
      plugin.portalManager.oldBlocks.put(loc,bh);
      if (plugin.config.CompactPortal) {
        rb.setType(Material.WOOL);
        rb.setData(color);
      }
 else {
        rb.setTypeId(plugin.config.FillPortalBack);
      }
      plugin.portalManager.behindBlocks.put(loc,this);
    }
  }
  if (getDestination() == null)   close();
 else {
    open();
    if (getDestination().isRegionPortal())     plugin.regionManager.getRegion(centerBlock).regionPortalOpened(orange);
 else     getDestination().open();
  }
  if (isRegionPortal())   plugin.regionManager.getRegion(centerBlock).regionPortalCreated(orange);
  V10Location oloc;
  V10Location loc;
  int i;
  oloc=inside[0].clone();
  plugin.portalManager.insideBlocks.put(inside[0],this);
  if (inside[1] != null)   plugin.portalManager.insideBlocks.put(inside[1],this);
  if (horizontal) {
    for (int y=-1; y < 2; y++) {
      if (y != 0) {
        loc=new V10Location(oloc.world,oloc.x,oloc.y + y,oloc.z);
        plugin.portalManager.awayBlocksY.put(loc,this);
        if (y < 1)         i=0;
 else         i=1;
        awayBlocksY[i]=loc;
      }
      for (int x=-1; x < 2; x++) {
        for (int z=-1; z < 2; z++) {
          loc=new V10Location(oloc.world,oloc.x + x,oloc.y + y,oloc.z + z);
          plugin.portalManager.awayBlocks.put(loc,this);
          awayBlocks.add(loc);
        }
      }
    }
  }
}