Generate the closing part
176904
def end(self):
        """"""
        for depth in xrange(len(self.names) - 1, -1, -1):
            self.out_f.write('{0}}}\n'.format(self.prefix(depth)))
683376
def _compile_and_collapse(self):
        """"""
        self._real_regex = self._real_re_compile(*self._regex_args,
                                                 **self._regex_kwargs)
        for attr in self._regex_attributes_to_copy:
            setattr(self, attr, getattr(self._real_regex, attr))
691834
private void completeEnclosing(ClassSymbol c) {
        if (c.owner.kind == PCK) {
            Symbol owner = c.owner;
            for (Name name : Convert.enclosingCandidates(Convert.shortName(c.name))) {
                Symbol encl = owner.members().lookup(name).sym;
                if (encl == null)
                    encl = classes.get(TypeSymbol.formFlatName(name, owner));
                if (encl != null)
                    encl.complete();
            }
        }
    }
498292
def finish(self):
        
        self.lines.reverse()
        self._content = '\n'.join(self.lines)
        self.lines = None
1057075
@Override
  void leaveEnclosingElement() throws IOException {
    depthCounter.decLevel();
    if(tagQ.size() == 0)
      throw new IOException("Tried to exit non-existent enclosing element " +
                "in EditLog file");

    EditsElement element = tagQ.pop();
    printIndents();
    write("</" + element.toString() + ">\n");
  }
601380
private Frame closeFrame(Key key, String[] names, String[][] domains, Futures fs) {
    if( _output_types == null ) return null;
    final int noutputs = _output_types.length;
    Vec[] vecs = new Vec[noutputs];
    if( _appendables==null || _appendables.length == 0)  // Zero rows?
      for( int i = 0; i < noutputs; i++ )
        vecs[i] = _fr.anyVec().makeZero();
    else {
      int rowLayout = _appendables[0].compute_rowLayout();
      for( int i = 0; i < noutputs; i++ ) {
        _appendables[i].setDomain(domains==null ? null : domains[i]);
        vecs[i] = _appendables[i].close(rowLayout,fs);
      }
    }
    return new Frame(key,names,vecs);
  }
312725
function writeNode(node, c, end) {
      var toYield = [];
      forEach(simplifyDOM(node, end), function(part) {
        toYield.push(insertPart(part));
      });
      return yield(toYield.join(""), c);
    }
