e.backtrack.first looks like this:
 ..../dnsmadeeasy/lib/dnsmadeeasy/api/client.rb:143:in `create_a_record'
331978
def method_signature(e, method)
      file, line, call_method = e.backtrace.first.split(':')
      call_method             = call_method.gsub(/[']/, '').split('`').last
      if call_method && call_method.to_sym == method.to_sym
        source_line = File.open(file).to_a[line.to_i - 1].chomp!
        if source_line =~ /def #{method}/
          signature = source_line.strip.gsub(/,/, '').split(%r{[ ()]})
          signature.shift # remove def
          return signature.reject { |a| a =~ /^([={}\)\(])*$/ }
        end
      end
      []
    rescue
      []
    end
22300
def get_record(self, domain, record):
        
        rec_id = utils.get_id(record)
        domain_id = utils.get_id(domain)
        uri = "/domains/%s/records/%s" % (domain_id, rec_id)
        resp, resp_body = self._retry_get(uri)
        resp_body["domain_id"] = domain_id
        return CloudDNSRecord(self, resp_body, loaded=False)
1192397
function maybeCreateAliasRecords(result, callback) {

      let records = result.records.ResourceRecordSets.filter(r=> r.Type === 'A').map(r=> r.Name)
      let stagingExists = records.includes(`staging.${domain}.`)
      let productionExists = records.includes(`${domain}.`)
      let skip = stagingExists && productionExists
      if (skip) {
        let records = result.records.ResourceRecordSets.filter(r=> r.Type === 'A')
        let staging = records.find(r=> r.Name === `staging.${domain}.`)
        let production = records.find(r=> r.Name === `${domain}.`)
        console.log(chalk.green.dim('✔ A Records'))
        console.log(chalk.grey(`          Production ${chalk.green.bold.underline(production.Name)}`))
        console.log(chalk.grey(`             Staging ${chalk.green.bold.underline(staging.Name)}`))
        callback()
      }
      else {

        let staging = result.apis.items.find(api=> api.domainName === `staging.${domain}`)
        let production = result.apis.items.find(api=> api.domainName === domain)
        route53.changeResourceRecordSets({
          ChangeBatch: {
            Changes: [{
              Action: 'UPSERT',
              ResourceRecordSet: {
                AliasTarget: {
                  DNSName: production.distributionDomainName,
                  EvaluateTargetHealth: false,
                  HostedZoneId: 'Z2FDTNDATAQYW2', /* ah, yes of course */
                },
                Name: domain,
                Type: "A"
              }
            },
            {
              Action: 'UPSERT',
              ResourceRecordSet: {
                AliasTarget: {
                  DNSName: staging.distributionDomainName,
                  EvaluateTargetHealth: false,
                  HostedZoneId: 'Z2FDTNDATAQYW2', /* ah, yes of course */
                },
                Name: `staging.${domain}`,
                Type: "A"
              }

            }],
            Comment: "defined by .arc @domain " + domain
          },
          HostedZoneId
        },
        function done(err) {
          if (err) callback(err)
          else {
            console.log(chalk.green.dim('✔ Created A Records'))
            callback()
          }
        })
      }
    }
1008510
def new(self, bytes_to_skip):
        # type: (int) -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('SP record already initialized!')

        self.bytes_to_skip = bytes_to_skip
        self._initialized = True
909437
def _new_url_record(cls, request: Request) -> URLRecord:
        ''''''
        url_record = URLRecord()

        url_record.url = request.url_info.url
        url_record.status = Status.in_progress
        url_record.try_count = 0
        url_record.level = 0

        return url_record
272462
def _create_record(self, rtype, name, content):
        
        result = False
        name = self._relative_name(name)
        ttl = None

        # TODO: shoud assert that this is an int
        if self.ttl:
            ttl = self.ttl

        with localzone.manage(self.filename, self.origin, autosave=True) as zone:
            if zone.add_record(name, rtype, content, ttl=ttl):  # pylint: disable=no-member
                result = True

        LOGGER.debug("create_record: %s", result)
        return result
783515
public static KEYRecord
buildRecord(Name name, int dclass, long ttl, int flags, int proto,
	    PublicKey key)
{
	byte alg;

	if (key instanceof RSAPublicKey) {
		alg = DNSSEC.RSAMD5;
	}
	else if (key instanceof DHPublicKey) {
		alg = DNSSEC.DH;
	}
	else if (key instanceof DSAPublicKey) {
		alg = DNSSEC.DSA;
	}
	else
		return null;

	return (KEYRecord) buildRecord(name, Type.KEY, dclass, ttl, flags,
				       proto, alg, key);
}
799617
def records(self, domain, params=None):
        ''' 
        '''
        params = update_params(params, {'domain': domain})
        return self.request('/v1/dns/records', params, 'GET')
