and then all the rest is not removed because of the "gap"
421387
protected boolean verifyCondition1(IContextMapping<INode> mapping, IMappingElement<INode> e) {
        return findRelation(IMappingElement.LESS_GENERAL, e.getSource().getAncestors(), e.getTarget(), mapping) ||
                findRelation(IMappingElement.EQUIVALENCE, e.getSource().getAncestors(), e.getTarget(), mapping) ||

                findRelation(IMappingElement.LESS_GENERAL, e.getSource(), e.getTarget().getDescendants(), mapping) ||
                findRelation(IMappingElement.EQUIVALENCE, e.getSource(), e.getTarget().getDescendants(), mapping) ||

                findRelation(IMappingElement.LESS_GENERAL, e.getSource().getAncestors(), e.getTarget().getDescendants(), mapping) ||
                findRelation(IMappingElement.EQUIVALENCE, e.getSource().getAncestors(), e.getTarget().getDescendants(), mapping);
    }
157847
function(){
		if(this.position<this.initpos){ this.broken = true;}
		for(var i=this.history.length-1;i>=this.position;i--){ this.history.pop();}
		this.position = this.history.length;
		this.chainflag = false;
	}
803881
def calc_pident_ignore_gaps(a, b):
    
    m = 0 # matches
    mm = 0 # mismatches
    for A, B in zip(list(a), list(b)):
        if A == '-' or A == '.' or B == '-' or B == '.':
            continue
        if A == B:
            m += 1
        else:
            mm += 1
    try:
        return float(float(m)/float((m + mm))) * 100
    except:
        return 0
1207396
private boolean insertGap() throws StructureException,
			RefinerFailedException {

		// Let gaps only if the repeat is larger than the minimum length
		if (repeatCore <= Lmin)
			return false;

		// Select residue by maximum distance
		updateMultipleAlignment();
		Matrix residueDistances = MultipleAlignmentTools
				.getAverageResidueDistances(msa);

		double maxDist = Double.MIN_VALUE;
		int su = 0;
		int res = 0;
		for (int col = 0; col < length; col++) {
			for (int s = 0; s < order; s++) {
				if (residueDistances.get(s, col) != -1) {
					if (residueDistances.get(s, col) > maxDist) {
						// geometric distribution
						if (rnd.nextDouble() > 0.5) {
							su = s;
							res = col;
							maxDist = residueDistances.get(s, col);
						}
					}
				}
			}
		}

		// Insert the gap at the position
		Integer residueL = block.get(su).get(res);
		if (residueL != null) {
			freePool.add(residueL);
			Collections.sort(freePool);
		} else
			return false; // If there was a gap already in the position.

		block.get(su).set(res, null);
		checkGaps();
		return true;
	}
155649
function Gap (Glide, Components) {
  return {
    /**
     * Modifies passed translate value with number in the `gap` settings.
     *
     * @param  {Number} translate
     * @return {Number}
     */
    modify: function modify(translate) {
      return translate + Components.Gaps.value * Glide.index;
    }
  };
}
1207216
def _fill_gaps(tr):
    
    tr = tr.split()
    gaps = tr.get_gaps()
    tr = tr.detrend().merge(fill_value=0)[0]
    gaps = [{'starttime': gap[4], 'endtime': gap[5]} for gap in gaps]
    return gaps, tr
796052
public boolean setMargins(float marginLeft, float marginRight, float marginTop, float marginBottom) {
        if (writer != null && writer.isPaused()) {
            return false;
        }
        nextMarginLeft = marginLeft;
        nextMarginRight = marginRight;
        nextMarginTop = marginTop;
        nextMarginBottom = marginBottom;
        return true;
    }
1219946
synchronized void clearOutstanding() {
        if (m_outstandingWork.isEmpty() && (m_outstandingWorkCount.get() == 0)) {
            return;
        }

        rejoinLog.trace("Clearing outstanding work.");

        for (Entry<Integer, SendWork> e : m_outstandingWork.entrySet()) {
            e.getValue().discard();
        }
        m_outstandingWork.clear();
        m_outstandingWorkCount.set(0);
    }
1177291
def _tidy(self) -> None:
        
        if self.no_overlap:
            self.remove_overlap(self.no_contiguous)  # will sort
        else:
            self._sort()
638512
protected void trimLeadingWhiteSpaces()
    {
        if (shouldRemoveWhiteSpaces() && getContent().length() > 0) {
            String result = trimLeadingWhiteSpaces(getContent());
            getContent().setLength(0);
            getContent().append(result);
        }
    }
