This is for legacy connector.
488622
public boolean writeRow(Object row[], CSVWriter writer, boolean skipinternal,
            BinaryEncoding binaryEncoding, SimpleDateFormat dateFormatter) {

        int firstfield = getFirstField(skipinternal);
        try {
            String[] fields = new String[m_tableSchema.size() - firstfield];
            for (int i = firstfield; i < m_tableSchema.size(); i++) {
                if (row[i] == null) {
                    fields[i - firstfield] = "NULL";
                } else if (m_tableSchema.get(i) == VoltType.VARBINARY && binaryEncoding != null) {
                    if (binaryEncoding == BinaryEncoding.HEX) {
                        fields[i - firstfield] = Encoder.hexEncode((byte[]) row[i]);
                    } else {
                        fields[i - firstfield] = Encoder.base64Encode((byte[]) row[i]);
                    }
                } else if (m_tableSchema.get(i) == VoltType.STRING) {
                    fields[i - firstfield] = (String) row[i];
                } else if (m_tableSchema.get(i) == VoltType.TIMESTAMP && dateFormatter != null) {
                    TimestampType timestamp = (TimestampType) row[i];
                    fields[i - firstfield] = dateFormatter.format(timestamp.asApproximateJavaDate());
                } else {
                    fields[i - firstfield] = row[i].toString();
                }
            }
            writer.writeNext(fields);
        } catch (Exception x) {
            x.printStackTrace();
            return false;
        }
        return true;
    }
165540
def _legacy_bpf_pointer(tcpdump_lines):
    """"""
    X86_64 = os.uname()[4] in ['x86_64', 'aarch64']
    size = int(tcpdump_lines[0])
    bpf = b""
    for l in tcpdump_lines[1:]:
        if six.PY2:
            int_type = long  # noqa: F821
        else:
            int_type = int
        bpf += struct.pack("HBBI", *map(int_type, l.split()))

    # Thanks to http://www.netprojects.de/scapy-with-pypy-solved/ for the pypy trick  # noqa: E501
    if conf.use_pypy:
        str_buffer = ctypes.create_string_buffer(bpf)
        return struct.pack('HL', size, ctypes.addressof(str_buffer))
    else:
        # XXX. Argl! We need to give the kernel a pointer on the BPF,
        # Python object header seems to be 20 bytes. 36 bytes for x86 64bits arch.  # noqa: E501
        if X86_64:
            return struct.pack("HL", size, id(bpf) + 36)
        else:
            return struct.pack("HI", size, id(bpf) + 20)
84592
function ANSIState(legacy) {

    var feed = '',
        last_match = '',
        stream_match = [],
        _this = this;

    PassThrough.call(this);

    this.attrs = {};
    this.reset();
    this.is_reset = false;
    this.setEncoding('utf8');

    this.on('data', function(chunk) {
        feed += chunk;
        if (feed.indexOf('\033') === -1) {
            feed = '';
        } else {
            stream_match = feed.match(color_regex);
            if (stream_match.length > 0) {
                last_match = stream_match[stream_match.length - 1];
                feed = feed.slice(feed.lastIndexOf(last_match) + last_match.length);
                _this.updateWithArray(stream_match);
            }
        }
    });

    if (legacy !== undefined) {
        this.update(legacy);
    }
}
184160
def connect
      unless @connected
        once('report_version', ->() do
          once('firmware_query', ->() do
            once('capability_query', ->() do
              once('analog_mapping_query', ->() do

                2.times { |i| toggle_pin_reporting(i) }

                @connected = true
                emit('ready')
              end)
              query_analog_mapping
           end)
            query_capabilities
          end)
        end)

         until connected?
          read_and_process
          delay(0.5)
        end
      end

      self
    end
249719
function legacyify(record) {
    var clone = record.clone();
    clone.isUnique = false;
    clone.ttl = 10;
    return clone;
  }
402398
private static void setLegacy(String moduleName, String legacyParamName) {
        String oldValue = g_legacyToModuleMap.put(legacyParamName, moduleName);
        if (oldValue != null) {
            logger.warn("Legacy parameter name used twice: {}", legacyParamName);
        }
    }
1110081
function connector(data, options, dataView) {
  dataView.dataType = HIERARCHY;
  const children = options && options.children ? options.children : null;

  if (children && !isFunction(children)) {
    throw new TypeError('Invalid children: must be a function!');
  }

  if (!options.pureData) {
    dataView.rows = dataView.root = hierarchy(data, children);
  } else {
    dataView.rows = dataView.root = data;
  }
  return data;
}
272172
private List<io.motown.domain.api.chargingstation.Connector> convertViewModelConnectorsToDomain(Set<Connector> connectors) {
        List<io.motown.domain.api.chargingstation.Connector> resultList = new ArrayList<>(connectors.size());

        for (Connector connector : connectors) {
            resultList.add(new io.motown.domain.api.chargingstation.Connector(connector.getMaxAmp(), connector.getPhase(), connector.getVoltage(),
                    connector.getChargingProtocol(), connector.getCurrent(), connector.getConnectorType()));
        }

        return resultList;
    }
