<commit_before>//Addendum to model.declaration.ClassOrInterfaceDeclaration
ClassOrInterfaceDeclaration$meta$declaration.$$.prototype.getMemberDeclaration=function(name$20,$$$mptypes,noInherit){
  var _m=undefined;
  if (extendsType($$$mptypes.Kind$getMemberDeclaration, {t:ValueDeclaration$meta$declaration})) {
    var propname='$prop$get'+name$20[0].toUpperCase()+name$20.substring(1);
    var _d = this.tipo.$$.prototype[propname];
    if (_d){
      if (noInherit) {
        var mm=getrtmm$$(_d);
        if (mm.$cont!==this.tipo)return null;
      }
      _m=OpenValue(this.containingPackage, _d);
    }
  }
  if (!_m && extendsType($$$mptypes.Kind$getMemberDeclaration, {t:FunctionDeclaration$meta$declaration})) {
    var nom=name$20;
    if (this.tipo===$_String && ['split','replace','filter','every','map','sort','slice','reduce'].indexOf(nom)>=0)nom='$_'+nom;
    var _d = this.tipo.$$.prototype[nom];
    if (_d===undefined) {
      //Let's just look for this thing everywhere
      for (var $k in this.tipo.$$.prototype) {
        var propname='$prop$get'+$k[0].toUpperCase()+$k.substring(1);
        if (!$k.startsWith("$prop$get") && this.tipo.$$.prototype[propname]===undefined && typeof(this.tipo.$$.prototype[$k])==='function') {
          var lafun=this.tipo.$$.prototype[$k];
          var mm=getrtmm$$(lafun);
          var mod=mm&&get_model(mm);
          if (mod && mod.$nm===nom) {
            _d=lafun; break;
          }
        }
        var m$ = this.tipo.$$.prototype[propname] ? undefined: this.tipo.$$.prototype[$k];
        _d = typeof(m$)==='function' && m$.$$===undefined ? getrtmm$$(m$) : undefined;
        if (_d && _d.d && _d.d[_d.d.length-1]===nom){
          _d = this.tipo.$$.prototype[$k];
          break;
        }else _d=undefined;
      }
    }
    if(_d){
      if (noInherit) {
        var mm=getrtmm$$(_d);
        if (mm.$cont!==this.tipo)return null;
      }
      _m=OpenFunction(this.containingPackage, _d);
    }
  }
  if (!_m && extendsType($$$mptypes.Kind$getMemberDeclaration, {t:ClassOrInterfaceDeclaration$meta$declaration})) {
    var nom=name$20+'$'+this.name;
    var _d = this.tipo.$$.prototype[nom];
    if (_d===undefined) {
      //Let's just look for this thing everywhere
      for (var $k in this.tipo.$$.prototype) {
        var propname='$prop$get'+$k[0].toUpperCase()+$k.substring(1);
        var m$ = this.tipo.$$.prototype[propname] ? undefined: this.tipo.$$.prototype[$k];
        _d = typeof(m$)==='function' && m$.$$ ? getrtmm$$(m$) : undefined;
        if (_d && _d.d && _d.d[_d.d.length-1]===nom){
          _d = this.tipo.$$.prototype[$k];
          break;
        }else _d=undefined;
      }
    }
    if (!_d) {
      if (noInherit)return null;
      var pere=this.tipo.$crtmm$['super'];
      while (!_d && pere) {
        var mm=getrtmm$$(pere.t);
        nom=mm&&mm.d?name$20+'$'+mm.d[mm.d.length-1]:undefined;
        if(nom)_d=this.tipo.$$.prototype[nom];
        if (!_d)pere=mm['super'];
      }
    }
    if(_d){
      var wantsClass=extendsType($$$mptypes.Kind$getMemberDeclaration,{t:ClassDeclaration$meta$declaration});
      var wantsIface=extendsType($$$mptypes.Kind$getMemberDeclaration,{t:InterfaceDeclaration$meta$declaration});
      var _$m = getrtmm$$(_d);
      var _mdl=get_model(_$m);
      if ((wantsClass && _mdl.$mt!=='c') || (wantsIface && _mdl.$mt!=='i'))return null;
      _m=(_mdl.$mt==='c'?OpenClass:OpenInterface)(this.containingPackage, _d);
    }
  }
  if (_m) {
    _m.$parent=this;
    return _m;
  }
  return null;
};
ClassOrInterfaceDeclaration$meta$declaration.$$.prototype.getMemberDeclaration.$crtmm$=function(){return{mod:$CCMM$,$t:{ t:'u', l:[{t:Null},'Kind']},$ps:[{$nm:'name',$mt:'prm',$t:{t:$_String}}],$cont:OpenClass,$tp:{Kind:{'satisfies':[{t:NestableDeclaration$meta$declaration}]}},$an:function(){return[shared(),actual()];},d:['ceylon.language.meta.declaration','ClassOrInterfaceDeclaration','$m','getMemberDeclaration']};};
ClassOrInterfaceDeclaration$meta$declaration.$$.prototype.getDeclaredMemberDeclaration=function(nm,$mptypes){
  return this.getMemberDeclaration(nm,{Kind$getMemberDeclaration:$mptypes.Kind$getDeclaredMemberDeclaration},1);
}
ClassOrInterfaceDeclaration$meta$declaration.$$.prototype.getDeclaredMemberDeclaration.$crtmm$=function(){return{mod:$CCMM$,$t:{ t:'u', l:[{t:Null},'Kind']},$ps:[{$nm:'name',$mt:'prm',$t:{t:$_String}}],$cont:OpenClass,$tp:{Kind:{'satisfies':[{t:NestableDeclaration$meta$declaration}]}},$an:function(){return[shared(),actual()];},d:['ceylon.language.meta.declaration','ClassOrInterfaceDeclaration','$m','getDeclaredMemberDeclaration']};};
atr$(FunctionalDeclaration$meta$declaration.$$.prototype,'parameterDeclarations',function(){
  var that=this;
  var parms = that.tipo.$crtmm$.$ps;
  if (!parms || parms.length === 0)return getEmpty();
  var rv = [];
  for (var i=0; i<parms.length;i++) {
    var p = parms[i];
    if (p.$pt === 'f') {
      rv.push(FunParamDecl(this,p));
    } else {
      rv.push(ValParamDecl(this,p));
    }
  }
  return rv.length===0?getEmpty():ArraySequence(rv,{Element$ArraySequence:{t:FunctionOrValueDeclaration$meta$declaration},Absent$Iterable:{t:Null}});
},undefined,function(){return{mod:$CCMM$,$t:{t:Sequential,a:{Element$Sequential:{t:FunctionOrValueDeclaration$meta$declaration}}},$cont:FunctionalDeclaration$meta$declaration,$an:function(){return[shared(),formal()];},d:['ceylon.language.meta.declaration','FunctionalDeclaration','$at','parameterDeclarations']};});
ClassOrInterfaceDeclaration$meta$declaration.$$.prototype.memberDeclarations=function memberDeclarations($$$mptypes,inherited){
  var defs=[];
  if (this.tipo && this.tipo.$$ && this.tipo.$$.prototype) {
    //Try iterating over the prototype's members first
    var _prot=this.tipo.$$.prototype;
    var props = Object.getOwnPropertyNames(_prot);
    function isProp(mem) {
      return _prot['$prop$get' + mem[0].toUpperCase() + mem.substring(1)]!==undefined;
    }
    for (var mem in _prot) {
      if (isProp(mem))continue;
      var _d = undefined;
      var mm=getrtmm$$(_prot[mem]);
      if (mm && inherited && mm.$cont!==this.tipo)continue;
      if (mem.substring(0,9)==='$prop$get' && extendsType({t:ValueDeclaration$meta$declaration},$$$mptypes.Kind$memberDeclarations)) {
        _d=this.getMemberDeclaration(mm.d[mm.d.length-1],{Kind$getMemberDeclaration:{t:ValueDeclaration$meta$declaration}});
      } else if (_prot[mem].$$ && extendsType({t:ClassOrInterfaceDeclaration$meta$declaration},$$$mptypes.Kind$memberDeclarations)) {
        _d=this.getMemberDeclaration(mm.d[mm.d.length-1],
          {Kind$getMemberDeclaration:{t:ClassOrInterfaceDeclaration$meta$declaration}});
      } else if(mm && mm.d) {
        var mt=mm.d[mm.d.length-2];
        if (mt === '$m' && extendsType({t:FunctionDeclaration$meta$declaration},$$$mptypes.Kind$memberDeclarations)) {
          _d=this.getMemberDeclaration(mm.d[mm.d.length-1],{Kind$getMemberDeclaration:{t:FunctionDeclaration$meta$declaration}});
        }
      }
      if (_d){_d.parent$=this;defs.push(_d);};
    }
    return defs.length>0?ArraySequence(defs,{Element$ArraySequence:$$$mptypes.Kind$memberDeclarations}):getEmpty();
  }
  //Fallback to the model declarations
  if (extendsType({t:FunctionDeclaration$meta$declaration},$$$mptypes.Kind$memberDeclarations)) {
    for (var df in this.meta['$m']) {
      defs.push(this.meta['$m'][df]);
    }
  }
  if (extendsType({t:ValueDeclaration$meta$declaration},$$$mptypes.Kind$memberDeclarations)) {
    for (var df in this.meta['$at']) {
      defs.push(this.meta['$at'][df]);<commit_msg>memberDeclarations was returning stuff it shouldn't<commit_after>//Addendum to model.declaration.ClassOrInterfaceDeclaration
ClassOrInterfaceDeclaration$meta$declaration.$$.prototype.getMemberDeclaration=function(name$20,$$$mptypes,noInherit){
  var _m=undefined;
  if (extendsType($$$mptypes.Kind$getMemberDeclaration, {t:ValueDeclaration$meta$declaration})) {
    var propname='$prop$get'+name$20[0].toUpperCase()+name$20.substring(1);
    var _d = this.tipo.$$.prototype[propname];
    if (_d){
      if (noInherit) {
        var mm=getrtmm$$(_d);
        if (mm.$cont!==this.tipo)return null;
      }
      _m=OpenValue(this.containingPackage, _d);
    }
  }
  if (!_m && extendsType($$$mptypes.Kind$getMemberDeclaration, {t:FunctionDeclaration$meta$declaration})) {
    var nom=name$20;
    if (this.tipo===$_String && ['split','replace','filter','every','map','sort','slice','reduce'].indexOf(nom)>=0)nom='$_'+nom;
    var _d = this.tipo.$$.prototype[nom];
    if (_d===undefined) {
      //Let's just look for this thing everywhere
      for (var $k in this.tipo.$$.prototype) {
        var propname='$prop$get'+$k[0].toUpperCase()+$k.substring(1);
        if (!$k.startsWith("$prop$get") && this.tipo.$$.prototype[propname]===undefined && typeof(this.tipo.$$.prototype[$k])==='function') {
          var lafun=this.tipo.$$.prototype[$k];
          var mm=getrtmm$$(lafun);
          var mod=mm&&get_model(mm);
          if (mod && mod.$nm===nom) {
            _d=lafun; break;
          }
        }
        var m$ = this.tipo.$$.prototype[propname] ? undefined: this.tipo.$$.prototype[$k];
        _d = typeof(m$)==='function' && m$.$$===undefined ? getrtmm$$(m$) : undefined;
        if (_d && _d.d && _d.d[_d.d.length-1]===nom){
          _d = this.tipo.$$.prototype[$k];
          break;
        }else _d=undefined;
      }
    }
    if(_d){
      if (noInherit) {
        var mm=getrtmm$$(_d);
        if (mm.$cont!==this.tipo)return null;
      }
      _m=OpenFunction(this.containingPackage, _d);
    }
  }
  if (!_m && extendsType($$$mptypes.Kind$getMemberDeclaration, {t:ClassOrInterfaceDeclaration$meta$declaration})) {
    var nom=name$20+'$'+this.name;
    var _d = this.tipo.$$.prototype[nom];
    if (_d===undefined) {
      //Let's just look for this thing everywhere
      for (var $k in this.tipo.$$.prototype) {
        var propname='$prop$get'+$k[0].toUpperCase()+$k.substring(1);
        var m$ = this.tipo.$$.prototype[propname] ? undefined: this.tipo.$$.prototype[$k];
        _d = typeof(m$)==='function' && m$.$$ ? getrtmm$$(m$) : undefined;
        if (_d && _d.d && _d.d[_d.d.length-1]===nom){
          _d = this.tipo.$$.prototype[$k];
          break;
        }else _d=undefined;
      }
    }
    if (!_d) {
      if (noInherit)return null;
      var pere=this.tipo.$crtmm$['super'];
      while (!_d && pere) {
        var mm=getrtmm$$(pere.t);
        nom=mm&&mm.d?name$20+'$'+mm.d[mm.d.length-1]:undefined;
        if(nom)_d=this.tipo.$$.prototype[nom];
        if (!_d)pere=mm['super'];
      }
    }
    if(_d){
      var wantsClass=extendsType($$$mptypes.Kind$getMemberDeclaration,{t:ClassDeclaration$meta$declaration});
      var wantsIface=extendsType($$$mptypes.Kind$getMemberDeclaration,{t:InterfaceDeclaration$meta$declaration});
      var _$m = getrtmm$$(_d);
      var _mdl=get_model(_$m);
      if ((wantsClass && _mdl.$mt!=='c') || (wantsIface && _mdl.$mt!=='i'))return null;
      _m=(_mdl.$mt==='c'?OpenClass:OpenInterface)(this.containingPackage, _d);
    }
  }
  if (_m) {
    _m.$parent=this;
    return _m;
  }
  return null;
};
ClassOrInterfaceDeclaration$meta$declaration.$$.prototype.getMemberDeclaration.$crtmm$=function(){return{mod:$CCMM$,$t:{ t:'u', l:[{t:Null},'Kind']},$ps:[{$nm:'name',$mt:'prm',$t:{t:$_String}}],$cont:OpenClass,$tp:{Kind:{'satisfies':[{t:NestableDeclaration$meta$declaration}]}},$an:function(){return[shared(),actual()];},d:['ceylon.language.meta.declaration','ClassOrInterfaceDeclaration','$m','getMemberDeclaration']};};
ClassOrInterfaceDeclaration$meta$declaration.$$.prototype.getDeclaredMemberDeclaration=function(nm,$mptypes){
  return this.getMemberDeclaration(nm,{Kind$getMemberDeclaration:$mptypes.Kind$getDeclaredMemberDeclaration},1);
}
ClassOrInterfaceDeclaration$meta$declaration.$$.prototype.getDeclaredMemberDeclaration.$crtmm$=function(){return{mod:$CCMM$,$t:{ t:'u', l:[{t:Null},'Kind']},$ps:[{$nm:'name',$mt:'prm',$t:{t:$_String}}],$cont:OpenClass,$tp:{Kind:{'satisfies':[{t:NestableDeclaration$meta$declaration}]}},$an:function(){return[shared(),actual()];},d:['ceylon.language.meta.declaration','ClassOrInterfaceDeclaration','$m','getDeclaredMemberDeclaration']};};
atr$(FunctionalDeclaration$meta$declaration.$$.prototype,'parameterDeclarations',function(){
  var that=this;
  var parms = that.tipo.$crtmm$.$ps;
  if (!parms || parms.length === 0)return getEmpty();
  var rv = [];
  for (var i=0; i<parms.length;i++) {
    var p = parms[i];
    if (p.$pt === 'f') {
      rv.push(FunParamDecl(this,p));
    } else {
      rv.push(ValParamDecl(this,p));
    }
  }
  return rv.length===0?getEmpty():ArraySequence(rv,{Element$ArraySequence:{t:FunctionOrValueDeclaration$meta$declaration},Absent$Iterable:{t:Null}});
},undefined,function(){return{mod:$CCMM$,$t:{t:Sequential,a:{Element$Sequential:{t:FunctionOrValueDeclaration$meta$declaration}}},$cont:FunctionalDeclaration$meta$declaration,$an:function(){return[shared(),formal()];},d:['ceylon.language.meta.declaration','FunctionalDeclaration','$at','parameterDeclarations']};});
ClassOrInterfaceDeclaration$meta$declaration.$$.prototype.memberDeclarations=function memberDeclarations($$$mptypes,inherited){
  var defs=[];
  var _prot=this.tipo && this.tipo.$$ && this.tipo.$$.prototype;
  if (_prot) {
    //Try iterating over the prototype's members first
    var props = Object.getOwnPropertyNames(_prot);
    function isProp(mem) {
      return _prot['$prop$get' + mem[0].toUpperCase() + mem.substring(1)]!==undefined;
    }
    for (var mem in _prot) {
      if (isProp(mem))continue;
      var _d = undefined;
      var mm=getrtmm$$(_prot[mem]);
      if (mm && inherited && mm.$cont!==this.tipo)continue;
      if (mem.substring(0,9)==='$prop$get' && extendsType($$$mptypes.Kind$memberDeclarations,{t:ValueDeclaration$meta$declaration})) {
        _d=this.getMemberDeclaration(mm.d[mm.d.length-1],{Kind$getMemberDeclaration:{t:ValueDeclaration$meta$declaration}});
      } else if (_prot[mem].$$ && extendsType($$$mptypes.Kind$memberDeclarations,{t:ClassOrInterfaceDeclaration$meta$declaration})) {
        var mt=mm.d[mm.d.length-2];
        if ((mt==='$c' && !extendsType({t:ClassDeclaration$meta$declaration},$$$mptypes.Kind$memberDeclarations))
            ||(mt==='$i' && !extendsType({t:InterfaceDeclaration$meta$declaration},$$$mptypes.Kind$memberDeclarations)))continue;
        _d=this.getMemberDeclaration(mm.d[mm.d.length-1],
          {Kind$getMemberDeclaration:{t:ClassOrInterfaceDeclaration$meta$declaration}});
      } else if(mm && mm.d) {
        var mt=mm.d[mm.d.length-2];
        if (mt === '$m' && extendsType({t:FunctionDeclaration$meta$declaration},$$$mptypes.Kind$memberDeclarations)) {
          _d=this.getMemberDeclaration(mm.d[mm.d.length-1],{Kind$getMemberDeclaration:{t:FunctionDeclaration$meta$declaration}});
        }
      }
      if (_d){_d.parent$=this;defs.push(_d);};
    }
    return defs.length?ArraySequence(defs,{Element$ArraySequence:$$$mptypes.Kind$memberDeclarations}):getEmpty();
  }
  //Fallback to the model declarations
  if (extendsType({t:FunctionDeclaration$meta$declaration},$$$mptypes.Kind$memberDeclarations)) {
    for (var df in this.meta['$m']) {
      defs.push(this.meta['$m'][df]);
    }
  }
  if (extendsType({t:ValueDeclaration$meta$declaration},$$$mptypes.Kind$memberDeclarations)) {
    for (var df in this.meta['$at']) {
      defs.push(this.meta['$at'][df]);
{'fraction_non_alphanumeric': 0.2026232473993668, 'fraction_numerical': 0.004522840343735866, 'mean_word_length': 4.66959706959707, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '5694788', 'n_tokens_mistral': 5392, 'n_tokens_neox': 5310, 'n_words': 625}