@@ -128,28 +128,27 @@ ASTNode getAnASTNodeWithAFeature(Function f) {
128128}
129129
130130int getNumCharsInFunction ( Function f ) {
131- result = strictsum ( int i |
132- exists ( ASTNode node | node = getAnASTNodeWithAFeature ( f ) and i = getTokenizedAstNode ( node ) .length ( ) ) |
133- i
134- )
131+ result =
132+ strictsum ( ASTNode node | node = getAnASTNodeWithAFeature ( f ) | getTokenizedAstNode ( node ) .length ( ) )
135133}
136134
137135// Evaluator string limit is 5395415 characters. We choose a limit lower than this.
138136private int getMaxChars ( ) { result = 1000000 }
139137
140138Function getFeaturizableFunction ( Function f ) {
141- result = f and getNumCharsInFunction ( f ) <= getMaxChars ( )
139+ result = f and getNumCharsInFunction ( f ) <= getMaxChars ( )
142140}
143141
144142/**
145143 * Returns a featurized representation of the function that can be used to populate the
146144 * `enclosingFunctionBody` feature for an endpoint.
147145 */
148146string getBodyTokensFeature ( Function function ) {
149- // Performance optimization: If a function has more than getMaxChars() characters in its body subtokens,
147+ // Performance optimization: If a function has more than getMaxChars() characters in its body subtokens,
150148 // then featurize it as absent.
151149 function = getFeaturizableFunction ( function ) and
152- result = strictconcat ( Location l , string token |
150+ result =
151+ strictconcat ( Location l , string token |
153152 // The use of a nested exists here allows us to avoid duplicates due to two AST nodes in the
154153 // same location featurizing to the same token. By using a nested exists, we take only unique
155154 // (location, token) pairs.
0 commit comments