1274220
def _generate_splice(self, slice_ind):
        '''
        
        '''
        step_size = slice_ind.step if slice_ind.step else 1
        # Check for each of the four possible scenarios
        if slice_ind.start != None:
            if slice_ind.stop != None:
                newListLen = ((get_non_negative_index(slice_ind.stop, self._length) -
                               get_non_negative_index(slice_ind.start, self._length)) // step_size)
            else:
                newListLen = ((self._length -
                               get_non_negative_index(slice_ind.start, self._length)) // step_size)
        else:
            if slice_ind.stop != None:
                newListLen = ((get_non_negative_index(slice_ind.stop, self._length)) // step_size)
            else:
                newListLen = (self._length // step_size)

        return ZeroList(newListLen)
1322011
@SuppressWarnings("unchecked")
    public T finish() throws IOException
    {
        if (_open) {
            _closeChild();
            _open = false;
            if (_closeGenerator) {
                _generator.close();
            } else if (Feature.FLUSH_AFTER_WRITE_VALUE.isEnabled(_features)) {
                _generator.flush();
            }
        }
        if (_result == null) {
            Object x;
            if (_stringWriter != null) {
                x = _stringWriter.getAndClear();
                _stringWriter = null;
            } else if (_byteWriter != null) {
                x = _byteWriter.toByteArray();
                _byteWriter = null;
            } else {
                x = _generator.getOutputTarget();
            }
            _result = (T) x;
        }
        return _result;
    }
796629
private static StringBuffer doAppendClosingTag(StringBuffer buffer, String tag)
	{
		buffer.append(SEQUENCE__TAG__BEGIN_CLOSING_TAG).append(tag).append(SEQUENCE__TAG__END_OF_TAG);
		return buffer;
	}
570642
private void generateOnShutdown(String dataSourceNameClazz) {
		MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("shutdown").addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).returns(Void.TYPE);

		methodBuilder.addJavadoc("<p>Close database.</p>\n");
		methodBuilder.addJavadoc("\n");
		methodBuilder.addJavadoc("@see android.content.ContentProvider#shutdown()\n");

		methodBuilder.addStatement("super.shutdown()");
		methodBuilder.addStatement("dataSource.close()");

		classBuilder.addMethod(methodBuilder.build());
	}
1360667
def end_output (self, **kwargs):
        """"""
        self.write_edges()
        self.end_graph()
        if self.has_part("outro"):
            self.write_outro()
        self.close_fileoutput()
57832
def write_close(self, code=None):
        '''
        '''
        return self.write(self.parser.close(code), opcode=0x8, encode=False)
792068
function writeAndCloseOpenState(isClosed) {
    var isShouldClose = true;

    if (state.tag) {
        var isRoot = isRootNode();

        if (isHelperTag(state.tag)) { // helper case
            helperOpen(state.tag, state.attributes);
            isShouldClose = isClosed;
        } else if (isTagBinded(state.tag)) {
            binderOpen(state.tag, state.attributes);
            isShouldClose = isClosed;
        } else if (isClosed || _options.voidRequireTags.indexOf(state.tag) !== -1) { // void mode
            writeCommand(Command.elementVoid, state.tag, state.attributes, isRoot);
            nestingLevelInfo.level--;
            isShouldClose = false;
        } else if (state.tag !== _options.evaluate.name) { // standard mode
            writeCommand(Command.elementOpen, state.tag, state.attributes, isRoot);
        } // if we write code, do nothing

        nestingLevelInfo.level++;
    }

    // clear builder state for next tag
    state.tag = null;
    state.attributes = {};

    return isShouldClose; // should we close this tag: no if we have void element
}
845174
def end(self):
        """"""
        # Close export modules
        for e in self._exports:
            self._exports[e].exit()
        # Close plugins
        for p in self._plugins:
            self._plugins[p].exit()
1186812
private function beforeClose()
    {
        if ($this->isWritable() && $this->lastLine !== '') {
            $this->stream->write("\r\n");
            $this->lastLine = '';
        }
    }
394621
function() {
		// Call the base contructor.
		this.base();

		/**
		 * The characters to be used for each indentation step.
		 *
		 *		// Use tab for indentation.
		 *		editorInstance.dataProcessor.writer.indentationChars = '\t';
		 */
		this.indentationChars = '\t';

		/**
		 * The characters to be used to close "self-closing" elements, like `<br>` or `<img>`.
		 *
		 *		// Use HTML4 notation for self-closing elements.
		 *		editorInstance.dataProcessor.writer.selfClosingEnd = '>';
		 */
		this.selfClosingEnd = ' />';

		/**
		 * The characters to be used for line breaks.
		 *
		 *		// Use CRLF for line breaks.
		 *		editorInstance.dataProcessor.writer.lineBreakChars = '\r\n';
		 */
		this.lineBreakChars = '\n';

		this.sortAttributes = 1;

		this._.indent = 0;
		this._.indentation = '';
		// Indicate preformatted block context status. (#5789)
		this._.inPre = 0;
		this._.rules = {};

		var dtd = CKEDITOR.dtd;

		for ( var e in CKEDITOR.tools.extend( {}, dtd.$nonBodyContent, dtd.$block, dtd.$listItem, dtd.$tableContent ) ) {
			this.setRules( e, {
				indent: !dtd[ e ][ '#' ],
				breakBeforeOpen: 1,
				breakBeforeClose: !dtd[ e ][ '#' ],
				breakAfterClose: 1,
				needsSpace: ( e in dtd.$block ) && !( e in { li: 1, dt: 1, dd: 1 } )
			} );
		}

		this.setRules( 'br', { breakAfterOpen: 1 } );

		this.setRules( 'title', {
			indent: 0,
			breakAfterOpen: 0
		} );

		this.setRules( 'style', {
			indent: 0,
			breakBeforeClose: 1
		} );

		this.setRules( 'pre', {
			breakAfterOpen: 1, // Keep line break after the opening tag
			indent: 0 // Disable indentation on <pre>.
		} );
	}