-7

I am answering this question. Pattern match without a string order

Assuming the question gets deleted or whatever, here is the question's (lightly) edited text, as of now.


I wanted to match 2 string but the order should't matter e.g. below check should give true instead of false.

final String line = "LIST \"\" (\"car1\" \"car0\") RETURN (SPECIAL-USE STATUS)\n";
final String regex = ".*LIST.*\\(\"car0\"\\ \"car1\"\\)\\ RETURN.*\\R";
System.out.println(line.matches(regex));

I am expecting that values in string line should match with regex irrespective of the order of the words(car1 and car0).


The question isn't great, but an attempt was clearly made, and the example is simple and reproducible. However, the Community bot responded with the following comment.


Please provide enough code so others can better understand or reproduce the problem.


So, I decided to try and flag the bot, since it was clearly incorrect. After all, copy and paste the above code into a main method, and you get the exact output that the user described. If the bot had something like Show your multiple attempts at solving the problem or Explain why you think it doesn't work, I would be more understanding.

But when I tried to flag the bot, the only option that popped up said the following.


Why are you flagging this comment?

  • It's no longer needed. -- This comment is outdated, conversational, or not relevant to this post.

But that's not accurate at all. In fact, it should instead say something like Question was incorrectly flagged as lacking a code example.

Is there any way we could add an option to the flag menu that better captures why the bot's comment is being flagged?

Screenshot -- https://i.stack.imgur.com/7ziIv.png

Edit options -- https://i.stack.imgur.com/H61ER.png

11
  • Also, I have decided to flag the comment anyways with the only option available. I have edited a screenshot of what it looked like before I did though. Jul 27 at 22:43
  • 1
    Hmmm... interesting. Moderators are shown all normally available comment flag options, but a sockpuppet account I use for testing with very little reputation is only shown NLN flags as an option.
    – Makyen Mod
    Jul 27 at 23:18
  • @Makyen My account has 1473 reputation. Certainly that should be enough to see more than what my screenshot shows, correct? Jul 27 at 23:20
  • 2
    On the other hand, NLN flags are something of a catch-all. NLN flags generally mean "this comment is 'no longer needed'", which could be for any reason.
    – Makyen Mod
    Jul 27 at 23:21
  • I guess I take issue with the "no longer" part. Especially when someone is making edits simultaneously, that could send the wrong message Jul 27 at 23:21
  • 2
    As to showing more options, I suspect that the difference is moderator vs. non-moderator. On MSE, where I have 20k+ reputation but am not a moderator, NLN is the only flag option available on Community bot generated comments.
    – Makyen Mod
    Jul 27 at 23:28
  • 2
    The only other existing comment flag option which really makes sense to make available is "Something else", which are for sending custom text as the flag. I don't object to enabling the "Something else" flags on these (and while they're changing that, maybe they can enable NLN flags for post owners with < 15 reputation). Ultimately, all comment flags mean "this comment should be deleted", so I'm not sure how much benefit there is to enabling "Something else" flags here, but I don't see a problem with having them available.
    – Makyen Mod
    Jul 27 at 23:35
  • 2
    If you're wanting some new type of flag, that's a much larger ask that will need more justification and to be more specific as to what you're wanting to add.
    – Makyen Mod
    Jul 27 at 23:36
  • Oh definitely not a new flag. That something else flag sounds perfect. I just don't want the results to show that the bot was correct, and I feel like using the NLN flag implies that it was originally correct, just didn't know when it was no longer applicable. I want the flag to clearly communicate that it got it wrong the first time. Jul 28 at 0:42
  • 1
    @davidalayachew NLN flag won't imply anything. And nobody really considers community bot's comments when evaluating a post, AFAIK. When it's get deleted, only mods will see the comment, and they definitely don't care about what the bot said or why its comments were deleted. That said, this is a legit request. If it takes short few minutes to implement, then fine, but if takes some time, I am not sure if it makes sense to divert resources to this.
    – M--
    Jul 28 at 3:39
  • @M--ßţřịƙïñĝ Thank you for your response! Yes, I don't want to move mountains. I imagine this is turning a flag on or off. If so, then yes, I think this should be done. Jul 28 at 15:50