1228810
def create_record(attribute_names = @attributes.keys)
      record_timestamps_hardcoded
      attributes_values = self.changes.values.map(&:last)

      row_hash = Hash[ [ self.changes.keys, attributes_values ].transpose ]
      new_id =  SecureRandom.hex
      @rows =   {"rows"=> [{
                            "insertId"=> Time.now.to_i.to_s,
                            "json"=> row_hash.merge("id"=> new_id)
                          }]
                }
      conn_cfg = self.class.connection_config
      result = BigBroda::TableData.create(conn_cfg[:project],
        conn_cfg[:database],
        self.class.table_name ,
        @rows )

      #raise result["error"]["errors"].map{|o| "[#{o['domain']}]: #{o['reason']} #{o['message']}" }.join(", ") if result["error"].present?
      #here we output the IN MEMORY id , because of the BQ latency
      self.id = new_id #||= new_id if self.class.primary_key

      @new_record = false
      id
    end
1337219
def save!(_options = {})
      return false if respond_to?(:destroyed?) && destroyed?

      options = { request_namespace => attributes }

      if new_record?
        method = :post
        req_path = api_url(options)
      else
        method = :put
        req_path = api_url(options) + "/#{id}"
      end

      response = @client.make_request!(req_path, method, options)

      handle_response(response)
      self
    end
1328094
function newRecordInstance (raw) {
    // return raw data
    if (this.query.args.raw) {
        return raw
    }
    // return new model instance
    else {
        return this.query.model.newInstance({
            model: this.query.model,
            plain: this.query.args.plain,
            raw: raw,
            session: this.query.session,
        })
    }
}
361174
def forwards_func(apps, schema_editor):
    
    print("\n")
    create_count = 0
    BackupRun = apps.get_model("backup_app", "BackupRun")  # historical version of BackupRun
    backup_runs = BackupRun.objects.all()
    for backup_run in backup_runs:
        # Use the origin BackupRun model to get access to write_config()
        temp = OriginBackupRun(name=backup_run.name, backup_datetime=backup_run.backup_datetime)
        try:
            temp.write_config()
        except OSError as err:
            print("ERROR creating config file: %s" % err)
        else:
            create_count += 1
            # print("%r created." % config_path.path)
    print("%i config files created.\n" % create_count)
1204833
def _create_request_record(self, identifier, rtype, name, content, ttl, priority):  # pylint: disable=too-many-arguments
        """"""
        record = collections.OrderedDict()

        # Mandatory content

        # Just for update - not for creation
        if identifier is not None:
            record['id'] = identifier

        record['type'] = rtype

        # Just for creation - not for update
        if name is not None:
            record['name'] = self._relative_name(name)

        # Optional content
        if content is not None:
            record['content'] = content
        if ttl is not None:
            record['ttl'] = ttl
        if priority is not None:
            record['prio'] = priority
        return record
951983
def cli(env, zonefile, dry_run):
    """"""

    manager = SoftLayer.DNSManager(env.client)
    with open(zonefile) as zone_f:
        zone_contents = zone_f.read()

    zone, records, bad_lines = parse_zone_details(zone_contents)

    env.out("Parsed: zone=%s" % zone)
    for record in records:
        env.out("Parsed: %s" % RECORD_FMT.format(**record))

    for line in bad_lines:
        env.out("Unparsed: %s" % line)

    if dry_run:
        return

    # Find zone id or create the zone if it doesn't exist
    try:
        zone_id = helpers.resolve_id(manager.resolve_ids, zone,
                                     name='zone')
    except exceptions.CLIAbort:
        zone_id = manager.create_zone(zone)['id']
        env.out(click.style("Created: %s" % zone, fg='green'))

    # Attempt to create each record
    for record in records:
        try:
            manager.create_record(zone_id,
                                  record['record'],
                                  record['type'],
                                  record['data'],
                                  record['ttl'])

            env.out(click.style("Created: %s" % RECORD_FMT.format(**record),
                                fg='green'))
        except SoftLayer.SoftLayerAPIError as ex:
            env.out(click.style("Failed: %s" % RECORD_FMT.format(**record),
                                fg='red'))
            env.out(click.style(str(ex), fg='red'))

    env.out(click.style("Finished", fg='green'))
986029
def create
      return false unless new_record?
      run_callbacks :save do
        run_callbacks :create do
          httparty = self.class.post(self.class.index_path, request_options.merge(:body => to_json))
          handle_save_response(httparty)
        end
      end
    end
824084
@Trace(dispatcher = true)
	public Record createRecord(Long domainId, String name, String content, String type) throws GloboDnsException {
		NewRelic.setTransactionName(null, "/globodns/createRecord");
		if (domainId == null) {
			throw new GloboDnsException("Domain id cannot be null");
		}
		
		Record record = new Record();
		record.getGenericRecordAttributes().setDomainId(domainId);
		record.getGenericRecordAttributes().setName(name);
		record.getGenericRecordAttributes().setContent(content);
		record.getGenericRecordAttributes().setType(type.toUpperCase());
		
		GloboDnsRoot<Record> globoDnsRoot = this.post("/domains/" + domainId + "/records.json", record, false);
		if (globoDnsRoot == null) {
			throw new GloboDnsException("Invalid response");
		}
		return globoDnsRoot.getFirstObject();
	}
924018
def set_backtrace bt
      unless cause.nil?
        cause.backtrace.reverse.each do |line|
          if bt.last == line
            bt.pop
            next
          end
          break
        end
        bt.push "<<<CAUSED BY>>>: #{cause.class}: #{cause.message}"
        bt.concat cause.backtrace
      end
      super bt
    end