File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 88 * @tags internal extract automodel application-mode negative examples
99 */
1010
11+ private import java
1112private import AutomodelApplicationModeCharacteristics
1213private import AutomodelEndpointTypes
1314private import AutomodelSharedUtil
@@ -19,7 +20,14 @@ bindingset[limit]
1920Endpoint getSampleForCharacteristic ( EndpointCharacteristic c , int limit ) {
2021 exists ( int n |
2122 result =
22- rank [ n ] ( Endpoint e2 | c .appliesToEndpoint ( e2 ) | e2 order by e2 .getLocation ( ) .toString ( ) ) and
23+ rank [ n ] ( Endpoint e , Location loc |
24+ loc = e .getLocation ( ) and c .appliesToEndpoint ( e )
25+ |
26+ e
27+ order by
28+ loc .getFile ( ) .getAbsolutePath ( ) , loc .getStartLine ( ) , loc .getStartColumn ( ) ,
29+ loc .getEndLine ( ) , loc .getEndColumn ( )
30+ ) and
2331 // we order the endpoints by location, but (to avoid bias) we select the indices semi-randomly
2432 n = 1 + ( ( [ 1 .. limit ] * 271 ) % count ( Endpoint e | c .appliesToEndpoint ( e ) ) )
2533 )
You can’t perform that action at this time.
0 commit comments