1301690
private void addMissingBlanks(final int index) {
		final int count = index - this.list.size();
		for (int i = 0; i < count; i++)
			this.list.add(this.blankElement);
	}

	/** Postcondition: this.list.get(this.list.size()-1) != blankElement */
	private void removeTrail() {
		int last = this.list.size() - 1;
		while (last >= 0 && this.list.get(last) == this.blankElement) {
			this.list.remove(last);
			last = this.list.size() - 1;
		}
	}

    /**
     * @return the capacity of the full list
     */
    public int capacity() {
		if (this.capacity < this.list.size())
			this.capacity = this.list.size();

		return this.capacity;
    }
}
709510
function() {
		var me = this;
		if (me.margins) {
			me.paddingLeft = Math.max(me.paddingLeft - me.margins.left, 0);
			me.paddingTop = Math.max(me.paddingTop - me.margins.top, 0);
			me.paddingRight = Math.max(me.paddingRight - me.margins.right, 0);
			me.paddingBottom = Math.max(me.paddingBottom - me.margins.bottom, 0);
		}
	}
1116625
def gap_subset(self, interval: Interval,
                   flexibility: int = 2) -> "IntervalList":
        
        return self.gaps().subset(interval, flexibility)
778628
private void initDecorMargins() {
        if (DecorUtils.isCanHaveTransparentDecor()) {
            Views.getParams(views.appBar).height += DecorUtils.getStatusBarHeight(this);
        }
        DecorUtils.paddingForStatusBar(views.toolbar, true);
        DecorUtils.paddingForStatusBar(views.pagerToolbar, true);
        DecorUtils.paddingForStatusBar(views.fullImageToolbar, true);
        DecorUtils.paddingForNavBar(views.grid);
        DecorUtils.marginForNavBar(views.pagerTitle);
    }
132088
def gap_to_sorl(time_gap):
    
    quantity, unit = parse_ISO8601(time_gap)
    if unit[0] == "WEEKS":
        return "+{0}DAYS".format(quantity * 7)
    else:
        return "+{0}{1}".format(quantity, unit[0])
1079256
private void reconcile() {

    // If nonContiguousMsgIds is empty then nothing to reconcile.
    if (nonContiguousMsgIds.isEmpty()) {
      return;
    }

    // This happens when a passive is started after Active has moved on and
    // passive starts to see msgIDs starting from a number > 0.
    // Once the sync is completed, fast forward highestContiguousMsgId.
    // Post sync completion assuming platform will send all msgIds beyond highestContiguousMsgId.
    if (highestContiguousMsgId == -1L && isSyncCompleted) {
      Long min = nonContiguousMsgIds.last();
      LOGGER.info("Setting highestContiguousMsgId to {} from -1", min);
      highestContiguousMsgId = min;
      nonContiguousMsgIds.removeIf(msgId -> msgId <= min);
    }

    for (long msgId : nonContiguousMsgIds) {
      if (msgId <= highestContiguousMsgId) {
        nonContiguousMsgIds.remove(msgId);
      } else if (msgId > highestContiguousMsgId + 1) {
        break;
      } else {
        // the order is important..
        highestContiguousMsgId = msgId;
        nonContiguousMsgIds.remove(msgId);
      }
    }

  }
334800
def gaps(args):
    
    from jcvi.formats.sizes import agp
    from jcvi.formats.agp import mask, build

    p = OptionParser(gaps.__doc__)
    p.add_option("--split", default=False, action="store_true",
            help="Generate .split.fasta [default: %default]")
    p.set_mingap(default=100)
    p.set_cpus()
    opts, args = p.parse_args(args)

    if len(args) != 1:
        sys.exit(not p.print_help())

    inputfasta, = args
    mingap = opts.mingap
    split = opts.split
    prefix = inputfasta.rsplit(".", 1)[0]
    bedfile = prefix + ".gaps.bed"

    if need_update(inputfasta, bedfile):
        write_gaps_bed(inputfasta, prefix, mingap, opts.cpus)

    if split:
        splitfile = prefix + ".split.fasta"
        oagpfile = prefix + ".splitobject.agp"
        cagpfile = prefix + ".splitcomponent.agp"

        if need_update((inputfasta, bedfile), splitfile):

            sizesagpfile = agp([inputfasta])

            maskedagpfile = mask([sizesagpfile, bedfile, "--splitobject"])
            shutil.move(maskedagpfile, oagpfile)
            logging.debug("AGP file written to `{0}`.".format(oagpfile))

            maskedagpfile = mask([sizesagpfile, bedfile, "--splitcomponent"])
            shutil.move(maskedagpfile, cagpfile)
            logging.debug("AGP file written to `{0}`.".format(cagpfile))

            build([oagpfile, inputfasta, splitfile])
            os.remove(sizesagpfile)

        return splitfile, oagpfile, cagpfile