685947
private Connector getConnectorById(Evse evse, Long id) {
        return getConnectorById(evse, id, true);
    }
298276
def handle_legacy_tloc(line: str, position: int, tokens: ParseResults) -> ParseResults:
    """"""
    log.log(5, 'legacy translocation statement: %s [%d]', line, position)
    return tokens
691916
def make_legacy_input_and_empty_witness(outpoint, stack_script,
                                        redeem_script, sequence):
    '''
    
    '''
    return (make_legacy_input(outpoint=outpoint,
                              stack_script=stack_script,
                              redeem_script=redeem_script,
                              sequence=sequence),
            make_empty_witness())
434817
function wrapper(matcherName, legacyMatcher){
      return function(util, customEqualityTesters){
        return { 
          compare: function(actual, expected){
            var scope = {actual: actual}, message, result;
            
            result = legacyMatcher.call(scope, expected)
            
            message = scope.message && scope.message()[result ? 1 : 0];
            return {
              pass:result,
              message : message
            }
          }
        }
      }
    }
966798
def is_legacy_server():
    '''
    '''
    with Session() as session:
        ret = session.Kernel.hello()
    bai_version = ret['version']
    legacy = True if bai_version <= 'v4.20181215' else False
    return legacy
776770
def connect(self, signal, slot):
        
        super(XViewDispatch, self).connect(self, SIGNAL(signal), slot)
39363
public Connector getConnector(Long chargingStationTypeId, Long evseId, Long id) {
        ChargingStationType chargingStationType = chargingStationTypeRepository.findOne(chargingStationTypeId);
        Evse evse = getEvseById(chargingStationType, evseId);

        return getConnectorById(evse, id);
    }
807304
def connect(self):
        """"""
        try:
            for group in ('inlets', 'receivers', 'outlets', 'senders'):
                self._connect_subgroup(group)
        except BaseException:
            objecttools.augment_excmessage(
                'While trying to build the node connection of the `%s` '
                'sequences of the model handled by element `%s`'
                % (group[:-1], objecttools.devicename(self)))
642607
def execute_legacy(self, sock_info, generator, write_concern):
        
        coll = self.collection
        full_result = {
            "writeErrors": [],
            "writeConcernErrors": [],
            "nInserted": 0,
            "nUpserted": 0,
            "nMatched": 0,
            "nRemoved": 0,
            "upserted": [],
        }
        op_id = _randint()
        stop = False
        for run in generator:
            for idx, operation in enumerate(run.ops):
                try:
                    # To do per-operation reporting we have to do ops one
                    # at a time. That means the performance of bulk insert
                    # will be slower here than calling Collection.insert()
                    if run.op_type == _INSERT:
                        coll._insert(sock_info,
                                     operation,
                                     self.ordered,
                                     write_concern=write_concern,
                                     op_id=op_id)
                        result = {}
                    elif run.op_type == _UPDATE:
                        doc = operation['u']
                        check_keys = True
                        if doc and next(iter(doc)).startswith('$'):
                            check_keys = False
                        result = coll._update(sock_info,
                                              operation['q'],
                                              doc,
                                              operation['upsert'],
                                              check_keys,
                                              operation['multi'],
                                              write_concern=write_concern,
                                              op_id=op_id,
                                              ordered=self.ordered)
                    else:
                        result = coll._delete(sock_info,
                                              operation['q'],
                                              not operation['limit'],
                                              write_concern,
                                              op_id,
                                              self.ordered)
                    _merge_legacy(run, full_result, result, idx)
                except DocumentTooLarge as exc:
                    # MongoDB 2.6 uses error code 2 for "too large".
                    error = _make_error(
                        run.index(idx), _BAD_VALUE, str(exc), operation)
                    full_result['writeErrors'].append(error)
                    if self.ordered:
                        stop = True
                        break
                except OperationFailure as exc:
                    if not exc.details:
                        # Some error not related to the write operation
                        # (e.g. kerberos failure). Re-raise immediately.
                        raise
                    _merge_legacy(run, full_result, exc.details, idx)
                    # We're supposed to continue if errors are
                    # at the write concern level (e.g. wtimeout)
                    if self.ordered and full_result["writeErrors"]:
                        stop = True
                        break
            if stop:
                break

        if full_result["writeErrors"] or full_result['writeConcernErrors']:
            if full_result['writeErrors']:
                full_result['writeErrors'].sort(
                    key=lambda error: error['index'])
            raise BulkWriteError(full_result)
        return full_result