<commit_before>const React = require('react');
const rB = require('react-bootstrap');
const cE = React.createElement;

class TableApps extends React.Component {
    constructor(props) {
        super(props);
    }

    render() {
        const self = this;
        const renderOneRow = function(i, appName, app) {
            let tasksRunning = app.stat && parseInt(app.stat.tasksRunning);
            tasksRunning = ((typeof tasksRunning ===  'number') &&
                            !isNaN(tasksRunning) ? tasksRunning : '?');

            const appProps = app.stat && app.stat.props || null;

            const numberOfCAs = appProps && appProps.numberOfCAs || 0;

            let instances = appProps && appProps.app &&
                appProps.app.instances || 0;

            const runningStyle  = (app.instances === tasksRunning) ?
                {key:10*i+5, 'className':'text-success'} :
                {key:10*i+5, 'className':'text-danger'};

            const version = app.stat && app.stat.version || '?';

            const isIncubator = appProps && appProps.app &&
                appProps.app.isIncubator;
            if (isIncubator) {
                tasksRunning = tasksRunning / 10;
                instances = instances / 10;
            }<commit_msg>Fix instances bug<commit_after>const React = require('react');
const rB = require('react-bootstrap');
const cE = React.createElement;

class TableApps extends React.Component {
    constructor(props) {
        super(props);
    }

    render() {
        const self = this;
        const renderOneRow = function(i, appName, app) {
            let tasksRunning = app.stat && parseInt(app.stat.tasksRunning);
            tasksRunning = ((typeof tasksRunning ===  'number') &&
                            !isNaN(tasksRunning) ? tasksRunning : '?');

            const appProps = app.stat && app.stat.props || null;

            const numberOfCAs = appProps && appProps.numberOfCAs || 0;

            let instances = appProps && appProps.app &&
                appProps.app.instances || 0;

            const runningStyle  = (instances === tasksRunning) ?
                {key:10*i+5, 'className':'text-success'} :
                {key:10*i+5, 'className':'text-danger'};

            const version = app.stat && app.stat.version || '?';

            const isIncubator = appProps && appProps.app &&
                appProps.app.isIncubator;
            if (isIncubator) {
                tasksRunning = tasksRunning / 10;
                instances = instances / 10;
            }
{'fraction_non_alphanumeric': 0.1259811616954474, 'fraction_numerical': 0.009419152276295133, 'mean_word_length': 1.9366359447004609, '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': '5505008', 'n_tokens_mistral': 731, 'n_tokens_neox': 679, 'n_words': 152}