<commit_before>(function(){
	ex.ui.updates = {};
	
	ex.ui.updates.createWindow = function() {
		var win = Ti.UI.createWindow($.mixin({
			title: L("updates_api"),
			layout: 'vertical'
		}, $$.window));
		
		var button = Ti.UI.createButton($.mixin({
			title: L("updates")
		}, $$.button));
		button.addEventListener('click', function(){
			ex.ui.open(ex.ui.updates.createListWindow({
				groupId: "@self",
				title: L("updates")
			}));
		});
		
		var friendButton = Ti.UI.createButton($.mixin({
			title: L("friend_updates")
		}, $$.button));
		friendButton.addEventListener('click', function(){
			ex.ui.open(ex.ui.updates.createListWindow({
				groupId: "@friends",
				title: L("friend_updates")
			}));
		});
		
		win.add(button);
		win.add(friendButton);
		
		return win;
	};
	
	ex.ui.updates.createListWindow = function(config) {
		var win = Ti.UI.createWindow($.mixin({
			title: config.title || L('updates')
		}, $$.window));
		
		win.addEventListener('open', function(){
			var tableView = Ti.UI.createTableView();
			win.add(tableView);
			
			var indicator = ex.ui.createIndicator();
			win.add(indicator);
			indicator.show();
			
			mixi.graphApi.updates({
				groupId: config.groupId,
				success: function(json){
					json.items.forEach(function(item){
						var row = Ti.UI.createTableViewRow($$.updatesTableRow);
						
						row.add(Ti.UI.createImageView($.mixin({
							image: item.actor.image.url
						}, $$.updatesThumbnail)));
						
						row.add(Ti.UI.createLabel($.mixin({
							text: item.actor.displayName
						}, $$.updatesTableRowNameLabel)));
						
						row.add(Ti.UI.createLabel($.mixin({
							text: L("updates_message")
								.replace("#{objectType}", L("updates_" + item.object.objectType))
								.replace("#{title}", item.object.displayName)
								.replace("#{verb}", L("updates_" + item.verb)),<commit_msg>bugfix Updates API examples<commit_after>(function(){
	ex.ui.updates = {};
	
	ex.ui.updates.createWindow = function() {
		var win = Ti.UI.createWindow($.mixin({
			title: L("updates_api"),
			layout: 'vertical'
		}, $$.window));
		
		var button = Ti.UI.createButton($.mixin({
			title: L("updates")
		}, $$.button));
		button.addEventListener('click', function(){
			ex.ui.open(ex.ui.updates.createListWindow({
				groupId: "@self",
				title: L("updates")
			}));
		});
		
		var friendButton = Ti.UI.createButton($.mixin({
			title: L("friend_updates")
		}, $$.button));
		friendButton.addEventListener('click', function(){
			ex.ui.open(ex.ui.updates.createListWindow({
				groupId: "@friends",
				title: L("friend_updates")
			}));
		});
		
		win.add(button);
		win.add(friendButton);
		
		return win;
	};
	
	ex.ui.updates.createListWindow = function(config) {
		var win = Ti.UI.createWindow($.mixin({
			title: config.title || L('updates')
		}, $$.window));
		
		win.addEventListener('open', function(){
			var tableView = Ti.UI.createTableView();
			win.add(tableView);
			
			var indicator = ex.ui.createIndicator();
			win.add(indicator);
			indicator.show();
			
			mixi.graphApi.updates({
				groupId: config.groupId,
				success: function(json){
					json.items.forEach(function(item){
						var row = Ti.UI.createTableViewRow($$.updatesTableRow);
						
						row.add(Ti.UI.createImageView($.mixin({
							image: item.actor.image.url
						}, $$.updatesThumbnail)));
						
						row.add(Ti.UI.createLabel($.mixin({
							text: item.actor.displayName
						}, $$.updatesTableRowNameLabel)));
						
						row.add(Ti.UI.createLabel($.mixin({
							text: L("updates_message")
								.replace("#{objectType}", L("updates_" + item.object.objectType.replace("-", "_")))
								.replace("#{title}", item.title)
								.replace("#{verb}", L("updates_" + item.verb)),
{'fraction_non_alphanumeric': 0.19116465863453816, 'fraction_numerical': 0.0, 'mean_word_length': 3.2454545454545456, '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': '101318', 'n_tokens_mistral': 1621, 'n_tokens_neox': 1241, 'n_words': 182}