1 Answer 1

6

Is there any way we could add an option to the flag menu that better captures why the bot's comment is being flagged?

For what purpose?

The reason for existing flag types is primarily so that moderators can prioritize their actions. Comments that violate the Code of Conduct (harassing or rude) need to be considered specially, because there is the potential to penalize the author for making them. "No longer needed" is a catch-all that essentially communicates "please just delete the comment, it isn't adding value and there isn't a need to explain why explicitly".

"In need of moderator intervention" is for when you need to explain an issue - typically this is because you want to object to more than just the one comment. It could be to say "please clean up an entire chain of comments", or "this user has a history of leaving this sort of comment, which doesn't rise to the level of a code of conduct violation but is kinda obnoxious"... things like that.

That said: it's not as if the Community bot can learn from its mistakes, or as if there's value in reprimanding it. The comment you're talking about is generated automatically by a rule that comes from an assessment of the question in a review queue. You're effectively asking to give feedback on someone else's review (a "someone else" who was deliberately anonymized by the design of the system), which... just how many levels of bureaucracy do we want?

In this case: when the comment was made, the code was not properly formatted. What is supposed to be multi-line code was presented with inline code formatting, with statements separated by semicolons, and attached to the end of a paragraph; the prose also had numerous grammatical errors and typos. It's possible that the reviewer didn't notice the code, but "Question is unclear" would probably have been a better option in the "Share feedback" dialog. (Better yet would have been to edit the question personally, rather than hoping someone else would pick up the slack.)

Aside from that, some people have varying standards for a minimal reproducible example. I commonly request that people make sure that the code can be "copied and pasted, without adding or changing anything, to reproduce the exact problem directly". However, while I think it's reasonable to be this strict for Python, languages like Java require a significant amount of boilerplate before the code can do anything, and including it seems noisy.


In summary: "No Longer Needed" is perfectly adequate here. That which is not currently needed qualifies as "no longer needed", even if it also wasn't needed before. Your position (as I understand it) is that all relevant issues with the question have been addressed, so that's how to flag the comment. Trying to be any more precise than that isn't useful, because there's no built-in way to translate it into actionable feedback for the person ultimately responsible for the bot's action (and convey it to that person).

5
  • I am not trying to make sure the person who responded to this gets reprimanded or corrected. I just want some of the existing flag options to be activated so that we can more accurately correct the bot because flagging it with something false or indirect can cause people who don't understand the internals to feel like their flags won't be heard or considered if they flag incorrectly. I am speaking from the perspective of the reporter, not in terms of how the moderators will react. I'm sure the moderators have the nuance to see the intent, like you said, but the user may feel subconscious. Jul 28 at 15:58
  • You cannot "accurately correct the bot", first off because the bot does not take these flags in as feedback. They are used by the underlying site software and by moderators, both of which are independent of the bot user. Second, because the bot did not make a decision that could be corrected; its action directly reflects a decision made by a human reviewer. Jul 28 at 23:55
  • Ok, fair, correct is not the correct word. Regardless, my point still stands -- if you have options that do not accurately represent the situation in the eyes of the reporter, you cheapen and devalue flags as a whole for that reporter. And therefore, an option that better encompasses the situation will encourage them to use it. That was my entire point. Jul 29 at 2:57
  • I can see the argument for changing the wording of the "Not an Answer" selection - I had to ask about it before, too. However, it's still definitely what you're intended to use in this situation. Jul 29 at 3:00
  • You and many others have told me that it is the intended choice. I am speaking from the perspective of the reporter, who will value the wording more than the intent. Jul 29 at 4:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .