False positive is the case where the positive result of a test doesn't correspond to reality. It can lead to the wrong decision.
Questions tagged [false-positive]
236 questions
1
vote
0 answers
Sonar NullPointerException wrongly detected after isInstance check
i use very often the check getClass().isInstance() when overriding the equals method of a Java class, as in the following example:
1 - public boolean equals(Object obj){
2 - if(getClass().isInstance(obj)){
3 - MyClass cls= (MyClass)…

TheSuffering2
- 11
- 1
1
vote
0 answers
How to check if a file exists on a htaccess protected website?
I ran into a little problem trying to check if a file exists on a website that is htaccess protected.
This works great when the file is not htaccess protected with a username and password authentication process.
#!/bin/bash
url="some file on a…

Vituvo
- 1,008
- 1
- 9
- 29
1
vote
1 answer
Method returns negative value
I am trying to create a method that checks if an input is a double that is greater than zero. Checking if it is indeed a double is working fine with my code, but, even though when entering negatives its prompts to reenter the value, in the end,…

Alex Lab
- 63
- 5
1
vote
1 answer
Sonar seems to ignore variables set in catch block
Does anyone know why SonarQube detects a violation of the rule "Conditionally executed blocks should be reachable" (squid:S2583) in the following example? Is this a false positive?
In this piece of Java code, a file is read and an EOFException (or…

dokaspar
- 8,186
- 14
- 70
- 98
1
vote
0 answers
Code analysis warning: CA1062 is really false positive?
In my code, I have a reference variable LogValidacionPagosDTO
public void InsertarArchivoXmlOk(ArchivoXmlDRO archivo, ref LogValidacionPagosDTO archivoRespuesta)
{
//Some code
}
When executing "code analysis" generates this warning
Warning…

makitocode
- 938
- 1
- 16
- 40
1
vote
2 answers
How to find false positive images when use caffe classifier
we are using caffe to do the classification of images, there two classes. We've done the training and testing and get the accuracy. Now I want to find the false positive images from the test dataset. Is there anyway I can do this?
Thanks!

ccatman
- 11
- 2
1
vote
1 answer
How do I match and kill a specific process without accidentally including unrelated processes?
I have two Tomcat processes, one is called event-ws, another is called app-event-ws. I sometimes need to kill event-ws from a shell script:
ps -ef | grep -w event-ws | grep -v grep
The above will find and kill both of them; how can I find exactly…

yyzhang14922
- 59
- 1
- 2
- 9
1
vote
1 answer
Python Pandas df.duplicated() false positives
I am running into an issue of df.duplicated() erroneously returning true. When I reset the index (df.reset_index()) df.duplicates() returns the correct result.
This issue was raised in 2013 however, the cause was not identified, just a work-around.…

Sparkman
- 19
- 2
1
vote
1 answer
Scikit-learn: Strong imbalance between false-positives and false-negatives
Using scikit-learn on balanced training data of around 50 millions samples (50% one class, 50% the other, 8 continuous features in interval (0,1)), all classifiers that I have been able to try so far (Linear/LogisticRegression, LinearSVC,…

Radio Controlled
- 825
- 8
- 23
1
vote
1 answer
How to show the misclassification rate/false positive/false negative after train a model in R caret?
I trained a classification model using treebag:
tbmodel <- train(target ~ ., data = combine_train, method = "treebag")
predictors <- names(trainSplit)[names(trainSplit) != 'target']
pred <- predict(tbmodel$finalModel, testSplit[,predictors])
How…

Kelly Nguyen
- 273
- 1
- 2
- 4
1
vote
3 answers
stumbling upon a non-trivial bool scenario in C++
When Cppcheck runs over this code,[1] it complains about an error:
void bool_express(bool aPre, bool aX, bool aPost)
{
bool x;
const bool pre = aPre;
if (pre) {
x = aX;
}
const bool post = aPost;
// error checking…

Wolf
- 9,679
- 7
- 62
- 108
1
vote
0 answers
Input checkbox & ion-checkbox boxs checked even though value is false
This is driving me crazy. I am almost thinking this is a bug at this point.
When a page loads the controller, it checks for window.localStorage values...if not set it then sets the defaults. If set, then set the checkbox's to true or false based on…

rolinger
- 2,787
- 1
- 31
- 53
1
vote
1 answer
Motion detection illumination from the sun
I have a Raspberry Pi which records videos on motion detections from a PIR sensor. Sometimes "random" heat variations will falsely trigger the sensor and record a video when there isn't any motion. If there isn't any motion in the picture I would…

Linus
- 1,516
- 17
- 35
1
vote
0 answers
reply emails are bounced due to URL in content
I have a client who communicates with me via email. Crazy, I know.
Here is the issue: When I send him an email from Mac Mail — with my URL in the footer – he receives it. However, when he tries to reply from his gmail account, my server bounces it…

Parapluie
- 714
- 1
- 7
- 22
1
vote
1 answer
How to decrease the number of issues?
When I mark as false positive or resolved some issues, the total number of issues is not decremented. Is that behavior normal? If so, is there a way to decrease this number according to the number of marked issues?
I'm using SonarQube 4.5.4 (LTS).
user2308899