<commit_before>App = Ember.Application.create();

Ember.RadioButton = Ember.View.extend({  
  tagName : "input",
  type : "radio",
  attributeBindings : [ "name", "type", "value", "checked:checked:" ],
  click : function() {
    this.set("selection", this.$().val())
  },
  checked : function() {
    return this.get("value") == this.get("selection");   
  }.property()
});

Ember.AccessibleTextField = Ember.TextField.extend({
	attributeBindings : [ "aria-label" ]
});

App.GoldHotpantsComponent = Ember.Component.extend({
	captions: [{
	  body: "Ow! My eye."
	}, {
	  body: "Shiny!"
	}],

	winningCaption: "<NAME>",
  
  radioButtonSelected: null,
	
	attributeBindings: [
		'tabIndex',
		'ariaLabel'
	],
	tagName: 'div',
	ariaRole: 'form',

	didInsertElement: function(){
		this.set('winningCaption', this.get('captions')[0].body);
	},

	radioButtonSelectedObserver: function(obj) {
		this.set('winningCaption', this.radioButtonSelected);<commit_msg>Ember demo: Selecting first radio button<commit_after>App = Ember.Application.create();

Ember.RadioButton = Ember.View.extend({  
  tagName : "input",
  type : "radio",
  attributeBindings : [ "name", "type", "value", "checked:checked:" ],
  click : function() {
    this.set("selection", this.$().val())
  },
  checked : function() {
    return this.get("value") == this.get("selection");   
  }.property()
});

Ember.AccessibleTextField = Ember.TextField.extend({
	attributeBindings : [ "aria-label" ]
});

App.GoldHotpantsComponent = Ember.Component.extend({
	captions: [{
	  body: "Ow! My eye."
	}, {
	  body: "Shiny!"
	}],

	winningCaption: "<NAME> Shorts",
  
  radioButtonSelected: null,
	
	attributeBindings: [
		'tabIndex',
		'ariaLabel'
	],
	tagName: 'div',
	ariaRole: 'form',

	didInsertElement: function(){
		this.set('winningCaption', this.get('captions')[0].body);
		$('input[type=radio]:first').prop('checked', 'checked');
	},

	radioButtonSelectedObserver: function(obj) {
		this.set('winningCaption', this.radioButtonSelected);
{'fraction_non_alphanumeric': 0.1897846770155233, 'fraction_numerical': 0.00100150225338007, 'mean_word_length': 4.612359550561798, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5591568', 'n_tokens_mistral': 706, 'n_tokens_neox': 674, 'n_words': 117}