code: private boolean hasBulge(Ladder l1, Ladder l2) {
  
  		boolean bulge = ((l1.btype.equals(l2.btype)) &&
  				(l2.from - l1.to < 6) &&
  				(l1.to < l2.from) &&
  				(l2.connectedTo == 0));
  
  		if (!bulge) return bulge;
  
  		switch(l1.btype){
  		case parallel:
  			bulge = ( (l2.lfrom - l1.lto > 0) &&
  					((( l2.lfrom -l1.lto < 6) &&
  							(l2.from - l1.to < 3)) ||
  							( l2.lfrom - l1.lto <3)));
  
  			break;
  
  		case antiparallel:
  			bulge = ( (l1.lfrom - l2.lto > 0) &&
  					(((l1.lfrom -l2.lto < 6) &&
  							( l2.from - l1.to < 3)) ||
  							(l1.lfrom - l2.lto < 3)));
  
  			break;
  		}
  
  		return bulge;
  	}
docs: For beta structures, we define explicitly: a bulge-linked
  ladder consists of two (perfect) ladder or bridges of the
  same type connected by at most one extra residue on one
  strand and at most four extra residues on the other strand,
  all residues in bulge-linked ladders are marked "E,"
  including the extra residues.