<commit_before>
var Zugmaschine = require('../utils/zugmaschine').Zugmaschine;

var Ticket = function(config){
  this.config = config;
};

Ticket.prototype.find = function(id, cb){

  var options =  zm.options;
  options.method = 'GET';
  options.path = '/api/v1/projects/' + id + '/tickets';

  zm.exec(options,function(data, err){
    cb(data || [],err);
  });

};

Ticket.prototype.findOne = function(id, pid, cb){

  var options =  zm.options;
  options.method = 'GET';
  options.path = '/api/v1/projects/' + pid + '/tickets' + id;

  zm.exec(options,function(data, err){
    cb(data,err);
  });

};

Ticket.prototype.findOne = function(id, pid, cb){

  var options =  zm.options;
  options.method = 'GET';
  options.path = '/api/v1/projects/' + pid +
                 '/tickets' + id;

  zm.exec(options,function(data, err){
    cb(data,err);
  });

};

Ticket.prototype.insert = function(ticket, pid, cb){

  var options =  zm.options;
  options.method = 'POST';
  options.path = '/api/v1/projects/' + pid +
                 '/tickets' + ticket.id;
  options.body = ticket;

  zm.exec(options,function(data, err){
    cb(data,err);
  });

};

Ticket.prototype.update = function(ticket, pid, cb){

  var options =  zm.options;
  options.method = 'PUT';
  options.path = '/api/v1/projects/' + pid +
                 '/tickets' + ticket.id;
  options.body = ticket;

  zm.exec(options,function(data, err){
    cb(data,err);
  });

};

exports.Ticket = Ticket;<commit_msg>Added missing zm<commit_after>
var Zugmaschine = require('../utils/zugmaschine').Zugmaschine;

var Ticket = function(config){
  this.config = config;
};

Ticket.prototype.find = function(id, cb){

  var zm = new Zugmaschine(this.config);
  var options =  zm.options;
  options.method = 'GET';
  options.path = '/api/v1/projects/' + id + '/tickets';

  zm.exec(options,function(data, err){
    cb(data || [],err);
  });

};

Ticket.prototype.findOne = function(id, pid, cb){

  var zm = new Zugmaschine(this.config);
  var options =  zm.options;
  options.method = 'GET';
  options.path = '/api/v1/projects/' + pid + '/tickets' + id;

  zm.exec(options,function(data, err){
    cb(data,err);
  });

};

Ticket.prototype.findOne = function(id, pid, cb){

  var zm = new Zugmaschine(this.config);
  var options =  zm.options;
  options.method = 'GET';
  options.path = '/api/v1/projects/' + pid +
                 '/tickets' + id;

  zm.exec(options,function(data, err){
    cb(data,err);
  });

};

Ticket.prototype.insert = function(ticket, pid, cb){

  var zm = new Zugmaschine(this.config);
  var options =  zm.options;
  options.method = 'POST';
  options.path = '/api/v1/projects/' + pid +
                 '/tickets' + ticket.id;
  options.body = ticket;

  zm.exec(options,function(data, err){
    cb(data,err);
  });

};

Ticket.prototype.update = function(ticket, pid, cb){

  var zm = new Zugmaschine(this.config);
  var options =  zm.options;
  options.method = 'PUT';
  options.path = '/api/v1/projects/' + pid +
                 '/tickets' + ticket.id;
  options.body = ticket;

  zm.exec(options,function(data, err){
    cb(data,err);
  });

};

exports.Ticket = Ticket;
{'fraction_non_alphanumeric': 0.1796577946768061, 'fraction_numerical': 0.0031685678073510772, 'mean_word_length': 3.0319284802043422, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '181959', 'n_tokens_mistral': 1161, 'n_tokens_neox': 1141, 'n_words': 219}