<commit_before>function hide_annotation_form(annoid) {
    $("#annotationform-"+annoid).hide();
    $("#annotations-"+annoid).show();
    $("#selectable-"+annoid).text(gettext("Annotate"));
    $("#annotationrealform-"+annoid)[0].reset();
    $("#editable-"+annoid).show();
    if(annotation_objects[annoid].annotation_count >0){
      $("#annotationtoolbox-"+annoid).show();
    }
}
$(function(){
    var options_bill = { 
         serviceUrl:'/bill/auto_complete/',
         minChars:2, 
         maxHeight:400,
         width:400,
         deferRequestBy: 100, //miliseconds
         onSelect: function(value, data, me){ 
            me.siblings("input[name$='bill_id']").val(data);
            me.siblings("input[type$='submit']").removeAttr('disabled'); },
         };

    var options_mk = { 
         serviceUrl:'/member/auto_complete/',
         minChars:0, 
         maxHeight:400,
         width:150,
         deferRequestBy: 100, //miliseconds
         };

    $('input.bill_input').autocomplete(options_bill);
    $('input.bill_input').keydown(function() { 
        $(this).siblings("input[name$='bill_id']").val('');
        $(this).siblings("input[type$='submit']").attr('disabled', 'disabled'); });
    $("input[name$='mk_name']").autocomplete(options_mk);

    $(".annotation-content").each(function(){
        var annoid = $(this).attr("id").split("-")[1];
        annotation_objects[annoid] = new Annotations(annoid);
    });
    for(var a in annotation_objects){
        annotation_objects[a].importQuotes();
        annotation_objects[a].insertQuotes();
    }
    $(".annotationform-link").live("click", function(e){
      e.preventDefault();
      if (!window.logged_in) {
          var msg = gettext("Sorry, only logged users can annotate.");
          $.jGrowl(msg, {sticky: true});
          return false
      }
      if (!window.permission) {
          var msg = $("#message_permission").html()<commit_msg>replace deprecated .live with .on<commit_after>function hide_annotation_form(annoid) {
    $("#annotationform-"+annoid).hide();
    $("#annotations-"+annoid).show();
    $("#selectable-"+annoid).text(gettext("Annotate"));
    $("#annotationrealform-"+annoid)[0].reset();
    $("#editable-"+annoid).show();
    if(annotation_objects[annoid].annotation_count >0){
      $("#annotationtoolbox-"+annoid).show();
    }
}
$(function(){
    var options_bill = { 
         serviceUrl:'/bill/auto_complete/',
         minChars:2, 
         maxHeight:400,
         width:400,
         deferRequestBy: 100, //miliseconds
         onSelect: function(value, data, me){ 
            me.siblings("input[name$='bill_id']").val(data);
            me.siblings("input[type$='submit']").removeAttr('disabled'); },
         };

    var options_mk = { 
         serviceUrl:'/member/auto_complete/',
         minChars:0, 
         maxHeight:400,
         width:150,
         deferRequestBy: 100, //miliseconds
         };

    $('input.bill_input').autocomplete(options_bill);
    $('input.bill_input').keydown(function() { 
        $(this).siblings("input[name$='bill_id']").val('');
        $(this).siblings("input[type$='submit']").attr('disabled', 'disabled'); });
    $("input[name$='mk_name']").autocomplete(options_mk);

    $(".annotation-content").each(function(){
        var annoid = $(this).attr("id").split("-")[1];
        annotation_objects[annoid] = new Annotations(annoid);
    });
    for(var a in annotation_objects){
        annotation_objects[a].importQuotes();
        annotation_objects[a].insertQuotes();
    }
    $(document).on("click", ".annotationform-link", function(e){
      e.preventDefault();
      if (!window.logged_in) {
          var msg = gettext("Sorry, only logged users can annotate.");
          $.jGrowl(msg, {sticky: true});
          return false
      }
      if (!window.permission) {
          var msg = $("#message_permission").html()
{'fraction_non_alphanumeric': 0.19295991778006166, 'fraction_numerical': 0.011819116135662899, 'mean_word_length': 2.9724489795918365, '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': '3814910', 'n_tokens_mistral': 1252, 'n_tokens_neox': 1184, 'n_words': 158}