id int64 1 889 | project_id stringclasses 17
values | bug_id stringclasses 163
values | class dict | method dict | tests listlengths 1 84 |
|---|---|---|---|---|---|
201 | Closure | 142 | {
"fields": [
{
"modifier": "",
"original_string": "private final AbstractCompiler compiler;",
"type": "AbstractCompiler",
"var_name": "compiler"
},
{
"modifier": "",
"original_string": "private final Deque<GraphColoring<Var, Void>> colorings;",
"type": "Deque<Gra... | {
"body": "@Override\n public void enterScope(NodeTraversal t) {\n // TODO(user): We CAN do this in the global scope, just need to be\n // careful when something is exported. Liveness uses bit-vector for live\n // sets so I don't see compilation time will be a problem for running this\n // pass in the gl... | [
{
"covered_lines": 13,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.CoalesceVariableNamesTest::testParameter4",
"total_lines": 13
},
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.parsing.JsDocInfoParserTest::testParseLicenseWithAnnotatio... |
202 | Closure | 142 | {
"fields": [
{
"modifier": "",
"original_string": "private final JsDocTokenStream stream;",
"type": "JsDocTokenStream",
"var_name": "stream"
},
{
"modifier": "",
"original_string": "private final JSTypeRegistry typeRegistry;",
"type": "JSTypeRegistry",
"var... | {
"body": "@SuppressWarnings(\"fallthrough\")\n private ExtractionInfo extractMultilineTextualBlock(JsDocToken token,\n WhitespaceOption option) {\n\n if (token == JsDocToken.EOC || token == JsDocToken.EOL ||\n token == JsDocToken.EOF) {\n return ne... | [
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.CoalesceVariableNamesTest::testParameter4",
"total_lines": 44
},
{
"covered_lines": 27,
"line_coverage": 0.6136,
"name": "com.google.javascript.jscomp.parsing.JsDocInfoParserTest::testParseLicenseWithAnno... |
203 | Closure | 143 | {
"fields": [
{
"modifier": "",
"original_string": "private final CommandLineConfig config;",
"type": "CommandLineConfig",
"var_name": "config"
},
{
"modifier": "",
"original_string": "private PrintStream out;",
"type": "PrintStream",
"var_name": "out"
}... | {
"body": "@VisibleForTesting\n static void createDefineReplacements(List<String> definitions,\n CompilerOptions options) {\n // Parse the definitions\n for (String override : definitions) {\n String[] assignment = override.split(\"=\", 2);\n String defName = assignment[0];\n\n if (defName.... | [
{
"covered_lines": 14,
"line_coverage": 0.4828,
"name": "com.google.javascript.jscomp.CommandLineRunnerTest::testDefineFlag3",
"total_lines": 29
},
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.RemoveConstantExpressionsTest::testCall1",
"total_li... |
204 | Closure | 144 | {
"fields": [
{
"modifier": "",
"original_string": "private final JSTypeRegistry registry;",
"type": "JSTypeRegistry",
"var_name": "registry"
},
{
"modifier": "",
"original_string": "private String name = null;",
"type": "String",
"var_name": "name"
},
... | {
"body": "public FunctionBuilder withReturnType(JSType returnType, boolean inferred) {\n this.returnType = returnType;\n this.inferredReturnType = inferred;\n return this;\n }",
"class_method_signature": "FunctionBuilder.withReturnType(JSType returnType, boolean inferred)",
"constructor": false,
"ful... | [
{
"covered_lines": 2,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.CodePrinterTest::testTypeAnnotationsAssign",
"total_lines": 2
},
{
"covered_lines": 2,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.CodePrinterTest::testTypeAnnotationsMember",
"total_lin... |
205 | Closure | 144 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "private ArrowType call;",
"type": "ArrowType",
"var_name": "call"
... | {
"body": "FunctionType cloneWithNewReturnType(JSType newReturnType, boolean inferred) {\n return new FunctionType(\n registry, null, source,\n new ArrowType(\n registry, call.parameters, newReturnType, inferred),\n typeOfThis, null, false, false);\n }",
"class_method_signature":... | [
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.CodePrinterTest::testTypeAnnotationsAssign",
"total_lines": 1
},
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.CodePrinterTest::testTypeAnnotationsMember",
"total_lin... |
206 | Closure | 144 | {
"fields": [
{
"modifier": "",
"original_string": "private final String fnName;",
"type": "String",
"var_name": "fnName"
},
{
"modifier": "",
"original_string": "private final AbstractCompiler compiler;",
"type": "AbstractCompiler",
"var_name": "compiler"
... | {
"body": "FunctionType buildAndRegister() {\n if (returnType == null) {\n returnType = typeRegistry.getNativeType(UNKNOWN_TYPE);\n }\n\n if (parametersNode == null) {\n throw new IllegalStateException(\n \"All Function types must have params and a return type\");\n }\n\n FunctionTyp... | [
{
"covered_lines": 8,
"line_coverage": 0.3333,
"name": "com.google.javascript.jscomp.CodePrinterTest::testTypeAnnotationsAssign",
"total_lines": 24
},
{
"covered_lines": 18,
"line_coverage": 0.75,
"name": "com.google.javascript.jscomp.CodePrinterTest::testTypeAnnotationsMember",
... |
207 | Closure | 144 | {
"fields": [
{
"modifier": "",
"original_string": "private final String fnName;",
"type": "String",
"var_name": "fnName"
},
{
"modifier": "",
"original_string": "private final AbstractCompiler compiler;",
"type": "AbstractCompiler",
"var_name": "compiler"
... | {
"body": "FunctionTypeBuilder inferReturnType(@Nullable JSDocInfo info) {\n returnType = info != null && info.hasReturnType() ?\n info.getReturnType().evaluate(scope, typeRegistry) : null;\n if (templateTypeName != null &&\n returnType != null &&\n returnType.restrictByNotNullOrUndefined()... | [
{
"covered_lines": 4,
"line_coverage": 0.5714,
"name": "com.google.javascript.jscomp.CodePrinterTest::testTypeAnnotationsAssign",
"total_lines": 7
},
{
"covered_lines": 5,
"line_coverage": 0.7143,
"name": "com.google.javascript.jscomp.CodePrinterTest::testTypeAnnotationsMember",
... |
208 | Closure | 145 | {
"fields": [
{
"modifier": "",
"original_string": "private static final char[] HEX_CHARS\n = { '0', '1', '2', '3', '4', '5', '6', '7',\n '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };",
"type": "char[]",
"var_name": "HEX_CHARS"
},
{
"modifier": "",
"original_s... | {
"body": "private boolean isOneExactlyFunctionOrDo(Node n) {\n if (n.getType() == Token.LABEL) {\n Node labeledStatement = n.getLastChild();\n if (labeledStatement.getType() != Token.BLOCK) {\n return isOneExactlyFunctionOrDo(labeledStatement);\n } else {\n // For labels with block ch... | [
{
"covered_lines": 1,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.CodePrinterTest::testFunctionSafariCompatiblity",
"total_lines": 1
},
{
"covered_lines": 1,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.CodePrinterTest::testDoLoopIECompatiblity",
"total... |
209 | Closure | 146 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "private boolean resolved = false;",
"type": "boolean",
"var_name": ... | {
"body": "public TypePair getTypesUnderInequality(JSType that) {\n // unions types\n if (that instanceof UnionType) {\n TypePair p = that.getTypesUnderInequality(this);\n return new TypePair(p.typeB, p.typeA);\n }\n\n // other types\n switch (this.testForEquality(that)) {\n case TRUE:\n... | [
{
"covered_lines": 3,
"line_coverage": 0.4286,
"name": "com.google.javascript.jscomp.SemanticReverseAbstractInterpreterTest::testEqCondition4",
"total_lines": 7
}
] |
210 | Closure | 147 | {
"fields": [
{
"modifier": "",
"original_string": "static final DiagnosticType GLOBAL_THIS = DiagnosticType.warning(\n \"JSC_USED_GLOBAL_THIS\",\n \"dangerous use of the global 'this' object\");",
"type": "DiagnosticType",
"var_name": "GLOBAL_THIS"
},
{
"modifier":... | {
"body": "public boolean shouldTraverse(NodeTraversal t, Node n, Node parent) {\n\n if (n.getType() == Token.FUNCTION) {\n // Don't traverse functions that are constructors or have the @this\n // or @override annotation.\n JSDocInfo jsDoc = getFunctionJsDocInfo(n);\n if (jsDoc != null &&\n ... | [
{
"covered_lines": 8,
"line_coverage": 0.3077,
"name": "com.google.javascript.jscomp.CheckGlobalThisTest::testIssue182a",
"total_lines": 26
},
{
"covered_lines": 8,
"line_coverage": 0.3077,
"name": "com.google.javascript.jscomp.CheckGlobalThisTest::testIssue182b",
"total_lines": ... |
211 | Closure | 148 | {
"fields": [
{
"modifier": "",
"original_string": "static final DiagnosticType DIVIDE_BY_0_ERROR = DiagnosticType.error(\n \"JSC_DIVIDE_BY_0_ERROR\",\n \"Divide by 0\");",
"type": "DiagnosticType",
"var_name": "DIVIDE_BY_0_ERROR"
},
{
"modifier": "",
"origina... | {
"body": "private Node tryFoldTypeof(Node originalTypeofNode) {\n Preconditions.checkArgument(originalTypeofNode.getType() == Token.TYPEOF);\n\n Node argumentNode = originalTypeofNode.getFirstChild();\n if (argumentNode == null || !NodeUtil.isLiteralValue(argumentNode)) {\n return originalTypeofNode;\n... | [
{
"covered_lines": 21,
"line_coverage": 0.9545,
"name": "com.google.javascript.jscomp.PeepholeFoldConstantsTest::testFoldTypeof",
"total_lines": 22
},
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.SourceMapTest::testGoldenOutput0",
"total_lines":... |
212 | Closure | 148 | {
"fields": [
{
"modifier": "",
"original_string": "private final static int UNMAPPED = -1;",
"type": "int",
"var_name": "UNMAPPED"
},
{
"modifier": "",
"original_string": "private List<Mapping> mappings = Lists.newArrayList();",
"type": "List<Mapping>",
"va... | {
"body": "void addMapping(Node node, Position startPosition, Position endPosition) {\n String sourceFile = (String)node.getProp(Node.SOURCEFILE_PROP);\n\n // If the node does not have an associated source file or\n // its line number is -1, then the node does not have sufficient\n // information for a ma... | [
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.PeepholeFoldConstantsTest::testFoldTypeof",
"total_lines": 29
},
{
"covered_lines": 25,
"line_coverage": 0.8621,
"name": "com.google.javascript.jscomp.SourceMapTest::testGoldenOutput0",
"total_lines":... |
213 | Closure | 148 | {
"fields": [
{
"modifier": "",
"original_string": "private final static int UNMAPPED = -1;",
"type": "int",
"var_name": "UNMAPPED"
},
{
"modifier": "",
"original_string": "private List<Mapping> mappings = Lists.newArrayList();",
"type": "List<Mapping>",
"va... | {
"body": "public void appendTo(Appendable out, String name) throws IOException {\n // Write the mappings out to the file. The format of the generated\n // source map is three sections, each deliminated by a magic comment.\n //\n // The first section contains an array for each line of the generated\n /... | [
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.PeepholeFoldConstantsTest::testFoldTypeof",
"total_lines": 16
},
{
"covered_lines": 16,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.SourceMapTest::testGoldenOutput0",
"total_lines": 16
... |
214 | Closure | 148 | {
"fields": [
{
"modifier": "",
"original_string": "private final static int UNMAPPED = -1;",
"type": "int",
"var_name": "UNMAPPED"
},
{
"modifier": "",
"original_string": "private List<Mapping> mappings = Lists.newArrayList();",
"type": "List<Mapping>",
"va... | {
"body": "private static String escapeString(String value) {\n return CodeGenerator.escapeToDoubleQuotedJsString(value);\n }",
"class_method_signature": "SourceMap.escapeString(String value)",
"constructor": false,
"full_signature": "private static String escapeString(String value)",
"identifier": "escap... | [
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.PeepholeFoldConstantsTest::testFoldTypeof",
"total_lines": 1
},
{
"covered_lines": 1,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.SourceMapTest::testGoldenOutput0",
"total_lines": 1
},... |
215 | Closure | 149 | {
"fields": [
{
"modifier": "",
"original_string": "private final CommandLineConfig config;",
"type": "CommandLineConfig",
"var_name": "config"
},
{
"modifier": "",
"original_string": "private Appendable out;",
"type": "Appendable",
"var_name": "out"
},
... | {
"body": "final protected void setRunOptions(CompilerOptions options)\n throws FlagUsageException, IOException {\n DiagnosticGroups diagnosticGroups = getDiagnosticGroups();\n\n diagnosticGroups.setWarningLevels(\n options, config.jscompError, CheckLevel.ERROR);\n diagnosticGroups.setWarningLeve... | [
{
"covered_lines": 20,
"line_coverage": 0.8,
"name": "com.google.javascript.jscomp.CommandLineRunnerTest::testCharSetExpansion",
"total_lines": 25
}
] |
216 | Closure | 149 | {
"fields": [
{
"modifier": "",
"original_string": "private final Flags flags = new Flags();",
"type": "Flags",
"var_name": "flags"
},
{
"modifier": "",
"original_string": "private boolean isConfigValid = false;",
"type": "boolean",
"var_name": "isConfigVali... | {
"body": "@Override\n protected CompilerOptions createOptions() {\n CompilerOptions options = new CompilerOptions();\n options.setCodingConvention(new ClosureCodingConvention());\n CompilationLevel level = flags.compilation_level;\n level.setOptionsForCompilationLevel(options);\n if (flags.debug) {\n... | [
{
"covered_lines": 11,
"line_coverage": 0.7857,
"name": "com.google.javascript.jscomp.CommandLineRunnerTest::testCharSetExpansion",
"total_lines": 14
}
] |
217 | Closure | 151 | {
"fields": [
{
"modifier": "",
"original_string": "private final Flags flags = new Flags();",
"type": "Flags",
"var_name": "flags"
},
{
"modifier": "",
"original_string": "private static final String configResource =\n \"com.google.javascript.jscomp.parsing.Parser... | {
"body": "private void initConfigFromFlags(String[] args, PrintStream err) {\n // Args4j has a different format that the old command-line parser.\n // So we use some voodoo to get the args into the format that args4j\n // expects.\n Pattern argPattern = Pattern.compile(\"(--[a-zA-Z_]+)=(.*)\");\n Patt... | [
{
"covered_lines": 17,
"line_coverage": 0.2982,
"name": "com.google.javascript.jscomp.CommandLineRunnerTest::testVersionFlag",
"total_lines": 57
}
] |
218 | Closure | 152 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "private ArrowType call;",
"type": "ArrowType",
"var_name": "call"
... | {
"body": "@Override\n JSType resolveInternal(ErrorReporter t, StaticScope<JSType> scope) {\n setResolvedTypeInternal(this);\n\n call = (ArrowType) safeResolve(call, t, scope);\n prototype = (FunctionPrototypeType) safeResolve(prototype, t, scope);\n\n // Warning about typeOfThis if it doesn't resolve to... | [
{
"covered_lines": 10,
"line_coverage": 0.5882,
"name": "com.google.javascript.jscomp.TypeCheckTest::testBackwardsTypedefUse1",
"total_lines": 17
},
{
"covered_lines": 10,
"line_coverage": 0.5882,
"name": "com.google.javascript.jscomp.TypeCheckTest::testBackwardsTypedefUse2",
"to... |
219 | Closure | 153 | {
"fields": [
{
"modifier": "",
"original_string": "private final AbstractCompiler compiler;",
"type": "AbstractCompiler",
"var_name": "compiler"
},
{
"modifier": "",
"original_string": "private Scope scope;",
"type": "Scope",
"var_name": "scope"
},
... | {
"body": "private void declareVar(Node n) {\n Preconditions.checkState(n.getType() == Token.NAME);\n\n CompilerInput input = compiler.getInput(sourceName);\n String name = n.getString();\n if (scope.isDeclared(name, false)\n || (scope.isLocal() && name.equals(ARGUMENTS))) {\n redeclarationHan... | [
{
"covered_lines": 5,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.NormalizeTest::testDuplicateVarInExterns",
"total_lines": 5
},
{
"covered_lines": 5,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.NormalizeTest::testMakeLocalNamesUnique",
"total_lines": ... |
220 | Closure | 153 | {
"fields": [
{
"modifier": "",
"original_string": "private final AbstractCompiler compiler;",
"type": "AbstractCompiler",
"var_name": "compiler"
},
{
"modifier": "",
"original_string": "private Scope scope;",
"type": "Scope",
"var_name": "scope"
},
... | {
"body": "private void scanRoot(Node n, Scope parent) {\n if (n.getType() == Token.FUNCTION) {\n sourceName = (String) n.getProp(Node.SOURCENAME_PROP);\n\n final Node fnNameNode = n.getFirstChild();\n final Node args = fnNameNode.getNext();\n final Node body = args.getNext();\n\n // Bleed... | [
{
"covered_lines": 4,
"line_coverage": 0.2222,
"name": "com.google.javascript.jscomp.NormalizeTest::testDuplicateVarInExterns",
"total_lines": 18
},
{
"covered_lines": 18,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.NormalizeTest::testMakeLocalNamesUnique",
"total_l... |
221 | Closure | 153 | {
"fields": [
{
"modifier": "",
"original_string": "private final AbstractCompiler compiler;",
"type": "AbstractCompiler",
"var_name": "compiler"
},
{
"modifier": "",
"original_string": "private Scope scope;",
"type": "Scope",
"var_name": "scope"
},
... | {
"body": "private void scanVars(Node n, Node parent) {\n switch (n.getType()) {\n case Token.VAR:\n // Declare all variables. e.g. var x = 1, y, z;\n for (Node child = n.getFirstChild();\n child != null;) {\n Node next = child.getNext();\n declareVar(child);\n ... | [
{
"covered_lines": 19,
"line_coverage": 0.5758,
"name": "com.google.javascript.jscomp.NormalizeTest::testDuplicateVarInExterns",
"total_lines": 33
},
{
"covered_lines": 31,
"line_coverage": 0.9394,
"name": "com.google.javascript.jscomp.NormalizeTest::testMakeLocalNamesUnique",
"t... |
222 | Closure | 154 | {
"fields": [
{
"modifier": "",
"original_string": "private final AbstractCompiler compiler;",
"type": "AbstractCompiler",
"var_name": "compiler"
},
{
"modifier": "",
"original_string": "private final JSTypeRegistry typeRegistry;",
"type": "JSTypeRegistry",
... | {
"body": "private void expectInterfaceProperty(NodeTraversal t, Node n,\n ObjectType instance, ObjectType implementedInterface, String prop) {\n if (!instance.hasProperty(prop)) {\n // Not implemented\n String sourceName = (String) n.getProp(Node.SOURCENAME_PROP);\n sourceName = sourceName == ... | [
{
"covered_lines": 2,
"line_coverage": 0.25,
"name": "com.google.javascript.jscomp.TypeCheckTest::testInterfaceInheritanceCheck12",
"total_lines": 8
}
] |
223 | Closure | 155 | {
"fields": [
{
"modifier": "",
"original_string": "private final Map<Var, ReferenceCollection> referenceMap =\n Maps.newHashMap();",
"type": "Map<Var, ReferenceCollection>",
"var_name": "referenceMap"
},
{
"modifier": "",
"original_string": "private final Deque<Ba... | {
"body": "public void visit(NodeTraversal t, Node n, Node parent) {\n if (n.getType() == Token.NAME) {\n Var v;\n if (n.getString().equals(\"arguments\")) {\n v = t.getScope().getArgumentsVar();\n } else {\n v = t.getScope().getVar(n.getString());\n }\n if (v != null && varF... | [
{
"covered_lines": 7,
"line_coverage": 0.875,
"name": "com.google.javascript.jscomp.InlineVariablesTest::testArgumentsModifiedInInnerFunction",
"total_lines": 8
},
{
"covered_lines": 7,
"line_coverage": 0.875,
"name": "com.google.javascript.jscomp.InlineVariablesTest::testArgumentsMo... |
224 | Closure | 156 | {
"fields": [
{
"modifier": "",
"original_string": "static final DiagnosticType UNSAFE_NAMESPACE_WARNING =\n DiagnosticType.warning(\n \"JSC_UNSAFE_NAMESPACE\",\n \"incomplete alias created for namespace {0}\");",
"type": "DiagnosticType",
"var_name": "UNSAFE_NAMESPA... | {
"body": "private void collapseDeclarationOfNameAndDescendants(Name n, String alias) {\n boolean canCollapseChildNames = n.canCollapseUnannotatedChildNames();\n\n // Handle this name first so that nested object literals get unrolled.\n if (n.canCollapse()) {\n updateObjLitOrFunctionDeclaration(n, alias... | [
{
"covered_lines": 10,
"line_coverage": 0.7143,
"name": "com.google.javascript.jscomp.CollapsePropertiesTest::testAliasedTopLevelEnum",
"total_lines": 14
},
{
"covered_lines": 10,
"line_coverage": 0.7143,
"name": "com.google.javascript.jscomp.CollapsePropertiesTest::testIssue389",
... |
225 | Closure | 156 | {
"fields": [
{
"modifier": "",
"original_string": "static final DiagnosticType UNSAFE_NAMESPACE_WARNING =\n DiagnosticType.warning(\n \"JSC_UNSAFE_NAMESPACE\",\n \"incomplete alias created for namespace {0}\");",
"type": "DiagnosticType",
"var_name": "UNSAFE_NAMESPA... | {
"body": "private void updateFunctionDeclarationAtFunctionNode(\n Name n, boolean canCollapseChildNames) {\n if (!canCollapseChildNames) {\n return;\n }\n\n Ref ref = n.declaration;\n String fnName = ref.node.getString();\n addStubsForUndeclaredProperties(\n n, fnName, ref.node.getAnc... | [
{
"covered_lines": 5,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.CollapsePropertiesTest::testAliasedTopLevelEnum",
"total_lines": 5
},
{
"covered_lines": 5,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.CollapsePropertiesTest::testIssue389",
"total_line... |
226 | Closure | 156 | {
"fields": [
{
"modifier": "",
"original_string": "static final DiagnosticType UNSAFE_NAMESPACE_WARNING =\n DiagnosticType.warning(\n \"JSC_UNSAFE_NAMESPACE\",\n \"incomplete alias created for namespace {0}\");",
"type": "DiagnosticType",
"var_name": "UNSAFE_NAMESPA... | {
"body": "private void updateObjLitOrFunctionDeclaration(\n Name n, String alias, boolean canCollapseChildNames) {\n if (n.declaration == null) {\n // Some names do not have declarations, because they\n // are only defined in local scopes.\n return;\n }\n\n if (n.declaration.getTwin() !=... | [
{
"covered_lines": 5,
"line_coverage": 0.4545,
"name": "com.google.javascript.jscomp.CollapsePropertiesTest::testAliasedTopLevelEnum",
"total_lines": 11
},
{
"covered_lines": 5,
"line_coverage": 0.4545,
"name": "com.google.javascript.jscomp.CollapsePropertiesTest::testIssue389",
... |
227 | Closure | 157 | {
"fields": [
{
"modifier": "",
"original_string": "private static final char[] HEX_CHARS\n = { '0', '1', '2', '3', '4', '5', '6', '7',\n '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };",
"type": "char[]",
"var_name": "HEX_CHARS"
},
{
"modifier": "",
"original_s... | {
"body": "void add(Node n, Context context) {\n if (!cc.continueProcessing()) {\n return;\n }\n\n int type = n.getType();\n String opstr = NodeUtil.opToStr(type);\n int childCount = n.getChildCount();\n Node first = n.getFirstChild();\n Node last = n.getLastChild();\n\n // Handle all bin... | [
{
"covered_lines": 2,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.CodePrinterTest::testObjectLit2",
"total_lines": 2
},
{
"covered_lines": 2,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.CodePrinterTest::testObjectLit3",
"total_lines": 2
},
{
"c... |
228 | Closure | 158 | {
"fields": [
{
"modifier": "",
"original_string": "private final CommandLineConfig config;",
"type": "CommandLineConfig",
"var_name": "config"
},
{
"modifier": "",
"original_string": "private Appendable out;",
"type": "Appendable",
"var_name": "out"
},
... | {
"body": "final protected void setRunOptions(CompilerOptions options)\n throws FlagUsageException, IOException {\n DiagnosticGroups diagnosticGroups = getDiagnosticGroups();\n\n if (config.warningGuards != null) {\n for (WarningGuardSpec.Entry entry : config.warningGuards.entries) {\n diagnost... | [
{
"covered_lines": 32,
"line_coverage": 0.7442,
"name": "com.google.javascript.jscomp.CommandLineRunnerTest::testWarningGuardOrdering2",
"total_lines": 43
},
{
"covered_lines": 32,
"line_coverage": 0.7442,
"name": "com.google.javascript.jscomp.CommandLineRunnerTest::testWarningGuardO... |
229 | Closure | 158 | {
"fields": [
{
"modifier": "",
"original_string": "private final Flags flags = new Flags();",
"type": "Flags",
"var_name": "flags"
},
{
"modifier": "",
"original_string": "private static final String configResource =\n \"com.google.javascript.jscomp.parsing.Parser... | {
"body": "private void initConfigFromFlags(String[] args, PrintStream err) {\n\n List<String> processedArgs = processArgs(args);\n\n CmdLineParser parser = new CmdLineParser(flags);\n Flags.warningGuardSpec.clear();\n isConfigValid = true;\n try {\n parser.parseArgument(processedArgs.toArray(new ... | [
{
"covered_lines": 42,
"line_coverage": 0.7368,
"name": "com.google.javascript.jscomp.CommandLineRunnerTest::testWarningGuardOrdering2",
"total_lines": 57
},
{
"covered_lines": 42,
"line_coverage": 0.7368,
"name": "com.google.javascript.jscomp.CommandLineRunnerTest::testWarningGuardO... |
230 | Closure | 159 | {
"fields": [
{
"modifier": "",
"original_string": "private final Map<String, FunctionState> fns = Maps.newHashMap();",
"type": "Map<String, FunctionState>",
"var_name": "fns"
},
{
"modifier": "",
"original_string": "private final Map<Node, String> anonFns = Maps.newHas... | {
"body": "private void findCalledFunctions(\n Node node, Set<String> changed) {\n Preconditions.checkArgument(changed != null);\n // For each referenced function, add a new reference\n if (node.getType() == Token.NAME) {\n if (isCandidateUsage(node)) {\n changed.add(node.getString());\n ... | [
{
"covered_lines": 8,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.InlineFunctionsTest::testIssue423",
"total_lines": 8
}
] |
231 | Closure | 160 | {
"fields": [
{
"modifier": "",
"original_string": "static final DiagnosticType MODULE_DEPENDENCY_ERROR =\n DiagnosticType.error(\"JSC_MODULE_DEPENDENCY_ERROR\",\n \"Bad dependency: {0} -> {1}. \"\n + \"Modules must be listed in dependency order.\");",
"type": "Diagnos... | {
"body": "public void initOptions(CompilerOptions options) {\n this.options = options;\n if (errorManager == null) {\n if (outStream == null) {\n setErrorManager(\n new LoggerErrorManager(createMessageFormatter(), logger));\n } else {\n PrintStreamErrorManager printer =\n ... | [
{
"covered_lines": 21,
"line_coverage": 0.7778,
"name": "com.google.javascript.jscomp.CommandLineRunnerTest::testCheckSymbolsOverrideForQuiet",
"total_lines": 27
}
] |
232 | Closure | 161 | {
"fields": [
{
"modifier": "",
"original_string": "static final DiagnosticType INVALID_GETELEM_INDEX_ERROR =\n DiagnosticType.error(\n \"JSC_INVALID_GETELEM_INDEX_ERROR\",\n \"Array index not integer: {0}\");",
"type": "DiagnosticType",
"var_name": "INVALID_GETELEM_... | {
"body": "private Node tryFoldArrayAccess(Node n, Node left, Node right) {\n Node parent = n.getParent();\n // If GETPROP/GETELEM is used as assignment target the array literal is\n // acting as a temporary we can't fold it here:\n // \"[][0] += 1\"\n if (isAssignmentTarget(n)) {\n return n;\n... | [
{
"covered_lines": 11,
"line_coverage": 0.4783,
"name": "com.google.javascript.jscomp.PeepholeFoldConstantsTest::testIssue522",
"total_lines": 23
}
] |
233 | Closure | 163 | {
"fields": [
{
"modifier": "",
"original_string": "private static final Logger logger =\n Logger.getLogger(CrossModuleMethodMotion.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"modifier": "",
"original_string": "static final DiagnosticType NULL_CO... | {
"body": "private void moveMethods(Collection<NameInfo> allNameInfo) {\n boolean hasStubDeclaration = idGenerator.hasGeneratedAnyIds();\n for (NameInfo nameInfo : allNameInfo) {\n if (!nameInfo.isReferenced()) {\n // The code below can't do anything with unreferenced name\n // infos. They s... | [
{
"covered_lines": 47,
"line_coverage": 0.9038,
"name": "com.google.javascript.jscomp.CrossModuleMethodMotionTest::testIssue600b",
"total_lines": 52
},
{
"covered_lines": 47,
"line_coverage": 0.9038,
"name": "com.google.javascript.jscomp.CrossModuleMethodMotionTest::testIssue600e",
... |
234 | Closure | 164 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "final Node parameters;",
"type": "Node",
"var_name": "parameters"
... | {
"body": "@Override\n public boolean isSubtype(JSType other) {\n if (!(other instanceof ArrowType)) {\n return false;\n }\n\n ArrowType that = (ArrowType) other;\n\n // This is described in Draft 2 of the ES4 spec,\n // Section 3.4.7: Subtyping Function Types.\n\n // this.returnType <: that.r... | [
{
"covered_lines": 7,
"line_coverage": 0.28,
"name": "com.google.javascript.jscomp.LooseTypeCheckTest::testMethodInference7",
"total_lines": 25
},
{
"covered_lines": 7,
"line_coverage": 0.28,
"name": "com.google.javascript.jscomp.TypeCheckTest::testMethodInference7",
"total_lines... |
235 | Closure | 165 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "private static final int PROPERTY_CHECKING_UNION_SIZE = 3000;",
"type": "... | {
"body": "public boolean canPropertyBeDefined(JSType type, String propertyName) {\n if (typesIndexedByProperty.containsKey(propertyName)) {\n for (JSType alt :\n typesIndexedByProperty.get(propertyName).getAlternates()) {\n JSType greatestSubtype = alt.getGreatestSubtype(type);\n ... | [
{
"covered_lines": 5,
"line_coverage": 0.7143,
"name": "com.google.javascript.jscomp.TypeCheckTest::testIssue725",
"total_lines": 7
}
] |
236 | Closure | 165 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "private final SortedMap<String, JSType> properties = Maps.newTreeMap();",
... | {
"body": "JSType getGreatestSubtypeHelper(JSType that) {\n if (that.isRecordType()) {\n RecordType thatRecord = that.toMaybeRecordType();\n RecordTypeBuilder builder = new RecordTypeBuilder(registry);\n builder.setSynthesized(true);\n\n // The greatest subtype consists of those *unique* proper... | [
{
"covered_lines": 14,
"line_coverage": 0.3784,
"name": "com.google.javascript.jscomp.TypeCheckTest::testIssue725",
"total_lines": 37
}
] |
237 | Closure | 165 | {
"fields": [
{
"modifier": "",
"original_string": "private boolean isEmpty = true;",
"type": "boolean",
"var_name": "isEmpty"
},
{
"modifier": "",
"original_string": "private boolean isDeclared = true;",
"type": "boolean",
"var_name": "isDeclared"
},
... | {
"body": "public JSType build() {\n // If we have an empty record, simply return the object type.\n if (isEmpty) {\n return registry.getNativeObjectType(JSTypeNative.OBJECT_TYPE);\n }\n\n return new RecordType(\n registry, Collections.unmodifiableMap(properties), isDeclared);\n }",
"clas... | [
{
"covered_lines": 3,
"line_coverage": 0.75,
"name": "com.google.javascript.jscomp.TypeCheckTest::testIssue725",
"total_lines": 4
}
] |
238 | Closure | 166 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "private final String className;",
"type": "String",
"var_name": "cl... | {
"body": "@Override\n public void matchConstraint(JSType constraint) {\n // We only want to match constraints on anonymous types.\n if (hasReferenceName()) {\n return;\n }\n\n // Handle the case where the constraint object is a record type.\n //\n // param constraint {{prop: (number|undefined... | [
{
"covered_lines": 3,
"line_coverage": 0.6,
"name": "com.google.javascript.jscomp.TypeInferenceTest::testRecordInference",
"total_lines": 5
},
{
"covered_lines": 3,
"line_coverage": 0.6,
"name": "com.google.javascript.jscomp.TypeInferenceTest::testIssue785",
"total_lines": 5
}
... |
239 | Closure | 167 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "private boolean resolved = false;",
"type": "boolean",
"var_name": ... | {
"body": "public JSType getRestrictedTypeGivenToBooleanOutcome(boolean outcome) {\n if (outcome && this == getNativeType(JSTypeNative.UNKNOWN_TYPE)) {\n return getNativeType(JSTypeNative.CHECKED_UNKNOWN_TYPE);\n }\n\n BooleanLiteralSet literals = getPossibleToBooleanOutcomes();\n if (literals.contai... | [
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.TypeCheckTest::testIssue783",
"total_lines": 4
},
{
"covered_lines": 3,
"line_coverage": 0.75,
"name": "com.google.javascript.jscomp.TypeCheckTest::testMissingProperty20",
"total_lines": 4
},
{
... |
240 | Closure | 167 | {
"fields": [
{
"modifier": "",
"original_string": "private static final Function<TypePair, TypePair> EQ =\n new Function<TypePair, TypePair>() {\n @Override\n public TypePair apply(TypePair p) {\n if (p.typeA == null || p.typeB == null) {\n return null;\n }\n ... | {
"body": "private FlowScope caseEquality(Node left, Node right, FlowScope blindScope,\n Function<TypePair, TypePair> merging) {\n // left type\n JSType leftType = getTypeIfRefinable(left, blindScope);\n boolean leftIsRefineable;\n if (leftType != null) {\n leftIsRefineable = true;\n } else {... | [
{
"covered_lines": 9,
"line_coverage": 0.6429,
"name": "com.google.javascript.jscomp.TypeCheckTest::testIssue783",
"total_lines": 14
},
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.TypeCheckTest::testMissingProperty20",
"total_lines": 14
},
... |
241 | Closure | 167 | {
"fields": [
{
"modifier": "",
"original_string": "private static final Function<TypePair, TypePair> EQ =\n new Function<TypePair, TypePair>() {\n @Override\n public TypePair apply(TypePair p) {\n if (p.typeA == null || p.typeB == null) {\n return null;\n }\n ... | {
"body": "private FlowScope caseNameOrGetProp(Node name, FlowScope blindScope,\n boolean outcome) {\n JSType type = getTypeIfRefinable(name, blindScope);\n if (type != null) {\n return maybeRestrictName(\n blindScope, name, type,\n type.getRestrictedTypeGivenToBooleanOutcome(outcome... | [
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.TypeCheckTest::testIssue783",
"total_lines": 8
},
{
"covered_lines": 7,
"line_coverage": 0.875,
"name": "com.google.javascript.jscomp.TypeCheckTest::testMissingProperty20",
"total_lines": 8
},
{
... |
242 | Closure | 167 | {
"fields": [
{
"modifier": "",
"original_string": "private static final Function<TypePair, TypePair> EQ =\n new Function<TypePair, TypePair>() {\n @Override\n public TypePair apply(TypePair p) {\n if (p.typeA == null || p.typeB == null) {\n return null;\n }\n ... | {
"body": "private FlowScope maybeRestrictTwoNames(\n FlowScope blindScope,\n Node left, JSType originalLeftType, JSType restrictedLeftType,\n Node right, JSType originalRightType, JSType restrictedRightType) {\n boolean shouldRefineLeft =\n restrictedLeftType != null && restrictedLeftType !=... | [
{
"covered_lines": 9,
"line_coverage": 0.9,
"name": "com.google.javascript.jscomp.TypeCheckTest::testIssue783",
"total_lines": 10
},
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.TypeCheckTest::testMissingProperty20",
"total_lines": 10
},
{
... |
243 | Closure | 169 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "final Node parameters;",
"type": "Node",
"var_name": "parameters"
... | {
"body": "boolean checkArrowEquivalenceHelper(\n ArrowType that, EquivalenceMethod eqMethod) {\n // Please keep this method in sync with the hashCode() method below.\n if (!returnType.checkEquivalenceHelper(that.returnType, eqMethod)) {\n return false;\n }\n return hasEqualParameters(that, eqMe... | [
{
"covered_lines": 3,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.TypeCheckTest::testIssue791",
"total_lines": 3
},
{
"covered_lines": 2,
"line_coverage": 0.6667,
"name": "com.google.javascript.rhino.jstype.RecordTypeTest::testSubtypeWithUnknowns2",
"total_lines": 3... |
244 | Closure | 169 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "final Node parameters;",
"type": "Node",
"var_name": "parameters"
... | {
"body": "boolean hasEqualParameters(ArrowType that, EquivalenceMethod eqMethod) {\n Node thisParam = parameters.getFirstChild();\n Node otherParam = that.parameters.getFirstChild();\n while (thisParam != null && otherParam != null) {\n JSType thisParamType = thisParam.getJSType();\n JSType otherP... | [
{
"covered_lines": 12,
"line_coverage": 0.8,
"name": "com.google.javascript.jscomp.TypeCheckTest::testIssue791",
"total_lines": 15
},
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.rhino.jstype.RecordTypeTest::testSubtypeWithUnknowns2",
"total_lines": 15... |
245 | Closure | 169 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "private boolean resolved = false;",
"type": "boolean",
"var_name": ... | {
"body": "boolean checkEquivalenceHelper(JSType that, EquivalenceMethod eqMethod) {\n if (this == that) {\n return true;\n }\n\n boolean thisUnknown = isUnknownType();\n boolean thatUnknown = that.isUnknownType();\n if (thisUnknown || thatUnknown) {\n if (eqMethod == EquivalenceMethod.INVARI... | [
{
"covered_lines": 21,
"line_coverage": 0.4667,
"name": "com.google.javascript.jscomp.TypeCheckTest::testIssue791",
"total_lines": 45
},
{
"covered_lines": 23,
"line_coverage": 0.5111,
"name": "com.google.javascript.rhino.jstype.RecordTypeTest::testSubtypeWithUnknowns2",
"total_l... |
246 | Closure | 169 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "private boolean resolved = false;",
"type": "boolean",
"var_name": ... | {
"body": "public final boolean isEquivalentTo(JSType that) {\n return checkEquivalenceHelper(that, EquivalenceMethod.IDENTITY);\n }",
"class_method_signature": "JSType.isEquivalentTo(JSType that)",
"constructor": false,
"full_signature": "public final boolean isEquivalentTo(JSType that)",
"identifier": "... | [
{
"covered_lines": 1,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.TypeCheckTest::testIssue791",
"total_lines": 1
},
{
"covered_lines": 1,
"line_coverage": 1,
"name": "com.google.javascript.rhino.jstype.RecordTypeTest::testSubtypeWithUnknowns2",
"total_lines": 1
}
... |
247 | Closure | 169 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "private boolean resolved = false;",
"type": "boolean",
"var_name": ... | {
"body": "public final boolean isInvariant(JSType that) {\n return checkEquivalenceHelper(that, EquivalenceMethod.INVARIANT);\n }",
"class_method_signature": "JSType.isInvariant(JSType that)",
"constructor": false,
"full_signature": "public final boolean isInvariant(JSType that)",
"identifier": "isInvari... | [
{
"covered_lines": 1,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.TypeCheckTest::testIssue791",
"total_lines": 1
},
{
"covered_lines": 1,
"line_coverage": 1,
"name": "com.google.javascript.rhino.jstype.RecordTypeTest::testSubtypeWithUnknowns2",
"total_lines": 1
}
... |
248 | Closure | 169 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "private final SortedMap<String, JSType> properties = Maps.newTreeMap();",
... | {
"body": "boolean checkRecordEquivalenceHelper(\n RecordType otherRecord, EquivalenceMethod eqMethod) {\n Set<String> keySet = properties.keySet();\n Map<String, JSType> otherProps = otherRecord.properties;\n if (!otherProps.keySet().equals(keySet)) {\n return false;\n }\n for (String key : ... | [
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.TypeCheckTest::testIssue791",
"total_lines": 10
},
{
"covered_lines": 7,
"line_coverage": 0.7,
"name": "com.google.javascript.rhino.jstype.RecordTypeTest::testSubtypeWithUnknowns2",
"total_lines": 10
... |
249 | Closure | 169 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "private final SortedMap<String, JSType> properties = Maps.newTreeMap();",
... | {
"body": "static boolean isSubtype(ObjectType typeA, RecordType typeB) {\n // typeA is a subtype of record type typeB iff:\n // 1) typeA has all the properties declared in typeB.\n // 2) And for each property of typeB,\n // 2a) if the property of typeA is declared, it must be equal\n // to t... | [
{
"covered_lines": 8,
"line_coverage": 0.6154,
"name": "com.google.javascript.jscomp.TypeCheckTest::testIssue791",
"total_lines": 13
},
{
"covered_lines": 9,
"line_coverage": 0.6923,
"name": "com.google.javascript.rhino.jstype.RecordTypeTest::testSubtypeWithUnknowns2",
"total_lin... |
250 | Closure | 170 | {
"fields": [
{
"modifier": "",
"original_string": "private final AbstractCompiler compiler;",
"type": "AbstractCompiler",
"var_name": "compiler"
},
{
"modifier": "",
"original_string": "private final Set<Var> inlinedNewDependencies = Sets.newHashSet();",
"type": ... | {
"body": "@Override\n public void visit(NodeTraversal t, Node n, Node parent) {\n if (n.isName() && n.getString().equals(varName)) {\n // We make a special exception when the entire cfgNode is a chain\n // of assignments, since in that case the assignment statements\n ... | [
{
"covered_lines": 1,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.FlowSensitiveInlineVariablesTest::testVarAssinInsideHookIssue965",
"total_lines": 1
}
] |
251 | Closure | 171 | {
"fields": [
{
"modifier": "",
"original_string": "static final DiagnosticType FUNCTION_LITERAL_UNDEFINED_THIS =\n DiagnosticType.warning(\n \"JSC_FUNCTION_LITERAL_UNDEFINED_THIS\",\n \"Function literal argument refers to undefined this argument\");",
"type": "DiagnosticType",
... | {
"body": "private FlowScope traverseObjectLiteral(Node n, FlowScope scope) {\n JSType type = n.getJSType();\n Preconditions.checkNotNull(type);\n\n for (Node name = n.getFirstChild(); name != null; name = name.getNext()) {\n scope = traverse(name.getFirstChild(), scope);\n }\n\n // Object literal... | [
{
"covered_lines": 27,
"line_coverage": 0.7941,
"name": "com.google.javascript.jscomp.TypeCheckTest::testIssue1023",
"total_lines": 34
},
{
"covered_lines": 29,
"line_coverage": 0.8529,
"name": "com.google.javascript.jscomp.TypedScopeCreatorTest::testMethodBeforeFunction2",
"tota... |
252 | Closure | 173 | {
"fields": [
{
"modifier": "",
"original_string": "private static final String LT_ESCAPED = \"\\\\x3c\";",
"type": "String",
"var_name": "LT_ESCAPED"
},
{
"modifier": "",
"original_string": "private static final String GT_ESCAPED = \"\\\\x3e\";",
"type": "String"... | {
"body": "void add(Node n, Context context) {\n if (!cc.continueProcessing()) {\n return;\n }\n\n int type = n.getType();\n String opstr = NodeUtil.opToStr(type);\n int childCount = n.getChildCount();\n Node first = n.getFirstChild();\n Node last = n.getLastChild();\n\n // Handle all bin... | [
{
"covered_lines": 2,
"line_coverage": 1,
"name": "com.google.javascript.jscomp.CodePrinterTest::testPrint",
"total_lines": 2
},
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.CodePrinterTest::testIssue1062",
"total_lines": 2
},
{
"covered... |
253 | Closure | 173 | {
"fields": [
{
"modifier": "",
"original_string": "private static final CodeGenerator REGEXP_ESCAPER =\n CodeGenerator.forCostEstimation(\n null /* blow up if we try to produce code */);",
"type": "CodeGenerator",
"var_name": "REGEXP_ESCAPER"
},
{
"modifier": "... | {
"body": "@Override\n @SuppressWarnings(\"fallthrough\")\n public Node optimizeSubtree(Node node) {\n switch(node.getType()) {\n case Token.TRUE:\n case Token.FALSE:\n return reduceTrueFalse(node);\n\n case Token.NEW:\n node = tryFoldStandardConstructors(node);\n if (!node.is... | [
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.CodePrinterTest::testPrint",
"total_lines": 16
},
{
"covered_lines": 0,
"line_coverage": 0,
"name": "com.google.javascript.jscomp.CodePrinterTest::testIssue1062",
"total_lines": 16
},
{
"cover... |
254 | Closure | 174 | {
"fields": [
{
"modifier": "",
"original_string": "private static final Logger logger_ = Logger.getLogger(JsAst.class.getName());",
"type": "Logger",
"var_name": "logger_"
},
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 1L;",
... | {
"body": "private void parse(AbstractCompiler compiler) {\n int startErrorCount = compiler.getErrorManager().getErrorCount();\n try {\n ParserRunner.ParseResult result = ParserRunner.parse(sourceFile, sourceFile.getCode(),\n compiler.getParserConfig(),\n compiler.getDefaultErrorReporter(... | [
{
"covered_lines": 10,
"line_coverage": 0.7143,
"name": "com.google.javascript.jscomp.ScopedAliasesTest::testIssue1103a",
"total_lines": 14
},
{
"covered_lines": 11,
"line_coverage": 0.7857,
"name": "com.google.javascript.jscomp.ScopedAliasesTest::testIssue1103b",
"total_lines": ... |
255 | Closure | 175 | {
"fields": [
{
"modifier": "",
"original_string": "private final AbstractCompiler compiler;",
"type": "AbstractCompiler",
"var_name": "compiler"
},
{
"modifier": "",
"original_string": "private final boolean allowDecomposition;",
"type": "boolean",
"var_nam... | {
"body": "private CanInlineResult canInlineReferenceDirectly(\n Node callNode, Node fnNode, Set<String> namesToAlias) {\n if (!isDirectCallNodeReplacementPossible(fnNode)) {\n return CanInlineResult.NO;\n }\n\n // CALL NODE: [ NAME, ARG1, ARG2, ... ]\n Node cArg = callNode.getFirstChild().getNe... | [
{
"covered_lines": 14,
"line_coverage": 0.5833,
"name": "com.google.javascript.jscomp.FunctionInjectorTest::testIssue1101a",
"total_lines": 24
},
{
"covered_lines": 14,
"line_coverage": 0.5833,
"name": "com.google.javascript.jscomp.FunctionInjectorTest::testIssue1101b",
"total_li... |
256 | Closure | 175 | {
"fields": [
{
"modifier": "",
"original_string": "private final AbstractCompiler compiler;",
"type": "AbstractCompiler",
"var_name": "compiler"
},
{
"modifier": "",
"original_string": "private final boolean allowDecomposition;",
"type": "boolean",
"var_nam... | {
"body": "CanInlineResult canInlineReferenceToFunction(NodeTraversal t,\n Node callNode, Node fnNode, Set<String> needAliases,\n InliningMode mode, boolean referencesThis, boolean containsFunctions) {\n // TODO(johnlenz): This function takes too many parameter, without\n // context. Modify the API t... | [
{
"covered_lines": 5,
"line_coverage": 0.4167,
"name": "com.google.javascript.jscomp.FunctionInjectorTest::testIssue1101a",
"total_lines": 12
},
{
"covered_lines": 5,
"line_coverage": 0.4167,
"name": "com.google.javascript.jscomp.FunctionInjectorTest::testIssue1101b",
"total_line... |
257 | Closure | 176 | {
"fields": [
{
"modifier": "",
"original_string": "static final DiagnosticType FUNCTION_LITERAL_UNDEFINED_THIS =\n DiagnosticType.warning(\n \"JSC_FUNCTION_LITERAL_UNDEFINED_THIS\",\n \"Function literal argument refers to undefined this argument\");",
"type": "DiagnosticType",
... | {
"body": "private void updateScopeForTypeChange(\n FlowScope scope, Node left, JSType leftType, JSType resultType) {\n Preconditions.checkNotNull(resultType);\n switch (left.getType()) {\n case Token.NAME:\n String varName = left.getString();\n Var var = syntacticScope.getVar(varName);\... | [
{
"covered_lines": 17,
"line_coverage": 0.7727,
"name": "com.google.javascript.jscomp.TypeCheckTest::testIssue1056",
"total_lines": 22
}
] |
258 | Codec | 1 | {
"fields": [],
"file": "src/java/org/apache/commons/codec/language/Caverphone.java",
"identifier": "Caverphone",
"interfaces": "StringEncoder",
"superclass": ""
} | {
"body": "public String caverphone(String txt) {\n // NOTE: Version 1.0 of Caverphone is easily derivable from this code \n // by commenting out the 2.0 lines and adding in the 1.0 lines\n\n if( txt == null || txt.length() == 0 ) {\n return \"1111111111\";\n }\n\n // 1. ... | [
{
"covered_lines": 61,
"line_coverage": 0.9839,
"name": "org.apache.commons.codec.language.CaverphoneTest::testLocaleIndependence",
"total_lines": 62
},
{
"covered_lines": 0,
"line_coverage": 0,
"name": "org.apache.commons.codec.language.DoubleMetaphoneTest::testLocaleIndependence",
... |
259 | Codec | 1 | {
"fields": [
{
"modifier": "",
"original_string": "private static final String VOWELS = \"AEIOU\" ;",
"type": "String",
"var_name": "VOWELS"
},
{
"modifier": "",
"original_string": "private static final String FRONTV = \"EIY\" ;",
"type": "String",
"var_n... | {
"body": "public String metaphone(String txt) {\n boolean hard = false ;\n if ((txt == null) || (txt.length() == 0)) {\n return \"\" ;\n }\n // single character is itself\n if (txt.length() == 1) {\n return txt.toUpperCase(java.util.Locale.ENGLISH) ;\n ... | [
{
"covered_lines": 0,
"line_coverage": 0,
"name": "org.apache.commons.codec.language.CaverphoneTest::testLocaleIndependence",
"total_lines": 138
},
{
"covered_lines": 4,
"line_coverage": 0.029,
"name": "org.apache.commons.codec.language.DoubleMetaphoneTest::testLocaleIndependence",
... |
260 | Codec | 1 | {
"fields": [],
"file": "src/java/org/apache/commons/codec/language/SoundexUtils.java",
"identifier": "SoundexUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "static String clean(String str) {\n if (str == null || str.length() == 0) {\n return str;\n }\n int len = str.length();\n char[] chars = new char[len];\n int count = 0;\n for (int i = 0; i < len; i++) {\n if (Character.isLetter(str.charAt(i)))... | [
{
"covered_lines": 0,
"line_coverage": 0,
"name": "org.apache.commons.codec.language.CaverphoneTest::testLocaleIndependence",
"total_lines": 11
},
{
"covered_lines": 0,
"line_coverage": 0,
"name": "org.apache.commons.codec.language.DoubleMetaphoneTest::testLocaleIndependence",
"t... |
261 | Codec | 2 | {
"fields": [
{
"modifier": "",
"original_string": "static final int CHUNK_SIZE = 76;",
"type": "int",
"var_name": "CHUNK_SIZE"
},
{
"modifier": "",
"original_string": "static final byte[] CHUNK_SEPARATOR = {'\\r','\\n'};",
"type": "byte[]",
"var_name": "CHU... | {
"body": "void encode(byte[] in, int inPos, int inAvail) {\n if (eof) {\n return;\n }\n // inAvail < 0 is how we're informed of EOF in the underlying data we're\n // encoding.\n if (inAvail < 0) {\n eof = true;\n if (buf == null || buf.length - pos ... | [
{
"covered_lines": 10,
"line_coverage": 0.2632,
"name": "org.apache.commons.codec.binary.Base64InputStreamTest::testBase64EmptyInputStream",
"total_lines": 38
},
{
"covered_lines": 10,
"line_coverage": 0.2632,
"name": "org.apache.commons.codec.binary.Base64OutputStreamTest::testBase6... |
262 | Codec | 3 | {
"fields": [
{
"modifier": "",
"original_string": "private static final String VOWELS = \"AEIOUY\";",
"type": "String",
"var_name": "VOWELS"
},
{
"modifier": "",
"original_string": "private static final String[] SILENT_START = \n { \"GN\", \"KN\", \"PN\", \"WR\", \"... | {
"body": "private int handleG(String value, \n DoubleMetaphoneResult result, \n int index, \n boolean slavoGermanic) {\n if (charAt(value, index + 1) == 'H') {\n index = handleGH(value, result, index);\n } else if (charAt(v... | [
{
"covered_lines": 16,
"line_coverage": 0.4324,
"name": "org.apache.commons.codec.language.DoubleMetaphone2Test::testDoubleMetaphoneAlternate",
"total_lines": 37
}
] |
263 | Codec | 5 | {
"fields": [
{
"modifier": "",
"original_string": "private static final int DEFAULT_BUFFER_RESIZE_FACTOR = 2;",
"type": "int",
"var_name": "DEFAULT_BUFFER_RESIZE_FACTOR"
},
{
"modifier": "",
"original_string": "private static final int DEFAULT_BUFFER_SIZE = 8192;",
... | {
"body": "void decode(byte[] in, int inPos, int inAvail) {\n if (eof) {\n return;\n }\n if (inAvail < 0) {\n eof = true;\n }\n for (int i = 0; i < inAvail; i++) {\n if (buffer == null || buffer.length - pos < decodeSize) {\n resizeBuf... | [
{
"covered_lines": 21,
"line_coverage": 0.7241,
"name": "org.apache.commons.codec.binary.Base64InputStreamTest::testCodec98NPE",
"total_lines": 29
},
{
"covered_lines": 22,
"line_coverage": 0.7586,
"name": "org.apache.commons.codec.binary.Base64OutputStreamTest::testCodec98NPE",
... |
264 | Codec | 6 | {
"fields": [
{
"modifier": "",
"original_string": "private final boolean doEncode;",
"type": "boolean",
"var_name": "doEncode"
},
{
"modifier": "",
"original_string": "private final Base64 base64;",
"type": "Base64",
"var_name": "base64"
},
{
... | {
"body": "public int read(byte b[], int offset, int len) throws IOException {\n if (b == null) {\n throw new NullPointerException();\n } else if (offset < 0 || len < 0) {\n throw new IndexOutOfBoundsException();\n } else if (offset > b.length || offset + len > b.length) {\n... | [
{
"covered_lines": 12,
"line_coverage": 0.7059,
"name": "org.apache.commons.codec.binary.Base64InputStreamTest::testCodec101",
"total_lines": 17
}
] |
265 | Codec | 7 | {
"fields": [
{
"modifier": "",
"original_string": "private static final int DEFAULT_BUFFER_RESIZE_FACTOR = 2;",
"type": "int",
"var_name": "DEFAULT_BUFFER_RESIZE_FACTOR"
},
{
"modifier": "",
"original_string": "private static final int DEFAULT_BUFFER_SIZE = 8192;",
... | {
"body": "public static String encodeBase64String(byte[] binaryData) {\n return StringUtils.newStringUtf8(encodeBase64(binaryData, false));\n }",
"class_method_signature": "Base64.encodeBase64String(byte[] binaryData)",
"constructor": false,
"full_signature": "public static String encodeBase64String(... | [
{
"covered_lines": 1,
"line_coverage": 1,
"name": "org.apache.commons.codec.binary.Base64Test::testByteToStringVariations",
"total_lines": 1
},
{
"covered_lines": 1,
"line_coverage": 1,
"name": "org.apache.commons.codec.binary.Base64Test::testRfc4648Section10Encode",
"total_lines... |
266 | Codec | 8 | {
"fields": [
{
"modifier": "",
"original_string": "private final boolean doEncode;",
"type": "boolean",
"var_name": "doEncode"
},
{
"modifier": "",
"original_string": "private final Base64 base64;",
"type": "Base64",
"var_name": "base64"
},
{
... | {
"body": "public int read(byte b[], int offset, int len) throws IOException {\n if (b == null) {\n throw new NullPointerException();\n } else if (offset < 0 || len < 0) {\n throw new IndexOutOfBoundsException();\n } else if (offset > b.length || offset + len > b.length) {\n... | [
{
"covered_lines": 14,
"line_coverage": 0.7,
"name": "org.apache.commons.codec.binary.Base64InputStreamTest::testCodec105",
"total_lines": 20
}
] |
267 | Codec | 9 | {
"fields": [
{
"modifier": "",
"original_string": "private static final int DEFAULT_BUFFER_RESIZE_FACTOR = 2;",
"type": "int",
"var_name": "DEFAULT_BUFFER_RESIZE_FACTOR"
},
{
"modifier": "",
"original_string": "private static final int DEFAULT_BUFFER_SIZE = 8192;",
... | {
"body": "public static byte[] encodeBase64(byte[] binaryData, boolean isChunked, boolean urlSafe, int maxResultSize) {\n if (binaryData == null || binaryData.length == 0) {\n return binaryData;\n }\n\n long len = getEncodeLength(binaryData, isChunked ? MIME_CHUNK_SIZE : 0, CHUNK_SEPA... | [
{
"covered_lines": 6,
"line_coverage": 0.8571,
"name": "org.apache.commons.codec.binary.Base64Test::testCodec112",
"total_lines": 7
}
] |
268 | Codec | 10 | {
"fields": [],
"file": "src/java/org/apache/commons/codec/language/Caverphone.java",
"identifier": "Caverphone",
"interfaces": "StringEncoder",
"superclass": ""
} | {
"body": "public String caverphone(String txt) {\n // NOTE: Version 1.0 of Caverphone is easily derivable from this code \n // by commenting out the 2.0 lines and adding in the 1.0 lines\n\n if( txt == null || txt.length() == 0 ) {\n return \"1111111111\";\n }\n\n // 1. ... | [
{
"covered_lines": 61,
"line_coverage": 0.9839,
"name": "org.apache.commons.codec.language.CaverphoneTest::testEndMb",
"total_lines": 62
}
] |
269 | Codec | 11 | {
"fields": [
{
"modifier": "",
"original_string": "private final String charset;",
"type": "String",
"var_name": "charset"
},
{
"modifier": "",
"original_string": "private static final BitSet PRINTABLE_CHARS = new BitSet(256);",
"type": "BitSet",
"var_name"... | {
"body": "public static final byte[] decodeQuotedPrintable(byte[] bytes) throws DecoderException {\n if (bytes == null) {\n return null;\n }\n ByteArrayOutputStream buffer = new ByteArrayOutputStream();\n for (int i = 0; i < bytes.length; i++) {\n final int b = bytes... | [
{
"covered_lines": 10,
"line_coverage": 0.7143,
"name": "org.apache.commons.codec.net.QuotedPrintableCodecTest::testSkipNotEncodedCRLF",
"total_lines": 14
},
{
"covered_lines": 10,
"line_coverage": 0.7143,
"name": "org.apache.commons.codec.net.QuotedPrintableCodecTest::testSoftLineBr... |
270 | Codec | 11 | {
"fields": [
{
"modifier": "",
"original_string": "private final String charset;",
"type": "String",
"var_name": "charset"
},
{
"modifier": "",
"original_string": "private static final BitSet PRINTABLE_CHARS = new BitSet(256);",
"type": "BitSet",
"var_name"... | {
"body": "public static final byte[] encodeQuotedPrintable(BitSet printable, byte[] bytes) {\n if (bytes == null) {\n return null;\n }\n if (printable == null) {\n printable = PRINTABLE_CHARS;\n }\n ByteArrayOutputStream buffer = new ByteArrayOutputStream();\n... | [
{
"covered_lines": 0,
"line_coverage": 0,
"name": "org.apache.commons.codec.net.QuotedPrintableCodecTest::testSkipNotEncodedCRLF",
"total_lines": 13
},
{
"covered_lines": 0,
"line_coverage": 0,
"name": "org.apache.commons.codec.net.QuotedPrintableCodecTest::testSoftLineBreakDecode",
... |
271 | Codec | 11 | {
"fields": [
{
"modifier": "",
"original_string": "private final String charset;",
"type": "String",
"var_name": "charset"
},
{
"modifier": "",
"original_string": "private static final BitSet PRINTABLE_CHARS = new BitSet(256);",
"type": "BitSet",
"var_name"... | {
"body": "private static final int encodeQuotedPrintable(int b, ByteArrayOutputStream buffer) {\n buffer.write(ESCAPE_CHAR);\n char hex1 = Character.toUpperCase(Character.forDigit((b >> 4) & 0xF, 16));\n char hex2 = Character.toUpperCase(Character.forDigit(b & 0xF, 16));\n buffer.write(he... | [
{
"covered_lines": 0,
"line_coverage": 0,
"name": "org.apache.commons.codec.net.QuotedPrintableCodecTest::testSkipNotEncodedCRLF",
"total_lines": 13
},
{
"covered_lines": 0,
"line_coverage": 0,
"name": "org.apache.commons.codec.net.QuotedPrintableCodecTest::testSoftLineBreakDecode",
... |
272 | Codec | 13 | {
"fields": [
{
"modifier": "",
"original_string": "private static final String VOWELS = \"AEIOUY\";",
"type": "String",
"var_name": "VOWELS"
},
{
"modifier": "",
"original_string": "private static final String[] SILENT_START =\n { \"GN\", \"KN\", \"PN\", \"WR\",... | {
"body": "public boolean isDoubleMetaphoneEqual(final String value1, final String value2, final boolean alternate) {\n return StringUtils.equals(doubleMetaphone(value1, alternate), doubleMetaphone(value2, alternate));\n }",
"class_method_signature": "DoubleMetaphone.isDoubleMetaphoneEqual(final String va... | [
{
"covered_lines": 1,
"line_coverage": 1,
"name": "org.apache.commons.codec.language.DoubleMetaphoneTest::testIsDoubleMetaphoneEqualBasic",
"total_lines": 1
},
{
"covered_lines": 1,
"line_coverage": 1,
"name": "org.apache.commons.codec.language.DoubleMetaphoneTest::testCodec184",
... |
273 | Codec | 14 | {
"fields": [
{
"modifier": "",
"original_string": "private static final Map<NameType, Set<String>> NAME_PREFIXES = new EnumMap<NameType, Set<String>>(NameType.class);",
"type": "Map<NameType, Set<String>>",
"var_name": "NAME_PREFIXES"
},
{
"modifier": "",
"original_str... | {
"body": "private PhonemeBuilder applyFinalRules(final PhonemeBuilder phonemeBuilder,\n final Map<String, List<Rule>> finalRules) {\n if (finalRules == null) {\n throw new NullPointerException(\"finalRules can not be null\");\n }\n if (finalRu... | [
{
"covered_lines": 18,
"line_coverage": 0.9,
"name": "org.apache.commons.codec.language.bm.PhoneticEngineRegressionTest::testCompatibilityWithOriginalVersion",
"total_lines": 20
}
] |
274 | Codec | 15 | {
"fields": [
{
"modifier": "",
"original_string": "public static final String US_ENGLISH_MAPPING_STRING = \"01230120022455012623010202\";",
"type": "String",
"var_name": "US_ENGLISH_MAPPING_STRING"
},
{
"modifier": "",
"original_string": "private static final char[] US... | {
"body": "private char getMappingCode(final String str, final int index) {\n // map() throws IllegalArgumentException\n final char mappedChar = this.map(str.charAt(index));\n // HW rule check\n if (index > 1 && mappedChar != '0') {\n for (int i=index-1 ; i>=0 ; i--) {\n ... | [
{
"covered_lines": 9,
"line_coverage": 1,
"name": "org.apache.commons.codec.language.SoundexTest::testHWRuleEx1",
"total_lines": 9
}
] |
275 | Codec | 17 | {
"fields": [],
"file": "src/main/java/org/apache/commons/codec/binary/StringUtils.java",
"identifier": "StringUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "public static String newStringIso8859_1(final byte[] bytes) {\n return newString(bytes, Charsets.ISO_8859_1);\n }",
"class_method_signature": "StringUtils.newStringIso8859_1(final byte[] bytes)",
"constructor": false,
"full_signature": "public static String newStringIso8859_1(final byte[] b... | [
{
"covered_lines": 1,
"line_coverage": 1,
"name": "org.apache.commons.codec.binary.StringUtilsTest::testNewStringNullInput_CODEC229",
"total_lines": 1
}
] |
276 | Codec | 18 | {
"fields": [],
"file": "src/main/java/org/apache/commons/codec/binary/StringUtils.java",
"identifier": "StringUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "public static boolean equals(final CharSequence cs1, final CharSequence cs2) {\n if (cs1 == cs2) {\n return true;\n }\n if (cs1 == null || cs2 == null) {\n return false;\n }\n if (cs1 instanceof String && cs2 instanceof String) {\n return ... | [
{
"covered_lines": 5,
"line_coverage": 0.7143,
"name": "org.apache.commons.codec.binary.StringUtilsTest::testEqualsCS1",
"total_lines": 7
},
{
"covered_lines": 4,
"line_coverage": 0.5714,
"name": "org.apache.commons.codec.binary.StringUtilsTest::testEqualsCS2",
"total_lines": 7
... |
277 | Collections | 2 | {
"fields": [
{
"modifier": "",
"original_string": "private ExtendedProperties defaults;",
"type": "ExtendedProperties",
"var_name": "defaults"
},
{
"modifier": "",
"original_string": "protected String file;",
"type": "String",
"var_name": "file"
},
... | {
"body": "public String getInclude() {\n if (includePropertyName == null) {\n return include; // backwards compatability\n }\n if (\"\".equals(includePropertyName)) {\n return null; // hack to allow backwards compatability\n }\n return includePropertyName;\n... | [
{
"covered_lines": 1,
"line_coverage": 1,
"name": "org.apache.commons.collections.TestExtendedProperties::testInclude",
"total_lines": 1
}
] |
278 | Collections | 2 | {
"fields": [
{
"modifier": "",
"original_string": "private ExtendedProperties defaults;",
"type": "ExtendedProperties",
"var_name": "defaults"
},
{
"modifier": "",
"original_string": "protected String file;",
"type": "String",
"var_name": "file"
},
... | {
"body": "public void setInclude(String inc) {\n if (inc == null) {\n inc = \"\"; // hack to allow backwards compatability\n }\n includePropertyName = inc;\n }",
"class_method_signature": "ExtendedProperties.setInclude(String inc)",
"constructor": false,
"full_signature": "p... | [
{
"covered_lines": 2,
"line_coverage": 1,
"name": "org.apache.commons.collections.TestExtendedProperties::testInclude",
"total_lines": 2
}
] |
279 | Collections | 3 | {
"fields": [
{
"modifier": "",
"original_string": "private static Integer INTEGER_ONE = new Integer(1);",
"type": "Integer",
"var_name": "INTEGER_ONE"
},
{
"modifier": "",
"original_string": "public static final Collection EMPTY_COLLECTION = UnmodifiableCollection.deco... | {
"body": "public static Collection removeAll(Collection collection, Collection remove) {\n return ListUtils.removeAll(collection, remove);\n }",
"class_method_signature": "CollectionUtils.removeAll(Collection collection, Collection remove)",
"constructor": false,
"full_signature": "public static Coll... | [
{
"covered_lines": 1,
"line_coverage": 1,
"name": "org.apache.commons.collections.TestCollectionUtils::testRemoveAll",
"total_lines": 1
}
] |
280 | Collections | 4 | {
"fields": [
{
"modifier": "",
"original_string": "private final Factory collectionFactory;",
"type": "Factory",
"var_name": "collectionFactory"
},
{
"modifier": "",
"original_string": "private transient Collection values;",
"type": "Collection",
"var_name"... | {
"body": "public Object put(Object key, Object value) {\n boolean result = false;\n Collection coll = getCollection(key);\n if (coll == null) {\n coll = createCollection(1); // might produce a non-empty collection\n coll.add(value);\n if (coll.size() > 0) {\n ... | [
{
"covered_lines": 9,
"line_coverage": 0.9,
"name": "org.apache.commons.collections.map.TestMultiValueMap::testPutWithList",
"total_lines": 10
},
{
"covered_lines": 0,
"line_coverage": 0,
"name": "org.apache.commons.collections.map.TestMultiValueMap::testPutAll_KeyCollection",
"t... |
281 | Collections | 6 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = -6701087419741928296L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "private transient int size;",
"type": "int",
"va... | {
"body": "public Object remove(Object key) {\n if (delegateMap != null) {\n return delegateMap.remove(key);\n }\n if (size == 0) {\n return null;\n }\n if (key == null) {\n switch (size) { // drop through\n case 3:\n ... | [
{
"covered_lines": 17,
"line_coverage": 0.1466,
"name": "org.apache.commons.collections.map.TestFlat3Map::testCollections261",
"total_lines": 116
}
] |
282 | Collections | 7 | {
"fields": [
{
"modifier": "",
"original_string": "private ExtendedProperties defaults;",
"type": "ExtendedProperties",
"var_name": "defaults"
},
{
"modifier": "",
"original_string": "protected String file;",
"type": "String",
"var_name": "file"
},
... | {
"body": "private void addPropertyInternal(String key, Object value) {\n Object current = this.get(key);\n\n if (current instanceof String) {\n // one object already in map - convert it to a vector\n List values = new Vector(2);\n values.add(current);\n value... | [
{
"covered_lines": 0,
"line_coverage": 0,
"name": "org.apache.commons.collections.TestExtendedProperties::testKeySet2",
"total_lines": 12
},
{
"covered_lines": 6,
"line_coverage": 0.5,
"name": "org.apache.commons.collections.TestExtendedProperties::testKeySet3",
"total_lines": 12... |
283 | Collections | 8 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = -3482960336579541419L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "protected transient Object[] buffer;",
"type": "Object... | {
"body": "private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {\n in.defaultReadObject();\n int size = in.readInt();\n int length = in.readInt();\n buffer = new Object[length];\n for (int i = 0; i < size; i++) {\n buffer[i] = in.readO... | [
{
"covered_lines": 7,
"line_coverage": 0.875,
"name": "org.apache.commons.collections.buffer.TestUnboundedFifoBuffer::testCollections220",
"total_lines": 8
}
] |
284 | Collections | 8 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = -3482960336579541419L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "protected transient Object[] buffer;",
"type": "Object... | {
"body": "private void writeObject(ObjectOutputStream out) throws IOException {\n out.defaultWriteObject();\n out.writeInt(size());\n out.writeInt(buffer.length);\n for (Iterator it = iterator(); it.hasNext();) {\n out.writeObject(it.next());\n }\n }",
"class_method... | [
{
"covered_lines": 4,
"line_coverage": 0.8,
"name": "org.apache.commons.collections.buffer.TestUnboundedFifoBuffer::testCollections220",
"total_lines": 5
}
] |
285 | Collections | 9 | {
"fields": [
{
"modifier": "",
"original_string": "private ExtendedProperties defaults;",
"type": "ExtendedProperties",
"var_name": "defaults"
},
{
"modifier": "",
"original_string": "protected String file;",
"type": "String",
"var_name": "file"
},
... | {
"body": "public void combine(ExtendedProperties props) {\n for (Iterator it = props.getKeys(); it.hasNext();) {\n String key = (String) it.next();\n super.put(key, props.get(key));\n }\n }",
"class_method_signature": "ExtendedProperties.combine(ExtendedProperties props)",
... | [
{
"covered_lines": 5,
"line_coverage": 1,
"name": "org.apache.commons.collections.TestExtendedProperties::testCollections271",
"total_lines": 5
}
] |
286 | Collections | 12 | {
"fields": [
{
"modifier": "",
"original_string": "private ExtendedProperties defaults;",
"type": "ExtendedProperties",
"var_name": "defaults"
},
{
"modifier": "",
"original_string": "protected String file;",
"type": "String",
"var_name": "file"
},
... | {
"body": "public void combine(ExtendedProperties props) {\n for (Iterator it = props.getKeys(); it.hasNext();) {\n String key = (String) it.next();\n clearProperty(key);\n addPropertyDirect(key, props.get(key));\n }\n }",
"class_method_signature": "ExtendedProperti... | [
{
"covered_lines": 5,
"line_coverage": 1,
"name": "org.apache.commons.collections.TestExtendedProperties::testCollections271",
"total_lines": 5
}
] |
287 | Collections | 13 | {
"fields": [
{
"modifier": "",
"original_string": "private ExtendedProperties defaults;",
"type": "ExtendedProperties",
"var_name": "defaults"
},
{
"modifier": "",
"original_string": "protected String file;",
"type": "String",
"var_name": "file"
},
... | {
"body": "public static ExtendedProperties convertProperties(Properties props) {\n ExtendedProperties c = new ExtendedProperties();\n\n for (Enumeration e = props.propertyNames(); e.hasMoreElements();) {\n String s = (String) e.nextElement();\n String value = props.getProperty(s);... | [
{
"covered_lines": 4,
"line_coverage": 0.6667,
"name": "org.apache.commons.collections.TestExtendedProperties::testCollections299",
"total_lines": 6
}
] |
288 | Collections | 14 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = -7074655917369299456L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "src/java/org/apache/commons/collections/map/CaseInsensitiveMap.java",
"identifier": "CaseInsensit... | {
"body": "protected Object convertKey(Object key) {\n if (key != null) {\n char[] chars = key.toString().toCharArray();\n for (int i = chars.length - 1; i >= 0; i--) {\n chars[i] = Character.toLowerCase(Character.toUpperCase(chars[i]));\n }\n return n... | [
{
"covered_lines": 2,
"line_coverage": 0.6667,
"name": "org.apache.commons.collections.map.TestCaseInsensitiveMap::testLocaleIndependence",
"total_lines": 3
}
] |
289 | Collections | 15 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 7196982186153478694L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "protected final Set set;",
"type": "Set",
"var_na... | {
"body": "public Object set(int index, Object object) {\n int pos = indexOf(object);\n Object removed = super.set(index, object);\n\n if (pos != -1 && pos != index) {\n // the object is already in the uniq list\n // (and it hasn't been swapped with itself)\n supe... | [
{
"covered_lines": 4,
"line_coverage": 0.5714,
"name": "org.apache.commons.collections.list.TestSetUniqueList::testCollections304",
"total_lines": 7
}
] |
290 | Collections | 16 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 7196982186153478694L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "protected final Set set;",
"type": "Set",
"var_na... | {
"body": "public List subList(int fromIndex, int toIndex) {\n List superSubList = super.subList(fromIndex, toIndex);\n Set subSet = createSetBasedOnList(set, superSubList);\n return new SetUniqueList(superSubList, subSet);\n }",
"class_method_signature": "SetUniqueList.subList(int fromIndex... | [
{
"covered_lines": 1,
"line_coverage": 1,
"name": "org.apache.commons.collections.list.TestSetUniqueList::testCollections307",
"total_lines": 1
}
] |
291 | Collections | 17 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 5633766978029907089L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "private final T iValue;",
"type": "T",
"var_name"... | {
"body": "public boolean evaluate(T object) {\n if (equator != null) {\n return equator.equate(iValue, object);\n } else {\n return iValue.equals(object);\n }\n }",
"class_method_signature": "EqualPredicate.evaluate(T object)",
"constructor": false,
"full_signature... | [
{
"covered_lines": 1,
"line_coverage": 1,
"name": "org.apache.commons.collections.functors.TestEqualPredicate::objectFactoryUsesEqualsForTest",
"total_lines": 1
}
] |
292 | Collections | 18 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = -228664372470420141L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "protected final List<E> setOrder;",
"type": "List<E>",
... | {
"body": "@Override\n public boolean retainAll(Collection<?> coll) {\n Set<Object> collectionRetainAll = new HashSet<Object>();\n for (Iterator<?> it = coll.iterator(); it.hasNext();) {\n Object next = it.next();\n if (collection.contains(next)) {\n collectionRet... | [
{
"covered_lines": 5,
"line_coverage": 0.5556,
"name": "org.apache.commons.collections.set.ListOrderedSetTest::testRetainAllCollections426",
"total_lines": 9
}
] |
293 | Collections | 19 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 7196982186153478694L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "protected final Set<E> set;",
"type": "Set<E>",
"... | {
"body": "@Override\n public E set(final int index, final E object) {\n final int pos = indexOf(object);\n final E removed = super.set(index, object);\n\n if (pos != -1 && pos != index) {\n // the object is already in the uniq list\n // (and it hasn't been swapped with i... | [
{
"covered_lines": 6,
"line_coverage": 0.8571,
"name": "org.apache.commons.collections.list.SetUniqueListTest::testSetCollections444",
"total_lines": 7
}
] |
294 | Collections | 20 | {
"fields": [
{
"modifier": "",
"original_string": "private AVLNode<E> root;",
"type": "AVLNode<E>",
"var_name": "root"
},
{
"modifier": "",
"original_string": "private int size;",
"type": "int",
"var_name": "size"
}
],
"file": "src/main/java/org/apa... | {
"body": "public void remove() {\n checkModCount();\n if (currentIndex == -1) {\n throw new IllegalStateException();\n }\n parent.remove(currentIndex);\n if (nextIndex != currentIndex) {\n // remove() following next()\n ... | [
{
"covered_lines": 6,
"line_coverage": 1,
"name": "org.apache.commons.collections.list.TreeListTest::testBugCollections447",
"total_lines": 6
}
] |
295 | Collections | 21 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = 7196982186153478694L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "protected final Set<E> set;",
"type": "Set<E>",
"... | {
"body": "@Override\n public List<E> subList(final int fromIndex, final int toIndex) {\n final List<E> superSubList = super.subList(fromIndex, toIndex);\n final Set<E> subSet = createSetBasedOnList(set, superSubList);\n return ListUtils.unmodifiableList(new SetUniqueList<E>(superSubList, subS... | [
{
"covered_lines": 3,
"line_coverage": 1,
"name": "org.apache.commons.collections4.list.SetUniqueListTest::testSubListIsUnmodifiable",
"total_lines": 3
}
] |
296 | Collections | 23 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = -7156426030315945159L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "private final Trie<K, V> delegate;",
"type": "Trie<K, ... | {
"body": "public static <K, V> Trie<K, V> unmodifiableTrie(final Trie<K, ? extends V> trie) {\n if (trie instanceof Unmodifiable) {\n @SuppressWarnings(\"unchecked\") // safe to upcast\n final Trie<K, V> tmpTrie = (Trie<K, V>) trie;\n return tmpTrie;\n }\n return... | [
{
"covered_lines": 1,
"line_coverage": 1,
"name": "org.apache.commons.collections4.TrieUtilsTest::testUnmodifiableTrie",
"total_lines": 1
},
{
"covered_lines": 1,
"line_coverage": 1,
"name": "org.apache.commons.collections4.trie.UnmodifiableTrieTest::testDecorateFactory",
"total_... |
297 | Collections | 24 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = -7112672385450340330L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "src/main/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollection.java",
"id... | {
"body": "public static <E> BoundedCollection<E> unmodifiableBoundedCollection(final BoundedCollection<? extends E> coll) {\n if (coll instanceof Unmodifiable) {\n @SuppressWarnings(\"unchecked\") // safe to upcast\n final BoundedCollection<E> tmpColl = (BoundedCollection<E>) coll;\n ... | [
{
"covered_lines": 1,
"line_coverage": 1,
"name": "org.apache.commons.collections4.collection.UnmodifiableBoundedCollectionTest::testDecorateFactory",
"total_lines": 1
},
{
"covered_lines": 1,
"line_coverage": 1,
"name": "org.apache.commons.collections4.collection.UnmodifiableBounded... |
298 | Collections | 27 | {
"fields": [
{
"modifier": "",
"original_string": "private static final long serialVersionUID = -2214159910087182007L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"modifier": "",
"original_string": "private final Factory<? extends Collection<V>> collectionFac... | {
"body": "private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException {\n is.defaultReadObject();\n // ensure that the de-serialized class is a Collection, COLLECTIONS-580\n if (clazz != null && !Collection.class.isAssignableFrom(clazz)) {\n ... | [
{
"covered_lines": 3,
"line_coverage": 1,
"name": "org.apache.commons.collections4.map.MultiValueMapTest::testUnsafeDeSerialization",
"total_lines": 3
}
] |
299 | Compress | 1 | {
"fields": [
{
"modifier": "",
"original_string": "private CpioArchiveEntry cpioEntry;",
"type": "CpioArchiveEntry",
"var_name": "cpioEntry"
},
{
"modifier": "",
"original_string": "private boolean closed = false;",
"type": "boolean",
"var_name": "closed"
... | {
"body": "public void close() throws IOException {\n if (!this.closed) {\n this.finish();\n super.close();\n this.closed = true;\n }\n }",
"class_method_signature": "CpioArchiveOutputStream.close()",
"constructor": false,
"full_signature": "public void close() ... | [
{
"covered_lines": 4,
"line_coverage": 1,
"name": "org.apache.commons.compress.archivers.CpioTestCase::testCpioUnarchive",
"total_lines": 4
}
] |
300 | Compress | 2 | {
"fields": [
{
"modifier": "",
"original_string": "private final InputStream input;",
"type": "InputStream",
"var_name": "input"
},
{
"modifier": "",
"original_string": "private long offset = 0;",
"type": "long",
"var_name": "offset"
},
{
"mod... | {
"body": "public void close() throws IOException {\n if (!closed) {\n closed = true;\n input.close();\n }\n currentEntry = null;\n }",
"class_method_signature": "ArArchiveInputStream.close()",
"constructor": false,
"full_signature": "public void close() throws IOEx... | [
{
"covered_lines": 4,
"line_coverage": 1,
"name": "org.apache.commons.compress.archivers.ArTestCase::testArDelete",
"total_lines": 4
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.