is called also on the server
550935
public static void createSummaryInformation(String filePath, String title) {

        if (filePath == null) {
            return;
        }
        try {
            File poiFilesystem = new File(filePath);
            InputStream is = new FileInputStream(poiFilesystem);
            POIFSFileSystem poifs = new POIFSFileSystem(is);
            is.close();
            DirectoryEntry dir = poifs.getRoot();

            SummaryInformation si = PropertySetFactory.newSummaryInformation();
            si.setTitle(title);
            si.setAuthor(ReleaseInfoAdapter.getCompany());
            si.setApplicationName("NextReports " + ReleaseInfoAdapter.getVersionNumber());
            si.setSubject("Created by NextReports Designer" + ReleaseInfoAdapter.getVersionNumber());
            si.setCreateDateTime(new Date());
            si.setKeywords(ReleaseInfoAdapter.getHome());

            si.write(dir, SummaryInformation.DEFAULT_STREAM_NAME);

            OutputStream out = new FileOutputStream(poiFilesystem);
            poifs.writeFilesystem(out);
            out.close();
        }
        catch (Exception ex) {
            ex.printStackTrace();
        }
    }
830889
def has_known_servers(self):
        """"""
        return any(s for s in self._server_descriptions.values()
                   if s.is_server_type_known)
787791
def on_connect(client):
    """"""
    client.nick(client.user.nick)
    client.userinfo(client.user.username, client.user.realname)
195437
@Override
  public boolean isServerPrimary(ServerBartender server)
  {
    for (int i = 0; i < Math.min(1, _owners.length); i++) {
      ServerBartender serverBar = server(i);
      
      if (serverBar == null) {
        continue;
      }
      else if (serverBar.isSameServer(server)) {
        return true;
      }
    }

    return false;
  }
409443
function () {
    // Determine https vs. http
    this.server = this.ssl ?
        https.createServer(this.ssl) :
        http.createServer();

    // Bind to the request
    this.server.on('request', this.handle.bind(this));
  }
22297
function Ask(server, req, res) {
  this.server = server;
  this.req = req;
  this.res = res;
  this.uri = req.uri;
  this.form = req.form;
  this.path = req.path;
  this.query = req.query;
  this.username = req.username;
  this.password = req.password;
  this.cookies = req.cookies;
}
379729
protected void compareServerMode(Session other) throws ClientException {

        if (transferMode != MODE_EBLOCK) {

            super.compareServerMode(other);

        } else {
            if (serverMode == SERVER_DEFAULT &&
                other.serverMode == SERVER_DEFAULT) {

                // this is OK

            } else {
                // active and passive side had already been set;
                // make sure that it has been done correctly.
                // in mode E, source must be active and dest passive

                if (!((serverMode == SERVER_EACT && other.serverMode == SERVER_EPAS)
                        || (serverMode == SERVER_EPAS && other.serverMode == SERVER_EACT)
                        || (serverMode == SERVER_ACTIVE && other.serverMode == SERVER_PASSIVE) || (serverMode == SERVER_PASSIVE && other.serverMode == SERVER_ACTIVE))) {
                    throw new ClientException(ClientException.BAD_SERVER_MODE,
                            "One server must be active"
                                    + " and other must be passive");
                }
            }
        }
    }
160296
def do_server(self, arg):
        
        if arg['on']:
            self.server_on()
        elif arg['off']:
            self.server_off()
        elif arg['restart']:
            self.server_restart()
        elif arg['log']:
            self.server_log()
        else:
            self.help_server()
522850
private boolean isHub(ServerBartender server)
  {
    int upCount = 0;
    
    for (ServerHeartbeat rackServer : _rack.getServers()) {
      if (rackServer == null || ! rackServer.isUp()) {
        continue;
      }
      
      if (rackServer == server && upCount < _hubCount) {
        return true;
      }
      
      upCount++;
        
      if (_hubCount <= upCount) {
        return false;
      }
    }
    
    return false;
  }
406164
public function afterCreateServer(): void
    {
        // load task data
        if (\is_file($this->dataFile)) {
            $this->server->data = \unserialize(\file_get_contents($this->dataFile), ['allowed_classes' => false]);
        } else {
            $this->server->data = [];
        }

        // $this->initCommands($this->server);
        $this->registerCommands($this->server);
    }
809158
def _request_check(self, address):
        """"""
        server = self._servers.get(address)

        # "server" is None if another thread removed it from the topology.
        if server:
            server.request_check()
1334273
function Server(options) {
  var that = this;
  that.options = options || {};
  that.stack = [];
  bind.call(that);
}
112520
def on_change(self, server_description):
        """"""
        # We do no I/O holding the lock.
        with self._lock:
            # Monitors may continue working on ismaster calls for some time
            # after a call to Topology.close, so this method may be called at
            # any time. Ensure the topology is open before processing the
            # change.
            # Any monitored server was definitely in the topology description
            # once. Check if it's still in the description or if some state-
            # change removed it. E.g., we got a host list from the primary
            # that didn't include this server.
            if (self._opened and
                    self._description.has_server(server_description.address)):
                self._process_change(server_description)
1318650
public final void server() {

    // load parameters into a properties
    String port = parsedArguments.getString("port");
    String model = parsedArguments.getString("model");
    String lemmatizerModel = parsedArguments.getString("lemmatizerModel");
    final String allMorphology = Boolean.toString(this.parsedArguments.getBoolean("allMorphology"));
    final String multiwords = Boolean.toString(this.parsedArguments
        .getBoolean("multiwords"));
    final String dictag = Boolean.toString(this.parsedArguments
        .getBoolean("dictag"));
    String outputFormat = parsedArguments.getString("outputFormat");
    // language parameter
    String lang = parsedArguments.getString("language");
    Properties serverproperties = setServerProperties(port, model, lemmatizerModel, lang, multiwords, dictag, outputFormat, allMorphology);
    new StatisticalTaggerServer(serverproperties);
  }
543478
function NetworkServer(server) {
  this.server = server;
  function connection(socket) {
    server.connection(socket, this);
  }
  this.on('connection', connection);
}
1083743
def grab_server(self, onerror = None):
        """"""
        request.GrabServer(display = self.display,
                           onerror = onerror)
868417
def server_side(func):
    
    def inner(*args, **kwargs):
        if args and hasattr(args[0], 'is_server') and not voltron.debugger:
            raise ServerSideOnlyException("This method can only be called on a server-side instance")
        return func(*args, **kwargs)
    return inner