public String codeOwner(List<CodeOwner> codeOwners){
  long currentUnix=System.currentTimeMillis() / 1000L;
  double best=0;
  String owner="Unknown";
  for (  CodeOwner codeOwner : codeOwners) {
    double age=(currentUnix - codeOwner.getMostRecentUnixCommitTimestamp()) / 60 / 60;
    double calc=codeOwner.getNoLines() / Math.pow((age),1.8);
    if (calc > best) {
      best=calc;
      owner=codeOwner.getName();
    }
  }
  return owner;
}

public String codeOwner ( List < CodeOwner > codeOwners ) { long currentUnix = System . currentTimeMillis ( ) / 1000L ; double best = 0 ; String owner = "Unknown" ; for ( CodeOwner codeOwner : codeOwners ) { double age = ( currentUnix - codeOwner . getMostRecentUnixCommitTimestamp ( ) ) / 60 / 60 ; double calc = codeOwner . getNoLines ( ) / Math . pow ( ( age ) , 1.8 ) ; if ( calc > best ) { best = calc ; owner = codeOwner . getName ( ) ; } } return owner ; }
determines who owns a piece of code weighted by time based on current second ( ie time now ) nb if a commit is very close to this time it will always win
