<CONTEXT>this.mode = mode;</BUG>this.parameter = Optional.empty();this.setting = setting;}public ModeStatus(boolean setting, @Nonnull ModeType mode, @Nonnull String parameter) {<extra_id_0>this.parameter = Optional.empty();this.setting = setting;}public ModeStatus(boolean setting, @Nonnull ModeType mode, @Nonnull String parameter) {<BUG>Sanity.nullCheck(mode, "Mode cannot be null");Sanity.safeMessageCheck(parameter, "Parameter");this.mode = mode;this.parameter = Optional.of(parameter);</BUG>this.setting = setting;</CONTEXT>
public class ModeStatus<ModeType extends Mode> implements ClientLinked {private final ModeType mode;private final Optional<String> parameter;private final boolean setting;public ModeStatus(boolean setting, @Nonnull ModeType mode) {this.mode = Sanity.nullCheck(mode, "Mode cannot be null");this.mode = Sanity.nullCheck(mode, "Mode cannot be null");this.parameter = Optional.of(Sanity.safeMessageCheck(parameter, "Parameter"));