Java: model top JDK APIs#11779
Conversation
egregius313
left a comment
There was a problem hiding this comment.
LGTM. I can approve once we get an answer about the endsWith row.
Click to show differences in coveragejavaGenerated file changes for java
- Java Standard Library,``java.*``,3,602,130,28,,,7,,,10
+ Java Standard Library,``java.*``,3,615,130,28,,,7,,,10
- Totals,,217,8449,1563,129,6,10,107,33,1,86
+ Totals,,217,8462,1563,129,6,10,107,33,1,86
- java.io,37,,40,,15,,,,,,,,,,,,,,,,,,,,,,,,,,,22,,,,,,,,40,
+ java.io,37,,42,,15,,,,,,,,,,,,,,,,,,,,,,,,,,,22,,,,,,,,41,1
- java.lang,13,,75,,,,,,,,,,,,8,,,,,,4,,,1,,,,,,,,,,,,,,,,56,19
+ java.lang,13,,80,,,,,,,,,,,,8,,,,,,4,,,1,,,,,,,,,,,,,,,,53,27
- java.math,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,
- java.sql,11,,1,,,,,,,,4,,,,,,,,,,,,,,,,,7,,,,,,,,,,,,1,
+ java.sql,11,,2,,,,,,,,4,,,,,,,,,,,,,,,,,7,,,,,,,,,,,,1,1
- java.util,44,,461,,,,,,,,,,,,34,,,,,,,5,2,,1,2,,,,,,,,,,,,,,36,425
+ java.util,44,,467,,,,,,,,,,,,34,,,,,,,5,2,,1,2,,,,,,,,,,,,,,39,428 |
|
Thanks all! I've switched the numeric flow models to neutrals in 6bb865a. Let me know if you want any changes to how I stored/commented them.
I updated all of the numeric flow models from the previous PR as well (
@atorralba Should |
Yes, without knowledge of what the function does, assuming that flow is propagated from arg0 to return value is too "greedy" and prone to FP, I think. Doing that with precision requires analyzing the code of the function itself, and building the dataflow graph accordingly (which, if I'm not mistaken, the existing lambda flow support already does, at least in some cases). |
Click to show differences in coveragejavaGenerated file changes for java
- Java Standard Library,``java.*``,3,602,130,28,,,7,,,10
+ Java Standard Library,``java.*``,3,614,130,28,,,7,,,10
- Totals,,217,8449,1563,129,6,10,107,33,1,86
+ Totals,,217,8461,1563,129,6,10,107,33,1,86
- java.io,37,,40,,15,,,,,,,,,,,,,,,,,,,,,,,,,,,22,,,,,,,,40,
+ java.io,37,,42,,15,,,,,,,,,,,,,,,,,,,,,,,,,,,22,,,,,,,,41,1
- java.lang,13,,75,,,,,,,,,,,,8,,,,,,4,,,1,,,,,,,,,,,,,,,,56,19
+ java.lang,13,,80,,,,,,,,,,,,8,,,,,,4,,,1,,,,,,,,,,,,,,,,53,27
- java.math,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,
- java.sql,11,,1,,,,,,,,4,,,,,,,,,,,,,,,,,7,,,,,,,,,,,,1,
+ java.sql,11,,2,,,,,,,,4,,,,,,,,,,,,,,,,,7,,,,,,,,,,,,1,1
- java.util,44,,461,,,,,,,,,,,,34,,,,,,,5,2,,1,2,,,,,,,,,,,,,,36,425
+ java.util,44,,466,,,,,,,,,,,,34,,,,,,,5,2,,1,2,,,,,,,,,,,,,,38,428 |
Click to show differences in coveragejavaGenerated file changes for java
- Java Standard Library,``java.*``,3,602,130,28,,,7,,,10
+ Java Standard Library,``java.*``,3,613,130,28,,,7,,,10
- Totals,,217,8449,1563,129,6,10,107,33,1,86
+ Totals,,217,8460,1563,129,6,10,107,33,1,86
- java.io,37,,40,,15,,,,,,,,,,,,,,,,,,,,,,,,,,,22,,,,,,,,40,
+ java.io,37,,42,,15,,,,,,,,,,,,,,,,,,,,,,,,,,,22,,,,,,,,41,1
- java.lang,13,,75,,,,,,,,,,,,8,,,,,,4,,,1,,,,,,,,,,,,,,,,56,19
+ java.lang,13,,80,,,,,,,,,,,,8,,,,,,4,,,1,,,,,,,,,,,,,,,,53,27
- java.math,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,
- java.sql,11,,1,,,,,,,,4,,,,,,,,,,,,,,,,,7,,,,,,,,,,,,1,
+ java.sql,11,,2,,,,,,,,4,,,,,,,,,,,,,,,,,7,,,,,,,,,,,,1,1
- java.util,44,,461,,,,,,,,,,,,34,,,,,,,5,2,,1,2,,,,,,,,,,,,,,36,425
+ java.util,44,,465,,,,,,,,,,,,34,,,,,,,5,2,,1,2,,,,,,,,,,,,,,38,427 |
michaelnebel
left a comment
There was a problem hiding this comment.
Looks good to me!
Minor: Added a comment about List.clear and Map.clear.
Click to show differences in coveragejavaGenerated file changes for java
- Java Standard Library,``java.*``,3,602,130,28,,,7,,,10
+ Java Standard Library,``java.*``,3,613,130,28,,,7,,,10
- Totals,,217,8449,1563,129,6,10,107,33,1,86
+ Totals,,217,8460,1563,129,6,10,107,33,1,86
- java.io,37,,40,,15,,,,,,,,,,,,,,,,,,,,,,,,,,,22,,,,,,,,40,
+ java.io,37,,42,,15,,,,,,,,,,,,,,,,,,,,,,,,,,,22,,,,,,,,41,1
- java.lang,13,,75,,,,,,,,,,,,8,,,,,,4,,,1,,,,,,,,,,,,,,,,56,19
+ java.lang,13,,80,,,,,,,,,,,,8,,,,,,4,,,1,,,,,,,,,,,,,,,,53,27
- java.math,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,
- java.sql,11,,1,,,,,,,,4,,,,,,,,,,,,,,,,,7,,,,,,,,,,,,1,
+ java.sql,11,,2,,,,,,,,4,,,,,,,,,,,,,,,,,7,,,,,,,,,,,,1,1
- java.util,44,,461,,,,,,,,,,,,34,,,,,,,5,2,,1,2,,,,,,,,,,,,,,36,425
+ java.util,44,,465,,,,,,,,,,,,34,,,,,,,5,2,,1,2,,,,,,,,,,,,,,38,427 |
Click to show differences in coveragejavaGenerated file changes for java
- Java Standard Library,``java.*``,3,602,130,28,,,7,,,10
+ Java Standard Library,``java.*``,3,609,130,28,,,7,,,10
- Totals,,217,8449,1563,129,6,10,107,33,1,86
+ Totals,,217,8456,1563,129,6,10,107,33,1,86
- java.io,37,,40,,15,,,,,,,,,,,,,,,,,,,,,,,,,,,22,,,,,,,,40,
+ java.io,37,,42,,15,,,,,,,,,,,,,,,,,,,,,,,,,,,22,,,,,,,,41,1
- java.lang,13,,75,,,,,,,,,,,,8,,,,,,4,,,1,,,,,,,,,,,,,,,,56,19
+ java.lang,13,,76,,,,,,,,,,,,8,,,,,,4,,,1,,,,,,,,,,,,,,,,53,23
- java.math,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,
- java.sql,11,,1,,,,,,,,4,,,,,,,,,,,,,,,,,7,,,,,,,,,,,,1,
+ java.sql,11,,2,,,,,,,,4,,,,,,,,,,,,,,,,,7,,,,,,,,,,,,1,1
- java.util,44,,461,,,,,,,,,,,,34,,,,,,,5,2,,1,2,,,,,,,,,,,,,,36,425
+ java.util,44,,465,,,,,,,,,,,,34,,,,,,,5,2,,1,2,,,,,,,,,,,,,,38,427 |
atorralba
left a comment
There was a problem hiding this comment.
Thanks for all the effort! 🙏
Description:
This PR adds missing MaD models for the next 100 top JDK APIs. (The first 100 were reviewed and modeled in #11572).
Consideration:
Please review the added models in detail, especially the following:
java.lang.String#endsWithhave an existing summary model instead of a neutral model? It returns a boolean, so I thought it should have a neutral model. Should I leave this one as a summary model or switch it to a neutral model?java.lang.System#getProperty(String)look correct? I couldn't seem to get a working test case for this one.java.lang.Class#getClassLoader()java.text.DateFormat#format(Date)java.text.SimpleDateFormat#SimpleDateFormat(String)java.time.LocalDate#of(int,int,int)java.util.function.Consumer#accept(Object)java.util.Date#Date(long)java.util.stream.Collectors#joining(CharSequence)java.util.stream.Collectors#toMap(Function,Function)