implementation of bond removing
540286
def delete_bond(self, n, m):
        
        self.remove_edge(n, m)
        self.flush_cache()
242723
private IRingSet removeExtraRings(IAtomContainer m) {

        try {
            IRingSet rs = Cycles.sssr(m).toRingSet();

            //remove rings which dont have all aromatic atoms (according to hybridization set by lower case symbols in smiles):

            //logger.debug("numrings="+rs.size());

            iloop: for (int i = 0; i <= rs.getAtomContainerCount() - 1; i++) {

                IRing r = (IRing) rs.getAtomContainer(i);

                if (r.getAtomCount() > 7 || r.getAtomCount() < 5) {
                    rs.removeAtomContainer(i);
                    i--; // go back to first one
                    continue iloop;
                }

                //int NonSP2Count = 0;

                for (int j = 0; j <= r.getAtomCount() - 1; j++) {

                    //logger.debug(j+"\t"+r.getAtomAt(j).getSymbol()+"\t"+r.getAtomAt(j).getHybridization());

                    if (r.getAtom(j).getHybridization() == CDKConstants.UNSET
                            || !(r.getAtom(j).getHybridization() == Hybridization.SP2 || r.getAtom(j)
                                    .getHybridization() == Hybridization.PLANAR3)) {
                        rs.removeAtomContainer(i);
                        i--; // go back
                        continue iloop;
                        //                        NonSP2Count++;
                        //                        if (r.getAtom(j).getSymbol().equals("C")) {
                        //                            rs.removeAtomContainer(i);
                        //                            i--; // go back
                        //                            continue iloop;
                        //                        }
                    }
                }

                //                if (NonSP2Count > 1) {
                //                    rs.removeAtomContainer(i);
                //                    i--; // go back
                //                    continue iloop;
                //                }

            }
            return rs;

        } catch (Exception e) {
            return m.getBuilder().newInstance(IRingSet.class);
        }
    }
832789
protected void cleanup() {
    // Clean-up global list of temporary vectors
    Futures fs = new Futures();
    cleanupTrash(_gVecTrash, fs);
    cleanupTrash(_lVecTrash, fs);
    fs.blockForPending();
  }
503791
void cleanChain()
  {

    if (tc.isEntryEnabled())
      tc.entry(this,cclass, "cleanChain");

    for (PartialMatch p = this; p.next != null; )
      if (p.next.isEmpty())
        p.next = p.next.next;
      else
        p = p.next;

    if (tc.isEntryEnabled())
      tc.exit(this,cclass, "cleanChain");
  }
593067
def _cleanup(self):
        '''
        
        '''
        self._declare_cb = None
        self._delete_cb = None
        super(ExchangeClass, self)._cleanup()
744869
function eliminateHole (data, holeNode, outerNode) {
  outerNode = findHoleBridge(data, holeNode, outerNode)
  if (outerNode) {
    var b = splitPolygon(outerNode, holeNode)
    filterPoints(data, b, b.next)
  }
}
810488
private static IAtom findPiBondedOxygen(IAtomContainer container, IAtom atom) {
        for (IBond bond : container.getConnectedBondsList(atom)) {
            if (bond.getOrder() == IBond.Order.DOUBLE) {
                IAtom neighbor = bond.getOther(atom);
                int charge = neighbor.getFormalCharge() == null ? 0 : neighbor.getFormalCharge();
                if (neighbor.getAtomicNumber() == 8 && charge == 0) return neighbor;
            }
        }
        return null;
    }
647685
function removeEdge(u, v){
    if(edges[u]){
      edges[u] = adjacent(u).filter(function (_v){
        return _v !== v;
      });
    }
    return graph;
  }
1231181
def dead_code_elimination(graph, du, ud):
    
    for node in graph.rpo:
        for i, ins in node.get_loc_with_ins():
            reg = ins.get_lhs()
            if reg is not None:
                # If the definition is not used, we check that the instruction
                # has no side effect. If there is one and this is a call, we
                # remove only the unused defined variable. else, this is
                # something like an array access, so we do nothing.
                # Otherwise (no side effect) we can remove the instruction from
                # the node.
                if (reg, i) not in du:
                    if ins.is_call():
                        ins.remove_defined_var()
                    elif ins.has_side_effect():
                        continue
                    else:
                        # We can delete the instruction. First update the DU
                        # chain of the variables used by the instruction to
                        # `let them know` that they are not used anymore by the
                        # deleted instruction.
                        # Then remove the instruction.
                        update_chain(graph, i, du, ud)
                        graph.remove_ins(i)
61758
public void cleanDatabase() {
        lockingMechanism.writeLock().lock();
        try {
            for (ODocument edge : graph.browseEdges()) {
                edge.delete();
            }
            for (ODocument node : graph.browseVertices()) {
                node.delete();
            }
        } finally {
            lockingMechanism.writeLock().unlock();
        }
    }
1102715
public function clean()
    {
        $this->removeAddenda();
        $this->removeIncompleteSchemaLocations();
        $this->removeNonSatNSNodes();
        $this->removeNonSatNSschemaLocations();
        $this->removeUnusedNamespaces();
    }
1231111
def select_connected_bonds():
    ''''''
    s = current_system()
    start, end = s.bonds.transpose()
    selected = np.zeros(s.n_bonds, 'bool')
    for i in selected_atoms():
        selected |= (i == start) | (i == end)

    csel = current_selection()
    bsel = csel['bonds'].add(
        Selection(selected.nonzero()[0], s.n_bonds))
    
    ret = csel.copy()
    ret['bonds'] = bsel

    return select_selection(ret)
978767
public void simplify()
  {
    // remove all addresses from the cc and bcc that are in the to address set.
    ccSet.removeAll(toSet);
    bccSet.removeAll(toSet);

    // remove all address from the bcc set that are in the cc set.
    bccSet.removeAll(ccSet);
  }
1034904
def additional_cleanup(self):
        """"""

        cmd.remove('not alt ""+A')  # Remove alternate conformations
        cmd.hide('labels', 'Interactions')  # Hide labels of lines
        cmd.disable('%sCartoon' % self.protname)
        cmd.hide('everything', 'hydrogens')
188885
private static boolean isPlanarSigmaBond(IBond bond) {
        return bond != null &&
                IBond.Order.SINGLE.equals(bond.getOrder()) &&
                IBond.Stereo.NONE.equals(bond.getStereo());
    }
250047
def remove_edges_from(self, ebunch):
        
        for e in ebunch:
            (u, v) = e[:2]
            if u in self.succ and v in self.succ[u]:
                del self.succ[u][v]
923410
public void removeDuplicateRules() {
        int prod1, prod2;
        int[] tmp1, tmp2;

        for (prod1 = getProductionCount() - 1; prod1 >= 0; prod1--) {
            tmp1 = getProduction(prod1);
            for (prod2 = prod1 - 1; prod2 >= 0; prod2--) {
                tmp2 = getProduction(prod2);
                if (tmp1[0] == tmp2[0]) {
                    if (equal(tmp1, tmp2)) {
                        removeProduction(prod1);
                        break;
                    }
                }
            }
        }
    }