DEV: will be called after a dissection is completed
765737
def dissection_done(self, pkt):
        """"""
        self.post_dissection(pkt)
        self.payload.dissection_done(pkt)
608777
def done(delay=nil)
        super(delay) do
          yield if block_given?
          EM.next_tick do
            run_em_hooks :amqp_after
            if AMQP.conn and not AMQP.closing
              AMQP.stop_connection do
                AMQP.cleanup_state
                finish_em_loop
              end
            else
              AMQP.cleanup_state
              finish_em_loop
            end
          end
        end
      end
1367758
def finish(self):
        """"""
        if self._finished:
            raise RuntimeError("finish() called twice.  May be caused "
                               "by using async operations without the "
                               "@asynchronous decorator.")
        if not hasattr(self, '_stream_queue') or not self._stream_queue:
            raise RuntimeError("`_stream_queue` was not assigned, you should"
                               "call `write_stream_queue` to set.")

        # === Replace `if not self._headers_written` === #
        self.set_status(200)
        self.set_header("Content-Type", "text/event-stream")
        self.set_header("Cache-Control", "no-cache")
        self.set_header("Access-Control-Allow-Origin", "*")
        # ============================================== #

        self.request.connection.set_close_callback(None)

        # === Add before self.flush === #
        # Reset buffer
        self._write_buffer = []
        self._headers_written = False
        # ============================= #

        self.flush(include_footers=True)

        # === Add after self.flush === #
        self._write_buffer = self._stream_queue
        self.request.connection._write_buffer = self._stream_queue
        # ============================ #

        self.request.finish()
        self._log()
        self._finished = True
        self.on_finish()
        # Break up a reference cycle between this handler and the
        # _ui_module closures to allow for faster GC on CPython.
        self.ui = None
421651
def finish(self):
        ''''''
        self.ibd.close()
        self._write_xml()
        self.xml.close()
601748
public void run(final StatusUpdate onStatus,
                    final Command onCompletion) {
        //Ensure active analysis is cancelled
        cancelExistingAnalysis();

        //If there are no checks to run simply return
        if (rechecks.isEmpty()) {
            if (onCompletion != null) {
                onCompletion.execute();
                return;
            }
        }

        checkRunner.run(rechecks,
                        onStatus,
                        onCompletion);
        rechecks.clear();
    }
650563
public void insertNodeAfter(Node insert, Node after, double split) {
        addChild(insert, children.indexOf(after) + 1, split);
        notifyStateChange();
    }
65791
@Override
    public void dissect(final Parsable<?> parsable, final String inputname) throws DissectionFailure {
        final ParsedField field = parsable.getParsableField(INPUT_TYPE, inputname);

        String fieldValue = field.getValue().getString();
        if (fieldValue == null || fieldValue.isEmpty()) {
            return; // Nothing to do here
        }

        UniqueIdRec record = decode(fieldValue);
        if (record == null) {
            return;
        }

        if (wantTime) {
            parsable.addDissection(inputname, "TIME.EPOCH",   "epoch",       record.timestamp);
        }
        if (wantIp) {
            parsable.addDissection(inputname, "IP",           "ip",          record.ipaddrStr);
        }
        if (wantProcessId) {
            parsable.addDissection(inputname, "PROCESSID",    "processid",   record.pid);
        }
        if (wantCounter) {
            parsable.addDissection(inputname, "COUNTER",      "counter",     record.counter);
        }
        if (wantThreadIndex) {
            parsable.addDissection(inputname, "THREAD_INDEX", "threadindex", record.threadIndex);
        }
    }
256081
def finish(self):
        """"""
        self.update(self.maxval)
        if self.signal_set:
            signal.signal(signal.SIGWINCH, signal.SIG_DFL)
1017657
function complete(e) {
    clearTimeout(doneTimeout);
    if (!done) { return; }
    var d = done;
    done = null;
    if (e) {
      // test failure
      if (!(e instanceof Error)) {
        e = new Error(e);
      }
      d(e);
    } else {
      // test passed
      d();
    }
  }
1088854
@Private
  @Override
  public void completed(final int pTaskletId, final TOutput result) {
    assert taskletId == pTaskletId;
    this.userResult = Optional.ofNullable(result);
    if (callbackHandler != null) {
      executor.execute(new Runnable() {
        @Override
        public void run() {
          callbackHandler.onSuccess(userResult.get());
        }
      });
    }
    this.countDownLatch.countDown();
  }
1250029
function _final() {
  var self = this;

  cluster.removeListener('fork', self._onFork);
  cluster.removeListener('disconnect', self._onDisconnect);
}
505598
function done(error) {
    if (error) {
      errors.push(error);
    }
    if (--initializing <= 0) {
      if (errors && errors.length) {
        var errorResult = new Error('Errors occurred during initialization.');
        errorResult.initializationErrors = errors;
        callback(errorResult);
      } else {
        processPostInitializeQueue(postInitializeQueue, callback);
      }
    }
  }
813188
def _finalize(self):
        """"""
        if self.status in ['running', 'halt']:
            if self.verbose > 0:
                print_('\nSampling finished normally.')
            self.status = 'ready'

        self.save_state()
        self.db._finalize()
461332
def finish(self):
        """"""
        self._my_map['over'] = True  # finished == over?
        self._my_map['completionTime'] = DateTime.utcnow()
        self._save()
306113
def done(self, result):
        """"""
        self._geometry = self.geometry()
        QtWidgets.QDialog.done(self, result)
994455
@Override
    public void dissect(final Parsable<?> parsable, final String inputname) throws DissectionFailure {
        final ParsedField field = parsable.getParsableField(INPUT_TYPE, inputname);

        String fieldValue = field.getValue().getString();
        if (fieldValue == null || fieldValue.isEmpty()) {
            return; // Nothing to do here
        }

        String[] allValues = fieldValue.split("&");

        for (String value : allValues) {
            int equalPos = value.indexOf('=');
            if (equalPos == -1) {
                if (!"".equals(value)) {
                    String name = value.toLowerCase();
                    if (wantAllFields || requestedParameters.contains(name)) {
                        parsable.addDissection(inputname, "STRING", name, "");
                    }
                }
            } else {
                String name = value.substring(0, equalPos).toLowerCase();
                if (wantAllFields || requestedParameters.contains(name)) {
                    try {
                        parsable.addDissection(inputname, "STRING", name,
                                resilientUrlDecode(value.substring(equalPos + 1, value.length())));
                    } catch (IllegalArgumentException e) {
                        // This usually means that there was invalid encoding in the line
                        throw new DissectionFailure(e.getMessage());
                    }
                }
            }
        }
    }
1053621
function (done, folder) {
		var that = this, 
				data = this.objects;
		
    if (Object.keys(data).length === 0) {
			this.load(folder);
		}	
		
		this.fixtureNames = Object.keys(data);
		backlogSet = this.dataToFixtures(data);
		
		this.obliterateDatabase()
			.then(function() {
				that._processBacklogRecursive(done, 1);
			})
			.catch(done);
	}