src/sap.ui.core/src/sap/ui/qunit/QUnitUtils.js
function calcCost(a, va) {
					var score = { va: va, pairs:0, redundant:0 };
					for (var c = 0; c < N; c++) {
						var count;
						if ( c < a ) {
							count = occurs[offset(c,a,value_index[c],va)];
						} else if ( c > a ) {
							var j = offset(a,c,va,0),
								end = j + params[c].n;
							for (count = occurs[j]; count > 0 && i < end; j++ ) {
								if ( occurs[j] < count ) {
									count = occurs[j];
								}
							}
						}
						score.redundant = score.redundant + count;
						if ( count == 0 ) {
							score.pairs++;
						}
					}
					return score;
				}
function calcCost(a, va) {
					var score = { va: va, pairs:0, redundant:0 };
					for (var c = 0; c < N; c++) {
						var count;
						if ( c < a ) {
							count = occurs[offset(c,a,value_index[c],va)];
						} else if ( c > a ) {
							var j = offset(a,c,va,0),
								end = j + params[c].n;
							for (count = occurs[j]; count > 0 && i < end; j++ ) {
								if ( occurs[j] < count ) {
									count = occurs[j];
								}
							}
						}
						score.redundant = score.redundant + count;
						if ( count == 0 ) {
							score.pairs++;
						}
					}
					return score;
				}
function calcCost ( a , va ) { var score = { va : va , pairs : 0 , redundant : 0 } ; for ( var c = 0 ; c < N ; c ++ ) { var count ; if ( c < a ) { count = occurs [ offset ( c , a , value_index [ c ] , va ) ] ; } else if ( c > a ) { var j = offset ( a , c , va , 0 ) , end = j + params [ c ] . n ; for ( count = occurs [ j ] ; count > 0 && i < end ; j ++ ) { if ( occurs [ j ] < count ) { count = occurs [ j ] ; } } } score . redundant = score . redundant + count ; if ( count == 0 ) { score . pairs ++ ; } } return score ; }
Calculates a cost function for the case where for
property 'a' the value 'va' is taken.

The calculated cost consists of two parts:
- pairs : number of newly addressed unique pairs
- redundant : number of redundantly added pairs

@param a
@param va
@return
Calculates a cost function for the case where for property a the value va is taken .