<commit_before>function alongXY(p1,p2, r) { 
  return [alongX(p1, p2, r), alongY(p1,p2,r)];
}

function alongX(p1, p2, r) {
  var dx, extents, value;
  dx = ((p2[0] - p1[0]) * r);
  value = p1[0] + dx;
  return value;
}

function alongY(p1, p2, r) {
  var dy, extents, value;
  dy = ((p2[1] - p1[1]) * r);
  value = p1[1] + dy;
  return value;
}

function svg_connector_linear(d) {
  var first = d[0], second = d[1];
  return "M " + first[0] + " L " + second[0] +
         " L " + second[1] + " L " + first[1] + " Z";
}

function svg_connector_linear_step(d) {
  var first = d[0], second = d[1];
  var breakpoint = 0.3;
  if( second[1][1] > first[0][1]) {
    breakpoint = 0.6;
  }
  return "M " + first[0] + 
    " H " + alongX(first[0], second[0], breakpoint) + 
    " V"  + alongY(first[0], second[0], 1) + 
    " H"  + alongX(first[0], second[0], 1) + 
    " L " + second[1] +  // second side straight line
    " H " + (alongX(second[1], first[1], breakpoint)) + 
    " V"  + alongY(second[1], first[1], 1) + 
    " L " + first[1] + " Z";
}<commit_msg>a comment<commit_after>function alongXY(p1,p2, r) { 
  return [alongX(p1, p2, r), alongY(p1,p2,r)];
}

function alongX(p1, p2, r) {
  var dx, extents, value;
  dx = ((p2[0] - p1[0]) * r);
  value = p1[0] + dx;
  return value;
}

function alongY(p1, p2, r) {
  var dy, extents, value;
  dy = ((p2[1] - p1[1]) * r);
  value = p1[1] + dy;
  return value;
}

function svg_connector_linear(d) {
  var first = d[0], second = d[1];
  return "M " + first[0] + " L " + second[0] +
         " L " + second[1] + " L " + first[1] + " Z";
}

function svg_connector_linear_step(d) {
  var first = d[0], second = d[1];
  var breakpoint = 0.3;
  if( second[1][1] > first[0][1]) {
    // switch break to prevent overlap
    breakpoint = 0.6;
  }
  return "M " + first[0] + 
    " H " + alongX(first[0], second[0], breakpoint) + 
    " V"  + alongY(first[0], second[0], 1) + 
    " H"  + alongX(first[0], second[0], 1) + 
    " L " + second[1] +  // second side straight line
    " H " + (alongX(second[1], first[1], breakpoint)) + 
    " V"  + alongY(second[1], first[1], 1) + 
    " L " + first[1] + " Z";
}
{'fraction_non_alphanumeric': 0.2151839776432231, 'fraction_numerical': 0.05030274802049371, 'mean_word_length': 2.8220640569395017, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1618230', 'n_tokens_mistral': 980, 'n_tokens_neox': 948, 'n_words': 218}