we can refactor the lines 114,115  127,128 and 142,143 is almost the same code but we just change the element:

+    var retries = this.mobConn.retryCount ? this.mobConn.retryCount : 3;
+    UIManager.pukRetriesLeft.textContent = _('attemptMsg', {n: retries}); 

function displayRetries(element) {
  var retries = this.mobConn.retryCount ? this.mobConn.retryCount : 3;
  UIManager[element].textContent = = _('attemptMsg', {n: retries}); 
}