<div dir="ltr">Hi.<div><br><div>I am a graduate student in the Dept of CSE, IIT Madras, India. We are working on a tool called CCAP (Collection Class Access oPtimization) that tries to analyze/optimize Java programs that use Java collection class libraries. The tool works by identifying certain types of patterns of invocations of collection-class library functions in the Java programs and then replacing those series of function calls with a single function that does all the operations of the pattern together, in a more efficient manner. We have analyzed your project (from GitHub) using our tool. Here are our findings:</div><div><br></div><div><div>File <b>src/java.base/share/classes/java/util/stream/Collectors.java</b> addAll (Line num:1930), retainAll (Line num:1931) --> replace with addAll_retainAll (Line num:1931).</div><div>File
<b>test/jdk/java/lang/reflect/AccessControl/AccessControlTest.java</b> copyOf (267), retainAll (268) --> replace with copyOf_retainAll (268).<br></div><div><br></div><div>Here, </div><div><br></div><div>addAll_retainAll method will merge both addAll and retainAll operation into a single operation so that there is no need to go through elements twice in the worst case.<br></div><div><br></div><div>copyOf_retainAll method will merge both copyOf and retainAll operation into a single operation so that there is no need to go through elements in the copying collection twice.<br></div><div><br></div><div>........................................................................................................</div><div><br></div></div><div>We request you to kindly give us feedback (will take hardly 3-5 minutes) about our findings. That will be greatly appreciated.</div><div><br></div><div><a href="https://forms.gle/RN3ayVS2Xf7EmyHT6" target="_blank">https://forms.gle/RN3ayVS2Xf7EmyHT6</a></div></div></div>