<CONTEXT>String name = fgObject.getName();Path singleDir = dir.resolve(name.toLowerCase());</BUG>boolean shouldSave = fgObject.shouldSave();if (force || shouldSave) {<extra_id_0>boolean shouldSave = fgObject.shouldSave();if (force || shouldSave) {<BUG>logger.info((shouldSave ? "S" : "Force s") + "aving handler \"" + name + "\" in directory: " + singleDir);</BUG>constructDirectory(singleDir);try {fgObject.save(singleDir);</CONTEXT>
UUID owner = fgObject.getOwner();boolean isOwned = !owner.equals(SERVER_UUID);Optional<User> userOwner = userStorageService.get(owner);String logName = (userOwner.isPresent() ? userOwner.get().getName() + ":" : "") + (isOwned ? owner + ":" : "") + name;if (fgObject.autoSave()) {Path singleDir = serverDir.resolve(name.toLowerCase());logger.info((shouldSave ? "S" : "Force s") + "aving handler " + logName + " in directory: " + singleDir);